{"version":3,"sources":["webpack:///./app/javascript/modules/lodashExtended.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js","webpack:///./app/javascript/modules/sharedComponents.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js","webpack:///./node_modules/@amcharts/amcharts4/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/Registry.js","webpack:///./app/javascript/modules/api/bin-types.ts","webpack:///./app/javascript/modules/sharedUtils.ts","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js","webpack:///./app/javascript/modules/auditComponents.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Iterator.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js","webpack:///./app/javascript/apps/ticket/selectors.ts","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Grip.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/Chart.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/Bullet.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/Legend.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/Series.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/types/SerialChart.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisBreak.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/Axis.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLine.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisFill.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/Grid.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLabel.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/Tick.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisTick.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRenderer.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererY.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxisBreak.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/ValueAxis.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/DateAxisBreak.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/DateAxis.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererX.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/CategoryAxisBreak.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/CategoryAxis.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/XYSeries.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/cursors/Cursor.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/cursors/XYCursor.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/XYChartScrollbar.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/types/XYChart.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/LineSeriesSegment.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/LineSeries.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/RadarSeries.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/cursors/RadarCursor.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisFillCircular.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/GridCircular.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisLabelCircular.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererCircular.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererRadial.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/types/RadarChart.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/ClockHand.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/types/GaugeChart.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/PercentSeries.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/types/PercentChart.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/PieTick.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/PieSeries.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/types/PieChart.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/PieSeries3D.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/types/PieChart3D.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/types/SlicedChart.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/FlowDiagramNode.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/FlowDiagramLink.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/types/FlowDiagram.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/LabelBullet.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/SankeyNode.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/SankeyLink.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/types/SankeyDiagram.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/ChordNode.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/QuadraticCurve.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/ChordLink.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/types/ChordDiagram.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/Column.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/ColumnSeries.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/TreeMapSeries.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/types/TreeMap.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererX3D.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/AxisRendererY3D.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/Column3D.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/ColumnSeries3D.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/types/XYChart3D.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/HeatLegend.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/Candlestick.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/CandlestickSeries.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/OHLC.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/OHLCSeries.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/StepLineSeriesSegment.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/StepLineSeries.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/RadarColumn.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/RadarColumnSeries.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/FunnelSlice.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/FunnelTick.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/FunnelSeries.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/PyramidSeries.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/PictorialStackedSeries.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/ConeColumn.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/ConeSeries.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/CurvedColumn.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/series/CurvedColumnSeries.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/axes/DurationAxis.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/CircleBullet.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/ErrorBullet.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/charts/elements/NavigationBar.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/Container.js","webpack:///./app/javascript/modules/sharedFormatters.js","webpack:///./app/javascript/apps/ticket/AppContext.ts","webpack:///./app/javascript/apps/auditor/app/selectors.js","webpack:///./app/javascript/modules/service/BinDot.tsx","webpack:///./app/javascript/modules/api/visitDateSlice.ts","webpack:///./app/javascript/apps/service-calendar/reducer.js","webpack:///./app/javascript/apps/ticket/app/store.ts","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Image.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyarc.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Morpher.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Polygon.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Preloader.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Slider.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/PlayButton.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RadialGradientModifier.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinePattern.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RectPattern.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/ColorizeFilter.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/BlurFilter.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/FocusFilter.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Plugin.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/AmChartsLogo.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Instance.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Time.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js","webpack:///./app/javascript/modules/service/forms/common/NotesSection.tsx","webpack:///./app/javascript/modules/api/services.ts","webpack:///./app/javascript/modules/service/forms/common/ServiceCalendarDatePicker.tsx","webpack:///./app/javascript/modules/submitToServer.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js","webpack:///./app/javascript/modules/service/GlobalDebugger.tsx","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/System.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/Base.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Responsive.js","webpack:///./app/javascript/apps/auditor/sections/selectors.js","webpack:///./app/javascript/modules/service/forms/common/ActionFormLayout.tsx","webpack:///./app/javascript/apps/pawa_auditor/sections/selectors.js","webpack:///./node_modules/@stimulus/core/dist/src/event_listener.js","webpack:///./node_modules/@stimulus/core/dist/src/dispatcher.js","webpack:///./node_modules/@stimulus/core/dist/src/action_descriptor.js","webpack:///./node_modules/@stimulus/core/dist/src/action.js","webpack:///./node_modules/@stimulus/core/dist/src/binding.js","webpack:///./node_modules/@stimulus/mutation-observers/dist/src/element_observer.js","webpack:///./node_modules/@stimulus/mutation-observers/dist/src/attribute_observer.js","webpack:///./node_modules/@stimulus/multimap/dist/src/set_operations.js","webpack:///./node_modules/@stimulus/multimap/dist/src/multimap.js","webpack:///./node_modules/@stimulus/multimap/dist/src/indexed_multimap.js","webpack:///./node_modules/@stimulus/mutation-observers/dist/src/token_list_observer.js","webpack:///./node_modules/@stimulus/mutation-observers/dist/src/value_list_observer.js","webpack:///./node_modules/@stimulus/core/dist/src/binding_observer.js","webpack:///./node_modules/@stimulus/core/dist/src/context.js","webpack:///./node_modules/@stimulus/core/dist/src/definition.js","webpack:///./node_modules/@stimulus/core/dist/src/module.js","webpack:///./node_modules/@stimulus/core/dist/src/data_map.js","webpack:///./node_modules/@stimulus/core/dist/src/selectors.js","webpack:///./node_modules/@stimulus/core/dist/src/target_set.js","webpack:///./node_modules/@stimulus/core/dist/src/scope.js","webpack:///./node_modules/@stimulus/core/dist/src/scope_observer.js","webpack:///./node_modules/@stimulus/core/dist/src/router.js","webpack:///./node_modules/@stimulus/core/dist/src/schema.js","webpack:///./node_modules/@stimulus/core/dist/src/application.js","webpack:///./node_modules/@stimulus/core/dist/src/target_properties.js","webpack:///./node_modules/@stimulus/core/dist/src/controller.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Strings.js","webpack:///./app/javascript/apps/auditor/app/operations.js","webpack:///./app/javascript/apps/pawa_auditor/components/sections/PAASummaryRow.jsx","webpack:///./app/javascript/apps/service-calendar/actions.js","webpack:///./app/javascript/modules/service/forms/common/VisitBoxTable.tsx","webpack:///./app/javascript/apps/auditor/sections/operations.js","webpack:///./app/javascript/modules/service/request-logs/ReportLogLayout.tsx","webpack:///./app/javascript/modules/service/forms/common/CustomTable.tsx","webpack:///./app/javascript/modules/api/utils.ts","webpack:///./app/javascript/modules/api/tickets.ts","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js","webpack:///./app/javascript/apps/auditor/components/ImagePoller.jsx","webpack:///./app/javascript/apps/auditor/bins/selectors.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/themes/ITheme.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/themes/animated.js","webpack:///./app/javascript/apps/auditor/bins/operations.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Animation.js","webpack:///./app/javascript/apps/pawa_auditor/components/sections/index.js","webpack:///./app/javascript/apps/auditor/components/DocumentUploader.jsx","webpack:///./app/javascript/apps/auditor/components/sections/WasteManagementPolicy.jsx","webpack:///./app/javascript/apps/auditor/components/sections/HazardousWasteConsignmentNotes.jsx","webpack:///./app/javascript/apps/auditor/components/sections/WasteManagementTraining.jsx","webpack:///./app/javascript/apps/auditor/components/sections/index.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/interaction/Mouse.js","webpack:///./app/javascript/modules/api/apiConfig.ts","webpack:///./app/javascript/modules/service/report-request-box/MainTabs.tsx","webpack:///./app/javascript/apps/auditor/components/binModals/SelectStorageType.jsx","webpack:///./app/javascript/apps/auditor/components/binModals/SelectContainerType.jsx","webpack:///./app/javascript/apps/auditor/components/ImageUploader.jsx","webpack:///./app/javascript/apps/auditor/components/SwitchDeviceAlert.jsx","webpack:///./app/javascript/apps/auditor/components/binModals/TakePhotoRow.jsx","webpack:///./app/javascript/apps/auditor/components/binModals/TakeExteriorPhoto.jsx","webpack:///./app/javascript/apps/auditor/components/binModals/TakeBulkStorageAreaPhoto.jsx","webpack:///./app/javascript/apps/auditor/components/binModals/ExternalBinComtainmentInfo.jsx","webpack:///./app/javascript/apps/auditor/components/binModals/BulkStorageAreaInfo.jsx","webpack:///./app/javascript/apps/auditor/components/binModals/TakeInteriorPhoto.jsx","webpack:///./app/javascript/apps/auditor/components/binModals/SelectContaminants.jsx","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js","webpack:///./app/javascript/modules/service/report-request-box/AdhocVisitRequestCard.tsx","webpack:///./app/javascript/modules/service/forms/common/QuantitySelector.tsx","webpack:///./app/javascript/modules/service/forms/common/VisitIcons.tsx","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/Options.js","webpack:///./app/javascript/apps/pawa_auditor/sections/operations.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Ease.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Colors.js","webpack:///./app/javascript/components/shared/Loader.jsx","webpack:///./app/javascript/modules/createGuid.js","webpack:///./app/javascript/modules/service/forms/common/BinReportTable.tsx","webpack:///./app/javascript/modules/service/ticket/types.ts","webpack:///./app/javascript/modules/service/forms/common/VisitBoxButtons.tsx","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradient.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/Smoothing.js","webpack:///./app/javascript/components/shared/VectorMaterial.jsx","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js","webpack:///./app/javascript/modules/components/YesNoSelect.tsx","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/AsyncPending.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/EventDispatcher.js","webpack:///./app/javascript/apps/auditor/components/Section.jsx","webpack:///./app/javascript/apps/auditor/components/SubmitSummarySection.jsx","webpack:///./app/javascript/apps/auditor/rooms/selectors.js","webpack:///./app/javascript/apps/pawa_auditor/wasteAudit/selectors.js","webpack:///./app/javascript/apps/pawa_auditor/app/selectors.js","webpack:///./app/javascript/apps/pawa_auditor/confirmatoryStatements/selectors.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Line.js","webpack:///./node_modules/@amcharts/amcharts4/lang/en.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Language.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Keyboard.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/formatters/TextFormatter.js","webpack:///./app/javascript/apps/auditor/bulkContainments/selectors.js","webpack:///./app/javascript/modules/service/forms/NewMessageActionForm.tsx","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/Paper.js","webpack:///./app/javascript/components/shared/InlineVariable.jsx","webpack:///./app/javascript/theme.ts","webpack:///./app/javascript/apps/pawa_auditor/components/Section.jsx","webpack:///./app/javascript/apps/pawa_auditor/components/SubmitSummarySection.jsx","webpack:///./app/javascript/modules/service/report-request-box/ReportRequestCardLayout.tsx","webpack:///./app/javascript/modules/service/forms/common/ShowMoreDivider.tsx","webpack:///./app/javascript/modules/service/forms/Debugger.jsx","webpack:///./app/javascript/modules/service/utils/Icons.tsx","webpack:///./app/javascript/apps/service-calendar/operations.js","webpack:///./app/javascript/modules/service/ticket/channel-footer/form/FormStyles.ts","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/DataItem.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_global.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_wks.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/Filter.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RadialGradient.js","webpack:///./app/javascript/apps/pawa_auditor/components/sections/Sec2WasteProductionAreas.jsx","webpack:///./app/javascript/apps/service-calendar/components/Error.jsx","webpack:///./app/javascript/modules/service/DeliveryInstruction.tsx","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Number.js","webpack:///./app/javascript/apps/ticket/app/hooks.ts","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_export.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_core.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/SortedList.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Slice.js","webpack:///./app/javascript/components/shared/StatelessModal.jsx","webpack:///./app/javascript/components/shared/StatelessPopover.jsx","webpack:///./app/javascript/components/shared/dayHelpers.js","webpack:///./app/javascript/modules/service/forms/common/CustomTimeLineNotes.tsx","webpack:///./app/javascript/modules/service/ticket/response-card/ReplyCardStyles.ts","webpack:///./app/javascript/apps/service-mappings/utils.js","webpack:///./app/javascript/modules/service/ticket/channel-header/ChannelHeaderStyles.ts","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/Component.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Circle.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/String.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedLine.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_is-object.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Order.js","webpack:///./app/javascript/apps/pawa_auditor/components/sections/Sec2WasteProductionAreas/operations.js","webpack:///./app/javascript/modules/service/CollectionInstruction.tsx","webpack:///./app/javascript/modules/service/report-request-box/PartialCollectionTooltip.tsx","webpack:///./app/javascript/modules/hooks/useResponse.ts","webpack:///./app/javascript/modules/hooks/useCannedResponse.ts","webpack:///./app/javascript/modules/hooks/useCannedResponses.ts","webpack:///./app/javascript/modules/service/report-request-box/AdhocVisitRequestCardDetails.tsx","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/formatters/DateFormatter.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/ColorSet.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Cache.js","webpack:///./app/javascript/components/shared/CheckWithLabel.jsx","webpack:///./app/javascript/components/shared/Popover.jsx","webpack:///./app/javascript/apps/auditor/app/actions.js","webpack:///./app/javascript/apps/auditor/components/ExternalBin.jsx","webpack:///./app/javascript/apps/auditor/components/BulkContainment.jsx","webpack:///./app/javascript/apps/auditor/wasteAudit/selectors.js","webpack:///./app/javascript/modules/service/forms/common/PdfModal.tsx","webpack:///./app/javascript/modules/service/report-request-box/StockDeliveryCard.tsx","webpack:///./app/javascript/modules/service/forms/common/FormSkeleton.tsx","webpack:///./app/javascript/modules/service/forms/RequestSpecChangeForm.tsx","webpack:///./app/javascript/modules/service/forms/ConfirmAdhocVisitForm.tsx","webpack:///./app/javascript/modules/service/forms/index.js","webpack:///./app/javascript/apps/auditor/components/MobilePhoneInput.jsx","webpack:///./app/javascript/apps/auditor/components/SwitchDeviceModal.jsx","webpack:///./app/javascript/apps/auditor/components/SwitchDeviceButton.jsx","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_ctx.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/AMElement.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/Pattern.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyline.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/data/JSONParser.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_an-object.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Rectangle.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Tooltip.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/data/CSVParser.js","webpack:///./app/javascript/apps/auditor/components/AddContainerBtn.jsx","webpack:///./app/javascript/apps/pawa_auditor/app/operations.js","webpack:///./app/javascript/modules/service/forms/common/DarkTooltip.tsx","webpack:///./app/javascript/modules/service/ticket/actions-menu/ActionMenuButton.tsx","webpack:///./app/javascript/modules/service/request-logs/RemediationLog.tsx","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_object-dp.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_descriptors.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/SpriteState.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/SVGContainer.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/data/DataLoader.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyspline.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradientModifier.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/DesaturateFilter.js","webpack:///./app/javascript/components/shared/Btn.jsx","webpack:///./app/javascript/components/shared/CheckBoxWithLabel.jsx","webpack:///./app/javascript/components/shared/DateSelect.jsx","webpack:///./app/javascript/components/shared/DaysOfWeekSelect.jsx","webpack:///./app/javascript/components/shared/DropdownSelect.jsx","webpack:///./app/javascript/components/shared/Link.jsx","webpack:///./app/javascript/components/shared/ListGroup.jsx","webpack:///./app/javascript/components/shared/ListGroupItem.jsx","webpack:///./app/javascript/components/shared/Modal.jsx","webpack:///./app/javascript/components/shared/ModelErrors.jsx","webpack:///./app/javascript/components/shared/NoWrap.jsx","webpack:///./app/javascript/components/shared/Scroller.jsx","webpack:///./app/javascript/components/shared/TickCross.jsx","webpack:///./app/javascript/components/shared/RadioInput.jsx","webpack:///./app/javascript/components/shared/TextAreaInput.jsx","webpack:///./app/javascript/components/shared/DateInput.jsx","webpack:///./app/javascript/components/shared/TextInput.jsx","webpack:///./app/javascript/components/shared/ShowDate.jsx","webpack:///./app/javascript/components/shared/StyledDialog.jsx","webpack:///./app/javascript/components/audit/YesNoInput.jsx","webpack:///./app/javascript/components/audit/TextAreaInput.jsx","webpack:///./app/javascript/components/audit/TextInput.jsx","webpack:///./app/javascript/components/audit/SummaryField.jsx","webpack:///./app/javascript/components/audit/RadioInput.jsx","webpack:///./app/javascript/components/audit/NumberInput.jsx","webpack:///./app/javascript/components/audit/MultiLineTextInput.jsx","webpack:///./app/javascript/components/audit/ModalLink.jsx","webpack:///./app/javascript/components/audit/CheckboxInput.jsx","webpack:///./app/javascript/components/audit/DateInput.jsx","webpack:///./app/javascript/components/audit/SelectWithOtherInput.jsx","webpack:///./app/javascript/components/audit/MultiSelectWithOtherInput.jsx","webpack:///./app/javascript/components/audit/ModalBox.jsx","webpack:///./app/javascript/components/audit/SelectListInput.jsx","webpack:///./app/javascript/components/audit/Section.jsx","webpack:///./app/javascript/components/audit/StatusSummary.jsx","webpack:///./app/javascript/components/audit/SummaryRow.jsx","webpack:///./app/javascript/components/audit/SubmitSummarySection.jsx","webpack:///./app/javascript/components/audit/SubmitSummary.jsx","webpack:///./app/javascript/components/service/CollectionInstruction.jsx","webpack:///./app/javascript/components/service/DeliveryInstruction.jsx","webpack:///./app/javascript/components/service/ServiceActionMenu.jsx","webpack:///./app/javascript/components/service/ServiceFormDrawer.jsx","webpack:///./app/javascript/components/service/Form.jsx","webpack:///./app/javascript/modules/service/report-request-box/RequestsCards.tsx","webpack:///./app/javascript/modules/service/service-box/FailedVisitsCollapsible.tsx","webpack:///./app/javascript/modules/service/VendorHeader.tsx","webpack:///./app/javascript/modules/service/ServiceBox.tsx","webpack:///./app/javascript/apps/ticket/ServiceBoxContext.ts","webpack:///./app/javascript/modules/service/ticket/TicketsList.tsx","webpack:///./app/javascript/modules/service/report-request-box/SpecChangeRequestCard.tsx","webpack:///./app/javascript/modules/service/report-request-box/SpecChangeRequestCardDetails.tsx","webpack:///./app/javascript/modules/service/report-request-box/VisitFrequencyChangeRequestCard.tsx","webpack:///./app/javascript/modules/service/report-request-box/ServiceTerminationRequestCard.tsx","webpack:///./app/javascript/modules/service/report-request-box/ServiceResumptionRequestCard.tsx","webpack:///./app/javascript/modules/service/report-request-box/ReportVisitFailureCard.tsx","webpack:///./app/javascript/modules/service/report-request-box/ReportVisitFailureCardTable.tsx","webpack:///./app/javascript/apps/service-calendar/utils.js","webpack:///./app/javascript/modules/service/VisitBox.tsx","webpack:///./app/javascript/modules/service/forms/common/DebuggerCollapsible.tsx","webpack:///./app/javascript/apps/service-calendar/components/StatusBar.jsx","webpack:///./app/javascript/modules/service/LocationServicesVendorBox.tsx","webpack:///./app/javascript/modules/service/VisitDetails.tsx","webpack:///./app/javascript/modules/hooks/useFetch.ts","webpack:///./app/javascript/modules/service/forms/common/AssumedCancelledVisits.tsx","webpack:///./app/javascript/modules/service/forms/VisitActionSelector.jsx","webpack:///./app/javascript/modules/service/forms/common/DeliveryUnitsTable.tsx","webpack:///./app/javascript/modules/service/forms/common/ThreeColumnFlexBox.tsx","webpack:///./app/javascript/modules/service/ticket/utils.ts","webpack:///./app/javascript/modules/service/forms/common/ResponseExpectedToggleButton.tsx","webpack:///./app/javascript/modules/service/ticket/channel-footer/form/AgentSelect.tsx","webpack:///./app/javascript/modules/service/forms/VoidFormDialog.tsx","webpack:///./app/javascript/apps/auditor/components/EditRoomModal.jsx","webpack:///./app/javascript/apps/auditor/components/EditInternalBinModal.jsx","webpack:///./app/javascript/apps/auditor/components/InternalBin.jsx","webpack:///./app/javascript/apps/auditor/components/Room.jsx","webpack:///./app/javascript/apps/auditor/rooms/operations.js","webpack:///./app/javascript/apps/auditor/components/InternalBinSummary.jsx","webpack:///./app/javascript/apps/auditor/components/sections/InternalWasteContainment.jsx","webpack:///./app/javascript/apps/auditor/components/ExternalBinSummary.jsx","webpack:///./app/javascript/apps/auditor/components/BulkContainmentSummary.jsx","webpack:///./app/javascript/apps/auditor/components/EditBulkContainmentModal.jsx","webpack:///./app/javascript/apps/auditor/bulkContainments/operations.js","webpack:///./app/javascript/apps/auditor/components/EditExternalBinModal.jsx","webpack:///./app/javascript/apps/auditor/components/sections/BulkWasteStorageContainment.jsx","webpack:///./app/javascript/apps/service-calendar/components/ListView.tsx","webpack:///./app/javascript/modules/service/ticket/VisitActivityTab.tsx","webpack:///./app/javascript/apps/auditor/components/LocationUpdateModal.jsx","webpack:///./app/javascript/apps/auditor/components/sections/GeneralInformation.jsx","webpack:///./app/javascript/modules/service/report-request-box/ServiceSuspensionRequestCardDetails.tsx","webpack:///./app/javascript/modules/service/report-request-box/ServiceSuspensionRequestCard.tsx","webpack:///./app/javascript/apps/service-mappings/components/BillingInfo.jsx","webpack:///./app/javascript/modules/service/forms/common/SttatusChip.tsx","webpack:///./app/javascript/modules/service/ticket/response-card/ReplyCard.tsx","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_hide.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_redefine.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_has.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Modal.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/formatters/DurationFormatter.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Validatable.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/data/DataParser.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Scrollbar.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Triangle.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedRectangle.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/LightenFilter.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/PopupCSS.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Popup.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedCircle.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Net.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_fails.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_a-function.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_cof.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_iterators.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_for-of.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/SpriteEvents.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionObjectEvents.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Ellipse.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/ResizeButton.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/TextLink.js","webpack:///./app/javascript/apps/pawa_auditor/components/sections/Sec1GeneralInformation.jsx","webpack:///./app/javascript/apps/pawa_auditor/components/sections/Sec5WasteStorageAndTraining.tsx","webpack:///./app/javascript/modules/service/service-box/StatusRow.tsx","webpack:///./app/javascript/modules/service/service-box/utils.ts","webpack:///./app/javascript/modules/service/service-box/ServiceMappingInfo.tsx","webpack:///./app/javascript/modules/service/service-box/VlcTable.tsx","webpack:///./app/javascript/modules/service/ticket/channel-footer/FooterDrawer.tsx","webpack:///./app/javascript/modules/service/ticket/channel-footer/form/FormComponents.tsx","webpack:///./app/javascript/modules/service/forms/TaggingForm.tsx","webpack:///./app/javascript/modules/service/request-logs/FailedVisitReportLog.tsx","webpack:///./app/javascript/apps/pawa_auditor/components/sections/Sec2WasteProductionAreas/EditWasteProductionAreaModal.jsx","webpack:///./app/javascript/apps/pawa_auditor/components/sections/Sec2WasteProductionAreas/WasteProductionArea.jsx","webpack:///./node_modules/core-js/modules/$.global.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_property-desc.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_uid.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_to-object.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_to-length.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es6.string.iterator.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_to-iobject.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_set-to-string-tag.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_classof.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/defs/SVGDefaults.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/Group.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionObject.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/interaction/InteractionKeyboardObject.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/interaction/Inertia.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/formatters/NumberFormatter.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/export/Export.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/data/DataSource.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedRectangle.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedShape.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/DropShadowFilter.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/Trapezoid.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/ZoomOutButton.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Cone.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/ColorModifier.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Rectangle3D.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/elements/3d/Slice3D.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/export/ExportCSS.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/export/ExportMenu.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/utils/Browser.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/GradientModifier.js","webpack:///./app/javascript/components/MapAndStreetviewApp.jsx","webpack:///./app/javascript/components/MultiMapApp.jsx","webpack:///./app/javascript/components/PolygonsMapApp.jsx","webpack:///./app/javascript/apps/service-app-test/App.tsx","webpack:///./app/javascript/apps/service-calendar/components/App.tsx","webpack:///./app/javascript/apps/ticket/App.tsx","webpack:///./app/javascript/apps/issues/services/actions.js","webpack:///./app/javascript/apps/issues/nextRoutineCollections/actions.js","webpack:///./app/javascript/apps/issues/specifications/actions.js","webpack:///./app/javascript/apps/issues/productSubscriptions/actions.js","webpack:///./app/javascript/apps/issues/newServiceIssues/actions.js","webpack:///./app/javascript/apps/issues/terminateServiceIssues/actions.js","webpack:///./app/javascript/apps/issues/supplyProductInstructions/actions.js","webpack:///./app/javascript/apps/issues/fixedCollectionTimes/actions.js","webpack:///./app/javascript/apps/issues/nextRoutineCollections/selectors.js","webpack:///./app/javascript/apps/issues/specifications/selectors.js","webpack:///./app/javascript/apps/issues/productSubscriptions/selectors.js","webpack:///./app/javascript/apps/issues/newServiceIssues/selectors.js","webpack:///./app/javascript/apps/issues/terminateServiceIssues/selectors.js","webpack:///./app/javascript/apps/issues/supplyProductInstructions/selectors.js","webpack:///./app/javascript/apps/issues/fixedCollectionTimes/selectors.js","webpack:///./app/javascript/apps/issues/services/selectors.js","webpack:///./app/javascript/apps/issues/services/operations.js","webpack:///./app/javascript/apps/issues/specifications/operations.js","webpack:///./app/javascript/apps/issues/adhocCollectionBookings/actions.js","webpack:///./app/javascript/apps/issues/binDeliveries/actions.js","webpack:///./app/javascript/apps/issues/missedCollectionReports/actions.js","webpack:///./app/javascript/apps/issues/components/ServiceActionMenu.jsx","webpack:///./app/javascript/apps/issues/nextRoutineCollections/operations.js","webpack:///./app/javascript/apps/issues/adhocCollectionBookings/operations.js","webpack:///./app/javascript/apps/issues/supplyProductInstructions/operations.js","webpack:///./app/javascript/apps/issues/binDeliveries/operations.js","webpack:///./app/javascript/apps/issues/components/serviceTypes/ServiceHolder.jsx","webpack:///./app/javascript/apps/issues/components/OrderLink.jsx","webpack:///./app/javascript/apps/issues/components/IssueBox.jsx","webpack:///./app/javascript/apps/issues/components/IssueBoxSection.jsx","webpack:///./app/javascript/apps/issues/components/NewServiceDeliveryOption.jsx","webpack:///./app/javascript/apps/issues/components/PlanSelect.jsx","webpack:///./app/javascript/apps/issues/components/CollectionPlanSelect.jsx","webpack:///./app/javascript/apps/issues/form/selectors.js","webpack:///./app/javascript/apps/issues/components/CollectionPlan.jsx","webpack:///./app/javascript/apps/issues/components/UnitSpecification.jsx","webpack:///./app/javascript/apps/issues/components/UnitSpecificationList.jsx","webpack:///./app/javascript/apps/issues/components/BinQuantitySelector.jsx","webpack:///./app/javascript/apps/issues/components/EditUnitSpecifications.jsx","webpack:///./app/javascript/apps/issues/components/BinSelector.jsx","webpack:///./app/javascript/apps/issues/components/EditSpecificationModal.jsx","webpack:///./app/javascript/apps/issues/components/NewServiceDeliveryDate.jsx","webpack:///./app/javascript/apps/issues/components/SpecificationConfirmDate.jsx","webpack:///./app/javascript/apps/issues/components/UnknownSpecification.jsx","webpack:///./app/javascript/apps/issues/components/CollectionDaysSelect.jsx","webpack:///./app/javascript/apps/issues/components/CollectionDays.jsx","webpack:///./app/javascript/apps/issues/components/FinalCollectionDate.jsx","webpack:///./app/javascript/apps/issues/components/FinalCollectionOption.jsx","webpack:///./app/javascript/apps/issues/components/NextCollectionDateSelect.jsx","webpack:///./app/javascript/apps/issues/components/NextCollectionDate.jsx","webpack:///./app/javascript/apps/issues/components/MarkProcessedBtn.jsx","webpack:///./app/javascript/apps/issues/missedCollectionReports/selectors.js","webpack:///./app/javascript/apps/issues/components/Timestamps.jsx","webpack:///./app/javascript/apps/issues/components/MissedCollectionReport.jsx","webpack:///./app/javascript/apps/issues/components/HistoryList.jsx","webpack:///./app/javascript/apps/issues/components/MissedCollectionReportList.jsx","webpack:///./app/javascript/apps/issues/adhocCollectionBookings/selectors.js","webpack:///./app/javascript/apps/issues/components/EditAdhocCollectionBookingModal.jsx","webpack:///./app/javascript/apps/issues/components/AdhocCollectionBookingDate.jsx","webpack:///./app/javascript/apps/issues/components/AdhocCollectionBookingRequestDate.jsx","webpack:///./app/javascript/apps/issues/components/AdhocCollectionBooking.jsx","webpack:///./app/javascript/apps/issues/components/AdhocCollectionBookingList.jsx","webpack:///./app/javascript/apps/issues/emergencyCollectionBookings/selectors.js","webpack:///./app/javascript/apps/issues/components/EmergencyCollectionRequest.jsx","webpack:///./app/javascript/apps/issues/components/EmergencyCollectionRequestList.jsx","webpack:///./app/javascript/apps/issues/binDeliveries/selectors.js","webpack:///./app/javascript/apps/issues/components/EditBinDeliveryModal.jsx","webpack:///./app/javascript/apps/issues/components/BinDeliveryDate.jsx","webpack:///./app/javascript/apps/issues/components/BinDeliveryRequestDate.jsx","webpack:///./app/javascript/apps/issues/components/BinDeliveryMissed.jsx","webpack:///./app/javascript/apps/issues/components/BinDelivery.jsx","webpack:///./app/javascript/apps/issues/components/BinDeliveryList.jsx","webpack:///./app/javascript/apps/issues/components/InvoiceLink.jsx","webpack:///./app/javascript/apps/issues/components/SupplyProductInvoiceLink.jsx","webpack:///./app/javascript/apps/issues/components/ProductSpecification.jsx","webpack:///./app/javascript/apps/issues/components/ProductSpecificationList.jsx","webpack:///./app/javascript/apps/issues/components/ProductQuantitySelector.jsx","webpack:///./app/javascript/apps/issues/components/EditProductSpecifications.jsx","webpack:///./app/javascript/apps/issues/components/ProductSelector.jsx","webpack:///./app/javascript/apps/issues/components/EditSupplyProductInstructionModal.jsx","webpack:///./app/javascript/apps/issues/components/SupplyProductConfirmDate.jsx","webpack:///./app/javascript/apps/issues/components/EditFixedCollectionTime.jsx","webpack:///./app/javascript/apps/issues/components/FixedCollectionTime.jsx","webpack:///./app/javascript/apps/issues/components/SupplyProductInstruction.jsx","webpack:///./app/javascript/apps/issues/components/SupplyProductInstructionList.jsx","webpack:///./app/javascript/apps/issues/components/serviceTypes/NhsCommissionedService.jsx","webpack:///./app/javascript/apps/issues/components/serviceTypes/NhsEmergencyService.jsx","webpack:///./app/javascript/apps/issues/components/serviceTypes/Covid19VaccinationService.jsx","webpack:///./app/javascript/apps/issues/components/serviceTypes/NeedleExchangeService.jsx","webpack:///./app/javascript/apps/issues/components/serviceTypes/RegularGeneralAndRecyclingService.jsx","webpack:///./app/javascript/apps/issues/components/EditProductSubscriptionModal.jsx","webpack:///./app/javascript/apps/issues/components/ProductSubscriptionConfirmDate.jsx","webpack:///./app/javascript/apps/issues/components/VendorConfirmedOnDate.jsx","webpack:///./app/javascript/apps/issues/components/serviceTypes/WashroomService.jsx","webpack:///./app/javascript/apps/issues/components/NewServiceStartDate.jsx","webpack:///./app/javascript/apps/issues/components/serviceTypes/PrePaidGeneralAndRecyclingService.jsx","webpack:///./app/javascript/apps/issues/components/serviceTypes/RegularClinicalService.jsx","webpack:///./app/javascript/apps/issues/components/serviceTypes/OnDemandClinicalService.jsx","webpack:///./app/javascript/apps/issues/components/serviceTypes/RegularConfidentialService.jsx","webpack:///./app/javascript/apps/issues/components/serviceTypes/OnDemandConfidentialService.jsx","webpack:///./app/javascript/apps/issues/components/serviceTypes/index.js","webpack:///./app/javascript/apps/issues/components/Service.jsx","webpack:///./app/javascript/apps/issues/generalIssues/selectors.js","webpack:///./app/javascript/apps/issues/generalIssues/actions.js","webpack:///./app/javascript/apps/issues/components/GeneralIssue.jsx","webpack:///./app/javascript/apps/issues/components/GeneralIssueList.jsx","webpack:///./app/javascript/apps/issues/emergencyCollectionBookings/actions.js","webpack:///./app/javascript/apps/issues/components/EditEmergencyCollectionBookingModal.jsx","webpack:///./app/javascript/apps/issues/components/EmergencyCollectionBooking.jsx","webpack:///./app/javascript/apps/issues/components/EmergencyCollectionBookingList.jsx","webpack:///./app/javascript/apps/issues/api/actions.js","webpack:///./app/javascript/apps/issues/api/operations.js","webpack:///./app/javascript/apps/issues/components/IssueList.jsx","webpack:///./app/javascript/apps/issues/services/reducer.js","webpack:///./app/javascript/apps/issues/services/index.js","webpack:///./app/javascript/apps/issues/nextRoutineCollections/reducer.js","webpack:///./app/javascript/apps/issues/nextRoutineCollections/index.js","webpack:///./app/javascript/apps/issues/newServiceIssues/reducer.js","webpack:///./app/javascript/apps/issues/newServiceIssues/index.js","webpack:///./app/javascript/apps/issues/specifications/reducer.js","webpack:///./app/javascript/apps/issues/specifications/index.js","webpack:///./app/javascript/apps/issues/missedCollectionReports/reducer.js","webpack:///./app/javascript/apps/issues/missedCollectionReports/index.js","webpack:///./app/javascript/apps/issues/supplyProductInstructions/reducer.js","webpack:///./app/javascript/apps/issues/supplyProductInstructions/index.js","webpack:///./app/javascript/apps/issues/productSubscriptions/reducer.js","webpack:///./app/javascript/apps/issues/productSubscriptions/index.js","webpack:///./app/javascript/apps/issues/fixedCollectionTimes/reducer.js","webpack:///./app/javascript/apps/issues/fixedCollectionTimes/index.js","webpack:///./app/javascript/apps/issues/adhocCollectionBookings/reducer.js","webpack:///./app/javascript/apps/issues/adhocCollectionBookings/index.js","webpack:///./app/javascript/apps/issues/emergencyCollectionBookings/reducer.js","webpack:///./app/javascript/apps/issues/emergencyCollectionBookings/index.js","webpack:///./app/javascript/apps/issues/generalIssues/reducer.js","webpack:///./app/javascript/apps/issues/generalIssues/index.js","webpack:///./app/javascript/apps/issues/terminateServiceIssues/reducer.js","webpack:///./app/javascript/apps/issues/terminateServiceIssues/index.js","webpack:///./app/javascript/apps/issues/binDeliveries/reducer.js","webpack:///./app/javascript/apps/issues/binDeliveries/index.js","webpack:///./app/javascript/apps/issues/api/reducer.js","webpack:///./app/javascript/apps/issues/api/index.js","webpack:///./app/javascript/apps/issues/reducer.js","webpack:///./app/javascript/components/IssueApp.jsx","webpack:///./app/javascript/apps/issues/store.js","webpack:///./app/javascript/apps/validation/lineItems/selectors.js","webpack:///./app/javascript/apps/validation/agreements/selectors.js","webpack:///./app/javascript/apps/validation/app/actions.js","webpack:///./app/javascript/apps/validation/salesLedgerItems/selectors.js","webpack:///./app/javascript/apps/validation/failureReports/selectors.js","webpack:///./app/javascript/apps/validation/hwcns/selectors.js","webpack:///./app/javascript/apps/validation/services/selectors.js","webpack:///./app/javascript/apps/validation/specifications/selectors.js","webpack:///./app/javascript/apps/validation/disputeLedgerItems/selectors.js","webpack:///./app/javascript/apps/validation/vendorInvoice/selectors.js","webpack:///./app/javascript/apps/validation/locations/selectors.js","webpack:///./app/javascript/apps/validation/app/selectors.js","webpack:///./app/javascript/apps/validation/stats/selectors.js","webpack:///./app/javascript/apps/validation/lineItems/actions.js","webpack:///./app/javascript/apps/validation/agreements/actions.js","webpack:///./app/javascript/apps/validation/api/actions.js","webpack:///./app/javascript/apps/validation/disputeLedgerItems/actions.js","webpack:///./app/javascript/apps/validation/api/utils.js","webpack:///./app/javascript/apps/validation/agreements/operations.js","webpack:///./app/javascript/apps/validation/disputeLedgerItems/operations.js","webpack:///./app/javascript/apps/validation/locations/actions.js","webpack:///./app/javascript/apps/validation/lineItems/operations.js","webpack:///./app/javascript/apps/validation/components/MatchBtn.jsx","webpack:///./app/javascript/apps/validation/vendorServices/selectors.js","webpack:///./app/javascript/apps/validation/app/utils.js","webpack:///./app/javascript/apps/validation/salesLedgerItems/actions.js","webpack:///./app/javascript/apps/validation/specifications/actions.js","webpack:///./app/javascript/apps/validation/app/operations.js","webpack:///./app/javascript/apps/validation/components/MoveLineItemBtn.jsx","webpack:///./app/javascript/apps/validation/components/SpecQuantity.jsx","webpack:///./app/javascript/apps/validation/components/Td.jsx","webpack:///./app/javascript/apps/validation/components/DisputeBtn.jsx","webpack:///./app/javascript/apps/validation/components/AgreementSpec.jsx","webpack:///./app/javascript/apps/validation/components/HwcnTable.jsx","webpack:///./app/javascript/apps/validation/components/ValidationBtn.jsx","webpack:///./app/javascript/apps/validation/failureReports/actions.js","webpack:///./app/javascript/apps/validation/components/FailureReport.jsx","webpack:///./app/javascript/apps/validation/services/actions.js","webpack:///./app/javascript/apps/validation/specifications/operations.js","webpack:///./app/javascript/apps/validation/components/Specification.jsx","webpack:///./app/javascript/apps/validation/components/IgnoreBtn.jsx","webpack:///./app/javascript/apps/validation/components/DisputeLedgerItems.jsx","webpack:///./app/javascript/apps/validation/components/MoveSalesItemBtn.jsx","webpack:///./app/javascript/apps/validation/components/SalesLedgerItems.jsx","webpack:///./app/javascript/apps/validation/components/MoveAgreementBtn.jsx","webpack:///./app/javascript/apps/validation/vendorAccounts/selectors.js","webpack:///./app/javascript/apps/validation/components/Agreement.jsx","webpack:///./app/javascript/apps/validation/components/CollectionAgreementForm.jsx","webpack:///./app/javascript/apps/validation/components/SupplyProductAgreementForm.jsx","webpack:///./app/javascript/apps/validation/components/AgreementForm.jsx","webpack:///./app/javascript/apps/validation/components/AddCollectionBtn.jsx","webpack:///./app/javascript/apps/validation/components/AddSupplyProductBtn.jsx","webpack:///./app/javascript/apps/validation/components/AcceptBtn.jsx","webpack:///./app/javascript/apps/validation/components/UnmatchedLineItems.jsx","webpack:///./app/javascript/apps/validation/components/UnmatchedFailureReports.jsx","webpack:///./app/javascript/apps/validation/components/ManualLineItems.jsx","webpack:///./app/javascript/apps/validation/components/HwcnList.jsx","webpack:///./app/javascript/apps/validation/components/TotalBadges.jsx","webpack:///./app/javascript/apps/validation/components/LocationDate.jsx","webpack:///./app/javascript/apps/validation/components/Location.jsx","webpack:///./app/javascript/apps/validation/components/UnmatchedSummary.jsx","webpack:///./app/javascript/apps/validation/components/DisputeSummary.jsx","webpack:///./app/javascript/apps/validation/api/selectors.js","webpack:///./app/javascript/apps/validation/components/DefaultMode.jsx","webpack:///./app/javascript/apps/validation/components/MatchMode.jsx","webpack:///./app/javascript/apps/validation/hwcns/actions.js","webpack:///./app/javascript/apps/validation/api/operations.js","webpack:///./app/javascript/apps/validation/components/App.jsx","webpack:///./app/javascript/apps/validation/api/reducer.js","webpack:///./app/javascript/apps/validation/api/index.js","webpack:///./app/javascript/apps/validation/agreements/reducer.js","webpack:///./app/javascript/apps/validation/agreements/index.js","webpack:///./app/javascript/apps/validation/lineItems/reducer.js","webpack:///./app/javascript/apps/validation/lineItems/index.js","webpack:///./app/javascript/apps/validation/locations/reducer.js","webpack:///./app/javascript/apps/validation/locations/index.js","webpack:///./app/javascript/apps/validation/disputeLedgerItems/reducer.js","webpack:///./app/javascript/apps/validation/disputeLedgerItems/index.js","webpack:///./app/javascript/apps/validation/failureReports/reducer.js","webpack:///./app/javascript/apps/validation/failureReports/index.js","webpack:///./app/javascript/apps/validation/hwcns/reducer.js","webpack:///./app/javascript/apps/validation/hwcns/index.js","webpack:///./app/javascript/apps/validation/app/reducer.js","webpack:///./app/javascript/apps/validation/app/index.js","webpack:///./app/javascript/apps/validation/salesLedgerItems/reducer.js","webpack:///./app/javascript/apps/validation/salesLedgerItems/index.js","webpack:///./app/javascript/apps/validation/specifications/reducer.js","webpack:///./app/javascript/apps/validation/specifications/index.js","webpack:///./app/javascript/apps/validation/stats/reducer.js","webpack:///./app/javascript/apps/validation/stats/actions.js","webpack:///./app/javascript/apps/validation/stats/index.js","webpack:///./app/javascript/apps/validation/services/reducer.js","webpack:///./app/javascript/apps/validation/services/index.js","webpack:///./app/javascript/apps/validation/reducer.js","webpack:///./app/javascript/apps/validation/salesLedgerItems/operations.js","webpack:///./app/javascript/apps/validation/failureReports/operations.js","webpack:///./app/javascript/apps/validation/store.js","webpack:///./app/javascript/apps/validation/index.js","webpack:///./app/javascript/components/ValidationApp.jsx","webpack:///./app/javascript/apps/audit-review/app/decisionData.js","webpack:///./app/javascript/apps/audit-review/app/selectors.js","webpack:///./app/javascript/apps/audit-review/components/SectionReview.jsx","webpack:///./app/javascript/apps/audit-review/components/Comment.jsx","webpack:///./app/javascript/apps/audit-review/components/Action.jsx","webpack:///./app/javascript/apps/audit-review/components/CompleteStatusIcon.jsx","webpack:///./app/javascript/apps/audit-review/components/QuestionReview.jsx","webpack:///./app/javascript/apps/audit-review/sectionReviews/operations.js","webpack:///./app/javascript/apps/audit-review/components/sectionReviews/GeneralInformation.jsx","webpack:///./app/javascript/apps/audit-review/components/DocumentView.jsx","webpack:///./app/javascript/apps/audit-review/components/sectionReviews/WasteManagementPolicy.jsx","webpack:///./app/javascript/apps/audit-review/components/sectionReviews/WasteManagementTraining.jsx","webpack:///./app/javascript/apps/audit-review/components/sectionReviews/HazardousWasteConsignmentNotes.jsx","webpack:///./app/javascript/apps/audit-review/components/ImageView.jsx","webpack:///./app/javascript/apps/audit-review/components/SummaryField.jsx","webpack:///./app/javascript/apps/audit-review/binReviews/operations.js","webpack:///./app/javascript/apps/audit-review/components/NoScoreQuestionReview.jsx","webpack:///./app/javascript/apps/audit-review/components/BinReview.jsx","webpack:///./app/javascript/apps/audit-review/components/BinSummary.jsx","webpack:///./app/javascript/apps/audit-review/components/AutoQuestionReview.jsx","webpack:///./app/javascript/apps/audit-review/roomReviews/operations.js","webpack:///./app/javascript/apps/audit-review/components/RoomReview.jsx","webpack:///./app/javascript/apps/audit-review/components/sectionReviews/InternalWasteContainment.jsx","webpack:///./app/javascript/apps/audit-review/bulkContainmentReviews/operations.js","webpack:///./app/javascript/apps/audit-review/components/BulkContainmentReview.jsx","webpack:///./app/javascript/apps/audit-review/components/BulkContainmentSummary.jsx","webpack:///./app/javascript/apps/audit-review/wasteStreamReviews/operations.js","webpack:///./app/javascript/apps/audit-review/components/WasteStreamReview.jsx","webpack:///./app/javascript/apps/audit-review/components/sectionReviews/BulkWasteStorageContainment.jsx","webpack:///./app/javascript/apps/audit-review/components/sectionReviews/index.js","webpack:///./app/javascript/apps/audit-review/roomReviews/selectors.js","webpack:///./app/javascript/apps/audit-review/sectionReviews/selectors.js","webpack:///./app/javascript/apps/audit-review/binReviews/selectors.js","webpack:///./app/javascript/apps/audit-review/bulkContainmentReviews/selectors.js","webpack:///./app/javascript/apps/audit-review/wasteStreamReviews/selectors.js","webpack:///./app/javascript/apps/audit-review/wasteAudit/selectors.js","webpack:///./app/javascript/apps/audit-review/components/SectionReviewNav.jsx","webpack:///./app/javascript/apps/audit-review/components/ScoreSummary.jsx","webpack:///./app/javascript/apps/audit-review/components/App.jsx","webpack:///./app/javascript/apps/audit-review/app/operations.js","webpack:///./app/javascript/apps/audit-review/app/reducer.js","webpack:///./app/javascript/apps/audit-review/app/actions.js","webpack:///./app/javascript/apps/audit-review/app/index.js","webpack:///./app/javascript/apps/audit-review/reducer.js","webpack:///./app/javascript/apps/audit-review/store.js","webpack:///./app/javascript/components/AuditReviewApp.jsx","webpack:///./app/javascript/apps/allocate-credit/disputeLedgerItems/selectors.js","webpack:///./app/javascript/apps/allocate-credit/vendorCreditAllocations/selectors.js","webpack:///./app/javascript/apps/allocate-credit/vendorInvoices/selectors.js","webpack:///./app/javascript/apps/allocate-credit/app/selectors.js","webpack:///./app/javascript/apps/allocate-credit/vendorCredit/selectors.js","webpack:///./app/javascript/apps/allocate-credit/api/actions.js","webpack:///./app/javascript/apps/allocate-credit/vendorCreditAllocations/actions.js","webpack:///./app/javascript/apps/allocate-credit/disputeLedgerItems/actions.js","webpack:///./app/javascript/apps/allocate-credit/api/operations.js","webpack:///./app/javascript/apps/allocate-credit/api/selectors.js","webpack:///./app/javascript/apps/allocate-credit/app/actions.js","webpack:///./app/javascript/apps/allocate-credit/app/operations.js","webpack:///./app/javascript/apps/allocate-credit/components/Summary.jsx","webpack:///./app/javascript/apps/allocate-credit/components/CreditAllocationForm.jsx","webpack:///./app/javascript/apps/allocate-credit/components/DisputeResolveForm.jsx","webpack:///./app/javascript/apps/allocate-credit/disputeLedgerItems/operations.js","webpack:///./app/javascript/apps/allocate-credit/components/CreditBalanceAlert.jsx","webpack:///./app/javascript/apps/allocate-credit/components/App.jsx","webpack:///./app/javascript/apps/allocate-credit/app/reducer.js","webpack:///./app/javascript/apps/allocate-credit/app/index.js","webpack:///./app/javascript/apps/allocate-credit/api/reducer.js","webpack:///./app/javascript/apps/allocate-credit/api/index.js","webpack:///./app/javascript/apps/allocate-credit/vendorCredit/reducer.js","webpack:///./app/javascript/apps/allocate-credit/vendorCredit/actions.js","webpack:///./app/javascript/apps/allocate-credit/vendorCredit/index.js","webpack:///./app/javascript/apps/allocate-credit/disputeLedgerItems/reducer.js","webpack:///./app/javascript/apps/allocate-credit/disputeLedgerItems/index.js","webpack:///./app/javascript/apps/allocate-credit/vendorCreditAllocations/reducer.js","webpack:///./app/javascript/apps/allocate-credit/vendorCreditAllocations/index.js","webpack:///./app/javascript/apps/allocate-credit/reducer.js","webpack:///./app/javascript/components/AllocateCreditApp.jsx","webpack:///./app/javascript/apps/allocate-credit/store.js","webpack:///./app/javascript/apps/service-mappings/app/actions.js","webpack:///./app/javascript/apps/service-mappings/services/actions.js","webpack:///./app/javascript/apps/service-mappings/serviceTimeline/actions.js","webpack:///./app/javascript/apps/service-mappings/app/selectors.js","webpack:///./app/javascript/apps/service-mappings/app/operations.js","webpack:///./app/javascript/apps/service-mappings/components/ServiceTimeline.jsx","webpack:///./app/javascript/apps/service-mappings/components/MonthDetails.jsx","webpack:///./app/javascript/apps/service-mappings/components/ActionMenu.jsx","webpack:///./app/javascript/apps/service-mappings/components/TableForGroup.jsx","webpack:///./app/javascript/apps/service-mappings/app/utils.js","webpack:///./app/javascript/apps/service-mappings/components/forms/TransitionAccount.jsx","webpack:///./app/javascript/apps/service-mappings/components/forms/SetAccount.jsx","webpack:///./app/javascript/apps/service-mappings/components/forms/ResetAccount.jsx","webpack:///./app/javascript/apps/service-mappings/components/Form.jsx","webpack:///./app/javascript/apps/service-mappings/components/ServiceBox.jsx","webpack:///./app/javascript/apps/service-mappings/components/App.jsx","webpack:///./app/javascript/apps/service-mappings/app/reducer.js","webpack:///./app/javascript/apps/service-mappings/app/index.js","webpack:///./app/javascript/apps/service-mappings/services/reducer.js","webpack:///./app/javascript/apps/service-mappings/services/index.js","webpack:///./app/javascript/apps/service-mappings/serviceTimeline/reducer.js","webpack:///./app/javascript/apps/service-mappings/serviceTimeline/index.js","webpack:///./app/javascript/apps/service-mappings/reducer.js","webpack:///./app/javascript/apps/service-mappings/store.js","webpack:///./app/javascript/components/ServiceMappingsApp.jsx","webpack:///./app/javascript/apps/pawa_auditor/app/helper.js","webpack:///./app/javascript/apps/pawa_auditor/components/ConfirmatoryStatements/selectors.ts","webpack:///./app/javascript/apps/pawa_auditor/components/ConfirmatoryStatements/ConfirmatoryStatementsPage.tsx","webpack:///./app/javascript/apps/pawa_auditor/components/ConfirmatoryStatements/operations.js","webpack:///./app/javascript/apps/pawa_auditor/components/SubmittedModal.jsx","webpack:///./app/javascript/apps/pawa_auditor/components/SubmitWarningModal.jsx","webpack:///./app/javascript/apps/pawa_auditor/components/SubmitSummary.jsx","webpack:///./app/javascript/apps/pawa_auditor/components/App.jsx","webpack:///./app/javascript/apps/pawa_auditor/app/reducer.js","webpack:///./app/javascript/apps/pawa_auditor/app/actions.js","webpack:///./app/javascript/apps/pawa_auditor/app/index.js","webpack:///./app/javascript/apps/pawa_auditor/firestore/reducer.js","webpack:///./app/javascript/apps/pawa_auditor/firestore/index.js","webpack:///./app/javascript/apps/pawa_auditor/reducer.js","webpack:///./app/javascript/apps/pawa_auditor/store.js","webpack:///./app/javascript/components/PawaAuditorApp.jsx","webpack:///./app/javascript/apps/auditor/app/helper.js","webpack:///./app/javascript/apps/auditor/components/CreateSelectInput.jsx","webpack:///./app/javascript/apps/auditor/components/GetHelpModal.jsx","webpack:///./app/javascript/apps/auditor/components/NeedHelp.jsx","webpack:///./app/javascript/apps/auditor/components/SubmittedModal.jsx","webpack:///./app/javascript/apps/auditor/components/SubmitWarningModal.jsx","webpack:///./app/javascript/apps/auditor/components/SubmitSummary.jsx","webpack:///./app/javascript/apps/auditor/components/App.jsx","webpack:///./app/javascript/apps/auditor/app/reducer.js","webpack:///./app/javascript/apps/auditor/app/index.js","webpack:///./app/javascript/apps/auditor/firestore/reducer.js","webpack:///./app/javascript/apps/auditor/firestore/index.js","webpack:///./app/javascript/apps/auditor/reducer.js","webpack:///./app/javascript/apps/auditor/store.js","webpack:///./app/javascript/components/WasteAuditorApp.jsx","webpack:///./app/javascript/apps/notes/lib/components/forms/checklist.jsx","webpack:///./app/javascript/apps/notes/lib/components/forms/counter.jsx","webpack:///./app/javascript/apps/notes/lib/components/forms/date-picker.jsx","webpack:///./app/javascript/apps/notes/lib/components/forms/select2.jsx","webpack:///./app/javascript/apps/notes/lib/components/forms/form-elements.jsx","webpack:///./app/javascript/apps/notes/lib/components/forms/form-group-holder.jsx","webpack:///./app/javascript/apps/notes/lib/components/forms/tags.jsx","webpack:///./app/javascript/apps/notes/lib/components/bootstrap.jsx","webpack:///./app/javascript/apps/notes/Components.jsx","webpack:///./app/javascript/apps/notes/lib/components/index.js","webpack:///./app/javascript/apps/notes/App.jsx","webpack:///./app/javascript/components/NotesApp.jsx","webpack:///./app/javascript/apps/authority-invoice/actions.js","webpack:///./app/javascript/apps/authority-invoice/operations.js","webpack:///./app/javascript/apps/authority-invoice/components/PurchaseOrderSelect.jsx","webpack:///./app/javascript/apps/authority-invoice/components/App.jsx","webpack:///./app/javascript/apps/authority-invoice/reducer.js","webpack:///./app/javascript/components/AuthorityInvoiceApp.jsx","webpack:///./app/javascript/apps/authority-invoice/store.js","webpack:///./app/javascript/apps/authority-credit/actions.js","webpack:///./app/javascript/apps/authority-credit/operations.js","webpack:///./app/javascript/apps/authority-credit/components/App.jsx","webpack:///./app/javascript/apps/authority-credit/reducer.js","webpack:///./app/javascript/components/AuthorityCreditApp.jsx","webpack:///./app/javascript/apps/authority-credit/store.js","webpack:///./app/javascript/apps/image-selector/components/ImageSelectorImg.jsx","webpack:///./app/javascript/apps/image-selector/actions.js","webpack:///./app/javascript/apps/image-selector/components/App.jsx","webpack:///./app/javascript/apps/image-selector/reducer.js","webpack:///./app/javascript/components/ImageSelectorApp.jsx","webpack:///./app/javascript/apps/image-selector/store.js","webpack:///./app/javascript/apps/proof-of-collection/ProofApp.jsx","webpack:///./app/javascript/apps/proof-of-collection/reducer.js","webpack:///./app/javascript/apps/proof-of-collection/store.js","webpack:///./app/javascript/components/ProofCollectionApp.jsx","webpack:///./app/javascript/apps/postcode-districts-selector/Components.jsx","webpack:///./app/javascript/apps/postcode-districts-selector/App.jsx","webpack:///./app/javascript/components/PostcodeDistrictsSelectorApp.jsx","webpack:///./app/javascript/components/ServiceAppAndy.jsx","webpack:///./app/javascript/components/ServiceCalendarApp.jsx","webpack:///./app/javascript/components/TicketApp2.tsx","webpack:///./app/javascript/components/service/ServiceBox.jsx","webpack:///./app/javascript/apps/pawa_auditor/components/sections/Sec3WasteProducedAndSegregation.jsx","webpack:///./app/javascript/apps/pawa_auditor/components/sections/Sec3WasteProducedAndSegregation/WasteProducedAndSegregationPerBinGroup.jsx","webpack:///./app/javascript/apps/pawa_auditor/components/sections/Sec3WasteProducedAndSegregation/InfoPopover.jsx","webpack:///./app/javascript/apps/pawa_auditor/components/sections/Sec4OtherWasteProduced.jsx","webpack:///./app/javascript/apps/pawa_auditor/components/sections/Sec4OtherWasteProduced/OtherWasteProducedModal.jsx","webpack:///./app/javascript/apps/pawa_auditor/components/sections/Sec4OtherWasteProduced/OtherWasteProducedPerBinGroup.jsx","webpack:///./app/javascript/apps/service-calendar/components/SideBarAndy.tsx","webpack:///./app/javascript/modules/service/LocationServicesVendorBoxAndy.tsx","webpack:///./app/javascript/modules/service/report-request-box/RemediationCard.tsx","webpack:///./app/javascript/modules/service/report-request-box/ReattemptVisitCard.tsx","webpack:///./app/javascript/modules/service/report-request-box/ReportsCards.tsx","webpack:///./app/javascript/modules/service/report-request-box/ReportCard.tsx","webpack:///./app/javascript/modules/service/service-box/VisitFrequencyRow.tsx","webpack:///./app/javascript/modules/service/service-box/VlcSection.tsx","webpack:///./app/javascript/modules/service/service-box/VendorAccountLink.tsx","webpack:///./app/javascript/modules/service/Specification.tsx","webpack:///./app/javascript/modules/service/service-box/BillingHistoryChart.tsx","webpack:///./app/javascript/modules/service/report-request-box/AdhocVisitRequestTab.tsx","webpack:///./app/javascript/modules/service/report-request-box/AllRequestTab.tsx","webpack:///./app/javascript/modules/service/report-request-box/RemediationCaseTab.tsx","webpack:///./app/javascript/modules/service/report-request-box/ReportTab.tsx","webpack:///./app/javascript/modules/service/report-request-box/ServiceResumptionRequestTab.tsx","webpack:///./app/javascript/modules/service/report-request-box/ServiceSuspensionRequestTab.tsx","webpack:///./app/javascript/modules/service/report-request-box/ServiceTerminationRequestTab.tsx","webpack:///./app/javascript/modules/service/report-request-box/SpecChangeRequestTab.tsx","webpack:///./app/javascript/modules/service/report-request-box/StockDeliveryRequestTab.tsx","webpack:///./app/javascript/modules/service/report-request-box/VisitFrequencyChangeRequestTab.tsx","webpack:///./app/javascript/modules/service/forms/common/InvoiceCollapse.tsx","webpack:///./app/javascript/modules/service/Calendar.tsx","webpack:///./app/javascript/apps/service-calendar/components/Week.jsx","webpack:///./app/javascript/apps/service-calendar/components/VisitTile.tsx","webpack:///./app/javascript/apps/service-calendar/components/SideBar.tsx","webpack:///./app/javascript/modules/service/service-box/OutstandingRequestsCollapsible.tsx","webpack:///./app/javascript/modules/api/calendar.ts","webpack:///./app/javascript/modules/service/ticket/channel-footer/useDrawer.ts","webpack:///./app/javascript/modules/service/ticket/TicketTab.tsx","webpack:///./app/javascript/modules/service/forms/ConfirmNextRoutineVisitForm.tsx","webpack:///./app/javascript/modules/service/forms/ConfirmFinalCollectionForm.tsx","webpack:///./app/javascript/modules/service/forms/RequestVisitFrequencyChangeForm.tsx","webpack:///./app/javascript/modules/service/forms/AcceptVisitFrequencyChangeForm.tsx","webpack:///./app/javascript/modules/service/forms/ConfirmVisitFrequencyChangeForm.tsx","webpack:///./app/javascript/modules/service/forms/CancelVisitFrequencyChangeForm.tsx","webpack:///./app/javascript/modules/service/forms/RequestTerminationForm.tsx","webpack:///./app/javascript/modules/service/forms/CancelTerminationForm.tsx","webpack:///./app/javascript/modules/service/forms/ConfirmTerminationForm.tsx","webpack:///./app/javascript/modules/service/forms/RequestResumptionForm.tsx","webpack:///./app/javascript/modules/service/forms/CancelResumptionForm.tsx","webpack:///./app/javascript/modules/service/forms/ConfirmResumptionForm.tsx","webpack:///./app/javascript/modules/service/forms/RequestReinstatementForm.tsx","webpack:///./app/javascript/modules/service/forms/CancelReinstatementForm.tsx","webpack:///./app/javascript/modules/service/forms/ConfirmReinstatementForm.tsx","webpack:///./app/javascript/modules/service/forms/CancelSpecChangeForm.tsx","webpack:///./app/javascript/modules/service/forms/RequestSuspensionForm.tsx","webpack:///./app/javascript/modules/service/forms/CancelSuspensionForm.tsx","webpack:///./app/javascript/modules/service/forms/ConfirmSuspensionForm.tsx","webpack:///./app/javascript/modules/service/forms/RequestAdhocVisitForm.tsx","webpack:///./app/javascript/modules/service/forms/common/CollectionUnitsTable.tsx","webpack:///./app/javascript/modules/service/forms/RequestStockDeliveryForm.tsx","webpack:///./app/javascript/modules/service/forms/CancelStockDeliveryForm.tsx","webpack:///./app/javascript/modules/service/forms/ConfirmStockDeliveryForm.tsx","webpack:///./app/javascript/modules/service/forms/CancelAdhocVisitForm.tsx","webpack:///./app/javascript/modules/service/forms/ClientFeedbackOnFailedVisitReportForm.tsx","webpack:///./app/javascript/modules/service/forms/VendorFeedbackOnFailedVisitReportForm.tsx","webpack:///./app/javascript/modules/service/forms/ConfirmVisitFailureReattemptDateForm.tsx","webpack:///./app/javascript/modules/service/forms/RequestReattemptDateForm.tsx","webpack:///./app/javascript/modules/service/forms/VendorReportVisitFailureResponseForm.tsx","webpack:///./app/javascript/modules/service/forms/VendorReportVisitFailureTagForm.tsx","webpack:///./app/javascript/modules/service/forms/ClientReportVisitFailureForm.tsx","webpack:///./app/javascript/modules/service/forms/CancelRemediationForm.tsx","webpack:///./app/javascript/modules/service/forms/LogRemediationReplyForm.tsx","webpack:///./app/javascript/modules/service/forms/NoActionRequiredForm.tsx","webpack:///./app/javascript/modules/service/forms/ServiceActionMessageForm.tsx","webpack:///./app/javascript/modules/service/forms/common/OrganisationMessageSection.tsx","webpack:///./app/javascript/modules/service/forms/common/VendorMessageSection.tsx","webpack:///./app/javascript/modules/service/ticket/channel-footer/ChannelFooter.tsx","webpack:///./app/javascript/modules/service/forms/RemediationForm.tsx","webpack:///./app/javascript/modules/service/ticket/channel-footer/ChannelFooterButtons.tsx","webpack:///./app/javascript/modules/service/ticket/channel-footer/form/ResponseForm.tsx","webpack:///./app/javascript/modules/service/forms/common/ResponseFormDatePicker.tsx","webpack:///./app/javascript/modules/service/ticket/channel-header/ChannelHeader.tsx","webpack:///./app/javascript/modules/service/ticket/NoVendorSelected.tsx","webpack:///./app/javascript/modules/api/vendor.ts","webpack:///./app/javascript/modules/service/ticket/response-card/SortedReplies.tsx","webpack:///./app/javascript/modules/api/users.ts","webpack:///./app/javascript/modules/service/request-logs/LogComponent.tsx","webpack:///./app/javascript/modules/service/request-logs/AdhocVisitRequestLog.tsx","webpack:///./app/javascript/modules/service/request-logs/SpecChangeRequestLog.tsx","webpack:///./app/javascript/modules/service/request-logs/ServiceSuspensionRequestLog.tsx","webpack:///./app/javascript/modules/service/request-logs/ServiceResumptionRequestLog.tsx","webpack:///./app/javascript/modules/service/request-logs/ServiceTerminationRequestLog.tsx","webpack:///./app/javascript/modules/service/request-logs/ServiceReinstatementRequestLog.tsx","webpack:///./app/javascript/modules/service/request-logs/StockDeliveryRequestLog.tsx","webpack:///./app/javascript/modules/service/request-logs/VisitFrequencyChangeRequestLog.tsx","webpack:///./app/javascript/modules/service/request-logs/ReattemptDateRequestLog.tsx","webpack:///./app/javascript/modules/service/request-logs/ReattemptDateLog.tsx","webpack:///./app/javascript/modules/service/request-logs/NoActionRequiredLog.tsx","webpack:///./app/javascript/modules/service/ticket/response-card/ReplyCardContent.tsx","webpack:///./app/javascript/modules/service/ticket/response-card/ReplyCardHeader.tsx","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_dom-create.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_iobject.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_defined.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_to-integer.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_library.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_add-to-unscopables.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_iter-define.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_object-keys.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_shared-key.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_iter-detect.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es6.object.to-string.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/web.dom.iterable.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_redefine-all.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_an-instance.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_validate-collection.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_new-promise-capability.js","webpack:///./node_modules/core-js/modules/$.hide.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_ie8-dom-define.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_to-primitive.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_array-methods.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_shared.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_object-create.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_enum-bug-keys.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_html.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_iter-call.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_is-array-iter.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/core.get-iterator-method.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_iter-step.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_collection-strong.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_set-species.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_meta.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_collection.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_object-pie.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_collection-to-json.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_set-collection-of.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_set-collection-from.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_species-constructor.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_task.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_perform.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_promise-resolve.js","webpack:///./node_modules/core-js/modules/$.wks.js","webpack:///./app/javascript/packs/awesome-font-config.js","webpack:///./app/javascript/components sync ^\\.\\/.*$","webpack:///./node_modules/css-element-queries/src/ResizeSensor.js","webpack:///./node_modules/@stimulus/webpack-helpers/dist/index.js","webpack:///./node_modules/core-js/modules/$.js","webpack:///./node_modules/linkifyjs/dist/linkify.es.js","webpack:///./node_modules/@stimulus/polyfills/index.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/fn/array/find.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es6.array.find.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_array-species-create.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_array-species-constructor.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_is-array.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/fn/array/find-index.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es6.array.find-index.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/fn/array/from.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_string-at.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_iter-create.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_object-dps.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_object-keys-internal.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_array-includes.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_to-absolute-index.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_object-gpo.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es6.array.from.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_create-property.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/fn/map.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es6.array.iterator.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es6.map.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_inherit-if-required.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_set-proto.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_object-gopd.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es7.map.to-json.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_array-from-iterable.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es7.map.of.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es7.map.from.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/fn/object/assign.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es6.object.assign.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_object-assign.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_object-gops.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/fn/promise.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es6.promise.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_invoke.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_microtask.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/_user-agent.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es7.promise.finally.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es7.promise.try.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/fn/set.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es6.set.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es7.set.to-json.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es7.set.of.js","webpack:///./node_modules/@stimulus/polyfills/node_modules/core-js/modules/es7.set.from.js","webpack:///./node_modules/element-closest/element-closest.js","webpack:///./node_modules/mutation-observer-inner-html-shim/dist/index.js","webpack:///./app/javascript/controllers sync .js$","webpack:///./app/javascript/controllers/authority-ticket-types_controller.js","webpack:///./app/javascript/controllers/authority-tickets-overdue_controller.js","webpack:///./app/javascript/controllers/avatar_controller.js","webpack:///./node_modules/material-avatar/material-avatar.js","webpack:///./app/javascript/controllers/basic-bar-chart_controller.js","webpack:///./app/javascript/controllers/basic-map_controller.js","webpack:///./node_modules/google-maps/lib/Google.js","webpack:///./app/javascript/controllers/chart-location-service-summary_controller.js","webpack:///./app/javascript/controllers/client-usage-chart_controller.js","webpack:///./app/javascript/controllers/expanded-link_controller.js","webpack:///./app/javascript/controllers/hello_controller.js","webpack:///./app/javascript/controllers/kpi-pre-acceptance-audits_controller.js","webpack:///./app/javascript/controllers/kpi-prem-types_controller.js","webpack:///./app/javascript/controllers/kpi-registrations_controller.js","webpack:///./app/javascript/controllers/kpi-spend_controller.js","webpack:///./app/javascript/controllers/kpi-tickets-and-replies_controller.js","webpack:///./app/javascript/controllers/signin-mode_controller.js","webpack:///./app/javascript/controllers/simple-bar-chart_controller.js","webpack:///./app/javascript/controllers/simple-bar-month-chart_controller.js","webpack:///./app/javascript/controllers/stacked-bar-month-chart_controller.js","webpack:///./app/javascript/controllers/toggle-area_controller.js","webpack:///./app/javascript/controllers/vendor-kpi-missed-collections_controller.js","webpack:///./app/javascript/controllers/vendor-kpi-scheduled-vs-actual-chart-authority-version_controller.js","webpack:///./app/javascript/controllers/vendor-kpi-scheduled-vs-actual-chart_controller.js","webpack:///./node_modules/core-js/modules/$.export.js","webpack:///./node_modules/core-js/modules/$.invoke.js","webpack:///./node_modules/core-js/modules/$.iterators.js","webpack:///./node_modules/moment/locale sync ^\\.\\/.*$","webpack:///./node_modules/core-js/modules/$.core.js","webpack:///./node_modules/core-js/modules/$.property-desc.js","webpack:///./node_modules/core-js/modules/$.redefine.js","webpack:///./node_modules/core-js/modules/$.uid.js","webpack:///./node_modules/core-js/modules/$.ctx.js","webpack:///./node_modules/core-js/modules/$.a-function.js","webpack:///./node_modules/core-js/modules/$.cof.js","webpack:///./node_modules/core-js/modules/$.has.js","webpack:///./node_modules/core-js/modules/$.set-to-string-tag.js","webpack:///./node_modules/popper.js/dist/esm/popper.js","webpack:///./node_modules/linkify-jquery/dist/linkify-jquery.es.js","webpack:///./node_modules/pdfobject/pdfobject.js","webpack:///./node_modules/sweetalert2/dist/sweetalert2.all.js","webpack:///./app/javascript/packs/application.js","webpack:///./node_modules/core-js/modules/web.timers.js","webpack:///./node_modules/core-js/modules/$.descriptors.js","webpack:///./node_modules/core-js/modules/$.fails.js","webpack:///./node_modules/core-js/modules/$.partial.js","webpack:///./node_modules/core-js/modules/$.path.js","webpack:///./node_modules/core-js/modules/web.immediate.js","webpack:///./node_modules/core-js/modules/$.task.js","webpack:///./node_modules/core-js/modules/$.html.js","webpack:///./node_modules/core-js/modules/$.dom-create.js","webpack:///./node_modules/core-js/modules/$.is-object.js","webpack:///./node_modules/core-js/modules/web.dom.iterable.js","webpack:///./node_modules/core-js/modules/es6.array.iterator.js","webpack:///./node_modules/core-js/modules/$.add-to-unscopables.js","webpack:///./node_modules/core-js/modules/$.shared.js","webpack:///./node_modules/core-js/modules/$.iter-step.js","webpack:///./node_modules/core-js/modules/$.to-iobject.js","webpack:///./node_modules/core-js/modules/$.iobject.js","webpack:///./node_modules/core-js/modules/$.defined.js","webpack:///./node_modules/core-js/modules/$.iter-define.js","webpack:///./node_modules/core-js/modules/$.library.js","webpack:///./node_modules/core-js/modules/$.iter-create.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///./node_modules/bootstrap/dist/js/bootstrap.js","webpack:///./node_modules/select2/dist/js/select2.js","webpack:///./node_modules/pc-bootstrap4-datetimepicker/src/js/bootstrap-datetimepicker.js"],"names":["_","mixin","isBlank","object","_typeof","isNaN","isEmpty","trim","isPresent","groupByRecursive","collection","groups","reduce","r","o","group","key","i","_ref","length","push","chain","Symbol","iterator","constructor","prototype","value","Number","getType","toString","call","castString","Error","toBoolean","toNumber","hasValue","isNumber","converted","isString","replace","toText","isObject","toNumberOrPercent","indexOf","a","getValue","getValueDefault","defaultValue","isDate","isArray","Array","PI","Math","HALFPI","RADIANS","DEGREES","toNumberRange","min","max","fitToRange","round","precision","floor","rounded","d","pow","ceil","minValue","maxValue","temp","sin","tan","cos","left","right","closest","values","referenceValue","prev","curr","abs","intersect","range1","range2","start1","start","start2","end1","end","end2","invertRange","range","intersection","startMax","endMin","getDistance","point1","point2","x","y","sqrt","getScale","startPoint1","startPoint2","initialDistance","currentDistance","getMidPoint","position","getAngle","diffX","diffY","angle","atan2","normalizeAngle","getBBox","points","length_1","top_1","bottom","point","width","height","getCommonRectangle","rectangles","minX","minY","maxX","maxY","rectangle","getPointOnQuadraticCurve","pointA","pointB","controlPoint","getPointOnCubicCurve","controlPointA","controlPointB","mt1","mt2","mt3","getCubicControlPointA","p0","p1","p2","p3","tensionX","tensionY","adjustTension","getCubicControlPointB","tension","fitAngleToRange","startAngle","endAngle","count","getArcRect","radius","MAX_VALUE","bpoints","getArcPoint","fromAngle","toAngle","pt","arc","isInRectangle","_extendStatics","b","Object","setPrototypeOf","__proto__","p","hasOwnProperty","__extends","__","this","create","_assign","assign","t","s","n","arguments","apply","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","e","rejected","result","done","then","__generator","body","f","g","label","sent","trys","ops","verb","v","op","TypeError","pop","__values","m","__read","ar","error","__spread","concat","registry","Registry","events","themes","loadedThemes","_uidCount","registeredClasses","_placeholders","invalidSprites","invalidDatas","invalidRawDatas","invalidDataItems","invalidDataRange","invalidPositions","invalidLayouts","baseSprites","baseSpritesByUid","uid","getUniqueId","noBase","defineProperty","get","_map","enumerable","configurable","setCache","ttl","set","getCache","undefined","dispatch","eventType","data","isEnabled","type","target","dispatchImmediately","getPlaceholder","addToInvalidComponents","component","baseId","removeFromInvalidComponents","addToInvalidSprites","sprite","removeFromInvalidSprites","addToInvalidPositions","removeFromInvalidPositions","addToInvalidLayouts","removeFromInvalidLayouts","binTypesApi","api","injectEndpoints","endpoints","build","getBinTypes","query","url","method","providesTags","id","getVendorServiceMappings","vendorId","useGetBinTypesQuery","useGetVendorServiceMappingsQuery","_binTypesApi$endpoint","_regeneratorRuntime","c","asyncIterator","u","toStringTag","define","writable","wrap","Generator","Context","makeInvokeMethod","tryCatch","arg","h","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","__await","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","_sent","dispatchException","abrupt","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","displayName","isGeneratorFunction","name","mark","awrap","async","keys","reverse","charAt","slice","stop","rval","handle","complete","finish","delegateYield","asyncGeneratorStep","gen","_next","_throw","info","_asyncToGenerator","fn","self","args","err","_slicedToArray","arr","_arrayWithHoles","l","_iterableToArrayLimit","minLen","_arrayLikeToArray","from","test","_unsupportedIterableToArray","_nonIterableRest","len","arr2","dayjs","extend","advancedFormat","getTempId","createGuid","prepareSubmitData","attributeKeyNames","nextNumericKey","renameKeys","newKey","snakeCaseKey","includes","match","snakeCase","substring","updateQueryStringParameter","uri","re","RegExp","hash","separator","sanatizeDotProp","string","buildParams","search","params","URLSearchParams","entries","_ref2","map","append","useBinFetch","serviceCodes","_useGetBinTypesQuery","binData","isLoading","isError","_useMemo","useMemo","filteredBinTypes","filteredBinGroups","binTypes","byServiceCode","binGroups","byId","pickBy","_value","filteredBinGroupIds","uniq","useVendorServiceMappingsFetch","_useGetVendorServiceM","vendorServiceMappings","useCannedResponseFetch","cannedResponseId","ticketId","contactId","_useState8","useState","message","setMessage","useEffect","fetchData","_ref4","_callee2","response","_context2","fetch","contact_id","credentials","headers","Accept","json","text","t0","console","formatDate","date","reportDate","isValid","isCurrentYear","year","format","formatTime","time","reportTime","polyline","path","lineTo","prevPoint","minStep","minPolylineStep","moveTo","quadraticCurveTo","cubicCurveTo","closePath","arcTo","radiusY","segments","pax","pay","cx","cy","ax","ay","innerRadius","cornerRadius","innerCornerRadius","crSin","innerRadiusY","cornerRadiusY","innerCornerRadiusY","crAngle","asin","crAngleY","crInnerAngle","crInnerAngleY","middleAngle","mPoint","a0","b0","c0","d0","b1","d1","arcToPoint","sweepFlag","largeArcFlag","xAxisRotation","Boolean","rectToPath","rect","ccw","L","used","copyProperties","source","stripHash","exec","getBaseURI","baseURI","document","loc","location","href","copy","isNotEmpty","relativeToValue","percent","full","relativeRadiusToValue","subtractIfNegative","getPixelRatio","window","devicePixelRatio","capitalize","str","split","toUpperCase","join","stringify","JSON","escapeForRgex","splitTextByCharCount","maxChars","fullWords","rtl","res","currentIndex","words","word","wordLength","parts","reverseString","truncateWithEllipsis","ellipsis","rtrim","ltrim","padString","_char","getFormat","hints","toLowerCase","cleanFormat","stripTags","plainText","numberToString","Infinity","negative","parsed","digits","decimals","exponent","zeros","anyToDate","Date","num","anyToNumber","getTime","getYearDay","utc","first","getFullYear","getWeek","day","week","getDay","getMonthWeek","firstWeek","getMonth","currentWeek","getDayFromWeek","weekday","setUTCFullYear","get12Hours","hours","base","getTimeZone","_long","savings","wotz","toLocaleString","wtz","timeZoneName","substr","fitNumber","fitNumberRelative","gap","svgPointToSprite","sprites","parent","sprite_1","rotation","relativeX","pixelX","ex","relativeY","pixelY","ey","dx","dy","scale","pixelPaddingLeft","pixelPaddingTop","spritePointToSvg","spritePointToSprite","toSprite","spriteRectToSvg","documentPointToSvg","svgContainer","cssScale","bbox","getBoundingClientRect","top","svgPointToDocument","documentPointToSprite","htmlContainer","spritePointToDocument","element","clientWidth","clientHeight","decimalPlaces","number","urlRegexp","parseUrl","protocol","authority","domain","port","serializeUrl","isRelativeUrl","joinUrl","parsedLeft","parsedRight","leftPath","rightPath","isIE","MSInputMethodContext","documentMode","fromArray","array","iter","sum","toArray","output","eachContinue","each","sort","_i","go","push2","flatten","indexed","index","find","matches","contains","ListIterator","list","createNewItems","_create","_listCopy","clear","getFirst","returnItem","getLast","item","removeItem","any","eachReverse","shiftLeft","pushAll","input","remove","found","splice","move","toIndex","removeIndex","insertIndex","add","unshift","getSortedIndex","ordering","pivot","order","findIndex","Percent","isPercent","getTicketId","state","getLocationId","useTypedSelector","locationId","getTicketById","useGetTicketQuery","useTicket","currentTicketId","useContext","AppContext","getDefaultContactId","channel","defaultContactMap","getDefaultResponseExpected","useService","uuid","locationServiceVendors","useGetLocationServiceVendorsQuery","_step","_iterator","_createForOfIteratorHelper","_vendor$services","vendor","service","services","getInUseBinGroupsForService","serviceUuid","specifications","_useBinFetch2","inUseBinGroups","serviceCode","binType","binGroup","binGroupId","parseInt","legendBorderColor","legendFillColor","getBinTypesByGroup","_spec","useFailedVisitReports","useGetFailedVisitReportsQuery","useAdhocVisitRequests","adhocVisitRequests","useGetAdhocVisitRequestsQuery","orderBy","useStockDeliveryRequests","useGetStockDeliveryRequestsQuery","stockDeliveryRequests","useRemediationCases","remediationCase","useGetRemediationCasesQuery","remediationCases","useServiceSuspensionRequests","serviceSuspensionRequests","useGetServiceSuspensionRequestsQuery","useServiceTerminationRequests","serviceTerminationRequests","useGetServiceTerminationRequestsQuery","useServiceResumptionRequests","serviceResumptionRequests","useGetServiceResumptionRequestsQuery","useSpecChangeRequests","specChangeRequests","useGetSpecChangeRequestsQuery","useVisitFrequencyChangeRequests","visitFrequencyChangeRequests","useGetVisitFrequencyChangeRequestsQuery","useDeveloper","developer","useGlobalLoadingState","_useState2","setIsLoading","currentTicketRef","useRef","queries","areRelevantQueriesLoading","some","queryKey","status","startsWith","newTicketNumber","current","IndexedIterable","_array","_start","_end","_this","backwards","diff","ListDisposer","_super","ListGrouper","getKey","on","newValue","_getKey","_insert","_remove","oldValue","_keys","_groups","_sort","_a","index_1","disposer","dispose","checkBounds","List","initial","_values","removeValue","hasIndex","getIndex","setIndex","_sortQuicksort","low","high","_sortPartition","j","swap","value_a","value_b","moveValue","copyFrom","shift","setAll","newArray","oldArray","ListTemplate","template","_template","isTemplate","clone","make","out","hasKey","eachOrdered","ord","keysOrdered","merge","object1","object2","forceCopyProperties","copyAllProperties","to","Disposer","_disposed","_dispose","isDisposed","MultiDisposer","disposers","MutableValueDisposer","_disposer","CounterDisposer","_counter","increment","Color","color","_lightColor","_darkColor","alpha","rgba","hex","lighten","rgb","brighten","saturate","saturation","darkColor","lightColor","cacheId","cached","toColor","isColor","castColor","Grip","className","cs","InterfaceColorSet","layout","padding","margin","background","fillOpacity","icon","Sprite","paper","strokeWidth","pixelPerfect","stroke","getFor","strokeOpacity","align","valign","autoHideDelay","ev","_autoHideTimeout","setTimeout","hide","applyTheme","getPropertyValue","setPropertyValue","horizontalCenter","verticalCenter","Button","ChartDataItem","DataItem","Chart","_legend","Label","titles","_disposers","chartAndLegendContainer","createChild","Container","shouldClone","chartContainer","showOnInit","processTitle","updateReaderTitleReferences","role","defaultState","transitionDuration","applyInternalDefaults","readerTitle","language","translate","draw","fixLayout","legend","toBack","toFront","maxWidth","feedLegend","event","title","uidAttr","titleIds_1","setSVGAttribute","removeSVGAttribute","setLegend","property","processConfig","config","removeChildren","_dragGrip","grip_1","tooltipContainer","touch","interactionsEnabled","show","Component","relevant","Responsive","widthXS","stateId","states","properties","paddingLeft","pixelPaddingRight","paddingRight","heightXS","paddingTop","pixelPaddingBottom","paddingBottom","widthXXS","heightXXS","Bullet","isMeasured","tooltipX","tooltipY","applyOnClones","copyToLegendMarker","isXS","disabled","LegendDataItem","childrenCreated","_label","label_1","labels","addSprite","itemContainer","setProperty","_valueLabel","valueLabel_1","valueLabels","_itemContainer","component_1","itemContainer_1","itemContainers","togglable","toggleDataItem","dataItem","focusedItem","dataContext","readerControls","readerLabelledBy","addDisposer","readerChecked","visible","disableType","isActive","enableType","dataItems","_marker","marker_1","markers","LegendSettings","createMarker","Legend","clickable","focusable","cursorOverStyle","Mouse","pointer","isKey","interfaceColors","marker","setStateOnChildren","propertyFields","fill","disabledColor","activeState","RoundedRectangle","valueLabel","textAlign","createDataItem","validateDataElement","container","legendDataItem","legendSettings","createLegendMarker","useDefaultMarker","updateLegendValue","invalid","validate","currentText","__disabled","itemValueText","valueText","truncate","invalidate","isHiding","isHidden","colorOrig","hidden","handleDataItemPropertyChange","SeriesDataItem","bullets","Dictionary","setValue","Series","_ignoreMinMax","_showBullets","_tmin","_tmax","_smin","_smax","dataItemsByAxis","skipFocusThreshold","calculatePercent","autoDispose","simplifiedProcessing","axisRanges","processAxisRange","minBulletDistance","mainContainer","mask","bulletsContainer","_shouldBeReady","virtualParent","tooltip","Tooltip","hiddenState","transitionEasing","autoSetClassName","setClassName","_chart","positionBullet","bullet","processBullet","itemsFocusable","removeBullet","eachBullet","validateDataItems","processValues","getFirstValue","startIndex","getActualWorkingValue","rangeChangeUpdate","working","count_1","sum_1","low_1","high_1","open_1","close_1","previous_1","first_1","startIndex_1","_workingStartIndex","endIndex","_workingEndIndex","dataItem_1","_loop_1","dataItem_2","setCalculatedValue","prevValue","_loop_2","dataItem_3","ksum","zeroItem_1","dataItem_4","axisRange","children","updateTooltipBounds","topParent","setBounds","maxHeight","shouldCreateBullet","bulletTemplate","currentDataItem","setKey","readerText_1","itemReaderText","xField","yField","isDynamic","deepInvalidate","once","populateString","hoverable","itemWidth","itemHeight","handleDataItemWorkingValueChange","dataRangeInvalid","invalidateProcessedData","invalidateDataItems","createMask","rangesContainer","contents","isRange","getAxisField","axis","showTooltipAtPosition","xPosition","yPosition","_bullets","chart","invalidateRawData","readerText","_itemReaderText","tooltipText","tooltipHTML","adapter","_legendDataItem","itemLabelText","labelText","raiseCriticalError","modal","content","closable","open","verbose","log","applyFilters","filters","filter","_heatRules","heatRule","dataField_1","dataField","min_1","max_1","seriesDataItem_1","property_1","foundSprite","clonedFrom","anySprite","child","anyChild","foundSprite_1","ruleTarget","propertyField","workingValue","heatRules","rule","listitem","maybeColorOrPercent","configOrder","setVisibility","SerialChartDataItem","SerialChart","colors","ColorSet","seriesContainer","zIndex","_series","createSeries","handleSeriesAdded","series","dataUsers","dataUser","_dataUsers","legendData_1","hiddenInLegend","dataFields","AxisBreak","_axis","breakSize","marginLeft","marginRight","marginTop","marginBottom","fillShape","WavedLine","_fillShape","startLine","_startLine","endLine","_endLine","addBreakSprite","renderer","gridContainer","createBreakSprites","breakTemplate","axisBreaks","invalidateSeries","positionToPoint","startPosition","endPosition","updateBreakElement","AxisItemLocation","AxisDataItem","_grid","grid_1","grid","_tick","component_2","tick_1","tick","ticks","component_3","_axisFill","component_4","axisFill_1","axisFill","axisFills","_text","_mask","_contents","createFill","_axisBreak","axisBreak","appendChildren","appendDataItem","hasProperty","prop","Axis","_gridCount","_dataItemsIterator","pointerLength","fitPointerToBounds","fillRule","opacity","invalidateLayout","validateDataElements","ghostLabel","updateLabelElement","updateGridCount","axisLength","minGridDistance","validateLayout","axisFullLength","updateAxisLine","updateTooltip","updateBaseGridElement","_prevLength","initRenderer","updateGridContainer","validateAxisRanges","validateBreaks","processBreak","breakContainer","registerSeries","_renderer","ghostLabel_1","positionToAngle","pointToPosition","getAnyRangePath","getPositionRangePath","anyToPosition","anyToPoint","local","_tooltip","toAxisPosition","tooltipLocation","getCellStartPosition","getCellEndPosition","tooltipPosition","startPoint","endPoint","currentItemStartPoint","currentItemEndPoint","fullWidthTooltip","globalPoint","line","getTooltipText","pointTo","cursorTooltipEnabled","inversed","toGlobalPosition","pointerOrientation","boundingRectangle","roundPosition","_axisRanges","_axisBreaks","SortedList","createAxisBreak","adjustedStartValue","processSeriesDataItems","processSeriesDataItem","axisLetter","postProcessSeriesDataItems","postProcessSeriesDataItem","updateAxisBySeries","hideUnusedDataItems","dataItemsIterator","getSeriesDataItem","findNearest","stackKey","getX","getY","dataChangeUpdate","seriesDataChangeUpdate","adjustDifference","difference","startValue","endValue","adjustedEndValue","isInBreak","fixAxisBreaks","update","firstAxisBreak","previousEndValue_1","getPositionLabel","createSeriesRange","resetIterators","setDisabled","changed","maybeXS","AxisLine","AxisFill","fillPath","setPath","attr","Grid","AxisLabel","Tick","nonScalingStroke","AxisTick","AxisRenderer","inside","cellStartLocation","cellEndLocation","minLabelPosition","maxLabelPosition","inited","invalidateAxisItems","baseGrid","setAxis","bind","processRenderer","positionItem","positionToCoordinate","getHeight","plotContainer","pixelHeight","getWidth","pixelWidth","coordinateToPosition","coordinate","updateGridElement","updateTickElement","updateFillElement","toggleVisibility","minPosition","maxPosition","updatedStart","updatedEnd","_axisFills","createGrid","_ticks","createTick","_labels","createLabel","AxisRendererY","opposite","inversedPosition","innerHeight","bigNum","bbx","bbw","bbh","measuredHeight","y1","y2","w","tickLength","measuredWidth","basePoint","deltaX","x1","pixelMarginLeft","x2","pixelMarginRight","wavedRectangle","WavedRectangle","setWavedSides","widthS","ValueAxisBreak","valueToPosition","ValueAxisDataItem","ValueAxis","_stepDecimalPlaces","_baseValue","_adjustedStart","_adjustedEnd","_extremesChanged","_deltaMinMax","calculateTotals","axisFieldName","keepSelection","includeRangesInMinMax","_maxZoomed","_maxDefined","_minZoomed","_minDefined","_maxAdjusted","_minAdjusted","total","this_1","excludeFromTotal","getMinMax","calculateZoom","validateAxisElements","positionToValue","differece","minMaxStep","adjustMinMax","value_1","minZoomed","logarithmic","LOG10E","maxZoomed","dataItemsIterator_1","formatLabel","stepPower","decCount","renderer_1","breakValue_1","adjustedMin","adjustedMax","adjustedStep","fillEndPosition","numberFormatter","baseValue","valueToPoint","_difference","difference_1","value_2","breakStartPosition","breakEndPosition","breakStartValue","breakEndValue","E","xToValue","yToValue","POSITIVE_INFINITY","NEGATIVE_INFINITY","ignoreMinMax","seriesMin","seriesMax","_minReal","_maxReal","dif","fixMin","fixMax","extraMin","extraMax","strict","strictMinMax","animation","_minMaxAnimation","isFinished","_finalMax","_finalMin","animate","rangeChangeDuration","handleSelectionExtremesChange","gridCount","strictMode","initialMin","initialMax","power","extra","stepDivisor","maxPrecision","minCount","maxCount","handleExtremesChange","selectionMin","selectionMax","allHidden","seriesSelectionMin","seriesSelectionMax","minMaxStep2","zoom","getWorkingValue","stack","zoomToValues","skipRangeEvent","instantly","axisBreakDif","axisBreakGridCount","breakMinMaxStep","showTooltipAt","DateAxisBreak","DateAxisDataItem","endDate","dates","setDate","DateAxis","gridIntervals","dateFormats","periodChangeDateFormats","_baseIntervalReal","timeUnit","_minDifference","snapTooltip","gridInterval","_gridInterval","gridDuration","periodCount","baseDuration","maxZoomFactor","chooseInterval","baseInterval","_gridDate","getFirstWeekDay","dateFormatter","_nextGridUnit","_intervalDuration","baseAxis","field_1","minZoomedStr","startDataItem","findFirst","findClosestIndex","maxZoomedStr","endDataItem","validateDataRange","previousDataItem","previousDate","validateData","minDifference","_baseInterval","addEmptyUnitsBreaks","getDate","startTime","skipEmptyPeriods","startTimeStr","startDate","breakGridCount","gridDate","firstDayOfWeek","getGridDate","intervalCount","realIntervalCount","prevTimestamp","newDate","timestamp","durationBreaksRemoved","getBreaklessDate","prevGridDate","this_2","markUnitChange","timeUnit_1","intervalCount_1","prevGridDate_1","timestamp_1","_loop_3","text_1","endTimestamp","location_1","startLocation","endLocation","duration","intervalDuration","lastIndex","dateToPosition","dateToPoint","positionToDate","getTimeByLocation","workingLocations","endTime","openTime","openDate","prevSeriesTime","_prevSeriesTime","timeInterval","invalidateData","tooltipDateFormat","dateFormat","key_1","getCurrentLabelFormat","zoomToDates","parse","asIs","field","closestDate_1","actualTime_1","xAxis","dateX","yAxis","dateY","closestTime_1","showTooltipAtDataItem","_seriesPoints","hideTooltip","makeGap","previous","connect","autoGapCount","AxisRendererX","bby","deltaY","pixelMarginTop","pixelMarginBottom","innerWidth","CategoryAxisBreak","indexToPosition","category","categoryToIndex","CategoryAxisDataItem","Adapter","seriesDataItems","locations","endCategory","CategoryAxis","dataItemsByCategory","_lastDataItem","categoryAxisDataItem","seriesId","invalidateDataRange","positionToIndex","minIndex","maxIndex","axisDataItem","i_1","seriesDataItem","dataCount","frequency","_startIndex","_endIndex","_frequency","itemIndex","frequency_1","itemIndex_1","fillEndIndex","fillPosition","html","disposeData","processDataItem","getDataItem","breakStartIndex","breakEndIndex","categoryToPosition","categoryToPoint","zoomToCategories","startCategory","zoomToIndexes","startPos","endPos","getFirstSeriesDataItem","categoryX","categoryY","getLastSeriesDataItem","sdi_1","category_1","categories","breakPosition","positionToCategory","XYSeriesDataItem","valueX","valueY","openValueX","openValueY","openDateX","openDateY","setLocation","setCategory","openCategoryX","openCategoryY","getMin","fields","stackValue","getMax","XYSeries","_xAxis","_yAxis","_xValueFields","_yValueFields","cursorHoverEnabled","setElement","stacked","returnBulletDefaultState","defineFields","updateItemReaderText","_xField","_yField","disable","enable","setInitialWorkingValues","updateDataItem","dataItemsX","clearCatAxis","dataItemsY","xAxisFieldName","xOpenField","yAxisFieldName","yOpenField","_xOpenField","_yOpenField","addValueField","setCategoryAxisField","setDateAxisField","afterDraw","path_1","getMaskPath","xAxes","oldAxis","removeKey","yAxes","_baseAxis","getStackValue","stackX","stackY","xAxisId","yAxisId","stackedSeries","appeared","_prevTooltipDataItem","isShowing","tooltipDataItem","tooltipXField","tooltipYField","tooltipPoint","getPoint","_b","isHover","e_1_1","e_1","_c","showTooltip","e_2_1","e_2","bulletLocationX","getBulletLocationX","bulletLocationY","getBulletLocationY","locationX","locationY","bulletLocation","anim","delay","interpolationDuration","sequencedInterpolation","sequencedInterpolationDelay","axisSeries","prevSeries","prevDataItem","_tooltipXField","_tooltipYField","processingErrors","xKey","yKey","stackKeyX","stackKeyY","val","Cursor","_stick","trackable","interaction","handleCursorDown","handleCursorUp","handleCursorMove","interactions","isTouchProtected","_generalBehavior","downPoint","isLocalElement","svg","_stickPoint","fitsToBounds","triggerMove","hideReal","stick","triggerMoveReal","invalidatePosition","getPositions","triggerDown","triggerDownReal","setGlobalStyle","grabbing","triggerUp","triggerUpReal","updatePoint","upPoint","_upPointOrig","_downPointOrig","getHitOption","updateSelection","cancelable","shouldPreventGestures","preventDefault","lockElement","XYCursor","_lineX","_lineY","behavior","maxPanOut","selection","lineX","strokeDasharray","lineY","updateSize","_usesSelection","_positionPrecision","validatePosition","fixPoint","snapToSeries","updateLinePositions","getPanningRanges","selectionX","selectionY","getRanges","startX","startY","xRange","yRange","endX","endY","handleXTooltipPosition","handleYTooltipPosition","fullWidthLineX","fullWidthLineY","_selection","_snapToDisposer","handleSnap","xx","yy","animationDuration","easing","animationEasing","XYChartScrollbar","scrollbarChart","_scrollbarChart","minHeight","minWidth","unselectedOverlay","_unselectedOverlay","thumbBackground","thumb","hoverState","downState","handleSeriesRemoved","sourceSeries","zoomOutButton","addXAxis","addYAxis","zoomOutAxes","DesaturateFilter","updateByOrientation","orientation","off","handleDataChanged","dataProvider","updateThumb","Scrollbar","XYChartDataItem","XYChart","_axisRendererX","_axisRendererY","maskBullets","arrangeTooltips","topAxesCont","topAxesContainer","yAxesAndPlotCont","yAxesAndPlotContainer","bottomAxesCont","bottomAxesContainer","leftAxesCont","contentAlign","updateXAxesMargins","leftAxesContainer","plotCont","mouseWheelBehavior","_cursorContainer","rightAxesCont","rightAxesContainer","ZoomOutButton","MAX_SAFE_INTEGER","_bulletMask","exportable","updateSeriesLegend","updatePlotElements","_parseDataFrom","leftAxesWidth","rightAxesWidth","handleXAxisChange","updateXAxis","handleYAxisChange","updateYAxis","processXAxis","observe","handleXAxisRangeChange","processAxis","processYAxis","handleYAxisRangeChange","getCommonAxisRange","scrollbarX","zoomAxes","toggleZoomOutButton","updateScrollbar","show_1","seriesAppeared","scrollbarY","scrollbar","skipRangeEvents","axes","axisStart","axisEnd","updateSeriesMasks","_xAxes","handleAxisRemoval","_yAxes","dataInvalid","_cursor","cursor","removeDispose","handleCursorPositionChange","handleCursorZoomStart","handleCursorZoomEnd","handleCursorPanStart","handleCursorPanning","handleCursorPanEnd","handleCursorCanceled","handleHideCursor","tapToActivate","setTapToActivate","createCursor","showSeriesTooltip","exceptAxis","showAxisTooltip","sortSeriesTooltips","hideObjectTooltip","seriesPoints","topLeft","bottomRight","filteredSeriesPoints","seriesPoint","averageY","SVGContainer","dropped","nextHeight","pointY","nextY","except","getUpdatedRange","priority","_panStartXRange","_panStartYRange","_panEndXRange","delta","panEndRange","_panEndYRange","panStartRange","newStart","newEnd","newRange","_scrollbarX","startGrip","endGrip","handleXScrollbarChange","_scrollbarY","handleYScrollbarChange","fixRange","declination","realRange","handleWheel","svgPoint","plotPoint","rangeX","rangeY","shiftStep","differenceX","newStartX","newEndX","differenceY","newStartY","newEndY","_mouseWheelDisposer","wheelable","dataSourceDateFields","populateDataSourceFields","dataSourceNumberFields","_zoomOutButton","button","addData","rawDataItem","removeCount","addScrollbarData","removeScrollbarData","removeData","handleTapToActivate","handleTapToActivateDeactivation","LineSeriesSegment","fillSprite","strokeSprite","drawSegment","closePoints","smoothnessX","smoothnessY","smooth","lineElement","fillElement","LineSeriesDataItem","LineSeries","minDistance","createSegment","_segmentsIterator","segmentsContainer","initialY","setWorkingValue","setWorkingLocation","initialX","segment","tooltipColorSource","openSegmentWrapper","_adjustedStartIndex","sliceData","findAdjustedIndex","adjustedIndex","openIndex","openSegment","addToClose","closeIndex","propertiesChanged","valuesFound","hasProperties","updateSegmentProperties","addPoints","closeSegment","itemProperties","checkOnly","propertyName","currentValue","currentValueStr","valueStr","disposeChildren","Line","Rectangle","hasLabels","RadarSeriesDataItem","RadarSeries","connectEnds","pixelRadius","pixelInnerRadius","RadarCursor","truePixelRadius","updateLineX","updateLineY","fillStartAngle","downAngle","downRadius","currentRadius","_prevAngle","downSin","downCos","upAngle","upRadius","setPercentProperty","innerRadiusModifyer","AxisFillCircular","GridCircular","AxisLabelCircular","fdx","fdy","axisRadius","sign","pixelRadiusY","axisRadiusY","fixPosition","isNegative","realRadius","relativeRotation","labelRadius","bent","point_1","locationOnPath","dH","dW","_measuredHeight","_measuredWidth","AxisRendererCircular","pixelRadiusReal","useChartAngles","gridInnerRadius","AxisRendererRadial","gridType","axisAngle","gridLocation","count_2","WavedCircle","tooltipOrientation","RadarChartDataItem","RadarChart","radarContainer","Circle","beforeDraw","innerRect","wr","hr","mr","maxRadius","diameter","_pixelInnerRadius","definedBBox","ClockHand","pin","startWidth","endWidth","hand","Trapezoid","leftSide","rightSide","x0","_pin","_hand","showValue","newAngle","currentAngle","rotationDirection","updateValue","GaugeChartDataItem","GaugeChart","hands","processHand","PercentSeriesDataItem","toValue","noChangeValues","ticksContainer","labelsContainer","_slice","slice_1","slices","slicesContainer","PercentSeries","_addAllDataItems","alignLabels","createSlice","_slices","initSlice","initTick","initLabel","arrangeLabels","nextLabel","getNextLabel","arrangeLabels2","previousTop","nextDataItem","handleSliceScale","handleSliceMove","setAlignLabels","PercentChartDataItem","PercentChart","PieTick","ix","y0","iy","PieSeriesDataItem","radiusValue","PieSeries","Slice","shiftRadius","_leftItems","_rightItems","_currentStartAngle","_arcRect","_maxRadiusPercent","radiusValuePercent","aAngle","bAngle","normalizedMiddleAngle","arcRect","distance","depth","_pixelRadius","PieChartDataItem","PieChart","updateRadius","_chartPixelRadius","updateSeriesAngles","chartCont","chartRadius","chartPixelInnerRadius","seriesRadius","_chartPixelInnerRadius","PieSeries3DDataItem","depthValue","PieSeries3D","Slice3D","depthPercent","PieChart3DDataItem","PieChart3D","invalidateDataUsers","SlicedChartDataItem","SlicedChart","FlowDiagramNode","draggable","inert","invalidateLinks","handleHit","outgoingDataItems","toNode","incomingDataItems","fromNode","link","colorMode","gradient","stop_1","stops","stop_2","_incomingDataItems","sortBy","_incomingSorted","fromName","_outgoingDataItems","_outgoingSorted","setColorProperty","_background","column","FlowDiagramLink","positionBullets","_bulletsContainer","_bulletsMask","bulletsMask","middleLine","rotationField","addColor","setFill","_gradient","measureElement","Polyline","getTooltipX","getTooltipY","LinearGradient","FlowDiagramDataItem","toName","_link","link_1","links","FlowDiagram","nodePadding","minNodeSize","linksContainer","nodesContainer","nodes","sortNodes","node","strokeModifier","LinearGradientModifier","opacities","fillModifier","strNode","getNodeValue","_sorted","sortedIterator","incomingTotal","outgoingTotal","totalIncoming","totalOutgoing","changeSorting","_nodes","createNode","_links","createLink","LabelBullet","hideOversized","handleMaxSize","SankeyNode","nextInCoord","nextOutCoord","nameLabel","orientation_1","linkWidth","valueHeight","SankeyLink","controlPointDistance","Polyspline","xt0","yt0","xt1","yt1","xb0","xb1","yb0","yb1","xm0","xm1","ym0","ym1","_bbox","cpd","kxt0","kyt0","kxt1","kyt1","kxm0","kym0","kxm1","kym1","kxb0","kyb0","kxb1","kyb1","SankeyDiagramDataItem","SankeyDiagram","nodeAlign","_levelCount","level","getNodeLevel","levels","calculateValueHeight","_levelSum","_levelNodesCount","maxSum","availableHeight","maxSumLevel","realValue","_maxSumLevel","maxSumLevelNodeCount","finalHeight","_heightAnimation","animationOptions","Animation","nextCoordinate","levelCoordinate","nodeCount","showReal","container_1","interpolationEasing","nodeHeight","_valueHeight","ChordNode","updateRotation","arc_1","sliceStartAngle_1","childAngle","childRadius","labelAngle","adjustedTotal","nextAngle","nonRibbon","percentWidth","valueAngle","mAngle","trueStartAngle","tx","ty","QuadraticCurve","cpx","cpy","cp","ChordLink","fromX","fromY","toX","toY","mAngle1","mAngle2","ChordDiagramDataItem","ChordDiagram","chordContainer","newTotal","Column","createAssets","handleKidAdded","ColumnSeriesDataItem","_column","setColumn","columns","_rangesColumns","ColumnSeries","_startLocation","_endLocation","clustered","columnsContainer","_columnsContainer","baseAxisSeries","clusterCount","disableUnusedColumns","validateDataElementReal","getStartLocation","getEndLocation","percentHeight","outOfBounds","offset","fixHorizontalCoordinate","fixVerticalCoordinate","bottomLocation","topLocation","axisLenght","rightLocation","leftLocation","column_1","realX","realY","realWidth","realHeight","setColumnStates","rangeColumn","rangesColumns","change","droppedFromOpen","_dropFromOpenState","setState","_riseFromOpenState","droppedFromPrevious","_dropFromPreviousState","_riseFromPreviousState","_columns","createColumnTemplate","fromOpenState_1","fromPreviousState_1","TreeMapSeriesDataItem","treeMapDataItem","_dataContext","TreeMapSeries","configField","TreeMapDataItem","rows","hasChildren","getDuration","childValue","TreeMap","layoutAlgorithm","squarify","zoomable","maxLevels","currentLevel","sorting","xRenderer","yRenderer","seriesTemplates","zoomToChartDataItem","_homeDataItem","_navigationBar","navigationBar","createTreeSeries","_tempSeries","homeDataItem","_homeText","layoutItems","_updateDataItemIndexes","navigationData","parentDataItem","initSeries","createTreeSeriesReal","setData","currentlyZoomed","zoomToSeriesDataItem","toggleBullets","rangeChangeAnimation","_dataDisposers","binaryTree","dice","sliceDice","validateRawData","sums","partition","valueOffset","valueTarget","k","hi","mid","valueLeft","valueRight","xk","yk","nodeValue","sumValue","newRatio","minRatio","beta","ratio","i0","i1","row","handleDataItemValueChange","getLegendLevel","legendParent","getExporting","exporting","AxisRendererX3D","dx3D","dy3D","handle3DChanged","AxisRendererY3D","Column3D","column3D","Rectangle3D","ColumnSeries3DDataItem","ColumnSeries3D","XYChart3DDataItem","XYChart3D","fixColumns","depthIndex","inversed_1","maskColumns","HeatLegend","markerContainer","markerCount","getMinFromRules","minValue_1","getMaxFromRules","maxValue_1","minColor","maxColor","seriesFill","minOpacity","maxOpacity","minStrokeOpacity","maxStrokeOpacity","minStroke","maxStroke","strokeGradient","color_1","opacity_1","valueAxis","reverseOrder","_valueAxis","dataFieldDefined","updateMinMax","seriesId_1","disposer_1","Candlestick","lowLine","highLine","CandlestickSeriesDataItem","lowValueX","lowValueY","highValueX","highValueY","CandlestickSeries","positiveColor","negativeColor","dropFromOpenState","riseFromOpenState","validateCandlestick","lowLine_1","highLine_1","yOpen","yClose","yLow","yLowField","yHigh","yHighField","open_2","close_2","xOpen","xClose","xLow","xLowField","xHigh","xHighField","rangeLowLine","rangehighLine","_xLowField","_yLowField","_xHighField","_yHighField","cw","ch","OHLC","openLine","highLowLine","closeLine","OHLCSeriesDataItem","OHLCSeries","openLine_1","highLowLine_1","closeLine_1","rangeOpenLine","rangeCloseLine","rangeHighLowLine","StepLineSeriesSegment","noRisers","vertical","StepLineSeriesDataItem","StepLineSeries","point0","RadarColumn","radarColumn","RadarColumnSeriesDataItem","RadarColumnSeries","lAngle","rAngle","tRadius","bRadius","cellAngle","FunnelSlice","bottomWidth","topWidth","expandDistance","pb","pr","pl","ed","tl","tw","tr","br","bw","bl","cpr","cpl","qp1","qp2","tickPoint","tt","tb","bt","bb","mlx","mty","FunnelTick","labelsOpposite","maxRight","maxBottom","FunnelSeriesDataItem","_sliceLink","sliceLink_1","sliceLinks","FunnelSeries","_nextY","bottomRatio","labelTemplate","dItem","_total","_count","getNextValue","nextValue","nextItem","formDataElement","sliceLink","decorateSlice","linkHeight","lastLabel","lastY","lastX","_sliceLinks","labelAlign","labelValign","PyramidSeriesDataItem","PyramidSeries","pyramidHeight","valueIs","_nextWidth","relValue","_pyramidHeight","_pyramidWidth","pyramidWidth","sliceTopWidth","sliceHeight","sliceBottomWidth","square","sliceWidth","PictorialStackedSeriesDataItem","PictorialStackedSeries","_maskSprite","maskSprite","pictureWidth","pictureHeight","newWidth","newHeight","hs","ConeColumn","coneColumn","Cone","ConeSeriesDataItem","ConeSeries","CurvedColumn","curvedColumn","CurvedColumnSeriesDataItem","CurvedColumnSeries","DurationAxisDataItem","DurationAxis","_baseUnit","durationFormatter","axisDurationFormat","baseUnit","divisors","realDivisor","divisors_1","divisors_1_1","divisor","reducedCount","getValueUnit","_tooltipDurationFormat","tooltipDurationFormat","CircleBullet","circle","ErrorBullet","errorLine","NavigationBarDataItem","NavigationBar","textLink","TextLink","_linksIterator","triangle","Triangle","direction","separators","activeLink","fontWeight","visualProperties","_bindings","_isTemplate","_inited","_ready","_isHidden","isStandaloneInstance","_isActive","_language","_exporting","_exportable","positionInvalid","maxLeft","maxTop","_isDragged","_isResized","_disabled","_internalDisabled","_updateDisabled","_internalDefaultsApplied","rollOutDelay","isBaseSprite","dragWhileResize","addGroup","_prevMeasuredWidth","_prevMeasuredHeight","_isMeasured","getCurrentThemes","_themes","parent_1","requestFrame","sizeChanged","measure","prevGroupTransform","transformString","nonScaling","globalScale","maskRectangle","_maskRectangle","_clipElement","applyMask","dispatchReady","isReady","reinit","handleGlobalScale","updateFilterScale","removeFromInvalids","plugins","_showSystemTooltip","showSystemTooltip","childNodes","removeChild","firstChild","_clones","_svgContainer","_interactionDisposer","_urlDisposer","_numberFormatter","_focusFilter","_filters","applyAccessibility","_topParent","_parent","oldParent","_tooltipContainer","_dataItem","_virtualParent","appendDefs","filterElement","appendDef","fill_1","modify","stroke_1","_clipPath","_id","_paper","setPaper","_htmlContainer","_titleElement","_descriptionElement","onAll","setSVGAttributes","shapeRendering","strokeDashoffset","strokeLinecap","strokeLinejoin","tabindex","attribute","removeAttr","classNamePrefix","addClass","updateClipPath","createClipPath","width_1","height_1","removeChildNodes","appendPrimitives","removeClipPath","_element","removeElement","svgBBox","updateCenter","prevElementTransform","elementX","elementY","elementWidth","elementHeigth","_measuredWidthSelf","_measuredHeightSelf","positionPrecision","matrix","createSVGMatrix","createSVGPoint","p4","pt1","matrixTransform","pt2","pt3","pt4","updateTooltipPosition","insertBefore","sortChildren","insertAfter","getRelativeX","getRelativeY","getPixelX","pixel","relative","getPixelY","isDragged","hitTest","ax1","ay1","ax2","ay2","bx1","by1","bx2","by2","_states","processState","clones","_animations","getSvgPoint","transitTo","applyCurrentState","isDown","downPointers","isFocused","transition","options","propValues","allValues","finalValue","option","newFilters_1","stateFilter","newFilter","currentFilter","isInTransition","animations","isInteractive","handleOver","handleOut","handleDown","handleUp","handleFocus","handleBlur","setActive","hasChild","_dateFormatter","_durationFormatter","tags","escape","tag","getTagValue","unescape","tagName","reg","reg2","matches2","getTagValueFromObject","populateStringFrom","formatApplied","part","numberValue","dateValue","durationValue","encodeURIComponent","formatParts","formatterType","setDataItem","dataContext_1","dataContext_2","dataContext2_1","fieldValue","propValue","transform","event_1","length_2","bindToProperty","modifier","listener","context","description","readerDescription","readerHidden","checked","controls","live","readerLive","labelledByIds","describedByIds","labelledBy","describedBy","readerDescribedBy","titleElement","titleId","textContent","descriptionElement","descriptionId","keyboardOptions","_interaction","getInteraction","dom","swipeable","resizable","contextMenuDisabled","setEventDisposer","hasFocused","focusFilter","hoverOnFocus","_tabindex","inertiaOptions","applyCursorStyle","handleDragStart","handleDragMove","handleDragStop","originalPosition","dragStart","dragStop","hoverOptions","_outTimeout","targetSprite","keepTargetHover","handleOutReal","hitOptions","originalAngle","originalScale","handleToggle","urlHandler","_baseId","setBaseId","baseSprite","urlTarget","swipeOptions","handleResize","svgPoint1","svgPoint2","svgMidPoint","parentPoint1","parentPoint2","spritePoint1","spritePoint2","spriteMidPoint","parentPoint","cursorOptions","style","overStyle","defaultStyle","applyCursorOverStyle","downStyle","pointerEvents","exp","_export","nonExportableSprites","modalPrefix","has","openModal","closeModal","popups","openPopup","closeAllPopups","setMaxWidth","prevWidth","prevHeight","relativeWidth","event_2","previousWidth","previousHeight","setMaxHeight","relativeHeight","event_3","_pixelWidth","_relativeHeight","_pixelHeight","_relativeWidth","SVGPathElement","realFill","setStroke","realStroke","_rtl","_hideAnimation","kill","_showHideDisposer","getVisibility","event_4","_tooltipDataItem","_tooltipColorSource","colorSource_1","tooltipColorSource_1","getStrokeFromObject","getFillFromObject","autoTextColor","alternative","pointTooltipTo","getCursorStyle","cursorDowntyle","grab","horizontalResize","verticalResize","setShowOnInit","_showOnInitDisposer","hideInitially","appear","_plugins","init","_systemUpdate","skippedSprites","_systemCheckIfValidate","_systemValidatePositions","_systemValidateLayouts","rootStylesheet","SVGNS","XMLNS","XLINK","addEventListener","removeEventListener","getElement","el","getElementById","getElementsByClassName","HTMLElement","classList","currentClassName","getAttribute","setAttribute","removeClass","setStyle","getComputedStyle","currentStyle","defaultView","blur","createElement","appendChild","focus","parentNode","host","eventTarget","composedPath","fixPixelPerfect","left_1","getStylesheet","head","sheet","StyleRule","selector","styles","root","cssRules","_rule","deleteRule","insertRule","makeStylesheet","selectorText","_setVendorPrefixName","styleId","StyleClass","_className","findFont","font","parentElement","findFontSize","parent_2","_childrenByLayout","_childrenDisposers","setStateOnSprites","layoutInvalid","_absoluteWidth","_absoluteHeight","_tapToActivate","tapTimeout","handleChildAdded","handleChildRemoved","processChild","insertKey","handleChildTransform","sortAndAdd","addChildren","_children","fixed_1","relative_1","calculateRelativeSize","totalRelativeWidth","totalRelativeHeight","zindexed","sortArray","idx","ai","bi","group_1","isCorrect","addToBack","classType","createBackground","processBackground","_availableWidth","_availableHeight","allValid","childMeasuredWidth","childMeasuredHeight","arrange","maxCellWidth","minCellWidth","columnCount","contentLeft","contentRight","contentTop","contentBottom","nextX","columnWidth","rowHeight","childrenCopy","fixedWidthGrid","maxColumns","getColumnWidth","childMarginLeft","childMarginRight","childMarginTop","childMarginBottom","childWidth","childHeight","childLeft","childRight","childTop","childBottom","nextColumnWidth","noneBBox","measuredContentWidth","measuredContentHeight","contentValign","dx_1","dy_1","mwa","mha","ddx","ddy","oldBBox","contentWidth","contentHeight","prevLeft","prevTop","prevBotttom","prevRight","dummyData","updateBackground","deviation","preloader","_preloader","invalidateLabels","stateName","allReady_1","initTapTimeout","_tapToActivateTimeout","hMoney","cents","toFixed","createContext","onSelectAction","_x","_objectDestructuringEmpty","selectedContainer","setSelectedContainer","formType","setFormType","cardTab","setCardTab","showTaggingForm","setShowTaggingForm","highlightedIds","setHighlightedIds","requestedAtDate","setRequestedAtDate","eventId","setEventId","requestType","setRequestType","setServiceUuid","isDrawerOpen","closeDrawer","activeChannel","setIsDrawerOpen","setActiveChannel","toggleDrawerAndSetChannel","onSelectDate","_y","getInternalStorageTypes","app","internalStorageTypes","getInternalStorageType","storageTypeId","getInternalContainerTypes","internalContainerTypes","getInternalContainerType","containerTypeId","checkAllDataLoaded","firestore","getInternalContainerContaminants","internalContainerContaminants","checkInContainerTypeIds","getAllInternalContainerContaminants","getBulkStorageTypes","bulkStorageTypes","getBulkStorageType","getExternalContainerContaminants","externalContainerContaminants","checkInStorageTypeIds","getAllExternalContainerContaminants","getCoworkerContacts","coworkerContacts","getCurrentUser","currentUser","getStorageType","getAllContaminants","_objectSpread","getRequiredRoomCount","clinicallyActiveRoomsCount","getSectionData","GeneralInformation","sectionId","getClinicallyActiveRoomCount","BinDotMissing","_ref2$color","React","version","viewBox","enableBackground","BinDot","_ref$tooltipName","tooltipName","_ref$tooltipPlace","tooltipPlace","_ref$tooltipBackgroun","tooltipBackgroundColor","_ref$tooltipColor","tooltipColor","_ref$arrowColor","arrowColor","_ref$showImg","showImg","_ref$imgSize","imgSize","imageUrl","_objectWithoutProperties","_excluded","backgroundColor","borderColor","placement","arrow","slotProps","src","xmlns","visitDateSlice","initialState","reducers","setVisitDate","action","payload","actions","fetchSpecificDataStart","fetchSpecificDataSuccess","fetchSpecificDataError","fetchPastDataStart","fetchPastDataSuccess","fetchPastDataError","fetchFutureDataStart","fetchFutureDataSuccess","fetchFutureDataError","fetchDetailsDataStart","fetchDetailsDataSuccess","fetchDetailsDataError","updateDataFromServer","updateDetailsFromServer","dotProp","calendarApiReducer","createReducer","_defineProperty","_createReducer","apiState","fetchingCurrent","errorCurrent","fetchingPast","errorPast","fetchingFuture","errorFuture","fetchingDetails","fetchedDetails","errorDetails","oldState","availableData","moment","loadStartDate","loadEndDate","noData","visits","updateData","keyData","initialHistory","createHashHistory","_createReduxHistoryCo","createReduxHistoryContext","history","createReduxHistory","routerMiddleware","routerReducer","rootReducer","calendarApi","router","reducerPath","reducer","visitDateReducer","visitDate","createStoreWithHistory","preloadedState","store","configureStore","middleware","getDefaultMiddleware","useDispatch","useSelector","Image","widthRatio","heightRatio","attrNS","Polyarc","controlPointPosition","makePath","_distance","_realSegments","realPoints","distanceAB","cpDistance","controlPoint1","controlPoint2","stepCount","Morpher","morphable","_bboxes","morphDuration","morphEasing","morphToSingle","scaleRatio","morphToPolygon","toPoints","currentPoints","sortPoints","_morphFromPointsReal","_morphToPointsReal","normalizePoints","pointsA","pointsB","surfaceA","holeA","bboxA","middleX","middleY","splitAt","newDistance","partA","partB","bbox1","bbox2","bboxes","surface","morphToCircle","commonBBox","hole","fromPoints","realAngle","pointOnCircle","hlen","mustHaveCount","addToSegmentCount","newPoints","extraPoint","lastPoint","morphToRectangle","i_2","i_3","_morphProgress","currentArea","surfaceFrom","holeFrom","surfaceTo","holeTo","currentSurface","i_4","slen","currentPoint","currentHole","i_5","morphBack","Base","Polygon","_currentPoints","areaHole","areaArr","holeArr","pointsArr","area","areaAndHole","coords","pointsArr_1","_morpher","Preloader","sliceContainer","backgroundSlice","progressSlice","_started","Slider","_isBusy","__start","PlayButton","playIcon","stopIcon","RadialGradientModifier","RadialGradient","LinePattern","_line","addElement","Pattern","RectPattern","rectHeight","rectWidth","_rect","ColorizeFilter","feColorMatrix","filterPrimitives","intensity","applyFilter","ii","Filter","BlurFilter","feGaussianBlur","FocusFilter","feFlood","feMorphology","feComposite","feBlend","setSprite","_sprite","removeStyle","addStyle","Plugin","AmChartsLogo","aColor","aGradient","aStroke","desaturateFilter","desaturateFilterHover","htmlElement","innerHTML","svgDiv_1","Paper","tooltipContainer_1","preloader_1","commercialLicense","logo_1","logo","classError","useTheme","_purposes","primaryButton","primaryButtonHover","primaryButtonDown","primaryButtonActive","primaryButtonText","primaryButtonStroke","secondaryButton","secondaryButtonHover","secondaryButtonDown","secondaryButtonActive","secondaryButtonText","secondaryButtonStroke","alternativeBackground","alternativeText","disabledBackground","positive","debug","purpose","setFor","timeUnitDurations","millisecond","second","minute","hour","month","getNextUnit","unit","checkChange","dateOne","dateTwo","timeZoneOffset1","timeZoneOffset2","getTimezoneOffset","setUTCMinutes","getUTCMinutes","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCSeconds","nextUnit","timeZoneOffset","setUTCDate","seconds","setUTCSeconds","milliseconds","getUTCMilliseconds","setUTCMilliseconds","setUTCHours","minutes","setUTCMonth","wday","newTimeZoneOffset","firstDateOfWeek","weekDay","getUTCDay","Interaction","_globalEventsAdded","_pointerEvents","_usePointerEventsOnly","_useTouchEventsOnly","_addHoverEvents","_passiveSupported","_delayedEvents","overObjects","downObjects","trackedObjects","transformedObjects","pointers","pointerdown","pointerup","pointermove","pointercancel","pointerover","pointerout","matchMedia","navigator","userAgent","wheel","onmousewheel","passiveSupported","fullFF","addGlobalEvents","handleGlobalPointerDown","handleGlobalPointerMove","handleGlobalPointerUp","handleGlobalTouchStart","handleGlobalTouchMove","handleGlobalTouchEnd","handleGlobalKeyDown","handleGlobalKeyUp","processClickable","io","processTouchable","processContextMenu","eventDisposers","processHoverable","handlePointerOut","handlePointerOver","processMovable","isGlobalElement","prepElement","processTrackable","processDraggable","processSwipeable","processResizable","processWheelable","handleMouseWheel","passive","unlockWheel","lockWheel","processFocusable","handleFocusBlur","handleTouchDown","handlePointerDown","isPaused","imev","focusedObject","disposerKey","ko","getEventKey","directionY","directionX","getPointer","getPointerPoint","addBreadCrumb","handleGlobalMove","processDelayed","preventTouchAction","defaultPrevented","cancelled","handleGlobalUp","changedTouches","which","resetPointer","mod","deltaMode","WheelEvent","wheelDeltaX","wheelDeltaY","maybePreventDefault","now","lastHit","lastHitPointer","soft","overPointers","handleTrack","force","hasDelayedOut","old","getHoverOption","keepUntil","timeout","delayedEvent","stopInertia","applyCursorDownStyle","processDragStart","processResizeStart","restoreCursorDownStyle","swiped","handleSwipe","moved","handleInertia","processDragStop","processResizeStop","target_1","lastEvent","swiping","handleTransform","skipCheck","handleMoveInertia","handleResizeInertia","inertia","ref","getTrailPoint","getInertiaOption","factor","inertias","lastUpEvent","pointer2","pointer1","singlePoint","nextPointer","pointer1Moved","dragStartEvents","handleTransformMove","pointer2Moved","handleTransformResize","ctrlKey","pointerMoved","dragTarget","getDragPointer","lastDownEvent","getPointerId","identifier","pointerId","clientX","clientY","isPointerTouch","Touch","PointerEvent","pointerType","MouseEvent","track","swipeCanceled","lockDocument","unlockDocument","restoreAllStyles","unlockElement","wheelLockEvent","elementFromPoint","props","setTemporaryStyle","unprepElement","restoreStyle","getSwipeOption","getKeyboardOption","restoreGlobalStyle","tolerance","minTime","getShift","pointerExists","exists","replacedStyles","logTouch","TouchEvent","NotesSection","form","onSetForm","notes","Box","sx","display","alignItems","justifyContent","mx","flex","TextField","placeholder","multiline","fullWidth","maxRows","onChange","InputProps","fontSize","servicesApi","getService","serviceId","getLocationServiceVendor","getLocationServiceVendors","getTicketApp","getLocationRemediation","getAllLocationRemediations","formServiceAction","mutation","invalidatesTags","useGetLocationServiceVendorQuery","useGetServiceQuery","useFormServiceActionMutation","useGetTicketAppQuery","useGetLocationRemediationQuery","useGetAllLocationRemediationsQuery","_servicesApi$endpoint","datePickerStyles","calendarHeader","textField","visitDayStyles","failure","border","success","conflicting","unknown","planned","assumed","statusVisit","ServerDay","_props$visitDays","visitDays","outsideCurrentMonth","isFirstVisibleCell","isLastVisibleCell","other","visitDay","isDayjs","isSame","matchedStyles","tooltipTitle","startCase","PickersDay","_extends","onDaySelect","ServiceCalendarDatePicker","setOpen","_ref2$maxDate","maxDate","_ref2$visitDays","_excluded2","LocalizationProvider","dateAdapter","AdapterDayjs","adapterLocale","DatePicker","slots","onClick","onClose","successCallback","errorCallback","_ref$method","$","ajax","retryLimit","attempt","isFunction","responseJSON","dataType","contentType","cache","beforeSend","xhr","setRequestHeader","DictionaryDisposer","dict","_dictionary","updateKey","insertKeyIfEmpty","ifEmpty","DictionaryTemplate","JsonViewer","memo","ReactJson","theme","enableClipboard","fontFamily","collapsed","displayDataTypes","displayObjectSize","DebugButton","_ref2$buttonSize","buttonSize","isDebuggerOpen","setIsDebuggerOpen","_useState4","setPosition","_useState6","size","setSize","isDeveloper","handleOpenDebugger","useCallback","handleCloseDebugger","viewportWidth","viewportHeight","scrollX","pageXOffset","scrollY","pageYOffset","memoizedProps","Fragment","IconButton","DebugIcon","createPortal","Rnd","onDragStop","_e","onResize","_direction","_delta","flexDirection","borderBottom","Typography","variant","CloseIcon","flexGrow","overflow","RouterDebugger","_ref3","useRouteMatch","useLocation","useHistory","showRouter","setShowRouter","mt","bgcolor","borderRadius","system","System","_isPaused","dummyCounter","_frameRequested","updateStepDuration","msg","invalidData","dataValidationProgress","validateLayouts","validatePositions","hasSkipped","checkIfValidate2","all0_1","VERSION","BaseObject","_uid","clearCache","cloneId","newObject","clearTimeout","setInterval","configKey","item_1","configValue","createClassInstance","processAdapters","processEvents","processListTemplate","templateValue","entryKey","entryValue","listItem","processDictionaryTemplate","processList","processDictionary","isReserved","errors","_processingErrors","entry","callback","getConfigEntryType","itemCount","createEntryInstance","BaseObjectEvents","_rules","_appliedRules","_useDefault","_enabled","_noStates","rules","checkRules","_component","_sizeEventDisposer","enabled","applyRules","defaultRules","useDefault","isApplied","ruleId","allRules","rulesChanged","newTarget","defaultStateApplied","getState","tmpId","ResponsiveBreakpoints","XXS","XS","S","widthM","M","widthL","widthXL","XL","widthXXL","XXL","heightS","heightM","heightL","heightXL","heightXXL","isXXS","isS","isM","isL","isXL","isXXL","maybeXXS","maybeS","maybeM","maybeL","maybeXL","maybeXXL","omit","getSectionState","getIncompleteMessage","getSectionStatus","sectionIncompleteMessage","submitted","isSectionSubmitted","viewed","isSectionViewed","started","isSectionStarted","isSectionComplete","areAllSectionsComplete","every","orderedSectionIds","getSectionStatusById","sectionStatusById","ActionFormTitle","borderTopLeftRadius","borderTopRightRadius","ActionFormBody","_ref2$contentSub","contentSub","ActionFormLayout","sub","ModelErrors","EventListener","eventName","unorderedBindings","Set","disconnect","bindingConnected","binding","bindingDisconnected","handleEvent","extendedEvent","stopImmediatePropagation_1","stopImmediatePropagation","immediatePropagationStopped","extendEvent","bindings","leftIndex","rightIndex","Dispatcher","application","eventListenerMaps","Map","eventListeners","eventListener","listeners","fetchEventListenerForBinding","handleError","detail","fetchEventListener","eventListenerMap","fetchEventListenerMapForEventTarget","createEventListener","descriptorPattern","parseEventTarget","eventTargetName","Action","descriptor","defaultEventNames","getDefaultEventNameForElement","methodName","forToken","token","descriptorString","eventNameSuffix","Binding","willBeInvokedByEvent","invokeWithEvent","controller","Element","scope","containsElement","ElementObserver","elements","mutationObserver","MutationObserver","mutations","processMutations","attributes","childList","subtree","refresh","takeRecords","matchElementsInTree","mutations_1","processMutation","processAttributeChange","attributeName","processRemovedNodes","removedNodes","processAddedNodes","addedNodes","elementAttributeChanged","matchElement","elementFromNode","processTree","elementIsActive","tree","processor","nodeType","Node","ELEMENT_NODE","isConnected","elementMatched","elementUnmatched","AttributeObserver","elementObserver","hasAttribute","querySelectorAll","elementMatchedAttribute","elementUnmatchedAttribute","elementAttributeValueChanged","del","prune","extendStatics","Multimap","valuesByKey","getValuesForKey","getKeysForValue","IndexedMultimap","keysByValue","TokenListObserver","attributeObserver","tokensByElement","tokensMatched","readTokensForElement","refreshTokensForElement","unmatchedTokens","matchedTokens","tokensUnmatched","tokens","tokenMatched","tokenUnmatched","previousTokens","currentTokens","firstDifferingIndex","tokensAreEqual","tokenString","parseTokenString","ValueListObserver","tokenListObserver","parseResultsByToken","WeakMap","valuesByTokenByElement","fetchParseResultForToken","fetchValuesByTokenForElement","elementMatchedValue","elementUnmatchedValue","parseResult","parseToken","valuesByToken","parseValueForToken","BindingObserver","bindingsByAction","valueListObserver","actionAttribute","disconnectAllActions","schema","connectAction","disconnectAction","module","controllerConstructor","bindingObserver","dispatcher","initialize","blessControllerConstructor","bless","extendWithReflect","Controller","_newTarget","Reflect","construct","Module","definition","blessDefinition","contextsByScope","connectedContexts","connectContextForScope","fetchContextForScope","disconnectContextForScope","DataMap","getFormattedKey","removeAttribute","attributeValueContainsToken","TargetSet","targetName","targetNames","getSelectorForTargetNames","findElement","findAll","findAllElements","getSelectorForTargetName","targetDescriptor","targetAttribute","Scope","targets","tail","filterElements","controllerSelector","controllerAttribute","ScopeObserver","scopesByIdentifierByElement","scopeReferenceCounts","scopesByIdentifier","fetchScopesByIdentifierForElement","referenceCount","scopeConnected","scopeDisconnected","Router","scopeObserver","modulesByIdentifier","modules","contexts","loadDefinition","unloadIdentifier","connectModule","disconnectModule","getContextForElementAndIdentifier","defaultSchema","Application","documentElement","readyState","register","load","rest","definitions","unload","identifiers","getControllerForElementAndIdentifier","defineTargetProperties","ancestors","getAncestorsForConstructor","getOwnTargetNamesForConstructor","getTargetNamesForConstructor","STRING","NUMBER","DATE","DURATION","PLACEHOLDER","PLACEHOLDER2","goToNextSectionPath","getFirebase","getFirestore","nextSectionId","goToSummaryPage","submitSection","goToEditBinPhotoPath","binId","subpath","goToEditBinPath","_getBinData","getBinData","roomId","goToEditBulkContainmentPhotoPath","bulkContainmentId","goToEditBulkContainmentPath","_ref5","getBulkContainmentData","goToEditRoomPath","_ref6","getRoomData","submitAudit","successPath","_ref7","submitPath","submitToServer","switchDevice","switchDevicePath","methodValue","alert","getHelp","email","sectionIds","comment","getHelpPath","wasteAuditHelpRequest","uploadSubcollectionImage","documentId","image","subcollection","_ref8","firebase","auditDocumentId","storagePath","uploadFile","metadataFactory","uploadRes","metadata","downloadURL","extension","extname","regex","basename","otherVersions","dimensions","fullPath","omitBy","progress","storeProgressAt","snap","deleteSubcollectionImage","_ref10","updateSubcollection","compact","deleteFile","_ref11","storageType","containerType","doc","subcollections","CustomSummaryRow","SummaryRow","notRequired","FontAwesomeIcon","faExclamationCircle","SubmitSummaryRowWithValidation","validator","validationResult","validation","createAction","StyledTableHeader","styled","TableCell","textWrap","borderRight","StyledCell","VisitBoxTable","TableContainer","Table","TableHead","TableRow","header","TableBody","goToNext","navigateFromSection","navigatedFromSectionId","updateSectionData","file","ReportLogLayout","logHeader","logContent","_ref$object","notes2","createdAt","_ref$extraLinks","extraLinks","_ref$startOpen","startOpen","stakeholderContacts","allStakeholders","flatMap","inputtedBy","_object$metadata","inputtedById","Stack","borderWidth","disableRipple","ExpandLessIcon","ExpandMoreIcon","Collapse","in","unmountOnExit","px","borderLeft","TextSmall","nameWithoutEmail","StyledTableContainer","StyledTableRow","StyledTableBody","borderTop","CustomTable","_ref$headers","getCurrentChannel","appApi","getApp","updateTicket","expectedResponse","ticket","useGetAppQuery","useUpdateTicketMutation","ticketRepliesApi","getTicket","editTicketReply","processed","addTicketReply","responseExpected","blobFiles","originalFileNames","assignedAgentId","formData","FormData","to_contact_id","clear_reminder","new_reminder_on","blobFile","originalFileName","getFailedVisitReports","getAdhocVisitRequests","getAdhocVisitRequestsByLocationAndVendor","queryObject","getStockDeliveryRequests","getRemediationCases","getServiceSuspensionRequests","getServiceTerminationRequests","getServiceResumptionRequests","getSpecChangeRequests","getVisitFrequencyChangeRequests","getLocationTickets","addTicket","useAddTicketReplyMutation","useEditTicketReplyMutation","useGetAdhocVisitRequestsByLocationAndVendorQuery","useGetLocationTicketsQuery","useAddTicketMutation","globalAdapter","GlobalAdapter","_callbackId","_callbacks","addAll","insert","applyAll","callbacks","ImagePoller","savedCallback","placeholderSrc","onLoadImage","loadingPlaceholder","onTimeout","imageLoaded","setImageLoaded","timeToLoad","setTimeToLoad","useLayoutEffect","checkImageLoaded","clearInterval","imageSrc","img","onload","onerror","propTypes","PropTypes","func","getBinsForRoom","getBinsForSection","is","updateBinData","addBin","deleteBin","uploadImage","deleteImage","getProgressNumber","getProgressPercent","getProgressColor","getHybridProperty","AnimationDisposer","_loop","_pause","_delayTimeout","_time","_isFinished","pause","id_1","stopSameAnimations","_startTime","staticOptions","childObject","updateMethod","convertedFrom","applyStaticOptions","loop","resume","setProgress","skipEvent","timeProgress","delayed","killed_1","newOptions","oldOptions","orderedSections","generalInformationSection","wasteProductionAreas","wasteProducedAndSegregation","otherWasteProduced","wasteStorageAndTraining","orderedSectionComponents","orderedSectionSummaryViews","incompleteMessageBySectionId","incompleteMessage","isStartedBySectionId","isStarted","areAnySectionStarted","careAboutSectionIds","section","sectionHasStarted","selectHasSectionStarted","titleBySectionId","SUPPORTED_EXT_TO_MIME_TYPES","pdf","docx","SUPPORTED_IMAGE_EXT_TO_MIME_TYPES","png","jpg","baseStyle","flexWrap","outline","activeStyle","acceptStyle","rejectStyle","StyledDropzone","onDrop","allowImages","accept","defaultMimeTypes","imageMimeTypes","supportedMimeTypes","_useDropzone","useDropzone","files","multiple","getRootProps","getInputProps","isDragActive","isDragAccept","isDragReject","isMobile","htmlFor","faUpload","stopPropagation","UploadProgress","_ref2$document","percentage","percentUploaded","ProgressBar","DocumentView","ext","filename","onDelete","Link","lastIndexOf","DocumentUploader","onDocumentUpload","onDocumentDelete","_ref4$allowImages","allErrors","supportedFormatText","defaultExt","imageExt","supportedExt","classNames","isRequired","SECTION_ID","TITLE","WasteManagementPolicy","onFileUpload","onFileDelete","sectionData","hasWasteManagementPolicy","policyDocument","policyOwnerName","policyLastReviewDate","Section","subtext","YesNoInput","TextInput","DateInput","_getSectionData","toCheck","blankFields","SummaryView","wasteAudit","sections","SubmitSummarySection","Checkbox","CheckboxInput","mergeErrors","emailAttr","emailAddressCheck","parseOneAddress","getErrors","HazardousWasteConsignmentNotes","hasHwcnRecords","has3YearsHwcnRecords","recentHwcnDocument","historicHwcnDocument","recentHwcnDocumentDate","historicHwcnDocumentDate","_sectionData$provided","providedByFormat","_useReducer2","useReducer","setErrors","electronic","anenta","threeYearsAgo","setFullYear","onSelect","blankValue","onValidate","scrollableYearDropdown","showYearDropdown","openToDate","getDisplayText","trueText","valuePrefix","_ref3$providedByForma","_toConsumableArray","selectFrequencyOptions","selectTrainedStaffOptions","WasteManagementTraining","doesWasteManagementTraining","hasWasteManagementTrainingRecords","trainingProvidedTo","trainingRecordSample","hasSegregationSignage","_sectionData$whenIsTr","whenIsTrainingDone","_sectionData$training","trainingMethod","atInduction","adHoc","regularly","online","onToOne","RadioInput","selectedValue","SelectWithOtherInput","isSearchable","otherPlaceholder","_ref3$whenIsTrainingD","_ref3$trainingMethod","wasteManagementPolicySection","wasteManagementTrainingSection","hazardousWasteConsignmentNotesSection","internalWasteContainmentSection","bulkWasteStorageContainmentSection","MouseCursorStyle","staggeredBaseQueryWithBailOut","retry","_callee","extraOptions","_result$error","_context","fetchBaseQuery","baseUrl","prepareHeaders","_document$querySelect","csrfToken","querySelector","fail","_x2","_x3","maxRetries","createApi","baseQuery","tagTypes","enhanceEndpoints","StyledTabs","Tabs","StyledTab","Tab","textTransform","TabPanel","SelectStorageType","_ref$title","storageTypes","modalProps","storageTypesOptions","ModalBox","buttonsDisabled","SelectListInput","onNext","onBack","arrayOf","shape","SelectContainerType","containerTypes","containerTypesOptions","borderStyle","bonderRadius","ImageView","replaceBtn","onReplace","enableReplaceBtn","setEnableReplaceBtn","loadingError","setLoadingError","faTimes","ImageUploader","onImageUpload","onImageDelete","_ref4$width","_ref4$maxWidth","_ref4$margin","SwitchDeviceAlert","SwitchDeviceButton","TakePhotoRow","photo","examplePhotoUrl","showColumns","useMediaQuery","TakeExteriorPhoto","takePhoto","exteriorPhoto","hasCorrectLabel","labelingRequired","bodyClassName","TakeBulkStorageAreaPhoto","bulkStorageAreaPhoto","ExternalBinComtainmentInfo","storageAreaDescription","isBinLocked","isAreaLocked","storageName","takeAreaPhoto","requiredFields","getRequiredFields","isTrue","TextAreaInput","isPubliclyAccessible","BulkStorageAreaInfo","TakeInteriorPhoto","interiorPhoto","checkForContaminants","bool","SelectContaminants","contaminants","allContaminants","_props$noneOption","noneOption","_props$allowOther","allowOther","noContaminants","otherContaminants","contaminantSelect","oneOfType","isOversized","textValign","baseLineRatio","handleValidate","hardInvalidate","availableWidth","alignSVGText","updateCurrentText","supportsForeignObject","_currentFormat","_prevStatus","getLineBBox","lineInfo","oldW","oldH","lines","getAttr","textPathElement","resetBBox","currentHeight","currentFormat","chunks","chunk","ignoreFormatting","currentLineHeight","firstChunk","skipTextChunks","getLineInfo","getSVGLineElement","complex","translateStyleShortcuts","tspan","getSvgElement","lineText","avgCharWidth","excessChars","addEllipsis","node_1","node_2","elementText","lastNode","lastChild","splitLines","cleanUp","restOfLine","addLineInfo","tempElement","maybeHideOversized","hideUnused","fo","foreignObject","getHTMLLineElement","setStyles","pathElement","div","wordWrap","whiteSpace","selectable","initLineCache","_sourceDataItemEvents","AdhocVisitRequestCard","request","_useBinFetch","deliveryUnits","_useContext","clearAll","onOpenRemediation","collectionUnits","isCollect","isDelivery","isCollectAndDelivery","getRequestType","getTypographyLabel","collectAndDeliver","acc","deliveryUnit","deliveryQty","quantity","newRows","collectionQuantity","visitActionId","deliveryQuantity","cancelledAt","TypoNeedInfo","AdhocCardTable","confirmedAt","Chip","ReportRequestCardLayout","ActionButtons","linkSelected","_useContext2","py","toLower","CheckOutlinedIcon","HighlightOffOutlinedIcon","linkedTicketIds","specificId","scrollIntoView","block","potentialTargets","_targetsArray","LinkIcon","TagIcon","QuantitySelector","inputValue","setInputValue","inputMode","pattern","numValue","onBlur","CollectionQuantitySelector","onChangeQuantity","onChangeCollectAll","collectAll","HeaderDetails","noOptions","visibility","AddIcon","BinTypeSelectorPopover","anchorEl","setAnchorEl","addBinHandler","headerStyle","cellStyle","boxSizing","headerCellStyle","Popover","anchorOrigin","horizontal","transformOrigin","Autocomplete","getOptionLabel","groupName","renderOption","alt","renderInput","FailureIcon","SvgIcon","ServiceIcon","HWCNIcon","InvoiceIcon","PlanIcon","onlyShowOnViewport","queue","linear","polyOut3","polyOut","sinOut","cubicIn","cubicOut","tau","period","namedColors","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","shorthandRegex","hexToRgb","parseFloat","rgbaToRgb","rgbToHex","pad2","rgbToRGBA","interpolate","rgb1","rgb2","getLightnessStep","hsl","rgbToHsl","hslToRgb","hue2rgb","q","isLight","Loader","dur","repeatCount","random","BinReportTable","failureReasonSlug","failureReasons","mode","_ref$isClient","isClient","initialStatus","initialBinGroupStatus","setStatus","fromEntries","bg","checkedStates","setCheckedStates","allTrue","allFalse","StatusChips","handleStatusChange","newStatus","newCheckedStates","binGroupCollectionStatus","CollectedRow","isChecked","onCheckboxChange","newState","currentState","updatedState","mb","StatusChip","currentStatus","Select","displayEmpty","MenuItem","reason","slug","_binGroup$binTypes","iconSx","CheckIcon","UnknownIcon","noWrap","Channel","STATUS_COLORS","visit","canceled","createCustomButton","colorKey","defaultProps","CustomButton","selected","darken","FailureButton","InfoButton","SuccessButton","VisitPlanButton","DisableButton","ConditionalButton","condition","ButtonComponent","_stops","_rotation","gradientElement","gradientStop","Tension","_tensionX","_tensionY","last","closed","wavedLine","waveLength","waveHeight","adjustWaveLength","waveLengthX","waveLengthY","halfWaveCount","Basis","_closed","NaN","x3","x4","y3","y4","pushCurve","pushPoint","palette","needInfo","TypoHaveInfo","haveInfo","TypoSuccess","_excluded3","main","TypoError","_excluded4","TypoWarning","_excluded5","warning","_excluded6","typography","TextMuted","_excluded7","TextSmallMuted","_excluded8","BoxVendorServiceArea","_ref9","_excluded9","borderGrey","ChipGroup","_ref10$leftLabel","leftLabel","_ref10$rightLabel","rightLabel","_ref10$leftColor","leftColor","_ref10$rightColor","rightColor","boxProps","FrequencyChip","_ref11$anentaColor","anentaColor","_ref11$anentaLabel","anentaLabel","_ref11$vendorColor","vendorColor","_ref11$vendorLabel","vendorLabel","ml","minSide","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomRight","cornerRadiusBottomLeft","maxcr","crtl","crtr","crbr","crbl","_ref$trueText","_ref$falseText","falseText","_ref$layout","YesNoToggle","ToggleButtonGroup","exclusive","_event","ToggleButton","spacing","pendingFrame","nextQueue","readQueue","writeQueue","idleQueue","raf","requestAnimationFrame","frameLoop","pendFrame","nextFrame","readFrame","writeFrame","whenIdle","triggerIdle","EventDispatcher","_listeners","_killed","_iterating","hasListeners","hasListenersByType","killed","amount","_removeListener","_removeExistingListener","_eachListener","_shouldDispatch","_on","TargetedEventDispatcher","sectionStatus","onSubmit","onNavigateFrom","navigateFromSectionId","room","getRoomTitle","getRoomsForSection","getOtherRoomNames","sectionRooms","otherRooms","getAuditDocument","confirmatoryStatement","_getCurrentUser","getConfirmatoryStatement","selectWasteProductionAreasState","audit","binGroupIdsForSection","selectRequiredBinGroupsForSectionId","binGroupsHash","bgSurvey","totalKg","estimatedAnnualKg","updateBgSurvey","bgSurveyId","updateAttrs","Language","_locale","en","_defaultLocale","defaultLocale","locale","getLocale","prompt","translation","translations","getTranslations","translateEmpty","translateFunc","translateAll","isDefault","keyboard","Keyboard","keyCode","eventKey","shiftKey","altKey","metaKey","formatter","TextFormatter","formatted","texts","wrapHtml","wrapSvg","styleSvgToHtml","getHtmlElement","quotedBlocks","noFormatting","chunks2","i2","chunk2","isImage","getTextFormatter","getBulkContainmentsForSection","formTypeMapping","adhoc","resumption","stock","spec","suspension","termination","MessageFormContext","vendorResponse","toContactId","setToContactId","resetToCannedResponse","vendorError","sendMessageVendor","setSendMessageVendor","setVendorError","organisationResponse","organisationError","sendMessageOrganisation","setSendMessageOrganisation","setOrganisationError","NewMessageActionForm","_ticket$assignedAgent","formUrl","reply","_useState10","assignedAgent","setAssignedAgentId","_useFetch2","useFetch","setFormData","formLoaded","_useFormServiceAction2","submitForm","submitFormResult","isSubmitError","isSubmittting","_useCannedResponses","useCannedResponses","formDefaults","responsesLoaded","isOrganisationMessageEmpty","isVendorMessageEmpty","FormType","showForm","vendorMessage","organisationMessage","Provider","replyVisitFailure","newFormArgs","prevData","ServiceActionMessageForm","borderBottomRightRadius","borderBottomLeftRadius","AgentSelect","hasError","prepareCannedResponse","pick","unwrap","formTypeLowerCase","lowerCase","foundFormType","scrollToBottom","FormSkeleton","createElementNS","setAttributeNS","desc","createTextNode","defs","elementName","implementation","hasFeature","ghostPaper","getGhostPaper","ghostDiv","ghostSvgContainer","InlineVariable","present","_ref$blank","blank","_ref$strong","strong","linkClass","linkStyle","isBoolean","isNull","defaultTheme","createTheme","successMain","body1","small","medium","tiny","xsmall","h5","darkBackgroundGrey","contrastText","outlined","textMuted","components","MuiChip","styleOverrides","variants","MuiBox","MuiButton","fontStyle","boxShadow","MuiDivider","MuiSvgIcon","colorSuccess","MuiIconButton","MuiLink","textDecoration","MuiTooltip","MuiSelect","SelectDisplayProps","MuiList","MuiBadge","badge","_useGetLocationRemedi","_request$linkedTicket","setShouldScroll","remediationData","skip","remediation","mapKeys","camelCase","isInCurrentPath","String","isInCurrentPathRemediation","remediationTicketId","isSelected","_request$replyIds","replyIds","toggleHighlightedReplies","searchParams","newHighlights","pathname","queryParam","newTabUrl","toggleHighlightedRepliesRemediation","requestedAt","reportedAt","RemediationIcon","inputedByFullName","ShowMoreDivider","toggleOpen","isOpen","ListItemButton","Divider","ExpandLess","ExpandMore","Debugger","openDebugger","setOpenDebugger","DebuggerCollapsible","StreamIcon","UpArrowIcon","DownArrowIcon","fetchAtDate","fetchDate","isMoment","fetchMoreData","formControl","colro","select","messageField","inputProps","gridItemMessage","buttonsContainer","closeButton","alignSelf","selectAgent","newReminder","_index","_visible","_hidden","_valueAnimations","_locationAnimations","animation_1","_hideDisposer","animation_2","calculated","realName","newDuration","handleDataItemCalculatedValueChange","handleInterpolationProgress","valueAnimation","event_5","workingLocation","locationAnimation","event_6","handleDataItemWorkingLocationChange","event_7","event_8","event_9","global","exports","Function","__g","USE_SYMBOL","_scale","_nonScaling","filterPrimitive","updateScale","fx","fy","_cx","_cy","_fx","_fy","NeedsToBeFilled","ConnectedWasteProductionAreas","ownProps","wasteProductionAreasData","onAddWasteProductionArea","addWasteProductionArea","onChangeBin","preamble","wideBody","wasteProductionArea","areaId","Switch","Route","render","WasteProductionArea","exact","Btn","invalidFields","wpa","isAreaIncludedInAudit","areaName","areaType","processDescription","DeliveryTable","_ref3$label","DeliveryInstruction","requestDeliveryCodes","isPlainObject","useNavigation","tabName","updatedSearchWithTab","finalUpdatedSearch","onSelectSideTab","useQuery","core","redefine","ctx","$export","own","IS_FORCED","F","IS_GLOBAL","G","IS_STATIC","IS_PROTO","IS_BIND","B","expProto","U","W","R","__e","OrderedList","closestValue","closestDifference","closestIndex","_ordering","OrderedListTemplate","SortedListTemplate","updateGradient","outerRect","StatelessModal","subtitle","onCloseModal","onOpenModal","footerContent","includeBodyPadding","bodyStyle","isUndefined","footerStyle","Bowser","msie","Title","Subtitle","Footer","Target","Modal","onRequestHide","ModalHeader","ModalClose","requiredIf","StatelessPopover","_ref$preferPlace","preferPlace","onOuterAction","onTargetClicked","onCloseClicked","restOfProps","ReactPopover","tipSize","daysOfWeek","dayOrder","getDaysOfWeekText","dayIds","abbrDays","dayId","arrayToSentence","CustomTimelineNotes","Timeline","note","TimelineItem","TimelineOppositeContent","userName","TimelineContent","getBorderColor","stakeholderName","Agent","Vendor","default","card","cardContent","WebkitFontSmoothing","processContainer","cardActions","actionButton","responseButtons","tooltipStyles","notProcessedContainer","notProcessedBox","buttonsBox","successButton","errorButton","flexCenterGap","successText","errorText","errorMain","averageHex","numbers","toInt","initialValue","subtotal","subindex","colorShade","col","amt","_col$match2","rr","gg","ORGANISATION_COLOR","VENDOR_COLOR","AGENT_COLOR","_dataSources","rangeChangeEasing","parsingStepDuration","rawDataInvalid","dataItemsInvalid","minZoomCount","_dataItems","handleDataItemAdded","handleDataItemRemoved","handleDataUserAdded","maxZoomDeclination","hasSomeValues_1","fieldName","childDataItem","_prevStartIndex","_prevEndIndex","appendDataItems","_data","counter","dataUserDataItem","state_1","getDataSource","setDataSourceEvents","loadData","targetList","ds","incremental","keepCount","_responsive","_finalStart","_finalEnd","_dataMethods","bindDataField","resetProcessedRange","_exportData","menu","handleDataUpdated","_showOnInitDisposer2","iconPosition","currentIcon","repeat","chars","choice","it","or","goToEditWasteProductionAreaPath","wasteProductionAreaId","_ref2$subpath","deleteWasteProductionArea","updateWasteProductionAreaData","CollectionTable","_ref3$deliveryAdditio","deliveryAdditional","CollectionInstruction","requestCollectionCodes","hasAtLeastOneObject","PartialCollectionTooltip","feedback","collectedBinGroupIds","_feedback$collectedBi","uncollectedBinGroupIds","_feedback$uncollected","useResponse","setResponseExpected","messageOverridden","setMessageOverridden","useCannedResponse","cannedMessage","previousMessage","editedCannedMessage","staleMessage","setStaleMessage","_prepareSubmitData","cannedResponse","setCannedResponse","setResponsesLoaded","Organisation","responseTemplateData","deboucedFormData","useDebounce","deboucedResponseTemplateData","renderUrl","cannedOrganisationResponse","AdhocVisitRequestCardDetails","deliveryRows","collectionRows","collectAndDeliveryRows","renderRequestContent","DateFormatter","_dateFormat","_inputDateFormat","_utc","_firstDayOfWeek","_months","_monthsShort","_weekdays","_weekdaysShort","_outputFormat","parseFormat","timezoneOffset","setMinutes","getMinutes","applyFormat","fullYear","getHours","getSeconds","getMilliseconds","tz","tzh","tzm","toISOString","toUTCString","inputDateFormat","parsedIndexes","indexAdjust","year3","year2","year1","getStringList","monthLong","monthShort","yearDay","weekdayLong","weekdayShort","am","hour12Base1","hourBase0","hour12Base0","hourBase1","millisecondDigits","zone","iso","resolveMonth","setMonth","resolveShortMonth","setHours","isAm","setSeconds","setMilliseconds","setTime","dir","invalidateSprite","_timezoneOffset","_list","_currentStep","_currentPass","baseColor","stepOptions","passOptions","minColors","minLightness","maxLightness","shuffle","reuse","generate","getReusableColor","tmpstep","curColor","currentColor","hueStep","hue","mods","lightness","hues","applyStepOptions","pass","Cache","_storage","owner","ownerStorage","cacheItem","touched","expired","CheckWithLabel","_ref$disabled","textStyle","_React$Component","_classCallCheck","_callSuper","_assertThisInitialized","close","_inherits","Attribute","checkSecurity","packagingRequired","ExternalBin","deleteConfirm","_ref3$storageType","contaminantNames","onEdit","onEditPhoto","containerName","confirmAlert","buttons","btn","faEdit","faTrashAlt","BulkContainment","getContaminantNames","extraData","internalWasteContainment","bins","bin","newBin","bulkWasteStorageContainment","bulkContainment","newBulkContainment","PdfModal","pdfUrl","Dialog","DialogContent","PDFObject","StockDeliveryRequestCard","Skeleton","RequestSpecChangeForm","anchorElem","setAnchorElem","serviceName","onContractServiceCodes","availableSpecs","specRows","_binTypes$serviceCode","notInContract","_ref3$name","_ref3$groupName","_ref3$possibleVisitAc","possibleVisitActions","_ref3$binGroupId","notInContractTooltipId","ReactTooltip","place","effect","newSpecs","updateQuantity","VisitActionSelector","disabledCollect","vaId","updateVisitActionId","RemoveIcon","removeSpec","currentTarget","marginY","visit_action_id","ConfirmAdhocVisitForm","visitPlanName","requestDeliveryUnits","requestCollectionUnits","requestClearAll","nextVisits","nextVisit","ShowDate","ThreeColumnFlexBox","types","ConfirmNextRoutineVisitForm","ConfirmFinalCollectionForm","RequestVisitFrequencyChangeForm","AcceptVisitFrequencyChangeForm","ConfirmVisitFrequencyChangeForm","CancelVisitFrequencyChangeForm","RequestTerminationForm","CancelTerminationForm","ConfirmTerminationForm","RequestResumptionForm","CancelResumptionForm","ConfirmResumptionForm","RequestReinstatementForm","CancelReinstatementForm","ConfirmReinstatementForm","RequestSuspensionForm","CancelSuspensionForm","ConfirmSuspensionForm","RequestAdhocVisitForm","CancelSpecChangeForm","RequestStockDeliveryForm","CancelStockDeliveryForm","ConfirmStockDeliveryForm","CancelAdhocVisitForm","ClientFeedbackOnFailedVisitReportForm","VendorFeedbackOnFailedVisitReportForm","ConfirmVisitFailureReattemptDateForm","RequestReattemptDateForm","VendorReportVisitFailureResponseForm","VendorReportVisitFailureTagForm","ClientReportVisitFailureForm","CancelRemediationForm","LogRemediationReplyForm","NoActionRequiredForm","MobilePhoneInput","_ref$allErrors","_ref$optional","optional","disabledState","PhoneInput","country","international","phone","parsePhone","_parsePhoneNumber","parsePhoneNumber","isPossible","getMethodValue","SwitchDeviceModal","userEmail","parentPath","setMethod","setEmail","setPhone","summitted","setSubmited","switchPath","faCheck","active","faMobileAlt","faEnvelope","faPaperPlane","ModalLink","linkClassName","faExternalLinkAlt","aFunction","that","AMElement","_isDisposed","removeNode","_transformString","transfromString","svgbbox","attributeValue","ns","getAttrNS","getAttributeNS","getStyle","setClass","_elements","patternUnits","backgroundFill","backgroundOpacity","patternElement","deltaAngle","totalDistance","positionA","positionB","positionAB","midPoint","JSONParser","isJSON","empty","emptyAs","parsableNumbers","parsableDates","maybeToEmpty","maybeToNumber","maybeToDate","_boundingRect","_pointTo","_verticalOrientation","pointerBaseWidth","dropShadow","drawBackground","handleVisibility","textX","textY","boundingRect","textW","textH","documentWidth","offsetWidth","offsetHeight","textWidth","textHeight","bgWidth","bgX","bgHeight","bgY","boundX1","boundX2","boundY1","boundY2","pointerX","pointerY","_animation","oldRect","_boundingContainer","updateBounds","boundingContainer","CSVParser","delimiter","skipRows","skipEmpty","useColumnNames","isCSV","getDelimiterFromData","sep","lineColums","csv","CSVToArray","cols","dataPoint","objPattern","arrData","arrMatches","strMatchedDelimiter","strMatchedValue","AddContainerBtn","pawaDataSlice","binGroupDictionary","binGroupSurveys","DarkTooltip","classes","popper","tooltipClasses","common","ACTION_COLOR","ActionMenuButton","_ticket$vendor","serviceActions","onClickHandler","_ref2$isFooterMenu","isFooterMenu","currentServices","_locationServiceVendo","transformMenuItem","groupActionsByGroupAndLabel","groupBy","menuItemsData","items","groupedActions","groupActionsByUUID","currentService","groupedByGroupAndLabel","groupActions","shortName","flattenDeep","createMenuStructure","NestedDropdown","MenuProps","elevation","ButtonProps","startIcon","statusMessages","RemediationSent","RemediationCancelled","RemediationReplyLogged","RemediationResponseAccepted","RemediationResponseRejected","RemediationLog","_request$data$notice","_request$data$reply","setOpenModal","statusMessage","serviceActionReason","underline","dateOfContractFailure","notice","noticePdfUrl","attachmentUrl","anObject","IE8_DOM_DEFINE","toPrimitive","dP","O","Attributes","SpriteState","spriteValue","svgContainers","autoResize","resizeSensor","detach","checkTransform","_container","_modal","_popups","popupTemplate","popup","dataLoader","DataLoader","sources","promises","requestOptions","all","code","processData","getParserByType","parser","getParserByData","_ref$styles","btnClassName","CheckBoxWithLabel","hint","DateSelect","calendarOpen","handleCalendarSelect","openCalendar","closeCalendar","handleClearDate","closeOnSelect","onClearDate","_this$props","selectedDate","_this$props$dateForma","blankText","strongTarget","targetColor","required","passThroughProps","modalFooter","InfiniteCalendar","displayOptions","showOverlay","dayHelpers","DayOfWeekForm","numberOfDaysToSelect","selectedDayIds","requiredDayId","daysSelected","getDaysSelected","handleInputToggle","_this2","_this$props2","numberOfDaysSelected","inputs","dayName","_this3","toggle","onSelectDayIds","DaysOfWeekSelect","timesPerWeek","linkText","DropdownSelectOption","isCurrent","isDisabled","iconClasses","oneOf","DropdownSelect","dropdownOpen","handleSelect","openDropdown","closeDropdown","disableCurrentValue","selectedValueObject","showBlankValue","allowNull","noWrapTarget","selectedValueLabel","opt","_opt$isDisabled","_opt$isSelected","_ref$target","passThrough","ListGroup","ListGroupItem","handleDelete","handleEdit","edit","_ref$showColumName","showColumName","displayItems","messages","columnName","NoWrap","Scroller","overflowY","scrollToDidMount","refs","scrollingDiv","scrollTop","scrollHeight","scrollToDidUpdate","TickCross","trueLabel","falseLabel","Radio","faDotCircle","faCircle","_ref2$radioClassName","radioClassName","selectedClassName","_ref$blankValue","displayValue","currentYear","momentDate","formatString","CustomDialog","StyledDialog","otherProps","YesNoSelect","canSelectNA","_ref2$allErrors","_ref2$optional","_ref2$canSelectNA","SummaryField","attrKey","renderValue","faBan","NumberInput","_ref$style","onMouseUp","onKeyUp","MultiLineTextInput","_ref$valueBylineName","valueBylineName","_ref$placeholderBylin","placeholderBylineName","lineName","withRouter","tabIndex","modalClassName","ModalRoute","_ref$selectValue","selectValue","faCheckSquare","faSquare","monthMap","dateConfig","caption","createRef","selectOpen","setSelectOpen","pickerValue","targetProps","TargetInput","forwardRef","faCalendarAlt","readOnly","dateInput","MobileDatePicker","confirmText","cancelText","showCaption","customHeader","onCancel","customInput","MANUAL_MODE_VALUE","manualMode","handleSelectInput","handleManualInput","inManualMode","_this$props$allErrors","_this$props$disabled","_this$props$optional","_this$props$otherLabe","otherLabel","selectProps","amendedOptions","defaultValueOption","reactSelectStyle","dropdownIndicator","provided","MANUAL_MODE_SYMBOL","MultiSelectWithOtherInput","_value$filter","_value$filter2","_len","_key","selectedOptions","handleChange","_this$state","manualInput","singleValue","optionValues","outlierOption","willBeManualMode","initialValues","isMulti","_this$state2","onAck","onDone","onSend","_ref$buttonsDisabled","faArrowLeft","faArrowRight","ListItem","Content","scrollAnchor","topRight","selectedSectionId","useParams","isMobileMode","minimized","completed","partially_complete","in_progress","to_do","titleize","statusToClassName","StatusSummary","showSubmit","allSectionsComplete","focused","setFocused","timer","onFocus","Detector","posthog","capture","unSelectedClassName","SubmitSummaryRow","SubmitSummary","afterSubmitPath","onSubmitAudit","submitWarningModal","submittedModal","_ref$allFieldsRequire","allFieldsRequired","scrollTo","onBackdropClick","elementType","visitActionName","objectOf","ServiceActionMenu","ServiceFormDrawer","onSubmitSuccess","Drawer","enableOverlay","Form","_useFetch","opts","loading","setLoading","setHasError","submitting","setSubmitting","submitIcon","buttonColor","newData","requestComponents","Adhoc","Reattempt","ReattemptVisitCard","Stock","RequestCard","componentKey","SpecificRequestComponent","RequestsCards","requests","remediations","RemediationCard","relativeTime","FailedVisitsCollapsible","typesContainerRef","reports","latestVisitFailureReports","setHasOverflow","requestsList","checkOverflow","scrollWidth","ReportsCards","VendorHeader","calendar","lastVisit","getStatusColors","lastVisitColors","nextVisitColors","faEye","telephone","objectFit","ServiceBox","openService","setOpenService","setOpenServiceMap","currentVendorLocationAccount","serviceMappings","billingHistoryUnitAverages","allCodes","availableBinGroups","noSpecs","ServiceBoxContext","xs","StatusRow","streamUrl","VlcSection","VisitFrequencyRow","HistoryIcon","Specification","TicketsList","organisationId","_useGetLocationTicket","tickets","isFetchingTickets","isFetching","_useAddTicketMutation2","isCreatingTicket","subject","setSubject","handleClose","handleAddTicket","filteredTickets","sortedTickets","AddCircleOutlineIcon","_ticket$assignedAgent2","isCurrentTicket","Card","CardContent","openedByAssociationName","openedOn","ClientStatus","VendorStatus","failedVisitReports","TimeChip","DialogTitle","RadioGroup","subjects","FormControlLabel","control","DialogActions","confirmed","awaiting_response","HourglassTopIcon","requestDate","diffInHours","TimeAgo","statusColor","new_message","no_response_required","vendorStatus","lastVendorReplyAt","organisationStatus","lastOrganisationReplyAt","SpecChangeRequestCard","SpecChangeRequestCardDetails","specificationRows","VisitFrequencyChangeRequestCard","requestedVisitPlanName","ServiceTerminationRequestCard","my","finalCollectionRequired","finalCollectionRequiredBefore","ServiceResumptionRequestCard","noVisitsExpectedAfter","collectedResults","total_failure","partial_failure","deliveredResults","colorForSlug","ReportVisitFailureCard","report","allFeedback","clientFeedback","ReportVisitFailureCardTable","reportedByStakeholderId","collectionResultSlug","deliveryResultSlug","timelineOppositeContentClasses","timelineItemClasses","visitReport","getFailureReason","feedbackSlug","visitReportSlug","collectionFailureReason","deliveryFailureReason","ResultCell","generateResultTooltipText","tableLayout","resultSlug","groupBinsByGroup","vendorServiceCodes","grouped","mappedCode","btc","useOnScreen","isIntersecting","setIntersecting","observer","IntersectionObserver","DataPointLink","messageGid","TicketLink","Header","_vendor$logoOnDark","_vendor$logo","logoOnDark","white_silhouette_header","renderCell","renderFunction","renderCollectionResult","collectionResult","renderDeliveryResult","deliveryResult","VisitBox","_visit$clientFailureF","_visit$vendorFailureF","_visit$invoiceSources","_ref3$startOpen","planSourcesMap","failureSourcesMap","serviceReportSources","isPdfModalOpen","setPdfModalOpen","currentPdfUrl","setCurrentPdfUrl","hasInvoice","hasHwcn","setSelected","handleSelection","visitPlanRows","vendorLocationCode","routeNames","receivedOn","vendorDataFailureReportContext","vendorDataFailureRows","gid","failureVisitReportContext","failureVisitReportRows","clientFailureFeedback","vendorFailureFeedback","hwcnRows","hwcnSources","derived","upperCase","serviceReportRows","borderTopWidth","invoiceSources","VendorInvoiceTable","wordBreak","overflowX","statusTooltipContentPast","statusTooltipContentFuture","createStatusDivsWithTooltips","statusTooltipContent","tooltipContent","StatusBar","statusesPastDivs","statusesFutureDivs","LocationServicesVendorBox","_useGetAllLocationRem","initialOpenState","openServiceMap","newOpenServiceMap","handleOpenServiceChange","prevState","OutstandingRequestsCollapsible","VisitDetails","_useGetLocationVisits","useGetLocationVisitsQuery","Alert","severity","loaded","setLoaded","AssumedCancelledVisits","potentialCancellationDates","selectedDates","setSelectedDates","cancelledVisitDates","_ref$disabledCollect","isCollected","defaultOption","menuPosition","valueContainer","indicatorsContainer","isOptionDisabled","_ref3$value","DeliveryUnitsTable","headerDetailsHandler","updateDeliveryQuantity","removeUnit","availableDeliveryOptions","binTypeInfo","_binTypeInfo$name","footer","ResponseExpectedToggleButton","channelResponse","_appData$agentsMap2","appData","_appData$agentsMap","selectedAgent","agentsMap","agent","VoidFormDialog","dialogOpen","voidRequestActionUrl","voidEventId","LogActionButton","_event$data","_event$data2","setDialogOpen","areaTypes","EditRoomModal","otherRoomNames","onAddNewBin","EditInternalBinModal","goToPath","selectType","exampleExteriorPhotoUrl","exampleInteriorPhotoUrl","Redirect","IternalBin","CustomToggle","Room","roomProps","_roomProps$name","onBinEdit","onBinPhotoEdit","onBinDelete","someBins","InternalBin","Dropdown","Toggle","as","faEllipsisV","Menu","Item","faTrash","IternalBinSummary","_ref$storageType","InternalWasteContainment","onAddRoom","rooms","requiredRooms","completedRooms","completedBins","InternalBinSummary","ExternalBinSummary","BulkContainmentSummary","EditBulkStorageModal","bulkContainmentData","exampleBulkInternalPhotoUrl","updateBulkContainmentData","EditExternalBinModal","hasContaminants","BulkWasteStorageContainment","onAddNewBulkContainment","onBulkContainmentEdit","onBulkContainmentPhotoEdit","onBulkContainmentDelete","hasExternalContainment","bulkContainments","hasBulkInternalWasteContainment","EditBulkContainmentModal","deleteBulkContainment","needToAddRecords","subFieldstoCheck","completedBulkContainments","groupedBins","groupedBulkContainments","VisitBoxMemo","ListView","fetchInit","fetchMore","scrollRef","selectedRef","todayRef","previousScrollPosition","setPreviousScrollPosition","collections","_scrollRef$current","checkContentFillsContainer","onScroll","_scrollRef$current2","scrolledPercentage","sorted","hasTodayService","currentDate","gapText","daysGap","weeksGap","isToday","visitsContainer","VisitActivityTab","appTab","calendarView","setCalendarView","newCalendarView","CalendarMonthIcon","ViewListIcon","Calendar","onDayClick","selectedDay","dataReducer","LocationUpdateModal","locationData","submited","setSubmit","_setRequestData","setRequestData","postcode","postTown","addressLine1","addressLine2","addressLine3","FoundMistake","fullName","jobTitle","hasKnowledgeOfHtm0701","hasKnowledgeOfEpr507","clinicalEmployeeCount","_sectionData$location","locationUpdateModalPath","goToLocationUpdateModal","_ref5$location","address","ServiceSuspensionRequestCardDetails","immediateEffectText","withImmediateEffect","noVisitsExpectedAfterText","reasonName","ServiceSuspensionRequestCard","BillingDot","_ref$color","BillingDotHole","BillingInfo","closedAccount","locationVendorAccountUuids","isTerminatedThisMonth","monthClosed","closedOn","light","chipStyles","ReplyStatus","_useGetAllStaffQuery","useGetAllStaffQuery","usersById","processedEvents","processedByDefault","ReplyCard","toggleOpenForm","setOpenFormUrl","tagActions","responseActions","isNewMessage","_getChannelColors","shadow","getChannelColors","ReplyCardHeader","ReplyCardContent","CardActions","ReplyIcon","event_data","LogComponent","eventData","createDesc","SRC","TO_STRING","$toString","TPL","inspectSource","safe","showCurtain","DurationFormatter","_negativeBase","_unitValues","_unitAliases","durationFormat","details","zero","dirs","partFormat","absolute","tstamp","toTimeStamp","toTimeUnit","ints","outputFormat","maxUnit","durationFormats","currentUnit","ms","_durationFormat","_durationFormats","Validatable","_invalid","DataParser","numberFields","dateFields","_prevStart","_prevEnd","_skipRangeEvents","updateWhileMoving","_previousStart","dispatchRangeChange","hideGrips","updateExtremes","handleBgHit","makeBusy","spritePoint","thumbX","_thumbAnimation","thumbY","makeUnbusy","_thumb","_unbusyTimeout","stopAnimations","_zoomAnimation","makeUnbusyReal","_usingGrip","_previousEnd","innerWidth_1","innerHeight_1","getPosition","__end","_startGrip","processGrip","_endGrip","handleGripDrag","cursorDownStyle","handleThumbPosition","handleDoubleClick","zoomAnimation","innerWidth_2","innerHeight_2","_hideGrips","_overDisposer","_outDisposer","_twaved","_rwaved","_bwaved","_lwaved","td","rd","bd","ld","LightenFilter","Popup","_IOs","_content","_title","_classPrefix","_defaultStyles","_showCurtain","_draggable","_align","_verticalAlign","_shift","_tempShift","_readerTitle","_closable","_cssLoaded","_fitTo","_sized","wrapper","curtain","positionElement","releasePointers","forceResize","toStyle","verticalAlign","setupDragging","createContentElement","getClassNames","wrapperClass","classPrefix","titleClass","contentClass","curtainClass","closeClass","disablePointers","defaultStyles","loadDefaultCSS","createCurtainElement","applyEvents","applyReaderSettings","_left","_right","_top","_bottom","prefix","_spriteInteractionsEnabled","classPrefixRaw","getPoints","circleLength","halfWaveHeight","halfWaveLength","angle1","angle2","isBlob","responseType","XMLHttpRequest","blob","responseText","getResponseHeader","withCredentials","requestHeaders","send","isArrayIter","toLength","getIterFn","BREAK","RETURN","iterable","ITERATOR","iterFn","SpriteEventDispatcher","_interactionEvents","_dispatchSpriteEvent","_dispatchSpritePointEvent","_addInteractionObjectEvent","InteractionObjectEventDispatcher","_domEvents","_addDOMEvent","callback_1","_dispatchKeyboardEvent","Ellipse","ResizeButton","UK_PHONE_NUMBER_VALIDATION_REGEXP","attrs","sicCodes","premisesName","collectionAddress","_sectionData$primaryC","primaryContact","_sectionData$primaryC2","_sectionData$primaryC3","sicCode","isSicCodePreset","premisesType","doesProduceRadioactiveWaste","ConnectedGeneralInformation","_getSectionData$prima","_getSectionData$prima2","_ref3$primaryContact","_ref3$primaryContact2","YES_NO_QUESTIONS","isInternalWasteBinsColorCodedPerSMHW","isWasteSegregatedAndSecure","isAnyAnatomicalWasteStoredUnderTemperatureControl","hasWasteMgmtPolicy","canProvideCopyOfWasteMgmtPolicy","doesTrainStaffInWasteHandling","doesTrainStaffInWasteSegregation","doesKeepHazardousWasteConsignmentNotesOnFile","didAskStaffQuestionsDuringThisAudit","doesHavePosterOrTrainingMaterialOnDisplay","canProvideACopyOfEnvironmentalMgmtSystem","ConnectedWasteStorageAndTraining","docRequirementText","isDocInProgress","hasFinalisedDocAudit","finalizedWasteAudit","auditProcedureAndPracticeDescription","auditRegimesDescription","yesNoQuestionKey","reportFinalizedOn","reportFilename","wasteStorageAndTrainingData","serviceStatus","restartDate","stopDate","humanize","getColor","running","terminated","suspended","suspending","terminating","resuming","reinstating","ServiceMappingInfo","vendorAccount","vendorLocationAccounts","oldVLA","openVLC","vendorAccountClosedMonthName","VendorAccountLink","transitionOn","wrongCommissioner","vla","VlcTable","lastDataReceivedOn","firstBilledOn","lastBilledOn","FooterDrawer","openFormUrl","anchor","PaperProps","MessageSection","_appData$cannedRespon2","defaultValueContactId","backgroundForm","handleSelectedResponse","textAreaRef","_stakeholderContacts$2","FormControl","labelId","_stakeholderContacts$","contact","_appData$cannedRespon","cannedResponsesMap","inputRef","ActionSection","handleFileUpload","setFiles","acceptedFiles","newFiles","prevFiles","ResponseFormDatePicker","dropzone","fileName","currentFiles","DeleteIcon","TaggingForm","formSubmitText","FailedVisitReportLog","_report$data","_report$data2","isVendorFeedback","isClientFeedback","failureDate","AREA_TYPES_LABEL_OPTIONS","PROCESS_DESCRIPTION_OPTIONS","EditWPAPage1","areaData","EditWPAPage2","EditWasteProductionAreaModal","_props$areaData","isWPAComplete","ConnectedWasteProductionArea","bitmap","defined","toInteger","$at","iterated","_t","IObject","def","TAG","stat","cof","ARG","T","tryGet","callee","SVGDefaults","Group","childNode","InteractionObject","_clickable","_contextMenuDisabled","_hoverable","_trackable","_swipeable","_resizable","_wheelable","_inert","_isHover","_isHoverByTouch","_isDown","_isFocused","_isTouchProtected","_inertiaOptions","_hitOptions","_hoverOptions","_swipeOptions","_keyboardOptions","_cursorOptions","isHoverByTouch","_overPointers","_downPointers","_focusable","_originalPosition","_originalScale","_originalAngle","InteractionKeyboardObject","keyboardEvent","_startedOn","speed","accelleration","accellerationDelay","accelleratedMs","accellerationFactor","Inertia","handleMove","NumberFormatter","_numberFormat","modSpacing","thousands","interval","suffix","a_1","applyPrefix","bytePrefixes","a_2","smallNumberPrefixes","bigNumberPrefixes","toExponential","ip","intsr","decs","prefixes","newvalue","_bigNumberPrefixes","_smallNumberPrefixes","_bytePrefixes","pdfmakePromise","fontFamilySrcRegexp","loadStylesheet","eachStylesheet","topUrl","CSSRule","IMPORT_RULE","url_1","eachStylesheets","styleSheets","Export","_formatOptions","_extraSprites","_dynamicDataFields","_removedObjects","_hiddenObjects","_objectsAlreadyHidden","_filePrefix","useWebFonts","useRetina","useSimplifiedExport","timeoutDelay","quality","imageFormat","addURL","indent","useLocale","addColumnNames","printMethod","formatOptions","_menu","branch","unsupported","typeSupported","_disablePointers","_releasePointers","obj","supported","_hasData","print","_getFunction","getImage","getSVG","getPDF","getExcel","getCSV","getJSON","getPrint","handleCustom","showPreloader","hideTimeout","_timeoutTimeout","showTimeout","hideNonExportableSprites","restoreNonExportableSprites","hidePreloader","download","filePrefix","getFontFamilies","DOMURL","blobs","getDOMURL","FONT_FACE_RULE","cssText_1","cssText","urls","after","fullUrl","url_2","msSaveOrOpenBlob","createObjectURL","FileReader","readAsDataURL","includeExtras","prehidden","canvas","getFormatOptions","simplifiedImageExport","getCanvas","addExtras","toDataURL","getContentType","disposeCanvas","getImageAdvanced","advanced","middleLeft_1","middleTop_1","middleRight_1","middleBottom_1","totalWidth_1","totalHeight_1","extras","newCanvas","ctx_1","right_1","bottom_1","extraSprites","extraSprite","extraCanvas","extraWidth","extraHeight","getCanvasAdvanced","getDisposableCanvas","getContext","findBackgroundColor","fillStyle","fillRect","drawImage","pixelRatio","setTransform","fonts","imagesToDataURI","prepForeignObjects","normalizeSVG","serializeElement","Blob","loadNewImage","revokeObjectURL","restoreRemovedObjects","canvg","useCORS","ignoreDimensions","scaleWidth","scaleHeight","images","svgToDataURI","imageToDataURI","objects","temporarilyRemoveObject","keepTainted","charset","btoa","crossOrigin","currentHref","onabort","URL","webkitURL","dimParams","styleParams","XMLSerializer","serializeToString","pdfmake","defaultMargins","pageSize","pageOrientation","pageMargins","bold","fit","getPageSizeFit","createPdf","getDataUrl","margins","newMargins","fitSize","A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","A10","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","B10","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","C10","RA0","RA1","RA2","RA3","RA4","SRA0","SRA1","SRA2","SRA3","SRA4","EXECUTIVE","FOLIO","LEGAL","LETTER","TABLOID","XLSX","wbOptions","sheetName","wb","xlsx","bookType","bookSST","normalizeExcelSheetName","SheetNames","Sheets","getExcelRow","utils","aoa_to_sheet","write","convertEmptyValue","convertToDateOrDuration","getCSVRow","forceQuotes","sourceData","newValue_1","keepAsDate","isDateField","isDurationField","useTimestamps","blob_1","decoded","blob_2","url_3","charCode","url_4","iframe","idoc","msBlobDownloadSupport","decodeURIComponent","msSaveBlob","atob","charCodeAt","Uint8Array","blobDownloadSupport","click","linkDownloadSupport","legacyIE","showModal","contentDocument","execCommand","downloadSupport","getElementsByTagName","printViaCSS","printViaIframe","scroll","originalTitle","clipPath","MSStream","contentWindow","_dataFields","generateDataFields","_dateFields","_durationFields","durationFields","_backgroundColor","hideModal","_canvg","vfs_fonts","pdfMake","vfs","_pdfmake","_xlsx","setFormatOptions","DataSource","_requestOptions","_incremental","_incrementalParams","_keepCount","lastLoad","disableCache","timestampUrl","_url","addUrlParams","incrementalParams","_parser","_reloadFrequency","_reloadDisposer","_reloadTimeout","reloadFrequency","PointedRectangle","cr","stemX","stemY","bwh","lineT","lineR","lineB","lineL","d2","arcTR","arcBR","arcBL","arcTL","PointedShape","DropShadowFilter","feOffset","operator","feMerge","topSide","bottomSide","ts","bs","ls","rs","horizontalNeck","hn","verticalNeck","vn","topRadius","bodyFillModifier","lightnesses","radiusBase","ColorModifier","sideBack","sideBottom","sideLeft","sideRight","sideTop","sideFront","ah","bh","dh","colorStr","filter2","filter3","filter4","filter5","edge","sideA","sideB","edgeFill","edgePath","mangle","pp","ExportMenu","closeDelay","closeOnClick","_menuTag","_itemTag","_labelTag","_ignoreNextClose","_items","getMenuItemClass","createMenuElement","drawBranch","menuElement","moveSelection","ascendants","createItemElement","createLabelElement","readerLabel","getReaderLabel","typeClickable","submenu_1","getSubMenu","selectBranch","setFocus","delayUnselectBranch","local_level","submenu","menuTag","itemTag","labelTag","hasSubMenu","newPrefix","colorSet","_currentSelection","setBlur","closeTimeout","ascendant","unselectBranch","simple","newSelection","getPrevSibling","getNextSibling","getParentItem","getSiblings","siblings","isSafari","isInternetExplorer","GradientModifier","brightnesses","offsets","_lightnesses","_brightnesses","_opacities","_offsets","brightness","MapAndStreetview","createReactClass","getInitialState","panorama","center","settings","getDefaultProps","latitude","longitude","mapZoom","panoramaLatitude","panoramaLongitude","panoramaZoom","panoramaHeading","panoramaPitch","gmapsApiKey","changedButton","updateNewSettings","panoramaVisible","panoramaNotStored","editable","componentDidMount","mapLoaded","mapCenter","google","maps","LatLng","ReactDOM","findDOMNode","mapTypeControl","Marker","markerIcon","Vector","default_set","panoramaCenter","validPanorama","StreetViewPanorama","addressControl","linksControl","imageDateControl","panControl","enableCloseButton","zoomControlOptions","ZoomControlStyle","SMALL","setOptions","pov","heading","pitch","StreetViewService","getPanoramaByLocation","StreetViewStatus","OK","latLng","setPov","tiles","originHeading","originPitch","setStreetView","addListener","setNewSettings","newLatLng","setCenter","newSettings","lng","lat","getZoom","pos","getPov","isEqual","updateHandler","MapAndStreetviewApp","handleUpdateLocation","updatePath","MultiMapApp","markerCluster","gmaps_api_key","gmaps_sensor","cluster","cloneDeep","firstPoint","mapOptions","mapTypeId","MapTypeId","ROADMAP","addMarkers","closeInfoWindows","detachCluster","setMap","addMarker","setZoom","fitToBounds","attachCluster","vector","handelMarkerClick","clusterColor","clusterMarkerColor","MarkerClusterer","gridSize","clusters","textColor","textSize","latLngs","bounds","LatLngBounds","fitBounds","infoWindow","InfoWindow","panoramaImage","web","disableAutoPan","town","raw","setContent","PolygonsMapApp","polygons","addPolygons","polyMap","addPolygon","polygonData","paths","polygon","fillColor","hoverFillColor","hoverColor","strokeColor","strokeWeight","vectorID","vectorName","toHighlight","polygonsHash","connector","fetchSpecific","_useNavigation","detailsDate","sideTab","currentSearch","SideBarAndy","SideBar","App","defaultTicket","setCurrentTicketId","vendorFromTicket","_useDrawer","useDrawer","tabMap","otherTickets","visitDetails","showFooterButtons","setShowFooterButtons","setAppTab","_useState12","showOverview","setShowOverview","_useState14","_useState16","_useState18","_useState20","_useState22","openRemediation","setOpenRemediation","_useState24","_useState26","_useState28","_useState30","_useState32","shouldScroll","isGloballyLoading","sortedLocationServiceVendors","toPairs","handleButtonChange","_React$useState2","infoAreaHTML","setInfoAreaHTML","ticketMatch","newPathname","newTicketId","htmlString","onCloseRemediation","class","externalCode","lineHeight","dangerouslySetInnerHTML","__html","TicketTab","ButtonGroup","_ticket$vendor2","locationServiceVendorData","markProcessed","setCurrentSpecificationVersion","specificationVersionUuid","setCurrentProductSubscriptionVersion","productSubscriptionUuid","selectCollectionDate","collectionGroupUuid","collectionPlanSlug","selectCollectionDayIds","collectionDayIds","cloneNextRoutineCollection","newCollectionGroupUuid","editDateForCollectionGroup","requestedNewCollectionDateAt","selectCollectionGroup","collectionPlan","selectSpecQuantity","binTypeId","removeSpecBin","addBinToCollectionGroup","specificationUuid","addSpecification","newSpecification","initializeSpecification","newSpecificationUuid","setConfirmedByVendorOn","confirmedByVendorOn","destroySpecification","selectProductQuantity","productTypeId","addProduct","removeProduct","cloneSubscription","cloneSubscriptionUuid","newSubscriptionUuid","setDeliveryDate","deliveryDate","setStartDate","confirmedToStartDate","setNoDeliveryOption","noDelivery","terminateService","setFinalCollectionDate","finalCollectionDate","setNoFinalCollection","noFinalCollection","markForDestroy","cancelTerminateService","generateInvoice","newInstruction","getNextRoutineCollection","issues","nextRoutineCollections","getNextRoutineCollections","collectionGroups","cg","getSpecificationByCollectionGroupUuid","findKey","specification","collectionGroup","getSpecification","getCurrentSpecification","currentSpecificationVersionUuid","getUnitSpecifications","flatUnitSpecifications","unitSpecifications","getProductSubscription","productSubscriptions","getCurrentProductSubscription","currentProductSubscriptionVersionUuid","getNewServiceIssue","newServiceIssues","getTerminateServiceIssue","terminateServiceIssue","terminateServiceIssues","_destroy","getInstructionsForServiceId","_getService","vendorServiceId","supplyProductInstructions","getSupplyProductInstruction","getNewServiceSupplyInstruction","newServiceIssue","getNotNewServiceSupplyInstructions","getFixedCollectionTime","fixedCollectionTimes","isServiceProcessed","isServiceX","isServiceResolved","getServiceIssueComponents","isServiceClosed","serviceIssues","getSalesUnitPricesByServiceCode","salesPricesByServiceCode","markServiceProcessed","newServiceIssuesActions","newServiceSupplyInstruction","supplyProductInstructionsActions","terminateServiceIssuesActions","fixedCollectionTimesActions","specificationsActions","nextRoutineCollectionsActions","productSubscription","productSubscriptionsActions","changeSpecification","cloneSpecificationUuid","currentSpecification","newUuid","getSpecifications","_specifications$clone","newCollectionGroups","collectionPlanSlugRequired","hasRoutineCollections","newUnitSpecifications","currentQuantity","currentCollectionPlanSlug","resolved","cancelChangeSpecification","_getCurrentSpecificat","newBooking","setClearAllPolicy","selectBinQuantity","removeBin","setRequestDate","requestedOn","newDelivery","setMissed","missed","newReport","updateReport","reportId","newAttribs","markForDestruction","updateCollectionDate","editCollectionDatesForService","reportMissedCollection","missedCollectionReportsActions","bookAdhocCollection","newBookingForService","supplyProducts","newInstructionForService","newBinDelivery","newDeliveryForService","changeProductSubscription","currentProductSubscription","ServiceHolder","emergencyCollectionBtn","hasWrongCommissioner","menuItems","_ref$serviceActionMen","serviceActionMenuProps","vendorService","onEmergencyCollection","requestEmergencyCollectionPath","authorityName","vendorName","OrderLink","IssueBox","_ref$minimized","_ref$historical","historical","handleToggleMinimized","toggleMinimized","titleClasses","IssueBoxSection","NewServiceDeliveryOption","PlanSelect","allowedCollectionPlanSlugs","_ref$disableCurrentVa","allCollectionPlansBySlug","selectedSlug","currentSlug","onSelectPlan","selectableCollectionPlans","plan","isRequire","collectionPlans","bySlug","CollectionPlanSelect","getCollectionPlan","getBinTypeIdsThatCanBeContainedByIds","binTypeIds","canContainBinGroupIds","getBinType","canBeContainedIds","canContainBins","CollectionPlan","UnitSpecification","fullname","UnitSpecificationList","unitSpec","BinQuantitySelector","handleDestroy","onDestroy","helpText","smallUrl","binGroupName","EditUnitSpecifications","onRemove","sortedUnitSpecifications","BinSelector","availableBinTypeIds","selectedBinTypeIds","onAddBinType","salesUnitPricesByServiceCode","sortedAvailableBinTypeIds","availableBinTypeId","binSelectors","salesPrice","largeGrayUrl","largeUrl","EditSpecificationModal","handleOpen","onRemoveBinType","collectionGroupEdits","unitSpecs","binTypeIdToDefaultGroup","defaultBinTypeIdsByGroup","groupedBinTypeIds","defaultGroup","defaultGroupToCollectionGroupUuid","addSpecBin","NewServiceDeliveryDate","dateSelectSubtitle","SpecificationConfirmDate","UnknownSpecification","CollectionDaysSelect","nextRoutineCollection","selectedDateDayOfWeekId","dayOfWeekIds","CollectionDays","FinalCollectionDate","lastCollectionDate","dateAfterLastCollection","minSelectDate","minDate","FinalCollectionOption","NextCollectionDateSelect","_ref$strongTarget","allowDelete","NextCollectionDate","warningIcon","nextCollectionOutOfSync","tootipId","inputtedAt","inputtedVia","markedOutOfSyncAt","MarkProcessedBtn","getReportsForServiceId","missedCollectionReports","Timestamps","createdBy","createdViaTicketId","createdText","viaText","ticketSubject","Open","missedDate","reasonId","disputeCharge","retryCollection","retryDate","reportedOn","onSelectMissedReasonId","onSelectMissedDate","onSelectRetryDate","onChangeDisputeCharge","onSelectStakeholderId","onChangeRetryCollection","minCollectionInterval","onMarkProcessed","onSelectReportedOn","allReasons","onChangeCreditClient","restProps","fourMonthsAgo","sevenDaysFromMissedOrToday","missedDateSelect","mindate","retryDateSelect","reasonOptions","resonSelector","stakeholderOptions","stakeholderSelect","reportedOnSelect","disputeOptions","disputeChargeSelect","Closed","missedDateFormatted","reportedOnFormatted","retryDateFormatted","reasonText","stakeholderText","MissedCollectionReport","missedCollectionReasons","stakeholders","History","childrenDivClass","MissedCollectionReportList","getReport","sortedList","HistoryList","getAdhocCollectionBooking","adhocCollectionBookings","getAdhocCollectionBookingsForServiceId","EditAdhocCollectionBookingModal","onAdd","booking","AdhocCollectionBookingDate","AdhocCollectionBookingRequestDate","onMarkForDestroy","onSetClearAllPolicy","clearAllPolicySelector","editModalTarget","AdhocCollectionBooking","AdhocCollectionBookingList","getBooking","getEmergencyCollectionBookings","serviceIds","getServiceIds","emergencyCollectionBookings","failedServiceId","getEmergencyCollectionRequests","EmergencyCollectionRequest","EmergencyCollectionRequestList","emergencyCollectionRequests","getRequest","getBinDelivery","binDeliveries","getBinDeliveriesForServiceId","EditBinDeliveryModal","delivery","canBeContainedBinTypeIds","BinDeliveryDate","BinDeliveryRequestDate","BinDeliveryMissed","_ref$editable","editButton","binDelivery","BinDelivery","BinDeliveryList","getDelivery","InvoiceLink","referenceNumber","grossTotal","paid","SupplyProductInvoiceLink","invoices","prepaid","onGenerateInvoice","invoice","ProductSpecification","productType","productTypes","ProductSpecificationList","productSpecifications","productSpec","ProductQuantitySelector","productGroupName","EditProductSpecifications","ProductSelector","availableProductTypeIds","selectedProductTypeIds","onAddProductType","productSelectors","availableProductTypeId","EditSupplyProductInstructionModal","instruction","SupplyProductConfirmDate","EditFixedCollectionTime","fixedCollectionTime","currentlyEditing","_$pickBy","_$pickBy$website","website","_$pickBy$freeText","freeText","toggleEditing","onUpdate","targetPresent","inputText","toggleText","newAttrib","FixedCollectionTime","currentlyViewing","SupplyProductInstruction","SupplyProductInstructionList","NewServiceIssue","UpdateCollectionDate","SpecificationChange","onCancelChangeSpec","TerminateServiceIssue","onCancelTermination","NhsCommissionedService","serviceNode","pull","NhsEmergencyService","Covid19VaccinationService","NeedleExchangeService","RegularGeneralAndRecyclingService","EditProductSubscriptionModal","_getProductSubscripti","ProductSubscriptionConfirmDate","VendorConfirmedOnDate","allConfirmedByVendorOn","handleDateChange","SpecificationAndSubscriptionChange","SubscriptionChange","WashroomService","NewServiceStartDate","restOfSupplyProductInstructions","PrePaidGeneralAndRecyclingService","RegularClinicalService","OnDemandClinicalService","RegularConfidentialService","OnDemandConfidentialService","Service","ServiceType","getGeneralIssues","generalIssues","markResolved","newIssue","updateIssue","newAttr","isModalOpen","isNew","handleOpenModal","handleCloseModal","handleInputChange","_createClass","problemDetails","solutionDetails","headline","onMarkResolved","displayTitle","problemDetailsDisplay","solutionDetailsDisplay","_React$Component2","resolvedAt","GeneralIssue","GeneralIssueList","onNew","getGeneralIssue","generalIssue","openList","closedList","EditEmergencyCollectionBookingModal","getEmergencyCollectionBooking","statusOptions","onChangeRequestDate","onChangeStatus","onChangeDate","statusSelector","bookingDateSelect","requestDateSelect","isSameOrBefore","EmergencyCollectionBooking","EmergencyCollectionBookingList","submitStart","submitSuccess","submitError","serverError","updateApiFromServer","updateIssuesFromServer","updateStateFromServerData","requestEmergencyCollection","unitSpecificationsAttributes","getCurrentUnitSpecifications","emergencyCollectionBooking","redirect_to","IssueList","promptUnsavedChange","unsaved","onClickSave","scrollerHeight","vendorServicesList","isUnsaved","leaveMessage","onbeforeunload","saved","location_issues","isBefore","collectionDayId","toClone","modifiedSpecifications","groupKey","_ref8$collectionGroup","newSpecifications","binKey","binSpecKey","vendorAccountId","_productSubscriptions","newArgs","reducerArgs","newApiState","setUnsaved","servicesActions","adhocCollectionBookingsActions","generalIssuesActions","binDeliveriesActions","emergencyCollectionBookingsActions","issuesUpdateReducer","apiActions","newIssues","issuesReducer","reduceReducers","combineReducers","servicesReducer","nextRoutineCollectionsReducer","specificationsReducer","newServiceIssuesReducer","missedCollectionReportsReducer","supplyProductInstructionsReducer","productSubscriptionsReducer","fixedCollectionTimesReducer","adhocCollectionBookingsReducer","emergencyCollectionBookingsReducer","generalIssuesReducer","terminateServiceIssuesReducer","binDeliveriesReducer","apiReducer","createStore","composeWithDevTools","applyMiddleware","thunk","RootNode","getLineItem","lineItems","getLineItems","getLineItemsForLocation","getUnmatchedLineItemsByLocationDate","createSelector","getLineItemsByAgreement","agreementId","getAgreement","agreements","getAgreements","getAgreementsForLocation","getAgreementsByLocationDate","getNewAgreementForm","listenKeyDown","unListenKeyDown","keyDownEvent","selectLocationFilter","toggleLocationOpen","setDisputeFilter","setManualFilter","setUnmatchedFilter","setMatchMode","setMatchModeLocationId","getSalesLedgerItem","salesLedgerItems","getSalesLedgerItems","getSalesLedgerItemsByAgreement","getFailureReports","failureReports","getFailureReportsByLocationDate","getUnmatchedFailureReportIds","matchedIds","allIds","getHwcnsByLocationDate","hwcns","getServicesById","getServicesForLocation","getServicesByLocationId","servicesById","collectionPlanName","keyBy","getSpecificationForm","getDisputeLedgerItems","disputeLedgerItems","getDisputeLedgerItemsById","getDisputeLedgerItemsByLineItem","getDisputeLedgerItemsForLineItem","lineItemId","getVendorInvoice","vendorInvoice","getReconcilePolicyName","reconcilePolicyName","getMatchPolicyName","matchPolicyName","getVendorId","isBilledAccount","billedAccount","getLocation","getActivityDataForLocation","getActivityDataByLocationDate","getActivityDatesForLocation","dateData","agreementsByLocationDate","unmatchedLineItemsByLocationDate","failureReportsByLocationDate","hwcnsByLocationDate","unmatchedFailureReportIds","lineItemsByAgreement","failureReportsById","disputeLedgerItemsByLineItem","salesLedgerItemsByAgreement","locationIds","activityData","locationHasHwcns","without","allUnmatchedLineItems","unmatchedFailureReports","_$partition2","validatedManuallyLineItems","unmatchedLineItems","agreement","invoiceLineItems","vendorInvoiceId","disputesByItem","disputeTotalCents","sumBy","lineTotalCents","inDisputeNetTotalCents","creditedNetTotalCents","ignoredDisputeTotalCents","hasCoverageIssue","inDataCoverage","failureReport","failureReportId","allValidated","validatedManuallyLineItemsWithDisputes","getActivityDataForAgreement","_getAgreement","getKeyDownListener","getLocationFilter","inMatchMode","matchMode","getMatchModeNavLocationIds","currentLocationId","matchModeLocationId","getMatchModeLocationId","unmatchedLocationIds","getUnmatchedLocationIds","matchModeList","getMatchModeList","allLocationIds","matchedLocationIds","nextLocationId","backLocationId","matchedCount","totalCount","agreementInMoveDateMode","agreementIdBeingMoved","lineItemInMoveDateMode","lineItemIdBeingMoved","salesItemInMoveDateMode","salesLedgerItemId","salesLedgerItemIdBeingMoved","locationSectionOpen","unmatchedFilterName","getFilteredLocations","activityDataByLocationDate","disputeLedgerItemFilterAttrs","manualItemFilterAttrs","filterFuncs","_ref12","_ref13","_ref14","_ref15","_ref16","_ref17","_ref18","_ref19","_ref20","_ref21","_ref22","_ref23","_ref24","_ref25","_ref26","_ref27","hasAgreements","_ref28","hasManual","_ref29","lineItemFilter","lineItemMatcher","disputeItemReason","_ref30","_ref31","matchesLineItem","_ref32","_ref33","_ref34","agreementIds","getLocationFilterCounts","_ref35","_ref36","getCurrentFilterResults","fromPairs","getStats","stats","ids","updatedLineItems","updateFromServer","updatedItems","loadSuccess","loadedLineItems","updatedAgreements","setSpecQuantity","setReconcilePolicy","destroy","loadedAgreements","setAgreementForm","otherArgs","closeAgreementForm","setSpecAgreementForm","submitStartAgreementForm","stateLoaded","getPathAndMethod","basePath","throttle","require","fasterThrottle","validateAgreements","validatePath","isLondonBusinessHours","agreement_ids","disputeActions","lineItemActions","debounceAlert","debounce","submitAgreements","agreementsPath","getAgreementsPendingSubmit","_getPathAndMethod2","specificationsAttributes","pair","toSpecificationAttributes","agreementToPost","matchLineItems","selectServiceAgreementForm","submitAgreementForm","submitAgreement","agreedSpecifications","_pair","submitIgnoreDisputes","ignoreReason","disputeLedgerItemsPath","disputeLedgerItem","ignore","locationsMatchStart","locationsMatchEnd","loadedLocations","matchPath","locationActions","location_id","agreementActions","submitLineItems","lineItemsPath","getLineItemsPendingSubmit","lineItem","vendor_invoice_line_item","resetLineItems","disputeLedgerItemIds","deleteDisputes","vendorInvoiceLineItem","validatedManually","acceptReason","MatchBtn","onMatch","unMatchdCount","showTotal","lineItemsByLocationId","countBy","unMatchedCount","getMatchCount","getVendorService","vendorServices","getUnitPricesForDate","purchasePriceSchedules","pricingSchedule","validFrom","validUntil","keyToDate","stepDates","getStepDate","keyToNumber","numSteps","gotDate","sortedDates","dateIndex","setAgreementId","setSpecificationForm","closeSpecificationForm","setCurrentSpecQuantity","setCurrentSpecFrequency","updatedSpecifications","enterEditCurrentSpecQuantityMode","preventDefaultKeys","enterMoveAgreementDateMode","enterEditSpecQuantityMode","modeKeyDownHandlers","allDates","locationAgreements","currentAgreementIndex","nextAgreement","_getMatchModeNavLocat","goToLocationId","startAgreement","selectUnMatchedAgreements","currentLocationIndex","nextLocationAgreements","newQuantity","_getActivityDataForAg","initialSpecifications","lineItemsByCode","currentServiceCodeIndex","nextServiceCode","_getLineItem","steps","nextStep","stepAgreementIds","newAgreementId","salesLedgerItemActions","_getAgreement4","specificationId","currentSpecificationId","currentUnitSpecifications","formUnitSpecifications","specificationActions","handleKeyDownEvent","_ref4$listener","handler","MoveLineItemBtn","initialDate","handleMakeActive","isoDateFormat","formattedDate","initialDateRender","renderedformattedDate","SpecQuantity","inEditMode","Td","highlight","_ref$highlightClass","highlightClass","DisputeBtn","handleSave","newDisputes","totalPriceCents","unitPriceCents","returnItems","calculatedTotal","leftOverTotal","vendorInvoiceLineItemId","netTotalCents","onSave","saveEnabled","lineItemIds","submitNewDisputes","Frg","AgreementSpec","purchaseUnitPrices","_ref$initialSpecifica","serviceCodeInEditMode","enterSpecEditMode","initialSpec","_ref2$quantity","specQuantityLeft","specUnitPriceCents","_ref3$quantity","initialQuantityLeft","purchaseUnitPriceCents","itemsCount","agreedCreditCents","lineQuantity","lineUnitPriceCents","lineCalculatedTotalCents","calculatedTotalCents","lineTotalPriceCents","lineVendorInvoiceId","specQuantity","initialQuantity","specDiff","renderedSpecDiff","unitDiffCents","totalDiffCents","renderedUnitDiff","renderedTotalDiff","OverlayTrigger","overlay","vendorServiceCode","vendorServiceDescriptor","validationStatus","inDispute","bordered","condensed","hover","payloadAgreementId","payloadServiceCode","serviceCodeInSpecEditQuantityMode","HwcnTable","striped","datetime","Intl","DateTimeFormat","timeZone","ValidationBtn","validatedCount","unValidatedCount","getValidationCount","updatedFailureReports","loadedFailureReports","FailureReport","fault","onDeleteRetry","updateCurrentSpecificationId","_ref$unitSpecificatio","onCancelEdit","onAddBin","onChangeCollectionPlan","agreementSpec","formSpec","currentSpec","chargeQuantity","widtd","serviceCodeInCurrentSpecEditQuantityMode","allCollectionPlanNames","addBinToSpec","specificationsPath","specificationVersion","combinedUnitSpecifications","submitSpecificationForm","IgnoreBtn","anyIgnored","anyNotIgnored","ignored","getDisputeLedgerItem","DisputeLedgerItems","credited","creditNote","MoveSalesItemBtn","agreementDate","_getSalesLedgerItem","SalesLedgerItems","postedToSalesLedger","vectorXeroDocument","accountNumber","MoveAgreementBtn","getVendorAccount","vendorAccounts","Agreement","vendorInvoiceAccount","reconcilePolicies","onChangeReconcilePolicy","matchedAt","reconciledAt","validatedAt","isSalesAgreement","isCollection","disputeLedgerItemsByState","disputeBadges","alwaysOpen","defaultHeadingColor","accountDifferent","Panel","Body","mountOnEnter","defaultActiveKey","bsStyle","Heading","componentClass","locationActivityDates","destroyable","policy","CollectionAgreementForm","locationServices","onSelectService","onSetAgreedSpec","onSetAgreedSpecs","specQuantities","lineQuantities","_ref4$quantity","totalSpecQuantity","agreedQuantityLeft","totalLineQuantity","agreedQuantity","agreedDiff","renderedAgreedDiff","mainHighlightClass","vendorAccountNumber","availableServiceCodes","SupplyProductAgreementForm","AgreementForm","AddCollectionBtn","compatibleServices","lineItemServiceCodes","availableProductCodes","skipQuantityEdit","createBlankCollectionAgreement","openCollectionAgreementForm","AddSupplyProductBtn","openSupplyProductAgreementForm","AcceptBtn","submitAcceptReason","UnmatchedLineItems","newCollectionForm","allowCreateBlankAgreements","onDisputeAll","UnmatchedFailureReports","ManualLineItems","disputeLedgerItemsByLineItemId","onResetAll","disputes","disputeId","disputeNetTotalCents","restDisputes","HwcnList","TotalBadges","LocationDate","dateDiff","Location","postcodeIdName","matching","siteClosedOn","otherManagingAgent","onToggleMinimize","_ref$alwaysOpen","covid19VaccinationSite","completedDateCount","activityDateCount","anyUnmatchedLineItems","dateDiffs","eachCons","_dates","firstDate","secondDate","appActions","UnmatchedSummaryRow","handleIgnoreAll","handleDontIgnoreAll","onIgnoreAll","disputeReason","unmatchedItems","filterAction","stateColor","onFilter","filterSelected","unmatchedItemIds","totalQuantity","UnmatchedSummary","handleSelectFilter","rowKey","filterAttrs","filterRowKey","itemsByVendorServiceCode","itemsByUnitPriceCents","itemsByAcceptReason","itemsByDisputeReason","getUnmatchedLineItems","DisputeSummaryRow","renderedIgnoreReason","ignoreEnabled","DisputeSummary","itemsByReason","itemsByIgnoreReason","isStateNotLoaded","getLoadProgress","dataLoadPaths","loadedCount","allLocationsLoaded","_getLoadProgress","DefaultMode","selectedFilter","filterCounts","onSelectFilter","Nav","activeKey","NavItem","Badge","percentageColor","MatchMode","nextLocation","backLocation","onChangeLocationId","blankLocationNotice","loadedHwcns","loadLocationData","failureReportActions","hwcnActions","appNotBooted","loadProgressNode","loadState","stateNotLoaded","loadProgress","matchingMode","onChangeMode","onToggleMode","loadStatePath","updatedAgreement","updatedLineItem","updatedItem","newDisputeForm","updatedFailureReport","hwcn","keyDownActionAgrs","updatedSpecification","newStats","updateStateReducer","loadedState","agreementsReducer","lineItemsReducer","locationsReducer","failureReportsReducer","hwcnsReducer","disputeLedgerItemsReducer","appReducer","salesLedgerItemsReducer","statsReducer","submitSalesLedgerItems","salesLedgerItemsPath","getSalesItemsPendingSubmit","salesLedgerItem","sales_ledger_item","submitFailureReports","failureReportsPath","getFailureReportsPendingSubmit","missed_collection_report","getAgreementIdsForFailureReport","agreementObserver","selectedState","lineItemObserver","salesLedgerItemObserver","failureReportObserver","observeStore","nextState","unsubscribe","subscribe","getListener","isOnSite","getAuditType","isOnSiteAndPresent","isOnSiteAndYes","isYes","isNo","yearsFromSubmit","submissionDate","getSubmissionDate","monthsFromSubmit","matchText","isEmail","decisionData","general_information","score","autoSelect","_ref69","_ref70","_ref71","_ref72","_ref73","_ref74","_ref75","_ref76","_ref77","_ref78","_ref79","_ref80","_ref81","_ref82","_ref83","_ref84","_ref85","waste_management_policy","_ref86","_ref87","_ref88","_ref89","_ref90","_ref91","_ref92","_ref93","_ref94","_ref95","_ref96","waste_management_training","_ref97","_ref98","_ref99","_ref100","_ref101","_ref102","_ref103","_ref104","_ref105","_ref106","_ref107","_ref108","_ref109","_ref110","_ref111","_ref112","_ref113","_ref114","_ref115","_ref116","_ref117","_ref118","_ref119","_ref120","_ref121","_ref122","_ref123","hwcn_records","_ref124","_ref125","_ref126","_ref127","_ref128","_ref129","_ref130","_ref131","_ref132","_ref133","_ref134","_ref135","_ref136","_ref137","_ref138","_ref139","_ref140","internal_waste_containment","clearlyIdentified","_ref61","_ref62","clearlyLabelled","_ref63","_ref64","_ref65","contentsClearlyShown","_ref66","_ref67","contaminationFound","_ref68","hasClinicalBins","notAudited","_excluded10","hasNonClinicalBins","_excluded11","_excluded12","allRequiredContainersLabeled","withLabelingRequired","withClearLabels","withContamination","noContamination","highestRiskLevel","cannotAssesContamination","contaminationAssessed","bulk_waste_storage_containment","_ref37","_ref38","_ref39","packagedCorrectly","_ref40","_ref41","_ref42","_ref43","_ref44","_ref45","_ref46","_ref47","_ref48","_ref49","_ref50","_ref51","_ref52","_ref53","_ref54","_ref55","_ref56","_ref57","_ref58","_ref59","_ref60","wasteStreams","hasStorage","storedSecurely","containmentWithSecurityRequired","notSecureContainment","withPackagingRequired","withoutCorrectPackaging","auditType","sumReviewResults","reviewResults","maxScore","actionItems","scoreToTimeline","mapReviewResult","reviewData","actionSection","requiredFieldNames","suggestedAction","timeline","observation","getDecisionData","makeObservation","decision","allOptions","hasObservation","isNil","makeNoScoreObservation","getObservationResult","hasNoScoreObservation","autoReviewData","inputData","savedReviewData","getObservation","autoDecision","getRequiredWasteStreamIds","SectionReview","Comment","editMode","setEditMode","textDecorationLine","overflowWrap","ErrorOutlineIcon","CompleteStatusIcon","isComplete","_ref$className","DoneIcon","ErrorIcon","QuestionReview","onDecision","onCommentChange","decisionOptions","radioOptions","scoreToClass","makeQuestionObservation","updateSectionReviewData","makeQuestionComment","wasteAuditDocumentId","ViewOnlyField","questionReviewProps","getReviewResult","submittedOn","includeSeconds","_ref$blankSrc","blankSrc","BinField","updateBinReviewData","NoScoreQuestionReview","BinReview","BinSummary","onReview","requiredReviewFields","makeBinComment","AutoQuestionReview","updateRoomReviewData","roomData","RoomReview","numberedTitle","ContaminationAnswer","assesedBins","notAssesedBins","noBins","roomRoutePath","selectedRoomId","selectedRoom","roomSelected","isRoomComplete","updateBulkContainmentReviewData","BulkContainmentReview","makeBulkContainmentComment","updateWasteStreamReviewData","wasteStreamId","wasteStreamData","combineContainment","WasteStreamReview","onBinCommentChange","StoredSecurely","PackagedCorrectly","ContaminationFound","secureContainment","wasteStreamRoutePath","selectedWasteStreamId","selectedWasteStream","wasteStream","wasteStreamSelected","isWasteStreamComplete","sectionWeights","getSectionTitle","requiredFieldsBySectionId","getSectionRequiredFields","defaultIsComplete","isCompleteBySectionId","isSectionReviewComplete","getReviewResultBySectionId","getSectionReviewResult","sectionWeight","reviewResult","percentScore","weightedPercentScore","weightedPercent","getSectionNumber","reviewComponentsById","orderedSectionReviewComponents","getAuditRoomsForSection","getRoomWithReview","getBinDataForRoom","roomWithoutCalculatedFields","roomWithoutReview","clinicalBins","nonClinicalBins","isInteger","mapValues","roomNotAudited","getCalculatedFields","roomWithoutComplete","getRoomReviewData","roomWithoutResult","getSectionReviewData","getSectionDataWithReview","getAuditSectionData","getStorageTypeData","getContainerTypeData","getAuditBinData","getBinReviewData","getAuditBinsForRoom","sectionBins","getAuditBinsForSection","getWasteStreamIdForBin","binWithoutComplete","getBinDataForWasteStream","getBinsForWasteStream","getAuditBulkContainmentData","getBulkContainmentReviewData","getWasteStreamIdForBulkContainment","sectionBulkContainments","getAuditBulkContainmentsForSection","getBulkContainmentDataForWasteStream","getBulkContainmentsForWasteStream","bulkContainmentWithoutComplete","getWasteStreamReviewData","getWasteStreamsWithReview","wasteStreamIds","getIdentifiedWasteStreamIds","wasteStreamWithoutCalculatedFields","wasteStreamWithoutReview","allContainments","containment","binsWithSecurityRequired","bulkContainmentsWithSecurityRequired","allBinsWithResult","allBulkContainmentsWithResult","secureBins","notSecureBins","secureBulkContainments","notSecureBulkContainments","withCorrectPackaging","wasteStreamWithoutComplete","wasteStreamWithoutResult","internalBins","externalBins","foundStorageTypeIds","getWasteStreamIds","getAuditReview","auditedRooms","requiredRoomCount","auditedCount","missingRooms","roomsToReview","getRoomsWithReview","totalWeightedPercentScore","getWeightedReviewResult","scoreToRiskLevel","SectionReviewNav","_$get","ScoreSummary","onSubmitReview","StickyBox","offsetTop","offsetBottom","compose","reviewedAudit","waste_audit","firestoreConnect","storeAs","createRootReducer","connectRouter","firestoreReducer","firebaseReducer","rrfConfig","useFirestoreForStorageMeta","fbConfig","initializeApp","withExtraArgument","reduxFirestore","database","enablePersistence","ConnectedRouter","ReactReduxFirebaseProvider","createFirestoreInstance","ModalContainer","getDisputeLedgerItemsForVendorCredit","vendorCreditId","getDisputeLedgerItemsForVendorInvoice","getVendorCreditAllocationsForCreditId","vendorCreditAllocations","getAllVendorCreditAllocationsForCreditId","vendorInvoices","getVendorInvoicesById","getShowAllInvoices","showAllInvoices","getMode","getSelectedInvoiceId","selectedInvoiceId","canSubmit","getGrossCreditBalanceCents","getAllocationSummary","grossBalanceCents","getSelectedInvoice","getVendorCredit","vendorCredit","disputeLedgerItemsByInvoiceId","getDisputeLedgerItemsByInvoiceId","creditAllocationsByInvoiceId","getVendorCreditAllocationsByInvoiceId","vendorInvoiceIds","summary","grossTotalCents","thisNoteCreditAllocations","thisNoteResolvedDisputes","thisNoteGrossResolvedDisputeCents","thisNoteGrossCreditAllocationCents","thisNoteGrossTotalCreditCents","thisNoteNetTotalCreditCents","otherNoteGrossResolvedDisputeCents","itemVendorCreditId","otherNoteGrossTotalCreditCents","grossDisputeTotal","grossTotalCreditCents","openToAllocateGrossBalanceCents","openToResolveDisputeGrossBalanceCents","hasCreditAllocationError","hasResolvedDisputeError","hasValidationError","creditAllocations","allocatedGrossTotalCents","resolvedGrossTotalCents","disputesLoaded","updateCreditAllocation","setVendorCreditId","loadedDisputeLedgerItems","loadDisputeLedgerItems","loadedDisputeInvoiceIds","checkDisputesLoaded","param","vendor_invoice_ids","disputeLedgerItemsActions","setShowAllInvoices","setMode","setSelectedInvoice","selectInvoice","Summary","summaryData","vendorInvoicesById","onSelectInvoice","otherNoteCreditCents","invoiceId","eventToArgs","_ref3$allErrors","_ref3$optional","CreditAllocationForm","getToNetGrossCents","getToNetTotalCents","handleGetToNetChange","getToNetTotal","getToNetTotalFloat","getToNetGrossFloat","applyGetToNetGrossCents","_this$props$grossTota","_this$props$creditRea","creditReason","_this$props$grossTota2","grossResolvedDisputeCents","grossInvoiceBalanceCents","grossCreditBalanceCents","_$minBy","minBy","_$minBy2","maxApplyCents","maxApplyText","_getSelectedInvoiceAl","getSelectedInvoiceAllocationSummary","getVendorCreditAllocationByInvoiceAndCreditId","DisputeResolveForm","onResolveDispute","selectableItemIds","disputeItemVendorCreditId","locationName","isResolved","disputeLedgerItemId","resolveDispute","CreditBalanceAlert","filterOptions","candidate","searchLabel","getOption","billingPeriodMonth","inDisputeGrossTotalCents","invoiceSelectOptions","invoiceSelectPlaceholder","allSelectOptions","selectedInvoice","hasAnyValidationError","selectedInvoiceAllocationSummary","onSetShowAllInvoices","onSetMode","selectedInvoiceOption","vendorAccountName","scanUrl","filterOption","allocationSummary","getVendorInvoices","vendorCreditPath","submitData","vendorCreditAllocationActions","setCreditBalanceCents","_ref2$id","grossTotalFloat","allocationsFromServer","allocation","vendorCreditReducer","vendorCreditAllocationsReducer","updateForm","clearForm","reloadServices","loadServiceTimeline","loadServiceTimelineSuccess","loadServiceTimelineError","getCurrentForm","currentForm","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","getOwnPropertyDescriptors","defineProperties","_toPrimitive","refreshData","_getState","serviceMappingPath","serviceTimelineActions","_x4","unexpectedAccountColor","ServiceTimeline","serviceTimeline","onSelectMonth","selectMonthId","legendColor","months","legendItems","isDotHole","flexContainer","scrollContainerRef","scrollingContainer","selectedElement","offsetLeft","scrollLeft","dataTooltipId","rel","vendorAccountServiceMappings","terminationDate","currentMonth","closedMonth","serviceUuids","faQuestionCircle","useRowSpan","instance","allColumns","rowSpanHeaders","enableRowSpan","topCellValue","topCellIndex","ACCOUNT_HEADER","MonthDetails","defaultData","extraDep","cellClassName","accessor","Cell","vendorAccountUuid","original","vendorInvoiceNumber","vendorLocationDescriptor","chargeData","_useTable","useTable","hooks","useInstance","useSortBy","getTableProps","getTableBodyProps","headerGroups","prepareRow","lastMonth","monthName","nextMonth","monthYears","headerGroup","getHeaderGroupProps","getHeaderProps","cell","allCells","rowSpanHeader","isRowSpanned","rowSpan","getRowProps","cells","getCellProps","_data$vendorAccountSe","ICON_MAPPING","setAccount","SetIcon","resetAccount","ResetIcon","transitionAccount","TransitionIcon","ActionMenu","monthId","_ref$selectedAction","selectedAction","basicUrl","parsedUrl","urlParams","IconComponent","formatName","TableForGroup","groupOptions","onRowSelect","selectedRow","setSelectedRow","GROUP_LABEL_ORDER","getVendorAccountOptions","nhsCommissionerAuthorityId","isNhsCommissioned","processOptions","flow","authorityId","groupedAccounts","groupLabel","_service$actions","initialOrder","sortCurrentVendorAccount","sortedOptions","premTypeNames","transformedGroups","TransitionAccount","_currentForm$errors","_currentForm$context","isSet","_option$premTypeNames","closedMonthName","VisibilityIcon","rowSelectHandler","SetAccount","ResetAccount","previousStates","startOver","setStartOver","displayText","resetToEventId","FORM_MAPPING","errorStyles","_service$vendorAccoun","_currentForm$form","onClearForm","onFormChange","onSubmitForm","commissionerStatus","iTh","iTd","KeyboardArrowDownIcon","initialMonthId","billingMonthDetailsBasePath","selectMonth","loadForm","service_mapping","_state","serviceTimlelineReducer","_configureStore","ThemeProvider","attachEvent","addEventListeners","detachEvent","removeEventListeners","selectConfirmatoryStatementsState","_state$app","COLLECTION_ID","checkAreConfirmatoryStatementsCompleted","_competenceEvidences$","confirmatoryStatementsState","competenceEvidences","willPawaBeCompletedWithPhysicalPresence","hasKnowledgeOfHealthcareWaste","NoCompetenceModal","FULL_COMPETENCE_EVIDENCES_QUESTIONS","isLongStandingClinicalPro","isLongStandingHealthcareMgmtPro","hasKnowledgeOfWasteMgmtPractices","isQualifiedAuditingPro","hasRecentTrainingOnWasteMgmtPracticesAndRequirements","ConfirmatoryStatementPageLayout","ConfirmatorySidenav","ConnectedConfirmatoryStatementsPage","confirmatoryStatementsData","hasCompletedConfirmatoryStatements","hadStartedPAA","onNavigate","nextPath","_confirmatoryStatemen","_useReducer","errorStates","updatedAttr","updatedAttrs","validateFields","noCompetenceModalPath","competenceKey","actualString","SubmittedModal","SubmitWarningModal","allDataLoaded","fullStoryOrgId","locationPath","setShowSubmit","showSummaryBox","setShowSummaryBox","identify","localName","trackScrolling","wrappedElement","maxWait","ConfirmatoryStatementsPage","sectionComponents","binGroupSurveysForWasteProducedAndSegregation","binGroupSurveysForOtherWasteProduced","initialProp","meta","experimentalForceLongPolling","FullStory","org","CreateSelectInput","creatable","selectedOption","__isNew__","CreatableSelect","focusedOption","selectOption","isClearable","sectionIdsReducer","GetHelpModal","setComment","coworkerEmail","setCoworkerEmail","setSectionId","isValidNewOption","formatCreateLabel","createOptionPosition","NeedHelp","Portal","guidebookUrl","cloneElement","ListOption","handleClick","Counter","displayAbsoluteNumber","moreClass","maxReached","lessClass","minReached","moreHandler","lessHandler","oldCount","newCount","changeHandler","InputCounter","inputClass","popover","componentWillUnmount","displayFormat","successIcon","inputChange","picker","datetimepicker","useCurrent","proxy","componentWillReceiveProps","nextProps","ReactSelect2","extraClass","blankOption","rootNode","select2","minimumResultsForSearch","allowClear","_handleChange","componentDidUpdate","FormGroup","hintPosition","errorMessage","labelEl","hintTop","hintBottom","mixins","ReactLinkedStateMixin","valueLink","linkState","requestChange","PasswordField","TextArea","SelectField","FormGroupHolder","controlClass","TagsInput","$tagsInput","tagsinput","confirmKeys","trimValue","tagClass","typeaheadjs","substringMatcher","suggestedTags","minLength","strs","cb","substrRegex","cssStyle","clx","ShowForHolder","ShowForItem","Forms","Select2","FormElements","CheckList","Bootstrap","ShowFor","Holder","Note","newText","newAssignedAgentId","newTags","newReminderDate","reminderDate","editing","updateText","updateTags","clearReminderDate","ReminderDatePicker","updateReminderDate","updateAssignedAgent","agents","submit","cancel","reminder","today","isAfter","at","assignedTo","archived","showArchived","created","updated","onEditNote","onUpdateNote","onCancelEditNote","swal","showCancelButton","confirmButtonColor","confirmButtonText","closeOnConfirm","onCompleteNote","onDestroyNote","autosize","newNoteText","_self$props","notesToShow","addNote","showAdd","updateNewNote","updateNewTags","clearNewReminderDate","updateNewReminderDate","updateNewAssignedAgent","postNote","toggleArchived","onPostNote","prevProps","Notes","getNotes","editNote","destroyNote","cancelEditNote","completeNote","updateNote","sendNoteUpdate","currentUserId","reminder_date","assigned_agent_id","noteId","newNotes","completed_by_id","completed_at","updateInvoiceAttributes","updateInvoiceFromServer","PurchaseOrderSelect","_this$props$label","_this$props$name","mapStateToProps","purchaseOrders","po","numberName","mapDispatchToProps","authorityStates","onStateChange","onPoNumberChange","onAuthorityNoteChange","onReceiptNumberChange","onReceiptedOnChange","onPaidOnChange","onPaymentExceptionChange","authorityState","poNumber","authorityNote","receiptNumber","receiptedOn","paidOn","paymentException","authorisedForPayment","receiptedFields","paidFields","saveIcon","buttonText","voided","newPoNumber","newReceiptNumber","newReceiptedOn","newPaidOn","newPaymentException","newNote","reload","vendorInvoiceReducer","newAttributes","newFromService","updateCreditAttributes","updateCreditFromServer","ImageSelectorImg","handleRemoveImage","removeImage","public_id","thumbnail_url","float","updateImages","handleAddImages","cloudinarySettings","onUpdateImages","cloudinary","openUploadWidget","cloud_name","cloudName","upload_preset","uploadPreset","cropping","resource_type","show_powered_by","thumbnail_transformation","crop","onRemoveImage","imageSelectors","newImages","imagesReducer","union","publicId","Row","developerMode","idRow","isAnyItemSelected","_item$alternativeReco","dateString","vendorLocationCodeDerived","alternativeRecords","InfoItem","DetailsView","_currentItem$alternat","_ref6$currentItem","currentItem","currentTabIndex","setCurrentTabIndex","tabItem","hwcnHardcopyId","inputtedByName","digital","InfoOutlinedIcon","clipboard","writeText","CopyAllIcon","_allItemsGroupedByDat","serviceReports","allItems","allItemsGroupedByDate","initId","currentId","borderCollapse","ProofApp","PostcodeDistrictSelectorArea","selectedDistrictIds","districts","railsModelName","onSelectArea","onSelectDistrict","areaSelected","district","PostcodeDistrictSelectorDistrict","postcodeDistrictsIdsName","clickHandler","areas","selectAreaHandler","selectDistrictHandler","selectAllHandler","deSelectAllHandler","PostcodeDistrictSelectorApp","updateSelectedArea","updateSelectedDistrict","selectAll","deSelectAll","districtId","newSelectedDistrictIds","areaDistrictIds","_createStoreWithHisto","StrictMode","requestedVisitValue","isClosed","_service$specificatio","_service$billingHisto","codes","_ref4$capacityMcl","capacityMcl","_ref4$groupName","averageQuantity","_service$lastVisit","_service$nextVisit","_service$vendorLocati","toLocaleDateString","vendorComments","expanded","setExpanded","MenuActions","menuOptions","onMenuItemClick","Accordion","_expanded","disableGutters","AccordionSummary","expandIcon","AccordionDetails","integer","cleanMerge","objectSources","mergeWith","validateIntFieldGTE","_updatedAttrs$fieldNa","bgSurveyIdAndUpdatedAttrs","_Object$entries$_i","_Object$entries","thisSurvey","bgs","numberOfContainers","_updatedAttrs$fieldNa2","depFieldNames","dFieldName","ConnectedWasteProducedAndSegregation","onChangeForBinGroupSurvey","packingNotesOrComment","binGroupSurvey","WasteProducedAndSegregationPerBinGroup","adrLabel","wasAdrLabelUsed","compositionAndPhysicalForm","compositionAndPhysicalFormUseOther","compositionAndPhysicalFormUseOtherFreeText","numberOfContainersAudited","numberOfContainersNonConforming","reasonForNonConformance","exist","pawaAudit","renderedBinGroups","binGroupSurveyAndData","_binGroupSurveyAndDat","_binGroupSurveyAndDat2","compositionAndPhysicalFormAggr","labelToValue","ewcCodes","strings","otherCompositionAndPhysicalForm","svgHtml","packaging","hazCodes","InfoPopover","adrLabelImageUrl","labelValue","_compositionAndPhysic","compositionAndPhsicalKey","_backwardCompatArrayV","backwardCompatArrayValue","MaterialPopover","errorObject","ConnectedOtherWasteProduced","modalUrl","handleOpenHelpModal","OtherWasteProducedModal","OtherWasteProducedPerBinGroup","onOpenHelpModal","hasUsedDefaultPackaging","hasUsedOtherWastePackaging","otherWastePackagingUsedFreeText","isProduced","askIsProduced","locationServiceVendor","LocationServicesVendorBoxAndy","openActions","setOpenActions","_service$requests","vendor_replied","accepted","_ticket$location","_ticket$location2","_ref$isLog","isLog","setPdfUrl","_ticket$vendor3","submitResponse","_ticket$vendor4","_ticket$location3","_ticket$location4","tagged_reply_id","lastTaggedReplyId","vendor_id","ticket_id","location_uuid","service_uuid","authority_id","pdfUrls","replyPdfUrl","handleOpenPdf","pdfType","contractManagerFullName","acceptUrl","rejectUrl","reattemptDate","ReportCard","_report$collectionFai","_report$deliveryFailu","vendorFeedback","latest","latestFeedback","driverTurnUp","renderReportStatus","BinGroupRow","isUncollected","visitFrequencyStatus","vendorVisitPlanName","renderSwitch","_service$serviceMappi","setOpenVLC","remainingServiceMappings","sm","nameWithoutClosed","_ref$specifications","_ref$billingHistory","billingHistory","_ref$billingHistoryUn","billingHistoryLength","cloneBillingHistory","_useDebounceValue2","useDebounceValue","pickStartingFrom","setPickStartingFrom","hiddenServiceCodes","setHiddenServiceCodes","setOrderBy","setOrder","slicedBillingHistory","accumulator","billingHistoryUnitAveragesCalc","createSortHandler","_billingHistoryUnitAv","averageQuantityCalc","lastBilledDate","StyledTableCell","sortedRows","TableSortLabel","CustomTooltip","RowTable","BillingHistoryChart","BillingHistorySlider","_row$binType","_row$binType2","_row$binType3","_row$binType4","borderX","_ref6$placement","customStyles","valueLabelFormat","marks","getAriaValueText","valueLabelDisplay","customParseFormat","isSameOrAfter","ChartJS","CategoryScale","LinearScale","BarElement","averageWeekGapExpectations","_ref$hiddenServiceCod","tooltipRef","setTooltip","isHoveringTooltip","setIsHoveringTooltip","firstDatesOfMonth","findFirstDatesOfMonth","datasetsMap","serviceDate","datasets","rollingAverageVisits","calculateVisitsPerWeek","averageVisitsDataset","pointRadius","yAxisID","external","dataIndex","dataPoints","dataByServiceCode","dataset","averageVisits","jsxTooltipContent","thresholdPercentage","differences","threshold","closeValues","rollingAverageToFrequencyGuess","InfoIcon","tooltipWidth","canvasWidth","mouseX","caretX","scales","_context$tick","crossAlign","autoSkip","maxRotation","getLabelForValue","monthKey","grace","drawOnChartArea","Bar","onMouseEnter","onMouseLeave","firstDates","visitsPerDate","dateKeys","weekGaps","averageWeeks","AdhocVisitRequestTab","_Object$values","initialStates","isTicketId","openStates","setOpenStates","prevStates","groupedRequests","renderGroup","AllRequestTab","allRequests","RequestCardComponent","AdhocVisitRequest","StockDeliveryRequest","SpecChangeRequest","VisitFrequencyChangeRequest","ServiceSuspensionRequest","ServiceTerminationRequest","ServiceResumptionRequest","RemediationCaseTab","openedOnDate","startOf","daysOpen","lastReattemptLogEntry","findLast","allLogEntries","storedReattemptDate","filteredLogEntries","TextSnippetOutlinedIcon","failureReportCount","CalendarTodayIcon","firstFailedOn","NotificationsActiveIcon","notificationsSent","EventAvailableIcon","PendingIcon","FolderIcon","casesInPastMonthsCount","TimelineDot","ExitToAppIcon","logEntry","LogCard","TimelineSeparator","TimelineConnector","_log$medatada","isReattemptConfirmed","messagePrefix","dateToFormat","medatada","requestId","ReportTab","sortedReports","groupedReports","ServiceResumptionRequestTab","ServiceSuspensionRequestTab","ServiceTerminationRequestTab","SpecChangeRequestTab","StockDeliveryRequestTab","VisitFrequencyChangeRequestTab","vendorSpecs","specIndex","qty","vsc","todayCalendarRef","weekStart","isoWeekday","selectedDayWeek","setSelectedDayWeek","weeks","fetchMoreDataFromServer","subtract","Week","setSelectedDay","DataError","_todayCalendarRef$cur","jumpToToday","dateToDisplay","setDateToDisplay","checkDate","isSelectedDay","VisitTile","groupId","selectedTab","containerRef","outstandingRequestsRef","hasOverflow","setFilter","filteredRequests","containerWidth","outstandingRequestsWidth","typesWidth","getLabel","RequestRows","_request$replyIds3","isLastRow","handleLinkClick","currentHighlights","getAll","_request$replyIds2","getSingularPlural","singular","plural","getLocationVisits","isoDate","toggleDrawer","newChannel","replies","noVendorSelected","heightInVh","setHeightInVh","openFormId","setOpenFormId","showDrawer","setShowDrawer","onCloseForm","ResponseForm","calculateAndSetHeight","vh","newHeightInVh","ResizeObserver","ChannelHeader","onClickShowOverview","NoVendorSelected","scrollbarWidth","scrollbarColor","SortedReplies","ChannelFooter","handleToggleButton","getPotentialCancellationDates","visitDayIds","expectedVisitPlanName","expectedVisitsPerWeek","contactPlaceholder","contactLabel","dateLabel","visitPlanSlug","visitPlans","visitPlanOptions","currentVisitPlanSlug","acceptedAt","requestedDate","visitsExpectedAfter","confirmedVisitsExpectedAfter","requestSpecifications","requestSpecificationsCodes","suspensionReasons","confirmedNoVisitsExpectedAfter","deliverAdditionalStock","collectionInstructionId","availableCollectionServiceCodes","availableDeliveryServiceCodes","collectionInstructions","anchorElemSpecOnly","setAnchorElemSpecOnly","anchorElemAddStock","setAnchorElemAddStock","availableCollectionOptions","newUnits","collectionInstructionOptions","deliveryOnly","updateUnitHandler","newCollectionUnits","newDeliveryUnits","CollectionUnitsTable","updateCollectionQuantity","updateCollectionCollectAll","collectionQty","availableBinTypeCodes","updatedDeliveryUnits","reportUuid","showPartialCollected","BinCollectionReportTable","showCollectionReasonFailure","openReattemptDate","setOpenReattemptDate","collectionFailureReasonSlug","deliveryFailureReasonSlug","reattemptDateProvided","deliveryFailureReasons","collectionFailureReasons","_nextVisits$","_nextVisits$2","requestReattempt","lastVisits","ReportProblemIcon","reasons","customOptions","setCustomOptions","selectOnFocus","clearOnBlur","handleHomeEndKeys","freeSolo","existingReason","OrganisationMessageSection","organisation","VendorMessageSection","_ref$messageRequired","messageRequired","_ref$responseRequired","responseRequired","helperText","ticketActions","copyToClipboard","useCopyToClipboard","stickyBoxRef","toggleButtonsConfig","EmailIcon","replyEmails","handleCopyEmail","RemediationForm","_ticket$stakeholderCo","_ticket$stakeholderCo2","validationDateError","setValidationDateError","validationError","setValidationError","setServerError","minRemediationDate","toDateString","toDate","noticeText","serviceActionReson","textForNotice","descriptionOfFailure","inset","backdropFilter","date_of_contract_failure","service_action_requested_at","text_for_notice","description_of_failure","service_action_reason","vendor_response_attributes","response_expected","KeyboardArrowUpIcon","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","_ticket$defaultContac2","setCannedResponseId","setBlobFiles","setOriginalFileNames","addNewTicketReply","_useLocalStorage2","useLocalStorage","_useForm","useForm","handleSubmit","watch","toggleResponse","storedMessage","localStorage","getItem","_ticket$defaultContac","cursorMarker","cursorPosition","textArea","setSelectionRange","displayIcon","HourglassBottomIcon","OutlinedFlag","newBlobFiles","newOriginalFileNames","allowArrayLike","normalCompletion","didErr","_e2","clearable","inputAdornment","shouldDisableDate","_ref$type","MenuIcon","useGetVendorsQuery","locationVendors","vendorList","updateVendor","onInputChange","newInputValue","ListboxProps","getVendors","globalLoadingState","sortedReplies","kvArray","closeHandler","findElementWithHighlightedId","highlightIds","_step2","_iterator2","_ret2","_loop2","scrollToHighlightedElement","highlightIdsFromParam","scrollInterval","groupedReplies","ReplyGroup","ReplyItem","organisationReply","vendorReply","groupIds","isGroupHighlighted","isOrganisation","isAgent","isHighlighted","usersApi","getAllStaff","logsComponents","AdhocVisitRequestLog","SpecChangeRequestLog","VisitFrequencyChangeRequestLog","StockDeliveryRequestLog","ServiceTerminationRequestLog","ServiceReinstatementRequest","ServiceReinstatementRequestLog","ServiceSuspensionRequestLog","ServiceResumptionRequestLog","FailedVisitReport","VendorFeedbackOnVisitFailureRecieve","ClientFeedbackOnVisitFailureRecieve","ReattemptVisitRequest","ReattemptDateRequestLog","ReattemptDateConfirm","ReattemptDateLog","NoActionRequiredLog","componentName","SpecificLogComponent","_request$data","_collectionUnits","_request$data2","isCancelled","isConfirmed","labelShort","getLabelShort","_request$metadata","visitsExpectedAfterText","isFinalCollectionRequired","VoidNoActionRequired","BlockIcon","VoidDialog","attachments","attachment","sentByName","sentToName","propertyIsEnumerable","UNSCOPABLES","ArrayProto","LIBRARY","Iterators","$iterCreate","setToStringTag","BUGGY","KEYS","VALUES","returnThis","NAME","Constructor","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","kind","proto","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","$keys","enumBugKeys","shared","SAFE_CLOSING","riter","skipClosing","classof","$iterators","getKeys","wks","TO_STRING_TAG","ArrayValues","DOMIterables","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","explicit","Collection","forbiddenField","TYPE","PromiseCapability","C","promise","$$resolve","$$reject","setDesc","valueOf","toObject","asc","$create","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","$this","callbackfn","SHARED","copyright","dPs","IE_PROTO","Empty","createDict","iframeDocument","lt","Properties","ret","getIteratorMethod","redefineAll","anInstance","forOf","$iterDefine","setSpecies","DESCRIPTORS","fastKey","SIZE","getEntry","_f","getConstructor","ADDER","_l","setStrong","_k","SPECIES","KEY","META","isExtensible","FREEZE","preventExtensions","setMeta","NEED","getWeak","onFreeze","fails","$iterDetect","inheritIfRequired","IS_WEAK","fixMethod","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","COLLECTION","of","A","mapping","mapFn","D","defer","cel","process","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","Dispatch","ONREADYSTATECHANGE","run","nextTick","port2","port1","onmessage","postMessage","importScripts","newPromiseCapability","promiseCapability","styleLoader","icons","larger","animated","webpackContext","req","webpackContextResolve","__webpack_require__","globalWindow","mozRequestAnimationFrame","webkitRequestAnimationFrame","forEachElement","elementsType","isCollectionTyped","jQuery","Elements","getElementSize","ResizeSensor","EventQueue","sizeInfo","newQueue","attachResizeEvent","resized","resizedAttached","styleChild","expand","expandChild","shrink","shrinkChild","dirty","rafId","computedStyle","lastWidth","lastHeight","initialHiddenCheck","lastAnimationFrame","resetExpandShrink","resetSensor","onResized","addEvent","elem","definitionsFromContext","logicalName","identifierForContextKey","definitionForModuleAndIdentifier","definitionForModuleWithContextAndKey","$Object","getProto","isEnum","getDesc","setDescs","getNames","getOwnPropertyNames","getSymbols","tlds","utlds","registerGroup","addToGroups","flags","State","jr","jd","accepts","_nextState","exactOnly","ta","regexp","templateState","allFlags","flagsForToken","WORD","UWORD","LOCALHOST","TLD","UTLD","SCHEME","SLASH_SCHEME","NUM","NL$1","OPENBRACE","OPENBRACKET","OPENANGLEBRACKET","OPENPAREN","CLOSEBRACE","CLOSEBRACKET","CLOSEANGLEBRACKET","CLOSEPAREN","AMPERSAND","APOSTROPHE","ASTERISK","AT","BACKSLASH","BACKTICK","CARET","COLON","COMMA","DOLLAR","DOT","EQUALS","EXCLAMATION","HYPHEN","PERCENT","PIPE","PLUS","POUND","QUERY","QUOTE","SEMI","SLASH","TILDE","UNDERSCORE","EMOJI$1","SYM","tk","freeze","WS","NL","EMOJI","ASCII_LETTER","DIGIT","SPACE","fastts","defaultt","_char2","_setPrototypeOf","defaults","defaultProtocol","noop","formatHref","nl2br","ignoreTags","Options","defaultRender","ignoredTags","uppercaseIgnoredTags","ir","check","isCallable","getObj","MultiToken","createTokenClass","Token","_MultiToken","subClass","superClass","isLink","toHref","scheme","toFormattedString","toFormattedHref","toFormattedObject","Email","Text","Nl","Url","hasProtocol","makeState","initMultiToken","Multi","startIdx","endIdx","warn","INIT","scanner","tokenQueue","pluginQueue","customSchemes","initialized","_tr","_tr2","_tr3","_tr4","_tt","_tr5","Start","Num","Word","UWord","Ws","Emoji","EmojiJoiner","wordjr","uwordjr","tld","ascii","utld","slashscheme","_i2","sch","init$2","qsAccepting","qsNonAccepting","localpartAccepting","Localpart","Domain","Scheme","SlashScheme","LocalpartAt","LocalpartDot","EmailDomain","EmailDomainDot","Email$1","EmailDomainHyphen","EmailColon","numeric","DomainHyphen","DomainDot","DomainDotTld","DomainDotTldColon","DomainDotTldColonPort","Url$1","UrlNonaccept","UriPrefix","SlashSchemeColon","SlashSchemeColonSlash","UrlOpenbrace","UrlOpenbracket","UrlOpenanglebracket","UrlOpenparen","UrlOpenbraceQ","UrlOpenbracketQ","UrlOpenanglebracketQ","UrlOpenparenQ","UrlOpenbraceSyms","UrlOpenbracketSyms","UrlOpenanglebracketSyms","UrlOpenparenSyms","init$1","tokenize","multis","textTokens","secondState","multiLength","latestAccepting","sinceAccepts","subtokens","stringToArray","charCount","charCursor","tokenLength","charsSinceAccepts","run$1","$find","forced","speciesConstructor","toIObject","arrayIndexOf","names","toAbsoluteIndex","IS_INCLUDES","fromIndex","ObjectProto","createProperty","arrayLike","aLen","mapfn","$defineProperty","addToUnscopables","Arguments","MAP","buggy","pIE","gOPD","toJSON","gOPS","$assign","K","Internal","newGenericPromiseCapability","OwnPromiseCapability","Wrapper","task","microtask","newPromiseCapabilityModule","perform","promiseResolve","PROMISE","versions","v8","$Promise","isNode","USE_NATIVE","FakePromise","PromiseRejectionEvent","isThenable","notify","isReject","_n","_v","ok","_s","reaction","exited","_h","onHandleUnhandled","enter","exit","onUnhandled","unhandled","isUnhandled","emit","onunhandledrejection","onrejectionhandled","$reject","_d","_w","$resolve","executor","onFulfilled","onRejected","capability","remaining","$index","alreadyCalled","race","un","macrotask","Observer","WebKitMutationObserver","flush","standalone","characterData","onFinally","ElementProto","msMatchesSelector","mozMatchesSelector","webkitMatchesSelector","ownerDocument","isBuggy","mutationObserverHasBuggyRemovedNodes","_set","patchInnerHTMLToRemoveChildNodes","_default","_Controller","am4core","am4themes_animated","chart1","am4charts","categoryAxis1","series1","series1a","labelBullet1","labelBullet1a","show_hide","replaceAll","chart2","categoryAxis2","series2","labelBullet2","markerTemplate","MaterialAvatar","win","colorPalette","avatar","Avatar","updateOptions","initials","getInitials","getFontSize","generateColor","_drawCircle","_drawSquare","getTextColor","fillText","centerX","centerY","beginPath","_nameSplit","_hexColor","_hexToRgb","_colorValue","_result","randomColor","materialAvatar","chartData","categoryAxis","columnTemplate","viewTarget","factory","googleVersion","script","onLoadEvents","originalCreateLoaderMethod","GoogleMapsLoader","WINDOW_CALLBACK_NAME","_googleMockApiObject","ready","createLoader","createUrl","isLoaded","LIBRARIES","CLIENT","CHANNEL","LANGUAGE","REGION","release","onLoad","makeMock","parsedData","datum","dateAxis","seriesMissedCollections","missed_fault","missed_reason","missedBullet","seriesHwcns","hwcnBullet","hwcn_url","seriesInvoices","invoiceBullet","invoice_url","linkTarget","outputTarget","pieSeries","labelBullet","valueAxis2","numberFormat","circleBullet","magicTarget","passwordTarget","magicEmailTarget","passwordEmailTarget","series_data","toggleableTarget","client","reperform","client_reperform","client_reperform_bullet","isBrowser","longerTimeoutBrowsers","timeoutDuration","called","scheduled","functionToCheck","getStyleComputedProperty","css","getParentNode","nodeName","getScrollParent","_getStyleComputedProp","isIE11","isIE10","getOffsetParent","noOffsetParent","offsetParent","nextElementSibling","getRoot","findCommonOffsetParent","element1","element2","compareDocumentPosition","DOCUMENT_POSITION_FOLLOWING","createRange","setStart","setEnd","commonAncestorContainer","firstElementChild","element1root","getScroll","side","upperSide","scrollingElement","includeScroll","getBordersSize","getSize","getWindowSizes","classCallCheck","createClass","protoProps","staticProps","getClientRect","sizes","horizScrollbar","vertScrollbar","getOffsetRectRelativeToArbitraryNode","fixedPosition","isHTML","childrenRect","parentRect","scrollParent","borderLeftWidth","getViewportOffsetRectRelativeToArtbitraryNode","excludeScroll","relativeOffset","isFixed","getFixedPositionOffsetParent","getBoundaries","reference","boundariesElement","boundaries","boundariesNode","_getWindowSizes","getArea","computeAutoPlacement","refRect","rects","sortedAreas","filteredAreas","computedPlacement","variation","getReferenceOffsets","commonOffsetParent","getOuterSizes","getOppositePlacement","matched","getPopperOffsets","referenceOffsets","popperRect","popperOffsets","isHoriz","mainSide","secondarySide","measurement","secondaryMeasurement","runModifiers","modifiers","ends","cur","isDestroyed","arrowStyles","flipped","positionFixed","flip","originalPlacement","isCreated","onCreate","isModifierEnabled","modifierName","getSupportedPropertyName","upperProp","willChange","disableEventListeners","removeOnDestroy","getWindow","attachToScrollParents","scrollParents","isBody","setupEventListeners","updateBound","scrollElement","eventsEnabled","enableEventListeners","scheduleUpdate","cancelAnimationFrame","isNumeric","isFinite","isModifierRequired","requestingName","requestedName","requesting","_requesting","requested","placements","validPlacements","clockwise","BEHAVIORS","parseOffset","basePlacement","useHeight","fragments","frag","divider","splitRegex","mergeWithPrevious","index2","shiftvariation","_data$offsets","isVertical","shiftOffsets","preventOverflow","transformProp","popperStyles","primary","escapeWithReference","secondary","keepTogether","opSide","_data$offsets$arrow","arrowElement","sideCapitalized","altSide","arrowElementSize","popperMarginSide","popperBorderSide","sideValue","placementOpposite","flipOrder","refOffsets","overlapsRef","overflowsLeft","overflowsRight","overflowsTop","overflowsBottom","overflowsBoundaries","flippedVariation","flipVariations","getOppositeVariation","inner","subtractLength","bound","computeStyle","legacyGpuAccelerationOption","gpuAcceleration","offsetParentRect","prefixedProperty","invertTop","invertLeft","applyStyle","modifierOptions","Defaults","Popper","jquery","Utils","PopperUtils","replaceChildWithChildren","oldChild","newChildren","lastNewChild","replaceChild","tokensToNodes","linkifyElementHelper","childElement","nextSibling","getDefaultRender","linkifyElement","linkify","normalize","helper","linkifyNl2br","linkifyAttributes","linkifyDefaultProtocol","linkifyEvents","linkifyFormat","linkifyFormatHref","linkifyTagname","linkifyTarget","linkifyRel","linkifyValidate","linkifyIgnoreTags","linkifyClassName","supportsPDFs","createAXO","supportsPdfActiveX","buildFragmentString","embedError","_embed","getTargetElement","generatePDFJSiframe","generateEmbedElement","pdfobjectversion","supportsPdfMimeType","mimeTypes","isIOS","ActiveXObject","pdfParams","targetSelector","targetNode","pdfOpenFragment","PDFJS_URL","fullURL","page","pdfOpenParams","fallbackLink","forcePDFJS","fallbackHTML","fallbackHTML_default","embed","_typeof2","_defineProperties","_getPrototypeOf","isNativeReflectConstruct","sham","Proxy","_construct","Parent","Class","_possibleConstructorReturn","ReferenceError","_get","receiver","_superPropBase","consolePrefix","nodeList","previousWarnOnceMessages","warnOnce","callIfFunction","DismissReason","backdrop","esc","swalClasses","iconTypes","previousBodyPadding","hasClass","focusInput","addOrRemoveClass","getChildByClass","isVisible","getClientRects","getContainer","elementByClass","getPopup","getIcons","getTitle","getContent","getProgressSteps","progresssteps","getConfirmButton","confirm","getCancelButton","getActions","getFooter","getCloseButton","getFocusableElements","focusableElementsWithTabindex","otherFocusableElements","uniqueArray","isModal","isToast","isNodeEnv","sweetHTML","question","radio","checkbox","textarea","validationerror","oldInputVal","rangeOutput","toast","resetValidationError","Swal","oninput","onchange","parseHtmlToContainer","cloneNode","animationEndEvent","testEl","transEndEventNames","renderProgressSteps","progressStepsContainer","currentProgressStep","getQueueStep","progressSteps","progresscircle","activeprogressstep","progressline","progressStepsDistance","fixScrollbar","msMaxTouchPoints","scrollDiv","measureScrollbar","globalState","onAfterClose","removePopupAndResetState","restoreFocusTimeout","previousActiveElement","keydownTarget","keydownHandler","keydownListenerCapture","keydownHandlerAdded","shown","iosfix","undoIOSfix","noanimation","swalCloseEventFinished","withNoNewKeyword","ParentSwal","NoNewKeywordSwal","defaultParams","titleText","customClass","heightAuto","allowOutsideClick","allowEscapeKey","allowEnterKey","stopKeydownPropagation","showConfirmButton","preConfirm","confirmButtonAriaLabel","confirmButtonClass","cancelButtonText","cancelButtonAriaLabel","cancelButtonColor","cancelButtonClass","buttonsStyling","reverseButtons","focusConfirm","focusCancel","showCloseButton","closeButtonAriaLabel","showLoaderOnConfirm","imageWidth","imageHeight","imageAlt","imageClass","inputPlaceholder","inputOptions","inputAutoTrim","inputAttributes","inputValidator","grow","onBeforeOpen","onOpen","useRejections","expectRejections","deprecatedParams","toastIncompatibleParams","isValidParameter","paramName","isDeprecatedParameter","showWarningsForParams","deprecationWarning","currentSteps","showLoading","confirmButton","cancelButton","staticMethods","argsToParams","adaptInputValidator","legacyValidator","extraParams","closePopup","closeToast","clickConfirm","clickCancel","getButtonsWrapper","fire","mixinParams","MixinSwal","resetQueue","queueResult","dismiss","insertQueueStep","deleteQueueStep","enableLoading","getTimerLeft","_Symbol","idCounter","WeakMap$1","hOP","privateProps","innerParams","domCache","hideLoading","Timer","defaultInputValidators","validationMessage","setParameters","oldPopup","targetElement","popupBackgroundColor","successIconParts","innerText","renderTitle","renderContent","growClass","renderIcon","renderImage","removeProperty","confirmButtonBackgroundColor","borderLeftColor","borderRightColor","renderActions","currentInstance","fade","iOSfix","activeElement","instanceMethods","disableLoading","getInput","inputType","enableButtons","disableButtons","enableConfirmButton","disableConfirmButton","enableInput","radios","disableInput","showValidationError","popupComputedStyle","inputerror","setProgressSteps","updatedParams","showProgressSteps","hideProgressSteps","_main","userParams","succeedWith","dismissWith","errorWith","error$$1","preConfirmPromise","preConfirmValue","onButtonEvent","targetedConfirm","targetedCancel","getInputValue","validationPromise","onclick","onmouseover","onmouseout","onmousedown","ignoreOutsideClick","onmouseup","focusableElements","isComposing","btnIndex","outerHTML","populateInputOptions","inputTypes","_i3","inputContainer","attrName","rangeInput","inputOption","optionValue","optionLabel","radioValue","radioLabel","radioInput","radioLabelElement","checkboxInput","processInputOptions","formatInputOptions","SweetAlert","outerParams","_currentInstance","SwalWithGlobalDefaults","_ParentSwal","_swalDefaults","setDefaults","Sweetalert2","sweetAlert","styleSheet","linkifyJq","$checkbox","$label","not","defaultDate","$input","calendarDate","parents","componentRequireContext","partial","MSIE","pargs","holder","$$","$$len","$task","listner","HTC","NLProto","HTCProto","FF_ITERATOR","runtime","Op","hasOwn","$Symbol","iteratorSymbol","asyncIteratorSymbol","toStringTagSymbol","innerFn","outerFn","tryLocsList","protoGenerator","GenStateSuspendedStart","GenStateExecuting","GenStateCompleted","ContinueSentinel","NativeIteratorPrototype","Gp","PromiseImpl","record","unwrapped","previousPromise","doneResult","delegateResult","locs","iteratorMethod","genFun","ctor","skipTempReset","rootRecord","exception","caught","hasCatch","hasFinally","finallyEntry","thrown","regeneratorRuntime","accidentalStrictMode","globalThis","sym","Util","$$$1","TRANSITION_END","transitionEndEmulator","one","triggerTransitionEnd","getUID","getSelectorFromElement","getTransitionDurationFromElement","reflow","trigger","supportsTransitionEnd","isElement","typeCheckConfig","configTypes","expectedTypes","valueType","emulateTransitionEnd","special","bindType","delegateType","handleObj","DATA_KEY","JQUERY_NO_CONFLICT","Event","CLOSE","CLOSED","CLICK_DATA_API","ClassName","_proto","rootElement","_getRootElement","_triggerCloseEvent","isDefaultPrevented","_removeElement","closeEvent","_destroyElement","_jQueryInterface","$element","_handleDismiss","alertInstance","noConflict","Selector","FOCUS_BLUR_DATA_API","triggerChangeEvent","addAriaPressed","toggleClass","Carousel","EVENT_KEY","Default","slide","DefaultType","Direction","SLIDE","SLID","KEYDOWN","MOUSEENTER","MOUSELEAVE","TOUCHEND","LOAD_DATA_API","_interval","_activeElement","_isSliding","touchTimeout","_config","_getConfig","_indicatorsElement","_addEventListeners","_slide","nextWhenVisible","cycle","visibilityState","activeIndex","_getItemIndex","_keydown","makeArray","_getItemByDirection","isNextDirection","isPrevDirection","lastItemIndex","_triggerSlideEvent","relatedTarget","eventDirectionName","targetIndex","slideEvent","_setActiveIndicatorElement","nextIndicator","directionalClassName","orderClassName","activeElementIndex","nextElement","nextElementIndex","isCycling","slidEvent","_dataApiClickHandler","slideIndex","$carousel","SHOW","SHOWN","HIDE","HIDDEN","Dimension","_isTransitioning","_triggerArray","tabToggles","_selector","_getParent","_addAriaAndCollapsedClass","actives","activesData","startEvent","dimension","_getDimension","setTransitioning","scrollSize","isTransitioning","_getTargetFromElement","triggerArray","$trigger","$target","REGEXP_KEYDOWN","ARROW_UP_KEYCODE","CLICK","KEYDOWN_DATA_API","KEYUP_DATA_API","AttachmentMap","boundary","_popper","_getMenuElement","_inNavbar","_detectNavbar","_getParentFromElement","_clearMenus","showEvent","referenceElement","_getPopperConfig","_getPlacement","$parentDropdown","offsetConf","popperConfig","toggles","dropdownMenu","hideEvent","_dataApiKeydownHandler","FOCUSIN","RESIZE","CLICK_DISMISS","KEYDOWN_DISMISS","MOUSEUP_DISMISS","MOUSEDOWN_DISMISS","_dialog","_backdrop","_isShown","_isBodyOverflowing","_ignoreBackdropClick","_scrollbarWidth","_checkScrollbar","_setScrollbar","_adjustDialog","_setEscapeEvent","_setResizeEvent","_showBackdrop","_showElement","_hideModal","handleUpdate","_enforceFocus","shownEvent","transitionComplete","_this4","_this5","_this6","_this7","_resetAdjustments","_resetScrollbar","_removeBackdrop","_this8","appendTo","backdropTransitionDuration","callbackRemove","_backdropTransitionDuration","isModalOverflowing","_getScrollbarWidth","_this9","actualPadding","calculatedPadding","actualMargin","calculatedMargin","_this10","BSCLS_PREFIX_REGEX","fallbackPlacement","AUTO","TOP","RIGHT","BOTTOM","LEFT","HoverState","INSERTED","FOCUSOUT","Trigger","_isEnabled","_timeout","_hoverState","_activeTrigger","tip","_setListeners","toggleEnabled","dataKey","_getDelegateConfig","_isWithActiveTrigger","_enter","_leave","getTipElement","isWithContent","isInTheDom","tipId","_getAttachment","addAttachmentClass","_handlePopperPlacementChange","_fixTransition","prevHoverState","_cleanTipClass","CLASS_PREFIX","$tip","setElementContent","eventIn","eventOut","_fixTitle","titleType","tabClass","initConfigAnimation","_Tooltip","_getContent","ScrollSpy","ACTIVATE","SCROLL","OffsetMethod","_scrollElement","_targets","_activeTarget","_scrollHeight","_process","autoMethod","offsetMethod","offsetBase","_getScrollTop","_getScrollHeight","targetBCR","_getOffsetHeight","maxScroll","_activate","_clear","$link","scrollSpys","$spy","listElement","itemSelector","hiddenEvent","_transitionComplete","dropdownChild","dropdownElement","Scrollspy","S2","amd","requirejs","undef","_req","makeMap","handlers","waiting","defining","aps","jsSuffixRegExp","hasProp","baseName","nameParts","nameSegment","mapValue","foundMap","foundI","foundStarMap","starI","baseParts","starMap","nodeIdCompat","makeRequire","relName","forceSync","makeNormalize","makeLoad","depName","callDep","splitPrefix","makeRelParts","makeConfig","relParts","plugin","relResourceName","deps","cjsModule","usingExports","callbackType","cfg","_defined","_$","getMethods","theClass","Extend","ChildClass","SuperClass","__hasProp","BaseConstructor","__super__","Decorate","DecoratorClass","decoratedMethods","superMethods","DecoratedClass","argCount","calledConstructor","ctr","superMethod","calledMethod","originalMethod","decoratedMethod","Observable","_type","generateChars","_convertData","originalKey","dataLevel","hasScroll","$el","escapeMarkup","markup","replaceMap","appendMany","$nodes","$jqNodes","__cache","GetUniqueElementId","select2Id","StoreData","GetData","RemoveData","Results","dataAdapter","$results","displayMessage","$message","hideMessages","$options","results","$option","$dropdown","sorter","highlightFirstItem","$selected","ensureHighlightVisible","setClasses","selectedIds","inArray","loadingMore","$loading","prepend","_resultId","$children","$child","$childrenContainer","$container","$highlighted","getHighlightedResults","nextIndex","$next","eq","currentOffset","nextTop","nextOffset","outerHeight","nextBottom","mousewheel","isAtTop","isAtBottom","evt","originalEvent","offsetDelta","BACKSPACE","TAB","ENTER","SHIFT","CTRL","ALT","ESC","PAGE_UP","PAGE_DOWN","END","HOME","UP","DOWN","DELETE","BaseSelection","$selection","resultsId","_handleBlur","_attachCloseHandler","_detachCloseHandler","$select","SingleSelection","$rendered","selectionContainer","MultipleSelection","$selections","Placeholder","decorated","normalizePlaceholder","createPlaceholder","$placeholder","singlePlaceholder","AllowClear","_handleClear","_handleKeyboardClear","$clear","previousVal","unselectData","prevented","removeAll","$remove","Search","$search","$searchContainer","_transferTabIndex","_keyUpPrevented","$previousChoice","searchRemoveChoice","disableInputEvents","handleSearch","searchHadFocus","resizeSearch","term","EventRelay","relayEvents","preventableEvents","Translation","_cache","loadPath","BaseAdapter","generateResultId","SelectAdapter","currentData","unselect","addOptions","normalizedData","_normalizeItem","matcher","ArrayAdapter","convertToOptions","elm","$existing","existingIds","onlyItem","$existingOption","existingData","$newOption","replaceWith","AjaxAdapter","ajaxOptions","_applyDefaults","processResults","transport","$request","_request","abort","_queryTimeout","Tags","createTag","insertTag","checkChildren","_removeOldTags","_lastTag","Tokenizer","tokenizer","dropdown","createAndSelect","tokenData","termChar","MinimumInputLength","$e","minimumInputLength","minimum","MaximumInputLength","maximumInputLength","maximum","MaximumSelectionLength","maximumSelectionLength","showSearch","HidePlaceholder","removePlaceholder","modifiedData","InfiniteScroll","lastParams","$loadingMore","createLoadingMore","showLoadingMore","isLoadMoreVisible","loadMore","pagination","more","AttachBody","$dropdownParent","setupResultsEvents","_showDropdown","_attachPositioningHandler","_positionDropdown","_resizeDropdown","_hideDropdown","_detachPositioningHandler","$dropdownContainer","scrollEvent","resizeEvent","orientationEvent","$watchers","$window","isCurrentlyAbove","isCurrentlyBelow","newDirection","viewport","enoughRoomAbove","enoughRoomBelow","$offsetParent","parentOffset","outerWidth","countResults","MinimumResultsForSearch","SelectOnClose","_handleSelectOnClose","originalSelect2Event","$highlightedResults","CloseOnSelect","_selectTriggered","errorLoading","inputTooLong","overChars","inputTooShort","maximumSelected","noResults","searching","removeAllItems","ResultsList","SelectionSearch","DIACRITICS","SelectData","ArrayData","AjaxData","DropdownSearch","EnglishTranslation","tokenSeparators","Query","amdBase","initSelection","InitSelection","resultsAdapter","selectOnClose","dropdownAdapter","SearchableDropdown","dropdownCssClass","dropdownCss","adaptDropdownCssClass","DropdownCSS","selectionAdapter","containerCssClass","containerCss","adaptContainerCssClass","ContainerCSS","baseLanguage","languages","languageNames","amdLanguageBase","baseTranslation","customTranslation","stripDiacritics","dropdownAutoWidth","scrollAfterSelect","templateResult","templateSelection","convertedData","fromElement","InputCompat","excludedData","upperCaseLetter","letter","dataName","dataValue","_generateId","DataAdapter","_placeContainer","SelectionAdapter","DropdownAdapter","ResultsAdapter","_bindAdapters","_registerDomEvents","_registerDataEvents","_registerSelectionEvents","_registerDropdownEvents","_registerResultsEvents","_registerEvents","initialData","_syncAttributes","_resolveWidth","WIDTH","styleWidth","_syncA","_syncS","_syncSubtree","MozMutationObserver","_observer","nonRelayEvents","toggleDropdown","actualTrigger","preTriggerMap","preTriggerName","preTriggerArgs","hasFocus","newVal","thisMethods","instanceOptions","dateTimePicker","viewDate","use24Hours","actualFormat","parseFormats","currentViewMode","unset","widget","minViewModeNumber","datePickerModes","clsName","navFnc","navStep","viewModes","verticalModes","horizontalModes","toolbarPlacements","keyMap","keyState","hasTimeZone","getMoment","returnMoment","useStrict","granularity","hasTime","hasDate","getDatePickerTemplate","headTemplate","calendarWeeks","contTemplate","getTimePickerMainTemplate","topRow","middleRow","bottomRow","tooltips","incrementHour","up","pickHour","decrementHour","down","incrementMinute","pickMinute","decrementMinute","incrementSecond","pickSecond","decrementSecond","togglePeriod","getTimePickerTemplate","hoursView","minutesView","secondsView","getToolbar","showTodayButton","sideBySide","selectTime","showClear","showClose","getTemplate","dateView","timeView","toolbar","collapse","inline","toolbarPlacement","dataToOptions","eData","dataOptions","dateOptions","widgetPositioning","widgetParent","notifyEvent","oldDate","viewUpdate","showMode","fillDow","endOf","isInDisabledDates","testDate","disabledDates","isInEnabledDates","enabledDates","isInDisabledHours","disabledHours","isInEnabledHours","enabledHours","targetMoment","daysOfWeekDisabled","disabledTimeIntervals","isBetween","fillMonths","spans","monthsShort","updateMonths","monthsView","monthsViewHeader","prevYear","selectYear","nextYear","updateYears","yearsView","yearsViewHeader","startYear","endYear","prevDecade","selectDecade","nextDecade","updateDecades","endDecadeYear","decadesView","decadesViewHeader","startDecade","endDecade","startedAt","minDateDecade","maxDateDecade","prevCentury","nextCentury","fillDate","daysView","daysViewHeader","clsNames","prevMonth","dayViewHeaderFormat","fillHours","table","currentHour","fillMinutes","currentMinute","stepping","fillSeconds","currentSecond","fillTime","timeComponents","keepInvalid","transitioning","collapseData","parseInputDate","inputDate","pickerSwitch","selectDay","keepOpen","incrementHours","incrementMinutes","incrementSeconds","decrementHours","decrementMinutes","decrementSeconds","togglePicker","$parent","showPicker","showHours","showMinutes","showSeconds","selectHour","selectMinute","selectSecond","todaysDate","doAction","currentMoment","useCurrentGranularity","ignoreReadonly","focusOnShow","keydown","keyBindKeys","allModifiersPressed","pressedKeys","pressedModifiers","currentKey","pressed","keyBinds","keyup","parsedDate","attachDatePickerElementEvents","allowInputToggle","detachDatePickerElementEvents","indexGivenDates","givenDatesArray","givenDatesIndexed","dDate","indexGivenHours","givenHoursArray","givenHoursIndexed","initFormatting","formatInput","localeData","longDateFormat","formatInput2","extraFormats","newFormat","newZone","formats","previousValue","tries","useCurrentOptions","viewMode","datepickerInput","returnValue","isInstance","_options","pageUp","pageDown"],"mappings":";sVAEAA,IAAEC,MAAM,CACNC,QAAS,SAASC,GAChB,OAAAC,EAAeD,IACb,IAAK,SACH,OAAOE,MAAMF,GACf,IAAK,UACH,OAAQA,EACV,IAAK,SACH,OAAOH,IAAEM,QAAQN,IAAEO,KAAKJ,IAC1B,QACE,OAAOH,IAAEM,QAAQH,KAGvBK,UAAW,SAASL,GAClB,OAAQH,IAAEE,QAAQC,IAEpBM,iBAAkB,SAASC,EAAYC,GACrC,OAAOD,EAAWE,QAAO,SAACC,EAAGC,GAK3B,OAJAH,EACGC,QAAO,SAACG,EAAOC,EAAKC,EAACC,GAAA,IAAIC,EAAMD,EAANC,OAAM,OAC9BJ,EAAMD,EAAEE,IAAQD,EAAMD,EAAEE,MAAUC,EAAI,IAAME,EAAS,GAAK,MAAKN,GAC9DO,KAAKN,GACHD,IACN,MAEJ,CACDQ,OAAO,IAIMrB,MAAC,G,8BChChB,ifAASI,EAAQU,GAAgC,OAAOV,EAAU,mBAAqBkB,QAAU,iBAAmBA,OAAOC,SAAW,SAAUT,GAAK,cAAcA,GAAO,SAAUA,GAAK,OAAOA,GAAK,mBAAqBQ,QAAUR,EAAEU,cAAgBF,QAAUR,IAAMQ,OAAOG,UAAY,gBAAkBX,GAAMV,EAAQU,GA0BlT,SAAST,EAAMqB,GACpB,OAAOC,OAAOD,KAAWA,EAQ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O,IACN,CACD+1C,SAAU,cACV/1C,MAAO,KACN,CACD+1C,SAAU,cACV/1C,MAAO,KACN,CACD+1C,SAAU,SACV/1C,MAAO,GACN,CACD+1C,SAAU,SACV/1C,MAAO,GACN,CACD+1C,SAAU,SACV/1C,MAAO,IACN,CACD+1C,SAAU,SACV/1C,MAAO,IACN,CACD+1C,SAAU,SACV/1C,MAAO,GACN,CACD+1C,SAAU,SACV/1C,MAAO,GACN,CACD+1C,SAAU,SACV/1C,MAAO,IACN,CACD+1C,SAAU,SACV/1C,MAAO,IACN,CACD+1C,SAAU,SACV/1C,MAAO,IACN,CACD+1C,SAAU,OACV/1C,MAAO,GACN,CACD+1C,SAAU,OACV/1C,MAAO,GACN,CACD+1C,SAAU,OACV/1C,MAAO,GACN,CACD+1C,SAAU,OACV/1C,MAAO,IACN,CACD+1C,SAAU,MACV/1C,MAAO,GACN,CACD+1C,SAAU,MACV/1C,MAAO,GACN,CACD+1C,SAAU,MACV/1C,MAAO,GACN,CACD+1C,SAAU,MACV/1C,MAAO,GACN,CACD+1C,SAAU,MACV/1C,MAAO,GACN,CACD+1C,SAAU,OACV/1C,MAAO,GACN,CACD+1C,SAAU,QACV/1C,MAAO,GACN,CACD+1C,SAAU,QACV/1C,MAAO,GACN,CACD+1C,SAAU,QACV/1C,MAAO,GACN,CACD+1C,SAAU,QACV/1C,MAAO,GACN,CACD+1C,SAAU,OACV/1C,MAAO,GACN,CACD+1C,SAAU,OACV/1C,MAAO,GACN,CACD+1C,SAAU,OACV/1C,MAAO,GACN,CACD+1C,SAAU,OACV/1C,MAAO,IACN,CACD+1C,SAAU,OACV/1C,MAAO,IACN,CACD+1C,SAAU,OACV/1C,MAAO,KACN,CACD+1C,SAAU,OACV/1C,MAAO,KACN,CACD+1C,SAAU,OACV/1C,MAAO,KACN,CACD+1C,SAAU,OACV/1C,MAAO,KACN,CACD+1C,SAAU,OACV/1C,MAAO,KACN,CACD+1C,SAAU,OACV/1C,MAAO,KACN,CACD+1C,SAA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ACV,SAAU,KACV,SAAU,KACV,SAAU,KACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,OAAQ,IACR,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,OAAQ,IACR,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,KACV,SAAU,KACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,KACV,SAAU,KACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,OAAQ,IACR,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,KACV,SAAU,KACV,SAAU,KACV,SAAU,KACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,KACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,OAAQ,IACR,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,KACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,OAAQ,IACR,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,KACV,OAAQ,KACR,SAAU,KACV,SAAU,KACV,SAAU,KACV,SAAU,KACV,SAAU,KACV,SAAU,KACV,SAAU,KACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,KACV,SAAU,KACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,OAAQ,IACR,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,KACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,OAAQ,IACR,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,KACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,KACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,OAAQ,IACR,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,KACV,SAAU,KACV,SAAU,KACV,SAAU,KACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,KACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,OAAQ,IACR,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,OAAQ,IACR,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,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AEsvB,QAAQ9I,IAAI,EAAG,QAG/Bk8T,MAAO,WACL97U,KAAK4sB,QAEP49D,OAAQ,WACNxqF,KAAK4sB,QAMP,gBAAiB,SAAsBmiW,GAChCA,GAGDA,EAAO7wW,KAAK,eAAeqsH,GAAG,aAChCwkP,EAAO7wW,KAAK,oCAAoC6iN,SAGpD3gO,EAAG,WACDJ,KAAKyQ,KAAKzQ,KAAK4vX,cAEjB,OAAU,WACR5vX,KAAK0e,UAGT+yF,OAAO,EACP4nR,kBAAkB,EAClBtF,uBAAuB,EACvBL,eAAe,EACfE,cAAc,EACdnF,UAAU,GAEL5qQ,EAAEj5G,GAAGqhS,qBA7uE0B,4DALxC,I","file":"js/application-15ac05835f5086a31323.chunk.js","sourcesContent":["import _ from 'lodash'\n\n_.mixin({\n isBlank: function(object) {\n switch (typeof object) {\n case 'number':\n return isNaN(object);\n case 'boolean':\n return !object\n case 'string':\n return _.isEmpty(_.trim(object));\n default:\n return _.isEmpty(object);\n }\n },\n isPresent: function(object) {\n return !_.isBlank(object);\n },\n groupByRecursive: function(collection, groups) {\n return collection.reduce((r, o) => {\n groups\n .reduce((group, key, i, { length }) =>\n group[o[key]] = group[o[key]] || (i + 1 === length ? [] : {}), r)\n .push(o);\n return r;\n }, {});\n }\n}, {\n chain: false\n});\n\n\nexport default _\n","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/**\r\n * A collection of utility functions for various type checks and conversion\r\n * @todo Review unused functions for removal\r\n * @hidden\r\n */\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { percent, isPercent } from \"./Percent\";\n/**\r\n * ============================================================================\r\n * TYPE CHECK\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Returns `true` if value is not a number (NaN).\r\n *\r\n * @param value Input value\r\n * @return Is NaN?\r\n * @deprecated Is not used anywhere. JS built-in isNaN is used everywhere. Maybe we don't need this, or if we do, then we should use it everywhere\r\n */\nexport function isNaN(value) {\n return Number(value) !== value;\n}\n/**\r\n * Returns a type of the value.\r\n *\r\n * @param value Input value\r\n * @return Type of the value\r\n */\nexport function getType(value) {\n return {}.toString.call(value);\n}\n/**\r\n * Returns a default value if the passed in value is empty.\r\n *\r\n * @param value Input value\r\n * @param optional Default value\r\n * @return Value or default value whichever is available\r\n * @deprecated Not used anywhere\r\n */\nexport function getDefault(value, optional) {\n return value || optional;\n}\n/**\r\n * Checks if the passed in value is a string.\r\n *\r\n * @param value Value\r\n * @return Is string?\r\n * @throws {Error}\r\n * @deprecated Not used anywhere\r\n */\nexport function checkString(value) {\n if (typeof value === \"string\") {\n return true;\n } else {\n throw new Error(\"Expected a string but got \" + getType(value));\n }\n}\n/**\r\n * Checks if the passed in value is a boolean.\r\n *\r\n * @param value Value\r\n * @return Is boolean?\r\n * @throws {Error}\r\n * @deprecated Not used anywhere\r\n */\nexport function checkBoolean(value) {\n if (typeof value === \"boolean\") {\n return true;\n } else {\n throw new Error(\"Expected a boolean but got \" + getType(value));\n }\n}\n/**\r\n * Checks if the passed in value is a number.\r\n *\r\n * @param value Value\r\n * @return Is number?\r\n * @throws {Error}\r\n */\nexport function checkNumber(value) {\n if (typeof value === \"number\") {\n if (isNaN(value)) {\n throw new Error(\"Expected a number but got NaN\");\n }\n } else {\n throw new Error(\"Expected a number but got \" + getType(value));\n }\n return true;\n}\n/**\r\n * Checks if the passed in value is an object.\r\n *\r\n * @param value Value\r\n * @return Is object?\r\n * @throws {Error}\r\n * @todo Is the input type correct?\r\n * @deprecated Not used anywhere\r\n */\nexport function checkObject(value) {\n var t = getType(value);\n if (t === \"[object Object]\") {\n return true;\n } else {\n throw new Error(\"Expected an object but got \" + t);\n }\n}\n/**\r\n * Checks if the passed in value is an array.\r\n *\r\n * @param value Value\r\n * @return Is array?\r\n * @throws {Error}\r\n * @deprecated Not used anywhere\r\n */\nexport function checkArray(value) {\n if (Array.isArray(value)) {\n return true;\n } else {\n throw new Error(\"Expected an array but got \" + getType(value));\n }\n}\n/**\r\n * Checks if the passed in value is a Date object.\r\n *\r\n * @param value Value\r\n * @return Is Date object?\r\n * @throws {Error}\r\n * @deprecated Not used anywhere\r\n */\nexport function checkDate(value) {\n var t = getType(value);\n if (t === \"[object Date]\") {\n return true;\n } else {\n throw new Error(\"Expected a date but got \" + t);\n }\n}\n/**\r\n * ============================================================================\r\n * TYPE CASTING\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Casts string or a number into string.\r\n *\r\n * @param value Input\r\n * @return String value\r\n * @deprecated Not used anywhere\r\n */\nexport function castString(value) {\n if (typeof value === \"string\") {\n return value;\n } else if (typeof value === \"number\") {\n return \"\" + value;\n } else {\n throw new Error(\"Expected a string or number but got \" + getType(value));\n }\n}\n/**\r\n * Casts string or a number into a number.\r\n *\r\n * @param value Input value\r\n * @return Number value\r\n * @throws {Error}\r\n */\nexport function castNumber(value) {\n if (typeof value === \"string\") {\n var number = +value;\n if (isNaN(number)) {\n throw new Error(\"Cannot cast string \" + JSON.stringify(value) + \" to a number\");\n } else {\n return number;\n }\n } else if (typeof value === \"number\") {\n if (isNaN(value)) {\n throw new Error(\"Expected a number but got NaN\");\n } else {\n return value;\n }\n } else {\n var t = getType(value);\n if (t === \"[object Date]\") {\n return value.getTime();\n } else {\n throw new Error(\"Expected a string, number, or date but got \" + t);\n }\n }\n}\n/**\r\n * Casts number, string or Date into a Date object.\r\n *\r\n * @param value Input value\r\n * @return Date object\r\n * @deprecated Not used anywhere\r\n * @throws {Error}\r\n * @hidden\r\n * @deprecated\r\n */\n/*export function castDate(value: string | number | Date, formatter?: DateFormatter): Date {\r\n if (typeof value === \"string\") {\r\n if (formatter) {\r\n return formatter.parse(value);\r\n }\r\n return new Date(value);\r\n\r\n } else if (typeof value === \"number\") {\r\n return new Date(value);\r\n\r\n } else {\r\n const t = getType(value);\r\n\r\n if (t === \"[object Date]\") {\r\n return value;\r\n\r\n } else {\r\n throw new Error(\"Expected a string, number, or date but got \" + t);\r\n }\r\n }\r\n}*/\n/**\r\n * ============================================================================\r\n * QUICK CONVERSION\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Converts any value into `boolean`.\r\n *\r\n * @param value Source value\r\n * @return `true` or `false`\r\n */\nexport function toBoolean(value) {\n return value ? true : false;\n}\n/**\r\n * Converts any value into a `number`.\r\n *\r\n * @param value Source value\r\n * @return Number representation of value\r\n */\nexport function toNumber(value) {\n if (hasValue(value) && !isNumber(value)) {\n var converted = Number(value);\n if (isNaN(converted) && isString(value) && value != \"\") {\n return toNumber(value.replace(/[^0-9.\\-]+/g, ''));\n }\n return converted;\n }\n return value;\n}\n/**\r\n * Converts any value into a string (text).\r\n *\r\n * @param value Source value\r\n * @return String representation of the input\r\n */\nexport function toText(value) {\n if (hasValue(value) && !isString(value)) {\n if (isNumber(value)) {\n return castString(value);\n } else if (isObject(value)) {\n return value.toString();\n }\n }\n return value;\n}\n/**\r\n * Converts any value to a number or [[Percent]].\r\n *\r\n * If the parameter is a string and contains \"%\", it will\r\n * convert it into a [[Percent]].\r\n *\r\n * Otherwise, it will convert into a number.\r\n *\r\n * @param value Number or percent\r\n * @return Percent object\r\n */\nexport function toNumberOrPercent(value) {\n if (!hasValue(value) || isNumber(value) || isPercent(value)) {\n return value;\n }\n if (isString(value) && value.indexOf(\"%\") != -1) {\n return percent(toNumber(value));\n }\n return toNumber(value);\n}\n/**\r\n * Checks if a variable has a value.\r\n *\r\n * @param a Input value\r\n * @returns Has value?\r\n */\nexport function hasValue(a) {\n return a != null;\n}\n/**\r\n * Returns a value or throws an {Error} exception if the variable has not\r\n * value.\r\n *\r\n * @param a Input value\r\n * @returns Value\r\n */\nexport function getValue(a) {\n if (hasValue(a)) {\n return a;\n } else {\n throw new Error(\"Value doesn't exist\");\n }\n}\n/**\r\n * Returns a value, or returns the default value if it doesn't have a value.\r\n *\r\n * @param a Input value\r\n * @returns Value\r\n */\nexport function getValueDefault(a, defaultValue) {\n if (hasValue(a)) {\n return a;\n } else {\n return defaultValue;\n }\n}\n/**\r\n * ============================================================================\r\n * TYPE CHECK\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Checks if parameter is `Date`.\r\n *\r\n * @param value Input value\r\n * @return Is Date?\r\n */\nexport function isDate(value) {\n return getType(value) === \"[object Date]\";\n}\n/**\r\n * Checks if parameter is `string`.\r\n *\r\n * @param value Input value\r\n * @return Is string?\r\n */\nexport function isString(value) {\n return typeof value === \"string\";\n}\n/**\r\n * Checks if parameter is `number`.\r\n *\r\n * @param value Input value\r\n * @return Is number?\r\n */\nexport function isNumber(value) {\n return typeof value === \"number\" && Number(value) == value;\n}\n/**\r\n * Checks if parameter is `object`.\r\n *\r\n * @param value Input value\r\n * @return Is object?\r\n */\nexport function isObject(value) {\n return _typeof(value) === \"object\";\n}\n/**\r\n * Checks if parameter is `Array`.\r\n *\r\n * @param value Input value\r\n * @return Is Array?\r\n */\nexport function isArray(value) {\n return Array.isArray(value);\n}","import Btn from '../components/shared/Btn';\nimport CheckWithLabel from '../components/shared/CheckWithLabel';\nimport CheckBoxWithLabel from '../components/shared/CheckBoxWithLabel';\nimport DateSelect from '../components/shared/DateSelect';\nimport dayHelpers from '../components/shared/dayHelpers';\nimport DaysOfWeekSelect from '../components/shared/DaysOfWeekSelect';\nimport DropdownSelect from '../components/shared/DropdownSelect';\nimport InlineVariable from '../components/shared/InlineVariable';\nimport Link from '../components/shared/Link';\nimport ListGroup from '../components/shared/ListGroup';\nimport ListGroupItem from '../components/shared/ListGroupItem';\nimport Modal from '../components/shared/Modal';\nimport ModelErrors from '../components/shared/ModelErrors';\nimport NoWrap from '../components/shared/NoWrap';\nimport Popover from '../components/shared/Popover';\nimport Scroller from '../components/shared/Scroller';\nimport StatelessModal from '../components/shared/StatelessModal';\nimport StatelessPopover from '../components/shared/StatelessPopover';\nimport TickCross from '../components/shared/TickCross';\nimport RadioInput from '../components/shared/RadioInput';\nimport TextAreaInput from '../components/shared/TextAreaInput';\nimport DateInput from '../components/shared/DateInput';\nimport TextInput from '../components/shared/TextInput';\nimport ShowDate from '../components/shared/ShowDate';\nimport StyledDialog from '../components/shared/StyledDialog';\nimport { TypoSuccess, TypoWarning, TypoError, TypoHaveInfo, TypoNeedInfo, TextSmall, TextSmallMuted, BoxVendorServiceArea, FrequencyChip, TextMuted } from '../components/shared/VectorMaterial';\nimport theme from '../theme';\n\nexport {\n Btn,\n CheckWithLabel,\n CheckBoxWithLabel,\n DateSelect,\n dayHelpers,\n DaysOfWeekSelect,\n DropdownSelect,\n InlineVariable,\n Link,\n ListGroup,\n ListGroupItem,\n Modal,\n ModelErrors,\n NoWrap,\n Popover,\n Scroller,\n StatelessModal,\n StatelessPopover,\n TickCross,\n RadioInput,\n TextAreaInput,\n DateInput,\n TextInput,\n ShowDate,\n StyledDialog,\n TextSmallMuted,\n TextSmall,\n BoxVendorServiceArea,\n FrequencyChip,\n TextMuted,\n theme,\n TypoHaveInfo,\n TypoNeedInfo,\n TypoSuccess, TypoWarning, TypoError,\n};\n","/**\r\n * A collection of Math-related functions\r\n *\r\n * @todo Comment trigonometric functions?\r\n */\nimport * as $type from \"./Type\";\n/**\r\n * ============================================================================\r\n * CONSTANTS\r\n * ============================================================================\r\n * @hidden\r\n */\nexport var PI = Math.PI;\nexport var HALFPI = PI / 2;\nexport var RADIANS = PI / 180;\nexport var DEGREES = 180 / PI;\n/**\r\n * Converts any value and fits it into a specific value range.\r\n *\r\n * @param value Source value\r\n * @param min Minimum allowable value\r\n * @param max Maximum allowable value\r\n * @return Number\r\n */\nexport function toNumberRange(value, min, max) {\n if ($type.hasValue(value)) {\n value = $type.toNumber(value);\n return fitToRange(value, min, max);\n }\n return value;\n}\n/**\r\n * Rounds the numeric value to whole number or specific precision of set.\r\n *\r\n * @param value Value\r\n * @param precision Precision (number of decimal points)\r\n * @param floor In case value ends with 0.5 and precision is 0, we might need to floor the value instead of ceiling it.\r\n * @return Rounded value\r\n */\nexport function round(value, precision, floor) {\n if (!$type.isNumber(precision) || precision <= 0) {\n var rounded = Math.round(value);\n if (floor) {\n if (rounded - value == 0.5) {\n rounded--;\n }\n }\n return rounded;\n } else {\n var d = Math.pow(10, precision);\n return Math.round(value * d) / d;\n }\n}\n/**\r\n * Ceils the numeric value to whole number or specific precision of set.\r\n *\r\n * @param value Value\r\n * @param precision Precision (number of decimal points)\r\n * @return Rounded value\r\n */\nexport function ceil(value, precision) {\n if (!$type.isNumber(precision) || precision <= 0) {\n return Math.ceil(value);\n } else {\n var d = Math.pow(10, precision);\n return Math.ceil(value * d) / d;\n }\n}\n/**\r\n * Stretches `t` so that it will always be between `from` and `to`.\r\n *\r\n * @param t Number from 0 to 1\r\n * @param from Lowest possible value\r\n * @param to Highest possible value\r\n * @return Adjusted value\r\n */\nexport function stretch(t, from, to) {\n return t * (to - from) + from;\n}\n/**\r\n * Adjust numeric value so it fits to specific value range.\r\n *\r\n * @param value Value\r\n * @param minValue Lowest possible value\r\n * @param maxValue Highest possible value\r\n * @return Adjusted value\r\n */\nexport function fitToRange(value, minValue, maxValue) {\n if ($type.isNumber(minValue)) {\n if ($type.isNumber(maxValue) && maxValue < minValue) {\n var temp = maxValue;\n maxValue = minValue;\n minValue = temp;\n }\n if (value < minValue) {\n value = minValue;\n }\n }\n if ($type.isNumber(maxValue)) {\n if (value > maxValue) {\n value = maxValue;\n }\n }\n return value;\n}\n/**\r\n * Returns sine of a number.\r\n *\r\n * @param value Value\r\n * @return Sine\r\n */\nexport function sin(value) {\n return round(Math.sin(RADIANS * value), 10);\n}\n/**\r\n * Returns tan of a number.\r\n *\r\n * @param value Value\r\n * @return Sine\r\n */\nexport function tan(value) {\n return round(Math.tan(RADIANS * value), 10);\n}\n/**\r\n * Returns cosine of a number.\r\n *\r\n * @param value Value\r\n * @return Cosine\r\n */\nexport function cos(value) {\n return round(Math.cos(RADIANS * value), 10);\n}\nexport function max(left, right) {\n if ($type.isNumber(left)) {\n if ($type.isNumber(right)) {\n if (right > left) {\n return right;\n } else {\n return left;\n }\n } else {\n return left;\n }\n } else if ($type.isNumber(right)) {\n return right;\n } else {\n return null;\n }\n}\nexport function min(left, right) {\n if ($type.isNumber(left)) {\n if ($type.isNumber(right)) {\n if (right < left) {\n return right;\n } else {\n return left;\n }\n } else {\n return left;\n }\n } else if ($type.isNumber(right)) {\n return right;\n } else {\n return null;\n }\n}\n/**\r\n * Returns the closest value from the array of values to the reference value.\r\n *\r\n * @param values Array of values\r\n * @param value Reference value\r\n * @return Closes value from the array\r\n */\nexport function closest(values, referenceValue) {\n return values.reduce(function (prev, curr) {\n return Math.abs(curr - referenceValue) < Math.abs(prev - referenceValue) ? curr : prev;\n });\n}\n/**\r\n * Checks whether two ranges of values intersect.\r\n *\r\n * @param range1 Range 1\r\n * @param range2 Range 2\r\n * @return Any intersecting numbers?\r\n */\nexport function intersect(range1, range2) {\n var start1 = $type.getValue(range1.start);\n var start2 = $type.getValue(range2.start);\n var end1 = $type.getValue(range1.end);\n var end2 = $type.getValue(range2.end);\n return Math.max(start1, start2) <= Math.min(end1, end2);\n}\n/**\r\n * Inverts the range of values.\r\n *\r\n * @param range Range\r\n */\nexport function invertRange(range) {\n var start = $type.getValue(range.start);\n var end = $type.getValue(range.end);\n return {\n start: 1 - end,\n end: 1 - start\n };\n}\n/**\r\n * Returns an intersection range between two ranges of values.\r\n *\r\n * @param range1 Range 1\r\n * @param range2 Range 2\r\n * @return Intersecting value range\r\n */\nexport function intersection(range1, range2) {\n var start1 = $type.getValue(range1.start);\n var start2 = $type.getValue(range2.start);\n var end1 = $type.getValue(range1.end);\n var end2 = $type.getValue(range2.end);\n var startMax = Math.max(start1, start2);\n var endMin = Math.min(end1, end2);\n if (endMin < startMax) {\n return undefined;\n } else {\n return {\n start: startMax,\n end: endMin\n };\n }\n}\n/**\r\n * Returns pixel \"distance\" between two points.\r\n *\r\n * If second point is not specified, distance from {x:0, y:0} point is\r\n * calculated.\r\n *\r\n * @param point1 Point 1\r\n * @param point2 Point 2\r\n * @return Distance in relative pixels\r\n */\nexport function getDistance(point1, point2) {\n if (!point1) {\n return 0;\n }\n if (!point2) {\n point2 = {\n x: 0,\n y: 0\n };\n }\n return Math.sqrt(Math.pow(Math.abs(point1.x - point2.x), 2) + Math.pow(Math.abs(point1.y - point2.y), 2));\n}\n/**\r\n * Returns scale based on original and end position of the two points.\r\n *\r\n * @param point1 Current position of point 1\r\n * @param startPoint1 Start position of point 1\r\n * @param point2 Current position of point 1\r\n * @param startPoint2 Start position of point 2\r\n * @return Scale Calculated scale\r\n */\nexport function getScale(point1, startPoint1, point2, startPoint2) {\n var initialDistance = getDistance(startPoint1, startPoint2);\n var currentDistance = getDistance(point1, point2);\n return Math.abs(currentDistance / initialDistance);\n}\n/**\r\n * Returns an exact mid point between two points.\r\n *\r\n * @param point1 Position of point 1\r\n * @param point2 Position of point 2\r\n * @return Mid point Position of mid-point\r\n */\nexport function getMidPoint(point1, point2, position) {\n if (!$type.isNumber(position)) {\n position = 0.5;\n }\n return {\n \"x\": point1.x + (point2.x - point1.x) * position,\n \"y\": point1.y + (point2.y - point1.y) * position\n };\n}\n/**\r\n * Returns difference in angles between starting and ending position of two\r\n * vectors.\r\n *\r\n * @param point1 Current position of point 1\r\n * @param startPoint1 Start position of point 1\r\n * @param point2 Current position of point 1\r\n * @param startPoint2 Start position of point 2\r\n * @return Angle difference in degrees\r\n */\nexport function getRotation(point1, startPoint1, point2, startPoint2) {\n // Get start and end angles\n var startAngle = getAngle(startPoint1, startPoint2);\n var angle = getAngle(point1, point2);\n // Calculate angle\n var diff = startAngle - angle;\n if (diff < 0) {\n diff += 360;\n }\n return diff;\n}\n/**\r\n * Calculates angle of the vector based on two or one point.\r\n *\r\n * @param point1 Point 1\r\n * @param point2 Point 2\r\n * @return Angle in degrees\r\n */\nexport function getAngle(point1, point2) {\n if (!point2) {\n point2 = {\n x: point1.x * 2,\n y: point1.y * 2\n };\n }\n var diffX = point2.x - point1.x;\n var diffY = point2.y - point1.y;\n var angle = Math.atan2(diffY, diffX) * DEGREES;\n if (angle < 0) {\n angle += 360;\n }\n return normalizeAngle(angle);\n}\n/**\r\n * Returns the shift in coordinates of the center when item is rotated, moved\r\n * and scaled at the same time.\r\n *\r\n * @param center Current center\r\n * @param point1 Frst reference point\r\n * @param startPoint1 Original position of the first reference point\r\n * @param point2 Second reference point\r\n * @param startPoint2 Original position of the first reference point\r\n * @return Shift in center point coordinates\r\n */\nexport function getCenterShift(center, point1, startPoint1, point2, startPoint2) {\n // Get angle\n var angle = getRotation(point1, startPoint1, point2, startPoint2) - 90;\n if (angle < 0) {\n angle += 360;\n }\n // Get distance between new position\n var distance = getDistance(point1, point2);\n // Calculate new X\n var x = Math.cos(angle) / distance + point1.x;\n var y = Math.cos(angle) / distance + point1.y;\n var shift = {\n \"x\": x - center.x,\n \"y\": y - center.y\n };\n return shift;\n}\n/**\r\n * Converts an array of points into a bounding box rectangle.\r\n *\r\n * Array can contain any number of points.\r\n *\r\n * @param points Points\r\n * @return Bounding box rectangle\r\n */\nexport function getBBox(points) {\n if (points) {\n var length_1 = points.length;\n if (length_1 !== 0) {\n var left = void 0;\n var right = void 0;\n var top_1;\n var bottom = void 0;\n for (var i = 0; i < length_1; i++) {\n var point = points[i];\n if (!$type.isNumber(right) || point.x > right) {\n right = point.x;\n }\n if (!$type.isNumber(left) || point.x < left) {\n left = point.x;\n }\n if (!$type.isNumber(top_1) || point.y < top_1) {\n top_1 = point.y;\n }\n if (!$type.isNumber(bottom) || point.y > bottom) {\n bottom = point.y;\n }\n }\n return {\n x: left,\n y: top_1,\n width: right - left,\n height: bottom - top_1\n };\n }\n }\n return {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n}\n/**\r\n * Returns a [[IRectangle]] object representing a common rectangle that fits\r\n * all passed in rectangles in it.\r\n *\r\n * @param rectangles An array of rectangles\r\n * @return Common rectangle\r\n */\nexport function getCommonRectangle(rectangles) {\n var length = rectangles.length;\n if (length !== 0) {\n var minX = void 0;\n var minY = void 0;\n var maxX = void 0;\n var maxY = void 0;\n for (var i = 0; i < length; i++) {\n var rectangle = rectangles[i];\n minX = min(rectangle.x, minX);\n minY = min(rectangle.y, minY);\n maxX = max(rectangle.x + rectangle.width, maxX);\n maxY = max(rectangle.y + rectangle.height, maxY);\n }\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n }\n}\n/**\r\n * [getPointOnQuadraticCurve description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param pointA [description]\r\n * @param pointB [description]\r\n * @param controlPoint [description]\r\n * @param position [description]\r\n * @return [description]\r\n */\nexport function getPointOnQuadraticCurve(pointA, pointB, controlPoint, position) {\n var x = (1 - position) * (1 - position) * pointA.x + 2 * (1 - position) * position * controlPoint.x + position * position * pointB.x;\n var y = (1 - position) * (1 - position) * pointA.y + 2 * (1 - position) * position * controlPoint.y + position * position * pointB.y;\n return {\n x: x,\n y: y\n };\n}\n/**\r\n * [getPointOnCubicCurve description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param pointA [description]\r\n * @param pointB [description]\r\n * @param controlPointA [description]\r\n * @param controlPointB [description]\r\n * @param position [description]\r\n * @return [description]\r\n */\nexport function getPointOnCubicCurve(pointA, pointB, controlPointA, controlPointB, position) {\n var point = {\n x: 0,\n y: 0\n };\n var mt1 = 1 - position;\n var mt2 = mt1 * mt1;\n var mt3 = mt2 * mt1;\n point.x = pointA.x * mt3 + controlPointA.x * 3 * mt2 * position + controlPointB.x * 3 * mt1 * position * position + pointB.x * position * position * position;\n point.y = pointA.y * mt3 + controlPointA.y * 3 * mt2 * position + controlPointB.y * 3 * mt1 * position * position + pointB.y * position * position * position;\n return point;\n}\n/**\r\n * [getCubicControlPointA description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param p0 [description]\r\n * @param p1 [description]\r\n * @param p2 [description]\r\n * @param p3 [description]\r\n * @param tensionX [description]\r\n * @param tensionY [description]\r\n * @return [description]\r\n */\nexport function getCubicControlPointA(p0, p1, p2, p3, tensionX, tensionY) {\n tensionX = adjustTension(tensionX);\n tensionY = adjustTension(tensionY);\n return {\n x: (-p0.x + p1.x / tensionX + p2.x) * tensionX,\n y: (-p0.y + p1.y / tensionY + p2.y) * tensionY\n };\n}\n/**\r\n * [getCubicControlPointB description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param p0 [description]\r\n * @param p1 [description]\r\n * @param p2 [description]\r\n * @param p3 [description]\r\n * @param tensionX [description]\r\n * @param tensionY [description]\r\n * @return [description]\r\n */\nexport function getCubicControlPointB(p0, p1, p2, p3, tensionX, tensionY) {\n tensionX = adjustTension(tensionX);\n tensionY = adjustTension(tensionY);\n return {\n x: (p1.x + p2.x / tensionX - p3.x) * tensionX,\n y: (p1.y + p2.y / tensionY - p3.y) * tensionY\n };\n}\n/**\r\n * [adjustTension description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param tension [description]\r\n * @return [description]\r\n */\nexport function adjustTension(tension) {\n return 1 - tension + 0.00001;\n}\n/**\r\n * [normalizeAngle description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param value [description]\r\n * @return [description]\r\n */\nexport function normalizeAngle(value) {\n if (value == 360) {\n return 360;\n }\n return value % 360;\n}\n/**\r\n * [normalizeAngleToRange description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @todo review this with various angles, can be tested on radar chart with custom start/end angles\r\n * @param value [description]\r\n * @param startAngle [description]\r\n * @param endAngle [description]\r\n * @return [description]\r\n */\nexport function fitAngleToRange(value, startAngle, endAngle) {\n if (startAngle > endAngle) {\n var temp = startAngle;\n startAngle = endAngle;\n endAngle = temp;\n }\n value = normalizeAngle(value);\n var count = (startAngle - normalizeAngle(startAngle)) / 360;\n if (value < startAngle) {\n value += 360 * (count + 1);\n }\n var maxEnd = startAngle + (endAngle - startAngle) / 2 + 180;\n var maxStart = startAngle + (endAngle - startAngle) / 2 - 180;\n if (value > endAngle) {\n if (value - 360 > startAngle) {\n value -= 360;\n } else {\n if (value < maxEnd) {\n value = endAngle;\n } else {\n value = startAngle;\n }\n }\n }\n if (value < startAngle) {\n if (value > maxStart) {\n value = startAngle;\n } else {\n value = endAngle;\n }\n }\n return value;\n}\n/**\r\n * Returns [[IRectangle]] of an arc in relative values, assuming that the\r\n * center is at the circle center.\r\n *\r\n * Used to find out max radius of an arc.\r\n *\r\n * @ignore Exclude from docs\r\n * @param startAngle Start angle\r\n * @param endAngle End angle\r\n * @param radius \t Relative radius\r\n * @return Rectangle\r\n */\nexport function getArcRect(startAngle, endAngle, radius) {\n var minX = Number.MAX_VALUE;\n var minY = Number.MAX_VALUE;\n var maxX = -Number.MAX_VALUE;\n var maxY = -Number.MAX_VALUE;\n var bpoints = [];\n if (!$type.isNumber(radius)) {\n radius = 1;\n }\n bpoints.push(getArcPoint(radius, startAngle));\n bpoints.push(getArcPoint(radius, endAngle));\n var fromAngle = Math.min(Math.floor(startAngle / 90) * 90, Math.floor(endAngle / 90) * 90);\n var toAngle = Math.max(Math.ceil(startAngle / 90) * 90, Math.ceil(endAngle / 90) * 90);\n for (var angle = fromAngle; angle <= toAngle; angle += 90) {\n if (angle >= startAngle && angle <= endAngle) {\n bpoints.push(getArcPoint(radius, angle));\n }\n }\n for (var i = 0; i < bpoints.length; i++) {\n var pt = bpoints[i];\n if (pt.x < minX) {\n minX = pt.x;\n }\n if (pt.y < minY) {\n minY = pt.y;\n }\n if (pt.x > maxX) {\n maxX = pt.x;\n }\n if (pt.y > maxY) {\n maxY = pt.y;\n }\n }\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\n/**\r\n * Returns point on arc\r\n *\r\n * @param center point\r\n * @param radius\r\n * @param arc\r\n * @return {boolean}\r\n */\nexport function getArcPoint(radius, arc) {\n return {\n x: radius * cos(arc),\n y: radius * sin(arc)\n };\n}\n/**\r\n * Returns true if a point is within rectangle\r\n *\r\n * @param point\r\n * @param rectangle\r\n * @return {boolean}\r\n */\nexport function isInRectangle(point, rectangle) {\n if (point.x >= rectangle.x && point.x <= rectangle.x + rectangle.width && point.y > rectangle.y && point.y < rectangle.y + rectangle.height) {\n return true;\n }\n return false;\n}\nexport function getLineIntersection(pointA1, pointA2, pointB1, pointB2) {\n var x = ((pointA1.x * pointA2.y - pointA2.x * pointA1.y) * (pointB1.x - pointB2.x) - (pointA1.x - pointA2.x) * (pointB1.x * pointB2.y - pointB1.y * pointB2.x)) / ((pointA1.x - pointA2.x) * (pointB1.y - pointB2.y) - (pointA1.y - pointA2.y) * (pointB1.x - pointB2.x));\n var y = ((pointA1.x * pointA2.y - pointA2.x * pointA1.y) * (pointB1.y - pointB2.y) - (pointA1.y - pointA2.y) * (pointB1.x * pointB2.y - pointB1.y * pointB2.x)) / ((pointA1.x - pointA2.x) * (pointB1.y - pointB2.y) - (pointA1.y - pointA2.y) * (pointB1.x - pointB2.x));\n return {\n x: x,\n y: y\n };\n}","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\n/* global Reflect, Promise */\n\nvar _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n};\nexport function __extends(d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nvar _assign = function __assign() {\n _assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return _assign.apply(this, arguments);\n};\nexport { _assign as __assign };\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if ((typeof Reflect === \"undefined\" ? \"undefined\" : _typeof(Reflect)) === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __metadata(metadataKey, metadataValue) {\n if ((typeof Reflect === \"undefined\" ? \"undefined\" : _typeof(Reflect)) === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : new P(function (resolve) {\n resolve(result.value);\n }).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nexport function __exportStar(m, exports) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nexport function __values(o) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator],\n i = 0;\n if (m) return m.call(o);\n return {\n next: function next() {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n}\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n}\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];\n return r;\n}\n;\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: n === \"return\"\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n}\n;\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n}","import { EventDispatcher } from \"./utils/EventDispatcher\";\nimport { Dictionary } from \"./utils/Dictionary\";\nimport { cache } from \"./utils/Cache\";\nimport * as $type from \"./utils/Type\";\nimport * as $string from \"./utils/String\";\nimport * as $array from \"./utils/Array\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Registry is used to store miscellaneous system-wide information, like ids,\r\n * maps, themes, and registered classes.\r\n *\r\n * @ignore Exclude from docs\r\n */\nvar Registry = /** @class */function () {\n function Registry() {\n /**\r\n * Event dispacther.\r\n */\n this.events = new EventDispatcher();\n /**\r\n * All currently applied themes. All new chart instances created will\r\n * automatically inherit and retain System's themes.\r\n */\n this.themes = [];\n /**\r\n * List of all loaded available themes.\r\n *\r\n * Whenever a theme loads, it registers itself in System's `loadedThemes`\r\n * collection.\r\n */\n this.loadedThemes = {};\n /**\r\n * An indeternal counter used to generate unique IDs.\r\n *\r\n * @ignore Exclude from docs\r\n */\n this._uidCount = 0;\n /**\r\n * Keeps register of class references so that they can be instnatiated using\r\n * string key.\r\n *\r\n * @ignore Exclude from docs\r\n */\n this.registeredClasses = {};\n /**\r\n * Holds all generated placeholders.\r\n */\n this._placeholders = {};\n /**\r\n * A list of invalid(ated) [[Sprite]] objects that need to be re-validated\r\n * during next cycle.\r\n *\r\n * @ignore Exclude from docs\r\n */\n this.invalidSprites = {};\n /**\r\n * Components are added to this list when their data provider changes to\r\n * a new one or data is added/removed from their data provider.\r\n *\r\n * @ignore Exclude from docs\r\n */\n this.invalidDatas = {};\n /**\r\n * Components are added to this list when values of their raw data change.\r\n * Used when we want a smooth animation from one set of values to another.\r\n *\r\n * @ignore Exclude from docs\r\n */\n this.invalidRawDatas = [];\n /**\r\n * Components are added to this list when values of their data changes\r\n * (but not data provider itself).\r\n *\r\n * @ignore Exclude from docs\r\n */\n this.invalidDataItems = [];\n /**\r\n * Components are added to this list when their data range (selection) is\r\n * changed, e.g. zoomed.\r\n *\r\n * @ignore Exclude from docs\r\n */\n this.invalidDataRange = [];\n /**\r\n * A list of [[Sprite]] objects that have invalid(ated) positions, that need\r\n * to be recalculated.\r\n *\r\n * @ignore Exclude from docs\r\n */\n this.invalidPositions = {};\n /**\r\n * A list of [[Container]] objects with invalid(ated) layouts.\r\n *\r\n * @ignore Exclude from docs\r\n */\n this.invalidLayouts = {};\n /**\r\n * An array holding all active (non-disposed) top level elemens.\r\n *\r\n * When, for example, a new chart is created, its instance will be added to\r\n * this array, and will be removed when the chart is disposed.\r\n */\n this.baseSprites = [];\n this.baseSpritesByUid = {};\n this.uid = this.getUniqueId();\n this.invalidSprites.noBase = [];\n this.invalidDatas.noBase = [];\n this.invalidLayouts.noBase = [];\n this.invalidPositions.noBase = [];\n }\n /**\r\n * Generates a unique chart system-wide ID.\r\n *\r\n * @return Generated ID\r\n */\n Registry.prototype.getUniqueId = function () {\n var uid = this._uidCount;\n this._uidCount += 1;\n return \"id-\" + uid;\n };\n Object.defineProperty(Registry.prototype, \"map\", {\n /**\r\n * Returns a universal collection for mapping ids with objects.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Map collection\r\n */\n get: function get() {\n if (!this._map) {\n this._map = new Dictionary();\n }\n return this._map;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Caches value in object's cache.\r\n *\r\n * @ignore Exclude from docs\r\n * @param key Key\r\n * @param value Value\r\n * @param ttl TTL in seconds\r\n */\n Registry.prototype.setCache = function (key, value, ttl) {\n cache.set(this.uid, key, value, ttl);\n };\n /**\r\n * Retrieves cached value.\r\n *\r\n * @ignore Exclude from docs\r\n * @param key Key\r\n * @param value Value to return if cache is not available\r\n * @return Value\r\n */\n Registry.prototype.getCache = function (key, value) {\n if (value === void 0) {\n value = undefined;\n }\n return cache.get(this.uid, key, value);\n };\n /**\r\n * Dispatches an event using own event dispatcher. Will automatically\r\n * populate event data object with event type and target (this element).\r\n * It also checks if there are any handlers registered for this sepecific\r\n * event.\r\n *\r\n * @param eventType Event type (name)\r\n * @param data Data to pass into event handler(s)\r\n */\n Registry.prototype.dispatch = function (eventType, data) {\n // @todo Implement proper type check\n if (this.events.isEnabled(eventType)) {\n if (data) {\n data.type = eventType;\n data.target = data.target || this;\n this.events.dispatch(eventType, {\n type: eventType,\n target: this\n });\n } else {\n this.events.dispatch(eventType, {\n type: eventType,\n target: this\n });\n }\n }\n };\n /**\r\n * Works like `dispatch`, except event is triggered immediately, without\r\n * waiting for the next frame cycle.\r\n *\r\n * @param eventType Event type (name)\r\n * @param data Data to pass into event handler(s)\r\n */\n Registry.prototype.dispatchImmediately = function (eventType, data) {\n // @todo Implement proper type check\n if (this.events.isEnabled(eventType)) {\n if (data) {\n data.type = eventType;\n data.target = data.target || this;\n this.events.dispatchImmediately(eventType, data);\n } else {\n this.events.dispatchImmediately(eventType, {\n type: eventType,\n target: this\n });\n }\n }\n };\n /**\r\n * Returns a unique placeholder suitable for the key.\r\n *\r\n * @param key Key\r\n * @return Random string to be used as placeholder\r\n */\n Registry.prototype.getPlaceholder = function (key) {\n if ($type.hasValue(this._placeholders[key])) {\n return this._placeholders[key];\n }\n this._placeholders[key] = \"__amcharts_\" + key + \"_\" + $string.random(8) + \"__\";\n return this._placeholders[key];\n };\n /**\r\n * @ignore\r\n */\n Registry.prototype.addToInvalidComponents = function (component) {\n if (component.baseId) {\n $array.move(this.invalidDatas[component.baseId], component);\n } else {\n $array.move(this.invalidDatas[\"noBase\"], component);\n }\n };\n /**\r\n * @ignore\r\n */\n Registry.prototype.removeFromInvalidComponents = function (component) {\n if (component.baseId) {\n $array.remove(this.invalidDatas[component.baseId], component);\n }\n $array.remove(this.invalidDatas[\"noBase\"], component);\n };\n /**\r\n * @ignore\r\n */\n Registry.prototype.addToInvalidSprites = function (sprite) {\n if (sprite.baseId) {\n $array.add(this.invalidSprites[sprite.baseId], sprite);\n } else {\n $array.add(this.invalidSprites[\"noBase\"], sprite);\n }\n };\n /**\r\n * @ignore\r\n */\n Registry.prototype.removeFromInvalidSprites = function (sprite) {\n if (sprite.baseId) {\n $array.remove(this.invalidSprites[sprite.baseId], sprite);\n }\n $array.remove(this.invalidSprites[\"noBase\"], sprite);\n };\n /**\r\n * @ignore\r\n */\n Registry.prototype.addToInvalidPositions = function (sprite) {\n if (sprite.baseId) {\n $array.add(this.invalidPositions[sprite.baseId], sprite);\n } else {\n $array.add(this.invalidPositions[\"noBase\"], sprite);\n }\n };\n /**\r\n * @ignore\r\n */\n Registry.prototype.removeFromInvalidPositions = function (sprite) {\n if (sprite.baseId) {\n $array.remove(this.invalidPositions[sprite.baseId], sprite);\n }\n $array.remove(this.invalidPositions[\"noBase\"], sprite);\n };\n /**\r\n * @ignore\r\n */\n Registry.prototype.addToInvalidLayouts = function (sprite) {\n if (sprite.baseId) {\n $array.add(this.invalidLayouts[sprite.baseId], sprite);\n } else {\n $array.add(this.invalidLayouts[\"noBase\"], sprite);\n }\n };\n /**\r\n * @ignore\r\n */\n Registry.prototype.removeFromInvalidLayouts = function (sprite) {\n if (sprite.baseId) {\n $array.remove(this.invalidLayouts[sprite.baseId], sprite);\n }\n $array.remove(this.invalidLayouts[\"noBase\"], sprite);\n };\n return Registry;\n}();\nexport { Registry };\n/**\r\n * A singleton global instance of [[Registry]].\r\n *\r\n * @ignore Exclude from docs\r\n */\nexport var registry = new Registry();","import { BinGroup, BinType } from \"service/ticket/types\";\nimport { api } from \"./apiConfig\";\n\ntype BinFetchResponse = {\n binTypes: { byServiceCode: Record };\n binGroups: { byId: Record };\n};\n\nexport const binTypesApi = api.injectEndpoints({\n endpoints: (build) => ({\n getBinTypes: build.query({\n query: () => {\n return {\n url: \"/admin/bin_types.json\",\n method: \"GET\",\n };\n },\n providesTags: () =>\n // TODO: Do we need to provide individual cache for binTypes and binGroups\n // result\n // ? [\n // ...Object.values(result.binTypes.byServiceCode).map(\n // (binType) => ({\n // type: \"BinType\",\n // id: binType.id.toString(),\n // })\n // ),\n // ...Object.values(result.binGroups.byId).map((binGroup) => ({\n // type: \"BinGroup\",\n // id: binGroup.id.toString(),\n // })),\n // { type: \"BinType\", id: \"LIST\" },\n // { type: \"BinGroup\", id: \"LIST\" },\n // ]\n // :\n [\n { type: \"BinType\", id: \"LIST\" },\n { type: \"BinGroup\", id: \"LIST\" },\n ],\n }),\n //getVendorServiceMappings: build.query({\n getVendorServiceMappings: build.query({\n query: (vendorId) => ({\n url: `/admin/vendor_service_mappings.json?vendor_id=${vendorId}`,\n }),\n providesTags: [\"VendorServiceMapping\"],\n //providesTags: (result = []) => [\n //...result.map(({ id }) => ({ type: 'BinType', id } as const)),\n //],\n }),\n }),\n});\n\nexport const { useGetBinTypesQuery, useGetVendorServiceMappingsQuery } =\n binTypesApi;\n\nexport const {\n endpoints: { getBinTypes, getVendorServiceMappings },\n} = binTypesApi;\n","import {\n useGetBinTypesQuery,\n useGetVendorServiceMappingsQuery,\n} from \"api/bin-types\";\nimport createGuid from \"createGuid\";\nimport dayjs from \"dayjs\";\nimport advancedFormat from \"dayjs/plugin/advancedFormat\";\nimport renameKeys from \"deep-rename-keys\";\nimport _ from \"lodash\";\nimport { useEffect, useMemo, useState } from \"react\";\n\ndayjs.extend(advancedFormat);\n\nconst getTempId = () => `_tempId-${createGuid()}`;\n\nconst prepareSubmitData = (data, attributeKeyNames = []) => {\n var nextNumericKey = 1;\n return renameKeys(data, (key, value) => {\n var newKey, snakeCaseKey;\n if (_.includes(attributeKeyNames, key)) {\n newKey = `${key}Attributes`;\n } else if (key == \"id\" && _.isString(value) && value.match(/^_tempId/)) {\n newKey = \"tempId\";\n } else if (\n key.match(\n /[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i,\n )\n ) {\n newKey = nextNumericKey++;\n } else if (key.match(/^_.+/)) {\n snakeCaseKey = \"_\" + _.snakeCase(key.substring(1));\n } else {\n newKey = key;\n }\n\n snakeCaseKey = snakeCaseKey || _.snakeCase(newKey);\n //console.log({[key]: snakeCaseKey})\n return snakeCaseKey;\n });\n};\n\nconst updateQueryStringParameter = (uri, key, value) => {\n var re = new RegExp(\"([?&])\" + key + \"=.*?(&|#|$)\", \"i\");\n if (uri.match(re)) {\n return uri.replace(re, \"$1\" + key + \"=\" + value + \"$2\");\n } else {\n var hash = \"\";\n if (uri.indexOf(\"#\") !== -1) {\n hash = uri.replace(/.*#/, \"#\");\n uri = uri.replace(/#.*/, \"\");\n }\n var separator = uri.indexOf(\"?\") !== -1 ? \"&\" : \"?\";\n return uri + separator + key + \"=\" + value + hash;\n }\n};\n\nconst sanatizeDotProp = (string) => string.replace(/\\./g, \"\\\\.\");\n\nconst buildParams = (search) => {\n if (!search) return \"\";\n\n const params = new URLSearchParams();\n\n Object.entries(search).forEach(([key, value]) => {\n if (Array.isArray(value)) value.map((v) => params.append(`${key}[]`, v));\n else params.append(key, value.toString());\n });\n\n return `?${params}`;\n};\n\nfunction useBinFetch(serviceCodes = []) {\n const { data: binData, isLoading, isError } = useGetBinTypesQuery();\n\n const { filteredBinTypes, filteredBinGroups } = useMemo(() => {\n if (!binData) return { filteredBinTypes: {}, filteredBinGroups: {} };\n\n let filteredBinTypes = binData.binTypes.byServiceCode;\n let filteredBinGroups = binData.binGroups.byId;\n\n if (serviceCodes.length) {\n filteredBinTypes = _.pickBy(filteredBinTypes, (_value, key) =>\n serviceCodes.includes(key),\n );\n\n const filteredBinGroupIds = _.uniq(_.map(filteredBinTypes, \"binGroupId\"));\n\n filteredBinGroups = _.pickBy(filteredBinGroups, (value) =>\n filteredBinGroupIds.includes(value.id),\n );\n }\n\n return { filteredBinTypes, filteredBinGroups, isLoading, isError };\n }, [binData, serviceCodes]);\n\n return {\n binTypes: filteredBinTypes,\n binGroups: filteredBinGroups,\n isLoading,\n isError,\n };\n}\n\nfunction useVendorServiceMappingsFetch(vendorId) {\n const { data: vendorServiceMappings, isLoading } =\n useGetVendorServiceMappingsQuery(vendorId);\n return isLoading ? {} : vendorServiceMappings[vendorId];\n}\n\nfunction useBinGroupFetch(binGroupIds) {\n const [binGroups, setBinGroups] = useState({});\n const [loading, setLoading] = useState(true);\n const [hasError, setHasError] = useState(false);\n\n useEffect(() => {\n // Define an async function within useEffect\n\n const fetchData = async () => {\n try {\n setLoading(true);\n const response = await fetch(\n \"/admin/bin_groups.json\" +\n buildParams({\n ids: binGroupIds,\n }),\n {\n credentials: \"same-origin\",\n headers: {\n Accept: \"application/json\",\n },\n },\n );\n const data = await response.json();\n\n setBinGroups(data.binGroups.byId);\n } catch (error) {\n console.error(\"Error fetching data: \", error);\n setHasError(true);\n } finally {\n setLoading(false);\n }\n };\n\n // Call the async function\n fetchData();\n }, [JSON.stringify(_.orderBy(binGroupIds))]);\n\n return [binGroups, loading, hasError];\n}\n\nfunction useCannedResponseFetch(cannedResponseId, ticketId, contactId) {\n const [message, setMessage] = useState();\n\n useEffect(() => {\n // Define an async function within useEffect\n if (cannedResponseId) {\n const fetchData = async () => {\n try {\n const response = await fetch(\n `/admin/canned_responses/${cannedResponseId}/render/${ticketId}.json` +\n buildParams({\n contact_id: contactId,\n }),\n {\n credentials: \"same-origin\",\n headers: {\n Accept: \"application/json\",\n },\n },\n );\n const data = await response.json();\n setMessage(data.text);\n } catch (error) {\n console.error(\"Error fetching data: \", error);\n }\n };\n\n //Call the async function\n fetchData();\n }\n }, [cannedResponseId, ticketId, contactId]);\n\n return message;\n}\n\nconst formatDate = (date) => {\n const reportDate = dayjs(date);\n if (!reportDate.isValid()) return \"\";\n\n const isCurrentYear = reportDate.year() === dayjs().year();\n return reportDate.format(isCurrentYear ? \"ddd, Do MMM\" : \"ddd, Do MMM YYYY\");\n};\n\nconst formatTime = (time) => {\n const reportTime = dayjs(time);\n if (!reportTime.isValid()) return \"\";\n\n const isCurrentYear = reportTime.year() === dayjs().year();\n return reportTime.format(\n isCurrentYear ? \"ddd, Do MMM H:mm\" : \"ddd, Do MMM YYYY H:mm\",\n );\n};\n\nconst concatId = (replies) =>\n replies\n ?.map((reply) => reply?.processedEvents?.map((tag) => tag?.id).join(\",\"))\n .join(\",\");\n\nexport {\n concatId,\n formatDate,\n formatTime,\n getTempId,\n prepareSubmitData,\n sanatizeDotProp,\n updateQueryStringParameter,\n useBinFetch,\n useBinGroupFetch,\n useCannedResponseFetch,\n useVendorServiceMappingsFetch,\n};\n","/**\r\n * A collection of functions that deals with path calculations.\r\n */\nimport * as $math from \"../utils/Math\";\nimport * as $type from \"../utils/Type\";\nimport { getGhostPaper } from \"../rendering/Paper\";\nimport { options } from \"../Options\";\n/**\r\n * ============================================================================\r\n * PATH FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Returns an SVG path from a number of points.\r\n *\r\n * @ignore Exclude from docs\r\n * @param points An array of line elbow points\r\n * @return SVG path\r\n */\nexport function polyline(points) {\n var path = lineTo(points[0]);\n var prevPoint = {\n x: 0,\n y: 0\n };\n var minStep = options.minPolylineStep;\n if (!$type.isNumber(minStep)) {\n minStep = 0.5;\n }\n for (var i = 0, len = points.length; i < len; i++) {\n var point = points[i];\n if ($math.getDistance(point, prevPoint) > minStep) {\n path += lineTo(point);\n prevPoint = point;\n }\n }\n return path;\n}\n/**\r\n * Returns a starting point of an SVG path.\r\n *\r\n * @ignore Exclude from docs\r\n * @param point Starting point\r\n * @return SVG path\r\n */\nexport function moveTo(point) {\n return \" M\" + $math.round(point.x, 4) + \",\" + $math.round(point.y, 4) + \" \";\n}\n/**\r\n * Returns a line part of SVG path.\r\n *\r\n * @ignore Exclude from docs\r\n * @param point SVG path\r\n * @return SVG path\r\n */\nexport function lineTo(point) {\n return \" L\" + $math.round(point.x, 4) + \",\" + $math.round(point.y, 4) + \" \";\n}\n/**\r\n * Returns a quadratic curve part of an SVG path.\r\n *\r\n * @ignore Exclude from docs\r\n * @param point End point of the curve\r\n * @param controlPoint Control point\r\n * @return SVG path\r\n */\nexport function quadraticCurveTo(point, controlPoint) {\n return \" Q\" + $math.round(controlPoint.x, 4) + \",\" + $math.round(controlPoint.y, 4) + \" \" + $math.round(point.x, 4) + \",\" + $math.round(point.y, 4);\n}\n/**\r\n * Returns a cubic curve part of an SVG path.\r\n *\r\n * @ignore Exclude from docs\r\n * @param point End point of the curve\r\n * @param controlPointA Control point A\r\n * @param controlPointB Control point B\r\n * @return SVG path\r\n */\nexport function cubicCurveTo(point, controlPointA, controlPointB) {\n return \" C\" + $math.round(controlPointA.x, 4) + \",\" + $math.round(controlPointA.y, 4) + \" \" + $math.round(controlPointB.x, 4) + \",\" + $math.round(controlPointB.y, 4) + \" \" + $math.round(point.x, 4) + \",\" + $math.round(point.y, 4);\n}\n/**\r\n * Returns a terminator for an SVG path.\r\n *\r\n * @ignore Exclude from docs\r\n * @return SVG path\r\n */\nexport function closePath() {\n return \" Z\";\n}\n/**\r\n * Returns an arc part of an SVG path.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Better parameter descriptions\r\n * @param startAngle Starting angle\r\n * @param arc Arc\r\n * @param radius Radius\r\n * @param radiusY Vertical radius\r\n * @return SVG path\r\n */\nexport function arcTo(startAngle, arc, radius, radiusY) {\n if (arc == 0) {\n return \"\";\n }\n if (!$type.isNumber(radiusY)) {\n radiusY = radius;\n }\n var path = \"\";\n var c = \",\";\n var segments = Math.ceil(Math.abs(arc) / 180);\n var l = 1;\n if (arc < 0) {\n l = 0;\n }\n // previous, as we use a not A\n var pax = 0;\n var pay = 0;\n // center\n var cx = -$math.cos(startAngle) * radius;\n var cy = -$math.sin(startAngle) * radiusY;\n // foir very short angles and big radius, solves artefacts\n if (arc < 0.5 && radius > 3000) {\n var endAngle = startAngle + arc;\n var ax = $math.round($math.cos(endAngle) * radius, 4);\n var ay = $math.round($math.sin(endAngle) * radiusY, 4);\n return lineTo({\n x: ax,\n y: ay\n });\n }\n for (var i = 0; i < segments; i++) {\n var endAngle = startAngle + arc / segments * (i + 1);\n var ax = $math.round($math.cos(endAngle) * radius + cx - pax, 4);\n var ay = $math.round($math.sin(endAngle) * radiusY + cy - pay, 4);\n path += \" a\" + radius + c + radiusY + c + 0 + c + 0 + c + l + c + ax + c + ay;\n pax = ax;\n pay = ay;\n }\n return path;\n}\n/**\r\n * Creates an arc path.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param startAngle [description]\r\n * @param arc [description]\r\n * @param radius [description]\r\n * @param innerRadius [description]\r\n * @param radiusY [description]\r\n * @param cornerRadius [description]\r\n * @param innerCornerRadius [description]\r\n * @return SVG path\r\n */\nexport function arc(startAngle, arc, radius, innerRadius, radiusY, cornerRadius, innerCornerRadius) {\n if (arc == 0) {\n return \"\";\n }\n if (!$type.isNumber(innerRadius)) {\n innerRadius = 0;\n }\n if (radius == 0 && innerRadius <= 0) {\n return \"\";\n }\n if (radius < innerRadius) {\n var temp = radius;\n radius = innerRadius;\n innerRadius = temp;\n if ($type.isNumber(radiusY)) {\n radiusY = radiusY / innerRadius * radius;\n }\n }\n arc = $math.min(arc, 360);\n if (arc == 360) {\n cornerRadius = 0;\n innerCornerRadius = 0;\n }\n var endAngle = startAngle + arc;\n var crSin = $math.sin($math.min(arc, 45) / 2);\n radiusY = $type.isNumber(radiusY) ? radiusY : radius;\n cornerRadius = cornerRadius || 0;\n innerCornerRadius = $type.isNumber(innerCornerRadius) ? innerCornerRadius : cornerRadius;\n var innerRadiusY = radiusY / radius * innerRadius;\n var cornerRadiusY = radiusY / radius * cornerRadius;\n var innerCornerRadiusY = radiusY / radius * innerCornerRadius;\n cornerRadius = $math.fitToRange(cornerRadius, 0, (radius - innerRadius) / 2);\n cornerRadiusY = $math.fitToRange(cornerRadiusY, 0, (radiusY - innerRadiusY) / 2);\n innerCornerRadius = $math.fitToRange(innerCornerRadius, 0, (radius - innerRadius) / 2);\n innerCornerRadiusY = $math.fitToRange(innerCornerRadiusY, 0, (radiusY - innerRadiusY) / 2);\n cornerRadius = $math.round($math.fitToRange(cornerRadius, 0, radius * crSin), 4);\n cornerRadiusY = $math.round($math.fitToRange(cornerRadiusY, 0, radiusY * crSin), 4);\n innerCornerRadius = $math.round($math.fitToRange(innerCornerRadius, 0, innerRadius * crSin), 4);\n innerCornerRadiusY = $math.round($math.fitToRange(innerCornerRadiusY, 0, innerRadiusY * crSin), 4);\n var crAngle = Math.asin(cornerRadius / radius / 2) * $math.DEGREES * 2;\n var crAngleY = Math.asin(cornerRadiusY / radiusY / 2) * $math.DEGREES * 2;\n if (innerRadius < innerCornerRadius) {\n innerRadius = innerCornerRadius;\n }\n if (innerRadiusY < innerCornerRadiusY) {\n innerRadiusY = innerCornerRadiusY;\n }\n var crInnerAngle = Math.asin(innerCornerRadius / innerRadius / 2) * $math.DEGREES * 2;\n var crInnerAngleY = Math.asin(innerCornerRadiusY / innerRadiusY / 2) * $math.DEGREES * 2;\n if (!$type.isNumber(crInnerAngle)) {\n crInnerAngle = 0;\n }\n if (!$type.isNumber(crInnerAngleY)) {\n crInnerAngleY = 0;\n }\n var middleAngle = startAngle + arc / 2;\n var mPoint = {\n x: $math.round($math.cos(middleAngle) * innerRadius, 4),\n y: $math.sin(middleAngle) * innerRadiusY\n };\n var a0 = {\n x: $math.cos(startAngle) * (innerRadius + innerCornerRadius),\n y: $math.sin(startAngle) * (innerRadiusY + innerCornerRadiusY)\n };\n var b0 = {\n x: $math.cos(startAngle) * (radius - cornerRadius),\n y: $math.sin(startAngle) * (radiusY - cornerRadiusY)\n };\n var c0 = {\n x: $math.cos(endAngle) * (radius - cornerRadius),\n y: $math.sin(endAngle) * (radiusY - cornerRadiusY)\n };\n var d0 = {\n x: $math.cos(endAngle) * (innerRadius + innerCornerRadius),\n y: $math.sin(endAngle) * (innerRadiusY + innerCornerRadiusY)\n };\n var b1 = {\n x: $math.cos(startAngle + crAngle) * radius,\n y: $math.sin(startAngle + crAngleY) * radiusY\n };\n var d1 = {\n x: $math.cos(endAngle - crInnerAngle) * innerRadius,\n y: $math.sin(endAngle - crInnerAngleY) * innerRadiusY\n };\n // some magic math\n innerCornerRadius += innerCornerRadius * $math.sin(crInnerAngle / 2);\n innerCornerRadiusY += innerCornerRadiusY * $math.sin(crInnerAngleY / 2);\n if (crInnerAngle > (endAngle - startAngle) / 2) {\n d1 = mPoint;\n }\n var path = \"\";\n // start from b if this is full circle\n if (arc == 360) {\n path = moveTo(b0);\n }\n // otherwise start from a\n else {\n path = moveTo(a0);\n path += lineTo(b0);\n path += arcToPoint(b1, cornerRadius, cornerRadiusY, true);\n }\n // draw arc\n path += arcTo(startAngle + crAngle, arc - 2 * crAngle, radius, radiusY);\n // draw inner arc\n if ($type.isNumber(innerRadius) && innerRadius != 0) {\n // move to B if this is full circle\n if (arc == 360 && cornerRadius == 0) {\n path += moveTo(d0);\n }\n // draw line otherwise\n else {\n path += arcToPoint(c0, cornerRadius, cornerRadiusY, true);\n path += lineTo(d0);\n path += arcToPoint(d1, innerCornerRadius, innerCornerRadiusY, true);\n }\n path += arcTo(endAngle - crInnerAngle, -(arc - 2 * crInnerAngle), innerRadius, innerRadiusY);\n if (arc < 360 || cornerRadius > 0) {\n path += arcToPoint(a0, innerCornerRadius, innerCornerRadiusY, true);\n }\n path += lineTo(a0);\n } else {\n path += arcToPoint(c0, cornerRadius, cornerRadiusY, true);\n if (arc < 360) {\n path += lineTo(a0);\n }\n }\n return path;\n}\n/**\r\n * Creates a path for an arc to specific coordinate.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param point Reference point\r\n * @param radius Radius\r\n * @param radiusY Vertical radius (for skewed arcs)\r\n * @param sweepFlag [description]\r\n * @param largeArcFlag [description]\r\n * @param xAxisRotation [description]\r\n * @return Arc path\r\n */\nexport function arcToPoint(point, radius, radiusY, sweepFlag, largeArcFlag, xAxisRotation) {\n if (radius == 0) {\n return \"\";\n }\n xAxisRotation = xAxisRotation || 0;\n largeArcFlag = Boolean(largeArcFlag);\n sweepFlag = Boolean(sweepFlag);\n var c = \",\";\n var sweepFlagValue = +sweepFlag; // converts to 1 or 0\n var largeArcFlagValue = +largeArcFlag; // converts to 1 or 0\n return \" A\" + radius + c + radiusY + c + xAxisRotation + c + largeArcFlagValue + c + sweepFlagValue + c + $math.round(point.x, 4) + c + $math.round(point.y, 4);\n}\n/**\r\n * Creates a new rectangle.\r\n *\r\n * @ignore Exclude from docs\r\n * @param width Width (px)\r\n * @param height Height (px)\r\n * @param x X position\r\n * @param y Y position\r\n * @return Rectangle\r\n */\nexport function rectangle(width, height, x, y) {\n if (!$type.isNumber(x)) {\n x = 0;\n }\n if (!$type.isNumber(y)) {\n y = 0;\n }\n return moveTo({\n x: x,\n y: y\n }) + lineTo({\n x: x + width,\n y: y\n }) + lineTo({\n x: x + width,\n y: y + height\n }) + lineTo({\n x: x,\n y: y + height\n }) + closePath();\n}\n/**\r\n * Converts a rectangle to an SVG path.\r\n *\r\n * @ignore Exclude from docs\r\n * @param rect Rectangle\r\n * @param ccw Counter-clockwise?\r\n * @return SVG path\r\n */\nexport function rectToPath(rect, ccw) {\n var c = \",\";\n var L = \" L\";\n if (ccw) {\n return \"M\" + rect.x + c + rect.y + L + rect.x + c + (rect.y + rect.height) + L + (rect.x + rect.width) + c + (rect.y + rect.height) + L + (rect.x + rect.width) + c + rect.y + L + rect.x + c + rect.y;\n } else {\n return \"M\" + rect.x + c + rect.y + L + (rect.x + rect.width) + c + rect.y + L + (rect.x + rect.width) + c + (rect.y + rect.height) + L + rect.x + c + (rect.y + rect.height) + L + rect.x + c + rect.y;\n }\n}\n/**\r\n * Converts SVG path to array of points.\r\n *\r\n * Note, this is experimental feature based on method which is deprecated\r\n * on some browsers and some browsers do not support it at all.\r\n *\r\n * You can save the output of this function, but not rely on it completely.\r\n */\nexport function pathToPoints(path, pointCount) {\n var paper = getGhostPaper();\n var svgPath = paper.add(\"path\").node;\n svgPath.setAttribute(\"d\", path);\n if (svgPath.getPointAtLength && svgPath.getTotalLength) {\n var length_1 = svgPath.getTotalLength();\n var toPoints = [];\n for (var i = 0; i < pointCount; i++) {\n var point = svgPath.getPointAtLength(i / pointCount * length_1);\n toPoints.push({\n x: point.x,\n y: point.y\n });\n }\n return toPoints;\n }\n svgPath.remove();\n}\nexport function spiralPoints(cx, cy, radius, radiusY, innerRadius, step, radiusStep) {\n var r = innerRadius + 0.01;\n var angle = 0;\n var points = [];\n while (r < radius) {\n var stepSize = step;\n if (stepSize / 2 > r) {\n stepSize = 2 * r;\n }\n angle += 2 * Math.asin(stepSize / 2 / r);\n var degrees = angle * $math.DEGREES;\n var point = {\n x: cx + r * Math.cos(angle),\n y: cy + r * radiusY / radius * Math.sin(angle)\n };\n points.push(point);\n r = innerRadius + degrees / 360 * radiusStep;\n }\n return points;\n}\nexport function pointsToPath(points) {\n var path = moveTo(points[0]);\n if (points && points.length > 0) {\n for (var i = 1; i < points.length; i++) {\n path += lineTo(points[i]);\n }\n }\n return path;\n}","import YesNoInput from \"../components/audit/YesNoInput\";\nimport TextAreaInput from \"../components/audit/TextAreaInput\";\nimport TextInput from \"../components/audit/TextInput\";\nimport SummaryField from \"../components/audit/SummaryField\";\nimport RadioInput from \"../components/audit/RadioInput\";\nimport NumberInput from \"../components/audit/NumberInput\";\nimport MultiLineTextInput from \"../components/audit/MultiLineTextInput\";\nimport ModalLink from \"../components/audit/ModalLink\";\nimport CheckboxInput from \"../components/audit/CheckboxInput\";\nimport DateInput from \"../components/audit/DateInput\";\nimport SelectWithOtherInput from \"../components/audit/SelectWithOtherInput\";\nimport MultiSelectWithOtherInput from \"../components/audit/MultiSelectWithOtherInput\";\nimport ModalBox from \"../components/audit/ModalBox\";\nimport SelectListInput from \"../components/audit/SelectListInput\";\nimport Section from \"../components/audit/Section\";\nimport StatusSummary from \"../components/audit/StatusSummary\";\nimport SummaryRow from \"../components/audit/SummaryRow\";\nimport SubmitSummarySection from \"../components/audit/SubmitSummarySection\";\nimport SubmitSummary from \"../components/audit/SubmitSummary\";\n\nexport {\n YesNoInput,\n TextInput,\n TextAreaInput,\n SummaryField,\n RadioInput,\n NumberInput,\n MultiLineTextInput,\n ModalLink,\n CheckboxInput,\n DateInput,\n SelectWithOtherInput,\n MultiSelectWithOtherInput,\n ModalBox,\n SelectListInput,\n Section,\n StatusSummary,\n SummaryRow,\n SubmitSummarySection,\n SubmitSummary,\n};\n","/**\r\n * A collection of universal utility functions.\r\n */\nimport { Percent } from \"./Percent\";\nimport { isSafari } from \"./Browser\";\nimport * as $math from \"../utils/Math\";\nimport * as $type from \"../utils/Type\";\nimport * as $string from \"./String\";\nimport * as $strings from \"./Strings\";\nimport * as $object from \"./Object\";\nimport * as $array from \"./Array\";\n/**\r\n * ============================================================================\r\n * MISC FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Marks a value as being used (e.g. because the value has side effects).\r\n */\nexport function used(value) {}\n/**\r\n * Copies all properties of one object to the other, omitting undefined.\r\n *\r\n * @param fromObject Source object\r\n * @param toObject Target object\r\n * @return Updated target object\r\n * @todo Maybe consolidate with utils.copy?\r\n */\nexport function copyProperties(source, target) {\n $object.each(source, function (key, value) {\n // only if value is set\n if ($type.hasValue(value)) {\n target[key] = value;\n }\n });\n return target;\n}\n/**\r\n * Removes target from url\r\n */\nexport function stripHash(url) {\n return /^[^#]*/.exec(url)[0];\n}\nexport function getBaseURI() {\n var url = \"#\";\n // Needed until https://bugs.webkit.org/show_bug.cgi?id=189499 is fixed\n if (isSafari()) {\n var baseURI = document.baseURI;\n if (baseURI) {\n baseURI = stripHash(baseURI);\n var loc = stripHash(location.href);\n if (baseURI !== loc) {\n url = loc + url;\n }\n }\n }\n return url;\n}\n/**\r\n * Copies all properties of one object to the other, omitting undefined, but only if property in target object doesn't have a value set.\r\n *\r\n * @param fromObject Source object\r\n * @param toObject Target object\r\n * @return Updated target object\r\n * @todo Maybe consolidate with utils.copy?\r\n */\nexport function softCopyProperties(source, target) {\n $object.each(source, function (key, value) {\n // only if value is set\n if ($type.hasValue(value) && !$type.hasValue(target[key])) {\n target[key] = value;\n }\n });\n return target;\n}\n/**\r\n * Copies all properties of one object to the other.\r\n *\r\n * @param source Source object\r\n * @param recipient Target object\r\n * @return Updated target object\r\n */\nexport function copy(source, target) {\n $object.each(source, function (key, value) {\n target[key] = value;\n });\n return target;\n}\n/**\r\n * Checks if value is not empty (undefined or zero-length string).\r\n *\r\n * @param value Value to check\r\n * @return `true` if value is not \"empty\"\r\n */\nexport function isNotEmpty(value) {\n return $type.hasValue(value) && value.toString() !== \"\";\n}\n/**\r\n * [relativeToValue description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param percent [description]\r\n * @param full [description]\r\n * @return [description]\r\n */\nexport function relativeToValue(percent, full) {\n if ($type.isNumber(percent)) {\n return percent;\n } else if (percent != null && $type.isNumber(percent.value) && $type.isNumber(full)) {\n return full * percent.value;\n } else {\n return 0;\n }\n}\n/**\r\n * [relativeRadiusToValue description]\r\n *\r\n * Differs from relativeToValue so that if a value is negative, it subtracts\r\n * it from full value.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param percent [description]\r\n * @param full [description]\r\n * @param subtractIfNegative [description]\r\n * @return [description]\r\n */\nexport function relativeRadiusToValue(percent, full, subtractIfNegative) {\n var value;\n if ($type.isNumber(percent)) {\n value = percent;\n if (value < 0) {\n if (subtractIfNegative) {\n value = full + value;\n } else {\n value = full - value;\n }\n }\n } else if (percent != null && $type.isNumber(percent.value)) {\n value = full * percent.value;\n }\n return value;\n}\n/**\r\n * [valueToRelative description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param value [description]\r\n * @param full [description]\r\n * @return [description]\r\n */\nexport function valueToRelative(value, full) {\n if (value instanceof Percent) {\n return value.value;\n } else {\n return value / full;\n }\n}\n/**\r\n * Returns pixel ratio of the current screen (used on retina displays).\r\n *\r\n * @return Pixel ratio\r\n */\nexport function getPixelRatio() {\n var ratio = window.devicePixelRatio || 1;\n return ratio;\n}\n/**\r\n * ============================================================================\r\n * STRING FORMATTING FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Converts camelCased text to dashed version:\r\n * (\"thisIsString\" > \"this-is-string\")\r\n *\r\n * @param str Input\r\n * @return Output\r\n */\nexport function camelToDashed(str) {\n return str.replace(/\\W+/g, '-').replace(/([a-z\\d])([A-Z])/g, '$1-$2').toLowerCase();\n}\n/**\r\n * Converts tring to uppercase.\r\n *\r\n * @param str String to convert\r\n * @return uppercased string\r\n * @todo Maybe make it better\r\n */\nexport function capitalize(str) {\n var arr = str.split(\"\");\n arr[0] = arr[0].toUpperCase();\n return arr.join(\"\");\n}\n/**\r\n * Converts any value into its string representation.\r\n *\r\n * @param value Value\r\n * @return String represantation of the value\r\n */\nexport function stringify(value) {\n return JSON.stringify(value);\n}\n/**\r\n * Escapes string so it can safely be used in a Regex.\r\n *\r\n * @param value Unsescaped string\r\n * @return Escaped string\r\n */\nexport function escapeForRgex(value) {\n return value.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n}\n/**\r\n * Splits the text into multiple lines, respecting maximum character count.\r\n * Prioretizes splitting on spaces and punctuation. Falls back on splitting\r\n * mid-word if there's no other option.\r\n *\r\n * @param text Text\r\n * @param maxChars Maximum number of characters per line\r\n * @return An array of split text\r\n */\nexport function splitTextByCharCount(text, maxChars, fullWords, rtl) {\n // Maybe the text fits?\n if (text.length <= maxChars) {\n return [text];\n }\n // Init result\n var res = [];\n // Split by words or by charts\n if (fullWords) {\n // Split by words first\n // Split by spacing\n var currentIndex = -1;\n var tmpText = text.replace(/([,;:!?\\\\\\/\\.\\s]+)/g, $strings.PLACEHOLDER + \"$1\" + $strings.PLACEHOLDER);\n var words = tmpText.split($strings.PLACEHOLDER);\n // Process each word\n for (var i = 0; i < words.length; i++) {\n // Get word and symbol count\n var word = words[i];\n var wordLength = word.length;\n // Ignore empty words\n if (wordLength === 0) {\n continue;\n }\n // Check word length\n //if ((wordLength > maxChars) && fullWords !== true) {\n if (wordLength > maxChars) {\n // A single word is longer than allowed symbol count\n // Break it up\n if (rtl) {\n word = reverseString(word);\n }\n var parts = word.match(new RegExp(\".{1,\" + maxChars + \"}\", \"g\"));\n // TODO is this correct ?\n if (parts) {\n if (rtl) {\n for (var x = 0; x < parts.length; x++) {\n parts[x] = reverseString(parts[x]);\n }\n //parts.reverse();\n }\n res = res.concat(parts);\n }\n } else {\n // Init current line\n if (currentIndex === -1) {\n res.push(\"\");\n currentIndex = 0;\n }\n // Check if we need to break into another line\n if (res[currentIndex].length + wordLength + 1 > maxChars && res[currentIndex] !== \"\") {\n res.push(\"\");\n currentIndex++;\n }\n // Add word\n res[currentIndex] += word;\n }\n // Update index\n currentIndex = res.length - 1;\n }\n } else {\n // Splitting by anywhere (living la vida facil)\n var parts = text.match(new RegExp(\".{1,\" + maxChars + \"}\", \"g\"));\n if (parts) {\n if (rtl) {\n for (var x = 0; x < parts.length; x++) {\n parts[x] = reverseString(parts[x]);\n }\n }\n res = parts;\n }\n }\n // Do we have only one word that does not fit?\n // Since fullWords is set and we can't split the word, we end up with empty\n // set.\n if (res.length == 1 && fullWords && res[0].length > maxChars) {\n res = [];\n }\n return res;\n}\n/**\r\n * Truncates the text to certain character count.\r\n *\r\n * Will add ellipsis if the string is truncated. Optionally, can truncate on\r\n * full words only.\r\n *\r\n * For RTL support, pass in the fifth parameter as `true`.\r\n *\r\n * @param text Input text\r\n * @param maxChars Maximum character count of output\r\n * @param ellipsis Ellipsis string, i.e. \"...\"\r\n * @param fullWords If `true`, will not break mid-word, unless there's a single word and it does not with into `maxChars`\r\n * @param rtl Is this an RTL text?\r\n * @return Truncated text\r\n */\nexport function truncateWithEllipsis(text, maxChars, ellipsis, fullWords, rtl) {\n if (text.length <= maxChars) {\n return text;\n }\n // Calc max chars\n maxChars -= ellipsis.length;\n if (maxChars < 1) {\n maxChars = 1;\n //ellipsis = \"\";\n }\n // Get lines\n var lines = splitTextByCharCount(text, maxChars, fullWords, rtl);\n // Use first line\n return (lines[0] || \"\") + ellipsis;\n}\n/**\r\n * Removes whitespace from beginning and end of the string.\r\n *\r\n * @param str Input\r\n * @return Output\r\n */\nexport function trim(str) {\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, \"\");\n}\n;\n/**\r\n * Removes whitespace from end of the string.\r\n *\r\n * @param str Input\r\n * @return Output\r\n */\nexport function rtrim(str) {\n return str.replace(/[\\s\\uFEFF\\xA0]+$/g, \"\");\n}\n;\n/**\r\n * Removes whitespace from beginning of the string.\r\n *\r\n * @param str Input\r\n * @return Output\r\n */\nexport function ltrim(str) {\n return str.replace(/^[\\s\\uFEFF\\xA0]+/g, \"\");\n}\n;\n/**\r\n * Reverses string.\r\n *\r\n * @param str Input\r\n * @return Output\r\n */\nexport function reverseString(str) {\n return str.split(\"\").reverse().join(\"\");\n}\n/**\r\n * Removes quotes from the string.\r\n *\r\n * @param str Input\r\n * @return Output\r\n */\nexport function unquote(str) {\n var res = str.trim();\n res = str.replace(/^'(.*)'$/, \"$1\");\n if (res == str) {\n res = str.replace(/^\"(.*)\"$/, \"$1\");\n }\n return res;\n}\n/**\r\n * Pads a string with additional characters to certain length.\r\n *\r\n * @param value A numeric value\r\n * @param len Result string length in characters\r\n * @param char A character to use for padding\r\n * @return Padded value as string\r\n */\nexport function padString(value, len, _char) {\n if (len === void 0) {\n len = 0;\n }\n if (_char === void 0) {\n _char = \"0\";\n }\n if (typeof value !== \"string\") {\n value = value.toString();\n }\n return len > value.length ? Array(len - value.length + 1).join(_char) + value : value;\n}\n/**\r\n * Tries to determine format type.\r\n *\r\n * @ignore Exclude from docs\r\n * @param format Format string\r\n * @return Format type (\"string\" | \"number\" | \"date\" | \"duration\")\r\n */\nexport function getFormat(format) {\n // Undefined?\n if (typeof format === \"undefined\") {\n return $strings.STRING;\n }\n // Cleanup and lowercase format\n format = format.toLowerCase().replace(/^\\[[^\\]]*\\]/, \"\");\n // Remove style tags\n format = format.replace(/\\[[^\\]]+\\]/, \"\");\n // Trim\n format = format.trim();\n // Check for any explicit format hints (i.e. /Date)\n var hints = format.match(/\\/(date|number|duration)$/);\n if (hints) {\n return hints[1];\n }\n // Check for explicit hints\n if (format === $strings.NUMBER) {\n return $strings.NUMBER;\n }\n if (format === $strings.DATE) {\n return $strings.DATE;\n }\n if (format === $strings.DURATION) {\n return $strings.DURATION;\n }\n // Detect number formatting symbols\n if (format.match(/[#0]/)) {\n return $strings.NUMBER;\n }\n // Detect date formatting symbols\n if (format.match(/[ymwdhnsqaxkzgtei]/)) {\n return $strings.DATE;\n }\n // Nothing? Let's display as string\n return $strings.STRING;\n}\n/**\r\n * Cleans up format:\r\n * * Strips out formatter hints\r\n *\r\n * @ignore Exclude from docs\r\n * @param format Format\r\n * @return Cleaned format\r\n */\nexport function cleanFormat(format) {\n return format.replace(/\\/(date|number|duration)$/i, \"\");\n}\n/**\r\n * Strips all tags from the string.\r\n *\r\n * @param text Source string\r\n * @return String without tags\r\n */\nexport function stripTags(text) {\n return text ? text.replace(/<[^>]*>/g, \"\") : text;\n}\n/**\r\n * Removes new lines and tags from a string.\r\n *\r\n * @param text String to conver\r\n * @return Converted string\r\n */\nexport function plainText(text) {\n return text ? stripTags(text.replace(/[\\n\\r]+/g, \". \")) : text;\n}\n/**\r\n * ============================================================================\r\n * TYPE CONVERSION FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Converts numeric value into string. Deals with large or small numbers that\r\n * would otherwise use exponents.\r\n *\r\n * @param value Numeric value\r\n * @return Numeric value as string\r\n */\nexport function numberToString(value) {\n // TODO handle Infinity and -Infinity\n if ($type.isNaN(value)) {\n return \"NaN\";\n }\n if (value === Infinity) {\n return \"Infinity\";\n }\n if (value === -Infinity) {\n return \"-Infinity\";\n }\n // Negative 0\n if (value === 0 && 1 / value === -Infinity) {\n return \"-0\";\n }\n // Preserve negative and deal with absoute values\n var negative = value < 0;\n value = Math.abs(value);\n // TODO test this\n var parsed = $type.getValue(/^([0-9]+)(?:\\.([0-9]+))?(?:e[\\+\\-]([0-9]+))?$/.exec(\"\" + value));\n var digits = parsed[1];\n var decimals = parsed[2] || \"\";\n var res;\n // Leave the nummber as it is if it does not use exponents\n if (parsed[3] == null) {\n res = decimals === \"\" ? digits : digits + \".\" + decimals;\n } else {\n var exponent = +parsed[3];\n // Deal with decimals\n if (value < 1) {\n var zeros = exponent - 1;\n res = \"0.\" + $string.repeat(\"0\", zeros) + digits + decimals;\n // Deal with integers\n } else {\n var zeros = exponent - decimals.length;\n if (zeros === 0) {\n res = digits + decimals;\n } else if (zeros < 0) {\n res = digits + decimals.slice(0, zeros) + \".\" + decimals.slice(zeros);\n } else {\n res = digits + decimals + $string.repeat(\"0\", zeros);\n }\n }\n }\n return negative ? \"-\" + res : res;\n}\n/**\r\n * Converts anything to Date object.\r\n *\r\n * @param value A value of any type\r\n * @return Date object representing a value\r\n */\nexport function anyToDate(value) {\n if ($type.isDate(value)) {\n // TODO maybe don't create a new Date ?\n return new Date(value);\n } else if ($type.isNumber(value)) {\n return new Date(value);\n } else {\n // Try converting to number (assuming timestamp)\n var num = Number(value);\n if (!$type.isNumber(num)) {\n return new Date(value);\n } else {\n return new Date(num);\n }\n }\n}\n/**\r\n * Tries converting any value to a number.\r\n *\r\n * @param value Source value\r\n * @return Number\r\n */\nexport function anyToNumber(value) {\n if ($type.isDate(value)) {\n return value.getTime();\n } else if ($type.isNumber(value)) {\n return value;\n } else if ($type.isString(value)) {\n // Try converting to number (assuming timestamp)\n var num = Number(value);\n if (!$type.isNumber(num)) {\n // Failing\n return undefined;\n } else {\n return num;\n }\n }\n}\n/**\r\n * ============================================================================\r\n * DATE-RELATED FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Returns a year day.\r\n *\r\n * @param date Date\r\n * @param utc Assume UTC dates?\r\n * @return Year day\r\n * @todo Account for UTC\r\n */\nexport function getYearDay(date, utc) {\n if (utc === void 0) {\n utc = false;\n }\n var first = new Date(date.getFullYear(), 0, 1, 0, 0, 0, 0);\n return Math.floor((date.getTime() - first.getTime()) / 86400000) + 1;\n}\n/**\r\n * Returns week number for a given date.\r\n *\r\n * @param date Date\r\n * @param utc Assume UTC dates?\r\n * @return Week number\r\n * @todo Account for UTC\r\n */\nexport function getWeek(date, utc) {\n if (utc === void 0) {\n utc = false;\n }\n var day = getYearDay(date, utc) - 1;\n var week = Math.floor((day - (date.getDay() || 7) + 10) / 7);\n if (week === 0) {\n week = 53;\n } else if (week === 53) {\n week = 1;\n }\n return week;\n}\n/**\r\n * Returns a week number in the month.\r\n *\r\n * @param date Source Date\r\n * @param utc Assume UTC dates?\r\n * @return Week number in month\r\n */\nexport function getMonthWeek(date, utc) {\n if (utc === void 0) {\n utc = false;\n }\n var firstWeek = getWeek(new Date(date.getFullYear(), date.getMonth(), 1), utc);\n var currentWeek = getWeek(date, utc);\n if (currentWeek == 1) {\n currentWeek = 53;\n }\n return currentWeek - firstWeek + 1;\n}\n/**\r\n * Returns a year day out of the given week number.\r\n *\r\n * @param week Week\r\n * @param year Year\r\n * @param weekday Weekday\r\n * @param utc Assume UTC dates\r\n * @return Day in a year\r\n */\nexport function getDayFromWeek(week, year, weekday, utc) {\n if (weekday === void 0) {\n weekday = 1;\n }\n if (utc === void 0) {\n utc = false;\n }\n var date = new Date(year, 0, 4, 0, 0, 0, 0);\n if (utc) {\n date.setUTCFullYear(year);\n }\n var day = week * 7 + weekday - ((date.getDay() || 7) + 3);\n return day;\n}\n/**\r\n * Returns 12-hour representation out of the 24-hour hours.\r\n *\r\n * @param hours 24-hour number\r\n * @return 12-hour number\r\n */\nexport function get12Hours(hours, base) {\n if (hours > 12) {\n hours -= 12;\n } else if (hours === 0) {\n hours = 12;\n }\n return $type.hasValue(base) ? hours + (base - 1) : hours;\n}\n/**\r\n * Returns a string name of the tome zone.\r\n *\r\n * @param date Date object\r\n * @param long Should return long (\"Pacific Standard Time\") or short abbreviation (\"PST\")\r\n * @param savings Include information if it's in daylight savings mode\r\n * @param utc Assume UTC dates\r\n * @return Time zone name\r\n */\nexport function getTimeZone(date, _long, savings, utc) {\n if (_long === void 0) {\n _long = false;\n }\n if (savings === void 0) {\n savings = false;\n }\n if (utc === void 0) {\n utc = false;\n }\n if (utc) {\n return _long ? \"Coordinated Universal Time\" : \"UTC\";\n }\n var wotz = date.toLocaleString(\"UTC\");\n var wtz = date.toLocaleString(\"UTC\", {\n timeZoneName: _long ? \"long\" : \"short\"\n }).substr(wotz.length);\n //wtz = wtz.replace(/[+-]+[0-9]+$/, \"\");\n if (savings === false) {\n wtz = wtz.replace(/ (standard|daylight|summer|winter) /i, \" \");\n }\n return wtz;\n}\n/**\r\n * ============================================================================\r\n * NUMBER-RELATED FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Returns a random number between `from` and `to`.\r\n *\r\n * @param from From number\r\n * @param to To number\r\n * @return Random number\r\n */\nexport function random(from, to) {\n return Math.floor(Math.random() * to) + from;\n}\n/**\r\n * Fits the number into specific `min` and `max` bounds.\r\n *\r\n * @param value Input value\r\n * @param min Minimum value\r\n * @param max Maximum value\r\n * @return Possibly adjusted value\r\n */\nexport function fitNumber(value, min, max) {\n if (value > max) {\n return max;\n } else if (value < min) {\n return min;\n }\n return value;\n}\n/**\r\n * Fits the number into specific `min` and `max` bounds.\r\n *\r\n * If the value is does not fit withing specified range, it \"wraps\" around the\r\n * values.\r\n *\r\n * For example, if we have input value 10 with min set at 1 and max set at 8,\r\n * the value will not fit. The remainder that does not fit (2) will be added\r\n * to `min`, resulting in 3.\r\n *\r\n * The output of regular `fitNumber()` would return 8 instead.\r\n *\r\n * @param value Input value\r\n * @param min Minimum value\r\n * @param max Maximum value\r\n * @return Possibly adjusted value\r\n */\nexport function fitNumberRelative(value, min, max) {\n var gap = max - min;\n if (value > max) {\n value = min + (value - gap * Math.floor(value / gap));\n } else if (value < min) {\n value = min + (value - gap * Math.floor(value / gap));\n }\n return value;\n}\n/**\r\n * ============================================================================\r\n * SPRITE-RELATED FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Converts SVG element coordinates to coordinates within specific [[Sprite]].\r\n *\r\n * @param point SVG coordinates\r\n * @param sprite Sprite\r\n * @return Sprite coordinates\r\n */\nexport function svgPointToSprite(point, sprite) {\n var x = point.x;\n var y = point.y;\n var sprites = [];\n if (sprite) {\n while ($type.hasValue(sprite.parent)) {\n sprites.push(sprite);\n sprite = sprite.parent;\n }\n sprites.reverse();\n for (var i = 0; i < sprites.length; i++) {\n var sprite_1 = sprites[i];\n var angle = sprite_1.rotation;\n var relativeX = x - sprite_1.pixelX - sprite_1.ex;\n var relativeY = y - sprite_1.pixelY - sprite_1.ey;\n if (sprite_1.dx) {\n x -= sprite_1.dx;\n }\n if (sprite_1.dy) {\n y -= sprite_1.dy;\n }\n x = ($math.cos(-angle) * relativeX - $math.sin(-angle) * relativeY) / sprite_1.scale - sprite_1.pixelPaddingLeft;\n y = ($math.cos(-angle) * relativeY + $math.sin(-angle) * relativeX) / sprite_1.scale - sprite_1.pixelPaddingTop;\n }\n }\n return {\n x: x,\n y: y\n };\n}\n/**\r\n * Converts coordinates within [[Sprite]] to coordinates relative to the whole\r\n * SVG element.\r\n *\r\n * @param point Sprite coordinates\r\n * @param sprite Sprite\r\n * @return SVG coordinates\r\n */\nexport function spritePointToSvg(point, sprite) {\n var x = point.x;\n var y = point.y;\n if (sprite) {\n while ($type.hasValue(sprite.parent)) {\n var angle = sprite.rotation;\n x += sprite.pixelPaddingLeft + sprite.ex;\n y += sprite.pixelPaddingTop + sprite.ey;\n if (sprite.dx) {\n x += sprite.dx;\n }\n if (sprite.dy) {\n y += sprite.dy;\n }\n var relativeX = sprite.pixelX + (x * $math.cos(angle) - y * $math.sin(angle)) * sprite.scale;\n var relativeY = sprite.pixelY + (x * $math.sin(angle) + y * $math.cos(angle)) * sprite.scale;\n x = relativeX;\n y = relativeY;\n sprite = sprite.parent;\n }\n }\n return {\n x: x,\n y: y\n };\n}\n/**\r\n * Converts coordinates of one sprite to another.\r\n *\r\n * @param point Sprite coordinates\r\n * @param sprite Sprite\r\n * @param toSprite Sprite\r\n * @return converted coordinates\r\n */\nexport function spritePointToSprite(point, sprite, toSprite) {\n return svgPointToSprite(spritePointToSvg(point, sprite), toSprite);\n}\n/**\r\n * Converts a rectangle expressed in SVG element coordinates to coordinates\r\n * within specific [[Sprite]].\r\n *\r\n * @param rect SVG rectangle\r\n * @param sprite Sprite\r\n * @return Sprite rectangle\r\n */\nexport function svgRectToSprite(rect, sprite) {\n var p1 = svgPointToSprite(rect, sprite);\n var p2 = svgPointToSprite({\n x: rect.x + rect.width,\n y: rect.y + rect.height\n }, sprite);\n return {\n x: p1.x,\n y: p1.y,\n width: p2.x - p1.x,\n height: p2.y - p1.y\n };\n}\n/**\r\n * Converts a rectangle expressed in [[Sprite]] coordinates to SVG coordinates.\r\n *\r\n * @param rect Sprite rectangle\r\n * @param sprite Sprite\r\n * @return SVG rectangle\r\n */\nexport function spriteRectToSvg(rect, sprite) {\n var p1 = spritePointToSvg(rect, sprite);\n var p2 = spritePointToSvg({\n x: rect.x + rect.width,\n y: rect.y + rect.height\n }, sprite);\n return {\n x: p1.x,\n y: p1.y,\n width: p2.x - p1.x,\n height: p2.y - p1.y\n };\n}\n/**\r\n * Converts global document-wide coordinates to coordinates within SVG element.\r\n *\r\n * @param point Global coordinates\r\n * @param svgContainer SVG element\r\n * @return SVG coordinates\r\n */\nexport function documentPointToSvg(point, svgContainer, cssScale) {\n try {\n var bbox = svgContainer.getBoundingClientRect();\n if (!$type.isNumber(cssScale)) {\n cssScale = 1;\n }\n return {\n \"x\": (point.x - bbox.left) / cssScale,\n \"y\": (point.y - bbox.top) / cssScale\n };\n } catch (e) {\n return point;\n }\n}\n/**\r\n * Converts SVG coordinates to global document-wide coordinates.\r\n *\r\n * @param point SVG coordinates\r\n * @param svgContainer SVG element\r\n * @return Global coordinates\r\n */\nexport function svgPointToDocument(point, svgContainer) {\n try {\n var bbox = svgContainer.getBoundingClientRect();\n return {\n \"x\": point.x + bbox.left,\n \"y\": point.y + bbox.top\n };\n } catch (e) {\n return point;\n }\n}\n/**\r\n * Converts document-wide global coordinates to coordinates within specific\r\n * [[Sprite]].\r\n *\r\n * @param point Global coordinates\r\n * @param sprite Sprite\r\n * @return Sprite coordinates\r\n */\nexport function documentPointToSprite(point, sprite) {\n if (sprite && sprite.htmlContainer) {\n var svgPoint = documentPointToSvg(point, $type.getValue(sprite.htmlContainer), sprite.svgContainer.cssScale);\n return svgPointToSprite(svgPoint, sprite);\n } else {\n return point;\n }\n}\n/**\r\n * Converts coordinates within [[Sprite]] to global document coordinates.\r\n *\r\n * @param point Sprite coordinates\r\n * @param sprite Sprite\r\n * @return Global coordinates\r\n */\nexport function spritePointToDocument(point, sprite) {\n if (sprite && sprite.htmlContainer) {\n var svgPoint = spritePointToSvg(point, sprite);\n return svgPointToDocument(svgPoint, $type.getValue(sprite.htmlContainer));\n } else {\n return point;\n }\n}\n/**\r\n * ============================================================================\r\n * DEPRECATED FUNCTIONS\r\n * @todo Review and remove\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Returns element's width.\r\n *\r\n * @ignore Exclude from docs\r\n * @param element Element\r\n * @return Width (px)\r\n * @deprecated Not used anywhere\r\n */\nexport function width(element) {\n return element.clientWidth;\n}\n/**\r\n * Returns element's height.\r\n *\r\n * @ignore Exclude from docs\r\n * @param element Element\r\n * @return Height (px)\r\n * @deprecated Not used anywhere\r\n */\nexport function height(element) {\n return element.clientHeight;\n}\n/**\r\n * Returns number of decimals\r\n *\r\n * @ignore Exclude from docs\r\n * @param number Input number\r\n * @return Number of decimals\r\n */\nexport function decimalPlaces(number) {\n var match = ('' + number).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);\n if (!match) {\n return 0;\n }\n return Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? +match[2] : 0));\n}\nvar urlRegexp = /^([a-zA-Z][a-zA-Z0-9\\+\\.\\-]*:)?(?:(\\/\\/)([^\\@]+\\@)?([^\\/\\?\\#\\:]*)(\\:[0-9]+)?)?([^\\?\\#]*)(\\?[^\\#]*)?(\\#.*)?$/;\n/**\r\n * Parses a URL\r\n *\r\n * @ignore Exclude from docs\r\n */\n// TODO test this\nexport function parseUrl(url) {\n var match = urlRegexp.exec(url);\n return {\n protocol: match && match[1] || \"\",\n separator: match && match[2] || \"\",\n authority: match && match[3] || \"\",\n domain: match && match[4] || \"\",\n port: match && match[5] || \"\",\n path: match && match[6] || \"\",\n query: match && match[7] || \"\",\n hash: match && match[8] || \"\"\n };\n}\n/**\r\n * Serializes a Url into a string\r\n *\r\n * @ignore Exclude from docs\r\n */\nexport function serializeUrl(url) {\n return url.protocol + url.separator + url.authority + url.domain + url.port + url.path + url.query + url.hash;\n}\n/**\r\n * Checks whether a Url is relative or not\r\n *\r\n * @ignore Exclude from docs\r\n */\n// TODO is this correct ?\nfunction isRelativeUrl(url) {\n return url.protocol === \"\" && url.separator === \"\" && url.authority === \"\" && url.domain === \"\" && url.port === \"\";\n}\n/**\r\n * Joins together two URLs, resolving relative URLs correctly\r\n *\r\n * @ignore Exclude from docs\r\n */\n// TODO test this\nexport function joinUrl(left, right) {\n var parsedLeft = parseUrl(left);\n var parsedRight = parseUrl(right);\n if (isRelativeUrl(parsedLeft)) {\n throw new Error(\"Left URL is not absolute\");\n }\n if (isRelativeUrl(parsedRight)) {\n // TODO is this correct ?\n if (parsedRight.path !== \"\") {\n if (parsedRight.path[0] === \"/\") {\n parsedLeft.path = parsedRight.path;\n // TODO is this correct ?\n } else {\n var leftPath = parsedLeft.path.split(/\\//);\n var rightPath = parsedRight.path.split(/\\//);\n // TODO is this correct ?\n if (leftPath.length === 0) {\n if (rightPath.length !== 0) {\n leftPath.push(\"\");\n }\n } else if (leftPath.length > 1) {\n leftPath.pop();\n }\n $array.pushAll(leftPath, rightPath);\n parsedLeft.path = leftPath.join(\"/\");\n if (parsedLeft.path !== \"\" && parsedLeft.path[0] !== \"/\") {\n throw new Error(\"URL path must start with /\");\n }\n }\n }\n // TODO is this correct ?\n parsedLeft.query = parsedRight.query;\n parsedLeft.hash = parsedRight.hash;\n return serializeUrl(parsedLeft);\n } else {\n return serializeUrl(parsedRight);\n }\n}\n/**\r\n * Detects MSIE.\r\n *\r\n * @return Is IE?\r\n */\nexport function isIE() {\n return !!window.MSInputMethodContext && !!document.documentMode;\n}","import * as $array from \"./Array\";\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport function fromArray(array) {\n return function (push) {\n var length = array.length;\n for (var i = 0; i < length; ++i) {\n if (!push(array[i])) {\n break;\n }\n }\n };\n}\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport function length(iter) {\n var sum = 0;\n iter(function (_) {\n ++sum;\n return true;\n });\n return sum;\n}\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport function toArray(iter) {\n var output = [];\n iter(function (value) {\n output.push(value);\n return true;\n });\n return output;\n}\n/**\r\n * [iter description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport function eachContinue(iter, fn) {\n iter(fn);\n}\n/**\r\n * [iter description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport function each(iter, fn) {\n iter(function (value) {\n fn(value);\n return true;\n });\n}\n/**\r\n * [iter description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport function sort(iter, fn) {\n return fromArray(toArray(iter).sort(fn));\n}\n/**\r\n * [A description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport function map(iter, fn) {\n return function (push) {\n return iter(function (value) {\n return push(fn(value));\n });\n };\n}\n/**\r\n * [iter description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport function filter(iter, fn) {\n return function (push) {\n return iter(function (value) {\n if (fn(value)) {\n return push(value);\n } else {\n return true;\n }\n });\n };\n}\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport function concat() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return function (push) {\n var go = true;\n var push2 = function push2(value) {\n return go = push(value);\n };\n var length = args.length;\n for (var i = 0; i < length; ++i) {\n args[i](push2);\n if (!go) {\n break;\n }\n }\n };\n}\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport function flatten(iter) {\n return function (push) {\n var go = true;\n var push2 = function push2(value) {\n return go = push(value);\n };\n iter(function (value) {\n value(push2);\n return go;\n });\n };\n}\n/**\r\n * [number description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport function indexed(iter) {\n return function (push) {\n var index = 0;\n iter(function (value) {\n return push([index++, value]);\n });\n };\n}\n/**\r\n * [iter description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport function findIndex(iter, matches) {\n var found = false;\n var i = 0;\n iter(function (value) {\n if (matches(value)) {\n found = true;\n return false;\n } else {\n ++i;\n return true;\n }\n });\n return found ? i : -1;\n}\n/**\r\n * [iter description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport function find(iter, matches) {\n var output;\n iter(function (value) {\n if (matches(value)) {\n output = value;\n return false;\n } else {\n return true;\n }\n });\n return output;\n}\n/**\r\n * [A description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport function findMap(iter, matches) {\n var output;\n iter(function (value) {\n var v = matches(value);\n if (v !== null) {\n output = v;\n return false;\n } else {\n return true;\n }\n });\n return output;\n}\n/**\r\n * [iter description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport function contains(iter, matches) {\n var output = false;\n iter(function (value) {\n if (matches(value)) {\n output = true;\n return false;\n } else {\n return true;\n }\n });\n return output;\n}\n/**\r\n * [A description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport function foldl(iter, init, fn) {\n iter(function (value) {\n init = fn(init, value);\n return true;\n });\n return init;\n}\n/**\r\n * [min2 description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param left [description]\r\n * @param right [description]\r\n * @return [description]\r\n */\nfunction min2(left, right) {\n if (left == null || right < left) {\n return right;\n } else {\n return left;\n }\n}\n/**\r\n * [min description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Verify that this works correctly\r\n * @todo Description\r\n * @param a [description]\r\n * @return [description]\r\n */\nexport function min(a) {\n return foldl(a, null, min2);\n}\n/**\r\n * [max2 description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param left [description]\r\n * @param right [description]\r\n * @return [description]\r\n */\nfunction max2(left, right) {\n if (left == null || right > left) {\n return right;\n } else {\n return left;\n }\n}\n/**\r\n * [max description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Verify that this works correctly\r\n * @todo Description\r\n * @param a [description]\r\n * @return [description]\r\n */\nexport function max(a) {\n return foldl(a, null, max2);\n}\n/**\r\n * [join description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param iter [description]\r\n * @param separator [description]\r\n * @return [description]\r\n */\nexport function join(iter, separator) {\n if (separator === void 0) {\n separator = \"\";\n }\n var first = true;\n var init = \"\";\n iter(function (value) {\n if (first) {\n first = false;\n } else {\n init += separator;\n }\n init += value;\n return true;\n });\n return init;\n}\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nvar ListIterator = /** @class */function () {\n /**\r\n * Constructor\r\n *\r\n * @param list [description]\r\n * @param create [description]\r\n */\n function ListIterator(list, create) {\n // flag specifies if iterator should create new list item if it is reqested for a nextItem but there is no more left in the list\n this.createNewItems = false;\n this.list = list;\n this._create = create;\n this.reset();\n }\n ListIterator.prototype.reset = function () {\n this._listCopy = toArray(this.list.iterator());\n };\n ListIterator.prototype.clear = function () {\n this._listCopy.length = 0;\n };\n ListIterator.prototype.getFirst = function () {\n return this.returnItem(0);\n };\n ListIterator.prototype.getLast = function () {\n return this.returnItem(this._listCopy.length - 1);\n };\n ListIterator.prototype.find = function (fn) {\n var index = $array.findIndex(this._listCopy, fn);\n if (index !== -1) {\n var item = this._listCopy[index];\n // TODO use removeIndex instead ?\n $array.remove(this._listCopy, item);\n return item;\n } else {\n return this.getLast();\n }\n };\n ListIterator.prototype.removeItem = function (item) {\n return $array.remove(this._listCopy, item);\n };\n ListIterator.prototype.returnItem = function (index) {\n if (index >= 0 && index < this._listCopy.length) {\n var item = this._listCopy[index];\n // TODO use removeIndex instead ?\n $array.remove(this._listCopy, item);\n return item;\n } else if (this.createNewItems) {\n return this._create();\n }\n };\n ListIterator.prototype.iterator = function () {\n return fromArray(this._listCopy);\n };\n return ListIterator;\n}();\nexport { ListIterator };","import * as $math from \"./Math\";\nimport * as $type from \"./Type\";\n/**\r\n * ============================================================================\r\n * UTILITY FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Searches `array` for `value`.\r\n *\r\n * Returns -1 if not found.\r\n *\r\n * @param array Source array\r\n * @param value Value to search\r\n * @returns Index\r\n */\nexport function indexOf(array, value) {\n var length = array.length;\n for (var i = 0; i < length; ++i) {\n // TODO handle NaN\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}\n/**\r\n * Calls `test` for each element in `array`.\r\n *\r\n * If `test` returns `true` then it immediately returns `true`.\r\n *\r\n * If `test` returns `false` for all of the elements in `array` then it returns `false`.\r\n *\r\n * @param array Source array\r\n * @param test Function which is called on each element\r\n * @returns Whether `test` returned true or not\r\n */\nexport function any(array, test) {\n var length = array.length;\n for (var i = 0; i < length; ++i) {\n if (test(array[i])) {\n return true;\n }\n }\n return false;\n}\n/**\r\n * Calls `fn` function for every member of array and returns a new array out\r\n * of all outputs.\r\n *\r\n * @param array Source array\r\n * @param fn Callback function\r\n * @returns New array\r\n */\nexport function map(array, fn) {\n var length = array.length;\n var output = new Array(length);\n for (var i = 0; i < length; ++i) {\n output[i] = fn(array[i], i);\n }\n return output;\n}\n/**\r\n * Iterates through all items in array and calls `fn` function for each of\r\n * them.\r\n *\r\n * @param array Source array\r\n * @param fn Callback function\r\n */\nexport function each(array, fn) {\n var length = array.length;\n for (var i = 0; i < length; ++i) {\n fn(array[i], i);\n }\n}\n/**\r\n * Iterates through all items in array in reverse order and calls `fn` function for each of\r\n * them.\r\n *\r\n * @param array Source array\r\n * @param fn Callback function\r\n */\nexport function eachReverse(array, fn) {\n var i = array.length;\n while (i--) {\n fn(array[i], i);\n }\n}\n/**\r\n * Iterates through all items in array and calls `fn` function for each of\r\n * them.\r\n *\r\n * If `fn` call evaluates to `false`, further iteration is cancelled.\r\n *\r\n * @param array Source array\r\n * @param fn Callback function\r\n */\nexport function eachContinue(array, fn) {\n var length = array.length;\n for (var i = 0; i < length; ++i) {\n if (!fn(array[i], i)) {\n break;\n }\n }\n}\n/**\r\n * Shifts an item at `index` towards beginning of the array.\r\n *\r\n * @param array Source array\r\n * @param index Target element index\r\n */\nexport function shiftLeft(array, index) {\n var length = array.length;\n for (var i = index; i < length; ++i) {\n array[i - index] = array[i];\n }\n array.length = length - index;\n}\n/**\r\n * Returns the last item of the array.\r\n *\r\n * @param array Source array\r\n * @returns Last item\r\n */\nexport function last(array) {\n var length = array.length;\n return length ? array[length - 1] : undefined;\n}\n/**\r\n * Returns the first item of the array.\r\n *\r\n * @param array Source array\r\n * @returns Last item\r\n */\nexport function first(array) {\n return array[0];\n}\n/**\r\n * Inserts `element` into `array` at `index`.\r\n *\r\n * Caps `index` to be between `0` and `array.length`\r\n *\r\n * @param array Source array\r\n * @param element Item to insert\r\n * @param array Index to insert item at\r\n */\nexport function insert(array, element, index) {\n //if (array) {\n index = $math.fitToRange(index, 0, array.length);\n array.splice(index, 0, element);\n //}\n}\n/**\r\n * Removes all copies of `element` from `array` (if they exist) and then\r\n * inserts `element` at `index`.\r\n *\r\n * @param array Source array\r\n * @param element Item\r\n * @param array Index to move item to\r\n */\nexport function setIndex(array, element, index) {\n remove(array, element);\n insert(array, element, index);\n}\n/**\r\n * Pushes all of the elements from `input` into `array`.\r\n *\r\n * @param array Output array\r\n * @param input Input array\r\n */\nexport function pushAll(array, input) {\n var length = input.length;\n for (var i = 0; i < length; ++i) {\n array.push(input[i]);\n }\n}\n/**\r\n * Removes `element` from `array`.\r\n *\r\n * If there are multiple copies of `element`, they are all removed.\r\n *\r\n * @param array Source array\r\n * @param element Item to remove\r\n */\nexport function remove(array, element) {\n var found = false;\n var index = array.indexOf(element);\n if (index !== -1) {\n found = true;\n array.splice(index, 1);\n var length_1 = array.length;\n while (index < length_1) {\n // TODO handle NaN\n if (array[index] === element) {\n array.splice(index, 1);\n --length_1;\n } else {\n ++index;\n }\n }\n }\n return found;\n}\n/**\r\n * Adds an `element` to `array`.\r\n *\r\n * If array already contains and item like this, it is removed before adding\r\n * it again.\r\n *\r\n * Optionally `toIndex` can be specified to add element at specific index.\r\n *\r\n * @param array Source array\r\n * @param element Item to add\r\n * @param array Index to move item to\r\n */\nexport function move(array, element, toIndex) {\n // @todo this implementation must be the same as the List.moveValue method\n // @todo don't do anything if the desired index is the same as the current index\n var index = indexOf(array, element);\n // @todo remove all old values rather than only the first ?\n if (index !== -1) {\n removeIndex(array, index);\n }\n if (toIndex == null) {\n array.push(element);\n } else {\n insertIndex(array, toIndex, element);\n }\n}\n/**\r\n * Inserts `element` into `array` at `index`.\r\n *\r\n * If `index` is not provided, it will insert `element` at the end of `array`.\r\n *\r\n * @param array Source array\r\n * @param element Item to add\r\n * @param array Index to add item at\r\n */\nexport function add(array, element, index) {\n // Append to the end if index is not set\n if (!$type.isNumber(index)) {\n array.push(element);\n }\n // Add to the beginning of array if index is 0\n else if (index === 0) {\n array.unshift(element);\n }\n // Add to indicated place if index is set\n else {\n array.splice(index, 0, element);\n }\n}\n/**\r\n * Removes `element` from `array` (if it exists) and then inserts `element` at\r\n * `index`.\r\n *\r\n * If `index` is not provided, it will insert `element` at the end of `array`.\r\n *\r\n * @param array Source array\r\n * @param element Item to remove\r\n * @param array Index to move item to\r\n */\nexport function replace(array, element, index) {\n // check if exists\n var ind = array.indexOf(element);\n // remove if exists\n if (ind !== -1) {\n array.splice(ind, 1);\n }\n // add to end if index is not set\n if (!$type.isNumber(index)) {\n array.push(element);\n }\n // add to indicated place if index is set\n else {\n array.splice(index, 0, element);\n }\n}\n/**\r\n * Wraps `input` in an array, if it isn't already an array.\r\n *\r\n * @param input Source value\r\n * @return An array\r\n */\nexport function toArray(input) {\n if (Array.isArray(input)) {\n return input;\n } else {\n return [input];\n }\n}\n/**\r\n * Returns `true` if `element` exists in `array`.\r\n *\r\n * @param array Source array\r\n * @param element Item to search for\r\n * @returns Item in array?\r\n */\nexport function has(array, element) {\n return indexOf(array, element) !== -1;\n}\n/**\r\n * Returns a shallow copy of `array`.\r\n *\r\n * @param array Source array\r\n * @returns Copy of the array\r\n */\nexport function copy(array) {\n var length = array.length;\n // It's faster to create the array with a pre-defined length\n var output = new Array(length);\n for (var i = 0; i < length; ++i) {\n // Because the array has a pre-defined length, we have to assign rather than push\n // This is also faster than pushing\n output[i] = array[i];\n }\n return output;\n}\n/**\r\n * Returns a copy of `array` which contains all the elements between `start`\r\n * and `end`. (including `start` and excluding `end`)\r\n *\r\n * If `end` is not provided, it defaults to `array.length`.\r\n *\r\n * @param array Source array\r\n * @param start Start index\r\n * @param end End index\r\n * @returns Part of the array\r\n */\nexport function slice(array, start, end) {\n if (end === void 0) {\n end = array.length;\n }\n var output = new Array(end - start);\n for (var i = start; i < end; ++i) {\n output[i - start] = array[i];\n }\n return output;\n}\n/**\r\n * Inserts a value into array at specific index.\r\n *\r\n * @param array Source array\r\n * @param index Index\r\n * @param value Value to insert\r\n */\nexport function insertIndex(array, index, value) {\n array.splice(index, 0, value);\n}\n/**\r\n * Removes a value from array at specific index.\r\n *\r\n * @param array Source array\r\n * @param index Index\r\n */\nexport function removeIndex(array, index) {\n array.splice(index, 1);\n}\n/**\r\n * Orders an array using specific `ordering` function and returns index of\r\n * the `value`.\r\n *\r\n * @ignore Exclude from docs\r\n * @param array Source array\r\n * @param ordering An ordering function\r\n * @param value Value to search for\r\n * @returns Result of the search\r\n */\nexport function getSortedIndex(array, ordering, value) {\n var start = 0;\n var end = array.length;\n var found = false;\n while (start < end) {\n // TODO is this faster/slower than using Math.floor ?\n var pivot = start + end >> 1;\n var order = ordering(value, array[pivot]);\n // less\n if (order < 0) {\n end = pivot;\n // equal\n } else if (order === 0) {\n found = true;\n start = pivot + 1;\n // more\n } else {\n start = pivot + 1;\n }\n }\n return {\n found: found,\n index: found ? start - 1 : start\n };\n}\n/**\r\n * Searches the array using custom function and returns index of the item if\r\n * found.\r\n *\r\n * Will call `matches` function on all items of the array. If return value\r\n * evaluates to `true`, index is returned.\r\n *\r\n * Otherwise returns -1.\r\n *\r\n * @param array Source array\r\n * @param matches Search function\r\n * @returns Index of the item if found\r\n */\nexport function findIndex(array, matches) {\n var length = array.length;\n for (var i = 0; i < length; ++i) {\n if (matches(array[i], i)) {\n return i;\n }\n }\n return -1;\n}\n/**\r\n * Searches the array using custom function and returns item if found.\r\n *\r\n * Will call `matches` function on all items of the array. If return value\r\n * evaluates to `true`, index is returned.\r\n *\r\n * Otherwise returns `undefined`.\r\n *\r\n * @param array Source array\r\n * @param matches Search function\r\n * @returns Item if found\r\n */\nexport function find(array, matches) {\n var index = findIndex(array, matches);\n if (index !== -1) {\n return array[index];\n }\n}\n/**\r\n * Iterates through all items in array and calls `fn` function for each of\r\n * them.\r\n *\r\n * @param array Source array\r\n * @param fn Callback function\r\n */\nexport function shuffle(array) {\n // https://stackoverflow.com/a/2450976/449477\n var currentIndex = array.length,\n temporaryValue,\n randomIndex;\n // While there remain elements to shuffle...\n while (0 !== currentIndex) {\n // Pick a remaining element...\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n // And swap it with the current element.\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n}","/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Represents a relative value (percent).\r\n *\r\n * The Percent object, can be instantiated using two ways:\r\n *\r\n * * Via `new Percent(X)`.\r\n * * Via `am4core.percent(X)`.\r\n *\r\n * `Percent` type objects can be used in a number of dual-measuring or\r\n * positioning properties, like `width`. E.g.:\r\n *\r\n * ```TypeScript\r\n * chart.paddingRight = new Percent(10);\r\n * // or\r\n * chart.paddingRight = am4core.percent(10);\r\n * ```\r\n * ```JavaScript\r\n * chart.paddingRight = new Percent(10);\r\n * // or\r\n * chart.paddingRight = am4core.percent(10);\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"paddingRight\": \"10%\"\r\n * }\r\n * ```\r\n */\nvar Percent = /** @class */function () {\n /**\r\n * Constructor.\r\n *\r\n * @param percent Percent value\r\n */\n function Percent(percent) {\n this._value = percent;\n }\n Object.defineProperty(Percent.prototype, \"value\", {\n /**\r\n * Relative value.\r\n *\r\n * E.g. 100% is 1, 50% is 0.5, etc.\r\n *\r\n * This is useful to apply transformations to other values. E.g.:\r\n *\r\n * ```TypeScript\r\n * let value = 256;\r\n * let percent = new am4core.Percent(50);\r\n * console.log(value * percent.value); // outputs 128\r\n * ```\r\n * ```JavaScript\r\n * var value = 256;\r\n * var percent = new am4core.Percent(50);\r\n * console.log(value * percent.value); // outputs 128\r\n * ```\r\n *\r\n * Alternatively, you can use `am4core.percent()` helper function:\r\n *\r\n * ```TypeScript\r\n * let value = 256;\r\n * let percent = am4core.percent(50);\r\n * console.log(value * percent.value); // outputs 128\r\n * ```\r\n * ```JavaScript\r\n * var value = 256;\r\n * var percent = am4core.percent(50);\r\n * console.log(value * percent.value); // outputs 128\r\n * ```\r\n *\r\n * @readonly\r\n * @return Relative value\r\n */\n get: function get() {\n return this._value / 100;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Percent.prototype, \"percent\", {\n /**\r\n * Value in percent.\r\n *\r\n * @return Percent\r\n */\n get: function get() {\n return this._value;\n },\n enumerable: true,\n configurable: true\n });\n Percent.prototype.toString = function () {\n return \"\" + this._value + \"%\";\n };\n return Percent;\n}();\nexport { Percent };\n/**\r\n * Converts numeric percent value to a proper [[Percent]] object.\r\n *\r\n * ```TypeScript\r\n * pieSeries.radius = am4core.percent(80);\r\n * ```\r\n * ```JavaScript\r\n * pieSeries.radius = am4core.percent(80);\r\n * ```\r\n *\r\n * @param value Percent\r\n * @return Percent object\r\n */\nexport function percent(value) {\n return new Percent(value);\n}\n/**\r\n * Checks if value is a [[Percent]] object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Input value\r\n * @return Is percent?\r\n */\nexport function isPercent(value) {\n return value instanceof Percent;\n}","import {\n useGetAdhocVisitRequestsQuery,\n useGetFailedVisitReportsQuery,\n useGetRemediationCasesQuery,\n useGetServiceResumptionRequestsQuery,\n useGetServiceSuspensionRequestsQuery,\n useGetServiceTerminationRequestsQuery,\n useGetSpecChangeRequestsQuery,\n useGetStockDeliveryRequestsQuery,\n useGetTicketQuery,\n useGetVisitFrequencyChangeRequestsQuery,\n} from \"api/tickets\";\nimport { compact, groupBy, map, orderBy, toArray, union, uniq } from \"lodash\";\nimport {\n AdhocVisitRequests,\n FailedVisitReport,\n ServiceResumptionRequests,\n ServiceSuspensionRequests,\n ServiceTerminationRequests,\n SpecChangeRequests,\n StockDeliveryRequests,\n VisitFrequencyChangeRequests,\n} from \"service/ticket/types\";\nimport { useGetLocationServiceVendorsQuery } from \"../../modules/api/services\";\nimport { useTypedSelector } from \"./app/store\";\nimport { useContext, useEffect, useRef, useState } from \"react\";\nimport AppContext from \"./AppContext\";\nimport { useBinFetch } from \"sharedUtils\";\n\nexport const getTicketId = (state) => state?.ticketId;\nexport const getLocationId = () =>\n useTypedSelector((state) => state?.locationId);\n\nexport const getTicketById = (ticketId) => {\n const { data: ticket } = useGetTicketQuery(ticketId);\n return ticket;\n};\n\nexport const useTicket = () => {\n const { currentTicketId } = useContext(AppContext);\n const ticket = getTicketById(currentTicketId);\n return ticket;\n};\n\nexport const useVendorFromCurrentTicket = () => {\n const ticket = useTicket();\n return ticket?.vendor?.id;\n};\n\nexport const useTicketReplies = () => {\n const ticketId = useTypedSelector(getTicketId);\n const { data: ticket } = useGetTicketQuery(ticketId);\n return ticket?.replies;\n};\n\nexport const getDefaultContactId = (channel) =>\n useTypedSelector(() => {\n const { defaultContactMap } = useTicket();\n return defaultContactMap[channel].id;\n });\nexport const getDefaultResponseExpected = (channel) => {\n switch (channel) {\n case \"organisation\":\n return false;\n case \"vendor\":\n return true;\n default:\n return true;\n }\n};\n\n//TODO DONT USE SERVICE SELECTORS in lower components and remove from app props\n\nexport const useService = (uuid: string) => {\n const { data: locationServiceVendors } =\n useGetLocationServiceVendorsQuery(getLocationId()) || {};\n\n if (locationServiceVendors) {\n for (const vendor of toArray(locationServiceVendors)) {\n const service = vendor?.services?.find(\n (service) => service?.uuid === uuid\n );\n if (service) {\n return service;\n }\n }\n }\n\n return undefined;\n};\n\n//TODO END\n\nexport const getBinTypeForService = (serviceUuid) => {\n const service = useService(serviceUuid);\n const { specifications } = service || {};\n const { binTypes, binGroups } = useBinFetch();\n\n return compact(\n map(specifications, (spec) => {\n const binType = binTypes[spec.serviceCode];\n if (binType) {\n const binGroup = binGroups[binType.binGroupId];\n return {\n ...binType,\n quantity: spec.quantity,\n binGroupName: binGroup ? binGroup.name : null,\n };\n }\n return null;\n })\n );\n};\n\nconst getBinTypesByGroup = (serviceCodes) => {\n const { binTypes, binGroups } = useBinFetch();\n const inUseBinGroups = {};\n\n map(serviceCodes, (serviceCode) => {\n const binType = binTypes[serviceCode];\n if (binType) {\n const binGroup = binGroups[binType.binGroupId];\n if (!inUseBinGroups[binType.binGroupId]) {\n inUseBinGroups[binType.binGroupId] = {\n id: parseInt(binType.binGroupId),\n name: binGroup.name,\n legendBorderColor: binGroup.legendBorderColor,\n legendFillColor: binGroup.legendFillColor,\n binTypes: [],\n };\n }\n inUseBinGroups[binType.binGroupId].binTypes.push(binType.name);\n }\n });\n\n return Object.values(inUseBinGroups);\n};\n\nexport const getInUseBinGroupsForService = (serviceUuid) => {\n const service = useService(serviceUuid);\n const { specifications } = service || {};\n\n const serviceCodes = map(specifications, (_spec, serviceCode) => serviceCode);\n\n return getBinTypesByGroup(serviceCodes);\n};\n\nexport const useFailedVisitReports = (): FailedVisitReport[] | undefined => {\n const { data } = useGetFailedVisitReportsQuery(useTypedSelector(getTicketId));\n return data;\n};\n\n// Adhoc and Stock are returned as arrays\nexport const useAdhocVisitRequests = (): AdhocVisitRequests => {\n const { data } = useGetAdhocVisitRequestsQuery(useTypedSelector(getTicketId));\n const { adhocVisitRequests } = data || {};\n if (adhocVisitRequests) {\n return orderBy(adhocVisitRequests, [\"requestedAt\"], [\"desc\"]);\n }\n};\n\nexport const useStockDeliveryRequests = (): StockDeliveryRequests => {\n const { data } = useGetStockDeliveryRequestsQuery(\n useTypedSelector(getTicketId)\n );\n const stockDeliveryRequests: StockDeliveryRequests =\n data?.stockDeliveryRequests;\n if (stockDeliveryRequests) {\n return orderBy(stockDeliveryRequests, [\"requestedAt\"], [\"desc\"]);\n }\n};\n\nexport const useRemediationCases = () => {\n const { data } = useGetRemediationCasesQuery(useTypedSelector(getTicketId));\n const { remediationCases: remediationCase } = data || {};\n\n // Return first case, only can exist 1 ?\n const remediationCaseValue =\n remediationCase && Object.keys(remediationCase).length > 0\n ? Object.values(remediationCase)[0]\n : null;\n\n return remediationCaseValue;\n};\n\nexport const useServiceSuspensionRequests = (): ServiceSuspensionRequests => {\n const { data } = useGetServiceSuspensionRequestsQuery(\n useTypedSelector(getTicketId)\n );\n const { serviceSuspensionRequests } = data || {};\n if (serviceSuspensionRequests) {\n return orderBy(serviceSuspensionRequests, [\"requestedAt\"], [\"desc\"]);\n }\n};\n\nexport const useServiceTerminationRequests = (): ServiceTerminationRequests => {\n const { data } = useGetServiceTerminationRequestsQuery(\n useTypedSelector(getTicketId)\n );\n const { serviceTerminationRequests } = data || {};\n if (serviceTerminationRequests) {\n return orderBy(serviceTerminationRequests, [\"requestedAt\"], [\"desc\"]);\n }\n};\n\nexport const useServiceResumptionRequests = (): ServiceResumptionRequests => {\n const { data } = useGetServiceResumptionRequestsQuery(\n useTypedSelector(getTicketId)\n );\n const { serviceResumptionRequests } = data || {};\n if (serviceResumptionRequests) {\n return orderBy(serviceResumptionRequests, [\"requestedAt\"], [\"desc\"]);\n }\n};\n\nexport const useSpecChangeRequests = (): SpecChangeRequests => {\n const { data } = useGetSpecChangeRequestsQuery(useTypedSelector(getTicketId));\n const { specChangeRequests } = data || {};\n if (specChangeRequests) {\n return orderBy(specChangeRequests, [\"requestedAt\"], [\"desc\"]);\n }\n};\n\nexport const useVisitFrequencyChangeRequests =\n (): VisitFrequencyChangeRequests => {\n const { data } = useGetVisitFrequencyChangeRequestsQuery(\n useTypedSelector(getTicketId)\n );\n const { visitFrequencyChangeRequests } = data || {};\n if (visitFrequencyChangeRequests) {\n return orderBy(visitFrequencyChangeRequests, [\"requestedAt\"], [\"desc\"]);\n }\n };\n\nexport const useDeveloper = () => {\n const developer = useTypedSelector((state) => state.developer);\n return developer;\n};\n\nexport const useGlobalLoadingState = () => {\n const [isLoading, setIsLoading] = useState(false);\n const currentTicketRef = useRef(null);\n\n const queries = useTypedSelector((state) => state.api.queries);\n\n useEffect(() => {\n const areRelevantQueriesLoading = Object.keys(queries).some((queryKey) => {\n const query = queries[queryKey];\n if (\n query &&\n (query.status === \"pending\" || query.status === \"uninitialized\")\n ) {\n if (queryKey.startsWith(\"getTicket(\")) {\n const match = queryKey.match(/getTicket\\(\"(\\d+)\"\\)/);\n if (match) {\n const newTicketNumber = match[1];\n if (newTicketNumber !== currentTicketRef.current) {\n currentTicketRef.current = newTicketNumber;\n return true;\n }\n }\n }\n }\n return false;\n });\n\n setIsLoading(areRelevantQueriesLoading);\n }, [queries]);\n\n return isLoading;\n};\n","import * as tslib_1 from \"tslib\";\nimport { Disposer, MultiDisposer } from \"./Disposer\";\nimport { EventDispatcher } from \"./EventDispatcher\";\nimport * as $array from \"./Array\";\nimport * as $iter from \"./Iterator\";\n/**\r\n * @todo Description\r\n */\nvar IndexedIterable = /** @class */function () {\n /**\r\n * Constructor.\r\n *\r\n * @param array List items\r\n * @param start Start index\r\n * @param end End index\r\n */\n function IndexedIterable(array, start, end) {\n this._array = array;\n this._start = start;\n this._end = end;\n }\n /**\r\n * Returns a list item iterator.\r\n *\r\n * @return Iterator\r\n */\n IndexedIterable.prototype.iterator = function () {\n var _this = this;\n return function (push) {\n if (_this._start !== _this._end) {\n if (_this._start < _this._end) {\n for (var i = _this._start; i < _this._end; ++i) {\n if (!push(_this._array[i])) {\n break;\n }\n }\n } else {\n for (var i = _this._start - 1; i >= _this._end; --i) {\n if (!push(_this._array[i])) {\n break;\n }\n }\n }\n }\n };\n };\n /**\r\n * Returns an interable list sorted backwards than current list.\r\n *\r\n * @return List\r\n */\n IndexedIterable.prototype.backwards = function () {\n return new IndexedIterable(this._array, this._end, this._start);\n };\n /**\r\n * Returns a new list consisting only of specific range of items between\r\n * `start` and `end` indexes.\r\n *\r\n * @param start Start index\r\n * @param end End index\r\n * @return List\r\n */\n IndexedIterable.prototype.range = function (start, end) {\n if (start <= end) {\n if (this._start === this._end) {\n return this;\n } else if (this._start < this._end) {\n var diff = end - start;\n start = Math.max(this._start + start, this._start);\n end = Math.min(start + diff, this._end);\n return new IndexedIterable(this._array, start, end);\n } else {\n var diff = end - start;\n start = Math.max(this._start - start, this._end);\n end = Math.max(start - diff, this._end);\n return new IndexedIterable(this._array, start, end);\n }\n } else {\n throw new Error(\"Start index must be lower than end index\");\n }\n };\n return IndexedIterable;\n}();\nexport { IndexedIterable };\n/**\r\n * ListGrouper organizes [[List]] items into groups.\r\n *\r\n * @ignore Exclude from docs\r\n */\nvar ListGrouper = /** @class */function (_super) {\n tslib_1.__extends(ListGrouper, _super);\n /**\r\n * Constructor.\r\n */\n function ListGrouper(list, getKey, sort) {\n var _this = _super.call(this, [list.events.on(\"inserted\", function (x) {\n var value = x.newValue;\n var key = _this._getKey(value);\n var index = 0;\n $iter.eachContinue(list.iterator(), function (x) {\n if (x === value) {\n return false;\n } else if (_this._getKey(x) === key) {\n ++index;\n }\n return true;\n });\n _this._insert(value, key, index);\n }, undefined, false), list.events.on(\"removed\", function (x) {\n _this._remove(x.oldValue);\n }, undefined, false)]) || this;\n /**\r\n * Grouping keys.\r\n */\n _this._keys = [];\n /**\r\n * List item groups.\r\n */\n _this._groups = {};\n _this._getKey = getKey;\n _this._sort = sort;\n $iter.each(list.iterator(), function (x) {\n _this._insert(x, getKey(x));\n });\n return _this;\n }\n /**\r\n * Inserts an item (`x`) to a specific group (`key`) and specific `index`.\r\n *\r\n * @param x Item\r\n * @param key Group name\r\n * @param index Index\r\n */\n ListGrouper.prototype._insert = function (x, key, index) {\n if (this._groups[key] == null) {\n this._groups[key] = [];\n // TODO code duplication with SortedList\n var _a = $array.getSortedIndex(this._keys, this._sort, key),\n found = _a.found,\n index_1 = _a.index;\n if (found) {\n throw new Error(\"Key already exists: \" + key);\n } else {\n $array.insertIndex(this._keys, index_1, key);\n }\n }\n if (index == null) {\n this._groups[key].push(x);\n } else {\n $array.insertIndex(this._groups[key], index, x);\n }\n };\n /**\r\n * Removes an item from the list.\r\n *\r\n * @param x Item to remove\r\n */\n ListGrouper.prototype._remove = function (x) {\n var key = this._getKey(x);\n var values = this._groups[key];\n if (values != null) {\n $array.remove(values, x);\n if (values.length === 0) {\n delete this._groups[key];\n var _a = $array.getSortedIndex(this._keys, this._sort, key),\n found = _a.found,\n index = _a.index;\n if (found) {\n $array.removeIndex(this._keys, index);\n } else {\n throw new Error(\"Key doesn't exist: \" + key);\n }\n }\n }\n };\n /**\r\n * Returns an iterator for the list.\r\n *\r\n * The iterator will iterate through all items in all groups.\r\n *\r\n * @return Iterator\r\n */\n ListGrouper.prototype.iterator = function () {\n var _this = this;\n return $iter.flatten($iter.map($iter.fromArray(this._keys), function (key) {\n return $iter.fromArray(_this._groups[key]);\n }));\n };\n return ListGrouper;\n}(MultiDisposer);\nexport { ListGrouper };\n/**\r\n * A disposable list, which when disposed itself will call `dispose()` method\r\n * on all its items.\r\n */\nvar ListDisposer = /** @class */function (_super) {\n tslib_1.__extends(ListDisposer, _super);\n function ListDisposer(list) {\n var _this = this;\n var disposer = list.events.on(\"removed\", function (x) {\n x.oldValue.dispose();\n }, undefined, false);\n _this = _super.call(this, function () {\n disposer.dispose();\n // TODO clear the list ?\n $iter.each(list.iterator(), function (x) {\n x.dispose();\n });\n }) || this;\n return _this;\n }\n return ListDisposer;\n}(Disposer);\nexport { ListDisposer };\n/**\r\n * Checks if specific index fits into length.\r\n *\r\n * @param index Index\r\n * @param len Length\r\n */\nfunction checkBounds(index, len) {\n if (!(index >= 0 && index < len)) {\n throw new Error(\"Index out of bounds: \" + index);\n }\n}\n/**\r\n * A List class is used to hold a number of indexed items of the same type.\r\n */\nvar List = /** @class */function () {\n /**\r\n * Constructor\r\n *\r\n * @param initial Inital list of values to add to list\r\n */\n function List(initial) {\n if (initial === void 0) {\n initial = [];\n }\n /**\r\n * Event dispatcher.\r\n */\n this.events = new EventDispatcher();\n this._values = initial;\n }\n Object.defineProperty(List.prototype, \"values\", {\n /**\r\n * An array of values in the list.\r\n *\r\n * Do not use this property to add values. Rather use dedicated methods, like\r\n * `push()`, `removeIndex()`, etc.\r\n *\r\n * @readonly\r\n * @return List values\r\n */\n get: function get() {\n return this._values;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Checks if list contains specific item reference.\r\n *\r\n * @param item Item to search for\r\n * @return `true` if found, `false` if not found\r\n */\n List.prototype.contains = function (value) {\n return this._values.indexOf(value) !== -1;\n };\n /**\r\n * Removes specific item from the list.\r\n *\r\n * @param item An item to remove\r\n */\n List.prototype.removeValue = function (value) {\n var i = 0;\n var length = this._values.length;\n while (i < length) {\n // TODO handle NaN\n if (this._values[i] === value) {\n this.removeIndex(i);\n --length;\n } else {\n ++i;\n }\n }\n };\n /**\r\n * Searches the list for specific item and returns its index.\r\n *\r\n * @param item An item to search for\r\n * @return Index or -1 if not found\r\n */\n List.prototype.indexOf = function (value) {\n return $array.indexOf(this._values, value);\n };\n Object.defineProperty(List.prototype, \"length\", {\n /**\r\n * Number of items in list.\r\n *\r\n * @readonly\r\n * @return Number of items\r\n */\n get: function get() {\n return this._values.length;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Checks if there's a value at specific index.\r\n *\r\n * @param index Index\r\n * @return Value exists?\r\n */\n List.prototype.hasIndex = function (index) {\n return index >= 0 && index < this._values.length;\n };\n /**\r\n * Returns an item at specified index.\r\n *\r\n * @param index Index\r\n * @return List item\r\n */\n List.prototype.getIndex = function (index) {\n return this._values[index];\n };\n /**\r\n * Sets value at specific index.\r\n *\r\n * If there's already a value at the index, it is overwritten.\r\n *\r\n * @param index Index\r\n * @param value New value\r\n * @return New value\r\n */\n List.prototype.setIndex = function (index, value) {\n checkBounds(index, this._values.length);\n var oldValue = this._values[index];\n // Do nothing if the old value and the new value are the same\n if (oldValue !== value) {\n this._values[index] = value;\n if (this.events.isEnabled(\"setIndex\")) {\n this.events.dispatchImmediately(\"setIndex\", {\n type: \"setIndex\",\n target: this,\n index: index,\n oldValue: oldValue,\n newValue: value\n });\n }\n if (this.events.isEnabled(\"removed\")) {\n this.events.dispatchImmediately(\"removed\", {\n type: \"removed\",\n target: this,\n oldValue: oldValue\n });\n }\n if (this.events.isEnabled(\"inserted\")) {\n this.events.dispatchImmediately(\"inserted\", {\n type: \"inserted\",\n target: this,\n newValue: value\n });\n }\n }\n return oldValue;\n };\n /**\r\n * Adds an item to the list at a specific index, which pushes all the other\r\n * items further down the list.\r\n *\r\n * @param index Index\r\n * @param item An item to add\r\n */\n List.prototype.insertIndex = function (index, value) {\n checkBounds(index, this._values.length + 1);\n $array.insertIndex(this._values, index, value);\n if (this.events.isEnabled(\"insertIndex\")) {\n this.events.dispatchImmediately(\"insertIndex\", {\n type: \"insertIndex\",\n target: this,\n index: index,\n newValue: value\n });\n }\n if (this.events.isEnabled(\"inserted\")) {\n this.events.dispatchImmediately(\"inserted\", {\n type: \"inserted\",\n target: this,\n newValue: value\n });\n }\n };\n /**\r\n * [_sortQuicksort description]\r\n *\r\n * @todo Description\r\n * @param low [description]\r\n * @param high [description]\r\n * @param order [description]\r\n */\n List.prototype._sortQuicksort = function (low, high, order) {\n if (low < high) {\n var p = this._sortPartition(low, high, order);\n this._sortQuicksort(low, p, order);\n this._sortQuicksort(p + 1, high, order);\n }\n };\n /**\r\n * [_sortPartition description]\r\n *\r\n * @todo Description\r\n * @param low [description]\r\n * @param high [description]\r\n * @param order [description]\r\n * @return [description]\r\n */\n List.prototype._sortPartition = function (low, high, order) {\n var values = this._values;\n var pivot = values[low];\n var i = low - 1;\n var j = high + 1;\n for (;;) {\n do {\n ++i;\n } while (order(values[i], pivot) < 0);\n do {\n --j;\n } while (order(values[j], pivot) > 0);\n if (i >= j) {\n return j;\n } else {\n this.swap(i, j);\n }\n }\n };\n /**\r\n * Reorders list items according to specific ordering function.\r\n *\r\n * @param order Ordering function\r\n */\n List.prototype.sort = function (order) {\n // https://en.wikipedia.org/wiki/Quicksort#Hoare_partition_scheme\n // @todo faster implementation of this\n // @todo test this\n this._sortQuicksort(0, this._values.length - 1, order);\n };\n /**\r\n * Swaps indexes of two items in the list.\r\n *\r\n * @param a Item 1\r\n * @param b Item 2\r\n */\n List.prototype.swap = function (a, b) {\n var len = this._values.length;\n checkBounds(a, len);\n checkBounds(b, len);\n if (a !== b) {\n var value_a = this._values[a];\n var value_b = this._values[b];\n this._values[a] = value_b;\n if (this.events.isEnabled(\"setIndex\")) {\n this.events.dispatchImmediately(\"setIndex\", {\n type: \"setIndex\",\n target: this,\n index: a,\n oldValue: value_a,\n newValue: value_b\n });\n }\n this._values[b] = value_a;\n if (this.events.isEnabled(\"setIndex\")) {\n this.events.dispatchImmediately(\"setIndex\", {\n type: \"setIndex\",\n target: this,\n index: b,\n oldValue: value_b,\n newValue: value_a\n });\n }\n }\n };\n /**\r\n * Removes a value at specific index.\r\n *\r\n * @param index Index of value to remove\r\n * @return Removed value\r\n */\n List.prototype.removeIndex = function (index) {\n checkBounds(index, this._values.length);\n var oldValue = this._values[index];\n $array.removeIndex(this._values, index);\n if (this.events.isEnabled(\"removeIndex\")) {\n this.events.dispatchImmediately(\"removeIndex\", {\n type: \"removeIndex\",\n target: this,\n index: index,\n oldValue: oldValue\n });\n }\n if (this.events.isEnabled(\"removed\")) {\n this.events.dispatchImmediately(\"removed\", {\n type: \"removed\",\n target: this,\n oldValue: oldValue\n });\n }\n return oldValue;\n };\n /**\r\n * Moves an item to a specific index within the list.\r\n *\r\n * If the index is not specified it will move the item to the end of the\r\n * list.\r\n *\r\n * @param value Item to move\r\n * @param index Index to place item at\r\n */\n List.prototype.moveValue = function (value, toIndex) {\n // TODO don't do anything if the desired index is the same as the current index\n var index = this.indexOf(value);\n // TODO remove all old values rather than only the first ?\n if (index !== -1) {\n var oldValue = this._values[index];\n $array.removeIndex(this._values, index);\n if (this.events.isEnabled(\"removeIndex\")) {\n this.events.dispatchImmediately(\"removeIndex\", {\n type: \"removeIndex\",\n target: this,\n index: index,\n oldValue: oldValue\n });\n }\n }\n if (toIndex == null) {\n toIndex = this._values.length;\n this._values.push(value);\n } else {\n $array.insertIndex(this._values, toIndex, value);\n }\n if (this.events.isEnabled(\"insertIndex\")) {\n this.events.dispatchImmediately(\"insertIndex\", {\n type: \"insertIndex\",\n target: this,\n index: toIndex,\n newValue: value\n });\n }\n if (index === -1) {\n if (this.events.isEnabled(\"inserted\")) {\n this.events.dispatchImmediately(\"inserted\", {\n type: \"inserted\",\n target: this,\n newValue: value\n });\n }\n }\n };\n /**\r\n * Adds an item to the end of the list.\r\n *\r\n * @param item An item to add\r\n */\n List.prototype.push = function (value) {\n var index = this._values.push(value) - 1;\n if (this.events.isEnabled(\"insertIndex\")) {\n this.events.dispatchImmediately(\"insertIndex\", {\n type: \"insertIndex\",\n target: this,\n index: index,\n newValue: value\n });\n }\n if (this.events.isEnabled(\"inserted\")) {\n this.events.dispatchImmediately(\"inserted\", {\n type: \"inserted\",\n target: this,\n newValue: value\n });\n }\n return value;\n };\n /**\r\n * Adds an item as a first item in the list.\r\n *\r\n * @param item An item to add\r\n */\n List.prototype.unshift = function (value) {\n this.insertIndex(0, value);\n };\n /**\r\n * Adds multiple items to the list.\r\n *\r\n * @param items An Array of items to add\r\n */\n List.prototype.pushAll = function (values) {\n var _this = this;\n $array.each(values, function (value) {\n _this.push(value);\n });\n };\n /**\r\n * Copies and adds items from abother list.\r\n *\r\n * @param source A list top copy items from\r\n */\n List.prototype.copyFrom = function (source) {\n this.pushAll(source._values);\n };\n /**\r\n * Returns the last item from the list, and removes it.\r\n *\r\n * @return Item\r\n */\n List.prototype.pop = function () {\n var index = this._values.length - 1;\n return index < 0 ? undefined : this.removeIndex(this._values.length - 1);\n };\n /**\r\n * Returns the first item from the list, and removes it.\r\n *\r\n * @return Item\r\n */\n List.prototype.shift = function () {\n return this._values.length ? this.removeIndex(0) : undefined;\n };\n /**\r\n * Sets multiple items to the list.\r\n *\r\n * All current items are removed.\r\n *\r\n * @param newArray New items\r\n */\n List.prototype.setAll = function (newArray) {\n var _this = this;\n // @tod if a value exists in both the new and old arrays, don't send remove/insert events\n var oldArray = $array.copy(this._values);\n this._values.length = 0;\n $array.each(newArray, function (value) {\n _this._values.push(value);\n });\n if (this.events.isEnabled(\"setAll\")) {\n this.events.dispatchImmediately(\"setAll\", {\n type: \"setAll\",\n target: this,\n oldArray: oldArray,\n newArray: this._values // TODO make a copy ?\n });\n }\n if (this.events.isEnabled(\"removed\")) {\n $array.each(oldArray, function (x) {\n _this.events.dispatchImmediately(\"removed\", {\n type: \"removed\",\n target: _this,\n oldValue: x\n });\n });\n }\n if (this.events.isEnabled(\"inserted\")) {\n $array.each(this._values, function (x) {\n _this.events.dispatchImmediately(\"inserted\", {\n type: \"inserted\",\n target: _this,\n newValue: x\n });\n });\n }\n };\n /**\r\n * Removes all items from the list.\r\n */\n List.prototype.clear = function () {\n this.setAll([]);\n };\n /**\r\n * Returns a list iterator.\r\n *\r\n * @return Iterator\r\n */\n List.prototype.iterator = function () {\n return $iter.fromArray(this._values);\n };\n /**\r\n * Returns an ES6 iterator for the list.\r\n */\n List.prototype[Symbol.iterator] = function () {\n var length, i;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n length = this._values.length;\n i = 0;\n _a.label = 1;\n case 1:\n if (!(i < length)) return [3 /*break*/, 4];\n return [4 /*yield*/, this._values[i]];\n case 2:\n _a.sent();\n _a.label = 3;\n case 3:\n ++i;\n return [3 /*break*/, 1];\n case 4:\n return [2 /*return*/];\n }\n });\n };\n /**\r\n * Calls `f` for each element in the list.\r\n *\r\n * `f` should have at least one parameter defined which will get a current\r\n * item, with optional second argument - index.\r\n */\n List.prototype.each = function (f) {\n $array.each(this._values, f);\n };\n /**\r\n * Returns a specific range of list items, which can be iterated.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Code duplication with IndexedIterable\r\n * @param start Start index\r\n * @param end End index\r\n * @return Range\r\n */\n List.prototype.range = function (start, end) {\n if (start <= end) {\n var diff = end - start;\n start = Math.max(start, 0);\n end = Math.min(start + diff, this._values.length);\n return new IndexedIterable(this._values, start, end);\n } else {\n throw new Error(\"Start index must be lower than end index\");\n }\n };\n /**\r\n * Returns an iterator that has list items sorted backwards.\r\n *\r\n * @ignore Exclude from docs\r\n * @return List\r\n */\n List.prototype.backwards = function () {\n return new IndexedIterable(this._values, this._values.length, 0);\n };\n return List;\n}();\nexport { List };\n/**\r\n * A version of a [[List]] that has a \"template\".\r\n *\r\n * A template is an instance of an object, that can be used to create new\r\n * elements in the list without actually needing to create instances for those.\r\n *\r\n * When new element is created in the list, e.g. by calling its `create()`\r\n * method, an exact copy of the element is created (including properties and\r\n * other attributes), inserted into the list and returned.\r\n */\nvar ListTemplate = /** @class */function (_super) {\n tslib_1.__extends(ListTemplate, _super);\n /**\r\n * Constructor\r\n *\r\n * @param t Template object\r\n */\n function ListTemplate(t) {\n var _this = _super.call(this) || this;\n _this.template = t;\n return _this;\n }\n Object.defineProperty(ListTemplate.prototype, \"template\", {\n /**\r\n * @return Template object\r\n */\n get: function get() {\n return this._template;\n },\n /**\r\n * A \"template\" object to copy all properties from when creating new list\r\n * items.\r\n *\r\n * @param v Template object\r\n */\n set: function set(v) {\n v.isTemplate = true;\n this._template = v;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies all elements from other list.\r\n *\r\n * @param source Source list\r\n */\n ListTemplate.prototype.copyFrom = function (source) {\n var _this = this;\n $iter.each(source.iterator(), function (value) {\n _this.push(value.clone());\n });\n };\n ListTemplate.prototype.create = function (make) {\n var clone = make != null ? new make() : this.template.clone();\n this.push(clone);\n return clone;\n };\n /**\r\n * Creates an exact clone of the list, including its items and template.\r\n *\r\n * @return New list\r\n */\n ListTemplate.prototype.clone = function () {\n var out = new ListTemplate(this.template);\n var values = this.values;\n var length = values.length;\n for (var i = 0; i < length; ++i) {\n out.push(values[i].clone());\n }\n return out;\n };\n return ListTemplate;\n}(List);\nexport { ListTemplate };","/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport * as $array from \"./Array\";\nimport * as $type from \"./Type\";\n/**\r\n * ============================================================================\r\n * UTILITY FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Returns an iterator for all entries in object.\r\n *\r\n * Can be used to safely iterate through all properties of the object.\r\n *\r\n * @param object Source object\r\n * @returns Iterator\r\n */\nexport function entries(object) {\n return function (push) {\n // TODO make this more efficient ?\n for (var key in object) {\n if (hasKey(object, key)) {\n if (!push([key, object[key]])) {\n break;\n }\n }\n }\n };\n}\n/**\r\n * Returns an array of object's property names.\r\n *\r\n * @param object Source object\r\n * @returns Object property names\r\n */\nexport function keys(object) {\n var output = [];\n for (var key in object) {\n if (hasKey(object, key)) {\n output.push(key);\n }\n }\n return output;\n}\n/**\r\n * Returns an array of object's property names ordered using specific ordering\r\n * function.\r\n *\r\n * @param object Source object\r\n * @param order Ordering function\r\n * @returns Object property names\r\n */\nexport function keysOrdered(object, order) {\n return keys(object).sort(order);\n}\n/**\r\n * Checks if `object` has a specific `key`.\r\n *\r\n * @param object Source object\r\n * @param key Property name\r\n * @returns Has key?\r\n */\nexport function hasKey(object, key) {\n return {}.hasOwnProperty.call(object, key);\n}\n/**\r\n * Returns value of the specific `key`.\r\n *\r\n * @param object Source object\r\n * @param key Property name\r\n * @returns Key value\r\n */\nexport function getKey(object, key) {\n return object[key];\n}\n/**\r\n * Iterates through all properties of the object calling `fn` for each of them.\r\n *\r\n * If return value of the function evaluates to `false` further iteration is\r\n * cancelled.\r\n *\r\n * @param object Source object\r\n * @param fn Callback function\r\n */\nexport function eachContinue(object, fn) {\n for (var key in object) {\n if (hasKey(object, key)) {\n if (!fn(key, object[key])) {\n break;\n }\n }\n }\n}\n/**\r\n * Iterates through all properties of the object calling `fn` for each of them.\r\n *\r\n * @param object Source object\r\n * @param fn Callback function\r\n */\nexport function each(object, fn) {\n eachContinue(object, function (key, value) {\n fn(key, value);\n return true;\n });\n}\n/**\r\n * Orders object properties using custom `ord` function and iterates through\r\n * them calling `fn` for each of them.\r\n *\r\n * @param object Source object\r\n * @param fn Callback function\r\n * @param order Ordering function\r\n */\nexport function eachOrdered(object, fn, ord) {\n $array.each(keysOrdered(object, ord), function (key) {\n fn(key, object[key]);\n });\n}\n/**\r\n * Returns a copy of the object.\r\n *\r\n * @param object Source object\r\n * @returns Copy of the object\r\n */\nexport function copy(object) {\n return Object.assign({}, object);\n}\n/**\r\n * Merges two objects and returns a new object that contains properties from\r\n * both source objects.\r\n *\r\n * @param object1 Source object #1\r\n * @param object2 Source object #2\r\n * @returns Combined object\r\n */\nexport function merge(object1, object2) {\n return Object.assign({}, object1, object2);\n}\n/**\r\n * Copies a list of properties from one object to another.\r\n *\r\n * Will not copy empty properties.\r\n *\r\n * @param source Source object\r\n * @param target Target object\r\n * @param keys List of keys to copy\r\n */\nexport function copyProperties(source, target, keys) {\n $array.each(keys, function (key) {\n if ($type.hasValue(source[key])) {\n target[key] = source[key];\n }\n });\n}\n/**\r\n * Copies a list of properties from one object to another only if target does't have value of the property set.\r\n *\r\n * Will not copy empty properties.\r\n *\r\n * @param source Source object\r\n * @param target Target object\r\n * @param keys List of keys to copy\r\n */\nexport function softCopyProperties(source, target, keys) {\n $array.each(keys, function (key) {\n if ($type.hasValue(source[key]) && !$type.hasValue(target[key])) {\n target[key] = source[key];\n }\n });\n}\n/**\r\n * Copies a list of properties from one object to another.\r\n *\r\n * Will copy empty properties.\r\n *\r\n * @param source Source object\r\n * @param target Target object\r\n * @param keys List of keys to copy\r\n */\nexport function forceCopyProperties(source, target, keys) {\n $array.each(keys, function (key) {\n target[key] = source[key];\n });\n}\n/**\r\n * Copies all properties from one object to another.\r\n *\r\n * @param from Source object\r\n * @param to Target object\r\n */\nexport function copyAllProperties(from, to) {\n copyProperties(from, to, keys(from));\n}","import * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport * as $array from \"./Array\";\nimport * as $type from \"./Type\";\n/**\r\n * A base class for disposable objects.\r\n *\r\n * @ignore Exclude from docs\r\n */\nvar Disposer = /** @class */function () {\n /**\r\n * Constructor.\r\n *\r\n * @param dispose Function that disposes object\r\n */\n function Disposer(dispose) {\n this._disposed = false;\n this._dispose = dispose;\n }\n /**\r\n * Checks if object is disposed.\r\n *\r\n * @return Disposed?\r\n */\n Disposer.prototype.isDisposed = function () {\n return this._disposed;\n };\n /**\r\n * Disposes the object.\r\n */\n Disposer.prototype.dispose = function () {\n if (!this._disposed) {\n this._disposed = true;\n this._dispose();\n }\n };\n return Disposer;\n}();\nexport { Disposer };\n/**\r\n * A collection of related disposers that can be disposed in one go.\r\n *\r\n * @ignore Exclude from docs\r\n */\nvar MultiDisposer = /** @class */function (_super) {\n tslib_1.__extends(MultiDisposer, _super);\n function MultiDisposer(disposers) {\n return _super.call(this, function () {\n $array.each(disposers, function (x) {\n x.dispose();\n });\n }) || this;\n }\n return MultiDisposer;\n}(Disposer);\nexport { MultiDisposer };\n/**\r\n * A special kind of Disposer that has attached value set.\r\n *\r\n * If a new value is set using `set()` method, the old disposer value is\r\n * disposed.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nvar MutableValueDisposer = /** @class */function (_super) {\n tslib_1.__extends(MutableValueDisposer, _super);\n /**\r\n * Constructor.\r\n */\n function MutableValueDisposer() {\n var _this = _super.call(this, function () {\n if ($type.hasValue(_this._disposer)) {\n _this._disposer.dispose();\n _this._disposer = undefined;\n }\n }) || this;\n return _this;\n }\n /**\r\n * Returns current value.\r\n *\r\n * @return Value\r\n */\n MutableValueDisposer.prototype.get = function () {\n return this._value;\n };\n /**\r\n * Sets value and disposes previous disposer if it was set.\r\n *\r\n * @param value New value\r\n * @param disposer Disposer\r\n */\n MutableValueDisposer.prototype.set = function (value, disposer) {\n if ($type.hasValue(this._disposer)) {\n this._disposer.dispose();\n }\n this._disposer = disposer;\n this._value = value;\n };\n /**\r\n * Resets the disposer value.\r\n */\n MutableValueDisposer.prototype.reset = function () {\n this.set(undefined, undefined);\n };\n return MutableValueDisposer;\n}(Disposer);\nexport { MutableValueDisposer };\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nvar CounterDisposer = /** @class */function (_super) {\n tslib_1.__extends(CounterDisposer, _super);\n function CounterDisposer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\r\n * [_counter description]\r\n *\r\n * @todo Description\r\n */\n _this._counter = 0;\n return _this;\n }\n /**\r\n * [increment description]\r\n *\r\n * @todo Description\r\n */\n CounterDisposer.prototype.increment = function () {\n var _this = this;\n // TODO throw an error if it is disposed\n ++this._counter;\n // TODO make this more efficient\n return new Disposer(function () {\n --_this._counter;\n if (_this._counter === 0) {\n _this.dispose();\n }\n });\n };\n return CounterDisposer;\n}(Disposer);\nexport { CounterDisposer };","/**\r\n * This module contains Color object definition\r\n */\nimport { registry } from \"../Registry\";\nimport * as $colors from \"./Colors\";\nimport * as $type from \"./Type\";\n/**\r\n * Represents a color.\r\n *\r\n * `Color` accepts value only in [[iRGB]] object format. To create `Color`\r\n * object by parsing it from any supported string-based formats, use helper\r\n * [[color]] function:\r\n *\r\n * ```TypeScript\r\n * am4core.color(\"#ff0000\");\r\n * am4core.color(\"#f00\");\r\n * am4core.color(\"rgb(255, 0, 0)\");\r\n * am4core.color(\"rgba(255, 0, 0, 0.5)\");\r\n * am4core.color({ r: 255, g: 0, b: 0 });\r\n * am4core.color(\"red\");\r\n * ```\r\n * ```JavaScript\r\n * am4core.color(\"#ff0000\");\r\n * am4core.color(\"#f00\");\r\n * am4core.color(\"rgb(255, 0, 0)\");\r\n * am4core.color(\"rgba(255, 0, 0, 0.5)\");\r\n * am4core.color({ r: 255, g: 0, b: 0 });\r\n * am4core.color(\"red\");\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/colors/} for color-related info\r\n */\nvar Color = /** @class */function () {\n /**\r\n * Constructor\r\n *\r\n * @param color Source color\r\n */\n function Color(color) {\n this._value = color;\n }\n Object.defineProperty(Color.prototype, \"rgb\", {\n /**\r\n * Returns [[iRGB]] representation of the color.\r\n *\r\n * @return RGB object\r\n */\n get: function get() {\n return this._value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Color.prototype, \"hex\", {\n /**\r\n * Returns color hex value string, e.g. \"#FF0000\".\r\n *\r\n * @return Hex color code\r\n */\n get: function get() {\n return this._value ? $colors.rgbToHex(this._value) : \"none\";\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Color.prototype, \"rgba\", {\n /**\r\n * Returns an `rgba()` representation of the color, e.g.:\r\n * `rgba(255, 0, 0, 0.5)`.\r\n *\r\n * @return rgba color string\r\n */\n get: function get() {\n return this._value ? $colors.rgbToRGBA(this._value) : \"none\";\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Color.prototype, \"alpha\", {\n /**\r\n * Returns current transparency.\r\n *\r\n * @return Alpha (0-1)\r\n */\n get: function get() {\n if (this._value != null && this._value.a != null) {\n return this._value.a;\n } else {\n return 1;\n }\n },\n /**\r\n * Set alpha (transparency) of the color.\r\n *\r\n * @param value Alpha (0-1)\r\n */\n set: function set(value) {\n if (this._value) {\n this._value.a = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Color.prototype, \"lightColor\", {\n /**\r\n * Returns current light color setting.\r\n *\r\n * @return Color\r\n */\n get: function get() {\n if (!this._lightColor) {\n this._lightColor = new Color({\n r: 255,\n g: 255,\n b: 255\n });\n }\n return this._lightColor;\n },\n /**\r\n * Sets \"light\" color. Used when determining contrasting color.\r\n *\r\n * @param color Color\r\n */\n set: function set(color) {\n this._lightColor = color;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Color.prototype, \"darkColor\", {\n /**\r\n * Returns current dark color setting.\r\n *\r\n * @return Color\r\n */\n get: function get() {\n if (!this._darkColor) {\n this._darkColor = new Color({\n r: 0,\n g: 0,\n b: 0\n });\n }\n return this._darkColor;\n },\n /**\r\n * Sets \"dark\" color. Used when determining contrasting color.\r\n *\r\n * @param color Color\r\n */\n set: function set(color) {\n this._darkColor = color;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Overrides `toString` method so that [[Color]] object can be used as\r\n * string.\r\n *\r\n * @ignore Exclude from docs\r\n * @return String represantion of color (usable in CSS)\r\n */\n Color.prototype.toString = function () {\n return this.alpha < 1 ? this.rgba : this.hex;\n };\n /**\r\n * Returns a new [[Color]] which is percent lighter (positive value),\r\n * or darker (negative value).\r\n *\r\n * Parameter is in the scale of -1 to 1.\r\n *\r\n * @param percent Increase/decrease lightness by X\r\n * @return New Color\r\n */\n Color.prototype.lighten = function (percent) {\n return new Color($colors.lighten(this.rgb, percent));\n };\n /**\r\n * Returns a new [[Color]] which is percent brighter (positive value),\r\n * or darker (negative value).\r\n *\r\n * Parameter is in the scale of -1 to 1.\r\n *\r\n * @param percent Increase/decrease brightness by X\r\n * @return New Color\r\n */\n Color.prototype.brighten = function (percent) {\n return new Color($colors.brighten(this.rgb, percent));\n };\n /**\r\n * Returns a new [[Color]] based on current color with specific saturation\r\n * applied.\r\n *\r\n * `saturation` can be in the range of 0 (fully desaturated) to 1 (fully\r\n * saturated).\r\n *\r\n * @param saturation Saturation (0-1)\r\n * @return New (saturated) color\r\n */\n Color.prototype.saturate = function (saturation) {\n return new Color($colors.saturate(this.rgb, saturation));\n };\n Object.defineProperty(Color.prototype, \"alternative\", {\n /**\r\n * Returns a either light or dark color that contrasts specifically with\r\n * this color.\r\n *\r\n * Uses properties `darkColor` (default black) and `lightColor` (default\r\n * white).\r\n *\r\n * Useful when determining which color label should be on a colored\r\n * background, so that it stands out.\r\n *\r\n * @return Contrasting color\r\n */\n get: function get() {\n if (this.rgb != null) {\n return $colors.isLight(this.rgb) ? this.darkColor : this.lightColor;\n } else {\n throw new Error(\"Color does not exist\");\n }\n },\n enumerable: true,\n configurable: true\n });\n return Color;\n}();\nexport { Color };\n/**\r\n * Resolves an input variable to a normal [[iRGB]] color and creates [[Color]]\r\n * object for it.\r\n *\r\n * @param value Input value\r\n * @param alpha Alpha (0-1)\r\n * @return Color object\r\n */\nexport function color(value, alpha) {\n if (!$type.hasValue(value)) {\n return new Color(undefined);\n }\n if (typeof value == \"string\") {\n var cacheId = \"_color_\" + value + \"_\" + (alpha || \"1\");\n var cached = registry.getCache(cacheId);\n if (cached) {\n return new Color({\n r: cached.r,\n g: cached.g,\n b: cached.b,\n a: cached.a\n });\n }\n var rgb = $colors.rgb(value, alpha);\n registry.setCache(cacheId, rgb);\n return new Color(rgb);\n }\n // Check if it's already a Color object\n if (value instanceof Color) {\n if ($type.hasValue(alpha)) {\n value.alpha = alpha;\n }\n return value;\n }\n // Not a string or Color instance, it's the iRGB object then\n return new Color(value);\n}\n/**\r\n * Checks if supplied argument is instance of [[Color]].\r\n *\r\n * @param value Input value\r\n * @return Is Color?\r\n */\nexport function isColor(value) {\n return value instanceof Color;\n}\n/**\r\n * Converts any value to [[Color]].\r\n *\r\n * @param value Input value\r\n * @return Color\r\n */\nexport function castColor(value) {\n return color(value);\n}\n/**\r\n * Converts any value into a [[Color]].\r\n *\r\n * @param value Source value\r\n * @return Color object\r\n */\nexport function toColor(value) {\n if ($type.hasValue(value) && !isColor(value)) {\n return castColor(value);\n }\n return value;\n}","/**\r\n * Grip module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Button } from \"./Button\";\nimport { Sprite } from \"../Sprite\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport { registry } from \"../Registry\";\nimport { percent } from \"../utils/Percent\";\nimport * as $path from \"../rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a grip element that can be used for scrolling or other things.\r\n *\r\n * @see {@link IGripEvents} for a list of available events\r\n * @see {@link IGripAdapters} for a list of available Adapters\r\n * @since 4.4.0\r\n */\nvar Grip = /** @class */function (_super) {\n tslib_1.__extends(Grip, _super);\n /**\r\n * Constructor\r\n */\n function Grip() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"Grip\";\n var cs = new InterfaceColorSet();\n // Set defaults\n _this.layout = \"absolute\";\n _this.padding(10, 10, 10, 10);\n _this.margin(3, 3, 3, 3);\n _this.background.fillOpacity = 0.3;\n _this.background.cornerRadius(10, 10, 10, 10);\n // Create an icon\n var icon = new Sprite();\n icon.element = _this.paper.add(\"path\");\n var path = $path.moveTo({\n x: -6,\n y: 0\n });\n path += $path.lineTo({\n x: 6,\n y: 0\n });\n path += $path.moveTo({\n x: -8,\n y: -6\n });\n path += $path.lineTo({\n x: 0,\n y: -12\n });\n path += $path.lineTo({\n x: 8,\n y: -6\n });\n path += $path.moveTo({\n x: -8,\n y: 6\n });\n path += $path.lineTo({\n x: 0,\n y: 12\n });\n path += $path.lineTo({\n x: 8,\n y: 6\n });\n icon.path = path;\n icon.strokeWidth = 2;\n icon.fillOpacity = 0;\n icon.pixelPerfect = true;\n icon.padding(0, 4, 0, 4);\n icon.stroke = cs.getFor(\"text\");\n icon.strokeOpacity = 0.7;\n icon.align = \"center\";\n icon.valign = \"middle\";\n _this.icon = icon;\n _this.label.dispose();\n _this.label = undefined;\n // Set default position\n _this.position = \"right\";\n // Set up autohide\n _this.autoHideDelay = 3000;\n _this.events.on(\"shown\", function (ev) {\n if (_this._autoHideTimeout) {\n _this._autoHideTimeout.dispose();\n }\n if (_this.autoHideDelay) {\n _this._autoHideTimeout = _this.setTimeout(function () {\n _this.hide();\n }, _this.autoHideDelay);\n }\n });\n _this.events.on(\"down\", function (ev) {\n if (_this._autoHideTimeout) {\n _this._autoHideTimeout.dispose();\n }\n });\n _this.events.on(\"out\", function (ev) {\n if (_this.autoHideDelay) {\n _this._autoHideTimeout = _this.setTimeout(function () {\n _this.hide();\n }, _this.autoHideDelay);\n }\n });\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(Grip.prototype, \"position\", {\n /**\r\n * @return Position\r\n */\n get: function get() {\n return this.getPropertyValue(\"position\");\n },\n /**\r\n * Sets position of the grip.\r\n *\r\n * Available options: \"left\", \"right\" (default), \"top\", \"bottom\".\r\n *\r\n * @param value Position\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"position\", value)) {\n switch (value) {\n case \"left\":\n this.align = \"left\";\n this.valign = \"middle\";\n this.horizontalCenter = \"left\";\n this.verticalCenter = \"middle\";\n this.icon.rotation = 0;\n this.width = undefined;\n this.height = percent(30);\n break;\n case \"right\":\n this.align = \"right\";\n this.valign = \"middle\";\n this.horizontalCenter = \"right\";\n this.verticalCenter = \"middle\";\n this.icon.rotation = 0;\n this.width = undefined;\n this.height = percent(30);\n break;\n case \"top\":\n this.align = \"center\";\n this.valign = \"top\";\n this.horizontalCenter = \"middle\";\n this.verticalCenter = \"top\";\n this.icon.rotation = 90;\n this.width = percent(30);\n this.height = undefined;\n break;\n case \"bottom\":\n this.align = \"center\";\n this.valign = \"bottom\";\n this.horizontalCenter = \"middle\";\n this.verticalCenter = \"bottom\";\n this.icon.rotation = 90;\n this.width = percent(30);\n this.height = undefined;\n break;\n default:\n this.align = \"center\";\n this.valign = \"middle\";\n this.horizontalCenter = \"middle\";\n this.verticalCenter = \"middle\";\n this.icon.rotation = 90;\n this.width = percent(30);\n this.height = undefined;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Grip.prototype, \"autoHideDelay\", {\n /**\r\n * @return Delay\r\n */\n get: function get() {\n return this.getPropertyValue(\"autoHideDelay\");\n },\n /**\r\n * Number of milliseconds to show grip until it is hidden automatically.\r\n *\r\n * @default 3000\r\n * @param value Delay\r\n */\n set: function set(value) {\n this.setPropertyValue(\"autoHideDelay\", value);\n },\n enumerable: true,\n configurable: true\n });\n return Grip;\n}(Button);\nexport { Grip };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Grip\"] = Grip;","/**\r\n * [[Chart]] class provides base functionality for all chart types to inherit.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { registry } from \"../core/Registry\";\nimport { Component } from \"../core/Component\";\nimport { MutableValueDisposer } from \"../core/utils/Disposer\";\nimport { ListTemplate, ListDisposer } from \"../core/utils/List\";\nimport { Container } from \"../core/Container\";\nimport { Label } from \"../core/elements/Label\";\nimport { Grip } from \"../core/elements/Grip\";\nimport { DataItem } from \"../core/DataItem\";\nimport { percent } from \"../core/utils/Percent\";\nimport * as $iter from \"../core/utils/Iterator\";\nimport * as $type from \"../core/utils/Type\";\nimport { defaultRules, ResponsiveBreakpoints } from \"../core/utils/Responsive\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[Chart]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar ChartDataItem = /** @class */function (_super) {\n tslib_1.__extends(ChartDataItem, _super);\n /**\r\n * Constructor\r\n */\n function ChartDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"ChartDataItem\";\n _this.applyTheme();\n return _this;\n }\n return ChartDataItem;\n}(DataItem);\nexport { ChartDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A base class for all Charts.\r\n *\r\n * @see {@link IChartEvents} for a list of available Events\r\n * @see {@link IChartAdapters} for a list of available Adapters\r\n */\nvar Chart = /** @class */function (_super) {\n tslib_1.__extends(Chart, _super);\n /**\r\n * Constructor\r\n */\n function Chart() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * A reference to chart's [[Legend]].\r\n * @ignore\r\n */\n _this._legend = new MutableValueDisposer();\n if (_this.constructor === Chart) {\n throw new Error(\"'Chart' cannot be instantiated directly. Please use a specific chart type.\");\n }\n _this.className = \"Chart\";\n // Create a list of titles\n var template = new Label();\n _this.titles = new ListTemplate(template);\n _this._disposers.push(new ListDisposer(_this.titles));\n _this._disposers.push(template);\n // Chart component is also a container. it holds _chartAndLegendCont and titles\n _this.width = percent(100);\n _this.height = percent(100);\n _this.layout = \"vertical\";\n // Chart and legend\n var chartAndLegendContainer = _this.createChild(Container);\n chartAndLegendContainer.shouldClone = false;\n chartAndLegendContainer.layout = \"vertical\";\n chartAndLegendContainer.width = percent(100);\n chartAndLegendContainer.height = percent(100);\n _this.chartAndLegendContainer = chartAndLegendContainer;\n // Chart container holds all the elements of a chart, extept titles and legend\n var chartContainer = chartAndLegendContainer.createChild(Container);\n chartContainer.shouldClone = false;\n chartContainer.width = percent(100);\n chartContainer.height = percent(100);\n _this.chartContainer = chartContainer;\n _this.showOnInit = true;\n _this._disposers.push(_this._legend);\n // Add title list events to apply certain formatting options and to make\n // the chart reference them as accessible screen reader labels\n _this.titles.events.on(\"inserted\", function (label) {\n _this.processTitle(label);\n _this.updateReaderTitleReferences();\n }, _this, false);\n _this.titles.events.on(\"removed\", function (label) {\n _this.updateReaderTitleReferences();\n }, _this, false);\n // Accessibility\n // It seems we can't set focusable on the whole chart because it seems to\n // mess up the whole focus event system - getting a focus on an inside\n // object also trigger focus on parent\n //this.focusable = true;\n _this.role = \"region\";\n _this.defaultState.transitionDuration = 1;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n Chart.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Chart\");\n }\n };\n /**\r\n * Initiates drawing of the chart.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Chart.prototype.draw = function () {\n this.fixLayout();\n _super.prototype.draw.call(this);\n };\n /**\r\n * Updates legend's hierarchy based on the position.\r\n */\n Chart.prototype.fixLayout = function () {\n var legend = this.legend;\n if (legend) {\n var chartAndLegendContainer = this.chartAndLegendContainer;\n var chartContainer = this.chartContainer;\n chartContainer.x = undefined;\n chartContainer.y = undefined;\n legend.x = undefined;\n legend.y = undefined;\n switch (legend.position) {\n case \"left\":\n chartAndLegendContainer.layout = \"horizontal\";\n if (!$type.isNumber(legend.width)) {\n legend.width = 200;\n }\n //legend.maxWidth = legend.width;\n legend.toBack();\n break;\n case \"right\":\n chartAndLegendContainer.layout = \"horizontal\";\n if (!$type.isNumber(legend.width)) {\n legend.width = 200;\n }\n //legend.maxWidth = legend.width;\n legend.toFront();\n break;\n case \"top\":\n chartAndLegendContainer.layout = \"vertical\";\n legend.maxWidth = undefined;\n legend.width = percent(100);\n legend.toBack();\n break;\n case \"bottom\":\n chartAndLegendContainer.layout = \"vertical\";\n legend.maxWidth = undefined;\n legend.width = percent(100);\n legend.toFront();\n }\n }\n };\n /**\r\n * Setups the legend to use the chart's data.\r\n */\n Chart.prototype.feedLegend = function () {\n // Nothing here. This method is provided only as a \"placeholder\" for\n // extending classes to override\n };\n /**\r\n * Adds a new title to the chart when it is inserted into chart's titles\r\n * list.\r\n * @param event An event object which is triggered when inserting into titles list\r\n * @return Label object\r\n */\n Chart.prototype.processTitle = function (event) {\n var title = event.newValue;\n title.parent = this;\n title.toBack();\n title.shouldClone = false;\n title.align = \"center\";\n // Need to explicitly apply the `id` attribute so it can be referenced by\n // `aria-labelledby`\n title.uidAttr();\n return title;\n };\n /**\r\n * Checks if chart has any title elements. If it does, we will use them in an\r\n * `aria-labelledby` attribute so that screen readers can use them to properly\r\n * describe the chart when it is focused or hovered.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Chart.prototype.updateReaderTitleReferences = function () {\n if (this.titles.length) {\n var titleIds_1 = [];\n $iter.each(this.titles.iterator(), function (title) {\n titleIds_1.push(title.uid);\n });\n this.setSVGAttribute({\n \"aria-labelledby\": titleIds_1.join(\" \")\n });\n } else {\n this.removeSVGAttribute(\"aria-labelledby\");\n }\n };\n Object.defineProperty(Chart.prototype, \"legend\", {\n /**\r\n * @return Legend\r\n */\n get: function get() {\n return this._legend.get();\n },\n /**\r\n * Holds the instance of chart's [[Leged]].\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/legend/} for more information about legends\r\n * @param Legend\r\n */\n set: function set(legend) {\n this.setLegend(legend);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Prepares the legend instance for use in this chart.\r\n *\r\n * @param legend Legend\r\n */\n Chart.prototype.setLegend = function (legend) {\n var _this = this;\n if (this._legend.get() !== legend) {\n if (legend) {\n // Set legend options\n legend.parent = this.chartAndLegendContainer;\n this._legend.set(legend, legend.events.on(\"propertychanged\", function (event) {\n if (event.property == \"position\" || event.property == \"width\") {\n _this.fixLayout();\n }\n }, undefined, false));\n } else {\n this._legend.reset();\n }\n this.feedLegend();\n }\n };\n /**\r\n * Destroys this object and all related data.\r\n */\n Chart.prototype.dispose = function () {\n // otherwise there might be some errors when disposing chart which was just inited\n if (this.legend) {\n this.legend.dispose();\n }\n _super.prototype.dispose.call(this);\n };\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n Chart.prototype.processConfig = function (config) {\n if (config) {\n // Set up legend\n if ($type.hasValue(config.legend) && !$type.hasValue(config.legend.type)) {\n config.legend.type = \"Legend\";\n }\n }\n _super.prototype.processConfig.call(this, config);\n };\n /**\r\n * Copies all properties from another instance of [[Series]].\r\n *\r\n * @param source Source series\r\n */\n Chart.prototype.copyFrom = function (source) {\n this.titles.copyFrom(source.titles);\n if (source.legend) {\n this.legend = source.legend.clone();\n this.legend.removeChildren();\n }\n _super.prototype.copyFrom.call(this, source);\n };\n Object.defineProperty(Chart.prototype, \"dragGrip\", {\n /**\r\n * @return Grip\r\n */\n get: function get() {\n var _this = this;\n if (!this._dragGrip) {\n var grip_1 = this.tooltipContainer.createChild(Grip);\n grip_1.align = \"right\";\n grip_1.valign = \"middle\";\n grip_1.hide(0);\n grip_1.events.on(\"down\", function (ev) {\n if (ev.touch) {\n _this.interactionsEnabled = false;\n }\n });\n grip_1.events.on(\"up\", function (ev) {\n _this.interactionsEnabled = true;\n });\n this.events.on(\"down\", function (ev) {\n if (ev.touch) {\n grip_1.show();\n }\n });\n this._dragGrip = grip_1;\n }\n return this._dragGrip;\n },\n /**\r\n * An instance of [[Grip]] which serves as a grip point which appears on\r\n * touch and allows scrolling whole page even if chart is occupying the\r\n * whole of the screen and would otherwise prevent scrolling.\r\n *\r\n * @since 4.4.0\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/touch/} For more information.\r\n * @param value Grip\r\n */\n set: function set(value) {\n this._dragGrip = value;\n },\n enumerable: true,\n configurable: true\n });\n return Chart;\n}(Component);\nexport { Chart };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Chart\"] = Chart;\n/**\r\n * Add default responsive rules\r\n */\n/**\r\n * Reduce horizontal margins\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.widthXS,\n state: function state(target, stateId) {\n if (target instanceof Chart) {\n var state = target.states.create(stateId);\n if (target.pixelPaddingLeft > 10) {\n state.properties.paddingLeft = 10;\n }\n if (target.pixelPaddingRight > 10) {\n state.properties.paddingRight = 10;\n }\n return state;\n }\n return null;\n }\n});\n/**\r\n * Reduce vertical margins\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.heightXS,\n state: function state(target, stateId) {\n if (target instanceof Chart) {\n var state = target.states.create(stateId);\n if (target.pixelPaddingTop > 10) {\n state.properties.paddingTop = 10;\n }\n if (target.pixelPaddingBottom > 10) {\n state.properties.paddingBottom = 10;\n }\n return state;\n }\n return null;\n }\n});\n/**\r\n * Remove horizontal padding\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.widthXXS,\n state: function state(target, stateId) {\n if (target instanceof Chart) {\n var state = target.states.create(stateId);\n state.properties.paddingLeft = 0;\n state.properties.paddingRight = 0;\n return state;\n }\n return null;\n }\n});\n/**\r\n * Remove vertical padding\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.heightXXS,\n state: function state(target, stateId) {\n if (target instanceof Chart) {\n var state = target.states.create(stateId);\n state.properties.paddingTop = 0;\n state.properties.paddingBottom = 0;\n return state;\n }\n return null;\n }\n});","/**\r\n * Module that defines everything related to building bullets.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../../core/Container\";\nimport { registry } from \"../../core/Registry\";\nimport { defaultRules, ResponsiveBreakpoints } from \"../../core/utils/Responsive\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Class used to creates bullets.\r\n *\r\n * @see {@link IBulletEvents} for a list of available events\r\n * @see {@link IBulletAdapters} for a list of available Adapters\r\n * @todo Usage example\r\n * @important\r\n */\nvar Bullet = /** @class */function (_super) {\n tslib_1.__extends(Bullet, _super);\n /**\r\n * Constructor\r\n */\n function Bullet() {\n var _this = _super.call(this) || this;\n _this.className = \"Bullet\";\n _this.isMeasured = false;\n _this.tooltipX = 0;\n _this.tooltipY = 0;\n _this.layout = \"none\";\n _this.applyOnClones = true;\n _this.copyToLegendMarker = true;\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(Bullet.prototype, \"locationX\", {\n /**\r\n * @return Location (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"locationX\");\n },\n /**\r\n * Relative horizontal location within cell. (0-1)\r\n *\r\n * @param value Location (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"locationX\", value, false, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Bullet.prototype, \"locationY\", {\n /**\r\n * @return Location (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"locationY\");\n },\n /**\r\n * Relative vertical location within cell. (0-1)\r\n *\r\n * @param value Location (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"locationY\", value, false, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Bullet.prototype, \"xField\", {\n /**\r\n * @return [description]\r\n */\n get: function get() {\n return this.getPropertyValue(\"xField\");\n },\n /**\r\n * [xField description]\r\n *\r\n * @todo Description\r\n * @param value [description]\r\n */\n set: function set(value) {\n this.setPropertyValue(\"xField\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Bullet.prototype, \"yField\", {\n /**\r\n * @return [description]\r\n */\n get: function get() {\n return this.getPropertyValue(\"yField\");\n },\n /**\r\n * [yField description]\r\n *\r\n * Description\r\n * @param value [description]\r\n */\n set: function set(value) {\n this.setPropertyValue(\"yField\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Bullet.prototype, \"isDynamic\", {\n /**\r\n * @return Redraw on data change?\r\n */\n get: function get() {\n return this.getPropertyValue(\"isDynamic\");\n },\n /**\r\n * Indicates if the bullet is \"dynamic\".\r\n *\r\n * In most cases the bullets remain the same, even if the underlying data\r\n * changes.\r\n *\r\n * However, in cases where bullet also displays a label, or its size depends\r\n * on data, it also needs to be redrawn when the underlying data changes.\r\n *\r\n * Only those bullets that have set `isDynamic = true` will be redrawn each\r\n * time data changes. Regular bullets will be reused as they are.\r\n *\r\n * @default false\r\n * @param value Redraw on data change?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"isDynamic\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Bullet.prototype, \"copyToLegendMarker\", {\n /**\r\n * @return Redraw on data change?\r\n */\n get: function get() {\n return this.getPropertyValue(\"copyToLegendMarker\");\n },\n /**\r\n * Indicates if the bullet should be copied to legend marker\r\n *\r\n * @default false\r\n * @param value Redraw on data change?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"copyToLegendMarker\", value);\n },\n enumerable: true,\n configurable: true\n });\n return Bullet;\n}(Container);\nexport { Bullet };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Bullet\"] = Bullet;\n/**\r\n * Add default responsive rules\r\n */\n/**\r\n * Hide bullets\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.isXS,\n state: function state(target, stateId) {\n if (target instanceof Bullet) {\n var state = target.states.create(stateId);\n state.properties.disabled = true;\n return state;\n }\n return null;\n }\n});","/**\r\n * Legend-related functionality.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Component } from \"../core/Component\";\nimport { DataItem } from \"../core/DataItem\";\nimport { ListTemplate, ListDisposer } from \"../core/utils/List\";\nimport { RoundedRectangle } from \"../core/elements/RoundedRectangle\";\nimport { Container } from \"../core/Container\";\nimport { Label } from \"../core/elements/Label\";\nimport { keyboard } from \"../core/utils/Keyboard\";\nimport { registry } from \"../core/Registry\";\nimport { getInteraction } from \"../core/interaction/Interaction\";\nimport { percent } from \"../core/utils/Percent\";\nimport { InterfaceColorSet } from \"../core/utils/InterfaceColorSet\";\nimport * as $utils from \"../core/utils/Utils\";\nimport * as $type from \"../core/utils/Type\";\nimport { Sprite } from \"../core/Sprite\";\nimport { Disposer } from \"../core/utils/Disposer\";\nimport { MouseCursorStyle } from \"../core/interaction/Mouse\";\nimport { defaultRules, ResponsiveBreakpoints } from \"../core/utils/Responsive\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[Legend]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar LegendDataItem = /** @class */function (_super) {\n tslib_1.__extends(LegendDataItem, _super);\n /**\r\n * Constructor\r\n */\n function LegendDataItem() {\n var _this = _super.call(this) || this;\n /**\r\n * @ignore\r\n */\n _this.childrenCreated = false;\n _this.className = \"LegendDataItem\";\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(LegendDataItem.prototype, \"label\", {\n /**\r\n * A legend item's [[Label]] element.\r\n *\r\n * @return Label\r\n */\n get: function get() {\n var _this = this;\n if (!this._label) {\n var label_1 = this.component.labels.create();\n this._label = label_1;\n this.addSprite(label_1);\n this._disposers.push(label_1);\n label_1.parent = this.itemContainer;\n this._disposers.push(new Disposer(function () {\n if ($type.hasValue(_this.component)) {\n _this.component.labels.removeValue(label_1);\n }\n }));\n }\n return this._label;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LegendDataItem.prototype, \"color\", {\n /**\r\n * @return Main color\r\n */\n get: function get() {\n return this.properties.color;\n },\n /**\r\n * Main color of legend data item.\r\n *\r\n * This is set by the target element this legend item represents, like\r\n * a Series or a Slice.\r\n *\r\n * It can be used to derive a color in legend's sub-items, like label:\r\n *\r\n * ```TypeScript\r\n * chart.legend.labels.template.text = \"[{color}]{name}[/]\";\r\n * ```\r\n * ```JavaScript\r\n * chart.legend.labels.template.text = \"[{color}]{name}[/]\";\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"legend\": {\r\n * // ...\r\n * \"labels\": {\r\n * \"text\": \"[{color}]{name}[/]\"\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/legend/#Legend_labels} For more information about configuring legend labels.\r\n * @param value Main color\r\n */\n set: function set(value) {\n this.setProperty(\"color\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LegendDataItem.prototype, \"valueLabel\", {\n /**\r\n * A legend item's [[Label]] element for \"value label\".\r\n *\r\n * @return Label\r\n */\n get: function get() {\n var _this = this;\n if (!this._valueLabel) {\n var valueLabel_1 = this.component.valueLabels.create();\n this._valueLabel = valueLabel_1;\n this.addSprite(valueLabel_1);\n this._disposers.push(valueLabel_1);\n valueLabel_1.parent = this.itemContainer;\n this._disposers.push(new Disposer(function () {\n if ($type.hasValue(_this.component)) {\n _this.component.valueLabels.removeValue(valueLabel_1);\n }\n }));\n }\n return this._valueLabel;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LegendDataItem.prototype, \"itemContainer\", {\n /**\r\n * A reference to the main [[Container]] that holds legend item's elements:\r\n * marker and labels.\r\n *\r\n * @return Item container\r\n */\n get: function get() {\n var _this = this;\n if (!this._itemContainer) {\n var component_1 = this.component;\n var itemContainer_1 = component_1.itemContainers.create();\n this._itemContainer = itemContainer_1;\n this.addSprite(itemContainer_1);\n this._disposers.push(itemContainer_1);\n // Add click/tap event to toggle item\n if (itemContainer_1.togglable) {\n itemContainer_1.events.on(\"toggled\", function (ev) {\n component_1.toggleDataItem(ev.target.dataItem);\n }, undefined, false);\n }\n // Add focus event so that we can track which object is currently in focus\n // for keyboard toggling\n itemContainer_1.events.on(\"focus\", function (ev) {\n component_1.focusedItem = ev.target.dataItem;\n }, undefined, false);\n itemContainer_1.events.on(\"blur\", function (ev) {\n component_1.focusedItem = undefined;\n }, undefined, false);\n this._disposers.push(new Disposer(function () {\n if ($type.hasValue(_this.component)) {\n _this.component.itemContainers.removeValue(itemContainer_1);\n }\n }));\n if (this.dataContext.uidAttr) {\n itemContainer_1.readerControls = this.dataContext.uidAttr();\n itemContainer_1.readerLabelledBy = this.dataContext.uidAttr();\n }\n var sprite = this.dataContext;\n if ((sprite instanceof DataItem || sprite instanceof Sprite) && !sprite.isDisposed()) {\n itemContainer_1.addDisposer(sprite.events.on(\"visibilitychanged\", function (ev) {\n itemContainer_1.readerChecked = ev.visible;\n itemContainer_1.events.disableType(\"toggled\");\n itemContainer_1.isActive = !ev.visible;\n itemContainer_1.events.enableType(\"toggled\");\n }, undefined, false));\n sprite.addDisposer(new Disposer(function () {\n if (_this.component) {\n _this.component.dataItems.remove(_this);\n }\n }));\n if (sprite instanceof Sprite) {\n itemContainer_1.addDisposer(sprite.events.on(\"hidden\", function (ev) {\n itemContainer_1.readerChecked = false;\n itemContainer_1.events.disableType(\"toggled\");\n itemContainer_1.isActive = true;\n itemContainer_1.events.enableType(\"toggled\");\n }, undefined, false));\n itemContainer_1.addDisposer(sprite.events.on(\"shown\", function (ev) {\n itemContainer_1.readerChecked = true;\n itemContainer_1.events.disableType(\"toggled\");\n itemContainer_1.isActive = false;\n itemContainer_1.events.enableType(\"toggled\");\n }, undefined, false));\n }\n }\n }\n return this._itemContainer;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LegendDataItem.prototype, \"marker\", {\n /**\r\n * A [[Container]] that holds legend item's marker element.\r\n *\r\n * @return Marker\r\n */\n get: function get() {\n var _this = this;\n if (!this._marker) {\n var marker_1 = this.component.markers.create();\n this._marker = marker_1;\n marker_1.parent = this.itemContainer;\n this.addSprite(marker_1);\n this._disposers.push(marker_1);\n this._disposers.push(new Disposer(function () {\n if ($type.hasValue(_this.component)) {\n _this.component.markers.removeValue(marker_1);\n }\n }));\n }\n return this._marker;\n },\n enumerable: true,\n configurable: true\n });\n return LegendDataItem;\n}(DataItem);\nexport { LegendDataItem };\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a class that carries legend settings.\r\n *\r\n * A legend might change its settings dynamically. Legend can also be shared\r\n * by several elements, requiring different settings.\r\n *\r\n * Having legend's settings in a separate object is a good way to \"hot swap\"\r\n * a set of settings for the legend.\r\n */\nvar LegendSettings = /** @class */function () {\n function LegendSettings() {\n /**\r\n * Should marker be created for each legend item.\r\n */\n this.createMarker = true;\n }\n return LegendSettings;\n}();\nexport { LegendSettings };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * [[Legend]] class is used to create legend for the chart.\r\n *\r\n * @see {@link ILegendEvents} for a list of available events\r\n * @see {@link ILegendAdapters} for a list of available Adapters\r\n * @todo Verify/implement dynamic updating of legend items once the properties of related Series change\r\n */\nvar Legend = /** @class */function (_super) {\n tslib_1.__extends(Legend, _super);\n /**\r\n * Constructor\r\n */\n function Legend() {\n var _this = _super.call(this) || this;\n _this.className = \"Legend\";\n // Set defaults\n _this.layout = \"grid\";\n _this.setPropertyValue(\"useDefaultMarker\", false);\n _this.setPropertyValue(\"contentAlign\", \"center\");\n // Create a template container and list for legend items\n var itemContainer = new Container();\n itemContainer.applyOnClones = true;\n itemContainer.padding(10, 0, 10, 0);\n itemContainer.margin(0, 10, 0, 0);\n itemContainer.layout = \"horizontal\";\n itemContainer.clickable = true;\n itemContainer.focusable = true;\n itemContainer.role = \"switch\";\n itemContainer.togglable = true;\n itemContainer.cursorOverStyle = MouseCursorStyle.pointer;\n itemContainer.background.fillOpacity = 0; // creates hit area\n // Create container list using item template we just created\n _this.itemContainers = new ListTemplate(itemContainer);\n _this._disposers.push(new ListDisposer(_this.itemContainers));\n _this._disposers.push(_this.itemContainers.template);\n // Set up global keyboard events for toggling elements\n _this._disposers.push(getInteraction().body.events.on(\"keyup\", function (ev) {\n if (keyboard.isKey(ev.event, \"enter\") && _this.focusedItem) {\n _this.toggleDataItem(_this.focusedItem);\n }\n }, _this));\n var interfaceColors = new InterfaceColorSet();\n // Create a template container and list for the a marker\n var marker = new Container();\n marker.width = 23;\n marker.height = 23;\n marker.interactionsEnabled = false;\n marker.applyOnClones = true;\n marker.setStateOnChildren = true;\n marker.background.fillOpacity = 0;\n marker.background.strokeOpacity = 0;\n marker.propertyFields.fill = \"fill\";\n marker.valign = \"middle\";\n var disabledColor = interfaceColors.getFor(\"disabledBackground\");\n marker.events.on(\"childadded\", function (event) {\n var child = event.newValue;\n var activeState = child.states.create(\"active\");\n activeState.properties.stroke = disabledColor;\n activeState.properties.fill = disabledColor;\n });\n _this.markers = new ListTemplate(marker);\n _this._disposers.push(new ListDisposer(_this.markers));\n _this._disposers.push(_this.markers.template);\n // Create a legend background element\n var rectangle = marker.createChild(RoundedRectangle);\n rectangle.width = percent(100);\n rectangle.height = percent(100);\n rectangle.applyOnClones = true;\n rectangle.propertyFields.fill = \"fill\";\n rectangle.strokeOpacity = 0;\n // Create a template container and list for item labels\n var label = new Label();\n label.text = \"{name}\";\n label.margin(0, 5, 0, 5);\n label.valign = \"middle\";\n label.applyOnClones = true;\n label.states.create(\"active\").properties.fill = interfaceColors.getFor(\"disabledBackground\");\n _this.labels = new ListTemplate(label);\n _this._disposers.push(new ListDisposer(_this.labels));\n _this._disposers.push(_this.labels.template);\n label.interactionsEnabled = false;\n // Create a template container and list for item value labels\n var valueLabel = new Label();\n valueLabel.margin(0, 5, 0, 0);\n valueLabel.valign = \"middle\";\n valueLabel.width = 50; // to avoid rearranging legend entries when value changes.\n valueLabel.align = \"right\";\n valueLabel.textAlign = \"end\";\n valueLabel.applyOnClones = true;\n valueLabel.states.create(\"active\").properties.fill = interfaceColors.getFor(\"disabledBackground\");\n valueLabel.interactionsEnabled = false;\n _this.valueLabels = new ListTemplate(valueLabel);\n _this._disposers.push(new ListDisposer(_this.valueLabels));\n _this._disposers.push(_this.valueLabels.template);\n _this.position = \"bottom\"; // don't use setPropertyValue here!\n // Create a state for disabled legend items\n itemContainer.states.create(\"active\");\n itemContainer.setStateOnChildren = true;\n // Apply accessibility settings\n _this.role = \"group\";\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n Legend.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Legend\");\n }\n };\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n Legend.prototype.createDataItem = function () {\n return new LegendDataItem();\n };\n /**\r\n * [validateDataElement description]\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n * @todo Description\r\n * @todo Figure out how to update appearance of legend item without losing focus\r\n * @todo Update legend marker appearance as apperance of related series changes\r\n */\n Legend.prototype.validateDataElement = function (dataItem) {\n _super.prototype.validateDataElement.call(this, dataItem);\n // Get data item (legend item's) container\n var container = dataItem.itemContainer;\n var marker = dataItem.marker;\n $utils.used(dataItem.label);\n var valueLabel = dataItem.valueLabel;\n // Set parent and update current state\n container.parent = this;\n container.readerChecked = dataItem.dataContext.visible;\n // Tell series its legend data item\n dataItem.dataContext.legendDataItem = dataItem;\n var legendSettings = dataItem.dataContext.legendSettings;\n // If we are not using default markers, create a unique legend marker based\n // on the data item type\n var dataContext = dataItem.dataContext;\n if (dataContext.createLegendMarker && (!this.useDefaultMarker || !(dataContext instanceof Sprite))) {\n if (!dataItem.childrenCreated) {\n dataContext.createLegendMarker(marker);\n dataItem.childrenCreated = true;\n }\n }\n if (dataContext.updateLegendValue) {\n dataContext.updateLegendValue(); // this solves issue with external legend, as legend is created after chart updates legend values\n }\n if (valueLabel.invalid) {\n valueLabel.validate();\n }\n if (valueLabel.currentText == \"\" || valueLabel.currentText == undefined) {\n valueLabel.__disabled = true;\n } else {\n valueLabel.__disabled = false;\n }\n if (legendSettings && (legendSettings.itemValueText != undefined || legendSettings.valueText != undefined)) {\n valueLabel.__disabled = false;\n }\n var visible = dataItem.dataContext.visible;\n if (visible === undefined) {\n visible = true;\n }\n visible = $type.toBoolean(visible);\n dataItem.dataContext.visible = visible;\n container.events.disableType(\"toggled\");\n container.isActive = !visible;\n container.events.enableType(\"toggled\");\n };\n Object.defineProperty(Legend.prototype, \"position\", {\n /**\r\n * @return Position\r\n */\n get: function get() {\n return this.getPropertyValue(\"position\");\n },\n /**\r\n * Position of the legend.\r\n *\r\n * Options: \"left\", \"right\", \"top\", \"bottom\" (default), or \"absolute\".\r\n *\r\n * IMPORTANT: [[MapChart]] will ignore this setting, as it is using different\r\n * layout structure than other charts.\r\n *\r\n * To position legend in [[MapChart]] set legend's `align` (`\"left\"` or\r\n * `\"right\"`) and `valign` (`\"top\"` or `\"bottom\"`) properties instead.\r\n *\r\n * @default \"bottom\"\r\n * @param value Position\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"position\", value)) {\n if (value == \"left\" || value == \"right\") {\n this.margin(10, 20, 10, 20);\n this.valign = \"middle\";\n this.itemContainers.template.width = percent(100);\n this.valueLabels.template.width = percent(100);\n this.labels.template.truncate = true;\n this.labels.template.fullWords = false;\n } else {\n this.itemContainers.template.width = undefined;\n this.itemContainers.template.maxWidth = undefined;\n this.valueLabels.template.width = 50;\n this.labels.template.truncate = false;\n this.width = percent(100);\n }\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Legend.prototype, \"useDefaultMarker\", {\n /**\r\n * @return Use default marker?\r\n */\n get: function get() {\n return this.getPropertyValue(\"useDefaultMarker\");\n },\n /**\r\n * Should legend try to mirror the look of the related item when building\r\n * the marker for legend item?\r\n *\r\n * If set to `true` it will try to make the marker look like its related\r\n * item.\r\n *\r\n * E.g. if an item is for a Line Series, it will display a line of the\r\n * same thickness, color, and will use the same bullets if series have them.\r\n *\r\n * @default false\r\n * @param value Use default marker?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"useDefaultMarker\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Toggles a legend item.\r\n *\r\n * @ignore Exclude from docs\r\n * @param item Legend item\r\n * @todo Maybe do it with togglable instead\r\n */\n Legend.prototype.toggleDataItem = function (item) {\n var dataContext = item.dataContext;\n if (!dataContext.visible || dataContext.isHiding || dataContext instanceof Sprite && dataContext.isHidden) {\n item.color = item.colorOrig;\n item.itemContainer.isActive = false;\n if (dataContext.hidden === true) {\n dataContext.hidden = false;\n }\n if (dataContext.show) {\n dataContext.show();\n } else {\n dataContext.visible = true;\n }\n } else {\n item.itemContainer.isActive = true;\n if (dataContext.hide) {\n dataContext.hide();\n } else {\n dataContext.visible = false;\n }\n item.color = new InterfaceColorSet().getFor(\"disabledBackground\");\n }\n };\n Object.defineProperty(Legend.prototype, \"preloader\", {\n /**\r\n * Override preloader method so that legend does not accidentally show its\r\n * own preloader.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Always `undefined`\r\n */\n get: function get() {\n return;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * [handleDataItemPropertyChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\n Legend.prototype.handleDataItemPropertyChange = function (dataItem, name) {\n dataItem.valueLabel.invalidate();\n dataItem.label.invalidate();\n };\n return Legend;\n}(Component);\nexport { Legend };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Legend\"] = Legend;\n/**\r\n * Add default responsive rules\r\n */\n/**\r\n * Move legend to below the chart if chart is narrow\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.widthXS,\n state: function state(target, stateId) {\n if (target instanceof Legend && (target.position == \"left\" || target.position == \"right\")) {\n var state = target.states.create(stateId);\n state.properties.position = \"bottom\";\n return state;\n }\n return null;\n }\n});\n/**\r\n * Move legend to the right if chart is very short\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.heightXS,\n state: function state(target, stateId) {\n if (target instanceof Legend && (target.position == \"top\" || target.position == \"bottom\")) {\n var state = target.states.create(stateId);\n state.properties.position = \"right\";\n return state;\n }\n return null;\n }\n});\n/**\r\n * Disable legend altogether on small charts\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.isXS,\n state: function state(target, stateId) {\n if (target instanceof Legend) {\n var state = target.states.create(stateId);\n state.properties.disabled = true;\n return state;\n }\n return null;\n }\n});","/**\r\n * Functionality for any series-based elements, like Line Series (graphs),\r\n * Pie slice lists, etc.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Component } from \"../../core/Component\";\nimport { Sprite } from \"../../core/Sprite\";\nimport { List, ListTemplate, ListDisposer } from \"../../core/utils/List\";\nimport { Dictionary, DictionaryDisposer } from \"../../core/utils/Dictionary\";\nimport { DataItem } from \"../../core/DataItem\";\nimport { Container } from \"../../core/Container\";\nimport { Tooltip } from \"../../core/elements/Tooltip\";\nimport { Bullet } from \"../elements/Bullet\";\nimport { LegendSettings } from \"../Legend\";\nimport { options } from \"../../core/Options\";\nimport { Color } from \"../../core/utils/Color\";\nimport { registry } from \"../../core/Registry\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $ease from \"../../core/utils/Ease\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $object from \"../../core/utils/Object\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $array from \"../../core/utils/Array\";\nimport * as $colors from \"../../core/utils/Colors\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[Series]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar SeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(SeriesDataItem, _super);\n /**\r\n * Constructor\r\n */\n function SeriesDataItem() {\n var _this = _super.call(this) || this;\n /**\r\n * A dictionary of data items bullets, where key is uid of a bullet template.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo review description\r\n */\n _this.bullets = new Dictionary();\n _this.className = \"SeriesDataItem\";\n //@todo Should we make `bullets` list disposable?\n _this._disposers.push(new DictionaryDisposer(_this.bullets));\n _this.values.value = {};\n _this.values.value = {};\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Destroys this object and all related data.\r\n */\n SeriesDataItem.prototype.dispose = function () {\n this.bullets.clear();\n _super.prototype.dispose.call(this);\n };\n Object.defineProperty(SeriesDataItem.prototype, \"value\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.values.value.value;\n },\n /**\r\n * data items's numeric value.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setValue(\"value\", value);\n },\n enumerable: true,\n configurable: true\n });\n return SeriesDataItem;\n}(DataItem);\nexport { SeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines base class for any kind of serial data.\r\n *\r\n * @see {@link ISeriesEvents} for a list of available Events\r\n * @see {@link ISeriesAdapters} for a list of available Adapters\r\n * @todo Separate axis-related stuff to some other class so that MapSeries would not have unrelated stuff\r\n */\nvar Series = /** @class */function (_super) {\n tslib_1.__extends(Series, _super);\n /**\r\n * Constructor\r\n */\n function Series() {\n var _this = _super.call(this) || this;\n /**\r\n * Should this series excluded from the axis scale calculations?\r\n *\r\n * @default false\r\n */\n _this._ignoreMinMax = false;\n /**\r\n * Should series' bullets?\r\n *\r\n * @default true\r\n */\n _this._showBullets = true;\n /**\r\n * Settings for the appearance of the related legend items.\r\n */\n _this.legendSettings = new LegendSettings();\n /**\r\n * Lowest overal values by type.\r\n */\n _this._tmin = new Dictionary();\n /**\r\n * Highest overal values by type.\r\n */\n _this._tmax = new Dictionary();\n /**\r\n * Lowest values in current selection by type.\r\n */\n _this._smin = new Dictionary();\n /**\r\n * Highest values in current selection by type.\r\n */\n _this._smax = new Dictionary();\n /**\r\n * [dataItemsByAxis description]\r\n *\r\n * Both by category and date.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n _this.dataItemsByAxis = new Dictionary();\n /**\r\n * Normally series items are focusable using keyboard, so that people can\r\n * select them with a TAB key. However, if there are a lot of data points on\r\n * screen it might be long and useless to tab through all o fthem.\r\n *\r\n * This is where `skipFocusThreshold` comes in. If there are more items than\r\n * the value set here, we will not make those focusable and rather let screen\r\n * reader software rely on the series summary, or authors provide alternative\r\n * detailed information display, such as HTML table.\r\n *\r\n * Different series might have different threshold defaults.\r\n */\n _this.skipFocusThreshold = 20;\n /**\r\n * Most of the series use absolute values. However sometimes various\r\n * calculated percent values are need, e.g. item's percent representation\r\n * across all values in series, etc.\r\n *\r\n * It's a resource-intensive operation, so it is disabled by default.\r\n *\r\n * If you need percents to be calculated, e.g. for showing them in tooltips,\r\n * or creating 100% stacks, this setting needs to be set to `true`.\r\n *\r\n * NOTE: `PieChart`, which relies on slice percentages, has this\r\n * automatically set to `true`.\r\n *\r\n * @default false\r\n */\n _this.calculatePercent = false;\n /**\r\n * Specifies if series should be automatically disposed when removing from\r\n * chart's `series` list.\r\n *\r\n * @default true\r\n */\n _this.autoDispose = true;\n /**\r\n * When chart/series' data is processed, all kinds of derivative values are\r\n * calculated. E.g. sum, min, max, change, etc. This is a potentially\r\n * time-consuming operation, especially prominent in data-heavy charts.\r\n *\r\n * If your chart does not need those values, and you have a lot of data,\r\n * setting this to `true` might give a dramatic increase in initial chart\r\n * load speed.\r\n *\r\n * Please note, regular column and line series usage scenarios do not\r\n * require derivative values. Those come into play only when you do advanced\r\n * functionality like coloring segments of charts in different colors\r\n * depending on change between open and close values, have stacked series, or\r\n * display any of the derived values, like percent, in tooltips or bullets.\r\n *\r\n * @default false\r\n */\n _this.simplifiedProcessing = false;\n if (_this.constructor === Series) {\n throw new Error(\"'Series' cannot be instantiated directly. Please use a specific series type.\");\n }\n _this.className = \"Series\";\n _this.isMeasured = false;\n _this.layout = \"none\";\n _this.shouldClone = false;\n _this.setPropertyValue(\"hidden\", false);\n _this.axisRanges = new List();\n _this.axisRanges.events.on(\"inserted\", _this.processAxisRange, _this, false);\n _this.minBulletDistance = 0; // otherwise we'll have a lot of cases when people won't see bullets and think it's a bug\n _this.mainContainer = _this.createChild(Container);\n _this.mainContainer.shouldClone = false;\n _this.mainContainer.mask = _this.createChild(Sprite);\n _this._disposers.push(_this.mainContainer);\n // all bullets should go on top of lines/fills. So we add a separate container for bullets and later set it's parent to chart.bulletsContainer\n var bulletsContainer = _this.mainContainer.createChild(Container);\n _this._shouldBeReady.push(bulletsContainer);\n bulletsContainer.shouldClone = false;\n bulletsContainer.layout = \"none\";\n bulletsContainer.virtualParent = _this;\n _this._disposers.push(bulletsContainer);\n _this.bulletsContainer = bulletsContainer;\n _this.tooltip = new Tooltip();\n _this.tooltip.virtualParent = _this;\n _this._disposers.push(_this.tooltip);\n _this.hiddenState.transitionEasing = $ease.cubicIn;\n // this data item holds sums, averages, etc\n _this.dataItem = _this.createDataItem();\n _this._disposers.push(_this.dataItem);\n _this.dataItem.component = _this;\n // Apply accessibility\n _this.role = \"group\";\n _this.applyTheme();\n return _this;\n }\n /**\r\n * We need this here so that class names can be applied to bullets container.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Series.prototype.applyTheme = function () {\n _super.prototype.applyTheme.call(this);\n if (options.autoSetClassName && this.bulletsContainer) {\n this.bulletsContainer.className = this.className + \"-bullets\";\n this.bulletsContainer.setClassName();\n }\n };\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n Series.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Series\");\n }\n };\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n Series.prototype.createDataItem = function () {\n return new SeriesDataItem();\n };\n Object.defineProperty(Series.prototype, \"chart\", {\n /**\r\n * @return Chart\r\n */\n get: function get() {\n return this._chart;\n },\n /**\r\n * Chart series is used on.\r\n *\r\n * @param value Chart\r\n */\n set: function set(value) {\n this._chart = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Positions bullet.\r\n *\r\n * @param bullet Sprite\r\n */\n Series.prototype.positionBullet = function (bullet) {\n // Placeholder method for extending classes to override.\n };\n /**\r\n * Decorates newly created bullet after it has been instert into the list.\r\n *\r\n * @param event List event\r\n * @todo investigate why itemReaderText is undefined\r\n */\n Series.prototype.processBullet = function (event) {\n var bullet = event.newValue;\n bullet.isTemplate = true;\n // Add accessibility options to bullet\n // If there are relatively few bullets, make them focusable\n if (this.itemsFocusable()) {\n bullet.focusable = true;\n }\n };\n /**\r\n * removes bullets\r\n *\r\n * @param event List event\r\n */\n Series.prototype.removeBullet = function (event) {\n var bullet = event.oldValue;\n this.dataItems.each(function (dataItem) {\n var eachBullet = dataItem.bullets.getKey(bullet.uid);\n if (eachBullet) {\n eachBullet.dispose();\n }\n });\n this.invalidate();\n };\n /**\r\n * Validates data items.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Series.prototype.validateDataItems = function () {\n _super.prototype.validateDataItems.call(this);\n this.processValues(false);\n };\n /**\r\n * Returns first value for the specific key in the series.\r\n *\r\n * @param key Key\r\n * @return Value\r\n * @todo Description\r\n * @todo Convert to propert object property iterator\r\n */\n Series.prototype.getFirstValue = function (key, startIndex) {\n // find first\n /*\r\n return $iter.findMap(this.dataItems.iterator(), (dataItem) => {\r\n for (let key in dataItem.values) {\r\n if ($object.hasKey(dataItem.values, key)) {\r\n let value: number = dataItem.values[key].workingValue;\r\n if ($type.isNumber(value)) {\r\n return value;\r\n }\r\n }\r\n }\r\n return null;\r\n });*/\n if (startIndex > 0 && startIndex < this.dataItems.length - 1) {\n startIndex++;\n }\n for (var i = startIndex; i >= 0; i--) {\n var dataItem = this.dataItems.getIndex(i);\n var value = dataItem.getActualWorkingValue(key);\n if ($type.isNumber(value)) {\n return value;\n }\n }\n return null;\n };\n /**\r\n * [rangeChangeUpdate description]\r\n *\r\n * @todo Description\r\n */\n Series.prototype.rangeChangeUpdate = function () {\n _super.prototype.rangeChangeUpdate.call(this);\n this.processValues(true);\n };\n /**\r\n * [processValues description]\r\n *\r\n * @todo Description\r\n * @todo Convert to propert object property iterator\r\n * @param dataItems [description]\r\n */\n Series.prototype.processValues = function (working) {\n var _this = this;\n if (!this.simplifiedProcessing) {\n var dataItems = this.dataItems;\n var count_1 = {};\n var sum_1 = {};\n var low_1 = {};\n var high_1 = {};\n var open_1 = {};\n var close_1 = {};\n var previous_1 = {};\n var first_1 = {};\n //let duration: number = 0; // todo: check if series uses selection.change or selection.change.percent and set duration to interpolationduration\n var startIndex_1 = $math.max(0, this._workingStartIndex);\n startIndex_1 = $math.min(startIndex_1, this.dataItems.length);\n var endIndex = $math.min(this._workingEndIndex, this.dataItems.length);\n if (!$type.isNumber(startIndex_1)) {\n startIndex_1 = 0;\n }\n if (!$type.isNumber(endIndex)) {\n endIndex = this.dataItems.length;\n }\n if (startIndex_1 > 0) {\n var dataItem_1 = dataItems.getIndex(startIndex_1 - 1);\n $object.each(dataItem_1.values, function (key, values) {\n var value = dataItem_1.getActualWorkingValue(key);\n if ($type.isNumber(value)) {\n // save previous\n previous_1[key] = value;\n }\n });\n }\n var _loop_1 = function _loop_1(i) {\n var dataItem_2 = dataItems.getIndex(i);\n $object.each(dataItem_2.values, function (key, values) {\n var value = dataItem_2.getActualWorkingValue(key);\n //if (i >= startIndex && i <= endIndex) { // do not add to count, sum etc if it is not within start/end index\n if ($type.isNumber(value)) {\n // count values\n if (!$type.isNumber(count_1[key])) {\n count_1[key] = 0;\n }\n count_1[key]++;\n // sum values\n if (!$type.isNumber(sum_1[key])) {\n sum_1[key] = 0;\n }\n sum_1[key] += value;\n // open\n if (!$type.isNumber(open_1[key])) {\n open_1[key] = value;\n }\n // close\n close_1[key] = value;\n // low\n if (!$type.isNumber(low_1[key])) {\n low_1[key] = value;\n } else {\n if (low_1[key] > value) {\n low_1[key] = value;\n }\n }\n // high\n if (!$type.isNumber(high_1[key])) {\n high_1[key] = value;\n } else {\n if (high_1[key] < value) {\n high_1[key] = value;\n }\n }\n if (!$type.isNumber(first_1[key])) {\n first_1[key] = _this.getFirstValue(key, startIndex_1);\n }\n // change\n dataItem_2.setCalculatedValue(key, value - first_1[key], \"change\");\n // change from start percent\n // will fail if first value is 0\n dataItem_2.setCalculatedValue(key, (value - first_1[key]) / first_1[key] * 100, \"changePercent\");\n // previous change\n var prevValue = previous_1[key];\n if (!$type.isNumber(prevValue)) {\n prevValue = value;\n }\n dataItem_2.setCalculatedValue(key, value - prevValue, \"previousChange\");\n // previous change percent\n dataItem_2.setCalculatedValue(key, (value - prevValue) / prevValue * 100, \"previousChangePercent\");\n // save previous\n previous_1[key] = value;\n }\n });\n };\n for (var i = startIndex_1; i < endIndex; i++) {\n _loop_1(i);\n }\n if (this.calculatePercent) {\n var _loop_2 = function _loop_2(i) {\n var dataItem_3 = dataItems.getIndex(i);\n $object.each(dataItem_3.values, function (key) {\n var ksum = sum_1[key];\n var value = dataItem_3.getActualWorkingValue(key);\n if ($type.isNumber(value)) {\n if (ksum > 0) {\n // this hack is made in order to make it possible to animate single slice to 0\n // if there is only one slice left, percent value is always 100%, so it won't animate\n // so we use real value of a slice instead of current value\n if (value == ksum) {\n ksum = dataItem_3.values[key].value;\n }\n var percent = value / ksum * 100;\n dataItem_3.setCalculatedValue(key, percent, \"percent\");\n } else {\n dataItem_3.setCalculatedValue(key, 0, \"percent\");\n }\n }\n });\n };\n for (var i = startIndex_1; i < endIndex; i++) {\n _loop_2(i);\n }\n }\n // calculate one before first (cant do that in cycle, as we don't know open yet\n // when drawing line chart we should draw line to the invisible data point to the left, otherwise the line will always look like it starts from the selected point\n // so we do startIndex - 1\n if (startIndex_1 > 0) {\n var zeroItem_1 = dataItems.getIndex(startIndex_1 - 1);\n $object.each(zeroItem_1.values, function (key) {\n var value = zeroItem_1.values[key].value;\n // change\n zeroItem_1.setCalculatedValue(key, value - open_1[key], \"change\");\n // change percent\n zeroItem_1.setCalculatedValue(key, (value - open_1[key]) / open_1[key] * 100, \"changePercent\");\n });\n }\n // we save various data like sum, average to dataPoint of the series\n var dataItem_4 = this.dataItem;\n $object.each(dataItem_4.values, function (key) {\n dataItem_4.setCalculatedValue(key, sum_1[key], \"sum\");\n dataItem_4.setCalculatedValue(key, sum_1[key] / count_1[key], \"average\");\n dataItem_4.setCalculatedValue(key, open_1[key], \"open\");\n dataItem_4.setCalculatedValue(key, close_1[key], \"close\");\n dataItem_4.setCalculatedValue(key, low_1[key], \"low\");\n dataItem_4.setCalculatedValue(key, high_1[key], \"high\");\n dataItem_4.setCalculatedValue(key, count_1[key], \"count\");\n });\n }\n };\n /**\r\n * (Re)validates the whole series, effectively causing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Series.prototype.validate = function () {\n $iter.each(this.axisRanges.iterator(), function (axisRange) {\n //axisRange.contents.disposeChildren(); // not good for columns, as they are reused\n //\t\t\taxisRange.appendChildren();\n axisRange.validate();\n });\n _super.prototype.validate.call(this);\n var bulletsContainer = this.bulletsContainer;\n bulletsContainer.fill = this.fill;\n bulletsContainer.stroke = this.stroke;\n bulletsContainer.x = this.pixelX;\n bulletsContainer.y = this.pixelY;\n if (this.bulletsContainer.children.length > 0) {\n if (this._showBullets) {\n for (var i = 0; i < this.startIndex; i++) {\n var dataItem = this.dataItems.getIndex(i);\n if (dataItem) {\n dataItem.bullets.each(function (key, bullet) {\n bullet.__disabled = true;\n });\n }\n }\n for (var i = this.dataItems.length - 1; i > this.endIndex; i--) {\n var dataItem = this.dataItems.getIndex(i);\n if (dataItem) {\n dataItem.bullets.each(function (key, bullet) {\n bullet.__disabled = true;\n });\n }\n }\n } else {\n this.bulletsContainer.children.each(function (bullet) {\n bullet.__disabled = true;\n });\n }\n }\n this.updateTooltipBounds();\n };\n /**\r\n * @ignore\r\n */\n Series.prototype.updateTooltipBounds = function () {\n if (this.topParent) {\n this.tooltip.setBounds({\n x: 0,\n y: 0,\n width: this.topParent.maxWidth,\n height: this.topParent.maxHeight\n });\n }\n };\n Series.prototype.shouldCreateBullet = function (dataItem, bulletTemplate) {\n return true;\n };\n /**\r\n * Validates data item's element, effectively redrawing it.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n Series.prototype.validateDataElement = function (dataItem) {\n var _this = this;\n _super.prototype.validateDataElement.call(this, dataItem);\n if (this._showBullets) {\n if (!this.isHidden) {\n this.bulletsContainer.visible = true;\n }\n this.bullets.each(function (bulletTemplate) {\n // always better to use the same, this helps to avoid redrawing\n var bullet = dataItem.bullets.getKey(bulletTemplate.uid);\n if (_this.shouldCreateBullet(dataItem, bulletTemplate)) {\n if (!bullet) {\n bullet = bulletTemplate.clone();\n bullet.shouldClone = false;\n dataItem.addSprite(bullet);\n if (!_this.visible || _this.isHiding) {\n bullet.hide(0);\n }\n }\n var currentDataItem = bullet.dataItem;\n if (currentDataItem != dataItem) {\n // set to undefined in order not to reuse\n if (currentDataItem) {\n currentDataItem.bullets.setKey(bulletTemplate.uid, undefined);\n }\n var readerText_1 = _this.itemReaderText;\n if (bullet instanceof Bullet) {\n if (!readerText_1) {\n readerText_1 = \"{\" + bullet.xField + \"}: {\" + bullet.yField + \"}\";\n }\n if (bullet.isDynamic) {\n dataItem.events.on(\"workingvaluechanged\", bullet.deepInvalidate, bullet, false);\n //dataItem.events.on(\"calculatedvaluechanged\", bullet.deepInvalidate, bullet, false);\n _this.dataItem.events.on(\"workingvaluechanged\", bullet.deepInvalidate, bullet, false);\n }\n bullet.deepInvalidate();\n }\n // Add accessibility to bullet\n if (bullet.focusable) {\n bullet.events.once(\"focus\", function (ev) {\n bullet.readerTitle = _this.populateString(readerText_1, bullet.dataItem);\n }, undefined, false);\n bullet.events.once(\"blur\", function (ev) {\n bullet.readerTitle = \"\";\n }, undefined, false);\n }\n if (bullet.hoverable) {\n bullet.events.once(\"over\", function (ev) {\n bullet.readerTitle = _this.populateString(readerText_1, bullet.dataItem);\n }, undefined, false);\n bullet.events.once(\"out\", function (ev) {\n bullet.readerTitle = \"\";\n }, undefined, false);\n }\n }\n bullet.parent = _this.bulletsContainer;\n dataItem.bullets.setKey(bulletTemplate.uid, bullet);\n // pass max w/h so we'd know if we should show/hide somethings\n bullet.maxWidth = dataItem.itemWidth;\n bullet.maxHeight = dataItem.itemHeight;\n bullet.__disabled = false;\n _this.positionBullet(bullet);\n }\n });\n } else {\n this.bulletsContainer.visible = false;\n }\n };\n /**\r\n * [handleDataItemWorkingValueChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\n Series.prototype.handleDataItemWorkingValueChange = function (dataItem, name) {\n if (!this.dataRangeInvalid) {\n this.invalidateProcessedData();\n }\n };\n Object.defineProperty(Series.prototype, \"ignoreMinMax\", {\n /**\r\n * @return Exclude from calculations?\r\n */\n get: function get() {\n return this._ignoreMinMax;\n },\n /**\r\n * Should this series excluded from the axis scale calculations?\r\n *\r\n * @default false\r\n * @param value Exclude from calculations?\r\n */\n set: function set(value) {\n this._ignoreMinMax = value;\n this.invalidateDataItems();\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Create a mask for the series.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Series.prototype.createMask = function () {\n // A placeholder method for extending classes to override.\n };\n /**\r\n * Process axis range after it has been added to the list.\r\n *\r\n * @param event Event\r\n */\n Series.prototype.processAxisRange = function (event) {\n // create container if not existing\n if (!this.rangesContainer) {\n this.rangesContainer = this.createChild(Container);\n this.rangesContainer.shouldClone = false;\n this.rangesContainer.isMeasured = false;\n }\n var axisRange = event.newValue;\n if (axisRange) {\n axisRange.contents.parent = this.rangesContainer;\n axisRange.isRange = true;\n }\n };\n /**\r\n * [getAxisField description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param axis [description]\r\n * @return [description]\r\n */\n Series.prototype.getAxisField = function (axis) {\n return;\n };\n /**\r\n * Shows the tooltip at specific position.\r\n *\r\n * @ignore Exclude from docs\r\n * @param xPosition X\r\n * @param yPosition Y\r\n */\n Series.prototype.showTooltipAtPosition = function (xPosition, yPosition) {\n // Placeholder method for extending classes to override.\n };\n Object.defineProperty(Series.prototype, \"minBulletDistance\", {\n /**\r\n * @return Distance (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"minBulletDistance\");\n },\n /**\r\n * Minimal distance between two adjacent bullets in pixels.\r\n *\r\n * If bullet is closer, it will be skipped and not shown.\r\n *\r\n * This allows to avoid crammed up graphs wil a lot of bullets.\r\n *\r\n * @default 0\r\n * @param value Distance (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"minBulletDistance\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Series.prototype, \"bullets\", {\n /**\r\n * A list of bullets that will be added to each and every items in the\r\n * series.\r\n *\r\n * You can push any object that is a descendant of a [[Sprite]] here. All\r\n * items added to this list will be copied and used as a bullet on all data\r\n * items, including their properties, events, etc.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/bullets/} for more info about the concept of Bullets\r\n * @return List of bullets.\r\n */\n get: function get() {\n if (!this._bullets) {\n this._bullets = new ListTemplate(new Bullet());\n this._bullets.template.virtualParent = this;\n this._bullets.events.on(\"inserted\", this.processBullet, this, false);\n this._bullets.events.on(\"removed\", this.removeBullet, this, false);\n this._disposers.push(new ListDisposer(this._bullets));\n this._disposers.push(this._bullets.template);\n }\n return this._bullets;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Binds related legend data item's visual settings to this series' visual\r\n * settings.\r\n *\r\n * @ignore Exclude from docs\r\n * @param marker Legend item container\r\n */\n Series.prototype.createLegendMarker = function (marker) {\n // This is a placeholder method for extending classes to override.\n };\n Object.defineProperty(Series.prototype, \"hiddenInLegend\", {\n /**\r\n * @return Hidden in legend?\r\n */\n get: function get() {\n return this.getPropertyValue(\"hiddenInLegend\");\n },\n /**\r\n * Should the series be hidden in legend?\r\n *\r\n * @param value Hidden in legend?\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"hiddenInLegend\", value)) {\n if (this.chart) {\n this.chart.feedLegend();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Series.prototype, \"name\", {\n /**\r\n * @return Name\r\n */\n get: function get() {\n return this.getPropertyValue(\"name\");\n },\n /**\r\n * Series' name.\r\n *\r\n * @param value Name\r\n */\n set: function set(value) {\n this.setPropertyValue(\"name\", value);\n var legendDataItem = this.legendDataItem;\n if (legendDataItem) {\n legendDataItem.component.invalidate();\n legendDataItem.component.invalidateRawData();\n }\n this.readerTitle = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Series.prototype, \"itemReaderText\", {\n /**\r\n * @return Screen reader text template\r\n */\n get: function get() {\n // Get explicitly set reader text\n var readerText = this._itemReaderText;\n // Not set? Let's try something else\n if (!readerText) {\n // Tooltip text?\n if (this.tooltipText) {\n readerText = $utils.plainText(this.tooltipText);\n } else if (this.tooltipHTML) {\n readerText = $utils.plainText(this.tooltipHTML);\n }\n }\n return this.adapter.apply(\"itemReaderText\", readerText);\n },\n /**\r\n * Screen reader text to be applied to each individual data item, such\r\n * as bullets, columns or slices.\r\n *\r\n * The template can contain field reference meta codes, i.e. `{dateX}`,\r\n * `{valueY}`, etc.\r\n *\r\n * Any text formatting options, e.g. `[bold]` will be ignored.\r\n *\r\n * @param value Screen reader text template\r\n */\n set: function set(value) {\n this._itemReaderText = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns if number of data items in the series are beyond non-focusable\r\n * count and should not be available for TAB-through.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Items focusable?\r\n */\n Series.prototype.itemsFocusable = function () {\n return this.dataItems.length >= this.skipFocusThreshold ? false : true;\n };\n Object.defineProperty(Series.prototype, \"legendDataItem\", {\n /**\r\n * @return Data item\r\n */\n get: function get() {\n return this._legendDataItem;\n },\n /**\r\n * Legend data item that corresponds to this series.\r\n *\r\n * @param value Data item\r\n */\n set: function set(value) {\n this._legendDataItem = value;\n this._legendDataItem.itemContainer.deepInvalidate();\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Updates corresponding legend data item with current values.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n Series.prototype.updateLegendValue = function (dataItem) {\n // if this series has legend item\n if (this.legendDataItem) {\n var legendSettings = this.legendSettings;\n var legendDataItem = this.legendDataItem;\n var label = legendDataItem.label;\n var valueLabel = legendDataItem.valueLabel;\n // update legend\n if (dataItem) {\n if (valueLabel) {\n if (legendSettings.itemValueText) {\n valueLabel.text = legendSettings.itemValueText;\n }\n valueLabel.dataItem = dataItem;\n }\n if (label) {\n if (legendSettings.itemLabelText) {\n label.text = legendSettings.itemLabelText;\n }\n label.dataItem = dataItem;\n }\n } else {\n if (label) {\n // if itemLabelText is set, means we have to reset label even if labelText is not set\n if (legendSettings.labelText || legendSettings.itemLabelText != undefined) {\n label.text = legendSettings.labelText;\n }\n label.dataItem = this.dataItem;\n }\n if (valueLabel) {\n if (legendSettings.valueText || legendSettings.itemValueText != undefined) {\n valueLabel.text = legendSettings.valueText;\n }\n valueLabel.dataItem = this.dataItem;\n }\n }\n }\n };\n /**\r\n * Copies all properties from another instance of [[Series]].\r\n *\r\n * @param source Source series\r\n */\n Series.prototype.copyFrom = function (source) {\n this.bullets.copyFrom(source.bullets);\n this.bulletsContainer.copyFrom(source.bulletsContainer);\n this.calculatePercent = source.calculatePercent;\n this.simplifiedProcessing = source.simplifiedProcessing;\n _super.prototype.copyFrom.call(this, source);\n };\n /**\r\n * Displays a modal or console message with error, and halts any further\r\n * processing of this element.\r\n *\r\n * @param e Error\r\n */\n Series.prototype.raiseCriticalError = function (e) {\n this._chart.modal.content = this._chart.adapter.apply(\"criticalError\", e).message;\n this._chart.modal.closable = false;\n this._chart.modal.open();\n this._chart.disabled = true;\n if (options.verbose) {\n console.log(e);\n }\n };\n /**\r\n * Applies filters to the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Series.prototype.applyFilters = function () {\n var _this = this;\n _super.prototype.applyFilters.call(this);\n this.bulletsContainer.filters.clear();\n // copyFrom of a list copies, does not clone\n $iter.each(this.filters.iterator(), function (filter) {\n _this.bulletsContainer.filters.push(filter.clone());\n });\n };\n Object.defineProperty(Series.prototype, \"heatRules\", {\n /**\r\n * @todo Description\r\n */\n get: function get() {\n var _this = this;\n if (!this._heatRules) {\n this._heatRules = new List();\n this._heatRules.events.on(\"inserted\", function (event) {\n var heatRule = event.newValue;\n var target = heatRule.target;\n if (target) {\n var dataField_1 = heatRule.dataField;\n if (!$type.hasValue(dataField_1)) {\n dataField_1 = \"value\";\n }\n var min_1 = heatRule.min;\n var max_1 = heatRule.max;\n var seriesDataItem_1 = _this.dataItem;\n var property_1 = heatRule.property;\n var minValue = $type.toNumber(heatRule.minValue);\n var maxValue = $type.toNumber(heatRule.maxValue);\n if (!$type.isNumber(minValue) && !$type.isNumber(maxValue)) {\n _this.dataItem.events.on(\"calculatedvaluechanged\", function (event) {\n if (event.property == dataField_1) {\n $iter.each(_this.dataItems.iterator(), function (dataItem) {\n var foundSprite = false;\n $array.each(dataItem.sprites, function (sprite) {\n if (sprite.clonedFrom == target) {\n var anySprite = sprite;\n anySprite[property_1] = anySprite[property_1];\n foundSprite = true;\n }\n });\n if (!foundSprite) {\n $array.each(dataItem.sprites, function (sprite) {\n if (sprite instanceof Container) {\n $iter.each(sprite.children.iterator(), function (child) {\n if (child.className == target.className) {\n var anyChild = child;\n anyChild[property_1] = anyChild[property_1];\n }\n // giveup here\n else if (child instanceof Container) {\n child.deepInvalidate();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n _this.dataItems.template.events.on(\"workingvaluechanged\", function (event) {\n if (event.property == dataField_1) {\n var dataItem = event.target;\n var foundSprite_1 = false;\n $array.each(dataItem.sprites, function (sprite) {\n if (sprite.clonedFrom == target) {\n var anySprite = sprite;\n anySprite[property_1] = anySprite[property_1];\n foundSprite_1 = true;\n }\n });\n if (!foundSprite_1) {\n $array.each(dataItem.sprites, function (sprite) {\n if (sprite instanceof Container) {\n $iter.each(sprite.children.iterator(), function (child) {\n if (child.className == target.className) {\n var anyChild = child;\n anyChild[property_1] = anyChild[property_1];\n }\n // givup here\n else if (child instanceof Container) {\n child.deepInvalidate();\n }\n });\n }\n });\n }\n }\n });\n target.adapter.add(property_1, function (value, ruleTarget, property) {\n var minValue = $type.toNumber(heatRule.minValue);\n var maxValue = $type.toNumber(heatRule.maxValue);\n if (ruleTarget instanceof Sprite) {\n var anySprite = ruleTarget;\n var propertyField = anySprite.propertyFields[property];\n if (propertyField && ruleTarget.dataItem) {\n var dataContext = ruleTarget.dataItem.dataContext;\n if (dataContext && $type.hasValue(dataContext[propertyField])) {\n return value;\n }\n }\n }\n var dataItem = ruleTarget.dataItem;\n if (!$type.isNumber(minValue)) {\n minValue = seriesDataItem_1.values[dataField_1].low;\n }\n if (!$type.isNumber(maxValue)) {\n maxValue = seriesDataItem_1.values[dataField_1].high;\n }\n if (dataItem) {\n var fieldValues = dataItem.values[dataField_1];\n if (fieldValues) {\n var workingValue = dataItem.getActualWorkingValue(dataField_1);\n if ($type.hasValue(min_1) && $type.hasValue(max_1) && $type.isNumber(minValue) && $type.isNumber(maxValue) && $type.isNumber(workingValue)) {\n var percent = (workingValue - minValue) / (maxValue - minValue);\n if ($type.isNumber(workingValue) && !$type.isNumber(percent)) {\n percent = 0.5;\n }\n // fixes problems if all values are the same\n if ($type.isNumber(min_1)) {\n return min_1 + (max_1 - min_1) * percent;\n } else if (min_1 instanceof Color) {\n return new Color($colors.interpolate(min_1.rgb, max_1.rgb, percent));\n }\n }\n }\n }\n return value;\n });\n }\n });\n }\n return this._heatRules;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n Series.prototype.processConfig = function (config) {\n var heatRules;\n if (config) {\n // Set up bullets\n if ($type.hasValue(config.bullets) && $type.isArray(config.bullets)) {\n for (var i = 0, len = config.bullets.length; i < len; i++) {\n var bullets = config.bullets[i];\n if (!$type.hasValue(bullets.type)) {\n bullets.type = \"Bullet\";\n }\n }\n }\n // Let's take heatRules out of the config, so that we can process\n // them later, when bullets are already there\n if ($type.hasValue(config.heatRules) && $type.isArray(config.heatRules)) {\n heatRules = config.heatRules;\n delete config.heatRules;\n }\n }\n _super.prototype.processConfig.call(this, config);\n // Process heat rules again, when all other elements are ready\n if (heatRules) {\n for (var i = 0, len = heatRules.length; i < len; i++) {\n var rule = heatRules[i];\n // Resolve target\n var target = this;\n if ($type.hasValue(rule.target) && $type.isString(rule.target)) {\n // Check if we can find this element by id\n if (this.map.hasKey(rule.target)) {\n target = this.map.getKey(rule.target);\n } else {\n var parts = rule.target.split(\".\");\n for (var x = 0; x < parts.length; x++) {\n if (target instanceof List) {\n var listitem = target.getIndex($type.toNumber(parts[x]));\n if (!listitem) {\n target = target[parts[x]];\n } else {\n target = listitem;\n }\n } else {\n target = target[parts[x]];\n }\n }\n }\n }\n rule.target = target;\n // Resolve colors and percents\n if ($type.hasValue(rule.min)) {\n rule.min = this.maybeColorOrPercent(rule.min);\n }\n if ($type.hasValue(rule.max)) {\n rule.max = this.maybeColorOrPercent(rule.max);\n }\n }\n _super.prototype.processConfig.call(this, {\n heatRules: heatRules\n });\n }\n };\n /**\r\n * Returns visibility value\r\n * @ignore\r\n */\n /*\r\n protected getVisibility(): boolean {\r\n let hidden = this.getPropertyValue(\"hidden\");\r\n if (hidden) {\r\n return false;\r\n }\r\n else {\r\n return super.getVisibility();\r\n }\r\n }*/\n /**\r\n * This function is used to sort element's JSON config properties, so that\r\n * some properties that absolutely need to be processed last, can be put at\r\n * the end.\r\n *\r\n * @ignore Exclude from docs\r\n * @param a Element 1\r\n * @param b Element 2\r\n * @return Sorting number\r\n */\n Series.prototype.configOrder = function (a, b) {\n if (a == b) {\n return 0;\n }\n // Must come last\n else if (a == \"heatRules\") {\n return 1;\n } else if (b == \"heatRules\") {\n return -1;\n } else {\n return _super.prototype.configOrder.call(this, a, b);\n }\n };\n /**\r\n * Sets `visibility` property:\r\n *\r\n * * `true` - visible\r\n * * `false` - hidden\r\n *\r\n * @param value true - visible, false - hidden\r\n * @return Current visibility\r\n */\n Series.prototype.setVisibility = function (value) {\n _super.prototype.setVisibility.call(this, value);\n this.bulletsContainer.visible = value;\n };\n return Series;\n}(Component);\nexport { Series };\n/**\r\n * Register class, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Series\"] = Series;\nregistry.registeredClasses[\"SeriesDataItem\"] = SeriesDataItem;","/**\r\n * Serial chart module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Chart, ChartDataItem } from \"../Chart\";\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\nimport { Container } from \"../../core/Container\";\nimport { Series } from \"../series/Series\";\nimport { percent } from \"../../core/utils/Percent\";\nimport { ColorSet } from \"../../core/utils/ColorSet\";\nimport { registry } from \"../../core/Registry\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $type from \"../../core/utils/Type\";\nimport { Disposer } from \"../../core/utils/Disposer\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[SerialChart]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar SerialChartDataItem = /** @class */function (_super) {\n tslib_1.__extends(SerialChartDataItem, _super);\n /**\r\n * Constructor\r\n */\n function SerialChartDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"SerialChartDataItem\";\n _this.applyTheme();\n return _this;\n }\n return SerialChartDataItem;\n}(ChartDataItem);\nexport { SerialChartDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A base class for all series-based charts, like XY, Pie, etc.\r\n *\r\n * Is not useful on its own.\r\n *\r\n * @see {@link ISerialChartEvents} for a list of available Events\r\n * @see {@link ISerialChartAdapters} for a list of available Adapters\r\n */\nvar SerialChart = /** @class */function (_super) {\n tslib_1.__extends(SerialChart, _super);\n /**\r\n * Constructor\r\n */\n function SerialChart() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"SerialChart\";\n _this.colors = new ColorSet();\n // Create a container for series\n var seriesContainer = _this.chartContainer.createChild(Container);\n seriesContainer.shouldClone = false;\n seriesContainer.width = percent(100);\n seriesContainer.height = percent(100);\n seriesContainer.isMeasured = false;\n seriesContainer.layout = \"none\";\n seriesContainer.zIndex = 2;\n _this.seriesContainer = seriesContainer;\n // Create a container for bullets\n var bulletsContainer = _this.chartContainer.createChild(Container);\n bulletsContainer.shouldClone = false;\n bulletsContainer.width = percent(100);\n bulletsContainer.height = percent(100);\n bulletsContainer.isMeasured = false;\n bulletsContainer.zIndex = 3;\n bulletsContainer.layout = \"none\";\n _this.bulletsContainer = bulletsContainer;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n SerialChart.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n if (this.colors) {\n this.colors.dispose();\n }\n };\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor\r\n */\n SerialChart.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n // Add a default screen reader title for accessibility\n // This will be overridden in screen reader if there are any `titles` set\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Serial chart\");\n }\n };\n Object.defineProperty(SerialChart.prototype, \"series\", {\n /**\r\n * A list of chart's series.\r\n *\r\n * @return Chart's series\r\n */\n get: function get() {\n var _this = this;\n if (!this._series) {\n this._series = new ListTemplate(this.createSeries());\n this._series.events.on(\"inserted\", function (event) {\n _this.handleSeriesAdded(event);\n }, undefined, false);\n this._series.events.on(\"removed\", function (event) {\n var series = event.oldValue;\n _this.dataUsers.removeValue(series);\n _this.dataUsers.each(function (dataUser) {\n dataUser.invalidateDataItems();\n });\n if (series.autoDispose) {\n series.dispose();\n }\n _this.feedLegend();\n }, undefined, false);\n this._disposers.push(new ListDisposer(this._series));\n this._disposers.push(this._series.template);\n }\n return this._series;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Decorates a new [[Series]] object with required parameters when it is\r\n * added to the chart.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\n SerialChart.prototype.handleSeriesAdded = function (event) {\n var _this = this;\n var series = event.newValue;\n if (series.isDisposed()) {\n return;\n }\n series.chart = this;\n series.parent = this.seriesContainer;\n series.bulletsContainer.parent = this.bulletsContainer;\n this._dataUsers.moveValue(series);\n series.addDisposer(new Disposer(function () {\n _this.dataUsers.removeValue(series);\n }));\n this.feedLegend();\n };\n /**\r\n * Setups the legend to use the chart's data.\r\n * @ignore\r\n */\n SerialChart.prototype.feedLegend = function () {\n var legend = this.legend;\n if (legend) {\n var legendData_1 = [];\n $iter.each(this.series.iterator(), function (series) {\n if (!series.hiddenInLegend) {\n legendData_1.push(series);\n }\n });\n legend.dataFields.name = \"name\";\n legend.data = legendData_1;\n }\n };\n /**\r\n * Creates and returns a new Series, suitable for this chart type.\r\n *\r\n * @return New series\r\n */\n SerialChart.prototype.createSeries = function () {\n return new Series();\n };\n Object.defineProperty(SerialChart.prototype, \"colors\", {\n /**\r\n * @return Color list\r\n */\n get: function get() {\n return this.getPropertyValue(\"colors\");\n },\n /**\r\n * Chart's color list.\r\n *\r\n * This list can be used by a number of serial items, like applying a new\r\n * color for each Series added. Or, applying a new color for each slice\r\n * of a Pie chart.\r\n *\r\n * Please see [[ColorSet]] for information on how you can set up to generate\r\n * unique colors.\r\n *\r\n * A theme you are using may override default pre-defined colors.\r\n *\r\n * @param value Color list\r\n */\n set: function set(value) {\n this.setPropertyValue(\"colors\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies all parameters from another [[SerialChart]].\r\n *\r\n * @param source Source SerialChart\r\n */\n SerialChart.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.series.copyFrom(source.series);\n };\n return SerialChart;\n}(Chart);\nexport { SerialChart };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"SerialChart\"] = SerialChart;","/**\r\n * Axis break module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../../core/Container\";\nimport { MutableValueDisposer } from \"../../core/utils/Disposer\";\nimport { WavedLine } from \"../../core/elements/WavedLine\";\nimport { List } from \"../../core/utils/List\";\nimport { registry } from \"../../core/Registry\";\nimport { color } from \"../../core/utils/Color\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Base class to define \"breaks\" on axes.\r\n *\r\n * @see {@link IAxisBreakEvents} for a list of available events\r\n * @see {@link IAxisBreakAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar AxisBreak = /** @class */function (_super) {\n tslib_1.__extends(AxisBreak, _super);\n /**\r\n * Constructor\r\n */\n function AxisBreak() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * Reference to parent Axis.\r\n */\n _this._axis = new MutableValueDisposer();\n /**\r\n * A list of axis data items which fall within this break.\r\n */\n _this.dataItems = new List();\n _this.className = \"AxisBreak\";\n // Set defaults\n _this.breakSize = 0.01;\n _this.marginLeft = -5;\n _this.marginRight = -5;\n _this.marginTop = -5;\n _this.marginBottom = -5;\n var interfaceColors = new InterfaceColorSet();\n // Create elements\n // (these won't be used actually, just for setting properties)\n var fillShape = new WavedLine();\n fillShape.fill = interfaceColors.getFor(\"background\");\n fillShape.stroke = color();\n fillShape.fillOpacity = 0.9;\n fillShape.zIndex = 0;\n _this._fillShape = fillShape;\n var startLine = new WavedLine();\n startLine.fill = color();\n startLine.stroke = interfaceColors.getFor(\"grid\");\n startLine.strokeOpacity = 0.3;\n startLine.zIndex = 1;\n _this._startLine = startLine;\n var endLine = new WavedLine();\n endLine.fill = color();\n endLine.stroke = color(\"#000000\"); // interfaceColors.getFor(\"grid\");\n endLine.strokeOpacity = 0.3;\n endLine.zIndex = 2;\n _this._endLine = endLine;\n _this._disposers.push(_this._axis);\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n AxisBreak.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n if (this._fillShape) {\n this._fillShape.dispose();\n }\n if (this._startLine) {\n this._startLine.dispose();\n }\n if (this._endLine) {\n this._endLine.dispose();\n }\n };\n Object.defineProperty(AxisBreak.prototype, \"startLine\", {\n /**\r\n * @return Element\r\n */\n get: function get() {\n return this._startLine;\n },\n /**\r\n * An element used for the starting line of the break.\r\n *\r\n * @param sprite Element\r\n */\n set: function set(sprite) {\n if (this._startLine) {\n this._startLine.dispose();\n }\n this._startLine = sprite;\n this.addBreakSprite(sprite);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisBreak.prototype, \"endLine\", {\n /**\r\n * @return Element\r\n */\n get: function get() {\n return this._endLine;\n },\n /**\r\n * An element used for the end line of the break.\r\n *\r\n * @param sprite Element\r\n */\n set: function set(sprite) {\n if (this._endLine) {\n this._endLine.dispose();\n }\n this._endLine = sprite;\n this.addBreakSprite(sprite);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisBreak.prototype, \"fillShape\", {\n /**\r\n * @return Element\r\n */\n get: function get() {\n return this._fillShape;\n },\n /**\r\n * An element used for fill of the break.\r\n *\r\n * @param sprite Element\r\n */\n set: function set(sprite) {\n if (this._fillShape) {\n this._fillShape.dispose();\n }\n this._fillShape = sprite;\n this.addBreakSprite(sprite);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Adds a break element (e.g. lines, fill) to the break, which is\r\n * [[Container]].\r\n *\r\n * @ignore Exclude from docs\r\n * @param sprite Element to add\r\n */\n AxisBreak.prototype.addBreakSprite = function (sprite) {\n sprite.parent = this;\n sprite.isMeasured = false;\n this._disposers.push(sprite);\n };\n Object.defineProperty(AxisBreak.prototype, \"axis\", {\n /**\r\n * @return Axis\r\n */\n get: function get() {\n return this._axis.get();\n },\n /**\r\n * An Axis this Break is associated with.\r\n *\r\n * @param axis Axis\r\n */\n set: function set(axis) {\n if (this._axis.get() !== axis) {\n this._axis.set(axis, axis.renderer.gridContainer.events.on(\"transformed\", this.invalidate, this, false));\n axis.renderer.createBreakSprites(this);\n // this can't go to copyFrom, as axis is set later\n var breakTemplate = axis.axisBreaks.template;\n this.startLine.copyFrom(breakTemplate.startLine);\n this.endLine.copyFrom(breakTemplate.endLine);\n this.fillShape.copyFrom(breakTemplate.fillShape);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisBreak.prototype, \"breakSize\", {\n /**\r\n * @return Relative axis break\r\n */\n get: function get() {\n return this.getPropertyValue(\"breakSize\");\n },\n /**\r\n * A size of the break relative to the actual size of the scope break spans.\r\n *\r\n * For example, if `breakSize = 0.1` and unbroken scope of balues it spans\r\n * would be 100 pixels, the break would be 10 pixels wide.\r\n *\r\n * 0 means the break will completely collapse and hide the values.\r\n * 1 means break would be not collapse at all, which would make it\r\n * effectively useless.\r\n *\r\n * @default 0.01\r\n * @param value Relative axis break\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"breakSize\", value)) {\n if (this.axis) {\n this.axis.invalidate();\n this.axis.invalidateSeries();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisBreak.prototype, \"startPoint\", {\n /**\r\n * Returns pixel coordinates of axis break's start.\r\n *\r\n * @return Start point\r\n */\n get: function get() {\n var renderer = this.axis.renderer;\n if (renderer) {\n return renderer.positionToPoint(this.startPosition);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisBreak.prototype, \"endPoint\", {\n /**\r\n * Returns pixel coordinates of axis break's end.\r\n *\r\n * @return End point\r\n */\n get: function get() {\n var renderer = this.axis.renderer;\n if (renderer) {\n return renderer.positionToPoint(this.endPosition);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisBreak.prototype, \"startPosition\", {\n /**\r\n * Returns a relative position at which axis break starts.\r\n *\r\n * This is a calculated position, meaning it shows relative position of the\r\n * break after break is applied.\r\n *\r\n * @return Start position\r\n */\n get: function get() {\n return;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisBreak.prototype, \"endPosition\", {\n /**\r\n * Returns a relative position at which axis break ends.\r\n *\r\n * This is a calculated position, meaning it shows relative position of the\r\n * break after break is applied.\r\n *\r\n * @return End position\r\n */\n get: function get() {\n return;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Draws the axis break.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisBreak.prototype.draw = function () {\n _super.prototype.draw.call(this);\n if (this.axis) {\n var renderer = this.axis.renderer;\n renderer.updateBreakElement(this);\n }\n };\n Object.defineProperty(AxisBreak.prototype, \"startValue\", {\n /**\r\n * @return Starting value\r\n */\n get: function get() {\n return this.getPropertyValue(\"startValue\");\n },\n /**\r\n * A starting value for the break.\r\n *\r\n * @param value Starting value\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"startValue\", value)) {\n if (this.axis) {\n this.axis.invalidate();\n this.axis.invalidateSeries();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisBreak.prototype, \"endValue\", {\n /**\r\n * @return End value\r\n */\n get: function get() {\n return this.getPropertyValue(\"endValue\");\n },\n /**\r\n * An end value for the break.\r\n *\r\n * @param value End value\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"endValue\", value)) {\n if (this.axis) {\n this.axis.invalidate();\n this.axis.invalidateSeries();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n return AxisBreak;\n}(Container);\nexport { AxisBreak };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"AxisBreak\"] = AxisBreak;","/**\r\n * Base class for all Axis\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Component } from \"../../core/Component\";\nimport { Container } from \"../../core/Container\";\nimport { DataItem } from \"../../core/DataItem\";\nimport { AxisBreak } from \"./AxisBreak\";\nimport { Label } from \"../../core/elements/Label\";\nimport { Tooltip } from \"../../core/elements/Tooltip\";\nimport { SortedListTemplate } from \"../../core/utils/SortedList\";\nimport { List, ListTemplate, ListDisposer } from \"../../core/utils/List\";\nimport { Disposer, MultiDisposer } from \"../../core/utils/Disposer\";\nimport { registry } from \"../../core/Registry\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $number from \"../../core/utils/Number\";\nimport * as $array from \"../../core/utils/Array\";\nimport * as $type from \"../../core/utils/Type\";\nimport { defaultRules, ResponsiveBreakpoints } from \"../../core/utils/Responsive\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[Axis]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar AxisDataItem = /** @class */function (_super) {\n tslib_1.__extends(AxisDataItem, _super);\n /**\r\n * Constructor\r\n */\n function AxisDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"AxisDataItem\";\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(AxisDataItem.prototype, \"grid\", {\n /**\r\n * @return Grid element\r\n */\n get: function get() {\n if (!this._grid) {\n var component_1 = this.component;\n if (component_1) {\n var template = void 0;\n var grid_1;\n if (this.isRange) {\n template = component_1.axisRanges.template.grid;\n if (template.disabled) {\n return;\n } else {\n grid_1 = template.clone();\n }\n } else {\n template = component_1.renderer.grid.template;\n if (template.disabled) {\n return;\n } else {\n grid_1 = component_1.renderer.grid.create();\n this._disposers.push(new Disposer(function () {\n component_1.renderer.grid.removeValue(grid_1);\n }));\n }\n }\n this.grid = grid_1;\n grid_1.shouldClone = false;\n this._disposers.push(grid_1);\n grid_1.axis = this.component;\n }\n }\n return this._grid;\n },\n /**\r\n * A [[Grid]] element associated with this data item.\r\n *\r\n * If there is no grid element associated with data item, a new one is\r\n * created and returned.\r\n *\r\n * @param grid Grid element\r\n */\n set: function set(grid) {\n if (this._grid && this._grid != grid) {\n $array.remove(this.sprites, this._grid);\n this._grid.dataItem = undefined;\n }\n if (grid) {\n if (grid.dataItem && grid.dataItem != this) {\n $array.remove(grid.dataItem.sprites, grid);\n grid.dataItem.grid = undefined;\n }\n this.addSprite(grid);\n }\n this._grid = grid;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisDataItem.prototype, \"tick\", {\n /**\r\n * @return Tick element\r\n */\n get: function get() {\n if (!this._tick) {\n var component_2 = this.component;\n if (component_2) {\n var template = void 0;\n var tick_1;\n if (this.isRange) {\n template = component_2.axisRanges.template.tick;\n if (template.disabled) {\n return;\n } else {\n tick_1 = template.clone();\n }\n } else {\n template = component_2.renderer.ticks.template;\n if (template.disabled) {\n return;\n } else {\n tick_1 = component_2.renderer.ticks.create();\n this._disposers.push(new Disposer(function () {\n component_2.renderer.ticks.removeValue(tick_1);\n }));\n }\n }\n this.tick = tick_1;\n tick_1.axis = this.component;\n tick_1.shouldClone = false;\n this._disposers.push(tick_1);\n }\n }\n return this._tick;\n },\n /**\r\n * An [[AxisTick]] element associated with this data item.\r\n *\r\n * If there is no tick element associated with data item, a new one is\r\n * created and returned.\r\n *\r\n * @param tick Tick element\r\n */\n set: function set(tick) {\n if (this._tick && this._tick != tick) {\n $array.remove(this.sprites, this._tick);\n this._tick.dataItem = undefined;\n }\n if (tick) {\n if (tick.dataItem && tick.dataItem != this) {\n $array.remove(tick.dataItem.sprites, tick);\n tick.dataItem.tick = undefined;\n }\n this.addSprite(tick);\n }\n this._tick = tick;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisDataItem.prototype, \"label\", {\n /**\r\n * @return Label element\r\n */\n get: function get() {\n if (!this._label) {\n var component_3 = this.component;\n if (component_3) {\n var template = void 0;\n var label_1;\n if (this.isRange) {\n template = component_3.axisRanges.template.label;\n if (template.disabled) {\n return;\n } else {\n label_1 = template.clone();\n }\n } else {\n template = component_3.renderer.labels.template;\n if (template.disabled) {\n return;\n } else {\n label_1 = component_3.renderer.labels.create();\n this._disposers.push(new Disposer(function () {\n component_3.renderer.labels.removeValue(label_1);\n }));\n }\n }\n this._disposers.push(label_1);\n this.label = label_1;\n label_1.shouldClone = false;\n label_1.axis = this.component;\n label_1.virtualParent = component_3;\n }\n }\n return this._label;\n },\n /**\r\n * An [[AxisLabel]] element associated with this data item.\r\n *\r\n * If there is no label element associated with data item, a new one is\r\n * created and returned.\r\n *\r\n * @param label Label element\r\n */\n set: function set(label) {\n if (this._label && this._label != label) {\n $array.remove(this.sprites, this._label);\n this._label.dataItem = undefined;\n }\n if (label) {\n if (label.dataItem && label.dataItem != this) {\n $array.remove(label.dataItem.sprites, label);\n label.dataItem.label = undefined;\n }\n this.addSprite(label);\n }\n this._label = label;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisDataItem.prototype, \"axisFill\", {\n /**\r\n * @return Label element\r\n */\n get: function get() {\n if (!this._axisFill) {\n var component_4 = this.component;\n if (component_4) {\n var template = void 0;\n var axisFill_1;\n if (this.isRange) {\n template = component_4.axisRanges.template.axisFill;\n if (!this.isTemplate && template.disabled) {\n return;\n } else {\n axisFill_1 = template.clone();\n }\n } else {\n template = component_4.renderer.axisFills.template;\n if (template.disabled) {\n return;\n } else {\n axisFill_1 = component_4.renderer.axisFills.create();\n this._disposers.push(new Disposer(function () {\n component_4.renderer.axisFills.removeValue(axisFill_1);\n }));\n }\n }\n this.axisFill = axisFill_1;\n axisFill_1.shouldClone = false;\n this._disposers.push(axisFill_1);\n }\n }\n return this._axisFill;\n },\n /**\r\n * An [[AxisFill]] associated element with this data item.\r\n *\r\n * If there is no fill element associated with data item, a new one is\r\n * created and returned.\r\n *\r\n * @param label Label element\r\n */\n set: function set(axisFill) {\n if (this._axisFill && this._axisFill != axisFill) {\n $array.remove(this.sprites, this._axisFill);\n this._axisFill.dataItem = undefined;\n }\n if (axisFill) {\n if (axisFill.dataItem && axisFill.dataItem != this) {\n $array.remove(axisFill.dataItem.sprites, axisFill);\n axisFill.dataItem.axisFill = undefined;\n }\n axisFill.axis = this.component;\n this.addSprite(axisFill);\n }\n this._axisFill = axisFill;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisDataItem.prototype, \"text\", {\n /**\r\n * @return Text label\r\n */\n get: function get() {\n return this._text;\n },\n /**\r\n * Text to be used as data item's label.\r\n *\r\n * @param text Text label\r\n */\n set: function set(text) {\n this._text = text;\n if (this._label) {\n // do not use getter, it will create unwanted instances!\n this._label.text = text;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisDataItem.prototype, \"mask\", {\n /**\r\n * Data item's mask.\r\n *\r\n * @return Mask\r\n */\n get: function get() {\n return this._mask;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisDataItem.prototype, \"contents\", {\n /**\r\n * Returns a [[Container]] to place all visual elements, related to data item\r\n * in.\r\n *\r\n * If there is no Container, a new one is created.\r\n *\r\n * @return Contents container\r\n */\n get: function get() {\n if (!this._contents) {\n var contents = new Container();\n this.addSprite(contents);\n contents.isMeasured = false;\n this._contents = contents;\n var component = this.component;\n if (component) {\n var mask = component.renderer.createFill(this.component);\n mask.disabled = false;\n mask.axis = component;\n this.addSprite(mask);\n this._mask = mask;\n contents.mask = mask;\n }\n }\n return this._contents;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisDataItem.prototype, \"axisBreak\", {\n /**\r\n * @return Axis break\r\n */\n get: function get() {\n return this._axisBreak;\n },\n /**\r\n * An [[AxisBreak]] this data item falls within.\r\n *\r\n * @param axisBreak Axis break\r\n */\n set: function set(axisBreak) {\n if (this._axisBreak) {\n this._axisBreak.dataItems.removeValue(this);\n }\n if (axisBreak) {\n axisBreak.dataItems.push(this);\n }\n this._axisBreak = axisBreak;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Re-draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisDataItem.prototype.validate = function () {\n if (this.component) {\n this.component.validateDataElement(this);\n }\n };\n /**\r\n * Appends data item's elements to the parent [[Container]].\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisDataItem.prototype.appendChildren = function () {\n if (this.component) {\n this.component.appendDataItem(this);\n }\n };\n /**\r\n * Ordering function used in JSON setup.\r\n *\r\n * @param a Item A\r\n * @param b Item B\r\n * @return Order\r\n */\n AxisDataItem.prototype.configOrder = function (a, b) {\n if (a == b) {\n return 0;\n } else if (a == \"language\") {\n return -1;\n } else if (b == \"language\") {\n return 1;\n } else if (a == \"component\") {\n return -1;\n } else if (b == \"component\") {\n return 1;\n } else {\n return 0;\n }\n };\n /**\r\n * Checks if data item has particular property set.\r\n *\r\n * @param prop Property name\r\n * @return Property set?\r\n */\n AxisDataItem.prototype.hasProperty = function (prop) {\n return prop == \"component\" ? true : _super.prototype.hasProperty.call(this, prop);\n };\n /**\r\n * Copies all parameters from another [[AxisDataItem]].\r\n *\r\n * @param source Source AxisDataItem\r\n */\n AxisDataItem.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.text = source.text;\n };\n return AxisDataItem;\n}(DataItem);\nexport { AxisDataItem };\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines named positions for data item's location within [[Axis]].\r\n */\nexport var AxisItemLocation;\n(function (AxisItemLocation) {\n AxisItemLocation[AxisItemLocation[\"Start\"] = 0] = \"Start\";\n AxisItemLocation[AxisItemLocation[\"Middle\"] = 0.5] = \"Middle\";\n AxisItemLocation[AxisItemLocation[\"End\"] = 1] = \"End\";\n})(AxisItemLocation || (AxisItemLocation = {}));\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A base class for all Axis elements.\r\n *\r\n * @see {@link IAxisEvents} for a list of available Events\r\n * @see {@link IAxisAdapters} for a list of available Adapters\r\n */\nvar Axis = /** @class */function (_super) {\n tslib_1.__extends(Axis, _super);\n /**\r\n * Constructor\r\n */\n function Axis() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * Number of Grid elements on the axis.\r\n */\n _this._gridCount = 10;\n /**\r\n * A list of [[XYSeries]] that are using this Axis.\r\n */\n _this._series = new List();\n /**\r\n * Specifies if axis should be automatically disposed when removing from\r\n * chart's axis list.\r\n *\r\n * @default true\r\n */\n _this.autoDispose = true;\n if (_this.constructor === Axis) {\n throw new Error(\"'Axis' cannot be instantiated directly. Please use a specific axis type.\");\n }\n _this.className = \"Axis\";\n _this.shouldClone = false;\n _this.setPropertyValue(\"cursorTooltipEnabled\", true);\n var interfaceColors = new InterfaceColorSet();\n // Create title\n _this.title = new Label();\n _this.title.shouldClone = false;\n _this._disposers.push(_this.title);\n _this.setPropertyValue(\"startLocation\", 0);\n _this.setPropertyValue(\"endLocation\", 1);\n // Data item iterator\n _this._dataItemsIterator = new $iter.ListIterator(_this.dataItems, function () {\n return _this.dataItems.create();\n });\n _this._dataItemsIterator.createNewItems = true;\n // Create tooltip\n var tooltip = new Tooltip();\n _this._disposers.push(tooltip);\n tooltip.label.padding(5, 10, 5, 10);\n tooltip.background.pointerLength = 5;\n tooltip.fitPointerToBounds = true;\n tooltip.background.filters.clear();\n // Set virtual parentfor the tooltip so that it can properly inheirt\n // formatters from the axis.\n tooltip.virtualParent = _this;\n // Create background element for the tooltip\n var background = tooltip.background;\n background.cornerRadius = 0;\n background.fill = interfaceColors.getFor(\"alternativeBackground\");\n background.stroke = background.fill;\n background.strokeWidth = 1;\n background.fillOpacity = 1;\n tooltip.label.fill = interfaceColors.getFor(\"alternativeText\");\n _this.tooltip = tooltip;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Holds reference to a function that accepts a DataItem and its index as\r\n * parameters.\r\n *\r\n * It can either return a fill opacity for a fill, or manipulate data item\r\n * directly, to create various highlighting scenarios.\r\n *\r\n * For example, you can set it up to highlight only weekends on a\r\n * [[DateAxis]].\r\n */\n Axis.prototype.fillRule = function (dataItem, index) {\n if (!$type.isNumber(index)) {\n index = dataItem.index;\n }\n if (index / 2 == Math.round(index / 2)) {\n dataItem.axisFill.__disabled = true;\n dataItem.axisFill.opacity = 0;\n } else {\n dataItem.axisFill.opacity = 1;\n dataItem.axisFill.__disabled = false;\n }\n };\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n Axis.prototype.createDataItem = function () {\n return new AxisDataItem();\n };\n /**\r\n * Invalidates layout.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Axis.prototype.invalidateLayout = function () {\n _super.prototype.invalidateLayout.call(this);\n // this puts series after axis in invalidation order also makes series update it's data items in case widht/height of a series is not 100%\n $iter.each(this.series.iterator(), function (series) {\n series.invalidateLayout();\n });\n };\n /**\r\n * Invalidates series of this axis.\r\n */\n Axis.prototype.invalidateSeries = function () {\n // this puts series after axis in invalidation order also makes series update it's data items in case widht/height of a series is not 100%\n $iter.each(this.series.iterator(), function (series) {\n series.invalidate();\n });\n };\n /**\r\n * Override to cancel super call for data element validation.\r\n * @ignore\r\n */\n Axis.prototype.validateDataElements = function () {\n if (this.ghostLabel) {\n this.renderer.updateLabelElement(this.ghostLabel, this.start, this.end);\n this.ghostLabel.validate();\n }\n };\n /**\r\n * Recalculates the number of grid items on the axis.\r\n */\n Axis.prototype.updateGridCount = function () {\n if (this.renderer) {\n this._gridCount = this.axisLength / this.renderer.minGridDistance;\n }\n };\n /**\r\n * Redraws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Axis.prototype.validateLayout = function () {\n this.axisFullLength = this.axisLength / (this.end - this.start);\n _super.prototype.validateLayout.call(this);\n this.updateGridCount();\n this.renderer.updateAxisLine();\n this.renderer.updateTooltip();\n this.renderer.updateBaseGridElement();\n if (this._prevLength != this.axisLength) {\n this.dispatchImmediately(\"lengthchanged\");\n this._prevLength = this.axisLength;\n }\n };\n /**\r\n * Initializes Axis' renderer.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Axis.prototype.initRenderer = function () {};\n /**\r\n * Adds a data item to the Axis.\r\n *\r\n * @param dataItem Data item\r\n */\n Axis.prototype.appendDataItem = function (dataItem) {\n var renderer = this.renderer;\n if (dataItem.tick) {\n dataItem.tick.parent = renderer.gridContainer;\n }\n if (dataItem.label) {\n dataItem.label.parent = renderer;\n }\n if (dataItem.grid) {\n dataItem.grid.parent = renderer.gridContainer;\n }\n if (dataItem.axisFill) {\n dataItem.axisFill.parent = renderer.gridContainer;\n }\n };\n /**\r\n * Redraws Axis' related items.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Axis.prototype.validate = function () {\n _super.prototype.validate.call(this);\n this.validateLayout();\n this.renderer.updateGridContainer();\n };\n /**\r\n * Redars Axis ranges.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Axis.prototype.validateAxisRanges = function () {\n var _this = this;\n $iter.each(this.axisRanges.iterator(), function (axisRange) {\n _this.appendDataItem(axisRange);\n _this.validateDataElement(axisRange);\n if (axisRange.grid) {\n axisRange.grid.validate();\n }\n if (axisRange.tick) {\n axisRange.tick.validate();\n }\n if (axisRange.axisFill) {\n axisRange.axisFill.validate();\n }\n if (axisRange.label) {\n axisRange.label.validate();\n }\n });\n };\n /**\r\n * Invalidates all axis breaks, so they are redrawn.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Axis.prototype.validateBreaks = function () {\n $iter.each(this.axisBreaks.iterator(), function (axisBreak) {\n axisBreak.invalidate();\n });\n };\n /**\r\n * Associates an Axis break with this Axis, after it is inserted into\r\n * `axisBreaks`.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\n Axis.prototype.processBreak = function (event) {\n var axisBreak = event.newValue;\n axisBreak.parent = this.renderer.breakContainer;\n axisBreak.axis = this;\n };\n /**\r\n * Registers a [[XYSeries]] element with this Axis.\r\n *\r\n * Returns a [[Disposer]] for all events, added to Series for watching\r\n * changes in Axis, and vice versa.\r\n * @ignore\r\n * @param series Series\r\n * @return Event disposer\r\n */\n Axis.prototype.registerSeries = function (series) {\n var _this = this;\n this.series.moveValue(series);\n return new MultiDisposer([new Disposer(function () {\n _this.series.removeValue(series);\n }), this.events.on(\"lengthchanged\", series.invalidate, series, false), this.events.on(\"startchanged\", series.invalidate, series, false), this.events.on(\"endchanged\", series.invalidate, series, false)\n // TODO should these be disposed of ?\n //series.events.on(\"datavalidated\", this.processSeriesDataItems, this),\n //series.events.on(\"visibilitychanged\", this.processSeriesDataItems, this),\n //series.events.on(\"hidden\", this.processSeriesDataItems, this)\n ]);\n };\n Object.defineProperty(Axis.prototype, \"renderer\", {\n /**\r\n * @return Renderer\r\n */\n get: function get() {\n return this._renderer;\n },\n /**\r\n * An [[AxisRenderer]] to be used to render this Axis.\r\n *\r\n * Please note that most of the settings, related to Axis' appearance are set\r\n * via its renderer. Not directly on the Axis.\r\n *\r\n * E.g.:\r\n *\r\n * ```TypeScript\r\n * axis.renderer.inside = true;\r\n * axis.renderer.minLabelPosition = 0.1;\r\n * axis.renderer.maxLabelPosition = 0.9;\r\n * ```\r\n * ```JavaScript\r\n * axis.renderer.inside = true;\r\n * axis.renderer.minLabelPosition = 0.1;\r\n * axis.renderer.maxLabelPosition = 0.9;\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/} for more info\r\n * @param renderer Renderer\r\n */\n set: function set(renderer) {\n if (renderer != this._renderer) {\n this._renderer = renderer;\n renderer.chart = this.chart;\n renderer.axis = this;\n renderer.parent = this;\n this.title.parent = this; // we add title to axis and set layout in renderer to avoid one extra container, as otherwise axis container would be used for holding renderer only\n this.initRenderer();\n this._disposers.push(renderer.gridContainer.events.on(\"maxsizechanged\", this.invalidate, this, false));\n var ghostLabel_1 = this.renderer.labels.create();\n this._disposers.push(ghostLabel_1);\n ghostLabel_1.dataItem = this.dataItems.template.clone(); // just for the adapters not to fail\n ghostLabel_1.text = \"L\";\n ghostLabel_1.parent = this.renderer;\n ghostLabel_1.shouldClone = false;\n ghostLabel_1.fillOpacity = 0;\n ghostLabel_1.opacity = 0;\n ghostLabel_1.strokeOpacity = 0;\n ghostLabel_1.interactionsEnabled = false;\n ghostLabel_1.validate();\n this.ghostLabel = ghostLabel_1;\n this.events.on(\"beforedatavalidated\", function () {\n ghostLabel_1.text = \"L\";\n }, undefined, false);\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Converts a relative position to angle. (for circular axes)\r\n *\r\n * @param position Position (0-1)\r\n * @return Angle\r\n */\n Axis.prototype.positionToAngle = function (position) {\n return this.renderer.positionToAngle(position);\n };\n /**\r\n * Converts pixel coordinates to a relative position. (0-1)\r\n *\r\n * @param point Coorinates (px)\r\n * @return Position (0-1)\r\n */\n Axis.prototype.pointToPosition = function (point) {\n return this.renderer.pointToPosition(point);\n };\n /**\r\n * [getAnyRangePath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param start [description]\r\n * @param end [description]\r\n * @return [description]\r\n */\n Axis.prototype.getAnyRangePath = function (start, end) {\n return this.renderer.getPositionRangePath(start, end);\n };\n /**\r\n * Converts any positional parameter to a relative position on axis.\r\n *\r\n * @todo Description (review)\r\n * @param value Pisition\r\n * @return Position (0-1)\r\n */\n Axis.prototype.anyToPosition = function (value) {\n return 0;\n };\n /**\r\n * Converts any positional parameter to a relative position on axis.\r\n *\r\n * @todo Description (review)\r\n * @param value Pisition\r\n * @return Orientation point\r\n */\n Axis.prototype.anyToPoint = function (value) {\n return {\n x: 0,\n y: 0,\n angle: 0\n };\n };\n /**\r\n * [getPositionRangePath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param startPosition [description]\r\n * @param endPosition [description]\r\n * @return [description]\r\n */\n Axis.prototype.getPositionRangePath = function (startPosition, endPosition) {\n return this.renderer.getPositionRangePath(startPosition, endPosition);\n };\n Object.defineProperty(Axis.prototype, \"axisLength\", {\n /**\r\n * Actual axis length in pixels.\r\n *\r\n * @return Axis length (px)\r\n */\n get: function get() {\n return this.renderer.axisLength;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Axis.prototype, \"cursorTooltipEnabled\", {\n /**\r\n * @return Display tooltip?\r\n */\n get: function get() {\n return this.getPropertyValue(\"cursorTooltipEnabled\");\n },\n /**\r\n * Indicates if axis should display a tooltip for chart's cursor.\r\n *\r\n * @param value Display tooltip?\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"cursorTooltipEnabled\", value)) {\n if (value && this.renderer) {\n this.renderer.updateTooltip();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Shows Axis tooltip at specific relative position within Axis. (0-1)\r\n *\r\n * @param position Position (0-1)\r\n * @param local or global position\r\n */\n Axis.prototype.showTooltipAtPosition = function (position, local) {\n var tooltip = this._tooltip;\n if (!local) {\n position = this.toAxisPosition(position);\n }\n if (!$type.isNumber(position) || position < 0 || position > 1) {\n tooltip.hide(0);\n return;\n }\n var renderer = this.renderer;\n if (tooltip && this.dataItems.length > 0) {\n //@todo: think of how to solve this better\n if (tooltip && !tooltip.parent) {\n tooltip.parent = this.tooltipContainer;\n }\n var tooltipLocation = renderer.tooltipLocation;\n var startPosition = this.getCellStartPosition(position);\n var endPosition = this.getCellEndPosition(position);\n if (this.tooltipPosition == \"fixed\") {\n position = startPosition + (endPosition - startPosition) * tooltipLocation;\n }\n position = $math.fitToRange(position, this.start, this.end);\n var startPoint = renderer.positionToPoint(startPosition);\n var endPoint = renderer.positionToPoint(endPosition);\n // save values so cursor could use them\n this.currentItemStartPoint = startPoint;\n this.currentItemEndPoint = endPoint;\n if (renderer.fullWidthTooltip) {\n tooltip.width = endPoint.x - startPoint.x;\n tooltip.height = endPoint.y - startPoint.y;\n }\n var point = renderer.positionToPoint(position);\n var globalPoint = $utils.spritePointToSvg(point, this.renderer.line);\n tooltip.text = this.getTooltipText(position);\n if (tooltip.text) {\n tooltip.pointTo(globalPoint);\n tooltip.show();\n }\n if (!this.cursorTooltipEnabled) {\n tooltip.hide(0);\n }\n }\n };\n /**\r\n * Converts relative position (0-1) to Axis position with zoom level and\r\n * inversed taken into account.\r\n *\r\n * @param position Global position (0-1)\r\n * @return Position within Axis (0-1)\r\n */\n Axis.prototype.toAxisPosition = function (position) {\n position = this.renderer.toAxisPosition(position);\n if (position == undefined) {\n return;\n }\n position = position * (this.end - this.start);\n if (this.renderer.inversed) {\n position = this.end - position;\n } else {\n position = this.start + position;\n }\n return position;\n };\n /**\r\n * Converts position on the axis with zoom level and\r\n * inversed taken into account to global position.\r\n *\r\n * @param position Axis position (0-1)\r\n * @return Global position (0-1)\r\n */\n Axis.prototype.toGlobalPosition = function (position) {\n if (this.renderer.inversed) {\n position = this.end - position;\n } else {\n position = position - this.start;\n }\n return position / (this.end - this.start);\n };\n /**\r\n * Returns text to be used for cursor's Axis tooltip.\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @param position Position coordinate (px)\r\n * @return Label text\r\n */\n Axis.prototype.getTooltipText = function (position) {\n return;\n };\n /**\r\n * Updates Axis' tooltip's position and possibly size, and pointer (stem)\r\n * place.\r\n *\r\n * @ignore Exclude from docs\r\n * @param pointerOrientation Pointer (stem) orientation\r\n * @param boundingRectangle A rectangle for tooltip to fit within\r\n */\n Axis.prototype.updateTooltip = function (pointerOrientation, boundingRectangle) {\n var tooltip = this._tooltip;\n if (tooltip) {\n tooltip.pointerOrientation = pointerOrientation;\n tooltip.setBounds($utils.spriteRectToSvg(boundingRectangle, this.renderer.line));\n }\n };\n /**\r\n * [roundPosition description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param position Relative position\r\n * @param location Location on axis\r\n * @return Rounded position\r\n */\n Axis.prototype.roundPosition = function (position, location) {\n return position;\n };\n /**\r\n * [getCellStartPosition description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param position [description]\r\n * @return [description]\r\n */\n Axis.prototype.getCellStartPosition = function (position) {\n return position;\n };\n /**\r\n * [getCellEndPosition description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param position [description]\r\n * @return [description]\r\n */\n Axis.prototype.getCellEndPosition = function (position) {\n return position;\n };\n Object.defineProperty(Axis.prototype, \"axisRanges\", {\n /**\r\n * A list of axis ranges for this Axis.\r\n *\r\n * @return Axis ranges\r\n */\n get: function get() {\n if (!this._axisRanges) {\n var dataItem = this.createDataItem();\n dataItem.isRange = true;\n dataItem.axisFill = this.renderer.axisFills.template.clone();\n dataItem.grid = this.renderer.grid.template.clone();\n dataItem.tick = this.renderer.ticks.template.clone();\n dataItem.label = this.renderer.labels.template.clone();\n dataItem.isTemplate = true;\n dataItem.component = this;\n dataItem.axisFill.disabled = false;\n dataItem.tick.disabled = false;\n dataItem.grid.disabled = false;\n dataItem.label.disabled = false;\n this._axisRanges = new ListTemplate(dataItem);\n this._axisRanges.events.on(\"inserted\", this.processAxisRange, this, false);\n this._disposers.push(new ListDisposer(this._axisRanges));\n this._disposers.push(this._axisRanges.template);\n }\n return this._axisRanges;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Decorates an axis range after it has been added to the axis range list.\r\n *\r\n * @param event Event\r\n */\n Axis.prototype.processAxisRange = function (event) {\n var axisRange = event.newValue;\n axisRange.component = this;\n axisRange.isRange = true;\n };\n Object.defineProperty(Axis.prototype, \"axisBreaks\", {\n /**\r\n * A list of axis breaks on this Axis.\r\n *\r\n * @return Axis breaks.\r\n */\n get: function get() {\n if (!this._axisBreaks) {\n this._axisBreaks = new SortedListTemplate(this.createAxisBreak(), function (a, b) {\n return $number.order(a.adjustedStartValue, b.adjustedStartValue);\n });\n this._axisBreaks.events.on(\"inserted\", this.processBreak, this, false);\n this._disposers.push(new ListDisposer(this._axisBreaks));\n this._disposers.push(this._axisBreaks.template);\n }\n return this._axisBreaks;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates a new axis break.\r\n *\r\n * @return Axis break\r\n */\n Axis.prototype.createAxisBreak = function () {\n return new AxisBreak();\n };\n Object.defineProperty(Axis.prototype, \"series\", {\n /**\r\n * A list of Series currently associated with this Axis.\r\n *\r\n * @return Series\r\n */\n get: function get() {\n if (!this._series) {\n this._series = new List();\n }\n return this._series;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Processes Series' data items.\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Axis.prototype.processSeriesDataItems = function () {};\n /**\r\n * Processes Series' single data item.\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n Axis.prototype.processSeriesDataItem = function (dataItem, axisLetter) {};\n /**\r\n * Post-processes Serie's data items.\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Axis.prototype.postProcessSeriesDataItems = function () {};\n /**\r\n * Post-processes Serie's single data item.\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n Axis.prototype.postProcessSeriesDataItem = function (dataItem) {};\n //\n /**\r\n * Updates Axis based on all Series that might influence it.\r\n *\r\n * Called by Series after Series data is validated.\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Axis.prototype.updateAxisBySeries = function () {};\n /**\r\n * Hides unused data items.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Axis.prototype.hideUnusedDataItems = function () {\n var _this = this;\n // hide all unused\n var dataItemsIterator = this._dataItemsIterator;\n dataItemsIterator.createNewItems = false;\n $iter.each(dataItemsIterator.iterator(), function (dataItem) {\n _this.validateDataElement(dataItem); // solves shrinking\n dataItem.__disabled = true;\n });\n dataItemsIterator.clear();\n dataItemsIterator.createNewItems = true;\n };\n /**\r\n * Returns a Series' data item that corresponds to specific position on Axis.\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @param series Series\r\n * @param position Position (0-1)\r\n * @param findNearest Should axis try to find nearest tooltip if there is no data item at exact position\r\n * @return Data item\r\n */\n Axis.prototype.getSeriesDataItem = function (series, position, findNearest) {\n return;\n };\n /**\r\n * Returns an angle that corresponds to specific position on axis.\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem Data item\r\n * @param key ???\r\n * @param location Location\r\n * @param stackKey ???\r\n * @return Angle\r\n */\n Axis.prototype.getAngle = function (dataItem, key, location, stackKey) {\n return;\n };\n /**\r\n * [getX description]\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem [description]\r\n * @param key [description]\r\n * @param location [description]\r\n * @param stackKey [description]\r\n * @return [description]\r\n */\n Axis.prototype.getX = function (dataItem, key, location, stackKey) {\n return;\n };\n /**\r\n * [getY description]\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem [description]\r\n * @param key [description]\r\n * @param location [description]\r\n * @param stackKey [description]\r\n * @return [description]\r\n */\n Axis.prototype.getY = function (dataItem, key, location, stackKey) {\n return;\n };\n Object.defineProperty(Axis.prototype, \"basePoint\", {\n /**\r\n * Coordinates of the actual axis start.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Base point coordinates\r\n */\n get: function get() {\n return {\n x: 0,\n y: 0\n };\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * [dataChangeUpdate description]\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n Axis.prototype.dataChangeUpdate = function () {};\n /**\r\n * [dataChangeUpdate description]\r\n *\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n Axis.prototype.seriesDataChangeUpdate = function (series) {};\n /**\r\n * Removes axis breaks that fall between `min` and `max` (???)\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param min Start value\r\n * @param max End value\r\n * @return Spread o\r\n */\n Axis.prototype.adjustDifference = function (min, max) {\n var difference = max - min;\n if ($type.isNumber(difference)) {\n $iter.eachContinue(this.axisBreaks.iterator(), function (axisBreak) {\n var startValue = axisBreak.adjustedStartValue;\n var endValue = axisBreak.adjustedEndValue;\n if ($type.isNumber(startValue) && $type.isNumber(endValue)) {\n // breaks are sorted, we don't need go further anymore\n if (startValue > max) {\n return false;\n }\n if (endValue >= min) {\n if ($type.isNumber(startValue) && $type.isNumber(endValue)) {\n var breakSize = axisBreak.breakSize;\n var intersection = $math.intersection({\n start: startValue,\n end: endValue\n }, {\n start: min,\n end: max\n });\n if (intersection) {\n difference -= (intersection.end - intersection.start) * (1 - breakSize);\n }\n }\n }\n return true;\n }\n });\n return difference;\n }\n };\n /**\r\n * Checks if specific value falls within a break.\r\n *\r\n * Returns [[AxisBreak]] the value falls into.\r\n *\r\n * @param value Value to check\r\n * @return Axis break\r\n */\n Axis.prototype.isInBreak = function (value) {\n return $iter.find(this.axisBreaks.iterator(), function (axisBreak) {\n return value >= axisBreak.adjustedStartValue && value <= axisBreak.adjustedEndValue;\n });\n };\n /**\r\n * [fixAxisBreaks description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n Axis.prototype.fixAxisBreaks = function () {\n var _this = this;\n var axisBreaks = this.axisBreaks;\n if (axisBreaks.length > 0) {\n // first make sure that startValue is <= end value\n // This needs to make a copy of axisBreaks because it mutates the list while traversing\n // TODO very inefficient\n $array.each($iter.toArray(axisBreaks.iterator()), function (axisBreak) {\n var startValue = $math.min(axisBreak.startValue, axisBreak.endValue);\n var endValue = $math.max(axisBreak.startValue, axisBreak.endValue);\n axisBreak.adjustedStartValue = startValue;\n axisBreak.adjustedEndValue = endValue;\n _this.axisBreaks.update(axisBreak);\n });\n var firstAxisBreak = axisBreaks.first;\n var previousEndValue_1 = Math.min(firstAxisBreak.startValue, firstAxisBreak.endValue);\n // process breaks\n // TODO does this need to call axisBreaks.update ?\n $iter.each(this.axisBreaks.iterator(), function (axisBreak) {\n var startValue = axisBreak.adjustedStartValue;\n var endValue = axisBreak.adjustedEndValue;\n // breaks can't overlap\n // if break starts before previous break ends\n if (startValue < previousEndValue_1) {\n startValue = previousEndValue_1;\n if (endValue < previousEndValue_1) {\n endValue = previousEndValue_1;\n }\n }\n axisBreak.adjustedStartValue = startValue;\n axisBreak.adjustedEndValue = endValue;\n });\n }\n };\n Object.defineProperty(Axis.prototype, \"startIndex\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return [description]\r\n */\n get: function get() {\n return 0;\n },\n /**\r\n * We need start/end indexes of axes to be 0 - `dataItems.length`.\r\n *\r\n * Yes, also for category axis, this helps to avoid jumping of categories\r\n * while scrolling and does not do a lot of extra work as we use\r\n * protected `_startIndex` and `_endIndex` when working with items.\r\n *\r\n * @hidden\r\n */\n /**\r\n * [startIndex description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param value [description]\r\n */\n set: function set(value) {},\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Axis.prototype, \"endIndex\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return [description]\r\n */\n get: function get() {\n return this.dataItems.length;\n },\n /**\r\n * [endIndex description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param value [description]\r\n */\n set: function set(value) {},\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns a formatted label based on position.\r\n *\r\n * Individual axis types should override this method to generate a label\r\n * that is relevant to axis type.\r\n *\r\n * Please note that `position` represents position within axis which may be\r\n * zoomed and not correspond to Cursor's `position`.\r\n *\r\n * To convert Cursor's `position` to Axis' `position` use `toAxisPosition()` method.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/tutorials/tracking-cursors-position-via-api/#Tracking_Cursor_s_position} For more information about cursor tracking.\r\n * @param position Relative position on axis (0-1)\r\n * @return Position label\r\n */\n Axis.prototype.getPositionLabel = function (position) {\n return Math.round(position * 100) + \"%x\";\n };\n Object.defineProperty(Axis.prototype, \"chart\", {\n /**\r\n * @return Chart\r\n */\n get: function get() {\n return this._chart;\n },\n /**\r\n * A Chart this Axis belongs to.\r\n *\r\n * @param value Chart\r\n */\n set: function set(value) {\n this._chart = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates a data item for a Series range.\r\n *\r\n * @param series Target Series\r\n * @return Range data item\r\n */\n Axis.prototype.createSeriesRange = function (series) {\n var range = this.axisRanges.create();\n range.component = this;\n range.axisFill = this.renderer.axisFills.template.clone();\n range.axisFill.disabled = false;\n range.axisFill.fillOpacity = 0;\n range.grid = this.renderer.grid.template.clone();\n range.grid.disabled = true;\n range.tick = this.renderer.ticks.template.clone();\n range.tick.disabled = true;\n range.label = this.renderer.labels.template.clone();\n range.label.disabled = true;\n series.axisRanges.push(range);\n return range;\n };\n /**\r\n * Copies all properties and related data from a different instance of Axis.\r\n *\r\n * @param source Source Axis\r\n */\n Axis.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n if (this.renderer) {\n this.renderer.copyFrom(source.renderer);\n } else {\n if (source.renderer) {\n this.renderer = source.renderer.clone();\n }\n }\n if (source.title) {\n this.title = source.title.clone();\n }\n };\n /**\r\n * Resets internal iterator.\r\n */\n Axis.prototype.resetIterators = function () {\n this._dataItemsIterator.reset();\n };\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n Axis.prototype.processConfig = function (config) {\n if (config) {\n // Set up axis ranges\n if ($type.hasValue(config.axisRanges) && $type.isArray(config.axisRanges)) {\n for (var i = 0, len = config.axisRanges.length; i < len; i++) {\n var range = config.axisRanges[i];\n // If `series` is set, we know it's a series range\n if ($type.hasValue(range[\"series\"])) {\n if ($type.isString(range[\"series\"])) {\n if (this.map.hasKey(range[\"series\"])) {\n //range[\"series\"] = this.map.getKey(range[\"series\"]);\n config.axisRanges[i] = this.createSeriesRange(this.map.getKey(range[\"series\"]));\n delete range[\"series\"];\n config.axisRanges[i].config = range;\n }\n }\n }\n }\n }\n }\n _super.prototype.processConfig.call(this, config);\n };\n Object.defineProperty(Axis.prototype, \"startLocation\", {\n /**\r\n * @return Location (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"startLocation\");\n },\n /**\r\n * Axis start location. Works on Date/Category axis, doesn't work on Value axis.\r\n *\r\n * * 0 - Full first cell is shown.\r\n * * 0.5 - Half of first cell is shown.\r\n * * 1 - None of the first cell is visible. (you probably don't want that)\r\n *\r\n * @param value Location (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"startLocation\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Axis.prototype, \"endLocation\", {\n /**\r\n * @return Location (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"endLocation\");\n },\n /**\r\n * Axis end location. Works on Date/Category axis, doesn't work on Value axis.\r\n *\r\n * * 0 - None of the last cell is shown. (don't do that)\r\n * * 0.5 - Half of the last cell is shown.\r\n * * 1 - Full last cell is shown.\r\n *\r\n * @param value Location (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"endLocation\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Axis.prototype.setDisabled = function (value) {\n var changed = _super.prototype.setDisabled.call(this, value);\n if (this.renderer) {\n this.renderer.gridContainer.disabled = value;\n }\n return changed;\n };\n return Axis;\n}(Component);\nexport { Axis };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Axis\"] = Axis;\nregistry.registeredClasses[\"AxisDataItem\"] = AxisDataItem;\n/**\r\n * Add default responsive rules\r\n */\n/**\r\n * Disable axis tooltips.\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.maybeXS,\n state: function state(target, stateId) {\n if (target instanceof Axis && target.tooltip) {\n var state = target.states.create(stateId);\n state.properties.cursorTooltipEnabled = false;\n return state;\n }\n return null;\n }\n});","/**\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Sprite } from \"../../core/Sprite\";\nimport { registry } from \"../../core/Registry\";\nimport { color } from \"../../core/utils/Color\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Used to draw Axis line.\r\n *\r\n * @see {@link IAxisLineEvents} for a list of available events\r\n * @see {@link IAxisLineAdapters} for a list of available Adapters\r\n */\nvar AxisLine = /** @class */function (_super) {\n tslib_1.__extends(AxisLine, _super);\n /**\r\n * Constructor\r\n */\n function AxisLine() {\n var _this = _super.call(this) || this;\n _this.className = \"AxisLine\";\n _this.element = _this.paper.add(\"path\");\n var interfaceColors = new InterfaceColorSet();\n _this.stroke = interfaceColors.getFor(\"grid\");\n _this.strokeOpacity = 0.15;\n _this.pixelPerfect = true;\n _this.fill = color();\n _this.applyTheme();\n _this.interactionsEnabled = false;\n return _this;\n //this.element.moveTo({ x: 0, y: 0 });\n }\n return AxisLine;\n}(Sprite);\nexport { AxisLine };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"AxisLine\"] = AxisLine;","import * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Sprite } from \"../../core/Sprite\";\nimport { registry } from \"../../core/Registry\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * AxisFill is a base class used to defines fill shapes for various\r\n * type-specific Axes.\r\n *\r\n * Axis fills are used to add fills to specific ranges of those axes.\r\n *\r\n * @see {@link IAxisFillEvents} for a list of available events\r\n * @see {@link IAxisFillAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar AxisFill = /** @class */function (_super) {\n tslib_1.__extends(AxisFill, _super);\n /**\r\n * Constructor.\r\n *\r\n * @param axis Axis\r\n */\n function AxisFill(axis) {\n var _this = _super.call(this) || this;\n _this.axis = axis;\n _this.element = _this.paper.add(\"path\");\n _this.className = \"AxisFill\";\n _this.isMeasured = false;\n _this.location = 0;\n var interfaceColors = new InterfaceColorSet();\n _this.fill = interfaceColors.getFor(\"alternativeBackground\");\n _this.fillOpacity = 0;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * @ignore\r\n */\n AxisFill.prototype.setDisabled = function (value) {\n var changed = _super.prototype.setDisabled.call(this, value);\n if (this.axis) {\n this.axis.invalidateDataItems();\n }\n return changed;\n };\n /**\r\n * Draws the fill element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisFill.prototype.draw = function () {\n _super.prototype.draw.call(this);\n if (this.axis && $type.isNumber(this.startPosition) && $type.isNumber(this.endPosition)) {\n this.fillPath = this.axis.getPositionRangePath(this.startPosition, this.endPosition);\n this.path = this.fillPath;\n }\n };\n Object.defineProperty(AxisFill.prototype, \"startPosition\", {\n /**\r\n * @return Start position\r\n */\n get: function get() {\n return this.getPropertyValue(\"startPosition\");\n },\n /**\r\n * An actual starting position of the fill.\r\n *\r\n * @param value Starting position\r\n */\n set: function set(value) {\n this.setPropertyValue(\"startPosition\", value);\n this.invalidate(); // this is needed as relative position might not change when zooming\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisFill.prototype, \"endPosition\", {\n /**\r\n * @return End position\r\n */\n get: function get() {\n return this.getPropertyValue(\"endPosition\");\n },\n /**\r\n * An actual end position of the fill.\r\n *\r\n * @param value End position\r\n */\n set: function set(value) {\n this.setPropertyValue(\"endPosition\", value);\n this.invalidate(); // this is needed as relative position might not change when zooming\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisFill.prototype, \"location\", {\n /**\r\n * @return Location (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"location\");\n },\n /**\r\n * Relative location of the fill. (0-1)\r\n *\r\n * @param value Location (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"location\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n */\n AxisFill.prototype.setPath = function (value) {\n if (this.setPropertyValue(\"path\", value)) {\n this.element.attr({\n \"d\": value\n });\n return true;\n }\n return false;\n };\n return AxisFill;\n}(Sprite);\nexport { AxisFill };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"AxisFill\"] = AxisFill;","/**\r\n * A module defining functionality for axis grid elements.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Sprite } from \"../../core/Sprite\";\nimport { registry } from \"../../core/Registry\";\nimport { color } from \"../../core/utils/Color\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport { defaultRules, ResponsiveBreakpoints } from \"../../core/utils/Responsive\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Displays an axis grid line.\r\n *\r\n * @see {@link IGridEvents} for a list of available events\r\n * @see {@link IGridAdapters} for a list of available Adapters\r\n * @todo Review: container is better, as we'll be able to attach something to the grid, also with 3d charts we might need some additional elements\r\n * @important\r\n */\nvar Grid = /** @class */function (_super) {\n tslib_1.__extends(Grid, _super);\n /**\r\n * Constructor\r\n */\n function Grid() {\n var _this = _super.call(this) || this;\n _this.className = \"Grid\";\n _this.element = _this.paper.add(\"path\");\n _this.location = 0.5;\n _this.isMeasured = false;\n var interfaceColors = new InterfaceColorSet();\n _this.stroke = interfaceColors.getFor(\"grid\");\n _this.pixelPerfect = true;\n _this.strokeOpacity = 0.15;\n _this.fill = color(); // \"none\";\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(Grid.prototype, \"location\", {\n /**\r\n * @return Location (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"location\");\n },\n /**\r\n * Location within axis cell to place grid line on.\r\n *\r\n * * 0 - start\r\n * * 0.5 - middle\r\n * * 1 - end\r\n *\r\n * @param value Location (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"location\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n */\n Grid.prototype.setDisabled = function (value) {\n var changed = _super.prototype.setDisabled.call(this, value);\n if (this.axis) {\n this.axis.invalidateDataItems();\n }\n return changed;\n };\n return Grid;\n}(Sprite);\nexport { Grid };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Grid\"] = Grid;\n/**\r\n * Add default responsive rules\r\n */\n/**\r\n * Disable grid on smaller charts\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.maybeXS,\n state: function state(target, stateId) {\n if (target instanceof Grid) {\n var state = target.states.create(stateId);\n state.properties.disabled = true;\n return state;\n }\n return null;\n }\n});","/**\r\n * Axis Label module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Label } from \"../../core/elements/Label\";\nimport { registry } from \"../../core/Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Use to create labels on Axis.\r\n *\r\n * @see {@link IAxisLabelEvents} for a list of available events\r\n * @see {@link IAxisLabelAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar AxisLabel = /** @class */function (_super) {\n tslib_1.__extends(AxisLabel, _super);\n /**\r\n * Constructor\r\n */\n function AxisLabel() {\n var _this = _super.call(this) || this;\n _this.className = \"AxisLabel\";\n _this.isMeasured = false;\n _this.padding(10, 10, 10, 10);\n _this.location = 0.5;\n //this.nonScaling = true; // not good for perf\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(AxisLabel.prototype, \"location\", {\n /**\r\n * @return Location (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"location\");\n },\n /**\r\n * Relative location of the label. (0-1)\r\n *\r\n * @param value Location (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"location\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisLabel.prototype, \"inside\", {\n /**\r\n * Returns if label is set to be drawn inside axis.\r\n *\r\n * @return Inside?\r\n */\n get: function get() {\n return this.getPropertyValue(\"inside\");\n },\n /**\r\n * Sets if label should be drawn inside axis.\r\n *\r\n * @param value Inside?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"inside\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n */\n AxisLabel.prototype.setDisabled = function (value) {\n var changed = _super.prototype.setDisabled.call(this, value);\n if (this.axis) {\n this.axis.invalidateDataItems();\n }\n return changed;\n };\n return AxisLabel;\n}(Label);\nexport { AxisLabel };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"AxisLabel\"] = AxisLabel;","/**\r\n * Tick module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Sprite } from \"../../core/Sprite\";\nimport { registry } from \"../../core/Registry\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A basic Tick class.\r\n *\r\n * A tick is a short dash, mainly connecting an object like axis or slice to\r\n * it's textual label.\r\n *\r\n * @see {@link ITickEvents} for a list of available events\r\n * @see {@link ITickAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar Tick = /** @class */function (_super) {\n tslib_1.__extends(Tick, _super);\n /**\r\n * Constructor\r\n */\n function Tick() {\n var _this = _super.call(this) || this;\n _this.className = \"Tick\";\n var interfaceColors = new InterfaceColorSet();\n _this.fillOpacity = 0;\n _this.length = 6;\n _this.strokeOpacity = 0.2;\n _this.stroke = interfaceColors.getFor(\"grid\");\n _this.isMeasured = false;\n _this.nonScalingStroke = true;\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(Tick.prototype, \"length\", {\n /**\r\n * @return Length (px)\r\n */\n get: function get() {\n if (this.disabled) {\n return 0;\n }\n return this.getPropertyValue(\"length\");\n },\n /**\r\n * Length of the tick in pixels.\r\n *\r\n * @param value Length (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"length\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n return Tick;\n}(Sprite);\nexport { Tick };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Tick\"] = Tick;","/**\r\n * Axis Tick module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Tick } from \"../elements/Tick\";\nimport { registry } from \"../../core/Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws an axis tick\r\n * @see {@link IAxisTickEvents} for a list of available events\r\n * @see {@link IAxisTickAdapters} for a list of available Adapters\r\n */\nvar AxisTick = /** @class */function (_super) {\n tslib_1.__extends(AxisTick, _super);\n function AxisTick() {\n var _this = _super.call(this) || this;\n _this.className = \"AxisTick\";\n _this.element = _this.paper.add(\"path\");\n _this.location = 0.5;\n _this.isMeasured = false;\n _this.pixelPerfect = true;\n _this.strokeOpacity = 0;\n _this.length = 5;\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(AxisTick.prototype, \"location\", {\n get: function get() {\n return this.getPropertyValue(\"location\");\n },\n set: function set(value) {\n this.setPropertyValue(\"location\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisTick.prototype, \"inside\", {\n get: function get() {\n return this.getPropertyValue(\"inside\");\n },\n set: function set(value) {\n this.setPropertyValue(\"inside\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n */\n AxisTick.prototype.setDisabled = function (value) {\n var changed = _super.prototype.setDisabled.call(this, value);\n if (this.axis) {\n this.axis.invalidateDataItems();\n }\n return changed;\n };\n return AxisTick;\n}(Tick);\nexport { AxisTick };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"AxisTick\"] = AxisTick;","/**\r\n * Module, defining base Axis Renderer.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../../core/Container\";\nimport { MutableValueDisposer } from \"../../core/utils/Disposer\";\nimport { AxisLine } from \"./AxisLine\";\nimport { AxisFill } from \"./AxisFill\";\nimport { Grid } from \"./Grid\";\nimport { AxisLabel } from \"./AxisLabel\";\nimport { AxisTick } from \"./AxisTick\";\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\nimport { registry } from \"../../core/Registry\";\nimport { percent } from \"../../core/utils/Percent\";\nimport * as $math from \"../../core/utils/Math\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A base class for all axis renderers.\r\n *\r\n * @see {@link IAxisRendererEvents} for a list of available events\r\n * @see {@link IAxisRendererAdapters} for a list of available Adapters\r\n */\nvar AxisRenderer = /** @class */function (_super) {\n tslib_1.__extends(AxisRenderer, _super);\n /**\r\n * Constructor.\r\n *\r\n * @param axis Related axis\r\n */\n function AxisRenderer() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * A related chart.\r\n */\n _this._chart = new MutableValueDisposer();\n _this.className = \"AxisRenderer\";\n // Set defaults\n _this.minGridDistance = 50;\n _this.inside = false;\n _this.inversed = false;\n _this.tooltipLocation = 0.5;\n _this.fullWidthTooltip = false;\n _this.cellStartLocation = 0;\n _this.cellEndLocation = 1;\n _this.minLabelPosition = 0;\n _this.maxLabelPosition = 1;\n _this.shouldClone = false;\n var gridContainer = _this.createChild(Container);\n gridContainer.shouldClone = false;\n gridContainer.layout = \"none\";\n //\tgridContainer.isMeasured = false;\n gridContainer.virtualParent = _this;\n gridContainer.width = percent(100);\n gridContainer.height = percent(100);\n _this.gridContainer = gridContainer;\n // not good without this\n gridContainer.events.on(\"maxsizechanged\", function () {\n if (_this.inited) {\n _this.invalidateAxisItems();\n }\n }, _this, false);\n var breakContainer = _this.createChild(Container);\n breakContainer.shouldClone = false;\n breakContainer.isMeasured = false;\n breakContainer.layout = \"none\";\n breakContainer.width = percent(100);\n breakContainer.height = percent(100);\n _this.breakContainer = breakContainer;\n _this.line = _this.createChild(AxisLine);\n _this.line.shouldClone = false;\n _this.line.strokeOpacity = 0;\n var baseGrid = _this.createChild(Grid);\n baseGrid.shouldClone = false;\n _this.baseGrid = baseGrid;\n // Make elements disposable\n var disposers = _this._disposers;\n disposers.push(baseGrid);\n disposers.push(_this.line);\n disposers.push(gridContainer);\n disposers.push(breakContainer);\n disposers.push(_this._chart);\n _this.ticks.template.disabled = true;\n _this.axisFills.template.disabled = true;\n _this.axisFills.template.interactionsEnabled = false;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(AxisRenderer.prototype, \"axis\", {\n get: function get() {\n return this._axis;\n },\n set: function set(axis) {\n this.setAxis(axis);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n */\n AxisRenderer.prototype.setAxis = function (axis) {\n this._axis = axis;\n this.baseGrid.parent = axis;\n this.line.parent = axis;\n this.gridContainer.bind(\"opacity\", axis);\n };\n /**\r\n * Called when rendered is attached to an Axis, as well as a property of\r\n * Axis that might affect the appearance is updated.\r\n *\r\n * E.g. `axis.opposite`, `axis.inside`, etc.\r\n *\r\n * This method is called **before** draw, so that any related setting\r\n * changed in this method can be changed.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\n AxisRenderer.prototype.processRenderer = function () {\n this.events.on(\"sizechanged\", this.updateTooltip, this, false);\n this.events.on(\"positionchanged\", this.updateTooltip, this, false);\n this.labels.template.inside = this.inside;\n this.ticks.template.inside = this.inside;\n };\n /**\r\n * Updates Axis' tooltip.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\n AxisRenderer.prototype.updateTooltip = function () {\n // This is a placeholder method for extending classes to override.\n };\n Object.defineProperty(AxisRenderer.prototype, \"axisLength\", {\n /**\r\n * Returns actual length of the Axis, in pixels.\r\n *\r\n * @return Length (px)\r\n */\n get: function get() {\n // This is a placeholder method for extending classes to override.\n return 0;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Re-positions an element to new coordinates.\r\n *\r\n * @ignore Exclude from docs\r\n * @param item A target element\r\n * @param point New coordinates\r\n */\n AxisRenderer.prototype.positionItem = function (item, point) {\n if (item) {\n item.moveTo(point);\n }\n };\n /**\r\n * Converts relative position on axis to point coordinates.\r\n *\r\n * @ignore Exclude from docs\r\n * @param position Position (0-1)\r\n * @return Point\r\n */\n AxisRenderer.prototype.positionToPoint = function (position) {\n // This is a placeholder method for extending classes to override.\n return {\n x: 0,\n y: 0\n };\n };\n /**\r\n * Converts relative position on axis to angle.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review / units)\r\n * @param position Position (0-1)\r\n * @return Angle\r\n */\n AxisRenderer.prototype.positionToAngle = function (position) {\n // This is a placeholder method for extending classes to override.\n return 0;\n };\n /**\r\n * Converts relative position (0-1) on axis to a pixel coordinate.\r\n *\r\n * @param position Position (0-1)\r\n * @return Coordinate (px)\r\n */\n AxisRenderer.prototype.positionToCoordinate = function (position) {\n var coordinate;\n var axis = this.axis;\n var axisFullLength = axis.axisFullLength;\n if (axis.renderer.inversed) {\n coordinate = (axis.end - position) * axisFullLength;\n } else {\n coordinate = (position - axis.start) * axisFullLength;\n }\n return coordinate;\n };\n AxisRenderer.prototype.updateGridContainer = function () {};\n AxisRenderer.prototype.getHeight = function () {\n var axis = this.axis;\n if (axis && axis.chart) {\n var chart = this.axis.chart;\n if (chart.plotContainer) {\n return chart.plotContainer.pixelHeight || 0;\n }\n }\n return this.gridContainer.pixelHeight || 0;\n };\n AxisRenderer.prototype.getWidth = function () {\n var axis = this.axis;\n if (axis && axis.chart) {\n var chart = this.axis.chart;\n if (chart.plotContainer) {\n return chart.plotContainer.pixelWidth || 0;\n }\n }\n return this.gridContainer.pixelWidth || 0;\n };\n /**\r\n * Converts a coordinate in pixels to a relative position. (0-1)\r\n *\r\n * @param coordinate Coordinate (px)\r\n * @return Position (0-1)\r\n */\n AxisRenderer.prototype.coordinateToPosition = function (coordinate) {\n var position;\n var axis = this.axis;\n var axisFullLength = axis.axisFullLength;\n if (axis.renderer.inversed) {\n position = axis.end - coordinate / axisFullLength;\n } else {\n position = coordinate / axisFullLength + axis.start;\n }\n return $math.round(position, 5);\n };\n /**\r\n * Converts a point at specific coordinates to a relative position (0-1)\r\n * on the axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param point Point\r\n * @return Position (0-1)\r\n */\n AxisRenderer.prototype.pointToPosition = function (point) {\n // This is a placeholder method for extending classes to override.\n return 0;\n };\n /**\r\n * [getPositionRangePath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param startPosition Starting position\r\n * @param endPosition End position\r\n * @return SVG path\r\n */\n AxisRenderer.prototype.getPositionRangePath = function (startPosition, endPosition) {\n return \"\";\n };\n /**\r\n * Invalidates all axis data items, effectively causing them re-evaluated.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n */\n AxisRenderer.prototype.invalidateAxisItems = function () {\n var axis = this.axis;\n if (axis) {\n axis.invalidateDataItems();\n }\n };\n /**\r\n * Updates and positions a grid element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param grid Grid element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\n AxisRenderer.prototype.updateGridElement = function (grid, position, endPosition) {\n // This is a placeholder method for extending classes to override.\n };\n /**\r\n * Updates and positions a tick element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param tick Tick element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\n AxisRenderer.prototype.updateTickElement = function (tick, position, endPosition) {\n // This is a placeholder method for extending classes to override.\n };\n /**\r\n * Updates and positions a label element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param label Label element\r\n * @param position Starting position\r\n * @param endPosition Ending position\r\n */\n AxisRenderer.prototype.updateLabelElement = function (label, position, endPosition, location) {\n // This is a placeholder method for extending classes to override.\n };\n /**\r\n * Updates and positions the axis fill element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param fill Fill element\r\n * @param position Starting position\r\n * @param endPosition Ending position\r\n */\n AxisRenderer.prototype.updateFillElement = function (fill, position, endPosition) {\n fill.startPosition = position;\n fill.endPosition = endPosition;\n };\n /**\r\n * Updates and positions the axis line element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisRenderer.prototype.updateAxisLine = function () {\n // This is a placeholder method for extending classes to override.\n };\n /**\r\n * Updates and positions the base grid element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisRenderer.prototype.updateBaseGridElement = function () {\n // This is a placeholder method for extending classes to override.\n };\n /**\r\n * Updates and positions an axis break element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axisBreak Break element\r\n */\n AxisRenderer.prototype.updateBreakElement = function (axisBreak) {\n this.positionItem(axisBreak.startLine, axisBreak.startPoint);\n this.toggleVisibility(axisBreak.startLine, axisBreak.startPosition, 0, 1);\n this.positionItem(axisBreak.endLine, axisBreak.endPoint);\n this.toggleVisibility(axisBreak.endLine, axisBreak.endPosition, 0, 1);\n };\n Object.defineProperty(AxisRenderer.prototype, \"minGridDistance\", {\n /**\r\n * @return Min distance (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"minGridDistance\");\n },\n /**\r\n * Minimum distance in pixels between grid elements.\r\n *\r\n * @param value Min distance (px)\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"minGridDistance\", value)) {\n if (this.axis) {\n this.axis.invalidateLayout();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRenderer.prototype, \"chart\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Chart\r\n */\n get: function get() {\n return this._chart.get();\n },\n /**\r\n * A chart, associated with the Axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Chart\r\n */\n set: function set(value) {\n this._chart.set(value, null);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Toggles visibility of an element, based on its current position and\r\n * min/max position settings.\r\n *\r\n * E.g. labels based on `minLabelPosition` and `maxLabelPosition`.\r\n *\r\n * @ignore Exclude from docs\r\n * @param sprite An element to toggle\r\n * @param position Elements current position\r\n * @param minPosition Min position setting\r\n * @param maxPosition Max position setting\r\n */\n AxisRenderer.prototype.toggleVisibility = function (sprite, position, minPosition, maxPosition) {\n var axis = this.axis;\n var updatedStart = axis.start + (axis.end - axis.start) * (minPosition - 0.0001);\n var updatedEnd = axis.start + (axis.end - axis.start) * (maxPosition + 0.0001);\n if (!sprite.disabled) {\n if (position < updatedStart || position > updatedEnd) {\n sprite.__disabled = true;\n } else {\n sprite.__disabled = false;\n }\n }\n };\n /**\r\n * Creates visual elements for and axis break.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axisBreak Axis break\r\n */\n AxisRenderer.prototype.createBreakSprites = function (axisBreak) {\n // This is a placeholder method for extending classes to override.\n };\n Object.defineProperty(AxisRenderer.prototype, \"axisFills\", {\n /**\r\n * A list of Axis' Fill elements.\r\n *\r\n * Those are fill elements that cover the space between every second set\r\n * of grid lines, and can be configured to create striped charts.\r\n *\r\n * Please note that these are disabled by default. To enable them, set\r\n * template to true.\r\n *\r\n * ```TypeScript\r\n * categoryAxis.renderer.axisFills.template.disabled = false;\r\n * ```\r\n * ```JavaScript\r\n * categoryAxis.renderer.axisFills.template.disabled = false;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"xAxes\": [{\r\n * // ...\r\n * \"renderer\": {\r\n * \"axisFills\": {\r\n * \"disabled\": false\r\n * }\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/tutorials/alternated-axis-fills/} this tutorial for more info.\r\n * @return Fill elements\r\n */\n get: function get() {\n if (!this._axisFills) {\n var fill = this.createFill(this.axis);\n this._axisFills = new ListTemplate(fill);\n fill.applyOnClones = true;\n fill.events.on(\"enabled\", this.invalidateAxisItems, this, false);\n this._disposers.push(new ListDisposer(this._axisFills));\n this._disposers.push(this._axisFills.template);\n }\n return this._axisFills;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns a new fill element, suitable for this Axis Renderer type.\r\n *\r\n * @return Fill element\r\n */\n AxisRenderer.prototype.createFill = function (axis) {\n return new AxisFill(axis);\n };\n Object.defineProperty(AxisRenderer.prototype, \"grid\", {\n /**\r\n * A list of Axis' Grid elements.\r\n *\r\n * @return Grid elements\r\n */\n get: function get() {\n if (!this._grid) {\n var grid = this.createGrid();\n this._grid = new ListTemplate(grid);\n grid.applyOnClones = true;\n grid.events.on(\"enabled\", this.invalidateAxisItems, this, false);\n this._disposers.push(new ListDisposer(this._grid));\n this._disposers.push(this._grid.template);\n }\n return this._grid;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns a new grid element, suitable for this Axis Renderer type.\r\n *\r\n * @return Grid element\r\n */\n AxisRenderer.prototype.createGrid = function () {\n return new Grid();\n };\n Object.defineProperty(AxisRenderer.prototype, \"ticks\", {\n /**\r\n * A list of Axis' Tick elements.\r\n *\r\n * Please note that these are disabled by default. To enable them, set\r\n * template to true.\r\n *\r\n * ```TypeScript\r\n * categoryAxis.renderer.ticks.template.disabled = false;\r\n * ```\r\n * ```JavaScript\r\n * categoryAxis.renderer.ticks.template.disabled = false;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"xAxes\": [{\r\n * // ...\r\n * \"renderer\": {\r\n * \"ticks\": {\r\n * \"disabled\": false\r\n * }\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @return Tick elements\r\n */\n get: function get() {\n if (!this._ticks) {\n var tick = this.createTick();\n tick.applyOnClones = true;\n tick.isMeasured = false;\n tick.events.on(\"enabled\", this.invalidateAxisItems, this, false);\n this._ticks = new ListTemplate(tick);\n this._disposers.push(new ListDisposer(this._ticks));\n this._disposers.push(this._ticks.template);\n }\n return this._ticks;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns a new tick element, suitable for this Axis Renderer type.\r\n *\r\n * @return Tick element\r\n */\n AxisRenderer.prototype.createTick = function () {\n return new AxisTick();\n };\n Object.defineProperty(AxisRenderer.prototype, \"labels\", {\n /**\r\n * A list of Axis' Label elements.\r\n *\r\n * @return Label elements\r\n */\n get: function get() {\n if (!this._labels) {\n var label = this.createLabel();\n this._labels = new ListTemplate(label);\n label.applyOnClones = true;\n label.events.on(\"enabled\", this.invalidateAxisItems, this, false);\n this._disposers.push(new ListDisposer(this._labels));\n this._disposers.push(this._labels.template);\n }\n return this._labels;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns a new label element, suitable for this Axis Renderer type.\r\n *\r\n * @return Label element\r\n */\n AxisRenderer.prototype.createLabel = function () {\n return new AxisLabel();\n };\n Object.defineProperty(AxisRenderer.prototype, \"inside\", {\n /**\r\n * @return Labels inside?\r\n */\n get: function get() {\n return this.getPropertyValue(\"inside\");\n },\n /**\r\n * Indicates whether Axis' labels and ticks should be drawn inside Plot area.\r\n *\r\n * Does not work with all renderers, like AxisRendererRadial.\r\n *\r\n * @param value Labels inside?\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"inside\", value)) {\n if (this.axis) {\n this.axis.invalidate();\n }\n }\n if (value) {\n this.width = 0;\n this.height = 0;\n } else {\n this.width = undefined;\n this.height = undefined;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRenderer.prototype, \"opposite\", {\n /**\r\n * @return Draw axis on opposite side?\r\n */\n get: function get() {\n return this.getPropertyValue(\"opposite\");\n },\n /**\r\n * Indicates whether Axis should be drawn on the opposite side of the plot\r\n * area than it would normally be drawn based on chart's settings.\r\n *\r\n * Does not work with all renderers, like [[AxisRendererRadial]] and\r\n * [[AxisRenderer Circular].\r\n *\r\n * @param value Draw axis on opposite side?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"opposite\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRenderer.prototype, \"fullWidthTooltip\", {\n /**\r\n * @return Full width tooltip?\r\n */\n get: function get() {\n return this.getPropertyValue(\"fullWidthTooltip\");\n },\n /**\r\n * Indicates if Axis tooltip should take the whole width of the axis cell.\r\n * (between two grid lines)\r\n *\r\n * NOTE: this setting is ignored on circular axis types.\r\n *\r\n * @param value Full width tooltip?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"fullWidthTooltip\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRenderer.prototype, \"tooltipLocation\", {\n /**\r\n * @return Tooltip location\r\n */\n get: function get() {\n return this.getPropertyValue(\"tooltipLocation\");\n },\n /**\r\n * Location within axis cell to show tooltip on. (0-1)\r\n *\r\n * 0 - show at the start\r\n * 0.5 - show right in the middle\r\n * 1 - show at the end\r\n *\r\n * @param value Tooltip location\r\n */\n set: function set(value) {\n this.setPropertyValue(\"tooltipLocation\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRenderer.prototype, \"cellStartLocation\", {\n /**\r\n * @return Cell start (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"cellStartLocation\");\n },\n /**\r\n * Location for the cell start.\r\n *\r\n * Normally a \"cell\" is the whole available width in a category.\r\n *\r\n * If there are several clustered column-like series available, the whole\r\n * space is divided between each clustered column, or column stacks.\r\n *\r\n * `cellStartLocation` identifies where, within available space, the actual\r\n * cell starts.\r\n *\r\n * This, together with column series' `width` will affect actual width of\r\n * columns, and thus gaps between them.\r\n *\r\n * This will affect category-like axes only, like [[DateAxis]], or\r\n * [[CategoryAxis]].\r\n *\r\n * This is used to limit a space occupied by series like column.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/} for more info.\r\n * @param value Cell start (0-1)\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"cellStartLocation\", value)) {\n if (this.axis) {\n this.axis.invalidateSeries();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRenderer.prototype, \"cellEndLocation\", {\n /**\r\n * @return Cell end (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"cellEndLocation\");\n },\n /**\r\n * Location for the cell end.\r\n *\r\n * Normally a \"cell\" is the whole available width in a category.\r\n *\r\n * If there are several clustered column-like series available, the whole\r\n * space is divided between each clustered column, or column stacks.\r\n *\r\n * `cellEndLocation` identifies where, within available space, the actual\r\n * cell ends.\r\n *\r\n * This, together with column series' `width` will affect actual width of\r\n * columns, and thus gaps between them.\r\n *\r\n * This will affect category-like axes only, like [[DateAxis]], or\r\n * [[CategoryAxis]].\r\n *\r\n * This is used to limit a space occupied by series like column.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/} for more info.\r\n * @param value Cell end (0-1)\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"cellEndLocation\", value)) {\n if (this.axis) {\n this.axis.invalidateSeries();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRenderer.prototype, \"inversed\", {\n /**\r\n * @return Flip axis?\r\n */\n get: function get() {\n return this.getPropertyValue(\"inversed\");\n },\n /**\r\n * Indicates if the scale of the axis should be flipped.\r\n *\r\n * @param value Flip axis?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"inversed\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRenderer.prototype, \"minLabelPosition\", {\n /**\r\n * @return Min label position (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"minLabelPosition\");\n },\n /**\r\n * Minimum position along the Axis, for labels.\r\n *\r\n * Labels, which have their position closer to the start of the Axis, will be\r\n * automatically hidden.\r\n *\r\n * E.g., setting this to 0.05 (5% of total axis length) would hide labels,\r\n * that would otherwise be drawn very near start of the Axis.\r\n *\r\n * This is especially usefull with `inside = true`, or if the chart hasn't\r\n * got any extra margins.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/} for more info.\r\n * @param value Min label position (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"minLabelPosition\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRenderer.prototype, \"maxLabelPosition\", {\n /**\r\n * @return Max label position (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"maxLabelPosition\");\n },\n /**\r\n * Maximum position along the Axis, for labels.\r\n *\r\n * Labels, which have their position closer to the and of the Axis, will be\r\n * automatically hidden.\r\n *\r\n * E.g., setting this to 0.95 (95% of total axis length) would hide labels,\r\n * that would otherwise be drawn very near end of the Axis.\r\n *\r\n * This is especially usefull with `inside = true`, or if the chart hasn't\r\n * got any extra margins.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/} for more info.\r\n * @param value Max label position (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"maxLabelPosition\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies all settings and related items from another object of the same\r\n * type.\r\n *\r\n * @param source Source object\r\n */\n AxisRenderer.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.grid.template.copyFrom(source.grid.template);\n this.ticks.template.copyFrom(source.ticks.template);\n this.labels.template.copyFrom(source.labels.template);\n this.axisFills.template.copyFrom(source.axisFills.template);\n this.line.copyFrom(source.line);\n this.baseGrid.copyFrom(source.baseGrid);\n };\n /**\r\n * @ignore\r\n */\n AxisRenderer.prototype.toAxisPosition = function (value) {\n return value;\n };\n return AxisRenderer;\n}(Container);\nexport { AxisRenderer };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"AxisRenderer\"] = AxisRenderer;","/**\r\n * Module, defining Axis Renderer for vertical axes.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { AxisRenderer } from \"./AxisRenderer\";\nimport { WavedLine } from \"../../core/elements/WavedLine\";\nimport { WavedRectangle } from \"../../core/elements/WavedRectangle\";\nimport { registry } from \"../../core/Registry\";\nimport { percent, Percent } from \"../../core/utils/Percent\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $path from \"../../core/rendering/Path\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $type from \"../../core/utils/Type\";\nimport { defaultRules, ResponsiveBreakpoints } from \"../../core/utils/Responsive\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A renderer for vertical axis.\r\n *\r\n * @see {@link IAxisRendererYEvents} for a list of available events\r\n * @see {@link IAxisRendererYAdapters} for a list of available Adapters\r\n */\nvar AxisRendererY = /** @class */function (_super) {\n tslib_1.__extends(AxisRendererY, _super);\n /**\r\n * Constructor.\r\n *\r\n * @param axis Related axis\r\n */\n function AxisRendererY() {\n var _this = _super.call(this) || this;\n _this.className = \"AxisRendererY\";\n _this.minGridDistance = 40;\n _this.opposite = false;\n _this.height = percent(100);\n _this.labels.template.verticalCenter = \"middle\";\n _this.applyTheme();\n return _this;\n }\n /**\r\n * @ignore\r\n */\n AxisRendererY.prototype.setAxis = function (axis) {\n _super.prototype.setAxis.call(this, axis);\n axis.layout = \"horizontal\";\n };\n /**\r\n * @ignore\r\n */\n AxisRendererY.prototype.updateGridContainer = function () {\n var axis = this.axis;\n if (axis) {\n var gridContainer = this.gridContainer;\n gridContainer.y = axis.pixelY;\n gridContainer.height = axis.pixelHeight;\n }\n };\n /**\r\n * @ignore\r\n */\n AxisRendererY.prototype.toAxisPosition = function (value) {\n var inversedPosition = 1 - value;\n var axis = this.axis;\n var parent = axis.parent;\n if (axis && parent) {\n var relativeY = axis.pixelY / parent.innerHeight;\n var relativeHeight = axis.pixelHeight / parent.innerHeight;\n return 1 - (inversedPosition - relativeY) / relativeHeight;\n }\n return value;\n };\n /**\r\n * Called when rendered is attached to an Axis, as well as a property of\r\n * Axis that might affect the appearance is updated.\r\n *\r\n * E.g. `axis.opposite`, `axis.inside`, etc.\r\n *\r\n * This method is called **before** draw, so that any related setting\r\n * changed in this method can be changed.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\n AxisRendererY.prototype.processRenderer = function () {\n _super.prototype.processRenderer.call(this);\n var axis = this.axis;\n if (axis) {\n var title = axis.title;\n title.valign = \"middle\";\n if (!(axis.height instanceof Percent)) {\n axis.height = percent(100);\n }\n if (this.opposite) {\n title.rotation = 90;\n this.line.toBack();\n title.toFront();\n } else {\n title.rotation = -90;\n title.toBack();\n this.line.toFront();\n }\n }\n };\n /**\r\n * Updates some of the Axis tooltip's visual properties, related to\r\n * rendering of the Axis.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\n AxisRendererY.prototype.updateTooltip = function () {\n var axis = this.axis;\n if (axis) {\n var bigNum = 2000;\n var bbx = 0;\n var bby = 0;\n var bbw = bigNum;\n var bbh = this.axisLength;\n // right\n if (this.opposite) {\n if (this.inside) {\n bbx = -bigNum;\n bbw = bigNum;\n }\n }\n // left\n else {\n if (!this.inside) {\n bbx = -bigNum;\n bbw = bigNum;\n }\n }\n this.axis.updateTooltip(\"horizontal\", {\n x: bbx,\n y: bby,\n width: bbw,\n height: bbh\n });\n }\n };\n Object.defineProperty(AxisRendererY.prototype, \"axisLength\", {\n /**\r\n * Returns actual length of the Axis, in pixels.\r\n *\r\n * @return Length (px)\r\n */\n get: function get() {\n var axis = this.axis;\n return axis.measuredHeight - axis.pixelPaddingTop - axis.pixelPaddingBottom || 0;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Converts relative position on axis to point coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @return Point\r\n */\n AxisRendererY.prototype.positionToPoint = function (position) {\n return {\n x: 0,\n y: this.positionToCoordinate(position)\n };\n };\n /**\r\n * Converts a point at specific coordinates to a relative position (0-1)\r\n * on the axis.\r\n *\r\n * @param point Point\r\n * @return Position (0-1)\r\n */\n AxisRendererY.prototype.pointToPosition = function (point) {\n return this.coordinateToPosition(point.y);\n };\n /**\r\n * [getPositionRangePath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param startPosition Starting position\r\n * @param endPosition End position\r\n * @return SVG path\r\n */\n AxisRendererY.prototype.getPositionRangePath = function (startPosition, endPosition) {\n var y1 = $math.fitToRange(this.positionToCoordinate(startPosition), 0, this.axisLength);\n var y2 = $math.fitToRange(this.positionToCoordinate(endPosition), 0, this.axisLength);\n var h = Math.abs(y2 - y1);\n var w = this.getWidth();\n var y = Math.min(y1, y2);\n var x = 0;\n return $path.rectToPath({\n x: x,\n y: y,\n width: w,\n height: h\n }, true);\n };\n /**\r\n * Updates and positions a grid element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param grid Grid element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\n AxisRendererY.prototype.updateGridElement = function (grid, position, endPosition) {\n position = position + (endPosition - position) * grid.location;\n var point = this.positionToPoint(position);\n //\tpoint.y = $utils.spritePointToSprite({ x: 0, y: point.y }, this, this.gridContainer).y;\n grid.path = $path.moveTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: this.getWidth(),\n y: 0\n });\n this.positionItem(grid, point);\n this.toggleVisibility(grid, position, 0, 1);\n };\n /**\r\n * Updates and positions a tick element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param tick Tick element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\n AxisRendererY.prototype.updateTickElement = function (tick, position, endPosition) {\n position = position + (endPosition - position) * tick.location;\n var point = this.positionToPoint(position);\n var tickLength = tick.length;\n try {\n $utils.used(this.axis.title.measuredWidth);\n } catch (_a) {\n // void\n }\n point.x = $utils.spritePointToSprite({\n x: this.line.pixelX,\n y: 0\n }, this.line.parent, this.gridContainer).x;\n if (!this.opposite) {\n tickLength *= tick.inside ? 1 : -1;\n } else {\n tickLength *= tick.inside ? -1 : 1;\n }\n tick.path = $path.moveTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: tickLength,\n y: 0\n });\n this.positionItem(tick, point);\n this.toggleVisibility(tick, position, 0, 1);\n };\n /**\r\n * Updates and positions the axis line element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisRendererY.prototype.updateAxisLine = function () {\n this.line.path = $path.moveTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: 0,\n y: this.axisLength\n });\n };\n /**\r\n * Updates and positions the base grid element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisRendererY.prototype.updateBaseGridElement = function () {\n _super.prototype.updateBaseGridElement.call(this);\n var axis = this.axis;\n var w = this.getWidth();\n var h = this.pixelHeight;\n var y = axis.basePoint.y;\n var baseGrid = this.baseGrid;\n if (y < -0.2 || y > h + 0.2) {\n baseGrid.hide(0);\n } else {\n var x = $utils.spritePointToSprite({\n x: 0,\n y: 0\n }, this.gridContainer, baseGrid.parent).x;\n baseGrid.path = $path.moveTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: w,\n y: 0\n });\n baseGrid.moveTo({\n x: x,\n y: y\n });\n baseGrid.show(0);\n }\n };\n /**\r\n * Updates and positions a label element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param label Label element\r\n * @param position Starting position\r\n * @param endPosition Ending position\r\n */\n AxisRendererY.prototype.updateLabelElement = function (label, position, endPosition, location) {\n if (!$type.hasValue(location)) {\n location = label.location;\n }\n position = position + (endPosition - position) * location;\n label.isMeasured = !label.inside;\n var point = this.positionToPoint(position);\n var horizontalCenter;\n var deltaX = 0;\n if (this.opposite) {\n if (label.inside) {\n horizontalCenter = \"right\";\n if (label.align == \"left\") {\n deltaX = -this.gridContainer.maxWidth;\n horizontalCenter = \"left\";\n }\n } else {\n horizontalCenter = \"left\";\n }\n point.x = 0 + deltaX;\n } else {\n if (label.inside) {\n horizontalCenter = \"left\";\n if (label.align == \"right\") {\n deltaX = this.gridContainer.maxWidth;\n horizontalCenter = \"right\";\n }\n } else {\n horizontalCenter = \"right\";\n }\n point.x = this.measuredWidth + deltaX;\n }\n if (label.rotation == 0) {\n // Apply fuzzy logic to verticalCenter only if labels are not rotated\n label.horizontalCenter = horizontalCenter;\n }\n this.positionItem(label, point);\n this.toggleVisibility(label, position, this.minLabelPosition, this.maxLabelPosition);\n };\n /**\r\n * Updates and positions an axis break element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axisBreak Break element\r\n */\n AxisRendererY.prototype.updateBreakElement = function (axisBreak) {\n _super.prototype.updateBreakElement.call(this, axisBreak);\n var startLine = axisBreak.startLine;\n var endLine = axisBreak.endLine;\n var fillShape = axisBreak.fillShape;\n var startPoint = axisBreak.startPoint;\n var endPoint = axisBreak.endPoint;\n var x1 = axisBreak.pixelMarginLeft;\n var x2 = this.getWidth() - axisBreak.pixelMarginLeft - axisBreak.pixelMarginRight;\n startPoint.y = $math.fitToRange(startPoint.y, -1, this.pixelHeight + 1);\n endPoint.y = $math.fitToRange(endPoint.y, -1, this.pixelHeight + 1);\n if (startPoint.y == endPoint.y && (startPoint.y < 0 || startPoint.y > this.pixelHeight)) {\n axisBreak.fillShape.__disabled = true;\n } else {\n axisBreak.fillShape.__disabled = false;\n }\n var w = Math.abs(x2 - x1);\n startLine.x = x1;\n startLine.height = 0;\n startLine.width = w;\n endLine.x = x1;\n endLine.height = 0;\n endLine.width = w;\n fillShape.width = w;\n fillShape.height = Math.abs(endPoint.y - startPoint.y);\n fillShape.x = x1;\n fillShape.y = endPoint.y;\n };\n /**\r\n * Creates visual elements for and axis break.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axisBreak Axis break\r\n */\n AxisRendererY.prototype.createBreakSprites = function (axisBreak) {\n axisBreak.startLine = new WavedLine();\n axisBreak.endLine = new WavedLine();\n var wavedRectangle = new WavedRectangle();\n wavedRectangle.setWavedSides(true, false, true, false);\n axisBreak.fillShape = wavedRectangle;\n };\n /**\r\n * Converts a position on the axis to a coordinate in pixels.\r\n *\r\n * @ignore Exclude from docs\r\n * @param position Position (0-1)\r\n * @return Coordinate (px)\r\n */\n AxisRendererY.prototype.positionToCoordinate = function (position) {\n var coordinate;\n var axis = this.axis;\n var axisFullLength = axis.axisFullLength;\n if (!axis.renderer.inversed) {\n coordinate = (axis.end - position) * axisFullLength;\n } else {\n coordinate = (position - axis.start) * axisFullLength;\n }\n return $math.round(coordinate, 1);\n };\n return AxisRendererY;\n}(AxisRenderer);\nexport { AxisRendererY };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"AxisRendererY\"] = AxisRendererY;\n/**\r\n * Add default responsive rules\r\n */\n/**\r\n * Put labels inside plot area.\r\n * Disable first and last labels.\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.widthS,\n state: function state(target, stateId) {\n if (target instanceof AxisRendererY) {\n var state = target.states.create(stateId);\n state.properties.inside = true;\n state.properties.maxLabelPosition = 0.9;\n state.properties.minLabelPosition = 0.1;\n return state;\n }\n return null;\n }\n});\n/**\r\n * Disable labels altogather on very small charts\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.widthXS,\n state: function state(target, stateId) {\n if (target instanceof AxisRendererY) {\n var state = target.states.create(stateId);\n state.properties.disabled = true;\n return state;\n }\n return null;\n }\n});","/**\r\n * A module which defines functionality related to Value Axis Break.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { AxisBreak } from \"./AxisBreak\";\nimport { registry } from \"../../core/Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Base class to define \"breaks\" on value axis.\r\n *\r\n * A \"break\" can be used to \"cut out\" specific ranges of the axis scale, e.g.\r\n * when comparing columns with relatively similar values, it would make sense\r\n * to cut out their mid section, so that their tip differences are more\r\n * prominent.\r\n *\r\n * @see {@link IValueAxisBreakEvents} for a list of available events\r\n * @see {@link IValueAxisBreakAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar ValueAxisBreak = /** @class */function (_super) {\n tslib_1.__extends(ValueAxisBreak, _super);\n /**\r\n * Constructor\r\n */\n function ValueAxisBreak() {\n var _this = _super.call(this) || this;\n _this.className = \"ValueAxisBreak\";\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(ValueAxisBreak.prototype, \"startPosition\", {\n /**\r\n * Pixel position of the break's start.\r\n *\r\n * @return Position (px)\r\n * @readonly\r\n */\n get: function get() {\n if (this.axis) {\n return this.axis.valueToPosition(this.adjustedStartValue);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValueAxisBreak.prototype, \"endPosition\", {\n /**\r\n * Pixel position of the break's end.\r\n *\r\n * @return Position (px)\r\n * @readonly\r\n */\n get: function get() {\n if (this.axis) {\n return this.axis.valueToPosition(this.adjustedEndValue);\n }\n },\n enumerable: true,\n configurable: true\n });\n return ValueAxisBreak;\n}(AxisBreak);\nexport { ValueAxisBreak };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"ValueAxisBreak\"] = ValueAxisBreak;","/**\r\n * Value Axis module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Axis, AxisDataItem } from \"./Axis\";\nimport { AxisRendererY } from \"./AxisRendererY\";\nimport { MultiDisposer } from \"../../core/utils/Disposer\";\nimport { registry } from \"../../core/Registry\";\nimport { ValueAxisBreak } from \"./ValueAxisBreak\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $object from \"../../core/utils/Object\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $utils from \"../../core/utils/Utils\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[ValueAxis]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar ValueAxisDataItem = /** @class */function (_super) {\n tslib_1.__extends(ValueAxisDataItem, _super);\n /**\r\n * Constructor\r\n */\n function ValueAxisDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"ValueAxisDataItem\";\n _this.values.value = {};\n _this.values.endValue = {};\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(ValueAxisDataItem.prototype, \"value\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.values[\"value\"].value;\n },\n /**\r\n * A data point's numeric value.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setValue(\"value\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValueAxisDataItem.prototype, \"endValue\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.values[\"endValue\"].value;\n },\n /**\r\n * Data point's numeric end value.\r\n *\r\n * @param value End value\r\n */\n set: function set(value) {\n this.setValue(\"endValue\", value);\n },\n enumerable: true,\n configurable: true\n });\n return ValueAxisDataItem;\n}(AxisDataItem);\nexport { ValueAxisDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Used to create a value axis for the chart.\r\n *\r\n * ```TypeScript\r\n * // Create the axis\r\n * let valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\r\n *\r\n * // Set settings\r\n * valueAxis.title.text = \"Monthly Sales\";\r\n * ```\r\n * ```JavaScript\r\n * // Create the axis\r\n * var valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\r\n *\r\n * // Set settings\r\n * valueAxis.title.text = \"Monthly Sales\";\r\n * ```\r\n * ```JSON\r\n * \"yAxes\": [{\r\n * \"type\": \"ValueAxis\",\r\n * \"title\": {\r\n * \"text\": \"Monthly Sales\"\r\n * }\r\n * }]\r\n * ```\r\n *\r\n * @see {@link IValueAxisEvents} for a list of available Events\r\n * @see {@link IValueAxisAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar ValueAxis = /** @class */function (_super) {\n tslib_1.__extends(ValueAxis, _super);\n /**\r\n * Constructor\r\n */\n function ValueAxis() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * [_stepDecimalPlaces description]\r\n *\r\n * @todo Description\r\n */\n _this._stepDecimalPlaces = 0;\n /**\r\n * Base value for the axis.\r\n */\n _this._baseValue = 0;\n /**\r\n * Adjusted start in case we have breaks.\r\n *\r\n * @todo Description\r\n */\n _this._adjustedStart = 0;\n /**\r\n * Adjusted end in case we have breaks.\r\n *\r\n * @todo Description\r\n */\n _this._adjustedEnd = 1;\n _this._extremesChanged = false;\n _this._deltaMinMax = 1;\n /**\r\n * As calculating totals is expensive operation and not often needed, we\r\n * don't do it by default.\r\n *\r\n * In case you use `totalPercent` or `total` in your charts, this must be set\r\n * to `true`.\r\n *\r\n * @default false\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/xy-chart/#100_stacks} For using `calculateTotals` for 100% stacked series.\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-strings/#Placeholders_for_numeric_values} For using `calculateTotals` in labels.\r\n */\n _this.calculateTotals = false;\n _this.className = \"ValueAxis\";\n // Set field name\n _this.axisFieldName = \"value\";\n // Set defaults\n _this.setPropertyValue(\"maxZoomFactor\", 1000);\n _this.setPropertyValue(\"extraMin\", 0);\n _this.setPropertyValue(\"extraMax\", 0);\n _this.setPropertyValue(\"strictMinMax\", false);\n _this.setPropertyValue(\"maxPrecision\", Number.MAX_VALUE);\n _this.keepSelection = false;\n _this.includeRangesInMinMax = false;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Holds reference to a function that accepts a DataItem as parameter.\r\n *\r\n * It can either return a fill opacity for a fill, or manipulate data item\r\n * directly, to create various highlighting scenarios.\r\n */\n ValueAxis.prototype.fillRule = function (dataItem) {\n var value = dataItem.value;\n var axis = dataItem.component;\n if (!dataItem.axisFill.disabled) {\n // rounding in left to solve floating point number\n if ($math.round(value / axis.step / 2, 5) == Math.round(value / axis.step / 2)) {\n dataItem.axisFill.__disabled = true;\n } else {\n dataItem.axisFill.__disabled = false;\n }\n }\n };\n /**\r\n * Returns a new/empty [[DataItem]] of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n ValueAxis.prototype.createDataItem = function () {\n return new ValueAxisDataItem();\n };\n /**\r\n * Returns a new/empty [[AxisBreak]] of the appropriate type.\r\n *\r\n * @return Axis break\r\n */\n ValueAxis.prototype.createAxisBreak = function () {\n return new ValueAxisBreak();\n };\n /**\r\n * [dataChangeUpdate description]\r\n *\r\n * This is a placeholder to override for extending classes.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n ValueAxis.prototype.dataChangeUpdate = function () {\n if (!this.keepSelection) {\n if (this._start != 0 || this._end != 1) {\n this._start = 0;\n this._end = 1;\n this.dispatchImmediately(\"startendchanged\");\n }\n } else {\n if (this._start != 0) {\n this.dispatchImmediately(\"startchanged\");\n }\n if (this._end != 1) {\n this.dispatchImmediately(\"endchanged\");\n }\n if (this._start != 0 || this._end != 1) {\n this.dispatchImmediately(\"startendchanged\");\n }\n }\n this._maxZoomed = this._maxDefined;\n this._minZoomed = this._minDefined;\n this._maxAdjusted = this._maxDefined;\n this._minAdjusted = this._minDefined;\n };\n /**\r\n * Processes data items of the related Series.\r\n *\r\n * @ignore Exclude from docs\r\n */\n ValueAxis.prototype.processSeriesDataItems = function () {\n // @todo: add some boolean (maybe autodedect) if we need these calculations or not. this place uses a lot of cpu\n if (this.calculateTotals) {\n var series = this.series.getIndex(0);\n var startIndex = series.startIndex;\n if (series.dataItems.length > 0) {\n if (startIndex > 0) {\n startIndex--;\n }\n var endIndex = series.endIndex;\n if (endIndex < series.dataItems.length) {\n endIndex++;\n }\n var _loop_1 = function _loop_1(i) {\n // This has to be `var` in order to avoid garbage collection\n var total = {};\n this_1.series.each(function (series) {\n if (!series.excludeFromTotal) {\n var dataItem_1 = series.dataItems.getIndex(i);\n if (dataItem_1) {\n $object.each(dataItem_1.values, function (key) {\n var value = dataItem_1.values[key].workingValue; // can not use getWorkingValue here!\n if ($type.isNumber(value)) {\n if (!$type.isNumber(total[key])) {\n total[key] = Math.abs(value);\n } else {\n total[key] += Math.abs(value);\n }\n }\n });\n }\n }\n });\n this_1.series.each(function (series) {\n if (!series.excludeFromTotal) {\n var dataItem_2 = series.dataItems.getIndex(i);\n if (dataItem_2) {\n $object.each(dataItem_2.values, function (key) {\n var value = dataItem_2.values[key].workingValue; // can not use getWorkingValue here!\n if ($type.isNumber(value)) {\n dataItem_2.setCalculatedValue(key, total[key], \"total\");\n dataItem_2.setCalculatedValue(key, 100 * value / total[key], \"totalPercent\");\n }\n });\n }\n }\n });\n };\n var this_1 = this;\n // This has to be `var` in order to avoid garbage collection\n for (var i = startIndex; i < endIndex; ++i) {\n _loop_1(i);\n }\n }\n }\n };\n /**\r\n * Validates the whole axis. Causes it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n */\n ValueAxis.prototype.validate = function () {\n if (this.axisLength <= 0) {\n return;\n }\n _super.prototype.validate.call(this);\n this.getMinMax();\n this.fixAxisBreaks();\n this.calculateZoom();\n this.validateAxisElements();\n this.validateAxisRanges();\n this.validateBreaks();\n this.hideUnusedDataItems();\n this.renderer.invalidateLayout();\n // hide too close\n //this.hideTooCloseDataItems();\n };\n /**\r\n * Calculates all positions, related to axis as per current zoom.\r\n *\r\n * @ignore Exclude from docs\r\n */\n ValueAxis.prototype.calculateZoom = function () {\n if ($type.isNumber(this.min) && $type.isNumber(this.max)) {\n var min = this.positionToValue(this.start);\n var max = this.positionToValue(this.end);\n var differece = this.adjustDifference(min, max);\n var minMaxStep = this.adjustMinMax(min, max, differece, this._gridCount, true);\n min = minMaxStep.min;\n max = minMaxStep.max;\n this._adjustedStart = $math.round((min - this.min) / (this.max - this.min), 5);\n this._adjustedEnd = $math.round((max - this.min) / (this.max - this.min), 5);\n this._step = minMaxStep.step;\n this._stepDecimalPlaces = $utils.decimalPlaces(this._step);\n if (this._minZoomed != min || this._maxZoomed != max) {\n this._minZoomed = min;\n this._maxZoomed = max;\n this.dispatchImmediately(\"selectionextremeschanged\");\n }\n } else {\n this._adjustedStart = this.start;\n this._adjustedEnd = this.end;\n }\n };\n /**\r\n * Validates Axis elements.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n ValueAxis.prototype.validateAxisElements = function () {\n var _this = this;\n if ($type.isNumber(this.max) && $type.isNumber(this.min)) {\n // first regular items\n var value_1 = this.minZoomed - this._step * 2;\n if (!this.logarithmic) {\n value_1 = Math.floor(value_1 / this._step) * this._step;\n } else {\n var differencePower = Math.log(this.max) * Math.LOG10E - Math.log(this.min) * Math.LOG10E;\n if (differencePower > 1) {\n value_1 = Math.pow(10, Math.log(this.min) * Math.LOG10E);\n } else {\n value_1 = Math.floor(this.minZoomed / this._step) * this._step;\n if (value_1 == 0) {\n value_1 = this.minZoomed;\n }\n }\n }\n var maxZoomed = this._maxZoomed + this._step;\n this.resetIterators();\n var dataItemsIterator_1 = this._dataItemsIterator;\n var i = 0;\n while (value_1 <= maxZoomed) {\n var axisBreak = this.isInBreak(value_1);\n if (!axisBreak) {\n var dataItem = dataItemsIterator_1.find(function (x) {\n return x.value === value_1;\n });\n if (dataItem.__disabled) {\n dataItem.__disabled = false;\n }\n //this.processDataItem(dataItem);\n this.appendDataItem(dataItem);\n dataItem.axisBreak = undefined;\n if (dataItem.value != value_1) {\n dataItem.value = value_1;\n dataItem.text = this.formatLabel(value_1);\n if (dataItem.label && dataItem.label.invalid) {\n dataItem.label.validate();\n }\n if (dataItem.value > this.min && dataItem.value < this.max) {\n if (dataItem.label && (dataItem.label.measuredWidth > this.ghostLabel.measuredWidth || dataItem.label.measuredHeight > this.ghostLabel.measuredHeight)) {\n this.ghostLabel.text = dataItem.label.text;\n }\n }\n }\n this.validateDataElement(dataItem);\n }\n i++;\n if (!this.logarithmic) {\n value_1 += this._step;\n } else {\n var differencePower = Math.log(this.max) * Math.LOG10E - Math.log(this.min) * Math.LOG10E;\n if (differencePower > 1) {\n value_1 = Math.pow(10, Math.log(this.min) * Math.LOG10E + i);\n } else {\n value_1 += this._step;\n }\n }\n var stepPower = Math.pow(10, Math.floor(Math.log(Math.abs(this._step)) * Math.LOG10E));\n if (stepPower < 1) {\n // exponent is less then 1 too. Count decimals of exponent\n var decCount = Math.round(Math.abs(Math.log(Math.abs(stepPower)) * Math.LOG10E)) + 2;\n // round value to avoid floating point issues\n value_1 = $math.round(value_1, decCount);\n }\n }\n var axisBreaks = this.axisBreaks;\n // breaks later\n var renderer_1 = this.renderer;\n $iter.each(axisBreaks.iterator(), function (axisBreak) {\n if (axisBreak.breakSize > 0) {\n // only add grid if gap is bigger then minGridDistance\n if ($math.getDistance(axisBreak.startPoint, axisBreak.endPoint) > renderer_1.minGridDistance) {\n var breakValue_1 = axisBreak.adjustedMin;\n while (breakValue_1 <= axisBreak.adjustedMax) {\n if (breakValue_1 >= axisBreak.adjustedStartValue && breakValue_1 <= axisBreak.adjustedEndValue) {\n var dataItem = dataItemsIterator_1.find(function (x) {\n return x.value === breakValue_1;\n });\n if (dataItem.__disabled) {\n dataItem.__disabled = false;\n }\n //this.processDataItem(dataItem);\n _this.appendDataItem(dataItem);\n dataItem.axisBreak = axisBreak;\n if (dataItem.value != breakValue_1) {\n dataItem.value = breakValue_1;\n dataItem.text = _this.formatLabel(breakValue_1);\n if (dataItem.label && dataItem.label.invalid) {\n dataItem.label.validate();\n }\n }\n _this.validateDataElement(dataItem);\n }\n breakValue_1 += axisBreak.adjustedStep;\n }\n }\n }\n });\n }\n };\n /**\r\n * Validates axis data item.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param dataItem Data item\r\n */\n ValueAxis.prototype.validateDataElement = function (dataItem) {\n _super.prototype.validateDataElement.call(this, dataItem);\n //dataItem.__disabled = false;\n var renderer = this.renderer;\n var value = dataItem.value;\n var endValue = dataItem.endValue;\n var position = this.valueToPosition(value);\n dataItem.position = position;\n var endPosition = position;\n var fillEndPosition = this.valueToPosition(value + this._step);\n if ($type.isNumber(endValue)) {\n endPosition = this.valueToPosition(endValue);\n fillEndPosition = endPosition;\n }\n // this point is needed to calculate distance to satisfy minGridDistance\n dataItem.point = renderer.positionToPoint(position);\n var tick = dataItem.tick;\n if (tick && !tick.disabled) {\n renderer.updateTickElement(tick, position, endPosition);\n }\n var grid = dataItem.grid;\n if (grid && !grid.disabled) {\n renderer.updateGridElement(grid, position, endPosition);\n }\n var label = dataItem.label;\n if (label && !label.disabled) {\n renderer.updateLabelElement(label, position, endPosition);\n }\n var fill = dataItem.axisFill;\n if (fill && !fill.disabled) {\n renderer.updateFillElement(fill, position, fillEndPosition);\n if (!dataItem.isRange) {\n this.fillRule(dataItem);\n }\n }\n var mask = dataItem.mask;\n if (mask) {\n renderer.updateFillElement(mask, position, fillEndPosition);\n }\n };\n /**\r\n * Formats the value according to axis' own [[NumberFormatter]].\r\n *\r\n * @param value Source value\r\n * @return Formatted value\r\n */\n ValueAxis.prototype.formatLabel = function (value) {\n return this.numberFormatter.format(value);\n };\n Object.defineProperty(ValueAxis.prototype, \"basePoint\", {\n /**\r\n * Coordinates of the actual axis start.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Base point\r\n */\n get: function get() {\n var baseValue = this._baseValue;\n var position = this.valueToPosition(baseValue);\n var basePoint = this.renderer.positionToPoint(position);\n return basePoint;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValueAxis.prototype, \"baseValue\", {\n /**\r\n * @return base value\r\n */\n get: function get() {\n if (this.logarithmic) {\n return this.min;\n } else {\n return this._baseValue;\n }\n },\n /**\r\n * A base value.\r\n *\r\n * This is a threshold value that will divide \"positive\" and \"negative\"\r\n * value ranges.\r\n *\r\n * Other scale-related functionality also depend on base value. E.g. stacks,\r\n * value-dependent coloring, etc.\r\n *\r\n * @param value Base value\r\n */\n set: function set(value) {\n this._baseValue = value;\n this.invalidateLayout();\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Converts a numeric value to relative position on axis\r\n *\r\n * An alias to `valueToPosition()`.\r\n *\r\n * @param value Value\r\n * @return Position\r\n */\n ValueAxis.prototype.anyToPosition = function (value) {\n return this.valueToPosition(value);\n };\n /**\r\n * Converts a numeric value to orientation point (x, y, angle) on axis\r\n *\r\n * @param value Value\r\n * @return Orientation point\r\n */\n ValueAxis.prototype.valueToPoint = function (value) {\n var position = this.valueToPosition(value);\n var point = this.renderer.positionToPoint(position);\n var angle = this.renderer.positionToAngle(position);\n return {\n x: point.x,\n y: point.y,\n angle: angle\n };\n };\n /**\r\n * Converts a numeric value to orientation (x, y, angle) point on axis\r\n *\r\n * @param value Value\r\n * @return Orientation point\r\n */\n ValueAxis.prototype.anyToPoint = function (value) {\n return this.valueToPoint(value);\n };\n /**\r\n * Converts a numeric value to relative position on axis.\r\n *\r\n * @param value Value\r\n * @return relative position\r\n */\n ValueAxis.prototype.valueToPosition = function (value) {\n if ($type.isNumber(value)) {\n // todo: think if possible to take previous value and do not go through all previous breaks\n var min_1 = this.min;\n var max_1 = this.max;\n if ($type.isNumber(min_1) && $type.isNumber(max_1)) {\n var difference = this._difference;\n var axisBreaks = this.axisBreaks;\n if (axisBreaks.length > 0) {\n $iter.eachContinue(axisBreaks.iterator(), function (axisBreak) {\n var startValue = axisBreak.adjustedStartValue;\n var endValue = axisBreak.adjustedEndValue;\n if ($type.isNumber(startValue) && $type.isNumber(endValue)) {\n if (value < startValue) {\n return false;\n }\n if ($math.intersect({\n start: startValue,\n end: endValue\n }, {\n start: min_1,\n end: max_1\n })) {\n // todo: check this once and set some flag in axisBreak\n startValue = Math.max(startValue, min_1);\n endValue = Math.min(endValue, max_1);\n var breakSize = axisBreak.breakSize;\n // value to the right of break end\n if (value > endValue) {\n min_1 += (endValue - startValue) * (1 - breakSize); // todo: maybe this can be done differently?\n }\n // value to the left of break start\n else if (value < startValue) {}\n // value within break\n else {\n value = startValue + (value - startValue) * breakSize;\n }\n }\n }\n return true;\n });\n }\n var position = void 0;\n if (!this.logarithmic) {\n position = (value - min_1) / difference;\n } else {\n position = (Math.log(value) * Math.LOG10E - Math.log(this.min) * Math.LOG10E) / (Math.log(this.max) * Math.LOG10E - Math.log(this.min) * Math.LOG10E);\n }\n //position = $math.round(position, 10);\n return position;\n }\n }\n return 0;\n };\n /**\r\n * Converts an relative position to a corresponding value within\r\n * axis' scale.\r\n *\r\n * @param position Position (px)\r\n * @return Value\r\n */\n ValueAxis.prototype.positionToValue = function (position) {\n position = $math.round(position, 10);\n var min = this.min;\n var max = this.max;\n if ($type.isNumber(min) && $type.isNumber(max)) {\n var difference_1 = max - min; //no need to adjust!\n var axisBreaks = this.axisBreaks;\n var value_2 = null;\n // in case we have some axis breaks\n if (axisBreaks.length > 0) {\n $iter.eachContinue(axisBreaks.iterator(), function (axisBreak) {\n var breakStartPosition = axisBreak.startPosition;\n var breakEndPosition = axisBreak.endPosition;\n var breakStartValue = axisBreak.adjustedStartValue;\n var breakEndValue = axisBreak.adjustedEndValue;\n if ($type.isNumber(breakStartValue) && $type.isNumber(breakEndValue)) {\n if (breakStartValue > max) {\n return false;\n }\n if ($math.intersect({\n start: breakStartValue,\n end: breakEndValue\n }, {\n start: min,\n end: max\n })) {\n breakStartValue = $math.max(breakStartValue, min);\n breakEndValue = $math.min(breakEndValue, max);\n var breakSize = axisBreak.breakSize;\n difference_1 -= (breakEndValue - breakStartValue) * (1 - breakSize);\n // position to the right of break end\n if (position > breakEndPosition) {\n min += (breakEndValue - breakStartValue) * (1 - breakSize);\n }\n // position to the left of break start\n else if (position < breakStartPosition) {}\n // value within break\n else {\n var breakPosition = (position - breakStartPosition) / (breakEndPosition - breakStartPosition);\n value_2 = breakStartValue + breakPosition * (breakEndValue - breakStartValue);\n return false;\n }\n }\n return true;\n }\n });\n }\n if (!$type.isNumber(value_2)) {\n if (this.logarithmic) {\n value_2 = Math.pow(Math.E, (position * (Math.log(this.max) * Math.LOG10E - Math.log(this.min) * Math.LOG10E) + Math.log(this.min) * Math.LOG10E) / Math.LOG10E);\n } else {\n value_2 = position * difference_1 + min;\n }\n }\n return value_2;\n }\n //}\n };\n /**\r\n * Converts an X coordinate to a relative value in axis' scale.\r\n *\r\n * @param x X (px)\r\n * @return Value\r\n */\n ValueAxis.prototype.xToValue = function (x) {\n return this.positionToValue(this.pointToPosition({\n x: x,\n y: 0\n }));\n };\n /**\r\n * Converts an Y coordinate to a relative value in axis' scale.\r\n *\r\n * @param y Y (px)\r\n * @return Value\r\n */\n ValueAxis.prototype.yToValue = function (y) {\n return this.positionToValue(this.pointToPosition({\n x: 0,\n y: y\n }));\n };\n /**\r\n * Converts pixel coordinates to a relative position. (0-1)\r\n *\r\n * @param point Coorinates (px)\r\n * @return Position (0-1)\r\n */\n ValueAxis.prototype.pointToPosition = function (point) {\n if (this.renderer instanceof AxisRendererY) {\n return 1 - this.renderer.pointToPosition(point);\n } else {\n return this.renderer.pointToPosition(point);\n }\n };\n /**\r\n * Calculates smallest and biggest value for the axis scale.\r\n * @ignore\r\n * @todo Description (review)\r\n */\n ValueAxis.prototype.getMinMax = function () {\n var _this = this;\n this.updateGridCount();\n var min = Number.POSITIVE_INFINITY;\n var max = Number.NEGATIVE_INFINITY;\n // only if min and max are not set from outside, we go through min and max influencers\n if (!$type.isNumber(this._minDefined) || !$type.isNumber(this._maxDefined)) {\n this.series.each(function (series) {\n if (!series.ignoreMinMax) {\n // check min\n var seriesMin = series.min(_this);\n if ($type.isNumber(seriesMin) && seriesMin < min) {\n min = seriesMin;\n }\n // check max\n var seriesMax = series.max(_this);\n if ($type.isNumber(seriesMax) && seriesMax > max) {\n max = seriesMax;\n }\n }\n });\n if (this.includeRangesInMinMax) {\n this.axisRanges.each(function (range) {\n if (!range.ignoreMinMax) {\n var minValue = $math.min(range.value, range.endValue);\n var maxValue = $math.max(range.value, range.endValue);\n if (minValue < min || !$type.isNumber(min)) {\n min = minValue;\n }\n if (maxValue > max || !$type.isNumber(max)) {\n max = maxValue;\n }\n }\n });\n }\n }\n if (this.logarithmic) {\n if (min <= 0) {\n throw Error(\"Logarithmic value axis can not have vales <= 0.\");\n }\n }\n if (min == 0 && max == 0) {\n max = 0.9;\n min = -0.9;\n }\n // if defined from outside\n if ($type.isNumber(this._minDefined)) {\n min = this._minDefined;\n }\n if ($type.isNumber(this._maxDefined)) {\n max = this._maxDefined;\n }\n if (!$type.isNumber(min) || !$type.isNumber(max)) {\n return;\n }\n this._minReal = min;\n this._maxReal = max;\n if (min == Number.POSITIVE_INFINITY) {\n min = undefined;\n }\n if (max == Number.NEGATIVE_INFINITY) {\n max = undefined;\n }\n var dif = this.adjustDifference(min, max); // previously it was max-min, but not worked well\n min = this.fixMin(min);\n max = this.fixMax(max);\n // this happens if starLocation and endLocation are 0.5 and DateAxis has only one date\n if (max - min <= 0.00000001) {\n if (max - min != 0) {\n this._deltaMinMax = 0.00000001;\n } else {\n this._deltaMinMax = 1;\n }\n min -= this._deltaMinMax;\n max += this._deltaMinMax;\n }\n min -= (max - min) * this.extraMin;\n max += (max - min) * this.extraMax;\n var strict = this.strictMinMax;\n if ($type.isNumber(this._maxDefined)) {\n strict = true;\n }\n var minMaxStep = this.adjustMinMax(min, max, dif, this._gridCount, strict);\n min = minMaxStep.min;\n max = minMaxStep.max;\n dif = max - min; //new\n // do it for the second time (importat!)\n minMaxStep = this.adjustMinMax(min, max, max - min, this._gridCount, true);\n min = minMaxStep.min;\n max = minMaxStep.max;\n // return min max if strict\n if (this.strictMinMax) {\n if ($type.isNumber(this._minDefined)) {\n min = this._minDefined;\n } else {\n min = this._minReal;\n }\n if ($type.isNumber(this._maxDefined)) {\n max = this._maxDefined;\n } else {\n max = this._maxReal;\n }\n if (max - min <= 0.00000001) {\n min -= this._deltaMinMax;\n max += this._deltaMinMax;\n }\n }\n // checking isNumber is good when all series are hidden\n if ((this._minAdjusted != min || this._maxAdjusted != max) && $type.isNumber(min) && $type.isNumber(max)) {\n var animation = this._minMaxAnimation;\n if (this._extremesChanged && $type.isNumber(this._minAdjusted) && $type.isNumber(this._maxAdjusted) && this.inited) {\n if (animation && !animation.isFinished() && this._finalMax == max && this._finalMin == min) {\n return;\n } else {\n this._finalMin = min;\n this._finalMax = max;\n animation = this.animate([{\n property: \"_minAdjusted\",\n from: this._minAdjusted,\n to: min\n }, {\n property: \"_maxAdjusted\",\n from: this._maxAdjusted,\n to: max\n }], this.rangeChangeDuration);\n if (animation && !animation.isFinished()) {\n animation.events.on(\"animationprogress\", this.validateDataItems, this);\n animation.events.on(\"animationended\", function () {\n _this.validateDataItems();\n _this.series.each(function (series) {\n series.validate();\n });\n _this.handleSelectionExtremesChange();\n });\n this._minMaxAnimation = animation;\n } else {\n this.series.each(function (series) {\n series.validate();\n });\n }\n this.validateDataItems();\n this.dispatchImmediately(\"extremeschanged\");\n this.handleSelectionExtremesChange();\n }\n } else {\n if (animation && !animation.isFinished() && this._finalMax == max && this._finalMin == min) {\n return;\n } else {\n this._minAdjusted = min;\n this._maxAdjusted = max;\n this._finalMin = min;\n this._finalMax = max;\n this.invalidateDataItems();\n this.dispatchImmediately(\"extremeschanged\");\n }\n }\n }\n this._extremesChanged = false;\n this._difference = this.adjustDifference(min, max);\n };\n /**\r\n * Adjusts the minimum value.\r\n *\r\n * This is a placeholder method for extending classes to override.\r\n *\r\n * For numeric values this does nothing, however for more complex types, like\r\n * dates, it may be necessary to adjust.\r\n *\r\n * @param value Value\r\n * @return Adjusted value\r\n */\n ValueAxis.prototype.fixMin = function (value) {\n return value;\n };\n /**\r\n * Adjusts the maximum value.\r\n *\r\n * This is a placeholder method for extending classes to override.\r\n *\r\n * For numeric values this does nothing, however for more complex types, like\r\n * dates, it may be necessary to adjust.\r\n *\r\n * @param value Value\r\n * @return Adjusted value\r\n */\n ValueAxis.prototype.fixMax = function (value) {\n return value;\n };\n /**\r\n * Adjusts actual min and max scale values so that the axis starts and ends\r\n * at \"nice\" values, unless `strictMinMax` is set.\r\n *\r\n * The `difference` can be something else than `max - min`, because of the\r\n * axis breaks.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param min [description]\r\n * @param max [description]\r\n * @param difference [description]\r\n * @param gridCount [description]\r\n * @param strictMode [description]\r\n * @return [description]\r\n */\n ValueAxis.prototype.adjustMinMax = function (min, max, difference, gridCount, strictMode) {\n // will fail if 0\n if (gridCount <= 1) {\n gridCount = 1;\n }\n gridCount = Math.round(gridCount);\n var initialMin = min;\n var initialMax = max;\n // in case min and max is the same, use max\n if (difference === 0) {\n difference = Math.abs(max);\n }\n // the number by which we need to raise 10 to get difference\n var exponent = Math.log(Math.abs(difference)) * Math.LOG10E;\n // here we find a number which is power of 10 and has the same count of numbers as difference has\n var power = Math.pow(10, Math.floor(exponent));\n // reduce this number by 10 times\n power = power / 10;\n var extra = power;\n if (strictMode) {\n extra = 0;\n }\n if (!this.logarithmic) {\n // round down min\n if (strictMode) {\n min = Math.floor(min / power) * power;\n // round up max\n max = Math.ceil(max / power) * power;\n } else {\n min = Math.ceil(min / power) * power - extra;\n // round up max\n max = Math.floor(max / power) * power + extra;\n }\n // don't let min go below 0 if real min is >= 0\n if (min < 0 && initialMin >= 0) {\n min = 0;\n }\n // don't let max go above 0 if real max is <= 0\n if (max > 0 && initialMax <= 0) {\n max = 0;\n }\n } else {\n if (min <= 0) {\n //throw Error(\"Logarithmic value axis can not have vales <= 0.\");\n min = this.baseValue;\n }\n // @todo: think of a better way or to restrict zooming when no series are selected\n if (min == Infinity) {\n min = 1;\n }\n if (max == -Infinity) {\n max = 10;\n }\n min = Math.pow(10, Math.floor(Math.log(Math.abs(min)) * Math.LOG10E));\n max = Math.pow(10, Math.ceil(Math.log(Math.abs(max)) * Math.LOG10E));\n }\n // repeat diff, exponent and power again with rounded values\n //difference = this.adjustDifference(min, max);\n /*\r\n if(min > initialMin){\r\n min = initialMin;\r\n }\r\n if(max < initialMax){\r\n max = initialMax;\r\n }\r\n */\n exponent = Math.log(Math.abs(difference)) * Math.LOG10E;\n power = Math.pow(10, Math.floor(exponent));\n power = power / 10;\n // approximate difference between two grid lines\n var step = Math.ceil(difference / gridCount / power) * power;\n var stepPower = Math.pow(10, Math.floor(Math.log(Math.abs(step)) * Math.LOG10E));\n // TODO: in v3 I had fixStepE here, ommiting it for a while, need to think about other solution\n // the step should divide by 2, 5, and 10.\n var stepDivisor = Math.ceil(step / stepPower); // number 0 - 10\n if (stepDivisor > 5) {\n stepDivisor = 10;\n } else if (stepDivisor <= 5 && stepDivisor > 2) {\n stepDivisor = 5;\n }\n // now get real step\n step = Math.ceil(step / (stepPower * stepDivisor)) * stepPower * stepDivisor;\n if (this.maxPrecision < Number.MAX_VALUE && step != $math.ceil(step, this.maxPrecision)) {\n step = $math.ceil(step, this.maxPrecision);\n }\n var decCount = 0;\n // in case numbers are smaller than 1\n if (stepPower < 1) {\n // exponent is less then 1 too. Count decimals of exponent\n decCount = Math.round(Math.abs(Math.log(Math.abs(stepPower)) * Math.LOG10E)) + 1;\n // round step\n step = $math.round(step, decCount);\n }\n if (!this.logarithmic) {\n // final min and max\n var minCount = Math.floor(min / step);\n min = $math.round(step * minCount, decCount);\n var maxCount = void 0;\n if (!strictMode) {\n maxCount = Math.ceil(max / step);\n } else {\n maxCount = Math.floor(max / step);\n }\n if (maxCount == minCount) {\n maxCount++;\n }\n max = $math.round(step * maxCount, decCount);\n if (max < initialMax) {\n max = max + step;\n }\n if (min > initialMin) {\n min = min - step;\n }\n }\n return {\n min: min,\n max: max,\n step: step\n };\n };\n Object.defineProperty(ValueAxis.prototype, \"min\", {\n /**\r\n * @return Min value\r\n */\n get: function get() {\n var min = this._minAdjusted;\n if (!$type.isNumber(min)) {\n min = this._minDefined;\n }\n return min;\n },\n /**\r\n * A minimum value for the axis scale.\r\n *\r\n * This value might be auto-adjusted by the Axis in order to accomodate the\r\n * grid nicely, i.e. plot area is divided by grid in nice equal cells.\r\n *\r\n * The above might be overridden by `strictMinMax` which will force exact\r\n * user-defined min and max values to be used for scale.\r\n *\r\n * @param value Min value\r\n */\n set: function set(value) {\n if (this._minDefined != value) {\n this._minDefined = value;\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValueAxis.prototype, \"extraMin\", {\n /**\r\n * @return {number}\r\n */\n get: function get() {\n return this.getPropertyValue(\"extraMin\");\n },\n /**\r\n * Allows relatively adjusting minimum value of the axis' scale.\r\n *\r\n * The value is relative to the actual range of values currently displayed\r\n * on the axis.\r\n *\r\n * E.g.: 0.5 will mean half of the current range. If we have axis displaying\r\n * from 100 to 200, we will now have axis displaying from 50 to 200 because\r\n * we asked to expand minimum value by 50% (0.5).\r\n *\r\n * @param {number}\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"extraMin\", value)) {\n this.invalidateDataItems();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValueAxis.prototype, \"extraMax\", {\n /**\r\n * @return Min multiplier\r\n */\n get: function get() {\n return this.getPropertyValue(\"extraMax\");\n },\n /**\r\n * Allows relatively adjusting maximum value of the axis' scale.\r\n *\r\n * The value is relative to the actual range of values currently displayed\r\n * on the axis.\r\n *\r\n * E.g.: 0.5 will mean half of the current range. If we have axis displaying\r\n * from 100 to 200, we will now have axis displaying from 100 to 250 because\r\n * we asked to expand maximum value by 50% (0.5).\r\n *\r\n * @param {number}\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"extraMax\", value)) {\n this.invalidateDataItems();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValueAxis.prototype, \"step\", {\n /**\r\n * Current calculated delta in values between two adjacent grid lines (step).\r\n *\r\n * This is a read-only value and cannot be used to set actual step.\r\n *\r\n * @readonly\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/axes/positioning-axis-elements/#Setting_the_density_of_the_the_grid_labels} For more information about modifying density of labels\r\n * @return [description]\r\n */\n get: function get() {\n return this._step;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValueAxis.prototype, \"max\", {\n /**\r\n * @return Max value\r\n */\n get: function get() {\n var max = this._maxAdjusted;\n if (!$type.isNumber(max)) {\n max = this._maxDefined;\n }\n return max;\n },\n /**\r\n * A maximum value for the axis scale.\r\n *\r\n * This value might be auto-adjusted by the Axis in order to accomodate the\r\n * grid nicely, i.e. plot area is divided by grid in nice equal cells.\r\n *\r\n * The above might be overridden by `strictMinMax` which will force exact\r\n * user-defined min and max values to be used for scale.\r\n *\r\n * @param value Max value\r\n */\n set: function set(value) {\n if (this._maxDefined != value) {\n this._maxDefined = value;\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Used for the Series to register itself as the user of this Axis.\r\n *\r\n * This will also decorate both the Series and Axis with event handlers, used\r\n * to redraw on Axis position/zoom change.\r\n *\r\n * A disposer for those events is returned, so that they can be disposed\r\n * together with Series.\r\n *\r\n * @ignore Exclude from docs\r\n * @param series Series\r\n * @return Disposer for events\r\n */\n ValueAxis.prototype.registerSeries = function (series) {\n return new MultiDisposer([_super.prototype.registerSeries.call(this, series), series.events.on(\"extremeschanged\", this.handleExtremesChange, this, false), series.events.on(\"selectionextremeschanged\", this.handleSelectionExtremesChange, this, false), this.events.on(\"extremeschanged\", series.invalidate, series, false)]);\n };\n /**\r\n * Perform tasks after Axis zoom.\r\n */\n ValueAxis.prototype.handleSelectionExtremesChange = function () {\n var _this = this;\n var selectionMin;\n var selectionMax;\n var allHidden = true;\n $iter.each(this.series.iterator(), function (series) {\n if (!series.ignoreMinMax && !series.isHidden) {\n if (series.visible && !series.isHiding) {\n allHidden = false;\n }\n var seriesSelectionMin = series.selectionMin(_this);\n var seriesSelectionMax = series.selectionMax(_this);\n if ($type.isNumber(seriesSelectionMin)) {\n if (!$type.isNumber(selectionMin) || seriesSelectionMin < selectionMin) {\n selectionMin = seriesSelectionMin;\n }\n }\n // check max\n if ($type.isNumber(seriesSelectionMax)) {\n if (!$type.isNumber(selectionMax) || seriesSelectionMax > selectionMax) {\n selectionMax = seriesSelectionMax;\n }\n }\n }\n });\n if (this.includeRangesInMinMax) {\n this.axisRanges.each(function (range) {\n if (!range.ignoreMinMax) {\n var minValue = $math.min(range.value, range.endValue);\n var maxValue = $math.max(range.value, range.endValue);\n if (minValue < selectionMax) {\n selectionMax = minValue;\n }\n if (maxValue > selectionMax) {\n selectionMax = maxValue;\n }\n }\n });\n }\n // this is not good, as if date axis is initially zoomed, selection of y axis is reset to 0, 1 at the end of this method\n //$iter.each(this.series.iterator(), (series) => {\n //\tif (!series.appeared) {\n //\t\tallHidden = true;\n //\t}\n //})\n if ($type.isNumber(this._minDefined)) {\n if (this.strictMinMax) {\n selectionMin = this._minDefined;\n } else {\n selectionMin = this.min;\n }\n } else if (this.strictMinMax) {\n selectionMin = this._minReal;\n }\n if ($type.isNumber(this._maxDefined)) {\n if (this.strictMinMax) {\n selectionMax = this._maxDefined;\n } else {\n selectionMax = this.max;\n }\n } else if (this.strictMinMax) {\n selectionMax = this._maxReal;\n }\n if (selectionMin == selectionMax) {\n selectionMin -= 1;\n selectionMax += 1;\n var minMaxStep2 = this.adjustMinMax(selectionMin, selectionMax, 0, this._gridCount, this.strictMinMax);\n selectionMin = minMaxStep2.min;\n selectionMax = minMaxStep2.max;\n }\n var dif = this.adjustDifference(selectionMin, selectionMax);\n var minMaxStep = this.adjustMinMax(selectionMin, selectionMax, dif, this._gridCount);\n selectionMin = minMaxStep.min;\n selectionMax = minMaxStep.max;\n selectionMin -= (selectionMax - selectionMin) * this.extraMin;\n selectionMax += (selectionMax - selectionMin) * this.extraMax;\n selectionMin = $math.fitToRange(selectionMin, this.min, this.max);\n selectionMax = $math.fitToRange(selectionMax, this.min, this.max);\n // do it for the second time !important\n dif = this.adjustDifference(selectionMin, selectionMax);\n minMaxStep = this.adjustMinMax(selectionMin, selectionMax, dif, this._gridCount, true);\n selectionMin = minMaxStep.min;\n selectionMax = minMaxStep.max;\n if (this.strictMinMax) {\n selectionMin = $math.max(selectionMin, this._minDefined);\n selectionMax = $math.min(selectionMax, this._maxDefined);\n }\n this._minZoomed = selectionMin;\n this._maxZoomed = selectionMax;\n this._step = minMaxStep.step;\n var start = this.valueToPosition(selectionMin);\n var end = this.valueToPosition(selectionMax);\n // in case all series are hidden or hiding, full zoomout\n if (allHidden) {\n start = 0;\n end = 1;\n }\n if (!this.keepSelection) {\n this.zoom({\n start: start,\n end: end\n }, false, false, 0);\n }\n };\n Object.defineProperty(ValueAxis.prototype, \"strictMinMax\", {\n /**\r\n * @return Use exact values?\r\n */\n get: function get() {\n return this.getPropertyValue(\"strictMinMax\");\n },\n /**\r\n * Indicates whether to blindly use exact `min` and `max` values set by user\r\n * when generating Axis scale.\r\n *\r\n * If not set, the Axis might slightly adjust those values to accomodate a\r\n * better looking grid.\r\n *\r\n * NOTE: if `min` and `max` are not set, setting `strictMinMax` to `true`\r\n * will result in fixing the scale of the axis to actual lowest and highest\r\n * values in the series within currently selected scope.\r\n *\r\n * @default false\r\n * @param value Use exact values?\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"strictMinMax\", value)) {\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValueAxis.prototype, \"logarithmic\", {\n /**\r\n * @return Logarithmic scale?\r\n */\n get: function get() {\n return this.getPropertyValue(\"logarithmic\");\n },\n /**\r\n * Indicates if this axis should use a logarithmic scale.\r\n *\r\n * Please note that logarithmic axis can **only** accommodate values bigger\r\n * than zero.\r\n *\r\n * Having zero or negative values will result in error and failure of the\r\n * whole chart.\r\n *\r\n * @param value Logarithmic scale?\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"logarithmic\", value)) {\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValueAxis.prototype, \"keepSelection\", {\n /**\r\n * @return Preseve zoom after data update?\r\n */\n get: function get() {\n return this.getPropertyValue(\"keepSelection\");\n },\n /**\r\n * Indicates if a current selection (zoom) should be kept across data updates.\r\n *\r\n * If your axis is zoomed while chart's data is updated, the axis will try\r\n * to retain the same start and end values.\r\n *\r\n * You can also use this to initially pre-zoom axis:\r\n *\r\n * ```TypeScript\r\n * axis.keepSelection = true;\r\n * axis.start = 0.5;\r\n * axis.end = 0.7;\r\n * ```\r\n * ```JavaScript\r\n * axis.keepSelection = true;\r\n * axis.start = 0.5;\r\n * axis.end = 0.7;\r\n * ```\r\n * ```JSON\r\n * {\r\n * \"xAxes\": [{\r\n * // ...\r\n * \"keepSelection\": true,\r\n * \"start\": 0.5,\r\n * \"end\": 0.7\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * The above will start the chart zoomed from the middle of the actual scope\r\n * to 70%.\r\n *\r\n * @since 4.1.1\r\n * @default flase\r\n * @param value Preseve zoom after data update?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"keepSelection\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValueAxis.prototype, \"includeRangesInMinMax\", {\n /**\r\n * @return Include ranges?\r\n */\n get: function get() {\n return this.getPropertyValue(\"includeRangesInMinMax\");\n },\n /**\r\n * If set to `true`, values of axis ranges will be included when calculating\r\n * range of values / scale of the [[ValueAxis]].\r\n *\r\n * @default false\r\n * @since 4.4.9\r\n * @param value Include ranges?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"includeRangesInMinMax\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValueAxis.prototype, \"maxPrecision\", {\n /**\r\n * @return max precision\r\n */\n get: function get() {\n return this.getPropertyValue(\"maxPrecision\");\n },\n /**\r\n * Maximum number of decimals to allow when placing grid lines and labels\r\n * on axis.\r\n *\r\n * Set it to `0` (zero) to force integer-only axis labels.\r\n *\r\n * @param {number}\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"maxPrecision\", value)) {\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Invalidates axis data items when series extremes change\r\n */\n ValueAxis.prototype.handleExtremesChange = function () {\n this._extremesChanged = true;\n this.getMinMax();\n if (this.ghostLabel) {\n var min = this.min;\n var max = this.max;\n var text = 0;\n if ($type.isNumber(min) && $type.isNumber(max) && min.toString().length > max.toString().length) {\n text = min;\n } else {\n text = max;\n }\n this.ghostLabel.text = this.formatLabel(text);\n }\n };\n /**\r\n * Returns the X coordinate for series' data item's value.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem Data item\r\n * @param key Data field to get value from\r\n * @param location Location (0-1)\r\n * @param stackKey ?\r\n * @return X coordinate (px)\r\n */\n ValueAxis.prototype.getX = function (dataItem, key, location, stackKey) {\n var value = dataItem.getWorkingValue(key);\n if (!$type.hasValue(stackKey)) {\n stackKey = \"valueX\";\n }\n var stack = dataItem.getValue(stackKey, \"stack\");\n if (!$type.isNumber(value)) {\n value = this.baseValue;\n if (this.logarithmic) {\n if (stack > 0) {\n value = 0;\n }\n }\n }\n return this.renderer.positionToPoint(this.valueToPosition(value + stack)).x;\n };\n /**\r\n * Returns the Y coordinate for series' data item's value.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem Data item\r\n * @param key Data field to get value from\r\n * @param location Location (0-1)\r\n * @param stackKey Stack ID\r\n * @return Y coordinate (px)\r\n */\n ValueAxis.prototype.getY = function (dataItem, key, location, stackKey) {\n var value = dataItem.getWorkingValue(key);\n if (!$type.hasValue(stackKey)) {\n stackKey = \"valueY\";\n }\n var stack = dataItem.getValue(stackKey, \"stack\");\n if (!$type.isNumber(value)) {\n value = this.baseValue;\n if (this.logarithmic) {\n if (stack > 0) {\n value = 0;\n }\n }\n }\n return this.renderer.positionToPoint(this.valueToPosition(value + stack)).y;\n };\n /**\r\n * Returns an angle for series data item.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem Data item\r\n * @param key Data field to get value from\r\n * @param location Location (0-1)\r\n * @param stackKey Stack ID\r\n * @return Angle\r\n */\n ValueAxis.prototype.getAngle = function (dataItem, key, location, stackKey) {\n var value = dataItem.getWorkingValue(key);\n var stack = dataItem.getValue(stackKey, \"stack\");\n if (!$type.isNumber(value)) {\n value = this.baseValue;\n }\n return this.positionToAngle(this.valueToPosition(value + stack));\n };\n /**\r\n * [getAnyRangePath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param start [description]\r\n * @param end [description]\r\n * @param location [description]\r\n * @return [description]\r\n */\n ValueAxis.prototype.getAnyRangePath = function (start, end, location) {\n var startPosition = this.valueToPosition(start);\n var endPosition = this.valueToPosition(end);\n return this.getPositionRangePath(startPosition, endPosition); // Base class (Axis) gets range shape from AxisRenderer\n };\n /**\r\n * Returns text to show in a axis tooltip, based on specific position within\r\n * axis.\r\n *\r\n * The label will be formatted as per [[NumberFormatter]] set for the whole\r\n * chart, or explicitly for this Axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param position Position (px)\r\n * @return Label (numeric value)\r\n */\n ValueAxis.prototype.getTooltipText = function (position) {\n var value = $math.round(this.positionToValue(position), this._stepDecimalPlaces);\n return this.adapter.apply(\"getTooltipText\", this.tooltip.numberFormatter.format(value));\n };\n /**\r\n * Zooms axis to specific values.\r\n *\r\n * @param startValue Start value\r\n * @param endValue End value\r\n * @param skipRangeEvent Do not invoke events\r\n * @param instantly Do not play zoom animations\r\n */\n ValueAxis.prototype.zoomToValues = function (startValue, endValue, skipRangeEvent, instantly) {\n var start = (startValue - this.min) / (this.max - this.min);\n var end = (endValue - this.min) / (this.max - this.min);\n this.zoom({\n start: start,\n end: end\n }, skipRangeEvent, instantly);\n };\n Object.defineProperty(ValueAxis.prototype, \"minZoomed\", {\n /**\r\n * A smallest value in axis scale within current zoom.\r\n *\r\n * @return Min zoom value\r\n */\n get: function get() {\n return $math.max(this.min, this._minZoomed);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValueAxis.prototype, \"maxZoomed\", {\n /**\r\n * A biggest value in axis scale within current zoom.\r\n * @return [description]\r\n */\n get: function get() {\n return $math.min(this.max, this._maxZoomed);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Updates positioning of Axis breaks after something changes.\r\n *\r\n * @ignore Exclude from docs\r\n */\n ValueAxis.prototype.fixAxisBreaks = function () {\n var _this = this;\n _super.prototype.fixAxisBreaks.call(this);\n var axisBreaks = this.axisBreaks;\n if (axisBreaks.length > 0) {\n // process breaks\n axisBreaks.each(function (axisBreak) {\n var startValue = axisBreak.adjustedStartValue;\n var endValue = axisBreak.adjustedEndValue;\n // break difference\n var axisBreakDif = endValue - startValue;\n var axisBreakGridCount = Math.ceil(axisBreakDif * axisBreak.breakSize) * _this._gridCount / (_this.max - _this.min);\n // calculate min, max and step for axis break\n var breakMinMaxStep = _this.adjustMinMax(startValue, endValue, axisBreakDif, axisBreakGridCount, true);\n axisBreak.adjustedStep = breakMinMaxStep.step;\n axisBreak.adjustedMin = breakMinMaxStep.min;\n axisBreak.adjustedMax = breakMinMaxStep.max;\n });\n }\n this._difference = this.adjustDifference(this.min, this.max);\n };\n /**\r\n * Returns value based on position.\r\n *\r\n * Please note that `position` represents position within axis which may be\r\n * zoomed and not correspond to Cursor's `position`.\r\n *\r\n * To convert Cursor's `position` to Axis' `position` use `toAxisPosition()` method.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/tutorials/tracking-cursors-position-via-api/#Tracking_Cursor_s_position} For more information about cursor tracking.\r\n * @param position Relative position on axis (0-1)\r\n * @return Position label\r\n */\n ValueAxis.prototype.getPositionLabel = function (position) {\n var value = this.positionToValue(position);\n return this.numberFormatter.format(value);\n };\n /**\r\n * Shows Axis tooltip at specific value\r\n *\r\n * @param value Value\r\n */\n ValueAxis.prototype.showTooltipAt = function (value) {\n this.showTooltipAtPosition(this.valueToPosition(value));\n };\n /**\r\n * Copies all properties and related data from a different instance of Axis.\r\n *\r\n * @param source Source Axis\r\n */\n ValueAxis.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.min = source.min;\n this.max = source.max;\n this.calculateTotals = source.calculateTotals;\n this._baseValue = source.baseValue;\n };\n return ValueAxis;\n}(Axis);\nexport { ValueAxis };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"ValueAxis\"] = ValueAxis;\nregistry.registeredClasses[\"ValueAxisDataItem\"] = ValueAxisDataItem;","/**\r\n * DateAxisBreak includes functionality to add breaks on a [[DateAxis]].\r\n *\r\n * A \"break\" can be used to \"cut out\" specific ranges of the axis scale, e.g.\r\n * weekends and holidays out of the Date-based axis.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { ValueAxisBreak } from \"./ValueAxisBreak\";\nimport { registry } from \"../../core/Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Class used to define breaks for [[DateAxis]].\r\n *\r\n * A \"break\" can be used to \"cut out\" specific ranges of the axis scale, e.g.\r\n * weekends and holidays out of the Date-based axis.\r\n *\r\n * @see {@link IDateAxisBreakEvents} for a list of available events\r\n * @see {@link IDateAxisBreakAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar DateAxisBreak = /** @class */function (_super) {\n tslib_1.__extends(DateAxisBreak, _super);\n /**\r\n * Constructor\r\n */\n function DateAxisBreak() {\n var _this = _super.call(this) || this;\n _this.className = \"DateAxisBreak\";\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(DateAxisBreak.prototype, \"startDate\", {\n /**\r\n * @return Start date\r\n */\n get: function get() {\n return this.getPropertyValue(\"startDate\");\n },\n /**\r\n * Starting date for the break.\r\n *\r\n * @param value Start date\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"startDate\", value)) {\n this.startValue = value.getTime();\n if (this.axis) {\n this.axis.invalidate();\n this.axis.invalidateSeries();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateAxisBreak.prototype, \"endDate\", {\n /**\r\n * @return End date\r\n */\n get: function get() {\n return this.getPropertyValue(\"endDate\");\n },\n /**\r\n * Ending date for the break.\r\n *\r\n * @param value End date\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"endDate\", value)) {\n this.endValue = value.getTime();\n if (this.axis) {\n this.axis.invalidate();\n this.axis.invalidateSeries();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n return DateAxisBreak;\n}(ValueAxisBreak);\nexport { DateAxisBreak };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"DateAxisBreak\"] = DateAxisBreak;","/**\r\n * DateAxis module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { ValueAxis, ValueAxisDataItem } from \"./ValueAxis\";\nimport { List } from \"../../core/utils/List\";\nimport { Dictionary } from \"../../core/utils/Dictionary\";\nimport { DateAxisBreak } from \"./DateAxisBreak\";\nimport { registry } from \"../../core/Registry\";\nimport * as $time from \"../../core/utils/Time\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $object from \"../../core/utils/Object\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines data item for [[DateAxis]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar DateAxisDataItem = /** @class */function (_super) {\n tslib_1.__extends(DateAxisDataItem, _super);\n /**\r\n * Constructor\r\n */\n function DateAxisDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"DateAxisDataItem\";\n _this.applyTheme();\n _this.values.date = {};\n _this.values.endDate = {};\n return _this;\n }\n Object.defineProperty(DateAxisDataItem.prototype, \"date\", {\n /**\r\n * @return Date\r\n */\n get: function get() {\n return this.dates[\"date\"];\n },\n /**\r\n * Date position of the data item.\r\n *\r\n * @param date Date\r\n */\n set: function set(date) {\n this.setDate(\"date\", date);\n this.value = date.getTime();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateAxisDataItem.prototype, \"endDate\", {\n /**\r\n * @return End date\r\n */\n get: function get() {\n return this.dates[\"endDate\"];\n },\n /**\r\n * End date for data item.\r\n *\r\n * @param date End date\r\n */\n set: function set(date) {\n this.setDate(\"endDate\", date);\n this.endValue = date.getTime();\n },\n enumerable: true,\n configurable: true\n });\n return DateAxisDataItem;\n}(ValueAxisDataItem);\nexport { DateAxisDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Used to create a date/time-based axis for the chart.\r\n *\r\n * ```TypeScript\r\n * // Create the axis\r\n * let xAxis = chart.xAxes.push(new am4charts.DateAxis());\r\n *\r\n * // Set settings\r\n * xAxis.title.text = \"Time\";\r\n * ```\r\n * ```JavaScript\r\n * // Create the axis\r\n * var valueAxis = chart.xAxes.push(new am4charts.DateAxis());\r\n *\r\n * // Set settings\r\n * valueAxis.title.text = \"Time\";\r\n * ```\r\n * ```JSON\r\n * \"xAxes\": [{\r\n * \"type\": \"DateAxis\",\r\n * \"title\": {\r\n * \"text\": \"Time\"\r\n * }\r\n * }]\r\n * ```\r\n *\r\n * @see {@link IDateAxisEvents} for a list of available Events\r\n * @see {@link IDateAxisAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar DateAxis = /** @class */function (_super) {\n tslib_1.__extends(DateAxis, _super);\n /**\r\n * Constructor\r\n */\n function DateAxis() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * A list of date/time intervals for Date axis.\r\n *\r\n * This define various granularities available for the axis. For example\r\n * if you have an axis spanning an hour, and space for 6 grid lines / labels\r\n * the axis will choose the granularity of 10 minutes, displaying a label\r\n * every 10 minutes.\r\n *\r\n * Default intervals:\r\n *\r\n * ```JSON\r\n * [\r\n * { timeUnit: \"millisecond\", count: 1 },\r\n * { timeUnit: \"millisecond\", count: 5 },\r\n * { timeUnit: \"millisecond\", count: 10 },\r\n * { timeUnit: \"millisecond\", count: 50 },\r\n * { timeUnit: \"millisecond\", count: 100 },\r\n * { timeUnit: \"millisecond\", count: 500 },\r\n * { timeUnit: \"second\", count: 1 },\r\n * { timeUnit: \"second\", count: 5 },\r\n * { timeUnit: \"second\", count: 10 },\r\n * { timeUnit: \"second\", count: 30 },\r\n * { timeUnit: \"minute\", count: 1 },\r\n * { timeUnit: \"minute\", count: 5 },\r\n * { timeUnit: \"minute\", count: 10 },\r\n * { timeUnit: \"minute\", count: 30 },\r\n * { timeUnit: \"hour\", count: 1 },\r\n * { timeUnit: \"hour\", count: 3 },\r\n * { timeUnit: \"hour\", count: 6 },\r\n * { timeUnit: \"hour\", count: 12 },\r\n * { timeUnit: \"day\", count: 1 },\r\n * { timeUnit: \"day\", count: 2 },\r\n * { timeUnit: \"day\", count: 3 },\r\n * { timeUnit: \"day\", count: 4 },\r\n * { timeUnit: \"day\", count: 5 },\r\n * { timeUnit: \"week\", count: 1 },\r\n * { timeUnit: \"month\", count: 1 },\r\n * { timeUnit: \"month\", count: 2 },\r\n * { timeUnit: \"month\", count: 3 },\r\n * { timeUnit: \"month\", count: 6 },\r\n * { timeUnit: \"year\", count: 1 },\r\n * { timeUnit: \"year\", count: 2 },\r\n * { timeUnit: \"year\", count: 5 },\r\n * { timeUnit: \"year\", count: 10 },\r\n * { timeUnit: \"year\", count: 50 },\r\n * { timeUnit: \"year\", count: 100 }\r\n * ]\r\n * ```\r\n */\n _this.gridIntervals = new List();\n /**\r\n * A collection of date formats to use when formatting different time units\r\n * on Date/time axis.\r\n *\r\n * Actual defaults will depend on the language locale set for the chart.\r\n *\r\n * To override format for a specific time unit, say days, you need to set\r\n * the appropriate key to a format string. E.g.:\r\n *\r\n * ```TypeScript\r\n * axis.dateFormats.setKey(\"day\", \"MMMM d, yyyy\");\r\n * ```\r\n * ```JavaScript\r\n * axis.dateFormats.setKey(\"day\", \"MMMM d, yyyy\");\r\n * ```\r\n * ```JSON\r\n * \"xAxes\": [{\r\n * \"type\": \"DateAxis\",\r\n * \"dateFormats\": {\r\n * \"day\": \"MMMM d, yyyy\"\r\n * }\r\n * }]\r\n * ```\r\n *\r\n * @see {@link DateFormatter}\r\n */\n _this.dateFormats = new Dictionary();\n /**\r\n * These formats are applied to labels that are first in a larger unit.\r\n *\r\n * For example, if we have a DateAxis with days on it, the first day of month\r\n * indicates a break in month - a start of the bigger period.\r\n *\r\n * For those labels, `periodChangeDateFormats` are applied instead of\r\n * `dateFormats`.\r\n *\r\n * This allows us implement convenient structures, like instead of:\r\n *\r\n * `Jan 1 - Jan 2 - Jan 3 - ...`\r\n *\r\n * We can have:\r\n *\r\n * `Jan - 1 - 2 - 3 - ...`\r\n *\r\n * This can be disabled by setting `markUnitChange = false`.\r\n */\n _this.periodChangeDateFormats = new Dictionary();\n /**\r\n * Actual interval (granularity) derived from the actual data.\r\n */\n _this._baseIntervalReal = {\n timeUnit: \"day\",\n count: 1\n };\n /**\r\n * [_minDifference description]\r\n *\r\n * @todo Description\r\n */\n _this._minDifference = {};\n _this.className = \"DateAxis\";\n _this.setPropertyValue(\"markUnitChange\", true);\n _this.snapTooltip = true;\n // Translatable defaults are applied in `applyInternalDefaults()`\n // ...\n // Define default intervals\n _this.gridIntervals.pushAll([{\n timeUnit: \"millisecond\",\n count: 1\n }, {\n timeUnit: \"millisecond\",\n count: 5\n }, {\n timeUnit: \"millisecond\",\n count: 10\n }, {\n timeUnit: \"millisecond\",\n count: 50\n }, {\n timeUnit: \"millisecond\",\n count: 100\n }, {\n timeUnit: \"millisecond\",\n count: 500\n }, {\n timeUnit: \"second\",\n count: 1\n }, {\n timeUnit: \"second\",\n count: 5\n }, {\n timeUnit: \"second\",\n count: 10\n }, {\n timeUnit: \"second\",\n count: 30\n }, {\n timeUnit: \"minute\",\n count: 1\n }, {\n timeUnit: \"minute\",\n count: 5\n }, {\n timeUnit: \"minute\",\n count: 10\n }, {\n timeUnit: \"minute\",\n count: 15\n }, {\n timeUnit: \"minute\",\n count: 30\n }, {\n timeUnit: \"hour\",\n count: 1\n }, {\n timeUnit: \"hour\",\n count: 3\n }, {\n timeUnit: \"hour\",\n count: 6\n }, {\n timeUnit: \"hour\",\n count: 12\n }, {\n timeUnit: \"day\",\n count: 1\n }, {\n timeUnit: \"day\",\n count: 2\n }, {\n timeUnit: \"day\",\n count: 3\n }, {\n timeUnit: \"day\",\n count: 4\n }, {\n timeUnit: \"day\",\n count: 5\n }, {\n timeUnit: \"week\",\n count: 1\n }, {\n timeUnit: \"month\",\n count: 1\n }, {\n timeUnit: \"month\",\n count: 2\n }, {\n timeUnit: \"month\",\n count: 3\n }, {\n timeUnit: \"month\",\n count: 6\n }, {\n timeUnit: \"year\",\n count: 1\n }, {\n timeUnit: \"year\",\n count: 2\n }, {\n timeUnit: \"year\",\n count: 5\n }, {\n timeUnit: \"year\",\n count: 10\n }, {\n timeUnit: \"year\",\n count: 50\n }, {\n timeUnit: \"year\",\n count: 100\n }, {\n timeUnit: \"year\",\n count: 200\n }, {\n timeUnit: \"year\",\n count: 500\n }, {\n timeUnit: \"year\",\n count: 1000\n }, {\n timeUnit: \"year\",\n count: 2000\n }, {\n timeUnit: \"year\",\n count: 5000\n }, {\n timeUnit: \"year\",\n count: 10000\n }, {\n timeUnit: \"year\",\n count: 100000\n }]);\n // Set field name\n _this.axisFieldName = \"date\";\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * A function which applies fills to axis cells.\r\n *\r\n * Default function fills every second fill. You can set this to a function\r\n * that follows some other logic.\r\n *\r\n * Function should accept a [[DateAxisDataItem]] and modify its `axisFill`\r\n * property accordingly.\r\n */\n DateAxis.prototype.fillRule = function (dataItem) {\n var value = dataItem.value;\n var axis = dataItem.component;\n var gridInterval = axis._gridInterval;\n var gridDuration = $time.getDuration(gridInterval.timeUnit, gridInterval.count);\n if (Math.round((value - axis.min) / gridDuration) / 2 == Math.round(Math.round((value - axis.min) / gridDuration) / 2)) {\n dataItem.axisFill.__disabled = true;\n } else {\n dataItem.axisFill.__disabled = false;\n }\n };\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n DateAxis.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n // Set default date formats\n if (!this.dateFormats.hasKey(\"millisecond\")) {\n this.dateFormats.setKey(\"millisecond\", this.language.translate(\"_date_millisecond\"));\n }\n if (!this.dateFormats.hasKey(\"second\")) {\n this.dateFormats.setKey(\"second\", this.language.translate(\"_date_second\"));\n }\n if (!this.dateFormats.hasKey(\"minute\")) {\n this.dateFormats.setKey(\"minute\", this.language.translate(\"_date_minute\"));\n }\n if (!this.dateFormats.hasKey(\"hour\")) {\n this.dateFormats.setKey(\"hour\", this.language.translate(\"_date_hour\"));\n }\n if (!this.dateFormats.hasKey(\"day\")) {\n this.dateFormats.setKey(\"day\", this.language.translate(\"_date_day\"));\n }\n if (!this.dateFormats.hasKey(\"week\")) {\n this.dateFormats.setKey(\"week\", this.language.translate(\"_date_day\")); // not a mistake\n }\n if (!this.dateFormats.hasKey(\"month\")) {\n this.dateFormats.setKey(\"month\", this.language.translate(\"_date_month\"));\n }\n if (!this.dateFormats.hasKey(\"year\")) {\n this.dateFormats.setKey(\"year\", this.language.translate(\"_date_year\"));\n }\n if (!this.periodChangeDateFormats.hasKey(\"millisecond\")) {\n this.periodChangeDateFormats.setKey(\"millisecond\", this.language.translate(\"_date_millisecond\"));\n }\n if (!this.periodChangeDateFormats.hasKey(\"second\")) {\n this.periodChangeDateFormats.setKey(\"second\", this.language.translate(\"_date_second\"));\n }\n if (!this.periodChangeDateFormats.hasKey(\"minute\")) {\n this.periodChangeDateFormats.setKey(\"minute\", this.language.translate(\"_date_minute\"));\n }\n if (!this.periodChangeDateFormats.hasKey(\"hour\")) {\n this.periodChangeDateFormats.setKey(\"hour\", this.language.translate(\"_date_hour\"));\n }\n if (!this.periodChangeDateFormats.hasKey(\"day\")) {\n this.periodChangeDateFormats.setKey(\"day\", this.language.translate(\"_date_day\"));\n }\n if (!this.periodChangeDateFormats.hasKey(\"week\")) {\n this.periodChangeDateFormats.setKey(\"week\", this.language.translate(\"_date_day\"));\n }\n if (!this.periodChangeDateFormats.hasKey(\"month\")) {\n this.periodChangeDateFormats.setKey(\"month\", this.language.translate(\"_date_month\") + \" \" + this.language.translate(\"_date_year\"));\n }\n };\n /**\r\n * Returns a new/empty [[DataItem]] of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n DateAxis.prototype.createDataItem = function () {\n return new DateAxisDataItem();\n };\n /**\r\n * Returns a new/empty [[AxisBreak]] of the appropriate type.\r\n *\r\n * @return Axis break\r\n */\n DateAxis.prototype.createAxisBreak = function () {\n return new DateAxisBreak();\n };\n /**\r\n * Validates Axis' data items.\r\n *\r\n * @ignore Exclude from docs\r\n */\n DateAxis.prototype.validateDataItems = function () {\n // allows to keep selection of the same size\n var start = this.start;\n var end = this.end;\n var periodCount = (this.max - this.min) / this.baseDuration;\n _super.prototype.validateDataItems.call(this);\n this.maxZoomFactor = (this.max - this.min) / this.baseDuration;\n this._deltaMinMax = this.baseDuration / 2;\n // allows to keep selection of the same size\n var newPeriodCount = (this.max - this.min) / this.baseDuration;\n start = start + (end - start) * (1 - periodCount / newPeriodCount);\n this.zoom({\n start: start,\n end: end\n }, false, true); // added instantlyto solve zoomout problem when we have axes gaps. @todo: check how this affects maxZoomFactor\n };\n /**\r\n * Handles process after zoom.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Does nothing?\r\n */\n DateAxis.prototype.handleSelectionExtremesChange = function () {};\n /**\r\n * Calculates all positions, related to axis as per current zoom.\r\n *\r\n * @ignore Exclude from docs\r\n */\n DateAxis.prototype.calculateZoom = function () {\n var _this = this;\n _super.prototype.calculateZoom.call(this);\n var gridInterval = this.chooseInterval(0, this.adjustDifference(this._minZoomed, this._maxZoomed), this._gridCount);\n if ($time.getDuration(gridInterval.timeUnit, gridInterval.count) < this.baseDuration) {\n gridInterval = tslib_1.__assign({}, this.baseInterval);\n }\n this._gridInterval = gridInterval;\n this._gridDate = $time.round(new Date(this.min), gridInterval.timeUnit, gridInterval.count, this.getFirstWeekDay(), this.dateFormatter.utc);\n this._nextGridUnit = $time.getNextUnit(gridInterval.timeUnit);\n // the following is needed to avoid grid flickering while scrolling\n this._intervalDuration = $time.getDuration(gridInterval.timeUnit, gridInterval.count);\n var count = Math.ceil(this._difference / this._intervalDuration);\n count = Math.max(-5, Math.floor(this.start * count) - 3); // some extra is needed\n $time.add(this._gridDate, gridInterval.timeUnit, count * gridInterval.count, this.dateFormatter.utc);\n // tell series start/end\n $iter.each(this.series.iterator(), function (series) {\n if (series.baseAxis == _this) {\n var field_1 = series.getAxisField(_this);\n var minZoomed = $time.round(new Date(_this._minZoomed), _this.baseInterval.timeUnit, _this.baseInterval.count).getTime();\n var minZoomedStr = minZoomed.toString();\n var startDataItem = series.dataItemsByAxis.getKey(_this.uid).getKey(minZoomedStr);\n var startIndex = 0;\n if (_this.start != 0) {\n if (startDataItem) {\n startDataItem = _this.findFirst(startDataItem, minZoomed, field_1);\n startIndex = startDataItem.index;\n } else {\n startIndex = series.dataItems.findClosestIndex(_this._minZoomed, function (x) {\n return x[field_1];\n }, \"left\");\n }\n }\n // 1 millisecond is removed so that if only first item is selected, it would not count in the second.\n var baseInterval = _this.baseInterval;\n var maxZoomed = $time.add($time.round(new Date(_this._maxZoomed), baseInterval.timeUnit, baseInterval.count, _this.getFirstWeekDay(), _this.dateFormatter.utc), baseInterval.timeUnit, baseInterval.count, _this.dateFormatter.utc).getTime();\n var maxZoomedStr = maxZoomed.toString();\n var endDataItem = series.dataItemsByAxis.getKey(_this.uid).getKey(maxZoomedStr);\n var endIndex = series.dataItems.length;\n if (_this.end != 1) {\n if (endDataItem) {\n endIndex = endDataItem.index;\n } else {\n maxZoomed -= 1;\n endIndex = series.dataItems.findClosestIndex(maxZoomed, function (x) {\n return x[field_1];\n }, \"right\") + 1;\n }\n }\n series.startIndex = startIndex;\n series.endIndex = endIndex;\n if (series.dataRangeInvalid) {\n series.validateDataRange();\n }\n }\n });\n };\n DateAxis.prototype.findFirst = function (dataItem, time, key) {\n var index = dataItem.index;\n if (index > 0) {\n var series = dataItem.component;\n var previousDataItem = series.dataItems.getIndex(index - 1);\n var previousDate = previousDataItem[key];\n if (!previousDate || previousDate.getTime() < time) {\n return dataItem;\n } else {\n return this.findFirst(previousDataItem, time, key);\n }\n } else {\n return dataItem;\n }\n };\n /**\r\n * (Re)validates data.\r\n *\r\n * @ignore Exclude from docs\r\n */\n DateAxis.prototype.validateData = function () {\n _super.prototype.validateData.call(this);\n if (!$type.isNumber(this.baseInterval.count)) {\n this.baseInterval.count = 1;\n }\n };\n Object.defineProperty(DateAxis.prototype, \"minDifference\", {\n /**\r\n * @ignore\r\n */\n get: function get() {\n var _this = this;\n var minDifference = Number.MAX_VALUE;\n this.series.each(function (series) {\n if (minDifference > _this._minDifference[series.uid]) {\n minDifference = _this._minDifference[series.uid];\n }\n });\n if (minDifference == Number.MAX_VALUE || minDifference == 0) {\n minDifference = $time.getDuration(\"day\");\n }\n return minDifference;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * [dataChangeUpdate description]\r\n *\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n DateAxis.prototype.seriesDataChangeUpdate = function (series) {\n this._minDifference[series.uid] = Number.MAX_VALUE;\n };\n /**\r\n * [postProcessSeriesDataItems description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n DateAxis.prototype.postProcessSeriesDataItems = function () {\n var _this = this;\n this.series.each(function (series) {\n if (JSON.stringify(series._baseInterval[_this.uid]) != JSON.stringify(_this.baseInterval)) {\n series.dataItems.each(function (dataItem) {\n _this.postProcessSeriesDataItem(dataItem);\n });\n series._baseInterval[_this.uid] = _this.baseInterval;\n }\n });\n this.addEmptyUnitsBreaks();\n };\n /**\r\n * [postProcessSeriesDataItem description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param dataItem Data item\r\n */\n DateAxis.prototype.postProcessSeriesDataItem = function (dataItem) {\n var _this = this;\n // we need to do this for all series data items not only added recently, as baseInterval might change\n var baseInterval = this.baseInterval;\n var series = dataItem.component;\n var dataItemsByAxis = series.dataItemsByAxis.getKey(this.uid);\n $object.each(dataItem.dates, function (key) {\n var date = dataItem.getDate(key);\n var time = date.getTime();\n var startDate = $time.round(new Date(time), baseInterval.timeUnit, baseInterval.count, _this.getFirstWeekDay(), _this.dateFormatter.utc);\n var startTime = startDate.getTime();\n var endDate = $time.add(new Date(startTime), baseInterval.timeUnit, baseInterval.count, _this.dateFormatter.utc);\n dataItem.setCalculatedValue(key, startTime, \"open\");\n dataItem.setCalculatedValue(key, endDate.getTime(), \"close\");\n dataItemsByAxis.setKey(startTime.toString(), dataItem);\n });\n };\n /**\r\n * Collapses empty stretches of date/time scale by creating [[AxisBreak]]\r\n * elements for them.\r\n *\r\n * Can be used to automatically remove strethes without data, like weekends.\r\n *\r\n * No, need to call this manually. It will automatically be done if\r\n * `skipEmptyPeriods = true`.\r\n *\r\n * @ignore Exclude from docs\r\n */\n DateAxis.prototype.addEmptyUnitsBreaks = function () {\n var _this = this;\n if (this.skipEmptyPeriods && $type.isNumber(this.min) && $type.isNumber(this.max)) {\n var timeUnit = this.baseInterval.timeUnit;\n var count = this.baseInterval.count;\n this.axisBreaks.clear(); // TODO: what about breaks added by user?\n var date = $time.round(new Date(this.min), timeUnit, count, this.getFirstWeekDay(), this.dateFormatter.utc);\n var axisBreak = void 0;\n var _loop_1 = function _loop_1() {\n $time.add(date, timeUnit, count, this_1.dateFormatter.utc);\n var startTime = date.getTime();\n var startTimeStr = startTime.toString();\n var hasData = $iter.contains(this_1.series.iterator(), function (series) {\n return !!series.dataItemsByAxis.getKey(_this.uid).getKey(startTimeStr);\n });\n // open break if not yet opened\n if (!hasData) {\n if (!axisBreak) {\n axisBreak = this_1.axisBreaks.create();\n axisBreak.startDate = new Date(startTime);\n }\n } else {\n // close if already opened\n if (axisBreak) {\n // close at end time minus one millisecond\n axisBreak.endDate = new Date(startTime - 1);\n axisBreak = undefined;\n }\n }\n };\n var this_1 = this;\n while (date.getTime() < this.max - this.baseDuration) {\n _loop_1();\n }\n }\n };\n /**\r\n * Updates positioning of Axis breaks after something changes.\r\n *\r\n * @ignore Exclude from docs\r\n */\n DateAxis.prototype.fixAxisBreaks = function () {\n var _this = this;\n _super.prototype.fixAxisBreaks.call(this);\n var axisBreaks = this.axisBreaks;\n if (axisBreaks.length > 0) {\n // process breaks\n axisBreaks.each(function (axisBreak) {\n var breakGridCount = Math.ceil(_this._gridCount * (Math.min(_this.end, axisBreak.endPosition) - Math.max(_this.start, axisBreak.startPosition)) / (_this.end - _this.start));\n axisBreak.gridInterval = _this.chooseInterval(0, axisBreak.adjustedEndValue - axisBreak.adjustedStartValue, breakGridCount);\n var gridDate = $time.round(new Date(axisBreak.adjustedStartValue), axisBreak.gridInterval.timeUnit, axisBreak.gridInterval.count, _this.getFirstWeekDay(), _this.dateFormatter.utc);\n if (gridDate.getTime() > axisBreak.startDate.getTime()) {\n $time.add(gridDate, axisBreak.gridInterval.timeUnit, axisBreak.gridInterval.count, _this.dateFormatter.utc);\n }\n axisBreak.gridDate = gridDate;\n });\n }\n };\n /**\r\n * @ignore\r\n */\n DateAxis.prototype.getFirstWeekDay = function () {\n if (this.dateFormatter) {\n return this.dateFormatter.firstDayOfWeek;\n }\n return 1;\n };\n /**\r\n * [getGridDate description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param date [description]\r\n * @param intervalCount [description]\r\n * @return [description]\r\n */\n DateAxis.prototype.getGridDate = function (date, intervalCount) {\n var timeUnit = this._gridInterval.timeUnit;\n var realIntervalCount = this._gridInterval.count;\n // round date\n $time.round(date, timeUnit, 1, this.getFirstWeekDay(), this.dateFormatter.utc);\n var prevTimestamp = date.getTime();\n var newDate = $time.copy(date);\n // modify date by adding intervalcount\n var timestamp = $time.add(newDate, timeUnit, intervalCount, this.dateFormatter.utc).getTime();\n // if it's axis break, get first rounded date which is not in a break\n var axisBreak = this.isInBreak(timestamp);\n if (axisBreak && axisBreak.endDate) {\n newDate = new Date(axisBreak.endDate.getTime());\n $time.round(newDate, timeUnit, realIntervalCount, this.getFirstWeekDay(), this.dateFormatter.utc);\n if (newDate.getTime() < axisBreak.endDate.getTime()) {\n $time.add(newDate, timeUnit, realIntervalCount, this.dateFormatter.utc);\n }\n timestamp = newDate.getTime();\n }\n // get duration between grid lines with break duration removed\n var durationBreaksRemoved = this.adjustDifference(prevTimestamp, timestamp);\n // calculate how many time units fit to this duration\n var countBreaksRemoved = Math.round(durationBreaksRemoved / $time.getDuration(timeUnit));\n // if less units fit, add one and repeat\n if (countBreaksRemoved < realIntervalCount) {\n return this.getGridDate(date, intervalCount + realIntervalCount);\n }\n return newDate;\n };\n /**\r\n * [getBreaklessDate description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param axisBreak [description]\r\n * @param timeUnit [description]\r\n * @param count [description]\r\n * @return [description]\r\n */\n DateAxis.prototype.getBreaklessDate = function (axisBreak, timeUnit, count) {\n var date = new Date(axisBreak.endValue);\n $time.round(date, timeUnit, count, this.getFirstWeekDay(), this.dateFormatter.utc);\n $time.add(date, timeUnit, count, this.dateFormatter.utc);\n var timestamp = date.getTime();\n axisBreak = this.isInBreak(timestamp);\n if (axisBreak) {\n return this.getBreaklessDate(axisBreak, timeUnit, count);\n }\n return date;\n };\n /**\r\n * (Re)validates all Axis elements.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n */\n DateAxis.prototype.validateAxisElements = function () {\n var _this = this;\n if ($type.isNumber(this.max) && $type.isNumber(this.min)) {\n this.calculateZoom();\n // first regular items\n var timestamp = this._gridDate.getTime();\n var timeUnit = this._gridInterval.timeUnit;\n var intervalCount = this._gridInterval.count;\n var prevGridDate = $time.copy(this._gridDate);\n var dataItemsIterator_1 = this._dataItemsIterator;\n this.resetIterators();\n var _loop_2 = function _loop_2() {\n var date = this_2.getGridDate($time.copy(prevGridDate), intervalCount);\n timestamp = date.getTime();\n var endDate = $time.copy(date); // you might think it's easier to add intervalduration to timestamp, however it won't work for months or years which are not of the same length\n endDate = $time.add(endDate, timeUnit, intervalCount, this_2.dateFormatter.utc);\n var format = this_2.dateFormats.getKey(timeUnit);\n if (this_2.markUnitChange && prevGridDate) {\n if ($time.checkChange(date, prevGridDate, this_2._nextGridUnit, this_2.dateFormatter.utc)) {\n if (timeUnit !== \"year\") {\n format = this_2.periodChangeDateFormats.getKey(timeUnit);\n }\n }\n }\n var text = this_2.dateFormatter.format(date, format);\n var dataItem = dataItemsIterator_1.find(function (x) {\n return x.text === text;\n });\n if (dataItem.__disabled) {\n dataItem.__disabled = false;\n }\n this_2.appendDataItem(dataItem);\n dataItem.axisBreak = undefined;\n dataItem.date = date;\n dataItem.endDate = endDate;\n dataItem.text = text;\n prevGridDate = date;\n this_2.validateDataElement(dataItem);\n };\n var this_2 = this;\n while (timestamp <= this._maxZoomed) {\n _loop_2();\n }\n // breaks later\n var renderer_1 = this.renderer;\n $iter.each(this.axisBreaks.iterator(), function (axisBreak) {\n if (axisBreak.breakSize > 0) {\n var timeUnit_1 = axisBreak.gridInterval.timeUnit;\n var intervalCount_1 = axisBreak.gridInterval.count;\n // only add grid if gap is bigger then minGridDistance\n if ($math.getDistance(axisBreak.startPoint, axisBreak.endPoint) > renderer_1.minGridDistance * 4) {\n var timestamp_1 = axisBreak.gridDate.getTime();\n var prevGridDate_1;\n var count = 0;\n var _loop_3 = function _loop_3() {\n var date = $time.copy(axisBreak.gridDate);\n timestamp_1 = $time.add(date, timeUnit_1, intervalCount_1 * count, _this.dateFormatter.utc).getTime();\n count++;\n if (timestamp_1 > axisBreak.adjustedStartValue && timestamp_1 < axisBreak.adjustedEndValue) {\n var endDate = $time.copy(date); // you might think it's easier to add intervalduration to timestamp, however it won't work for months or years which are not of the same length\n endDate = $time.add(endDate, timeUnit_1, intervalCount_1, _this.dateFormatter.utc);\n var format = _this.dateFormats.getKey(timeUnit_1);\n if (_this.markUnitChange && prevGridDate_1) {\n if ($time.checkChange(date, prevGridDate_1, _this._nextGridUnit, _this.dateFormatter.utc)) {\n if (timeUnit_1 !== \"year\") {\n format = _this.periodChangeDateFormats.getKey(timeUnit_1);\n }\n }\n }\n var text_1 = _this.dateFormatter.format(date, format);\n var dataItem = dataItemsIterator_1.find(function (x) {\n return x.text === text_1;\n });\n if (dataItem.__disabled) {\n dataItem.__disabled = false;\n }\n //this.processDataItem(dataItem);\n _this.appendDataItem(dataItem);\n dataItem.axisBreak = axisBreak;\n axisBreak.dataItems.moveValue(dataItem);\n dataItem.date = date;\n dataItem.endDate = endDate;\n dataItem.text = text_1;\n prevGridDate_1 = date;\n _this.validateDataElement(dataItem);\n }\n };\n while (timestamp_1 <= axisBreak.adjustedMax) {\n _loop_3();\n }\n }\n }\n });\n }\n };\n /**\r\n * Validates Axis data item.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n DateAxis.prototype.validateDataElement = function (dataItem) {\n //super.validateDataElement(dataItem);\n if ($type.isNumber(this.max) && $type.isNumber(this.min)) {\n var renderer = this.renderer;\n var timestamp = dataItem.value;\n var endTimestamp = dataItem.endValue;\n if (!$type.isNumber(endTimestamp)) {\n endTimestamp = timestamp;\n }\n var position = this.valueToPosition(timestamp);\n var endPosition = this.valueToPosition(endTimestamp);\n var fillEndPosition = endPosition;\n if (!dataItem.isRange && this._gridInterval.count > this.baseInterval.count) {\n endPosition = position + (endPosition - position) / (this._gridInterval.count / this.baseInterval.count);\n }\n dataItem.position = position;\n var tick = dataItem.tick;\n if (tick && !tick.disabled) {\n renderer.updateTickElement(tick, position, endPosition);\n }\n var grid = dataItem.grid;\n if (grid && !grid.disabled) {\n renderer.updateGridElement(grid, position, endPosition);\n }\n var fill = dataItem.axisFill;\n if (fill && !fill.disabled) {\n renderer.updateFillElement(fill, position, fillEndPosition);\n if (!dataItem.isRange) {\n this.fillRule(dataItem);\n }\n }\n var mask = dataItem.mask;\n if (mask) {\n renderer.updateFillElement(mask, position, endPosition);\n }\n var label = dataItem.label;\n if (label && !label.disabled) {\n var location_1 = label.location;\n if (location_1 == 0) {\n if (this._gridInterval.count == 1 && this._gridInterval.timeUnit != \"week\" && !dataItem.isRange) {\n location_1 = 0.5;\n } else {\n location_1 = 0;\n }\n }\n renderer.updateLabelElement(label, position, endPosition, location_1);\n }\n }\n };\n Object.defineProperty(DateAxis.prototype, \"baseDuration\", {\n /**\r\n * A duration in milliseconds of the `baseInterval`.\r\n *\r\n * @return Duration (ms)\r\n */\n get: function get() {\n return $time.getDuration(this.baseInterval.timeUnit, this.baseInterval.count);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Adjusts min/max values.\r\n *\r\n * @ignore Exclude from docs.\r\n * @todo Description (review)\r\n * @param min Min timestamp\r\n * @param max Max timestamp\r\n * @return Adjusted min/max step\r\n */\n DateAxis.prototype.adjustMinMax = function (min, max) {\n return {\n min: min,\n max: max,\n step: this.baseDuration\n };\n };\n /**\r\n * Adjusts the minimum timestamp as per cell start location.\r\n *\r\n * @param value Value\r\n * @return Adjusted value\r\n */\n DateAxis.prototype.fixMin = function (value) {\n // like this because months are not equal\n var startTime = $time.round(new Date(value), this.baseInterval.timeUnit, this.baseInterval.count, this.getFirstWeekDay(), this.dateFormatter.utc).getTime();\n var endTime = $time.add(new Date(startTime), this.baseInterval.timeUnit, this.baseInterval.count, this.dateFormatter.utc).getTime();\n return startTime + (endTime - startTime) * this.startLocation;\n };\n /**\r\n * Adjusts the maximum timestamp as per cell start location.\r\n *\r\n * @param value Value\r\n * @return Adjusted value\r\n */\n DateAxis.prototype.fixMax = function (value) {\n // like this because months are not equal\n var startTime = $time.round(new Date(value), this.baseInterval.timeUnit, this.baseInterval.count, this.getFirstWeekDay(), this.dateFormatter.utc).getTime();\n var endTime = $time.add(new Date(startTime), this.baseInterval.timeUnit, this.baseInterval.count, this.dateFormatter.utc).getTime();\n return startTime + (endTime - startTime) * this.endLocation;\n };\n /**\r\n * [chooseInterval description]\r\n *\r\n * @ignore Exclude from docs.\r\n * @todo Description\r\n * @param index [description]\r\n * @param duration [description]\r\n * @param gridCount [description]\r\n * @return [description]\r\n */\n DateAxis.prototype.chooseInterval = function (index, duration, gridCount) {\n var gridIntervals = this.gridIntervals;\n var gridInterval = gridIntervals.getIndex(index);\n var intervalDuration = $time.getDuration(gridInterval.timeUnit, gridInterval.count);\n var lastIndex = gridIntervals.length - 1;\n if (index >= lastIndex) {\n return tslib_1.__assign({}, gridIntervals.getIndex(lastIndex));\n }\n var count = Math.ceil(duration / intervalDuration);\n if (duration < intervalDuration && index > 0) {\n return tslib_1.__assign({}, gridIntervals.getIndex(index - 1));\n }\n if (count <= gridCount) {\n return tslib_1.__assign({}, gridIntervals.getIndex(index));\n } else {\n if (index + 1 < gridIntervals.length) {\n return this.chooseInterval(index + 1, duration, gridCount);\n } else {\n return tslib_1.__assign({}, gridIntervals.getIndex(index));\n }\n }\n };\n /**\r\n * Formats the value according to axis' own [[DateFormatter]].\r\n *\r\n * @param value Source value\r\n * @return Formatted value\r\n */\n DateAxis.prototype.formatLabel = function (value) {\n return this.dateFormatter.format(value);\n };\n /**\r\n * Converts a Date to an asbolute pixel position within Axis.\r\n *\r\n * @param date Date\r\n * @return Position (px)\r\n */\n DateAxis.prototype.dateToPosition = function (date) {\n return this.valueToPosition(date.getTime());\n };\n /**\r\n * Converts a numeric timestamp or a `Date` to a relative position on axis.\r\n *\r\n * @param date Date or a timestamp\r\n * @return Relative position\r\n */\n DateAxis.prototype.anyToPosition = function (date) {\n if (date instanceof Date) {\n return this.dateToPosition(date);\n } else {\n return this.valueToPosition(date);\n }\n };\n /**\r\n * Converts date to orientation point (x, y, angle) on axis\r\n *\r\n * @param date Date\r\n * @return IOrientationPoint\r\n */\n DateAxis.prototype.dateToPoint = function (date) {\n var position = this.dateToPosition(date);\n var point = this.renderer.positionToPoint(position);\n var angle = this.renderer.positionToAngle(position);\n return {\n x: point.x,\n y: point.y,\n angle: angle\n };\n };\n /**\r\n * Converts a numeric value to orientation (x, y, angle) point on axis\r\n *\r\n * @param value Value\r\n * @return Orientation point\r\n */\n DateAxis.prototype.anyToPoint = function (date) {\n if (date instanceof Date) {\n return this.dateToPoint(date);\n } else {\n return this.valueToPoint(date);\n }\n };\n /**\r\n * Converts pixel position within Axis to a corresponding Date.\r\n *\r\n * @param position Position (px)\r\n * @return Date\r\n */\n DateAxis.prototype.positionToDate = function (position) {\n return new Date(this.positionToValue(position));\n };\n /**\r\n * Returns the X coordinate for series' data item's value.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem Data item\r\n * @param key Data field to get value from\r\n * @param location Location (0-1)\r\n * @return X coordinate (px)\r\n */\n DateAxis.prototype.getX = function (dataItem, key, location) {\n var value = this.getTimeByLocation(dataItem, key, location);\n //let stack: number = dataItem.getValue(\"valueX\", \"stack\");\n if (!$type.isNumber(value)) {\n value = this.baseValue;\n }\n return this.renderer.positionToPoint(this.valueToPosition(value)).x;\n };\n /**\r\n * Returns the Y coordinate for series' data item's value.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem Data item\r\n * @param key Data field to get value from\r\n * @param location Location (0-1)\r\n * @return Y coordinate (px)\r\n */\n DateAxis.prototype.getY = function (dataItem, key, location) {\n var value = this.getTimeByLocation(dataItem, key, location);\n var stack = dataItem.getValue(\"valueX\", \"stack\");\n if (!$type.isNumber(value)) {\n value = this.baseValue;\n }\n return this.renderer.positionToPoint(this.valueToPosition(value + stack)).y;\n };\n /**\r\n * Returns an angle for series data item.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem Data item\r\n * @param key Data field to get value from\r\n * @param location Location (0-1)\r\n * @param stackKey Stack ID\r\n * @return Angle\r\n */\n DateAxis.prototype.getAngle = function (dataItem, key, location, stackKey) {\n var value = this.getTimeByLocation(dataItem, key, location);\n var stack = dataItem.getValue(stackKey, \"stack\");\n if (!$type.isNumber(value)) {\n value = this.baseValue;\n }\n return this.positionToAngle(this.valueToPosition(value + stack));\n };\n /**\r\n * [getTimeByLocation description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param dataItem [description]\r\n * @param key [description]\r\n * @param location [description]\r\n * @return [description]\r\n */\n DateAxis.prototype.getTimeByLocation = function (dataItem, key, location) {\n if (!$type.hasValue(key)) {\n return;\n }\n if (!$type.isNumber(location)) {\n location = dataItem.workingLocations[key];\n if (!$type.isNumber(location)) {\n location = 0;\n }\n }\n var startTime = dataItem.values[key][\"open\"];\n var endTime = dataItem.values[key][\"close\"];\n if ($type.isNumber(startTime) && $type.isNumber(endTime)) {\n return startTime + (endTime - startTime) * location;\n }\n };\n /**\r\n * Processes a related series' data item.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param dataItem Data item\r\n */\n DateAxis.prototype.processSeriesDataItem = function (dataItem, axisLetter) {\n var series = dataItem.component;\n var time;\n var date = dataItem[\"date\" + axisLetter];\n if (date) {\n time = date.getTime();\n } else {\n return;\n }\n var openDate = dataItem[\"openDate\" + axisLetter];\n var prevSeriesTime = this._prevSeriesTime;\n var openTime;\n if (openDate) {\n openTime = openDate.getTime();\n }\n if ($type.isNumber(openTime)) {\n var difference = Math.abs(time - openTime);\n if (this._minDifference[series.uid] > difference) {\n this._minDifference[series.uid] = difference;\n }\n }\n var differece = time - prevSeriesTime;\n if (differece > 0) {\n if (this._minDifference[series.uid] > differece) {\n this._minDifference[series.uid] = differece;\n }\n }\n this._prevSeriesTime = time;\n if (series._baseInterval[this.uid]) {\n this.postProcessSeriesDataItem(dataItem);\n } else {\n if (this._baseInterval) {\n series._baseInterval[this.uid] = this._baseInterval;\n this.postProcessSeriesDataItem(dataItem);\n }\n }\n };\n /**\r\n * [updateAxisBySeries description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n DateAxis.prototype.updateAxisBySeries = function () {\n _super.prototype.updateAxisBySeries.call(this);\n var baseInterval = this.chooseInterval(0, this.minDifference, 1);\n // handle short months\n if (this.minDifference >= $time.getDuration(\"day\", 27) && baseInterval.timeUnit == \"week\") {\n baseInterval.timeUnit = \"month\";\n baseInterval.count = 1;\n }\n if (this.minDifference >= $time.getDuration(\"day\", 29 * 2) && baseInterval.count == 1) {\n baseInterval.count = 2;\n }\n if (this.minDifference >= $time.getDuration(\"day\", 29 * 3) && baseInterval.count == 2) {\n baseInterval.count = 3;\n }\n if (this.minDifference >= $time.getDuration(\"day\", 29 * 6) && baseInterval.count == 5) {\n baseInterval.count = 6;\n }\n // handle daylight saving\n if (this.minDifference >= $time.getDuration(\"hour\", 23) && baseInterval.timeUnit == \"hour\") {\n baseInterval.timeUnit = \"day\";\n baseInterval.count = 1;\n }\n if (this.minDifference >= $time.getDuration(\"week\", 1) - $time.getDuration(\"hour\", 1) && baseInterval.timeUnit == \"day\") {\n baseInterval.timeUnit = \"week\";\n baseInterval.count = 1;\n }\n if (this.minDifference >= $time.getDuration(\"year\", 1) - $time.getDuration(\"day\", 1.01) && baseInterval.timeUnit == \"month\") {\n baseInterval.timeUnit = \"year\";\n baseInterval.count = 1;\n }\n this._baseIntervalReal = baseInterval;\n // no need to invalidate\n };\n Object.defineProperty(DateAxis.prototype, \"baseInterval\", {\n /**\r\n * @return Base interval\r\n */\n get: function get() {\n if (this._baseInterval) {\n return this._baseInterval;\n } else {\n return this._baseIntervalReal;\n }\n },\n /**\r\n * A base interval (granularity) of data.\r\n *\r\n * Used to indicate what are the base units of your data.\r\n *\r\n * For example, if you have a data set that has a data point every 5 minutes,\r\n * you may want to set this to `{ timeUnit: \"minute\", count: 5 }`.\r\n *\r\n * If not set, the Axis will try to determine the setting by its own, looking\r\n * at actual data.\r\n *\r\n * @param timeInterval base interval\r\n */\n set: function set(timeInterval) {\n if (JSON.stringify(this._baseInterval) != JSON.stringify(timeInterval)) {\n this._baseInterval = timeInterval;\n if (!$type.isNumber(timeInterval.count)) {\n timeInterval.count = 1;\n }\n this.invalidate();\n this.postProcessSeriesDataItems();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateAxis.prototype, \"skipEmptyPeriods\", {\n /**\r\n * @return Remove empty stretches of time?\r\n */\n get: function get() {\n return this.getPropertyValue(\"skipEmptyPeriods\");\n },\n /**\r\n * If enabled, axis will automatically collapse empty (without data points)\r\n * periods of time, i.e. weekends.\r\n *\r\n * An \"empty\" period is considered a stretch of time in the length of current\r\n * `baseInterval` without a single data point in it.\r\n *\r\n * For each such empty period, axis will automatically create an\r\n * [[AxisBreak]]. By default they will be invisible. You can still configure\r\n * them by accessing `axis.breaks.template`.\r\n *\r\n * [More info about breaks](https://www.amcharts.com/docs/v4/concepts/axes/#Breaks).\r\n *\r\n * Important notes:\r\n * * If you set this property to `true`, you can not add your custom axis breaks to this axis anymore.\r\n * * Using this feature affects performance. Use only if you need it.\r\n * * Setting this to `true` will reset appearance of breaks. If you want to modify appearance, do it *after* you set `skipEmptyPeriods`.\r\n *\r\n * @default false\r\n * @param value Remove empty stretches of time?\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"skipEmptyPeriods\", value)) {\n this.invalidateData();\n }\n if (value) {\n var breakTemplate = this.axisBreaks.template;\n breakTemplate.startLine.disabled = true;\n breakTemplate.endLine.disabled = true;\n breakTemplate.fillShape.disabled = true;\n breakTemplate.breakSize = 0;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateAxis.prototype, \"tooltipDateFormat\", {\n /**\r\n * @return Date format\r\n */\n get: function get() {\n return this.getPropertyValue(\"tooltipDateFormat\");\n },\n /**\r\n * A special date format to apply axis tooltips.\r\n *\r\n * Will use same format as for labels, if not set.\r\n *\r\n * @param value Date format\r\n */\n set: function set(value) {\n this.setPropertyValue(\"tooltipDateFormat\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateAxis.prototype, \"markUnitChange\", {\n /**\r\n * @return Use different format for period beginning?\r\n */\n get: function get() {\n return this.getPropertyValue(\"markUnitChange\");\n },\n /**\r\n * Use `periodChangeDateFormats` to apply different formats to the first\r\n * label in bigger time unit.\r\n *\r\n * @default true\r\n * @param value Use different format for period beginning?\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"markUnitChange\", value)) {\n this.invalidateData();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns text to show in a tooltip, based on specific relative position\r\n * within axis.\r\n *\r\n * The label will be formatted as per [[DateFormatter]] set for the whole\r\n * chart, or explicitly for this Axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param position Position\r\n * @return Label (formatted date)\r\n */\n DateAxis.prototype.getTooltipText = function (position) {\n var text;\n var date = this.positionToDate(position);\n date = $time.round(date, this.baseInterval.timeUnit, this.baseInterval.count, this.getFirstWeekDay(), this.dateFormatter.utc);\n if ($type.hasValue(this.tooltipDateFormat)) {\n text = this.dateFormatter.format(date, this.tooltipDateFormat);\n } else {\n var dateFormat = this.dateFormats.getKey(this.baseInterval.timeUnit);\n if (dateFormat) {\n text = this.dateFormatter.format(date, dateFormat);\n } else {\n text = this.getPositionLabel(position);\n }\n }\n return this.adapter.apply(\"getTooltipText\", text);\n };\n /**\r\n * Takes an absolute position within axis and adjust it to a specific position within base interval. (cell)\r\n *\r\n * @ignore Exclude from docs\r\n * @param position Source position\r\n * @param location Location in the cell\r\n * @return Adjusted position\r\n */\n DateAxis.prototype.roundPosition = function (position, location) {\n var baseInterval = this.baseInterval;\n var timeUnit = baseInterval.timeUnit;\n var count = baseInterval.count;\n var date = this.positionToDate(position);\n $time.round(date, timeUnit, count, this.getFirstWeekDay(), this.dateFormatter.utc);\n if (location > 0) {\n $time.add(date, timeUnit, location * count, this.dateFormatter.utc);\n }\n if (this.isInBreak(date.getTime())) {\n while (date.getTime() < this.max) {\n $time.add(date, timeUnit, count, this.dateFormatter.utc);\n if (!this.isInBreak(date.getTime())) {\n break;\n }\n }\n }\n return this.dateToPosition(date);\n };\n /**\r\n * Returns an relative position of the start of the cell (period), that specific position value falls into.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param position Relative position\r\n * @return Cell start relative position\r\n */\n DateAxis.prototype.getCellStartPosition = function (position) {\n return this.roundPosition(position, 0);\n };\n /**\r\n * Returns an relative position of the end of the cell (period), that specific position value falls into.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param position Relative position\r\n * @return Cell end relative position\r\n */\n DateAxis.prototype.getCellEndPosition = function (position) {\n return this.roundPosition(position, 1);\n //return this.dateToPosition($time.add(this.positionToDate(this.roundPosition(position, 1)), this.baseInterval.timeUnit, this.baseInterval.count));\n };\n /**\r\n * Returns a Series data item that corresponds to the specific pixel position\r\n * of the Axis.\r\n *\r\n * If `findNearest` (third parameter) is set to `true`, the method will try\r\n * to locate nearest available data item if none is found directly under\r\n * `position`.\r\n *\r\n * @param series Series\r\n * @param position Position (px)\r\n * @param findNearest Should axis try to find nearest tooltip if there is no data item at exact position\r\n * @return Data item\r\n */\n DateAxis.prototype.getSeriesDataItem = function (series, position, findNearest) {\n var value = this.positionToValue(position);\n var date = $time.round(new Date(value), this.baseInterval.timeUnit, this.baseInterval.count, this.getFirstWeekDay(), this.dateFormatter.utc);\n var dataItemsByAxis = series.dataItemsByAxis.getKey(this.uid);\n var dataItem = dataItemsByAxis.getKey(date.getTime().toString());\n // todo: alternatively we can find closiest here\n if (!dataItem && findNearest) {\n var key_1;\n if (this.axisLetter == \"Y\") {\n key_1 = \"dateY\";\n } else {\n key_1 = \"dateX\";\n }\n dataItem = series.dataItems.getIndex(series.dataItems.findClosestIndex(date.getTime(), function (x) {\n if (x[key_1]) {\n return x[key_1].getTime();\n } else {\n return -Infinity;\n }\n }, \"any\"));\n }\n return dataItem;\n };\n /**\r\n * Returns a formatted date based on position in axis scale.\r\n *\r\n * Please note that `position` represents position within axis which may be\r\n * zoomed and not correspond to Cursor's `position`.\r\n *\r\n * To convert Cursor's `position` to Axis' `position` use `toAxisPosition()` method.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/tutorials/tracking-cursors-position-via-api/#Tracking_Cursor_s_position} For more information about cursor tracking.\r\n * @param position Relative position on axis (0-1)\r\n * @return Position label\r\n */\n DateAxis.prototype.getPositionLabel = function (position) {\n // @todo Better format recognition\n var date = this.positionToDate(position);\n return this.dateFormatter.format(date, this.getCurrentLabelFormat());\n };\n /**\r\n * Returns label date format based on currently used time units\r\n *\r\n * @return Format\r\n */\n DateAxis.prototype.getCurrentLabelFormat = function () {\n return this.dateFormats.getKey(this._gridInterval ? this._gridInterval.timeUnit : \"day\");\n };\n /**\r\n * Initializes an Axis renderer.\r\n *\r\n * @ignore Exclude from docs\r\n */\n DateAxis.prototype.initRenderer = function () {\n _super.prototype.initRenderer.call(this);\n var renderer = this.renderer;\n if (renderer) {\n // Set defaults\n renderer.ticks.template.location = 0;\n renderer.grid.template.location = 0;\n renderer.labels.template.location = 0;\n renderer.baseGrid.disabled = true;\n }\n };\n Object.defineProperty(DateAxis.prototype, \"basePoint\", {\n /**\r\n * Coordinates of the actual axis start.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Base point\r\n */\n get: function get() {\n return {\n x: 0,\n y: 0\n };\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Zooms axis to specific Dates.\r\n *\r\n * @param startDate Start date\r\n * @param endValue End date\r\n * @param skipRangeEvent Do not invoke events\r\n * @param instantly Do not play zoom animations\r\n */\n DateAxis.prototype.zoomToDates = function (startDate, endDate, skipRangeEvent, instantly) {\n startDate = this.dateFormatter.parse(startDate);\n endDate = this.dateFormatter.parse(endDate);\n this.zoomToValues(startDate.getTime(), endDate.getTime(), skipRangeEvent, instantly);\n };\n /**\r\n * Adds `baseInterval` to \"as is\" fields.\r\n *\r\n * @param field Field name\r\n * @return Assign as is?\r\n */\n DateAxis.prototype.asIs = function (field) {\n return field == \"baseInterval\" || _super.prototype.asIs.call(this, field);\n };\n /**\r\n * Copies all properties and related data from a different instance of Axis.\r\n *\r\n * @param source Source Axis\r\n */\n DateAxis.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.dateFormats = source.dateFormats;\n this.periodChangeDateFormats = source.periodChangeDateFormats;\n if (source[\"_baseInterval\"]) {\n this.baseInterval = source.baseInterval;\n }\n };\n /**\r\n * Shows Axis tooltip at specific relative position within Axis. (0-1)\r\n *\r\n * @param position Position (0-1)\r\n * @param local or global position\r\n */\n DateAxis.prototype.showTooltipAtPosition = function (position, local) {\n var _this = this;\n if (!local) {\n position = this.toAxisPosition(position);\n }\n if (this.snapTooltip) {\n var actualDate = $time.round(this.positionToDate(position), this.baseInterval.timeUnit, 1, this.getFirstWeekDay(), this.dateFormatter.utc);\n var actualTime_1 = actualDate.getTime();\n var closestDate_1;\n this.series.each(function (series) {\n if (series.baseAxis == _this) {\n var dataItem = _this.getSeriesDataItem(series, position, true);\n if (dataItem) {\n var date = void 0;\n if (series.xAxis == _this) {\n date = dataItem.dateX;\n }\n if (series.yAxis == _this) {\n date = dataItem.dateY;\n }\n if (!closestDate_1) {\n closestDate_1 = date;\n } else {\n if (Math.abs(closestDate_1.getTime() - actualTime_1) > Math.abs(date.getTime() - actualTime_1)) {\n closestDate_1 = date;\n }\n }\n }\n }\n });\n if (closestDate_1) {\n var closestTime_1 = closestDate_1.getTime();\n closestDate_1 = $time.round(new Date(closestTime_1), this.baseInterval.timeUnit, this.baseInterval.count, this.getFirstWeekDay(), this.dateFormatter.utc);\n closestTime_1 = closestDate_1.getTime();\n closestDate_1 = new Date(closestDate_1.getTime() + this.baseDuration * this.renderer.tooltipLocation);\n position = this.dateToPosition(closestDate_1);\n this.series.each(function (series) {\n var dataItem = series.dataItemsByAxis.getKey(_this.uid).getKey(closestTime_1.toString());\n var point = series.showTooltipAtDataItem(dataItem);\n if (point) {\n _this.chart._seriesPoints.push({\n series: series,\n point: point\n });\n } else {\n // check, otherwise column tooltip will be hidden\n if (series.tooltipText || series.tooltipHTML) {\n series.hideTooltip();\n }\n }\n });\n //this.chart.sortSeriesTooltips(seriesPoints);\n }\n }\n _super.prototype.showTooltipAtPosition.call(this, position, true);\n };\n Object.defineProperty(DateAxis.prototype, \"snapTooltip\", {\n /**\r\n * @return Should snap?\r\n */\n get: function get() {\n return this.getPropertyValue(\"snapTooltip\");\n },\n /**\r\n * Should the nearest tooltip be shown if no data item is found on the\r\n * current cursor position.\r\n *\r\n * @default true\r\n * @param value Should snap?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"snapTooltip\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateAxis.prototype, \"gridInterval\", {\n /**\r\n * Current grid interval.\r\n *\r\n * @return Grid interval\r\n */\n get: function get() {\n return this._gridInterval;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n */\n DateAxis.prototype.makeGap = function (dataItem, previous) {\n var series = dataItem.component;\n if (dataItem && previous) {\n if (!series.connect && $type.isNumber(series.autoGapCount)) {\n if (series.baseAxis == this) {\n var time = dataItem.dates[\"date\" + this.axisLetter].getTime();\n var prevTime = previous.dates[\"date\" + this.axisLetter].getTime();\n if (time - prevTime > series.autoGapCount * this.baseDuration) {\n return true;\n }\n }\n }\n }\n return false;\n };\n return DateAxis;\n}(ValueAxis);\nexport { DateAxis };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"DateAxis\"] = DateAxis;\nregistry.registeredClasses[\"DateAxisDataItem\"] = DateAxisDataItem;","/**\r\n * Module, defining Axis Renderer for vertical axes.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { AxisRenderer } from \"./AxisRenderer\";\nimport { WavedLine } from \"../../core/elements/WavedLine\";\nimport { WavedRectangle } from \"../../core/elements/WavedRectangle\";\nimport { registry } from \"../../core/Registry\";\nimport { percent, Percent } from \"../../core/utils/Percent\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $path from \"../../core/rendering/Path\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $type from \"../../core/utils/Type\";\nimport { defaultRules, ResponsiveBreakpoints } from \"../../core/utils/Responsive\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A renderer for horizontal axis.\r\n *\r\n * @see {@link IAxisRendererEvents} for a list of available events\r\n * @see {@link IAxisRendererAdapters} for a list of available Adapters\r\n */\nvar AxisRendererX = /** @class */function (_super) {\n tslib_1.__extends(AxisRendererX, _super);\n /**\r\n * Constructor.\r\n *\r\n * @param axis Related axis\r\n */\n function AxisRendererX() {\n var _this = _super.call(this) || this;\n _this.className = \"AxisRendererX\";\n _this.minGridDistance = 120;\n _this.opposite = false;\n _this.rotation = 0;\n _this.width = percent(100);\n _this.labels.template.horizontalCenter = \"middle\";\n _this.applyTheme();\n return _this;\n }\n /**\r\n * @ignore\r\n */\n AxisRendererX.prototype.setAxis = function (axis) {\n _super.prototype.setAxis.call(this, axis);\n axis.layout = \"vertical\";\n };\n /**\r\n * @ignore\r\n */\n AxisRendererX.prototype.updateGridContainer = function () {\n var axis = this.axis;\n if (axis) {\n var gridContainer = this.gridContainer;\n gridContainer.x = axis.pixelX;\n gridContainer.width = axis.pixelWidth;\n }\n };\n /**\r\n * Called when rendered is attached to an Axis, as well as a property of\r\n * Axis that might affect the appearance is updated.\r\n *\r\n * E.g. `axis.opposite`, `axis.inside`, etc.\r\n *\r\n * This method is called **before** draw, so that any related setting\r\n * changed in this method can be changed.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\n AxisRendererX.prototype.processRenderer = function () {\n _super.prototype.processRenderer.call(this);\n // can not do this in init, as axis is set later\n var axis = this.axis;\n if (axis) {\n if (!(axis.width instanceof Percent)) {\n axis.width = percent(100);\n }\n // @todo Is thi sneeded?\n $utils.used(this.line);\n var title = axis.title;\n title.rotation = 0;\n title.align = \"center\";\n if (this.opposite) {\n this.line.toFront();\n title.toBack();\n } else {\n title.toFront();\n this.line.toBack();\n }\n }\n };\n /**\r\n * Updates some of the Axis tooltip's visual properties, related to\r\n * rendering of the Axis.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\n AxisRendererX.prototype.updateTooltip = function () {\n var axis = this.axis;\n if (axis) {\n var bigNum = 1000;\n var bbx = this.line.pixelX;\n var bby = this.line.pixelY;\n var bbw = this.axisLength;\n var bbh = bigNum;\n // top\n if (this.opposite) {\n if (!this.inside) {\n bby = -bigNum;\n bbh = bigNum;\n }\n }\n // bottom\n else {\n if (this.inside) {\n bby = -bigNum;\n bbh = bigNum;\n }\n }\n this.axis.updateTooltip(\"vertical\", {\n x: bbx,\n y: bby,\n width: bbw,\n height: bbh\n });\n }\n };\n /**\r\n * Updates and positions a label element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param label Label element\r\n * @param position Starting position\r\n * @param endPosition Ending position\r\n */\n AxisRendererX.prototype.updateLabelElement = function (label, position, endPosition, location) {\n if (!$type.hasValue(location)) {\n location = label.location;\n }\n position = position + (endPosition - position) * location;\n var point = this.positionToPoint(position);\n label.isMeasured = !label.inside;\n var deltaY = 0;\n var verticalCenter;\n if (this.opposite) {\n if (label.inside) {\n verticalCenter = \"top\";\n if (label.valign == \"bottom\") {\n deltaY = this.gridContainer.maxHeight;\n verticalCenter = \"bottom\";\n }\n } else {\n verticalCenter = \"bottom\";\n }\n point.y = deltaY;\n } else {\n if (label.inside) {\n verticalCenter = \"bottom\";\n if (label.valign == \"top\") {\n deltaY = -this.gridContainer.maxHeight;\n verticalCenter = \"top\";\n }\n } else {\n verticalCenter = \"top\";\n }\n point.y += deltaY;\n }\n if (label.rotation == 0) {\n // Apply fuzzy logic to verticalCenter only if labels are not rotated\n label.verticalCenter = verticalCenter;\n }\n this.positionItem(label, point);\n this.toggleVisibility(label, position, this.minLabelPosition, this.maxLabelPosition);\n };\n Object.defineProperty(AxisRendererX.prototype, \"axisLength\", {\n /**\r\n * Returns actual length of the Axis, in pixels.\r\n *\r\n * @return Length (px)\r\n */\n get: function get() {\n var axis = this.axis;\n return axis.measuredWidth - axis.pixelPaddingRight - axis.pixelPaddingLeft || 0;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Converts relative position on axis to point coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @return Point\r\n */\n AxisRendererX.prototype.positionToPoint = function (position) {\n return {\n x: this.positionToCoordinate(position),\n y: 0\n };\n };\n /**\r\n * Converts a point at specific coordinates to a relative position (0-1)\r\n * on the axis.\r\n *\r\n * @param point Point\r\n * @return Position (0-1)\r\n */\n AxisRendererX.prototype.pointToPosition = function (point) {\n return this.coordinateToPosition(point.x);\n };\n /**\r\n * [getPositionRangePath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param startPosition Starting position\r\n * @param endPosition End position\r\n * @return SVG path\r\n */\n AxisRendererX.prototype.getPositionRangePath = function (startPosition, endPosition) {\n var x1 = $math.fitToRange(this.positionToCoordinate(startPosition), 0, this.axisLength);\n var x2 = $math.fitToRange(this.positionToCoordinate(endPosition), 0, this.axisLength);\n var w = Math.abs(x2 - x1);\n var h = this.getHeight();\n var x = Math.min(x1, x2);\n var y = 0;\n return $path.rectToPath({\n x: x,\n y: y,\n width: w,\n height: h\n }, true);\n };\n /**\r\n * Updates and positions an axis break element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axisBreak Break element\r\n */\n AxisRendererX.prototype.updateBreakElement = function (axisBreak) {\n _super.prototype.updateBreakElement.call(this, axisBreak);\n var startLine = axisBreak.startLine;\n var endLine = axisBreak.endLine;\n var fillShape = axisBreak.fillShape;\n var startPoint = axisBreak.startPoint;\n var endPoint = axisBreak.endPoint;\n var y1 = axisBreak.pixelMarginLeft;\n var y2 = this.getHeight() - axisBreak.pixelMarginTop - axisBreak.pixelMarginBottom;\n startPoint.x = $math.fitToRange(startPoint.x, -1, this.pixelWidth + 1);\n endPoint.x = $math.fitToRange(endPoint.x, -1, this.pixelWidth + 1);\n if (startPoint.x == endPoint.x && (startPoint.x < 0 || startPoint.x > this.pixelWidth)) {\n axisBreak.fillShape.__disabled = true;\n } else {\n axisBreak.fillShape.__disabled = false;\n }\n startLine.y = y1;\n startLine.width = 0;\n startLine.height = y2;\n endLine.y = y1;\n endLine.width = 0;\n endLine.height = y2;\n fillShape.height = y2;\n fillShape.width = Math.abs(endPoint.x - startPoint.x);\n fillShape.y = y1;\n fillShape.x = startPoint.x;\n };\n /**\r\n * Updates and positions a grid element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param grid Grid element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\n AxisRendererX.prototype.updateGridElement = function (grid, position, endPosition) {\n position = position + (endPosition - position) * grid.location;\n var point = this.positionToPoint(position);\n //point.x = $utils.spritePointToSprite({x:point.x, y:0}, this, this.gridContainer).x;\n grid.path = $path.moveTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: 0,\n y: this.getHeight()\n });\n this.positionItem(grid, point);\n this.toggleVisibility(grid, position, 0, 1);\n };\n /**\r\n * Updates and positions a tick element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param tick Tick element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\n AxisRendererX.prototype.updateTickElement = function (tick, position, endPosition) {\n position = position + (endPosition - position) * tick.location;\n var point = this.positionToPoint(position);\n var tickLength = tick.length;\n point.y = $utils.spritePointToSprite({\n x: 0,\n y: this.line.pixelY\n }, this.line.parent, this.gridContainer).y;\n if (this.opposite) {\n tickLength *= tick.inside ? 1 : -1;\n } else {\n tickLength *= tick.inside ? -1 : 1;\n }\n tick.path = $path.moveTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: 0,\n y: tickLength\n });\n this.positionItem(tick, point);\n this.toggleVisibility(tick, position, 0, 1);\n };\n /**\r\n * Updates and positions the axis line element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisRendererX.prototype.updateAxisLine = function () {\n this.line.path = $path.moveTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: this.axisLength,\n y: 0\n });\n };\n /**\r\n * Updates and positions the base grid element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisRendererX.prototype.updateBaseGridElement = function () {\n _super.prototype.updateBaseGridElement.call(this);\n var axis = this.axis;\n var h = this.getHeight();\n var w = this.pixelWidth;\n var baseGrid = this.baseGrid;\n var x = axis.basePoint.x;\n if (x < -0.2 || x > w + 0.2) {\n baseGrid.hide(0);\n } else {\n var y = $utils.spritePointToSprite({\n x: 0,\n y: 0\n }, this.gridContainer, baseGrid.parent).y;\n baseGrid.path = $path.moveTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: 0,\n y: h\n });\n baseGrid.moveTo({\n x: x,\n y: y\n });\n baseGrid.show(0);\n }\n };\n /**\r\n * Creates visual elements for and axis break.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axisBreak Axis break\r\n */\n AxisRendererX.prototype.createBreakSprites = function (axisBreak) {\n axisBreak.startLine = new WavedLine();\n axisBreak.endLine = new WavedLine();\n var wavedRectangle = new WavedRectangle();\n wavedRectangle.setWavedSides(false, true, false, true);\n axisBreak.fillShape = wavedRectangle;\n };\n /**\r\n * @ignore\r\n */\n AxisRendererX.prototype.toAxisPosition = function (value) {\n var inversedPosition = value;\n var axis = this.axis;\n var parent = axis.parent;\n if (axis && parent) {\n var relativeX = axis.pixelX / parent.innerWidth;\n var relativeWidth = axis.pixelWidth / parent.innerWidth;\n return (inversedPosition - relativeX) / relativeWidth;\n }\n return value;\n };\n return AxisRendererX;\n}(AxisRenderer);\nexport { AxisRendererX };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"AxisRendererX\"] = AxisRendererX;\n/**\r\n * Add default responsive rules\r\n */\n/**\r\n * Put labels inside plot area.\r\n * Disable first and last labels.\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.heightXS,\n state: function state(target, stateId) {\n if (target instanceof AxisRendererX) {\n var state = target.states.create(stateId);\n state.properties.inside = true;\n state.properties.maxLabelPosition = 0.9;\n state.properties.minLabelPosition = 0.1;\n return state;\n }\n return null;\n }\n});\n/**\r\n * Disable labels altogather on very small charts\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.heightXXS,\n state: function state(target, stateId) {\n if (target instanceof AxisRendererX) {\n var state = target.states.create(stateId);\n state.properties.disabled = true;\n return state;\n }\n return null;\n }\n});","/**\r\n * A module which defines functionality related to Category Axis Break.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { AxisBreak } from \"./AxisBreak\";\nimport { registry } from \"../../core/Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Base class to define \"breaks\" in axes\r\n * @see {@link ICategoryAxisBreakEvents} for a list of available events\r\n * @see {@link ICategoryAxisBreakAdapters} for a list of available Adapters\r\n */\nvar CategoryAxisBreak = /** @class */function (_super) {\n tslib_1.__extends(CategoryAxisBreak, _super);\n /**\r\n * Constructor\r\n */\n function CategoryAxisBreak() {\n var _this = _super.call(this) || this;\n _this.className = \"CategoryAxisBreak\";\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(CategoryAxisBreak.prototype, \"startPosition\", {\n /**\r\n * Pixel position of the break's start.\r\n *\r\n * @return Position (px)\r\n * @readonly\r\n */\n get: function get() {\n if (this.axis) {\n return this.axis.indexToPosition(this.adjustedStartValue);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CategoryAxisBreak.prototype, \"endPosition\", {\n /**\r\n * Pixel position of the break's end.\r\n *\r\n * @return Position (px)\r\n * @readonly\r\n */\n get: function get() {\n if (this.axis) {\n return this.axis.indexToPosition(this.adjustedEndValue);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CategoryAxisBreak.prototype, \"startCategory\", {\n /**\r\n * @return Start category\r\n */\n get: function get() {\n return this.getPropertyValue(\"startCategory\");\n },\n /**\r\n * A category break starts on.\r\n *\r\n * @param value Start category\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"startCategory\", value)) {\n if (this.axis) {\n this.axis.invalidateDataItems();\n this.axis.invalidateSeries();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CategoryAxisBreak.prototype, \"endCategory\", {\n /**\r\n * @return End category\r\n */\n get: function get() {\n return this.getPropertyValue(\"endCategory\");\n },\n /**\r\n * A category break ends on.\r\n *\r\n * @param value End category\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"endCategory\", value)) {\n if (this.axis) {\n this.axis.invalidateDataItems();\n this.axis.invalidateSeries();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CategoryAxisBreak.prototype, \"startValue\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n var category = this.getPropertyValue(\"startCategory\");\n if (category) {\n return this.axis.categoryToIndex(category);\n } else {\n return this.getPropertyValue(\"startValue\");\n }\n },\n /**\r\n * An index of start category.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"startValue\", value)) {\n if (this.axis) {\n this.axis.invalidateDataItems();\n this.axis.invalidateSeries();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CategoryAxisBreak.prototype, \"endValue\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n var category = this.getPropertyValue(\"endCategory\");\n if (category) {\n return this.axis.categoryToIndex(category);\n } else {\n return this.getPropertyValue(\"endValue\");\n }\n },\n /**\r\n * An index of end category or a end value.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"endValue\", value)) {\n if (this.axis) {\n this.axis.invalidateDataItems();\n this.axis.invalidateSeries();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n return CategoryAxisBreak;\n}(AxisBreak);\nexport { CategoryAxisBreak };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"CategoryAxisBreak\"] = CategoryAxisBreak;","/**\r\n * Category axis module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Axis, AxisDataItem } from \"./Axis\";\nimport { registry } from \"../../core/Registry\";\nimport { Dictionary } from \"../../core/utils/Dictionary\";\nimport { CategoryAxisBreak } from \"./CategoryAxisBreak\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport { Adapter } from \"../../core/utils/Adapter\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[CategoryAxis]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar CategoryAxisDataItem = /** @class */function (_super) {\n tslib_1.__extends(CategoryAxisDataItem, _super);\n /**\r\n * Constructor\r\n */\n function CategoryAxisDataItem() {\n var _this = _super.call(this) || this;\n /**\r\n * Holds Adapter.\r\n */\n _this.adapter = new Adapter(_this);\n _this.seriesDataItems = {};\n _this.className = \"CategoryAxisDataItem\";\n _this.text = \"{category}\";\n _this.locations.category = 0;\n _this.locations.endCategory = 1;\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(CategoryAxisDataItem.prototype, \"category\", {\n /**\r\n * @return Category\r\n */\n get: function get() {\n if (this.adapter.isEnabled(\"category\")) {\n return this.adapter.apply(\"category\", this.properties.category);\n }\n return this.properties.category;\n },\n /**\r\n * Category.\r\n *\r\n * @param value Category\r\n */\n set: function set(value) {\n this.setProperty(\"category\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CategoryAxisDataItem.prototype, \"endCategory\", {\n /**\r\n * @return End category\r\n */\n get: function get() {\n return this.properties.endCategory;\n },\n /**\r\n * End category.\r\n *\r\n * Used for items that span several categories, like [[CategoryAxisBreak]].\r\n *\r\n * @param value End category\r\n */\n set: function set(value) {\n this.setProperty(\"endCategory\", value);\n },\n enumerable: true,\n configurable: true\n });\n return CategoryAxisDataItem;\n}(AxisDataItem);\nexport { CategoryAxisDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Used to create a category-based axis for the chart.\r\n *\r\n * ```TypeScript\r\n * // Create the axis\r\n * let xAxis = chart.xAxes.push(new am4charts.CategoryAxis());\r\n *\r\n * // Set settings\r\n * xAxis.title.text = \"Clients\";\r\n * ```\r\n * ```JavaScript\r\n * // Create the axis\r\n * var valueAxis = chart.xAxes.push(new am4charts.CategoryAxis());\r\n *\r\n * // Set settings\r\n * valueAxis.title.text = \"Clients\";\r\n * ```\r\n * ```JSON\r\n * \"xAxes\": [{\r\n * \"type\": \"CategoryAxis\",\r\n * \"title\": {\r\n * \"text\": \"Clients\"\r\n * }\r\n * }]\r\n * ```\r\n *\r\n * @see {@link ICategoryAxisEvents} for a list of available Events\r\n * @see {@link ICategoryAxisAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar CategoryAxis = /** @class */function (_super) {\n tslib_1.__extends(CategoryAxis, _super);\n /**\r\n * Constructor\r\n */\n function CategoryAxis() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * A collection that holds Axis' data items sorted by each category.\r\n */\n _this.dataItemsByCategory = new Dictionary();\n _this.className = \"CategoryAxis\";\n // Set field name\n _this.axisFieldName = \"category\";\n _this._lastDataItem = _this.createDataItem();\n _this._lastDataItem.component = _this;\n _this._disposers.push(_this._lastDataItem);\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Returns a new/empty [[DataItem]] of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n CategoryAxis.prototype.createDataItem = function () {\n return new CategoryAxisDataItem();\n };\n /**\r\n * Returns a new/empty [[AxisBreak]] of the appropriate type.\r\n *\r\n * @return Axis break\r\n */\n CategoryAxis.prototype.createAxisBreak = function () {\n return new CategoryAxisBreak();\n };\n /**\r\n * Processes a related series' data item.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param dataItem Data item\r\n */\n CategoryAxis.prototype.processSeriesDataItem = function (dataItem, axisLetter) {\n _super.prototype.processSeriesDataItem.call(this, dataItem, axisLetter);\n var category = dataItem[\"category\" + this.axisLetter];\n var categoryAxisDataItem = this.dataItemsByCategory.getKey(category);\n if (categoryAxisDataItem) {\n var seriesId = dataItem.component.uid;\n var seriesDataItems = categoryAxisDataItem.seriesDataItems[seriesId];\n if (!seriesDataItems) {\n seriesDataItems = [];\n categoryAxisDataItem.seriesDataItems[seriesId] = seriesDataItems;\n }\n seriesDataItems.push(dataItem);\n }\n };\n /**\r\n * Validates the data range.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n */\n CategoryAxis.prototype.validateDataRange = function () {\n var _this = this;\n _super.prototype.validateDataRange.call(this);\n $iter.each(this._series.iterator(), function (series) {\n if (series.xAxis instanceof CategoryAxis && series.yAxis instanceof CategoryAxis) {\n series.invalidateDataRange();\n } else {\n var startIndex = _this.positionToIndex(_this.start);\n var endIndex = _this.positionToIndex(_this.end);\n if (endIndex >= _this.dataItems.length) {\n endIndex--;\n }\n var seriesId = series.uid;\n var minIndex = void 0;\n var maxIndex = void 0;\n for (var i = startIndex; i <= endIndex; i++) {\n var axisDataItem = _this.dataItems.getIndex(i);\n if (axisDataItem) {\n var seriesDataItems = axisDataItem.seriesDataItems[seriesId];\n if (seriesDataItems) {\n for (var i_1 = 0; i_1 < seriesDataItems.length; i_1++) {\n var seriesDataItem = seriesDataItems[i_1];\n if (seriesDataItem) {\n var index = seriesDataItem.index;\n if (!$type.isNumber(minIndex) || index < minIndex) {\n minIndex = index;\n }\n if (!$type.isNumber(maxIndex) || index > maxIndex) {\n maxIndex = index;\n }\n }\n }\n }\n }\n }\n if ($type.isNumber(minIndex)) {\n series.startIndex = minIndex;\n } else {\n series.start = _this.start;\n }\n if ($type.isNumber(maxIndex)) {\n series.endIndex = maxIndex + 1;\n } else {\n series.end = _this.end;\n }\n // range might not change, but axis breaks might.\n if (_this.axisBreaks.length > 0) {\n series.invalidateDataRange();\n }\n }\n });\n };\n /**\r\n * Validates the whole axis. Causes it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n */\n CategoryAxis.prototype.validate = function () {\n var _this = this;\n _super.prototype.validate.call(this);\n var dataCount = this.dataItems.length;\n var startIndex = $math.fitToRange(Math.floor(this.start * dataCount - 1), 0, dataCount);\n var endIndex = $math.fitToRange(Math.ceil(this.end * dataCount), 0, dataCount);\n if (this.renderer.invalid) {\n this.renderer.validate();\n }\n // find frequency at which we'll show items\n var maxCount = this.renderer.axisLength / this.renderer.minGridDistance;\n var frequency = Math.min(this.dataItems.length, Math.ceil((endIndex - startIndex) / maxCount));\n this._startIndex = Math.floor(startIndex / frequency) * frequency;\n this._endIndex = Math.ceil(this.end * dataCount);\n this.fixAxisBreaks();\n if (this._startIndex == this._endIndex) {\n this._endIndex++;\n }\n this._frequency = frequency;\n if (this.axisLength <= 0) {\n return;\n }\n this.maxZoomFactor = this.dataItems.length;\n if (this.dataItems.length <= 0) {\n this.maxZoomFactor = 1;\n }\n this.resetIterators();\n // it's important to use protected variables here, as getters will return 0 - length\n // TODO use iterator instead\n // @ todo: not solved cat axis item fading\n startIndex = $math.max(0, this._startIndex - this._frequency);\n endIndex = $math.min(this.dataItems.length, this._endIndex + this._frequency);\n var itemIndex = 0;\n for (var i = 0; i < startIndex; i++) {\n var dataItem = this.dataItems.getIndex(i);\n dataItem.__disabled = true;\n }\n for (var i = endIndex, len = this.dataItems.length; i < len; i++) {\n var dataItem = this.dataItems.getIndex(i);\n dataItem.__disabled = true;\n }\n for (var i = startIndex; i < endIndex; i++) {\n if (i < this.dataItems.length) {\n var dataItem = this.dataItems.getIndex(i);\n if (i / this._frequency == Math.round(i / this._frequency)) {\n var axisBreak = this.isInBreak(i);\n if (!axisBreak) {\n this.appendDataItem(dataItem);\n this.validateDataElement(dataItem, itemIndex);\n }\n itemIndex++;\n } else {\n //previously we disabled all before, but this is better for cpu\n //this.validateDataElement(dataItem, itemIndex); // helps to solve shrinking // not good - creates all items\n dataItem.__disabled = true;\n }\n }\n }\n this.appendDataItem(this._lastDataItem);\n this.validateDataElement(this._lastDataItem, itemIndex + 1, this.dataItems.length);\n var axisBreaks = this.axisBreaks;\n axisBreaks.each(function (axisBreak) {\n var adjustedStartValue = axisBreak.adjustedStartValue;\n var adjustedEndValue = axisBreak.adjustedEndValue;\n if ($math.intersect({\n start: adjustedStartValue,\n end: adjustedEndValue\n }, {\n start: _this._startIndex,\n end: _this._endIndex\n })) {\n var frequency_1 = $math.fitToRange(Math.ceil(_this._frequency / axisBreak.breakSize), 1, adjustedEndValue - adjustedStartValue);\n var itemIndex_1 = 0;\n // TODO use iterator instead\n for (var b = adjustedStartValue; b <= adjustedEndValue; b = b + frequency_1) {\n var dataItem = _this.dataItems.getIndex(b);\n _this.appendDataItem(dataItem);\n _this.validateDataElement(dataItem, itemIndex_1);\n itemIndex_1++;\n }\n }\n });\n this.validateBreaks();\n this.validateAxisRanges();\n this.ghostLabel.invalidate(); // solves font issue\n this.renderer.invalidateLayout();\n };\n /**\r\n * [validateDataElement description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param dataItem [description]\r\n * @param itemIndex [description]\r\n */\n CategoryAxis.prototype.validateDataElement = function (dataItem, itemIndex, index) {\n _super.prototype.validateDataElement.call(this, dataItem);\n //dataItem.__disabled = false;\n var renderer = this.renderer;\n if (!$type.isNumber(index)) {\n index = this.categoryToIndex(dataItem.category);\n }\n var endIndex = this.categoryToIndex(dataItem.endCategory);\n if (!$type.isNumber(endIndex)) {\n endIndex = index;\n }\n var position = this.indexToPosition(index, dataItem.locations.category);\n var endPosition = this.indexToPosition(endIndex, dataItem.locations.endCategory);\n dataItem.position = position;\n var fillEndIndex;\n var fillPosition;\n var fillEndPosition;\n if (dataItem.isRange) {\n fillEndIndex = endIndex;\n fillPosition = this.indexToPosition(index, dataItem.locations.category);\n fillEndPosition = this.indexToPosition(fillEndIndex, dataItem.locations.endCategory);\n }\n dataItem.point = renderer.positionToPoint(position);\n var tick = dataItem.tick;\n if (tick && !tick.disabled) {\n renderer.updateTickElement(tick, position, endPosition);\n }\n var grid = dataItem.grid;\n if (grid && !grid.disabled) {\n renderer.updateGridElement(grid, position, endPosition);\n }\n var label = dataItem.label;\n if (label && !label.disabled) {\n // theorethically this might result problems if category text changes, the range text won't change. But otherwise range.label.text = \"custom text\" wont' work, which is not intuitive.\n if (!dataItem.isRange || label.text == undefined) {\n dataItem.text = dataItem.text;\n }\n renderer.updateLabelElement(label, position, endPosition);\n if (dataItem.label.measuredWidth > this.ghostLabel.measuredWidth || dataItem.label.measuredHeight > this.ghostLabel.measuredHeight) {\n if (dataItem.label.html) {\n this.ghostLabel.html = dataItem.label.currentText;\n } else {\n this.ghostLabel.text = dataItem.label.currentText;\n }\n }\n }\n var fill = dataItem.axisFill;\n if (fill && !fill.disabled) {\n if (!dataItem.isRange) {\n fillEndIndex = index + this._frequency;\n fillPosition = this.indexToPosition(index, fill.location);\n fillEndPosition = this.indexToPosition(fillEndIndex, fill.location);\n }\n renderer.updateFillElement(fill, fillPosition, fillEndPosition);\n if (!dataItem.isRange) {\n this.fillRule(dataItem, itemIndex);\n }\n }\n var mask = dataItem.mask;\n if (mask) {\n renderer.updateFillElement(mask, fillPosition, fillEndPosition);\n }\n };\n /**\r\n * @ignore\r\n */\n CategoryAxis.prototype.disposeData = function () {\n this.dataItemsByCategory.clear();\n _super.prototype.disposeData.call(this);\n };\n /**\r\n * Processes the axis data item.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n * @param dataContext The raw data that corresponds to this data item\r\n */\n CategoryAxis.prototype.processDataItem = function (dataItem, dataContext) {\n // creat a collection for fast access\n _super.prototype.processDataItem.call(this, dataItem, dataContext);\n // check if such category already exists\n //let existingDataItem: CategoryAxisDataItem = this.dataItemsByCategory.getKey(dataItem.category);\n //if (existingDataItem && existingDataItem != dataItem) {\n //\tthis.dataItems.remove(existingDataItem);\n //}\n this.dataItemsByCategory.setKey(dataItem.category, dataItem);\n };\n CategoryAxis.prototype.getDataItem = function (dataContext) {\n var category = dataContext[this.dataFields.category];\n var dataItem = this.dataItemsByCategory.getKey(category);\n if (dataItem) {\n return dataItem;\n } else {\n return this.dataItems.create();\n }\n };\n /**\r\n * Converts a category index to an actual screen coordinate on the axis.\r\n *\r\n * `location` identifies relative location within category. 0 - beginning,\r\n * 0.5 - middle, 1 - end, and anything inbetween.\r\n *\r\n * @param index Index\r\n * @param location Location (0-1)\r\n * @return Position (px)\r\n */\n CategoryAxis.prototype.indexToPosition = function (index, location) {\n if (!$type.isNumber(location)) {\n location = 0.5;\n }\n var startIndex = this.startIndex;\n var endIndex = this.endIndex;\n var difference = this.adjustDifference(startIndex, endIndex);\n var startLocation = this.startLocation;\n var endLocation = this.endLocation;\n difference -= startLocation;\n difference -= 1 - endLocation;\n var axisBreaks = this.axisBreaks;\n $iter.eachContinue(axisBreaks.iterator(), function (axisBreak) {\n var breakStartIndex = axisBreak.adjustedStartValue;\n var breakEndIndex = axisBreak.adjustedEndValue;\n if (index < startIndex) {\n return false;\n }\n if ($math.intersect({\n start: breakStartIndex,\n end: breakEndIndex\n }, {\n start: startIndex,\n end: endIndex\n })) {\n breakStartIndex = Math.max(startIndex, breakStartIndex);\n breakEndIndex = Math.min(endIndex, breakEndIndex);\n var breakSize = axisBreak.breakSize;\n // value to the right of break end\n if (index > breakEndIndex) {\n startIndex += (breakEndIndex - breakStartIndex) * (1 - breakSize);\n }\n // value to the left of break start\n else if (index < breakStartIndex) {}\n // value within break\n else {\n index = breakStartIndex + (index - breakStartIndex) * breakSize;\n }\n }\n return true;\n });\n return $math.round((index + location - startLocation - startIndex) / difference, 5);\n };\n /**\r\n * Converts a string category name to relative position on axis.\r\n *\r\n * `location` identifies relative location within category. 0 - beginning,\r\n * 0.5 - middle, 1 - end, and anything inbetween.\r\n *\r\n * @param category Category name\r\n * @param location Location (0-1)\r\n * @return Position\r\n */\n CategoryAxis.prototype.categoryToPosition = function (category, location) {\n var index = this.categoryToIndex(category);\n return this.indexToPosition(index, location);\n };\n /**\r\n * Converts a string category name to a orientation point (x, y, angle) on axis\r\n *\r\n * `location` identifies relative location within category. 0 - beginning,\r\n * 0.5 - middle, 1 - end, and anything inbetween.\r\n * @param category Category name\r\n * @param location Location (0-1)\r\n * @return Orientation point\r\n */\n CategoryAxis.prototype.categoryToPoint = function (category, location) {\n var position = this.categoryToPosition(category, location);\n var point = this.renderer.positionToPoint(position);\n var angle = this.renderer.positionToAngle(position);\n return {\n x: point.x,\n y: point.y,\n angle: angle\n };\n };\n /**\r\n * Converts a string category name to a orientation point (x, y, angle) on axis\r\n *\r\n * `location` identifies relative location within category. 0 - beginning,\r\n * 0.5 - middle, 1 - end, and anything inbetween.\r\n * @param category Category name\r\n * @param location Location (0-1)\r\n * @return Orientation point\r\n */\n CategoryAxis.prototype.anyToPoint = function (category, location) {\n return this.categoryToPoint(category, location);\n };\n /**\r\n * Converts a string category name to relative position on axis.\r\n *\r\n * An alias to `categoryToPosition()`.\r\n *\r\n * @param category Category name\r\n * @param location Location (0-1)\r\n * @return Relative position\r\n */\n CategoryAxis.prototype.anyToPosition = function (category, location) {\n return this.categoryToPosition(category, location);\n };\n /**\r\n * Converts named category to an index of data item it corresponds to.\r\n *\r\n * @param category Category\r\n * @return Data item index\r\n */\n CategoryAxis.prototype.categoryToIndex = function (category) {\n if ($type.hasValue(category)) {\n var dataItem = this.dataItemsByCategory.getKey(category);\n if (dataItem) {\n return dataItem.index;\n }\n }\n };\n /**\r\n * Zooms the axis to specific named ctaegories.\r\n *\r\n * @param startCategory Start category\r\n * @param endCategory End category\r\n */\n CategoryAxis.prototype.zoomToCategories = function (startCategory, endCategory) {\n this.zoomToIndexes(this.categoryToIndex(startCategory), this.categoryToIndex(endCategory) + 1);\n };\n /**\r\n * [getAnyRangePath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param start [description]\r\n * @param end [description]\r\n * @param startLocation [description]\r\n * @param endLocation [description]\r\n * @return [description]\r\n */\n CategoryAxis.prototype.getAnyRangePath = function (start, end, startLocation, endLocation) {\n var startPos = this.categoryToPosition(start, startLocation);\n var endPos = this.categoryToPosition(end, endLocation);\n return this.getPositionRangePath(startPos, endPos); // Base class (Axis) gets range shape from AxisRenderer\n };\n /**\r\n * Takes an absolute position (px) within axis and adjust it to a specific\r\n * `location` within category it corresponds to.\r\n *\r\n * @param position Source position (px)\r\n * @param location Location within category (0-1)\r\n * @return Adjusted position (px)\r\n */\n CategoryAxis.prototype.roundPosition = function (position, location) {\n var index = this.positionToIndex(position);\n return this.indexToPosition(index, location);\n };\n /**\r\n * Finds and returns first series data item with specific category\r\n * @param series Target series\r\n * @param category Category\r\n * @return XYSeriesDataItem data item\r\n */\n CategoryAxis.prototype.getFirstSeriesDataItem = function (series, category) {\n for (var i = 0; i < series.dataItems.length; i++) {\n var dataItem = series.dataItems.getIndex(i);\n if (series.xAxis == this) {\n if (dataItem.categoryX == category) {\n return dataItem;\n }\n }\n if (series.yAxis == this) {\n if (dataItem.categoryY == category) {\n return dataItem;\n }\n }\n }\n };\n /**\r\n * Finds and returns last series data item with specific category.\r\n * @param series Target series\r\n * @param category Category\r\n * @return XYSeriesDataItem data item\r\n */\n CategoryAxis.prototype.getLastSeriesDataItem = function (series, category) {\n for (var i = series.dataItems.length - 1; i >= 0; i--) {\n var dataItem = series.dataItems.getIndex(i);\n if (series.xAxis == this) {\n if (dataItem.categoryX == category) {\n return dataItem;\n }\n }\n if (series.yAxis == this) {\n if (dataItem.categoryY == category) {\n return dataItem;\n }\n }\n }\n };\n /**\r\n * Returns a data item from Series that corresponds to a specific absolute\r\n * position on the Axis.\r\n *\r\n * @param series Target series\r\n * @param position Position (px)\r\n * @return XYSeriesDataItem data item\r\n */\n CategoryAxis.prototype.getSeriesDataItem = function (series, position, findNearest) {\n var _this = this;\n if ($type.isNumber(position)) {\n var index_1 = this.positionToIndex(position);\n if (index_1 >= this.dataItems.length) {\n index_1--;\n }\n var dataItem = this.dataItems.getIndex(index_1);\n if (dataItem) {\n var category_1 = dataItem.category;\n var sdi_1;\n var seriesDataItem = series.dataItems.getIndex(index_1);\n if (seriesDataItem) {\n if (series.xAxis == this) {\n if (seriesDataItem.categoryX == category_1) {\n return seriesDataItem;\n }\n }\n if (series.yAxis == this) {\n if (seriesDataItem.categoryY == category_1) {\n return seriesDataItem;\n }\n }\n }\n series.dataItems.each(function (dataItem) {\n if (series.xAxis == _this) {\n if (dataItem.categoryX == category_1) {\n if (!sdi_1) {\n sdi_1 = dataItem;\n }\n if (Math.abs(index_1 - sdi_1.index) > Math.abs(index_1 - dataItem.index)) {\n sdi_1 = dataItem;\n }\n }\n }\n if (series.yAxis == _this) {\n if (dataItem.categoryY == category_1) {\n if (!sdi_1) {\n sdi_1 = dataItem;\n }\n if (Math.abs(index_1 - sdi_1.index) > Math.abs(index_1 - dataItem.index)) {\n sdi_1 = dataItem;\n }\n }\n }\n });\n //@todo\n if (findNearest) {}\n return sdi_1;\n }\n }\n };\n /**\r\n * Returns the X coordinate for series' data item.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem Data item\r\n * @param key Category\r\n * @param location Location (0-1)\r\n * @return X coordinate (px)\r\n */\n CategoryAxis.prototype.getX = function (dataItem, key, location) {\n var position;\n if ($type.hasValue(key)) {\n position = this.categoryToPosition(dataItem.categories[key], location);\n }\n if ($type.isNaN(position)) {\n return this.basePoint.x;\n } else {\n return this.renderer.positionToPoint(position).x;\n }\n };\n /**\r\n * Returns the Y coordinate for series' data item.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem Data item\r\n * @param key Category\r\n * @param location Location (0-1)\r\n * @return Y coordinate (px)\r\n */\n CategoryAxis.prototype.getY = function (dataItem, key, location) {\n var position;\n if ($type.hasValue(key)) {\n position = this.categoryToPosition(dataItem.categories[key], location);\n }\n if ($type.isNaN(position)) {\n return this.basePoint.y;\n } else {\n return this.renderer.positionToPoint(position).y;\n }\n };\n /**\r\n * Returns an angle for series data item.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param dataItem Data item\r\n * @param key Category\r\n * @param location Location (0-1)\r\n * @param stackKey Stack key (?)\r\n * @return Angle\r\n */\n CategoryAxis.prototype.getAngle = function (dataItem, key, location, stackKey) {\n return this.positionToAngle(this.categoryToPosition(dataItem.categories[key], location));\n };\n /**\r\n * Returns an absolute pixel coordinate of the start of the cell (category),\r\n * that specific position value falls into.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param position Position (px)\r\n * @return Cell start position (px)\r\n */\n CategoryAxis.prototype.getCellStartPosition = function (position) {\n return this.roundPosition(position, 0);\n };\n /**\r\n * Returns an absolute pixel coordinate of the end of the cell (category),\r\n * that specific position value falls into.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param position Position (px)\r\n * @return Cell end position (px)\r\n */\n CategoryAxis.prototype.getCellEndPosition = function (position) {\n return this.roundPosition(position, 1);\n };\n /**\r\n * Returns text to show in a category tooltip, based on specific position\r\n * within axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param position Position (px)\r\n * @return Label (category)\r\n */\n CategoryAxis.prototype.getTooltipText = function (position) {\n var dataItem = this.dataItems.getIndex(this.positionToIndex(position));\n if (dataItem) {\n return this.adapter.apply(\"getTooltipText\", dataItem.category);\n }\n };\n /**\r\n * Returns an index of the category that corresponds to specific pixel\r\n * position within axis.\r\n *\r\n * @param position Position (px)\r\n * @return Category index\r\n */\n CategoryAxis.prototype.positionToIndex = function (position) {\n position = $math.round(position, 10);\n if (position < 0) {\n position = 0;\n }\n var startIndex = this.startIndex;\n var endIndex = this.endIndex;\n var difference = endIndex - startIndex;\n var axisBreaks = this.axisBreaks;\n var index = null;\n // in case we have some axis breaks\n $iter.eachContinue(axisBreaks.iterator(), function (axisBreak) {\n var breakStartPosition = axisBreak.startPosition;\n var breakEndPosition = axisBreak.endPosition;\n var breakStartIndex = axisBreak.adjustedStartValue;\n var breakEndIndex = axisBreak.adjustedEndValue;\n breakStartIndex = $math.max(breakStartIndex, startIndex);\n breakEndIndex = $math.min(breakEndIndex, endIndex);\n var breakSize = axisBreak.breakSize;\n difference -= (breakEndIndex - breakStartIndex) * (1 - breakSize);\n // position to the right of break end\n if (position > breakEndPosition) {\n startIndex += (breakEndIndex - breakStartIndex) * (1 - breakSize);\n }\n // position to the left of break start\n else if (position < breakStartPosition) {}\n // value within break\n else {\n var breakPosition = (position - breakStartPosition) / (breakEndPosition - breakStartPosition);\n index = breakStartIndex + Math.round(breakPosition * (breakEndIndex - breakStartIndex));\n return false;\n }\n return true;\n });\n if (!$type.isNumber(index)) {\n index = Math.floor(position * difference + startIndex);\n }\n // not good, when panning out of bounds, each time one less item gets selected\n //if (index >= endIndex) {\n //\tindex--;\n //}\n return index;\n };\n /**\r\n * Returns category based on position.\r\n *\r\n * Please note that `position` represents position within axis which may be\r\n * zoomed and not correspond to Cursor's `position`.\r\n *\r\n * To convert Cursor's `position` to Axis' `position` use `toAxisPosition()` method.\r\n *\r\n * This is a synonim of `getPositionLabel()` implemented here for consistentcy.\r\n *\r\n * @since 4.3.8\r\n * @see {@link https://www.amcharts.com/docs/v4/tutorials/tracking-cursors-position-via-api/#Tracking_Cursor_s_position} For more information about cursor tracking.\r\n * @param position Relative position on axis (0-1)\r\n * @return Position label\r\n */\n CategoryAxis.prototype.positionToCategory = function (position) {\n return this.getPositionLabel(position);\n };\n /**\r\n * Returns category based on position.\r\n *\r\n * Please note that `position` represents position within axis which may be\r\n * zoomed and not correspond to Cursor's `position`.\r\n *\r\n * To convert Cursor's `position` to Axis' `position` use `toAxisPosition()` method.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/tutorials/tracking-cursors-position-via-api/#Tracking_Cursor_s_position} For more information about cursor tracking.\r\n * @param position Relative position on axis (0-1)\r\n * @return Position label\r\n */\n CategoryAxis.prototype.getPositionLabel = function (position) {\n var dataItem = this.dataItems.getIndex(this.positionToIndex(position));\n if (dataItem) {\n return dataItem.category;\n }\n };\n Object.defineProperty(CategoryAxis.prototype, \"basePoint\", {\n /**\r\n * Coordinates of the actual axis start.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Base point\r\n */\n get: function get() {\n // This makes base grid to be drawn at the end of the axis and adds extra\n // grid which we need to nicely close the chart.\n return this.renderer.positionToPoint(1);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Initializes Axis' renderer.\r\n *\r\n * @ignore Exclude from docs\r\n */\n CategoryAxis.prototype.initRenderer = function () {\n _super.prototype.initRenderer.call(this);\n var renderer = this.renderer;\n renderer.baseGrid.disabled = true;\n };\n Object.defineProperty(CategoryAxis.prototype, \"frequency\", {\n /**\r\n * Current frequency of labels of the axis.\r\n *\r\n * Normally it would be 1, but when labels start to be hidden due\r\n * to `minGridDistance` this read-only property will increase.\r\n *\r\n * @readonly\r\n * @since 4.2.0\r\n * @return Label frequency\r\n */\n get: function get() {\n return this._frequency;\n },\n enumerable: true,\n configurable: true\n });\n return CategoryAxis;\n}(Axis);\nexport { CategoryAxis };\n/**\r\n * Register class, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"CategoryAxis\"] = CategoryAxis;\nregistry.registeredClasses[\"CategoryAxisDataItem\"] = CategoryAxisDataItem;","/**\r\n * XY series module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Series, SeriesDataItem } from \"./Series\";\nimport { Sprite } from \"../../core/Sprite\";\nimport { ValueAxis } from \"../axes/ValueAxis\";\nimport { Dictionary } from \"../../core/utils/Dictionary\";\nimport { MutableValueDisposer } from \"../../core/utils/Disposer\";\nimport { CategoryAxis } from \"../axes/CategoryAxis\";\nimport { DateAxis } from \"../axes/DateAxis\";\nimport { registry } from \"../../core/Registry\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $array from \"../../core/utils/Array\";\nimport * as $object from \"../../core/utils/Object\";\nimport * as $path from \"../../core/rendering/Path\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[XYSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar XYSeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(XYSeriesDataItem, _super);\n /**\r\n * Constructor\r\n */\n function XYSeriesDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"XYSeriesDataItem\";\n _this.values.valueX = {\n stack: 0\n };\n _this.values.valueY = {\n stack: 0\n };\n _this.values.openValueX = {};\n _this.values.openValueY = {};\n _this.values.dateX = {};\n _this.values.dateY = {};\n _this.values.openDateX = {};\n _this.values.openDateY = {};\n _this.setLocation(\"dateX\", 0.5, 0);\n _this.setLocation(\"dateY\", 0.5, 0);\n _this.setLocation(\"categoryX\", 0.5, 0);\n _this.setLocation(\"categoryY\", 0.5, 0);\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(XYSeriesDataItem.prototype, \"valueX\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.values.valueX.value;\n },\n /**\r\n * Item's numeric value on X value axis.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setValue(\"valueX\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeriesDataItem.prototype, \"valueY\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.values.valueY.value;\n },\n /**\r\n * Item's numeric value on Y value axis.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setValue(\"valueY\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeriesDataItem.prototype, \"dateX\", {\n /**\r\n * @return Date\r\n */\n get: function get() {\n return this.getDate(\"dateX\");\n },\n /**\r\n * Item's date value on X date-based axis.\r\n *\r\n * @param date Date\r\n */\n set: function set(date) {\n this.setDate(\"dateX\", date);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeriesDataItem.prototype, \"dateY\", {\n /**\r\n * @return Date\r\n */\n get: function get() {\n return this.getDate(\"dateY\");\n },\n /**\r\n * Item's date value on Y date-based axis.\r\n *\r\n * @param date Date\r\n */\n set: function set(date) {\n this.setDate(\"dateY\", date);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeriesDataItem.prototype, \"categoryX\", {\n /**\r\n * @return Category\r\n */\n get: function get() {\n return this.categories.categoryX;\n },\n /**\r\n * Item's category on X category axis.\r\n *\r\n * @param category Category\r\n */\n set: function set(category) {\n this.setCategory(\"categoryX\", category);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeriesDataItem.prototype, \"categoryY\", {\n /**\r\n * @return Category\r\n */\n get: function get() {\n return this.categories.categoryY;\n },\n /**\r\n * Item's category on Y category axis.\r\n *\r\n * @param category Category\r\n */\n set: function set(category) {\n this.setCategory(\"categoryY\", category);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeriesDataItem.prototype, \"openValueX\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.values.openValueX.value;\n },\n /**\r\n * Item's open numeric value on X value axis.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setValue(\"openValueX\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeriesDataItem.prototype, \"openValueY\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.values.openValueY.value;\n },\n /**\r\n * Item's open numeric value on Y value axis.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setValue(\"openValueY\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeriesDataItem.prototype, \"openDateX\", {\n /**\r\n * @return Date\r\n */\n get: function get() {\n return this.getDate(\"openDateX\");\n },\n /**\r\n * Item's open date value on X date-based axis.\r\n *\r\n * @param date Date\r\n */\n set: function set(date) {\n this.setDate(\"openDateX\", date);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeriesDataItem.prototype, \"openDateY\", {\n /**\r\n * @return Date\r\n */\n get: function get() {\n return this.getDate(\"openDateY\");\n },\n /**\r\n * Item's open date value on Y date-based axis.\r\n *\r\n * @param date Date\r\n */\n set: function set(date) {\n this.setDate(\"openDateY\", date);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeriesDataItem.prototype, \"openCategoryX\", {\n /**\r\n * @return Category\r\n */\n get: function get() {\n return this.categories.openCategoryX;\n },\n /**\r\n * Item's open category on X category axis.\r\n *\r\n * @param category Category\r\n */\n set: function set(category) {\n this.setCategory(\"openCategoryX\", category);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeriesDataItem.prototype, \"openCategoryY\", {\n /**\r\n * @return Category\r\n */\n get: function get() {\n return this.categories.openCategoryY;\n },\n /**\r\n * Item's open category on Y category axis.\r\n *\r\n * @param category Category\r\n */\n set: function set(category) {\n this.setCategory(\"openCategoryY\", category);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Return smallest value out of all item's value fields.\r\n *\r\n * @ignore Exclude from docs\r\n * @param fields Fields to check in\r\n * @param working Include working (temporary) values\r\n * @param stackValue If item is in a stack, the value item starts as\r\n * @return Value\r\n */\n XYSeriesDataItem.prototype.getMin = function (fields, working, stackValue) {\n var _this = this;\n //if (this.visible) { // dumped because of non smooth zooming\n var min;\n if (!$type.isNumber(stackValue)) {\n stackValue = 0;\n }\n $array.each(fields, function (field) {\n var value;\n if (working) {\n value = _this.getWorkingValue(field);\n } else {\n value = _this.getValue(field);\n }\n value += stackValue;\n if (value < min || !$type.isNumber(min)) {\n min = value;\n }\n });\n return min;\n //}\n };\n /**\r\n * Return biggest value out of all item's value fields.\r\n *\r\n * @ignore Exclude from docs\r\n * @param fields Fields to check in\r\n * @param working Include working (temporary) values\r\n * @param stackValue If item is in a stack, the value item starts as\r\n * @return Value\r\n */\n XYSeriesDataItem.prototype.getMax = function (fields, working, stackValue) {\n var _this = this;\n //if (this.visible) { // dumped because of non smooth zooming\n var max;\n if (!$type.isNumber(stackValue)) {\n stackValue = 0;\n }\n $array.each(fields, function (field) {\n var value;\n if (working) {\n value = _this.getWorkingValue(field);\n } else {\n value = _this.getValue(field);\n }\n value += stackValue;\n if (value > max || !$type.isNumber(max)) {\n max = value;\n }\n });\n return max;\n //}\n };\n return XYSeriesDataItem;\n}(SeriesDataItem);\nexport { XYSeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines Series for [[XYChart]].\r\n *\r\n * @see {@link IXYSeriesEvents} for a list of available Events\r\n * @see {@link IXYSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\nvar XYSeries = /** @class */function (_super) {\n tslib_1.__extends(XYSeries, _super);\n /**\r\n * Constructor\r\n */\n function XYSeries() {\n var _this = _super.call(this) || this;\n /**\r\n * X axis the series is attached to.\r\n */\n _this._xAxis = new MutableValueDisposer();\n /**\r\n * Y axis the series is attached to.\r\n */\n _this._yAxis = new MutableValueDisposer();\n /**\r\n * [_xValueFields description]\r\n *\r\n * @todo Description\r\n */\n _this._xValueFields = [];\n /**\r\n * [_yValueFields description]\r\n *\r\n * @todo Description\r\n */\n _this._yValueFields = [];\n /**\r\n * @ignore\r\n */\n _this._baseInterval = {};\n _this.className = \"XYSeries\";\n _this.isMeasured = false;\n _this.cursorTooltipEnabled = true;\n _this.cursorHoverEnabled = true;\n _this.excludeFromTotal = false;\n _this.mainContainer.mask = new Sprite();\n _this.mainContainer.mask.setElement(_this.paper.add(\"path\"));\n _this.stacked = false;\n _this.snapTooltip = false;\n _this.tooltip.pointerOrientation = \"horizontal\";\n _this.tooltip.events.on(\"hidden\", function () {\n _this.returnBulletDefaultState();\n }, undefined, false);\n _this._disposers.push(_this._xAxis);\n _this._disposers.push(_this._yAxis);\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n XYSeries.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"X/Y Series\");\n }\n };\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n XYSeries.prototype.createDataItem = function () {\n return new XYSeriesDataItem();\n };\n /**\r\n * @ignore\r\n */\n XYSeries.prototype.dataChangeUpdate = function () {\n this._tmin.clear();\n this._tmax.clear();\n this._smin.clear();\n this._smax.clear();\n if (this.xAxis) {\n this.xAxis.seriesDataChangeUpdate(this);\n }\n if (this.yAxis) {\n this.yAxis.seriesDataChangeUpdate(this);\n }\n };\n /**\r\n * (Re)validates the series' data.\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYSeries.prototype.validateData = function () {\n this.defineFields();\n if (this.data.length > 0) {\n this.dataChangeUpdate();\n }\n _super.prototype.validateData.call(this);\n this.updateItemReaderText();\n if (!$type.hasValue(this.dataFields[this._xField]) || !$type.hasValue(this.dataFields[this._yField])) {\n throw Error(\"Data fields for series \\\"\" + (this.name ? this.name : this.uid) + \"\\\" are not properly defined.\");\n }\n };\n /**\r\n * Processes data item.\r\n *\r\n * @param dataItem Data item\r\n * @param dataContext Raw data\r\n * @param index Index of the data item\r\n */\n XYSeries.prototype.processDataItem = function (dataItem, dataContext) {\n try {\n _super.prototype.processDataItem.call(this, dataItem, dataContext);\n dataItem.events.disable();\n this.xAxis.processSeriesDataItem(dataItem, \"X\");\n this.yAxis.processSeriesDataItem(dataItem, \"Y\");\n dataItem.events.enable();\n this.setInitialWorkingValues(dataItem);\n } catch (e) {\n this._chart.raiseCriticalError(e);\n }\n };\n /**\r\n *\r\n * When validating raw data, instead of processing data item, we update it\r\n *\r\n * @ignore Exclude from docs\r\n * @param item\r\n */\n XYSeries.prototype.updateDataItem = function (dataItem) {\n _super.prototype.updateDataItem.call(this, dataItem);\n //dataItem.events.disable();\n this.xAxis.processSeriesDataItem(dataItem, \"X\");\n this.yAxis.processSeriesDataItem(dataItem, \"Y\");\n //dataItem.events.enable();\t\t\n };\n /**\r\n * Inits data item's working values.\r\n *\r\n * @param dataItem Data item\r\n * @param index Data item's index\r\n */\n XYSeries.prototype.setInitialWorkingValues = function (dataItem) {};\n /**\r\n * @ignore\r\n */\n XYSeries.prototype.disposeData = function () {\n _super.prototype.disposeData.call(this);\n if (this.xAxis) {\n var dataItemsX = this.dataItemsByAxis.getKey(this.xAxis.uid);\n if (dataItemsX) {\n dataItemsX.clear();\n }\n if (this.xAxis instanceof CategoryAxis) {\n this.clearCatAxis(this.xAxis);\n }\n }\n if (this.yAxis) {\n var dataItemsY = this.dataItemsByAxis.getKey(this.yAxis.uid);\n if (dataItemsY) {\n dataItemsY.clear();\n }\n if (this.yAxis instanceof CategoryAxis) {\n this.clearCatAxis(this.yAxis);\n }\n }\n };\n /**\r\n * @ignore\r\n */\n XYSeries.prototype.clearCatAxis = function (axis) {\n var uid = this.uid;\n axis.dataItems.each(function (dataItem) {\n if (dataItem.seriesDataItems[uid]) {\n dataItem.seriesDataItems[uid] = [];\n }\n });\n };\n /**\r\n * Sets up which data fields to use for data access.\r\n */\n XYSeries.prototype.defineFields = function () {\n var xAxis = this.xAxis;\n var yAxis = this.yAxis;\n var xAxisFieldName = xAxis.axisFieldName;\n var xField = xAxisFieldName + \"X\";\n var xOpenField = \"open\" + $utils.capitalize(xAxisFieldName) + \"X\";\n var yAxisFieldName = yAxis.axisFieldName;\n var yField = yAxisFieldName + \"Y\";\n var yOpenField = \"open\" + $utils.capitalize(yAxisFieldName) + \"Y\";\n this._xField = xField;\n this._yField = yField;\n if (this.dataFields[xOpenField]) {\n this._xOpenField = xOpenField;\n }\n if (this.dataFields[yOpenField]) {\n this._yOpenField = yOpenField;\n }\n if (!this.dataFields[yOpenField] && this.baseAxis == this.yAxis) {\n this._yOpenField = yField;\n }\n if (!this.dataFields[xOpenField] && this.baseAxis == this.xAxis) {\n this._xOpenField = xField;\n }\n if (this.stacked && this.baseAxis == this.xAxis) {\n this._xOpenField = xField;\n }\n if (this.stacked && this.baseAxis == this.yAxis) {\n this._yOpenField = yField;\n }\n if (this.xAxis instanceof CategoryAxis && this.yAxis instanceof CategoryAxis) {\n if (!this._yOpenField) {\n this._yOpenField = yField;\n }\n }\n this._xValueFields = [];\n this._yValueFields = [];\n this.addValueField(this.xAxis, this._xValueFields, this._xField);\n this.addValueField(this.xAxis, this._xValueFields, this._xOpenField);\n this.addValueField(this.yAxis, this._yValueFields, this._yField);\n this.addValueField(this.yAxis, this._yValueFields, this._yOpenField);\n };\n /**\r\n * [axis description]\r\n *\r\n * @todo Description\r\n * @param axis Axis\r\n * @param fields Fields (?)\r\n * @param field Field\r\n */\n XYSeries.prototype.addValueField = function (axis, fields, field) {\n if (axis instanceof ValueAxis) {\n if ($type.hasValue(this.dataFields[field]) && fields.indexOf(field) == -1) {\n fields.push(field);\n }\n }\n };\n /**\r\n * Sets category field from the category axis.\r\n *\r\n * User might set field for category axis only, but not for series. In such\r\n * case, we take field value from axis and set it for series.\r\n *\r\n * @param field Field\r\n * @param axis Axis\r\n */\n XYSeries.prototype.setCategoryAxisField = function (field, axis) {\n if (!$type.hasValue(this.dataFields[field])) {\n this.dataFields[field] = axis.dataFields.category;\n }\n };\n /**\r\n * Sets date field from the date axis.\r\n *\r\n * User might set field for category axis only, but not for series. In such\r\n * case, we take field value from axis and set it for series.\r\n *\r\n * @param field Field\r\n * @param axis Axis\r\n */\n XYSeries.prototype.setDateAxisField = function (field, axis) {\n if (!$type.hasValue(this.dataFields[field])) {\n this.dataFields[field] = axis.dataFields.date;\n }\n };\n /**\r\n * Performs after-draw tasks, e.g. creates masks.\r\n */\n XYSeries.prototype.afterDraw = function () {\n _super.prototype.afterDraw.call(this);\n this.createMask();\n };\n /**\r\n * Create a mask for the series.\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYSeries.prototype.createMask = function () {\n // this mask from which we cut out ranges. does not work well if ranges overlap.\n if (this.mainContainer.mask) {\n var path_1 = this.getMaskPath();\n // @todo: this approach won't work well on circluar or other non x/y axes\n $iter.each(this.axisRanges.iterator(), function (range) {\n if (range.axisFill.fillPath) {\n range.axisFill.validate();\n path_1 += range.axisFill.fillPath;\n }\n });\n this.mainContainer.mask.path = path_1;\n }\n };\n /**\r\n * Returns an SVG path to use as series mask.\r\n *\r\n * @return SVG path\r\n */\n XYSeries.prototype.getMaskPath = function () {\n return $path.rectToPath({\n x: 0,\n y: 0,\n width: this.xAxis.axisLength,\n height: this.yAxis.axisLength\n });\n };\n /**\r\n * Returns axis data field to use.\r\n *\r\n * @param axis Axis\r\n * @return Field name\r\n */\n XYSeries.prototype.getAxisField = function (axis) {\n if (axis == this.xAxis) {\n return this.xField;\n }\n if (axis == this.yAxis) {\n return this.yField;\n }\n };\n /**\r\n * Validates data items.\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYSeries.prototype.validateDataItems = function () {\n // this helps date axis to check which baseInterval we should use\n this.xAxis.updateAxisBySeries();\n this.yAxis.updateAxisBySeries();\n _super.prototype.validateDataItems.call(this);\n this.xAxis.postProcessSeriesDataItems();\n this.yAxis.postProcessSeriesDataItems();\n };\n /**\r\n * Validates data range.\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYSeries.prototype.validateDataRange = function () {\n if (this.xAxis.dataRangeInvalid) {\n this.xAxis.validateDataRange();\n }\n if (this.yAxis.dataRangeInvalid) {\n this.yAxis.validateDataRange();\n }\n _super.prototype.validateDataRange.call(this);\n };\n /**\r\n * (Re)validates the whole series, effectively causing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYSeries.prototype.validate = function () {\n if (this.xAxis.invalid) {\n this.xAxis.validate();\n }\n if (this.yAxis.invalid) {\n this.yAxis.validate();\n }\n this.y = this.yAxis.pixelY;\n this.x = this.xAxis.pixelX;\n this._showBullets = true;\n var minBulletDistance = this.minBulletDistance;\n if ($type.isNumber(minBulletDistance)) {\n if (this.baseAxis.axisLength / (this.endIndex - this.startIndex) < minBulletDistance) {\n this._showBullets = false;\n }\n }\n _super.prototype.validate.call(this);\n };\n Object.defineProperty(XYSeries.prototype, \"xAxis\", {\n /**\r\n * @return Axis\r\n */\n get: function get() {\n if (this.chart) {\n if (!this._xAxis.get()) {\n var axis = this.chart.xAxes.getIndex(0);\n if (!axis) {\n throw Error(\"There are no X axes on chart.\");\n }\n this.xAxis = axis;\n }\n return this._xAxis.get();\n }\n },\n /**\r\n * X axis the series is attached to.\r\n *\r\n * @param axis Axis\r\n */\n set: function set(axis) {\n var oldAxis = this._xAxis.get();\n if (oldAxis != axis) {\n if (oldAxis) {\n this.dataItemsByAxis.removeKey(oldAxis.uid);\n // TODO why is this here ?\n this._xAxis.dispose();\n // temp @todo: why it is not disposed?\n oldAxis.series.removeValue(this);\n }\n this._xAxis.set(axis, axis.registerSeries(this));\n this.dataItemsByAxis.setKey(axis.uid, new Dictionary());\n this.invalidateData();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeries.prototype, \"yAxis\", {\n /**\r\n * @return Axis\r\n */\n get: function get() {\n if (this.chart) {\n if (!this._yAxis.get()) {\n var axis = this.chart.yAxes.getIndex(0);\n if (!axis) {\n throw Error(\"There are no Y axes on chart.\");\n }\n this.yAxis = axis;\n }\n return this._yAxis.get();\n }\n },\n /**\r\n * Y axis the series is attached to.\r\n *\r\n * @param axis Axis\r\n */\n set: function set(axis) {\n var oldAxis = this._yAxis.get();\n if (oldAxis != axis) {\n if (oldAxis) {\n this.dataItemsByAxis.removeKey(oldAxis.uid);\n // TODO why is this here ?\n this._yAxis.dispose();\n // temp @todo: why it is not disposed?\n oldAxis.series.removeValue(this);\n }\n this._yAxis.set(axis, axis.registerSeries(this));\n this.dataItemsByAxis.setKey(axis.uid, new Dictionary());\n this.invalidateData();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeries.prototype, \"baseAxis\", {\n /**\r\n * @return Axis\r\n */\n get: function get() {\n if (!this._baseAxis) {\n if (this.yAxis instanceof DateAxis) {\n this._baseAxis = this.yAxis;\n }\n if (this.xAxis instanceof DateAxis) {\n this._baseAxis = this.xAxis;\n }\n if (this.yAxis instanceof CategoryAxis) {\n this._baseAxis = this.yAxis;\n }\n if (this.xAxis instanceof CategoryAxis) {\n this._baseAxis = this.xAxis;\n }\n if (!this._baseAxis) {\n this._baseAxis = this.xAxis;\n }\n }\n return this._baseAxis;\n },\n /**\r\n * The main (base) axis.\r\n *\r\n * This is the axis that series fills will go to, or grow animations will\r\n * happen from.\r\n *\r\n * @param value Axis\r\n */\n set: function set(value) {\n if (this._baseAxis != value) {\n this._baseAxis = value;\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Processes values after data items' were added.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItems Data items\r\n */\n XYSeries.prototype.processValues = function (working) {\n _super.prototype.processValues.call(this, working);\n var dataItems = this.dataItems;\n var minX = Infinity;\n var maxX = -Infinity;\n var minY = Infinity;\n var maxY = -Infinity;\n var startIndex = this.startIndex;\n var endIndex = this.endIndex;\n if (!working) {\n startIndex = 0;\n endIndex = this.dataItems.length;\n }\n for (var i = startIndex; i < endIndex; i++) {\n var dataItem = dataItems.getIndex(i);\n this.getStackValue(dataItem, working);\n var stackX = dataItem.getValue(\"valueX\", \"stack\");\n var stackY = dataItem.getValue(\"valueY\", \"stack\");\n minX = $math.min(dataItem.getMin(this._xValueFields, working, stackX), minX);\n minY = $math.min(dataItem.getMin(this._yValueFields, working, stackY), minY);\n maxX = $math.max(dataItem.getMax(this._xValueFields, working, stackX), maxX);\n maxY = $math.max(dataItem.getMax(this._yValueFields, working, stackY), maxY);\n // if it's stacked, pay attention to stack value\n if (this.stacked) {\n if (this.baseAxis == this.xAxis) {\n minY = $math.min(minY, stackY);\n }\n if (this.baseAxis == this.yAxis) {\n minX = $math.min(minX, stackX);\n }\n }\n }\n // this is mainly for value axis to calculate total and perecent.total of each series category\n this.xAxis.processSeriesDataItems();\n this.yAxis.processSeriesDataItems();\n var xAxisId = this.xAxis.uid;\n var yAxisId = this.yAxis.uid;\n if (!working) {\n if (this._tmin.getKey(xAxisId) != minX || this._tmax.getKey(xAxisId) != maxX || this._tmin.getKey(yAxisId) != minY || this._tmax.getKey(yAxisId) != maxY) {\n this._tmin.setKey(xAxisId, minX);\n this._tmax.setKey(xAxisId, maxX);\n this._tmin.setKey(yAxisId, minY);\n this._tmax.setKey(yAxisId, maxY);\n var stackedSeries = this.stackedSeries;\n if (stackedSeries) {\n if (stackedSeries.isDisposed()) {\n this.stackedSeries = undefined;\n } else {\n stackedSeries.processValues(false);\n }\n }\n this.dispatchImmediately(\"extremeschanged\");\n }\n }\n if (this._smin.getKey(xAxisId) != minX || this._smax.getKey(xAxisId) != maxX || this._smin.getKey(yAxisId) != minY || this._smax.getKey(yAxisId) != maxY) {\n this._smin.setKey(xAxisId, minX);\n this._smax.setKey(xAxisId, maxX);\n this._smin.setKey(yAxisId, minY);\n this._smax.setKey(yAxisId, maxY);\n if (this.appeared || this.start != 0 || this.end != 1) {\n this.dispatchImmediately(\"selectionextremeschanged\");\n }\n }\n if (!working && this.stacked) {\n this.processValues(true);\n }\n };\n /**\r\n * Hides element's [[Tooltip]].\r\n *\r\n * @see {@link Tooltip}\r\n */\n XYSeries.prototype.hideTooltip = function () {\n _super.prototype.hideTooltip.call(this);\n this.returnBulletDefaultState();\n this._prevTooltipDataItem = undefined;\n };\n /**\r\n * Shows series tooltip at specific position.\r\n *\r\n * @param xPosition X\r\n * @param yPosition Y\r\n */\n XYSeries.prototype.showTooltipAtPosition = function (xPosition, yPosition) {\n var dataItem;\n if (this.visible && !this.isHiding && !this.isShowing) {\n var xAxis = this._xAxis.get();\n var yAxis = this._yAxis.get();\n if (xAxis == this.baseAxis) {\n dataItem = xAxis.getSeriesDataItem(this, xAxis.toAxisPosition(xPosition), this.snapTooltip);\n }\n if (yAxis == this.baseAxis) {\n dataItem = yAxis.getSeriesDataItem(this, yAxis.toAxisPosition(yPosition), this.snapTooltip);\n }\n var point = this.showTooltipAtDataItem(dataItem);\n if (point) {\n return point;\n }\n // so that if tooltip is shown on columns or bullets for it not to be hidden\n if (!this.tooltipText) {\n return;\n }\n }\n this.hideTooltip();\n };\n /**\r\n * Shows series tooltip at specific dataItem.\r\n *\r\n * @param dataItem\r\n */\n XYSeries.prototype.showTooltipAtDataItem = function (dataItem) {\n this.returnBulletDefaultState(dataItem);\n if (dataItem && dataItem.visible) {\n this.updateLegendValue(dataItem);\n if (this.cursorTooltipEnabled) {\n this.tooltipDataItem = dataItem;\n // todo: add tooltipXField and tooltipYField.\n var tooltipXField = this.tooltipXField;\n var tooltipYField = this.tooltipYField;\n if ($type.hasValue(dataItem[tooltipXField]) && $type.hasValue(dataItem[tooltipYField])) {\n var tooltipPoint = this.getPoint(dataItem, tooltipXField, tooltipYField, dataItem.locations[tooltipXField], dataItem.locations[tooltipYField]);\n if (tooltipPoint) {\n this.tooltipX = tooltipPoint.x;\n this.tooltipY = tooltipPoint.y;\n if (this._prevTooltipDataItem != dataItem) {\n this.dispatchImmediately(\"tooltipshownat\", {\n type: \"tooltipshownat\",\n target: this,\n dataItem: dataItem\n });\n this._prevTooltipDataItem = dataItem;\n }\n if (this.cursorHoverEnabled) {\n try {\n for (var _a = tslib_1.__values(dataItem.sprites), _b = _a.next(); !_b.done; _b = _a.next()) {\n var sprite = _b.value;\n if (!sprite.parent.visible || sprite.isHidden || sprite.__disabled || sprite.disabled || sprite.isHiding) {} else {\n sprite.isHover = true;\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_b && !_b.done && (_c = _a[\"return\"])) _c.call(_a);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n }\n if (this.showTooltip()) {\n return $utils.spritePointToSvg({\n x: tooltipPoint.x,\n y: tooltipPoint.y\n }, this);\n }\n return;\n }\n }\n }\n }\n var e_1, _c;\n };\n /**\r\n * returns default state to bullets when tooltip is shown at some other data item or hidden\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYSeries.prototype.returnBulletDefaultState = function (dataItem) {\n if (this._prevTooltipDataItem && this._prevTooltipDataItem != dataItem) {\n try {\n for (var _a = tslib_1.__values(this._prevTooltipDataItem.sprites), _b = _a.next(); !_b.done; _b = _a.next()) {\n var sprite = _b.value;\n if (!sprite.isDisposed()) {\n sprite.isHover = false;\n } else {\n this._prevTooltipDataItem = undefined;\n }\n }\n } catch (e_2_1) {\n e_2 = {\n error: e_2_1\n };\n } finally {\n try {\n if (_b && !_b.done && (_c = _a[\"return\"])) _c.call(_a);\n } finally {\n if (e_2) throw e_2.error;\n }\n }\n }\n var e_2, _c;\n };\n XYSeries.prototype.shouldCreateBullet = function (dataItem, bulletTemplate) {\n // use series xField/yField if bullet doesn't have fields set\n var xField = bulletTemplate.xField;\n if (!$type.hasValue(xField)) {\n xField = this.xField;\n }\n var yField = bulletTemplate.yField;\n if (!$type.hasValue(yField)) {\n yField = this.yField;\n }\n if (this.xAxis instanceof ValueAxis && !dataItem.hasValue([xField]) || this.yAxis instanceof ValueAxis && !dataItem.hasValue([yField])) {\n return false;\n }\n return true;\n };\n /*\r\n public positionBullet(bullet: Bullet) {\r\n super.positionBullet(bullet);\r\n \r\n let dataItem:XYSeriesDataItem = bullet.dataItem;\r\n \r\n // use series xField/yField if bullet doesn't have fields set\r\n let xField: string = bullet.xField;\r\n if (!$type.hasValue(xField)) {\r\n xField = this.xField;\r\n }\r\n \r\n let yField: string = bullet.yField;\r\n if (!$type.hasValue(yField)) {\r\n yField = this.yField;\r\n }\r\n \r\n if ((this.xAxis instanceof ValueAxis && !dataItem.hasValue([xField])) || (this.yAxis instanceof ValueAxis && !dataItem.hasValue([yField]))) {\r\n bullet.visible = false;\r\n }\r\n else {\r\n let bulletLocationX: number = this.getBulletLocationX(bullet, xField);\r\n let bulletLocationY: number = this.getBulletLocationY(bullet, yField);\r\n \r\n let point = this.getPoint(dataItem, xField, yField, bulletLocationX, bulletLocationY);\r\n if (point) {\r\n let xOpenField = this.xOpenField;\r\n let yOpenField = this.yOpenField;\r\n \r\n let xAxis = this.xAxis;\r\n let yAxis = this.yAxis;\r\n let positionX:number;\r\n let positionY:number;\r\n \r\n if((xAxis instanceof DateAxis && (xOpenField && xOpenField != xField)) || xAxis instanceof ValueAxis){\r\n \r\n if(!$type.isNumber(bulletLocationX)){\r\n bulletLocationX = 0;\r\n }\r\n \r\n let openValue:number;\r\n let closeValue:number = dataItem.getWorkingValue(xField);\r\n \r\n if(!xOpenField){\r\n openValue = xAxis.min;\r\n }\r\n else{\r\n openValue = dataItem.getWorkingValue(xOpenField);\r\n }\r\n let middleValue = openValue + (closeValue - openValue) * (1 - bulletLocationX);\r\n \r\n positionX = xAxis.valueToPosition(middleValue);\r\n }\r\n else if(xAxis instanceof CategoryAxis){\r\n positionX = xAxis.categoryToPosition((dataItem)[xField], bulletLocationX);\r\n }\r\n \r\n if((yAxis instanceof DateAxis && (yOpenField && yOpenField != yField)) || yAxis instanceof ValueAxis){\r\n \r\n if(!$type.isNumber(bulletLocationY)){\r\n bulletLocationY = 0;\r\n }\r\n \r\n let openValue:number;\r\n let closeValue:number = dataItem.getWorkingValue(yField);\r\n \r\n if(!yOpenField){\r\n openValue = yAxis.min;\r\n }\r\n else{\r\n openValue = dataItem.getWorkingValue(yOpenField);\r\n }\r\n let middleValue = openValue + (closeValue - openValue) * (1 - bulletLocationY);\r\n \r\n positionY = yAxis.valueToPosition(middleValue);\r\n }\r\n else if(yAxis instanceof CategoryAxis){\r\n positionY = yAxis.categoryToPosition((dataItem)[yField], bulletLocationY);\r\n }\r\n \r\n bullet.visible = true;\r\n \r\n this.positionBulletReal(bullet, positionX, positionY);\r\n }\r\n else {\r\n bullet.visible = false;\r\n }\r\n }\r\n }\r\n \r\n protected positionBulletReal(bullet:Sprite, positionX:number, positionY:number){\r\n bullet.x = this.xAxis.renderer.positionToPoint(positionX).x;\r\n bullet.y = this.yAxis.renderer.positionToPoint(positionY).y;\r\n }\r\n */\n /**\r\n * Positions series bullet.\r\n *\r\n * @ignore Exclude from docs\r\n * @param bullet Bullet\r\n */\n XYSeries.prototype.positionBullet = function (bullet) {\n _super.prototype.positionBullet.call(this, bullet);\n var dataItem = bullet.dataItem;\n // use series xField/yField if bullet doesn't have fields set\n var xField = bullet.xField;\n if (!$type.hasValue(xField)) {\n xField = this.xField;\n }\n var yField = bullet.yField;\n if (!$type.hasValue(yField)) {\n yField = this.yField;\n }\n if (this.xAxis instanceof ValueAxis && !dataItem.hasValue([xField]) || this.yAxis instanceof ValueAxis && !dataItem.hasValue([yField])) {\n bullet.visible = false;\n } else {\n var bulletLocationX = this.getBulletLocationX(bullet, xField);\n var bulletLocationY = this.getBulletLocationY(bullet, yField);\n var point = this.getPoint(dataItem, xField, yField, bulletLocationX, bulletLocationY);\n if (point) {\n var x = point.x;\n var y = point.y;\n if ($type.isNumber(bullet.locationX) && this.xOpenField != this.xField) {\n var openX = this.xAxis.getX(dataItem, this.xOpenField);\n x = x - (x - openX) * bullet.locationX;\n }\n if ($type.isNumber(bullet.locationY) && this.yOpenField != this.yField) {\n var openY = this.yAxis.getY(dataItem, this.yOpenField);\n y = y - (y - openY) * bullet.locationY;\n }\n bullet.moveTo({\n x: x,\n y: y\n });\n bullet.visible = true;\n } else {\n bullet.visible = false;\n }\n }\n };\n /**\r\n * returns bullet x location\r\n * @ignore\r\n */\n XYSeries.prototype.getBulletLocationX = function (bullet, field) {\n var bulletLocation = bullet.locationX;\n var dataItem = bullet.dataItem;\n if (!$type.isNumber(bulletLocation)) {\n bulletLocation = dataItem.workingLocations[field];\n }\n return bulletLocation;\n };\n /**\r\n * returns bullet x location\r\n * @ignore\r\n */\n XYSeries.prototype.getBulletLocationY = function (bullet, field) {\n var bulletLocation = bullet.locationY;\n var dataItem = bullet.dataItem;\n if (!$type.isNumber(bulletLocation)) {\n bulletLocation = dataItem.workingLocations[field];\n }\n return bulletLocation;\n };\n Object.defineProperty(XYSeries.prototype, \"stacked\", {\n /**\r\n * @return Can be stacked?\r\n */\n get: function get() {\n return this.getPropertyValue(\"stacked\");\n },\n /**\r\n * Can items from this series be included into stacks?\r\n *\r\n * Note: proper stacking is only possible if series have the same number\r\n * of data items. To ensure this, don't set data directly on series\r\n * but do this on chart instead.\r\n *\r\n * @default false\r\n * @param stacked Can be stacked?\r\n */\n set: function set(stacked) {\n this.setPropertyValue(\"stacked\", stacked, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeries.prototype, \"snapTooltip\", {\n /**\r\n * @return Should snap?\r\n */\n get: function get() {\n return this.getPropertyValue(\"snapTooltip\");\n },\n /**\r\n * Should the nearest tooltip be shown if no data item is found on the\r\n * current cursor position?\r\n *\r\n * @default false\r\n * @param value Should snap?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"snapTooltip\", value);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Shows hidden series.\r\n *\r\n * @param duration Duration of reveal animation (ms)\r\n * @return Animation\r\n */\n XYSeries.prototype.show = function (duration) {\n var _this = this;\n var fields;\n if (this.xAxis instanceof ValueAxis && this.xAxis != this.baseAxis) {\n fields = this._xValueFields;\n }\n if (this.yAxis instanceof ValueAxis && this.yAxis != this.baseAxis) {\n fields = this._yValueFields;\n }\n var startIndex = this.startIndex;\n var endIndex = this.endIndex;\n var delay = 0;\n var interpolationDuration = this.defaultState.transitionDuration;\n if ($type.isNumber(duration)) {\n interpolationDuration = duration;\n }\n var anim;\n $iter.each($iter.indexed(this.dataItems.iterator()), function (a) {\n var i = a[0];\n var dataItem = a[1];\n if (_this.sequencedInterpolation && interpolationDuration > 0) {\n delay = _this.sequencedInterpolationDelay * i + interpolationDuration * (i - startIndex) / (endIndex - startIndex);\n }\n anim = dataItem.show(interpolationDuration, delay, fields);\n });\n var animation = _super.prototype.show.call(this, duration);\n if (anim && !anim.isFinished()) {\n animation = anim;\n }\n return animation;\n };\n /**\r\n * Hides series.\r\n *\r\n * @param duration Duration of hiding animation (ms)\r\n * @return Animation\r\n */\n XYSeries.prototype.hide = function (duration) {\n var _this = this;\n var fields;\n var value;\n var xAxis = this.xAxis;\n if (xAxis instanceof ValueAxis && xAxis != this.baseAxis) {\n fields = this._xValueFields;\n // animate to zero if 0 is within zoomMin/zoomMax\n if (this.stacked || xAxis.minZoomed < 0 && xAxis.maxZoomed > 0 || this.stackedSeries) {\n value = 0;\n } else {\n value = xAxis.min;\n }\n }\n var yAxis = this.yAxis;\n if (yAxis instanceof ValueAxis && yAxis != this.baseAxis) {\n fields = this._yValueFields;\n // animate to zero if 0 is within zoomMin/zoomMax\n if (this.stacked || yAxis.minZoomed < 0 && yAxis.maxZoomed > 0 || this.stackedSeries) {\n value = 0;\n } else {\n value = yAxis.min;\n }\n }\n //if ($type.hasValue(fields)) {\n var startIndex = this.startIndex;\n var endIndex = this.endIndex;\n var interpolationDuration = this.hiddenState.transitionDuration;\n if ($type.isNumber(duration)) {\n interpolationDuration = duration;\n }\n var delay = 0;\n var anim;\n $iter.each($iter.indexed(this.dataItems.iterator()), function (a) {\n var i = a[0];\n var dataItem = a[1];\n if (interpolationDuration == 0) {\n dataItem.hide(0, 0, value, fields);\n } else {\n if (_this.sequencedInterpolation && interpolationDuration > 0) {\n delay = _this.sequencedInterpolationDelay * i + interpolationDuration * (i - startIndex) / (endIndex - startIndex);\n }\n anim = dataItem.hide(interpolationDuration, delay, value, fields);\n }\n });\n var animation = _super.prototype.hide.call(this, interpolationDuration);\n if (animation && !animation.isFinished()) {\n animation.delay(delay);\n }\n if (anim && !anim.isFinished()) {\n animation = anim;\n }\n // helps to avoid flicker. otherwise columns will show up at full size and only on next frame will animate from 0\n this.validateDataElements();\n //}\n return animation;\n };\n /**\r\n * [handleDataItemWorkingValueChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYSeries.prototype.handleDataItemWorkingValueChange = function (dataItem, name) {\n _super.prototype.handleDataItemWorkingValueChange.call(this, dataItem, name);\n // to calculate stack values\n var axisSeries = this.baseAxis.series;\n $iter.each(axisSeries.iterator(), function (series) {\n if (series.stacked) {\n series.invalidateProcessedData();\n }\n });\n };\n /**\r\n * [getStackValue description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param dataItem Data item\r\n */\n XYSeries.prototype.getStackValue = function (dataItem, working) {\n // todo: here wer stack x and y values only. question is - what should we do with other values, like openX, openY?\n // if this series is not stacked or new stack begins, return.\n var _this = this;\n if (!this.stacked) {\n return;\n } else {\n // it might seem that it's better to go through base axis series, but we do not maintain the same order as in chart.series there.\n var chart = this.chart;\n var index = chart.series.indexOf(this);\n var field_1;\n if (this.xAxis != this.baseAxis && this.xAxis instanceof ValueAxis) {\n field_1 = this.xField;\n }\n if (this.yAxis != this.baseAxis && this.yAxis instanceof ValueAxis) {\n field_1 = this.yField;\n }\n if (!field_1) {\n return;\n }\n //this is good for removing series, otherwise stack values will remain the same and chart won't pay atention when adding/removing series\t\t\t\n dataItem.setCalculatedValue(field_1, 0, \"stack\");\n $iter.eachContinue(chart.series.range(0, index).backwards().iterator(), function (prevSeries) {\n // stacking is only possible if both axes are the same\n if (prevSeries.xAxis == _this.xAxis && prevSeries.yAxis == _this.yAxis) {\n // saving value\n prevSeries.stackedSeries = _this;\n var prevDataItem = prevSeries.dataItems.getIndex(dataItem.index); // indexes should match\n if (prevDataItem && prevDataItem.hasValue(_this._xValueFields) && prevDataItem.hasValue(_this._yValueFields)) {\n var value = dataItem.getValue(field_1);\n var prevValue = void 0;\n if (working) {\n prevValue = prevDataItem.getWorkingValue(field_1) + prevDataItem.getValue(field_1, \"stack\");\n } else {\n prevValue = prevDataItem.getValue(field_1) + prevDataItem.getValue(field_1, \"stack\");\n }\n // if >= then series might get stacked to hidden negative series, so this is correct\n if (value >= 0 && prevValue > 0 || value < 0 && prevValue < 0) {\n //dataItem.events.disable();\n dataItem.setCalculatedValue(field_1, prevValue, \"stack\");\n //dataItem.events.enable();\n return false;\n }\n } else if (!prevSeries.stacked) {\n return false;\n }\n }\n return true;\n });\n }\n };\n Object.defineProperty(XYSeries.prototype, \"xField\", {\n /**\r\n * [xField description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @return [description]\r\n */\n get: function get() {\n return this._xField;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeries.prototype, \"yField\", {\n /**\r\n * [yField description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @return [description]\r\n */\n get: function get() {\n return this._yField;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeries.prototype, \"xOpenField\", {\n /**\r\n * [xOpenField description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @return [description]\r\n */\n get: function get() {\n return this._xOpenField;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeries.prototype, \"yOpenField\", {\n /**\r\n * [yOpenField description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @return [description]\r\n */\n get: function get() {\n return this._yOpenField;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeries.prototype, \"tooltipXField\", {\n /**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @return [description]\r\n */\n get: function get() {\n if (this._tooltipXField) {\n return this._tooltipXField;\n }\n return this._xField;\n },\n /**\r\n * [tooltipXField description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param value [description]\r\n */\n set: function set(value) {\n this._tooltipXField = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeries.prototype, \"tooltipYField\", {\n /**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @return [description]\r\n */\n get: function get() {\n if (this._tooltipYField) {\n return this._tooltipYField;\n }\n return this._yField;\n },\n /**\r\n * [tooltipYField description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param value [description]\r\n */\n set: function set(value) {\n this._tooltipYField = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns lowest value in the series for the specific axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axis Axis\r\n * @return value\r\n */\n XYSeries.prototype.min = function (axis) {\n return this._tmin.getKey(axis.uid);\n };\n /**\r\n * Returns highest value in the series for the specific axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axis Axis\r\n * @return value\r\n */\n XYSeries.prototype.max = function (axis) {\n return this._tmax.getKey(axis.uid);\n };\n /**\r\n * Returns lowest value in the series for the specific axis within current\r\n * selection.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axis Axis\r\n * @return value\r\n */\n XYSeries.prototype.selectionMin = function (axis) {\n var value = this._smin.getKey(axis.uid);\n if (!$type.isNumber(value)) {\n value = this.min(axis);\n }\n return value;\n };\n /**\r\n * Returns highest value in the series for the specific axis within current\r\n * selection.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axis Axis\r\n * @return value\r\n */\n XYSeries.prototype.selectionMax = function (axis) {\n var value = this._smax.getKey(axis.uid);\n if (!$type.isNumber(value)) {\n value = this.max(axis);\n }\n return value;\n };\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n XYSeries.prototype.processConfig = function (config) {\n if (config) {\n // Set up base axes\n if ($type.hasValue(config.baseAxis) && $type.isString(config.baseAxis)) {\n if (this.map.hasKey(config.baseAxis)) {\n config.baseAxis = this.map.getKey(config.baseAxis);\n } else {\n this.processingErrors.push(\"[XYSeries (\" + (this.name || \"unnamed\") + \")] No axis with id \\\"\" + config.baseAxis + \"\\\" found for `baseAxis`.\");\n delete config.baseAxis;\n }\n }\n // Set up axes\n if ($type.hasValue(config.xAxis) && $type.isString(config.xAxis)) {\n if (this.map.hasKey(config.xAxis)) {\n config.xAxis = this.map.getKey(config.xAxis);\n } else {\n this.processingErrors.push(\"[XYSeries (\" + (this.name || \"unnamed\") + \")] No axis with id \\\"\" + config.xAxis + \"\\\" found for `xAxis`.\");\n delete config.xAxis;\n }\n }\n if ($type.hasValue(config.yAxis) && $type.isString(config.yAxis)) {\n if (this.map.hasKey(config.yAxis)) {\n config.yAxis = this.map.getKey(config.yAxis);\n } else {\n this.processingErrors.push(\"[XYSeries (\" + (this.name || \"unnamed\") + \")] No axis with id \\\"\" + config.yAxis + \"\\\" found for `yAxis`.\");\n delete config.yAxis;\n }\n }\n // Set up axis ranges\n if ($type.hasValue(config.axisRanges) && $type.isArray(config.axisRanges)) {\n for (var i = 0, len = config.axisRanges.length; i < len; i++) {\n var range = config.axisRanges[i];\n if (!$type.hasValue(range.type)) {\n range.type = \"AxisDataItem\";\n }\n if ($type.hasValue(range.axis) && $type.isString(range.axis) && this.map.hasKey(range.axis)) {\n range.component = this.map.getKey(range.axis);\n } else if ($type.hasValue(range.component) && $type.isString(range.component) && this.map.hasKey(range.component)) {\n range.component = this.map.getKey(range.component);\n }\n }\n }\n // Parse date fields based on the series fields\n if (!$type.hasValue(config.dataFields) || !$type.isObject(config.dataFields)) {\n this.processingErrors.push(\"`dataFields` is not set for series [\" + (this.name || \"unnamed\") + \"]\");\n }\n }\n _super.prototype.processConfig.call(this, config);\n };\n /**\r\n * Returns an [[IPoint]] coordinates of the specific Serie's data point.\r\n *\r\n * @param dataItem Data item\r\n * @param xKey Name of X data field\r\n * @param yKey Name of Y data field\r\n * @param locationX X location\r\n * @param locationY Y location\r\n * @param stackKeyX ?\r\n * @param stackKeyY ?\r\n * @returns Coordinates\r\n */\n XYSeries.prototype.getPoint = function (dataItem, xKey, yKey, locationX, locationY, stackKeyX, stackKeyY) {\n var x = this.xAxis.getX(dataItem, xKey, locationX);\n var y = this.yAxis.getY(dataItem, yKey, locationY);\n x = $math.fitToRange(x, -100000, 100000); // from geometric point of view this is not right, but practically it's ok. this is done to avoid too big objects.\n y = $math.fitToRange(y, -100000, 100000); // from geometric point of view this is not right, but practically it's ok. this is done to avoid too big objects.\n return {\n x: x,\n y: y\n };\n };\n /**\r\n * Updates item reader text based on the type and set up of axis.\r\n */\n XYSeries.prototype.updateItemReaderText = function () {\n var text = \"\";\n $object.each(this.dataFields, function (key, val) {\n text += \"{\" + key + \"} \";\n });\n this.itemReaderText = text;\n };\n Object.defineProperty(XYSeries.prototype, \"cursorTooltipEnabled\", {\n /**\r\n * @return Display tooltip?\r\n */\n get: function get() {\n return this.getPropertyValue(\"cursorTooltipEnabled\");\n },\n /**\r\n * Indicates if series should display a tooltip for chart's cursor.\r\n *\r\n * If set to `true` (default), the tooltips set for all series item's\r\n * elements like columns and bullets will be automatically shown\r\n * when [[XYCursor]] passes over category/date, even if its not hovered\r\n * directly over the item.\r\n *\r\n * Set this to `false` to disable such behavior and display item-specific\r\n * tooltips only when hovered directly over them\r\n *\r\n * @default true\r\n * @param value Display tooltip?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"cursorTooltipEnabled\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeries.prototype, \"cursorHoverEnabled\", {\n /**\r\n * @return Hover enabled?\r\n */\n get: function get() {\n return this.getPropertyValue(\"cursorHoverEnabled\");\n },\n /**\r\n * Indicates if series should apply hover state on bullets/columns/etc when\r\n * cursor is over the data item.\r\n *\r\n * If set to `true` (default) and chart cursor is enabled on th chart,\r\n * hovering over date/category will trigger hover states on related Series\r\n * items like bullets and columns.\r\n *\r\n * @default true\r\n * @since 4.2.2\r\n * @param value Hover enabled?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"cursorHoverEnabled\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYSeries.prototype, \"excludeFromTotal\", {\n /**\r\n * @return Exclude from totals?\r\n */\n get: function get() {\n return this.getPropertyValue(\"excludeFromTotal\");\n },\n /**\r\n * Indicates if series' values should be excluded when calculating totals.\r\n *\r\n * @default false\r\n * @since 4.4.9\r\n * @param value Exclude from totals?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"excludeFromTotal\", value);\n },\n enumerable: true,\n configurable: true\n });\n return XYSeries;\n}(Series);\nexport { XYSeries };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"XYSeries\"] = XYSeries;\nregistry.registeredClasses[\"XYSeriesDataItem\"] = XYSeriesDataItem;","/**\r\n * Cursor module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../../core/Container\";\nimport { getInteraction } from \"../../core/interaction/Interaction\";\nimport { registry } from \"../../core/Registry\";\nimport { percent } from \"../../core/utils/Percent\";\nimport { MouseCursorStyle } from \"../../core/interaction/Mouse\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Main Cursor class with common cursor functionality.\r\n *\r\n * Chart-specific cursors must extend this class.\r\n *\r\n * @see {@link ICursorEvents} for a list of available events\r\n * @see {@link ICursorAdapters} for a list of available Adapters\r\n * @todo Add description, examples\r\n * @todo Should we allow changing `_generalBehavior`?\r\n */\nvar Cursor = /** @class */function (_super) {\n tslib_1.__extends(Cursor, _super);\n /**\r\n * Constructor\r\n */\n function Cursor() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * Current cursor position during selection.\r\n *\r\n * @todo Better description\r\n */\n _this.point = {\n x: 0,\n y: 0\n };\n /**\r\n * Specifies the rules when cursor needs to be moved or hidden.\r\n */\n _this._stick = \"none\";\n _this.className = \"Cursor\";\n // Set defaults\n _this.width = percent(100);\n _this.height = percent(100);\n _this.shouldClone = false;\n _this.hide(0);\n _this.trackable = true;\n _this.clickable = true;\n _this.isMeasured = false;\n // Add events on body to trigger down and up events (to start zooming or\n // selection)\n var interaction = getInteraction();\n _this._disposers.push(interaction.body.events.on(\"down\", _this.handleCursorDown, _this));\n _this._disposers.push(interaction.body.events.on(\"up\", _this.handleCursorUp, _this));\n _this._disposers.push(interaction.body.events.on(\"track\", _this.handleCursorMove, _this));\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Handle pointer movement in document and update cursor position as needed.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\n Cursor.prototype.handleCursorMove = function (event) {\n if (!this.interactionsEnabled || this.interactions.isTouchProtected && event.touch) {\n return;\n }\n if ((this._generalBehavior != \"zoom\" && this._generalBehavior != \"pan\" || !this.downPoint) && !getInteraction().isLocalElement(event.pointer, this.paper.svg, this.uid)) {\n // We want to let zoom/pan continue even if cursor is outside chart area\n if (!this.isHidden || !this.isHiding) {\n this.hide();\n }\n return;\n }\n var local = $utils.documentPointToSprite(event.pointer.point, this);\n if (this._stick == \"hard\" && this._stickPoint) {\n local = this._stickPoint;\n }\n if (this._stick == \"soft\" && this._stickPoint) {\n if (!this.fitsToBounds(local)) {\n local = this._stickPoint;\n }\n }\n this.triggerMove(local);\n return local;\n };\n /**\r\n * Hides actual SVG elements and handles hiding animations.\r\n *\r\n * @param duration Fade out duration (ms)\r\n * @return Fade out duration (ms)\r\n * @ignore\r\n */\n Cursor.prototype.hideReal = function (duration) {\n if ((this._stick == \"hard\" || this._stick == \"soft\") && this._stickPoint) {\n return;\n }\n return _super.prototype.hideReal.call(this, duration);\n };\n /**\r\n * Places the cursor at specific point.\r\n *\r\n * The second parameter has following options:\r\n *\r\n * `\"none\"` - placed cursor will only be there until mouse/touch moves, then\r\n * it either moves to a new place (if pointer over plot area) or is hidden.\r\n *\r\n * `\"soft\"` - cursor will stay in the place if mouse/touch is happening\r\n * outside chart, but will move to a new place whe plot area is hovered or\r\n * touched.\r\n *\r\n * `\"hard\"` - cursor will stay in place no matter what, until it is moved by\r\n * another `triggerMove()` call.\r\n *\r\n * @param point Point to place cursor at\r\n * @param stick Level of cursor stickiness to the place\r\n */\n Cursor.prototype.triggerMove = function (point, stick) {\n point.x = $math.round(point.x, 1);\n point.y = $math.round(point.y, 1);\n if (stick) {\n this._stick = stick;\n }\n if (stick == \"hard\" || stick == \"soft\") {\n this._stickPoint = point;\n }\n this.triggerMoveReal(point);\n };\n /**\r\n * Places the cursor at specific point.\r\n *\r\n * @param point Point to place cursor at\r\n */\n Cursor.prototype.triggerMoveReal = function (point) {\n if (this.point.x != point.x || this.point.y != point.y) {\n this.point = point;\n this.invalidatePosition();\n // hide cursor if it's out of bounds\n if (this.fitsToBounds(point)) {\n this.show(0);\n } else {\n // unless we are selecting (mouse is down)\n if (!this.downPoint) {\n this.hide(0);\n }\n }\n if (this.visible) {\n this.getPositions();\n this.dispatch(\"cursorpositionchanged\"); // not good to dispatch later (check step count example)\n }\n }\n };\n /**\r\n * Simulates pressing down (click/touch) action by a cursor.\r\n *\r\n * @param point Point of action\r\n */\n Cursor.prototype.triggerDown = function (point) {\n this.triggerDownReal(point);\n };\n /**\r\n * Simulates pressing down (click/touch) action by a cursor.\r\n *\r\n * @param point Point of action\r\n */\n Cursor.prototype.triggerDownReal = function (point) {\n switch (this._generalBehavior) {\n case \"zoom\":\n this.dispatchImmediately(\"zoomstarted\");\n break;\n case \"select\":\n this.dispatchImmediately(\"selectstarted\");\n break;\n case \"pan\":\n this.dispatchImmediately(\"panstarted\");\n getInteraction().setGlobalStyle(MouseCursorStyle.grabbing);\n break;\n }\n };\n /**\r\n * Simulates the action of release of the mouse down / touch.\r\n *\r\n * @param point Point of action\r\n */\n Cursor.prototype.triggerUp = function (point) {\n this.triggerUpReal(point);\n };\n /**\r\n * Simulates the action of release of the mouse down / touch.\r\n *\r\n * @param point Point of action\r\n */\n Cursor.prototype.triggerUpReal = function (point) {\n this.updatePoint(this.upPoint);\n var interaction = getInteraction();\n if ($math.getDistance(this._upPointOrig, this._downPointOrig) > interaction.getHitOption(this.interactions, \"hitTolerance\")) {\n switch (this._generalBehavior) {\n case \"zoom\":\n this.dispatchImmediately(\"zoomended\");\n break;\n case \"select\":\n this.dispatchImmediately(\"selectended\");\n break;\n case \"pan\":\n this.dispatchImmediately(\"panended\");\n interaction.setGlobalStyle(MouseCursorStyle[\"default\"]);\n break;\n }\n this.downPoint = undefined;\n this.updateSelection();\n } else {\n this.dispatchImmediately(\"behaviorcanceled\");\n interaction.setGlobalStyle(MouseCursorStyle[\"default\"]);\n this.downPoint = undefined;\n }\n };\n /**\r\n * Updates selection dimensions on size change.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Cursor.prototype.updateSelection = function () {};\n /**\r\n * Updates cursors current positions.\r\n */\n Cursor.prototype.getPositions = function () {\n // positions are used by axes or series\n this.xPosition = this.point.x / this.innerWidth;\n this.yPosition = 1 - this.point.y / this.innerHeight;\n };\n /**\r\n * Handles pointer down event so we can start zoom or selection.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Original event\r\n */\n Cursor.prototype.handleCursorDown = function (event) {\n if (!this.interactionsEnabled || this.interactions.isTouchProtected && event.touch || !getInteraction().isLocalElement(event.pointer, this.paper.svg, this.uid)) {\n return;\n }\n // Get local point\n var local = $utils.documentPointToSprite(event.pointer.point, this);\n this._downPointOrig = {\n x: local.x,\n y: local.y\n };\n // We need to cancel the event to prevent gestures on touch devices\n if (event.event.cancelable && this.shouldPreventGestures(event.touch) && this.fitsToBounds(local)) {\n event.event.preventDefault();\n }\n // Make this happen\n this.triggerMove(local);\n this.triggerDown(local);\n };\n /**\r\n * Determines whether Cursor should prevent default action on move.\r\n *\r\n * Child classes should override this as necessary.\r\n *\r\n * @return Prevent default?\r\n */\n Cursor.prototype.shouldPreventGestures = function (touch) {\n return true;\n };\n /**\r\n * Updates the coordinates of where pointer down event occurred\r\n * (was pressed).\r\n */\n Cursor.prototype.updatePoint = function (point) {};\n /**\r\n * Handles pointer up event - finishes zoom or selection action.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Original event\r\n */\n Cursor.prototype.handleCursorUp = function (event) {\n if (!this.interactionsEnabled) {\n return;\n }\n if ((this._generalBehavior != \"zoom\" && this._generalBehavior != \"pan\" || !this.downPoint) && !getInteraction().isLocalElement(event.pointer, this.paper.svg, this.uid)) {\n return;\n }\n var local = $utils.documentPointToSprite(event.pointer.point, this);\n this._upPointOrig = {\n x: local.x,\n y: local.y\n };\n this.triggerMove(local);\n this.triggerUp(local);\n };\n Object.defineProperty(Cursor.prototype, \"chart\", {\n /**\r\n * @return Chart\r\n */\n get: function get() {\n return this._chart;\n },\n /**\r\n * A reference to a [[Chart]] the cursor belongs to.\r\n *\r\n * @param value Chart\r\n */\n set: function set(value) {\n this._chart = value;\n if ($type.hasValue(this._chart.plotContainer)) {\n getInteraction().lockElement(this._chart.plotContainer.interactions);\n }\n },\n enumerable: true,\n configurable: true\n });\n return Cursor;\n}(Container);\nexport { Cursor };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Cursor\"] = Cursor;","/**\r\n * Cursor for XY chart\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Cursor } from \"./Cursor\";\nimport { Sprite } from \"../../core/Sprite\";\nimport { MutableValueDisposer, MultiDisposer } from \"../../core/utils/Disposer\";\nimport { registry } from \"../../core/Registry\";\nimport { color } from \"../../core/utils/Color\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport { getInteraction } from \"../../core/interaction/Interaction\";\nimport { MouseCursorStyle } from \"../../core/interaction/Mouse\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $path from \"../../core/rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A cursor used on [[XYChart]].\r\n *\r\n * @see {@link IXYCursorEvents} for a list of available events\r\n * @see {@link IXYCursorAdapters} for a list of available Adapters\r\n * @todo Add description, examples\r\n */\nvar XYCursor = /** @class */function (_super) {\n tslib_1.__extends(XYCursor, _super);\n /**\r\n * Constructor\r\n */\n function XYCursor() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * Vertical cursor line element.\r\n */\n _this._lineX = new MutableValueDisposer();\n /**\r\n * Horizontal cursor line element.\r\n */\n _this._lineY = new MutableValueDisposer();\n /**\r\n * Horizontal [[Axis]].\r\n */\n _this._xAxis = new MutableValueDisposer();\n /**\r\n * Vertical [[Axis]].\r\n */\n _this._yAxis = new MutableValueDisposer();\n _this.className = \"XYCursor\";\n // Defaults\n _this.behavior = \"zoomX\";\n _this.maxPanOut = 0.1;\n var interfaceColors = new InterfaceColorSet();\n // Create selection element\n var selection = _this.createChild(Sprite);\n selection.shouldClone = false;\n selection.fillOpacity = 0.2;\n selection.fill = interfaceColors.getFor(\"alternativeBackground\");\n selection.isMeasured = false;\n selection.interactionsEnabled = false;\n _this.selection = selection;\n _this._disposers.push(_this.selection);\n // Create cursor's vertical line\n var lineX = _this.createChild(Sprite);\n lineX.shouldClone = false;\n lineX.stroke = interfaceColors.getFor(\"grid\");\n lineX.fill = color();\n lineX.strokeDasharray = \"3,3\";\n lineX.isMeasured = false;\n lineX.strokeOpacity = 0.4;\n lineX.interactionsEnabled = false;\n lineX.y = 0; // important\n _this.lineX = lineX;\n _this._disposers.push(_this.lineX);\n // Create cursor's horizontal line\n var lineY = _this.createChild(Sprite);\n lineY.shouldClone = false;\n lineY.stroke = interfaceColors.getFor(\"grid\");\n lineY.fill = color();\n lineY.strokeDasharray = \"3,3\";\n lineY.isMeasured = false;\n lineY.strokeOpacity = 0.4;\n lineY.interactionsEnabled = false;\n lineY.x = 0; // important\n _this.lineY = lineY;\n _this._disposers.push(_this.lineY);\n // Add handler for size changes\n _this.events.on(\"sizechanged\", _this.updateSize, _this, false);\n _this._disposers.push(_this._lineX);\n _this._disposers.push(_this._lineY);\n _this._disposers.push(_this._xAxis);\n _this._disposers.push(_this._yAxis);\n _this.mask = _this;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Updates cursor element dimensions on size change.\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYCursor.prototype.updateSize = function () {\n if (this.lineX) {\n this.lineX.path = $path.moveTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: 0,\n y: this.innerHeight\n });\n }\n if (this.lineY) {\n this.lineY.path = $path.moveTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: this.innerWidth,\n y: 0\n });\n }\n };\n /**\r\n * Updates selection dimensions on size change.\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYCursor.prototype.updateSelection = function () {\n if (this._usesSelection) {\n var downPoint = this.downPoint;\n if (downPoint) {\n var point = this.point;\n if (this.lineX) {\n point.x = this.lineX.pixelX;\n }\n if (this.lineY) {\n point.y = this.lineY.pixelY;\n }\n var selection = this.selection;\n var x = Math.min(point.x, downPoint.x);\n var y = Math.min(point.y, downPoint.y);\n var w = $math.round(Math.abs(downPoint.x - point.x), this._positionPrecision);\n var h = $math.round(Math.abs(downPoint.y - point.y), this._positionPrecision);\n switch (this.behavior) {\n case \"zoomX\":\n y = 0;\n h = this.pixelHeight;\n break;\n case \"zoomY\":\n x = 0;\n w = this.pixelWidth;\n break;\n case \"selectX\":\n y = 0;\n h = this.pixelHeight;\n break;\n case \"selectY\":\n x = 0;\n w = this.pixelWidth;\n break;\n }\n selection.x = x;\n selection.y = y;\n selection.path = $path.rectangle(w, h);\n selection.validatePosition(); // otherwise Edge shoes some incorrect size rectangle\n } else {\n this.selection.hide();\n }\n }\n };\n /**\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYCursor.prototype.fixPoint = function (point) {\n point.x = Math.max(0, point.x);\n point.y = Math.max(0, point.y);\n point.x = Math.min(this.pixelWidth, point.x);\n point.y = Math.min(this.pixelHeight, point.y);\n return point;\n };\n /**\r\n * Places the cursor at specific point.\r\n *\r\n * @param point Point to place cursor at\r\n */\n XYCursor.prototype.triggerMoveReal = function (point) {\n _super.prototype.triggerMoveReal.call(this, point);\n if (this.snapToSeries && !this.snapToSeries.isHidden) {} else {\n this.updateLinePositions(point);\n }\n if (this.downPoint && $math.getDistance(this.downPoint, point) > 3) {\n if (this._generalBehavior == \"pan\") {\n this.getPanningRanges();\n this.dispatch(\"panning\");\n }\n }\n };\n /**\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYCursor.prototype.updateLinePositions = function (point) {\n point = this.fixPoint(this.point);\n if (this.lineX && this.lineX.visible && !this.xAxis) {\n this.lineX.x = point.x;\n }\n if (this.lineY && this.lineY.visible && !this.yAxis) {\n this.lineY.y = point.y;\n }\n this.updateSelection();\n };\n XYCursor.prototype.triggerDownReal = function (point) {\n if (this.visible && !this.isHiding) {\n if (this.fitsToBounds(point)) {\n this.downPoint = {\n x: point.x,\n y: point.y\n };\n this.updatePoint(point);\n //this.updateLinePositions(point); // otherwise lines won't be in correct position and touch won't work fine\n this.point.x = this.downPoint.x;\n this.point.y = this.downPoint.y;\n var selection = this.selection;\n var selectionX = this.downPoint.x;\n var selectionY = this.downPoint.y;\n if (this._usesSelection) {\n selection.x = selectionX;\n selection.y = selectionY;\n selection.path = \"\";\n selection.show();\n }\n _super.prototype.triggerDownReal.call(this, point);\n } else {\n this.downPoint = undefined;\n }\n } else {\n this.downPoint = undefined;\n }\n };\n /**\r\n * Updates the coordinates of where pointer down event occurred\r\n * (was pressed).\r\n */\n XYCursor.prototype.updatePoint = function (point) {\n if (this.lineX) {\n point.x = this.lineX.pixelX;\n }\n if (this.lineY) {\n point.y = this.lineY.pixelY;\n }\n };\n XYCursor.prototype.triggerUpReal = function (point) {\n if ($math.getDistance(this._upPointOrig, this._downPointOrig) > getInteraction().getHitOption(this.interactions, \"hitTolerance\")) {\n if (this.downPoint) {\n this.upPoint = point;\n this.updatePoint(this.upPoint);\n this.getRanges();\n if (this.behavior == \"selectX\" || this.behavior == \"selectY\" || this.behavior == \"selectXY\") {\n // void\n } else {\n this.selection.hide();\n }\n _super.prototype.triggerUpReal.call(this, point);\n }\n } else {\n this.selection.hide(0);\n // reset cursor style, just in case\n if (this._generalBehavior == \"pan\") {\n var interaction = getInteraction();\n interaction.setGlobalStyle(MouseCursorStyle[\"default\"]);\n }\n }\n this.downPoint = undefined;\n };\n /**\r\n * [getRanges description]\r\n *\r\n * @todo Description\r\n */\n XYCursor.prototype.getPanningRanges = function () {\n var startX = $math.round(this.downPoint.x / this.innerWidth, 5);\n var startY = $math.round(this.downPoint.y / this.innerHeight, 5);\n var currentX = $math.round(this.point.x / this.innerWidth, 5);\n var currentY = $math.round(this.point.y / this.innerHeight, 5);\n var deltaX = startX - currentX;\n var deltaY = -startY + currentY;\n this.xRange = {\n start: deltaX,\n end: 1 + deltaX\n };\n this.yRange = {\n start: deltaY,\n end: 1 + deltaY\n };\n if (this.behavior == \"panX\") {\n this.yRange.start = 0;\n this.yRange.end = 1;\n }\n if (this.behavior == \"panY\") {\n this.xRange.start = 0;\n this.xRange.end = 1;\n }\n };\n /**\r\n * [getRanges description]\r\n *\r\n * @todo Description\r\n */\n XYCursor.prototype.getRanges = function () {\n if (this.lineX) {\n this.upPoint.x = this.lineX.pixelX;\n }\n if (this.lineY) {\n this.upPoint.y = this.lineY.pixelY;\n }\n // @todo Is this needed?\n $utils.used(this.selection);\n var startX = $math.round(this.downPoint.x / this.innerWidth, 5);\n var endX = $math.round(this.upPoint.x / this.innerWidth, 5);\n var startY = $math.round(this.downPoint.y / this.innerHeight, 5);\n var endY = $math.round(this.upPoint.y / this.innerHeight, 5);\n this.xRange = {\n start: $math.min(startX, endX),\n end: $math.max(startX, endX)\n };\n this.yRange = {\n start: $math.min(startY, endY),\n end: $math.max(startY, endY)\n };\n };\n Object.defineProperty(XYCursor.prototype, \"behavior\", {\n /**\r\n * Behavior\r\n */\n get: function get() {\n return this.getPropertyValue(\"behavior\");\n },\n /**\r\n * Cursor's behavior when it's moved with pointer down:\r\n *\r\n * * \"zoomX\" - zooms horizontally;\r\n * * \"zoomY\" - zooms vertically;\r\n * * \"zoomXY\" - zooms both horizontally and vertically;\r\n * * \"selectX\" - selects a range horizontally;\r\n * * \"selectY\" - selects a range vertically;\r\n * * \"selectXY\" - selects a range both horizontally and vertically;\r\n * * \"panX\" - moves (pans) current selection horizontally;\r\n * * \"panY\" - moves (pans) current selection vertically;\r\n * * \"panXY\" - moves (pans) current selection both horizontally and vertically;\r\n * * \"none\" - does nothing with pointer down.\r\n *\r\n * E.g. \"zoomXY\" will mean that pressing a mouse (or touching) over plot area\r\n * and dragging it will start zooming the chart.\r\n *\r\n * @param value Bheavior\r\n */\n set: function set(value) {\n this.setPropertyValue(\"behavior\", value, true);\n this._usesSelection = false;\n if (value.indexOf(\"zoom\") != -1) {\n this._generalBehavior = \"zoom\";\n this._usesSelection = true;\n }\n if (value.indexOf(\"select\") != -1) {\n this._generalBehavior = \"select\";\n this._usesSelection = true;\n }\n if (value.indexOf(\"pan\") != -1) {\n this._generalBehavior = \"pan\";\n this._usesSelection = false;\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Determines whether Cursor should prevent default action on move.\r\n *\r\n * If cursor's behavior is \"none\", it should not obstruct the page scrolling.\r\n *\r\n * @return Prevent default?\r\n */\n XYCursor.prototype.shouldPreventGestures = function (touch) {\n return (!this.interactions.isTouchProtected || !touch) && this.behavior != \"none\";\n };\n Object.defineProperty(XYCursor.prototype, \"fullWidthLineX\", {\n /**\r\n * @return Full width?\r\n */\n get: function get() {\n return this.getPropertyValue(\"fullWidthLineX\");\n },\n /**\r\n * Cursor's horizontal line is expanded to take full width of the related\r\n * Axis' cell/category.\r\n *\r\n * NOTE: this setting will work properly if `xAxis` is set and only in case\r\n * `xAxis` is [[CategoryAxis]] or [[DateAxis]].\r\n *\r\n * @param value Full width?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"fullWidthLineX\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYCursor.prototype, \"fullWidthLineY\", {\n /**\r\n * @return Full width?\r\n */\n get: function get() {\n return this.getPropertyValue(\"fullWidthLineY\");\n },\n /**\r\n * Cursor's vertical line is expanded to take full width of the related\r\n * Axis' cell/category.\r\n *\r\n * NOTE: this setting will work properly if `yAxis` is set and only in case\r\n * `yAxis` is [[CategoryAxis]] or [[DateAxis]].\r\n *\r\n * @param value Full width?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"fullWidthLineY\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYCursor.prototype, \"maxPanOut\", {\n /**\r\n * @return Full width?\r\n */\n get: function get() {\n return this.getPropertyValue(\"maxPanOut\");\n },\n /**\r\n * If cursor behavior is panX or panY, we allow to pan plot out of it's max bounds for a better user experience.\r\n * This setting specifies relative value by how much we can pan out the plot\r\n *\r\n * @param value\r\n */\n set: function set(value) {\n this.setPropertyValue(\"maxPanOut\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYCursor.prototype, \"xAxis\", {\n /**\r\n * @return X axis\r\n */\n get: function get() {\n return this._xAxis.get();\n },\n /**\r\n * A reference to X [[Axis]].\r\n *\r\n * An XY cursor can live without `xAxis` set. You set xAxis for cursor when\r\n * you have axis tooltip enabled and you want cursor line to be at the same\r\n * position as tooltip.\r\n *\r\n * This works with [[CategoryAxis]] and [[DateAxis]] but not with\r\n * [[ValueAxis]].\r\n *\r\n * @todo Description (review)\r\n * @param axis X axis\r\n */\n set: function set(axis) {\n if (this._xAxis.get() != axis) {\n this._xAxis.set(axis, new MultiDisposer([axis.tooltip.events.on(\"positionchanged\", this.handleXTooltipPosition, this, false)]));\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYCursor.prototype, \"yAxis\", {\n /**\r\n * @return Y Axis\r\n */\n get: function get() {\n return this._yAxis.get();\n },\n /**\r\n * A reference to Y [[Axis]].\r\n *\r\n * An XY cursor can live without `yAxis` set. You set xAxis for cursor when\r\n * you have axis tooltip enabled and you want cursor line to be at the same\r\n * position as tooltip.\r\n *\r\n * This works with [[CategoryAxis]] and [[DateAxis]] but not with\r\n * [[ValueAxis]].\r\n *\r\n * @todo Description (review)\r\n * @param axis Y axis\r\n */\n set: function set(axis) {\n if (this._yAxis.get() != axis) {\n this._yAxis.set(axis, new MultiDisposer([axis.tooltip.events.on(\"positionchanged\", this.handleYTooltipPosition, this, false)]));\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Updates Cursor's position when axis tooltip changes position.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Original Axis event\r\n */\n XYCursor.prototype.handleXTooltipPosition = function (event) {\n var tooltip = this.xAxis.tooltip;\n var point = $utils.svgPointToSprite({\n x: tooltip.pixelX,\n y: tooltip.pixelY\n }, this);\n var x = point.x;\n if (this.lineX) {\n this.lineX.x = x;\n if (!this.fitsToBounds(point)) {\n this.hide();\n }\n }\n if (this.xAxis && this.fullWidthLineX) {\n var startPoint = this.xAxis.currentItemStartPoint;\n var endPoint = this.xAxis.currentItemEndPoint;\n if (startPoint && endPoint) {\n this.lineX.x = x;\n var width = endPoint.x - startPoint.x;\n this.lineX.path = $path.rectangle(width, this.innerHeight, -width / 2);\n }\n }\n };\n /**\r\n * Updates Cursor's position when Y axis changes position or scale.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Original Axis event\r\n */\n XYCursor.prototype.handleYTooltipPosition = function (event) {\n var tooltip = this.yAxis.tooltip;\n var point = $utils.svgPointToSprite({\n x: tooltip.pixelX,\n y: tooltip.pixelY\n }, this);\n var y = point.y;\n if (this.lineY) {\n this.lineY.y = y;\n if (!this.fitsToBounds(point)) {\n this.hide();\n }\n }\n if (this.yAxis && this.fullWidthLineY) {\n var startPoint = this.yAxis.currentItemStartPoint;\n var endPoint = this.yAxis.currentItemEndPoint;\n if (startPoint && endPoint) {\n this.lineY.y = y;\n var height = endPoint.y - startPoint.y;\n this.lineY.path = $path.rectangle(this.innerWidth, height, 0, -height / 2);\n }\n }\n };\n Object.defineProperty(XYCursor.prototype, \"lineX\", {\n /**\r\n * @return Line element\r\n */\n get: function get() {\n return this._lineX.get();\n },\n /**\r\n * A Line element to use for X axis.\r\n *\r\n * @param lineX Line\r\n */\n set: function set(lineX) {\n if (lineX) {\n lineX.setElement(this.paper.add(\"path\"));\n this._lineX.set(lineX, lineX.events.on(\"positionchanged\", this.updateSelection, this, false));\n lineX.interactionsEnabled = false;\n lineX.parent = this;\n } else {\n this._lineX.reset();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYCursor.prototype, \"lineY\", {\n /**\r\n * @return Line element\r\n */\n get: function get() {\n return this._lineY.get();\n },\n /**\r\n * A Line element to use Y axis.\r\n *\r\n * @param lineY Line\r\n */\n set: function set(lineY) {\n if (lineY) {\n lineY.setElement(this.paper.add(\"path\"));\n this._lineY.set(lineY, lineY.events.on(\"positionchanged\", this.updateSelection, this, false));\n lineY.parent = this;\n lineY.interactionsEnabled = false;\n } else {\n this._lineY.reset();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYCursor.prototype, \"selection\", {\n /**\r\n * @return Selection rectangle\r\n */\n get: function get() {\n return this._selection;\n },\n /**\r\n * A selection element ([[Sprite]]).\r\n *\r\n * @param selection Selection rectangle\r\n */\n set: function set(selection) {\n this._selection = selection;\n if (selection) {\n selection.element = this.paper.add(\"path\");\n selection.parent = this;\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * Looks if `xAxis` and `yAxis` is set via ID in JSON config, and replaces\r\n * with real references.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n XYCursor.prototype.processConfig = function (config) {\n if (config) {\n // Set up axes\n if ($type.hasValue(config.xAxis) && $type.isString(config.xAxis)) {\n if (this.map.hasKey(config.xAxis)) {\n config.xAxis = this.map.getKey(config.xAxis);\n } else {\n this.processingErrors.push(\"[XYCursor] No axis with id \\\"\" + config.xAxis + \"\\\" found for `xAxis`\");\n delete config.xAxis;\n }\n }\n if ($type.hasValue(config.yAxis) && $type.isString(config.yAxis)) {\n if (this.map.hasKey(config.yAxis)) {\n config.yAxis = this.map.getKey(config.yAxis);\n } else {\n this.processingErrors.push(\"[XYCursor] No axis with id \\\"\" + config.yAxis + \"\\\" found for `yAxis`\");\n delete config.yAxis;\n }\n }\n if ($type.hasValue(config.snapToSeries) && $type.isString(config.snapToSeries)) {\n if (this.map.hasKey(config.snapToSeries)) {\n config.snapToSeries = this.map.getKey(config.snapToSeries);\n } else {\n this.processingErrors.push(\"[XYCursor] No series with id \\\"\" + config.snapToSeries + \"\\\" found for `series`\");\n delete config.snapToSeries;\n }\n }\n }\n _super.prototype.processConfig.call(this, config);\n };\n Object.defineProperty(XYCursor.prototype, \"snapToSeries\", {\n /**\r\n * @return {XYSeries}\r\n */\n get: function get() {\n return this.getPropertyValue(\"snapToSeries\");\n },\n /**\r\n * Specifies to which series cursor lines should be snapped. Works when one\r\n * of the axis is `DateAxis` or `CategoryAxis`. Won't work if both axes are\r\n * `ValueAxis`.\r\n *\r\n * @param {XYSeries}\r\n */\n set: function set(series) {\n if (this.setPropertyValue(\"snapToSeries\", series)) {\n if (this._snapToDisposer) {\n this._snapToDisposer.dispose();\n }\n if (series) {\n this._snapToDisposer = series.events.on(\"tooltipshownat\", this.handleSnap, this, false);\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * [handleSnap description]\r\n *\r\n * @ignore\r\n * @todo Description\r\n */\n XYCursor.prototype.handleSnap = function () {\n var series = this.snapToSeries;\n var y = series.tooltipY;\n var x = series.tooltipX;\n if (this.xAxis) {\n if (this.xAxis.renderer.opposite) {\n y -= this.pixelHeight;\n }\n }\n this.point = {\n x: x,\n y: y\n };\n this.getPositions();\n var xx = x;\n var yy = y;\n x -= this.pixelWidth;\n if (this.yAxis) {\n if (this.yAxis.renderer.opposite) {\n x += this.pixelWidth;\n }\n }\n var tooltip = series.tooltip;\n var duration = tooltip.animationDuration;\n var easing = tooltip.animationEasing;\n if (series.baseAxis == series.xAxis) {\n series.yAxis.showTooltipAtPosition(this.yPosition);\n }\n if (series.baseAxis == series.yAxis) {\n series.xAxis.showTooltipAtPosition(this.xPosition);\n }\n this.lineX.animate([{\n property: \"y\",\n to: y\n }], duration, easing);\n this.lineY.animate([{\n property: \"x\",\n to: x\n }], duration, easing);\n if (!this.xAxis) {\n this.lineX.animate([{\n property: \"x\",\n to: xx\n }], duration, easing);\n }\n if (!this.yAxis) {\n this.lineY.animate([{\n property: \"y\",\n to: yy\n }], duration, easing);\n }\n };\n /**\r\n * Destroys this object and all related data.\r\n */\n XYCursor.prototype.dispose = function () {\n this.hide(0);\n _super.prototype.dispose.call(this);\n };\n return XYCursor;\n}(Cursor);\nexport { XYCursor };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"XYCursor\"] = XYCursor;","/**\r\n * A module with functionality for buildin a scrollbar with an XY graph in it.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Scrollbar } from \"../../core/elements/Scrollbar\";\nimport { Sprite } from \"../../core/Sprite\";\nimport { List } from \"../../core/utils/List\";\nimport { MutableValueDisposer } from \"../../core/utils/Disposer\";\nimport { XYChart } from \"../types/XYChart\";\nimport { registry } from \"../../core/Registry\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport { DesaturateFilter } from \"../../core/rendering/filters/DesaturateFilter\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $path from \"../../core/rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A special version of the Scrollbar that has an XY chart in it.\r\n *\r\n * Used mainly as an advanced scrollbar with a preview for other XY charts.\r\n *\r\n * However, can be used as standalone element.\r\n *\r\n * @see {@link IXYChartScrollbarEvents} for a list of available events\r\n * @see {@link IXYChartScrollbarAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar XYChartScrollbar = /** @class */function (_super) {\n tslib_1.__extends(XYChartScrollbar, _super);\n /**\r\n * Constructor\r\n */\n function XYChartScrollbar() {\n var _this = _super.call(this) || this;\n /**\r\n * A chart element Scrollbar is for.\r\n */\n _this._chart = new MutableValueDisposer();\n _this.className = \"XYChartScrollbar\";\n var interfaceColors = new InterfaceColorSet();\n _this.padding(0, 0, 0, 0);\n var scrollbarChart = _this.createChild(XYChart);\n scrollbarChart.shouldClone = false;\n scrollbarChart.margin(0, 0, 0, 0);\n scrollbarChart.padding(0, 0, 0, 0);\n scrollbarChart.interactionsEnabled = false;\n _this._scrollbarChart = scrollbarChart;\n _this._disposers.push(_this._scrollbarChart);\n _this.minHeight = 60;\n _this.minWidth = 60;\n var unselectedOverlay = _this.createChild(Sprite);\n unselectedOverlay.shouldClone = false;\n unselectedOverlay.setElement(_this.paper.add(\"path\"));\n unselectedOverlay.fill = interfaceColors.getFor(\"background\");\n unselectedOverlay.fillOpacity = 0.8;\n unselectedOverlay.interactionsEnabled = false;\n unselectedOverlay.isMeasured = false;\n unselectedOverlay.toBack();\n _this._unselectedOverlay = unselectedOverlay;\n _this._disposers.push(_this._unselectedOverlay);\n scrollbarChart.toBack();\n _this.background.cornerRadius(0, 0, 0, 0);\n var thumbBackground = _this.thumb.background;\n thumbBackground.cornerRadius(0, 0, 0, 0);\n thumbBackground.fillOpacity = 0;\n thumbBackground.fill = interfaceColors.getFor(\"background\");\n var hoverState = thumbBackground.states.getKey(\"hover\");\n if (hoverState) {\n hoverState.properties.fillOpacity = 0.2;\n }\n var downState = thumbBackground.states.getKey(\"down\");\n if (downState) {\n downState.properties.fillOpacity = 0.4;\n }\n _this._disposers.push(_this._chart);\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(XYChartScrollbar.prototype, \"series\", {\n /**\r\n * A list of series that are used to draw graph(s) on the scrollbar.\r\n *\r\n * @readonly\r\n * @return Series\r\n */\n get: function get() {\n if (!this._series) {\n this._series = new List();\n this._disposers.push(this._series.events.on(\"inserted\", this.handleSeriesAdded, this, false));\n this._disposers.push(this._series.events.on(\"removed\", this.handleSeriesRemoved, this, false));\n }\n return this._series;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Decorates a new series when they are pushed into a `series` list.\r\n *\r\n * @param event Event\r\n */\n XYChartScrollbar.prototype.handleSeriesAdded = function (event) {\n var sourceSeries = event.newValue;\n var scrollbarChart = this.scrollbarChart;\n scrollbarChart.zoomOutButton.disabled = true;\n this.chart = sourceSeries.chart;\n var addXAxis = true;\n var addYAxis = true;\n // check if we haven't added clone of x or y axis before\n $iter.each(this.series.iterator(), function (series) {\n if (series != sourceSeries) {\n if (series.xAxis == sourceSeries.xAxis) {\n addXAxis = false;\n }\n if (series.yAxis == sourceSeries.yAxis) {\n addYAxis = false;\n }\n }\n });\n var interfaceColors = new InterfaceColorSet();\n var series = sourceSeries.clone();\n if (addXAxis) {\n var xAxis = sourceSeries.xAxis.clone();\n scrollbarChart.xAxes.moveValue(xAxis);\n xAxis.title.disabled = true;\n xAxis.rangeChangeDuration = 0;\n xAxis.id = sourceSeries.uid;\n var renderer = xAxis.renderer;\n renderer.ticks.template.disabled = true;\n renderer.inside = true;\n renderer.labels.template.inside = true;\n renderer.line.strokeOpacity = 0;\n renderer.minLabelPosition = 0.02;\n renderer.maxLabelPosition = 0.98;\n renderer.line.disabled = true;\n renderer.axisFills.template.disabled = true;\n renderer.baseGrid.disabled = true;\n renderer.grid.template.strokeOpacity = 0.05;\n renderer.minWidth = undefined;\n renderer.minHeight = undefined;\n renderer.padding(0, 0, 0, 0);\n renderer.chart = scrollbarChart;\n renderer.margin(0, 0, 0, 0);\n var labelsTemplate = renderer.labels.template;\n labelsTemplate.fillOpacity = 0.5;\n series.xAxis = xAxis;\n } else {\n // @todo find clone, otherwise there might be probs with multiple axes\n }\n if (addYAxis) {\n var yAxis = sourceSeries.yAxis.clone();\n scrollbarChart.yAxes.moveValue(yAxis);\n yAxis.title.disabled = true;\n yAxis.rangeChangeDuration = 0;\n var renderer = yAxis.renderer;\n renderer.ticks.template.disabled = true;\n renderer.inside = true;\n renderer.labels.template.inside = true;\n renderer.line.strokeOpacity = 0;\n renderer.minLabelPosition = 0.02;\n renderer.maxLabelPosition = 0.98;\n renderer.line.disabled = true;\n renderer.axisFills.template.disabled = true;\n renderer.grid.template.stroke = interfaceColors.getFor(\"background\");\n renderer.baseGrid.disabled = true;\n renderer.grid.template.strokeOpacity = 0.05;\n renderer.minWidth = undefined;\n renderer.minHeight = undefined;\n renderer.chart = scrollbarChart;\n renderer.padding(0, 0, 0, 0);\n renderer.margin(0, 0, 0, 0);\n var labelsTemplate = renderer.labels.template;\n labelsTemplate.fillOpacity = 0.5;\n series.yAxis = yAxis;\n } else {\n // @todo find clone, otherwise there might be probs with multiple axes\n }\n series.rangeChangeDuration = 0;\n series.interpolationDuration = 0;\n series.defaultState.transitionDuration = 0;\n series.showOnInit = false;\n this._disposers.push(series.events.on(\"validated\", this.zoomOutAxes, this, false));\n // data might be set drectly on series\n this._disposers.push(sourceSeries.events.on(\"datavalidated\", function () {\n if (series.data != sourceSeries.data) {\n // data setter doesn't check this\n series.data = sourceSeries.data;\n }\n }, undefined, false));\n series.defaultState.properties.visible = true;\n series.filters.push(new DesaturateFilter());\n scrollbarChart.series.push(series);\n this.updateByOrientation();\n };\n /**\r\n * @ignore\r\n */\n XYChartScrollbar.prototype.updateByOrientation = function () {\n var _this = this;\n if (this._scrollbarChart) {\n $iter.each(this._scrollbarChart.xAxes.iterator(), function (xAxis) {\n var renderer = xAxis.renderer;\n if (_this.orientation == \"vertical\") {\n renderer.grid.template.disabled = true;\n renderer.labels.template.disabled = true;\n renderer.minGridDistance = 10;\n } else {\n renderer.grid.template.disabled = false;\n renderer.labels.template.disabled = false;\n renderer.minGridDistance = xAxis.clonedFrom.renderer.minGridDistance;\n }\n });\n $iter.each(this._scrollbarChart.yAxes.iterator(), function (yAxis) {\n var renderer = yAxis.renderer;\n if (_this.orientation == \"horizontal\") {\n renderer.grid.template.disabled = true;\n renderer.labels.template.disabled = true;\n renderer.minGridDistance = 10;\n } else {\n renderer.grid.template.disabled = false;\n renderer.labels.template.disabled = false;\n renderer.minGridDistance = yAxis.clonedFrom.renderer.minGridDistance;\n }\n });\n }\n };\n /**\r\n * Cleans up after series are removed from Scrollbar.\r\n *\r\n * @param event Event\r\n */\n XYChartScrollbar.prototype.handleSeriesRemoved = function (event) {\n var sourceSeries = event.oldValue;\n sourceSeries.events.off(\"validated\", this.zoomOutAxes, this);\n };\n Object.defineProperty(XYChartScrollbar.prototype, \"scrollbarChart\", {\n /**\r\n * A chart element that is used to display graphs in the Scrollbar.\r\n *\r\n * This is not the same as `chart`. It's a totally independent instance of\r\n * [[XYChart]] with separate config, series, etc.\r\n *\r\n * It can be configured just like any other [[XYChart]].\r\n *\r\n * @readonly\r\n * @return Scrollbar's internal chart\r\n */\n get: function get() {\n return this._scrollbarChart;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYChartScrollbar.prototype, \"chart\", {\n /**\r\n * @return Chart\r\n */\n get: function get() {\n return this._chart.get();\n },\n /**\r\n * A chart that Scrollbar belongs to.\r\n *\r\n * @param chart Chart\r\n */\n set: function set(chart) {\n if (this._chart.get() !== chart) {\n this._chart.set(chart, chart.events.on(\"datavalidated\", this.handleDataChanged, this, false));\n this.handleDataChanged();\n this._scrollbarChart.dataProvider = chart; // this makes scrollbar chart do not validate data untill charts' data is validated\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Updates Scrollbar's internal chart's data when the main chart's data\r\n * changes.\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYChartScrollbar.prototype.handleDataChanged = function () {\n //@todo: what if raw data changed?\n if (this.chart.data != this.scrollbarChart.data) {\n this.scrollbarChart.data = this.chart.data;\n }\n };\n /**\r\n * Zooms out all axes on the internal chart.\r\n */\n XYChartScrollbar.prototype.zoomOutAxes = function () {\n var scrollbarChart = this.scrollbarChart;\n $iter.each(scrollbarChart.xAxes.iterator(), function (x) {\n x.zoom({\n start: 0,\n end: 1\n }, true, true);\n });\n $iter.each(scrollbarChart.yAxes.iterator(), function (y) {\n y.zoom({\n start: 0,\n end: 1\n }, true, true);\n });\n };\n /**\r\n * Updates scrollbar thumb.\r\n */\n XYChartScrollbar.prototype.updateThumb = function () {\n _super.prototype.updateThumb.call(this);\n if (this._unselectedOverlay) {\n var thumb = this.thumb;\n var x = thumb.pixelX || 0;\n var y = thumb.pixelY || 0;\n var w = thumb.pixelWidth || 0;\n var h = thumb.pixelHeight || 0;\n var path = \"\";\n if (this.orientation == \"horizontal\") {\n path = $path.rectToPath({\n x: -1,\n y: 0,\n width: x,\n height: h\n });\n path += $path.rectToPath({\n x: x + w,\n y: 0,\n width: (this.pixelWidth || 0) - x - w,\n height: h\n });\n } else {\n path = $path.rectToPath({\n x: 0,\n y: 0,\n width: w,\n height: y\n });\n path += $path.rectToPath({\n x: 0,\n y: y + h,\n width: w,\n height: (this.pixelHeight || 0) - y - h\n });\n }\n this._unselectedOverlay.path = path;\n }\n };\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n XYChartScrollbar.prototype.processConfig = function (config) {\n if (config) {\n if ($type.hasValue(config.series) && $type.isArray(config.series)) {\n for (var i = 0, len = config.series.length; i < len; i++) {\n var series = config.series[i];\n if ($type.hasValue(series) && $type.isString(series)) {\n if (this.map.hasKey(series)) {\n config.series[i] = this.map.getKey(series);\n } else {\n throw Error(\"XYChartScrollbar error: Series with id `\" + series + \"` does not exist.\");\n }\n }\n }\n }\n }\n _super.prototype.processConfig.call(this, config);\n };\n return XYChartScrollbar;\n}(Scrollbar);\nexport { XYChartScrollbar };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"XYChartScrollbar\"] = XYChartScrollbar;","/**\r\n * XY Chart module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { SerialChart, SerialChartDataItem } from \"./SerialChart\";\nimport { Container } from \"../../core/Container\";\nimport { List } from \"../../core/utils/List\";\nimport { DateAxis } from \"../axes/DateAxis\";\nimport { AxisRendererX } from \"../axes/AxisRendererX\";\nimport { AxisRendererY } from \"../axes/AxisRendererY\";\nimport { CategoryAxis } from \"../axes/CategoryAxis\";\nimport { XYSeries } from \"../series/XYSeries\";\nimport { XYCursor } from \"../cursors/XYCursor\";\nimport { Disposer } from \"../../core/utils/Disposer\";\nimport { ZoomOutButton } from \"../../core/elements/ZoomOutButton\";\nimport { percent } from \"../../core/utils/Percent\";\nimport { registry } from \"../../core/Registry\";\nimport { XYChartScrollbar } from \"../elements/XYChartScrollbar\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $array from \"../../core/utils/Array\";\nimport { defaultRules, ResponsiveBreakpoints } from \"../../core/utils/Responsive\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[XYChart]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar XYChartDataItem = /** @class */function (_super) {\n tslib_1.__extends(XYChartDataItem, _super);\n /**\r\n * Constructor\r\n */\n function XYChartDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"XYChartDataItem\";\n _this.applyTheme();\n return _this;\n }\n return XYChartDataItem;\n}(SerialChartDataItem);\nexport { XYChartDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates an XY chart, and any derivative chart, like Serial, Date-based, etc.\r\n *\r\n * Basically this is a chart type, that is used to display any chart\r\n * information in a square plot area.\r\n *\r\n * The horizontal and vertical scale is determined by the type of Axis.\r\n *\r\n * The plot types are determined by type of Series.\r\n *\r\n * ```TypeScript\r\n * // Includes\r\n * import * as am4core from \"@amcharts/amcharts4/core\";\r\n * import * as am4charts from \"@amcharts/amcharts4/charts\";\r\n *\r\n * // Create chart\r\n * let chart = am4core.create(\"chartdiv\", am4charts.XYChart);\r\n *\r\n * // Add Data\r\n * chart.data = [{\r\n * \"country\": \"USA\",\r\n * \"visits\": 3025\r\n * }, {\r\n * \t\"country\": \"China\",\r\n * \t\"visits\": 1882\r\n * }, {\r\n * \t\"country\": \"Japan\",\r\n * \t\"visits\": 1809\r\n * }];\r\n *\r\n * // Add category axis\r\n * let categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());\r\n * categoryAxis.dataFields.category = \"country\";\r\n *\r\n * // Add value axis\r\n * let valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\r\n *\r\n * // Add series\r\n * let series = chart.series.push(new am4charts.ColumnSeries());\r\n * series.name = \"Web Traffic\";\r\n * series.dataFields.categoryX = \"country\";\r\n * series.dataFields.valueY = \"visits\";\r\n * ```\r\n * ```JavaScript\r\n * // Create chart\r\n * var chart = am4core.create(\"chartdiv\", am4charts.XYChart);\r\n *\r\n * // The following would work as well:\r\n * // var chart = am4core.create(\"chartdiv\", \"XYChart\");\r\n *\r\n * // Add Data\r\n * chart.data = [{\r\n * \"country\": \"USA\",\r\n * \"visits\": 3025\r\n * }, {\r\n * \t\"country\": \"China\",\r\n * \t\"visits\": 1882\r\n * }, {\r\n * \t\"country\": \"Japan\",\r\n * \t\"visits\": 1809\r\n * }];\r\n *\r\n * // Add category axis\r\n * var categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());\r\n * categoryAxis.dataFields.category = \"country\";\r\n *\r\n * // Add value axis\r\n * var valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\r\n *\r\n * // Add series\r\n * var series = chart.series.push(new am4charts.ColumnSeries());\r\n * series.name = \"Web Traffic\";\r\n * series.dataFields.categoryX = \"country\";\r\n * series.dataFields.valueY = \"visits\";\r\n * ```\r\n * ```JSON\r\n * var chart = am4core.createFromConfig({\r\n *\r\n * \t// Category axis\r\n * \t\"xAxes\": [{\r\n * \t\t\"type\": \"CategoryAxis\",\r\n * \t\t\"dataFields\": {\r\n * \t\t\t\"category\": \"country\"\r\n * \t\t}\r\n * \t}],\r\n *\r\n * \t// Value axis\r\n * \t\"yAxes\": [{\r\n * \t\t\"type\": \"ValueAxis\"\r\n * \t}],\r\n *\r\n * \t// Series\r\n * \t\"series\": [{\r\n * \t\t\"type\": \"ColumnSeries\",\r\n * \t\t\"dataFields\": {\r\n * \t\t\t\"categoryX\": \"country\",\r\n * \t\t\t\"valueY\": \"visits\"\r\n * \t\t},\r\n * \t\t\"name\": \"Web Traffic\"\r\n * \t}],\r\n *\r\n * \t// Cursor\r\n * \t\"cursor\": {},\r\n *\r\n * \t// Data\r\n * \t\"data\": [{\r\n * \t\t\"country\": \"USA\",\r\n * \t\t\"visits\": 3025\r\n * \t}, {\r\n * \t\t\"country\": \"China\",\r\n * \t\t\"visits\": 1882\r\n * \t}, {\r\n * \t\t\"country\": \"Japan\",\r\n * \t\t\"visits\": 1809\r\n * \t}]\r\n *\r\n * }, \"chartdiv\", \"XYChart\");\r\n * ```\r\n *\r\n *\r\n * @see {@link IXYChartEvents} for a list of available Events\r\n * @see {@link IXYChartAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/xy-chart/} for documentation\r\n * @important\r\n */\nvar XYChart = /** @class */function (_super) {\n tslib_1.__extends(XYChart, _super);\n /**\r\n * Constructor\r\n */\n function XYChart() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * Defines the type of horizontal axis rederer.\r\n */\n _this._axisRendererX = AxisRendererX;\n /**\r\n * Defines the type of vertical axis rederer.\r\n */\n _this._axisRendererY = AxisRendererY;\n /**\r\n * @ignore\r\n */\n _this._seriesPoints = [];\n _this.className = \"XYChart\";\n // Set defaults\n //this.margin(10, 10, 10, 10);\n _this.maskBullets = true;\n _this.arrangeTooltips = true;\n // Create main chart container\n var chartContainer = _this.chartContainer;\n chartContainer.layout = \"vertical\";\n _this.padding(15, 15, 15, 15);\n // Create top axes container\n var topAxesCont = chartContainer.createChild(Container);\n topAxesCont.shouldClone = false;\n topAxesCont.layout = \"vertical\";\n topAxesCont.width = percent(100);\n topAxesCont.zIndex = 1;\n _this.topAxesContainer = topAxesCont;\n // Create vertical axes and plot area container\n // Plot area and vertical axes share the whole width of the chart,\n // so we need to put then into a separate container so that layouting\n // engine takes care of the positioning\n var yAxesAndPlotCont = chartContainer.createChild(Container);\n yAxesAndPlotCont.shouldClone = false;\n yAxesAndPlotCont.layout = \"horizontal\";\n yAxesAndPlotCont.width = percent(100);\n yAxesAndPlotCont.height = percent(100);\n yAxesAndPlotCont.zIndex = 0;\n _this.yAxesAndPlotContainer = yAxesAndPlotCont;\n // Create a container for bottom axes\n var bottomAxesCont = chartContainer.createChild(Container);\n bottomAxesCont.shouldClone = false;\n bottomAxesCont.width = percent(100);\n bottomAxesCont.layout = \"vertical\";\n bottomAxesCont.zIndex = 1;\n _this.bottomAxesContainer = bottomAxesCont;\n // Create a container for left-side axes\n var leftAxesCont = yAxesAndPlotCont.createChild(Container);\n leftAxesCont.shouldClone = false;\n leftAxesCont.layout = \"horizontal\";\n leftAxesCont.height = percent(100);\n leftAxesCont.contentAlign = \"right\";\n leftAxesCont.events.on(\"transformed\", _this.updateXAxesMargins, _this, false);\n leftAxesCont.zIndex = 1;\n _this.leftAxesContainer = leftAxesCont;\n // Create a container for plot area\n var plotCont = yAxesAndPlotCont.createChild(Container);\n plotCont.shouldClone = false;\n plotCont.height = percent(100);\n plotCont.width = percent(100);\n // Create transparend background for plot container so that hover works\n // on all of it\n plotCont.background.fillOpacity = 0;\n _this.plotContainer = plotCont;\n // must go below plot container\n _this.mouseWheelBehavior = \"none\";\n _this._cursorContainer = plotCont;\n // Create a container for right-side axes\n var rightAxesCont = yAxesAndPlotCont.createChild(Container);\n rightAxesCont.shouldClone = false;\n rightAxesCont.layout = \"horizontal\";\n rightAxesCont.height = percent(100);\n rightAxesCont.zIndex = 1;\n rightAxesCont.events.on(\"transformed\", _this.updateXAxesMargins, _this, false);\n _this.rightAxesContainer = rightAxesCont;\n _this.seriesContainer.parent = plotCont;\n _this.bulletsContainer.parent = plotCont;\n var zoomOutButton = plotCont.createChild(ZoomOutButton);\n zoomOutButton.shouldClone = false;\n zoomOutButton.align = \"right\";\n zoomOutButton.valign = \"top\";\n zoomOutButton.zIndex = Number.MAX_SAFE_INTEGER;\n zoomOutButton.marginTop = 5;\n zoomOutButton.marginRight = 5;\n zoomOutButton.hide(0);\n _this.zoomOutButton = zoomOutButton;\n _this._bulletMask = _this.plotContainer;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n XYChart.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n this.zoomOutButton.exportable = false;\n // Add a default screen reader title for accessibility\n // This will be overridden in screen reader if there are any `titles` set\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"X/Y chart\");\n }\n };\n /**\r\n * Draws the chart.\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYChart.prototype.draw = function () {\n _super.prototype.draw.call(this);\n this.seriesContainer.toFront();\n this.bulletsContainer.toFront();\n if (this.maskBullets) {\n this.bulletsContainer.mask = this._bulletMask;\n }\n this.updateSeriesLegend();\n };\n /**\r\n * Triggers a redrawing of all chart's series.\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYChart.prototype.updatePlotElements = function () {\n $iter.each(this.series.iterator(), function (series) {\n series.invalidate();\n });\n };\n /**\r\n * Triggers data (re)validation which in turn can cause a redraw of the\r\n * whole chart or just aprticular series / elements.\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYChart.prototype.validateData = function () {\n // tell axes that data changed\n if (this._parseDataFrom == 0) {\n $iter.each(this.xAxes.iterator(), function (axis) {\n axis.dataChangeUpdate();\n });\n $iter.each(this.yAxes.iterator(), function (axis) {\n axis.dataChangeUpdate();\n });\n $iter.each(this.series.iterator(), function (series) {\n series.dataChangeUpdate();\n });\n }\n _super.prototype.validateData.call(this);\n };\n /**\r\n * Updates margins for horizontal axes based on settings and available space.\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYChart.prototype.updateXAxesMargins = function () {\n var leftAxesWidth = this.leftAxesContainer.measuredWidth;\n var rightAxesWidth = this.rightAxesContainer.measuredWidth;\n var bottomAxesCont = this.bottomAxesContainer;\n if (bottomAxesCont.paddingLeft != leftAxesWidth || bottomAxesCont.paddingRight != rightAxesWidth) {\n bottomAxesCont.paddingLeft = leftAxesWidth;\n bottomAxesCont.paddingRight = rightAxesWidth;\n }\n var topAxesCont = this.topAxesContainer;\n if (topAxesCont.paddingLeft != leftAxesWidth || topAxesCont.paddingRight != rightAxesWidth) {\n topAxesCont.paddingLeft = leftAxesWidth;\n topAxesCont.paddingRight = rightAxesWidth;\n }\n };\n /**\r\n * Triggers an update on the horizontal axis when one of its properties\r\n * change.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event An event object\r\n */\n XYChart.prototype.handleXAxisChange = function (event) {\n this.updateXAxis(event.target);\n };\n /**\r\n * Triggers an update on the vertical axis when one of its properties\r\n * change.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event An event object\r\n */\n XYChart.prototype.handleYAxisChange = function (event) {\n this.updateYAxis(event.target);\n };\n /**\r\n * Sets up a new horizontal (X) axis when it is added to the chart.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Axis insert event\r\n */\n XYChart.prototype.processXAxis = function (event) {\n var axis = event.newValue;\n axis.chart = this;\n if (!axis.renderer) {\n axis.renderer = new this._axisRendererX();\n axis.renderer.observe([\"opposite\", \"inside\", \"inversed\", \"minGridDistance\"], this.handleXAxisChange, this, false);\n }\n axis.axisLetter = \"X\";\n axis.events.on(\"startendchanged\", this.handleXAxisRangeChange, this, false);\n //axis.events.on(\"endchanged\", this.handleXAxisRangeChange, this, false);\n // Although axis does not use data directly, we set dataProvider here\n // (but not add to chart data users) to hold up rendering before data\n // is parsed (system handles this)\n axis.dataProvider = this;\n this.updateXAxis(axis.renderer);\n this.processAxis(axis);\n };\n /**\r\n * Sets up a new vertical (Y) axis when it is added to the chart.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Axis insert event\r\n */\n XYChart.prototype.processYAxis = function (event) {\n var axis = event.newValue;\n axis.chart = this;\n if (!axis.renderer) {\n axis.renderer = new this._axisRendererY();\n axis.renderer.observe([\"opposite\", \"inside\", \"inversed\", \"minGridDistance\"], this.handleYAxisChange, this, false);\n }\n axis.axisLetter = \"Y\";\n axis.events.on(\"startendchanged\", this.handleYAxisRangeChange, this, false);\n //axis.events.on(\"endchanged\", this.handleYAxisRangeChange, this, false);\n // Although axis does not use data directly, we set dataProvider here\n // (but not add to chart data users) to hold up rendering before data\n // is parsed (system handles this)\n axis.dataProvider = this;\n this.updateYAxis(axis.renderer);\n this.processAxis(axis);\n };\n /**\r\n * Updates horizontal (X) scrollbar and other horizontal axis whenever axis'\r\n * value range changes.\r\n */\n XYChart.prototype.handleXAxisRangeChange = function () {\n var range = this.getCommonAxisRange(this.xAxes);\n if (this.scrollbarX) {\n this.zoomAxes(this.xAxes, range, true);\n }\n this.toggleZoomOutButton();\n this.updateScrollbar(this.scrollbarX, range);\n };\n /**\r\n * Shows or hides the Zoom Out button depending on whether the chart is fully\r\n * zoomed out or not.\r\n */\n XYChart.prototype.toggleZoomOutButton = function () {\n if (this.zoomOutButton) {\n var show_1 = false;\n $iter.eachContinue(this.xAxes.iterator(), function (axis) {\n if ($math.round(axis.start, 3) != 0 || $math.round(axis.end, 3) != 1) {\n show_1 = true;\n return false;\n }\n return true;\n });\n $iter.eachContinue(this.yAxes.iterator(), function (axis) {\n if ($math.round(axis.start, 3) != 0 || $math.round(axis.end, 3) != 1) {\n show_1 = true;\n return false;\n }\n return true;\n });\n if (!this.seriesAppeared) {\n show_1 = false;\n }\n if (show_1) {\n this.zoomOutButton.show();\n } else {\n this.zoomOutButton.hide();\n }\n }\n };\n /**\r\n * @ignore\r\n * moved this check to a separate method so that we could override it in TreeMapSeries\r\n */\n XYChart.prototype.seriesAppeared = function () {\n var appeared = false;\n $iter.each(this.series.iterator(), function (series) {\n if (!series.appeared) {\n appeared = false;\n return false;\n }\n });\n return appeared;\n };\n /**\r\n * Updates vertical (Y) scrollbar and other horizontal axis whenever axis'\r\n * value range changes.\r\n */\n XYChart.prototype.handleYAxisRangeChange = function () {\n var range = this.getCommonAxisRange(this.yAxes);\n if (this.scrollbarY) {\n this.zoomAxes(this.yAxes, range, true);\n }\n this.toggleZoomOutButton();\n this.updateScrollbar(this.scrollbarY, range);\n };\n /**\r\n * Updates a relative scrollbar whenever data range of the axis changes.\r\n *\r\n * @param scrollbar Scrollbar instance\r\n * @param range New data (values) range of the axis\r\n */\n XYChart.prototype.updateScrollbar = function (scrollbar, range) {\n if (scrollbar) {\n scrollbar.skipRangeEvents();\n scrollbar.start = range.start;\n scrollbar.end = range.end;\n }\n };\n /**\r\n * Returns a common range of values between a list of axes.\r\n *\r\n * This is used to synchronize the zoom between multiple axes.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axes A list of axes\r\n * @return Common value range\r\n */\n XYChart.prototype.getCommonAxisRange = function (axes) {\n var start;\n var end;\n $iter.each(axes.iterator(), function (axis) {\n var axisStart = axis.start;\n var axisEnd = axis.end;\n if (axis.renderer.inversed) {\n axisStart = 1 - axis.end;\n axisEnd = 1 - axis.start;\n }\n if (!$type.isNumber(start) || axisStart < start) {\n start = axisStart;\n }\n if (!$type.isNumber(end) || axisEnd > end) {\n end = axisEnd;\n }\n });\n return {\n start: start,\n end: end\n };\n };\n /**\r\n * Triggers (re)rendering of the horizontal (X) axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axis Axis\r\n */\n XYChart.prototype.updateXAxis = function (renderer) {\n var axis = renderer.axis;\n if (renderer.opposite) {\n axis.parent = this.topAxesContainer;\n axis.toFront();\n } else {\n axis.parent = this.bottomAxesContainer;\n axis.toBack();\n }\n if (axis.renderer) {\n axis.renderer.processRenderer();\n }\n };\n /**\r\n * Triggers (re)rendering of the vertical (Y) axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axis Axis\r\n */\n XYChart.prototype.updateYAxis = function (renderer) {\n var axis = renderer.axis;\n if (renderer.opposite) {\n axis.parent = this.rightAxesContainer;\n axis.toBack();\n } else {\n axis.parent = this.leftAxesContainer;\n axis.toFront();\n }\n if (axis.renderer) {\n axis.renderer.processRenderer();\n }\n };\n /**\r\n * Decorates an Axis for use with this chart, e.g. sets proper renderer\r\n * and containers for placement.\r\n *\r\n * @param axis Axis\r\n */\n XYChart.prototype.processAxis = function (axis) {\n var _this = this;\n // Value axis does not use data directly, only category axis does\n if (axis instanceof CategoryAxis) {\n this._dataUsers.moveValue(axis);\n }\n var renderer = axis.renderer;\n renderer.gridContainer.parent = this.plotContainer;\n renderer.gridContainer.toBack();\n renderer.breakContainer.parent = this.plotContainer;\n renderer.breakContainer.toFront();\n renderer.breakContainer.zIndex = 10;\n axis.addDisposer(new Disposer(function () {\n _this.dataUsers.removeValue(axis);\n }));\n this.plotContainer.events.on(\"maxsizechanged\", function () {\n if (_this.inited) {\n axis.invalidateDataItems();\n _this.updateSeriesMasks();\n }\n }, axis, false);\n };\n /**\r\n * This is done because for some reason IE doesn't change mask if path of a\r\n * mask changes.\r\n */\n XYChart.prototype.updateSeriesMasks = function () {\n if ($utils.isIE()) {\n this.series.each(function (series) {\n var mask = series.mainContainer.mask;\n series.mainContainer.mask = undefined;\n series.mainContainer.mask = mask;\n });\n }\n };\n Object.defineProperty(XYChart.prototype, \"xAxes\", {\n /**\r\n * A list of horizontal (X) axes.\r\n *\r\n * @return List of axes\r\n */\n get: function get() {\n if (!this._xAxes) {\n this._xAxes = new List();\n this._xAxes.events.on(\"inserted\", this.processXAxis, this, false);\n this._xAxes.events.on(\"removed\", this.handleAxisRemoval, this, false);\n }\n return this._xAxes;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n */\n XYChart.prototype.handleAxisRemoval = function (event) {\n var axis = event.oldValue;\n this.dataUsers.removeValue(axis); // need to remove, as it might not be disposed\n if (axis.autoDispose) {\n axis.dispose();\n }\n };\n Object.defineProperty(XYChart.prototype, \"yAxes\", {\n /**\r\n * A list of vertical (Y) axes.\r\n *\r\n * @return List of axes\r\n */\n get: function get() {\n if (!this._yAxes) {\n this._yAxes = new List();\n this._yAxes.events.on(\"inserted\", this.processYAxis, this, false);\n this._yAxes.events.on(\"removed\", this.handleAxisRemoval, this, false);\n }\n return this._yAxes;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Decorates a new [[XYSeries]] object with required parameters when it is\r\n * added to the chart.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\n XYChart.prototype.handleSeriesAdded = function (event) {\n try {\n _super.prototype.handleSeriesAdded.call(this, event);\n var series = event.newValue;\n if (this.xAxes.length == 0 || this.yAxes.length == 0) {\n registry.removeFromInvalidComponents(series);\n series.dataInvalid = false;\n }\n $utils.used(series.xAxis); // this is enough to get axis, handled in getter\n $utils.used(series.yAxis); // this is enough to get axis, handled in getter\n if (series.fill == undefined) {\n series.fill = this.colors.next();\n }\n if (series.stroke == undefined) {\n series.stroke = series.fill;\n }\n } catch (e) {\n this.raiseCriticalError(e);\n }\n };\n Object.defineProperty(XYChart.prototype, \"cursor\", {\n /**\r\n * @return Cursor\r\n */\n get: function get() {\n return this._cursor;\n },\n /**\r\n * Chart's [[Cursor]].\r\n *\r\n * @param cursor Cursor\r\n */\n set: function set(cursor) {\n if (this._cursor != cursor) {\n if (this._cursor) {\n this.removeDispose(this._cursor);\n }\n this._cursor = cursor;\n if (cursor) {\n // TODO this is wrong, fix it\n this._disposers.push(cursor);\n cursor.chart = this;\n cursor.shouldClone = false;\n cursor.parent = this._cursorContainer;\n cursor.events.on(\"cursorpositionchanged\", this.handleCursorPositionChange, this, false);\n cursor.events.on(\"zoomstarted\", this.handleCursorZoomStart, this, false);\n cursor.events.on(\"zoomended\", this.handleCursorZoomEnd, this, false);\n cursor.events.on(\"panstarted\", this.handleCursorPanStart, this, false);\n cursor.events.on(\"panning\", this.handleCursorPanning, this, false);\n cursor.events.on(\"panended\", this.handleCursorPanEnd, this, false);\n cursor.events.on(\"behaviorcanceled\", this.handleCursorCanceled, this, false);\n cursor.events.on(\"hidden\", this.handleHideCursor, this, false);\n cursor.zIndex = Number.MAX_SAFE_INTEGER - 1;\n if (this.tapToActivate) {\n // We need this in order to setup cursor properly\n this.setTapToActivate(this.tapToActivate);\n }\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates and returns a new [[Cursor]] suitable for this chart type.\r\n *\r\n * @return New cursor\r\n */\n XYChart.prototype.createCursor = function () {\n return new XYCursor();\n };\n /**\r\n * Performs tasks when the cursor's position changes, e.g. shows proper\r\n * tooltips on axes and series.\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYChart.prototype.handleCursorPositionChange = function () {\n var cursor = this.cursor;\n if (cursor.visible && !cursor.isHiding) {\n var xPosition = this.cursor.xPosition;\n var yPosition = this.cursor.yPosition;\n this.showSeriesTooltip({\n x: xPosition,\n y: yPosition\n });\n var exceptAxis = void 0;\n var snapToSeries = cursor.snapToSeries;\n if (snapToSeries) {\n if (snapToSeries.baseAxis == snapToSeries.xAxis) {\n exceptAxis = snapToSeries.yAxis;\n }\n if (snapToSeries.baseAxis == snapToSeries.yAxis) {\n exceptAxis = snapToSeries.xAxis;\n }\n }\n this._seriesPoints = [];\n this.showAxisTooltip(this.xAxes, xPosition, exceptAxis);\n this.showAxisTooltip(this.yAxes, yPosition, exceptAxis);\n this.sortSeriesTooltips(this._seriesPoints);\n }\n };\n /**\r\n * Hides all cursor-related tooltips when the cursor itself is hidden.\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYChart.prototype.handleHideCursor = function () {\n this.hideObjectTooltip(this.xAxes);\n this.hideObjectTooltip(this.yAxes);\n this.hideObjectTooltip(this.series);\n this.updateSeriesLegend();\n };\n /**\r\n * Updates values for each series' legend item.\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYChart.prototype.updateSeriesLegend = function () {\n $iter.each(this.series.iterator(), function (series) {\n series.updateLegendValue();\n });\n };\n /**\r\n * Hides a tooltip for a list of objects.\r\n *\r\n * @ignore Exclude from docs\r\n * @param sprites A list of sprites to hide tooltip for\r\n */\n XYChart.prototype.hideObjectTooltip = function (sprites) {\n $iter.each(sprites.iterator(), function (sprite) {\n sprite.hideTooltip(0);\n });\n };\n /**\r\n * Shows a tooltip for all chart's series, using specific coordinates as a\r\n * reference point.\r\n *\r\n * The tooltip might be shown at different coordinates depending on the\r\n * actual data point's position, overlapping with other tooltips, etc.\r\n *\r\n * @ignore Exclude from docs\r\n * @param position Reference point\r\n */\n XYChart.prototype.showSeriesTooltip = function (position) {\n var _this = this;\n if (!position) {\n this.series.each(function (series) {\n series.hideTooltip();\n });\n return;\n }\n var seriesPoints = [];\n this.series.each(function (series) {\n //if (series.tooltipText || series.tooltipHTML) { // not good, bullets are not hovered then\n if (series.xAxis instanceof DateAxis && series.xAxis.snapTooltip || series.yAxis instanceof DateAxis && series.yAxis.snapTooltip) {\n // void\n } else {\n var point = series.showTooltipAtPosition(position.x, position.y);\n if (point) {\n series.tooltip.setBounds({\n x: 0,\n y: 0,\n width: _this.pixelWidth,\n height: _this.pixelHeight\n });\n seriesPoints.push({\n series: series,\n point: point\n });\n }\n }\n //}\n });\n if (this.arrangeTooltips) {\n this.sortSeriesTooltips(seriesPoints);\n }\n };\n /**\r\n * @ignore\r\n */\n XYChart.prototype.sortSeriesTooltips = function (seriesPoints) {\n var topLeft = $utils.spritePointToSvg({\n x: -0.5,\n y: -0.5\n }, this.plotContainer);\n var bottomRight = $utils.spritePointToSvg({\n x: this.plotContainer.pixelWidth + 0.5,\n y: this.plotContainer.pixelHeight + 0.5\n }, this.plotContainer);\n var sum = 0;\n var filteredSeriesPoints = [];\n $array.each(seriesPoints, function (seriesPoint) {\n var point = seriesPoint.point;\n if (point && $math.isInRectangle(point, {\n x: topLeft.x,\n y: topLeft.y,\n width: bottomRight.x - topLeft.x,\n height: bottomRight.y - topLeft.y\n })) {\n filteredSeriesPoints.push({\n point: point,\n series: seriesPoint.series\n });\n sum += point.y;\n }\n });\n seriesPoints = filteredSeriesPoints;\n seriesPoints.sort(function (a, b) {\n if (a.point.y > b.point.y) {\n return 1;\n } else if (a.point.y < b.point.y) {\n return -1;\n } else {\n return 0;\n }\n });\n var averageY = sum / seriesPoints.length;\n var maxY = $utils.svgPointToDocument({\n x: 0,\n y: 0\n }, this.svgContainer.SVGContainer).y;\n if (seriesPoints.length > 0) {\n var top_1 = topLeft.y;\n var bottom = bottomRight.y;\n // TODO is this needed ?\n $utils.spritePointToDocument({\n x: 0,\n y: top_1\n }, this);\n var dropped = false;\n if (averageY > top_1 + (bottom - top_1) / 2) {\n var nextHeight = bottom;\n for (var i = seriesPoints.length - 1; i >= 0; i--) {\n var series = seriesPoints[i].series;\n var tooltip = series.tooltip;\n var pointY = seriesPoints[i].point.y;\n tooltip.setBounds({\n x: 0,\n y: -maxY,\n width: this.pixelWidth,\n height: nextHeight + maxY\n });\n if (tooltip.invalid) {\n tooltip.validate();\n }\n tooltip.toBack();\n nextHeight = $utils.spritePointToSvg({\n x: 0,\n y: tooltip.label.pixelY - tooltip.pixelY + pointY - tooltip.pixelMarginTop\n }, tooltip).y;\n if (nextHeight < -maxY) {\n dropped = true;\n break;\n }\n }\n }\n if (averageY <= top_1 + (bottom - top_1) / 2 || dropped) {\n var nextY = top_1;\n for (var i = 0, len = seriesPoints.length; i < len; i++) {\n var series = seriesPoints[i].series;\n var pointY = seriesPoints[i].point.y;\n var tooltip = series.tooltip;\n tooltip.setBounds({\n x: 0,\n y: nextY,\n width: this.pixelWidth,\n height: bottom\n });\n if (tooltip.invalid) {\n tooltip.validate();\n }\n tooltip.toBack();\n nextY = $utils.spritePointToSvg({\n x: 0,\n y: tooltip.label.pixelY + tooltip.label.measuredHeight - tooltip.pixelY + pointY + tooltip.pixelMarginBottom\n }, tooltip).y;\n }\n }\n }\n };\n /**\r\n * Shows tooltips for a list of axes at specific position.\r\n *\r\n * Position might be X coordinate for horizontal axes, and Y coordinate for\r\n * vertical axes.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axes List of axes to show tooltip on\r\n * @param position Position (px)\r\n */\n XYChart.prototype.showAxisTooltip = function (axes, position, except) {\n var _this = this;\n $iter.each(axes.iterator(), function (axis) {\n if (axis != except) {\n if (_this.dataItems.length > 0 || axis.dataItems.length > 0) {\n axis.showTooltipAtPosition(position);\n }\n }\n });\n };\n /**\r\n * Recalculates the value range for the axis taking into account zoom level & inversed.\r\n *\r\n * @param axis Axis\r\n * @param range Range\r\n * @return Modified range\r\n */\n XYChart.prototype.getUpdatedRange = function (axis, range) {\n if (!axis) {\n return;\n }\n var start;\n var end;\n var inversed = axis.renderer.inversed;\n if (axis.renderer instanceof AxisRendererY) {\n range = $math.invertRange(range);\n }\n if (inversed) {\n $math.invertRange(range);\n start = 1 - axis.end;\n end = 1 - axis.start;\n } else {\n start = axis.start;\n end = axis.end;\n }\n var difference = end - start;\n return {\n start: start + range.start * difference,\n end: start + range.end * difference\n };\n };\n /**\r\n * Performs zoom and other operations when user finishes zooming using chart\r\n * cursor, e.g. zooms axes.\r\n *\r\n * @param event Cursor's event\r\n */\n XYChart.prototype.handleCursorZoomEnd = function (event) {\n var cursor = this.cursor;\n var behavior = cursor.behavior;\n if (behavior == \"zoomX\" || behavior == \"zoomXY\") {\n var xRange = cursor.xRange;\n if (xRange && this.xAxes.length > 0) {\n xRange = this.getUpdatedRange(this.xAxes.getIndex(0), xRange);\n xRange.priority = \"start\";\n this.zoomAxes(this.xAxes, xRange);\n }\n }\n if (behavior == \"zoomY\" || behavior == \"zoomXY\") {\n var yRange = cursor.yRange;\n if (yRange && this.yAxes.length > 0) {\n yRange = this.getUpdatedRange(this.yAxes.getIndex(0), yRange);\n yRange.priority = \"start\";\n this.zoomAxes(this.yAxes, yRange);\n }\n }\n this.handleHideCursor();\n };\n /**\r\n * Performs zoom and other operations when user is panning chart plot using chart cursor.\r\n *\r\n * @param event Cursor's event\r\n */\n XYChart.prototype.handleCursorPanStart = function (event) {\n var xAxis = this.xAxes.getIndex(0);\n if (xAxis) {\n this._panStartXRange = {\n start: xAxis.start,\n end: xAxis.end\n };\n }\n var yAxis = this.yAxes.getIndex(0);\n if (yAxis) {\n this._panStartYRange = {\n start: yAxis.start,\n end: yAxis.end\n };\n }\n };\n /**\r\n * Performs zoom and other operations when user ends panning\r\n *\r\n * @param event Cursor's event\r\n */\n XYChart.prototype.handleCursorPanEnd = function (event) {\n var cursor = this.cursor;\n var behavior = cursor.behavior;\n if (this._panEndXRange && (behavior == \"panX\" || behavior == \"panXY\")) {\n var panEndRange = this._panEndXRange;\n var delta = 0;\n if (panEndRange.start < 0) {\n delta = panEndRange.start;\n }\n if (panEndRange.end > 1) {\n delta = panEndRange.end - 1;\n }\n this.zoomAxes(this.xAxes, {\n start: panEndRange.start - delta,\n end: panEndRange.end - delta\n }, false, true);\n this._panEndXRange = undefined;\n this._panStartXRange = undefined;\n }\n if (this._panEndYRange && (behavior == \"panY\" || behavior == \"panXY\")) {\n var panEndRange = this._panEndYRange;\n var delta = 0;\n if (panEndRange.start < 0) {\n delta = panEndRange.start;\n }\n if (panEndRange.end > 1) {\n delta = panEndRange.end - 1;\n }\n this.zoomAxes(this.yAxes, {\n start: panEndRange.start - delta,\n end: panEndRange.end - delta\n }, false, true);\n this._panEndYRange = undefined;\n this._panStartYRange = undefined;\n }\n };\n XYChart.prototype.handleCursorCanceled = function () {\n this._panEndXRange = undefined;\n this._panStartXRange = undefined;\n };\n /**\r\n * Performs zoom and other operations when user is panning chart plot using chart cursor.\r\n *\r\n * @param event Cursor's event\r\n */\n XYChart.prototype.handleCursorPanning = function (event) {\n var cursor = this.cursor;\n var behavior = cursor.behavior;\n var maxPanOut = cursor.maxPanOut;\n if (this._panStartXRange && (behavior == \"panX\" || behavior == \"panXY\")) {\n var panStartRange = this._panStartXRange;\n var range = cursor.xRange;\n var axisRange = this.getCommonAxisRange(this.xAxes);\n var difference = panStartRange.end - panStartRange.start;\n var delta = range.start * (axisRange.end - axisRange.start);\n var newStart = Math.max(-maxPanOut, delta + panStartRange.start);\n var newEnd = Math.min(delta + panStartRange.end, 1 + maxPanOut);\n if (newStart <= 0) {\n newEnd = newStart + difference;\n }\n if (newEnd >= 1) {\n newStart = newEnd - difference;\n }\n var newRange = {\n start: newStart,\n end: newEnd\n };\n this._panEndXRange = newRange;\n this.zoomAxes(this.xAxes, newRange, false, false, cursor.maxPanOut);\n }\n if (this._panStartYRange && (behavior == \"panY\" || behavior == \"panXY\")) {\n var panStartRange = this._panStartYRange;\n var range = cursor.yRange;\n var axisRange = this.getCommonAxisRange(this.yAxes);\n var difference = panStartRange.end - panStartRange.start;\n var delta = range.start * (axisRange.end - axisRange.start);\n var newStart = Math.max(-maxPanOut, delta + panStartRange.start);\n var newEnd = Math.min(delta + panStartRange.end, 1 + maxPanOut);\n if (newStart <= 0) {\n newEnd = newStart + difference;\n }\n if (newEnd >= 1) {\n newStart = newEnd - difference;\n }\n var newRange = {\n start: newStart,\n end: newEnd\n };\n this._panEndYRange = newRange;\n this.zoomAxes(this.yAxes, newRange, false, false, cursor.maxPanOut);\n }\n this.handleHideCursor();\n };\n /**\r\n * Performs zoom and other operations when user starts zooming using chart\r\n * cursor, e.g. zooms axes.\r\n *\r\n * @param event Cursor's event\r\n */\n XYChart.prototype.handleCursorZoomStart = function (event) {\n // Nothing here\n // This method is here only as a \"placeholder\" for extending classes to\n // override if necessary\n };\n Object.defineProperty(XYChart.prototype, \"scrollbarX\", {\n /**\r\n * @return Scrollbar\r\n */\n get: function get() {\n return this._scrollbarX;\n },\n /**\r\n * Horizontal (X) scrollbar.\r\n *\r\n * @param scrollbar Scrollbar\r\n */\n set: function set(scrollbar) {\n var _this = this;\n if (this._scrollbarX) {\n this.removeDispose(this._scrollbarX);\n }\n this._scrollbarX = scrollbar;\n if (scrollbar) {\n this._disposers.push(scrollbar);\n scrollbar.parent = this.topAxesContainer;\n scrollbar.shouldClone = false;\n scrollbar.startGrip.exportable = false;\n scrollbar.endGrip.exportable = false;\n scrollbar.toBack();\n scrollbar.orientation = \"horizontal\";\n scrollbar.events.on(\"rangechanged\", this.handleXScrollbarChange, this, false);\n // accessibility related\n scrollbar.adapter.add(\"positionValue\", function (arg) {\n var xAxis = _this.xAxes.getIndex(0);\n if (xAxis) {\n arg.value = xAxis.getPositionLabel(arg.position);\n }\n return arg;\n });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYChart.prototype, \"scrollbarY\", {\n /**\r\n * @return Scrollbar\r\n */\n get: function get() {\n return this._scrollbarY;\n },\n /**\r\n * Vertical (Y) scrollbar.\r\n *\r\n * @param scrollbar Scrollbar\r\n */\n set: function set(scrollbar) {\n var _this = this;\n if (this._scrollbarY) {\n this.removeDispose(this._scrollbarY);\n }\n this._scrollbarY = scrollbar;\n if (scrollbar) {\n this._disposers.push(scrollbar);\n scrollbar.parent = this.rightAxesContainer;\n scrollbar.startGrip.exportable = false;\n scrollbar.shouldClone = false;\n scrollbar.endGrip.exportable = false;\n scrollbar.toFront();\n scrollbar.orientation = \"vertical\";\n scrollbar.events.on(\"rangechanged\", this.handleYScrollbarChange, this, false);\n // accessibility related\n scrollbar.adapter.add(\"positionValue\", function (arg) {\n var yAxis = _this.yAxes.getIndex(0);\n if (yAxis) {\n arg.value = yAxis.getPositionLabel(arg.position);\n }\n return arg;\n });\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Zooms axes affected by the horizontal (X) scrollbar when the selection\r\n * on it changes.\r\n *\r\n * @param event Scrollbar range change event\r\n */\n XYChart.prototype.handleXScrollbarChange = function (event) {\n if (this.inited) {\n var scrollbar = event.target;\n var range = scrollbar.range;\n if (range.end == 1) {\n range.priority = \"end\";\n }\n if (range.start == 0) {\n range.priority = \"start\";\n }\n range = this.zoomAxes(this.xAxes, range);\n scrollbar.fixRange(range);\n }\n };\n /**\r\n * Zooms axes affected by the vertical (Y) scrollbar when the selection\r\n * on it changes.\r\n *\r\n * @param event Scrollbar range change event\r\n */\n XYChart.prototype.handleYScrollbarChange = function (event) {\n if (this.inited) {\n var scrollbar = event.target;\n var range = scrollbar.range;\n if (range.end == 1) {\n range.priority = \"end\";\n }\n if (range.start == 0) {\n range.priority = \"start\";\n }\n range = this.zoomAxes(this.yAxes, range);\n scrollbar.fixRange(range);\n }\n };\n /**\r\n * Zooms axes that are affected by to specific relative range.\r\n *\r\n * @param axes List of axes to zoom\r\n * @param range Range of values to zoom to (0-1)\r\n * @param instantly If set to `true` will skip zooming animation\r\n * @return Recalculated range that is common to all involved axes\r\n */\n XYChart.prototype.zoomAxes = function (axes, range, instantly, round, declination) {\n var realRange = {\n start: 0,\n end: 1\n };\n this.showSeriesTooltip(); // hides\n if (!this.dataInvalid) {\n $iter.each(axes.iterator(), function (axis) {\n if (axis.renderer.inversed) {\n range = $math.invertRange(range);\n }\n axis.hideTooltip(0);\n if (round) {\n //let diff = range.end - range.start;\n range.start = axis.roundPosition(range.start + 0.0001, 0);\n range.end = axis.roundPosition(range.end + 0.0001, 0);\n }\n var axisRange = axis.zoom(range, instantly, instantly, declination);\n if (axis.renderer.inversed) {\n axisRange = $math.invertRange(axisRange);\n }\n realRange = axisRange;\n });\n }\n return realRange;\n };\n Object.defineProperty(XYChart.prototype, \"maskBullets\", {\n /**\r\n * @return Mask bullet container?\r\n */\n get: function get() {\n return this.getPropertyValue(\"maskBullets\");\n },\n /**\r\n * Indicates if bullet container is masked.\r\n *\r\n * If it is set to `true`, any bullets that do not fit into bullet container\r\n * will be clipped off. Settting to `false` will allow bullets to \"spill out\"\r\n * of the plot area so they are not cut off.\r\n *\r\n * @param value Mask bullet container?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"maskBullets\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYChart.prototype, \"arrangeTooltips\", {\n /**\r\n * @return Arrange tooltips?\r\n */\n get: function get() {\n return this.getPropertyValue(\"arrangeTooltips\");\n },\n /**\r\n * Indicates if chart should arrange series tooltips so that they would not\r\n * overlap.\r\n *\r\n * If set to `true` (default), the chart will adjust vertical positions of\r\n * all simultaneously shown tooltips to avoid overlapping.\r\n *\r\n * However, if you have a vertically-arranged chart, it might not make sense,\r\n * because tooltips would most probably not be aligned horizontally. In this\r\n * case it would probably be a good idea to set this setting to `false`.\r\n *\r\n * @default true\r\n * @param value Arrange tooltips?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"arrangeTooltips\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Handles mouse wheel event.\r\n *\r\n * @param event Original event\r\n */\n XYChart.prototype.handleWheel = function (event) {\n var plotContainer = this.plotContainer;\n var svgPoint = $utils.documentPointToSvg(event.point, this.htmlContainer, this.svgContainer.cssScale);\n var plotPoint = $utils.svgPointToSprite(svgPoint, plotContainer);\n var shift = event.shift.y;\n var rangeX = this.getCommonAxisRange(this.xAxes);\n var rangeY = this.getCommonAxisRange(this.yAxes);\n var shiftStep = 0.05;\n var maxPanOut = 0;\n var mouseWheelBehavior = this.mouseWheelBehavior;\n if (mouseWheelBehavior == \"panX\" || mouseWheelBehavior == \"panXY\") {\n var differenceX = rangeX.end - rangeX.start;\n var newStartX = Math.max(-maxPanOut, rangeX.start + shiftStep * shift / 100);\n var newEndX = Math.min(rangeX.end + shiftStep * shift / 100, 1 + maxPanOut);\n if (newStartX <= 0) {\n newEndX = newStartX + differenceX;\n }\n if (newEndX >= 1) {\n newStartX = newEndX - differenceX;\n }\n this.zoomAxes(this.xAxes, {\n start: newStartX,\n end: newEndX\n });\n }\n if (mouseWheelBehavior == \"panY\" || mouseWheelBehavior == \"panXY\") {\n shift *= -1;\n var differenceY = rangeY.end - rangeY.start;\n var newStartY = Math.max(-maxPanOut, rangeY.start + shiftStep * shift / 100);\n var newEndY = Math.min(rangeY.end + shiftStep * shift / 100, 1 + maxPanOut);\n if (newStartY <= 0) {\n newEndY = newStartY + differenceY;\n }\n if (newEndY >= 1) {\n newStartY = newEndY - differenceY;\n }\n this.zoomAxes(this.yAxes, {\n start: newStartY,\n end: newEndY\n });\n }\n if (mouseWheelBehavior == \"zoomX\" || mouseWheelBehavior == \"zoomXY\") {\n var locationX = plotPoint.x / plotContainer.maxWidth;\n var newStartX = Math.max(-maxPanOut, rangeX.start - shiftStep * shift / 100 * locationX);\n newStartX = Math.min(newStartX, rangeX.start + (rangeX.end - rangeX.start) * locationX - shiftStep * 0.05);\n var newEndX = Math.min(rangeX.end + shiftStep * shift / 100 * (1 - locationX), 1 + maxPanOut);\n newEndX = Math.max(newEndX, rangeX.start + (rangeX.end - rangeX.start) * locationX + shiftStep * 0.05);\n this.zoomAxes(this.xAxes, {\n start: newStartX,\n end: newEndX\n });\n }\n if (mouseWheelBehavior == \"zoomY\" || mouseWheelBehavior == \"zoomXY\") {\n var locationY = plotPoint.y / plotContainer.maxHeight;\n var newStartY = Math.max(-maxPanOut, rangeY.start - shiftStep * shift / 100 * (1 - locationY));\n newStartY = Math.min(newStartY, rangeY.start + (rangeY.end - rangeY.start) * locationY - shiftStep * 0.05);\n var newEndY = Math.min(rangeY.end + shiftStep * shift / 100 * locationY, 1 + maxPanOut);\n newEndY = Math.max(newEndY, rangeY.start + (rangeY.end - rangeY.start) * locationY + shiftStep * 0.05);\n this.zoomAxes(this.yAxes, {\n start: newStartY,\n end: newEndY\n });\n }\n };\n Object.defineProperty(XYChart.prototype, \"mouseWheelBehavior\", {\n /**\r\n * @return Mouse wheel behavior\r\n */\n get: function get() {\n return this.getPropertyValue(\"mouseWheelBehavior\");\n },\n /**\r\n * Specifies action for when mouse wheel is used when over the chart.\r\n *\r\n * Options: Options: `\"zoomX\"`, `\"zoomY\"`, `\"zoomXY\"`, `\"panX\"`, `\"panY\"`, `\"panXY\"`, `\"none\"` (default).\r\n *\r\n * @default \"none\"\r\n * @param mouse wheel behavior\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"mouseWheelBehavior\", value)) {\n if (value != \"none\") {\n this._mouseWheelDisposer = this.plotContainer.events.on(\"wheel\", this.handleWheel, this, false);\n this._disposers.push(this._mouseWheelDisposer);\n } else {\n if (this._mouseWheelDisposer) {\n this.plotContainer.wheelable = false;\n this.plotContainer.hoverable = false;\n this._mouseWheelDisposer.dispose();\n }\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * This function is called by the [[DataSource]]'s `dateFields` adapater\r\n * so that particular chart types can popuplate this setting with their\r\n * own type-specific data fields so they are parsed properly.\r\n *\r\n * @param fields Array of date fields\r\n * @return Array of date fields populated with chart's date fields\r\n */\n XYChart.prototype.dataSourceDateFields = function (fields) {\n var _this = this;\n // Process parent\n fields = _super.prototype.dataSourceDateFields.call(this, fields);\n // Check if we have any series with date-fields\n $iter.each(this.series.iterator(), function (series) {\n fields = _this.populateDataSourceFields(fields, series.dataFields, [\"dateX\", \"dateY\", \"openDateX\", \"openDateY\"]);\n });\n return fields;\n };\n /**\r\n * This function is called by the [[DataSource]]'s `numberFields` adapater\r\n * so that particular chart types can popuplate this setting with their\r\n * own type-specific data fields so they are parsed properly.\r\n *\r\n * @param value Array of number fields\r\n * @return Array of number fields populated with chart's number fields\r\n */\n XYChart.prototype.dataSourceNumberFields = function (fields) {\n var _this = this;\n fields = _super.prototype.dataSourceDateFields.call(this, fields);\n // Check if we have any series with date-fields\n $iter.each(this.series.iterator(), function (series) {\n fields = _this.populateDataSourceFields(fields, series.dataFields, [\"valueX\", \"valueY\", \"openValueX\", \"openValueY\"]);\n });\n return fields;\n };\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n XYChart.prototype.processConfig = function (config) {\n if (config) {\n // Save axis ranges for later processing\n var xAxes = [];\n var yAxes = [];\n // Set up axes\n if ($type.hasValue(config.xAxes) && $type.isArray(config.xAxes)) {\n for (var i = 0, len = config.xAxes.length; i < len; i++) {\n if (!config.xAxes[i].type) {\n throw Error(\"[XYChart error] No type set for xAxes[\" + i + \"].\");\n } else if ($type.hasValue(config.xAxes[i][\"axisRanges\"])) {\n xAxes.push({\n axisRanges: config.xAxes[i][\"axisRanges\"],\n index: i\n });\n delete config.xAxes[i][\"axisRanges\"];\n }\n }\n }\n if ($type.hasValue(config.yAxes) && $type.isArray(config.yAxes)) {\n for (var i = 0, len = config.yAxes.length; i < len; i++) {\n if (!config.yAxes[i].type) {\n throw Error(\"[XYChart error] No type set for yAxes[\" + i + \"].\");\n } else if ($type.hasValue(config.yAxes[i][\"axisRanges\"])) {\n yAxes.push({\n axisRanges: config.yAxes[i][\"axisRanges\"],\n index: i\n });\n delete config.yAxes[i][\"axisRanges\"];\n }\n }\n }\n // Set up series\n if ($type.hasValue(config.series) && $type.isArray(config.series)) {\n for (var i = 0, len = config.series.length; i < len; i++) {\n config.series[i].type = config.series[i].type || \"LineSeries\";\n }\n }\n // Set up cursor\n if ($type.hasValue(config.cursor) && !$type.hasValue(config.cursor.type)) {\n config.cursor.type = \"XYCursor\";\n }\n // Set up scrollbars\n if ($type.hasValue(config.scrollbarX) && !$type.hasValue(config.scrollbarX.type)) {\n config.scrollbarX.type = \"Scrollbar\";\n }\n if ($type.hasValue(config.scrollbarY) && !$type.hasValue(config.scrollbarY.type)) {\n config.scrollbarY.type = \"Scrollbar\";\n }\n _super.prototype.processConfig.call(this, config);\n // Finish up with ranges.\n // We need to do this here because series are processed last in JSON\n // config. Therefore their respective objects are not yet are available\n // when axis (and respectively their ranges) are being processed.\n if (yAxes.length) {\n for (var i = 0, len = yAxes.length; i < len; i++) {\n this.yAxes.getIndex(yAxes[i].index).config = {\n axisRanges: yAxes[i].axisRanges\n };\n }\n }\n if (xAxes.length) {\n for (var i = 0, len = xAxes.length; i < len; i++) {\n this.xAxes.getIndex(xAxes[i].index).config = {\n axisRanges: xAxes[i].axisRanges\n };\n }\n }\n }\n };\n /**\r\n * This function is used to sort element's JSON config properties, so that\r\n * some properties that absolutely need to be processed last, can be put at\r\n * the end.\r\n *\r\n * @ignore Exclude from docs\r\n * @param a Element 1\r\n * @param b Element 2\r\n * @return Sorting number\r\n */\n XYChart.prototype.configOrder = function (a, b) {\n if (a == b) {\n return 0;\n }\n // Must come last\n else if (a == \"scrollbarX\") {\n return 1;\n } else if (b == \"scrollbarX\") {\n return -1;\n } else if (a == \"scrollbarY\") {\n return 1;\n } else if (b == \"scrollbarY\") {\n return -1;\n } else if (a == \"cursor\") {\n return 1;\n } else if (b == \"cursor\") {\n return -1;\n } else if (a == \"series\") {\n return 1;\n } else if (b == \"series\") {\n return -1;\n } else {\n return _super.prototype.configOrder.call(this, a, b);\n }\n };\n /**\r\n * Creates a new Series of type suitable for this chart.\r\n *\r\n * @return New series\r\n */\n XYChart.prototype.createSeries = function () {\n return new XYSeries();\n };\n Object.defineProperty(XYChart.prototype, \"zoomOutButton\", {\n /**\r\n * @return Zoom out button\r\n */\n get: function get() {\n return this._zoomOutButton;\n },\n /**\r\n * A [[Button]] element that is used for zooming out the chart.\r\n *\r\n * This button appears only when chart is zoomed in, and disappears\r\n * autoamatically when it is zoome dout.\r\n *\r\n * @param button Zoom out button\r\n */\n set: function set(button) {\n var _this = this;\n this._zoomOutButton = button;\n if (button) {\n button.events.on(\"hit\", function () {\n _this.zoomAxes(_this.xAxes, {\n start: 0,\n end: 1\n });\n _this.zoomAxes(_this.yAxes, {\n start: 0,\n end: 1\n });\n }, undefined, false);\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies all parameters from another [[XYChart]].\r\n *\r\n * @param source Source XYChart\r\n */\n XYChart.prototype.copyFrom = function (source) {\n var _this = this;\n source.xAxes.each(function (axis) {\n _this.xAxes.push(axis.clone());\n });\n source.yAxes.each(function (axis) {\n _this.yAxes.push(axis.clone());\n });\n //this.xAxes.copyFrom(source.xAxes);\n //this.yAxes.copyFrom(source.yAxes);\n _super.prototype.copyFrom.call(this, source);\n //this.zoomOutButton.copyFrom(source.zoomOutButton);\n if (source.cursor) {\n this.cursor = source.cursor.clone();\n }\n if (source.scrollbarX) {\n this.scrollbarX = source.scrollbarX.clone();\n }\n if (source.scrollbarY) {\n this.scrollbarY = source.scrollbarY.clone();\n }\n //@todo copy all container properties\n };\n /**\r\n * @ignore\r\n */\n XYChart.prototype.disposeData = function () {\n _super.prototype.disposeData.call(this);\n var scrollbarX = this.scrollbarX;\n if (scrollbarX && scrollbarX instanceof XYChartScrollbar) {\n scrollbarX.scrollbarChart.disposeData();\n }\n var scrollbarY = this.scrollbarY;\n if (scrollbarY && scrollbarY instanceof XYChartScrollbar) {\n scrollbarY.scrollbarChart.disposeData();\n }\n this.xAxes.each(function (axis) {\n axis.disposeData();\n });\n this.yAxes.each(function (axis) {\n axis.disposeData();\n });\n };\n /**\r\n * Adds one or several (array) of data items to the existing data.\r\n *\r\n * @param rawDataItem One or many raw data item objects\r\n */\n XYChart.prototype.addData = function (rawDataItem, removeCount) {\n if (this.scrollbarX instanceof XYChartScrollbar) {\n this.addScrollbarData(this.scrollbarX, removeCount);\n }\n if (this.scrollbarY instanceof XYChartScrollbar) {\n this.addScrollbarData(this.scrollbarY, removeCount);\n }\n _super.prototype.addData.call(this, rawDataItem, removeCount);\n };\n /**\r\n * @ignore\r\n */\n XYChart.prototype.addScrollbarData = function (scrollbar, removeCount) {\n var chart = scrollbar.scrollbarChart;\n chart._parseDataFrom = chart.data.length;\n chart.invalidateData();\n };\n /**\r\n * @ignore\r\n */\n XYChart.prototype.removeScrollbarData = function (scrollbar, removeCount) {\n var chart = scrollbar.scrollbarChart;\n if ($type.isNumber(removeCount)) {\n while (removeCount > 0) {\n var dataItem = this.dataItems.getIndex(0);\n if (dataItem) {\n chart.dataItems.remove(dataItem);\n }\n chart.dataUsers.each(function (dataUser) {\n var dataItem = dataUser.dataItems.getIndex(0);\n if (dataItem) {\n dataUser.dataItems.remove(dataItem);\n }\n });\n chart._parseDataFrom--;\n removeCount--;\n }\n chart.invalidateData();\n }\n };\n /**\r\n * Removes elements from the beginning of data\r\n *\r\n * @param count number of elements to remove\r\n */\n XYChart.prototype.removeData = function (count) {\n if (this.scrollbarX instanceof XYChartScrollbar) {\n this.removeScrollbarData(this.scrollbarX, count);\n }\n if (this.scrollbarY instanceof XYChartScrollbar) {\n this.removeScrollbarData(this.scrollbarY, count);\n }\n _super.prototype.removeData.call(this, count);\n };\n /**\r\n * @param value Tap to activate?\r\n */\n XYChart.prototype.setTapToActivate = function (value) {\n _super.prototype.setTapToActivate.call(this, value);\n if (this.cursor) {\n this.cursor.interactions.isTouchProtected = value;\n this.plotContainer.interactions.isTouchProtected = value;\n }\n };\n XYChart.prototype.handleTapToActivate = function () {\n _super.prototype.handleTapToActivate.call(this);\n if (this.cursor) {\n this.cursor.interactions.isTouchProtected = false;\n this.plotContainer.interactions.isTouchProtected = false;\n }\n };\n XYChart.prototype.handleTapToActivateDeactivation = function () {\n _super.prototype.handleTapToActivateDeactivation.call(this);\n if (this.cursor) {\n this.cursor.interactions.isTouchProtected = true;\n this.plotContainer.interactions.isTouchProtected = true;\n }\n };\n return XYChart;\n}(SerialChart);\nexport { XYChart };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"XYChart\"] = XYChart;\n/**\r\n * Add default responsive rules\r\n */\n/**\r\n * Remove horizontal scrollbar on narrow charts.\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.maybeXS,\n state: function state(target, stateId) {\n if (target instanceof XYChart && target.scrollbarX) {\n var state = target.states.create(stateId);\n var sbstate = target.scrollbarX.states.create(stateId);\n sbstate.properties.disabled = true;\n return state;\n }\n return null;\n }\n});\n/**\r\n * Remove vertical scrollbar on short charts.\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.maybeXS,\n state: function state(target, stateId) {\n if (target instanceof XYChart && target.scrollbarY) {\n var state = target.states.create(stateId);\n var sbstate = target.scrollbarY.states.create(stateId);\n sbstate.properties.disabled = true;\n return state;\n }\n return null;\n }\n});","/**\r\n * Line series segment module.\r\n * @todo Add description about what this is\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../../core/Container\";\nimport { Sprite, visualProperties } from \"../../core/Sprite\";\nimport { registry } from \"../../core/Registry\";\nimport * as $path from \"../../core/rendering/Path\";\nimport * as $object from \"../../core/utils/Object\";\nimport { color } from \"../../core/utils/Color\";\nimport * as $smoothing from \"../../core/rendering/Smoothing\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Represents a line series segment.\r\n *\r\n * A line segment can be used to apply different properties to a part of the\r\n * line series, between two data points.\r\n *\r\n * @see {@link ILineSeriesSegmentEvents} for a list of available events\r\n * @see {@link ILineSeriesSegmentAdapters} for a list of available Adapters\r\n * @todo Example\r\n */\nvar LineSeriesSegment = /** @class */function (_super) {\n tslib_1.__extends(LineSeriesSegment, _super);\n /**\r\n * Constructor\r\n */\n function LineSeriesSegment() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"LineSeriesSegment\";\n // Set defaults\n _this.isMeasured = false;\n _this.interactionsEnabled = false;\n _this.layout = \"none\";\n // Create fill element\n var fillSprite = _this.createChild(Sprite);\n _this.fillSprite = fillSprite;\n fillSprite.shouldClone = false;\n fillSprite.setElement(_this.paper.add(\"path\"));\n fillSprite.isMeasured = false;\n _this._disposers.push(fillSprite);\n // Create line element\n var strokeSprite = _this.createChild(Sprite);\n _this.strokeSprite = strokeSprite;\n strokeSprite.shouldClone = false;\n strokeSprite.fill = color();\n strokeSprite.setElement(_this.paper.add(\"path\"));\n strokeSprite.isMeasured = false;\n _this._disposers.push(strokeSprite);\n return _this;\n }\n /**\r\n * Draws the series segment.\r\n *\r\n * @ignore Exclude from docs\r\n * @param points Points to connect\r\n * @param closePoints ?\r\n * @param smoothnessX Horizontal bezier setting (?)\r\n * @param smoothnessY Vertical bezier setting (?)\r\n */\n LineSeriesSegment.prototype.drawSegment = function (points, closePoints, smoothnessX, smoothnessY) {\n if (!this.disabled) {\n if (points.length > 0 && closePoints.length > 0) {\n // first moveTo helps to avoid Chrome straight line in the mask bug.\n var path = $path.moveTo({\n x: points[0].x - 0.2,\n y: points[0].y - 0.2\n }) + $path.moveTo(points[0]) + new $smoothing.Tension(smoothnessX, smoothnessY).smooth(points);\n if (this.strokeOpacity == 0 || this.strokeSprite.strokeOpacity == 0) {\n // like this and not if != 0, otherwise ranges stroke won't be drawn.\n } else {\n this.strokeSprite.path = path;\n }\n if (this.fillOpacity > 0 || this.fillSprite.fillOpacity > 0) {\n // helps to avoid drawing fill object if fill is not visible\n path += $path.lineTo(closePoints[0]) + new $smoothing.Tension(smoothnessX, smoothnessY).smooth(closePoints);\n path += $path.lineTo(points[0]);\n path += $path.closePath();\n this.fillSprite.path = path;\n }\n } else {\n this.fillSprite.path = \"\";\n this.strokeSprite.path = \"\";\n }\n }\n };\n /**\r\n * Copies properties from a [[Sprite]] to both line and fill elements.\r\n *\r\n * @param source Source [[Sprite]] to copy properties from\r\n */\n LineSeriesSegment.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n var lineElement = this.strokeSprite;\n $object.copyProperties(source, lineElement.properties, visualProperties);\n lineElement.events.copyFrom(source.strokeSprite.events);\n lineElement.fillOpacity = 0;\n var fillElement = this.fillSprite;\n $object.copyProperties(source, fillElement.properties, visualProperties);\n fillElement.events.copyFrom(source.fillSprite.events);\n fillElement.strokeOpacity = 0;\n };\n return LineSeriesSegment;\n}(Container);\nexport { LineSeriesSegment };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"LineSeriesSegment\"] = LineSeriesSegment;","/**\r\n * Line series module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { XYSeries, XYSeriesDataItem } from \"./XYSeries\";\nimport { visualProperties } from \"../../core/Sprite\";\nimport { Container } from \"../../core/Container\";\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\nimport { LineSeriesSegment } from \"./LineSeriesSegment\";\nimport { ValueAxis } from \"../axes/ValueAxis\";\nimport { DateAxis } from \"../axes/DateAxis\";\nimport { CategoryAxis } from \"../axes/CategoryAxis\";\nimport { registry } from \"../../core/Registry\";\nimport { Line } from \"../../core/elements/Line\";\nimport { Label } from \"../../core/elements/Label\";\nimport { Rectangle } from \"../../core/elements/Rectangle\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $object from \"../../core/utils/Object\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $array from \"../../core/utils/Array\";\nimport { Bullet } from \"../elements/Bullet\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[LineSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar LineSeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(LineSeriesDataItem, _super);\n /**\r\n * Constructor\r\n */\n function LineSeriesDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"LineSeriesDataItem\";\n return _this;\n }\n return LineSeriesDataItem;\n}(XYSeriesDataItem);\nexport { LineSeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines [[Series]] for a line graph.\r\n *\r\n * @see {@link ILineSeriesEvents} for a list of available Events\r\n * @see {@link ILineSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\nvar LineSeries = /** @class */function (_super) {\n tslib_1.__extends(LineSeries, _super);\n /**\r\n * Constructor\r\n */\n function LineSeries() {\n var _this = _super.call(this) || this;\n /**\r\n * Minimum distance in pixels between two adjacent points.\r\n *\r\n * If the distance is less than this setting, a point is skipped.\r\n *\r\n * This allows acceptable performance with huge amounts of data points.\r\n *\r\n * @default 0.5\r\n */\n _this.minDistance = 0.5;\n _this.segments = new ListTemplate(_this.createSegment());\n _this.segments.template.applyOnClones = true;\n _this._disposers.push(new ListDisposer(_this.segments));\n _this._disposers.push(_this.segments.template);\n _this._segmentsIterator = new $iter.ListIterator(_this.segments, function () {\n return _this.segments.create();\n });\n _this._segmentsIterator.createNewItems = true;\n _this.className = \"LineSeries\";\n _this.strokeOpacity = 1;\n _this.fillOpacity = 0;\n _this.connect = true;\n _this.tensionX = 1;\n _this.tensionY = 1;\n _this.autoGapCount = 1.1;\n _this.segmentsContainer = _this.mainContainer.createChild(Container);\n _this.segmentsContainer.isMeasured = false;\n // line series might have multiple segments and it has a separate sprite for fill and stroke for each segment. So we need to observe all the changes on series and set them on the segments\n // todo: we need list here, otherwise everything will be redrawn event on change of properties like tooltipX or similar.\n // this.addEventListener(SpriteEvent.PROPERTY_CHANGED, this.validateDataElements, false, this);\n _this.bulletsContainer.toFront();\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n LineSeries.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Line Series\");\n }\n };\n /**\r\n * @ignore\r\n */\n LineSeries.prototype.createSegment = function () {\n return new LineSeriesSegment();\n };\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n LineSeries.prototype.createDataItem = function () {\n return new LineSeriesDataItem();\n };\n /**\r\n * Inits data item's working values.\r\n *\r\n * @param dataItem Data item\r\n * @param index Data item's index\r\n */\n LineSeries.prototype.setInitialWorkingValues = function (dataItem) {\n // this makes data items animate when added\n var yAxis = this._yAxis.get();\n var xAxis = this._xAxis.get();\n if (this.appeared && this.visible) {\n var previousDataItem = this.dataItems.getIndex(dataItem.index - 1);\n dataItem.component = this; // as these values are set before, we don't know component yet\n if (this.baseAxis == xAxis) {\n if (yAxis instanceof ValueAxis) {\n var initialY = yAxis.minZoomed;\n if (previousDataItem) {\n initialY = previousDataItem.values[\"valueY\"].workingValue;\n }\n // this makes line animate from previous point to newly added point\n dataItem.setWorkingValue(\"valueY\", initialY, 0);\n dataItem.setWorkingValue(\"valueY\", dataItem.values.valueY.value);\n if (xAxis instanceof DateAxis) {\n dataItem.setWorkingLocation(\"dateX\", dataItem.locations.dateX - 1, 0); // instantly move it to previous\n dataItem.setWorkingLocation(\"dateX\", dataItem.locations.dateX); // animate to it's location\n }\n }\n }\n if (this.baseAxis == yAxis) {\n if (xAxis instanceof ValueAxis) {\n var initialX = xAxis.minZoomed;\n if (previousDataItem) {\n initialX = previousDataItem.values[\"valueX\"].workingValue;\n }\n dataItem.setWorkingValue(\"valueX\", initialX, 0);\n dataItem.setWorkingValue(\"valueX\", dataItem.values.valueX.value);\n if (yAxis instanceof DateAxis) {\n dataItem.setWorkingLocation(\"dateY\", dataItem.locations.dateX - 1, 0); // instantly move it to previous\n dataItem.setWorkingLocation(\"dateY\", dataItem.locations.dateY); // animate to it's location\n }\n }\n }\n } else {\n if (this.baseAxis == xAxis) {\n if (yAxis instanceof ValueAxis) {\n if (xAxis instanceof DateAxis) {\n dataItem.setWorkingLocation(\"dateX\", dataItem.locations.dateX);\n }\n if (xAxis instanceof CategoryAxis) {\n dataItem.setWorkingLocation(\"categoryX\", dataItem.locations.categoryX);\n }\n }\n }\n if (this.baseAxis == yAxis) {\n if (xAxis instanceof ValueAxis) {\n if (yAxis instanceof DateAxis) {\n dataItem.setWorkingLocation(\"dateY\", dataItem.locations.dateY);\n }\n if (yAxis instanceof CategoryAxis) {\n dataItem.setWorkingLocation(\"categoryY\", dataItem.locations.categoryY);\n }\n }\n }\n }\n };\n /**\r\n * Updates corresponding legend data item with current values.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n LineSeries.prototype.updateLegendValue = function (dataItem) {\n _super.prototype.updateLegendValue.call(this, dataItem);\n //This is hack to save some methos, used to set tooltip color source only\n if (dataItem && dataItem.segment) {\n this.tooltipColorSource = dataItem.segment;\n }\n };\n /**\r\n * (Re)validates the whole series, effectively causing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\n LineSeries.prototype.validate = function () {\n var _this = this;\n _super.prototype.validate.call(this);\n this._segmentsIterator.reset();\n this.openSegmentWrapper(this._adjustedStartIndex);\n $iter.each(this.axisRanges.iterator(), function (range) {\n _this.openSegmentWrapper(_this._adjustedStartIndex, range);\n });\n $iter.each(this._segmentsIterator.iterator(), function (segment) {\n segment.__disabled = true;\n });\n };\n /**\r\n * [sliceData description]\r\n *\r\n * @todo Description\r\n */\n LineSeries.prototype.sliceData = function () {\n var startIndex = this.startIndex;\n var endIndex = this.endIndex;\n // we need extra one item to both sides with values for line series, otherwise the line will not continue out of bounds of the chart while scrolling\n // find first to the left\n // TODO use iterator instead\n for (var i = this.startIndex - 1; i >= 0; i--) {\n var dataItem = this.dataItems.getIndex(i);\n if (dataItem && dataItem.hasValue(this._xValueFields) && dataItem.hasValue(this._yValueFields)) {\n startIndex = i;\n break;\n }\n }\n this._adjustedStartIndex = this.findAdjustedIndex(startIndex, [\"stroke\", \"strokeWidth\", \"strokeDasharray\", \"strokeOpacity\", \"fill\", \"fillOpacity\", \"opacity\"]);\n // find first to the right\n // TODO use iterator instead\n for (var i = this.endIndex, len = this.dataItems.length; i < len; i++) {\n var dataItem = this.dataItems.getIndex(i);\n if (dataItem && dataItem.hasValue(this._xValueFields) && dataItem.hasValue(this._yValueFields)) {\n endIndex = i + 1;\n break;\n }\n }\n this._workingStartIndex = startIndex;\n this._workingEndIndex = endIndex;\n };\n /**\r\n * @ignore\r\n */\n LineSeries.prototype.findAdjustedIndex = function (adjustedIndex, properties) {\n var _this = this;\n var propertyFields = this.propertyFields;\n var startIndex = adjustedIndex;\n $array.each(properties, function (property) {\n if ($type.hasValue(propertyFields[property])) {\n for (var i = startIndex; i >= 0; i--) {\n var dataItem = _this.dataItems.getIndex(i);\n if (dataItem) {\n if ($type.hasValue(dataItem.properties[property])) {\n if (adjustedIndex > i) {\n adjustedIndex = i;\n }\n break;\n }\n }\n }\n }\n });\n return adjustedIndex;\n };\n /**\r\n * Wraps openSegment call with iterative solution to prevent stack overflow\r\n *\r\n * @param openIndex Index\r\n * @param axisRange Range\r\n */\n LineSeries.prototype.openSegmentWrapper = function (openIndex, axisRange) {\n var params = {\n \"index\": openIndex,\n \"axisRange\": axisRange\n };\n do {\n params = this.openSegment(params.index, params.axisRange);\n } while (params);\n };\n /**\r\n * [openSegment description]\r\n *\r\n * @todo Description\r\n * @param openIndex [description]\r\n * @param axisRange [description]\r\n */\n LineSeries.prototype.openSegment = function (openIndex, axisRange) {\n var addToClose = false;\n var points = [];\n openIndex = Math.min(openIndex, this.dataItems.length);\n var endIndex = Math.min(this._workingEndIndex, this.dataItems.length);\n this._workingEndIndex = Math.min(this._workingEndIndex, this.dataItems.length);\n var closeIndex;\n var propertiesChanged = false;\n var segment = this._segmentsIterator.getFirst();\n segment.__disabled = false;\n if (axisRange) {\n segment.parent = axisRange.contents;\n $object.copyProperties(axisRange.contents, segment, visualProperties);\n } else {\n $object.copyProperties(this, segment, visualProperties);\n segment.filters.clear();\n segment.parent = this.segmentsContainer;\n }\n var connect = this.connect;\n var valuesFound = false; // some flag to avoid multiple closes if no values found\n for (var i = openIndex; i < endIndex; i++) {\n var dataItem = this.dataItems.getIndex(i);\n dataItem.segment = segment;\n if (dataItem.hasProperties) {\n // if this is first item of segment\n if (i == openIndex) {\n this.updateSegmentProperties(dataItem.properties, segment);\n } else {\n // this time we only need to know if properties changed, so we don't pass segment\n propertiesChanged = this.updateSegmentProperties(dataItem.properties, segment, true);\n }\n }\n if (dataItem.hasValue(this._xValueFields) && dataItem.hasValue(this._yValueFields)) {\n this.addPoints(points, dataItem, this.xField, this.yField);\n valuesFound = true;\n } else {\n // if no values in first data item, go to next\n if (i == openIndex) {\n continue;\n } else {\n // stop cycle\n if (!connect && valuesFound) {\n closeIndex = i;\n break;\n }\n }\n }\n closeIndex = i;\n if (this.baseAxis instanceof DateAxis) {\n var next = this.dataItems.getIndex(i + 1);\n if (next && this.baseAxis.makeGap(next, dataItem)) {\n addToClose = true;\n break;\n }\n }\n if (propertiesChanged) {\n break;\n }\n }\n return this.closeSegment(segment, points, openIndex, closeIndex, axisRange, addToClose);\n };\n /**\r\n * [addPoints description]\r\n *\r\n * @todo Description\r\n * @param points [description]\r\n * @param dataItem [description]\r\n * @param xField [description]\r\n * @param yField [description]\r\n * @param backwards [description]\r\n */\n LineSeries.prototype.addPoints = function (points, dataItem, xField, yField, backwards) {\n var point = this.getPoint(dataItem, xField, yField, dataItem.workingLocations[xField], dataItem.workingLocations[yField]);\n if (!backwards) {\n dataItem.point = point;\n }\n points.push(point);\n };\n /**\r\n * [closeSegment description]\r\n *\r\n * @todo Description\r\n * @param segment [description]\r\n * @param points [description]\r\n * @param openIndex [description]\r\n * @param closeIndex [description]\r\n * @param axisRange [description]\r\n */\n LineSeries.prototype.closeSegment = function (segment, points, openIndex, closeIndex, axisRange, add) {\n var closePoints = [];\n if (this.dataFields[this._xOpenField] || this.dataFields[this._yOpenField] || this.stacked) {\n for (var i = closeIndex; i >= openIndex; i--) {\n var dataItem = this.dataItems.getIndex(i);\n if (dataItem.hasValue(this._xValueFields) && dataItem.hasValue(this._yValueFields)) {\n // not sure, this means that open point will only be added if value is also set for this point, but maybe it's ok.\n this.addPoints(closePoints, dataItem, this.xOpenField, this.yOpenField, true);\n }\n }\n } else {\n var baseAxis = this.baseAxis;\n var count = points.length;\n var xAxis = this.xAxis;\n var yAxis = this.yAxis;\n if (count > 0) {\n if (baseAxis == xAxis) {\n closePoints.push({\n x: points[count - 1].x,\n y: yAxis.basePoint.y\n }); // last x\n closePoints.push({\n x: points[0].x,\n y: yAxis.basePoint.y\n }); // first x\n } else {\n closePoints.push({\n x: xAxis.basePoint.x,\n y: points[count - 1].y\n }); // last y\n closePoints.push({\n x: xAxis.basePoint.x,\n y: points[0].y\n }); // first y\n }\n }\n }\n this.drawSegment(segment, points, closePoints);\n if (add) {\n closeIndex++;\n }\n if (closeIndex < this._workingEndIndex - 1) {\n return {\n \"index\": closeIndex,\n \"axisRange\": axisRange\n };\n } else {\n return null;\n }\n };\n /**\r\n * Draws the line segment.\r\n *\r\n * @param segment Segment\r\n * @param points Segment points\r\n * @param closePoints Segment close points\r\n */\n LineSeries.prototype.drawSegment = function (segment, points, closePoints) {\n segment.drawSegment(points, closePoints, this.tensionX, this.tensionY);\n };\n /**\r\n * Segement will get its colors from `this.dataItem`, as thats how\r\n * `getPropertyValue()` method works.\r\n *\r\n * We pass `lineSeriesDataItem.properties` as item here each time when a flag\r\n * `hasProperties` is set to `true` on data item (this means it can contain\r\n * some properties set).\r\n *\r\n * @param itemProperties Item properties\r\n * @param segment Segment\r\n * @return Properties changed?\r\n */\n LineSeries.prototype.updateSegmentProperties = function (itemProperties, segment, checkOnly) {\n var changed = false;\n $object.each(itemProperties, function (propertyName, value) {\n // some value must be defined\n if ($type.hasValue(value)) {\n var currentValue = segment[propertyName];\n var currentValueStr = void 0;\n // current value can be Color, number, anything. So we check if it has toString, otherwise just do String().\n // toString() will return hex if it's color. The only problem is that it will return lowercased hex and if we have uppercase in data, it will think that it changed\n if (currentValue) {\n if (currentValue.toString) {\n currentValueStr = currentValue.toString();\n } else {\n currentValueStr = currentValue; // not doing String(currentValue) as this will make all Objects the same\n }\n }\n var valueStr = void 0;\n if (value) {\n if (value.toString) {\n valueStr = value.toString();\n } else {\n valueStr = value; // not doing String(currentValue) as this will make all Objects the same\n }\n }\n if (currentValue == value || currentValueStr != undefined && valueStr != undefined && currentValueStr == valueStr) {\n // void\n } else {\n if (!checkOnly) {\n segment[propertyName] = value;\n }\n changed = true;\n }\n }\n });\n return changed;\n };\n Object.defineProperty(LineSeries.prototype, \"connect\", {\n /**\r\n * @return Connect?\r\n */\n get: function get() {\n return this.getPropertyValue(\"connect\");\n },\n /**\r\n * Connect the lines over empty data points?\r\n *\r\n * If set to `true` the line will connect two adjacent data points by a\r\n * straight line. Even if there are data points with missing values\r\n * in-between.\r\n *\r\n * If you set this to `false`, the line will break when there are missing\r\n * values.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/xy-chart/#Line_series_with_gaps} for more information about this feature\r\n * @default true\r\n * @param value Connect?\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"connect\", value)) {\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LineSeries.prototype, \"tensionX\", {\n /**\r\n * @return Horizontal tension (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"tensionX\");\n },\n /**\r\n * Horizontal tension setting of the line (0-1).\r\n *\r\n * Can be used to create smoothed lines. It works like this:\r\n *\r\n * Accepted values are in the range between 0 and 1. The biggest value (1)\r\n * will mean that the \"tension\" is very high, so the line is maximally\r\n * attracted to the points it connects, hence the straight line.\r\n *\r\n * Using smaller numbers will \"relax\" the tension, creating some curving.\r\n *\r\n * The smaller the tension setting, the more relaxed the line and the more\r\n * wide the curve.\r\n *\r\n * This setting is for horizontal tension, meaning the curve will bend in\r\n * such way that it never goes below or above connecting points. To enable\r\n * vertical bending as well, use `tensionY`.\r\n *\r\n * @default 1\r\n * @param value Horizontal tension (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"tensionX\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LineSeries.prototype, \"tensionY\", {\n /**\r\n * @return Vertical tension (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"tensionY\");\n },\n /**\r\n * Can be used to create smoothed lines. It works like this:\r\n *\r\n * Accepted values are in the range between 0 and 1. The biggest value (1)\r\n * will mean that the \"tension\" is very high, so the line is maximally\r\n * attracted to the points it connects, hence the straight line.\r\n *\r\n * Using smaller numbers will \"relax\" the tension, creating some curving.\r\n *\r\n * The smaller the tension setting, the more relaxed the line and the more\r\n * wide the curve.\r\n *\r\n * This setting is for vertical tension, meaning the curve might bend in\r\n * such way that it will go below or above connected points.\r\n *\r\n * Combine this setting with `tensionX` to create beautifully looking\r\n * smoothed line series.\r\n *\r\n * @default 1\r\n * @param value Vertical tension (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"tensionY\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates elements in related legend container, that mimics the look of this\r\n * Series.\r\n *\r\n * @ignore Exclude from docs\r\n * @param marker Legend item container\r\n */\n LineSeries.prototype.createLegendMarker = function (marker) {\n var _this = this;\n var w = marker.pixelWidth;\n var h = marker.pixelHeight;\n marker.disposeChildren();\n var line = marker.createChild(Line);\n line.shouldClone = false;\n //line.copyFrom(this); coppies events which is not good\n $object.copyProperties(this, line, visualProperties);\n line.x2 = w;\n line.y = h / 2;\n line.visible = true;\n if (this.fillOpacity > 0) {\n var fill = marker.createChild(Rectangle);\n //fill.copyFrom(this); coppies events which is not good\n $object.copyProperties(this, fill, visualProperties);\n fill.width = w;\n fill.height = h;\n fill.y = 0;\n fill.strokeOpacity = 0;\n fill.visible = true;\n line.y = 0;\n }\n var legendDataItem = marker.dataItem;\n legendDataItem.color = this.stroke;\n legendDataItem.colorOrig = this.fill;\n $iter.eachContinue(this.bullets.iterator(), function (bullet) {\n if (bullet instanceof Bullet && !bullet.copyToLegendMarker) {\n return false;\n }\n var hasLabels = false;\n if (bullet instanceof Container) {\n // do not copy bullets with labels\n $iter.each(bullet.children.iterator(), function (child) {\n if (child instanceof Label) {\n hasLabels = true;\n return true;\n }\n });\n }\n if (!hasLabels) {\n var clone = bullet.clone();\n clone.parent = marker;\n clone.isMeasured = true;\n clone.tooltipText = undefined;\n clone.x = w / 2;\n if (_this.fillOpacity > 0) {\n clone.y = 0;\n } else {\n clone.y = h / 2;\n }\n clone.visible = true;\n // otherwise will not transit to color after hiding\n if (!$type.hasValue(clone.fill)) {\n clone.fill = _this.fill;\n }\n if (!$type.hasValue(clone.stroke)) {\n clone.stroke = _this.stroke;\n }\n return false;\n }\n });\n };\n /**\r\n * @ignore\r\n */\n LineSeries.prototype.disposeData = function () {\n _super.prototype.disposeData.call(this);\n this.segments.clear();\n };\n Object.defineProperty(LineSeries.prototype, \"autoGapCount\", {\n /**\r\n * @return Gap count\r\n */\n get: function get() {\n return this.getPropertyValue(\"autoGapCount\");\n },\n /**\r\n * If `connect = false` and distance between two data points is bigger\r\n * than `baseInterval * autoGapCount`, a line will break automatically.\r\n *\r\n * @since 4.2.4\r\n * @param value Gap count\r\n */\n set: function set(value) {\n this.setPropertyValue(\"autoGapCount\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n return LineSeries;\n}(XYSeries);\nexport { LineSeries };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"LineSeries\"] = LineSeries;\nregistry.registeredClasses[\"LineSeriesDataItem\"] = LineSeriesDataItem;","/**\r\n * Radar series module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { LineSeries, LineSeriesDataItem } from \"./LineSeries\";\nimport { registry } from \"../../core/Registry\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $path from \"../../core/rendering/Path\";\n//import { AxisRendererCircular } from \"../axes/AxisRendererCircular\";\n//import { Sprite } from \"../../core/Sprite\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[RadarSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar RadarSeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(RadarSeriesDataItem, _super);\n /**\r\n * Constructor\r\n */\n function RadarSeriesDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"RadarSeriesDataItem\";\n _this.setLocation(\"dateX\", 0, 0);\n _this.setLocation(\"dateY\", 0, 0);\n _this.setLocation(\"categoryX\", 0, 0);\n _this.setLocation(\"categoryY\", 0, 0);\n _this.applyTheme();\n return _this;\n }\n return RadarSeriesDataItem;\n}(LineSeriesDataItem);\nexport { RadarSeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines [[Series]] for a radar graph.\r\n *\r\n * @see {@link IRadarSeriesEvents} for a list of available Events\r\n * @see {@link IRadarSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\nvar RadarSeries = /** @class */function (_super) {\n tslib_1.__extends(RadarSeries, _super);\n /**\r\n * Constructor\r\n */\n function RadarSeries() {\n var _this = _super.call(this) || this;\n _this.className = \"RadarSeries\";\n _this.connectEnds = true;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * (Re)validates the whole series, effectively causing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\n RadarSeries.prototype.validate = function () {\n // so that radius would be updated\n if (this.chart.invalid) {\n this.chart.validate();\n }\n _super.prototype.validate.call(this);\n };\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n RadarSeries.prototype.createDataItem = function () {\n return new RadarSeriesDataItem();\n };\n /**\r\n * Returns an [[IPoint]] coordinates of the specific Serie's data point.\r\n *\r\n * @param dataItem Data item\r\n * @param xKey Name of X data field\r\n * @param yKey Name of Y data field\r\n * @param locationX X location\r\n * @param locationY Y location\r\n * @param stackKeyX ?\r\n * @param stackKeyY ?\r\n * @returns Coordinates\r\n */\n RadarSeries.prototype.getPoint = function (dataItem, xKey, yKey, locationX, locationY, stackKeyX, stackKeyY) {\n if (!stackKeyX) {\n stackKeyX = \"valueX\";\n }\n if (!stackKeyY) {\n stackKeyY = \"valueY\";\n }\n var x = this.yAxis.getX(dataItem, yKey, locationY, stackKeyY);\n var y = this.yAxis.getY(dataItem, yKey, locationY, stackKeyY);\n var radius = $math.getDistance({\n x: x,\n y: y\n });\n // hack to be able to determine angle later\n if (radius == 0) {\n radius = 0.00001;\n }\n var angle = this.xAxis.getAngle(dataItem, xKey, locationX, stackKeyX);\n var startAngle = this.chart.startAngle;\n var endAngle = this.chart.endAngle;\n //\t\tangle = $math.fitToRange(angle, startAngle, endAngle);\n if (angle < startAngle || angle > endAngle) {\n return undefined;\n } else {\n return {\n x: radius * $math.cos(angle),\n y: radius * $math.sin(angle)\n };\n }\n };\n /**\r\n * [addPoints description]\r\n *\r\n * @todo Description\r\n * @param points [description]\r\n * @param dataItem [description]\r\n * @param xField [description]\r\n * @param yField [description]\r\n * @param backwards [description]\r\n */\n RadarSeries.prototype.addPoints = function (points, dataItem, xField, yField, backwards) {\n var point = this.getPoint(dataItem, xField, yField, dataItem.locations[xField], dataItem.locations[yField]);\n if (point) {\n points.push(point);\n }\n };\n /**\r\n * Returns an SVG path to be used as a mask for the series.\r\n *\r\n * @return SVG path\r\n */\n RadarSeries.prototype.getMaskPath = function () {\n var renderer = this.yAxis.renderer;\n return $path.arc(renderer.startAngle, renderer.endAngle - renderer.startAngle, renderer.pixelRadius, renderer.pixelInnerRadius);\n };\n /**\r\n * [drawSegment description]\r\n *\r\n * @todo Description\r\n * @param segment [description]\r\n * @param points [description]\r\n * @param closePoints [description]\r\n */\n RadarSeries.prototype.drawSegment = function (segment, points, closePoints) {\n var axis = this.yAxis;\n var renderer = axis.renderer;\n if (this.connectEnds && Math.abs(renderer.endAngle - renderer.startAngle) == 360) {\n // adds one point to the beginning of closePoints array, if needed\n if (this.dataFields[this._xOpenField] || this.dataFields[this._yOpenField] || this.stacked) {\n points.push(points[0]);\n if (closePoints.length > 0) {\n closePoints.unshift(closePoints[closePoints.length - 1]);\n }\n }\n }\n _super.prototype.drawSegment.call(this, segment, points, closePoints);\n };\n Object.defineProperty(RadarSeries.prototype, \"connectEnds\", {\n /**\r\n * @return Connect?\r\n */\n get: function get() {\n return this.getPropertyValue(\"connectEnds\");\n },\n /**\r\n * Should the last and and first data points be connected, forming a complete\r\n * closed circle?\r\n *\r\n * @default true\r\n * @param value Connect?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"connectEnds\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n return RadarSeries;\n}(LineSeries);\nexport { RadarSeries };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"RadarSeries\"] = RadarSeries;\nregistry.registeredClasses[\"RadarSeriesDataItem\"] = RadarSeriesDataItem;","import * as tslib_1 from \"tslib\";\nimport { XYCursor } from \"./XYCursor\";\nimport { Percent, percent } from \"../../core/utils/Percent\";\nimport { registry } from \"../../core/Registry\";\nimport * as $path from \"../../core/rendering/Path\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Cursor for [[RadarChart]].\r\n *\r\n * @see {@link IRadarCursorEvents} for a list of available events\r\n * @see {@link IRadarCursorAdapters} for a list of available Adapters\r\n */\nvar RadarCursor = /** @class */function (_super) {\n tslib_1.__extends(RadarCursor, _super);\n /**\r\n * Constructor\r\n */\n function RadarCursor() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"RadarCursor\";\n _this.radius = percent(100);\n _this.innerRadius = percent(0);\n // Apply theme\n _this.applyTheme();\n _this.mask = undefined;\n return _this;\n }\n /**\r\n * Checks if point is within bounds of a container.\r\n *\r\n * @ignore Exclude from docs\r\n * @param point Point to check\r\n * @return Fits within container?\r\n */\n RadarCursor.prototype.fitsToBounds = function (point) {\n var radius = $math.getDistance(point);\n //if(!$math.isAngleInRange(angle, this.startAngle, this.endAngle)){\n //return false;\n //}\n if (radius < this.truePixelRadius + 1 && radius > this.pixelInnerRadius - 1) {\n // ok to add/remove some\n return true;\n }\n return false;\n };\n Object.defineProperty(RadarCursor.prototype, \"startAngle\", {\n /**\r\n * @return Start angle\r\n */\n get: function get() {\n return this.getPropertyValue(\"startAngle\");\n },\n /**\r\n * Starting angle of the cursor's radial line.\r\n *\r\n * @param value Start angle\r\n */\n set: function set(value) {\n this.setPropertyValue(\"startAngle\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RadarCursor.prototype, \"endAngle\", {\n /**\r\n * @return End angle\r\n */\n get: function get() {\n return this.getPropertyValue(\"endAngle\");\n },\n /**\r\n * End angle of the cursor's radial line.\r\n *\r\n * @param value End angle\r\n */\n set: function set(value) {\n this.setPropertyValue(\"endAngle\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n RadarCursor.prototype.triggerMoveReal = function (point) {\n if (!this.xAxis || this.xAxis && (!this.xAxis.cursorTooltipEnabled || this.xAxis.tooltip.disabled)) {\n this.updateLineX(this.point);\n }\n if (!this.yAxis || this.yAxis && (!this.yAxis.cursorTooltipEnabled || this.yAxis.tooltip.disabled)) {\n this.updateLineY(this.point);\n }\n this.updateSelection();\n _super.prototype.triggerMoveReal.call(this, point);\n };\n /**\r\n * (Re)draws the horizontal (circular) cursor's line.\r\n *\r\n * @param point New target point\r\n */\n RadarCursor.prototype.updateLineX = function (point) {\n var radius = this.pixelRadius;\n var startAngle = this.startAngle;\n var endAngle = this.endAngle;\n var innerRadius = this.pixelInnerRadius;\n if (radius > 0 && $type.isNumber(startAngle) && $type.isNumber(endAngle) && $type.isNumber(innerRadius)) {\n var angle = $math.fitAngleToRange($math.getAngle(point), startAngle, endAngle);\n var path = void 0;\n if (this.lineX && this.lineX.visible) {\n this.lineX.moveTo({\n x: 0,\n y: 0\n });\n // fill\n if (this.xAxis && this.fullWidthLineX) {\n var startPoint = this.xAxis.currentItemStartPoint;\n var endPoint = this.xAxis.currentItemEndPoint;\n if (startPoint && endPoint) {\n var fillStartAngle = $math.fitAngleToRange($math.getAngle(startPoint), startAngle, endAngle);\n var fillEndAngle = $math.fitAngleToRange($math.getAngle(endPoint), startAngle, endAngle);\n var arc = fillEndAngle - fillStartAngle;\n // clockwise\n // this is needed, normalizeAngle doesn't solve it\n if (startAngle < endAngle) {\n if (arc < 0) {\n arc += 360;\n }\n }\n // ccw\n else {\n if (arc > 0) {\n arc -= 360;\n }\n }\n angle -= arc / 2;\n path = $path.moveTo({\n x: innerRadius * $math.cos(angle),\n y: innerRadius * $math.sin(angle)\n }) + $path.lineTo({\n x: radius * $math.cos(angle),\n y: radius * $math.sin(angle)\n }) + $path.arcTo(angle, arc, radius) + $path.lineTo({\n x: innerRadius * $math.cos(angle + arc),\n y: innerRadius * $math.sin(angle + arc)\n }) + $path.arcTo(angle + arc, -arc, innerRadius);\n }\n }\n // line\n if (!path) {\n path = $path.moveTo({\n x: innerRadius * $math.cos(angle),\n y: innerRadius * $math.sin(angle)\n }) + $path.lineTo({\n x: radius * $math.cos(angle),\n y: radius * $math.sin(angle)\n });\n }\n this.lineX.path = path;\n }\n }\n };\n /**\r\n * (Re)draws the vertical (radial) cursor's line.\r\n *\r\n * @param point New target point\r\n */\n RadarCursor.prototype.updateLineY = function (point) {\n if (this.lineY && this.lineY.visible) {\n var startAngle = this.startAngle;\n var endAngle = this.endAngle;\n var truePixelRadius = this.truePixelRadius;\n var radius = $math.fitToRange($math.getDistance(point), 0, this.truePixelRadius);\n if ($type.isNumber(radius) && $type.isNumber(startAngle)) {\n this.lineY.moveTo({\n x: 0,\n y: 0\n });\n var path = void 0;\n var arc = endAngle - startAngle;\n if (this.yAxis && this.fullWidthLineY) {\n // fill\n var startPoint = this.yAxis.currentItemStartPoint;\n var endPoint = this.yAxis.currentItemEndPoint;\n if (startPoint && endPoint) {\n var innerRadius = $math.fitToRange($math.getDistance(startPoint), 0, truePixelRadius);\n radius = $math.fitToRange($math.getDistance(endPoint), 0, truePixelRadius);\n path = $path.moveTo({\n x: radius * $math.cos(startAngle),\n y: radius * $math.sin(startAngle)\n }) + $path.arcTo(startAngle, arc, radius);\n path += $path.moveTo({\n x: innerRadius * $math.cos(endAngle),\n y: innerRadius * $math.sin(endAngle)\n }) + $path.arcTo(endAngle, -arc, innerRadius);\n }\n }\n if (!path) {\n path = $path.moveTo({\n x: radius * $math.cos(startAngle),\n y: radius * $math.sin(startAngle)\n }) + $path.arcTo(startAngle, endAngle - startAngle, radius);\n }\n this.lineY.path = path;\n }\n }\n };\n /**\r\n * Updates selection dimensions on size change.\r\n *\r\n * @ignore Exclude from docs\r\n */\n RadarCursor.prototype.updateSelection = function () {\n if (this._usesSelection) {\n var downPoint = this.downPoint;\n if (downPoint) {\n var point = this.point;\n var radius = this.pixelRadius;\n var truePixelRadius = this.truePixelRadius;\n var innerRadius = this.pixelInnerRadius;\n var startAngle = Math.min(this.startAngle, this.endAngle);\n var endAngle = Math.max(this.startAngle, this.endAngle);\n var downAngle = $math.fitAngleToRange($math.getAngle(downPoint), startAngle, endAngle);\n var angle = $math.fitAngleToRange($math.getAngle(point), startAngle, endAngle);\n var downRadius = $math.getDistance(downPoint);\n if (downRadius < truePixelRadius) {\n var currentRadius = $math.fitToRange($math.getDistance(point), 0, truePixelRadius);\n this._prevAngle = angle;\n var path = $path.moveTo({\n x: 0,\n y: 0\n });\n var downSin = $math.sin(downAngle);\n var downCos = $math.cos(downAngle);\n var sin = $math.sin(angle);\n var cos = $math.cos(angle);\n var behavior = this.behavior;\n if (behavior == \"zoomX\" || behavior == \"selectX\") {\n path += $path.lineTo({\n x: radius * downCos,\n y: radius * downSin\n }) + $path.arcTo(downAngle, angle - downAngle, radius) + $path.lineTo({\n x: innerRadius * cos,\n y: innerRadius * sin\n }) + $path.arcTo(angle, downAngle - angle, innerRadius);\n } else if (behavior == \"zoomY\" || behavior == \"selectY\") {\n path = $path.moveTo({\n x: currentRadius * $math.cos(startAngle),\n y: currentRadius * $math.sin(startAngle)\n }) + $path.arcTo(startAngle, endAngle - startAngle, currentRadius) + $path.lineTo({\n x: downRadius * $math.cos(endAngle),\n y: downRadius * $math.sin(endAngle)\n }) + $path.arcTo(endAngle, startAngle - endAngle, downRadius) + $path.closePath();\n } else if (behavior == \"zoomXY\") {\n path = $path.moveTo({\n x: currentRadius * $math.cos(downAngle),\n y: currentRadius * $math.sin(downAngle)\n }) + $path.arcTo(downAngle, angle - downAngle, currentRadius) + $path.lineTo({\n x: downRadius * $math.cos(angle),\n y: downRadius * $math.sin(angle)\n }) + $path.arcTo(angle, downAngle - angle, downRadius) + $path.closePath();\n }\n this.selection.path = path;\n }\n this.selection.moveTo({\n x: 0,\n y: 0\n });\n }\n }\n };\n /**\r\n * Updates cursors current positions.\r\n */\n RadarCursor.prototype.getPositions = function () {\n // positions are used by axes or series\n var chart = this.chart;\n if (chart) {\n var innerRadius = this.pixelInnerRadius;\n var radius = this.truePixelRadius - innerRadius;\n var startAngle = this.startAngle;\n var endAngle = this.endAngle;\n var angle = $math.fitAngleToRange($math.getAngle(this.point), startAngle, endAngle);\n var xPosition = (angle - startAngle) / (endAngle - startAngle);\n this.xPosition = xPosition;\n this.yPosition = $math.fitToRange(($math.getDistance(this.point) - innerRadius) / radius, 0, 1);\n }\n };\n /**\r\n * Overriding inherited method, so that nothing happens when it's triggered.\r\n *\r\n * @ignore Exclude from docs\r\n */\n RadarCursor.prototype.updatePoint = function (point) {};\n /**\r\n * Updates Cursor's position when axis tooltip changes horizontal position.\r\n *\r\n * @param event Axis event\r\n */\n RadarCursor.prototype.handleXTooltipPosition = function (event) {\n if (this.xAxis.cursorTooltipEnabled) {\n var tooltip = this.xAxis.tooltip;\n this.updateLineX($utils.svgPointToSprite({\n x: tooltip.pixelX,\n y: tooltip.pixelY\n }, this));\n }\n };\n /**\r\n * Updates Cursor's position when axis tooltip changes vertical position.\r\n *\r\n * @todo Description\r\n * @param event Axis event\r\n */\n RadarCursor.prototype.handleYTooltipPosition = function (event) {\n if (this.yAxis.cursorTooltipEnabled) {\n var tooltip = this.yAxis.tooltip;\n this.updateLineY($utils.svgPointToSprite({\n x: tooltip.pixelX,\n y: tooltip.pixelY\n }, this));\n }\n };\n /**\r\n * needs to be overriden\r\n * @ignore\r\n */\n RadarCursor.prototype.updateLinePositions = function (point) {};\n /**\r\n * [getRanges description]\r\n *\r\n * @todo Description\r\n */\n RadarCursor.prototype.getRanges = function () {\n var downPoint = this.downPoint;\n if (downPoint) {\n var upPoint = this.upPoint;\n var chart = this.chart;\n if (chart) {\n var radius = this.pixelRadius;\n var startAngle = this.startAngle;\n var endAngle = this.endAngle;\n var downAngle = $math.fitAngleToRange($math.getAngle(downPoint), this.startAngle, this.endAngle);\n var upAngle = $math.fitAngleToRange($math.getAngle(upPoint), this.startAngle, this.endAngle);\n var downRadius = $math.fitToRange($math.getDistance(downPoint), 0, radius);\n var upRadius = $math.fitToRange($math.getDistance(upPoint), 0, radius);\n var startX = 0;\n var endX = 1;\n var startY = 0;\n var endY = 1;\n var behavior = this.behavior;\n if (behavior == \"zoomX\" || behavior == \"selectX\" || behavior == \"zoomXY\" || behavior == \"selectXY\") {\n var arc = endAngle - startAngle;\n startX = $math.round((downAngle - startAngle) / arc, 5);\n endX = $math.round((upAngle - startAngle) / arc, 5);\n }\n if (behavior == \"zoomY\" || behavior == \"selectY\" || behavior == \"zoomXY\" || behavior == \"selectXY\") {\n startY = $math.round(downRadius / radius, 5);\n endY = $math.round(upRadius / radius, 5);\n }\n this.xRange = {\n start: Math.min(startX, endX),\n end: Math.max(startX, endX)\n };\n this.yRange = {\n start: Math.min(startY, endY),\n end: Math.max(startY, endY)\n };\n if (this.behavior == \"selectX\" || this.behavior == \"selectY\" || this.behavior == \"selectXY\") {\n // void\n } else {\n this.selection.hide();\n }\n }\n }\n };\n /**\r\n * Overriding inherited method, so that nothing happens when `updateSize`\r\n * is triggered.\r\n *\r\n * RadarCursor is quite complicated and needs own sizing logic.\r\n *\r\n * @ignore Exclude from docs\r\n */\n RadarCursor.prototype.updateSize = function () {};\n Object.defineProperty(RadarCursor.prototype, \"radius\", {\n /**\r\n * @return Outer radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"radius\");\n },\n /**\r\n * Outer radius of the cursor's circular line.\r\n * Absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Outer radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"radius\", value, false, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RadarCursor.prototype, \"pixelRadius\", {\n /**\r\n * Outer radius of the circular line in pixels.\r\n *\r\n * @return Outer radius (px)\r\n * @readonly\r\n */\n get: function get() {\n return $utils.relativeRadiusToValue(this.radius, this.truePixelRadius);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RadarCursor.prototype, \"truePixelRadius\", {\n /**\r\n * [truePixelRadius description]\r\n *\r\n * @todo Description\r\n * @return Outer radius (px)\r\n * @readonly\r\n */\n get: function get() {\n return $utils.relativeToValue(percent(100), $math.min(this.innerWidth / 2, this.innerHeight / 2));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RadarCursor.prototype, \"innerRadius\", {\n /**\r\n * @return Inner radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"innerRadius\");\n },\n /**\r\n * Inner radius of the cursor's circular line.\r\n * Absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Inner radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"innerRadius\", value, false, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RadarCursor.prototype, \"pixelInnerRadius\", {\n /**\r\n * Inner radius of the circular line in pixels.\r\n *\r\n * @return Inner radius (px)\r\n * @readonly\r\n */\n get: function get() {\n var innerRadius = this.innerRadius;\n if (innerRadius instanceof Percent) {\n innerRadius = percent(100 * innerRadius.value * this.chart.innerRadiusModifyer);\n }\n return $utils.relativeRadiusToValue(innerRadius, this.truePixelRadius) || 0;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n *\r\n * @ignore Exclude from docs\r\n */\n RadarCursor.prototype.fixPoint = function (point) {\n // overriding xy method\n return point;\n };\n return RadarCursor;\n}(XYCursor);\nexport { RadarCursor };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"RadarCursor\"] = RadarCursor;","import * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { AxisFill } from \"./AxisFill\";\nimport { percent } from \"../../core/utils/Percent\";\nimport { registry } from \"../../core/Registry\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Provides fill element functionality for circular Axes.\r\n *\r\n * @see {@link IAxisFillCircularEvents} for a list of available events\r\n * @see {@link IAxisFillCircularAdapters} for a list of available Adapters\r\n * @todo Needs description\r\n */\nvar AxisFillCircular = /** @class */function (_super) {\n tslib_1.__extends(AxisFillCircular, _super);\n /**\r\n * Constructor.\r\n *\r\n * @param axis Axis\r\n */\n function AxisFillCircular(axis) {\n var _this = _super.call(this, axis) || this;\n _this.className = \"AxisFillCircular\";\n _this.element = _this.paper.add(\"path\");\n _this.radius = percent(100);\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the fill element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisFillCircular.prototype.draw = function () {\n _super.prototype.draw.call(this);\n if (this.axis) {\n var renderer = this.axis.renderer;\n this.fillPath = renderer.getPositionRangePath(this.startPosition, this.endPosition, this.radius, $type.hasValue(this.innerRadius) ? this.innerRadius : renderer.innerRadius, this.cornerRadius);\n this.path = this.fillPath;\n }\n };\n Object.defineProperty(AxisFillCircular.prototype, \"innerRadius\", {\n /**\r\n * @return Inner radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"innerRadius\");\n },\n /**\r\n * Inner radius of the fill. Relative ([[Percent]]) or absolute (pixels).\r\n *\r\n * @param value Inner radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisFillCircular.prototype, \"radius\", {\n /**\r\n * @return Outer radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"radius\");\n },\n /**\r\n * Outer radius of the fill. Relative ([[Percent]]) or absolute (pixels).\r\n *\r\n * @param value Outer radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"radius\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisFillCircular.prototype, \"cornerRadius\", {\n /**\r\n * @return Corner radius (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"cornerRadius\");\n },\n /**\r\n * Corner radius for the fill. In pixels.\r\n *\r\n * @param value Corner radius (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"cornerRadius\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n return AxisFillCircular;\n}(AxisFill);\nexport { AxisFillCircular };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"AxisFillCircular\"] = AxisFillCircular;","/**\r\n * A module defining functionality for circular axis grid elements.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Grid } from \"./Grid\";\nimport { registry } from \"../../core/Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a circular grid element for circular-type axis.\r\n *\r\n * @see {@link IGridCircularEvents} for a list of available events\r\n * @see {@link IGridCircularAdapters} for a list of available Adapters\r\n * @todo Review: container is better, as we'll be able to attach something to the GridCircular, also with 3d charts we might need some additional elements\r\n */\nvar GridCircular = /** @class */function (_super) {\n tslib_1.__extends(GridCircular, _super);\n /**\r\n * Constructor\r\n */\n function GridCircular() {\n var _this = _super.call(this) || this;\n _this.className = \"GridCircular\";\n _this.pixelPerfect = false;\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(GridCircular.prototype, \"innerRadius\", {\n /**\r\n * @return Inner radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"innerRadius\");\n },\n /**\r\n * Inner radius of the circular grid. (absolute or relative)\r\n *\r\n * @param value Inner radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(GridCircular.prototype, \"radius\", {\n /**\r\n * @return Outer radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"radius\");\n },\n /**\r\n * Outer radius of the circular grid. (absolute or relative)\r\n *\r\n * @param value Outer radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"radius\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n return GridCircular;\n}(Grid);\nexport { GridCircular };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"GridCircular\"] = GridCircular;","/**\r\n * Axis Label module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { AxisLabel } from \"./AxisLabel\";\nimport { registry } from \"../../core/Registry\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $path from \"../../core/rendering/Path\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport { Percent } from \"../../core/utils/Percent\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Use to create labels on circular axis.\r\n *\r\n * @see {@link IAxisLabelCircularEvents} for a list of available events\r\n * @see {@link IAxisLabelCircularAdapters} for a list of available Adapters\r\n */\nvar AxisLabelCircular = /** @class */function (_super) {\n tslib_1.__extends(AxisLabelCircular, _super);\n /**\r\n * Constructor\r\n */\n function AxisLabelCircular() {\n var _this = _super.call(this) || this;\n /**\r\n *\r\n * @ignore\r\n */\n _this.fdx = 0;\n /**\r\n *\r\n * @ignore\r\n */\n _this.fdy = 0;\n _this.className = \"AxisLabelCircular\";\n _this.padding(0, 0, 0, 0);\n _this.location = 0.5;\n _this.radius = 0;\n _this.isMeasured = false;\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(AxisLabelCircular.prototype, \"relativeRotation\", {\n /**\r\n * @return Rotation angle\r\n */\n get: function get() {\n return this.getPropertyValue(\"relativeRotation\");\n },\n /**\r\n * Relative rotation of the label.\r\n *\r\n * It is an angle to circle. In case 90, labels will be positioned like rays\r\n * of light, if 0 - positioned along the circle.\r\n *\r\n * @param value Rotation angle\r\n */\n set: function set(value) {\n this.setPropertyValue(\"relativeRotation\", value, true);\n if (!$type.hasValue(value)) {\n this.rotation = undefined;\n var dataItem = this.dataItem;\n if (dataItem && dataItem.component) {\n dataItem.component.invalidateDataItems();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisLabelCircular.prototype, \"radius\", {\n /**\r\n * @return Distance (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"radius\");\n },\n /**\r\n * Distance from axis circle to label in pixels or percent.\r\n *\r\n * @param value Distance (px or percent)\r\n */\n set: function set(value) {\n this.setPercentProperty(\"radius\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisLabelCircular.prototype, \"bent\", {\n /**\r\n * @return {number} Bent?\r\n */\n get: function get() {\n return this.getPropertyValue(\"bent\");\n },\n /**\r\n * Specifies if label should be bent along the circle.\r\n *\r\n * IMPORTANT: Use this with caution, since it is quite CPU-greedy.\r\n *\r\n * @since 4.1.2\r\n * @default false\r\n * @param {boolean} value Bent?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"bent\", value, true);\n this.setPropertyValue(\"wrap\", false);\n this.setPropertyValue(\"horizontalCenter\", \"none\");\n this.setPropertyValue(\"verticalCenter\", \"none\");\n if (value) {\n this.textAlign = \"middle\";\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns label radius in pixels.\r\n */\n AxisLabelCircular.prototype.pixelRadius = function (axisRadius) {\n var sign = 1;\n if (this.inside) {\n sign = -1;\n }\n return $utils.relativeToValue(this.radius, axisRadius) * sign;\n };\n /**\r\n * Returns label horizontal radius in pixels.\r\n */\n AxisLabelCircular.prototype.pixelRadiusY = function (axisRadius, axisRadiusY) {\n var sign = 1;\n if (this.inside) {\n sign = -1;\n }\n var radius = this.radius;\n if ($type.isNumber(radius)) {\n radius *= axisRadiusY / axisRadius;\n return $utils.relativeToValue(radius, axisRadius) * sign;\n } else {\n return $utils.relativeToValue(radius, axisRadiusY) * sign;\n }\n };\n /**\r\n * [fixPosition description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param point Label affixation point\r\n * @param axisRadius Distance from point (px)\r\n */\n AxisLabelCircular.prototype.fixPosition = function (angle, axisRadius, axisRadiusY, dx, dy) {\n if (!$type.isNumber(axisRadiusY)) {\n axisRadiusY = axisRadius;\n }\n if (!$type.isNumber(dx)) {\n dx = 0;\n }\n if (!$type.isNumber(dy)) {\n dy = 0;\n }\n var point = {\n x: axisRadius * $math.cos(angle),\n y: axisRadiusY * $math.sin(angle)\n };\n if (this.invalid) {\n this.validate(); //@todo\" check if we need this\n }\n var isNegative = false;\n var realRadius = this.radius;\n if (realRadius instanceof Percent && realRadius.value < 0) {\n isNegative = true;\n } else if (realRadius < 0) {\n isNegative = true;\n }\n var relativeRotation = this.relativeRotation;\n var labelRadius = this.pixelRadius(axisRadius);\n if (this.bent) {\n var point_1 = {\n x: axisRadius * $math.cos(angle + 180),\n y: axisRadiusY * $math.sin(angle + 180)\n };\n this.path = $path.moveTo(point_1) + $path.arcTo(angle + 180, 360, axisRadius + labelRadius, axisRadiusY + labelRadius * axisRadiusY / axisRadius);\n this.locationOnPath = 0.5;\n return;\n }\n // WHEN ROTATED\n if ($type.isNumber(relativeRotation)) {\n this.horizontalCenter = \"none\";\n this.verticalCenter = \"none\";\n angle = $math.fitAngleToRange(angle, -180, 180);\n var pixelWidth = this.bbox.width;\n var pixelHeight = this.bbox.height;\n var pixelPaddingBottom = this.pixelPaddingBottom;\n var pixelPaddingTop = this.pixelPaddingTop;\n var pixelPaddingLeft = this.pixelPaddingLeft;\n var pixelPaddingRight = this.pixelPaddingRight;\n if (angle > 90 || angle < -90) {\n if (relativeRotation == -90) {\n relativeRotation = 90;\n pixelWidth = 0;\n }\n } else {\n if (relativeRotation == -90) {\n pixelHeight = -pixelHeight;\n }\n if (relativeRotation == 90) {\n relativeRotation = -90;\n pixelWidth = -pixelPaddingLeft - pixelPaddingRight;\n pixelHeight = -pixelHeight - pixelPaddingTop - pixelPaddingBottom;\n }\n }\n this.rotation = relativeRotation + angle + 90;\n var dH = $math.sin(relativeRotation) / 2;\n var dW = $math.cos(relativeRotation) / 2;\n var rotation = this.rotation;\n this.dx = pixelHeight * dH * $math.sin(rotation) - pixelWidth * dW * $math.cos(rotation);\n this.dy = -pixelHeight * dH * $math.cos(rotation) - pixelWidth * dW * $math.sin(rotation);\n if (!this.inside) {\n labelRadius += (pixelHeight + pixelPaddingBottom + pixelPaddingTop) * $math.cos(relativeRotation) + (pixelWidth + pixelPaddingLeft + pixelPaddingRight) * $math.sin(relativeRotation);\n } else {\n if (angle > 90 || angle < -90) {\n labelRadius -= (pixelPaddingBottom + pixelPaddingTop) * $math.cos(relativeRotation) + (pixelPaddingLeft + pixelPaddingRight) * $math.sin(relativeRotation);\n } else {\n labelRadius += (pixelPaddingBottom + this.bbox.height + pixelPaddingTop) * $math.cos(relativeRotation) + (pixelPaddingLeft + pixelPaddingRight + this.bbox.width) * $math.sin(relativeRotation);\n }\n }\n point.x += $math.cos(angle) * labelRadius;\n point.y += $math.sin(angle) * labelRadius * axisRadiusY / axisRadius;\n } else {\n // END OF ROTATED\n this.horizontalCenter = \"middle\";\n this.verticalCenter = \"middle\";\n if (isNegative) {\n this.dx = 0;\n this.dy = 0;\n point.x = (axisRadius + labelRadius) * $math.cos(angle);\n point.y = (axisRadiusY + labelRadius * axisRadiusY / axisRadius) * $math.sin(angle);\n } else {\n // we don't use valign for labels because then they would jump while animating. instead we modify dy depending on a y position\n // this math makes dy to be 1 at the top of the circle, 0.5 at the middle and 1 at the bottom\n // @todo with this math doesn't work well with inside = true\n this.dy = this._measuredHeight / 2 * $math.sin(angle); //(1 - (point.y + axisRadiusY) / (2 * axisRadiusY));\n // simmilar with dx\n this.dx = this._measuredWidth / 2 * $math.cos(angle); //(1 - (point.x + axisRadius) / (2 * axisRadius));\n point.x += $math.cos(angle) * labelRadius;\n point.y += $math.sin(angle) * labelRadius * axisRadiusY / axisRadius;\n }\n }\n point.x += dx;\n point.y += dy;\n this.fdx = this.dx;\n this.fdy = this.dy;\n this.moveTo(point);\n };\n return AxisLabelCircular;\n}(AxisLabel);\nexport { AxisLabelCircular };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"AxisLabelCircular\"] = AxisLabelCircular;","/**\r\n * Module, defining Axis Renderer for circular axes.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { AxisRenderer } from \"./AxisRenderer\";\nimport { AxisFillCircular } from \"./AxisFillCircular\";\nimport { GridCircular } from \"./GridCircular\";\nimport { AxisLabelCircular } from \"./AxisLabelCircular\";\nimport { registry } from \"../../core/Registry\";\nimport { percent } from \"../../core/utils/Percent\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $path from \"../../core/rendering/Path\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A renderer for circular axis.\r\n */\nvar AxisRendererCircular = /** @class */function (_super) {\n tslib_1.__extends(AxisRendererCircular, _super);\n /**\r\n * Constructor.\r\n *\r\n * @param axis Related axis\r\n */\n function AxisRendererCircular() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * @ignore\r\n */\n _this.pixelRadiusReal = 0;\n // axis.layout = \"none\"; // does not trigger redraw when size changes\n _this.layout = \"none\";\n _this.className = \"AxisRendererCircular\";\n _this.isMeasured = false;\n _this.startAngle = -90;\n _this.endAngle = 270;\n _this.useChartAngles = true;\n _this.radius = percent(100);\n _this.isMeasured = false;\n _this.grid.template.location = 0;\n _this.labels.template.location = 0;\n _this.labels.template.radius = 15;\n _this.ticks.template.location = 0;\n _this.ticks.template.pixelPerfect = false;\n _this.tooltipLocation = 0;\n _this.line.strokeOpacity = 0;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * @ignore\r\n */\n AxisRendererCircular.prototype.setAxis = function (axis) {\n var _this = this;\n _super.prototype.setAxis.call(this, axis);\n axis.isMeasured = false;\n // modify x and y so that tooltip would always be on circle\n var tooltip = axis.tooltip;\n tooltip.adapter.add(\"dx\", function (x, target) {\n var point = $utils.svgPointToSprite({\n x: target.pixelX,\n y: target.pixelY\n }, _this);\n return _this.pixelRadius * Math.cos(Math.atan2(point.y, point.x)) - point.x;\n });\n tooltip.adapter.add(\"dy\", function (y, target) {\n var point = $utils.svgPointToSprite({\n x: target.pixelX,\n y: target.pixelY\n }, _this);\n return _this.pixelRadius * Math.sin(Math.atan2(point.y, point.x)) - point.y;\n });\n };\n /**\r\n * Validates Axis renderer.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisRendererCircular.prototype.validate = function () {\n // so that radius would be updated\n if (this.chart && this.chart.invalid) {\n this.chart.validate();\n }\n _super.prototype.validate.call(this);\n };\n Object.defineProperty(AxisRendererCircular.prototype, \"axisLength\", {\n /**\r\n * Returns actual length of the Axis, in pixels.\r\n *\r\n * @return Length (px)\r\n */\n get: function get() {\n return 2 * Math.PI * this.pixelRadius;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRendererCircular.prototype, \"radius\", {\n /**\r\n * @return Outer radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"radius\");\n },\n /**\r\n * Outer radius of the axis.\r\n *\r\n * Can be absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Outer radius\r\n */\n set: function set(value) {\n if (this.setPercentProperty(\"radius\", value, false, false, 10, false)) {\n if (this.axis) {\n this.axis.invalidate();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRendererCircular.prototype, \"pixelRadius\", {\n /**\r\n * Outer radius in pixels.\r\n *\r\n * @return Outer radius (px)\r\n */\n get: function get() {\n return $utils.relativeRadiusToValue(this.radius, this.pixelRadiusReal) || 0;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRendererCircular.prototype, \"innerRadius\", {\n /**\r\n * @return Inner radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"innerRadius\");\n },\n /**\r\n * Inner radius of the axis.\r\n *\r\n * Can be absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Inner radius\r\n */\n set: function set(value) {\n if (this.setPercentProperty(\"innerRadius\", value, false, false, 10, false)) {\n if (this.axis) {\n this.axis.invalidate();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRendererCircular.prototype, \"useChartAngles\", {\n /**\r\n * @return Use chart angles\r\n */\n get: function get() {\n return this.getPropertyValue(\"useChartAngles\");\n },\n /**\r\n * Specifies if axis should use its own `startAngle` and `endAngle` or\r\n * inherit them from relative properties from chart.\r\n *\r\n * @default false\r\n * @param value Use chart's angles\r\n */\n set: function set(value) {\n this.setPropertyValue(\"useChartAngles\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRendererCircular.prototype, \"pixelInnerRadius\", {\n /**\r\n * Inner radius in pixels.\r\n *\r\n * @return Inner radius (px)\r\n */\n get: function get() {\n return $utils.relativeRadiusToValue(this.innerRadius, this.pixelRadiusReal) || 0;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Converts relative position on axis to point coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @return Point\r\n */\n AxisRendererCircular.prototype.positionToPoint = function (position) {\n var coordinate = this.positionToCoordinate(position);\n var angle = this.startAngle + (this.endAngle - this.startAngle) * coordinate / this.axisLength;\n return {\n x: this.pixelRadius * $math.cos(angle),\n y: this.pixelRadius * $math.sin(angle)\n };\n };\n /**\r\n * Converts relative position (0-1) on axis to angle in degrees (0-360).\r\n *\r\n * @param position Position (0-1)\r\n * @return Angle (0-360)\r\n */\n AxisRendererCircular.prototype.positionToAngle = function (position) {\n var axis = this.axis;\n var arc = (this.endAngle - this.startAngle) / (axis.end - axis.start);\n var angle;\n if (axis.renderer.inversed) {\n angle = this.startAngle + (axis.end - position) * arc;\n } else {\n angle = this.startAngle + (position - axis.start) * arc;\n }\n return $math.round(angle, 3);\n };\n /**\r\n * Updates and positions the axis line element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisRendererCircular.prototype.updateAxisLine = function () {\n var radius = this.pixelRadius;\n var startAngle = this.startAngle;\n var endAngle = this.endAngle;\n var arc = endAngle - startAngle;\n this.line.path = $path.moveTo({\n x: radius * $math.cos(startAngle),\n y: radius * $math.sin(startAngle)\n }) + $path.arcTo(startAngle, arc, radius, radius);\n };\n /**\r\n * Updates and positions a grid element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param grid Grid element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\n AxisRendererCircular.prototype.updateGridElement = function (grid, position, endPosition) {\n position = position + (endPosition - position) * grid.location;\n var point = this.positionToPoint(position);\n if (grid.element) {\n var angle = $math.DEGREES * Math.atan2(point.y, point.x);\n var radius = $utils.relativeRadiusToValue($type.hasValue(grid.radius) ? grid.radius : percent(100), this.pixelRadius);\n var gridInnerRadius = $utils.relativeRadiusToValue(grid.innerRadius, this.pixelRadius);\n grid.zIndex = 0;\n var innerRadius = $utils.relativeRadiusToValue($type.isNumber(gridInnerRadius) ? gridInnerRadius : this.innerRadius, this.pixelRadius, true);\n grid.path = $path.moveTo({\n x: innerRadius * $math.cos(angle),\n y: innerRadius * $math.sin(angle)\n }) + $path.lineTo({\n x: radius * $math.cos(angle),\n y: radius * $math.sin(angle)\n });\n }\n this.toggleVisibility(grid, position, 0, 1);\n };\n /**\r\n * Updates and positions a tick element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param tick Tick element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\n AxisRendererCircular.prototype.updateTickElement = function (tick, position, endPosition) {\n position = position + (endPosition - position) * tick.location;\n var point = this.positionToPoint(position);\n if (tick.element) {\n var radius = this.pixelRadius;\n var angle = $math.DEGREES * Math.atan2(point.y, point.x);\n var tickLength = tick.length;\n if (tick.inside) {\n tickLength = -tickLength;\n }\n tick.zIndex = 1;\n tick.path = $path.moveTo({\n x: radius * $math.cos(angle),\n y: radius * $math.sin(angle)\n }) + $path.lineTo({\n x: (radius + tickLength) * $math.cos(angle),\n y: (radius + tickLength) * $math.sin(angle)\n });\n }\n this.toggleVisibility(tick, position, 0, 1);\n };\n /**\r\n * Updates and positions a label element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param label Label element\r\n * @param position Starting position\r\n * @param endPosition Ending position\r\n */\n AxisRendererCircular.prototype.updateLabelElement = function (label, position, endPosition, location) {\n if (!$type.hasValue(location)) {\n location = label.location;\n }\n position = position + (endPosition - position) * location;\n label.fixPosition(this.positionToAngle(position), this.pixelRadius);\n label.zIndex = 2;\n this.toggleVisibility(label, position, this.minLabelPosition, this.maxLabelPosition);\n };\n /**\r\n * Checks if point is within bounds of a container.\r\n *\r\n * @ignore Exclude from docs\r\n * @param point Point coordinates\r\n * @return Fits?\r\n */\n AxisRendererCircular.prototype.fitsToBounds = function (point) {\n return true;\n };\n Object.defineProperty(AxisRendererCircular.prototype, \"startAngle\", {\n /**\r\n * @return Start angle\r\n */\n get: function get() {\n return this.getPropertyValue(\"startAngle\");\n },\n /**\r\n * Start angle of the axis in degrees (0-360).\r\n *\r\n * @param value Start angle\r\n */\n set: function set(value) {\n // do not normalize angel here!\n if (this.setPropertyValue(\"startAngle\", value)) {\n this.invalidateAxisItems();\n if (this.axis) {\n this.axis.invalidateSeries();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRendererCircular.prototype, \"endAngle\", {\n /**\r\n * @return End angle\r\n */\n get: function get() {\n return this.getPropertyValue(\"endAngle\");\n },\n /**\r\n * End angle of the axis in degrees (0-360).\r\n *\r\n * @param value End angle\r\n */\n set: function set(value) {\n // do not normalize angel here!\n if (this.setPropertyValue(\"endAngle\", value)) {\n this.invalidateAxisItems();\n if (this.axis) {\n this.axis.invalidateSeries();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * [getPositionRangePath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param startPosition Starting position\r\n * @param endPosition End position\r\n * @return SVG path\r\n */\n AxisRendererCircular.prototype.getPositionRangePath = function (startPosition, endPosition, radius, innerRadius, cornerRadius) {\n var path = \"\";\n if ($type.isNumber(startPosition) && $type.isNumber(endPosition)) {\n if (!$type.hasValue(radius)) {\n radius = this.radius;\n }\n startPosition = $math.max(startPosition, this.axis.start);\n endPosition = $math.min(endPosition, this.axis.end);\n if (endPosition < startPosition) {\n endPosition = startPosition;\n }\n var pixelRadius = $utils.relativeRadiusToValue(radius, this.pixelRadius);\n var pixelInnerRadius = $utils.relativeRadiusToValue(innerRadius, this.pixelRadius, true);\n var startAngle = this.positionToAngle(startPosition);\n var endAngle = this.positionToAngle(endPosition);\n var arc = endAngle - startAngle;\n path = $path.arc(startAngle, arc, pixelRadius, pixelInnerRadius, pixelRadius, cornerRadius);\n }\n return path;\n };\n /**\r\n * Returns a new grid element, suitable for this Axis Renderer type.\r\n *\r\n * @return Grid element\r\n */\n AxisRendererCircular.prototype.createGrid = function () {\n return new GridCircular();\n };\n /**\r\n * Returns a new fill element, suitable for this Axis Renderer type.\r\n *\r\n * @return Fill element\r\n */\n AxisRendererCircular.prototype.createFill = function (axis) {\n return new AxisFillCircular(axis);\n };\n /**\r\n * Returns a new label element, suitable for this Axis Renderer type.\r\n *\r\n * @return Label element\r\n */\n AxisRendererCircular.prototype.createLabel = function () {\n return new AxisLabelCircular();\n };\n /**\r\n * Converts a point at specific coordinates to a relative position (0-1)\r\n * on the axis.\r\n *\r\n * @param point Point\r\n * @return Position (0-1)\r\n */\n AxisRendererCircular.prototype.pointToPosition = function (point) {\n var angle = $math.fitAngleToRange($math.getAngle(point), this.startAngle, this.endAngle);\n return this.coordinateToPosition((angle - this.startAngle) / 360 * this.axisLength);\n };\n return AxisRendererCircular;\n}(AxisRenderer);\nexport { AxisRendererCircular };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"AxisRendererCircular\"] = AxisRendererCircular;","/**\r\n * Module, defining Axis Renderer for radial axes.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { AxisRendererY } from \"./AxisRendererY\";\nimport { CategoryAxis } from \"./CategoryAxis\";\nimport { WavedCircle } from \"../../core/elements/WavedCircle\";\nimport { MutableValueDisposer } from \"../../core/utils/Disposer\";\nimport { percent } from \"../../core/utils/Percent\";\nimport { registry } from \"../../core/Registry\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $path from \"../../core/rendering/Path\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A renderer for radial axis.\r\n */\nvar AxisRendererRadial = /** @class */function (_super) {\n tslib_1.__extends(AxisRendererRadial, _super);\n /**\r\n * Constructor.\r\n *\r\n * @param axis Related axis\r\n */\n function AxisRendererRadial() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * A related chart.\r\n */\n _this._chart = new MutableValueDisposer();\n /**\r\n * @ignore\r\n */\n _this.pixelRadiusReal = 0;\n _this.className = \"AxisRendererRadial\";\n _this.isMeasured = false;\n _this.startAngle = -90;\n _this.endAngle = 270;\n _this.minGridDistance = 30;\n _this.gridType = \"circles\";\n _this.axisAngle = -90;\n _this.isMeasured = false;\n _this.layout = \"none\";\n _this.radius = percent(100);\n _this.line.strokeOpacity = 0;\n _this.labels.template.horizontalCenter = \"middle\";\n _this._disposers.push(_this._chart);\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Validates Axis renderer.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisRendererRadial.prototype.validate = function () {\n // so that radius would be updated\n if (this.chart && this.chart.invalid) {\n this.chart.validate();\n }\n _super.prototype.validate.call(this);\n };\n Object.defineProperty(AxisRendererRadial.prototype, \"axisLength\", {\n /**\r\n * Returns actual length of the Axis, in pixels.\r\n *\r\n * @return Length (px)\r\n */\n get: function get() {\n return this.pixelRadius - this.pixelInnerRadius;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRendererRadial.prototype, \"radius\", {\n /**\r\n * @return Outer radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"radius\");\n },\n /**\r\n * Outer radius of the axis.\r\n *\r\n * Can be absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Outer radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"radius\", value, false, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRendererRadial.prototype, \"pixelRadius\", {\n /**\r\n * Outer radius in pixels.\r\n *\r\n * @return Outer radius (px)\r\n */\n get: function get() {\n return $utils.relativeRadiusToValue(this.radius, this.pixelRadiusReal) || 0;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRendererRadial.prototype, \"innerRadius\", {\n /**\r\n * @return Inner radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"innerRadius\");\n },\n /**\r\n * Inner radius of the axis.\r\n *\r\n * Can be absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Outer radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"innerRadius\", value, false, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRendererRadial.prototype, \"pixelInnerRadius\", {\n /**\r\n * Inner radius in pixels.\r\n *\r\n * @return Inner radius (px)\r\n */\n get: function get() {\n return $utils.relativeRadiusToValue(this.innerRadius, this.pixelRadiusReal) || 0;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRendererRadial.prototype, \"chart\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Chart\r\n */\n get: function get() {\n return this._chart.get();\n },\n /**\r\n * Chart, associated with the Axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Chart\r\n */\n set: function set(chart) {\n this._chart.set(chart, null);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Converts relative position on axis to point coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @return Point\r\n */\n AxisRendererRadial.prototype.positionToPoint = function (position) {\n var radius = $math.fitToRange(this.positionToCoordinate(position), 0, Infinity);\n return {\n x: radius * $math.cos(this.axisAngle),\n y: radius * $math.sin(this.axisAngle)\n };\n };\n /**\r\n * Updates and positions the axis line element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisRendererRadial.prototype.updateAxisLine = function () {\n this.line.path = $path.moveTo({\n x: this.pixelInnerRadius * $math.cos(this.axisAngle),\n y: this.pixelInnerRadius * $math.sin(this.axisAngle)\n }) + $path.lineTo({\n x: this.pixelRadius * $math.cos(this.axisAngle),\n y: this.pixelRadius * $math.sin(this.axisAngle)\n });\n var title = this.axis.title;\n title.valign = \"none\";\n title.horizontalCenter = \"middle\";\n title.verticalCenter = \"bottom\";\n title.y = -this.axisLength / 2;\n var rotation = 90;\n if (this.opposite) {\n if (!this.inside) {\n rotation = -90;\n }\n } else {\n if (this.inside) {\n rotation = -90;\n }\n }\n title.rotation = rotation;\n };\n /**\r\n * Updates and positions a grid element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param grid Grid element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\n AxisRendererRadial.prototype.updateGridElement = function (grid, position, endPosition) {\n position = position + (endPosition - position) * grid.location;\n var point = this.positionToPoint(position);\n var path;\n var radius = $math.getDistance(point);\n var startAngle = this.startAngle;\n var endAngle = this.endAngle;\n if ($type.isNumber(radius) && grid.element) {\n var chart = this.chart;\n var xAxis = chart.xAxes.getIndex(0);\n var count = chart.dataItems.length;\n var series = chart.series.getIndex(0);\n // polygons are only possible if x axis is present\n // @todo: review this\n if (this.gridType == \"polygons\" && count > 0 && series && xAxis && xAxis instanceof CategoryAxis) {\n var gridLocation = xAxis.renderer.grid.template.location;\n var angle = xAxis.getAngle(series.dataItems.getIndex(0), \"categoryX\", gridLocation);\n path = $path.moveTo({\n x: radius * $math.cos(angle),\n y: radius * $math.sin(angle)\n });\n var count_1 = chart.dataItems.length;\n for (var i = 1; i < count_1; i++) {\n angle = xAxis.getAngle(series.dataItems.getIndex(i), \"categoryX\", gridLocation);\n path += $path.lineTo({\n x: radius * $math.cos(angle),\n y: radius * $math.sin(angle)\n });\n }\n angle = xAxis.getAngle(series.dataItems.getIndex(count_1 - 1), \"categoryX\", xAxis.renderer.cellEndLocation);\n path += $path.lineTo({\n x: radius * $math.cos(angle),\n y: radius * $math.sin(angle)\n });\n } else {\n path = $path.moveTo({\n x: radius * $math.cos(startAngle),\n y: radius * $math.sin(startAngle)\n }) + $path.arcTo(startAngle, endAngle - startAngle, radius, radius);\n }\n grid.path = path;\n }\n this.toggleVisibility(grid, position, 0, 1);\n };\n /**\r\n * Updates and positions a label element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param label Label element\r\n * @param position Starting position\r\n * @param endPosition Ending position\r\n */\n AxisRendererRadial.prototype.updateLabelElement = function (label, position, endPosition, location) {\n if (!$type.hasValue(location)) {\n location = label.location;\n }\n position = position + (endPosition - position) * location;\n var point = this.positionToPoint(position);\n this.positionItem(label, point);\n this.toggleVisibility(label, position, this.minLabelPosition, this.maxLabelPosition);\n };\n /**\r\n * Updates and positions the base grid element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisRendererRadial.prototype.updateBaseGridElement = function () {\n // @todo? zero grid for radar chart, is it needed?\n };\n /**\r\n * Checks if point is within bounds of a container.\r\n *\r\n * @ignore Exclude from docs\r\n * @param point Point coordinates\r\n * @return Fits?\r\n */\n AxisRendererRadial.prototype.fitsToBounds = function (point) {\n return true;\n };\n Object.defineProperty(AxisRendererRadial.prototype, \"startAngle\", {\n /**\r\n * @return Start angle\r\n */\n get: function get() {\n return this.getPropertyValue(\"startAngle\");\n },\n /**\r\n * Start angle of the axis in degrees. (0-360)\r\n *\r\n * @param value Start angle\r\n */\n set: function set(value) {\n // do not normalize angle here!\n if (this.setPropertyValue(\"startAngle\", value)) {\n this.invalidateAxisItems();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRendererRadial.prototype, \"endAngle\", {\n /**\r\n * @return End angle\r\n */\n get: function get() {\n return this.getPropertyValue(\"endAngle\");\n },\n /**\r\n * End angle of the axis in degrees. (0-360)\r\n *\r\n * @param value End angle\r\n */\n set: function set(value) {\n // do not normalize angel here!\n if (this.setPropertyValue(\"endAngle\", value)) {\n this.invalidateAxisItems();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRendererRadial.prototype, \"axisAngle\", {\n /**\r\n * @return Axis angle\r\n */\n get: function get() {\n return this.getPropertyValue(\"axisAngle\");\n //return $math.fitToRange(this.getPropertyValue(\"axisAngle\"), this.startAngle, this.endAngle); // no good, as less flexible\n },\n /**\r\n * Angle of the radial axis in degrees. (0-360)\r\n *\r\n * @param value Axis angle\r\n */\n set: function set(value) {\n this.setPropertyValue(\"axisAngle\", $math.normalizeAngle(value));\n this.invalidateAxisItems();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AxisRendererRadial.prototype, \"gridType\", {\n /**\r\n * Grid type\r\n */\n get: function get() {\n var axis = this.chart.xAxes.getIndex(0);\n if (axis instanceof CategoryAxis) {\n return this.getPropertyValue(\"gridType\");\n } else {\n return \"circles\";\n }\n },\n // polygons grid type is only possible under these conditions: xAxis is available and it is CategoryAxis, also at least one series should be added to a chart\n /**\r\n * Grid type for radial axis.\r\n *\r\n * A grid on radia axis can either be perfect circles (\"circles\"), or\r\n * straight lines (\"polygons\").\r\n *\r\n * @default \"circles\"\r\n * @param value Grid type\r\n */\n set: function set(value) {\n this.setPropertyValue(\"gridType\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * [getPositionRangePath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param startPosition Starting position\r\n * @param endPosition End position\r\n * @return SVG path\r\n */\n AxisRendererRadial.prototype.getPositionRangePath = function (startPosition, endPosition) {\n var pixelInnerRadius = this.pixelInnerRadius;\n var pixelRadius = this.axisLength + pixelInnerRadius;\n var innerRadius = $math.fitToRange(this.positionToCoordinate(startPosition), pixelInnerRadius, pixelRadius);\n var radius = $math.fitToRange(this.positionToCoordinate(endPosition), pixelInnerRadius, pixelRadius);\n //let angleCount: number = this.angleCount;\n var startAngle = this.startAngle;\n var endAngle = this.endAngle;\n var arc = endAngle - startAngle;\n var path;\n var chart = this.chart;\n var xAxis = chart.xAxes.getIndex(0);\n var count = chart.dataItems.length;\n var series = chart.series.getIndex(0);\n // polygons are only possible if x axis is present\n // @todo: review this\n if (this.gridType == \"polygons\" && count > 0 && series && xAxis && xAxis instanceof CategoryAxis) {\n var gridLocation = xAxis.renderer.grid.template.location;\n var angle = xAxis.getAngle(series.dataItems.getIndex(0), \"categoryX\", gridLocation);\n path = $path.moveTo({\n x: radius * $math.cos(angle),\n y: radius * $math.sin(angle)\n });\n var count_2 = chart.dataItems.length;\n for (var i = 1; i < count_2; i++) {\n angle = xAxis.getAngle(series.dataItems.getIndex(i), \"categoryX\", gridLocation);\n path += $path.lineTo({\n x: radius * $math.cos(angle),\n y: radius * $math.sin(angle)\n });\n }\n angle = xAxis.getAngle(series.dataItems.getIndex(count_2 - 1), \"categoryX\", xAxis.renderer.cellEndLocation);\n path += $path.lineTo({\n x: radius * $math.cos(angle),\n y: radius * $math.sin(angle)\n });\n path += $path.moveTo({\n x: innerRadius * $math.cos(angle),\n y: innerRadius * $math.sin(angle)\n });\n for (var i = count_2 - 1; i >= 0; i--) {\n angle = xAxis.getAngle(series.dataItems.getIndex(i), \"categoryX\", gridLocation);\n path += $path.lineTo({\n x: innerRadius * $math.cos(angle),\n y: innerRadius * $math.sin(angle)\n });\n }\n } else {\n path = $path.arc(startAngle, arc, radius, innerRadius);\n }\n return path;\n };\n /**\r\n * Updates and positions an axis break element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axisBreak Break element\r\n */\n AxisRendererRadial.prototype.updateBreakElement = function (axisBreak) {\n // @todo: someday we might need axis break when gridType is polygons\n var startLine = axisBreak.startLine;\n var endLine = axisBreak.endLine;\n var fillShape = axisBreak.fillShape;\n var startPoint = axisBreak.startPoint;\n var endPoint = axisBreak.endPoint;\n startLine.radius = Math.abs(startPoint.y);\n endLine.radius = Math.abs(endPoint.y);\n fillShape.radius = Math.abs(endPoint.y);\n fillShape.innerRadius = Math.abs(startPoint.y);\n };\n /**\r\n * Creates visual elements for and axis break.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axisBreak Axis break\r\n */\n AxisRendererRadial.prototype.createBreakSprites = function (axisBreak) {\n axisBreak.startLine = new WavedCircle();\n axisBreak.endLine = new WavedCircle();\n axisBreak.fillShape = new WavedCircle();\n };\n /**\r\n * Updates some of the Axis tooltip's visual properties, related to\r\n * rendering of the Axis.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\n AxisRendererRadial.prototype.updateTooltip = function () {\n var axis = this.axis;\n if (axis) {\n var bigNum = 4000;\n var bbx = -4000;\n var bby = -4000;\n var bbw = bigNum * 2;\n var bbh = bigNum * 2;\n var axisAngle = this.axisAngle;\n if (axisAngle < 0) {\n axisAngle += 360;\n }\n var tooltipOrientation = \"vertical\";\n if (axisAngle > 45 && axisAngle < 135 || axisAngle > 225 && axisAngle < 315) {\n tooltipOrientation = \"horizontal\";\n }\n this.axis.updateTooltip(tooltipOrientation, {\n x: bbx,\n y: bby,\n width: bbw,\n height: bbh\n });\n }\n };\n /**\r\n * Updates and positions a tick element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param tick Tick element\r\n * @param position Position\r\n */\n AxisRendererRadial.prototype.updateTickElement = function (tick, position) {\n var point = this.positionToPoint(position);\n if (tick.element) {\n var angle = $math.normalizeAngle(this.axisAngle + 90);\n if (angle / 90 != Math.round(angle / 90)) {\n tick.pixelPerfect = false;\n } else {\n tick.pixelPerfect = true;\n }\n var tickLength = -tick.length;\n if (tick.inside) {\n tickLength *= -1;\n }\n tick.path = $path.moveTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: tickLength * $math.cos(angle),\n y: tickLength * $math.sin(angle)\n });\n }\n this.positionItem(tick, point);\n this.toggleVisibility(tick, position, 0, 1);\n };\n /**\r\n * Converts a position on the axis to a coordinate in pixels.\r\n *\r\n * @ignore Exclude from docs\r\n * @param position Position (0-1)\r\n * @return Coordinate (px)\r\n */\n AxisRendererRadial.prototype.positionToCoordinate = function (position) {\n var coordinate;\n var axis = this.axis;\n var axisFullLength = axis.axisFullLength;\n var innerRadius = this.pixelInnerRadius;\n if (axis.renderer.inversed) {\n coordinate = (axis.end - position) * axisFullLength + innerRadius;\n } else {\n coordinate = (position - axis.start) * axisFullLength + innerRadius;\n }\n return $math.round(coordinate, 1);\n };\n /**\r\n * Converts a point at specific coordinates to a relative position (0-1)\r\n * on the axis.\r\n *\r\n * @param point Point\r\n * @return Position (0-1)\r\n */\n AxisRendererRadial.prototype.pointToPosition = function (point) {\n var coordinate = $math.getDistance(point) - this.pixelInnerRadius;\n return this.coordinateToPosition(coordinate);\n };\n return AxisRendererRadial;\n}(AxisRendererY);\nexport { AxisRendererRadial };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"AxisRendererRadial\"] = AxisRendererRadial;","/**\r\n * Radar chart module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { XYChart, XYChartDataItem } from \"./XYChart\";\nimport { percent, Percent } from \"../../core/utils/Percent\";\nimport { RadarSeries } from \"../series/RadarSeries\";\nimport { Container } from \"../../core/Container\";\nimport { Circle } from \"../../core/elements/Circle\";\nimport { registry } from \"../../core/Registry\";\nimport { RadarCursor } from \"../cursors/RadarCursor\";\nimport { AxisRendererCircular } from \"../axes/AxisRendererCircular\";\nimport { AxisRendererRadial } from \"../axes/AxisRendererRadial\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $path from \"../../core/rendering/Path\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[RadarChart]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar RadarChartDataItem = /** @class */function (_super) {\n tslib_1.__extends(RadarChartDataItem, _super);\n /**\r\n * Constructor\r\n */\n function RadarChartDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"RadarChartDataItem\";\n _this.applyTheme();\n return _this;\n }\n return RadarChartDataItem;\n}(XYChartDataItem);\nexport { RadarChartDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a Radar chart.\r\n *\r\n * @see {@link IRadarChartEvents} for a list of available Events\r\n * @see {@link IRadarChartAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/radar-chart/} for documentation\r\n * @important\r\n */\nvar RadarChart = /** @class */function (_super) {\n tslib_1.__extends(RadarChart, _super);\n /**\r\n * Constructor\r\n */\n function RadarChart() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * Defines X axis renderer type.\r\n */\n _this._axisRendererX = AxisRendererCircular;\n /**\r\n * Defines Y axis renderer type.\r\n */\n _this._axisRendererY = AxisRendererRadial;\n /**\r\n * used by cursor. We adjust innerradius if start and end angle are close to each other\r\n * @ignore Exclude from docs\r\n */\n _this.innerRadiusModifyer = 1;\n _this.className = \"RadarChart\";\n _this.startAngle = -90;\n _this.endAngle = 270;\n _this.radius = percent(80);\n _this.innerRadius = 0;\n var radarContainer = _this.plotContainer.createChild(Container);\n radarContainer.shouldClone = false;\n radarContainer.layout = \"absolute\";\n radarContainer.align = \"center\";\n radarContainer.valign = \"middle\";\n _this.seriesContainer.parent = radarContainer;\n _this.radarContainer = radarContainer;\n _this.bulletsContainer.parent = radarContainer;\n _this._cursorContainer = radarContainer;\n _this._bulletMask = radarContainer.createChild(Circle);\n _this._bulletMask.shouldClone = false;\n _this._bulletMask.element = _this.paper.add(\"path\");\n _this._bulletMask.opacity = 0;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n RadarChart.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n // Add a default screen reader title for accessibility\n // This will be overridden in screen reader if there are any `titles` set\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Radar chart\");\n }\n };\n /**\r\n * Decorates Axis with required properties for this chart.\r\n *\r\n * @param axis Axis\r\n */\n RadarChart.prototype.processAxis = function (axis) {\n _super.prototype.processAxis.call(this, axis);\n var renderer = axis.renderer;\n renderer.gridContainer.parent = renderer;\n renderer.breakContainer.parent = renderer;\n axis.parent = this.radarContainer;\n renderer.toBack();\n };\n /**\r\n * Updates all X axes after range change event.\r\n */\n RadarChart.prototype.handleXAxisRangeChange = function () {\n _super.prototype.handleXAxisRangeChange.call(this);\n $iter.each(this.yAxes.iterator(), function (axis) {\n axis.invalidate();\n });\n };\n /**\r\n * Updates all Y axes after range change event.\r\n */\n RadarChart.prototype.handleYAxisRangeChange = function () {\n _super.prototype.handleYAxisRangeChange.call(this);\n $iter.each(this.xAxes.iterator(), function (axis) {\n axis.invalidate();\n });\n };\n /**\r\n * Creates and returns a new Cursor, of type suitable for RadarChart.\r\n *\r\n * @return Cursor\r\n */\n RadarChart.prototype.createCursor = function () {\n return new RadarCursor();\n };\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n RadarChart.prototype.processConfig = function (config) {\n if (config) {\n // Set up cursor\n if ($type.hasValue(config.cursor) && !$type.hasValue(config.cursor.type)) {\n config.cursor.type = \"RadarCursor\";\n }\n // Set up series\n if ($type.hasValue(config.series) && $type.isArray(config.series)) {\n for (var i = 0, len = config.series.length; i < len; i++) {\n config.series[i].type = config.series[i].type || \"RadarSeries\";\n }\n }\n // Set up axes\n /*if ($type.hasValue(config.xAxes) && $type.isArray(config.xAxes)) {\r\n for (let i = 0, len = config.xAxes.length; i < len; i++) {\r\n config.xAxes[i].type = config.xAxes[i].type || \"AxisRendererCircular\";\r\n }\r\n }\r\n if ($type.hasValue(config.yAxes) && $type.isArray(config.yAxes)) {\r\n for (let i = 0, len = config.yAxes.length; i < len; i++) {\r\n config.yAxes[i].type = config.yAxes[i].type || \"AxisRendererRadial\";\r\n }\r\n }*/\n }\n _super.prototype.processConfig.call(this, config);\n };\n /**\r\n * Does calculations before drawing the chart.\r\n */\n RadarChart.prototype.beforeDraw = function () {\n _super.prototype.beforeDraw.call(this);\n var plotContainer = this.plotContainer;\n var rect = $math.getArcRect(this.startAngle, this.endAngle, 1);\n var innerRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n var wr = plotContainer.innerWidth / rect.width;\n var hr = plotContainer.innerHeight / rect.height;\n var innerRadius = this.innerRadius;\n if (innerRadius instanceof Percent) {\n var value = innerRadius.value;\n var mr = Math.min(wr, hr);\n value = Math.max(mr * value, mr - Math.min(plotContainer.innerHeight, plotContainer.innerWidth)) / mr;\n innerRect = $math.getArcRect(this.startAngle, this.endAngle, value);\n this.innerRadiusModifyer = value / innerRadius.value;\n innerRadius = percent(value * 100);\n }\n // @todo handle this when innerRadius set in pixels (do it for pie also)\n rect = $math.getCommonRectangle([rect, innerRect]);\n var maxRadius = Math.min(plotContainer.innerWidth / rect.width, plotContainer.innerHeight / rect.height);\n var diameter = $utils.relativeRadiusToValue(this.radius, maxRadius) * 2 || 0;\n var radius = diameter / 2;\n var startAngle = this.startAngle;\n var endAngle = this.endAngle;\n this._pixelInnerRadius = $utils.relativeRadiusToValue(innerRadius, radius);\n this._bulletMask.path = $path.arc(startAngle, endAngle - startAngle, radius, this._pixelInnerRadius);\n $iter.each(this.xAxes.iterator(), function (axis) {\n if (axis.renderer.useChartAngles) {\n axis.renderer.startAngle = startAngle;\n axis.renderer.endAngle = endAngle;\n }\n axis.width = diameter;\n axis.height = diameter;\n //axis.renderer.width = diameter;\n //axis.renderer.height = diameter;\n axis.renderer.pixelRadiusReal = radius;\n axis.renderer.innerRadius = innerRadius;\n });\n $iter.each(this.yAxes.iterator(), function (axis) {\n axis.renderer.startAngle = startAngle;\n axis.renderer.endAngle = endAngle;\n axis.width = diameter;\n axis.height = diameter;\n //axis.renderer.width = diameter;\n //axis.renderer.height = diameter;\n axis.renderer.pixelRadiusReal = radius;\n axis.renderer.innerRadius = innerRadius;\n });\n var cursor = this.cursor;\n if (cursor) {\n cursor.width = diameter;\n cursor.height = diameter;\n cursor.startAngle = startAngle;\n cursor.endAngle = endAngle;\n }\n this.radarContainer.definedBBox = {\n x: radius * rect.x,\n y: radius * rect.y,\n width: radius * rect.width,\n height: radius * rect.height\n };\n this.radarContainer.validatePosition();\n };\n /**\r\n * Creates and returns a new Series, suitable for RadarChart.\r\n *\r\n * @return New Series\r\n */\n RadarChart.prototype.createSeries = function () {\n return new RadarSeries();\n };\n Object.defineProperty(RadarChart.prototype, \"startAngle\", {\n /**\r\n * @return Start angle (degrees)\r\n */\n get: function get() {\n return this.getPropertyValue(\"startAngle\");\n },\n /**\r\n * Starting angle of the Radar face. (degrees)\r\n *\r\n * Normally, a circular radar face begins (the radial axis is drawn) at the\r\n * top center. (at -90 degrees)\r\n *\r\n * You can use `startAngle` to change this setting.\r\n *\r\n * E.g. setting this to 0 will make the radial axis start horizontally to\r\n * the right, as opposed to vertical.\r\n *\r\n * For a perfect circle the absolute sum of `startAngle` and `endAngle`\r\n * needs to be 360.\r\n *\r\n * However, it's **not** necessary to do so. You can set those to lesser\r\n * numbers, to create semi-circles.\r\n *\r\n * E.g. `startAngle = -90` with `endAngle = 0` will create a radar face that\r\n * looks like a quarter of a circle.\r\n *\r\n * @default -90\r\n * @param value Start angle (degrees)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"startAngle\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RadarChart.prototype, \"endAngle\", {\n /**\r\n * @return End angle (degrees)\r\n */\n get: function get() {\n return this.getPropertyValue(\"endAngle\");\n },\n /**\r\n * Starting angle of the Radar face. (degrees)\r\n *\r\n * Normally, a circular radar face ends (the radial axis is drawn) exactly\r\n * where it has started, forming a full 360 circle. (at 270 degrees)\r\n *\r\n * You can use `endAngle` to end the circle somewhere else.\r\n *\r\n * E.g. setting this to 180 will make the radar face end at horizontal line\r\n * to the left off the center.\r\n *\r\n * For a perfect circle the absolute sum of `startAngle` and `endAngle`\r\n * needs to be 360.\r\n *\r\n * However, it's **not** necessary to do so. You can set those to lesser\r\n * numbers, to create semi-circles.\r\n *\r\n * E.g. `startAngle = -90` with `endAngle = 0` will create a radar face that\r\n * looks like a quarter of a circle.\r\n *\r\n * @default -90\r\n * @param value End angle (degrees)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"endAngle\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RadarChart.prototype, \"radius\", {\n /**\r\n * @return Outer radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"radius\");\n },\n /**\r\n * Outer radius of the Radar face.\r\n *\r\n * This can either be in absolute pixel value, or relative [[Percent]].\r\n *\r\n * @param value Outer radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"radius\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RadarChart.prototype, \"pixelInnerRadius\", {\n /**\r\n * @return Inner radius in pixels\r\n */\n get: function get() {\n return this._pixelInnerRadius;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RadarChart.prototype, \"innerRadius\", {\n /**\r\n * @return Inner radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"innerRadius\");\n },\n /**\r\n * Inner radius of the radar face.\r\n *\r\n * This can either be in absolute pixel value, or relative [[Percent]].\r\n *\r\n * If set in Percent, it will be relative to `radius`. (outer radius)\r\n *\r\n * @param value Inner radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Triggers (re)rendering of the horizontal (X) axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axis Axis\r\n */\n RadarChart.prototype.updateXAxis = function (renderer) {\n //do not call super!\n if (renderer) {\n renderer.processRenderer();\n }\n };\n /**\r\n * Triggers (re)rendering of the vertical (Y) axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param axis Axis\r\n */\n RadarChart.prototype.updateYAxis = function (renderer) {\n // do not call super!\n if (renderer) {\n renderer.processRenderer();\n }\n };\n return RadarChart;\n}(XYChart);\nexport { RadarChart };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"RadarChart\"] = RadarChart;","/**\r\n * Functionality for drawing simple ClockHands\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../../core/Container\";\nimport { Circle } from \"../../core/elements/Circle\";\nimport { Trapezoid } from \"../../core/elements/Trapezoid\";\nimport { MutableValueDisposer, MultiDisposer } from \"../../core/utils/Disposer\";\nimport { percent } from \"../../core/utils/Percent\";\nimport { registry } from \"../../core/Registry\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * ClockHand class is capable of drawing a simple pointy shape with optionally\r\n * rounderd corners and an icon.\r\n *\r\n * @see {@link IClockHandEvents} for a list of available events\r\n * @see {@link IClockHandAdapters} for a list of available Adapters\r\n * @todo Improve\r\n * @important\r\n */\nvar ClockHand = /** @class */function (_super) {\n tslib_1.__extends(ClockHand, _super);\n /**\r\n * Constructor\r\n */\n function ClockHand() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * An Axis hand is related to.\r\n */\n _this._axis = new MutableValueDisposer();\n _this.className = \"ClockHand\";\n var interfaceColors = new InterfaceColorSet();\n _this.fill = interfaceColors.getFor(\"alternativeBackground\");\n _this.stroke = _this.fill;\n var pin = new Circle();\n pin.radius = 5;\n _this.pin = pin;\n _this.isMeasured = false;\n _this.startWidth = 5;\n _this.endWidth = 1;\n _this.width = percent(100);\n _this.height = percent(100);\n _this.radius = percent(100);\n _this.innerRadius = percent(0);\n var hand = new Trapezoid();\n _this.hand = hand;\n _this._disposers.push(_this._axis);\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Re(validates) the clock hand, effectively redrawing it.\r\n *\r\n * @ignore Exclude from docs\r\n */\n ClockHand.prototype.validate = function () {\n _super.prototype.validate.call(this);\n var hand = this.hand;\n hand.width = this.pixelWidth;\n var h = Math.max(this.startWidth, this.endWidth);\n hand.height = h;\n hand.leftSide = percent(this.startWidth / h * 100);\n hand.rightSide = percent(this.endWidth / h * 100);\n if (this.axis) {\n var renderer = this.axis.renderer;\n var x0 = $utils.relativeRadiusToValue(this.innerRadius, renderer.pixelRadius);\n var x1 = $utils.relativeRadiusToValue(this.radius, renderer.pixelRadius);\n hand.x = x0;\n hand.y = -h / 2;\n hand.width = x1 - x0;\n }\n };\n Object.defineProperty(ClockHand.prototype, \"pin\", {\n /**\r\n * @return Pin element\r\n */\n get: function get() {\n return this._pin;\n },\n /**\r\n * A circle element used as hand's base. (pin)\r\n *\r\n * @param pin Pin element\r\n */\n set: function set(pin) {\n if (this._pin) {\n this.removeDispose(this._pin);\n }\n if (pin) {\n this._pin = pin;\n pin.parent = this;\n this._disposers.push(pin);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ClockHand.prototype, \"hand\", {\n /**\r\n * @return Hand element\r\n */\n get: function get() {\n return this._hand;\n },\n /**\r\n * A trapezoid shape used for hand itself.\r\n *\r\n * The shape of the trapezoid is controlled by ClockHand's `startWidth` and\r\n * `endWidth` properties.\r\n *\r\n * Set `endWidth` to 1 (px) to make it pointy.\r\n *\r\n * @param hand Hand element\r\n */\n set: function set(hand) {\n if (this._hand) {\n this.removeDispose(this._hand);\n }\n if (hand) {\n this._hand = hand;\n hand.parent = this;\n this._disposers.push(hand);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ClockHand.prototype, \"radius\", {\n /**\r\n * @return Radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"radius\");\n },\n /**\r\n * Radius of the hand's outer end. (tip)\r\n *\r\n * Absolute (px) or relative ([[Percent]]).\r\n *\r\n * @default Percent(0)\r\n * @param value Radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"radius\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ClockHand.prototype, \"innerRadius\", {\n /**\r\n * @return Radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"innerRadius\");\n },\n /**\r\n * Radius of the hand's inner end. (base)\r\n *\r\n * Absolute (px) or relative ([[Percent]]).\r\n *\r\n * @default Percent(0)\r\n * @param value Radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ClockHand.prototype, \"startWidth\", {\n /**\r\n * @return Width (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"startWidth\");\n },\n /**\r\n * Width, in pixels, of the clock hand's inner end. (base)\r\n *\r\n * @default 5\r\n * @param value Width (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"startWidth\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ClockHand.prototype, \"endWidth\", {\n /**\r\n * @return Width (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"endWidth\");\n },\n /**\r\n * Width, in pixels, of the clock hand's outer end. (tip)\r\n *\r\n * @default 1\r\n * @param value Width (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"endWidth\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ClockHand.prototype, \"rotationDirection\", {\n /**\r\n * @return rotationDirection\r\n */\n get: function get() {\n return this.getPropertyValue(\"rotationDirection\");\n },\n /**\r\n * Rotation direction\r\n *\r\n * @default any\r\n * @param value\r\n */\n set: function set(value) {\n this.setPropertyValue(\"rotationDirection\", value);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Moves clock hand to particular value.\r\n *\r\n * If `duration` is set to a number in milliseconds, the hand will move\r\n * to the new position gracefully, rather than jumping rigth to it.\r\n *\r\n * Alternatively, you can also set `value` directly.\r\n *\r\n * @param value New value\r\n * @param duration Animation duration (ms)\r\n * @param easing Animation easing function\r\n */\n ClockHand.prototype.showValue = function (value, duration, easing) {\n this._value = value;\n if (value != undefined) {\n if (!$type.isNumber(duration)) {\n duration = 0;\n }\n if (this.axis) {\n var renderer = this.axis.renderer;\n var newAngle = renderer.positionToAngle(this.axis.anyToPosition(value));\n var currentAngle = this.rotation;\n if (this.rotationDirection == \"clockWise\") {\n if (newAngle < currentAngle) {\n this.rotation = currentAngle - 360;\n }\n }\n if (this.rotationDirection == \"counterClockWise\") {\n if (newAngle > currentAngle) {\n this.rotation = currentAngle + 360;\n }\n }\n this.animate({\n property: \"rotation\",\n to: newAngle\n }, duration, easing);\n }\n }\n };\n Object.defineProperty(ClockHand.prototype, \"value\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this._value;\n },\n /**\r\n * A current value clock hand is pointing to.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.showValue(value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ClockHand.prototype, \"axis\", {\n /**\r\n * @return Axis\r\n */\n get: function get() {\n return this._axis.get();\n },\n /**\r\n * An Axis clock hand is associated with.\r\n *\r\n * Hand's `value` relates to values on the Axis.\r\n *\r\n * @param axis Axis\r\n */\n set: function set(axis) {\n if (this.axis != axis) {\n this._axis.set(axis, new MultiDisposer([axis.events.on(\"datavalidated\", this.updateValue, this, false), axis.events.on(\"datarangechanged\", this.updateValue, this, false), axis.events.on(\"dataitemsvalidated\", this.updateValue, this, false), axis.events.on(\"propertychanged\", this.invalidate, this, false)]));\n }\n if (axis) {\n var chart = axis.chart;\n if (chart) {\n this.rotation = chart.startAngle;\n }\n }\n this.parent = axis.renderer;\n this.zIndex = 5;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Triggers `value` accessor, so that Hand animates to new position, in case\r\n * value has changed.\r\n *\r\n * @ignore Exclude from docs\r\n */\n ClockHand.prototype.updateValue = function () {\n this.value = this.value;\n };\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n ClockHand.prototype.processConfig = function (config) {\n if (config) {\n // Connect clock hands with axes\n if ($type.hasValue(config.axis) && $type.isString(config.axis) && this.map.hasKey(config.axis)) {\n config.axis = this.map.getKey(config.axis);\n }\n }\n _super.prototype.processConfig.call(this, config);\n };\n return ClockHand;\n}(Container);\nexport { ClockHand };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"ClockHand\"] = ClockHand;","/**\r\n * Module for building Gauge charts.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { RadarChart, RadarChartDataItem } from \"./RadarChart\";\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\nimport { ClockHand } from \"../elements/ClockHand\";\nimport { registry } from \"../../core/Registry\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[GaugeChart]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar GaugeChartDataItem = /** @class */function (_super) {\n tslib_1.__extends(GaugeChartDataItem, _super);\n /**\r\n * Constructor\r\n */\n function GaugeChartDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"GaugeChartDataItem\";\n _this.applyTheme();\n return _this;\n }\n return GaugeChartDataItem;\n}(RadarChartDataItem);\nexport { GaugeChartDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a Gauge chart.\r\n *\r\n * @see {@link IGaugeChartEvents} for a list of available Events\r\n * @see {@link IGaugeChartAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/gauge-chart/} for documentation\r\n * @important\r\n */\nvar GaugeChart = /** @class */function (_super) {\n tslib_1.__extends(GaugeChart, _super);\n /**\r\n * Constructor\r\n */\n function GaugeChart() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"GaugeChart\";\n _this.startAngle = 180;\n _this.endAngle = 360;\n _this.hands = new ListTemplate(new ClockHand());\n _this.hands.events.on(\"inserted\", _this.processHand, _this, false);\n _this._disposers.push(new ListDisposer(_this.hands));\n _this._disposers.push(_this.hands.template);\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n GaugeChart.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n // Add a default screen reader title for accessibility\n // This will be overridden in screen reader if there are any `titles` set\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Gauge chart\");\n }\n };\n /**\r\n * Decorates a [[ClockHand]] when it is added to the chart.\r\n *\r\n * @param event Event\r\n */\n GaugeChart.prototype.processHand = function (event) {\n var hand = event.newValue;\n if (!hand.axis) {\n hand.axis = this.xAxes.getIndex(0);\n }\n };\n return GaugeChart;\n}(RadarChart);\nexport { GaugeChart };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"GaugeChart\"] = GaugeChart;","/**\r\n * Defines Percent Chart Series.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Series, SeriesDataItem } from \"./Series\";\nimport { Sprite } from \"../../core/Sprite\";\nimport { Label } from \"../../core/elements/Label\";\nimport { Tick } from \"../elements/Tick\";\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\nimport { Container } from \"../../core/Container\";\nimport { ColorSet } from \"../../core/utils/ColorSet\";\nimport { registry } from \"../../core/Registry\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $ease from \"../../core/utils/Ease\";\nimport { Disposer } from \"../../core/utils/Disposer\";\nimport { defaultRules, ResponsiveBreakpoints } from \"../../core/utils/Responsive\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n//@todo: sequenced?\n/**\r\n * Defines a [[DataItem]] for [[PercentSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar PercentSeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(PercentSeriesDataItem, _super);\n /**\r\n * Constructor\r\n */\n function PercentSeriesDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"PercentSeriesDataItem\";\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Adds an `id` attribute the the slice element and returns its id.\r\n *\r\n * @ignore Exclude from docs\r\n */\n PercentSeriesDataItem.prototype.uidAttr = function () {\n return this.slice.uidAttr();\n };\n /**\r\n * Hide the data item (and corresponding visual elements).\r\n *\r\n * @param duration Duration (ms)\r\n * @param delay Delay hiding (ms)\r\n * @param toValue Target value for animation\r\n * @param fields Fields to animate while hiding\r\n */\n PercentSeriesDataItem.prototype.hide = function (duration, delay, toValue, fields) {\n if (!fields) {\n fields = [\"value\"];\n }\n return _super.prototype.hide.call(this, duration, delay, 0, fields);\n };\n /**\r\n * Sets visibility of the Data Item.\r\n *\r\n * @param value Data Item\r\n */\n PercentSeriesDataItem.prototype.setVisibility = function (value, noChangeValues) {\n if (!noChangeValues) {\n if (value) {\n this.setWorkingValue(\"value\", this.values[\"value\"].value, 0, 0);\n } else {\n this.setWorkingValue(\"value\", 0, 0, 0);\n }\n }\n _super.prototype.setVisibility.call(this, value, noChangeValues);\n };\n /**\r\n * Show hidden data item (and corresponding cisual elements).\r\n *\r\n * @param duration Duration (ms)\r\n * @param delay Delay hiding (ms)\r\n * @param fields Fields to animate while hiding\r\n */\n PercentSeriesDataItem.prototype.show = function (duration, delay, fields) {\n if (!fields) {\n fields = [\"value\"];\n }\n return _super.prototype.show.call(this, duration, delay, fields);\n };\n Object.defineProperty(PercentSeriesDataItem.prototype, \"category\", {\n /**\r\n * @return Category\r\n */\n get: function get() {\n return this.properties.category;\n },\n /**\r\n * Category.\r\n *\r\n * @param value Category\r\n */\n set: function set(value) {\n this.setProperty(\"category\", value);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates a marker used in the legend for this slice.\r\n *\r\n * @ignore Exclude from docs\r\n * @param marker Marker container\r\n */\n PercentSeriesDataItem.prototype.createLegendMarker = function (marker) {\n this.component.createLegendMarker(marker, this);\n };\n Object.defineProperty(PercentSeriesDataItem.prototype, \"legendDataItem\", {\n /**\r\n * @return Legend data item\r\n */\n get: function get() {\n return this._legendDataItem;\n },\n /**\r\n * A legend's data item, that corresponds to this data item.\r\n *\r\n * @param value Legend data item\r\n */\n set: function set(value) {\n this._legendDataItem = value;\n if (value.label) {\n value.label.dataItem = this;\n }\n if (value.valueLabel) {\n value.valueLabel.dataItem = this;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PercentSeriesDataItem.prototype, \"tick\", {\n /**\r\n * A Tick element, related to this data item. (slice)\r\n *\r\n * @readonly\r\n * @return Tick element\r\n */\n get: function get() {\n var _this = this;\n if (!this._tick) {\n var tick_1 = this.component.ticks.create();\n this._tick = tick_1;\n this._disposers.push(tick_1);\n tick_1.parent = this.component.ticksContainer;\n this._disposers.push(new Disposer(function () {\n if (_this.component) {\n _this.component.ticks.removeValue(tick_1);\n }\n }));\n this.addSprite(tick_1);\n tick_1.visible = this.visible;\n }\n return this._tick;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PercentSeriesDataItem.prototype, \"label\", {\n /**\r\n * A Label element, related to this data item. (slice)\r\n *\r\n * @readonly\r\n * @return Label element\r\n */\n get: function get() {\n var _this = this;\n if (!this._label) {\n var label_1 = this.component.labels.create();\n this._label = label_1;\n this._disposers.push(label_1);\n label_1.parent = this.component.labelsContainer;\n this._disposers.push(new Disposer(function () {\n if (_this.component) {\n _this.component.labels.removeValue(label_1);\n }\n }));\n this.addSprite(label_1);\n label_1.visible = this.visible;\n }\n return this._label;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PercentSeriesDataItem.prototype, \"slice\", {\n /**\r\n * An element, related to this data item. (slice)\r\n *\r\n * @readonly\r\n * @return Slice element\r\n */\n get: function get() {\n var _this = this;\n if (!this._slice) {\n var component_1 = this.component;\n var slice_1 = component_1.slices.create();\n this._slice = slice_1;\n this._disposers.push(slice_1);\n slice_1.parent = component_1.slicesContainer;\n this._disposers.push(new Disposer(function () {\n component_1.slices.removeValue(slice_1);\n }));\n this.addSprite(slice_1);\n slice_1.visible = this.visible;\n // Apply accessibility\n if (component_1.itemsFocusable()) {\n slice_1.role = \"menuitem\";\n slice_1.focusable = true;\n } else {\n slice_1.role = \"listitem\";\n slice_1.focusable = false;\n }\n // Apply screen reader label\n if (slice_1.focusable) {\n slice_1.events.once(\"focus\", function (ev) {\n slice_1.readerTitle = component_1.populateString(component_1.itemReaderText, _this);\n }, undefined, false);\n slice_1.events.once(\"blur\", function (ev) {\n slice_1.readerTitle = \"\";\n }, undefined, false);\n }\n if (slice_1.hoverable) {\n slice_1.events.once(\"over\", function (ev) {\n slice_1.readerTitle = component_1.populateString(component_1.itemReaderText, _this);\n }, undefined, false);\n slice_1.events.once(\"out\", function (ev) {\n slice_1.readerTitle = \"\";\n }, undefined, false);\n }\n }\n return this._slice;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PercentSeriesDataItem.prototype, \"hiddenInLegend\", {\n /**\r\n * @return Disabled in legend?\r\n */\n get: function get() {\n return this.properties.hiddenInLegend;\n },\n /**\r\n * Should dataItem (slice) be hidden in legend?\r\n *\r\n * @param value Visible in legend?\r\n */\n set: function set(value) {\n this.setProperty(\"hiddenInLegend\", value);\n },\n enumerable: true,\n configurable: true\n });\n return PercentSeriesDataItem;\n}(SeriesDataItem);\nexport { PercentSeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines [[PercentSeries]] which is a base class for [[PieSeries]],\r\n * [[FunnelSeries]], and [[PyramidSeries]].\r\n *\r\n * @see {@link IPercentSeriesEvents} for a list of available Events\r\n * @see {@link IPercentSeriesAdapters} for a list of available Adapters\r\n */\nvar PercentSeries = /** @class */function (_super) {\n tslib_1.__extends(PercentSeries, _super);\n /**\r\n * Constructor\r\n */\n function PercentSeries() {\n var _this = _super.call(this) || this;\n _this.className = \"PercentSeries\";\n _this._addAllDataItems = false;\n _this.colors = new ColorSet();\n _this.colors.step = 1;\n _this.isMeasured = true;\n _this.calculatePercent = true;\n var slicesContainer = _this.createChild(Container);\n slicesContainer.shouldClone = false;\n slicesContainer.isMeasured = false;\n _this.slicesContainer = slicesContainer;\n var ticksContainer = _this.createChild(Container);\n ticksContainer.shouldClone = false;\n ticksContainer.isMeasured = false;\n ticksContainer.layout = \"none\";\n _this.ticksContainer = ticksContainer;\n var labelsContainer = _this.createChild(Container);\n labelsContainer.shouldClone = false;\n labelsContainer.isMeasured = false;\n labelsContainer.layout = \"none\";\n _this.labelsContainer = labelsContainer;\n _this.alignLabels = false;\n _this.bulletsContainer.toFront();\n // Make all slices focusable\n _this.skipFocusThreshold = 50;\n var defaultState = _this.defaultState;\n defaultState.transitionEasing = $ease.sinOut;\n // Accessibility\n _this.itemReaderText = \"{category}: {value.percent.formatNumber('#.#')}%\";\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Creates a slice element.\r\n *\r\n * @return Slice\r\n */\n PercentSeries.prototype.createSlice = function () {\n return new Sprite();\n };\n /**\r\n * Creates a tick element.\r\n *\r\n * @return Tick\r\n */\n PercentSeries.prototype.createTick = function () {\n return new Tick();\n };\n /**\r\n * Sreates label element.\r\n *\r\n * @return label\r\n */\n PercentSeries.prototype.createLabel = function () {\n return new Label();\n };\n Object.defineProperty(PercentSeries.prototype, \"slices\", {\n get: function get() {\n if (!this._slices) {\n var slice = this.createSlice();\n slice.applyOnClones = true;\n this._disposers.push(slice);\n this.initSlice(slice);\n this._slices = new ListTemplate(slice);\n this._disposers.push(new ListDisposer(this._slices));\n }\n return this._slices;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PercentSeries.prototype, \"ticks\", {\n get: function get() {\n if (!this._ticks) {\n var tick = this.createTick();\n tick.applyOnClones = true;\n this._disposers.push(tick);\n this.initTick(tick);\n this._ticks = new ListTemplate(tick);\n this._disposers.push(new ListDisposer(this._ticks));\n }\n return this._ticks;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PercentSeries.prototype, \"labels\", {\n get: function get() {\n if (!this._labels) {\n var label = this.createLabel();\n label.applyOnClones = true;\n this._disposers.push(label);\n this.initLabel(label);\n this._labels = new ListTemplate(label);\n this._disposers.push(new ListDisposer(this._labels));\n }\n return this._labels;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n PercentSeries.prototype.createDataItem = function () {\n return new PercentSeriesDataItem();\n };\n /**\r\n * Creates and returns a new slice element.\r\n *\r\n * @param sliceType Type of the slice element\r\n * @return Slice\r\n */\n PercentSeries.prototype.initSlice = function (slice) {};\n PercentSeries.prototype.initLabel = function (label) {\n label.text = \"{category}: {value.percent.formatNumber('#.0')}%\";\n label.isMeasured = false;\n label.padding(5, 5, 5, 5);\n };\n PercentSeries.prototype.initTick = function (label) {};\n /**\r\n * Validates (processes) data items.\r\n *\r\n * @ignore Exclude from docs\r\n */\n PercentSeries.prototype.validateDataItems = function () {\n this.colors.reset();\n _super.prototype.validateDataItems.call(this);\n };\n /**\r\n * Validates data item's element, effectively redrawing it.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n PercentSeries.prototype.validateDataElement = function (dataItem) {\n var slice = dataItem.slice;\n if (slice) {\n if (slice.fill == undefined) {\n slice.fill = this.colors.next();\n }\n if (slice.stroke == undefined) {\n slice.stroke = slice.fill;\n }\n }\n // do this at the end, otherwise bullets won't be positioned properly\n _super.prototype.validateDataElement.call(this, dataItem);\n if (slice) {\n dataItem.bullets.each(function (key, bullet) {\n if (bullet.fill == undefined) {\n bullet.fill = slice.fill;\n }\n if (bullet.stroke == undefined) {\n bullet.stroke = slice.stroke;\n }\n });\n }\n this.updateLegendValue(dataItem);\n };\n /**\r\n * Validates (processes) data.\r\n *\r\n * @ignore Exclude from docs\r\n */\n PercentSeries.prototype.validateData = function () {\n _super.prototype.validateData.call(this);\n if (this.chart) {\n this.chart.feedLegend();\n }\n };\n /**\r\n * Arranges slice labels according to position settings.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItems Data items\r\n */\n PercentSeries.prototype.arrangeLabels = function (dataItems) {\n for (var i = 0, len = dataItems.length; i < len; i++) {\n var dataItem = dataItems[i];\n var label = dataItem.label;\n if (label) {\n var nextLabel = this.getNextLabel(i + 1, dataItems);\n if (label.invalid) {\n label.validate();\n }\n var bottom = label.pixelY + label.measuredHeight;\n if (nextLabel) {\n if (nextLabel.y < bottom) {\n nextLabel.y = bottom;\n }\n }\n }\n }\n };\n PercentSeries.prototype.arrangeLabels2 = function (dataItems) {\n var previousTop = this.maxHeight / 2;\n for (var i = dataItems.length - 1; i >= 0; i--) {\n var dataItem = dataItems[i];\n var label = dataItem.label;\n if (label) {\n if (label.pixelY + label.measuredHeight > previousTop) {\n label.y = previousTop - label.measuredHeight;\n previousTop = label.y;\n }\n }\n }\n };\n /**\r\n * Returns the next label according to `index`.\r\n *\r\n * @param index Current index\r\n * @param dataItems Data items\r\n * @return Label element\r\n */\n PercentSeries.prototype.getNextLabel = function (index, dataItems) {\n if (dataItems.length >= index) {\n var nextDataItem = dataItems[index];\n if (nextDataItem) {\n if (nextDataItem.label) {\n return nextDataItem.label;\n } else {\n return this.getNextLabel(index + 1, dataItems);\n }\n }\n }\n };\n Object.defineProperty(PercentSeries.prototype, \"colors\", {\n /**\r\n * @return Color set\r\n */\n get: function get() {\n return this.getPropertyValue(\"colors\");\n },\n /**\r\n * A color set to be used for slices.\r\n *\r\n * For each new subsequent slice, the chart will assign the next color in\r\n * this set.\r\n *\r\n * @param value Color set\r\n */\n set: function set(value) {\n this.setPropertyValue(\"colors\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Binds related legend data item's visual settings to this series' visual\r\n * settings.\r\n *\r\n * @ignore Exclude from docs\r\n * @param marker Container\r\n * @param dataItem Data item\r\n */\n PercentSeries.prototype.createLegendMarker = function (marker, dataItem) {\n $iter.each(marker.children.iterator(), function (child) {\n var slice = dataItem.slice;\n child.defaultState.properties.fill = slice.fill;\n child.defaultState.properties.stroke = slice.stroke;\n child.defaultState.properties.fillOpacity = slice.fillOpacity;\n child.defaultState.properties.strokeOpacity = slice.strokeOpacity;\n child.fill = slice.fill;\n child.stroke = slice.stroke;\n child.fillOpacity = slice.fillOpacity;\n child.strokeOpacity = slice.strokeOpacity;\n if (child.fill == undefined) {\n child.__disabled = true;\n }\n var legendDataItem = marker.dataItem;\n legendDataItem.color = slice.fill;\n legendDataItem.colorOrig = slice.fill;\n child.addDisposer(slice.events.on(\"propertychanged\", function (ev) {\n if (ev.property == \"fill\") {\n child.__disabled = false;\n if (!child.isActive) {\n child.fill = slice.fill;\n }\n child.defaultState.properties.fill = slice.fill;\n legendDataItem.color = slice.fill;\n legendDataItem.colorOrig = slice.fill;\n }\n if (ev.property == \"stroke\") {\n if (!child.isActive) {\n child.stroke = slice.stroke;\n }\n child.defaultState.properties.stroke = slice.stroke;\n }\n }, undefined, false));\n });\n };\n /**\r\n * Repositions bullets when slice's size changes.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\n PercentSeries.prototype.handleSliceScale = function (event) {\n var _this = this;\n var slice = event.target;\n var dataItem = slice.dataItem;\n $iter.each(dataItem.bullets.iterator(), function (a) {\n var value = a[1];\n _this.positionBullet(value);\n });\n };\n /**\r\n * Repositions bullet and labels when slice moves.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\n PercentSeries.prototype.handleSliceMove = function (event) {};\n /**\r\n * Copies all properties from another instance of [[PercentSeries]].\r\n *\r\n * @param source Source series\r\n */\n PercentSeries.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.slices.template.copyFrom(source.slices.template);\n this.labels.template.copyFrom(source.labels.template);\n this.ticks.template.copyFrom(source.ticks.template);\n };\n Object.defineProperty(PercentSeries.prototype, \"alignLabels\", {\n /**\r\n * @return Align labels?\r\n */\n get: function get() {\n return this.getPropertyValue(\"alignLabels\");\n },\n /**\r\n * Align labels into nice vertical columns?\r\n *\r\n * This will ensure that labels never overlap with each other.\r\n *\r\n * Arranging labels into columns makes them more readble, and better user\r\n * experience.\r\n *\r\n * If set to `false` labels will be positioned at `label.radius` distance,\r\n * and may, in some cases, overlap.\r\n *\r\n * @default true\r\n * @param value Align labels?\r\n */\n set: function set(value) {\n this.setAlignLabels(value);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n */\n PercentSeries.prototype.setAlignLabels = function (value) {\n this.setPropertyValue(\"alignLabels\", value, true);\n };\n /**\r\n * Updates corresponding legend data item with current values.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n PercentSeries.prototype.updateLegendValue = function (dataItem) {\n if (dataItem) {\n var legendDataItem = dataItem.legendDataItem;\n var legendSettings = dataItem.legendSettings;\n if (legendDataItem && legendSettings) {\n if (legendSettings) {\n if (legendSettings.labelText) {\n legendDataItem.label.text = legendSettings.labelText;\n }\n if (legendSettings.itemLabelText) {\n legendDataItem.label.text = legendSettings.itemLabelText;\n }\n if (legendSettings.valueText) {\n legendDataItem.valueLabel.text = legendSettings.valueText;\n }\n if (legendSettings.itemValueText) {\n legendDataItem.valueLabel.text = legendSettings.itemValueText;\n }\n }\n }\n }\n };\n return PercentSeries;\n}(Series);\nexport { PercentSeries };\n/**\r\n * bboxter class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"PercentSeries\"] = PercentSeries;\nregistry.registeredClasses[\"PercentSeriesDataItem\"] = PercentSeriesDataItem;\n/**\r\n * Add default responsive rules\r\n */\n/**\r\n * Disable labels and ticks.\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.maybeXS,\n state: function state(target, stateId) {\n if (target instanceof PercentSeries) {\n var state = target.states.create(stateId);\n var labelState = target.labels.template.states.create(stateId);\n labelState.properties.disabled = true;\n var tickState = target.ticks.template.states.create(stateId);\n tickState.properties.disabled = true;\n return state;\n }\n return null;\n }\n});","/**\r\n * Percent chart module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { SerialChart, SerialChartDataItem } from \"./SerialChart\";\nimport { PercentSeries } from \"../series/PercentSeries\";\nimport { registry } from \"../../core/Registry\";\nimport * as $iter from \"../../core/utils/Iterator\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[PercentChart]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar PercentChartDataItem = /** @class */function (_super) {\n tslib_1.__extends(PercentChartDataItem, _super);\n /**\r\n * Constructor\r\n */\n function PercentChartDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"PercentChartDataItem\";\n _this.applyTheme();\n return _this;\n }\n return PercentChartDataItem;\n}(SerialChartDataItem);\nexport { PercentChartDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * This is a base class for \"percent-based\" chart types like Pie and Funnel.\r\n *\r\n * @see {@link IPercentChartEvents} for a list of available Events\r\n * @see {@link IPercentChartAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/pie-chart/} for Pie chart documentation\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/sliced-chart/} for Sliced chart documentation\r\n */\nvar PercentChart = /** @class */function (_super) {\n tslib_1.__extends(PercentChart, _super);\n /**\r\n * Constructor\r\n */\n function PercentChart() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"PercentChart\";\n _this.align = \"none\";\n _this.valign = \"none\";\n // so that the chart is always drawn, even the legend wants all the space\n _this.chartContainer.minHeight = 50;\n _this.chartContainer.minWidth = 50;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * (Re)validates chart data.\r\n *\r\n * @ignore Exclude from docs\r\n */\n PercentChart.prototype.validateData = function () {\n _super.prototype.validateData.call(this);\n this.feedLegend();\n };\n /**\r\n * Setups the legend to use the chart's data.\r\n * @ignore\r\n */\n PercentChart.prototype.feedLegend = function () {\n var legend = this.legend;\n if (legend) {\n var legendData_1 = [];\n $iter.each(this.series.iterator(), function (series) {\n if (!series.hiddenInLegend) {\n $iter.each(series.dataItems.iterator(), function (dataItem) {\n if (!dataItem.hiddenInLegend) {\n legendData_1.push(dataItem);\n if (!dataItem.legendSettings) {\n dataItem.legendSettings = series.legendSettings;\n }\n }\n });\n }\n });\n legend.data = legendData_1;\n legend.dataFields.name = \"category\";\n }\n };\n /**\r\n * Creates a new [[PercentSeries]].\r\n *\r\n * @return New series\r\n */\n PercentChart.prototype.createSeries = function () {\n return new PercentSeries();\n };\n /**\r\n * @ignore\r\n */\n PercentChart.prototype.setLegend = function (legend) {\n _super.prototype.setLegend.call(this, legend);\n if (legend) {\n legend.labels.template.text = \"{category}\";\n legend.valueLabels.template.text = \"{value.percent.formatNumber('#.0')}%\";\n legend.itemContainers.template.events.on(\"over\", function (event) {\n var PercentSeriesDataItem = event.target.dataItem.dataContext;\n if (PercentSeriesDataItem.visible && !PercentSeriesDataItem.isHiding) {\n PercentSeriesDataItem.slice.isHover = true;\n }\n });\n legend.itemContainers.template.events.on(\"out\", function (event) {\n var PercentSeriesDataItem = event.target.dataItem.dataContext;\n PercentSeriesDataItem.slice.isHover = false;\n });\n }\n };\n return PercentChart;\n}(SerialChart);\nexport { PercentChart };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @hidden\r\n */\nregistry.registeredClasses[\"PercentChart\"] = PercentChart;\nregistry.registeredClasses[\"PercentChartDataItem\"] = PercentChartDataItem;","/**\r\n * Pie tick module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Tick } from \"../elements/Tick\";\nimport { MutableValueDisposer, MultiDisposer } from \"../../core/utils/Disposer\";\nimport { registry } from \"../../core/Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws an tick line for a pie slice connecting it to a related label.\r\n *\r\n * @see {@link IPieTickEvents} for a list of available events\r\n * @see {@link IPieTickAdapters} for a list of available Adapters\r\n */\nvar PieTick = /** @class */function (_super) {\n tslib_1.__extends(PieTick, _super);\n /**\r\n * Constructor\r\n */\n function PieTick() {\n var _this = _super.call(this) || this;\n /**\r\n * A label element this tick is attached to.\r\n */\n _this._label = new MutableValueDisposer();\n /**\r\n * A slice element this tick is attached to.\r\n */\n _this._slice = new MutableValueDisposer();\n _this.className = \"PieTick\";\n _this.element = _this.paper.add(\"polyline\");\n _this._disposers.push(_this._label);\n _this._disposers.push(_this._slice);\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the tick element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n PieTick.prototype.draw = function () {\n _super.prototype.draw.call(this);\n var slice = this.slice;\n var label = this.label;\n var series = slice.dataItem.component;\n if (slice && slice.radius > 0 && label && label.text) {\n var x0 = slice.dx + slice.slice.dx + slice.pixelX + slice.ix * slice.radius * slice.scale;\n var y0 = slice.dy + slice.slice.dy + slice.pixelY + slice.iy * slice.radiusY * slice.scale;\n var x1 = void 0;\n var y1 = void 0;\n var x2 = void 0;\n var y2 = void 0;\n if (series.alignLabels) {\n x1 = label.pixelX - this.length;\n y1 = label.pixelY;\n x2 = label.pixelX;\n y2 = y1;\n if (label.horizontalCenter == \"right\") {\n x1 += 2 * this.length;\n x2 = x1 - this.length;\n }\n } else {\n var r = label.pixelRadius(slice.radius);\n x1 = x0 + r * slice.ix;\n y1 = y0 + r * slice.iy;\n x2 = x1;\n y2 = y1;\n }\n this.element.attr({\n \"points\": [x0, y0, x1, y1, x2, y2]\n });\n }\n };\n Object.defineProperty(PieTick.prototype, \"slice\", {\n /**\r\n * @return Slice\r\n */\n get: function get() {\n return this._slice.get();\n },\n /**\r\n * Slice element tick is attached to.\r\n *\r\n * @param slice Slice\r\n */\n set: function set(slice) {\n this._slice.set(slice, new MultiDisposer([slice.events.on(\"transformed\", this.invalidate, this), slice.events.on(\"validated\", this.invalidate, this)]));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PieTick.prototype, \"label\", {\n /**\r\n * @return Label\r\n */\n get: function get() {\n return this._label.get();\n },\n /**\r\n * Label element tick is attached to.\r\n *\r\n * @param label Label\r\n */\n set: function set(label) {\n this._label.set(label, label.events.on(\"transformed\", this.invalidate, this, false));\n },\n enumerable: true,\n configurable: true\n });\n return PieTick;\n}(Tick);\nexport { PieTick };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"PieTick\"] = PieTick;","/**\r\n * Defines Pie Chart Series.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { PercentSeries, PercentSeriesDataItem } from \"./PercentSeries\";\nimport { Slice } from \"../../core/elements/Slice\";\n//import { Slice3D } from \"../../core/elements/3D/Slice3D\";\nimport { AxisLabelCircular } from \"../axes/AxisLabelCircular\";\nimport { PieTick } from \"../elements/PieTick\";\nimport { registry } from \"../../core/Registry\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $type from \"../../core/utils/Type\";\nimport { Percent, percent } from \"../../core/utils/Percent\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n//@todo: sequenced?\n/**\r\n * Defines a [[DataItem]] for [[PieSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar PieSeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(PieSeriesDataItem, _super);\n /**\r\n * Constructor\r\n */\n function PieSeriesDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"PieSeriesDataItem\";\n _this.values.radiusValue = {};\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(PieSeriesDataItem.prototype, \"radiusValue\", {\n /**\r\n * @return Radius\r\n */\n get: function get() {\n return this.values.radiusValue.value;\n },\n /**\r\n * Slice's radius, if other than default.\r\n *\r\n * @param value Radius\r\n */\n set: function set(value) {\n this.setValue(\"radiusValue\", value);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Hide the data item (and corresponding visual elements).\r\n *\r\n * @param duration Duration (ms)\r\n * @param delay Delay hiding (ms)\r\n * @param toValue Target value for animation\r\n * @param fields Fields to animate while hiding\r\n */\n PieSeriesDataItem.prototype.hide = function (duration, delay, toValue, fields) {\n return _super.prototype.hide.call(this, duration, delay, 0, [\"value\", \"radiusValue\"]);\n };\n /**\r\n * Show hidden data item (and corresponding cisual elements).\r\n *\r\n * @param duration Duration (ms)\r\n * @param delay Delay hiding (ms)\r\n * @param fields Fields to animate while hiding\r\n */\n PieSeriesDataItem.prototype.show = function (duration, delay, fields) {\n return _super.prototype.show.call(this, duration, delay, [\"value\", \"radiusValue\"]);\n };\n return PieSeriesDataItem;\n}(PercentSeriesDataItem);\nexport { PieSeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines [[Series]] for a slice series on a Pie chart.\r\n *\r\n * @see {@link IPieSeriesEvents} for a list of available Events\r\n * @see {@link IPieSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\nvar PieSeries = /** @class */function (_super) {\n tslib_1.__extends(PieSeries, _super);\n /**\r\n * Constructor\r\n */\n function PieSeries() {\n var _this = _super.call(this) || this;\n _this.className = \"PieSeries\";\n _this.alignLabels = true;\n _this.startAngle = -90;\n _this.endAngle = 270;\n _this.layout = \"none\";\n _this.labels.template.radius = percent(5);\n _this.addDisposer(_this.labels.template.events.on(\"enabled\", _this.invalidate, _this, false));\n _this.applyTheme();\n return _this;\n }\n /**\r\n * creates slice\r\n */\n PieSeries.prototype.createSlice = function () {\n return new Slice();\n };\n /**\r\n * creates tick\r\n */\n PieSeries.prototype.createTick = function () {\n return new PieTick();\n };\n /**\r\n * creates label\r\n */\n PieSeries.prototype.createLabel = function () {\n return new AxisLabelCircular();\n };\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n PieSeries.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Pie Slice Series\");\n }\n };\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n PieSeries.prototype.createDataItem = function () {\n return new PieSeriesDataItem();\n };\n /**\r\n * Inits slice.\r\n *\r\n * @param slice to init\r\n */\n PieSeries.prototype.initSlice = function (slice) {\n slice.isMeasured = false;\n slice.defaultState.properties.scale = 1;\n slice.observe(\"scale\", this.handleSliceScale, this);\n slice.observe([\"dx\", \"dy\", \"x\", \"y\", \"shiftRadius\"], this.handleSliceMove, this);\n slice.tooltipText = \"{category}: {value.percent.formatNumber('#.#')}% ({value.value})\";\n var hoverState = slice.states.create(\"hover\");\n hoverState.properties.scale = 1.05;\n var defaultState = slice.defaultState;\n defaultState.properties.shiftRadius = 0;\n slice.togglable = true;\n slice.events.on(\"toggled\", function (event) {\n event.target.hideTooltip();\n });\n var activeState = slice.states.create(\"active\");\n activeState.properties.shiftRadius = 0.10;\n };\n /**\r\n * (Re)validates the whole series, effectively causing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\n PieSeries.prototype.validate = function () {\n this._leftItems = [];\n this._rightItems = [];\n this._currentStartAngle = this.startAngle;\n this._arcRect = $math.getArcRect(this.startAngle, this.endAngle);\n this._maxRadiusPercent = 0;\n for (var i = this.startIndex; i < this.endIndex; i++) {\n var dataItem = this.dataItems.getIndex(i);\n var radiusValuePercent = dataItem.values.radiusValue.percent;\n if (radiusValuePercent > this._maxRadiusPercent) {\n this._maxRadiusPercent = radiusValuePercent;\n }\n }\n _super.prototype.validate.call(this);\n if (this.alignLabels) {\n if (this.startAngle > this.endAngle) {\n this._rightItems.reverse();\n } else {\n this._leftItems.reverse();\n }\n this._rightItems.sort(function (a, b) {\n var aAngle = (a.slice.middleAngle + 360) % 360;\n var bAngle = (b.slice.middleAngle + 360) % 360;\n if (aAngle > 270) {\n aAngle -= 360;\n }\n if (bAngle > 270) {\n bAngle -= 360;\n }\n if (aAngle < bAngle) {\n return -1;\n } else {\n return 1;\n }\n });\n this._leftItems.sort(function (a, b) {\n var aAngle = (a.slice.middleAngle + 360) % 360;\n var bAngle = (b.slice.middleAngle + 360) % 360;\n if (aAngle < bAngle) {\n return 1;\n } else {\n return -1;\n }\n });\n this.arrangeLabels(this._rightItems);\n this.arrangeLabels2(this._rightItems);\n this.arrangeLabels(this._leftItems);\n this.arrangeLabels2(this._leftItems);\n }\n };\n /**\r\n * Validates data item's element, effectively redrawing it.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n PieSeries.prototype.validateDataElement = function (dataItem) {\n if (this.pixelRadius > 0) {\n // SLICE\n var slice = dataItem.slice;\n slice.radius = this.pixelRadius;\n if ($type.isNumber(dataItem.radiusValue)) {\n slice.radius = this.pixelInnerRadius + (this.pixelRadius - this.pixelInnerRadius) * dataItem.values.radiusValue.percent / this._maxRadiusPercent;\n }\n if (!(slice.innerRadius instanceof Percent)) {\n slice.innerRadius = this.pixelInnerRadius;\n }\n slice.startAngle = this._currentStartAngle;\n slice.arc = dataItem.values.value.percent * (this.endAngle - this.startAngle) / 100;\n // LABEL\n if (!this.labels.template.disabled) {\n var label = dataItem.label;\n var tick = dataItem.tick;\n tick.slice = slice;\n tick.label = label;\n var normalizedMiddleAngle = (slice.middleAngle + 360) % 360; // force angle to be 0 - 360;\n var point = void 0;\n if (this.alignLabels) {\n var labelRadius = label.pixelRadius(slice.radius);\n var x = tick.length + labelRadius;\n label.dx = 0;\n label.dy = 0;\n label.verticalCenter = \"middle\";\n var arcRect = this._arcRect;\n // right half\n if (normalizedMiddleAngle >= 270 || normalizedMiddleAngle <= 90) {\n // 91 makes less chances for flickering\n x += (arcRect.width + arcRect.x) * this.pixelRadius;\n label.horizontalCenter = \"left\";\n this._rightItems.push(dataItem);\n }\n // left half\n else {\n x -= arcRect.x * this.pixelRadius;\n label.horizontalCenter = \"right\";\n this._leftItems.push(dataItem);\n x *= -1;\n }\n var distance = slice.radius + tick.length + labelRadius;\n point = {\n x: x,\n y: slice.iy * distance\n };\n label.moveTo(point);\n } else {\n var depth = slice[\"depth\"];\n if (!$type.isNumber(depth)) {\n depth = 0;\n }\n label.fixPosition(slice.middleAngle, slice.radius, slice.radiusY, 0, -depth);\n }\n }\n this._currentStartAngle += slice.arc;\n // do this at the end, otherwise bullets won't be positioned properly\n _super.prototype.validateDataElement.call(this, dataItem);\n }\n };\n Object.defineProperty(PieSeries.prototype, \"radius\", {\n /**\r\n * @return Radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"radius\");\n },\n /**\r\n * Outer radius for the series' slices in pixels or [[Percent]].\r\n *\r\n * @param value Radius\r\n */\n set: function set(value) {\n if (this.setPercentProperty(\"radius\", value, true, false, 10, false)) {\n this.invalidateDataItems();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PieSeries.prototype, \"pixelRadius\", {\n /**\r\n * @return Radius\r\n * @ignore\r\n */\n get: function get() {\n return this._pixelRadius;\n },\n /**\r\n * @ignore\r\n */\n set: function set(value) {\n if (this._pixelRadius != value) {\n this._pixelRadius = value;\n this.invalidateDataItems();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PieSeries.prototype, \"pixelInnerRadius\", {\n /**\r\n * @return Pixel inner radius\r\n * @ignore\r\n */\n get: function get() {\n return this._pixelInnerRadius;\n },\n /**\r\n * @ignore\r\n */\n set: function set(value) {\n if (this._pixelInnerRadius != value) {\n this._pixelInnerRadius = value;\n this.invalidateDataItems();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PieSeries.prototype, \"innerRadius\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"innerRadius\");\n },\n /**\r\n * Inner radius for the series' slices in pixels.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Redo so that users can set it\r\n * @param value Radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PieSeries.prototype, \"startAngle\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Angle\r\n */\n get: function get() {\n return this.getPropertyValue(\"startAngle\");\n },\n /**\r\n * Start angle for the series' slices in degrees. (0-360)\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Redo so that users can set it\r\n * @param value Angle\r\n */\n set: function set(value) {\n this.setPropertyValue(\"startAngle\", $math.normalizeAngle(value), true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PieSeries.prototype, \"endAngle\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Angle\r\n */\n get: function get() {\n return this.getPropertyValue(\"endAngle\");\n },\n /**\r\n * End angle for the series' slices in degrees. (0-360)\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Redo so that users can set it\r\n * @param value Angle\r\n */\n set: function set(value) {\n this.setPropertyValue(\"endAngle\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Positions series bullet.\r\n *\r\n * @ignore Exclude from docs\r\n * @param bullet Bullet\r\n */\n PieSeries.prototype.positionBullet = function (bullet) {\n _super.prototype.positionBullet.call(this, bullet);\n var dataItem = bullet.dataItem;\n var slice = dataItem.slice;\n var locationX = bullet.locationX;\n if (!$type.isNumber(locationX)) {\n locationX = 0.5;\n }\n var locationY = bullet.locationY;\n if (!$type.isNumber(locationY)) {\n locationY = 1;\n }\n var angle = slice.startAngle + slice.arc * locationX;\n bullet.x = locationY * slice.radius * $math.cos(angle);\n bullet.y = locationY * slice.radiusY * $math.sin(angle);\n };\n /**\r\n * Repositions bullet and labels when slice moves.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\n PieSeries.prototype.handleSliceMove = function (event) {\n if (!this.alignLabels) {\n var slice = event.target;\n var dataItem = slice.dataItem;\n // moving textelement, as label dx and dy are already employed for aligning\n //@labeltodo\n if (dataItem) {\n var label = dataItem.label;\n if (label) {\n label.dx = label.fdx + slice.dx + slice.pixelX;\n label.dy = label.fdy + slice.dy + slice.pixelY;\n }\n }\n }\n };\n Object.defineProperty(PieSeries.prototype, \"bbox\", {\n /**\r\n * Returns bounding box (square) for this element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n get: function get() {\n if (this.definedBBox) {\n return this.definedBBox;\n }\n var chart = this.chart;\n if (chart) {\n return $math.getArcRect(chart.startAngle, chart.endAngle, this.pixelRadius);\n }\n return $math.getArcRect(this.startAngle, this.endAngle, this.pixelRadius);\n },\n enumerable: true,\n configurable: true\n });\n return PieSeries;\n}(PercentSeries);\nexport { PieSeries };\n/**\r\n * bboxter class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"PieSeries\"] = PieSeries;\nregistry.registeredClasses[\"PieSeriesDataItem\"] = PieSeriesDataItem;","/**\r\n * Pie chart module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { PercentChart, PercentChartDataItem } from \"./PercentChart\";\nimport { percent, Percent } from \"../../core/utils/Percent\";\nimport { PieSeries } from \"../series/PieSeries\";\nimport { registry } from \"../../core/Registry\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[PieChart]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar PieChartDataItem = /** @class */function (_super) {\n tslib_1.__extends(PieChartDataItem, _super);\n /**\r\n * Constructor\r\n */\n function PieChartDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"PieChartDataItem\";\n _this.applyTheme();\n return _this;\n }\n return PieChartDataItem;\n}(PercentChartDataItem);\nexport { PieChartDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a Pie chart.\r\n *\r\n * ```TypeScript\r\n * // Includes\r\n * import * as am4core from \"@amcharts/amcharts4/core\";\r\n * import * as am4charts from \"@amcharts/amcharts4/charts\";\r\n *\r\n * // Create chart\r\n * let chart = am4core.create(\"chartdiv\", am4charts.PieChart);\r\n *\r\n * // Set data\r\n * chart.data = [{\r\n * \t\"country\": \"Lithuania\",\r\n * \t\"litres\": 501.9\r\n * }, {\r\n * \t\"country\": \"Czechia\",\r\n * \t\"litres\": 301.9\r\n * }, {\r\n * \t\"country\": \"Ireland\",\r\n * \t\"litres\": 201.1\r\n * }];\r\n *\r\n * // Create series\r\n * let series = chart.series.push(new am4charts.PieSeries());\r\n * series.dataFields.value = \"litres\";\r\n * series.dataFields.category = \"country\";\r\n * ```\r\n * ```JavaScript\r\n * // Create chart\r\n * var chart = am4core.create(\"chartdiv\", am4charts.PieChart);\r\n *\r\n * // The following would work as well:\r\n * // var chart = am4core.create(\"chartdiv\", \"PieChart\");\r\n *\r\n * // Set data\r\n * chart.data = [{\r\n * \t\"country\": \"Lithuania\",\r\n * \t\"litres\": 501.9\r\n * }, {\r\n * \t\"country\": \"Czechia\",\r\n * \t\"litres\": 301.9\r\n * }, {\r\n * \t\"country\": \"Ireland\",\r\n * \t\"litres\": 201.1\r\n * }];\r\n *\r\n * // Create series\r\n * var series = chart.series.push(new am4charts.PieSeries());\r\n * series.dataFields.value = \"litres\";\r\n * series.dataFields.category = \"country\";\r\n * ```\r\n * ```JSON\r\n * var chart = am4core.createFromConfig({\r\n *\r\n * \t// Series\r\n * \t\"series\": [{\r\n * \t\t\"type\": \"PieSeries\",\r\n * \t\t\"dataFields\": {\r\n * \t\t\t\"value\": \"litres\",\r\n * \t\t\t\"category\": \"country\"\r\n * \t\t}\r\n * \t}],\r\n *\r\n * \t// Data\r\n * \t\"data\": [{\r\n * \t\t\"country\": \"Lithuania\",\r\n * \t\t\"litres\": 501.9\r\n * \t}, {\r\n * \t\t\"country\": \"Czechia\",\r\n * \t\t\"litres\": 301.9\r\n * \t}, {\r\n * \t\t\"country\": \"Ireland\",\r\n * \t\t\"litres\": 201.1\r\n * \t}]\r\n *\r\n * }, \"chartdiv\", \"PieChart\");\r\n * ```\r\n *\r\n * @see {@link IPieChartEvents} for a list of available Events\r\n * @see {@link IPieChartAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/pie-chart/} for documentation\r\n * @important\r\n */\nvar PieChart = /** @class */function (_super) {\n tslib_1.__extends(PieChart, _super);\n /**\r\n * Constructor\r\n */\n function PieChart() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"PieChart\";\n // Set defaults\n _this.innerRadius = 0;\n _this.radius = percent(80);\n _this.align = \"none\";\n _this.valign = \"none\";\n _this.startAngle = -90;\n _this.endAngle = 270;\n var seriesContainer = _this.seriesContainer;\n seriesContainer.isMeasured = true;\n seriesContainer.valign = \"middle\";\n seriesContainer.align = \"center\";\n seriesContainer.layout = \"absolute\";\n seriesContainer.width = undefined;\n seriesContainer.height = undefined;\n // so that the pie is always drawn, even the legend wants all the space\n _this.chartContainer.minHeight = 50;\n _this.chartContainer.minWidth = 50;\n _this.chartContainer.events.on(\"maxsizechanged\", _this.updateRadius, _this, false); // need this for the chart to change radius if legend is removed/disabled\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n PieChart.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n // Add a default screen reader title for accessibility\n // This will be overridden in screen reader if there are any `titles` set\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Pie chart\");\n }\n };\n /**\r\n * (Re)validates the chart, causing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\n PieChart.prototype.validateLayout = function () {\n _super.prototype.validateLayout.call(this);\n this.updateRadius();\n };\n /**\r\n * Decorates a new [[Series]] object with required parameters when it is\r\n * added to the chart.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\n PieChart.prototype.handleSeriesAdded = function (event) {\n _super.prototype.handleSeriesAdded.call(this, event);\n this._chartPixelRadius = undefined;\n this.updateSeriesAngles();\n };\n PieChart.prototype.updateSeriesAngles = function () {\n var _this = this;\n this.series.each(function (series) {\n series.startAngle = _this.startAngle;\n series.endAngle = _this.endAngle;\n series.defaultState.properties.startAngle = _this.startAngle;\n series.defaultState.properties.endAngle = _this.endAngle;\n });\n };\n /**\r\n * Recalculates pie's radius, based on a number of criteria.\r\n *\r\n * @ignore Exclude from docs\r\n */\n PieChart.prototype.updateRadius = function () {\n var chartCont = this.chartContainer;\n var rect = $math.getArcRect(this.startAngle, this.endAngle, 1);\n var innerRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n var innerRadius = this.innerRadius;\n if (innerRadius instanceof Percent) {\n innerRect = $math.getArcRect(this.startAngle, this.endAngle, innerRadius.value);\n }\n // @todo handle this when innerRadius set in pixels (do it for radar also)\n rect = $math.getCommonRectangle([rect, innerRect]);\n var maxRadius = Math.min(chartCont.innerWidth / rect.width, chartCont.innerHeight / rect.height);\n if (!$type.isNumber(maxRadius)) {\n maxRadius = 0;\n }\n var chartRadius = $utils.relativeRadiusToValue(this.radius, maxRadius);\n var chartPixelInnerRadius = $utils.relativeRadiusToValue(this.innerRadius, maxRadius);\n var seriesRadius = (chartRadius - chartPixelInnerRadius) / this.series.length;\n if (chartRadius != this._chartPixelRadius || chartPixelInnerRadius != this._chartPixelInnerRadius) {\n this._chartPixelRadius = chartRadius;\n this._chartPixelInnerRadius = chartPixelInnerRadius;\n //@todo: make it possible to set series radius in percent\n $iter.each($iter.indexed(this.series.iterator()), function (a) {\n var i = a[0];\n var series = a[1];\n var radius = chartPixelInnerRadius + $utils.relativeRadiusToValue(series.radius, chartRadius - chartPixelInnerRadius);\n var innerRadius = chartPixelInnerRadius + $utils.relativeRadiusToValue(series.innerRadius, chartRadius - chartPixelInnerRadius);\n if (!$type.isNumber(radius)) {\n radius = chartPixelInnerRadius + seriesRadius * (i + 1);\n }\n if (!$type.isNumber(innerRadius)) {\n innerRadius = chartPixelInnerRadius + seriesRadius * i;\n }\n series.pixelRadius = radius;\n series.pixelInnerRadius = innerRadius;\n });\n this.seriesContainer.definedBBox = {\n x: chartRadius * rect.x,\n y: chartRadius * rect.y,\n width: chartRadius * rect.width,\n height: chartRadius * rect.height\n };\n this.seriesContainer.invalidateLayout();\n this.bulletsContainer.x = this.seriesContainer.x;\n this.bulletsContainer.y = this.seriesContainer.y;\n }\n };\n Object.defineProperty(PieChart.prototype, \"radius\", {\n /**\r\n * @return Radius (px or relative)\r\n */\n get: function get() {\n return this.getPropertyValue(\"radius\");\n },\n /**\r\n * Sets radius of the pie chart.\r\n *\r\n * Setting to a number will mean a fixed pixel radius.\r\n *\r\n * Setting to an instance of [[Percent]] will mean a relative radius to\r\n * available space.\r\n *\r\n * E.g.:\r\n *\r\n * ```TypeScript\r\n * // Set pie chart to be at 50% of the available space\r\n * pieChart.radius = am4core.percent.percent(50);\r\n * ```\r\n * ```JavaScript\r\n * // Set pie chart to be at 50% of the available space\r\n * pieChart.radius = am4core.percent.percent(50);\r\n * ```\r\n * ```JSON\r\n * {\r\n * // Set pie chart to be at 50% of the available space\r\n * \"radius\": \"50%\"\r\n * }\r\n * ```\r\n *\r\n * @default 80%\r\n * @param value Radius (px or relative)\r\n */\n set: function set(value) {\n if (this.setPercentProperty(\"radius\", value, true, false, 10, false)) {\n this.invalidateLayout();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PieChart.prototype, \"innerRadius\", {\n /**\r\n * @return Relative inner radius (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"innerRadius\");\n },\n /**\r\n * Sets relative inner radius (to create a donut chart).\r\n *\r\n * Setting to a number will mean a fixed pixel radius.\r\n *\r\n * Setting to an instance of [[Percent]] will mean a relative radius to\r\n * available space.\r\n *\r\n * NOTE: it's not related to `radius`.\r\n *\r\n * E.g.:\r\n *\r\n * ```TypeScript\r\n * // Set pie chart to be at 50% of the available space\r\n * pieChart.innerRadius = am4core.percent.percent(50);\r\n * ```\r\n * ```JavaScript\r\n * // Set pie chart to be at 50% of the available space\r\n * pieChart.innerRadius = am4core.percent.percent(50);\r\n * ```\r\n * ```JSON\r\n * {\r\n * // Set pie chart to be at 50% of the available space\r\n * \"innerRadius\": \"50%\"\r\n * }\r\n *\r\n * @default 0\r\n * @param value Relative inner radius (0-1)\r\n * @todo Setting things like `innerRadius` modifies `slice.radius` and it then looks like it is not the same value as in default state\r\n */\n set: function set(value) {\n this.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates a new [[PieSeries]].\r\n *\r\n * @return New series\r\n */\n PieChart.prototype.createSeries = function () {\n return new PieSeries();\n };\n Object.defineProperty(PieChart.prototype, \"startAngle\", {\n /**\r\n * @return Start angle (degrees)\r\n */\n get: function get() {\n return this.getPropertyValue(\"startAngle\");\n },\n /**\r\n * Starting angle of the Pie circle. (degrees)\r\n *\r\n * Normally, a pie chart begins (the left side of the first slice is drawn)\r\n * at the top center. (at -90 degrees)\r\n *\r\n * You can use `startAngle` to change this setting.\r\n *\r\n * E.g. setting this to 0 will make the first slice be drawn to the right.\r\n *\r\n * For a perfect circle the absolute sum of `startAngle` and `endAngle`\r\n * needs to be 360.\r\n *\r\n * However, it's **not** necessary to do so. You can set to those lesser\r\n * numbers, to create semi-circles.\r\n *\r\n * E.g. `startAngle = -90` with `endAngle = 0` will create a Pie chart that\r\n * looks like a quarter of a circle.\r\n *\r\n * NOTE: This setting is not supported in a 3D pie chart.\r\n *\r\n * @default -90\r\n * @param value Start angle (degrees)\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"startAngle\", value)) {\n this.updateRadius();\n this.updateSeriesAngles();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PieChart.prototype, \"endAngle\", {\n /**\r\n * @return End angle (degrees)\r\n */\n get: function get() {\n return this.getPropertyValue(\"endAngle\");\n },\n /**\r\n * End angle of the Pie circle. (degrees)\r\n *\r\n * Normally, a pie chart ends (the right side of the last slice is drawn)\r\n * at the top center. (at 270 degrees)\r\n *\r\n * You can use `endAngle` to change this setting.\r\n *\r\n * For a perfect circle the absolute sum of `startAngle` and `endAngle`\r\n * needs to be 360.\r\n *\r\n * However, it's **not** necessary to do so. You can set to those lesser\r\n * numbers, to create semi-circles.\r\n *\r\n * E.g. `startAngle = -90` with `endAngle = 0` will create a Pie chart that\r\n * looks like a quarter of a circle.\r\n *\r\n * NOTE: This setting is not supported in a 3D pie chart.\r\n *\r\n * @default 270\r\n * @param value End angle (degrees)\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"endAngle\", value)) {\n this.updateRadius();\n this.updateSeriesAngles();\n }\n },\n enumerable: true,\n configurable: true\n });\n return PieChart;\n}(PercentChart);\nexport { PieChart };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"PieChart\"] = PieChart;\nregistry.registeredClasses[\"PieChartDataItem\"] = PieChartDataItem;","/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport * as tslib_1 from \"tslib\";\nimport { PieSeries, PieSeriesDataItem } from \"../series/PieSeries\";\nimport { Slice3D } from \"../../core/elements/3d/Slice3D\";\nimport { registry } from \"../../core/Registry\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[PieSeries3D]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar PieSeries3DDataItem = /** @class */function (_super) {\n tslib_1.__extends(PieSeries3DDataItem, _super);\n /**\r\n * Constructor\r\n */\n function PieSeries3DDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"PieSeries3DDataItem\";\n _this.values.depthValue = {};\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(PieSeries3DDataItem.prototype, \"depthValue\", {\n /**\r\n * @return Depth\r\n */\n get: function get() {\n return this.values[\"depthValue\"].value;\n },\n /**\r\n * Slice depth (height).\r\n *\r\n * @param value Depth\r\n */\n set: function set(value) {\n this.setValue(\"depthValue\", value);\n },\n enumerable: true,\n configurable: true\n });\n return PieSeries3DDataItem;\n}(PieSeriesDataItem);\nexport { PieSeries3DDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines [[Series]] for a slice series on a 3D pie chart.\r\n *\r\n * @see {@link IPieSeries3DEvents} for a list of available Events\r\n * @see {@link IPieSeries3DAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\nvar PieSeries3D = /** @class */function (_super) {\n tslib_1.__extends(PieSeries3D, _super);\n /**\r\n * Constructor\r\n */\n function PieSeries3D() {\n var _this = _super.call(this) || this;\n _this.className = \"PieSeries3D\";\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n PieSeries3D.prototype.createDataItem = function () {\n return new PieSeries3DDataItem();\n };\n /**\r\n * creates slice\r\n */\n PieSeries3D.prototype.createSlice = function () {\n return new Slice3D();\n };\n /**\r\n * Validates data item's element, effectively redrawing it.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n PieSeries3D.prototype.validateDataElement = function (dataItem) {\n var slice = dataItem.slice;\n var depth = this.depth;\n if (!$type.isNumber(depth)) {\n depth = this.chart.depth;\n }\n var depthPercent = dataItem.values.depthValue.percent;\n if (!$type.isNumber(depthPercent)) {\n depthPercent = 100;\n }\n slice.depth = depthPercent * depth / 100;\n var angle = this.angle;\n if (!$type.isNumber(angle)) {\n angle = this.chart.angle;\n }\n slice.angle = angle;\n _super.prototype.validateDataElement.call(this, dataItem);\n };\n /**\r\n * (Re)validates the whole series, effectively causing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\n PieSeries3D.prototype.validate = function () {\n _super.prototype.validate.call(this);\n for (var i = this._workingStartIndex; i < this._workingEndIndex; i++) {\n var dataItem = this.dataItems.getIndex(i);\n var slice = dataItem.slice;\n var startAngle = slice.startAngle;\n // find quarter\n //q0 || q1\n if (startAngle >= -90 && startAngle < 90) {\n slice.toFront();\n }\n //q2 || q3\n else if (startAngle >= 90) {\n slice.toBack();\n }\n }\n };\n Object.defineProperty(PieSeries3D.prototype, \"depth\", {\n /**\r\n * @return Depth (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"depth\");\n },\n /**\r\n * Depth (height) of the pie slice in pixels.\r\n *\r\n * @param value Depth (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"depth\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PieSeries3D.prototype, \"angle\", {\n /**\r\n * @return Angle\r\n */\n get: function get() {\n return this.getPropertyValue(\"angle\");\n },\n /**\r\n * Angle of the view point of the 3D pie. (0-360)\r\n *\r\n * @param value Angle\r\n */\n set: function set(value) {\n this.setPropertyValue(\"angle\", value);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Positions series bullet.\r\n *\r\n * @ignore Exclude from docs\r\n * @param bullet Bullet\r\n */\n PieSeries3D.prototype.positionBullet = function (bullet) {\n _super.prototype.positionBullet.call(this, bullet);\n var dataItem = bullet.dataItem;\n var slice = dataItem.slice;\n bullet.y = bullet.pixelY - slice.depth;\n };\n return PieSeries3D;\n}(PieSeries);\nexport { PieSeries3D };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"PieSeries3D\"] = PieSeries3D;\nregistry.registeredClasses[\"PieSeries3DDataItem\"] = PieSeries3DDataItem;","/**\r\n * 3D Pie chart module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * Imports\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { PieChart, PieChartDataItem } from \"./PieChart\";\nimport { PieSeries3D } from \"../series/PieSeries3D\";\nimport { registry } from \"../../core/Registry\";\nimport * as $math from \"../../core/utils/Math\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[PieChart3D]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar PieChart3DDataItem = /** @class */function (_super) {\n tslib_1.__extends(PieChart3DDataItem, _super);\n /**\r\n * Constructor\r\n */\n function PieChart3DDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"PieChart3DDataItem\";\n _this.applyTheme();\n return _this;\n }\n return PieChart3DDataItem;\n}(PieChartDataItem);\nexport { PieChart3DDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a 3D Pie chart.\r\n *\r\n * * ```TypeScript\r\n * // Includes\r\n * import * as am4core from \"@amcharts/amcharts4/core\";\r\n * import * as am4charts from \"@amcharts/amcharts4/charts\";\r\n *\r\n * // Create chart\r\n * let chart = am4core.create(\"chartdiv\", am4charts.Pie3DChart);\r\n *\r\n * // Set data\r\n * chart.data = [{\r\n * \t\"country\": \"Lithuania\",\r\n * \t\"litres\": 501.9\r\n * }, {\r\n * \t\"country\": \"Czechia\",\r\n * \t\"litres\": 301.9\r\n * }, {\r\n * \t\"country\": \"Ireland\",\r\n * \t\"litres\": 201.1\r\n * }];\r\n *\r\n * // Create series\r\n * let series = chart.series.push(new am4charts.Pie3DSeries());\r\n * series.dataFields.value = \"litres\";\r\n * series.dataFields.category = \"country\";\r\n * ```\r\n * ```JavaScript\r\n * // Create chart\r\n * var chart = am4core.create(\"chartdiv\", am4charts.Pie3DChart);\r\n *\r\n * // The following would work as well:\r\n * // var chart = am4core.create(\"chartdiv\", \"Pie3DChart\");\r\n *\r\n * // Set data\r\n * chart.data = [{\r\n * \t\"country\": \"Lithuania\",\r\n * \t\"litres\": 501.9\r\n * }, {\r\n * \t\"country\": \"Czechia\",\r\n * \t\"litres\": 301.9\r\n * }, {\r\n * \t\"country\": \"Ireland\",\r\n * \t\"litres\": 201.1\r\n * }];\r\n *\r\n * // Create series\r\n * var series = chart.series.push(new am4charts.Pie3DSeries());\r\n * series.dataFields.value = \"litres\";\r\n * series.dataFields.category = \"country\";\r\n * ```\r\n * ```JSON\r\n * var chart = am4core.createFromConfig({\r\n *\r\n * \t// Series\r\n * \t\"series\": [{\r\n * \t\t\"type\": \"Pie3DSeries\",\r\n * \t\t\"dataFields\": {\r\n * \t\t\t\"value\": \"litres\",\r\n * \t\t\t\"category\": \"country\"\r\n * \t\t}\r\n * \t}],\r\n *\r\n * \t// Data\r\n * \t\"data\": [{\r\n * \t\t\"country\": \"Lithuania\",\r\n * \t\t\"litres\": 501.9\r\n * \t}, {\r\n * \t\t\"country\": \"Czechia\",\r\n * \t\t\"litres\": 301.9\r\n * \t}, {\r\n * \t\t\"country\": \"Ireland\",\r\n * \t\t\"litres\": 201.1\r\n * \t}]\r\n *\r\n * }, \"chartdiv\", \"Pie3DChart\");\r\n * ```\r\n *\r\n * @see {@link IPieChart3DEvents} for a list of available Events\r\n * @see {@link IPieChart3DAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/pie-chart/} for documentation\r\n * @important\r\n */\nvar PieChart3D = /** @class */function (_super) {\n tslib_1.__extends(PieChart3D, _super);\n /**\r\n * Constructor\r\n */\n function PieChart3D() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"PieChart3D\";\n _this.depth = 20;\n _this.angle = 10;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(PieChart3D.prototype, \"depth\", {\n /**\r\n * @return Depth (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"depth\");\n },\n /**\r\n * Depth of the 3D pie in pixels.\r\n *\r\n * This will determine \"height\" of the pie.\r\n *\r\n * @default 20\r\n * @param value Depth (px)\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"depth\", value)) {\n this.invalidateDataUsers();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PieChart3D.prototype, \"angle\", {\n /**\r\n * @return Angle (degrees)\r\n */\n get: function get() {\n return this.getPropertyValue(\"angle\");\n },\n /**\r\n * An angle of a \"point of view\" in degrees. Possible range 0 - 90.\r\n *\r\n * @default 10\r\n * @param value Angle (degrees)\r\n */\n set: function set(value) {\n value = $math.fitToRange(value, 0, 90);\n if (this.setPropertyValue(\"angle\", value)) {\n this.invalidateDataUsers();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates and returns a new Series.\r\n *\r\n * @return New series\r\n */\n PieChart3D.prototype.createSeries = function () {\n return new PieSeries3D();\n };\n return PieChart3D;\n}(PieChart);\nexport { PieChart3D };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"PieChart3D\"] = PieChart3D;","/**\r\n * Sliced chart module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { PercentChart, PercentChartDataItem } from \"./PercentChart\";\nimport { registry } from \"../../core/Registry\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[SlicedChart]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar SlicedChartDataItem = /** @class */function (_super) {\n tslib_1.__extends(SlicedChartDataItem, _super);\n /**\r\n * Constructor\r\n */\n function SlicedChartDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"SlicedChartDataItem\";\n _this.applyTheme();\n return _this;\n }\n return SlicedChartDataItem;\n}(PercentChartDataItem);\nexport { SlicedChartDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a Sliced chart.\r\n *\r\n * @see {@link ISlicedChartEvents} for a list of available Events\r\n * @see {@link ISlicedChartAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/sliced-chart/} for documentation\r\n * @important\r\n */\nvar SlicedChart = /** @class */function (_super) {\n tslib_1.__extends(SlicedChart, _super);\n /**\r\n * Constructor\r\n */\n function SlicedChart() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"SlicedChart\";\n _this.seriesContainer.layout = \"horizontal\";\n _this.padding(15, 15, 15, 15);\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n SlicedChart.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n // Add a default screen reader title for accessibility\n // This will be overridden in screen reader if there are any `titles` set\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Sliced chart\");\n }\n };\n /**\r\n * (Re)validates the chart, causing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\n SlicedChart.prototype.validate = function () {\n _super.prototype.validate.call(this);\n };\n return SlicedChart;\n}(PercentChart);\nexport { SlicedChart };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"SlicedChart\"] = SlicedChart;\nregistry.registeredClasses[\"SlicedChartDataItem\"] = SlicedChartDataItem;","/**\r\n * FlowDiagramNode module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../../core/Container\";\nimport { visualProperties } from \"../../core/Sprite\";\nimport { List } from \"../../core/utils/List\";\nimport { registry } from \"../../core/Registry\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $string from \"../../core/utils/String\";\nimport * as $order from \"../../core/utils/Order\";\nimport * as $number from \"../../core/utils/Number\";\nimport { RoundedRectangle } from \"../../core/elements/RoundedRectangle\";\nimport * as $object from \"../../core/utils/Object\";\nimport { LegendSettings } from \"../Legend\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a node in a Flow Diagram.\r\n *\r\n * A Flow node is a block with a value, which represents its size on the\r\n * diagram.\r\n *\r\n * Nodes are connected via [[FlowLink]] elements.\r\n *\r\n * @see {@link IFlowDiagramNodeEvents} for a list of available events\r\n * @see {@link IFlowDiagramNodeAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar FlowDiagramNode = /** @class */function (_super) {\n tslib_1.__extends(FlowDiagramNode, _super);\n /**\r\n * Constructor\r\n */\n function FlowDiagramNode() {\n var _this = _super.call(this) || this;\n /**\r\n * Settings for the appearance of the related legend items.\r\n */\n _this.legendSettings = new LegendSettings();\n _this.className = \"FlowDiagramNode\";\n _this.isMeasured = false;\n // TODO can this be removed ?\n new InterfaceColorSet();\n _this.draggable = true;\n _this.inert = true;\n _this.setStateOnChildren = true;\n _this.events.on(\"positionchanged\", _this.invalidateLinks, _this, false);\n _this.events.on(\"sizechanged\", _this.invalidateLinks, _this, false);\n return _this;\n //this.events.on(\"hit\", this.handleHit, this, false);\n }\n /**\r\n * @ignore\r\n */\n FlowDiagramNode.prototype.handleHit = function (event) {\n if (this.isHidden || this.isHiding) {\n this.show();\n } else {\n this.hide();\n }\n };\n /**\r\n * Shows hidden node.\r\n *\r\n * @param duration Duration of reveal animation (ms)\r\n * @return Animation\r\n */\n FlowDiagramNode.prototype.show = function (duration) {\n var animation = _super.prototype.show.call(this, duration);\n this.outgoingDataItems.each(function (dataItem) {\n if (!dataItem.toNode || dataItem.toNode && !dataItem.toNode.isHidden) {\n dataItem.setWorkingValue(\"value\", dataItem.getValue(\"value\"), duration);\n }\n });\n this.incomingDataItems.each(function (dataItem) {\n if (!dataItem.fromNode || dataItem.fromNode && !dataItem.fromNode.isHidden) {\n dataItem.setWorkingValue(\"value\", dataItem.getValue(\"value\"), duration);\n }\n });\n return animation;\n };\n /**\r\n * Hides node.\r\n *\r\n * @param duration Duration of hiding animation (ms)\r\n * @return Animation\r\n */\n FlowDiagramNode.prototype.hide = function (duration) {\n var animation = _super.prototype.hide.call(this, duration);\n this.outgoingDataItems.each(function (dataItem) {\n dataItem.setWorkingValue(\"value\", 0, duration);\n });\n this.incomingDataItems.each(function (dataItem) {\n dataItem.setWorkingValue(\"value\", 0, duration);\n });\n return animation;\n };\n /**\r\n * Marks node as invalid, for redrawal in the next update cycle.\r\n *\r\n * @ignore Exclude from docs\r\n */\n FlowDiagramNode.prototype.validate = function () {\n if (!this.isDisposed()) {\n _super.prototype.validate.call(this);\n this.invalidateLinks();\n }\n };\n /**\r\n * Invalidates all links, attached to this node.\r\n *\r\n * @ignore Exclude from docs\r\n */\n FlowDiagramNode.prototype.invalidateLinks = function () {\n var _this = this;\n this.outgoingDataItems.each(function (dataItem) {\n var link = dataItem.link;\n if (link.colorMode == \"fromNode\") {\n link.fill = link.dataItem.fromNode.color;\n }\n if (link.colorMode == \"gradient\") {\n link.fill = link.gradient;\n link.stroke = link.gradient;\n var stop_1 = link.gradient.stops.getIndex(0);\n if (stop_1) {\n stop_1.color = _this.color;\n link.gradient.validate();\n }\n }\n });\n this.incomingDataItems.each(function (dataItem) {\n var link = dataItem.link;\n if (link.colorMode == \"toNode\") {\n link.fill = link.dataItem.toNode.color;\n }\n if (link.colorMode == \"gradient\") {\n link.fill = link.gradient;\n link.stroke = link.gradient;\n var stop_2 = link.gradient.stops.getIndex(1);\n if (stop_2) {\n stop_2.color = _this.color;\n link.gradient.validate();\n }\n }\n });\n };\n Object.defineProperty(FlowDiagramNode.prototype, \"incomingDataItems\", {\n /**\r\n * List of incoming items (links).\r\n *\r\n * @readonly\r\n * @return Incoming items\r\n */\n get: function get() {\n var _this = this;\n if (!this._incomingDataItems) {\n var incomingDataItems = new List();\n incomingDataItems.events.on(\"inserted\", function () {\n if (_this.chart.sortBy == \"name\") {\n _this._incomingSorted = $iter.sort(_this._incomingDataItems.iterator(), function (x, y) {\n return $string.order(x.fromName, y.fromName);\n });\n } else if (_this.chart.sortBy == \"value\") {\n _this._incomingSorted = $iter.sort(_this._incomingDataItems.iterator(), function (x, y) {\n return $order.reverse($number.order(x.value, y.value));\n });\n } else {\n _this._incomingSorted = _this._incomingDataItems.iterator();\n }\n }, undefined, false);\n this._incomingDataItems = incomingDataItems;\n }\n return this._incomingDataItems;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagramNode.prototype, \"outgoingDataItems\", {\n /**\r\n * List of outgoing items (links).\r\n *\r\n * @readonly\r\n * @return Outgoing items\r\n */\n get: function get() {\n var _this = this;\n if (!this._outgoingDataItems) {\n var outgoingDataItems = new List();\n outgoingDataItems.events.on(\"inserted\", function () {\n if (_this.chart.sortBy == \"name\") {\n _this._outgoingSorted = $iter.sort(_this._outgoingDataItems.iterator(), function (x, y) {\n return $string.order(x.fromName, y.fromName);\n });\n } else if (_this.chart.sortBy == \"value\") {\n _this._outgoingSorted = $iter.sort(_this._outgoingDataItems.iterator(), function (x, y) {\n return $order.reverse($number.order(x.value, y.value));\n });\n } else {\n _this._outgoingSorted = _this._outgoingDataItems.iterator();\n }\n }, undefined, false);\n this._outgoingDataItems = outgoingDataItems;\n }\n return this._outgoingDataItems;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagramNode.prototype, \"name\", {\n /**\r\n * @return Name\r\n */\n get: function get() {\n return this.getPropertyValue(\"name\");\n },\n /**\r\n * A name of the node.\r\n *\r\n * @param value Name\r\n */\n set: function set(value) {\n this.setPropertyValue(\"name\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagramNode.prototype, \"total\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.getPropertyValue(\"total\");\n },\n /**\r\n * Sum of all incoming+outgoing link values\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setPropertyValue(\"total\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagramNode.prototype, \"totalIncoming\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.getPropertyValue(\"totalIncoming\");\n },\n /**\r\n * Sum of all incomming link values.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setPropertyValue(\"totalIncoming\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagramNode.prototype, \"totalOutgoing\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.getPropertyValue(\"totalOutgoing\");\n },\n /**\r\n * Sum of all outgoing link values.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setPropertyValue(\"totalOutgoing\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagramNode.prototype, \"color\", {\n /**\r\n * @return Color\r\n */\n get: function get() {\n return this.getPropertyValue(\"color\");\n },\n /**\r\n * Node's color.\r\n *\r\n * @param value Color\r\n */\n set: function set(value) {\n this.setColorProperty(\"color\", value);\n if (this._background) {\n this._background.fill = value;\n }\n this.fill = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates elements in related legend container, that mimics the look of this\r\n * Series.\r\n *\r\n * @ignore Exclude from docs\r\n * @param marker Legend item container\r\n */\n FlowDiagramNode.prototype.createLegendMarker = function (marker) {\n var w = marker.pixelWidth;\n var h = marker.pixelHeight;\n marker.removeChildren();\n var column = marker.createChild(RoundedRectangle);\n column.shouldClone = false;\n $object.copyProperties(this, column, visualProperties);\n column.stroke = this.fill;\n column.copyFrom(this);\n column.padding(0, 0, 0, 0); // if columns will have padding (which is often), legend marker will be very narrow\n column.width = w;\n column.height = h;\n var legendDataItem = marker.dataItem;\n legendDataItem.color = column.fill;\n legendDataItem.colorOrig = column.fill;\n };\n Object.defineProperty(FlowDiagramNode.prototype, \"legendDataItem\", {\n /**\r\n * @return Data item\r\n */\n get: function get() {\n return this._legendDataItem;\n },\n /**\r\n * Legend data item that corresponds to this series.\r\n *\r\n * @param value Data item\r\n */\n set: function set(value) {\n this._legendDataItem = value;\n this._legendDataItem.itemContainer.deepInvalidate();\n },\n enumerable: true,\n configurable: true\n });\n return FlowDiagramNode;\n}(Container);\nexport { FlowDiagramNode };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"FlowDiagramNode\"] = FlowDiagramNode;","/**\r\n * FlowDiagramLink module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Sprite } from \"../../core/Sprite\";\nimport { Container } from \"../../core/Container\";\nimport { LinearGradient } from \"../../core/rendering/fills/LinearGradient\";\nimport { registry } from \"../../core/Registry\";\nimport { Bullet } from \"../elements/Bullet\";\nimport { Color } from \"../../core/utils/Color\";\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\nimport { Polyline } from \"../../core/elements/Polyline\";\nimport { Line } from \"../../core/elements/Line\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * This class creates a link (waved color-filled line) between two nodes in a\r\n * Flow Diagram.\r\n *\r\n * @see {@link IFlowDiagramLinkEvents} for a list of available events\r\n * @see {@link IFlowDiagramLinkAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar FlowDiagramLink = /** @class */function (_super) {\n tslib_1.__extends(FlowDiagramLink, _super);\n /**\r\n * Constructor\r\n */\n function FlowDiagramLink() {\n var _this = _super.call(this) || this;\n _this.className = \"FlowDiagramLink\";\n var interfaceColors = new InterfaceColorSet();\n _this.maskBullets = false;\n _this.colorMode = \"fromNode\";\n _this.layout = \"none\";\n _this.isMeasured = false;\n _this.startAngle = 0;\n _this.endAngle = 0;\n _this.strokeOpacity = 0;\n // this is very important, otherwise the container will be shifted\n _this.verticalCenter = \"none\";\n _this.horizontalCenter = \"none\";\n _this.tooltipText = \"{fromName}→{toName}:{value.value}\";\n _this.tooltipLocation = 0.5;\n _this.link = _this.createChild(Sprite);\n _this.link.shouldClone = false;\n _this.link.setElement(_this.paper.add(\"path\"));\n _this.link.isMeasured = false;\n _this.fillOpacity = 0.2;\n _this.fill = interfaceColors.getFor(\"alternativeBackground\");\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Positions bullets\r\n * @ignore\r\n */\n FlowDiagramLink.prototype.positionBullets = function () {\n var _this = this;\n $iter.each(this.bullets.iterator(), function (bullet) {\n bullet.parent = _this.bulletsContainer;\n bullet.maxWidth = _this.maxWidth;\n bullet.maxHeight = _this.maxHeight;\n _this.positionBullet(bullet);\n });\n };\n Object.defineProperty(FlowDiagramLink.prototype, \"bulletsContainer\", {\n /**\r\n * Bullets container\r\n */\n get: function get() {\n if (!this._bulletsContainer) {\n var bulletsContainer = this.createChild(Container);\n bulletsContainer.shouldClone = false;\n bulletsContainer.layout = \"none\";\n this._bulletsContainer = bulletsContainer;\n }\n return this._bulletsContainer;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagramLink.prototype, \"bulletsMask\", {\n /**\r\n * Bullets mask sprite\r\n */\n get: function get() {\n if (!this._bulletsMask) {\n var bulletsMask = this.createChild(Sprite);\n bulletsMask.shouldClone = false;\n bulletsMask.setElement(this.paper.add(\"path\"));\n bulletsMask.isMeasured = false;\n this._bulletsMask = bulletsMask;\n }\n return this._bulletsMask;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Positions bullets at relative bullet.locationX position on the link.\r\n * @ignore\r\n */\n FlowDiagramLink.prototype.positionBullet = function (bullet) {\n var location = bullet.locationX;\n if (!$type.isNumber(location)) {\n location = bullet.locationY;\n }\n if (!$type.isNumber(location)) {\n location = 0.5;\n }\n var point = this.middleLine.positionToPoint(location);\n bullet.moveTo(point);\n var rotationField = bullet.propertyFields.rotation;\n var angle;\n if (bullet.dataItem) {\n var dataContext = bullet.dataItem.dataContext;\n angle = dataContext[rotationField];\n }\n if (!$type.isNumber(angle)) {\n angle = point.angle;\n }\n bullet.rotation = angle;\n };\n Object.defineProperty(FlowDiagramLink.prototype, \"startAngle\", {\n /**\r\n * @return Start angle\r\n */\n get: function get() {\n return this.getPropertyValue(\"startAngle\");\n },\n /**\r\n * [startAngle description]\r\n *\r\n * @todo Description\r\n * @param value Start angle\r\n */\n set: function set(value) {\n this.setPropertyValue(\"startAngle\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagramLink.prototype, \"endAngle\", {\n /**\r\n * @return End angle\r\n */\n get: function get() {\n return this.getPropertyValue(\"endAngle\");\n },\n /**\r\n * [endAngle description]\r\n *\r\n * @todo Description\r\n * @param value End angle\r\n */\n set: function set(value) {\n this.setPropertyValue(\"endAngle\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagramLink.prototype, \"colorMode\", {\n /**\r\n * Fill mode\r\n */\n get: function get() {\n return this.getPropertyValue(\"colorMode\");\n },\n /**\r\n * Should link be filled with a solid color, color of from node, color of toNode or gradient between node colors.\r\n * Some of the links, like ChordLink does not support gradiens well.\r\n *\r\n * @param value Fill mode\r\n */\n set: function set(value) {\n if (value == \"gradient\") {\n var color = this.fill;\n this.gradient.stops.clear();\n if (color instanceof Color) {\n this.gradient.addColor(color);\n this.gradient.addColor(color);\n }\n this.fill = this.gradient;\n this.stroke = this.gradient;\n }\n this.setPropertyValue(\"colorMode\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagramLink.prototype, \"maskBullets\", {\n /**\r\n * @return mask bullets value\r\n */\n get: function get() {\n return this.getPropertyValue(\"maskBullets\");\n },\n /**\r\n * Should link bullets be masked or not\r\n *\r\n * @param value\r\n * @default false;\r\n */\n set: function set(value) {\n this.setPropertyValue(\"maskBullets\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagramLink.prototype, \"tooltipLocation\", {\n /**\r\n * Tooltip location value\r\n */\n get: function get() {\n return this.getPropertyValue(\"tooltipLocation\");\n },\n /**\r\n * Relative location of a tooltip.\r\n * @default 0.5\r\n *\r\n * @param value\r\n */\n set: function set(value) {\n this.setPropertyValue(\"tooltipLocation\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Adds color steps in the link gradient.\r\n *\r\n * @param value Fill option\r\n */\n FlowDiagramLink.prototype.setFill = function (value) {\n _super.prototype.setFill.call(this, value);\n var gradient = this._gradient;\n if (gradient && value instanceof Color) {\n gradient.stops.clear();\n gradient.addColor(value);\n gradient.addColor(value);\n }\n };\n /**\r\n * Updates bounding box based on element dimension settings.\r\n *\r\n * @ignore Exclude from docs\r\n */\n FlowDiagramLink.prototype.measureElement = function () {};\n Object.defineProperty(FlowDiagramLink.prototype, \"bullets\", {\n /**\r\n * List of bullets\r\n *\r\n * @return [description]\r\n */\n get: function get() {\n var _this = this;\n if (!this._bullets) {\n this._bullets = new ListTemplate(new Bullet());\n this._disposers.push(new ListDisposer(this._bullets));\n this._disposers.push(this._bullets.template);\n this._bullets.events.on(\"inserted\", function (event) {\n event.newValue.events.on(\"propertychanged\", function (event) {\n if (event.property == \"locationX\" || event.property == \"locationY\") {\n _this.positionBullet(event.target);\n }\n }, undefined, false);\n }, undefined, false);\n }\n return this._bullets;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies properties from another [[FlowDiagramLink]].\r\n *\r\n * @param source Source link\r\n */\n FlowDiagramLink.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.bullets.copyFrom(source.bullets);\n var middleLine = this.middleLine;\n if (middleLine) {\n if (middleLine instanceof Line && source.middleLine instanceof Line) {\n middleLine.copyFrom(source.middleLine);\n }\n if (middleLine instanceof Polyline && source.middleLine instanceof Polyline) {\n middleLine.copyFrom(source.middleLine);\n }\n }\n this.link.copyFrom(source.link);\n };\n /**\r\n * @ignore Exclude from docs\r\n * @return Tooltip X (px)\r\n */\n FlowDiagramLink.prototype.getTooltipX = function () {\n if (this.middleLine) {\n return this.middleLine.positionToPoint(this.tooltipLocation).x;\n }\n };\n /**\r\n * @ignore Exclude from docs\r\n * @return Tooltip Y (px)\r\n */\n FlowDiagramLink.prototype.getTooltipY = function () {\n if (this.middleLine) {\n return this.middleLine.positionToPoint(this.tooltipLocation).y;\n }\n };\n Object.defineProperty(FlowDiagramLink.prototype, \"gradient\", {\n /**\r\n * A gradiend instance that is used to provided colored gradient fills for\r\n * the Flow link.\r\n */\n get: function get() {\n if (!this._gradient) {\n this._gradient = new LinearGradient();\n }\n return this._gradient;\n },\n enumerable: true,\n configurable: true\n });\n return FlowDiagramLink;\n}(Container);\nexport { FlowDiagramLink };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"FlowDiagramLink\"] = FlowDiagramLink;","/**\r\n * FlowDiagram module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Chart, ChartDataItem } from \"../Chart\";\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\nimport { DictionaryTemplate, DictionaryDisposer } from \"../../core/utils/Dictionary\";\nimport { Container } from \"../../core/Container\";\nimport { registry } from \"../../core/Registry\";\nimport { FlowDiagramNode } from \"../elements/FlowDiagramNode\";\nimport { FlowDiagramLink } from \"../elements/FlowDiagramLink\";\nimport { LinearGradientModifier } from \"../../core/rendering/fills/LinearGradientModifier\";\nimport { ColorSet } from \"../../core/utils/ColorSet\";\nimport { toColor, Color } from \"../../core/utils/Color\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $number from \"../../core/utils/Number\";\nimport * as $order from \"../../core/utils/Order\";\nimport { Disposer } from \"../../core/utils/Disposer\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n//@todo rearange notes after dragged\n/**\r\n * Defines a [[DataItem]] for [[FlowDiagram]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar FlowDiagramDataItem = /** @class */function (_super) {\n tslib_1.__extends(FlowDiagramDataItem, _super);\n /**\r\n * Constructor\r\n */\n function FlowDiagramDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"FlowDiagramDataItem\";\n _this.values.value = {};\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(FlowDiagramDataItem.prototype, \"fromName\", {\n /**\r\n * @return name\r\n */\n get: function get() {\n return this.properties.fromName;\n },\n /**\r\n * Source node's name.\r\n *\r\n * @param value Name\r\n */\n set: function set(value) {\n this.setProperty(\"fromName\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagramDataItem.prototype, \"toName\", {\n /**\r\n * @return name\r\n */\n get: function get() {\n return this.properties.toName;\n },\n /**\r\n * Destination node's name.\r\n *\r\n * @param value Name\r\n */\n set: function set(value) {\n this.setProperty(\"toName\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagramDataItem.prototype, \"color\", {\n /**\r\n * @return color\r\n */\n get: function get() {\n return this.properties.color;\n },\n /**\r\n * Node color\r\n *\r\n * @param value Name\r\n */\n set: function set(value) {\n this.setProperty(\"color\", toColor(value));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagramDataItem.prototype, \"value\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.values.value.value;\n },\n /**\r\n * Link's value.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setValue(\"value\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagramDataItem.prototype, \"link\", {\n /**\r\n * A visual element, representing link between the source and target nodes.\r\n *\r\n * Link's actual thickness will be determined by `value` of this link and\r\n * `value` of the source node.\r\n *\r\n * @readonly\r\n * @return Link element\r\n */\n get: function get() {\n var _this = this;\n if (!this._link) {\n var link_1 = this.component.links.create();\n this._link = link_1;\n this.addSprite(link_1);\n this._disposers.push(new Disposer(function () {\n if (_this.component) {\n _this.component.links.removeValue(link_1);\n }\n }));\n }\n return this._link;\n },\n enumerable: true,\n configurable: true\n });\n return FlowDiagramDataItem;\n}(ChartDataItem);\nexport { FlowDiagramDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a Pie chart\r\n * @see {@link IFlowDiagramEvents} for a list of available Events\r\n * @see {@link IFlowDiagramAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar FlowDiagram = /** @class */function (_super) {\n tslib_1.__extends(FlowDiagram, _super);\n /**\r\n * Constructor\r\n */\n function FlowDiagram() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * A Color Set to use when applying/generating colors for each subsequent\r\n * node.\r\n */\n _this.colors = new ColorSet();\n _this.className = \"FlowDiagram\";\n _this.nodePadding = 20;\n _this.sortBy = \"none\";\n _this.sequencedInterpolation = true;\n _this.colors.step = 2;\n _this.minNodeSize = 0.02;\n var linksContainer = _this.chartContainer.createChild(Container);\n linksContainer.shouldClone = false;\n linksContainer.layout = \"none\";\n linksContainer.isMeasured = false;\n _this.linksContainer = linksContainer;\n var nodesContainer = _this.chartContainer.createChild(Container);\n nodesContainer.shouldClone = false;\n nodesContainer.layout = \"none\";\n nodesContainer.isMeasured = false;\n _this.nodesContainer = nodesContainer;\n // this data item holds sums, averages, etc\n _this.dataItem = _this.createDataItem();\n _this.dataItem.component = _this;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n FlowDiagram.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n this.dataItem.dispose();\n };\n /**\r\n * (Re)validates chart's data, effectively causing the chart to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\n FlowDiagram.prototype.validateData = function () {\n var _this = this;\n if (this._parseDataFrom == 0) {\n this.nodes.clear();\n }\n this.sortNodes();\n this.colors.reset();\n _super.prototype.validateData.call(this);\n var sum = 0;\n var count = 0;\n var low;\n var high;\n // build blocks\n $iter.each(this.dataItems.iterator(), function (dataItem) {\n var fromName = dataItem.fromName;\n if (fromName) {\n var node = _this.nodes.getKey(fromName);\n if (!node) {\n node = _this.nodes.create(fromName);\n node.name = fromName;\n node.chart = _this;\n node.dataItem = dataItem;\n }\n dataItem.fromNode = node;\n dataItem.fromNode.outgoingDataItems.push(dataItem);\n }\n var toName = dataItem.toName;\n if (toName) {\n var node = _this.nodes.getKey(toName);\n if (!node) {\n node = _this.nodes.create(toName);\n node.name = toName;\n node.chart = _this;\n node.dataItem = dataItem;\n }\n dataItem.toNode = node;\n dataItem.toNode.incomingDataItems.push(dataItem);\n }\n if (!dataItem.fromNode) {\n var strokeModifier = new LinearGradientModifier();\n strokeModifier.opacities = [0, 1];\n dataItem.link.strokeModifier = strokeModifier;\n }\n if (!dataItem.toNode) {\n var fillModifier = new LinearGradientModifier();\n fillModifier.opacities = [1, 0];\n dataItem.link.strokeModifier = fillModifier;\n }\n var value = dataItem.value;\n if ($type.isNumber(value)) {\n sum += value;\n count++;\n if (low > value || !$type.isNumber(low)) {\n low = value;\n }\n if (high < value || !$type.isNumber(high)) {\n high = value;\n }\n }\n });\n var key = \"value\";\n this.dataItem.setCalculatedValue(key, high, \"high\");\n this.dataItem.setCalculatedValue(key, low, \"low\");\n this.dataItem.setCalculatedValue(key, sum, \"sum\");\n this.dataItem.setCalculatedValue(key, sum / count, \"average\");\n this.dataItem.setCalculatedValue(key, count, \"count\");\n $iter.each(this.nodes.iterator(), function (strNode) {\n var node = strNode[1];\n if (node.fill instanceof Color) {\n node.color = node.fill;\n }\n if (node.color == undefined) {\n node.color = _this.colors.next();\n }\n if (node.dataItem.color != undefined) {\n node.color = node.dataItem.color;\n }\n if (!node.dataItem.visible) {\n node.hide(0);\n }\n _this.getNodeValue(node);\n });\n this.sortNodes();\n this.feedLegend();\n };\n /**\r\n * [handleDataItemWorkingValueChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\n FlowDiagram.prototype.handleDataItemWorkingValueChange = function (dataItem, name) {\n this.invalidate();\n };\n /**\r\n * Sorts nodes by either their values or names, based on `sortBy` setting.\r\n */\n FlowDiagram.prototype.sortNodes = function () {\n if (this.sortBy == \"name\") {\n this._sorted = this.nodes.sortedIterator();\n } else if (this.sortBy == \"value\") {\n this._sorted = $iter.sort(this.nodes.iterator(), function (x, y) {\n return $order.reverse($number.order(x[1].total, y[1].total));\n });\n } else {\n this._sorted = this.nodes.iterator();\n }\n };\n /**\r\n * Updates a cummulative value of the node.\r\n *\r\n * A node's value is determined by summing values of all of the incoming\r\n * links or all of the outgoing links, whichever results in bigger number.\r\n *\r\n * @param node Node value\r\n */\n FlowDiagram.prototype.getNodeValue = function (node) {\n // todo: totalIncomming totalOutgoing, total\n var incomingTotal = 0;\n var outgoingTotal = 0;\n $iter.each(node.incomingDataItems.iterator(), function (dataItem) {\n var value = dataItem.getWorkingValue(\"value\");\n if ($type.isNumber(value)) {\n incomingTotal += value;\n }\n });\n $iter.each(node.outgoingDataItems.iterator(), function (dataItem) {\n var value = dataItem.getWorkingValue(\"value\");\n if ($type.isNumber(value)) {\n outgoingTotal += value;\n }\n });\n node.total = incomingTotal + outgoingTotal;\n node.totalIncoming = incomingTotal;\n node.totalOutgoing = outgoingTotal;\n };\n ;\n /**\r\n * Changes the sort type of the nodes.\r\n *\r\n * This will actually reshuffle nodes using nice animation.\r\n */\n FlowDiagram.prototype.changeSorting = function () {\n this.sortNodes();\n };\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n FlowDiagram.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n // Add a default screen reader title for accessibility\n // This will be overridden in screen reader if there are any `titles` set\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Flow diagram\");\n }\n };\n /**\r\n * Creates and returns a new data item.\r\n *\r\n * @return Data item\r\n */\n FlowDiagram.prototype.createDataItem = function () {\n return new FlowDiagramDataItem();\n };\n Object.defineProperty(FlowDiagram.prototype, \"nodePadding\", {\n /**\r\n * @return Padding (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"nodePadding\");\n },\n /**\r\n * Padding for node square in pixels.\r\n *\r\n * Padding will add extra space around node's name label.\r\n *\r\n * @param value Padding (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"nodePadding\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagram.prototype, \"sortBy\", {\n /**\r\n * @returns Node sorting\r\n */\n get: function get() {\n return this.getPropertyValue(\"sortBy\");\n },\n /**\r\n * Sort nodes by \"name\" or \"value\" or do not sort at all. If not sorted, nodes will appear in the same order as they are in the data.\r\n * @default \"none\"\r\n * @param value Node sorting\r\n */\n set: function set(value) {\n this.setPropertyValue(\"sortBy\", value);\n this.changeSorting();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagram.prototype, \"minNodeSize\", {\n /**\r\n * @returns min node size\r\n */\n get: function get() {\n return this.getPropertyValue(\"minNodeSize\");\n },\n /**\r\n * Sometimes nodes can get very small if their value is little. With this setting you\r\n * can set min size of a node (this is relative value from the total size of all nodes)\r\n * @default 0.02\r\n * @param value Node sorting\r\n */\n set: function set(value) {\n this.setPropertyValue(\"minNodeSize\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FlowDiagram.prototype, \"nodes\", {\n /**\r\n * A list of chart's nodes.\r\n *\r\n * @param {DictionaryTemplate}\r\n */\n get: function get() {\n if (!this._nodes) {\n var template = this.createNode();\n template.events.on(\"hit\", function (event) {\n event.target.handleHit(event);\n });\n this._nodes = new DictionaryTemplate(template);\n this._disposers.push(new DictionaryDisposer(this._nodes));\n }\n return this._nodes;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n */\n FlowDiagram.prototype.createNode = function () {\n var node = new FlowDiagramNode();\n this._disposers.push(node);\n return node;\n };\n Object.defineProperty(FlowDiagram.prototype, \"links\", {\n /**\r\n * A list of chart's links.\r\n *\r\n * @param {ListTemplate}\r\n */\n get: function get() {\n if (!this._links) {\n this._links = new ListTemplate(this.createLink());\n this._disposers.push(new ListDisposer(this._links));\n }\n return this._links;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n */\n FlowDiagram.prototype.createLink = function () {\n var link = new FlowDiagramLink();\n this._disposers.push(link);\n return link;\n };\n /**\r\n * Setups the legend to use the chart's data.\r\n * @ignore\r\n */\n FlowDiagram.prototype.feedLegend = function () {\n var legend = this.legend;\n if (legend) {\n var legendData_1 = [];\n this.nodes.each(function (key, node) {\n legendData_1.push(node);\n });\n legend.data = legendData_1;\n legend.dataFields.name = \"name\";\n }\n };\n /**\r\n * @ignore\r\n */\n FlowDiagram.prototype.disposeData = function () {\n _super.prototype.disposeData.call(this);\n this.nodes.clear();\n };\n return FlowDiagram;\n}(Chart);\nexport { FlowDiagram };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"FlowDiagram\"] = FlowDiagram;","/**\r\n * Bullet module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Bullet } from \"./Bullet\";\nimport { Label } from \"../../core/elements/Label\";\nimport { registry } from \"../../core/Registry\";\nimport { color } from \"../../core/utils/Color\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a bullet with a textual label.\r\n *\r\n * Uses [[Label]] instance to draw the label, so the label itself is\r\n * configurable.\r\n *\r\n * @see {@link IBulletEvents} for a list of available events\r\n * @see {@link IBulletAdapters} for a list of available Adapters\r\n * @todo Usage example\r\n * @important\r\n */\nvar LabelBullet = /** @class */function (_super) {\n tslib_1.__extends(LabelBullet, _super);\n /**\r\n * Constructor\r\n */\n function LabelBullet() {\n var _this = _super.call(this) || this;\n _this.className = \"LabelBullet\";\n var label = _this.createChild(Label);\n label.shouldClone = false;\n label.verticalCenter = \"middle\";\n label.horizontalCenter = \"middle\";\n label.truncate = true;\n label.hideOversized = false;\n label.maxWidth = 500;\n label.maxHeight = 500;\n label.stroke = color();\n label.strokeOpacity = 0;\n label.fill = new InterfaceColorSet().getFor(\"text\");\n _this.events.on(\"maxsizechanged\", _this.handleMaxSize, _this, false);\n _this.label = label;\n // not good, as lineSeries will have labels somewhere in the middle.\n //this.locationX = 0.5;\n //this.locationY = 0.5;\n _this.applyTheme();\n return _this;\n }\n LabelBullet.prototype.handleMaxSize = function () {\n this.label.maxWidth = this.maxWidth;\n this.label.maxHeight = this.maxHeight;\n };\n /**\r\n * Copies all proprities and related stuff from another instance of\r\n * [[LabelBullet]].\r\n *\r\n * @param source Source element\r\n */\n LabelBullet.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.label.copyFrom(source.label);\n };\n return LabelBullet;\n}(Bullet);\nexport { LabelBullet };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"LabelBullet\"] = LabelBullet;","/**\r\n * SankeyNode module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { FlowDiagramNode } from \"./FlowDiagramNode\";\nimport { LabelBullet } from \"./LabelBullet\";\nimport { registry } from \"../../core/Registry\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $utils from \"../../core/utils/Utils\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a node in a Sankey Diagram.\r\n *\r\n * A Sankey node is a block with a value, which represents its size on the\r\n * diagram.\r\n *\r\n * Nodes are connected via [[SankeyLink]] elements.\r\n *\r\n * @see {@link ISankeyNodeEvents} for a list of available events\r\n * @see {@link ISankeyNodeAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar SankeyNode = /** @class */function (_super) {\n tslib_1.__extends(SankeyNode, _super);\n /**\r\n * Constructor\r\n */\n function SankeyNode() {\n var _this = _super.call(this) || this;\n /**\r\n * [nextInCoord description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n _this.nextInCoord = 0;\n /**\r\n * [nextOutCoord description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n _this.nextOutCoord = 0;\n _this.className = \"SankeyNode\";\n _this.width = 10;\n _this.height = 10;\n var nameLabel = _this.createChild(LabelBullet);\n nameLabel.shouldClone = false;\n //@should we auto update these locations if position is changed?\n nameLabel.locationX = 1;\n nameLabel.locationY = 0.5;\n nameLabel.label.text = \"{name}\";\n //nameLabel.label.textElement.hideOversized = false;\n nameLabel.width = 150;\n nameLabel.height = 150;\n nameLabel.label.horizontalCenter = \"left\";\n nameLabel.label.padding(0, 5, 0, 5);\n _this.nameLabel = nameLabel;\n var valueLabel = _this.createChild(LabelBullet);\n valueLabel.shouldClone = false;\n valueLabel.label.hideOversized = false;\n valueLabel.locationX = 0.5;\n valueLabel.locationY = 0.5;\n valueLabel.width = 150;\n valueLabel.height = 150;\n //valueLabel.label.text = \"{value}\";\n valueLabel.label.horizontalCenter = \"middle\";\n _this.valueLabel = valueLabel;\n var hiddenState = _this.hiddenState;\n hiddenState.properties.fill = new InterfaceColorSet().getFor(\"disabledBackground\");\n hiddenState.properties.opacity = 0.5;\n hiddenState.properties.visible = true;\n _this.background.hiddenState.copyFrom(hiddenState);\n return _this;\n }\n /**\r\n * Invalidates all links, attached to this node.\r\n *\r\n * @ignore Exclude from docs\r\n */\n SankeyNode.prototype.invalidateLinks = function () {\n var _this = this;\n _super.prototype.invalidateLinks.call(this);\n this.nextInCoord = 0;\n this.nextOutCoord = 0;\n var chart = this.chart;\n if (chart) {\n var orientation_1 = chart.orientation;\n if (this._incomingSorted) {\n $iter.each(this._incomingSorted, function (dataItem) {\n var link = dataItem.link;\n var value = dataItem.getWorkingValue(\"value\");\n if ($type.isNumber(value)) {\n link.parent = _this.chart.linksContainer;\n var x = void 0;\n var y = void 0;\n var angle = void 0;\n if (orientation_1 == \"horizontal\") {\n x = _this.pixelX + _this.dx;\n y = _this.nextInCoord + _this.pixelY + _this.dy;\n angle = 0;\n } else {\n y = _this.pixelY + _this.dy;\n x = _this.nextInCoord + _this.pixelX + _this.dx;\n angle = 90;\n }\n link.endX = x;\n link.endY = y;\n link.startAngle = angle;\n link.endAngle = angle;\n link.gradient.rotation = angle;\n link.linkWidth = value * chart.valueHeight;\n if (!dataItem.fromNode) {\n if (orientation_1 == \"horizontal\") {\n link.maxWidth = 200;\n link.startX = _this.pixelX + _this.dx - link.maxWidth;\n link.startY = link.endY;\n } else {\n link.maxHeight = 200;\n link.startX = link.endX;\n link.startY = _this.pixelY + _this.dy - link.maxHeight;\n }\n // TODO is this needed ?\n $utils.used(link.gradient);\n link.fill = dataItem.toNode.color;\n var stop_1 = link.gradient.stops.getIndex(0);\n if (stop_1) {\n if (link.colorMode == \"gradient\") {\n stop_1.color = _this.color;\n }\n stop_1.opacity = 0;\n link.fill = link.gradient;\n link.stroke = link.gradient;\n link.gradient.validate();\n }\n }\n //link.validate();\n _this.nextInCoord += link.linkWidth;\n }\n });\n }\n if (this._outgoingSorted) {\n $iter.each(this._outgoingSorted, function (dataItem) {\n var link = dataItem.link;\n link.parent = _this.chart.linksContainer;\n var value = dataItem.getWorkingValue(\"value\");\n if ($type.isNumber(value)) {\n var x = void 0;\n var y = void 0;\n var angle = void 0;\n if (orientation_1 == \"horizontal\") {\n angle = 0;\n x = _this.pixelX + _this.pixelWidth + _this.dx - 1;\n y = _this.nextOutCoord + _this.pixelY + _this.dy;\n } else {\n angle = 90;\n x = _this.nextOutCoord + _this.pixelX + _this.dx;\n y = _this.pixelY + _this.pixelHeight + _this.dy - 1;\n }\n link.startX = x;\n link.startY = y;\n link.startAngle = angle;\n link.endAngle = angle;\n link.gradient.rotation = angle;\n link.linkWidth = value * _this.chart.valueHeight;\n if (!dataItem.toNode) {\n if (orientation_1 == \"horizontal\") {\n link.maxWidth = 200;\n link.endX = _this.pixelX + link.maxWidth + _this.dx;\n link.endY = link.startY;\n } else {\n link.maxHeight = 200;\n link.endX = link.startX;\n link.endY = _this.pixelY + link.maxHeight + _this.dy;\n }\n link.opacity = _this.opacity;\n var stop_2 = link.gradient.stops.getIndex(1);\n if (stop_2) {\n if (link.colorMode == \"gradient\") {\n stop_2.color = _this.color;\n }\n stop_2.opacity = 0;\n link.fill = link.gradient;\n link.stroke = link.gradient;\n link.gradient.validate();\n }\n }\n //link.validate();\n _this.nextOutCoord += link.linkWidth;\n }\n });\n }\n }\n this.positionBullet(this.nameLabel);\n this.positionBullet(this.valueLabel);\n };\n /**\r\n * Positions the bullet so it is centered within the node element.\r\n *\r\n * @param bullet Target bullet\r\n */\n SankeyNode.prototype.positionBullet = function (bullet) {\n if (bullet) {\n bullet.x = this.measuredWidth * bullet.locationX;\n bullet.y = this.measuredHeight * bullet.locationY;\n }\n };\n Object.defineProperty(SankeyNode.prototype, \"level\", {\n /**\r\n * @return Level\r\n */\n get: function get() {\n return this.getPropertyValue(\"level\");\n },\n /**\r\n * A level node is displayed at. (0 - ...)\r\n *\r\n * Levels are measured from left to right.\r\n *\r\n * The nodes in the left-most column will have `level = 0`.\r\n *\r\n * Nodes in second column - `level = 1`, etc.\r\n *\r\n * @param value Level\r\n */\n set: function set(value) {\n this.setPropertyValue(\"level\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies properties and labels from another [[SankeyNode]].\r\n *\r\n * @param source Source node\r\n */\n SankeyNode.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.nameLabel.copyFrom(source.nameLabel);\n this.valueLabel.copyFrom(source.valueLabel);\n };\n return SankeyNode;\n}(FlowDiagramNode);\nexport { SankeyNode };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"SankeyNode\"] = SankeyNode;","/**\r\n * SankeyLink module\r\n */\nimport * as tslib_1 from \"tslib\";\nimport { FlowDiagramLink } from \"./FlowDiagramLink\";\nimport { registry } from \"../../core/Registry\";\nimport { Polyspline } from \"../../core/elements/Polyspline\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $smoothing from \"../../core/rendering/Smoothing\";\nimport * as $path from \"../../core/rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * This class creates a link (waved color-filled line) between two nodes in a\r\n * Sankey Diagram.\r\n *\r\n * @see {@link ISankeyLinkEvents} for a list of available events\r\n * @see {@link ISankeyLinkAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar SankeyLink = /** @class */function (_super) {\n tslib_1.__extends(SankeyLink, _super);\n /**\r\n * Constructor\r\n */\n function SankeyLink() {\n var _this = _super.call(this) || this;\n _this.className = \"SankeyLink\";\n // TODO can this be removed ?\n new InterfaceColorSet();\n _this.tension = 0.8;\n _this.controlPointDistance = 0.2;\n _this.startAngle = 0;\n _this.endAngle = 0;\n _this.linkWidth = 0;\n _this.startX = 0;\n _this.endX = 0;\n _this.startY = 0;\n _this.endY = 0;\n _this.middleLine = _this.createChild(Polyspline);\n _this.middleLine.shouldClone = false;\n _this.middleLine.strokeOpacity = 0;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * (Re)validates (redraws) the link.\r\n *\r\n * @ignore Exclude from docs\r\n */\n SankeyLink.prototype.validate = function () {\n _super.prototype.validate.call(this);\n if (!this.isTemplate) {\n var x0 = this.startX;\n var y0 = this.startY;\n var x1 = this.endX;\n var y1 = this.endY;\n if (!$type.isNumber(x1)) {\n x1 = x0;\n }\n if (!$type.isNumber(y1)) {\n y1 = y0;\n }\n var startAngle = this.startAngle;\n var endAngle = this.endAngle;\n var w = this.linkWidth;\n var path = \"\";\n var xt0 = x0;\n var yt0 = y0;\n var xt1 = x1;\n var yt1 = y1;\n var xb0 = x0 + w * $math.sin(startAngle);\n var xb1 = x1 + w * $math.sin(endAngle);\n var yb0 = y0 + w * $math.cos(startAngle);\n var yb1 = y1 + w * $math.cos(endAngle);\n var xm0 = x0 + w / 2 * $math.sin(startAngle);\n var xm1 = x1 + w / 2 * $math.sin(endAngle);\n var ym0 = y0 + w / 2 * $math.cos(startAngle);\n var ym1 = y1 + w / 2 * $math.cos(endAngle);\n this.zIndex = this.zIndex || this.dataItem.index;\n var tensionX = this.tension + (1 - this.tension) * $math.sin(startAngle);\n var tensionY = this.tension + (1 - this.tension) * $math.cos(startAngle);\n this.middleLine.tensionX = tensionX;\n this.middleLine.tensionY = tensionY;\n if ($type.isNumber(w) && $type.isNumber(x0) && $type.isNumber(x1) && $type.isNumber(y0) && $type.isNumber(y1)) {\n // solves issues with gradient fill of straight lines\n if ($math.round(xt0, 3) == $math.round(xt1, 3)) {\n xt1 += 0.01;\n }\n if ($math.round(yt0, 3) == $math.round(yt1, 3)) {\n yt1 += 0.01;\n }\n if ($math.round(xb0, 3) == $math.round(xb1, 3)) {\n xb1 += 0.01;\n }\n if ($math.round(yb0, 3) == $math.round(yb1, 3)) {\n yb1 += 0.01;\n }\n var minX = Math.min(xb0, xb1, xt0, xt1);\n var minY = Math.min(yb0, yb1, yt0, yt1);\n var maxX = Math.max(xb0, xb1, xt0, xt1);\n var maxY = Math.max(yb0, yb1, yt0, yt1);\n this._bbox = {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n var cpd = this.controlPointDistance;\n var kxt0 = xt0 + (xt1 - xt0) * cpd * $math.cos(startAngle);\n var kyt0 = yt0 + (yt1 - yt0) * cpd * $math.sin(startAngle);\n var kxt1 = xt1 - (xt1 - xt0) * cpd * $math.cos(endAngle);\n var kyt1 = yt1 - (yt1 - yt0) * cpd * $math.sin(endAngle);\n var kxm0 = xm0 + (xm1 - xm0) * cpd * $math.cos(startAngle);\n var kym0 = ym0 + (ym1 - ym0) * cpd * $math.sin(startAngle);\n var kxm1 = xm1 - (xm1 - xm0) * cpd * $math.cos(endAngle);\n var kym1 = ym1 - (ym1 - ym0) * cpd * $math.sin(endAngle);\n var angle = $math.getAngle({\n x: kxt0,\n y: kyt0\n }, {\n x: kxt1,\n y: kyt1\n });\n var dx = (w / $math.cos(angle) - w) / $math.tan(angle) * $math.cos(startAngle);\n var dy = (w / $math.sin(angle) - w) * $math.tan(angle) * $math.sin(startAngle);\n var kxb0 = -dx / 2 + xb0 + (xb1 - xb0) * cpd * $math.cos(startAngle);\n var kyb0 = -dy / 2 + yb0 + (yb1 - yb0) * cpd * $math.sin(startAngle);\n var kxb1 = -dx / 2 + xb1 - (xb1 - xb0) * cpd * $math.cos(endAngle);\n var kyb1 = -dy / 2 + yb1 - (yb1 - yb0) * cpd * $math.sin(endAngle);\n this.middleLine.segments = [[{\n x: xm0,\n y: ym0\n }, {\n x: kxm0,\n y: kym0\n }, {\n x: kxm1,\n y: kym1\n }, {\n x: xm1,\n y: ym1\n }]];\n kxt0 += dx / 2;\n kyt0 += dy / 2;\n kxt1 += dx / 2;\n kyt1 += dy / 2;\n path += $path.moveTo({\n x: xt0,\n y: yt0\n });\n path += new $smoothing.Tension(tensionX, tensionY).smooth([{\n x: xt0,\n y: yt0\n }, {\n x: kxt0,\n y: kyt0\n }, {\n x: kxt1,\n y: kyt1\n }, {\n x: xt1,\n y: yt1\n }]);\n path += $path.lineTo({\n x: xb1,\n y: yb1\n });\n path += new $smoothing.Tension(tensionX, tensionY).smooth([{\n x: xb1,\n y: yb1\n }, {\n x: kxb1,\n y: kyb1\n }, {\n x: kxb0,\n y: kyb0\n }, {\n x: xb0,\n y: yb0\n }]);\n path += $path.closePath();\n }\n this.link.path = path;\n if (this.maskBullets) {\n this.bulletsMask.path = path;\n this.bulletsContainer.mask = this.bulletsMask;\n }\n this.positionBullets();\n }\n };\n Object.defineProperty(SankeyLink.prototype, \"startX\", {\n /**\r\n * @return Start X\r\n */\n get: function get() {\n return this.getPropertyValue(\"startX\");\n },\n /**\r\n * [startX description]\r\n *\r\n * @todo Description\r\n * @param value Start X\r\n */\n set: function set(value) {\n this.setPropertyValue(\"startX\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SankeyLink.prototype, \"endX\", {\n /**\r\n * @return End X\r\n */\n get: function get() {\n return this.getPropertyValue(\"endX\");\n },\n /**\r\n * [endX description]\r\n *\r\n * @todo Description\r\n * @param value End X\r\n */\n set: function set(value) {\n this.setPropertyValue(\"endX\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SankeyLink.prototype, \"startY\", {\n /**\r\n * @return Start Y\r\n */\n get: function get() {\n return this.getPropertyValue(\"startY\");\n },\n /**\r\n * [startY description]\r\n *\r\n * @todo Description\r\n * @param value Start Y\r\n */\n set: function set(value) {\n this.setPropertyValue(\"startY\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SankeyLink.prototype, \"endY\", {\n /**\r\n * @return End Y\r\n */\n get: function get() {\n return this.getPropertyValue(\"endY\");\n },\n /**\r\n * [endY description]\r\n *\r\n * @todo Description\r\n * @param value End Y\r\n */\n set: function set(value) {\n this.setPropertyValue(\"endY\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SankeyLink.prototype, \"linkWidth\", {\n /**\r\n * @return [description]\r\n */\n get: function get() {\n return this.getPropertyValue(\"linkWidth\");\n },\n /**\r\n * [linkWidth description]\r\n *\r\n * @todo Description\r\n * @param value [description]\r\n */\n set: function set(value) {\n this.setPropertyValue(\"linkWidth\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SankeyLink.prototype, \"controlPointDistance\", {\n /**\r\n * @return relative control point distance\r\n */\n get: function get() {\n return this.getPropertyValue(\"controlPointDistance\");\n },\n /**\r\n * Distance of control point of a link, defines relative distance from a node at which linke should bend\r\n * @default 0.2\r\n * @param value\r\n */\n set: function set(value) {\n this.setPropertyValue(\"controlPointDistance\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SankeyLink.prototype, \"tension\", {\n /**\r\n * @return tension value\r\n */\n get: function get() {\n return this.getPropertyValue(\"tension\");\n },\n /**\r\n * Tension of a spline, 1 would make the link to have sharp edges\r\n * @default 0.8\r\n * @param value\r\n */\n set: function set(value) {\n this.setPropertyValue(\"tension\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n return SankeyLink;\n}(FlowDiagramLink);\nexport { SankeyLink };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"SankeyLink\"] = SankeyLink;","/**\r\n * Sankey diagram module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { FlowDiagram, FlowDiagramDataItem } from \"./FlowDiagram\";\nimport { percent } from \"../../core/utils/Percent\";\nimport { registry } from \"../../core/Registry\";\nimport { SankeyNode } from \"../elements/SankeyNode\";\nimport { SankeyLink } from \"../elements/SankeyLink\";\nimport { Animation } from \"../../core/utils/Animation\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $object from \"../../core/utils/Object\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n//@todo rearange notes after dragged\n/**\r\n * Defines a [[DataItem]] for [[SankeyDiagram]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar SankeyDiagramDataItem = /** @class */function (_super) {\n tslib_1.__extends(SankeyDiagramDataItem, _super);\n /**\r\n * Constructor\r\n */\n function SankeyDiagramDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"SankeyDiagramDataItem\";\n _this.applyTheme();\n return _this;\n }\n return SankeyDiagramDataItem;\n}(FlowDiagramDataItem);\nexport { SankeyDiagramDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a Sankey Diagram chart.\r\n *\r\n * @see {@link ISankeyDiagramEvents} for a list of available Events\r\n * @see {@link ISankeyDiagramAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/sankey-diagram/} for documentation\r\n * @important\r\n */\nvar SankeyDiagram = /** @class */function (_super) {\n tslib_1.__extends(SankeyDiagram, _super);\n /**\r\n * Constructor\r\n */\n function SankeyDiagram() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"SankeyDiagram\";\n _this.orientation = \"horizontal\";\n _this.nodeAlign = \"middle\";\n _this.nodesContainer.width = percent(100);\n _this.nodesContainer.height = percent(100);\n _this.linksContainer.width = percent(100);\n _this.linksContainer.height = percent(100);\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * (Re)validates chart's data, effectively causing the chart to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\n SankeyDiagram.prototype.validateData = function () {\n var _this = this;\n _super.prototype.validateData.call(this);\n this._levelCount = 0;\n this.nodes.each(function (key, node) {\n node.level = _this.getNodeLevel(node, 0);\n _this._levelCount = $math.max(_this._levelCount, node.level);\n });\n };\n /**\r\n * Returns node's highest level.\r\n *\r\n * @param node Node\r\n * @param level Current level\r\n * @return New level\r\n */\n SankeyDiagram.prototype.getNodeLevel = function (node, level) {\n var _this = this;\n //@todo solve circular so\n var levels = [level];\n $iter.each(node.incomingDataItems.iterator(), function (link) {\n if (link.fromNode) {\n levels.push(_this.getNodeLevel(link.fromNode, level + 1));\n }\n });\n return Math.max.apply(Math, tslib_1.__spread(levels));\n };\n /**\r\n * Calculates relation between pixel height and total value.\r\n *\r\n * In Sankey the actual thickness of links and height of nodes will depend\r\n * on their values.\r\n */\n SankeyDiagram.prototype.calculateValueHeight = function () {\n var _this = this;\n // calculate sums of each level\n this._levelSum = {};\n this._levelNodesCount = {};\n this.maxSum = 0;\n var total = this.dataItem.values.value.sum;\n $iter.each(this._sorted, function (strNode) {\n var node = strNode[1];\n _this.getNodeValue(node);\n });\n this.nodes.each(function (key, node) {\n var level = node.level;\n var value = Math.max(node.totalIncoming, node.totalOutgoing);\n if (value / total < _this.minNodeSize) {\n value = total * _this.minNodeSize;\n }\n if ($type.isNumber(_this._levelSum[level])) {\n _this._levelSum[level] += value;\n } else {\n _this._levelSum[level] = value;\n }\n if ($type.isNumber(_this._levelNodesCount[level])) {\n _this._levelNodesCount[level]++;\n } else {\n _this._levelNodesCount[level] = 1;\n }\n });\n var availableHeight;\n if (this.orientation == \"horizontal\") {\n availableHeight = this.chartContainer.maxHeight - 1;\n } else {\n availableHeight = this.chartContainer.maxWidth - 1;\n }\n var maxSumLevel;\n $object.each(this._levelSum, function (key, value) {\n var realValue = value;\n value = value * availableHeight / (availableHeight - (_this._levelNodesCount[key] - 1) * _this.nodePadding);\n if (_this.maxSum < value) {\n _this.maxSum = realValue;\n maxSumLevel = $type.toNumber(key);\n }\n });\n this._maxSumLevel = maxSumLevel;\n var maxSumLevelNodeCount = this._levelNodesCount[this._maxSumLevel];\n var valueHeight = (availableHeight - (maxSumLevelNodeCount - 1) * this.nodePadding) / this.maxSum;\n if (!$type.isNumber(this.valueHeight)) {\n this.valueHeight = valueHeight;\n } else {\n var finalHeight = void 0;\n try {\n finalHeight = this._heightAnimation.animationOptions[0].to;\n } catch (err) {}\n // without animations it will be non-smooth as maxValue jumps from one column to another\n if (finalHeight != valueHeight) {\n var duration = this.interpolationDuration;\n try {\n duration = this.nodes.template.states.getKey(\"active\").transitionDuration;\n } catch (err) {}\n this._heightAnimation = new Animation(this, {\n property: \"valueHeight\",\n from: this.valueHeight,\n to: valueHeight\n }, duration).start();\n this._disposers.push(this._heightAnimation);\n }\n }\n };\n /**\r\n * Redraws the chart.\r\n *\r\n * @ignore Exclude from docs\r\n */\n SankeyDiagram.prototype.validate = function () {\n var _this = this;\n _super.prototype.validate.call(this);\n this.calculateValueHeight();\n var container = this.nodesContainer;\n var nextCoordinate = {};\n var maxSumLevelNodeCount = this._levelNodesCount[this._maxSumLevel];\n var total = this.dataItem.values.value.sum;\n $iter.each(this._sorted, function (strNode) {\n var node = strNode[1];\n var level = node.level;\n var levelCoordinate = 0;\n var nodeCount = _this._levelNodesCount[level];\n switch (_this.nodeAlign) {\n case \"bottom\":\n levelCoordinate = (_this.maxSum - _this._levelSum[level]) * _this.valueHeight - (nodeCount - maxSumLevelNodeCount) * _this.nodePadding;\n break;\n case \"middle\":\n levelCoordinate = (_this.maxSum - _this._levelSum[level]) * _this.valueHeight / 2 - (nodeCount - maxSumLevelNodeCount) * _this.nodePadding / 2;\n break;\n }\n node.parent = container;\n var delta;\n var x;\n var y;\n var value = Math.max(node.totalIncoming, node.totalOutgoing);\n if (value / total < _this.minNodeSize) {\n value = total * _this.minNodeSize;\n }\n if (_this.orientation == \"horizontal\") {\n delta = (_this.innerWidth - node.pixelWidth) / _this._levelCount;\n x = delta * node.level;\n y = nextCoordinate[level] || levelCoordinate;\n var h = value * _this.valueHeight;\n node.height = h;\n node.minX = x;\n node.maxX = x;\n nextCoordinate[level] = y + h + _this.nodePadding;\n } else {\n delta = (_this.innerHeight - node.pixelHeight) / _this._levelCount;\n x = nextCoordinate[level] || levelCoordinate;\n y = delta * node.level;\n var w = value * _this.valueHeight;\n node.width = w;\n node.minY = y;\n node.maxY = y;\n nextCoordinate[level] = x + w + _this.nodePadding;\n }\n node.x = x;\n node.y = y;\n });\n };\n /**\r\n * Performs actual operations to reveal this element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param duration Fade in duration (ms)\r\n * @return Fade in duration (ms)\r\n */\n SankeyDiagram.prototype.showReal = function (duration) {\n var _this = this;\n if (this.interpolationDuration > 0) {\n var container_1 = this.nodesContainer;\n var i_1 = 0;\n $iter.each(this.links.iterator(), function (link) {\n link.hide(0);\n });\n $iter.each(this._sorted, function (strNode) {\n var node = strNode[1];\n var property;\n if (_this.orientation == \"horizontal\") {\n node.dx = -(container_1.pixelWidth - node.pixelWidth) / _this._levelCount;\n property = \"dx\";\n } else {\n node.dy = -(container_1.pixelHeight - node.pixelHeight) / _this._levelCount;\n property = \"dy\";\n }\n var delay = 0;\n var duration = _this.interpolationDuration;\n if (_this.sequencedInterpolation) {\n delay = _this.sequencedInterpolationDelay * i_1 + duration * i_1 / $iter.length(_this.nodes.iterator());\n }\n node.opacity = 0;\n node.invalidateLinks();\n node.animate([{\n property: \"opacity\",\n from: 0,\n to: 1\n }, {\n property: property,\n to: 0\n }], _this.interpolationDuration, _this.interpolationEasing).delay(delay);\n $iter.each(node.outgoingDataItems.iterator(), function (dataItem) {\n var animation = dataItem.link.show(_this.interpolationDuration);\n if (animation && !animation.isFinished()) {\n animation.delay(delay);\n }\n });\n $iter.each(node.incomingDataItems.iterator(), function (dataItem) {\n if (!dataItem.fromNode) {\n var animation = dataItem.link.show(_this.interpolationDuration);\n if (animation && !animation.isFinished()) {\n animation.delay(delay);\n }\n }\n });\n i_1++;\n });\n }\n return _super.prototype.showReal.call(this);\n };\n /**\r\n * Changes the sort type of the nodes.\r\n *\r\n * This will actually reshuffle nodes using nice animation.\r\n */\n SankeyDiagram.prototype.changeSorting = function () {\n var _this = this;\n this.sortNodes();\n var nextCoordinate = {};\n $iter.each(this._sorted, function (strNode) {\n var node = strNode[1];\n var level = node.level;\n var levelCoordinate = (_this.maxSum - _this._levelSum[level]) * _this.valueHeight / 2;\n var property;\n var nodeHeight;\n if (_this.orientation == \"horizontal\") {\n property = \"y\";\n nodeHeight = node.pixelHeight;\n } else {\n property = \"x\";\n nodeHeight = node.pixelWidth;\n }\n node.animate({\n property: property,\n to: nextCoordinate[level] || levelCoordinate\n }, _this.interpolationDuration, _this.interpolationEasing);\n nextCoordinate[level] = (nextCoordinate[level] || levelCoordinate) + nodeHeight + _this.nodePadding;\n node.invalidateLinks();\n });\n };\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n SankeyDiagram.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n // Add a default screen reader title for accessibility\n // This will be overridden in screen reader if there are any `titles` set\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Sankey diagram\");\n }\n };\n /**\r\n * Creates and returns a new data item.\r\n *\r\n * @return Data item\r\n */\n SankeyDiagram.prototype.createDataItem = function () {\n return new SankeyDiagramDataItem();\n };\n Object.defineProperty(SankeyDiagram.prototype, \"nodeAlign\", {\n /**\r\n * @returns Returns nodeAlign value\r\n */\n get: function get() {\n return this.getPropertyValue(\"nodeAlign\");\n },\n /**\r\n * How to align nodes. In case layout is vertical, top means left and bottom means right\r\n *\r\n * @param value Node sorting\r\n */\n set: function set(value) {\n this.setPropertyValue(\"nodeAlign\", value);\n this.changeSorting();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SankeyDiagram.prototype, \"orientation\", {\n /**\r\n * @return Orientation\r\n */\n get: function get() {\n return this.getPropertyValue(\"orientation\");\n },\n /**\r\n * Orientation of the chart: \"horizontal\" or \"vertical\";\r\n *\r\n * @param value Orientation\r\n */\n set: function set(value) {\n this.setPropertyValue(\"orientation\", value, true);\n var nameLabel = this.nodes.template.nameLabel;\n if (value == \"vertical\") {\n this.nodes.template.width = undefined;\n nameLabel.label.horizontalCenter = \"middle\";\n nameLabel.locationX = 0.5;\n } else {\n this.nodes.template.height = undefined;\n nameLabel.label.horizontalCenter = \"left\";\n nameLabel.locationX = 1;\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n */\n SankeyDiagram.prototype.createNode = function () {\n var node = new SankeyNode();\n this._disposers.push(node);\n return node;\n };\n /**\r\n * @ignore\r\n */\n SankeyDiagram.prototype.createLink = function () {\n var link = new SankeyLink();\n this._disposers.push(link);\n return link;\n };\n Object.defineProperty(SankeyDiagram.prototype, \"valueHeight\", {\n /**\r\n * @ignore\r\n */\n get: function get() {\n return this._valueHeight;\n },\n /**\r\n * @ignore\r\n */\n set: function set(value) {\n if (value != this._valueHeight) {\n this._valueHeight = value;\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n */\n SankeyDiagram.prototype.disposeData = function () {\n _super.prototype.disposeData.call(this);\n this._sorted = this.nodes.iterator();\n };\n return SankeyDiagram;\n}(FlowDiagram);\nexport { SankeyDiagram };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"SankeyDiagram\"] = SankeyDiagram;","/**\r\n * ChordNode module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { FlowDiagramNode } from \"./FlowDiagramNode\";\nimport { AxisLabelCircular } from \"../axes/AxisLabelCircular\";\nimport { registry } from \"../../core/Registry\";\nimport { Slice } from \"../../core/elements/Slice\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $type from \"../../core/utils/Type\";\nimport { Bullet } from \"../elements/Bullet\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a node in a Chord Diagram.\r\n *\r\n * A Chord node is a block with a value, which represents its size on the\r\n * diagram.\r\n *\r\n * Nodes are connected via [[ChordLink]] elements.\r\n *\r\n * @see {@link IChordNodeEvents} for a list of available events\r\n * @see {@link IChordNodeAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar ChordNode = /** @class */function (_super) {\n tslib_1.__extends(ChordNode, _super);\n /**\r\n * Constructor\r\n */\n function ChordNode() {\n var _this = _super.call(this) || this;\n _this.className = \"ChordNode\";\n var label = _this.createChild(AxisLabelCircular);\n label.location = 0.5;\n label.radius = 5;\n label.text = \"{name}\";\n label.zIndex = 1;\n label.shouldClone = false;\n _this.label = label;\n _this.layout = \"none\";\n _this.events.on(\"positionchanged\", _this.updateRotation, _this, false);\n _this.isMeasured = false;\n _this.slice = _this.createChild(Slice);\n _this.slice.isMeasured = false;\n var hiddenState = _this.hiddenState;\n hiddenState.properties.fill = new InterfaceColorSet().getFor(\"disabledBackground\");\n hiddenState.properties.opacity = 0.5;\n hiddenState.properties.visible = true;\n _this.setStateOnChildren = false;\n _this.slice.hiddenState.properties.visible = true;\n _this.adapter.add(\"tooltipX\", function (tooltipX, target) {\n return target.slice.ix * (target.slice.radius - (target.slice.radius - target.slice.pixelInnerRadius) / 2);\n });\n _this.adapter.add(\"tooltipY\", function (tooltipY, target) {\n return target.slice.iy * (target.slice.radius - (target.slice.radius - target.slice.pixelInnerRadius) / 2);\n });\n return _this;\n }\n /**\r\n * Invalidates all links, attached to this node.\r\n *\r\n * @ignore Exclude from docs\r\n */\n ChordNode.prototype.invalidateLinks = function () {\n var _this = this;\n _super.prototype.invalidateLinks.call(this);\n var label = this.label;\n var slice = this.slice;\n var chart = this.chart;\n if (chart && slice) {\n var sum = this.total;\n var arc_1 = slice.arc;\n var sliceStartAngle_1 = slice.startAngle;\n this.children.each(function (child) {\n if (child instanceof Bullet) {\n var locationX = child.locationX;\n if (!$type.isNumber(locationX)) {\n locationX = 0.5;\n }\n var locationY = child.locationY;\n if (!$type.isNumber(locationY)) {\n locationY = 1;\n }\n var childAngle = sliceStartAngle_1 + arc_1 * locationX;\n var childRadius = locationY * slice.radius;\n child.x = childRadius * $math.cos(childAngle);\n child.y = childRadius * $math.sin(childAngle);\n }\n });\n var labelAngle = sliceStartAngle_1 + arc_1 * label.location;\n var startAngle = sliceStartAngle_1 + (1 - sum / this.adjustedTotal) * arc_1 * 0.5; // if value of a node is > then sum of the links, add to center link\n if ($type.isNaN(startAngle)) {\n startAngle = sliceStartAngle_1;\n }\n label.fixPosition(labelAngle, slice.radius);\n this.nextAngle = startAngle;\n if (this._outgoingSorted) {\n $iter.each(this._outgoingSorted, function (dataItem) {\n var link = dataItem.link;\n link.parent = _this.chart.linksContainer;\n var value = dataItem.getWorkingValue(\"value\");\n if ($type.isNumber(value)) {\n if (chart.nonRibbon) {\n var percentWidth = link.percentWidth;\n if (!$type.isNumber(percentWidth)) {\n percentWidth = 5;\n }\n percentWidth = percentWidth / 100;\n link.startAngle = sliceStartAngle_1 + arc_1 / 2 - arc_1 / 2 * percentWidth;\n link.arc = arc_1 * percentWidth;\n } else {\n link.arc = value * chart.valueAngle;\n link.startAngle = _this.nextAngle;\n _this.nextAngle += link.arc;\n }\n if (!dataItem.toNode) {\n link.endAngle = link.startAngle;\n }\n link.radius = slice.pixelInnerRadius;\n }\n //link.validate();\n });\n }\n if (this._incomingSorted) {\n $iter.each(this._incomingSorted, function (dataItem) {\n var link = dataItem.link;\n link.radius = slice.pixelInnerRadius;\n if (chart.nonRibbon) {\n var percentWidth = link.percentWidth;\n if (!$type.isNumber(percentWidth)) {\n percentWidth = 5;\n }\n percentWidth = percentWidth / 100;\n link.endAngle = sliceStartAngle_1 + arc_1 / 2 - arc_1 / 2 * percentWidth;\n link.arc = arc_1 * percentWidth;\n } else {\n link.endAngle = _this.nextAngle;\n var value = dataItem.getWorkingValue(\"value\");\n if ($type.isNumber(value)) {\n link.arc = value * chart.valueAngle; // yes, this is needed\n _this.nextAngle += link.arc;\n }\n }\n if (!dataItem.fromNode) {\n link.startAngle = link.endAngle;\n }\n //link.validate();\n });\n }\n }\n };\n /**\r\n * @ignore\r\n * updates slice start angle so that when we drag a node it would face the center\r\n */\n ChordNode.prototype.updateRotation = function () {\n var slice = this.slice;\n var mAngle = this.trueStartAngle + slice.arc / 2;\n var radius = slice.radius;\n var tx = radius * $math.cos(mAngle);\n var ty = radius * $math.sin(mAngle);\n var angle = $math.getAngle({\n x: tx + this.pixelX,\n y: ty + this.pixelY\n });\n slice.startAngle = this.trueStartAngle + (angle - mAngle);\n this.dx = -this.pixelX;\n this.dy = -this.pixelY;\n };\n /**\r\n * Copies properties and labels from another [[ChordNode]].\r\n *\r\n * @param source Source node\r\n */\n ChordNode.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.label.copyFrom(source.label);\n this.slice.copyFrom(source.slice);\n };\n return ChordNode;\n}(FlowDiagramNode);\nexport { ChordNode };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"ChordNode\"] = ChordNode;","/**\r\n * Functionality for drawing quadratic curves.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Line } from \"./Line\";\nimport { color } from \"../utils/Color\";\nimport * as $path from \"../rendering/Path\";\nimport * as $math from \"../utils/Math\";\nimport * as $type from \"../utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws a waved line.\r\n *\r\n * @see {@link IQuadraticCurveEvents} for a list of available events\r\n * @see {@link IQuadraticCurveAdapters} for a list of available Adapters\r\n */\nvar QuadraticCurve = /** @class */function (_super) {\n tslib_1.__extends(QuadraticCurve, _super);\n /**\r\n * Constructor\r\n */\n function QuadraticCurve() {\n var _this = _super.call(this) || this;\n _this.className = \"QuadraticCurve\";\n _this.element = _this.paper.add(\"path\");\n _this.pixelPerfect = false;\n _this.fill = color();\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the waved line.\r\n *\r\n * @ignore Exclude from docs\r\n */\n QuadraticCurve.prototype.draw = function () {\n //super.draw();\n if ($type.isNumber(this.x1 + this.x2 + this.y1 + this.y2 + this.cpx + this.cpy)) {\n var p1 = {\n x: this.x1,\n y: this.y1\n };\n var p2 = {\n x: this.x2,\n y: this.y2\n };\n var cp = {\n x: this.cpx,\n y: this.cpy\n };\n var d = $path.moveTo(p1) + $path.quadraticCurveTo(p2, cp);\n this.path = d;\n }\n };\n Object.defineProperty(QuadraticCurve.prototype, \"cpx\", {\n /**\r\n * @return X\r\n */\n get: function get() {\n return this.getPropertyValue(\"cpx\");\n },\n /**\r\n * X coordinate of control point.\r\n *\r\n * @param value X\r\n */\n set: function set(value) {\n this.setPropertyValue(\"cpx\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QuadraticCurve.prototype, \"cpy\", {\n /**\r\n * @return Y\r\n */\n get: function get() {\n return this.getPropertyValue(\"cpy\");\n },\n /**\r\n * Y coordinate of control point.\r\n *\r\n * @param value Y\r\n */\n set: function set(value) {\n this.setPropertyValue(\"cpy\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Converts relative position along the line (0-1) into pixel coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @return Coordinates\r\n */\n QuadraticCurve.prototype.positionToPoint = function (position) {\n var p1 = {\n x: this.x1,\n y: this.y1\n };\n var cp = {\n x: this.cpx,\n y: this.cpy\n };\n var p2 = {\n x: this.x2,\n y: this.y2\n };\n var point1 = $math.getPointOnQuadraticCurve(p1, p2, cp, position);\n var point2 = $math.getPointOnQuadraticCurve(p1, p2, cp, position + 0.001);\n return {\n x: point1.x,\n y: point1.y,\n angle: $math.getAngle(point1, point2)\n };\n };\n return QuadraticCurve;\n}(Line);\nexport { QuadraticCurve };","/**\r\n * ChordLink module\r\n */\nimport * as tslib_1 from \"tslib\";\nimport { FlowDiagramLink } from \"./FlowDiagramLink\";\nimport { registry } from \"../../core/Registry\";\nimport { QuadraticCurve } from \"../../core/elements/QuadraticCurve\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $path from \"../../core/rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * This class creates a link (waved color-filled line) between two nodes in a\r\n * Chord Diagram.\r\n *\r\n * @see {@link IChordLinkEvents} for a list of available events\r\n * @see {@link IChordLinkAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar ChordLink = /** @class */function (_super) {\n tslib_1.__extends(ChordLink, _super);\n /**\r\n * Constructor\r\n */\n function ChordLink() {\n var _this = _super.call(this) || this;\n _this.className = \"ChordLink\";\n _this.middleLine = _this.createChild(QuadraticCurve);\n _this.middleLine.shouldClone = false;\n _this.middleLine.strokeOpacity = 0;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * (Re)validates (redraws) the link.\r\n *\r\n * @ignore Exclude from docs\r\n */\n ChordLink.prototype.validate = function () {\n _super.prototype.validate.call(this);\n if (!this.isTemplate) {\n var startAngle = this.startAngle;\n var endAngle = this.endAngle;\n var arc = this.arc;\n var radius = this.radius;\n var fromNode = this.dataItem.fromNode;\n var toNode = this.dataItem.toNode;\n var fromX = 0;\n var fromY = 0;\n if (fromNode) {\n fromX = fromNode.pixelX + fromNode.dx;\n fromY = fromNode.pixelY + fromNode.dy;\n }\n var toX = 0;\n var toY = 0;\n if (toNode) {\n toX = toNode.pixelX + toNode.dx;\n toY = toNode.pixelY + toNode.dy;\n }\n if (radius > 0) {\n var x1 = radius * $math.cos(startAngle) + fromX;\n var y1 = radius * $math.sin(startAngle) + fromY;\n var x2 = radius * $math.cos(endAngle) + toX;\n var y2 = radius * $math.sin(endAngle) + toY;\n //let cpAngle = startAngle + arc + (endAngle - startAngle - arc) / 2;\n //let arcWidth = $math.getDistance({x:x1, y:y1}, {x:x4, y:y4});\n //let cpx = (arcWidth) * $math.cos(cpAngle);\n //let cpy = (arcWidth) * $math.sin(cpAngle);\n var cp = {\n x: 0,\n y: 0\n };\n var path = $path.moveTo({\n x: x1,\n y: y1\n });\n path += $path.arcTo(startAngle, arc, radius);\n path += $path.quadraticCurveTo({\n x: x2,\n y: y2\n }, cp);\n path += $path.arcTo(endAngle, arc, radius);\n path += $path.quadraticCurveTo({\n x: x1,\n y: y1\n }, cp);\n if (arc > 0) {\n this.link.path = path;\n } else {\n this.link.path = \"\";\n }\n if (this.maskBullets) {\n this.bulletsMask.path = path;\n this.bulletsContainer.mask = this.bulletsMask;\n }\n var mAngle1 = startAngle + arc / 2;\n var mAngle2 = endAngle + arc / 2;\n var middleLine = this.middleLine;\n middleLine.x1 = radius * $math.cos(mAngle1) + fromX;\n middleLine.y1 = radius * $math.sin(mAngle1) + fromY;\n middleLine.x2 = radius * $math.cos(mAngle2) + toX;\n middleLine.y2 = radius * $math.sin(mAngle2) + toY;\n middleLine.cpx = 0;\n middleLine.cpy = 0;\n middleLine.stroke = this.fill;\n this.positionBullets();\n }\n }\n };\n Object.defineProperty(ChordLink.prototype, \"radius\", {\n /**\r\n * @return End Y\r\n */\n get: function get() {\n return this.getPropertyValue(\"radius\");\n },\n /**\r\n * [radius description]\r\n *\r\n * @todo Description\r\n * @param value End Y\r\n */\n set: function set(value) {\n this.setPropertyValue(\"radius\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ChordLink.prototype, \"arc\", {\n /**\r\n * @return [description]\r\n */\n get: function get() {\n return this.getPropertyValue(\"arc\");\n },\n /**\r\n * [arc description]\r\n *\r\n * @todo Description\r\n * @param value [description]\r\n */\n set: function set(value) {\n this.setPropertyValue(\"arc\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n return ChordLink;\n}(FlowDiagramLink);\nexport { ChordLink };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"ChordLink\"] = ChordLink;","/**\r\n * Chord diagram module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { FlowDiagram, FlowDiagramDataItem } from \"./FlowDiagram\";\nimport { percent } from \"../../core/utils/Percent\";\nimport { Container } from \"../../core/Container\";\nimport { registry } from \"../../core/Registry\";\nimport { ChordNode } from \"../elements/ChordNode\";\nimport { ChordLink } from \"../elements/ChordLink\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $utils from \"../../core/utils/Utils\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n//@todo rearange notes after dragged\n/**\r\n * Defines a [[DataItem]] for [[ChordDiagram]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar ChordDiagramDataItem = /** @class */function (_super) {\n tslib_1.__extends(ChordDiagramDataItem, _super);\n /**\r\n * Constructor\r\n */\n function ChordDiagramDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"ChordDiagramDataItem\";\n _this.applyTheme();\n return _this;\n }\n return ChordDiagramDataItem;\n}(FlowDiagramDataItem);\nexport { ChordDiagramDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a Chord Diagram chart.\r\n *\r\n * @see {@link IChordDiagramEvents} for a list of available Events\r\n * @see {@link IChordDiagramAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/chord-diagram/} for documentation\r\n * @important\r\n */\nvar ChordDiagram = /** @class */function (_super) {\n tslib_1.__extends(ChordDiagram, _super);\n /**\r\n * Constructor\r\n */\n function ChordDiagram() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * [valueAngle description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n _this.valueAngle = 0;\n _this.className = \"ChordDiagram\";\n _this.startAngle = -90;\n _this.endAngle = 270;\n _this.radius = percent(80);\n _this.innerRadius = -15;\n _this.nodePadding = 5;\n var chordContainer = _this.chartContainer.createChild(Container);\n chordContainer.align = \"center\";\n chordContainer.valign = \"middle\";\n chordContainer.shouldClone = false;\n chordContainer.layout = \"absolute\";\n _this.chordContainer = chordContainer;\n _this.nodesContainer.parent = chordContainer;\n _this.linksContainer.parent = chordContainer;\n _this.chartContainer.events.on(\"maxsizechanged\", _this.invalidate, _this, false);\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Redraws the chart.\r\n *\r\n * @ignore Exclude from docs\r\n */\n ChordDiagram.prototype.validate = function () {\n var _this = this;\n var chartContainer = this.chartContainer;\n var endAngle = this.endAngle;\n var startAngle = this.startAngle + this.nodePadding / 2;\n var rect = $math.getArcRect(this.startAngle, this.endAngle, 1);\n var innerRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n rect = $math.getCommonRectangle([rect, innerRect]);\n var maxRadius = Math.min(chartContainer.innerWidth / rect.width, chartContainer.innerHeight / rect.height);\n if (!$type.isNumber(maxRadius)) {\n maxRadius = 0;\n }\n var radius = $utils.relativeRadiusToValue(this.radius, maxRadius);\n var pixelInnerRadius = $utils.relativeRadiusToValue(this.innerRadius, radius, true);\n var total = this.dataItem.values.value.sum;\n var count = 0;\n var newTotal = 0;\n $iter.each(this._sorted, function (strNode) {\n var node = strNode[1];\n _this.getNodeValue(node);\n count++;\n var value = node.total;\n if (node.total / total < _this.minNodeSize) {\n value = total * _this.minNodeSize;\n }\n newTotal += value;\n });\n this.valueAngle = (endAngle - this.startAngle - this.nodePadding * count) / newTotal;\n $iter.each(this._sorted, function (strNode) {\n var node = strNode[1];\n var slice = node.slice;\n slice.radius = radius;\n slice.innerRadius = pixelInnerRadius;\n var value = node.total;\n if (node.total / total < _this.minNodeSize) {\n value = total * _this.minNodeSize;\n }\n node.adjustedTotal = value;\n var arc;\n if (_this.nonRibbon) {\n arc = (endAngle - _this.startAngle) / count - _this.nodePadding;\n } else {\n arc = _this.valueAngle * value;\n }\n slice.arc = arc;\n slice.startAngle = startAngle;\n node.trueStartAngle = startAngle;\n node.parent = _this.nodesContainer;\n node.validate(); // otherwise flickers - nodes are already created, but not yet positioned etc.\n startAngle += arc + _this.nodePadding;\n });\n this.chordContainer.definedBBox = {\n x: radius * rect.x,\n y: radius * rect.y,\n width: radius * rect.width,\n height: radius * rect.height\n };\n this.chordContainer.invalidateLayout();\n _super.prototype.validate.call(this);\n };\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n ChordDiagram.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n // Add a default screen reader title for accessibility\n // This will be overridden in screen reader if there are any `titles` set\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Chord diagram\");\n }\n };\n /**\r\n * Creates and returns a new data item.\r\n *\r\n * @return Data item\r\n */\n ChordDiagram.prototype.createDataItem = function () {\n return new ChordDiagramDataItem();\n };\n Object.defineProperty(ChordDiagram.prototype, \"startAngle\", {\n /**\r\n * @return Start angle (degrees)\r\n */\n get: function get() {\n return this.getPropertyValue(\"startAngle\");\n },\n /**\r\n * Starting angle of the Radar face. (degrees)\r\n *\r\n * Normally, a circular radar face begins (the radial axis is drawn) at the\r\n * top center. (at -90 degrees)\r\n *\r\n * You can use `startAngle` to change this setting.\r\n *\r\n * E.g. setting this to 0 will make the radial axis start horizontally to\r\n * the right, as opposed to vertical.\r\n *\r\n * For a perfect circle the absolute sum of `startAngle` and `endAngle`\r\n * needs to be 360.\r\n *\r\n * However, it's **not** necessary to do so. You can set those to lesser\r\n * numbers, to create semi-circles.\r\n *\r\n * E.g. `startAngle = -90` with `endAngle = 0` will create a radar face that\r\n * looks like a quarter of a circle.\r\n *\r\n * @default -90\r\n * @param value Start angle (degrees)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"startAngle\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ChordDiagram.prototype, \"endAngle\", {\n /**\r\n * @return End angle (degrees)\r\n */\n get: function get() {\n return this.getPropertyValue(\"endAngle\");\n },\n /**\r\n * Starting angle of the Radar face. (degrees)\r\n *\r\n * Normally, a circular radar face ends (the radial axis is drawn) exactly\r\n * where it has started, forming a full 360 circle. (at 270 degrees)\r\n *\r\n * You can use `endAngle` to end the circle somewhere else.\r\n *\r\n * E.g. setting this to 180 will make the radar face end at horizontal line\r\n * to the left off the center.\r\n *\r\n * For a perfect circle the absolute sum of `startAngle` and `endAngle`\r\n * needs to be 360.\r\n *\r\n * However, it's **not** necessary to do so. You can set those to lesser\r\n * numbers, to create semi-circles.\r\n *\r\n * E.g. `startAngle = -90` with `endAngle = 0` will create a radar face that\r\n * looks like a quarter of a circle.\r\n *\r\n * @default -90\r\n * @param value End angle (degrees)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"endAngle\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ChordDiagram.prototype, \"radius\", {\n /**\r\n * @return Outer radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"radius\");\n },\n /**\r\n * Outer radius of the Radar face.\r\n *\r\n * This can either be in absolute pixel value, or relative [[Percent]].\r\n *\r\n * @param value Outer radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"radius\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ChordDiagram.prototype, \"innerRadius\", {\n /**\r\n * @return Inner radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"innerRadius\");\n },\n /**\r\n * Inner radius of the Chord nodes.\r\n *\r\n * This can either be in absolute pixel value, or relative [[Percent]].\r\n *\r\n * @param value Outer radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ChordDiagram.prototype, \"nonRibbon\", {\n /**\r\n * @return Non-ribbon\r\n */\n get: function get() {\n return this.getPropertyValue(\"nonRibbon\");\n },\n /**\r\n *\r\n * If you set this to true, all the lines will be of the same width. This is done by making middleLine of a ChordLink visible.\r\n *\r\n * @param value\r\n */\n set: function set(value) {\n this.setPropertyValue(\"nonRibbon\", value, true);\n this.links.template.middleLine.strokeOpacity = 1;\n this.links.template.link.fillOpacity = 0;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n */\n ChordDiagram.prototype.createNode = function () {\n var node = new ChordNode();\n this._disposers.push(node);\n return node;\n };\n /**\r\n * @ignore\r\n */\n ChordDiagram.prototype.createLink = function () {\n var link = new ChordLink();\n this._disposers.push(link);\n return link;\n };\n return ChordDiagram;\n}(FlowDiagram);\nexport { ChordDiagram };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"ChordDiagram\"] = ChordDiagram;","/**\r\n * Module that defines everything related to building Columns.\r\n * It is a container which has column element which is a RoundedRectangle.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../../core/Container\";\nimport { RoundedRectangle } from \"../../core/elements/RoundedRectangle\";\nimport { registry } from \"../../core/Registry\";\nimport { percent } from \"../../core/utils/Percent\";\nimport * as $math from \"../../core/utils/Math\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Class used to creates Columns.\r\n *\r\n * @see {@link IColumnEvents} for a list of available events\r\n * @see {@link IColumnAdapters} for a list of available Adapters\r\n * @todo Usage example\r\n * @important\r\n */\nvar Column = /** @class */function (_super) {\n tslib_1.__extends(Column, _super);\n /**\r\n * Constructor\r\n */\n function Column() {\n var _this = _super.call(this) || this;\n _this.className = \"Column\";\n _this.width = percent(80);\n _this.height = percent(80);\n //this.isMeasured = true; // for correct position of the tooltip\n _this.applyOnClones = true;\n _this.strokeOpacity = 1;\n _this.layout = \"none\";\n _this.createAssets();\n // otherwise users will have to set layout themselves if they'll want to align, scale etc children\n _this.events.on(\"childadded\", _this.handleKidAdded, _this, false);\n return _this;\n }\n /**\r\n * @ignore\r\n */\n Column.prototype.handleKidAdded = function () {\n if (this.layout == \"none\") {\n this.layout = \"absolute\";\n }\n };\n /**\r\n * @ignore\r\n */\n Column.prototype.createAssets = function () {\n this.column = this.createChild(RoundedRectangle);\n this.column.shouldClone = false;\n this.column.cornerRadius(0, 0, 0, 0);\n this._disposers.push(this.column);\n };\n /**\r\n * @ignore Exclude from docs\r\n */\n Column.prototype.validate = function () {\n _super.prototype.validate.call(this);\n var column = this.column;\n if (column) {\n column.width = $math.min(this.pixelWidth, this.maxWidth);\n column.height = $math.min(this.pixelHeight, this.maxHeight);\n if (column.invalid) {\n column.validate(); // important!\n }\n }\n };\n /**\r\n * Copies all parameters from another [[Column]].\r\n *\r\n * @param source Source Column\r\n */\n Column.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n if (this.column) {\n this.column.copyFrom(source.column);\n }\n };\n Object.defineProperty(Column.prototype, \"bbox\", {\n /**\r\n * Returns bounding box (square) for this element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n get: function get() {\n if (this.definedBBox) {\n return this.definedBBox;\n }\n if (this.column) {\n return {\n x: 0,\n y: 0,\n width: this.column.measuredWidth,\n height: this.column.measuredHeight\n };\n } else {\n return {\n x: 0,\n y: 0,\n width: $math.min(this.pixelWidth, this.maxWidth),\n height: $math.min(this.pixelHeight, this.maxHeight)\n };\n }\n },\n enumerable: true,\n configurable: true\n });\n return Column;\n}(Container);\nexport { Column };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Column\"] = Column;","/**\r\n * Column series module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { XYSeries, XYSeriesDataItem } from \"./XYSeries\";\nimport { visualProperties } from \"../../core/Sprite\";\nimport { Container } from \"../../core/Container\";\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\nimport { Dictionary } from \"../../core/utils/Dictionary\";\nimport { ValueAxis } from \"../axes/ValueAxis\";\nimport { CategoryAxis } from \"../axes/CategoryAxis\";\nimport { registry } from \"../../core/Registry\";\nimport { Column } from \"../elements/Column\";\nimport { RoundedRectangle } from \"../../core/elements/RoundedRectangle\";\nimport { percent } from \"../../core/utils/Percent\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $object from \"../../core/utils/Object\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $array from \"../../core/utils/Array\";\nimport * as $type from \"../../core/utils/Type\";\nimport { Disposer } from \"../../core/utils/Disposer\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[ColumnSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar ColumnSeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(ColumnSeriesDataItem, _super);\n /**\r\n * Constructor\r\n */\n function ColumnSeriesDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"ColumnSeriesDataItem\";\n _this.locations[\"dateX\"] = 0.5;\n _this.locations[\"dateY\"] = 0.5;\n _this.locations[\"categoryX\"] = 0.5;\n _this.locations[\"categoryY\"] = 0.5;\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(ColumnSeriesDataItem.prototype, \"column\", {\n /**\r\n * @return Column\r\n */\n get: function get() {\n return this._column;\n },\n /**\r\n * A column used to draw a column for this data item.\r\n *\r\n * @param column\r\n */\n set: function set(column) {\n this.setColumn(column);\n },\n enumerable: true,\n configurable: true\n });\n ColumnSeriesDataItem.prototype.setColumn = function (column) {\n var _this = this;\n if (this._column && column != this._column) {\n $array.remove(this.sprites, this._column);\n }\n this._column = column;\n if (column) {\n var prevDataItem = column.dataItem;\n if (prevDataItem && prevDataItem != this) {\n prevDataItem.column = undefined;\n }\n this.addSprite(column);\n this._disposers.push(new Disposer(function () {\n // TODO investigate why component is undefined\n // https://codepen.io/team/amcharts/pen/dac4be245d658233a6d7e5597df2208b?editors=0010\n if (_this.component) {\n _this.component.columns.removeValue(column);\n }\n }));\n }\n };\n Object.defineProperty(ColumnSeriesDataItem.prototype, \"rangesColumns\", {\n /**\r\n * A dictionary storing axes ranges columns by axis uid\r\n */\n get: function get() {\n if (!this._rangesColumns) {\n this._rangesColumns = new Dictionary();\n }\n return this._rangesColumns;\n },\n enumerable: true,\n configurable: true\n });\n return ColumnSeriesDataItem;\n}(XYSeriesDataItem);\nexport { ColumnSeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines [[Series]] for a column graph.\r\n *\r\n * @see {@link IColumnSeriesEvents} for a list of available Events\r\n * @see {@link IColumnSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\nvar ColumnSeries = /** @class */function (_super) {\n tslib_1.__extends(ColumnSeries, _super);\n /**\r\n * Constructor\r\n */\n function ColumnSeries() {\n var _this = _super.call(this) || this;\n /**\r\n * Start location within cell for columns.\r\n */\n _this._startLocation = 0;\n /**\r\n * End location within cell for columns.\r\n */\n _this._endLocation = 1;\n _this.className = \"ColumnSeries\";\n _this.width = percent(100);\n _this.height = percent(100);\n _this.strokeOpacity = 0;\n _this.fillOpacity = 1;\n _this.clustered = true;\n var columnsContainer = _this.mainContainer.createChild(Container);\n columnsContainer.shouldClone = false;\n columnsContainer.isMeasured = false;\n columnsContainer.layout = \"none\";\n _this._columnsContainer = columnsContainer;\n _this.columns.template.pixelPerfect = false;\n _this.tooltipColorSource = _this.columns.template;\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(ColumnSeries.prototype, \"columnsContainer\", {\n /**\r\n * A container that columns are created in.\r\n *\r\n * @ignore Exclude from docs\r\n */\n get: function get() {\n return this._columnsContainer;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n ColumnSeries.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Column Series\");\n }\n };\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n ColumnSeries.prototype.createDataItem = function () {\n return new ColumnSeriesDataItem();\n };\n /**\r\n * (Re)validates the whole series, effectively causing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\n ColumnSeries.prototype.validate = function () {\n var _this = this;\n //@todo Check if we can do better than use `instanceof`\n // find start/end locations based on clustered/stacked settings\n // go through chart series instead of base axis series, because axis series doesn't maintain order\n var baseAxisSeries = this.chart.series;\n var clusterCount = 0;\n var index = 0;\n $iter.each(baseAxisSeries.iterator(), function (series) {\n if (series instanceof ColumnSeries) {\n if (_this.baseAxis == series.baseAxis) {\n if (!series.stacked && series.clustered || clusterCount === 0) {\n clusterCount++;\n }\n if (series == _this) {\n index = clusterCount - 1;\n }\n }\n }\n });\n var renderer = this.baseAxis.renderer;\n var cellStartLocation = renderer.cellStartLocation;\n var cellEndLocation = renderer.cellEndLocation;\n this._startLocation = cellStartLocation + index / clusterCount * (cellEndLocation - cellStartLocation);\n this._endLocation = cellStartLocation + (index + 1) / clusterCount * (cellEndLocation - cellStartLocation);\n _super.prototype.validate.call(this);\n for (var i = 0; i < this.startIndex; i++) {\n var dataItem = this.dataItems.getIndex(i);\n this.disableUnusedColumns(dataItem);\n }\n for (var i = this.dataItems.length - 1; i > this.endIndex; i--) {\n var dataItem = this.dataItems.getIndex(i);\n this.disableUnusedColumns(dataItem);\n }\n };\n /**\r\n * Validates data item's element, effectively redrawing it.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n ColumnSeries.prototype.validateDataElement = function (dataItem) {\n // important oder here, first real, then super. we need this to know size\n this.validateDataElementReal(dataItem);\n _super.prototype.validateDataElement.call(this, dataItem);\n };\n /**\r\n * Returns relative start location for the data item.\r\n *\r\n * @param dataItem Data item\r\n * @return Location (0-1)\r\n */\n ColumnSeries.prototype.getStartLocation = function (dataItem) {\n var startLocation = this._startLocation;\n if (this.baseAxis == this.xAxis) {\n startLocation += dataItem.locations[this.xOpenField] - 0.5;\n } else {\n startLocation += dataItem.locations[this.yOpenField] - 0.5;\n }\n return startLocation;\n };\n /**\r\n * [handleDataItemWorkingValueChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\n ColumnSeries.prototype.handleDataItemWorkingValueChange = function (dataItem, name) {\n if (this.simplifiedProcessing) {\n this.validateDataElement(dataItem);\n } else {\n _super.prototype.handleDataItemWorkingValueChange.call(this, dataItem, name);\n }\n };\n /**\r\n * Returns relative end location for the data item.\r\n *\r\n * @param dataItem Data item\r\n * @return Location (0-1)\r\n */\n ColumnSeries.prototype.getEndLocation = function (dataItem) {\n var endLocation = this._endLocation;\n if (this.baseAxis == this.xAxis) {\n endLocation += dataItem.locations[this.xField] - 0.5;\n } else {\n endLocation += dataItem.locations[this.yField] - 0.5;\n }\n return endLocation;\n };\n /**\r\n * Validates data item's elements.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n ColumnSeries.prototype.validateDataElementReal = function (dataItem) {\n var _this = this;\n //\tif (dataItem.hasValue([this.xField, this.yField])) { // todo: this doesn't work with categories, think of a better way\n var l;\n var r;\n var t;\n var b;\n var startLocation = this.getStartLocation(dataItem);\n var endLocation = this.getEndLocation(dataItem);\n var xField = this.xField;\n var xOpenField = this.xOpenField;\n var yField = this.yField;\n var yOpenField = this.yOpenField;\n var template = this.columns.template;\n var percentWidth = template.percentWidth;\n var percentHeight = template.percentHeight;\n var pixelWidth = template.pixelWidth;\n var pixelHeight = template.pixelHeight;\n var maxWidth = template.maxWidth;\n var maxHeight = template.maxHeight;\n var paddingLeft = template.pixelPaddingLeft;\n var paddingRight = template.pixelPaddingRight;\n var paddingTop = template.pixelPaddingTop;\n var paddingBottom = template.pixelPaddingBottom;\n var outOfBounds = false;\n // two category axes\n if (this.xAxis instanceof CategoryAxis && this.yAxis instanceof CategoryAxis) {\n if (!dataItem.hasValue(this._xValueFields) || !dataItem.hasValue(this._yValueFields)) {\n return;\n }\n startLocation = 0;\n endLocation = 1;\n if (!$type.isNaN(percentWidth)) {\n var offset = $math.round((endLocation - startLocation) * (1 - percentWidth / 100) / 2, 5);\n startLocation += offset;\n endLocation -= offset;\n }\n l = this.xAxis.getX(dataItem, xOpenField, startLocation);\n r = this.xAxis.getX(dataItem, xField, endLocation);\n // in case width is set in pixels\n if ($type.isNaN(percentWidth)) {\n var offset = (r - l - pixelWidth) / 2;\n l += offset;\n r -= offset;\n }\n // in case max width is set in pixels\n if (!$type.isNaN(maxWidth)) {\n var offset = (r - l - maxWidth) / 2;\n l += offset;\n r -= offset;\n }\n startLocation = 0;\n endLocation = 1;\n if (!$type.isNaN(percentHeight)) {\n var offset = $math.round((1 - percentHeight / 100) / 2, 5);\n startLocation += offset;\n endLocation -= offset;\n }\n t = this.yAxis.getY(dataItem, yOpenField, startLocation);\n b = this.yAxis.getY(dataItem, yField, endLocation);\n // in case width is set in pixels\n if ($type.isNaN(percentHeight)) {\n var offset = (b - t - pixelHeight) / 2;\n b += offset;\n t -= offset;\n }\n // in case max width is set in pixels\n if (!$type.isNaN(maxHeight)) {\n var offset = (b - t - maxHeight) / 2;\n b += offset;\n t -= offset;\n }\n r = this.fixHorizontalCoordinate(r);\n l = this.fixHorizontalCoordinate(l);\n t = this.fixVerticalCoordinate(t);\n b = this.fixVerticalCoordinate(b);\n } else if (this.baseAxis == this.xAxis) {\n if (!dataItem.hasValue(this._yValueFields)) {\n return;\n }\n // in case width is set in percent\n if (!$type.isNaN(percentWidth)) {\n var offset = $math.round((endLocation - startLocation) * (1 - percentWidth / 100) / 2, 5);\n startLocation += offset;\n endLocation -= offset;\n }\n l = this.xAxis.getX(dataItem, xOpenField, startLocation);\n r = this.xAxis.getX(dataItem, xField, endLocation);\n // in case width is set in pixels\n if ($type.isNaN(percentWidth)) {\n var offset = (r - l - pixelWidth) / 2;\n l += offset;\n r -= offset;\n }\n // in case width is set in pixels\n if (!$type.isNaN(maxWidth)) {\n var offset = (r - l - maxWidth) / 2;\n l += offset;\n r -= offset;\n }\n var bottomLocation = dataItem.locations[yOpenField];\n var topLocation = dataItem.locations[yField];\n // otherwise gantt chart will start items in the middle of a cell\n if (this.yAxis instanceof ValueAxis) {\n if (this.dataFields[this.yField] != this.dataFields[this.yOpenField]) {\n bottomLocation = 0;\n topLocation = 0;\n }\n }\n b = this.yAxis.getY(dataItem, yOpenField, bottomLocation);\n t = this.yAxis.getY(dataItem, yField, topLocation);\n // used to save location for bullets, but it's not a good approach\n // dataItem.locations[xField] = startLocation + (endLocation - startLocation) / 2;\n var axisLenght = Math.ceil(this.yAxis.axisLength);\n if (t < 0 && b < 0 || t > axisLenght && b > axisLenght) {\n outOfBounds = true;\n }\n t = this.fixVerticalCoordinate(t);\n b = this.fixVerticalCoordinate(b);\n if (Math.abs(r - l) - paddingLeft - paddingRight == 0) {\n outOfBounds = true;\n }\n }\n // horizontal bars\n else {\n if (!dataItem.hasValue(this._xValueFields)) {\n return;\n }\n if (!$type.isNaN(percentHeight)) {\n var offset = $math.round((endLocation - startLocation) * (1 - percentHeight / 100) / 2, 5);\n startLocation += offset;\n endLocation -= offset;\n }\n t = this.yAxis.getY(dataItem, yOpenField, startLocation);\n b = this.yAxis.getY(dataItem, yField, endLocation);\n // in case height is set in pixels\n if ($type.isNaN(percentHeight)) {\n var offset = (b - t - pixelHeight) / 2;\n b -= offset;\n t += offset;\n }\n // in case height is set in pixels\n if (!$type.isNaN(maxHeight)) {\n var offset = (b - t - maxHeight) / 2;\n b -= offset;\n t += offset;\n }\n var rightLocation = dataItem.locations[xField];\n var leftLocation = dataItem.locations[xOpenField];\n // otherwise gantt chart will start items in the middle of a cell\n if (this.xAxis instanceof ValueAxis) {\n if (this.dataFields[this.xField] != this.dataFields[this.xOpenField]) {\n rightLocation = 0;\n leftLocation = 0;\n }\n }\n r = this.xAxis.getX(dataItem, xField, rightLocation);\n l = this.xAxis.getX(dataItem, xOpenField, leftLocation);\n // used to save location for bullets, but it's not a good approach\n // dataItem.locations[yField] = startLocation + (endLocation - startLocation) / 2;\n var axisLenght = Math.ceil(this.xAxis.axisLength);\n if (r < 0 && l < 0 || r > axisLenght && l > axisLenght) {\n outOfBounds = true;\n }\n r = this.fixHorizontalCoordinate(r);\n l = this.fixHorizontalCoordinate(l);\n if (Math.abs(t - b) - paddingTop - paddingBottom == 0) {\n outOfBounds = true;\n }\n }\n var w = Math.abs(r - l);\n var h = Math.abs(b - t);\n var x = Math.min(l, r);\n var y = Math.min(t, b);\n if (!outOfBounds) {\n var column_1;\n if (!dataItem.column) {\n column_1 = this.columns.create();\n //$object.forceCopyProperties(this.columns.template, column, visualProperties);\n $object.copyProperties(this, column_1, visualProperties); // need this because 3d columns are not in the same container\n $object.copyProperties(this.columns.template, column_1, visualProperties); // second time, no force, so that columns.template would override series properties\n dataItem.addSprite(column_1);\n dataItem.column = column_1;\n column_1.paper = this.paper; // sometimes pattern is not drawn if is set with adapter without this.\n // accessibility\n if (this.itemsFocusable()) {\n column_1.role = \"menuitem\";\n column_1.focusable = true;\n } else {\n column_1.role = \"listitem\";\n column_1.focusable = false;\n }\n if (column_1.focusable) {\n column_1.events.once(\"focus\", function (ev) {\n column_1.readerTitle = _this.populateString(_this.itemReaderText, dataItem);\n }, undefined, false);\n column_1.events.once(\"blur\", function (ev) {\n column_1.readerTitle = \"\";\n }, undefined, false);\n }\n if (column_1.hoverable) {\n column_1.events.once(\"over\", function (ev) {\n column_1.readerTitle = _this.populateString(_this.itemReaderText, dataItem);\n }, undefined, false);\n column_1.events.once(\"out\", function (ev) {\n column_1.readerTitle = \"\";\n }, undefined, false);\n }\n } else {\n column_1 = dataItem.column;\n }\n column_1.width = w;\n column_1.height = h;\n column_1.x = x;\n column_1.y = y;\n column_1.realX = l;\n column_1.realY = t;\n column_1.realWidth = r - l;\n column_1.realHeight = b - t;\n column_1.parent = this.columnsContainer;\n column_1.virtualParent = this;\n this.setColumnStates(column_1);\n if (column_1.invalid) {\n column_1.validate(); // validate as if it was used previously, it will flicker with previous dimensions\n }\n column_1.__disabled = false;\n //column.returnAfterTemp();\n $iter.each(this.axisRanges.iterator(), function (axisRange) {\n var rangeColumn = dataItem.rangesColumns.getKey(axisRange.uid);\n if (!rangeColumn) {\n rangeColumn = _this.columns.create();\n //$object.forceCopyProperties(this.columns.template, rangeColumn, visualProperties);\n $object.copyProperties(axisRange.contents, rangeColumn, visualProperties); // need this because 3d columns are not in the same container\n dataItem.addSprite(rangeColumn);\n dataItem.rangesColumns.setKey(axisRange.uid, rangeColumn);\n rangeColumn.paper = _this.paper; // sometimes pattern is not drawn if is set with adapter without this.\t\t\t\t\t\n }\n rangeColumn.parent = axisRange.contents;\n rangeColumn.width = w;\n rangeColumn.height = h;\n rangeColumn.x = x;\n rangeColumn.y = y;\n _this.setColumnStates(rangeColumn);\n if (rangeColumn.invalid) {\n rangeColumn.validate(); // validate as if it was used previously, it will flicker with previous dimensions\n }\n rangeColumn.__disabled = false;\n //rangeColumn.returnAfterTemp();\n });\n } else {\n this.disableUnusedColumns(dataItem);\n }\n dataItem.itemWidth = w;\n dataItem.itemHeight = h;\n };\n ColumnSeries.prototype.disableUnusedColumns = function (dataItem) {\n if (dataItem) {\n if (dataItem.column) {\n // otherwise might flicker when enabling\n dataItem.column.width = 0;\n dataItem.column.height = 0;\n dataItem.column.__disabled = true;\n }\n $iter.each(this.axisRanges.iterator(), function (axisRange) {\n var rangeColumn = dataItem.rangesColumns.getKey(axisRange.uid);\n if (rangeColumn) {\n // otherwise might flicker when enabling\n rangeColumn.width = 0;\n rangeColumn.height = 0;\n rangeColumn.__disabled = true;\n }\n });\n }\n };\n /**\r\n * Apply different state/coloring to columns based on the change value.\r\n *\r\n * @param sprite Sprite to apply state to\r\n * @todo Do not apply accessibility to wicks of the candlesticks\r\n */\n ColumnSeries.prototype.setColumnStates = function (sprite) {\n var dataItem = sprite.dataItem;\n if (this.xAxis instanceof ValueAxis || this.yAxis instanceof ValueAxis) {\n var open_1;\n var value = void 0;\n var change = void 0;\n if (this.baseAxis == this.yAxis) {\n if (this.xOpenField && this.xField && this.xAxis instanceof ValueAxis) {\n open_1 = dataItem.getValue(this.xOpenField);\n value = dataItem.getValue(this.xField);\n change = dataItem.getValue(this.xAxis.axisFieldName + \"X\", \"previousChange\");\n }\n } else {\n if (this.yOpenField && this.yField && this.yAxis instanceof ValueAxis) {\n open_1 = dataItem.getValue(this.yOpenField);\n value = dataItem.getValue(this.yField);\n change = dataItem.getValue(this.yAxis.axisFieldName + \"Y\", \"previousChange\");\n }\n }\n if (value < open_1) {\n dataItem.droppedFromOpen = true;\n sprite.defaultState.copyFrom(this._dropFromOpenState);\n sprite.setState(this._dropFromOpenState, 0);\n } else {\n dataItem.droppedFromOpen = false;\n sprite.defaultState.copyFrom(this._riseFromOpenState);\n sprite.setState(this._riseFromOpenState, 0);\n }\n if (change < 0) {\n dataItem.droppedFromPrevious = true;\n sprite.defaultState.copyFrom(this._dropFromPreviousState);\n sprite.setState(this._dropFromPreviousState, 0);\n } else {\n dataItem.droppedFromPrevious = false;\n sprite.defaultState.copyFrom(this._riseFromPreviousState);\n sprite.setState(this._riseFromPreviousState, 0);\n }\n }\n };\n Object.defineProperty(ColumnSeries.prototype, \"columns\", {\n /**\r\n * A list of column elements in the series.\r\n *\r\n * @return Columns\r\n */\n get: function get() {\n if (!this._columns) {\n this._columns = new ListTemplate(this.createColumnTemplate());\n this._disposers.push(new ListDisposer(this._columns));\n this._disposers.push(this._columns.template);\n }\n return this._columns;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates and returns a column element to use as a template.\r\n *\r\n * @return Column template\r\n */\n ColumnSeries.prototype.createColumnTemplate = function () {\n return new Column();\n };\n Object.defineProperty(ColumnSeries.prototype, \"clustered\", {\n /**\r\n * @return Clustered?\r\n */\n get: function get() {\n return this.getPropertyValue(\"clustered\");\n },\n /**\r\n * Cluster this series columns?\r\n *\r\n * Setting to `false` will make columns overlap with other series.\r\n *\r\n * @default true\r\n * @param value Clustered?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"clustered\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ColumnSeries.prototype, \"dropFromOpenState\", {\n /**\r\n * A state to apply to a column when close value is lower than open value.\r\n *\r\n * Can be used to differentiate appearance based on value relations.\r\n *\r\n * NOTE: this will work only if at least one axis is [[ValueAxis]].\r\n *\r\n * @readonly You can modify state object, but can't overwrite it\r\n * @return State\r\n */\n get: function get() {\n if (!this._dropFromOpenState) {\n this._dropFromOpenState = this.states.create(\"dropFromOpenState\");\n }\n return this._dropFromOpenState;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ColumnSeries.prototype, \"dropFromPreviousState\", {\n /**\r\n * A state to apply to a column when its value is lower value of a previous\r\n * column.\r\n *\r\n * Can be used to differentiate appearance based on value relations.\r\n *\r\n * @readonly You can modify state object, but can't overwrite it\r\n * @return State\r\n */\n get: function get() {\n if (!this._dropFromPreviousState) {\n this._dropFromPreviousState = this.states.create(\"dropFromPreviousState\");\n }\n return this._dropFromPreviousState;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ColumnSeries.prototype, \"riseFromOpenState\", {\n /**\r\n * A state to apply to a column when close value is same or higher than open\r\n * value.\r\n *\r\n * Can be used to differentiate appearance based on value relations.\r\n *\r\n * NOTE: this will work only if at least one axis is [[ValueAxis]].\r\n *\r\n * @readonly You can modify state object, but can't overwrite it\r\n * @return State\r\n */\n get: function get() {\n if (!this._riseFromOpenState) {\n this._riseFromOpenState = this.states.create(\"riseFromOpenState\");\n }\n return this._riseFromOpenState;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ColumnSeries.prototype, \"riseFromPreviousState\", {\n /**\r\n * A state to apply to a column when its value is same or higher than value\r\n * of a previous column.\r\n *\r\n * Can be used to differentiate appearance based on value relations.\r\n *\r\n * @readonly You can modify state object, but can't overwrite it\r\n * @return State\r\n */\n get: function get() {\n if (!this._riseFromPreviousState) {\n this._riseFromPreviousState = this.states.create(\"riseFromPreviousState\");\n }\n return this._riseFromPreviousState;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Updates value of the related legend item.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n ColumnSeries.prototype.updateLegendValue = function (dataItem) {\n var _this = this;\n _super.prototype.updateLegendValue.call(this, dataItem);\n if (this.legendDataItem) {\n var marker = this.legendDataItem.marker;\n var fromOpenState_1;\n var fromPreviousState_1;\n if (dataItem) {\n if (dataItem.droppedFromOpen) {\n fromOpenState_1 = this._dropFromOpenState;\n } else {\n fromOpenState_1 = this._riseFromOpenState;\n }\n if (dataItem.droppedFromPrevious) {\n fromPreviousState_1 = this._dropFromPreviousState;\n } else {\n fromPreviousState_1 = this._riseFromPreviousState;\n }\n }\n $iter.each(marker.children.iterator(), function (child) {\n if (dataItem) {\n child.setState(fromPreviousState_1);\n child.setState(fromOpenState_1);\n } else {\n // todo: think what to do here, maybe apply above states based on totals?\n child.setState(_this._riseFromPreviousState);\n child.setState(_this._riseFromOpenState);\n }\n });\n }\n };\n /**\r\n * Creates elements in related legend container, that mimics the look of this\r\n * Series.\r\n *\r\n * @ignore Exclude from docs\r\n * @param marker Legend item container\r\n */\n ColumnSeries.prototype.createLegendMarker = function (marker) {\n var w = marker.pixelWidth;\n var h = marker.pixelHeight;\n marker.removeChildren();\n var column = marker.createChild(RoundedRectangle);\n column.shouldClone = false;\n $object.copyProperties(this, column, visualProperties);\n column.copyFrom(this.columns.template);\n column.padding(0, 0, 0, 0); // if columns will have padding (which is often), legend marker will be very narrow\n column.width = w;\n column.height = h;\n var legendDataItem = marker.dataItem;\n legendDataItem.color = this.fill;\n legendDataItem.colorOrig = this.fill;\n };\n /**\r\n * Copies all properties from another instance of [[ColumnSeries]].\r\n *\r\n * @param source Source series\r\n */\n ColumnSeries.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.columns.template.copyFrom(source.columns.template);\n };\n /**\r\n * returns bullet x location\r\n * @ignore\r\n */\n ColumnSeries.prototype.getBulletLocationX = function (bullet, field) {\n if (this.baseAxis == this.xAxis) {\n var bulletLocationX = bullet.locationX;\n if (!$type.isNumber(bulletLocationX)) {\n bulletLocationX = 0.5;\n }\n return this._endLocation - (this._endLocation - this._startLocation) * bulletLocationX;\n } else {\n return _super.prototype.getBulletLocationX.call(this, bullet, field);\n }\n };\n /**\r\n * returns bullet y location\r\n * @ignore\r\n */\n ColumnSeries.prototype.getBulletLocationY = function (bullet, field) {\n if (this.baseAxis == this.yAxis) {\n var bulletLocationY = bullet.locationY;\n if (!$type.isNumber(bulletLocationY)) {\n bulletLocationY = 0.5;\n }\n return this._endLocation - (this._endLocation - this._startLocation) * bulletLocationY;\n } else {\n return _super.prototype.getBulletLocationY.call(this, bullet, field);\n }\n };\n /**\r\n * @ignore Exclude from docs\r\n */\n ColumnSeries.prototype.fixVerticalCoordinate = function (coordinate) {\n var paddingBottom = this.columns.template.pixelPaddingBottom;\n var paddingTop = this.columns.template.pixelPaddingTop;\n var minY = -paddingTop;\n var maxY = this.yAxis.axisLength + paddingBottom;\n return $math.fitToRange(coordinate, minY, maxY);\n };\n /**\r\n * @ignore Exclude from docs\r\n */\n ColumnSeries.prototype.fixHorizontalCoordinate = function (coordinate) {\n var paddingLeft = this.columns.template.pixelPaddingLeft;\n var paddingRight = this.columns.template.pixelPaddingRight;\n var minX = -paddingLeft;\n var maxX = this.xAxis.axisLength + paddingRight;\n return $math.fitToRange(coordinate, minX, maxX);\n };\n /**\r\n * @ignore\r\n */\n ColumnSeries.prototype.disposeData = function () {\n _super.prototype.disposeData.call(this);\n this.columns.clear();\n };\n return ColumnSeries;\n}(XYSeries);\nexport { ColumnSeries };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"ColumnSeries\"] = ColumnSeries;\nregistry.registeredClasses[\"ColumnSeriesDataItem\"] = ColumnSeriesDataItem;","/**\r\n * TreeMap series module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { ColumnSeries, ColumnSeriesDataItem } from \"./ColumnSeries\";\nimport { visualProperties } from \"../../core/Sprite\";\nimport { registry } from \"../../core/Registry\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport * as $type from \"../../core/utils/Type\";\nimport { RoundedRectangle } from \"../../core/elements/RoundedRectangle\";\nimport * as $object from \"../../core/utils/Object\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[TreeMapSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar TreeMapSeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(TreeMapSeriesDataItem, _super);\n /**\r\n * Constructor\r\n */\n function TreeMapSeriesDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"TreeMapSeriesDataItem\";\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(TreeMapSeriesDataItem.prototype, \"parentName\", {\n /**\r\n * Data for the this particular item.\r\n *\r\n * @param value Item's data\r\n */\n //public set dataContext(value: Object) {\n //\tthis._dataContext = value;\n //}\n /**\r\n * @return Item's data\r\n */\n /*\r\n public get dataContext(): Object {\r\n // It's because data of tree series is TreeMapDataItems.\r\n if (this._dataContext) {\r\n return (this._dataContext).dataContext;\r\n }\r\n }*/\n /**\r\n * The name of the item's parent item.\r\n *\r\n * @return Parent name\r\n */\n get: function get() {\n var treeMapDataItem = this.treeMapDataItem;\n if (treeMapDataItem && treeMapDataItem.parent) {\n return treeMapDataItem.parent.name;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeMapSeriesDataItem.prototype, \"value\", {\n /**\r\n * Item's numeric value.\r\n *\r\n * @readonly\r\n * @return Value\r\n */\n get: function get() {\n var treeMapDataItem = this.treeMapDataItem;\n if (treeMapDataItem) {\n return treeMapDataItem.value;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeMapSeriesDataItem.prototype, \"treeMapDataItem\", {\n /**\r\n * A corresponding data item from the tree map.\r\n *\r\n * @readonly\r\n * @return Data item\r\n */\n get: function get() {\n return this._dataContext;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Hides the Data Item and related visual elements.\r\n *\r\n * @param duration Animation duration (ms)\r\n * @param delay Delay animation (ms)\r\n * @param toValue A value to set to `fields` when hiding\r\n * @param fields A list of data fields to set value to `toValue`\r\n */\n TreeMapSeriesDataItem.prototype.hide = function (duration, delay, toValue, fields) {\n var treeMapDataItem = this.treeMapDataItem;\n if (treeMapDataItem) {\n treeMapDataItem.hide(duration);\n }\n return _super.prototype.hide.call(this, duration, delay, toValue, fields);\n };\n /**\r\n * Shows the Data Item and related visual elements.\r\n *\r\n * @param duration Animation duration (ms)\r\n * @param delay Delay animation (ms)\r\n * @param fields A list of fields to set values of\r\n */\n TreeMapSeriesDataItem.prototype.show = function (duration, delay, fields) {\n var treeMapDataItem = this.treeMapDataItem;\n if (treeMapDataItem) {\n treeMapDataItem.show(duration, delay, fields);\n }\n return _super.prototype.show.call(this, duration, delay, fields);\n };\n return TreeMapSeriesDataItem;\n}(ColumnSeriesDataItem);\nexport { TreeMapSeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines Series for a TreeMap chart.\r\n *\r\n * @see {@link ITreeMapSeriesEvents} for a list of available Events\r\n * @see {@link ITreeMapSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\nvar TreeMapSeries = /** @class */function (_super) {\n tslib_1.__extends(TreeMapSeries, _super);\n /**\r\n * Constructor\r\n */\n function TreeMapSeries() {\n var _this = _super.call(this) || this;\n _this.className = \"TreeMapSeries\";\n _this.applyTheme();\n _this.fillOpacity = 1;\n _this.strokeOpacity = 1;\n _this.minBulletDistance = 0;\n _this.columns.template.tooltipText = \"{parentName} {name}: {value}\"; //@todo add format number?\n _this.columns.template.configField = \"config\";\n var interfaceColors = new InterfaceColorSet();\n _this.stroke = interfaceColors.getFor(\"background\");\n _this.dataFields.openValueX = \"x0\";\n _this.dataFields.valueX = \"x1\";\n _this.dataFields.openValueY = \"y0\";\n _this.dataFields.valueY = \"y1\";\n _this.sequencedInterpolation = false;\n _this.showOnInit = false;\n // otherwise nodes don't stack nicely to each other\n _this.columns.template.pixelPerfect = false;\n return _this;\n }\n /**\r\n * Processes data item.\r\n *\r\n * @param dataItem Data item\r\n * @param dataContext Raw data\r\n * @param index Index of the data item\r\n */\n TreeMapSeries.prototype.processDataItem = function (dataItem, dataContext) {\n dataContext.seriesDataItem = dataItem; // save a reference here. dataContext is TreeMapDataItem and we need to know dataItem sometimes\n _super.prototype.processDataItem.call(this, dataItem, dataContext);\n };\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n TreeMapSeries.prototype.createDataItem = function () {\n return new TreeMapSeriesDataItem();\n };\n /**\r\n * Shows series.\r\n *\r\n * @param duration Duration of fade in (ms)\r\n * @return Animation\r\n */\n TreeMapSeries.prototype.show = function (duration) {\n var interpolationDuration = this.defaultState.transitionDuration;\n if ($type.isNumber(duration)) {\n interpolationDuration = duration;\n }\n this.dataItems.each(function (dataItem) {\n //dataItem.treeMapDataItem.setWorkingValue(\"value\", dataItem.treeMapDataItem.values.value.value);\n dataItem.show(duration);\n });\n return _super.prototype.showReal.call(this, interpolationDuration);\n };\n /**\r\n * Hides series.\r\n *\r\n * @param duration Duration of fade out (ms)\r\n * @return Animation\r\n */\n TreeMapSeries.prototype.hide = function (duration) {\n var interpolationDuration = this.defaultState.transitionDuration;\n if ($type.isNumber(duration)) {\n interpolationDuration = duration;\n }\n var animation = _super.prototype.hideReal.call(this, interpolationDuration);\n this.dataItems.each(function (dataItem) {\n //dataItem.treeMapDataItem.setWorkingValue(\"value\", 0);\n dataItem.hide(duration);\n });\n return animation;\n };\n /**\r\n * Process values.\r\n *\r\n * @ignore Exclude from docs\r\n */\n TreeMapSeries.prototype.processValues = function () {\n // Just overriding so that inherited method does not kick in.\n };\n /**\r\n * @ignore\r\n */\n TreeMapSeries.prototype.dataChangeUpdate = function () {};\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n TreeMapSeries.prototype.processConfig = function (config) {\n if (config) {\n // Add empty data fields if the they are not set, so that XYSeries\n // dataField check does not result in error.\n if (!$type.hasValue(config.dataFields) || !$type.isObject(config.dataFields)) {\n config.dataFields = {};\n }\n }\n _super.prototype.processConfig.call(this, config);\n };\n /**\r\n * Creates elements in related legend container, that mimics the look of this\r\n * Series.\r\n *\r\n * @ignore Exclude from docs\r\n * @param marker Legend item container\r\n */\n TreeMapSeries.prototype.createLegendMarker = function (marker) {\n var w = marker.pixelWidth;\n var h = marker.pixelHeight;\n marker.removeChildren();\n var column = marker.createChild(RoundedRectangle);\n column.shouldClone = false;\n $object.copyProperties(this, column, visualProperties);\n //column.copyFrom(this.columns.template);\n column.padding(0, 0, 0, 0); // if columns will have padding (which is often), legend marker will be very narrow\n column.width = w;\n column.height = h;\n var legendDataItem = marker.dataItem;\n legendDataItem.color = column.fill;\n legendDataItem.colorOrig = column.fill;\n };\n return TreeMapSeries;\n}(ColumnSeries);\nexport { TreeMapSeries };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"TreeMapSeries\"] = TreeMapSeries;\nregistry.registeredClasses[\"TreeMapSeriesDataItem\"] = TreeMapSeriesDataItem;","/**\r\n * TreeMap chart module.\r\n *\r\n * Parts of the functionality used in this module are taken from D3.js library\r\n * (https://d3js.org/)\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { XYChart, XYChartDataItem } from \"./XYChart\";\nimport { registry } from \"../../core/Registry\";\nimport { DictionaryTemplate, DictionaryDisposer } from \"../../core/utils/Dictionary\";\nimport { ValueAxis } from \"../axes/ValueAxis\";\nimport { TreeMapSeries } from \"../series/TreeMapSeries\";\nimport { ColorSet } from \"../../core/utils/ColorSet\";\nimport { MouseCursorStyle } from \"../../core/interaction/Mouse\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $array from \"../../core/utils/Array\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[TreeMap]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar TreeMapDataItem = /** @class */function (_super) {\n tslib_1.__extends(TreeMapDataItem, _super);\n /**\r\n * Constructor\r\n */\n function TreeMapDataItem() {\n var _this = _super.call(this) || this;\n /**\r\n * Required for squarify functionality.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this.rows = [];\n _this.className = \"TreeMapDataItem\";\n _this.values.value = {};\n _this.values.x0 = {};\n _this.values.y0 = {};\n _this.values.x1 = {};\n _this.values.y1 = {};\n _this.hasChildren.children = true;\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(TreeMapDataItem.prototype, \"legendDataItem\", {\n /**\r\n * @return Legend data item\r\n */\n get: function get() {\n return this._legendDataItem;\n },\n /**\r\n * A legend's data item, that corresponds to this data item.\r\n *\r\n * @param value Legend data item\r\n */\n set: function set(value) {\n this._legendDataItem = value;\n if (value.label) {\n value.label.dataItem = this;\n }\n if (value.valueLabel) {\n value.valueLabel.dataItem = this;\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns a duration (ms) the Data Item should take to animate from one\r\n * value to another.\r\n *\r\n * If the duration is not specified via parameter, this method will try to\r\n * request a default duration from the related `Component`.\r\n *\r\n * @param duration Default duration (ms)\r\n * @return Duration (ms)\r\n */\n TreeMapDataItem.prototype.getDuration = function () {\n return 0;\n };\n Object.defineProperty(TreeMapDataItem.prototype, \"value\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n var value = 0;\n if (!this.children || this.children.length == 0) {\n value = this.values[\"value\"].workingValue;\n } else {\n $iter.each(this.children.iterator(), function (child) {\n var childValue = child.value;\n if ($type.isNumber(childValue)) {\n value += childValue;\n }\n });\n }\n return value;\n /*\r\n let value = this.values[\"value\"].workingValue;\r\n if (!$type.isNumber(value)) {\r\n value = 0;\r\n if (this.children) {\r\n $iter.each(this.children.iterator(), (child) => {\r\n if ($type.isNumber(child.value)) {\r\n value += child.value;\r\n }\r\n });\r\n }\r\n }\r\n return value;*/\n },\n /**\r\n * Numeric value of the item.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setValue(\"value\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeMapDataItem.prototype, \"percent\", {\n get: function get() {\n if (this.parent) {\n return this.value / this.parent.value * 100;\n }\n return 100;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeMapDataItem.prototype, \"x0\", {\n /**\r\n * @return X\r\n */\n get: function get() {\n return this.values.x0.value;\n },\n /**\r\n * Item's X position.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param value X\r\n */\n set: function set(value) {\n this.setValue(\"x0\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeMapDataItem.prototype, \"x1\", {\n /**\r\n * @return X\r\n */\n get: function get() {\n return this.values.x1.value;\n },\n /**\r\n * Item's X position.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param value X\r\n */\n set: function set(value) {\n this.setValue(\"x1\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeMapDataItem.prototype, \"y0\", {\n /**\r\n * @return Y\r\n */\n get: function get() {\n return this.values.y0.value;\n },\n /**\r\n * Item's Y position.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param value Y\r\n */\n set: function set(value) {\n this.setValue(\"y0\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeMapDataItem.prototype, \"y1\", {\n /**\r\n * @return Y\r\n */\n get: function get() {\n return this.values.y1.value;\n },\n /**\r\n * Item's Y position.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @param value Y\r\n */\n set: function set(value) {\n this.setValue(\"y1\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeMapDataItem.prototype, \"name\", {\n /**\r\n * @return Name\r\n */\n get: function get() {\n return this.properties.name;\n },\n /**\r\n * Item's name.\r\n *\r\n * @param name Name\r\n */\n set: function set(name) {\n this.setProperty(\"name\", name);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeMapDataItem.prototype, \"children\", {\n /**\r\n * @return Item's children\r\n */\n get: function get() {\n return this.properties.children;\n },\n /**\r\n * A list of item's sub-children.\r\n *\r\n * Having children means that the TreeMap chat will automatically be\r\n * \"drillable\". Clicking on an item with children will zoom to the item, then\r\n * display its children.\r\n *\r\n * Treemap can have any level of nesting.\r\n *\r\n * @param children Item's children\r\n */\n set: function set(children) {\n this.setProperty(\"children\", children);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeMapDataItem.prototype, \"level\", {\n /**\r\n * Depth level in the treemap hierarchy.\r\n *\r\n * The top-level item will have level set at 0. Its children will have\r\n * level 1, and so on.\r\n *\r\n * @readonly\r\n * @return Level\r\n */\n get: function get() {\n if (!this.parent) {\n return 0;\n } else {\n return this.parent.level + 1;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeMapDataItem.prototype, \"color\", {\n /**\r\n * @return Color\r\n */\n get: function get() {\n var color = this.properties.color;\n if (color == undefined) {\n if (this.parent) {\n color = this.parent.color;\n }\n }\n if (color == undefined) {\n if (this.component) {\n color = this.component.colors.getIndex(this.component.colors.step * this.index);\n }\n }\n return color;\n },\n /**\r\n * Item's color.\r\n *\r\n * If not set, will use parent's color, or, if that is not set either,\r\n * automatically assigned color from chart's color set. (`chart.colors`)\r\n *\r\n * @param value Color\r\n */\n set: function set(value) {\n this.setProperty(\"color\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeMapDataItem.prototype, \"fill\", {\n /**\r\n * @ignore\r\n * For the legend to work properly\r\n */\n get: function get() {\n return this.color;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeMapDataItem.prototype, \"series\", {\n get: function get() {\n return this._series;\n },\n /**\r\n * Series of children data items\r\n * @todo: proper descrition\r\n */\n set: function set(series) {\n if (series != this._series) {\n if (this._series) {\n this.component.series.removeValue(this._series);\n this._series.dispose();\n }\n this._series = series;\n this._disposers.push(series);\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Hides the Data Item and related visual elements.\r\n *\r\n * @param duration Animation duration (ms)\r\n * @param delay Delay animation (ms)\r\n * @param toValue A value to set to `fields` when hiding\r\n * @param fields A list of data fields to set value to `toValue`\r\n */\n TreeMapDataItem.prototype.hide = function (duration, delay, toValue, fields) {\n this.setWorkingValue(\"value\", 0);\n if (this.children) {\n this.children.each(function (child) {\n child.hide(duration, delay, toValue, fields);\n });\n }\n return _super.prototype.hide.call(this, duration, delay, toValue, fields);\n };\n /**\r\n * Shows the Data Item and related visual elements.\r\n *\r\n * @param duration Animation duration (ms)\r\n * @param delay Delay animation (ms)\r\n * @param fields A list of fields to set values of\r\n */\n TreeMapDataItem.prototype.show = function (duration, delay, fields) {\n this.setWorkingValue(\"value\", this.values.value.value);\n if (this.children) {\n this.children.each(function (child) {\n child.show(duration, delay, fields);\n });\n }\n return _super.prototype.show.call(this, duration, delay, fields);\n };\n return TreeMapDataItem;\n}(XYChartDataItem);\nexport { TreeMapDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a TreeMap chart.\r\n *\r\n * @see {@link ITreeMapEvents} for a list of available Events\r\n * @see {@link ITreeMapAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/treemap/} for documentation\r\n */\nvar TreeMap = /** @class */function (_super) {\n tslib_1.__extends(TreeMap, _super);\n /**\r\n * Constructor\r\n */\n function TreeMap() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * An algorithm used to divide area into squares based on their value.\r\n *\r\n * Available options: squarify (default), binaryTree, slice, dice, sliceDice.\r\n *\r\n * ```TypeScript\r\n * chart.layoutAlgorithm = chart.sliceDice;\r\n * ```\r\n * ```JavaScript\r\n * chart.layoutAlgorithm = chart.sliceDice;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"layoutAlgorithm\": \"sliceDice\",\r\n * // ...\r\n * }\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/treemap/#Area_division_methods} For more info and examples.\r\n * @default squarify\r\n */\n _this.layoutAlgorithm = _this.squarify;\n /**\r\n * Is the chart zoomable?\r\n *\r\n * If the chart is `zoomable`, and items have sub-items, the chart will\r\n * drill-down to sub-items when click on their parent item.\r\n *\r\n * @default true\r\n */\n _this.zoomable = true;\n _this.className = \"TreeMap\";\n _this.maxLevels = 2;\n _this.currentLevel = 0;\n _this.colors = new ColorSet();\n _this.sorting = \"descending\";\n // create two value axes for the chart\n var xAxis = _this.xAxes.push(new ValueAxis());\n xAxis.title.disabled = true;\n xAxis.strictMinMax = true;\n var xRenderer = xAxis.renderer;\n xRenderer.inside = true;\n xRenderer.labels.template.disabled = true;\n xRenderer.ticks.template.disabled = true;\n xRenderer.grid.template.disabled = true;\n xRenderer.axisFills.template.disabled = true;\n xRenderer.minGridDistance = 100;\n xRenderer.line.disabled = true;\n xRenderer.baseGrid.disabled = true;\n //xRenderer.inversed = true;\n var yAxis = _this.yAxes.push(new ValueAxis());\n yAxis.title.disabled = true;\n yAxis.strictMinMax = true;\n var yRenderer = yAxis.renderer;\n yRenderer.inside = true;\n yRenderer.labels.template.disabled = true;\n yRenderer.ticks.template.disabled = true;\n yRenderer.grid.template.disabled = true;\n yRenderer.axisFills.template.disabled = true;\n yRenderer.minGridDistance = 100;\n yRenderer.line.disabled = true;\n yRenderer.baseGrid.disabled = true;\n yRenderer.inversed = true;\n // shortcuts\n _this.xAxis = xAxis;\n _this.yAxis = yAxis;\n var template = new TreeMapSeries();\n _this.seriesTemplates = new DictionaryTemplate(template);\n _this._disposers.push(new DictionaryDisposer(_this.seriesTemplates));\n _this._disposers.push(template);\n _this.zoomOutButton.events.on(\"hit\", function () {\n _this.zoomToChartDataItem(_this._homeDataItem);\n }, undefined, false);\n _this.seriesTemplates.events.on(\"insertKey\", function (event) {\n event.newValue.isTemplate = true;\n }, undefined, false);\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(TreeMap.prototype, \"navigationBar\", {\n /**\r\n * Returns navigationBar if it is added to a chart\r\n */\n get: function get() {\n return this._navigationBar;\n },\n /**\r\n * A navigation bar used to show \"breadcrumb\" control, indicating current\r\n * drill-down path.\r\n */\n set: function set(navigationBar) {\n var _this = this;\n if (this._navigationBar != navigationBar) {\n this._navigationBar = navigationBar;\n navigationBar.parent = this;\n navigationBar.toBack();\n navigationBar.links.template.events.on(\"hit\", function (event) {\n var dataItem = event.target.dataItem.dataContext;\n if (!dataItem.isDisposed()) {\n _this.zoomToChartDataItem(dataItem);\n _this.createTreeSeries(dataItem);\n }\n }, undefined, true);\n this._disposers.push(navigationBar);\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * (Re)validates chart's data.\r\n *\r\n * @ignore Exclude from docs\r\n */\n TreeMap.prototype.validateData = function () {\n this.series.clear();\n this._tempSeries = [];\n _super.prototype.validateData.call(this);\n if (this._homeDataItem) {\n this._homeDataItem.dispose();\n }\n var homeDataItem = this.dataItems.template.clone(); // cant' use createDataItem here!\n this._homeDataItem = homeDataItem;\n $iter.each(this.dataItems.iterator(), function (dataItem) {\n dataItem.parent = homeDataItem;\n });\n homeDataItem.children = this.dataItems;\n homeDataItem.x0 = 0;\n homeDataItem.y0 = 0;\n homeDataItem.name = this._homeText;\n var maxX = 1000;\n var maxY = Math.round(maxX * this.pixelHeight / this.pixelWidth / 10) * 10 || 1000;\n homeDataItem.x1 = maxX;\n homeDataItem.y1 = maxY;\n this.xAxis.min = 0;\n this.xAxis.max = maxX;\n this.xAxis.getMinMax();\n this.yAxis.min = 0;\n this.yAxis.max = maxY;\n this.yAxis.getMinMax();\n this.layoutItems(homeDataItem);\n this.createTreeSeries(homeDataItem);\n };\n /**\r\n * Layouts and sizes all items according to their value and\r\n * `layoutAlgorithm`.\r\n *\r\n * @ignore Exclude from docs\r\n * @param parent Parent data item\r\n */\n TreeMap.prototype.layoutItems = function (parent, sorting) {\n if (parent) {\n var children = parent.children;\n if (!sorting) {\n sorting = this.sorting;\n }\n if (sorting == \"ascending\") {\n children.values.sort(function (a, b) {\n return a.value - b.value;\n });\n }\n if (sorting == \"descending\") {\n children.values.sort(function (a, b) {\n return b.value - a.value;\n });\n }\n this._updateDataItemIndexes(0);\n this.layoutAlgorithm(parent);\n for (var i = 0, len = children.length; i < len; i++) {\n var node = children.getIndex(i);\n if (node.children) {\n this.layoutItems(node);\n }\n }\n }\n };\n /**\r\n * Creates and returns a new treemap series.\r\n *\r\n * @todo Description\r\n * @param dataItem Data item to create series out of\r\n */\n TreeMap.prototype.createTreeSeries = function (dataItem) {\n var _this = this;\n this._tempSeries = [];\n var navigationData = [dataItem];\n // create parent series and navigation data\n var parentDataItem = dataItem.parent;\n while (parentDataItem != undefined) {\n this.initSeries(parentDataItem);\n navigationData.push(parentDataItem);\n parentDataItem = parentDataItem.parent;\n }\n navigationData.reverse();\n if (this.navigationBar) {\n this.navigationBar.data = navigationData;\n }\n // create series and children series\n this.createTreeSeriesReal(dataItem);\n // add those which are not in the list\n $array.each(this._tempSeries, function (series) {\n if (_this.series.indexOf(series) == -1) {\n _this.series.push(series);\n }\n series.zIndex = series.level;\n });\n };\n /**\r\n * [createTreeSeriesReal description]\r\n *\r\n * @todo Description\r\n * @param dataItem [description]\r\n */\n TreeMap.prototype.createTreeSeriesReal = function (dataItem) {\n if (dataItem.children) {\n var level = dataItem.level;\n if (level < this.currentLevel + this.maxLevels) {\n this.initSeries(dataItem);\n for (var i = 0; i < dataItem.children.length; i++) {\n var child = dataItem.children.getIndex(i);\n if (child.children) {\n this.createTreeSeriesReal(child);\n }\n }\n }\n }\n };\n TreeMap.prototype.setData = function (value) {\n this.currentLevel = 0;\n this.currentlyZoomed = undefined;\n this.xAxis.start = 0;\n this.xAxis.end = 1;\n this.yAxis.start = 0;\n this.yAxis.end = 1;\n _super.prototype.setData.call(this, value);\n };\n /**\r\n * @ignore\r\n * Overriding, as tree map series are created on the fly all the time\r\n */\n TreeMap.prototype.seriesAppeared = function () {\n return true;\n };\n /**\r\n * Initializes the treemap series.\r\n *\r\n * @todo Description\r\n * @param dataItem Chart data item\r\n */\n TreeMap.prototype.initSeries = function (dataItem) {\n var _this = this;\n if (!dataItem.series) {\n var series = void 0;\n var template = this.seriesTemplates.getKey(dataItem.level.toString());\n if (template) {\n series = template.clone();\n } else {\n series = this.series.create();\n }\n // for the legend to get {value}\n series.dataItem.dataContext = dataItem;\n series.name = dataItem.name;\n series.parentDataItem = dataItem;\n dataItem.series = series;\n var level = dataItem.level;\n series.level = level;\n var dataContext = dataItem.dataContext;\n if (dataContext) {\n series.config = dataContext.config;\n }\n this.dataUsers.removeValue(series); // series do not use data directly, that's why we remove it\n series.data = dataItem.children.values;\n series.fill = dataItem.color;\n series.columnsContainer.hide(0);\n series.bulletsContainer.hide(0);\n series.columns.template.adapter.add(\"fill\", function (fill, target) {\n var dataItem = target.dataItem;\n if (dataItem) {\n var treeMapDataItem = dataItem.treeMapDataItem;\n if (treeMapDataItem) {\n target.fill = treeMapDataItem.color;\n target.adapter.remove(\"fill\"); //@todo: make it possible adapters applied once?\n return treeMapDataItem.color;\n }\n }\n });\n if (this.zoomable && (dataItem.level > this.currentLevel || dataItem.children && dataItem.children.length > 0)) {\n series.columns.template.cursorOverStyle = MouseCursorStyle.pointer;\n if (this.zoomable) {\n series.columns.template.events.on(\"hit\", function (event) {\n var seriesDataItem = event.target.dataItem;\n if (dataItem.level > _this.currentLevel) {\n _this.zoomToChartDataItem(seriesDataItem.treeMapDataItem.parent);\n } else {\n _this.zoomToSeriesDataItem(seriesDataItem);\n }\n }, this, undefined);\n }\n }\n }\n this._tempSeries.push(dataItem.series);\n };\n /**\r\n * Toggles bullets so that labels that belong to current drill level are\r\n * shown.\r\n *\r\n * @param duration Animation duration (ms)\r\n */\n TreeMap.prototype.toggleBullets = function (duration) {\n var _this = this;\n // hide all series which are not in tempSeries\n $iter.each(this.series.iterator(), function (series) {\n if (_this._tempSeries.indexOf(series) == -1) {\n //series.hideReal(duration);\n series.columnsContainer.hide();\n series.bulletsContainer.hide(duration);\n } else {\n //series.showReal(duration);\n series.columnsContainer.show();\n series.bulletsContainer.show(duration);\n if (series.level < _this.currentLevel) {\n series.bulletsContainer.hide(duration);\n }\n }\n });\n };\n /**\r\n * Zooms to particular item in series.\r\n *\r\n * @param dataItem Data item\r\n */\n TreeMap.prototype.zoomToSeriesDataItem = function (dataItem) {\n this.zoomToChartDataItem(dataItem.treeMapDataItem);\n };\n /**\r\n * Zooms to particular item.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n TreeMap.prototype.zoomToChartDataItem = function (dataItem) {\n var _this = this;\n var zoomOutButton = this.zoomOutButton;\n // this is needed because if there is only one fist level, it wont' be shown\n if (zoomOutButton) {\n if (dataItem != this._homeDataItem) {\n zoomOutButton.show();\n } else {\n zoomOutButton.hide();\n }\n }\n if (dataItem && dataItem.children) {\n this.xAxis.zoomToValues(dataItem.x0, dataItem.x1);\n this.yAxis.zoomToValues(dataItem.y0, dataItem.y1);\n this.currentLevel = dataItem.level;\n this.currentlyZoomed = dataItem;\n this.createTreeSeries(dataItem);\n var rangeChangeAnimation = this.xAxis.rangeChangeAnimation || this.yAxis.rangeChangeAnimation;\n if (rangeChangeAnimation && !rangeChangeAnimation.isDisposed() && !rangeChangeAnimation.isFinished()) {\n this._dataDisposers.push(rangeChangeAnimation);\n rangeChangeAnimation.events.once(\"animationended\", function () {\n _this.toggleBullets();\n });\n } else {\n this.toggleBullets();\n }\n }\n };\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n TreeMap.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n // Add a default screen reader title for accessibility\n // This will be overridden in screen reader if there are any `titles` set\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"TreeMap chart\");\n }\n //this.homeText = this.language.translate(\"Home\");\n };\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n TreeMap.prototype.createDataItem = function () {\n return new TreeMapDataItem();\n };\n Object.defineProperty(TreeMap.prototype, \"maxLevels\", {\n /**\r\n * @return Maximum drill-down level\r\n */\n get: function get() {\n return this.getPropertyValue(\"maxLevels\");\n },\n /**\r\n * Maximum number of levels the chart will display initially.\r\n *\r\n * @default 2\r\n * @param value Maximum drill-down level\r\n */\n set: function set(value) {\n this.setPropertyValue(\"maxLevels\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeMap.prototype, \"currentLevel\", {\n /**\r\n * @return Current level\r\n */\n get: function get() {\n return this.getPropertyValue(\"currentLevel\");\n },\n /**\r\n * Current drill-down level the chart is at.\r\n *\r\n * @param value Current level\r\n */\n set: function set(value) {\n this.setPropertyValue(\"currentLevel\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeMap.prototype, \"sorting\", {\n get: function get() {\n return this.getPropertyValue(\"sorting\");\n },\n /**\r\n * Sorting direction of treemap items.\r\n *\r\n * Available options: \"none\", \"ascending\", and \"descending\" (default).\r\n *\r\n * @default \"descending\"\r\n * @param value [description]\r\n */\n set: function set(value) {\n this.setPropertyValue(\"sorting\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates and returns a new series of the suitable type.\r\n *\r\n * @return new series\r\n */\n TreeMap.prototype.createSeries = function () {\n return new TreeMapSeries();\n };\n Object.defineProperty(TreeMap.prototype, \"homeText\", {\n /**\r\n * @return Home text\r\n */\n get: function get() {\n return this._homeText;\n },\n /**\r\n * A text displayed on the \"home\" button which is used to go back to level 0\r\n * after drill into sub-items.\r\n *\r\n * @param value Home text\r\n */\n set: function set(value) {\n this._homeText = value;\n if (this._homeDataItem) {\n this._homeDataItem.name = this._homeText;\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n TreeMap.prototype.processConfig = function (config) {\n if (config) {\n // Instantiate layout algorithm\n if ($type.hasValue(config[\"layoutAlgorithm\"]) && $type.isString(config[\"layoutAlgorithm\"])) {\n switch (config[\"layoutAlgorithm\"]) {\n case \"squarify\":\n config[\"layoutAlgorithm\"] = this.squarify;\n break;\n case \"binaryTree\":\n config[\"layoutAlgorithm\"] = this.binaryTree;\n break;\n case \"slice\":\n config[\"layoutAlgorithm\"] = this.slice;\n break;\n case \"dice\":\n config[\"layoutAlgorithm\"] = this.dice;\n break;\n case \"sliceDice\":\n config[\"layoutAlgorithm\"] = this.sliceDice;\n break;\n default:\n delete config[\"layoutAlgorithm\"];\n break;\n }\n }\n // Set type for navigation bar\n if ($type.hasValue(config.navigationBar) && !$type.hasValue(config.navigationBar.type)) {\n config.navigationBar.type = \"NavigationBar\";\n }\n _super.prototype.processConfig.call(this, config);\n }\n };\n /**\r\n * Measures the size of container and informs its children of how much size\r\n * they can occupy, by setting their relative `maxWidth` and `maxHeight`\r\n * properties.\r\n *\r\n * @ignore Exclude from docs\r\n */\n TreeMap.prototype.validateLayout = function () {\n _super.prototype.validateLayout.call(this);\n this.layoutItems(this.currentlyZoomed);\n };\n /**\r\n * Validates (processes) data items.\r\n *\r\n * @ignore Exclude from docs\r\n */\n TreeMap.prototype.validateDataItems = function () {\n _super.prototype.validateDataItems.call(this);\n this.layoutItems(this._homeDataItem);\n $iter.each(this.series.iterator(), function (series) {\n series.validateRawData();\n });\n this.zoomToChartDataItem(this._homeDataItem);\n };\n /**\r\n * ==========================================================================\r\n * TREEMAP LAYOUT FUNCTIONS\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * The functions below are from D3.js library (https://d3js.org/)\r\n *\r\n * --------------------------------------------------------------------------\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright\r\n * notice,this list of conditions and the following disclaimer in the\r\n * documentation and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from\r\n * this software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * --------------------------------------------------------------------------\r\n * @hidden\r\n */\n /**\r\n * Treemap layout algorithm: binaryTree.\r\n *\r\n * @ignore Exclude from docs\r\n * @param parent Data item\r\n */\n TreeMap.prototype.binaryTree = function (parent) {\n var nodes = parent.children,\n i,\n n = nodes.length,\n sum,\n sums = new Array(n + 1);\n for (sums[0] = sum = i = 0; i < n; ++i) {\n sums[i + 1] = sum += nodes.getIndex(i).value;\n }\n partition(0, n, parent.value, parent.x0, parent.y0, parent.x1, parent.y1);\n function partition(i, j, value, x0, y0, x1, y1) {\n if (i >= j - 1) {\n var node = nodes.getIndex(i);\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n return;\n }\n var valueOffset = sums[i],\n valueTarget = value / 2 + valueOffset,\n k = i + 1,\n hi = j - 1;\n while (k < hi) {\n var mid = k + hi >>> 1;\n if (sums[mid] < valueTarget) {\n k = mid + 1;\n } else {\n hi = mid;\n }\n }\n if (valueTarget - sums[k - 1] < sums[k] - valueTarget && i + 1 < k) {\n --k;\n }\n var valueLeft = sums[k] - valueOffset,\n valueRight = value - valueLeft;\n if (x1 - x0 > y1 - y0) {\n var xk = (x0 * valueRight + x1 * valueLeft) / value;\n partition(i, k, valueLeft, x0, y0, xk, y1);\n partition(k, j, valueRight, xk, y0, x1, y1);\n } else {\n var yk = (y0 * valueRight + y1 * valueLeft) / value;\n partition(i, k, valueLeft, x0, y0, x1, yk);\n partition(k, j, valueRight, x0, yk, x1, y1);\n }\n }\n };\n /**\r\n * Treemap layout algorithm: slice.\r\n *\r\n * @ignore Exclude from docs\r\n * @param parent Data item\r\n */\n TreeMap.prototype.slice = function (parent) {\n var x0 = parent.x0;\n var x1 = parent.x1;\n var y0 = parent.y0;\n var y1 = parent.y1;\n var nodes = parent.children;\n var node;\n var i = -1;\n var n = nodes.length;\n var k = parent.value && (y1 - y0) / parent.value;\n while (++i < n) {\n node = nodes.getIndex(i);\n node.x0 = x0;\n node.x1 = x1;\n node.y0 = y0;\n y0 += node.value * k;\n node.y1 = y0;\n }\n };\n /**\r\n * Treemap layout algorithm: dice.\r\n *\r\n * @ignore Exclude from docs\r\n * @param parent Data item\r\n */\n TreeMap.prototype.dice = function (parent) {\n var x0 = parent.x0;\n var x1 = parent.x1;\n var y0 = parent.y0;\n var y1 = parent.y1;\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (x1 - x0) / parent.value;\n while (++i < n) {\n node = nodes.getIndex(i);\n node.y0 = y0;\n node.y1 = y1;\n node.x0 = x0;\n x0 += node.value * k;\n node.x1 = x0;\n }\n };\n /**\r\n * Treemap layout algorithm: slideDice.\r\n *\r\n * @ignore Exclude from docs\r\n * @param parent Data item\r\n */\n TreeMap.prototype.sliceDice = function (parent) {\n if (parent.level & 1) {\n this.slice(parent);\n } else {\n this.dice(parent);\n }\n };\n /**\r\n * Treemap layout algorithm: squarify.\r\n *\r\n * @ignore Exclude from docs\r\n * @param parent Data item\r\n */\n TreeMap.prototype.squarify = function (parent) {\n var ratio = (1 + Math.sqrt(5)) / 2;\n var x0 = parent.x0;\n var x1 = parent.x1;\n var y0 = parent.y0;\n var y1 = parent.y1;\n var nodes = parent.children;\n var nodeValue;\n var i0 = 0;\n var i1 = 0;\n var n = nodes.length;\n var dx;\n var dy;\n var value = parent.value;\n var sumValue;\n var minValue;\n var maxValue;\n var newRatio;\n var minRatio;\n var alpha;\n var beta;\n while (i0 < n) {\n dx = x1 - x0;\n dy = y1 - y0;\n // Find the next non-empty node.\n do {\n sumValue = nodes.getIndex(i1++).value;\n } while (!sumValue && i1 < n);\n minValue = maxValue = sumValue;\n alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n beta = sumValue * sumValue * alpha;\n minRatio = Math.max(maxValue / beta, beta / minValue);\n // Keep adding nodes while the aspect ratio maintains or improves.\n for (; i1 < n; ++i1) {\n sumValue += nodeValue = nodes.getIndex(i1).value;\n if (nodeValue < minValue) {\n minValue = nodeValue;\n }\n if (nodeValue > maxValue) {\n maxValue = nodeValue;\n }\n beta = sumValue * sumValue * alpha;\n newRatio = Math.max(maxValue / beta, beta / minValue);\n if (newRatio > minRatio) {\n sumValue -= nodeValue;\n break;\n }\n minRatio = newRatio;\n }\n // Position and record the row orientation.\n var row = this.dataItems.template.clone();\n row.value = sumValue;\n row.dice = dx < dy;\n row.children = nodes.slice(i0, i1);\n row.x0 = x0;\n row.y0 = y0;\n row.x1 = x1;\n row.y1 = y1;\n if (row.dice) {\n row.y1 = value ? y0 += dy * sumValue / value : y1;\n this.dice(row);\n } else {\n row.x1 = value ? x0 += dx * sumValue / value : x1;\n this.slice(row);\n }\n value -= sumValue;\n i0 = i1;\n }\n };\n /**\r\n * [handleDataItemValueChange description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n TreeMap.prototype.handleDataItemValueChange = function (dataItem, name) {\n if (name == \"value\") {\n this.invalidateDataItems();\n }\n };\n TreeMap.prototype.handleDataItemWorkingValueChange = function (dataItem, name) {\n if (name == \"value\") {\n this.invalidateDataItems();\n }\n };\n TreeMap.prototype.getLegendLevel = function (dataItem) {\n if (!dataItem) {\n return;\n }\n if (!dataItem.children) {\n return;\n }\n if (dataItem.children.length > 1) {\n return dataItem;\n } else if (dataItem.children.length == 1) {\n return this.getLegendLevel(dataItem.children.getIndex(0));\n } else {\n return dataItem;\n }\n };\n /**\r\n * Setups the legend to use the chart's data.\r\n * @ignore\r\n */\n TreeMap.prototype.feedLegend = function () {\n var legend = this.legend;\n if (legend) {\n legend.dataFields.name = \"name\";\n var legendParent = this.getLegendLevel(this._homeDataItem);\n if (legendParent) {\n var legendData_1 = [];\n legendParent.children.each(function (dataItem) {\n //if (!dataItem.hiddenInLegend) {\n legendData_1.push(dataItem);\n //}\n });\n legend.data = legendData_1;\n }\n }\n };\n /**\r\n * @ignore\r\n */\n TreeMap.prototype.disposeData = function () {\n _super.prototype.disposeData.call(this);\n this._homeDataItem = undefined;\n this.series.clear();\n if (this.navigationBar) {\n this.navigationBar.disposeData();\n }\n this.xAxis.disposeData();\n this.yAxis.disposeData();\n };\n /**\r\n * Since this chart uses hierarchical data, we need to remove childrent\r\n * dataField from export of non-hierarchical formats such as CSV and XSLX.\r\n *\r\n * @return Export\r\n */\n TreeMap.prototype.getExporting = function () {\n var _this = this;\n var exporting = _super.prototype.getExporting.call(this);\n exporting.adapter.add(\"formatDataFields\", function (info) {\n if (info.format == \"csv\" || info.format == \"xlsx\") {\n if ($type.hasValue(_this.dataFields.children)) {\n delete info.dataFields[_this.dataFields.children];\n }\n }\n return info;\n });\n return exporting;\n };\n return TreeMap;\n}(XYChart);\nexport { TreeMap };\n/**\r\n * Register class, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"TreeMap\"] = TreeMap;","/**\r\n * Module, defining Axis Renderer for horizontal 3D axes.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { AxisRendererX } from \"../axes/AxisRendererX\";\nimport { MutableValueDisposer } from \"../../core/utils/Disposer\";\nimport { registry } from \"../../core/Registry\";\nimport * as $path from \"../../core/rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Renderer for horizontal 3D axis.\r\n *\r\n * @see {@link IAxisRendererX3DEvents} for a list of available events\r\n * @see {@link IAxisRendererX3DAdapters} for a list of available Adapters\r\n */\nvar AxisRendererX3D = /** @class */function (_super) {\n tslib_1.__extends(AxisRendererX3D, _super);\n /**\r\n * Constructor.\r\n *\r\n * @param axis Related axis\r\n */\n function AxisRendererX3D() {\n var _this = _super.call(this) || this;\n /**\r\n * A related chart.\r\n *\r\n * @todo Description\r\n */\n _this._chart = new MutableValueDisposer();\n _this.className = \"AxisRendererX3D\";\n _this._disposers.push(_this._chart);\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Updates and positions a grid element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param grid Grid element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\n AxisRendererX3D.prototype.updateGridElement = function (grid, position, endPosition) {\n position = position + (endPosition - position) * grid.location;\n var point = this.positionToPoint(position);\n if (grid.element) {\n var dx = this.chart.dx3D || 0;\n var dy = this.chart.dy3D || 0;\n var h = this.getHeight();\n grid.path = $path.moveTo({\n x: dx,\n y: dy\n }) + $path.lineTo({\n x: dx,\n y: h + dy\n }) + $path.lineTo({\n x: 0,\n y: h\n });\n }\n this.positionItem(grid, point);\n this.toggleVisibility(grid, position, 0, 1);\n };\n /**\r\n * Updates and positions the base grid element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisRendererX3D.prototype.updateBaseGridElement = function () {\n _super.prototype.updateBaseGridElement.call(this);\n var h = this.getHeight();\n var dx = this.chart.dx3D || 0;\n var dy = this.chart.dy3D || 0;\n this.baseGrid.path = $path.moveTo({\n x: dx,\n y: dy\n }) + $path.lineTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: 0,\n y: h\n });\n };\n Object.defineProperty(AxisRendererX3D.prototype, \"chart\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Chart\r\n */\n get: function get() {\n return this._chart.get();\n },\n /**\r\n * Chart, associated with the Axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Chart\r\n */\n set: function set(chart) {\n if (chart) {\n this._chart.set(chart, chart.events.on(\"propertychanged\", this.handle3DChanged, this, false));\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Invoked when 3D-related settings change, like depth or angle.\r\n *\r\n * @param event Event\r\n */\n AxisRendererX3D.prototype.handle3DChanged = function (event) {\n if (event.property == \"depth\" || event.property == \"angle\") {\n this.invalidate();\n }\n };\n return AxisRendererX3D;\n}(AxisRendererX);\nexport { AxisRendererX3D };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"AxisRendererX3D\"] = AxisRendererX3D;","/**\r\n * Module, defining Axis Renderer for vertical 3D axes.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { AxisRendererY } from \"../axes/AxisRendererY\";\nimport { MutableValueDisposer } from \"../../core/utils/Disposer\";\nimport * as $path from \"../../core/rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Renderer for vertical 3D axis.\r\n *\r\n * @see {@link IAxisRendererY3DEvents} for a list of available events\r\n * @see {@link IAxisRendererY3DAdapters} for a list of available Adapters\r\n */\nvar AxisRendererY3D = /** @class */function (_super) {\n tslib_1.__extends(AxisRendererY3D, _super);\n /**\r\n * Constructor.\r\n *\r\n * @param axis Related axis\r\n */\n function AxisRendererY3D() {\n var _this = _super.call(this) || this;\n /**\r\n * A related chart.\r\n *\r\n * @todo Description\r\n */\n _this._chart = new MutableValueDisposer();\n _this.className = \"AxisRendererY3D\";\n _this._disposers.push(_this._chart);\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Updates and positions a grid element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param grid Grid element\r\n * @param position Starting position\r\n * @param endPosition End position\r\n */\n AxisRendererY3D.prototype.updateGridElement = function (grid, position, endPosition) {\n position = position + (endPosition - position) * grid.location;\n var point = this.positionToPoint(position);\n if (grid.element) {\n var dx = this.chart.dx3D || 0;\n var dy = this.chart.dy3D || 0;\n var w = this.getWidth();\n grid.path = $path.moveTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: dx,\n y: dy\n }) + $path.lineTo({\n x: w + dx,\n y: dy\n });\n }\n this.positionItem(grid, point);\n this.toggleVisibility(grid, position, 0, 1);\n };\n /**\r\n * Updates and positions the base grid element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n AxisRendererY3D.prototype.updateBaseGridElement = function () {\n _super.prototype.updateBaseGridElement.call(this);\n var dx = this.chart.dx3D || 0;\n var dy = this.chart.dy3D || 0;\n var w = this.getWidth();\n this.baseGrid.path = $path.moveTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: w,\n y: 0\n }) + $path.lineTo({\n x: w + dx,\n y: dy\n });\n };\n Object.defineProperty(AxisRendererY3D.prototype, \"chart\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Chart\r\n */\n get: function get() {\n return this._chart.get();\n },\n /**\r\n * Chart, associated with the Axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Chart\r\n */\n set: function set(chart) {\n if (chart) {\n this._chart.set(chart, chart.events.on(\"propertychanged\", this.handle3DChanged, this, false));\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Invoked when 3D-related settings change, like depth or angle.\r\n *\r\n * @param event Event\r\n */\n AxisRendererY3D.prototype.handle3DChanged = function (event) {\n if (event.property == \"depth\" || event.property == \"angle\") {\n this.invalidate();\n }\n };\n return AxisRendererY3D;\n}(AxisRendererY);\nexport { AxisRendererY3D };","/**\r\n * Module that defines everything related to building 3D Columns.\r\n * It is a container which has column3D element which is a Rectangle3D.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Column } from \"./Column\";\nimport { Rectangle3D } from \"../../core/elements/3d/Rectangle3D\";\nimport { registry } from \"../../core/Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Class used to creates Column3Ds.\r\n *\r\n * @see {@link IColumn3DEvents} for a list of available events\r\n * @see {@link IColumn3DAdapters} for a list of available Adapters\r\n * @todo Usage example\r\n * @important\r\n */\nvar Column3D = /** @class */function (_super) {\n tslib_1.__extends(Column3D, _super);\n /**\r\n * Constructor\r\n */\n function Column3D() {\n var _this = _super.call(this) || this;\n _this.className = \"Column3D\";\n return _this;\n }\n /**\r\n * @ignore\r\n */\n Column3D.prototype.createAssets = function () {\n this.column3D = this.createChild(Rectangle3D);\n this.column3D.shouldClone = false;\n this.column3D.strokeOpacity = 0;\n // some dirty hack so that if user access column, it won't get error\n this.column = this.column3D;\n };\n /**\r\n * @ignore Exclude from docs\r\n */\n Column3D.prototype.validate = function () {\n _super.prototype.validate.call(this);\n if (this.column3D) {\n this.column3D.width = this.pixelWidth;\n this.column3D.height = this.pixelHeight;\n if (this.column3D.invalid) {\n this.column3D.validate();\n }\n }\n };\n /**\r\n * Copies all parameters from another [[Column3D]].\r\n *\r\n * @param source Source Column3D\r\n */\n Column3D.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n if (this.column3D) {\n this.column3D.copyFrom(source.column3D);\n }\n };\n /**\r\n * Sets actual `fill` property on the SVG element, including applicable color\r\n * modifiers.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Fill\r\n */\n Column3D.prototype.setFill = function (value) {\n _super.prototype.setFill.call(this, value);\n this.column.fill = value;\n };\n return Column3D;\n}(Column);\nexport { Column3D };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Column3D\"] = Column3D;","/**\r\n * 3D column series module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { ColumnSeries, ColumnSeriesDataItem } from \"../series/ColumnSeries\";\nimport { Column3D } from \"../elements/Column3D\";\nimport { registry } from \"../../core/Registry\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\nvar ColumnSeries3DDataItem = /** @class */function (_super) {\n tslib_1.__extends(ColumnSeries3DDataItem, _super);\n /**\r\n * Constructor\r\n */\n function ColumnSeries3DDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"ColumnSeries3DDataItem\";\n _this.applyTheme();\n return _this;\n }\n return ColumnSeries3DDataItem;\n}(ColumnSeriesDataItem);\nexport { ColumnSeries3DDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines [[Series]] for a 3D column graph.\r\n *\r\n * @see {@link IColumnSeries3DEvents} for a list of available Events\r\n * @see {@link IColumnSeries3DAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\nvar ColumnSeries3D = /** @class */function (_super) {\n tslib_1.__extends(ColumnSeries3D, _super);\n /**\r\n * Constructor\r\n */\n function ColumnSeries3D() {\n var _this = _super.call(this) || this;\n _this.className = \"ColumnSeries3D\";\n _this.columns.template.column3D.applyOnClones = true;\n _this.columns.template.hiddenState.properties.visible = true;\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(ColumnSeries3D.prototype, \"columnsContainer\", {\n /**\r\n * @ignore\r\n */\n get: function get() {\n if (this.chart && this.chart.columnsContainer) {\n return this.chart.columnsContainer;\n } else {\n return this._columnsContainer;\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Validates data item's elements.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n ColumnSeries3D.prototype.validateDataElementReal = function (dataItem) {\n _super.prototype.validateDataElementReal.call(this, dataItem);\n if (dataItem.column) {\n dataItem.column.dx = this.dx;\n dataItem.column.dy = this.dy;\n }\n };\n /**\r\n * Validates data item's elements.\r\n *\r\n * @ignore Exclude from docs\r\n */\n ColumnSeries3D.prototype.validateDataElements = function () {\n _super.prototype.validateDataElements.call(this);\n if (this.chart) {\n this.chart.invalidateLayout();\n }\n };\n /**\r\n * Returns an element to use for 3D bar.\r\n * @ignore\r\n * @return Element.\r\n */\n ColumnSeries3D.prototype.createColumnTemplate = function () {\n return new Column3D();\n };\n Object.defineProperty(ColumnSeries3D.prototype, \"depth\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Depth (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"depth\");\n },\n /**\r\n * Depth (height) of the slices in the series in pixels.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Depth (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"depth\", value, true);\n var template = this.columns.template; // todo: Cone is not Rectangle3D, maybe we should do some I3DShape?\n template.column3D.depth = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ColumnSeries3D.prototype, \"angle\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Angle (0-360)\r\n */\n get: function get() {\n return this.getPropertyValue(\"angle\");\n },\n /**\r\n * Angle of view for the slices in series. (0-360)\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Angle (0-360)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"angle\", value);\n var template = this.columns.template;\n template.column3D.angle = value;\n },\n enumerable: true,\n configurable: true\n });\n return ColumnSeries3D;\n}(ColumnSeries);\nexport { ColumnSeries3D };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"ColumnSeries3D\"] = ColumnSeries3D;\nregistry.registeredClasses[\"ColumnSeries3DDataItem\"] = ColumnSeries3DDataItem;","/**\r\n * Module for building 3D serial charts.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * Imports\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { XYChart, XYChartDataItem } from \"./XYChart\";\nimport { Container } from \"../../core/Container\";\nimport { Sprite } from \"../../core/Sprite\";\nimport { AxisRendererX3D } from \"../axes/AxisRendererX3D\";\nimport { AxisRendererY3D } from \"../axes/AxisRendererY3D\";\nimport { ColumnSeries3D } from \"../series/ColumnSeries3D\";\nimport { registry } from \"../../core/Registry\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $path from \"../../core/rendering/Path\";\nimport * as $utils from \"../../core/utils/Utils\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[XYChart3D]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar XYChart3DDataItem = /** @class */function (_super) {\n tslib_1.__extends(XYChart3DDataItem, _super);\n function XYChart3DDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"XYChart3DDataItem\";\n _this.applyTheme();\n return _this;\n }\n return XYChart3DDataItem;\n}(XYChartDataItem);\nexport { XYChart3DDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a 3D XY chart.\r\n *\r\n * @see {@link IXYChart3DEvents} for a list of available Events\r\n * @see {@link IXYChart3DAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/xy-chart/} for documentation\r\n * @important\r\n */\nvar XYChart3D = /** @class */function (_super) {\n tslib_1.__extends(XYChart3D, _super);\n /**\r\n * Constructor\r\n */\n function XYChart3D() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * Type of the axis renderer to use for X axes.\r\n */\n _this._axisRendererX = AxisRendererX3D;\n /**\r\n * Type of the axis renderer to use for Y axes.\r\n */\n _this._axisRendererY = AxisRendererY3D;\n _this.className = \"XYChart3D\";\n // Set defaults\n _this.depth = 30;\n _this.angle = 30;\n // Creeate container for columns\n var columnsContainer = _this.seriesContainer.createChild(Container);\n columnsContainer.shouldClone = false;\n columnsContainer.isMeasured = false;\n columnsContainer.layout = \"none\";\n _this.columnsContainer = columnsContainer;\n _this.columnsContainer.mask = _this.createChild(Sprite);\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * This is done because for some reason IE doesn't change mask if path of a\r\n * mask changes.\r\n */\n XYChart3D.prototype.updateSeriesMasks = function () {\n _super.prototype.updateSeriesMasks.call(this);\n if ($utils.isIE()) {\n var columnsContainer = this.columnsContainer;\n var mask = columnsContainer.mask;\n columnsContainer.mask = undefined;\n columnsContainer.mask = mask;\n }\n };\n Object.defineProperty(XYChart3D.prototype, \"depth\", {\n /**\r\n * @return Depth (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"depth\");\n },\n /**\r\n * Depth of the 3D chart / columns in pixels.\r\n *\r\n * @param value Depth (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"depth\", value);\n this.fixLayout();\n this.invalidateDataUsers();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYChart3D.prototype, \"angle\", {\n /**\r\n * @return Angle\r\n */\n get: function get() {\n return this.getPropertyValue(\"angle\");\n },\n /**\r\n * Angle the chart is viewed at.\r\n *\r\n * @todo Description (review)\r\n * @param value Angle\r\n */\n set: function set(value) {\n this.setPropertyValue(\"angle\", value);\n this.fixLayout();\n this.invalidateDataUsers();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYChart3D.prototype, \"dx3D\", {\n /**\r\n * A calculated horizontal 3D offset (px).\r\n *\r\n * @readonly\r\n * @return Offset (px)\r\n */\n get: function get() {\n return $math.cos(this.angle) * this.depth;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XYChart3D.prototype, \"dy3D\", {\n /**\r\n * A calculated vertical 3D offset (px).\r\n *\r\n * @readonly\r\n * @return Offset (px)\r\n */\n get: function get() {\n return -$math.sin(this.angle) * this.depth;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * (Re)validates layout\r\n *\r\n * @ignore Exclude from docs\r\n */\n XYChart3D.prototype.validateLayout = function () {\n _super.prototype.validateLayout.call(this);\n this.fixColumns();\n };\n /**\r\n * Updates the layout (padding and scrollbar positions) to accommodate for\r\n * 3D depth and angle.\r\n */\n XYChart3D.prototype.fixLayout = function () {\n this.chartContainer.marginTop = -this.dy3D;\n this.chartContainer.paddingRight = this.dx3D;\n if (this.scrollbarX) {\n this.scrollbarX.dy = this.dy3D;\n this.scrollbarX.dx = this.dx3D;\n }\n if (this.scrollbarY) {\n this.scrollbarY.dy = this.dy3D;\n this.scrollbarY.dx = this.dx3D;\n }\n this.fixColumns();\n _super.prototype.fixLayout.call(this);\n };\n /**\r\n * Updates column positions, offset and dimensions based on chart's angle\r\n * and depth.\r\n */\n XYChart3D.prototype.fixColumns = function () {\n var _this = this;\n var count = 1;\n var i = 0;\n $iter.each(this.series.iterator(), function (series) {\n if (series instanceof ColumnSeries3D) {\n if (!series.clustered && i > 0) {\n count++;\n }\n series.depthIndex = count - 1;\n i++;\n }\n });\n var s = 0;\n $iter.each(this.series.iterator(), function (series) {\n if (series instanceof ColumnSeries3D) {\n series.depth = _this.depth / count;\n series.angle = _this.angle;\n series.dx = _this.depth / count * $math.cos(_this.angle) * series.depthIndex;\n series.dy = -_this.depth / count * $math.sin(_this.angle) * series.depthIndex;\n var inversed_1 = false;\n if (series.baseAxis == series.xAxis && series.xAxis.renderer.inversed || series.baseAxis == series.yAxis && series.yAxis.renderer.inversed) {\n inversed_1 = true;\n }\n var i_1 = 1;\n series.columns.each(function (column) {\n if (inversed_1) {\n column.zIndex = 1000 * (1000 - i_1) + s - series.depthIndex * 100;\n } else {\n column.zIndex = 1000 * i_1 + s - series.depthIndex * 100;\n }\n i_1++;\n });\n if (inversed_1) {\n s--;\n } else {\n s++;\n }\n }\n });\n this.maskColumns();\n };\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n XYChart3D.prototype.processConfig = function (config) {\n if (config) {\n // Set up series\n if ($type.hasValue(config.series) && $type.isArray(config.series)) {\n for (var i = 0, len = config.series.length; i < len; i++) {\n config.series[i].type = config.series[i].type || \"ColumnSeries3D\";\n }\n }\n }\n _super.prototype.processConfig.call(this, config);\n };\n XYChart3D.prototype.maskColumns = function () {\n var w = this.plotContainer.pixelWidth;\n var h = this.plotContainer.pixelHeight;\n var dx = this.dx3D;\n var dy = this.dy3D;\n var path = $path.moveTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: dx,\n y: dy\n }) + $path.lineTo({\n x: w + dx,\n y: dy\n }) + $path.lineTo({\n x: w + dx,\n y: h + dy\n }) + $path.lineTo({\n x: w,\n y: h\n }) + $path.lineTo({\n x: w,\n y: h\n }) + $path.lineTo({\n x: 0,\n y: h\n }) + $path.closePath();\n var columnsContainer = this.columnsContainer;\n if (columnsContainer && columnsContainer.mask) {\n columnsContainer.mask.path = path;\n }\n };\n return XYChart3D;\n}(XYChart);\nexport { XYChart3D };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"XYChart3D\"] = XYChart3D;","/**\r\n * HeatLegend module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../../core/Container\";\nimport { LinearGradient } from \"../../core/rendering/fills/LinearGradient\";\nimport { registry } from \"../../core/Registry\";\nimport { toColor, Color } from \"../../core/utils/Color\";\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\nimport { percent } from \"../../core/utils/Percent\";\nimport { ValueAxis } from \"../../charts/axes/ValueAxis\";\nimport { AxisRendererX } from \"../../charts/axes/AxisRendererX\";\nimport { AxisRendererY } from \"../../charts/axes/AxisRendererY\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $colors from \"../../core/utils/Colors\";\nimport { RoundedRectangle } from \"../../core/elements/RoundedRectangle\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * This class creates a link (waved color-filled line) between two nodes in a\r\n * Sankey Diagram.\r\n *\r\n * @see {@link IHeatLegendEvents} for a list of available events\r\n * @see {@link IHeatLegendAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar HeatLegend = /** @class */function (_super) {\n tslib_1.__extends(HeatLegend, _super);\n /**\r\n * Constructor\r\n */\n function HeatLegend() {\n var _this = _super.call(this) || this;\n _this.className = \"HeatLegend\";\n _this.markerContainer = _this.createChild(Container);\n _this.markerContainer.shouldClone = false;\n _this.markerCount = 1;\n // Create a template container and list for the a marker\n var marker = new RoundedRectangle();\n marker.minHeight = 20;\n marker.minWidth = 20;\n marker.interactionsEnabled = false;\n marker.fillOpacity = 1;\n marker.cornerRadius(0, 0, 0, 0);\n _this.markerContainer.minHeight = 20;\n _this.markerContainer.minWidth = 20;\n _this.orientation = \"horizontal\";\n _this.markers = new ListTemplate(marker);\n _this._disposers.push(new ListDisposer(_this.markers));\n _this._disposers.push(_this.markers.template);\n _this.applyTheme();\n return _this;\n }\n HeatLegend.prototype.getMinFromRules = function (property) {\n var series = this.series;\n if (series) {\n var minValue_1;\n $iter.eachContinue(series.heatRules.iterator(), function (heatRule) {\n if (heatRule.property == property) {\n minValue_1 = heatRule.min;\n return false;\n }\n return true;\n });\n return minValue_1;\n }\n };\n HeatLegend.prototype.getMaxFromRules = function (property) {\n var series = this.series;\n if (series) {\n var maxValue_1;\n $iter.each(series.heatRules.iterator(), function (heatRule) {\n if (heatRule.property == property) {\n maxValue_1 = heatRule.max;\n return false;\n }\n return true;\n });\n return maxValue_1;\n }\n };\n /**\r\n *\r\n * @ignore Exclude from docs\r\n */\n HeatLegend.prototype.validate = function () {\n _super.prototype.validate.call(this);\n var series = this.series;\n var minColor = this.minColor;\n var maxColor = this.maxColor;\n if (!$type.hasValue(minColor)) {\n minColor = toColor(this.getMinFromRules(\"fill\"));\n }\n if (!$type.hasValue(maxColor)) {\n maxColor = toColor(this.getMaxFromRules(\"fill\"));\n }\n if (series) {\n var seriesFill = series.fill;\n if (!$type.hasValue(minColor) && seriesFill instanceof Color) {\n minColor = seriesFill;\n }\n if (!$type.hasValue(maxColor) && seriesFill instanceof Color) {\n maxColor = seriesFill;\n }\n }\n if (!$type.hasValue(maxColor)) {\n maxColor = toColor(this.getMaxFromRules(\"fill\"));\n }\n var minOpacity = $type.toNumber(this.getMinFromRules(\"fillOpacity\"));\n if (!$type.isNumber(minOpacity)) {\n minOpacity = 1;\n }\n var maxOpacity = $type.toNumber(this.getMaxFromRules(\"fillOpacity\"));\n if (!$type.isNumber(maxOpacity)) {\n maxOpacity = 1;\n }\n var minStrokeOpacity = $type.toNumber(this.getMinFromRules(\"strokeOpacity\"));\n if (!$type.isNumber(minStrokeOpacity)) {\n minStrokeOpacity = 1;\n }\n var maxStrokeOpacity = $type.toNumber(this.getMaxFromRules(\"strokeOpacity\"));\n if (!$type.isNumber(maxStrokeOpacity)) {\n maxStrokeOpacity = 1;\n }\n var minStroke = toColor(this.getMinFromRules(\"stroke\"));\n var maxStroke = toColor(this.getMaxFromRules(\"stroke\"));\n //if (series) {\n for (var i = 0; i < this.markerCount; i++) {\n var marker = this.markers.getIndex(i);\n if (!marker) {\n marker = this.markers.create();\n marker.parent = this.markerContainer;\n marker.height = percent(100);\n marker.width = percent(100);\n }\n if (this.markerCount == 1) {\n var gradient = new LinearGradient();\n gradient.addColor(minColor, minOpacity);\n gradient.addColor(maxColor, maxOpacity);\n if (this.orientation == \"vertical\") {\n gradient.rotation = -90;\n }\n marker.fill = gradient;\n if ($type.hasValue(minStroke) && $type.hasValue(maxStroke)) {\n var strokeGradient = new LinearGradient();\n strokeGradient.addColor(minStroke, minStrokeOpacity);\n strokeGradient.addColor(maxStroke, maxStrokeOpacity);\n if (this.orientation == \"vertical\") {\n strokeGradient.rotation = -90;\n }\n marker.stroke = strokeGradient;\n }\n } else {\n var color = new Color($colors.interpolate(minColor.rgb, maxColor.rgb, i / this.markerCount));\n marker.fill = color;\n var opacity = minOpacity + (maxOpacity - minOpacity) * i / this.markerCount;\n marker.fillOpacity = opacity;\n if ($type.hasValue(minStroke) && $type.hasValue(maxStroke)) {\n var color_1 = new Color($colors.interpolate(minStroke.rgb, maxStroke.rgb, i / this.markerCount));\n marker.stroke = color_1;\n var opacity_1 = minStrokeOpacity + (maxStrokeOpacity - minStrokeOpacity) * i / this.markerCount;\n marker.strokeOpacity = opacity_1;\n }\n }\n }\n var renderer = this.valueAxis.renderer;\n if (this.markerCount > 1) {\n if (this.orientation == \"horizontal\") {\n renderer.minGridDistance = this.measuredWidth / this.markerCount;\n } else {\n renderer.minGridDistance = this.measuredHeight / this.markerCount;\n }\n }\n this.valueAxis.invalidate();\n for (var i = this.markerCount, len = this.markers.length; i < len; i++) {\n this.markers.getIndex(i).parent = undefined;\n }\n };\n Object.defineProperty(HeatLegend.prototype, \"minColor\", {\n /**\r\n * Returns minColor value\r\n * @return {Color}\r\n */\n get: function get() {\n return this.getPropertyValue(\"minColor\");\n },\n /**\r\n * Min color of a heat legend. If a series is set for the legend, minColor is taken from series.\r\n *\r\n * @param {Color}\r\n */\n set: function set(value) {\n if (!(value instanceof Color)) {\n value = toColor(value);\n }\n this.setColorProperty(\"minColor\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HeatLegend.prototype, \"maxColor\", {\n /**\r\n * Returns maxColor value\r\n * @return {Color}\r\n */\n get: function get() {\n return this.getPropertyValue(\"maxColor\");\n },\n /**\r\n * Max color of a heat legend. If a series is set for the legend, maxColor is taken from series.\r\n *\r\n * @param {Color}\r\n */\n set: function set(value) {\n if (!$type.isObject(value)) {\n value = toColor(value);\n }\n this.setColorProperty(\"maxColor\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HeatLegend.prototype, \"markerCount\", {\n /**\r\n * Returns number of color squares (markers).\r\n * @return {number}\r\n */\n get: function get() {\n return this.getPropertyValue(\"markerCount\");\n },\n /**\r\n * Number of color squares (markers) in the heat legend. If only 1 marker is used, it will be filled with gradient.\r\n *\r\n * @param {number}\r\n */\n set: function set(value) {\n this.setPropertyValue(\"markerCount\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HeatLegend.prototype, \"minValue\", {\n /**\r\n * Returns minimum value of heat legend.\r\n * @return {number}\r\n */\n get: function get() {\n return this.getPropertyValue(\"minValue\");\n },\n /**\r\n * Minimum value of heat legend's value axis. If a series is set for the legend, min is taken from series.\r\n *\r\n * @param {number}\r\n */\n set: function set(value) {\n this.setPropertyValue(\"minValue\", value);\n this.valueAxis.min = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HeatLegend.prototype, \"maxValue\", {\n /**\r\n * Returns maximum value of heat legend.\r\n * @return {number}\r\n */\n get: function get() {\n return this.getPropertyValue(\"maxValue\");\n },\n /**\r\n * Maximum value of heat legend's value axis. If a series is set for the legend, max is taken from series.\r\n *\r\n * @param {number}\r\n */\n set: function set(value) {\n this.setPropertyValue(\"maxValue\", value);\n this.valueAxis.max = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HeatLegend.prototype, \"orientation\", {\n /**\r\n * Returns orientation value.\r\n *\r\n * @return {\"horizontal\" | \"vertical\"}\r\n */\n get: function get() {\n return this.getPropertyValue(\"orientation\");\n },\n /**\r\n * Heat legend orientation. Note, if you change orientation of a heat legend, you must set value axis renderer properties after that, as with orientation renderer changes.\r\n *\r\n * @param {\"horizontal\" | \"vertical\"}\r\n */\n set: function set(value) {\n this.setPropertyValue(\"orientation\", value, true);\n var markerContainer = this.markerContainer;\n var valueAxis = this.valueAxis;\n // HORIZONTAL\n if (value == \"horizontal\") {\n if (!$type.hasValue(this.width)) {\n this.width = 200;\n }\n this.height = undefined;\n valueAxis.width = percent(100);\n valueAxis.height = undefined;\n valueAxis.tooltip.pointerOrientation = \"vertical\";\n this.layout = \"vertical\";\n markerContainer.width = percent(100);\n markerContainer.height = undefined;\n if (!(valueAxis.renderer instanceof AxisRendererX)) {\n valueAxis.renderer = new AxisRendererX();\n }\n }\n // VERTICAL\n else {\n if (!$type.hasValue(this.height)) {\n this.height = 200;\n }\n this.width = undefined;\n this.layout = \"horizontal\";\n markerContainer.width = undefined;\n markerContainer.height = percent(100);\n valueAxis.height = percent(100);\n valueAxis.width = undefined;\n valueAxis.tooltip.pointerOrientation = \"horizontal\";\n if (!(valueAxis.renderer instanceof AxisRendererY)) {\n valueAxis.renderer = new AxisRendererY();\n }\n valueAxis.renderer.inside = true;\n valueAxis.renderer.labels.template.inside = true;\n this.markerContainer.reverseOrder = true;\n }\n var renderer = valueAxis.renderer;\n renderer.grid.template.disabled = true;\n renderer.axisFills.template.disabled = true;\n renderer.baseGrid.disabled = true;\n renderer.labels.template.padding(2, 3, 2, 3);\n renderer.minHeight = undefined;\n renderer.minWidth = undefined;\n this.markerContainer.layout = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HeatLegend.prototype, \"valueAxis\", {\n /**\r\n * Returns valueAxis value.\r\n * @return {ValueAxis}\r\n */\n get: function get() {\n if (!this._valueAxis) {\n this.valueAxis = this.createChild(ValueAxis);\n this.valueAxis.shouldClone = false;\n }\n return this._valueAxis;\n },\n /**\r\n * Sets a value axis of heat legend. Value axis for heat legend is created automatically.\r\n * @param {ValueAxis}\r\n */\n set: function set(valueAxis) {\n this._valueAxis = valueAxis;\n valueAxis.parent = this;\n valueAxis.strictMinMax = true;\n this.orientation = this.orientation;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HeatLegend.prototype, \"series\", {\n /**\r\n * Returns series value.\r\n * @return {Series}\r\n */\n get: function get() {\n return this._series;\n },\n /**\r\n * You can set series for heat legend. It will take min, max, minColor and maxColor values from this series.\r\n * @param series\r\n */\n set: function set(series) {\n var _this = this;\n this._series = series;\n var dataField = \"value\";\n try {\n var dataFieldDefined = series.heatRules.getIndex(0).dataField;\n if (dataFieldDefined) {\n dataField = dataFieldDefined;\n }\n } catch (err) {}\n this.updateMinMax(series.dataItem.values[dataField].low, series.dataItem.values[dataField].high);\n series.dataItem.events.on(\"calculatedvaluechanged\", function (event) {\n _this.updateMinMax(series.dataItem.values[dataField].low, series.dataItem.values[dataField].high);\n }, undefined, false);\n series.heatRules.events.on(\"inserted\", this.invalidate, this, false);\n series.heatRules.events.on(\"removed\", this.invalidate, this, false);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Updates min/max of value axis.\r\n * @ignore\r\n */\n HeatLegend.prototype.updateMinMax = function (min, max) {\n var valueAxis = this.valueAxis;\n if (!$type.isNumber(this.minValue)) {\n valueAxis.min = min;\n valueAxis.invalidate();\n }\n if (!$type.isNumber(this.maxValue)) {\n valueAxis.max = max;\n valueAxis.invalidate();\n }\n };\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n HeatLegend.prototype.processConfig = function (config) {\n if (config) {\n // Set up series\n if ($type.hasValue(config.series) && $type.isString(config.series)) {\n if ($type.isString(config.series)) {\n if (this.map.hasKey(config.series)) {\n config.series = this.map.getKey(config.series);\n } else {\n var seriesId_1 = config.series;\n var disposer_1 = this.map.events.on(\"insertKey\", function (ev) {\n if (ev.key == seriesId_1) {\n this.series = ev.newValue;\n disposer_1.dispose();\n }\n }, this);\n this._disposers.push(disposer_1);\n delete config.series;\n }\n }\n }\n }\n _super.prototype.processConfig.call(this, config);\n };\n return HeatLegend;\n}(Container);\nexport { HeatLegend };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"HeatLegend\"] = HeatLegend;","/**\r\n * Module that defines everything related to building Candlesticks.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Column } from \"./Column\";\nimport { Line } from \"../../core/elements/Line\";\nimport { registry } from \"../../core/Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Class used to creates Candlesticks.\r\n *\r\n * @see {@link ICandlestickEvents} for a list of available events\r\n * @see {@link ICandlestickAdapters} for a list of available Adapters\r\n * @todo Usage example\r\n * @important\r\n */\nvar Candlestick = /** @class */function (_super) {\n tslib_1.__extends(Candlestick, _super);\n /**\r\n * Constructor\r\n */\n function Candlestick() {\n var _this = _super.call(this) || this;\n _this.className = \"Candlestick\";\n _this.layout = \"none\";\n return _this;\n }\n /**\r\n * @ignore\r\n */\n Candlestick.prototype.createAssets = function () {\n _super.prototype.createAssets.call(this);\n this.lowLine = this.createChild(Line);\n this.lowLine.shouldClone = false;\n this.highLine = this.createChild(Line);\n this.highLine.shouldClone = false;\n };\n /**\r\n * Copies all parameters from another [[Candlestick]].\r\n *\r\n * @param source Source Candlestick\r\n */\n Candlestick.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n if (this.lowLine) {\n this.lowLine.copyFrom(source.lowLine);\n }\n if (this.highLine) {\n this.highLine.copyFrom(source.highLine);\n }\n };\n return Candlestick;\n}(Column);\nexport { Candlestick };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Candlestick\"] = Candlestick;","/**\r\n * Candlestick Series module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { ColumnSeries, ColumnSeriesDataItem } from \"./ColumnSeries\";\nimport { visualProperties } from \"../../core/Sprite\";\nimport { Candlestick } from \"../elements/Candlestick\";\nimport { registry } from \"../../core/Registry\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $object from \"../../core/utils/Object\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[CandlestickSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar CandlestickSeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(CandlestickSeriesDataItem, _super);\n /**\r\n * Defines a type of [[Component]] this data item is used for\r\n * @todo Disabled to work around TS bug (see if we can re-enable it again)\r\n */\n //public _component!: CandlestickSeries;\n /**\r\n * Constructor\r\n */\n function CandlestickSeriesDataItem() {\n var _this = _super.call(this) || this;\n _this.values.lowValueX = {};\n _this.values.lowValueY = {};\n _this.values.highValueX = {};\n _this.values.highValueY = {};\n _this.className = \"CandlestickSeriesDataItem\";\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(CandlestickSeriesDataItem.prototype, \"lowValueX\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.values.lowValueX.value;\n },\n /**\r\n * Low value for horizontal axis.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setValue(\"lowValueX\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CandlestickSeriesDataItem.prototype, \"lowValueY\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.values.lowValueY.value;\n },\n /**\r\n * Low value for vertical axis.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setValue(\"lowValueY\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CandlestickSeriesDataItem.prototype, \"highValueX\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.values.highValueX.value;\n },\n /**\r\n * High value for horizontal axis.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setValue(\"highValueX\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CandlestickSeriesDataItem.prototype, \"highValueY\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.values.highValueY.value;\n },\n /**\r\n * High value for vertical axis.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setValue(\"highValueY\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CandlestickSeriesDataItem.prototype, \"closeValueX\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.values.valueX.value;\n },\n /**\r\n * Close value for horizontal axis.\r\n *\r\n * This is an alias for `valueX` added for convenience only.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setValue(\"valueX\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CandlestickSeriesDataItem.prototype, \"closeValueY\", {\n /**\r\n * @return Value\r\n */\n get: function get() {\n return this.values.valueY.value;\n },\n /**\r\n * Close value for vertical axis.\r\n *\r\n * This is an alias for `valueX` added for convenience only.\r\n *\r\n * @param value Value\r\n */\n set: function set(value) {\n this.setValue(\"valueY\", value);\n },\n enumerable: true,\n configurable: true\n });\n return CandlestickSeriesDataItem;\n}(ColumnSeriesDataItem);\nexport { CandlestickSeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines [[Series]] for a candlestick graph.\r\n *\r\n * @see {@link ICandlestickSeriesEvents} for a list of available Events\r\n * @see {@link ICandlestickSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\nvar CandlestickSeries = /** @class */function (_super) {\n tslib_1.__extends(CandlestickSeries, _super);\n /**\r\n * Constructor\r\n */\n function CandlestickSeries() {\n var _this = _super.call(this) || this;\n _this.className = \"CandlestickSeries\";\n _this.strokeOpacity = 1;\n var interfaceColors = new InterfaceColorSet();\n var positiveColor = interfaceColors.getFor(\"positive\");\n var negativeColor = interfaceColors.getFor(\"negative\");\n _this.dropFromOpenState.properties.fill = negativeColor;\n _this.dropFromOpenState.properties.stroke = negativeColor;\n _this.riseFromOpenState.properties.fill = positiveColor;\n _this.riseFromOpenState.properties.stroke = positiveColor;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n CandlestickSeries.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Candlestick Series\");\n }\n };\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n CandlestickSeries.prototype.createDataItem = function () {\n return new CandlestickSeriesDataItem();\n };\n /**\r\n * Validates data item's element, effectively redrawing it.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n CandlestickSeries.prototype.validateDataElementReal = function (dataItem) {\n _super.prototype.validateDataElementReal.call(this, dataItem);\n this.validateCandlestick(dataItem);\n };\n CandlestickSeries.prototype.validateCandlestick = function (dataItem) {\n var column = dataItem.column;\n if (column) {\n var lowLine_1 = column.lowLine;\n var highLine_1 = column.highLine;\n if (this.baseAxis == this.xAxis) {\n var x = column.pixelWidth / 2;\n lowLine_1.x = x;\n highLine_1.x = x;\n var open_1 = dataItem.getWorkingValue(this.yOpenField);\n var close_1 = dataItem.getWorkingValue(this.yField);\n var yOpen = this.yAxis.getY(dataItem, this.yOpenField);\n var yClose = this.yAxis.getY(dataItem, this.yField);\n var yLow = this.yAxis.getY(dataItem, this.yLowField);\n var yHigh = this.yAxis.getY(dataItem, this.yHighField);\n var pixelY = column.pixelY;\n lowLine_1.y1 = yLow - pixelY;\n highLine_1.y1 = yHigh - pixelY;\n if (open_1 < close_1) {\n lowLine_1.y2 = yOpen - pixelY;\n highLine_1.y2 = yClose - pixelY;\n } else {\n lowLine_1.y2 = yClose - pixelY;\n highLine_1.y2 = yOpen - pixelY;\n }\n }\n if (this.baseAxis == this.yAxis) {\n var y = column.pixelHeight / 2;\n lowLine_1.y = y;\n highLine_1.y = y;\n var open_2 = dataItem.getWorkingValue(this.xOpenField);\n var close_2 = dataItem.getWorkingValue(this.xField);\n var xOpen = this.xAxis.getX(dataItem, this.xOpenField);\n var xClose = this.xAxis.getX(dataItem, this.xField);\n var xLow = this.xAxis.getX(dataItem, this.xLowField);\n var xHigh = this.xAxis.getX(dataItem, this.xHighField);\n var pixelX = column.pixelX;\n lowLine_1.x1 = xLow - pixelX;\n highLine_1.x1 = xHigh - pixelX;\n if (open_2 < close_2) {\n lowLine_1.x2 = xOpen - pixelX;\n highLine_1.x2 = xClose - pixelX;\n } else {\n lowLine_1.x2 = xClose - pixelX;\n highLine_1.x2 = xOpen - pixelX;\n }\n }\n $iter.each(this.axisRanges.iterator(), function (axisRange) {\n // LOW LINE\n var rangeColumn = dataItem.rangesColumns.getKey(axisRange.uid);\n if (rangeColumn) {\n var rangeLowLine = rangeColumn.lowLine;\n rangeLowLine.x = lowLine_1.x;\n rangeLowLine.y = lowLine_1.y;\n rangeLowLine.x1 = lowLine_1.x1;\n rangeLowLine.x2 = lowLine_1.x2;\n rangeLowLine.y1 = lowLine_1.y1;\n rangeLowLine.y2 = lowLine_1.y2;\n // HIGH LINE\n var rangehighLine = rangeColumn.highLine;\n rangehighLine.x = highLine_1.x;\n rangehighLine.y = highLine_1.y;\n rangehighLine.x1 = highLine_1.x1;\n rangehighLine.x2 = highLine_1.x2;\n rangehighLine.y1 = highLine_1.y1;\n rangehighLine.y2 = highLine_1.y2;\n }\n });\n }\n };\n Object.defineProperty(CandlestickSeries.prototype, \"xLowField\", {\n /**\r\n * A data field to look for \"low\" value for horizontal axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Field name\r\n */\n get: function get() {\n return this._xLowField;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CandlestickSeries.prototype, \"yLowField\", {\n /**\r\n * A data field to look for \"low\" value for vertical axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Field name\r\n */\n get: function get() {\n return this._yLowField;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CandlestickSeries.prototype, \"xHighField\", {\n /**\r\n * A data field to look for \"high\" value for horizontal axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Field name\r\n */\n get: function get() {\n return this._xHighField;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CandlestickSeries.prototype, \"yHighField\", {\n /**\r\n * A data field to look for \"high\" value for vertical axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Field name\r\n */\n get: function get() {\n return this._yHighField;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets up which data fields to use for data access.\r\n */\n CandlestickSeries.prototype.defineFields = function () {\n _super.prototype.defineFields.call(this);\n if (this.baseAxis == this.xAxis) {\n var yAxisFieldName = $utils.capitalize(this.yAxis.axisFieldName);\n this._yLowField = \"low\" + yAxisFieldName + \"Y\";\n this._yHighField = \"high\" + yAxisFieldName + \"Y\";\n }\n if (this.baseAxis == this.yAxis) {\n var xAxisFieldName = $utils.capitalize(this.xAxis.axisFieldName);\n this._xLowField = \"low\" + xAxisFieldName + \"X\";\n this._xHighField = \"high\" + xAxisFieldName + \"X\";\n }\n this.addValueField(this.xAxis, this._xValueFields, this._xLowField);\n this.addValueField(this.xAxis, this._xValueFields, this._xHighField);\n this.addValueField(this.yAxis, this._yValueFields, this._yLowField);\n this.addValueField(this.yAxis, this._yValueFields, this._yHighField);\n };\n /**\r\n * Creates elements in related legend container, that mimics the look of this\r\n * Series.\r\n *\r\n * @ignore Exclude from docs\r\n * @param marker Legend item container\r\n */\n CandlestickSeries.prototype.createLegendMarker = function (marker) {\n var w = marker.pixelWidth;\n var h = marker.pixelHeight;\n marker.removeChildren();\n var column = marker.createChild(Candlestick);\n column.shouldClone = false;\n column.copyFrom(this.columns.template);\n var cw;\n var ch;\n var highLine = column.lowLine;\n var lowLine = column.highLine;\n if (this.baseAxis == this.yAxis) {\n cw = w / 3;\n ch = h;\n highLine.y = h / 2;\n lowLine.y = h / 2;\n highLine.x2 = w / 3;\n lowLine.x2 = w / 3;\n lowLine.x = w / 3 * 2;\n column.column.x = w / 3;\n } else {\n cw = w;\n ch = h / 3;\n highLine.x = w / 2;\n lowLine.x = w / 2;\n highLine.y2 = h / 3;\n lowLine.y2 = h / 3;\n lowLine.y = h / 3 * 2;\n column.column.y = h / 3;\n }\n column.width = cw;\n column.height = ch;\n $object.copyProperties(this, marker, visualProperties);\n $object.copyProperties(this.columns.template, column, visualProperties);\n column.stroke = this.riseFromOpenState.properties.stroke;\n column.fill = column.stroke;\n var legendDataItem = marker.dataItem;\n legendDataItem.color = column.fill;\n legendDataItem.colorOrig = column.fill;\n };\n /**\r\n * Returns an element to use for Candlestick\r\n * @ignore\r\n * @return Element.\r\n */\n CandlestickSeries.prototype.createColumnTemplate = function () {\n return new Candlestick();\n };\n return CandlestickSeries;\n}(ColumnSeries);\nexport { CandlestickSeries };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"CandlestickSeries\"] = CandlestickSeries;\nregistry.registeredClasses[\"CandlestickSeriesDataItem\"] = CandlestickSeriesDataItem;","/**\r\n * Module that defines everything related to building OHLCs.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Candlestick } from \"./Candlestick\";\nimport { Line } from \"../../core/elements/Line\";\nimport { registry } from \"../../core/Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Class used to creates OHLCs.\r\n *\r\n * @see {@link IOHLCEvents} for a list of available events\r\n * @see {@link IOHLCAdapters} for a list of available Adapters\r\n * @todo Usage example\r\n * @important\r\n */\nvar OHLC = /** @class */function (_super) {\n tslib_1.__extends(OHLC, _super);\n /**\r\n * Constructor\r\n */\n function OHLC() {\n var _this = _super.call(this) || this;\n _this.className = \"OHLC\";\n _this.layout = \"none\";\n return _this;\n }\n /**\r\n * @ignore\r\n */\n OHLC.prototype.createAssets = function () {\n //super.createAssets();\n this.openLine = this.createChild(Line);\n this.openLine.shouldClone = false;\n this.highLowLine = this.createChild(Line);\n this.highLowLine.shouldClone = false;\n this.closeLine = this.createChild(Line);\n this.closeLine.shouldClone = false;\n };\n /**\r\n * Copies all parameters from another [[OHLC]].\r\n *\r\n * @param source Source OHLC\r\n */\n OHLC.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n if (this.openLine) {\n this.openLine.copyFrom(source.openLine);\n }\n if (this.highLowLine) {\n this.highLowLine.copyFrom(source.highLowLine);\n }\n if (this.closeLine) {\n this.closeLine.copyFrom(source.closeLine);\n }\n };\n return OHLC;\n}(Candlestick);\nexport { OHLC };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"OHLC\"] = OHLC;","/**\r\n * Candlestick Series module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { CandlestickSeries, CandlestickSeriesDataItem } from \"./CandlestickSeries\";\nimport { visualProperties } from \"../../core/Sprite\";\nimport { OHLC } from \"../elements/OHLC\";\nimport { registry } from \"../../core/Registry\";\nimport * as $object from \"../../core/utils/Object\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[OHLCSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar OHLCSeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(OHLCSeriesDataItem, _super);\n /**\r\n * Defines a type of [[Component]] this data item is used for\r\n * @todo Disabled to work around TS bug (see if we can re-enable it again)\r\n */\n //public _component!: OHLCSeries;\n /**\r\n * Constructor\r\n */\n function OHLCSeriesDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"OHLCSeriesDataItem\";\n _this.applyTheme();\n return _this;\n }\n return OHLCSeriesDataItem;\n}(CandlestickSeriesDataItem);\nexport { OHLCSeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines [[Series]] for a candlestick graph.\r\n *\r\n * @see {@link IOHLCSeriesEvents} for a list of available Events\r\n * @see {@link IOHLCSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\nvar OHLCSeries = /** @class */function (_super) {\n tslib_1.__extends(OHLCSeries, _super);\n /**\r\n * Constructor\r\n */\n function OHLCSeries() {\n var _this = _super.call(this) || this;\n _this.className = \"OHLCSeries\";\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n OHLCSeries.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"OHLC Series\");\n }\n };\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n OHLCSeries.prototype.createDataItem = function () {\n return new OHLCSeriesDataItem();\n };\n OHLCSeries.prototype.validateCandlestick = function (dataItem) {\n var column = dataItem.column;\n if (column) {\n var openLine_1 = column.openLine;\n var highLowLine_1 = column.highLowLine;\n var closeLine_1 = column.closeLine;\n if (this.baseAxis == this.xAxis) {\n var x = column.pixelWidth / 2;\n highLowLine_1.x = x;\n // TODO can these be removed ?\n dataItem.getWorkingValue(this.yOpenField);\n dataItem.getWorkingValue(this.yField);\n var yOpen = this.yAxis.getY(dataItem, this.yOpenField);\n var yClose = this.yAxis.getY(dataItem, this.yField);\n var yLow = this.yAxis.getY(dataItem, this.yLowField);\n var yHigh = this.yAxis.getY(dataItem, this.yHighField);\n var pixelY = column.pixelY;\n openLine_1.y1 = yOpen - pixelY;\n openLine_1.y2 = yOpen - pixelY;\n openLine_1.x1 = 0;\n openLine_1.x2 = x;\n closeLine_1.y1 = yClose - pixelY;\n closeLine_1.y2 = yClose - pixelY;\n closeLine_1.x1 = x;\n closeLine_1.x2 = 2 * x;\n highLowLine_1.y1 = yHigh - pixelY;\n highLowLine_1.y2 = yLow - pixelY;\n }\n if (this.baseAxis == this.yAxis) {\n var y = column.pixelHeight / 2;\n highLowLine_1.y = y;\n // TODO can these be removed ?\n dataItem.getWorkingValue(this.xOpenField);\n dataItem.getWorkingValue(this.xField);\n var xOpen = this.xAxis.getX(dataItem, this.xOpenField);\n var xClose = this.xAxis.getX(dataItem, this.xField);\n var xLow = this.xAxis.getX(dataItem, this.xLowField);\n var xHigh = this.xAxis.getX(dataItem, this.xHighField);\n var pixelX = column.pixelX;\n openLine_1.x1 = xOpen - pixelX;\n openLine_1.x2 = xOpen - pixelX;\n openLine_1.y1 = y;\n openLine_1.y2 = 2 * y;\n closeLine_1.x1 = xClose - pixelX;\n closeLine_1.x2 = xClose - pixelX;\n closeLine_1.y1 = 0;\n closeLine_1.y2 = y;\n highLowLine_1.x1 = xHigh - pixelX;\n highLowLine_1.x2 = xLow - pixelX;\n }\n $iter.each(this.axisRanges.iterator(), function (axisRange) {\n var rangeColumn = dataItem.rangesColumns.getKey(axisRange.uid);\n if (rangeColumn) {\n var rangeOpenLine = rangeColumn.openLine;\n rangeOpenLine.x = openLine_1.x;\n rangeOpenLine.y = openLine_1.y;\n rangeOpenLine.x1 = openLine_1.x1;\n rangeOpenLine.x2 = openLine_1.x2;\n rangeOpenLine.y1 = openLine_1.y1;\n rangeOpenLine.y2 = openLine_1.y2;\n var rangeCloseLine = rangeColumn.closeLine;\n rangeCloseLine.x = closeLine_1.x;\n rangeCloseLine.y = closeLine_1.y;\n rangeCloseLine.x1 = closeLine_1.x1;\n rangeCloseLine.x2 = closeLine_1.x2;\n rangeCloseLine.y1 = closeLine_1.y1;\n rangeCloseLine.y2 = closeLine_1.y2;\n var rangeHighLowLine = rangeColumn.highLowLine;\n rangeHighLowLine.x = highLowLine_1.x;\n rangeHighLowLine.y = highLowLine_1.y;\n rangeHighLowLine.x1 = highLowLine_1.x1;\n rangeHighLowLine.x2 = highLowLine_1.x2;\n rangeHighLowLine.y1 = highLowLine_1.y1;\n rangeHighLowLine.y2 = highLowLine_1.y2;\n }\n });\n }\n };\n /**\r\n * Creates elements in related legend container, that mimics the look of this\r\n * Series.\r\n *\r\n * @ignore Exclude from docs\r\n * @param marker Legend item container\r\n */\n OHLCSeries.prototype.createLegendMarker = function (marker) {\n var w = marker.pixelWidth;\n var h = marker.pixelHeight;\n marker.removeChildren();\n var column = marker.createChild(OHLC);\n column.shouldClone = false;\n column.copyFrom(this.columns.template);\n var cw;\n var ch;\n var openLine = column.openLine;\n var closeLine = column.closeLine;\n var highLowLine = column.highLowLine;\n if (this.baseAxis == this.yAxis) {\n cw = w / 3;\n ch = h;\n highLowLine.y = h / 2;\n highLowLine.x2 = w;\n openLine.x = w / 3 * 2;\n openLine.y2 = h / 2;\n closeLine.x = w / 3;\n closeLine.y2 = h;\n closeLine.y1 = h / 2;\n } else {\n cw = w;\n ch = h / 3;\n highLowLine.x = w / 2;\n highLowLine.y2 = h;\n openLine.y = h / 3 * 2;\n openLine.x2 = w / 2;\n closeLine.y = h / 3;\n closeLine.x2 = w;\n closeLine.x1 = w / 2;\n }\n column.width = cw;\n column.height = ch;\n $object.copyProperties(this, marker, visualProperties);\n $object.copyProperties(this.columns.template, column, visualProperties);\n column.stroke = this.riseFromOpenState.properties.stroke;\n var legendDataItem = marker.dataItem;\n legendDataItem.color = column.stroke;\n legendDataItem.colorOrig = column.stroke;\n };\n /**\r\n * Returns an element to use for Candlestick\r\n * @ignore\r\n * @return Element.\r\n */\n OHLCSeries.prototype.createColumnTemplate = function () {\n return new OHLC();\n };\n return OHLCSeries;\n}(CandlestickSeries);\nexport { OHLCSeries };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"OHLCSeries\"] = OHLCSeries;\nregistry.registeredClasses[\"OHLCSeriesDataItem\"] = OHLCSeriesDataItem;","/**\r\n * Line series segment module.\r\n * @todo Add description about what this is\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { LineSeriesSegment } from \"./LineSeriesSegment\";\nimport { registry } from \"../../core/Registry\";\nimport * as $path from \"../../core/rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Represents a line series segment.\r\n *\r\n * A line segment can be used to apply different properties to a part of the\r\n * line series, between two data points.\r\n *\r\n * @see {@link IStepLineSeriesSegmentEvents} for a list of available events\r\n * @see {@link IStepLineSeriesSegmentAdapters} for a list of available Adapters\r\n * @todo Example\r\n */\nvar StepLineSeriesSegment = /** @class */function (_super) {\n tslib_1.__extends(StepLineSeriesSegment, _super);\n /**\r\n * Constructor\r\n */\n function StepLineSeriesSegment() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"StepLineSeriesSegment\";\n return _this;\n }\n /**\r\n * Draws the series segment.\r\n *\r\n * @ignore Exclude from docs\r\n * @param points Points to connect\r\n * @param closePoints ?\r\n * @param smoothnessX Horizontal bezier setting (?)\r\n * @param smoothnessY Vertical bezier setting (?)\r\n */\n StepLineSeriesSegment.prototype.drawSegment = function (points, closePoints, smoothnessX, smoothnessY, noRisers, vertical) {\n if (points.length > 0 && closePoints.length > 0) {\n if (noRisers) {\n var path = $path.moveTo(points[0]);\n if (points.length > 0) {\n for (var i = 1; i < points.length; i++) {\n var point = points[i];\n if (i / 2 == Math.round(i / 2)) {\n path += $path.moveTo(point);\n } else {\n path += $path.lineTo(point);\n }\n }\n }\n this.strokeSprite.path = path;\n if (this.fillOpacity > 0 || this.fillSprite.fillOpacity > 0) {\n // helps to avoid drawing fill object if fill is not visible\n path = $path.moveTo(points[0]) + $path.polyline(points);\n path += $path.lineTo(closePoints[0]) + $path.polyline(closePoints);\n path += $path.lineTo(points[0]);\n path += $path.closePath();\n this.fillSprite.path = path;\n } else {}\n } else {\n var path = $path.moveTo(points[0]) + $path.polyline(points);\n this.strokeSprite.path = path;\n if (this.fillOpacity > 0 || this.fillSprite.fillOpacity > 0) {\n // helps to avoid drawing fill object if fill is not visible\n path += $path.lineTo(closePoints[0]) + $path.polyline(closePoints);\n path += $path.lineTo(points[0]);\n path += $path.closePath();\n this.fillSprite.path = path;\n }\n }\n }\n };\n return StepLineSeriesSegment;\n}(LineSeriesSegment);\nexport { StepLineSeriesSegment };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"StepLineSeriesSegment\"] = StepLineSeriesSegment;","/**\r\n * Step line series module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { LineSeries, LineSeriesDataItem } from \"./LineSeries\";\nimport { StepLineSeriesSegment } from \"./StepLineSeriesSegment\";\nimport { registry } from \"../../core/Registry\";\nimport * as $math from \"../../core/utils/Math\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[StepLineSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar StepLineSeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(StepLineSeriesDataItem, _super);\n /**\r\n * Constructor\r\n */\n function StepLineSeriesDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"StepLineSeriesDataItem\";\n _this.applyTheme();\n return _this;\n }\n return StepLineSeriesDataItem;\n}(LineSeriesDataItem);\nexport { StepLineSeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines [[Series]] for a step line graph.\r\n *\r\n * @see {@link IStepLineSeriesEvents} for a list of available Events\r\n * @see {@link IStepLineSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\nvar StepLineSeries = /** @class */function (_super) {\n tslib_1.__extends(StepLineSeries, _super);\n /**\r\n * Constructor\r\n */\n function StepLineSeries() {\n var _this = _super.call(this) || this;\n _this.className = \"StepLineSeries\";\n _this.applyTheme();\n _this.startLocation = 0;\n _this.endLocation = 1;\n return _this;\n }\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n StepLineSeries.prototype.createDataItem = function () {\n return new StepLineSeriesDataItem();\n };\n /**\r\n * [addPoints description]\r\n *\r\n * @todo Description\r\n * @param points [description]\r\n * @param dataItem [description]\r\n * @param xField [description]\r\n * @param yField [description]\r\n * @param backwards [description]\r\n */\n StepLineSeries.prototype.addPoints = function (points, dataItem, xField, yField, backwards) {\n var startLocation = this.startLocation;\n var endLocation = this.endLocation;\n var x0 = this.xAxis.getX(dataItem, xField, startLocation);\n var y0 = this.yAxis.getY(dataItem, yField, startLocation);\n var x1 = this.xAxis.getX(dataItem, xField, endLocation);\n var y1 = this.yAxis.getY(dataItem, yField, endLocation);\n x0 = $math.fitToRange(x0, -100000, 100000); // from geometric point of view this is not right, but practically it's ok. this is done to avoid too big objects.\n y0 = $math.fitToRange(y0, -100000, 100000); // from geometric point of view this is not right, but practically it's ok. this is done to avoid too big objects.\n x1 = $math.fitToRange(x1, -100000, 100000); // from geometric point of view this is not right, but practically it's ok. this is done to avoid too big objects.\n y1 = $math.fitToRange(y1, -100000, 100000); // from geometric point of view this is not right, but practically it's ok. this is done to avoid too big objects.\n // this might make an impression that points are duplicated, and they indeed are, but this is needed to handle gaps in data\n if (!this.noRisers && this.connect) {\n if (points.length > 1) {\n var prevPoint = points[points.length - 1];\n if (this.baseAxis == this.xAxis) {\n if (backwards) {\n points.push({\n x: prevPoint.x,\n y: y1\n });\n } else {\n points.push({\n x: x0,\n y: prevPoint.y\n });\n }\n }\n if (this.baseAxis == this.yAxis) {\n if (backwards) {\n points.push({\n x: x1,\n y: prevPoint.y\n });\n } else {\n points.push({\n x: prevPoint.x,\n y: y0\n });\n }\n }\n }\n }\n var point0 = {\n x: x0,\n y: y0\n };\n var point1 = {\n x: x1,\n y: y1\n };\n if (backwards) {\n points.push(point1, point0);\n } else {\n points.push(point0, point1);\n }\n };\n /**\r\n * Draws the line segment.\r\n *\r\n * @param segment Segment\r\n * @param points Segment points\r\n * @param closePoints Segment close points\r\n */\n StepLineSeries.prototype.drawSegment = function (segment, points, closePoints) {\n var vertical = false;\n if (this.yAxis == this.baseAxis) {\n vertical = true;\n }\n segment.drawSegment(points, closePoints, this.tensionX, this.tensionY, this.noRisers, vertical);\n };\n /**\r\n * @ignore\r\n */\n StepLineSeries.prototype.createSegment = function () {\n return new StepLineSeriesSegment();\n };\n Object.defineProperty(StepLineSeries.prototype, \"noRisers\", {\n /**\r\n * @return No risers\r\n */\n get: function get() {\n return this.getPropertyValue(\"noRisers\");\n },\n /**\r\n * Specifies if step line series should draw only horizontal (or only\r\n * vertical, depending on base axis) lines, instead of connecting them with\r\n * vertical (or horizontal) lines.\r\n *\r\n * @default false\r\n * @param value No risers\r\n */\n set: function set(value) {\n this.setPropertyValue(\"noRisers\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(StepLineSeries.prototype, \"startLocation\", {\n /**\r\n * @return Location (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"startLocation\");\n },\n /**\r\n * start location of the step\r\n *\r\n * @param value Location (0-1)\r\n * @default 0\r\n */\n set: function set(value) {\n this.setPropertyValue(\"startLocation\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(StepLineSeries.prototype, \"endLocation\", {\n /**\r\n * @return Location (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"endLocation\");\n },\n /**\r\n * Step end location.\r\n *\r\n * @param value Location (0-1)\r\n * #default 1\r\n */\n set: function set(value) {\n this.setPropertyValue(\"endLocation\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n return StepLineSeries;\n}(LineSeries);\nexport { StepLineSeries };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"StepLineSeries\"] = StepLineSeries;\nregistry.registeredClasses[\"StepLineSeriesDataItem\"] = StepLineSeriesDataItem;","/**\r\n * Module that defines everything related to building RadarColumns.\r\n * It is a container which has radarColumn element which is a Slice.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Column } from \"./Column\";\nimport { Slice } from \"../../core/elements/Slice\";\nimport { registry } from \"../../core/Registry\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Class used to creates RadarColumns.\r\n *\r\n * @see {@link IRadarColumnEvents} for a list of available events\r\n * @see {@link IRadarColumnAdapters} for a list of available Adapters\r\n * @todo Usage example\r\n * @important\r\n */\nvar RadarColumn = /** @class */function (_super) {\n tslib_1.__extends(RadarColumn, _super);\n /**\r\n * Constructor\r\n */\n function RadarColumn() {\n var _this = _super.call(this) || this;\n _this.className = \"RadarColumn\";\n return _this;\n }\n /**\r\n * @ignore\r\n */\n RadarColumn.prototype.createAssets = function () {\n this.radarColumn = this.createChild(Slice);\n this.radarColumn.shouldClone = false;\n this.radarColumn.strokeOpacity = undefined;\n // some dirty hack so that if user access column, it won't get error\n this.column = this.radarColumn;\n };\n /**\r\n * Copies all parameters from another [[RadarColumn]].\r\n *\r\n * @param source Source RadarColumn\r\n */\n RadarColumn.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n if (this.radarColumn) {\n this.radarColumn.copyFrom(source.radarColumn);\n }\n };\n /**\r\n * X coordinate for the slice tooltip.\r\n *\r\n * @return X\r\n */\n RadarColumn.prototype.getTooltipX = function () {\n var value = this.getPropertyValue(\"tooltipX\");\n if (!$type.isNumber(value)) {\n value = this.radarColumn.tooltipX;\n }\n return value;\n };\n /**\r\n * Y coordinate for the slice tooltip.\r\n *\r\n * @return Y\r\n */\n RadarColumn.prototype.getTooltipY = function () {\n var value = this.getPropertyValue(\"tooltipX\");\n if (!$type.isNumber(value)) {\n value = this.radarColumn.tooltipY;\n }\n return value;\n };\n return RadarColumn;\n}(Column);\nexport { RadarColumn };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"RadarColumn\"] = RadarColumn;","/**\r\n * Radar column series module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { ColumnSeries, ColumnSeriesDataItem } from \"../series/ColumnSeries\";\nimport { visualProperties } from \"../../core/Sprite\";\n//import { AxisRendererCircular } from \"../axes/AxisRendererCircular\";\nimport { RadarColumn } from \"../elements/RadarColumn\";\nimport { registry } from \"../../core/Registry\";\nimport * as $path from \"../../core/rendering/Path\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $object from \"../../core/utils/Object\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $array from \"../../core/utils/Array\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[RadarColumnSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar RadarColumnSeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(RadarColumnSeriesDataItem, _super);\n /**\r\n * Constructor\r\n */\n function RadarColumnSeriesDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"ColumnSeriesDataItem\";\n _this.applyTheme();\n return _this;\n }\n return RadarColumnSeriesDataItem;\n}(ColumnSeriesDataItem);\nexport { RadarColumnSeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines [[Series]] for a 3D column graph.\r\n *\r\n * @see {@link IRadarColumnSeriesEvents} for a list of available Events\r\n * @see {@link IRadarColumnSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\nvar RadarColumnSeries = /** @class */function (_super) {\n tslib_1.__extends(RadarColumnSeries, _super);\n /**\r\n * Constructor\r\n */\n function RadarColumnSeries() {\n var _this = _super.call(this) || this;\n _this.className = \"RadarColumnSeries\";\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Creates and returns a RadarColumn element to use as column in radar chart.\r\n *\r\n * @return RadarColumn.\r\n */\n RadarColumnSeries.prototype.createColumnTemplate = function () {\n return new RadarColumn();\n };\n /**\r\n * (Re)validates the whole series, effectively causing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\n RadarColumnSeries.prototype.validate = function () {\n // so that radius would be updated\n if (this.chart.invalid) {\n this.chart.validate();\n }\n _super.prototype.validate.call(this);\n };\n /**\r\n * Validates data item's element, effectively redrawing it.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n RadarColumnSeries.prototype.validateDataElementReal = function (dataItem) {\n var _this = this;\n var startAngle = this.chart.startAngle;\n var endAngle = this.chart.endAngle;\n var yField = this.yField;\n var yOpenField = this.yOpenField;\n var xField = this.xField;\n var xOpenField = this.xOpenField;\n var lAngle;\n var rAngle;\n var tRadius;\n var bRadius;\n var startLocation = this.getStartLocation(dataItem);\n var endLocation = this.getEndLocation(dataItem);\n var cellAngle = (endAngle - startAngle) / (this.dataItems.length * (this.end - this.start));\n var template = this.columns.template;\n var percentWidth = template.percentWidth;\n if ($type.isNaN(percentWidth)) {\n percentWidth = 100;\n }\n var offset = $math.round((endLocation - startLocation) * (1 - percentWidth / 100) / 2, 5);\n startLocation += offset;\n endLocation -= offset;\n if (this.baseAxis == this.xAxis) {\n tRadius = $math.getDistance({\n x: this.yAxis.getX(dataItem, yField, dataItem.locations[yField], \"valueY\"),\n y: this.yAxis.getY(dataItem, yField, dataItem.locations[yField], \"valueY\")\n });\n bRadius = $math.getDistance({\n x: this.yAxis.getX(dataItem, yOpenField, dataItem.locations[yOpenField], \"valueY\"),\n y: this.yAxis.getY(dataItem, yOpenField, dataItem.locations[yOpenField], \"valueY\")\n });\n lAngle = this.xAxis.getAngle(dataItem, xOpenField, startLocation, \"valueX\");\n rAngle = this.xAxis.getAngle(dataItem, xField, endLocation, \"valueX\");\n startAngle = startAngle + startLocation * cellAngle;\n endAngle = endAngle - (1 - endLocation) * cellAngle;\n } else {\n tRadius = $math.getDistance({\n x: this.yAxis.getX(dataItem, yField, startLocation, \"valueY\"),\n y: this.yAxis.getY(dataItem, yField, startLocation, \"valueY\")\n });\n bRadius = $math.getDistance({\n x: this.yAxis.getX(dataItem, yOpenField, endLocation, \"valueY\"),\n y: this.yAxis.getY(dataItem, yOpenField, endLocation, \"valueY\")\n });\n lAngle = this.xAxis.getAngle(dataItem, xField, dataItem.locations[xField], \"valueX\");\n rAngle = this.xAxis.getAngle(dataItem, xOpenField, dataItem.locations[xOpenField], \"valueX\");\n }\n if (rAngle < lAngle) {\n var temp = rAngle;\n rAngle = lAngle;\n lAngle = temp;\n }\n lAngle = $math.fitToRange(lAngle, startAngle, endAngle);\n rAngle = $math.fitToRange(rAngle, startAngle, endAngle);\n var radarColumn = dataItem.column;\n if (!radarColumn) {\n radarColumn = this.columns.create();\n dataItem.column = radarColumn;\n $object.forceCopyProperties(this.columns.template, radarColumn, visualProperties);\n dataItem.addSprite(radarColumn);\n radarColumn.paper = this.paper; // sometimes pattern is not drawn if is set with adapter without this.\n this.setColumnStates(radarColumn);\n }\n var slice = radarColumn.radarColumn;\n slice.startAngle = lAngle;\n var arc = rAngle - lAngle;\n if (arc > 0) {\n slice.arc = arc;\n slice.radius = tRadius;\n slice.innerRadius = bRadius;\n radarColumn.__disabled = false;\n radarColumn.parent = this.columnsContainer;\n $iter.each(this.axisRanges.iterator(), function (axisRange) {\n var rangeColumn = dataItem.rangesColumns.getKey(axisRange.uid);\n if (!rangeColumn) {\n rangeColumn = _this.columns.create();\n $object.forceCopyProperties(_this.columns.template, rangeColumn, visualProperties);\n $object.copyProperties(axisRange.contents, rangeColumn, visualProperties); // need this because 3d columns are not in the same container\n if (rangeColumn.dataItem) {\n $array.remove(rangeColumn.dataItem.sprites, rangeColumn);\n }\n dataItem.addSprite(rangeColumn);\n rangeColumn.paper = _this.paper; // sometimes pattern is not drawn if is set with adapter without this.\t\t\t\t\t\n _this.setColumnStates(rangeColumn);\n dataItem.rangesColumns.setKey(axisRange.uid, rangeColumn);\n }\n var slice = rangeColumn.radarColumn;\n slice.startAngle = lAngle;\n slice.arc = arc;\n slice.radius = tRadius;\n slice.innerRadius = bRadius;\n if (slice.invalid) {\n slice.paper = _this.paper;\n slice.validate(); // validate as if it was used previously, it will flicker with previous dimensions\n }\n rangeColumn.__disabled = false;\n rangeColumn.parent = axisRange.contents;\n });\n } else {\n this.disableUnusedColumns(dataItem);\n }\n };\n /**\r\n * Returns an [[IPoint]] coordinates of the specific Serie's data point.\r\n *\r\n * @param dataItem Data item\r\n * @param xKey Name of X data field\r\n * @param yKey Name of Y data field\r\n * @param locationX X location\r\n * @param locationY Y location\r\n * @param stackKeyX ?\r\n * @param stackKeyY ?\r\n * @returns Coordinates\r\n */\n RadarColumnSeries.prototype.getPoint = function (dataItem, xKey, yKey, locationX, locationY, stackKeyX, stackKeyY) {\n if (!stackKeyX) {\n stackKeyX = \"valueX\";\n }\n if (!stackKeyY) {\n stackKeyY = \"valueY\";\n }\n var x = this.yAxis.getX(dataItem, yKey, locationY, stackKeyY);\n var y = this.yAxis.getY(dataItem, yKey, locationY, stackKeyY);\n var radius = $math.getDistance({\n x: x,\n y: y\n });\n // hack to be able to determine angle later\n if (radius == 0) {\n radius = 0.00001;\n }\n var angle = this.xAxis.getAngle(dataItem, xKey, locationX, stackKeyX);\n return {\n x: radius * $math.cos(angle),\n y: radius * $math.sin(angle)\n };\n };\n /**\r\n * Returns an SVG path to be used as a mask for the series.\r\n *\r\n * @return SVG path\r\n */\n RadarColumnSeries.prototype.getMaskPath = function () {\n var renderer = this.yAxis.renderer;\n return $path.arc(renderer.startAngle, renderer.endAngle - renderer.startAngle, renderer.pixelRadius, renderer.pixelInnerRadius);\n };\n return RadarColumnSeries;\n}(ColumnSeries);\nexport { RadarColumnSeries };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"RadarColumnSeries\"] = RadarColumnSeries;\nregistry.registeredClasses[\"RadarColumnSeriesDataItem\"] = RadarColumnSeriesDataItem;","/**\r\n * Module that defines everything related to building Funnel slices.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../../core/Container\";\nimport { Sprite } from \"../../core/Sprite\";\nimport { registry } from \"../../core/Registry\";\nimport { percent } from \"../../core/utils/Percent\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $path from \"../../core/rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Class used to create [[FunnelSlice]] elements.\r\n *\r\n * @see {@link IFunnelSliceEvents} for a list of available events\r\n * @see {@link IFunnelSliceAdapters} for a list of available adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/sliced-chart/} for documentation\r\n * @important\r\n */\nvar FunnelSlice = /** @class */function (_super) {\n tslib_1.__extends(FunnelSlice, _super);\n /**\r\n * Constructor\r\n */\n function FunnelSlice() {\n var _this = _super.call(this) || this;\n _this.slice = _this.createChild(Sprite);\n _this.slice.shouldClone = false;\n _this.slice.setElement(_this.paper.add(\"path\"));\n _this.slice.isMeasured = false;\n _this.orientation = \"vertical\";\n _this.bottomWidth = percent(100);\n _this.topWidth = percent(100);\n _this.isMeasured = false;\n _this.width = 10;\n _this.height = 10;\n _this.expandDistance = 0;\n _this.className = \"FunnelSlice\";\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the element.\r\n */\n FunnelSlice.prototype.draw = function () {\n _super.prototype.draw.call(this);\n var pt = this.pixelPaddingTop;\n var pb = this.pixelPaddingBottom;\n var pr = this.pixelPaddingRight;\n var pl = this.pixelPaddingLeft;\n var w = this.pixelWidth - pr - pl;\n var h = this.pixelHeight - pt - pb;\n var ed = this.expandDistance;\n var path = \"\";\n if (this.orientation == \"vertical\") {\n var tw = $utils.relativeToValue(this.topWidth, w);\n var bw = $utils.relativeToValue(this.bottomWidth, w);\n var tl = {\n x: (w - tw) / 2 + pl,\n y: pt\n };\n var tr = {\n x: (w + tw) / 2 + pl,\n y: pt\n };\n var br = {\n x: (w + bw) / 2 + pl,\n y: pt + h\n };\n var bl = {\n x: (w - bw) / 2 + pl,\n y: pt + h\n };\n var cpr = {\n x: tr.x + (br.x - tr.x) / 2 + ed * h,\n y: tr.y + 0.5 * h\n };\n var cpl = {\n x: tl.x + (bl.x - tl.x) / 2 - ed * h,\n y: tl.y + 0.5 * h\n };\n var qp1 = $path.lineTo(br);\n var qp2 = \"\";\n if (ed != 0) {\n qp1 = $path.quadraticCurveTo(br, cpr);\n qp2 = $path.quadraticCurveTo(tl, cpl);\n }\n path = $path.moveTo(tl) + $path.lineTo(tr) + qp1 + $path.lineTo(bl) + qp2;\n this.tickPoint = {\n x: tr.x + (br.x - tr.x) / 2,\n y: tr.y + (br.y - tr.y) / 2\n };\n } else {\n var tw = $utils.relativeToValue(this.topWidth, h);\n var bw = $utils.relativeToValue(this.bottomWidth, h);\n var tt = {\n x: pl,\n y: (h - tw) / 2 + pt\n };\n var tb = {\n x: pl,\n y: (h + tw) / 2 + pt\n };\n var bt = {\n x: pl + w,\n y: (h - bw) / 2 + pt\n };\n var bb = {\n x: pl + w,\n y: (h + bw) / 2 + pt\n };\n var cpr = {\n y: tt.y + (bt.y - tt.y) / 2 - ed * w,\n x: tt.x + 0.5 * w\n };\n var cpl = {\n y: tb.y + (bb.y - tb.y) / 2 + ed * w,\n x: tb.x + 0.5 * w\n };\n var qp1 = $path.lineTo(bt);\n var qp2 = \"\";\n if (ed != 0) {\n qp1 = $path.quadraticCurveTo(bt, cpr);\n qp2 = $path.quadraticCurveTo(tb, cpl);\n }\n path = $path.moveTo(tb) + $path.lineTo(tt) + qp1 + $path.lineTo(bb) + qp2;\n this.tickPoint = {\n y: tb.y + (bb.y - tb.y) / 2,\n x: tb.x + (bb.x - tb.x) / 2\n };\n }\n this.slice.path = path;\n this.invalidateLayout();\n };\n FunnelSlice.prototype.getPoint = function (locationX, locationY) {\n var pt = this.pixelPaddingTop;\n var pb = this.pixelPaddingBottom;\n var pr = this.pixelPaddingRight;\n var pl = this.pixelPaddingLeft;\n var w = this.pixelWidth - pr - pl;\n var h = this.pixelHeight - pt - pb;\n if (this.orientation == \"vertical\") {\n var tw = $utils.relativeToValue(this.topWidth, w);\n var bw = $utils.relativeToValue(this.bottomWidth, w);\n var tl = {\n x: (w - tw) / 2 + pl,\n y: pt\n };\n var tr = {\n x: (w + tw) / 2 + pl,\n y: pt\n };\n var br = {\n x: (w + bw) / 2 + pl,\n y: pt + h\n };\n var bl = {\n x: (w - bw) / 2 + pl,\n y: pt + h\n };\n var mlx = tl.x + (bl.x - tl.x) * locationY;\n var mrx = tr.x + (br.x - tr.x) * locationY;\n return {\n x: mlx + (mrx - mlx) * locationX,\n y: tr.y + (br.y - tr.y) * locationY\n };\n } else {\n var tw = $utils.relativeToValue(this.topWidth, h);\n var bw = $utils.relativeToValue(this.bottomWidth, h);\n var tt = {\n x: pl,\n y: (h - tw) / 2 + pt\n };\n var tb = {\n x: pl,\n y: (h + tw) / 2 + pt\n };\n var bt = {\n x: pl + w,\n y: (h - bw) / 2 + pt\n };\n var bb = {\n x: pl + w,\n y: (h + bw) / 2 + pt\n };\n var mty = tt.y + (bt.y - tt.y) * locationX;\n var mby = tb.y + (bb.y - tb.y) * locationX;\n return {\n y: mty + (mby - mty) * locationY,\n x: tt.x + (bt.x - tt.x) * locationX\n };\n }\n };\n Object.defineProperty(FunnelSlice.prototype, \"bottomWidth\", {\n /**\r\n * @return bottom width\r\n */\n get: function get() {\n return this.getPropertyValue(\"bottomWidth\");\n },\n /**\r\n * Bottom width in pixels or percent.\r\n *\r\n * IMPORTANT: this setting might be used to set dimensions if you use slice\r\n * as a standalone element. If it's a part of [[FunnelSeries]] this setting\r\n * becomes read-only as it will be automatically reset by series.\r\n *\r\n * @param value Bottom width\r\n */\n set: function set(value) {\n this.setPercentProperty(\"bottomWidth\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FunnelSlice.prototype, \"topWidth\", {\n /**\r\n * @return Top width\r\n */\n get: function get() {\n return this.getPropertyValue(\"topWidth\");\n },\n /**\r\n * Top width in pixels or percent.\r\n *\r\n * IMPORTANT: this setting might be used to set dimensions if you use slice\r\n * as a standalone element. If it's a part of [[FunnelSeries]] this setting\r\n * becomes read-only as it will be automatically reset by series.\r\n *\r\n * @param value Top width\r\n */\n set: function set(value) {\n this.setPercentProperty(\"topWidth\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FunnelSlice.prototype, \"orientation\", {\n /**\r\n * @return Orientation\r\n */\n get: function get() {\n return this.getPropertyValue(\"orientation\");\n },\n /**\r\n * Orientation of the funnel slice: \"horizontal\" or \"vertical\".\r\n *\r\n * IMPORTANT: this setting might be used to set orintation if you use slice\r\n * as a standalone element. If it's a part of [[FunnelSeries]] this setting\r\n * becomes read-only as it will be automatically reset by series.\r\n *\r\n * @param value Orientation\r\n */\n set: function set(value) {\n this.setPropertyValue(\"orientation\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FunnelSlice.prototype, \"expandDistance\", {\n /**\r\n * @return expandDistance\r\n */\n get: function get() {\n return this.getPropertyValue(\"expandDistance\");\n },\n /**\r\n * A relative distance slice's sides should be bent to. It's relative to the\r\n * height of the slice.\r\n *\r\n * Zero (default) will mean the sides will be perfectly straight.\r\n *\r\n * Positive value will make them bend outwards, resulting in \"puffed\" slices.\r\n *\r\n * Negative values will make them bend inwards.\r\n *\r\n * @default 0\r\n * @param {number}\r\n */\n set: function set(value) {\n this.setPropertyValue(\"expandDistance\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies all parameters from another [[Sprite]].\r\n *\r\n * @param source Source Sprite\r\n */\n FunnelSlice.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n if (this.slice) {\n this.slice.copyFrom(source.slice);\n }\n };\n return FunnelSlice;\n}(Container);\nexport { FunnelSlice };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"FunnelSlice\"] = FunnelSlice;","/**\r\n * Funnel tick module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Tick } from \"../elements/Tick\";\nimport { MutableValueDisposer, MultiDisposer } from \"../../core/utils/Disposer\";\nimport { registry } from \"../../core/Registry\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport * as $path from \"../../core/rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws an tick line for a funnel slice connecting it to a related label.\r\n *\r\n * @see {@link IFunnelTickEvents} for a list of available events\r\n * @see {@link IFunnelTickAdapters} for a list of available Adapters\r\n */\nvar FunnelTick = /** @class */function (_super) {\n tslib_1.__extends(FunnelTick, _super);\n /**\r\n * Constructor\r\n */\n function FunnelTick() {\n var _this = _super.call(this) || this;\n /**\r\n * A label element this tick is attached to.\r\n */\n _this._label = new MutableValueDisposer();\n /**\r\n * A slice element this tick is attached to.\r\n */\n _this._slice = new MutableValueDisposer();\n _this.className = \"FunnelTick\";\n _this.element = _this.paper.add(\"path\");\n _this._disposers.push(_this._label);\n _this._disposers.push(_this._slice);\n _this.setPropertyValue(\"locationX\", 0);\n _this.setPropertyValue(\"locationY\", 0);\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the tick element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n FunnelTick.prototype.draw = function () {\n _super.prototype.draw.call(this);\n var slice = this.slice;\n var point = slice.getPoint(this.locationX, this.locationY);\n if (point) {\n var label = this.label;\n var series = slice.dataItem.component;\n if (series.orientation == \"vertical\") {\n var x1 = label.pixelX;\n var y1 = label.pixelY;\n if (!series.labelsOpposite) {\n x1 += label.maxRight;\n }\n var p0 = $utils.spritePointToSprite(point, slice, this.parent);\n var p1 = $utils.spritePointToSprite({\n x: x1,\n y: y1\n }, label.parent, this.parent);\n this.path = $path.moveTo(p0) + $path.lineTo(p1);\n } else {\n var x1 = label.pixelX;\n var y1 = label.pixelY;\n if (!series.labelsOpposite) {\n y1 += label.maxBottom;\n }\n var p0 = $utils.spritePointToSprite(point, slice, this.parent);\n var p1 = $utils.spritePointToSprite({\n x: x1,\n y: y1\n }, label.parent, this.parent);\n this.path = $path.moveTo(p0) + $path.lineTo(p1);\n }\n }\n };\n Object.defineProperty(FunnelTick.prototype, \"slice\", {\n /**\r\n * @return FunnelSlice\r\n */\n get: function get() {\n return this._slice.get();\n },\n /**\r\n * [[FunnelSlice]] element tick is attached to.\r\n *\r\n * @param slice Slice\r\n */\n set: function set(slice) {\n this._slice.set(slice, new MultiDisposer([slice.events.on(\"transformed\", this.invalidate, this, false), slice.events.on(\"validated\", this.invalidate, this, false)]));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FunnelTick.prototype, \"label\", {\n /**\r\n * @return Label\r\n */\n get: function get() {\n return this._label.get();\n },\n /**\r\n * [[Label]] element tick is attached to.\r\n *\r\n * @param label Label\r\n */\n set: function set(label) {\n this._label.set(label, label.events.on(\"transformed\", this.invalidate, this, false));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FunnelTick.prototype, \"locationX\", {\n /**\r\n * @return Location (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"locationX\");\n },\n /**\r\n * A relative horizontal position within target element a tick is pointing\r\n * to.\r\n *\r\n * A scale is from 0 to 1, where 0 means left edge, and 1 right edge.\r\n *\r\n * You can also set any value in-between (e.g. 0.5 will point to the middle\r\n * of the slice), or outside 0-1 range, which will put tick anchor position\r\n * outside target element.\r\n *\r\n * @param value Location (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"locationX\", value, false, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FunnelTick.prototype, \"locationY\", {\n /**\r\n * @return Location (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"locationY\");\n },\n /**\r\n * A relative vertical position within target element a tick is pointing\r\n * to.\r\n *\r\n * A scale is from 0 to 1, where 0 means top edge, and 1 bottom edge.\r\n *\r\n * You can also set any value in-between (e.g. 0.5 will point to the middle\r\n * of the slice), or outside 0-1 range, which will put tick anchor position\r\n * outside target element.\r\n *\r\n * @param value Location (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"locationY\", value, false, true);\n },\n enumerable: true,\n configurable: true\n });\n return FunnelTick;\n}(Tick);\nexport { FunnelTick };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"FunnelTick\"] = FunnelTick;","/**\r\n * Defines Funnel Chart Series.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { PercentSeries, PercentSeriesDataItem } from \"./PercentSeries\";\nimport { FunnelSlice } from \"../elements/FunnelSlice\";\nimport { FunnelTick } from \"../elements/FunnelTick\";\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\nimport { registry } from \"../../core/Registry\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $iter from \"../../core/utils/Iterator\";\nimport * as $type from \"../../core/utils/Type\";\nimport { percent } from \"../../core/utils/Percent\";\nimport { Disposer } from \"../../core/utils/Disposer\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n//@todo: sequenced?\n/**\r\n * Defines a [[DataItem]] for [[FunnelSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar FunnelSeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(FunnelSeriesDataItem, _super);\n /**\r\n * Constructor\r\n */\n function FunnelSeriesDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"FunnelSeriesDataItem\";\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(FunnelSeriesDataItem.prototype, \"sliceLink\", {\n /**\r\n * A [[FunnelSlice]] element, related to this data item ([[FunnelSlice]]).\r\n *\r\n * @readonly\r\n * @return Slice element\r\n */\n get: function get() {\n var _this = this;\n if (!this._sliceLink) {\n var sliceLink_1 = this.component.sliceLinks.create();\n this._sliceLink = sliceLink_1;\n this._disposers.push(sliceLink_1);\n sliceLink_1.parent = this.component.slicesContainer;\n this._disposers.push(new Disposer(function () {\n if (_this.component) {\n _this.component.sliceLinks.removeValue(sliceLink_1);\n }\n }));\n this.addSprite(sliceLink_1);\n sliceLink_1.visible = this.visible;\n }\n return this._sliceLink;\n },\n enumerable: true,\n configurable: true\n });\n return FunnelSeriesDataItem;\n}(PercentSeriesDataItem);\nexport { FunnelSeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines [[Series]] for a FunnelSlice series on a [[SlicedChart]].\r\n *\r\n * @see {@link IFunnelSeriesEvents} for a list of available Events\r\n * @see {@link IFunnelSeriesAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/sliced-chart/} for documentation\r\n * @important\r\n */\nvar FunnelSeries = /** @class */function (_super) {\n tslib_1.__extends(FunnelSeries, _super);\n /**\r\n * Constructor\r\n */\n function FunnelSeries() {\n var _this = _super.call(this) || this;\n _this._nextY = 0;\n _this.className = \"FunnelSeries\";\n _this.orientation = \"vertical\";\n _this.width = percent(100);\n _this.height = percent(100);\n _this.slicesContainer.width = percent(100);\n _this.slicesContainer.height = percent(100);\n _this._disposers.push(_this.slicesContainer.events.on(\"maxsizechanged\", _this.invalidateDataItems, _this, false));\n _this.labelsOpposite = true;\n _this.labelsContainer.layout = \"absolute\";\n _this.bottomRatio = 0;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Creates a [[FunnelSlice]] element.\r\n *\r\n * @return Slice\r\n */\n FunnelSeries.prototype.createSlice = function () {\n return new FunnelSlice();\n };\n /**\r\n * Creates a [[FunnelTick]] element.\r\n *\r\n * @return Tick\r\n */\n FunnelSeries.prototype.createTick = function () {\n return new FunnelTick();\n };\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n FunnelSeries.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Funnel Series\");\n }\n };\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n FunnelSeries.prototype.createDataItem = function () {\n return new FunnelSeriesDataItem();\n };\n /**\r\n * Inits FunnelSlice.\r\n *\r\n * @param slice to init\r\n */\n FunnelSeries.prototype.initSlice = function (slice) {\n slice.isMeasured = false;\n slice.defaultState.properties.scale = 1;\n slice.observe(\"scale\", this.handleSliceScale, this);\n slice.observe([\"dx\", \"dy\", \"x\", \"y\"], this.handleSliceMove, this);\n slice.tooltipText = \"{category}: {value.percent.formatNumber('#.#')}% ({value.value})\";\n var hoverState = slice.states.create(\"hover\");\n hoverState.properties.expandDistance = 0.2;\n };\n /**\r\n * [initLabel description]\r\n *\r\n * @todo Description\r\n * @param label [description]\r\n */\n FunnelSeries.prototype.initLabel = function (label) {\n _super.prototype.initLabel.call(this, label);\n label.verticalCenter = \"middle\";\n label.horizontalCenter = \"middle\";\n label.isMeasured = true;\n label.padding(5, 5, 5, 5);\n };\n /**\r\n * (Re)validates the whole series, effectively causing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\n FunnelSeries.prototype.validate = function () {\n _super.prototype.validate.call(this);\n this._nextY = 0;\n };\n /**\r\n * [validateDataElements description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\n FunnelSeries.prototype.validateDataElements = function () {\n var slicesContainer = this.slicesContainer;\n var labelsContainer = this.labelsContainer;\n var labelTemplate = this.labels.template;\n if (this.alignLabels) {\n labelTemplate.interactionsEnabled = true;\n slicesContainer.isMeasured = true;\n labelsContainer.isMeasured = true;\n } else {\n labelTemplate.interactionsEnabled = false;\n slicesContainer.isMeasured = false;\n labelsContainer.isMeasured = false;\n }\n var total = 0;\n var count = 0;\n this.dataItems.each(function (dItem) {\n if ($type.hasValue(dItem.value)) {\n count++;\n if (dItem.value > 0) {\n total += dItem.getWorkingValue(\"value\") / dItem.value;\n } else {\n total += 1;\n }\n }\n });\n this._total = 1 / count * total;\n this._count = count;\n _super.prototype.validateDataElements.call(this);\n this.arrangeLabels();\n };\n /**\r\n * [getNextValue description]\r\n *\r\n * @todo Description\r\n * @param dataItem [description]\r\n * @return [description]\r\n */\n FunnelSeries.prototype.getNextValue = function (dataItem) {\n var index = dataItem.index;\n var nextValue = dataItem.getWorkingValue(\"value\");\n if (index < this.dataItems.length - 1) {\n var nextItem = this.dataItems.getIndex(index + 1);\n nextValue = nextItem.getWorkingValue(\"value\");\n if (!nextItem.visible || nextItem.isHiding) {\n return this.getNextValue(nextItem);\n }\n }\n return nextValue;\n };\n /**\r\n * [formDataElement description]\r\n *\r\n * @todo Description\r\n */\n FunnelSeries.prototype.formDataElement = function () {};\n /**\r\n * Validates data item's element, effectively redrawing it.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n FunnelSeries.prototype.validateDataElement = function (dataItem) {\n if ($type.hasValue(dataItem.value)) {\n // FunnelSlice\n var slice = dataItem.slice;\n slice.orientation = this.orientation;\n var sliceLink = dataItem.sliceLink;\n sliceLink.orientation = this.orientation;\n var tick = dataItem.tick;\n var label = dataItem.label;\n tick.slice = slice;\n tick.label = label;\n this.decorateSlice(dataItem);\n sliceLink.fill = slice.fill;\n if (dataItem.index == this.dataItems.length - 1) {\n sliceLink.disabled = true;\n }\n // do this at the end, otherwise bullets won't be positioned properly\n _super.prototype.validateDataElement.call(this, dataItem);\n }\n };\n /**\r\n * [decorateSlice description]\r\n *\r\n * @todo Description\r\n * @param dataItem [description]\r\n */\n FunnelSeries.prototype.decorateSlice = function (dataItem) {\n var slice = dataItem.slice;\n var sliceLink = dataItem.sliceLink;\n var label = dataItem.label;\n var tick = dataItem.tick;\n var maxWidth = this.slicesContainer.innerWidth;\n var maxHeight = this.slicesContainer.innerHeight;\n var nextValue = this.getNextValue(dataItem);\n var workingValue = dataItem.getWorkingValue(\"value\");\n var bottomRatio = this.bottomRatio;\n var d = 1;\n if (dataItem.value > 0) {\n d = workingValue / dataItem.value;\n }\n if (this.orientation == \"vertical\") {\n var linkHeight = sliceLink.pixelHeight * d;\n maxHeight = maxHeight + linkHeight; // to avoid one link gap in the bottom\n slice.topWidth = workingValue / this.dataItem.values.value.high * maxWidth;\n slice.bottomWidth = (workingValue - (workingValue - nextValue) * bottomRatio) / this.dataItem.values.value.high * maxWidth;\n sliceLink.topWidth = slice.bottomWidth;\n sliceLink.bottomWidth = (workingValue - (workingValue - nextValue)) / this.dataItem.values.value.high * maxWidth;\n slice.y = this._nextY;\n slice.height = $math.max(0, maxHeight / this._count * d / this._total - linkHeight);\n slice.x = maxWidth / 2;\n if (!this.alignLabels) {\n label.x = slice.x;\n } else {\n label.x = undefined;\n }\n label.y = slice.pixelY + slice.pixelHeight * tick.locationY;\n this._nextY += slice.pixelHeight + linkHeight;\n sliceLink.y = this._nextY - linkHeight;\n sliceLink.x = slice.x;\n } else {\n var linkWidth = sliceLink.pixelWidth * d;\n maxWidth = maxWidth + linkWidth; // to avoid one link gap in the bottom\n slice.topWidth = workingValue / this.dataItem.values.value.high * maxHeight;\n slice.bottomWidth = (workingValue - (workingValue - nextValue) * bottomRatio) / this.dataItem.values.value.high * maxHeight;\n sliceLink.topWidth = slice.bottomWidth;\n sliceLink.bottomWidth = (workingValue - (workingValue - nextValue)) / this.dataItem.values.value.high * maxHeight;\n slice.x = this._nextY;\n slice.width = maxWidth / this._count * d * 1 / this._total - linkWidth;\n slice.y = maxHeight / 2;\n if (!this.alignLabels) {\n label.y = slice.y;\n } else {\n label.y = this.labelsContainer.measuredHeight;\n }\n label.x = slice.pixelX + slice.pixelWidth * tick.locationX;\n this._nextY += slice.pixelWidth + linkWidth;\n sliceLink.x = this._nextY - linkWidth;\n sliceLink.y = slice.y;\n }\n };\n /**\r\n * [arrangeLabels description]\r\n *\r\n * @todo Description\r\n */\n FunnelSeries.prototype.arrangeLabels = function () {\n if (this.alignLabels) {\n var count = this.labels.length;\n if (count > 1) {\n var lastLabel = this.labels.getIndex(count - 1);\n var lastY = lastLabel.pixelY;\n var lastX = lastLabel.pixelX;\n if (count > 1) {\n for (var i = count - 2; i >= 0; i--) {\n var label = this.labels.getIndex(i);\n if (label.visible) {\n if (label.invalid) {\n label.validate();\n }\n if (this.orientation == \"vertical\") {\n if (label.pixelY + label.measuredHeight > lastY) {\n label.y = lastY - label.measuredHeight;\n }\n }\n // horizontal\n else {\n if (label.pixelX + label.measuredWidth > lastX) {\n label.x = lastX - label.measuredWidth;\n }\n }\n lastY = label.pixelY;\n lastX = label.pixelX;\n }\n }\n lastY = 0;\n lastX = 0;\n for (var i = 0; i < count; i++) {\n var label = this.labels.getIndex(i);\n if (label.visible) {\n if (label.invalid) {\n label.validate();\n }\n if (this.orientation == \"vertical\") {\n if (label.pixelY < lastY) {\n label.y = lastY;\n }\n }\n // horizontal\n else {\n if (label.pixelX < lastX) {\n label.x = lastX;\n }\n }\n lastY += label.measuredHeight;\n lastX += label.measuredWidth;\n }\n }\n }\n }\n }\n };\n /**\r\n * Positions series bullet.\r\n *\r\n * @ignore Exclude from docs\r\n * @param bullet Bullet\r\n */\n FunnelSeries.prototype.positionBullet = function (bullet) {\n _super.prototype.positionBullet.call(this, bullet);\n var dataItem = bullet.dataItem;\n var slice = dataItem.slice;\n var locationX = bullet.locationX;\n if (!$type.isNumber(locationX)) {\n locationX = 0.5;\n }\n var locationY = bullet.locationY;\n if (!$type.isNumber(locationY)) {\n locationY = 1;\n }\n bullet.x = slice.pixelX + slice.measuredWidth * locationX;\n bullet.y = slice.pixelY + slice.measuredHeight * locationY;\n };\n Object.defineProperty(FunnelSeries.prototype, \"orientation\", {\n /**\r\n * @return Orientation\r\n */\n get: function get() {\n return this.getPropertyValue(\"orientation\");\n },\n /**\r\n * Orientation of the funnel slices: \"horizontal\" or \"vertical\" (default).\r\n *\r\n * @default \"vertical\"\r\n * @param value Orientation\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"orientation\", value)) {\n this.labelsOpposite = this.labelsOpposite;\n this.invalidate();\n if (value == \"vertical\") {\n this.ticks.template.locationX = 1;\n this.ticks.template.locationY = 0.5;\n this.labels.template.rotation = 0;\n this.layout = \"horizontal\";\n } else {\n this.ticks.template.locationX = 0.5;\n this.ticks.template.locationY = 1;\n this.labels.template.rotation = -90;\n this.layout = \"vertical\";\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FunnelSeries.prototype, \"bottomRatio\", {\n /**\r\n * @return {number}\r\n */\n get: function get() {\n return this.getPropertyValue(\"bottomRatio\");\n },\n /**\r\n * Indicates how slice's bottom will change in relation to slices top AND\r\n * next slices top.\r\n *\r\n * Basically it's a relative value (0-1) that indicates bottom width\r\n * position between current slice's top width and the top withd of the next\r\n * one.\r\n *\r\n * The scale goes from 0 (closer to current slice width) to 1 (closer to next\r\n * slice with).\r\n *\r\n * `0` (default) will mean that bottom will be the same as top, resulting in\r\n * a prefectly square slice.\r\n *\r\n * From the data-viz standpoint `0` is a correct setting, since area of the\r\n * slices will depict their value correctly.\r\n *\r\n * `1` will mean that slice will become trapezoid with its bottom matching\r\n * width of the next slice.\r\n *\r\n * `0.5` will make bottom width be in the middle of width of current slice\r\n * and the next slice.\r\n *\r\n * @default 0\r\n * @param {number}\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"bottomRatio\", value)) {\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FunnelSeries.prototype, \"sliceLinks\", {\n /**\r\n * A list of elements linking each actual slice.\r\n *\r\n * Please note that links are [[FunnelSlice]] objects, just like real links,\r\n * so they have all the same configuration options.\r\n *\r\n * You can use `template` of this link, to specify how links will look.\r\n *\r\n * ```TypeScript\r\n * series.sliceLinks.template.fillOpacity = 0.5;\r\n * ```\r\n * ```JavaScript\r\n * series.sliceLinks.template.fillOpacity = 0.5;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * \"type\": \"FunnelSeries\",\r\n * // ...\r\n * \"sliceLinks\": {\r\n * \"fillOpacity\": 0.5\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @return Funnel links\r\n */\n get: function get() {\n if (!this._sliceLinks) {\n var sliceLink = new FunnelSlice();\n sliceLink.applyOnClones = true;\n sliceLink.fillOpacity = 0.5;\n sliceLink.expandDistance = -0.3;\n sliceLink.hiddenState.properties.opacity = 0;\n this._disposers.push(sliceLink);\n this._sliceLinks = new ListTemplate(sliceLink);\n this._disposers.push(new ListDisposer(this._sliceLinks));\n }\n return this._sliceLinks;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Shows hidden series.\r\n *\r\n * @param duration Duration of reveal animation (ms)\r\n * @return Animation\r\n */\n FunnelSeries.prototype.show = function (duration) {\n var _this = this;\n var startIndex = this.startIndex;\n var endIndex = this.endIndex;\n var interpolationDuration = this.defaultState.transitionDuration;\n if ($type.isNumber(duration)) {\n interpolationDuration = duration;\n }\n var delay = 0;\n $iter.each($iter.indexed(this.dataItems.iterator()), function (a) {\n var i = a[0];\n var dataItem = a[1];\n if (_this.sequencedInterpolation) {\n delay = _this.sequencedInterpolationDelay * i + interpolationDuration * (i - startIndex) / (endIndex - startIndex);\n }\n dataItem.show(interpolationDuration, delay, [\"value\"]);\n });\n var animation = _super.prototype.show.call(this, duration);\n return animation;\n };\n /**\r\n * Hides series.\r\n *\r\n * @param duration Duration of hiding animation (ms)\r\n * @return Animation\r\n */\n FunnelSeries.prototype.hide = function (duration) {\n var _this = this;\n var fields = [\"value\"];\n var value = 0;\n var startIndex = this.startIndex;\n var endIndex = this.endIndex;\n var delay = 0;\n var interpolationDuration = this.hiddenState.transitionDuration;\n if ($type.isNumber(duration)) {\n interpolationDuration = duration;\n }\n $iter.each($iter.indexed(this.dataItems.iterator()), function (a) {\n var i = a[0];\n var dataItem = a[1];\n if (_this.sequencedInterpolation) {\n delay = _this.sequencedInterpolationDelay * i + interpolationDuration * (i - startIndex) / (endIndex - startIndex);\n }\n dataItem.hide(interpolationDuration, delay, value, fields);\n });\n var animation = _super.prototype.hide.call(this, duration);\n if (animation && !animation.isFinished()) {\n animation.delay(delay);\n }\n return animation;\n };\n /**\r\n * @ignore\r\n */\n FunnelSeries.prototype.setAlignLabels = function (value) {\n _super.prototype.setAlignLabels.call(this, value);\n this.ticks.template.disabled = !value;\n var labelsContainer = this.labelsContainer;\n if (labelsContainer) {\n // do not align\n if (!value) {\n labelsContainer.width = percent(100);\n labelsContainer.height = percent(100);\n }\n //align\n else {\n labelsContainer.height = undefined;\n labelsContainer.width = undefined;\n labelsContainer.margin(10, 10, 10, 10);\n }\n }\n this.labelsOpposite = this.labelsOpposite;\n };\n Object.defineProperty(FunnelSeries.prototype, \"labelsOpposite\", {\n /**\r\n * @return Labels on opposite side?\r\n */\n get: function get() {\n return this.getPropertyValue(\"labelsOpposite\");\n },\n /**\r\n * Put labels on the oppsite side of the series?\r\n *\r\n * This setting is only used if `alignLabels = true`.\r\n *\r\n * If set to `true` (default) labels will be drawn to the right (on vertical\r\n * series), or to the bottom (on horizontal series).\r\n *\r\n * If set to `false`, labels will be positioned to the left or top\r\n * respectively.\r\n *\r\n * @default true\r\n * @since 4.1.13\r\n * @param value Labels on opposite side?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"labelsOpposite\", value);\n var labelTemplate = this.labels.template;\n var labelAlign = \"none\";\n var labelValign = \"none\";\n if (!this.alignLabels) {\n if (this.orientation == \"vertical\") {\n labelAlign = \"center\";\n } else {\n labelValign = \"middle\";\n }\n } else {\n // opposite (left/bottom)\n if (value) {\n this.labelsContainer.toFront();\n // left\n if (this.orientation == \"vertical\") {\n this.ticks.template.locationX = 1;\n labelTemplate.horizontalCenter = \"left\";\n labelAlign = \"right\";\n }\n // bottom\n else {\n this.ticks.template.locationY = 1;\n labelTemplate.horizontalCenter = \"right\";\n labelValign = \"bottom\";\n }\n }\n // non oposite (right/top)\n else {\n this.labelsContainer.toBack();\n // right\n if (this.orientation == \"vertical\") {\n this.ticks.template.locationX = 0;\n labelAlign = \"left\";\n }\n // top\n else {\n labelValign = \"top\";\n this.ticks.template.locationY = 0;\n }\n }\n }\n labelTemplate.align = labelAlign;\n labelTemplate.valign = labelValign;\n this.validateLayout();\n this.ticks.each(function (tick) {\n tick.invalidate();\n });\n this.invalidateDataItems();\n },\n enumerable: true,\n configurable: true\n });\n return FunnelSeries;\n}(PercentSeries);\nexport { FunnelSeries };\n/**\r\n * bboxter class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"FunnelSeries\"] = FunnelSeries;\nregistry.registeredClasses[\"FunnelSeriesDataItem\"] = FunnelSeriesDataItem;","/**\r\n * Defines Pyramid Series.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { FunnelSeries, FunnelSeriesDataItem } from \"./FunnelSeries\";\nimport { registry } from \"../../core/Registry\";\nimport * as $type from \"../../core/utils/Type\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport { percent } from \"../../core/utils/Percent\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n//@todo: sequenced?\n/**\r\n * Defines a [[DataItem]] for [[PyramidSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar PyramidSeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(PyramidSeriesDataItem, _super);\n /**\r\n * Constructor\r\n */\n function PyramidSeriesDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"PyramidSeriesDataItem\";\n _this.applyTheme();\n return _this;\n }\n return PyramidSeriesDataItem;\n}(FunnelSeriesDataItem);\nexport { PyramidSeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines [[Series]] for a FunnelSlice series on a [[SlicedChart]].\r\n *\r\n * @see {@link IPyramidSeriesEvents} for a list of available Events\r\n * @see {@link IPyramidSeriesAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/sliced-chart/} for documentation\r\n * @important\r\n */\nvar PyramidSeries = /** @class */function (_super) {\n tslib_1.__extends(PyramidSeries, _super);\n /**\r\n * Constructor\r\n */\n function PyramidSeries() {\n var _this = _super.call(this) || this;\n _this.className = \"PyramidSeries\";\n _this.topWidth = percent(0);\n _this.bottomWidth = percent(100);\n _this.pyramidHeight = percent(100);\n _this.valueIs = \"area\";\n _this.sliceLinks.template.width = 0;\n _this.sliceLinks.template.height = 0;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n PyramidSeries.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Pyramid Series\");\n }\n };\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n PyramidSeries.prototype.createDataItem = function () {\n return new PyramidSeriesDataItem();\n };\n /**\r\n * (Re)validates the whole series, effectively causing it to redraw.\r\n *\r\n * @ignore Exclude from docs\r\n */\n PyramidSeries.prototype.validate = function () {\n _super.prototype.validate.call(this);\n this._nextWidth = undefined;\n };\n /**\r\n * [getNextValue description]\r\n *\r\n * @todo Description\r\n * @param dataItem [description]\r\n * @return [description]\r\n */\n PyramidSeries.prototype.getNextValue = function (dataItem) {\n var index = dataItem.index;\n var nextValue = dataItem.getWorkingValue(\"value\");\n if (index < this.dataItems.length - 1) {\n var nextItem = this.dataItems.getIndex(index + 1);\n nextValue = nextItem.getWorkingValue(\"value\");\n }\n if (nextValue == 0) {\n nextValue = 0.000001;\n }\n return nextValue;\n };\n /**\r\n * [validateDataElements description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\n PyramidSeries.prototype.validateDataElements = function () {\n var _this = this;\n var maxWidth = this.slicesContainer.innerWidth;\n var maxHeight = this.slicesContainer.innerHeight;\n this.dataItems.each(function (dataItem) {\n var relValue = dataItem.getWorkingValue(\"value\") / dataItem.value;\n var sliceLink = dataItem.sliceLink;\n if (_this.orientation == \"vertical\") {\n maxHeight -= sliceLink.pixelHeight * relValue;\n } else {\n maxWidth -= sliceLink.pixelWidth * relValue;\n }\n });\n this._pyramidHeight = $utils.relativeToValue(this.pyramidHeight, maxHeight);\n this._pyramidWidth = $utils.relativeToValue(this.pyramidHeight, maxWidth);\n if (this.orientation == \"vertical\") {\n var y = (maxHeight - this._pyramidHeight) / 2;\n this.slicesContainer.y = y;\n this.labelsContainer.y = y;\n this.ticksContainer.y = y;\n } else {\n var x = (maxWidth - this._pyramidWidth) / 2;\n this.slicesContainer.x = x;\n this.labelsContainer.x = x;\n this.ticksContainer.x = x;\n }\n _super.prototype.validateDataElements.call(this);\n };\n /**\r\n * [decorateSlice description]\r\n *\r\n * @todo Description\r\n * @param dataItem [description]\r\n */\n PyramidSeries.prototype.decorateSlice = function (dataItem) {\n var sum = this.dataItem.values.value.sum;\n if (sum == 0) {\n return;\n }\n var slice = dataItem.slice;\n var sliceLink = dataItem.sliceLink;\n var label = dataItem.label;\n var tick = dataItem.tick;\n // TODO can this be removed ?\n this.getNextValue(dataItem);\n var workingValue = dataItem.getWorkingValue(\"value\");\n if (workingValue == 0) {\n workingValue = 0.000001;\n }\n var pyramidWidth = this._pyramidWidth;\n var pyramidHeight = this._pyramidHeight;\n var maxWidth = this.slicesContainer.innerWidth;\n var maxHeight = this.slicesContainer.innerHeight;\n var linkWidth = sliceLink.pixelWidth;\n var linkHeight = sliceLink.pixelHeight;\n if (this.orientation == \"vertical\") {\n var topWidth = $utils.relativeToValue(this.topWidth, maxWidth);\n if (!$type.isNumber(this._nextWidth)) {\n this._nextWidth = topWidth;\n }\n var bottomWidth = $utils.relativeToValue(this.bottomWidth, maxWidth);\n var sliceTopWidth = this._nextWidth;\n var angle = Math.atan2(pyramidHeight, topWidth - bottomWidth);\n var c = Math.tan(Math.PI / 2 - angle);\n if (c == 0) {\n c = 0.00000001;\n }\n var sliceHeight = void 0;\n var sliceBottomWidth = void 0;\n if (this.valueIs == \"area\") {\n var totalSquare = (topWidth + bottomWidth) / 2 * pyramidHeight;\n var square = totalSquare * workingValue / sum;\n var s = Math.abs(sliceTopWidth * sliceTopWidth - 2 * square * c);\n sliceHeight = (sliceTopWidth - Math.sqrt(s)) / c;\n sliceBottomWidth = (2 * square - sliceHeight * sliceTopWidth) / sliceHeight;\n } else {\n var sum_1 = this.dataItem.values.value.sum;\n sliceHeight = pyramidHeight * workingValue / sum_1;\n sliceBottomWidth = sliceTopWidth - sliceHeight * c;\n }\n slice.height = sliceHeight;\n slice.width = maxWidth;\n slice.bottomWidth = sliceBottomWidth;\n slice.topWidth = sliceTopWidth;\n sliceLink.topWidth = slice.bottomWidth;\n sliceLink.bottomWidth = slice.bottomWidth;\n slice.y = this._nextY;\n //slice.x = maxWidth / 2;\n if (!this.alignLabels) {\n label.x = maxWidth / 2;\n } else {\n label.x = 0;\n }\n label.y = slice.pixelY + slice.pixelHeight * tick.locationY + slice.dy;\n this._nextY += slice.pixelHeight + linkHeight * workingValue / dataItem.value;\n sliceLink.y = this._nextY - linkHeight;\n sliceLink.x = maxWidth / 2;\n } else {\n var topWidth = $utils.relativeToValue(this.topWidth, maxHeight);\n if (!$type.isNumber(this._nextWidth)) {\n this._nextWidth = topWidth;\n }\n var bottomWidth = $utils.relativeToValue(this.bottomWidth, maxHeight);\n var sliceTopWidth = this._nextWidth;\n var angle = Math.atan2(pyramidWidth, topWidth - bottomWidth);\n var c = Math.tan(Math.PI / 2 - angle);\n if (c == 0) {\n c = 0.00000001;\n }\n var sliceWidth = void 0;\n var sliceBottomWidth = void 0;\n if (this.valueIs == \"area\") {\n var totalSquare = (topWidth + bottomWidth) / 2 * pyramidWidth;\n var square = totalSquare * workingValue / this.dataItem.values.value.sum;\n sliceWidth = (sliceTopWidth - Math.sqrt(sliceTopWidth * sliceTopWidth - 2 * square * c)) / c;\n sliceBottomWidth = (2 * square - sliceWidth * sliceTopWidth) / sliceWidth;\n } else {\n sliceWidth = pyramidWidth * workingValue / this.dataItem.values.value.sum;\n sliceBottomWidth = sliceTopWidth - sliceWidth * c;\n }\n slice.width = sliceWidth;\n slice.height = maxHeight;\n slice.bottomWidth = sliceBottomWidth;\n slice.topWidth = sliceTopWidth;\n sliceLink.topWidth = slice.bottomWidth;\n sliceLink.bottomWidth = slice.bottomWidth;\n slice.x = this._nextY;\n if (!this.alignLabels) {\n label.y = maxHeight / 2;\n } else {\n label.y = this.labelsContainer.measuredHeight;\n }\n label.x = slice.pixelX + slice.pixelWidth * tick.locationX + slice.dx;\n this._nextY += slice.pixelWidth + linkWidth * workingValue / dataItem.value;\n sliceLink.x = this._nextY - linkWidth;\n sliceLink.y = maxHeight / 2;\n }\n this._nextWidth = slice.bottomWidth;\n };\n Object.defineProperty(PyramidSeries.prototype, \"topWidth\", {\n /**\r\n * @return {number | Percent}\r\n */\n get: function get() {\n return this.getPropertyValue(\"topWidth\");\n },\n /**\r\n * Width of the pyramid's tip in pixels or relative (`Percent`).\r\n *\r\n * `0%` (default) means the pyramid will be perfectly pointy.\r\n * `50%` will have a cut off / blunt top that is half the width of the chart.\r\n * `100%` will take the whole width of the chart.\r\n *\r\n * If you need the downward-pointing pyramid, you might want to `topWidth` to\r\n * `100%` and `bottomWidth` to `0%`.\r\n *\r\n * @default 0%\r\n * @param {number | Percent}\r\n */\n set: function set(value) {\n if (this.setPercentProperty(\"topWidth\", value, false, false, 10, false)) {\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PyramidSeries.prototype, \"pyramidHeight\", {\n /**\r\n * @return {number | Percent}\r\n */\n get: function get() {\n return this.getPropertyValue(\"pyramidHeight\");\n },\n /**\r\n * Height of pyramid\r\n *\r\n *\r\n * @default 100%\r\n * @param {number | Percent}\r\n */\n set: function set(value) {\n if (this.setPercentProperty(\"pyramidHeight\", value, false, false, 10, false)) {\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PyramidSeries.prototype, \"bottomWidth\", {\n /**\r\n * @return {number | Percent}\r\n */\n get: function get() {\n return this.getPropertyValue(\"bottomWidth\");\n },\n /**\r\n * Width of the pyramid's bottom (bsae) in pixels or relative (`Percent`).\r\n *\r\n * `0%` means the pyramid's botto will be pointy.\r\n * `50%` will have a cut off / blunt bottom that is half the width of the chart.\r\n * `100%` (default) will take the whole width of the chart.\r\n *\r\n * If you need the downward-pointing pyramid, you might want to `topWidth` to\r\n * `100%` and `bottomWidth` to `0%`.\r\n *\r\n * @param {number | Percent}\r\n */\n set: function set(value) {\n if (this.setPercentProperty(\"bottomWidth\", value, false, false, 10, false)) {\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PyramidSeries.prototype, \"valueIs\", {\n /**\r\n * @return {\"area\" | \"height\"}\r\n */\n get: function get() {\n return this.getPropertyValue(\"valueIs\");\n },\n /**\r\n * Indicates how slice's value will influence its size.\r\n *\r\n * `\"area\"` (default) means that the whole area of the pyramid (counting in\r\n * modifications by `topWidth` and `bottomWidth`) will be divvied up between\r\n * slices based on their value.\r\n *\r\n * With this setting at `\"area\"` the area of the trapezoids of each slice\r\n * will represent their value relatively to values of the other slices.\r\n *\r\n * This is a correct way to depict \"weight\" of each slice based on their\r\n * values.\r\n *\r\n * `\"height\"` means whole height (as opposed to area) of the pyramid will be\r\n * divvied up between slices. Actual slice width or area is not counted in.\r\n *\r\n * From the data-viz standpoint this does not make a lot of sense, since\r\n * slices with lesser values might appear more prominent if they are placed\r\n * towards thick end of the pyramid since their areas will be bigger.\r\n *\r\n * @default \"area\"\r\n * @param {\"area\" | \"height\"}\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"valueIs\", value)) {\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n return PyramidSeries;\n}(FunnelSeries);\nexport { PyramidSeries };\n/**\r\n * bboxter class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"PyramidSeries\"] = PyramidSeries;\nregistry.registeredClasses[\"PyramidSeriesDataItem\"] = PyramidSeriesDataItem;","/**\r\n * Defines Pictorial Stacked Series.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { PyramidSeries, PyramidSeriesDataItem } from \"./PyramidSeries\";\nimport { Sprite } from \"../../core/Sprite\";\nimport { registry } from \"../../core/Registry\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $type from \"../../core/utils/Type\";\nimport { percent } from \"../../core/utils/Percent\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n//@todo: sequenced?\n/**\r\n * Defines a [[DataItem]] for [[PictorialStackedSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar PictorialStackedSeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(PictorialStackedSeriesDataItem, _super);\n /**\r\n * Constructor\r\n */\n function PictorialStackedSeriesDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"PictorialStackedSeriesDataItem\";\n _this.applyTheme();\n return _this;\n }\n return PictorialStackedSeriesDataItem;\n}(PyramidSeriesDataItem);\nexport { PictorialStackedSeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines [[Series]] for a PictorialStacked series on a [[SlicedChart]].\r\n *\r\n * @see {@link IPictorialStackedSeriesEvents} for a list of available Events\r\n * @see {@link IPictorialStackedSeriesAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/sliced-chart/} for documentation\r\n * @important\r\n */\nvar PictorialStackedSeries = /** @class */function (_super) {\n tslib_1.__extends(PictorialStackedSeries, _super);\n /**\r\n * Constructor\r\n */\n function PictorialStackedSeries() {\n var _this = _super.call(this) || this;\n _this.className = \"PictorialStackedSeries\";\n _this.topWidth = percent(100);\n _this.bottomWidth = percent(100);\n _this.valueIs = \"height\";\n _this.applyTheme();\n _this.startLocation = 0;\n _this.endLocation = 1;\n _this._maskSprite = _this.slicesContainer.createChild(Sprite);\n _this._maskSprite.visible = false;\n _this._maskSprite.zIndex = 100;\n _this._maskSprite.shouldClone = false;\n return _this;\n }\n /**\r\n * Sizes the mask to fit the series.\r\n *\r\n * @ignore\r\n */\n PictorialStackedSeries.prototype.validateDataElements = function () {\n var maxWidth = this.slicesContainer.maxWidth;\n var maxHeight = this.slicesContainer.maxHeight;\n var maskSprite = this._maskSprite;\n //maskSprite.validatePosition(); // for some reason size of the maskSprite is 0x0 after we removed validatePosition in afterdraw\n var pictureWidth = maskSprite.measuredWidth / maskSprite.scale;\n var pictureHeight = maskSprite.measuredHeight / maskSprite.scale;\n var scale = $math.min(maxHeight / pictureHeight, maxWidth / pictureWidth);\n if (scale == Infinity) {\n scale = 1; // can't return here, won't draw legend properly\n }\n scale = $math.max(0.001, scale);\n var startLocation = this.startLocation;\n var endLocation = this.endLocation;\n var newWidth = $math.min(maxWidth, pictureWidth * scale);\n var newHeight = $math.min(maxHeight, pictureHeight * scale);\n maskSprite.scale = scale;\n if (this.orientation == \"vertical\") {\n this.topWidth = newWidth + 4;\n this.bottomWidth = newWidth + 4;\n this.pyramidHeight = newHeight * (endLocation - startLocation);\n maskSprite.x = maxWidth / 2;\n maskSprite.y = newHeight / 2;\n } else {\n this.topWidth = newHeight + 4;\n this.bottomWidth = newHeight + 4;\n this.pyramidHeight = newWidth * (endLocation - startLocation);\n maskSprite.valign = \"middle\";\n maskSprite.x = newWidth / 2;\n maskSprite.y = maxHeight / 2;\n }\n maskSprite.verticalCenter = \"middle\";\n maskSprite.horizontalCenter = \"middle\";\n _super.prototype.validateDataElements.call(this);\n if (this.orientation == \"vertical\") {\n var y = (maxHeight - newHeight) / 2;\n this.slicesContainer.y = y;\n this.labelsContainer.y = y;\n this.ticksContainer.y = y;\n this.slices.template.dy = startLocation * newHeight;\n } else {\n var x = (maxWidth - newWidth) / 2;\n this.slicesContainer.x = x;\n this.labelsContainer.x = x;\n this.ticksContainer.x = x;\n this.slices.template.dx = startLocation * newWidth;\n }\n this.slicesContainer.mask = this._maskSprite;\n };\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n PictorialStackedSeries.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Pyramid Series\");\n }\n };\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n PictorialStackedSeries.prototype.createDataItem = function () {\n return new PictorialStackedSeriesDataItem();\n };\n Object.defineProperty(PictorialStackedSeries.prototype, \"maskSprite\", {\n /**\r\n * A [[Sprite]] element that is used as a series mask.\r\n *\r\n * If set, this element's shape will be used to apply shape to the whole\r\n * stacked pictorial series.\r\n *\r\n * You can use this element's `path` property to set an SVG path for the\r\n * shape:\r\n *\r\n * ```TypeScript\r\n * let iconPath = \"M511.82,329.991c-0.256-1.212-1.064-2.244-2.192-2.784l-24.396-11.684c17.688-29.776,11.804-68.912-15.58-91.88 c-53.756-45.084-131.696-70.936-213.828-70.936c-82.128,0-160.068,25.856-213.82,70.936c-27.416,22.992-33.28,62.18-15.524,91.972 L2.276,327.203c-1.128,0.54-1.936,1.572-2.192,2.792c-0.256,1.22,0.08,2.496,0.896,3.436l21.204,24.388 c0.764,0.88,1.868,1.376,3.02,1.376c0.084,0,0.172,0,0.26-0.008c1.244-0.084,2.384-0.74,3.072-1.776l14.852-22.376 c12.648,10.112,28.392,15.776,44.916,15.776c16.872,0,33.284-5.98,46.232-16.836c27.828-23.34,73.172-37.272,121.288-37.272 c48.12,0,93.464,13.932,121.296,37.272c12.944,10.856,29.36,16.836,46.228,16.836c16.596,0,32.4-5.724,45.08-15.916l14.94,22.512 c0.692,1.04,1.824,1.696,3.076,1.776c0.084,0.008,0.172,0.008,0.256,0.008c1.156,0,2.256-0.496,3.02-1.376l21.2-24.388C511.74,332.487,512.068,331.211,511.82,329.991z\";\r\n * // ...\r\n * series.maskSprite.path = iconPath;\r\n * ```\r\n * ```JavaScript\r\n * let iconPath = \"M511.82,329.991c-0.256-1.212-1.064-2.244-2.192-2.784l-24.396-11.684c17.688-29.776,11.804-68.912-15.58-91.88 c-53.756-45.084-131.696-70.936-213.828-70.936c-82.128,0-160.068,25.856-213.82,70.936c-27.416,22.992-33.28,62.18-15.524,91.972 L2.276,327.203c-1.128,0.54-1.936,1.572-2.192,2.792c-0.256,1.22,0.08,2.496,0.896,3.436l21.204,24.388 c0.764,0.88,1.868,1.376,3.02,1.376c0.084,0,0.172,0,0.26-0.008c1.244-0.084,2.384-0.74,3.072-1.776l14.852-22.376 c12.648,10.112,28.392,15.776,44.916,15.776c16.872,0,33.284-5.98,46.232-16.836c27.828-23.34,73.172-37.272,121.288-37.272 c48.12,0,93.464,13.932,121.296,37.272c12.944,10.856,29.36,16.836,46.228,16.836c16.596,0,32.4-5.724,45.08-15.916l14.94,22.512 c0.692,1.04,1.824,1.696,3.076,1.776c0.084,0.008,0.172,0.008,0.256,0.008c1.156,0,2.256-0.496,3.02-1.376l21.2-24.388C511.74,332.487,512.068,331.211,511.82,329.991z\";\r\n * // ...\r\n * series.maskSprite.path = iconPath;\r\n * ```\r\n * ```JSON\r\n * let iconPath = \"M511.82,329.991c-0.256-1.212-1.064-2.244-2.192-2.784l-24.396-11.684c17.688-29.776,11.804-68.912-15.58-91.88 c-53.756-45.084-131.696-70.936-213.828-70.936c-82.128,0-160.068,25.856-213.82,70.936c-27.416,22.992-33.28,62.18-15.524,91.972 L2.276,327.203c-1.128,0.54-1.936,1.572-2.192,2.792c-0.256,1.22,0.08,2.496,0.896,3.436l21.204,24.388 c0.764,0.88,1.868,1.376,3.02,1.376c0.084,0,0.172,0,0.26-0.008c1.244-0.084,2.384-0.74,3.072-1.776l14.852-22.376 c12.648,10.112,28.392,15.776,44.916,15.776c16.872,0,33.284-5.98,46.232-16.836c27.828-23.34,73.172-37.272,121.288-37.272 c48.12,0,93.464,13.932,121.296,37.272c12.944,10.856,29.36,16.836,46.228,16.836c16.596,0,32.4-5.724,45.08-15.916l14.94,22.512 c0.692,1.04,1.824,1.696,3.076,1.776c0.084,0.008,0.172,0.008,0.256,0.008c1.156,0,2.256-0.496,3.02-1.376l21.2-24.388C511.74,332.487,512.068,331.211,511.82,329.991z\";\r\n * // ...\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * \"type\": \"PictorialStackedSeries\",\r\n * // ...\r\n * \"maskSprite\": {\r\n * \"path\": iconPath\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @return Mask sprite\r\n */\n get: function get() {\n return this._maskSprite;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Inits FunnelSlice.\r\n *\r\n * @param slice to init\r\n */\n PictorialStackedSeries.prototype.initSlice = function (slice) {\n _super.prototype.initSlice.call(this, slice);\n var hs = slice.states.getKey(\"hover\");\n if (hs) {\n hs.properties.expandDistance = 0;\n }\n };\n Object.defineProperty(PictorialStackedSeries.prototype, \"startLocation\", {\n /**\r\n * @return Start location\r\n */\n get: function get() {\n return this.getPropertyValue(\"startLocation\");\n },\n /**\r\n * Relative location to start series from.\r\n *\r\n * Range of values: 0 to 1.\r\n *\r\n * This setting indicates where actual slices will start relatively to the\r\n * whole height/width of the series.\r\n *\r\n * For example, if we want slices to start at 30% from the top/left of the\r\n * series, we can set `startLocation = 0.3`.\r\n *\r\n * To fill shape outside of the location range, use background of the\r\n * property `slicesContainer`.\r\n *\r\n * ```TypeScript\r\n * series.startLocation = 0.2;\r\n * series.endLocation = 0.8;\r\n * series.slicesContainer.background.fill = am4core.color(\"#eee\");\r\n * ```\r\n * ```JavaScript\r\n * series.startLocation = 0.2;\r\n * series.endLocation = 0.8;\r\n * series.slicesContainer.background.fill = am4core.color(\"#eee\");\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * // ...\r\n * \"startLocation\": 0.2,\r\n * \"endLocation\": 0.8,\r\n * \"slicesContainer\": {\r\n * \"background\": {\r\n * \"fill\": \"#eee\"\r\n * }\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @default 0\r\n * @since 4.1.13\r\n * @param value Start location\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"startLocation\", value)) {\n this.invalidateDataItems();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PictorialStackedSeries.prototype, \"endLocation\", {\n /**\r\n * @return End location\r\n */\n get: function get() {\n return this.getPropertyValue(\"endLocation\");\n },\n /**\r\n * Relative location to end series at.\r\n *\r\n * Range of values: 0 to 1.\r\n *\r\n * This setting indicates where actual slices will end relatively to the\r\n * whole height/width of the series.\r\n *\r\n * For example, if we want slices to end at 70% from the top/left of the\r\n * series, we can set `endLocation = 0.7`.\r\n *\r\n * To fill shape outside of the location range, use background of the\r\n * property `slicesContainer`.\r\n *\r\n * ```TypeScript\r\n * series.startLocation = 0.2;\r\n * series.endLocation = 0.8;\r\n * series.slicesContainer.background.fill = am4core.color(\"#eee\");\r\n * ```\r\n * ```JavaScript\r\n * series.startLocation = 0.2;\r\n * series.endLocation = 0.8;\r\n * series.slicesContainer.background.fill = am4core.color(\"#eee\");\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * // ...\r\n * \"startLocation\": 0.2,\r\n * \"endLocation\": 0.8,\r\n * \"slicesContainer\": {\r\n * \"background\": {\r\n * \"fill\": \"#eee\"\r\n * }\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @default 1\r\n * @since 4.1.13\r\n * @param value End location\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"endLocation\", value)) {\n this.invalidateDataItems();\n }\n },\n enumerable: true,\n configurable: true\n });\n return PictorialStackedSeries;\n}(PyramidSeries);\nexport { PictorialStackedSeries };\n/**\r\n * bboxter class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"PictorialStackedSeries\"] = PictorialStackedSeries;\nregistry.registeredClasses[\"PictorialStackedSeriesDataItem\"] = PictorialStackedSeriesDataItem;","/**\r\n * Module that defines everything related to building Cone Columns.\r\n * It is a container which has coneColumn element which is a Cone.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Column } from \"./Column\";\nimport { Cone } from \"../../core/elements/3d/Cone\";\nimport { registry } from \"../../core/Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Class used to creates ConeColumns.\r\n *\r\n * @see {@link IConeColumnEvents} for a list of available events\r\n * @see {@link IConeColumnAdapters} for a list of available Adapters\r\n * @todo Usage example\r\n * @important\r\n */\nvar ConeColumn = /** @class */function (_super) {\n tslib_1.__extends(ConeColumn, _super);\n /**\r\n * Constructor\r\n */\n function ConeColumn() {\n var _this = _super.call(this) || this;\n _this.className = \"ConeColumn\";\n return _this;\n }\n /**\r\n * @ignore\r\n */\n ConeColumn.prototype.createAssets = function () {\n this.coneColumn = this.createChild(Cone);\n this.coneColumn.shouldClone = false;\n // some dirty hack so that if user access column, it won't get error\n this.column = this.coneColumn;\n };\n /**\r\n * Copies all parameters from another [[ConeColumn]].\r\n *\r\n * @param source Source ConeColumn\r\n */\n ConeColumn.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n if (this.coneColumn) {\n this.coneColumn.copyFrom(source.coneColumn);\n }\n };\n return ConeColumn;\n}(Column);\nexport { ConeColumn };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"ConeColumn\"] = ConeColumn;","/**\r\n * ConeSeries module\r\n * Not recommended using if you use scrollbars or your chart is zoomable in some other way.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { ColumnSeries, ColumnSeriesDataItem } from \"./ColumnSeries\";\nimport { ConeColumn } from \"../elements/ConeColumn\";\nimport { registry } from \"../../core/Registry\";\nimport * as $path from \"../../core/rendering/Path\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[ConeSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar ConeSeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(ConeSeriesDataItem, _super);\n /**\r\n * Constructor\r\n */\n function ConeSeriesDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"ConeSeriesDataItem\";\n _this.applyTheme();\n return _this;\n }\n return ConeSeriesDataItem;\n}(ColumnSeriesDataItem);\nexport { ConeSeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines [[Series]] for a cone graph.\r\n *\r\n * @see {@link IConeSeriesEvents} for a list of available Events\r\n * @see {@link IConeSeriesAdapters} for a list of available Adapters\r\n * @todo Example\r\n * @important\r\n */\nvar ConeSeries = /** @class */function (_super) {\n tslib_1.__extends(ConeSeries, _super);\n /**\r\n * Constructor\r\n */\n function ConeSeries() {\n var _this = _super.call(this) || this;\n _this.className = \"ConeSeries\";\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Returns an element to use for Candlestick\r\n * @ignore\r\n * @return Element.\r\n */\n ConeSeries.prototype.createColumnTemplate = function () {\n return new ConeColumn();\n };\n /**\r\n * Returns an SVG path to use as series mask.\r\n *\r\n * @return SVG path\r\n */\n ConeSeries.prototype.getMaskPath = function () {\n var dx = 0;\n var dy = 0;\n var column = this.columns.getIndex(0);\n if (column) {\n if (this.baseAxis == this.xAxis) {\n dy = column.coneColumn.bottom.radiusY + 1;\n } else {\n dx = column.coneColumn.bottom.radiusY + 1;\n }\n return $path.rectToPath({\n x: -dx,\n y: 0,\n width: this.xAxis.axisLength + dx,\n height: this.yAxis.axisLength + dy\n });\n }\n };\n /**\r\n * Validates data item's elements.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n ConeSeries.prototype.validateDataElementReal = function (dataItem) {\n _super.prototype.validateDataElementReal.call(this, dataItem);\n var column = dataItem.column;\n if (column) {\n var coneColumn = dataItem.column.coneColumn;\n coneColumn.fill = dataItem.column.fill;\n if (this.baseAxis == this.yAxis) {\n coneColumn.orientation = \"horizontal\";\n } else {\n coneColumn.orientation = \"vertical\";\n }\n }\n };\n return ConeSeries;\n}(ColumnSeries);\nexport { ConeSeries };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"ConeSeries\"] = ConeSeries;\nregistry.registeredClasses[\"ConeSeriesDataItem\"] = ConeSeriesDataItem;","/**\r\n * Module that defines everything related to building Curved Columns.\r\n * It is a container which has CurvedColumn element which is a Sprite.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Column } from \"./Column\";\nimport { Sprite } from \"../../core/Sprite\";\nimport * as $path from \"../../core/rendering/Path\";\nimport * as $utils from \"../../core/utils/Utils\";\nimport { registry } from \"../../core/Registry\";\nimport * as $smoothing from \"../../core/rendering/Smoothing\";\nimport { percent } from \"../../core/utils/Percent\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Class used to creates CurvedColumns.\r\n *\r\n * @see {@link ICurvedColumnEvents} for a list of available events\r\n * @see {@link ICurvedColumnAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar CurvedColumn = /** @class */function (_super) {\n tslib_1.__extends(CurvedColumn, _super);\n /**\r\n * Constructor\r\n */\n function CurvedColumn() {\n var _this = _super.call(this) || this;\n _this.className = \"CurvedColumn\";\n return _this;\n }\n /**\r\n * [createAssets description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\n CurvedColumn.prototype.createAssets = function () {\n this.curvedColumn = this.createChild(Sprite);\n this.curvedColumn.shouldClone = false;\n this.setPropertyValue(\"tension\", 0.7);\n this.width = percent(120);\n this.height = percent(120);\n // some dirty hack so that if user access column, it won't get error\n this.column = this.curvedColumn;\n };\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n CurvedColumn.prototype.draw = function () {\n _super.prototype.draw.call(this);\n var w = this.realWidth;\n var h = this.realHeight;\n var x = this.realX - this.pixelX;\n var y = this.realY - this.pixelY;\n var points;\n // TODO can this be removed ?\n $utils.used(this.width);\n var tensionX = 1;\n var tensionY = 1;\n if (this.orientation == \"vertical\") {\n tensionX = this.tension;\n points = [{\n x: 0,\n y: h + y\n }, {\n x: w / 2,\n y: y\n }, {\n x: w,\n y: h + y\n }];\n } else {\n tensionY = this.tension;\n points = [{\n x: x,\n y: 0\n }, {\n x: x + w,\n y: h / 2\n }, {\n x: x,\n y: h\n }];\n }\n var path = $path.moveTo(points[0]) + new $smoothing.Tension(tensionX, tensionY).smooth(points);\n this.column.path = path;\n };\n /**\r\n * Copies all parameters from another [[CurvedColumn]].\r\n *\r\n * @param source Source CurvedColumn\r\n */\n CurvedColumn.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n if (this.curvedColumn) {\n this.curvedColumn.copyFrom(source.curvedColumn);\n }\n };\n Object.defineProperty(CurvedColumn.prototype, \"tension\", {\n /**\r\n * @return Tension (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"tension\");\n },\n /**\r\n * Horizontal tension of the curve.\r\n *\r\n * Tension defines how \"lose\" the line will be.\r\n *\r\n * 1 is the maximum tension which would result in pointy columns with\r\n * straight edges.\r\n *\r\n * The smaller the tension th wider the column will be.\r\n *\r\n * @default 0.7\r\n * @param value tension (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"tension\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CurvedColumn.prototype, \"orientation\", {\n /**\r\n * Orientation\r\n */\n get: function get() {\n return this.getPropertyValue(\"orientation\");\n },\n /**\r\n * Orientation of the column.\r\n *\r\n * Available options: \"vertical\" (default) and \"horizontal\".\r\n *\r\n * @default \"vertical\"\r\n * @param value Orientation\r\n */\n set: function set(value) {\n this.setPropertyValue(\"orientation\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n return CurvedColumn;\n}(Column);\nexport { CurvedColumn };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"CurvedColumn\"] = CurvedColumn;","/**\r\n * CurvedColumnSeries module.\r\n *\r\n * Not recommended using if you use scrollbars or your chart is zoomable in some other way.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { ColumnSeries, ColumnSeriesDataItem } from \"./ColumnSeries\";\nimport { CurvedColumn } from \"../elements/CurvedColumn\";\nimport { registry } from \"../../core/Registry\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[CurvedColumnSeries]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar CurvedColumnSeriesDataItem = /** @class */function (_super) {\n tslib_1.__extends(CurvedColumnSeriesDataItem, _super);\n /**\r\n * Constructor\r\n */\n function CurvedColumnSeriesDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"CurvedColumnSeriesDataItem\";\n _this.applyTheme();\n return _this;\n }\n return CurvedColumnSeriesDataItem;\n}(ColumnSeriesDataItem);\nexport { CurvedColumnSeriesDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines [[Series]] for a curved columns graph.\r\n *\r\n * @see {@link ICurvedColumnSeriesEvents} for a list of available Events\r\n * @see {@link ICurvedColumnSeriesAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar CurvedColumnSeries = /** @class */function (_super) {\n tslib_1.__extends(CurvedColumnSeries, _super);\n /**\r\n * Constructor\r\n */\n function CurvedColumnSeries() {\n var _this = _super.call(this) || this;\n _this.className = \"CurvedColumnSeries\";\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Returns an element to use for the curved column.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Element.\r\n */\n CurvedColumnSeries.prototype.createColumnTemplate = function () {\n return new CurvedColumn();\n };\n /**\r\n * Validates data item's elements.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n CurvedColumnSeries.prototype.validateDataElementReal = function (dataItem) {\n _super.prototype.validateDataElementReal.call(this, dataItem);\n var column = dataItem.column;\n column = dataItem.column;\n if (column) {\n var curvedColumn = dataItem.column.curvedColumn;\n curvedColumn.fill = dataItem.column.fill;\n if (this.baseAxis == this.yAxis) {\n column.orientation = \"horizontal\";\n } else {\n column.orientation = \"vertical\";\n }\n }\n };\n return CurvedColumnSeries;\n}(ColumnSeries);\nexport { CurvedColumnSeries };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"CurvedColumnSeries\"] = CurvedColumnSeries;\nregistry.registeredClasses[\"CurvedColumnSeriesDataItem\"] = CurvedColumnSeriesDataItem;","/**\r\n * DurationAxis module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { ValueAxis, ValueAxisDataItem } from \"./ValueAxis\";\nimport { registry } from \"../../core/Registry\";\nimport * as $math from \"../../core/utils/Math\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines data item for [[DurationAxis]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar DurationAxisDataItem = /** @class */function (_super) {\n tslib_1.__extends(DurationAxisDataItem, _super);\n /**\r\n * Constructor\r\n */\n function DurationAxisDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"DurationAxisDataItem\";\n _this.applyTheme();\n return _this;\n }\n return DurationAxisDataItem;\n}(ValueAxisDataItem);\nexport { DurationAxisDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Used to create an axis that shows time durations.\r\n *\r\n * ```TypeScript\r\n * // Create the axis\r\n * let xAxis = chart.xAxes.push(new am4charts.DurationAxis());\r\n *\r\n * // Set settings\r\n * xAxis.title.text = \"Time\";\r\n * ```\r\n * ```JavaScript\r\n * // Create the axis\r\n * var valueAxis = chart.xAxes.push(new am4charts.DurationAxis());\r\n *\r\n * // Set settings\r\n * valueAxis.title.text = \"Time\";\r\n * ```\r\n * ```JSON\r\n * \"xAxes\": [{\r\n * \"type\": \"DurationAxis\",\r\n * \"title\": {\r\n * \"text\": \"Time\"\r\n * }\r\n * }]\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/} for mor information about duration formatters.\r\n * @see {@link IDurationAxisEvents} for a list of available Events\r\n * @see {@link IDurationAxisAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar DurationAxis = /** @class */function (_super) {\n tslib_1.__extends(DurationAxis, _super);\n /**\r\n * Constructor\r\n */\n function DurationAxis() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * A base unit (granularity) of data.\r\n *\r\n * Used to indicate what are the base units of your data.\r\n */\n _this._baseUnit = \"second\";\n _this.className = \"DurationAxis\";\n _this.setPropertyValue(\"maxZoomFactor\", 1000000);\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Formats the value according to axis' own [[DurationFormatter]].\r\n *\r\n * @param value Source value\r\n * @return Formatted value\r\n */\n DurationAxis.prototype.formatLabel = function (value, format) {\n return this.durationFormatter.format(value, format || this.axisDurationFormat);\n };\n /**\r\n * Adjusts actual min and max scale values so that the axis starts and ends\r\n * at \"nice\" values, unless `strictMinMax` is set.\r\n *\r\n * The `difference` can be something else than `max - min`, because of the\r\n * axis breaks.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param min [description]\r\n * @param max [description]\r\n * @param difference [description]\r\n * @param gridCount [description]\r\n * @param strictMode [description]\r\n * @return [description]\r\n */\n DurationAxis.prototype.adjustMinMax = function (min, max, difference, gridCount, strictMode) {\n var minMaxStep;\n var timeUnit = this.baseUnit;\n // we don't allow to go to smaller units, setting so to avoid invalidation\n this.setPropertyValue(\"maxPrecision\", 0);\n if (timeUnit == \"millisecond\" || timeUnit == \"second\" || timeUnit == \"minute\" || timeUnit == \"hour\") {\n // will fail if 0\n if (gridCount <= 1) {\n gridCount = 1;\n }\n gridCount = Math.round(gridCount);\n var initialMin = min;\n var initialMax = max;\n // in case min and max is the same, use max\n if (difference === 0) {\n difference = Math.abs(max);\n }\n var step = difference / gridCount;\n var divisors = [60, 30, 20, 15, 10, 2, 1];\n var realDivisor = 1;\n if (timeUnit == \"hour\") {\n divisors = [24, 12, 6, 4, 2, 1];\n }\n try {\n for (var divisors_1 = tslib_1.__values(divisors), divisors_1_1 = divisors_1.next(); !divisors_1_1.done; divisors_1_1 = divisors_1.next()) {\n var divisor = divisors_1_1.value;\n if (difference / divisor > gridCount) {\n realDivisor = divisor;\n break;\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (divisors_1_1 && !divisors_1_1.done && (_a = divisors_1[\"return\"])) _a.call(divisors_1);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n var count = Math.ceil((max - min) / realDivisor / gridCount);\n var exponent = Math.log(Math.abs(count)) * Math.LOG10E;\n var power = Math.pow(10, Math.floor(exponent)) / 10;\n var reducedCount = count / power;\n // find closest to divisor\n var closest = $math.closest(divisors, reducedCount);\n count = closest * power;\n step = realDivisor * count;\n // TODO can this be removed ?\n this.durationFormatter.getValueUnit(step, this.baseUnit);\n min = Math.floor(min / step) * step;\n max = Math.ceil(max / step) * step;\n if (strictMode) {\n min -= step;\n if (min < 0 && initialMin >= 0) {\n min = 0;\n }\n max += step;\n if (max > 0 && initialMax <= 0) {\n max = 0;\n }\n }\n minMaxStep = {\n min: min,\n max: max,\n step: step\n };\n } else {\n minMaxStep = _super.prototype.adjustMinMax.call(this, min, max, difference, gridCount, strictMode);\n }\n // choose duration formatter based on step\n this.axisDurationFormat = this.durationFormatter.getFormat(minMaxStep.step, minMaxStep.max, this.baseUnit);\n return minMaxStep;\n var e_1, _a;\n };\n Object.defineProperty(DurationAxis.prototype, \"tooltipDurationFormat\", {\n /**\r\n * @return Duration format for axis labels\r\n */\n get: function get() {\n return this._tooltipDurationFormat;\n },\n /**\r\n * A special duration format to apply axis tooltips.\r\n *\r\n * Will use same format as for labels, if not set.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/} for mor information.\r\n * @param value Duration format for axis labels\r\n */\n set: function set(value) {\n this._tooltipDurationFormat = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns text to show in a axis tooltip, based on specific position within\r\n * axis.\r\n *\r\n * The label will be formatted as per [[NumberFormatter]] set for the whole\r\n * chart, or explicitly for this Axis.\r\n *\r\n * @ignore Exclude from docs\r\n * @param position Position (px)\r\n * @return Label (numeric value)\r\n */\n DurationAxis.prototype.getTooltipText = function (position) {\n var value = $math.round(this.positionToValue(position), this._stepDecimalPlaces);\n return this.adapter.apply(\"getTooltipText\", this.formatLabel(value, this.tooltipDurationFormat));\n };\n Object.defineProperty(DurationAxis.prototype, \"baseUnit\", {\n /**\r\n * @return Base unit\r\n */\n get: function get() {\n return this._baseUnit;\n },\n /**\r\n * A base unit (granularity) of data.\r\n *\r\n * Used to indicate what are the base units of your data.\r\n *\r\n * Available options: \"millisecond\", \"second\" (default), \"minute\", \"hour\",\r\n * \"day\", \"week\", \"month\", \"year\".\r\n *\r\n * @default \"second\"\r\n * @param timeUnit\r\n */\n set: function set(timeUnit) {\n if (this._baseUnit != timeUnit) {\n this._baseUnit = timeUnit;\n this.durationFormatter.baseUnit = timeUnit;\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies all properties and related data from a different instance of Axis.\r\n *\r\n * @param source Source Axis\r\n */\n DurationAxis.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.baseUnit = source.baseUnit;\n };\n return DurationAxis;\n}(ValueAxis);\nexport { DurationAxis };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"DurationAxis\"] = DurationAxis;\nregistry.registeredClasses[\"DurationAxisDataItem\"] = DurationAxisDataItem;","/**\r\n * Bullet module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Bullet } from \"./Bullet\";\nimport { Circle } from \"../../core/elements/Circle\";\nimport { registry } from \"../../core/Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a bullet with a textual label.\r\n *\r\n * Uses [[Label]] instance to draw the label, so the label itself is\r\n * configurable.\r\n *\r\n * @see {@link IBulletEvents} for a list of available events\r\n * @see {@link IBulletAdapters} for a list of available Adapters\r\n * @todo Usage example\r\n * @important\r\n */\nvar CircleBullet = /** @class */function (_super) {\n tslib_1.__extends(CircleBullet, _super);\n /**\r\n * Constructor\r\n */\n function CircleBullet() {\n var _this = _super.call(this) || this;\n _this.className = \"CircleBullet\";\n var circle = _this.createChild(Circle);\n circle.shouldClone = false;\n circle.radius = 5;\n circle.isMeasured = false;\n _this.circle = circle;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Copies all proprities and related stuff from another instance of\r\n * [[CircleBullet]].\r\n *\r\n * @param source Source element\r\n */\n CircleBullet.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.circle.copyFrom(source.circle);\n };\n return CircleBullet;\n}(Bullet);\nexport { CircleBullet };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"CircleBullet\"] = CircleBullet;","/**\r\n * Bullet module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Bullet } from \"./Bullet\";\nimport { Sprite } from \"../../core/Sprite\";\nimport { registry } from \"../../core/Registry\";\nimport * as $path from \"../../core/rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a bullet with a textual label.\r\n *\r\n * Uses [[Label]] instance to draw the label, so the label itself is\r\n * configurable.\r\n *\r\n * @see {@link IBulletEvents} for a list of available events\r\n * @see {@link IBulletAdapters} for a list of available Adapters\r\n * @todo Usage example\r\n * @important\r\n */\nvar ErrorBullet = /** @class */function (_super) {\n tslib_1.__extends(ErrorBullet, _super);\n /**\r\n * Constructor\r\n */\n function ErrorBullet() {\n var _this = _super.call(this) || this;\n _this.className = \"ErrorBullet\";\n _this.errorLine = _this.createChild(Sprite);\n _this.errorLine.shouldClone = false;\n _this.width = 20;\n _this.height = 20;\n _this.strokeOpacity = 1;\n _this.isDynamic = true;\n return _this;\n }\n ErrorBullet.prototype.validatePosition = function () {\n _super.prototype.validatePosition.call(this);\n var w = this.pixelWidth / 2;\n var h = this.pixelHeight / 2;\n this.errorLine.path = $path.moveTo({\n x: -w,\n y: -h\n }) + $path.lineTo({\n x: w,\n y: -h\n }) + $path.moveTo({\n x: 0,\n y: -h\n }) + $path.lineTo({\n x: 0,\n y: h\n }) + $path.moveTo({\n x: -w,\n y: h\n }) + $path.lineTo({\n x: w,\n y: h\n });\n };\n /**\r\n * Copies all proprities and related stuff from another instance of\r\n * [[ErrorBullet]].\r\n *\r\n * @param source Source element\r\n */\n ErrorBullet.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.errorLine.copyFrom(source.errorLine);\n };\n return ErrorBullet;\n}(Bullet);\nexport { ErrorBullet };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"ErrorBullet\"] = ErrorBullet;","/**\r\n * Functionality for drawing simple NavigationBar.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Component } from \"../../core/Component\";\nimport { DataItem } from \"../../core/DataItem\";\nimport { ListTemplate, ListDisposer } from \"../../core/utils/List\";\nimport { TextLink } from \"../../core/elements/TextLink\";\nimport { Triangle } from \"../../core/elements/Triangle\";\nimport { registry } from \"../../core/Registry\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport { percent } from \"../../core/utils/Percent\";\nimport * as $iter from \"../../core/utils/Iterator\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Defines a [[DataItem]] for [[NavigationBar]].\r\n *\r\n * @see {@link DataItem}\r\n */\nvar NavigationBarDataItem = /** @class */function (_super) {\n tslib_1.__extends(NavigationBarDataItem, _super);\n /**\r\n * Constructor\r\n */\n function NavigationBarDataItem() {\n var _this = _super.call(this) || this;\n _this.className = \"NavigationBarDataItem\";\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(NavigationBarDataItem.prototype, \"name\", {\n /**\r\n * @return Name\r\n */\n get: function get() {\n return this.properties[\"name\"];\n },\n /**\r\n * Name of the navigation bar item.\r\n *\r\n * @param value Name\r\n */\n set: function set(value) {\n this.setProperty(\"name\", value);\n },\n enumerable: true,\n configurable: true\n });\n return NavigationBarDataItem;\n}(DataItem);\nexport { NavigationBarDataItem };\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * NavigationBar class can be used to create a multi-level breadcrumb-style\r\n * navigation control.\r\n *\r\n * @see {@link INavigationBarEvents} for a list of available events\r\n * @see {@link INavigationBarAdapters} for a list of available Adapters\r\n * @todo Implement better\r\n * @important\r\n */\nvar NavigationBar = /** @class */function (_super) {\n tslib_1.__extends(NavigationBar, _super);\n /**\r\n * Constructor\r\n */\n function NavigationBar() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"NavigationBar\";\n var interfaceColors = new InterfaceColorSet();\n var textLink = new TextLink();\n textLink.valign = \"middle\";\n textLink.paddingTop = 8;\n textLink.paddingBottom = 8;\n _this.paddingBottom = 2;\n _this.links = new ListTemplate(textLink);\n _this._disposers.push(new ListDisposer(_this.links));\n _this._disposers.push(textLink);\n _this._linksIterator = new $iter.ListIterator(_this.links, function () {\n return _this.links.create();\n });\n _this._linksIterator.createNewItems = true;\n var triangle = new Triangle();\n triangle.direction = \"right\";\n triangle.width = 8;\n triangle.height = 12;\n triangle.fill = interfaceColors.getFor(\"alternativeBackground\");\n triangle.fillOpacity = 0.5;\n triangle.valign = \"middle\";\n triangle.marginLeft = 10;\n triangle.marginRight = 10;\n _this.separators = new ListTemplate(triangle);\n _this._disposers.push(new ListDisposer(_this.separators));\n _this._disposers.push(triangle);\n var activeLink = new TextLink();\n _this.activeLink = activeLink;\n activeLink.copyFrom(textLink);\n activeLink.valign = \"middle\";\n activeLink.fontWeight = \"bold\";\n _this.width = percent(100);\n _this.layout = \"grid\";\n _this.dataFields.name = \"name\";\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Completely redraws the navigation bar.\r\n *\r\n * @ignore Exclude from docs\r\n */\n NavigationBar.prototype.validateDataElements = function () {\n this.removeChildren();\n this._linksIterator.reset();\n _super.prototype.validateDataElements.call(this);\n //@todo: dispose\n };\n /**\r\n * Creates a visual element for a data item (nav item).\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem Data item\r\n */\n NavigationBar.prototype.validateDataElement = function (dataItem) {\n _super.prototype.validateDataElement.call(this, dataItem);\n var textLink;\n if (dataItem.index < this.dataItems.length - 1) {\n textLink = this._linksIterator.getLast();\n textLink.parent = this;\n var separator = this.separators.create();\n separator.parent = this;\n separator.valign = \"middle\";\n } else {\n textLink = this.activeLink;\n textLink.events.copyFrom(this.links.template.events);\n textLink.hide(0);\n textLink.show();\n textLink.parent = this;\n }\n textLink.dataItem = dataItem;\n textLink.text = dataItem.name;\n textLink.validate();\n };\n return NavigationBar;\n}(Component);\nexport { NavigationBar };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"NavigationBar\"] = NavigationBar;\nregistry.registeredClasses[\"NavigationBarDataItem\"] = NavigationBarDataItem;","/**\r\n * This is the main class that encapsulates every object on the chart.\r\n *\r\n * If it's an element that is to be displayed on the screen at some point, its\r\n * class must extend [[Sprite]] class.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { SpriteState } from \"./SpriteState\";\nimport { SpriteEventDispatcher } from \"./SpriteEvents\";\nexport { SpriteEventDispatcher };\nimport { BaseObjectEvents } from \"./Base\";\nimport { Adapter } from \"./utils/Adapter\";\nimport { Dictionary, DictionaryTemplate, DictionaryDisposer } from \"./utils/Dictionary\";\nimport { ListDisposer, List } from \"./utils/List\";\nimport { MultiDisposer, Disposer, MutableValueDisposer } from \"./utils/Disposer\";\nimport { Animation, AnimationDisposer } from \"./utils/Animation\";\nimport { getGhostPaper } from \"./rendering/Paper\";\nimport { Container } from \"./Container\";\nimport { Pattern } from \"./rendering/fills/Pattern\";\nimport { LinearGradient } from \"./rendering/fills/LinearGradient\";\nimport { RadialGradient } from \"./rendering/fills/RadialGradient\";\nimport { Color, color, toColor } from \"./utils/Color\";\nimport { getInteraction } from \"./interaction/Interaction\";\nimport { MouseCursorStyle } from \"./interaction/Mouse\";\nimport { options } from \"./Options\";\nimport { registry } from \"./Registry\";\nimport { NumberFormatter } from \"./formatters/NumberFormatter\";\nimport { DateFormatter } from \"./formatters/DateFormatter\";\nimport { DurationFormatter } from \"./formatters/DurationFormatter\";\nimport { getTextFormatter } from \"./formatters/TextFormatter\";\nimport { Language } from \"./utils/Language\";\nimport { Export } from \"./export/Export\";\nimport * as $utils from \"./utils/Utils\";\nimport * as $math from \"./utils/Math\";\nimport * as $strings from \"./utils/Strings\";\nimport * as $array from \"./utils/Array\";\nimport * as $object from \"./utils/Object\";\nimport * as $type from \"./utils/Type\";\nimport * as $iter from \"./utils/Iterator\";\nimport { system } from \"./System\";\nimport { Percent } from \"./utils/Percent\";\n/**\r\n * Defines list ofvisual properties\r\n */\nexport var visualProperties = [\"fill\", \"fillOpacity\", \"stroke\", \"strokeOpacity\", \"strokeWidth\", \"strokeDasharray\", \"strokeDashoffset\"]; // do not add opacity here, as it is used for showing/hiding\n;\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Sprite represents any displayable element.\r\n *\r\n * This is the main class that encapsulates every object on the chart.\r\n *\r\n * If it's an element that is to be displayed on the screen at some point, its\r\n * class must extend [[Sprite]] class.\r\n *\r\n * [[Sprite]] class represents the a hierarchical structure. Every object that\r\n * extends [[Sprite]] can have children, that would inherit their properties,\r\n * such as language, formatters, etc.\r\n *\r\n * @see {@link SpriteState}\r\n * @see {@link ISpriteEvents} for a list of available events\r\n * @see {@link ISpriteAdapters} for a list of available Adapters\r\n *\r\n * @todo Review child elements that need to go into `_disposers`\r\n * @important\r\n */\nvar Sprite = /** @class */function (_super) {\n tslib_1.__extends(Sprite, _super);\n /**\r\n * Constructor:\r\n * * Creates initial node\r\n * * Sets default properties\r\n * * Creates required default states\r\n * * Inits accessibility\r\n */\n function Sprite() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * Holds values for Sprite's properties.\r\n */\n _this.properties = {};\n /**\r\n * Event dispatcher.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/event-listeners/} for more info about Events\r\n */\n _this.events = new SpriteEventDispatcher(_this);\n /**\r\n * Holds Adapter.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/adapters/} for more info about Adapters\r\n */\n _this.adapter = new Adapter(_this);\n /**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n _this._bindings = {};\n /**\r\n * Holds indicator if this Sprite is a \"template\" to be used for creating\r\n * other Sprites from and should not be treated as full-fledged element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._isTemplate = false;\n /**\r\n * Holds indicator whether this sprite was already initialized.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._inited = false;\n /**\r\n * Holds indicator whether this sprite was already initialized and ready.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._ready = false;\n /**\r\n * If `sprite.hide()` is called and we have \"hidden\" state and\r\n * `transitionDuration > 0`, we set `isHiding` flag to `true` in order to\r\n * avoid restarting animations in case `hide()` method is called multiple\r\n * times.\r\n */\n _this.isHiding = false;\n /**\r\n * If `sprite.hide()` is called, we set isHidden to true when sprite is hidden.\r\n * This was added becaus hidden state might have visibility set to true and so\r\n * there would not be possible to find out if a sprite is technically hidden or not.\r\n */\n _this._isHidden = false;\n /**\r\n * This property indicates if Sprite is currently being revealed from hidden\r\n * state. This is used to prevent multiple calls to `sprite.show()` to\r\n * restart reveal animation. (if enabled)\r\n */\n _this.isShowing = false;\n /**\r\n * Indicates if this element is a standalone instance. A \"standalone\r\n * instance\" means this is a autonomous object which maintains its own\r\n * set of controls like Preloader, Export, etc.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this.isStandaloneInstance = false;\n /**\r\n * Indicates if togglable Sprite is currently active (toggled on).\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._isActive = false;\n /**\r\n * A Sprite element to use as a mask for this Sprite.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._mask = new MutableValueDisposer();\n /**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n _this._positionPrecision = 3;\n /**\r\n * An instance of [[Language]].\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._language = new MutableValueDisposer();\n /**\r\n * Holds [[Export]] object.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._exporting = new MutableValueDisposer();\n /**\r\n * Should this Sprite be included when exporting?\r\n */\n _this._exportable = true;\n /**\r\n * Defines bounding box (square) for this element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._bbox = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n /**\r\n * Indicates if this element is invalid and should be re-validated (redrawn).\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this.invalid = false;\n /**\r\n * Indicates if this elements position is invalid and should be repositioned\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this.positionInvalid = false;\n /**\r\n * A collection of key/value pairs that can be used to bind specific Sprite\r\n * properties to [[DataItem]].\r\n *\r\n * For example: `fill` property can be bound to `myCustomColor` field in\r\n * DataItem. The Sprite will automatically get the value for `fill` from its\r\n * DataItem.\r\n *\r\n * Can be set for each [[SpriteState]] individually to override default\r\n * bindings.\r\n *\r\n * @see {@link SpriteState}\r\n */\n _this.propertyFields = {};\n /**\r\n * Specifies if property changes on this object should be propagated to the\r\n * objects cloned from this object.\r\n *\r\n * This setting affects property changes *after* cloning, since at the moment\r\n * of cloning all of properties from source object are copied to the clone\r\n * anyway.\r\n *\r\n * @default false\r\n */\n _this.applyOnClones = false;\n // read only, sprite extreme coordinates\n /**\r\n * @ignore\r\n */\n _this.maxLeft = 0;\n /**\r\n * @ignore\r\n */\n _this.maxRight = 0;\n /**\r\n * @ignore\r\n */\n _this.maxTop = 0;\n /**\r\n * @ignore\r\n */\n _this.maxBottom = 0;\n _this._isDragged = false;\n _this._isResized = false;\n /**\r\n * @deprecated Moved to [[SpriteProperties]]\r\n */\n _this._disabled = false;\n _this._internalDisabled = false;\n _this._updateDisabled = false;\n _this._internalDefaultsApplied = false;\n /**\r\n * Time in milliseconds after which rollout event happens when user rolls-out of the sprite. This helps to avoid flickering in some cases.\r\n */\n _this.rollOutDelay = 0;\n /**\r\n * This flag is set to `true` for the initial sprite you create and place\r\n * to the div so that we could clear all additional\r\n * sprites/containers when this sprite is disposed.\r\n *\r\n * @ignore\r\n */\n _this.isBaseSprite = false;\n /**\r\n * Indicates whether this sprite should be cloned when cloning its parent\r\n * container. We set this to `false` in those cases when a sprite is created\r\n * by the class, so that when cloning a duplicate sprite would not appear.\r\n */\n _this.shouldClone = true;\n /**\r\n * A read-only flag which indicates if a sprite has completed its initial\r\n * animation (if `showOnInit = true`).\r\n *\r\n * In case `showOnInit = false`, `appeared` is set to `true` on init.\r\n *\r\n * @readonly\r\n */\n _this.appeared = false;\n /**\r\n * [ex description]\r\n *\r\n * @todo Description\r\n * @ignore\r\n */\n _this.ex = 0;\n /**\r\n * [ey description]\r\n *\r\n * @todo Description\r\n * @ignore\r\n */\n _this.ey = 0;\n /**\r\n * Indicates if the sprite can be moved around when resizing it with two fingers (will only work if draggable = false)\r\n * @ignore\r\n */\n _this.dragWhileResize = false;\n _this.className = \"Sprite\";\n // Generate a unique ID\n $utils.used(_this.uid);\n // Create SVG group to hold everything in\n _this.group = _this.paper.addGroup(\"g\");\n // Set defaults\n // it is better to set defauls like this in order to save invaliation calls and events\n _this.setPropertyValue(\"scale\", 1);\n _this.setPropertyValue(\"rotation\", 0);\n _this.setPropertyValue(\"align\", \"none\");\n _this.setPropertyValue(\"valign\", \"none\");\n _this.setPropertyValue(\"pixelPerfect\", false);\n _this.setPropertyValue(\"visible\", true);\n _this.setPropertyValue(\"tooltipPosition\", \"fixed\");\n _this.setPropertyValue(\"verticalCenter\", \"none\");\n _this.setPropertyValue(\"horizontalCenter\", \"none\");\n _this.setPropertyValue(\"marginTop\", 0);\n _this.setPropertyValue(\"marginBottom\", 0);\n _this.setPropertyValue(\"marginLeft\", 0);\n _this.setPropertyValue(\"marginRight\", 0);\n _this.setPropertyValue(\"dx\", 0);\n _this.setPropertyValue(\"dy\", 0);\n _this.setPropertyValue(\"paddingTop\", 0);\n _this.setPropertyValue(\"paddingBottom\", 0);\n _this.setPropertyValue(\"paddingRight\", 0);\n _this.setPropertyValue(\"paddingLeft\", 0);\n _this.setPropertyValue(\"togglable\", false);\n _this.setPropertyValue(\"hidden\", false);\n _this.setPropertyValue(\"urlTarget\", \"_self\");\n _this._prevMeasuredWidth = 0;\n _this._prevMeasuredHeight = 0;\n _this._measuredWidth = 0;\n _this._measuredHeight = 0;\n _this._isMeasured = true;\n // Invalidate the Sprite so that renderer knows it needs to be drawn\n _this.invalidate();\n //this.states.create(\"default\").properties.opacity = 1;\n // Apply the theme\n _this.applyTheme();\n //this._disposers.push(this._clickable);\n // Decorate adapter with events so that we can apply its settings whenever\n // it is modified\n // @todo Think what to do here. We can't just apply the adapter value to\n // property since not all of those are for properties. Commented out for\n // now.\n /*this.adapter.events.on(\"inserted\", (ev: any) => {\r\n (this)[ev.newValue.key] = (this)[ev.newValue.key];\r\n });\r\n this.adapter.events.on(\"removed\", (ev: any) => {\r\n (this)[ev.newValue.key] = (this)[ev.newValue.key];\r\n });*/\n // Add disposable dependencies to `_disposers` so they are automatically\n // disposed of when this object is disposed\n _this._disposers.push(_this.events);\n _this._disposers.push(_this.group);\n _this._disposers.push(_this._mask);\n _this._disposers.push(_this._language);\n _this._disposers.push(_this._exporting);\n //this._disposers.push(this._parent);\n //this._disposers.push(this._modal);\n _this._disposers.push(new Disposer(function () {\n $object.each(_this._bindings, function (key, value) {\n value.dispose();\n });\n }));\n _this.setPropertyValue(\"interactionsEnabled\", true);\n return _this;\n }\n /**\r\n * ==========================================================================\r\n * ELEMENT VALIDATION, INIT, AND DRAWING STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Applies properties from all assigned themes.\r\n *\r\n * We do this here so that we can apply class names as well.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.applyTheme = function () {\n _super.prototype.applyTheme.call(this);\n if (options.autoSetClassName) {\n this.setClassName();\n }\n };\n /**\r\n * Returns theme(s) used by this object either set explicitly on this\r\n * element, inherited from parent, or inherited from [[System]].\r\n *\r\n * @return An array of theme references\r\n */\n Sprite.prototype.getCurrentThemes = function () {\n var themes = this._themes;\n if (themes) {\n return themes;\n } else {\n var parent_1 = this.parent;\n if (parent_1) {\n return parent_1.getCurrentThemes();\n } else {\n return registry.themes;\n }\n }\n };\n /**\r\n * Called just before element's validation, this function allows setting\r\n * defaults.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.applyInternalDefaults = function () {\n // Nothing here, but extending classes might override this function\n // so that they can set their defaults\n this._internalDefaultsApplied = true;\n };\n /**\r\n * Invalidates element.\r\n *\r\n * Object will be redrawn during the next update cycle.\r\n *\r\n * Please note that in most cases elements will auto-invalidate when needed. If\r\n * everything works, DO NOT use this method. Use it only if some changes do\r\n * not take otherwise.\r\n */\n Sprite.prototype.invalidate = function () {\n if (this.disabled || this._isTemplate) {\n return;\n }\n // We no longer reset this on each invalidate, so that they are applied\n // only once, and do not overwrite user-defined settings\n //this._internalDefaultsApplied = false;\n if (!this.invalid) {\n this.invalid = true;\n registry.addToInvalidSprites(this);\n system.requestFrame();\n }\n };\n /**\r\n * Validates element:\r\n * * Triggers events\r\n * * Redraws the element\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.validate = function () {\n this.dispatchImmediately(\"beforevalidated\");\n // prevents from drawing if topparent is 0x0\n /*\r\n let topParent = this.topParent;\r\n if (topParent) {\r\n if (!topParent.maxWidth || !topParent.maxHeight) {\r\n this._disposers.push(topParent.events.once(\"maxsizechanged\", this.invalidate, this));\r\n }\r\n }*/\n // Set internal defaults\n if (!this._internalDefaultsApplied) {\n this.applyInternalDefaults();\n }\n this.beforeDraw();\n this.draw();\n this.invalid = false;\n registry.removeFromInvalidSprites(this);\n this.afterDraw();\n };\n /**\r\n * Invalidates element's position.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.invalidatePosition = function () {\n if (this.disabled || this._isTemplate) {\n return;\n }\n if (!this.positionInvalid) {\n this.positionInvalid = true;\n registry.addToInvalidPositions(this);\n system.requestFrame();\n }\n };\n /**\r\n * Transforms the element.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.validatePosition = function () {\n var pixelX = this.pixelX;\n var pixelY = this.pixelY;\n var dx = this.dx;\n var dy = this.dy;\n var x = pixelX + dx;\n var y = pixelY + dy;\n if (this._updateDisabled) {\n if (this._internalDisabled) {\n this.group.attr({\n \"display\": \"none\"\n });\n } else {\n if (!this.disabled) {\n this.removeSVGAttribute(\"display\");\n }\n }\n this._updateDisabled = false;\n }\n var sizeChanged = this.measure();\n //if (!this.invalid) {\n var prevGroupTransform = this.group.transformString;\n this.group.moveTo({\n x: x,\n y: y\n });\n this.group.rotation = this.rotation;\n if (this.nonScaling) {\n this.group.scale = this.scale / this.globalScale;\n } else {\n this.group.scale = this.scale;\n }\n if (prevGroupTransform != this.group.transformString || sizeChanged) {\n // not yet sure, this is to avoid many transforms=>container layout invalidation on initial buid\n if (prevGroupTransform == null) {\n this.dispatch(\"transformed\");\n } else {\n this.dispatchImmediately(\"transformed\");\n }\n // TODO clear existing positionchanged dispatches ?\n this.dispatch(\"positionchanged\");\n }\n //}\n // it might happen that x and y changed again, so we only remove if they didn't\n if (pixelX + dx == x && pixelY + dy == y) {\n registry.removeFromInvalidPositions(this);\n this.positionInvalid = false;\n }\n var maskRectangle = this._maskRectangle;\n // todo: verify this\n if (maskRectangle) {\n this._clipElement.moveTo({\n x: maskRectangle.x - pixelX,\n y: maskRectangle.y - pixelY\n });\n }\n };\n /**\r\n * A placeholder method that is called **before** element begins to be drawn.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.beforeDraw = function () {};\n /**\r\n * A placeholder method that draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.draw = function () {};\n /**\r\n * A placeholder method that is called **after** element finishes drawing\r\n * itself.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.afterDraw = function () {\n if (this.isMeasured || this.horizontalCenter !== \"none\" || this.verticalCenter !== \"none\") {\n this.measureElement();\n }\n //this.applyMask();\n if (!this._inited) {\n try {\n // used to be applySVGAttrbutes here, this is more efficient\n for (var _a = tslib_1.__values(this.adapter.keys()), _b = _a.next(); !_b.done; _b = _a.next()) {\n var key = _b.value;\n switch (key) {\n case \"mask\":\n case \"fill\":\n case \"opacity\":\n case \"fillOpacity\":\n case \"stroke\":\n case \"strokeOpacity\":\n case \"strokeWidth\":\n case \"shapeRendering\":\n case \"strokeDasharray\":\n case \"strokeDashoffset\":\n case \"strokeLinecap\":\n case \"strokeLinejoin\":\n case \"textDecoration\":\n case \"fontSize\":\n case \"fontFamily\":\n case \"fontWeight\":\n //case \"focusable\":\n //case \"tabindex\":\n //case \"role\":\n this[key] = this[key];\n break;\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_b && !_b.done && (_c = _a[\"return\"])) _c.call(_a);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n this.applyFilters();\n this.visible = this.visible;\n this.interactionsEnabled = this.getPropertyValue(\"interactionsEnabled\"); // can't use .interactionsEnabled as it get's parent's\n this._inited = true;\n if (!this.showOnInit) {\n this.appeared = true;\n }\n if (this.hidden) {\n this.hide(0);\n }\n this.applyMask();\n this.dispatch(\"validated\");\n this.dispatch(\"inited\");\n this.dispatchReady();\n } else {\n this.dispatch(\"validated\");\n }\n var e_1, _c;\n };\n /**\r\n * Dispatches `\"ready\"` event. Sprite dispatches it right after `\"inited\"` event.\r\n *\r\n * @ignore\r\n */\n Sprite.prototype.dispatchReady = function () {\n if (!this.isReady()) {\n this._ready = true;\n this.dispatch(\"ready\");\n }\n };\n /**\r\n * Triggers a re-initialization of this element.\r\n *\r\n * Will result in complete redrawing of the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.reinit = function () {\n this._inited = false;\n this.setState(this.defaultState);\n this.invalidate();\n };\n /**\r\n * Handles the situation where parent element is resized.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.handleGlobalScale = function () {\n this.dispatch(\"globalscalechanged\");\n if (this.nonScalingStroke) {\n this.strokeWidth = this.strokeWidth;\n }\n if (this.nonScaling) {\n this.validatePosition();\n }\n this.updateFilterScale();\n };\n /**\r\n * Updates filter properties which might depend on scale\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.updateFilterScale = function () {\n var _this = this;\n $iter.each(this.filters.iterator(), function (filter) {\n filter.scale = _this.globalScale;\n });\n };\n /**\r\n * Removes itself from system's invalid lists.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.removeFromInvalids = function () {\n registry.removeFromInvalidSprites(this);\n registry.removeFromInvalidPositions(this);\n };\n /**\r\n * Copies all parameters from another [[Sprite]].\r\n *\r\n * @param source Source Sprite\r\n */\n Sprite.prototype.copyFrom = function (source) {\n var _this = this;\n _super.prototype.copyFrom.call(this, source);\n this.events.copyFrom(source.events);\n this.isMeasured = source.isMeasured;\n this.states.copyFrom(source.states);\n if (source.filters.length > 0) {\n source.filters.each(function (filter) {\n _this.filters.push(filter.clone());\n });\n }\n this.adapter.copyFrom(source.adapter);\n //helps to avoid calling getter which creates instance\n if (source[\"_interaction\"]) {\n this.interactions.copyFrom(source.interactions);\n }\n if (source[\"_plugins\"]) {\n this.plugins.copyFrom(source.plugins);\n }\n this.configField = source.configField;\n this.applyOnClones = source.applyOnClones;\n // this.numberFormatter = source.numberFormatter; // todo: this creates loose number formatter and copies it to all clones. somehow we need to know if source had numberFormatter explicitly created and not just because a getter was called.\n //this.mask = source.mask; need to think about this, generally this causes a lot of problems\n this.disabled = source.disabled;\n this.virtualParent = source.virtualParent;\n this.exportable = source.exportable;\n //@todo: create tooltip if it's on source but not on this?\n //const tooltip = this._tooltip;\n //if (tooltip) {\n //\ttooltip.copyFrom(source.tooltip);\n //}\n if (source._tooltip) {\n if (this._tooltip) {\n this._tooltip.copyFrom(source.tooltip);\n } else {\n this.tooltip = source.tooltip.clone();\n }\n }\n //if ((source)[\"_tooltip\"] && !this._tooltip) {\n //\tthis._tooltip = (source)[\"_tooltip\"];\n //}\n this._showSystemTooltip = source.showSystemTooltip;\n $utils.copyProperties(source.propertyFields, this.propertyFields);\n $utils.copyProperties(source.properties, this);\n if (source.fillModifier) {\n this.fillModifier = source.fillModifier.clone();\n }\n if (source.strokeModifier) {\n this.strokeModifier = source.strokeModifier.clone();\n }\n };\n /**\r\n * Destroys this object and all related data.\r\n */\n Sprite.prototype.dispose = function () {\n if (!this.isDisposed()) {\n this.dispatchImmediately(\"beforedisposed\");\n if (this.isBaseSprite) {\n if (this.htmlContainer) {\n while (this.htmlContainer.childNodes.length > 0) {\n this.htmlContainer.removeChild(this.htmlContainer.firstChild);\n }\n }\n this.isBaseSprite = false;\n }\n _super.prototype.dispose.call(this);\n // Clear adapters\n this.adapter.clear();\n if (this.applyOnClones) {\n if (this._clones) {\n for (var i = this._clones.length - 1; i >= 0; i--) {\n var clone = this._clones.getIndex(i);\n clone.dispose();\n }\n }\n }\n if (this._svgContainer) {\n this._svgContainer.dispose();\n }\n if (this._interactionDisposer) {\n this._interactionDisposer.dispose();\n this._interactionDisposer = undefined;\n }\n if (this._urlDisposer) {\n this._urlDisposer.dispose();\n }\n this.removeFromInvalids();\n if (this.element) {\n this.element.dispose();\n }\n if (this.group) {\n this.group.dispose();\n }\n if (this._numberFormatter) {\n this._numberFormatter.dispose();\n }\n if (this._focusFilter) {\n this._focusFilter.dispose();\n }\n var stroke = this.stroke;\n if (stroke && !(stroke instanceof Color) && stroke.dispose) {\n if (this.clonedFrom && this.clonedFrom.stroke == stroke) {\n // do nothing\n } else {\n stroke.dispose();\n }\n }\n // TODO a bit hacky\n var fill = this.fill;\n if (fill && !(fill instanceof Color) && fill.dispose) {\n if (this.clonedFrom && this.clonedFrom.fill == fill) {\n // do nothing\n } else {\n fill.dispose();\n }\n }\n // remove from map\n if ($type.hasValue(this.id)) {\n this.map.removeKey(this.id);\n }\n this.parent = undefined;\n if (this._filters) {\n while (this._filters.length > 0) {\n var filter = this._filters.getIndex(0);\n filter.dispose();\n this._filters.removeValue(filter);\n }\n }\n }\n };\n Object.defineProperty(Sprite.prototype, \"isTemplate\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Is template?\r\n */\n get: function get() {\n return this._isTemplate;\n },\n /**\r\n * Indicates if this element is a \"template\".\r\n *\r\n * Template Sprites act only as a holders for config for other \"real\"\r\n * elements to be cloned from.\r\n *\r\n * Templates are treated differently, as they are not validated, redrawn, or\r\n * otherwise are processed.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Is template?\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n if (this._isTemplate != value) {\n this._isTemplate = value;\n if (this instanceof Container) {\n $iter.each(this.children.iterator(), function (child) {\n child.isTemplate = value;\n });\n }\n if (value) {\n this.parent = this.parent;\n this.removeFromInvalids();\n } else {\n this.invalidate();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"showSystemTooltip\", {\n /**\r\n * @return Show system tooltip?\r\n */\n get: function get() {\n if (!$type.hasValue(this._showSystemTooltip)) {\n if (this.virtualParent) {\n return this.virtualParent.showSystemTooltip;\n } else if (this.parent) {\n return this.parent.showSystemTooltip;\n } else {\n return false;\n }\n }\n return this._showSystemTooltip;\n },\n /**\r\n * Indicates whether the element should attempt to construct itself in a way\r\n * so that system tooltip is shown if its `readerTitle` is set.\r\n *\r\n * @param value Show system tooltip?\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n if (this._showSystemTooltip != value) {\n this._showSystemTooltip = value;\n this.applyAccessibility();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"topParent\", {\n /**\r\n * ==========================================================================\r\n * HIERARCHY AND STRUCTURE RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Sprites's top-level [[Container]].\r\n *\r\n * Please note that in most cases it won't be the chart element.\r\n *\r\n * To access base chart element, use `baseSprite` instead.\r\n *\r\n * @return Top-level ascendant\r\n */\n get: function get() {\n if (this._topParent) {\n return this._topParent;\n } else {\n if (this.parent) {\n return this.parent.topParent;\n }\n }\n },\n /**\r\n * @ignore\r\n * @param value {Container} top parent of a sprite\r\n */\n set: function set(value) {\n this._topParent = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"parent\", {\n /**\r\n * @return Parent container\r\n */\n get: function get() {\n return this._parent;\n },\n /**\r\n * Elements' parent [[Container]].\r\n *\r\n * @param parent Parent container\r\n */\n set: function set(parent) {\n if (this._isTemplate) {\n return;\n }\n // TODO is this needed ?\n $utils.used(this.paper);\n var oldParent = this._parent;\n if (oldParent != parent) {\n if (oldParent) {\n oldParent.children.removeValue(this);\n }\n this._parent = parent;\n if (parent) {\n this.topParent = parent.topParent;\n if (parent.isTemplate) {\n this.isTemplate = true;\n }\n this.baseId = parent.baseId;\n parent.children.push(this);\n // insert handler at Container invalidates + invalidatesLayout + adds to group\n if (this._tooltip && !this._tooltipContainer) {\n this._tooltip.parent = parent.tooltipContainer;\n }\n if (!this._dataItem) {\n this.dataItem = parent.dataItem;\n }\n } else {\n this.topParent = undefined;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"virtualParent\", {\n /**\r\n * @return Virtual parent\r\n */\n get: function get() {\n return this._virtualParent;\n },\n /**\r\n * Element's \"virtual\" parent.\r\n *\r\n * This is required in ordere to maintain proper inheritance (like\r\n * formatters).\r\n *\r\n * Sometimes an element is a \"logical\" parent, even though it's not a direct\r\n * ascendant.\r\n *\r\n * Example: a bullet is not a child of the axis, but it would make sense\r\n * for it to inherit series' formatters.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Virtual parent\r\n */\n set: function set(value) {\n this._virtualParent = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Moves `` to correct place in DOM.\r\n *\r\n * Some elements are initially created in \"ghost\" container. When moving\r\n * those into proper place in DOM, their respective `` need to be moved\r\n * as well.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.appendDefs = function () {\n if (this.filterElement) {\n this.paper.appendDef(this.filterElement);\n }\n var fill = this.fill;\n if (fill && fill.element) {\n this.paper.appendDef(fill.element);\n }\n var stroke = this.stroke;\n if (stroke && stroke.element) {\n this.paper.appendDef(stroke.element);\n }\n if (this.fillModifier && this.fill instanceof Color) {\n var fill_1 = this.fillModifier.modify(this.fill);\n if (fill_1 && fill_1.element) {\n this.paper.appendDef(fill_1.element);\n }\n }\n if (this.strokeModifier && this.stroke instanceof Color) {\n var stroke_1 = this.strokeModifier.modify(this.stroke);\n if (stroke_1 && stroke_1.element) {\n this.paper.appendDef(stroke_1.element);\n }\n }\n if (this._clipPath) {\n this.paper.appendDef(this._clipPath);\n }\n if (this._exportable === false) {\n this.exportable = false;\n }\n };\n Object.defineProperty(Sprite.prototype, \"map\", {\n /**\r\n * Returns a [[Dictionary]] which maps object ids with their respective\r\n * objects.\r\n *\r\n * Can be used to retrieve any object by id, e.g.:\r\n *\r\n * ```TypeScript\r\n * console.log(mySprite.map.getKey(\"myid\"));\r\n * ```\r\n * ```JavaScript\r\n * console.log(mySprite.map.getKey(\"myid\"));\r\n * ```\r\n *\r\n * @return Map collection\r\n */\n get: function get() {\n var top = this.topParent;\n if (top) {\n return top.map;\n } else if (!this._map) {\n this._map = new Dictionary();\n }\n return this._map;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"id\", {\n /**\r\n * @return ID\r\n */\n get: function get() {\n return this._id;\n },\n /**\r\n * Element's user-defined ID.\r\n *\r\n * Will throw an Error if there already is an object with the same ID.\r\n *\r\n * Please note that above check will be performed withing the scope of the\r\n * current chart instance. It will not do checks across other chart instances\r\n * or in globally in DOM.\r\n *\r\n * Make sure the IDs are unique.\r\n *\r\n * @param value ID\r\n */\n set: function set(value) {\n if (this._id != value) {\n this._id = value;\n if (this.map.hasKey(value)) {\n throw Error(\"Duplicate id (\" + value + \") used on multiple objects.\");\n } else {\n this.map.setKey(value, this);\n }\n if (options.autoSetClassName) {\n this.setClassName();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"dom\", {\n /**\r\n * ==========================================================================\r\n * ELEMENT AND DOM TREE MANIPULATION AND MEASURING\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Returns DOM element reference associated with this element.\r\n *\r\n * @readonly\r\n * @return DOM element\r\n */\n get: function get() {\n return this.group.node;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"paper\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Paper\r\n */\n get: function get() {\n if (this._paper) {\n return this._paper;\n } else {\n if (this.parent) {\n return this.parent.paper;\n }\n }\n return getGhostPaper();\n },\n /**\r\n * A [[Paper]] instance to place elements on.\r\n *\r\n * If there's no Paper set for this element, it goes up the ascendant tree\r\n * until it finds one.\r\n *\r\n * This method is used by important `addChild()` method, so it's essential\r\n * to have a [[Paper]] instance.\r\n *\r\n * If this element has a separate `htmlContainer` set, it will have a\r\n * [[Paper]] instance itself.\r\n *\r\n * @ignore Exclude from docs\r\n * @param paper Paper\r\n */\n set: function set(paper) {\n this.setPaper(paper);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets [[Paper]] instance to use to draw elements.\r\n * @ignore\r\n * @param paper Paper\r\n * @return true if paper was changed, false, if it's the same\r\n */\n Sprite.prototype.setPaper = function (paper) {\n var oldPaper = this._paper;\n if (oldPaper != paper) {\n this._paper = paper;\n this.appendDefs();\n return true;\n }\n return false;\n };\n Object.defineProperty(Sprite.prototype, \"htmlContainer\", {\n /**\r\n * @return HTML element\r\n */\n get: function get() {\n if (this._htmlContainer) {\n return this._htmlContainer;\n } else {\n if (this.parent) {\n return this.parent.htmlContainer;\n }\n }\n },\n /**\r\n * An HTML element to be used when placing wrapper element (`
`)\r\n * for the whole chart.\r\n *\r\n * This is the same for **all** elements within the same chart.\r\n *\r\n * @param htmlContainer HTML element\r\n */\n set: function set(htmlContainer) {\n this._htmlContainer = htmlContainer;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"titleElement\", {\n /**\r\n * Creates (if not yet created) and returns element's `` element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Title element\r\n */\n get: function get() {\n if (!this._titleElement) {\n this._titleElement = this.paper.add(\"title\");\n this.group.add(this._titleElement);\n }\n return this._titleElement;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"descriptionElement\", {\n /**\r\n * Creates (if not yet created) and returns element's `<desc>` element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Desc element\r\n */\n get: function get() {\n if (!this._descriptionElement) {\n this._descriptionElement = this.paper.add(\"desc\");\n this.group.add(this._descriptionElement);\n }\n return this._descriptionElement;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"filters\", {\n /**\r\n * Returns list of SVG filters (effects) applied to element. If the filter\r\n * list is not yet initilized, creates and returns an empty one.\r\n * Note, not all filters combine well with one another. We recommend using one filter per sprite.\r\n *\r\n * @return List of filters\r\n */\n get: function get() {\n if (!this._filters) {\n this._filters = new List();\n // TODO only add certain events ?\n this._disposers.push(this._filters.events.onAll(this.applyFilters, this));\n this._disposers.push(new ListDisposer(this._filters));\n }\n return this._filters;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets required SVG attributes. Must be called every time an element is\r\n * redrawn so that attributes are (re)applied.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.setSVGAttributes = function () {\n this.fill = this.fill;\n this.opacity = this.opacity;\n this.fillOpacity = this.fillOpacity;\n this.stroke = this.stroke;\n this.strokeOpacity = this.strokeOpacity;\n this.shapeRendering = this.shapeRendering;\n this.strokeDasharray = this.strokeDasharray;\n this.strokeDashoffset = this.strokeDashoffset;\n this.strokeLinecap = this.strokeLinecap;\n this.strokeLinejoin = this.strokeLinejoin;\n this.focusable = this.focusable;\n this.tabindex = this.tabindex;\n this.role = this.role;\n };\n /**\r\n * Sets an attribute directly on an SVG element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param attribute Attribute object\r\n */\n Sprite.prototype.setSVGAttribute = function (attribute) {\n this.group.attr(attribute);\n };\n /**\r\n * Removes an attribute directly from SVG element.\r\n *\r\n * @param attribute Attribute key to remove\r\n */\n Sprite.prototype.removeSVGAttribute = function (attribute) {\n this.group.removeAttr(attribute);\n };\n /**\r\n * Sets `class` attribute of the elements SVG node.\r\n *\r\n * Uses `am4core.options.classNamePrefix`.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.setClassName = function () {\n var className = this.className;\n var classNamePrefix = options.classNamePrefix;\n if (this.element) {\n this.element.addClass(classNamePrefix + className);\n }\n this.group.addClass(classNamePrefix + className + \"-group\");\n if ($type.hasValue(this.id)) {\n this.group.addClass(classNamePrefix + this.id);\n }\n };\n /**\r\n * Adds an `id` attribute the the element and returns the id.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Element's ID\r\n */\n Sprite.prototype.uidAttr = function () {\n this.setSVGAttribute({\n \"id\": this.uid\n });\n return this.uid;\n };\n /**\r\n * [updateClipPath description]\r\n *\r\n * @todo Description\r\n */\n Sprite.prototype.updateClipPath = function () {\n var element = this._clipElement;\n if (element) {\n element.moveTo({\n x: this.mask.pixelX,\n y: this.mask.pixelY\n });\n }\n };\n /**\r\n * @ignore\r\n */\n Sprite.prototype.createClipPath = function () {\n if (!this._clipPath) {\n this._clipPath = this.paper.addGroup(\"clipPath\");\n this.paper.appendDef(this._clipPath);\n this._disposers.push(this._clipPath);\n var id = registry.getUniqueId();\n this._clipPath.attr({\n \"id\": id\n });\n this.group.attr({\n \"clip-path\": \"url(\\\"\" + $utils.getBaseURI() + id + \"\\\")\"\n });\n }\n };\n /**\r\n * Applies the mask Sprite.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.applyMask = function () {\n var mask = this.mask;\n if (this._clipPath && mask) {\n // Container\n if (mask instanceof Container) {\n this._clipElement.attr({\n \"width\": $math.max(0, mask.pixelWidth),\n \"height\": $math.max(0, mask.pixelHeight)\n });\n var point = $utils.spritePointToSprite({\n x: mask.pixelX,\n y: mask.pixelY\n }, mask.parent, this);\n this._clipPath.x = point.x;\n this._clipPath.y = point.y;\n }\n // Sprite\n else {\n if (mask.element && mask.element != this._clipElement) {\n this._clipElement = mask.element;\n this._clipPath.add(this._clipElement);\n }\n this._clipPath.scale = mask.scale;\n this._clipPath.x = mask.pixelX;\n this._clipPath.y = mask.pixelY;\n this._clipPath.rotation = mask.rotation;\n }\n }\n };\n /**\r\n * Applies filters to the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.applyFilters = function () {\n var _this = this;\n // we create a separate filter for each sprite as otherwise it would be impossible to animate filter.\n // svg doesn't support multiple filters applied to one element, so we put all the primitives to one filterElement of a sprite.\n if (this._filters && this._filters.length > 0) {\n var width_1 = 100;\n var height_1 = 100;\n if (!this.filterElement) {\n this.filterElement = this.paper.addGroup(\"filter\");\n this._disposers.push(this.filterElement);\n } else {\n this.filterElement.removeChildNodes();\n }\n this.paper.appendDef(this.filterElement);\n var id = \"filter-\" + this.uid;\n this.filterElement.attr({\n \"id\": id\n });\n $iter.each(this.filters.iterator(), function (filter) {\n filter.sprite = _this;\n filter.paper = _this.paper;\n filter.appendPrimitives(_this.filterElement);\n if (filter.width > width_1) {\n width_1 = filter.width;\n }\n if (filter.height > height_1) {\n height_1 = filter.height;\n }\n filter.scale = _this.globalScale;\n });\n var w = width_1 + \"%\";\n var h = height_1 + \"%\";\n /* temporarily removed as it is breaking tooltips on Safari @todo come back to this\r\n if (this._measuredHeight <= 1) {\r\n h = height + \"\";\r\n }\r\n if (this._measuredWidth <= 1) {\r\n h = width + \"\";\r\n }*/\n this.filterElement.attr({\n \"width\": w,\n \"height\": h,\n \"x\": -(width_1 - 100) / 2 + \"%\",\n \"y\": -(height_1 - 100) / 2 + \"%\"\n });\n this.group.attr({\n \"filter\": \"url(\\\"\" + $utils.getBaseURI() + id + \"\\\")\"\n });\n } else if (this.filterElement) {\n this.group.removeAttr(\"filter\");\n this.filterElement.removeChildNodes();\n }\n };\n /**\r\n * [removeClipPath description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n Sprite.prototype.removeClipPath = function () {\n if (this._clipPath) {\n //this._clipPath.dispose();\n this.removeDispose(this._clipPath);\n this._clipPath = undefined;\n }\n };\n /**\r\n * [setElement description]\r\n *\r\n * @ignore\r\n * @todo Description\r\n * @param element [description]\r\n */\n Sprite.prototype.setElement = function (element) {\n this.element = element;\n this.setSVGAttributes();\n this.applyAccessibility();\n };\n Object.defineProperty(Sprite.prototype, \"element\", {\n /**\r\n * @return Element\r\n */\n get: function get() {\n return this._element;\n },\n /**\r\n * The main element for this Sprite, usually an SVG `<g>`.\r\n *\r\n * All other sub-elements are created in it.\r\n *\r\n * @param element Element\r\n */\n set: function set(element) {\n // Destroy previous element if there was one before\n this.removeElement();\n // Set new element\n this._element = element;\n // Add element to group\n // Since we are adding Element to group, which is already in the\n // `.disposers` it will be removed automatically when Sprite is disposed\n // of\n this.group.add(element);\n // This is needed if someone is setting element not in draw method but\n // from outside\n if (!this.invalid) {\n this.validate();\n }\n if (options.autoSetClassName) {\n this.setClassName();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"svgContainer\", {\n /**\r\n * HTML container (`<div>`) which is used to place chart's `<svg>` element\r\n * in.\r\n *\r\n * @return Container for chart elements\r\n */\n get: function get() {\n if (this._svgContainer) {\n return this._svgContainer;\n } else if (this.parent) {\n return this.parent.svgContainer;\n }\n },\n /**\r\n * Sets HTML container to add SVG and other chart elements to.\r\n *\r\n * @param svgContainer Container for chart elements\r\n */\n set: function set(svgContainer) {\n this._svgContainer = svgContainer;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Measures main element.\r\n *\r\n * Saves measurements into private `_bbox` property.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.measureElement = function () {\n if (this.element) {\n if (this.definedBBox) {\n this._bbox = this.definedBBox;\n } else {\n var svgBBox = this.element.getBBox();\n this._bbox = {\n x: svgBBox.x,\n y: svgBBox.y,\n width: svgBBox.width,\n height: svgBBox.height\n };\n }\n }\n };\n /**\r\n * Positions element according its center settings.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.updateCenter = function () {\n if (this.element) {\n var prevElementTransform = this.element.transformString;\n var bbox = this.bbox;\n var ex = 0;\n var ey = 0;\n var elementX = bbox.x;\n var elementY = bbox.y;\n var elementWidth = bbox.width;\n var elementHeigth = bbox.height;\n var pixelPaddingLeft = this.pixelPaddingLeft;\n var pixelPaddingRight = this.pixelPaddingRight;\n var pixelPaddingTop = this.pixelPaddingTop;\n var pixelPaddingBottom = this.pixelPaddingBottom;\n // add padding to the measured size\n var measuredWidth = $math.max(elementWidth + pixelPaddingLeft + pixelPaddingRight, this.pixelWidth);\n var measuredHeight = $math.max(elementHeigth + pixelPaddingTop + pixelPaddingBottom, this.pixelHeight);\n // extremes\n var left = bbox.x;\n var right = bbox.x + measuredWidth;\n var top_1 = bbox.y;\n var bottom = bbox.y + measuredHeight;\n var horizontalCenter = this.horizontalCenter;\n var verticalCenter = this.verticalCenter;\n switch (horizontalCenter) {\n case \"none\":\n ex = elementX + pixelPaddingLeft;\n break;\n case \"left\":\n ex = pixelPaddingLeft;\n break;\n case \"middle\":\n ex = pixelPaddingLeft - (elementWidth + pixelPaddingRight + pixelPaddingLeft) / 2;\n break;\n case \"right\":\n ex = -pixelPaddingRight - elementWidth;\n break;\n }\n switch (verticalCenter) {\n case \"none\":\n ey = elementY + pixelPaddingTop;\n break;\n case \"top\":\n ey = pixelPaddingTop;\n break;\n case \"middle\":\n ey = pixelPaddingTop - (elementHeigth + pixelPaddingBottom + pixelPaddingTop) / 2;\n break;\n case \"bottom\":\n ey = -pixelPaddingBottom - elementHeigth;\n break;\n }\n this._measuredHeight = measuredHeight;\n this._measuredWidth = measuredWidth;\n var x = $math.round(ex - elementX, this._positionPrecision, true);\n var y = $math.round(ey - elementY, this._positionPrecision, true);\n this.ex = x - pixelPaddingLeft;\n this.ey = y - pixelPaddingTop;\n this.maxLeft = left + x - pixelPaddingLeft;\n this.maxRight = right + x - pixelPaddingLeft;\n this.maxTop = top_1 + y - pixelPaddingTop;\n this.maxBottom = bottom + y - pixelPaddingTop;\n if (this.pixelPerfect) {\n x -= 0.5;\n y -= 0.5;\n }\n this.element.moveTo({\n x: x,\n y: y\n });\n if (prevElementTransform != this.element.transformString) {\n this.dispatchImmediately(\"transformed\");\n }\n }\n };\n /**\r\n * Measures the whole element.\r\n *\r\n * Returns `true` if the size has changed from the last measurement.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Did the size changed from the last measurement?\r\n */\n Sprite.prototype.measure = function () {\n this.updateCenter();\n var measuredWidth = this._measuredWidth;\n var measuredHeight = this._measuredHeight;\n // extremes\n var left = this.maxLeft;\n var right = this.maxRight;\n var top = this.maxTop;\n var bottom = this.maxBottom;\n // non-parent wise size\n this._measuredWidthSelf = measuredWidth;\n this._measuredHeightSelf = measuredHeight;\n var positionPrecision = this._positionPrecision;\n // if a sprite is rotated or scaled, calculate measured size after transformations\n if (this.rotation !== 0 || this.scale !== 1) {\n // not good to handleGlobalScale here.\n if (this.nonScalingStroke) {\n this.strokeWidth = this.strokeWidth;\n }\n var svg = this.paper.svg;\n var matrix = svg.createSVGMatrix();\n var rotation = this.rotation;\n matrix.a = $math.cos(rotation) * this.scale;\n matrix.c = -$math.sin(rotation) * this.scale;\n matrix.e = 0;\n matrix.b = $math.sin(rotation) * this.scale;\n matrix.d = $math.cos(rotation) * this.scale;\n matrix.f = 0;\n var p1 = svg.createSVGPoint();\n p1.x = left;\n p1.y = top;\n var p2 = svg.createSVGPoint();\n p2.x = right;\n p2.y = top;\n var p3 = svg.createSVGPoint();\n p3.x = right;\n p3.y = bottom;\n var p4 = svg.createSVGPoint();\n p4.x = left;\n p4.y = bottom;\n var pt1 = p1.matrixTransform(matrix);\n var pt2 = p2.matrixTransform(matrix);\n var pt3 = p3.matrixTransform(matrix);\n var pt4 = p4.matrixTransform(matrix);\n left = Math.min(pt1.x, pt2.x, pt3.x, pt4.x);\n right = Math.max(pt1.x, pt2.x, pt3.x, pt4.x);\n top = Math.min(pt1.y, pt2.y, pt3.y, pt4.y);\n bottom = Math.max(pt1.y, pt2.y, pt3.y, pt4.y);\n measuredWidth = right - left;\n measuredHeight = bottom - top;\n this.maxLeft = $math.round(left, positionPrecision, true);\n this.maxRight = $math.round(right, positionPrecision, true);\n this.maxTop = $math.round(top, positionPrecision, true);\n this.maxBottom = $math.round(bottom, positionPrecision, true);\n }\n this._measuredWidth = $math.round(measuredWidth, positionPrecision, true);\n this._measuredHeight = $math.round(measuredHeight, positionPrecision, true);\n // dispatch event\n if (this._measuredWidth != this._prevMeasuredWidth || this._measuredHeight != this._prevMeasuredHeight) {\n this._prevMeasuredHeight = this._measuredHeight;\n this._prevMeasuredWidth = this._measuredWidth;\n // TODO clear existing sizechanged dispatches ?\n this.dispatch(\"sizechanged\");\n if (this.isHover && this.tooltip && this.tooltip.visible && ($type.hasValue(this.tooltipText) || $type.hasValue(this.tooltipHTML))) {\n this.updateTooltipPosition();\n }\n return true;\n }\n return false;\n };\n /**\r\n * Insert this element before sibling element.\r\n *\r\n * @param sprite Target element\r\n * @return This element\r\n */\n Sprite.prototype.insertBefore = function (sprite) {\n var parent = this.parent;\n if (parent) {\n var index = parent.children.indexOf(sprite);\n if (index !== -1) {\n parent.children.moveValue(this, index);\n parent.sortChildren();\n }\n }\n return this;\n };\n /**\r\n * Insert this element after sibling element.\r\n *\r\n * @param sprite Target element\r\n * @return This element\r\n */\n Sprite.prototype.insertAfter = function (sprite) {\n var parent = this.parent;\n if (parent) {\n var index = parent.children.indexOf(sprite);\n if (index !== -1) {\n parent.children.moveValue(this, index + 1);\n parent.sortChildren();\n }\n }\n return this;\n };\n /**\r\n * Removes the main SVG element.\r\n *\r\n * This does not destroy the whole Sprite element. To do that use\r\n * `dispose()` instead.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.removeElement = function () {\n // remove visual element\n if (this._element) {\n this.removeDispose(this._element);\n this._element = undefined;\n }\n };\n /**\r\n * Returns relative (percent) value of the X coordindate within this element.\r\n *\r\n * A relative value is a hundredth of a percent. So 100% would result in a 1\r\n * as relative value.\r\n *\r\n * @param value Absolute or relative X coordinate\r\n * @return Relative value\r\n */\n Sprite.prototype.getRelativeX = function (value) {\n if (value instanceof Percent) {\n return value.value;\n } else if (this.parent) {\n return value / this.parent.innerWidth;\n }\n return 0;\n };\n /**\r\n * Returns relative (percent) value of the Y coordindate within this element.\r\n *\r\n * A relative value is a hundredth of a percent. So 100% would result in a 1\r\n * as relative value.\r\n *\r\n * @param value Absolute or relative Y coordinate\r\n * @return Relative value\r\n */\n Sprite.prototype.getRelativeY = function (value) {\n if (value instanceof Percent) {\n return value.value;\n } else if (this.parent) {\n return value / this.parent.innerHeight;\n }\n return 0;\n };\n /**\r\n * Returns an X coordinate in pixel within the element.\r\n *\r\n * If number is passed in as parameter, the same number will be returned\r\n * back.\r\n *\r\n * If [[Percent]] is passed in, it will be recalculated to pixels.\r\n *\r\n * @param value Absolute or relative X coordinate\r\n * @return X coordinate in pixels\r\n */\n Sprite.prototype.getPixelX = function (value) {\n // we don't use $utils.valueToRelative as this would mean that we should access parent.innerWidth\n // all the time and this would result chain of the same actions and will slow down the system a lot\n var pixel = 0;\n if ($type.isNumber(value)) {\n pixel = value;\n } else if (value instanceof Percent) {\n var relative = value.value;\n if (this.parent) {\n pixel = $math.round(this.parent.innerWidth * relative, this._positionPrecision, true);\n }\n }\n return pixel;\n };\n /**\r\n * Returns an Y coordinate in pixel within the element.\r\n *\r\n * If number is passed in as parameter, the same number will be returned\r\n * back.\r\n *\r\n * If [[Percent]] is passed in, it will be recalculated to pixels.\r\n *\r\n * @param value Absolute or relative Y coordinate\r\n * @return Y coordinate in pixels\r\n */\n Sprite.prototype.getPixelY = function (value) {\n // we don't use $utils.valueToRelative as this would mean that we should access parent.innerWidth\n // all the time and this would result chain of the same actions and will slow down the system a lot\n var pixel = 0;\n if ($type.isNumber(value)) {\n pixel = value;\n } else if (value instanceof Percent) {\n var relative = value.value;\n if (this.parent) {\n pixel = $math.round(this.parent.innerHeight * relative, this._positionPrecision, true);\n }\n }\n return pixel;\n };\n /**\r\n * Moves the element to a specified coordinates.\r\n *\r\n * Using this method is preferred method of moving element, as it saves some\r\n * CPU processing power over setting `x` and `y` properties separately.\r\n *\r\n * The method respects element's center settings. The element will be\r\n * positioned so that `point` coordinates come in whatever \"center\" of the\r\n * element is, as set in `horizontalCenter` and `verticalCenter`.\r\n *\r\n * Besides moving the element, you can also at the same time scale and\r\n * rotate the element.\r\n *\r\n * @param point New coordinates\r\n * @param rotation New rotation\r\n * @param scale New Scale\r\n */\n Sprite.prototype.moveTo = function (point, rotation, scale, isDragged) {\n if (this.isDragged && !isDragged) {\n return;\n }\n if (point) {\n if ($type.isNumber(point.x)) {\n this.setPropertyValue(\"x\", point.x);\n }\n if ($type.isNumber(point.y)) {\n this.setPropertyValue(\"y\", point.y);\n }\n }\n if ($type.isNumber(rotation)) {\n this.rotation = rotation;\n }\n if ($type.isNumber(scale)) {\n this.scale = scale;\n }\n // must leave this\n this.invalidatePosition();\n };\n Object.defineProperty(Sprite.prototype, \"mask\", {\n /**\r\n * Returns [[Sprite]] element currently used as mask for this element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return A [[Sprite]] to use as mask\r\n */\n get: function get() {\n return this.adapter.apply(\"mask\", this._mask.get());\n },\n /**\r\n * Sets another [[Sprite]] element as this elements mask.\r\n *\r\n * @ignore Exclude from docs\r\n * @param mask A [[Sprite]] to use as mask\r\n */\n set: function set(mask) {\n var _this = this;\n if (this._mask.get() !== mask) {\n // this is good\n if (mask) {\n this.createClipPath();\n if (!(mask instanceof Container)) {\n mask.isMeasured = false;\n if (mask.element) {\n this._clipElement = mask.element;\n }\n } else {\n this._clipElement = this.paper.add(\"rect\");\n }\n if (this._clipElement) {\n this._clipPath.add(this._clipElement);\n }\n this._mask.set(mask, new MultiDisposer([\n //mask.addEventListener(SpriteEvent.TRANSFORMED, this.applyMask, false, this);\n mask.events.on(\"maxsizechanged\", function () {\n if (_this.inited) {\n _this.applyMask();\n }\n }, undefined, false), mask.events.on(\"validated\", this.applyMask, this, false), mask.events.on(\"positionchanged\", this.applyMask, this, false)]));\n this.applyMask();\n } else {\n this._mask.reset();\n this.group.removeAttr(\"clip-path\");\n this.removeClipPath();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"maskRectangle\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Mask Rectangle\r\n */\n get: function get() {\n return this._maskRectangle;\n },\n // you can set IRectangle as a mask instead o a sprite. Note, the changes of the object won't be monitored\n /**\r\n * Instead of creating a [[Sprite]] for mask, you can just use a\r\n * [[Rectangle]] by setting this accessor.\r\n *\r\n * Please note that the element will not monitor any changes to the mask\r\n * rectangle.\r\n *\r\n * @ignore Exclude from docs\r\n * @param rect Mask Rectangle\r\n */\n set: function set(rect) {\n if (rect) {\n this.createClipPath();\n if (!this._clipElement) {\n this._clipElement = this.paper.add(\"rect\");\n this._clipPath.add(this._clipElement);\n }\n this._clipElement.attr({\n \"width\": rect.width,\n \"height\": rect.height\n });\n } else {\n this.removeClipPath();\n this._clipElement = undefined;\n }\n this._maskRectangle = rect;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"isMeasured\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Was element already measured?\r\n */\n get: function get() {\n return this._isMeasured;\n },\n /**\r\n * Indicates if this element was already measured.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Was element already measured?\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n if (!value) {\n this._measuredWidth = 0;\n this._measuredHeight = 0;\n //this._pixelHeight = 0;\n //this._pixelWidth = 0;\n }\n if (this._isMeasured != value) {\n this._isMeasured = value;\n this.invalidatePosition();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Checks if the this element has any of its parts overlapping with another\r\n * element.\r\n *\r\n * @todo Description (review)\r\n * @param sprite Second element to test again\r\n * @return Overlapping?\r\n */\n Sprite.prototype.hitTest = function (sprite) {\n // validate, otherwise we will not know measuredWidth and measuredHeight\n if (this.invalid) {\n this.validate();\n }\n if (sprite.invalid) {\n sprite.validate();\n }\n var ax1 = this.pixelX;\n var ay1 = this.pixelY;\n var ax2 = ax1 + this.measuredWidth;\n var ay2 = ay1 + this.measuredHeight;\n var bx1 = sprite.pixelX;\n var by1 = sprite.pixelY;\n var bx2 = bx1 + sprite.measuredWidth;\n var by2 = by1 + sprite.measuredHeight;\n return !(bx1 > ax2 || bx2 < ax1 || by1 > ay2 || by2 < ay1);\n };\n Object.defineProperty(Sprite.prototype, \"inited\", {\n /**\r\n * ==========================================================================\r\n * STATE-RELATED\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Returns `true` if Sprite has already finished initializing.\r\n *\r\n * @return Initialized?\r\n */\n get: function get() {\n return this._inited;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns `true` if Sprite has already finished initializing and is ready.\r\n *\r\n * If this object is a [[Container]] it will wait for all of its children\r\n * are ready before becoming ready itself and firing a `\"ready\"` event.\r\n *\r\n * @return is ready?\r\n */\n Sprite.prototype.isReady = function () {\n return this._ready;\n };\n Object.defineProperty(Sprite.prototype, \"states\", {\n /**\r\n * Returns a collection of element's available [[SpriteState]] entries.\r\n *\r\n * @see {@link SpriteState}\r\n * @return States\r\n */\n get: function get() {\n if (!this._states) {\n var state = new SpriteState();\n // works\n this._states = new DictionaryTemplate(state);\n // TODO what about removeKey ?\n this._disposers.push(this._states.events.on(\"insertKey\", this.processState, this, false));\n this._disposers.push(this._states.events.on(\"setKey\", this.processState, this, false));\n this._disposers.push(new DictionaryDisposer(this._states));\n this._disposers.push(state);\n }\n return this._states;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"hiddenState\", {\n /**\r\n * Returns a [[SpriteState]] object for \"hidden\" state.\r\n *\r\n * This is a shortcut to `this.states.getKey(\"hidden\")`.\r\n *\r\n * @return Hidden state\r\n */\n get: function get() {\n if (!this.states.getKey(\"hidden\")) {\n var hiddenState = this.states.create(\"hidden\");\n hiddenState.properties.opacity = 0;\n hiddenState.properties.visible = false;\n }\n return this.states.getKey(\"hidden\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"defaultState\", {\n /**\r\n * Returns a [[SpriteState]] object for \"default\" state.\r\n *\r\n * This is a shortcut to `this.states.getKey(\"default\")`.\r\n *\r\n * @return Hidden state\r\n */\n get: function get() {\n if (!this.states.getKey(\"default\")) {\n var defaultState = this.states.create(\"default\");\n defaultState.properties.opacity = 1;\n }\n return this.states.getKey(\"default\");\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Checks if some key states are defined and updates Sprite properties\r\n * accordingly.\r\n *\r\n * For example if there's a state \"down\" defined for Sprite, we automatically\r\n * make it \"clickable\".\r\n *\r\n * @ignore Exclude from docs\r\n * @param event An event which caused state list update\r\n */\n Sprite.prototype.processState = function (event) {\n var state = event.newValue;\n state.sprite = this;\n state.name = event.key;\n if (this.states.hasKey(\"hover\") || $type.hasValue(this.tooltipHTML) || $type.hasValue(this.tooltipText)) {\n this.hoverable = true;\n }\n if (this.states.hasKey(\"down\")) {\n this.clickable = true;\n }\n if (this.states.hasKey(\"focus\")) {\n this.focusable = true;\n }\n // Propagate the new state to clones\n if (this.applyOnClones) {\n var clones = this.clones.values;\n var length_1 = clones.length;\n for (var i = 0; i < length_1; ++i) {\n var clone = clones[i];\n if (!clone.isDisposed()) {\n clone.states.setKey(state.name, state);\n }\n }\n }\n };\n Object.defineProperty(Sprite.prototype, \"animations\", {\n /**\r\n * Returns a list elements's animations currently being played.\r\n *\r\n * If the list has not been initialized it is created.\r\n *\r\n * @return List of animations\r\n */\n get: function get() {\n if (!this._animations) {\n this._animations = [];\n this._disposers.push(new AnimationDisposer(this._animations));\n }\n return this._animations;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Converts element's local coordinates to the coordinates within the main\r\n * chart container.\r\n *\r\n * @param point Local point\r\n * @return Global point\r\n */\n Sprite.prototype.getSvgPoint = function (point) {\n try {\n // Calculate SVG point\n var bbox = this.htmlContainer.getBoundingClientRect();\n return {\n \"x\": point.x - bbox.left,\n \"y\": point.y - bbox.top\n };\n } catch (e) {\n return point;\n }\n };\n /**\r\n * Creates and starts an [[Animation]] with given `animationOptions`.\r\n *\r\n * @see {@link Animation} for additional information about available options\r\n * @param animationOptions Animation options\r\n * @param duration Duration in milliseconds\r\n * @param easing Easing function\r\n * @return Animation instance\r\n */\n Sprite.prototype.animate = function (animationOptions, duration, easing) {\n return new Animation(this, animationOptions, duration, easing).start();\n };\n /**\r\n * Applies a [[SpriteState]] on this element.\r\n *\r\n * The first parameter can either be a name state or a [[SpriteState]]\r\n * instance.\r\n *\r\n * When run, this method will apply SVG properties defined in a\r\n * [[SpriteState]], but only those that are relevant to this particular\r\n * element, i.e. are in the `properties` array.\r\n *\r\n * @see {@link SpriteState}\r\n * @param value A state - name key or instance\r\n * @param transitionDuration Duration of the transition between current and new state\r\n * @param easing An easing function\r\n */\n Sprite.prototype.setState = function (value, transitionDuration, easing) {\n var state;\n if (value instanceof SpriteState) {\n this.states.setKey(value.name, value);\n state = value;\n } else {\n state = this.states.getKey(value);\n if (!state) {\n return;\n }\n }\n // stop previous transition\n // not good - foe expample, we are animating to some \"active\" state and in them middle \"hover\" state happens. then \"active\" stat won't be applied\n //if (this._transition) {\n //this._transition.stop();\n //}\n if (state.name == \"hover\") {\n if (this.isHidden) {\n return;\n }\n this.isHover = true;\n }\n if (state.name == \"hidden\") {\n this.isHiding = true;\n } else {\n if (!this.visible) {\n this.setVisibility(state.properties.visible || this.defaultState.properties.visible);\n }\n }\n if (state.name == \"active\") {\n this.isActive = true;\n }\n // we do not set isActive = false here if it's not active, but container does that if setStateOnChildren = true\n if (!$type.isNumber(transitionDuration)) {\n transitionDuration = state.transitionDuration;\n }\n if (!$type.hasValue(easing)) {\n easing = state.transitionEasing;\n }\n return this.transitTo(state, transitionDuration, easing);\n };\n /**\r\n * Applies proper state based on the condition of the element. A condition is\r\n * deducted in this order:\r\n * * \"hover\" if Sprite has currently any pointers over it\r\n * * \"down\" if Sprite has any pointers (touch or mouse) currently pressed over it\r\n * * \"focus\" if Sprite has currently got focus (accessibility)\r\n * * \"hidden\" if Sprite is currently hidden\r\n *\r\n * Returns an [[Animation]] object, which is handling gradual transition from\r\n * current values of properties, to the new target state(s).\r\n *\r\n * @param duration Duration for the animation (ms)\r\n * @return [[Animation]] object which is handling the transition\r\n */\n Sprite.prototype.applyCurrentState = function (duration) {\n //if (!this.isHidden) { // this was done for hover state not to take effect if \"hidden\" is actually visible, need to think about it.\n var animation = this.setState(this.defaultState, duration);\n if (this.isHover) {\n animation = this.setState(\"hover\", duration);\n }\n if (this.isDown && this.interactions.downPointers.length) {\n animation = this.setState(\"down\", duration);\n }\n this.isFocused = this.isFocused;\n if (this.isActive) {\n animation = this.setState(\"active\", duration);\n if (this.isHover && this.states.hasKey(\"hoverActive\")) {\n animation = this.setState(\"hoverActive\", duration);\n }\n }\n return animation;\n //}\n };\n /**\r\n * Starts an [[Animation]] of the properties to specific values as they are\r\n * set in `state`.\r\n *\r\n * @ignore Exclude from docs\r\n * @param state Target State\r\n * @param duration Duration in milliseconds\r\n * @param easing Easing function\r\n * @return Transition Animation\r\n */\n Sprite.prototype.transitTo = function (state, duration, easing) {\n var _this = this;\n // Init\n var options = [],\n propValues = state.allValues,\n transition;\n // todo: do this for numeric/color properties only?\n // @todo use state.getPropertyValue instead\n $object.each(propValues, function (propertyName, finalValue) {\n var currentValue = _this[propertyName];\n // save current value to default state. this solves a big problem where values must be set both on sprite and default state\n if (finalValue != currentValue && _this.defaultState.properties[propertyName] == undefined) {\n _this.defaultState.properties[propertyName] = currentValue;\n }\n //if (finalValue != currentValue && $type.hasValue(finalValue)) {\n if ($type.hasValue(finalValue)) {\n var option = {\n from: currentValue,\n to: finalValue,\n property: propertyName\n };\n options.push(option);\n }\n });\n if (options.length > 0) {\n transition = this.animate(options, duration, easing);\n if (transition && !transition.isFinished()) {\n // TODO should this use events.once ?\n // TODO push onto _disposers array ?\n this._disposers.push(transition.events.on(\"animationended\", function () {\n _this.dispatchImmediately(\"transitionended\");\n }));\n } else {\n this.dispatchImmediately(\"transitionended\");\n }\n }\n // apply filters if set\n if (state.filters.length > 0) {\n var newFilters_1 = [];\n // check for the same filters\n $iter.each(state.filters.iterator(), function (stateFilter) {\n var newFilter = stateFilter.clone();\n newFilters_1.push(newFilter);\n var animationOptions = [];\n $iter.each(_this.filters.iterator(), function (currentFilter) {\n // if we have the same filters\n if (currentFilter.className == newFilter.className) {\n if (!$iter.contains(_this.defaultState.filters.iterator(), function (x) {\n return x.className === newFilter.className;\n })) {\n _this.defaultState.filters.push(currentFilter);\n }\n $object.each(newFilter.properties, function (propertyName, newValue) {\n var currentValue = currentFilter.properties[propertyName];\n // if values are not the same, push to animation options array\n if (currentValue != newValue) {\n animationOptions.push({\n property: propertyName,\n from: currentValue,\n to: newValue\n });\n }\n });\n }\n });\n // animate to new value\n newFilter.animate(animationOptions, duration, easing);\n });\n this.filters.clear();\n this.filters.pushAll(newFilters_1);\n }\n return transition;\n };\n /**\r\n * Returns `true` if Sprite is currently transiting from one state/value to\r\n * another.\r\n *\r\n * @return Is in transition?\r\n */\n Sprite.prototype.isInTransition = function () {\n return this.animations.length > 0;\n };\n Object.defineProperty(Sprite.prototype, \"isHover\", {\n /**\r\n * Returns indicator if this element has a mouse pointer currently hovering\r\n * over it, or if it has any touch pointers pressed on it.\r\n *\r\n * @return Is hovered?\r\n */\n get: function get() {\n if (this.isInteractive()) {\n return this.interactions.isHover;\n }\n return false;\n },\n /**\r\n * Indicates if this element has a mouse pointer currently hovering\r\n * over it, or if it has any touch pointers pressed on it.\r\n *\r\n * @param value Is hovered?\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n if (value !== this.isHover) {\n if (this.isInteractive()) {\n this.interactions.isHover = value;\n if (value) {\n this.handleOver();\n } else {\n this.handleOut();\n }\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"isDragged\", {\n /**\r\n * Returns indicator if this element is being dragged at the moment.\r\n *\r\n * @return Is dragged?\r\n */\n get: function get() {\n return this._isDragged;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"isResized\", {\n /**\r\n * Returns indicator if this element is being resized at the moment.\r\n *\r\n * @return Is resized?\r\n */\n get: function get() {\n return this._isResized;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"isDown\", {\n /**\r\n * @return Is down?\r\n */\n get: function get() {\n if (this.isInteractive()) {\n return this.interactions.isDown;\n }\n return false;\n },\n /**\r\n * Indicates if this element has any pointers (mouse or touch) pressing down\r\n * on it.\r\n *\r\n * @param value Is down?\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n if (this.isInteractive() && this.isDown != value) {\n this.interactions.isDown = value;\n if (value) {\n this.handleDown();\n } else {\n this.handleUp();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"isFocused\", {\n /**\r\n * @return Is focused?\r\n */\n get: function get() {\n if (this.isInteractive()) {\n return this.interactions.isFocused;\n }\n return false;\n },\n /**\r\n * Indicates if this element is focused (possibly by tab navigation).\r\n *\r\n * @param value Is focused?\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n if (this.focusable && this.isFocused != value) {\n if (this.isInteractive()) {\n this.interactions.isFocused = value;\n if (value === true) {\n this.handleFocus();\n } else {\n this.handleBlur();\n }\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"isActive\", {\n /**\r\n * @return Is active?\r\n */\n get: function get() {\n return this._isActive;\n },\n /**\r\n * Indicates if this element is currently active (toggled on) or not\r\n * (toggled off).\r\n *\r\n * @param value Is active?\r\n */\n set: function set(value) {\n this.setActive(value);\n },\n enumerable: true,\n configurable: true\n });\n Sprite.prototype.setActive = function (value) {\n value = $type.toBoolean(value);\n if (this._isActive !== value) {\n this._isActive = value;\n if (value && this.states.hasKey(\"active\")) {\n this.setState(\"active\");\n if (this.isHover && this.states.hasKey(\"hoverActive\")) {\n this.setState(\"hoverActive\");\n }\n } else {\n this.applyCurrentState();\n }\n this.dispatchImmediately(\"toggled\");\n }\n };\n Object.defineProperty(Sprite.prototype, \"disabled\", {\n /**\r\n * @return Disabled?\r\n */\n get: function get() {\n //if(this._internalDisabled){\n //\treturn true;\n //}\n var current = this.getPropertyValue(\"disabled\");\n if ($type.hasValue(current)) {\n return current;\n } else {\n if (this.virtualParent) {\n return this.virtualParent.disabled;\n }\n if (this.parent) {\n return this.parent.disabled;\n }\n }\n return false;\n },\n /**\r\n * Controls if element is disabled.\r\n *\r\n * A disabled element is hidden, and is removed from any processing, layout\r\n * calculations, and generally treated as if it does not exist.\r\n *\r\n * The element itself is not destroyed, though. Setting this back to `false`,\r\n * will \"resurrect\" the element.\r\n *\r\n * @param value Disabled?\r\n */\n set: function set(value) {\n this.setDisabled(value);\n },\n enumerable: true,\n configurable: true\n });\n Sprite.prototype.setDisabled = function (value) {\n value = $type.toBoolean(value);\n var current = this.getPropertyValue(\"disabled\");\n if (current != value) {\n this.setPropertyValue(\"disabled\", value, true);\n if (value) {\n this.parent = this.parent;\n this.removeFromInvalids();\n this.group.attr({\n \"display\": \"none\"\n });\n this.dispatch(\"disabled\");\n } else {\n if (this.parent) {\n var group = this.parent.element;\n if (!group.hasChild(this.group)) {\n group.add(this.group);\n }\n }\n if (this instanceof Container) {\n this.deepInvalidate();\n } else {\n this.invalidate();\n }\n if (!this.__disabled) {\n this.removeSVGAttribute(\"display\");\n }\n this.dispatch(\"enabled\");\n }\n this.dispatch(\"transformed\");\n system.requestFrame();\n return true;\n }\n return false;\n };\n Object.defineProperty(Sprite.prototype, \"__disabled\", {\n /**\r\n * @ignore\r\n * @return Disabled?\r\n */\n get: function get() {\n return this._internalDisabled;\n },\n /**\r\n * Internal disable method.\r\n *\r\n * Do not use it for disabling elements. Use `disabled` accessor instead.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Disabled?\r\n */\n set: function set(value) {\n if (this._internalDisabled != value) {\n this._internalDisabled = value;\n this._updateDisabled = true;\n this.invalidatePosition(); // better use this instead of invalidate()\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"numberFormatter\", {\n /**\r\n * @return A [[NumberFormatter]] instance to be used\r\n */\n get: function get() {\n if (this._numberFormatter) {\n return this._numberFormatter;\n } else if (this.virtualParent) {\n return this.virtualParent.numberFormatter;\n } else if (this.parent) {\n return this.parent.numberFormatter;\n }\n this._numberFormatter = new NumberFormatter();\n this._numberFormatter.language = this.language;\n return this.numberFormatter;\n },\n /**\r\n * ==========================================================================\r\n * FORMATTERS AND OTHER EXTERNAL HELPERS\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * A [[NumberFormatter]] instance.\r\n *\r\n * This is used to format numbers.\r\n *\r\n * ```TypeScript\r\n * chart.numberFormatter.numberFormat = \"#,###.#####\";\r\n * ```\r\n * ```JavaScript\r\n * chart.numberFormatter.numberFormat = \"#,###.#####\";\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"numberFormatter\": {\r\n * \"numberFormat\": \"#,###.#####\"\r\n * }\r\n * }\r\n * ```\r\n *\r\n * You can set a separate instance of formatter for each\r\n * individual element. However that would be unnecessary overhead as\r\n * all elements would automatically inherit formatter from their parents,\r\n * all the way up to the chart itself.\r\n *\r\n *\r\n * @see {@link NumberFormatter} for more info on formatting numbers\r\n * @param value An instance of NumberFormatter\r\n */\n set: function set(value) {\n this._numberFormatter = value;\n this._numberFormatter.language = this.language;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"dateFormatter\", {\n /**\r\n * @return An instance of DateFormatter\r\n */\n get: function get() {\n if (this._dateFormatter) {\n return this._dateFormatter;\n } else if (this.virtualParent) {\n return this.virtualParent.dateFormatter;\n } else if (this.parent) {\n return this.parent.dateFormatter;\n }\n this._dateFormatter = new DateFormatter();\n this._dateFormatter.language = this.language;\n return this.dateFormatter;\n },\n /**\r\n * A [[DateFormatter]] instance.\r\n *\r\n * This is used to format dates, e.g. on a date axes, balloons, etc.\r\n *\r\n * ```TypeScript\r\n * chart.dateFormatter.dateFormat = \"yyyy-MM-dd\";\r\n * ```\r\n * ```JavaScript\r\n * chart.dateFormatter.dateFormat = \"yyyy-MM-dd\";\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"dateFormatter\": {\r\n * \"dateFormat\": \"yyyy-MM-dd\"\r\n * }\r\n * }\r\n * ```\r\n *\r\n * You can set a separate instance of formatter for each\r\n * individual element. However that would be unnecessary overhead as\r\n * all elements would automatically inherit formatter from their parents,\r\n * all the way up to the chart itself.\r\n *\r\n * @see {@link DateFormatter} for more info on dates formatting\r\n * @param value An instance of DateFormatter\r\n */\n set: function set(value) {\n this._dateFormatter = value;\n this._dateFormatter.language = this.language;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"durationFormatter\", {\n /**\r\n * @return An instance of DurationFormatter\r\n */\n get: function get() {\n if (this._durationFormatter) {\n return this._durationFormatter;\n } else if (this.virtualParent) {\n return this.virtualParent.durationFormatter;\n } else if (this.parent) {\n return this.parent.durationFormatter;\n }\n this._durationFormatter = new DurationFormatter();\n this._durationFormatter.language = this.language;\n return this.durationFormatter;\n },\n /**\r\n * A [[DurationFormatter]] instance.\r\n *\r\n * This is used to format numbers as durations, e.g. on a value axes.\r\n *\r\n * You can set a separate instance of formatter for each\r\n * individual element. However that would be unnecessary overhead as\r\n * all elements would automatically inherit formatter from their parents,\r\n * all the way up to the chart itself.\r\n *\r\n * @see {@link DurationFormatter} for more info on durations\r\n * @param value An instance of DurationFormatter\r\n */\n set: function set(value) {\n this._durationFormatter = value;\n this._durationFormatter.language = this.language;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"language\", {\n /**\r\n * @return An instance of Language\r\n */\n get: function get() {\n var language = this._language.get();\n if (language) {\n return language;\n } else if (this.virtualParent) {\n return this.virtualParent.language;\n } else if (this.parent) {\n return this.parent.language;\n }\n language = new Language();\n this.language = language;\n return language;\n },\n /**\r\n * A [[Language]] instance to use for translations.\r\n *\r\n * Normally it is enough to set language for the top-most element - chart.\r\n *\r\n * All other element child elements will automatically re-use that language\r\n * object.\r\n *\r\n * @param value An instance of Language\r\n */\n set: function set(value) {\n var _this = this;\n if (this._language.get() !== value) {\n this._language.set(value, value.events.on(\"localechanged\", function (ev) {\n if (_this.numberFormatter) {\n _this.numberFormatter.language = _this.language;\n }\n if (_this.dateFormatter) {\n _this.dateFormatter.language = _this.language;\n }\n if (_this.durationFormatter) {\n _this.durationFormatter.language = _this.language;\n }\n if (_this instanceof Container) {\n _this.deepInvalidate();\n }\n }));\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * ==========================================================================\r\n * DATA-RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Parses the string for meta tags `{tag}` and replaces them with a real\r\n * value. Supports straight up tags referring to the field in data, i.e.\r\n * `{value}` or tags with additional formatting info. E.g.:\r\n *\r\n * ```Text\r\n * {myfield.formatDate(\"yyyy-MM-dd\")}\r\n * {myfield.formatDate()}\r\n * {myfield.formatNumber(\"#,####.00\")}\r\n * {myfield.formatNumber()}\r\n * {myField.formatDuration(\"mm:ss\")}\r\n * ```\r\n *\r\n * Etc.\r\n *\r\n * This method Will automatically detect and use proper formatter for the\r\n * value.\r\n *\r\n * The source value will be looked up in various places: (in order)\r\n * * Sprite's own `dataItem`\r\n * * Sprite's properties\r\n * * Parent's `dataItem`\r\n * * Parent's properties\r\n *\r\n * @ignore Exclude from docs\r\n * @param string A string to format\r\n * @param dataItem DataItem\r\n * @return Formatted string\r\n */\n Sprite.prototype.populateString = function (string, dataItem) {\n if ($type.hasValue(string)) {\n string = $type.castString(string);\n string = getTextFormatter().escape(string);\n var tags = string.match(/\\{([^}]+)\\}/g);\n var i = void 0;\n if (tags) {\n for (i = 0; i < tags.length; i++) {\n var tag = tags[i].replace(/\\{([^}]+)\\}/, \"$1\");\n var value = this.getTagValue(tag, \"\", dataItem);\n if (!$type.hasValue(value)) {\n value = \"\";\n }\n string = string.split(tags[i]).join(value);\n }\n }\n string = getTextFormatter().unescape(string);\n } else {\n string = \"\";\n }\n return this.adapter.apply(\"populateString\", string);\n };\n /**\r\n * Gets the value from data item and formats it according to specified format.\r\n *\r\n * If `format` is specified, it will use its contents to choose formatter for\r\n * the value. Otherwise it will select formatter accordingly to actual value\r\n * type.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Ability to force certain formatter on known numeric and date values\r\n * @see {@link NumberFormatter}\r\n * @see {@link DateFormatter}\r\n * @see {@link DurationFormatter}\r\n * @param tagName Tag name to replace\r\n * @param format Format to use\r\n * @param dataItem DataItem\r\n * @return Formatted value\r\n */\n Sprite.prototype.getTagValue = function (tagName, format, dataItem) {\n var value;\n if (!$type.hasValue(dataItem)) {\n dataItem = this.dataItem;\n }\n // Parse parts\n var parts = [];\n var reg = /([^.]+)\\(([^)]*)\\)|([^.]+)/g;\n ;\n var matches;\n while (true) {\n matches = reg.exec(tagName);\n if (matches === null) {\n break;\n }\n if (matches[3]) {\n // Simple property\n parts.push({\n prop: matches[3]\n });\n } else {\n // Method\n // Parse parameters\n var params = [];\n if ($utils.trim(matches[2]) != \"\") {\n var reg2 = /'([^']*)'|\"([^\"]*)\"|([0-9\\-]+)/g;\n var matches2 = void 0;\n while (true) {\n matches2 = reg2.exec(matches[2]);\n if (matches2 === null) {\n break;\n }\n params.push(matches2[1] || matches2[2] || matches2[3]);\n }\n }\n parts.push({\n method: matches[1],\n params: params\n });\n }\n }\n // Check if we can retrieve the value from data item\n if (dataItem) {\n // Check values\n value = this.getTagValueFromObject(parts, dataItem.values);\n // Check properties\n if (!$type.hasValue(value) || $type.isObject(value)) {\n // isObject helps to solve problem with date axis, as for example dateX will get dateX from values object and wont't get to the dateX date.\n value = this.getTagValueFromObject(parts, dataItem);\n }\n // Check data context\n var dataContext = dataItem.dataContext;\n if (!$type.hasValue(value) && dataContext) {\n value = this.getTagValueFromObject(parts, dataItem.dataContext);\n // scond data context level sometimes exist (tree map)\n if (!$type.hasValue(value) && dataContext.dataContext) {\n value = this.getTagValueFromObject(parts, dataContext.dataContext);\n }\n }\n // Check component's data item\n if (!$type.hasValue(value) && dataItem.component && dataItem.component.dataItem !== dataItem) {\n value = dataItem.component.getTagValue(tagName, format);\n }\n }\n // Check sprite's properties\n if (!$type.hasValue(value)) {\n value = this.getTagValueFromObject(parts, this.populateStringFrom || this);\n }\n // Finally, check the parent\n if (!$type.hasValue(value) && this.parent) {\n value = this.parent.getTagValue(tagName, format);\n }\n return value;\n };\n /**\r\n * Tries to retrieve values from properties of any object, then applies\r\n * proper formatting to it.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (improve)\r\n * @param parts Properties ant methods to access\r\n * @param object Source object\r\n * @param format A specific format to apply\r\n * @return Formatted value\r\n */\n Sprite.prototype.getTagValueFromObject = function (parts, object, format) {\n var current = object;\n var formatApplied = false;\n for (var i = 0, len = parts.length; i < len; i++) {\n var part = parts[i];\n if (part.prop) {\n // Regular property\n current = current[part.prop];\n if (!$type.hasValue(current)) {\n // Not set, return undefined\n return;\n }\n } else {\n // Method\n switch (part.method) {\n case \"formatNumber\":\n var numberValue = $utils.anyToNumber(current);\n if ($type.hasValue(numberValue)) {\n current = this.numberFormatter.format(numberValue, format || part.params[0] || undefined);\n formatApplied = true;\n }\n break;\n case \"formatDate\":\n var dateValue = void 0;\n if ($type.isString(current)) {\n dateValue = this.dateFormatter.parse(current);\n } else {\n dateValue = $utils.anyToDate(current);\n }\n if (!$type.isDate(dateValue) || $type.isNaN(dateValue.getTime())) {\n // Was not able to get date out of value, quitting and letting\n // calling method try another value\n return;\n }\n if ($type.hasValue(dateValue)) {\n current = this.dateFormatter.format(dateValue, format || part.params[0] || undefined);\n formatApplied = true;\n }\n break;\n case \"formatDuration\":\n var durationValue = $utils.anyToNumber(current);\n if ($type.hasValue(durationValue)) {\n current = this.durationFormatter.format(durationValue, format || part.params[0] || undefined, part.params[1] || undefined);\n formatApplied = true;\n }\n break;\n case \"urlEncode\":\n case \"encodeURIComponent\":\n current = encodeURIComponent(current);\n break;\n default:\n if (current[part.method]) {\n current[part.method].apply(this, part.params);\n }\n break;\n }\n }\n }\n // Apply default format if it wasn't applied explicitly\n if (!formatApplied) {\n var formatParts = [{\n method: \"\",\n params: format\n }];\n if (!$type.hasValue(format)) {\n // Format is not set\n // Determine from the type of the value\n if ($type.isNumber(current)) {\n formatParts[0].method = \"formatNumber\";\n formatParts[0].params = \"\";\n } else if ($type.isDate(current)) {\n formatParts[0].method = \"formatDate\";\n formatParts[0].params = \"\";\n }\n } else {\n // Format set\n // Try to determine formatter based on the format\n var formatterType = $utils.getFormat(format);\n // format\n if (formatterType === $strings.NUMBER) {\n formatParts[0].method = \"formatNumber\";\n } else if (formatterType === $strings.DATE) {\n formatParts[0].method = \"formatDate\";\n } else if (formatterType === $strings.DURATION) {\n formatParts[0].method = \"formatDuration\";\n }\n }\n // Apply format\n if (formatParts[0].method) {\n current = this.getTagValueFromObject(formatParts, current);\n }\n }\n return current;\n };\n Object.defineProperty(Sprite.prototype, \"dataItem\", {\n /**\r\n * @return [[DataItem]]\r\n */\n get: function get() {\n if (!this._dataItem) {\n if (this.virtualParent) {\n return this.virtualParent.dataItem;\n }\n if (this.parent) {\n return this.parent.dataItem;\n }\n }\n return this._dataItem;\n },\n /**\r\n * A [[DataItem]] to use as element's data source.\r\n *\r\n * @todo Review type\r\n * @param dataItem DataItem\r\n */\n set: function set(dataItem) {\n //an not use this[\"_dataItem\"] here, as we return parent data item if this sprite doesn't have one.\n // @todo:think about it\n this.setDataItem(dataItem);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets currently used [[DataItem]].\r\n *\r\n * If the element has also `configField` set, it will also look for any\r\n * config in DataItem's data context to apply to this element.\r\n *\r\n * @param dataItem DataItem\r\n */\n Sprite.prototype.setDataItem = function (dataItem) {\n var _this = this;\n if (this._dataItem != dataItem) {\n this._dataItem = dataItem;\n if (this.configField) {\n var dataContext_1 = dataItem.dataContext;\n if (dataContext_1) {\n this.config = dataContext_1[this.configField];\n if (!this.config && dataContext_1.dataContext) {\n this.config = dataContext_1.dataContext[this.configField];\n }\n }\n }\n var dataContext_2 = dataItem.dataContext;\n if (dataContext_2) {\n var dataContext2_1 = dataContext_2.dataContext;\n $object.each(this.propertyFields, function (propertyName, fieldValue) {\n if ($type.hasValue(dataContext_2[fieldValue])) {\n var anyThis = _this;\n anyThis[propertyName] = dataContext_2[fieldValue];\n } else {\n if (dataContext2_1) {\n var value = dataContext2_1[fieldValue];\n if ($type.hasValue(value)) {\n var anyThis = _this;\n anyThis[propertyName] = value;\n }\n }\n }\n });\n }\n this.invalidate();\n }\n };\n /**\r\n * ==========================================================================\r\n * PROPERTY UTILITIES\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Returns element's property value.\r\n *\r\n * Will check if there are any bindings with [[DataItem]].\r\n *\r\n * Will also apply any adapters bound to `propertyName`.\r\n *\r\n * @param propertyName Property name\r\n * @return Property value\r\n */\n Sprite.prototype.getPropertyValue = function (propertyName) {\n var propValue = this.properties[propertyName];\n // Apply adapter\n // @todo get rid of <any>\n if (!this._isTemplate) {\n propValue = this.adapter.apply(propertyName, propValue);\n }\n return propValue;\n };\n Sprite.prototype.setColorProperty = function (property, value, invalidate) {\n var currentValue = this.properties[property];\n if (value instanceof Color && currentValue instanceof Color && value.hex == currentValue.hex) {\n return false;\n } else {\n return this.setPropertyValue(property, value, invalidate);\n }\n };\n Sprite.prototype.setPercentProperty = function (property, value, invalidate, transform, precision, floor) {\n value = $type.toNumberOrPercent(value);\n if ($type.isNumber(value)) {\n value = $math.round(value, precision, floor);\n return this.setPropertyValue(property, value, invalidate, transform);\n } else {\n var currentValue = this.properties[property];\n if (value instanceof Percent && currentValue instanceof Percent && value.value == currentValue.value) {\n return false;\n } else {\n return this.setPropertyValue(property, value, invalidate, transform);\n }\n }\n };\n /**\r\n * Sets elements's property value. Will also propagate the same property value\r\n * on all element's clones.\r\n *\r\n * @param property Property\r\n * @param value Value\r\n * @param invalidate Should the sprite be invalidated, cause it's re-rendering\r\n * @param transform Re-apply positioning of the element\r\n * @return Did the value change? It will return `true` if the new value and the old value of the property are not the same\r\n * @todo Review propagation to clones. Right now we simply check if clone is disposed before setting the same property on it. It's better to remove from clone list altogether.\r\n */\n Sprite.prototype.setPropertyValue = function (property, value, invalidate, transform) {\n if (this.properties[property] !== value && !this.isDisposed()) {\n this.properties[property] = value;\n if (this.events.isEnabled(\"propertychanged\")) {\n var event_1 = {\n type: \"propertychanged\",\n target: this,\n property: property\n };\n this.events.dispatchImmediately(\"propertychanged\", event_1);\n }\n if (invalidate) {\n this.invalidate();\n }\n if (transform) {\n this.invalidatePosition();\n }\n if (this.applyOnClones) {\n var clones = this.clones.values;\n var length_2 = clones.length;\n for (var i = 0; i < length_2; ++i) {\n var clone = clones[i];\n if (!clone.isDisposed()) {\n //(<Sprite>clone).setPropertyValue(<any>property, value, invalidate, transform);\n clone[property] = value;\n }\n }\n }\n return true;\n }\n return false;\n };\n Sprite.prototype.bind = function (property, source, bindToProperty, modifier) {\n var _this = this;\n if (bindToProperty === void 0) {\n bindToProperty = property;\n }\n if ($type.hasValue(this._bindings[property])) {\n this._bindings[property].dispose();\n }\n // set current value\n this[property] = source[bindToProperty];\n //source.addEventListener(AMEvent.PROPERTY_CHANGED, this.handleBindings, false, this);\n this._bindings[property] = source.events.on(\"propertychanged\", function (event) {\n if (event.property === bindToProperty) {\n var value = source[bindToProperty];\n if (modifier) {\n value = modifier(value);\n }\n // TODO clonesById\n _this[property] = value;\n }\n });\n };\n /**\r\n * Sets up and obeserver function to monitor changes in particular property\r\n * or properties.\r\n *\r\n * @ignore Exclude from docs\r\n * @param property Element's property name\r\n * @param listener Handler function\r\n * @param context Context for handler function\r\n * @returns Event Disposer\r\n */\n Sprite.prototype.observe = function (property, listener, context, shouldClone) {\n var _this = this;\n return new MultiDisposer($array.map($array.toArray(property), function (prop) {\n return _this.events.on(\"propertychanged\", function (e) {\n if (e.property === prop) {\n listener.call(context, e);\n }\n }, context, shouldClone);\n }));\n };\n /**\r\n * ==========================================================================\r\n * ACCESSIBILITY-RELATED PROPERTIES\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Applies accessibility to the SVG element.\r\n *\r\n * Adds `<title>` and `<description>` elements as well as `aria-labelledby`\r\n * and `role` properties.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.applyAccessibility = function () {\n // Check if we need to add label and description\n var title = this.readerTitle,\n description = this.readerDescription,\n role = this.role,\n hidden = this.readerHidden,\n checked = this.readerChecked,\n controls = this.readerControls,\n live = this.readerLive;\n // Init label/describe ids\n var labelledByIds = [],\n describedByIds = [];\n var labelledBy = this.readerLabelledBy;\n if (labelledBy) {\n labelledByIds.push(labelledBy);\n }\n var describedBy = this.readerDescribedBy;\n if (describedBy) {\n describedByIds.push(describedBy);\n }\n // Consolidate title and description if system tooltip is disabled\n if (!this.showSystemTooltip && title) {\n if (description) {\n description = title + \" -- \" + description;\n } else {\n description = title;\n }\n title = undefined;\n }\n // If we have only label, we use `aria-label` attribute.\n // If there are both label and description, we'll go with separate tags and\n // use `aria-labelledby`\n if (title && !description && !this.showSystemTooltip) {\n // Only label is set, use attribute\n this.setSVGAttribute({\n \"aria-label\": title\n });\n // Remove previous elements\n this.removeSVGAttribute(\"aria-description\");\n if (this._titleElement) {\n this.group.removeElement(this._titleElement);\n this._titleElement = undefined;\n }\n if (this._descriptionElement) {\n this.group.removeElement(this._descriptionElement);\n this._descriptionElement = undefined;\n }\n } else {\n if (title) {\n var titleElement = this.titleElement;\n var titleId = this.uid + \"-title\";\n if (titleElement.node.textContent != title) {\n titleElement.node.textContent = title;\n titleElement.attr({\n id: titleId\n });\n }\n labelledByIds.push(titleId);\n } else if (this._titleElement) {\n this.group.removeElement(this._titleElement);\n this._titleElement = undefined;\n }\n if (description) {\n var descriptionElement = this.descriptionElement;\n var descriptionId = this.uid + \"-description\";\n if (descriptionElement.node.textContent != description) {\n descriptionElement.node.textContent = description;\n descriptionElement.attr({\n id: descriptionId\n });\n }\n describedByIds.push(descriptionId);\n } else if (this._descriptionElement) {\n this.group.removeElement(this._descriptionElement);\n this._descriptionElement = undefined;\n }\n }\n // Add label and described properties\n if (labelledByIds.length) {\n this.setSVGAttribute({\n \"aria-labelledby\": labelledByIds.join(\" \")\n });\n }\n if (describedByIds.length) {\n this.setSVGAttribute({\n \"aria-describedby\": describedByIds.join(\" \")\n });\n }\n // Apply role\n if (role) {\n this.setSVGAttribute({\n \"role\": role\n });\n } else {\n this.removeSVGAttribute(\"role\");\n }\n // Apply aria-hidden\n if (hidden) {\n this.setSVGAttribute({\n \"aria-hidden\": \"true\"\n });\n } else {\n this.removeSVGAttribute(\"aria-hidden\");\n }\n // Apply aria-checked\n if (checked) {\n this.setSVGAttribute({\n \"aria-checked\": \"true\"\n });\n } else if (checked === false) {\n this.setSVGAttribute({\n \"aria-checked\": \"false\"\n });\n } else {\n this.removeSVGAttribute(\"aria-checked\");\n }\n // Apply aria-controls\n if (controls) {\n this.setSVGAttribute({\n \"aria-controls\": controls\n });\n } else {\n this.removeSVGAttribute(\"aria-controls\");\n }\n // Apply aria-live\n if (live) {\n this.setSVGAttribute({\n \"aria-live\": live\n });\n } else {\n this.removeSVGAttribute(\"aria-live\");\n }\n };\n Object.defineProperty(Sprite.prototype, \"readerTitle\", {\n /**\r\n * @return Title\r\n */\n get: function get() {\n return this.getPropertyValue(\"readerTitle\");\n },\n /**\r\n * Screen reader title of the element.\r\n *\r\n * @param value Title\r\n */\n set: function set(value) {\n value = $type.toText(value);\n if (this.setPropertyValue(\"readerTitle\", value)) {\n this.applyAccessibility();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"readerDescription\", {\n /**\r\n * @return Description\r\n */\n get: function get() {\n return this.getPropertyValue(\"readerDescription\");\n },\n /**\r\n * Screen reader description of the element.\r\n *\r\n * @param value Description\r\n */\n set: function set(value) {\n value = $type.toText(value);\n if (this.setPropertyValue(\"readerDescription\", value)) {\n this.applyAccessibility();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"role\", {\n /**\r\n * @return Role\r\n */\n get: function get() {\n return this.getPropertyValue(\"role\");\n },\n /**\r\n * A WAI-ARIA role for the element.\r\n *\r\n * @see {@link https://www.w3.org/TR/wai-aria-1.1/#role_definitions} for more information on WAI-ARIA roles\r\n * @param value Role\r\n */\n set: function set(value) {\n value = $type.toText(value);\n if (this.setPropertyValue(\"role\", value)) {\n this.applyAccessibility();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"readerHidden\", {\n /**\r\n * @return Hidden?\r\n */\n get: function get() {\n return this.getPropertyValue(\"readerHidden\");\n },\n /**\r\n * Controls if element should be hidden from screen readers.\r\n *\r\n * @see {@link https://www.w3.org/TR/wai-aria-1.1/#aria-hidden} for more information\r\n * @param value Hidden?\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n if (this.setPropertyValue(\"readerHidden\", value)) {\n this.applyAccessibility();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"readerChecked\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Checked?\r\n */\n get: function get() {\n return this.getPropertyValue(\"readerChecked\");\n },\n /**\r\n * Controls if element is currently marked as \"checked\".\r\n *\r\n * @ignore Exclude from docs\r\n * @see {@link https://www.w3.org/TR/wai-aria-1.1/#aria-checked} for more information\r\n * @param value Checked?\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n if (this.setPropertyValue(\"readerChecked\", value)) {\n this.applyAccessibility();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"readerControls\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Setting value\r\n */\n get: function get() {\n return this.getPropertyValue(\"readerControls\");\n },\n /**\r\n * A `uid` of an element this element controls.\r\n *\r\n * @ignore Exclude from docs\r\n * @see {@link https://www.w3.org/TR/wai-aria-1.1/#aria-controls} for more information\r\n * @param value Setting value\r\n */\n set: function set(value) {\n value = $type.toText(value);\n if (this.setPropertyValue(\"readerControls\", value)) {\n this.applyAccessibility();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"readerLive\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Setting value\r\n */\n get: function get() {\n return this.getPropertyValue(\"readerLive\");\n },\n /**\r\n * Controls accessibility setting \"aria-live\" for the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions} for more information\r\n * @param value Setting value\r\n */\n set: function set(value) {\n value = $type.toText(value);\n if (this.setPropertyValue(\"readerLive\", value)) {\n this.applyAccessibility();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"readerLabelledBy\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Target element\r\n */\n get: function get() {\n return this.getPropertyValue(\"readerLabelledBy\");\n },\n /**\r\n * A `uid` of an element that describes this element.\r\n *\r\n * @ignore Exclude from docs\r\n * @see {@link https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby} for more information\r\n * @param value Target element\r\n */\n set: function set(value) {\n value = $type.toText(value);\n if (this.setPropertyValue(\"readerLabelledBy\", value)) {\n this.applyAccessibility();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"readerDescribedBy\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Target element\r\n */\n get: function get() {\n return this.getPropertyValue(\"readerDescribedBy\");\n },\n /**\r\n * A `uid` of an element that describes this element.\r\n *\r\n * @ignore Exclude from docs\r\n * @see {@link https://www.w3.org/TR/wai-aria-1.1/#aria-describedby} for more information\r\n * @param value Target element\r\n */\n set: function set(value) {\n value = $type.toText(value);\n if (this.setPropertyValue(\"readerDescribedBy\", value)) {\n this.applyAccessibility();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"keyboardOptions\", {\n /**\r\n * ==========================================================================\r\n * USER INTERACTIONS\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Returns elements keyboard options.\r\n *\r\n * @return Keyboard options\r\n */\n get: function get() {\n if (!this.interactions.keyboardOptions) {\n if (this.virtualParent) {\n return this.virtualParent.keyboardOptions;\n }\n if (this.parent) {\n return this.parent.keyboardOptions;\n }\n }\n return this.interactions.keyboardOptions;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"interactions\", {\n /**\r\n * Returns (creates if necessary) an [[InteractionObject]] associated with\r\n * this element.\r\n *\r\n * [[InteractionObject]] is used to attach all kinds of user-interactions to\r\n * the element, e.g. click/touch, dragging, hovering, and similar events.\r\n *\r\n * @return Interaction object\r\n */\n get: function get() {\n if (!this._interaction) {\n var interaction = getInteraction().getInteraction(this.dom);\n this._interaction = interaction;\n this._interaction.clickable = this.clickable;\n this._interaction.hoverable = this.hoverable;\n this._interaction.trackable = this.trackable;\n this._interaction.draggable = this.draggable;\n this._interaction.swipeable = this.swipeable;\n this._interaction.resizable = this.resizable;\n this._interaction.wheelable = this.wheelable;\n this._interaction.contextMenuDisabled = this.contextMenuDisabled;\n this._interaction.inert = this.inert;\n this._interaction.sprite = this;\n this._disposers.push(this._interaction);\n }\n return this._interaction;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns true if interactions object was created. Mostly used just to avoid creating interactions object if not needed.\r\n * @return Is Sprite interactive?\r\n */\n Sprite.prototype.isInteractive = function () {\n if (this._interaction) {\n return true;\n } else {\n return false;\n }\n };\n Object.defineProperty(Sprite.prototype, \"focusable\", {\n /**\r\n * @return Can element be focused?\r\n */\n get: function get() {\n return this.getPropertyValue(\"focusable\");\n },\n /**\r\n * ==========================================================================\r\n * ELEMENT FOCUS-RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Controls if the element can gain focus.\r\n *\r\n * Focusable element will be selectable via TAB key.\r\n *\r\n * Please note, clicking it with a mouse or touching will not add focus to\r\n * it.\r\n *\r\n * Focused element will show a system-specific highlight, which might ruin\r\n * the overal look. This is why we don't focus element on click/touch.\r\n *\r\n * A default setting varies for different elements. By default all elements\r\n * are not focusable, except certain items like buttons, legend items, etc.\r\n *\r\n * @default undefined (auto)\r\n * @param value Can element be focused?\r\n */\n set: function set(value) {\n var _this = this;\n value = $type.toBoolean(value);\n if (this.setPropertyValue(\"focusable\", value)) {\n if (!value && !this.isInteractive()) {} else {\n this.interactions.focusable = value;\n if (value) {\n this.setSVGAttribute({\n \"focusable\": value\n });\n } else {\n this.removeSVGAttribute(\"focusable\");\n }\n // Set focus events that would apply \"focus\" state\n // setEventDisposer will also remove listeners if value == false\n this.interactions.setEventDisposer(\"sprite-focusable\", value, function () {\n return new MultiDisposer([_this.events.on(\"blur\", _this.handleBlur, _this, false), _this.events.on(\"focus\", _this.handleFocus, _this, false)]);\n });\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Applies filters (if set) when element gains focus.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Original event\r\n */\n Sprite.prototype.handleFocus = function (ev) {\n if (this.focusable) {\n if (this.topParent) {\n this.topParent.hasFocused = true;\n }\n if (this.focusFilter) {\n // Any `filters` manipulation will trigger `applyFilters()` so we don't\n // need to call it here\n this.filters.push(this.focusFilter);\n }\n if (this.hoverOnFocus) {\n // Trigger a hover event as well\n this.isHover = true;\n this.handleOver();\n }\n }\n };\n /**\r\n * Removes focus filter (if set) when elementloses focus.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Original event\r\n */\n Sprite.prototype.handleBlur = function (ev) {\n if (this.focusable) {\n if (this.topParent) {\n this.topParent.hasFocused = false;\n }\n if (this.focusFilter) {\n // Any `filters` manipulation will trigger `applyFilters()` so we don't\n // need to call it here\n this.filters.removeValue(this.focusFilter);\n }\n if (this.hoverOnFocus) {\n // Trigger a out event as well\n this.isHover = false;\n this.handleOut();\n }\n }\n };\n Object.defineProperty(Sprite.prototype, \"focusFilter\", {\n /**\r\n * A reference to a [[Filter]] to apply to element when it gains focus.\r\n *\r\n * Normally, browsers will draw a default ugly square around focused element,\r\n * which totally makes sense because its purpose is to help identify active\r\n * element for visually impaired people.\r\n *\r\n * However, if you would rather apply a filter, so you can modify how focused\r\n * element looks like, use `focusFilter`.\r\n *\r\n * Simply set it to an anstance of [[FocusFilter]], or any other filter\r\n * object.\r\n *\r\n * ```TypeScript\r\n * chart.focusFilter = new am4core.FocusFilter();\r\n * ```\r\n * ```JavaScript\r\n * chart.focusFilter = new am4core.FocusFilter();\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"focusFilter\": {\r\n * \"type\": \"FocusFilter\"\r\n * },\r\n * // ...\r\n * }\r\n * ```\r\n *\r\n * @see {@link Filter}\r\n * @ignore Exclude from docs\r\n * @return Focused element filter\r\n * @todo This is still experimental, use at your own risk.\r\n */\n get: function get() {\n /*if (!this._focusFilter) {\r\n this._focusFilter = new FocusFilter();\r\n this._disposers.push(this._focusFilter);\r\n }*/\n //return this._focusFilter;\n var focusFilter = this._focusFilter;\n if (focusFilter) {\n return focusFilter;\n }\n if (this.virtualParent) {\n return this.virtualParent.focusFilter;\n } else if (this.parent) {\n return this.parent.focusFilter;\n }\n //this._focusFilter = new FocusFilter();\n //this._disposers.push(this._focusFilter);\n },\n /**\r\n * @see {@link Filter}\r\n * @ignore Exclude from docs\r\n * @todo This is still experimental, don't use it\r\n */\n set: function set(value) {\n this._focusFilter = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"hoverOnFocus\", {\n /**\r\n * @return Trigger hover on focus?\r\n */\n get: function get() {\n return this.getPropertyValue(\"hoverOnFocus\");\n },\n /**\r\n * If set to `true`, this element will also trigger `\"over\"` event with all\r\n * the related consequences, like \"hover\" state being applied and tooltip\r\n * being shown.\r\n *\r\n * Useful as an accessibility feature to display rollover tooltips on items\r\n * selected via keyboard.\r\n *\r\n * @param value Trigger hover on focus?\r\n * @default false\r\n */\n set: function set(value) {\n if (value !== this.hoverOnFocus) {\n this.setPropertyValue(\"hoverOnFocus\", value);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"tabindex\", {\n /**\r\n * Returns current TAB index for focusable item.\r\n *\r\n * @return TAB index\r\n */\n get: function get() {\n var index = this._tabindex;\n if (index != null) {\n return index;\n } else if (this.virtualParent) {\n return this.virtualParent.tabindex;\n } else if (this.parent) {\n return this.parent.tabindex;\n }\n },\n /**\r\n * Sets TAB index.\r\n *\r\n * Tab index maintains the order in which focusable elements gain focus when\r\n * TAB key is pressed.\r\n *\r\n * Please note, tab index is not local to the chart. It affects the whole\r\n * of the page, including non-SVG elements. Maintain extreme causion when\r\n * setting tab indexes, as it affects the user experience for the whole\r\n * web page.\r\n *\r\n * @param value TAB index\r\n */\n set: function set(value) {\n value = $type.toNumber(value);\n if (this.setPropertyValue(\"tabindex\", value) && $type.isNumber(value)) {\n this.interactions.tabindex = value;\n this.setSVGAttribute({\n \"tabindex\": value\n });\n if (value > -1) {\n this.focusable = true;\n } else {\n this.focusable = undefined;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"inertiaOptions\", {\n /**\r\n * ==========================================================================\r\n * DRAGGING AND RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Returns element's options to be used for inertia. This setting is\r\n * inheritable, meaning that if not set directly, it will search in all its\r\n * ascendants until very top.\r\n *\r\n * Inertia is used only if element's `inert` is set to `true`.\r\n *\r\n * \"Inert\" element, when dragged and released, will carry the momentum of the\r\n * movement, and will continue moving in the same drag direction, gradually\r\n * reducing in speed until finally stops.\r\n *\r\n * Check [[IInertiaOptions]] for how you tweak inertia animations.\r\n *\r\n * @return Inertia options\r\n */\n get: function get() {\n if (!this.interactions.inertiaOptions) {\n if (this.parent) {\n return this.parent.inertiaOptions;\n }\n }\n return this.interactions.inertiaOptions;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"draggable\", {\n /**\r\n * @return `true` if element can be dragged\r\n */\n get: function get() {\n return this.getPropertyValue(\"draggable\");\n },\n /**\r\n * Controls if the element is draggable.\r\n *\r\n * @param value `true` if element can be dragged\r\n */\n set: function set(value) {\n var _this = this;\n value = $type.toBoolean(value);\n if (this.setPropertyValue(\"draggable\", value)) {\n if (!value && !this.isInteractive()) {} else {\n this.applyCursorStyle();\n this.interactions.draggable = value;\n //interaction.processDraggable(this);\n // Add events\n // @todo Maybe attach to InteractionObject's multidisposer so that\n // sprites events get disposed together with them?\n // this.interactions.disposers.getItem(\"movable\")\n // setEventDisposer will also remove listeners if value == false\n this.interactions.setEventDisposer(\"sprite-draggable\", value, function () {\n return new MultiDisposer([_this.events.on(\"down\", _this.handleDown, _this, false), _this.events.on(\"dragstart\", _this.handleDragStart, _this, false), _this.events.on(\"drag\", _this.handleDragMove, _this, false), _this.events.on(\"dragstop\", _this.handleDragStop, _this, false)]);\n });\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Executes when dragged element is being started to drag.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.handleDragStart = function (ev) {\n if (!this.interactions.isTouchProtected || !ev.touch) {\n this.interactions.originalPosition = {\n x: this.pixelX,\n y: this.pixelY\n };\n this._isDragged = true;\n this.hideTooltip(0);\n }\n };\n /**\r\n * Tell this element to start being dragged. This is useful if you want to\r\n * drag items by interactions performed not directly on the target element.\r\n *\r\n * Parameter `pointer` is highly recommended. By passing in the Pointer you\r\n * will ensure that movement is tracked for the pointer that you want. If not\r\n * supplied, the system will try to determine the most logical pointer.\r\n *\r\n * However this may fail if you have more than one pointer active, which\r\n * might happen if you have several objects being dragged on a touch device.\r\n *\r\n * @ignore Exclude from docs\r\n * @param pointer Pointer to use for movement\r\n */\n Sprite.prototype.dragStart = function (pointer) {\n //this.dragStop(pointer);\n //this.draggable = true;\n this._isDragged = true;\n getInteraction().dragStart(this.interactions, pointer);\n };\n /**\r\n * Executes when dragged element is being dropped.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype.handleDragStop = function (ev) {\n if (!this.interactions.isTouchProtected || !ev.touch) {\n this._isDragged = false;\n this.showTooltip();\n this.interactions.originalPosition = undefined;\n }\n };\n /**\r\n * Stops manually initiated dragging of the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param pointer Pointer to use as a reference\r\n */\n Sprite.prototype.dragStop = function (pointer) {\n //this.draggable = false;\n this._isDragged = false;\n getInteraction().dragStop(this.interactions, pointer);\n //this.handleDragStop();\n };\n /**\r\n * Executes when {Sprite} is being dragged.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n * @todo Implement parent position offset calculation\r\n */\n Sprite.prototype.handleDragMove = function (ev) {\n if (!this.interactions.isTouchProtected || !ev.touch) {\n var point = this.interactions.originalPosition;\n if (point && this._isDragged) {\n var globalScale = this.parent.globalScale * this.svgContainer.cssScale;\n this.moveTo({\n x: point.x + ev.shift.x / globalScale,\n y: point.y + ev.shift.y / globalScale\n }, undefined, undefined, true);\n }\n this.dispatchImmediately(\"dragged\", ev);\n }\n };\n Object.defineProperty(Sprite.prototype, \"inert\", {\n /**\r\n * @return `true` if element should use inertia when animated\r\n */\n get: function get() {\n return this.getPropertyValue(\"inert\");\n },\n /**\r\n * Controls if the element should use inertia when interacted with.\r\n *\r\n * \"Inert\" element, when dragged and released, will carry the momentum of the\r\n * movement, and will continue moving in the same drag direction, gradually\r\n * reducing in speed until finally stops.\r\n *\r\n * @default false\r\n * @param value `true` if element should use inertia when animated\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n if (this.setPropertyValue(\"inert\", value)) {\n if (!value && !this.isInteractive()) {\n // void\n } else {\n this.interactions.inert = value;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"hoverOptions\", {\n /**\r\n * ==========================================================================\r\n * HOVERING\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Returns Sprite's hover options.\r\n *\r\n * @see {@link IHoverOptions} for available options.\r\n * @return Options\r\n */\n get: function get() {\n if (!this.interactions.hoverOptions) {\n if (this.virtualParent) {\n return this.virtualParent.hoverOptions;\n }\n if (this.parent) {\n return this.parent.hoverOptions;\n }\n }\n return this.interactions.hoverOptions;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"hoverable\", {\n /**\r\n * @return `true` if element is hoverable\r\n */\n get: function get() {\n return this.getPropertyValue(\"hoverable\");\n },\n /**\r\n * Controls if the element is hoverable (hover events are registered).\r\n *\r\n * Use `over` and `out` events, to watch for those respective actions.\r\n *\r\n * @default false\r\n * @param value `true` if element can be hovered\r\n */\n set: function set(value) {\n var _this = this;\n value = $type.toBoolean(value);\n if (this.setPropertyValue(\"hoverable\", value)) {\n if (!value && !this.isInteractive()) {\n // void\n } else {\n this.applyCursorStyle();\n this.interactions.hoverable = value;\n // setEventDisposer will also remove listeners if value == false\n this.interactions.setEventDisposer(\"sprite-hoverable\", value, function () {\n return new MultiDisposer([_this.events.on(\"over\", _this.handleOver, _this, false), _this.events.on(\"out\", _this.handleOut, _this, false)]);\n });\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Handles tasks when element becomes hovered:\r\n * * Shows [[Tooltip]] if applicable\r\n * * Applies \"hover\" state\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n */\n Sprite.prototype.handleOver = function (ev) {\n if (this._outTimeout) {\n this._outTimeout.dispose();\n }\n if (this.isHover) {\n if (this.states.hasKey(\"hover\")) {\n //this.setState(\"hover\");\n // This will check `isHover` and will set \"hover\" state\n if (!this.isHidden) {\n this.applyCurrentState();\n }\n }\n var point = void 0;\n if (ev && ev.pointer) {\n point = $utils.documentPointToSvg(ev.pointer.point, this.svgContainer.SVGContainer, this.svgContainer.cssScale);\n }\n this.showTooltip(point);\n } else {\n this.hideTooltip();\n if (!this.isHidden && this.states.hasKey(\"hover\")) {\n this.applyCurrentState();\n }\n }\n };\n /**\r\n * Handles tasks when element loses hover:\r\n *\r\n * * Hides [[Tooltip]]\r\n * * Applies default state\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev [description]\r\n */\n Sprite.prototype.handleOut = function (ev) {\n var _this = this;\n if (this.tooltip && this.tooltip.targetSprite == this && this.tooltip.keepTargetHover) {\n this._outTimeout = this.setTimeout(function () {\n if (!_this.tooltip.isHover) {\n if (_this.tooltip.targetSprite == _this) {\n _this.hideTooltip();\n }\n _this._outTimeout = _this.setTimeout(_this.handleOutReal.bind(_this), _this.rollOutDelay);\n }\n }, 10);\n return;\n }\n this.hideTooltip();\n this._outTimeout = this.setTimeout(this.handleOutReal.bind(this), this.rollOutDelay);\n };\n /**\r\n * [handleOutReal description]\r\n *\r\n * @ignore\r\n * @todo description\r\n */\n Sprite.prototype.handleOutReal = function () {\n if (!this.isHidden && !this.isHiding && this.states.hasKey(\"hover\")) {\n this.applyCurrentState();\n }\n };\n Object.defineProperty(Sprite.prototype, \"hitOptions\", {\n /**\r\n * ==========================================================================\r\n * CLICKING/TAPPING AND TOGGLING STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Returns Sprite's click (hit) options.\r\n *\r\n * Click (hit) options control things like double-click, timeouts, etc.\r\n *\r\n * @see {@link IHitOptions} for available options.\r\n * @return Options\r\n */\n get: function get() {\n if (!this.interactions.hitOptions) {\n if (this.virtualParent) {\n return this.virtualParent.hitOptions;\n }\n if (this.parent) {\n return this.parent.hitOptions;\n }\n }\n return this.interactions.hitOptions;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Prepares element's after `down` event.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event\r\n */\n Sprite.prototype.handleDown = function (ev) {\n if (this.interactions.downPointers.length === 1) {\n this.interactions.originalPosition = {\n x: this.pixelX,\n y: this.pixelY\n };\n this.interactions.originalAngle = this.rotation;\n this.interactions.originalScale = this.scale;\n if (this.states.hasKey(\"down\")) {\n this.setState(\"down\");\n }\n }\n };\n /**\r\n * Prepares element's after `up` event.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event\r\n */\n Sprite.prototype.handleUp = function (ev) {\n /*if (!this.isDown) {\r\n this.interactions.originalPosition = null;\r\n this.interactions.originalAngle = null;\r\n this.interactions.originalScale = null;\r\n }*/\n this._isResized = false;\n if (this.states.hasKey(\"down\")) {\n this.applyCurrentState();\n }\n };\n Object.defineProperty(Sprite.prototype, \"clickable\", {\n /**\r\n * @return {boolean}\r\n */\n get: function get() {\n return this.getPropertyValue(\"clickable\");\n },\n /**\r\n * Indicates if the element is clickable.\r\n *\r\n * Some type of the elements, like buttons are clickable by default.\r\n *\r\n * Most of the elements are not clickable by default.\r\n *\r\n * Use `hit`, `doublehit`, `up`, `down`, `toggled` events to watch for\r\n * respective click/touch actions.\r\n *\r\n * @param value `true` if element can be clicked\r\n */\n set: function set(value) {\n var _this = this;\n value = $type.toBoolean(value);\n if (this.setPropertyValue(\"clickable\", value)) {\n if (!value && !this.isInteractive()) {\n // void\n } else {\n this.applyCursorStyle();\n this.interactions.clickable = value;\n // setEventDisposer will also remove listeners if value == false\n this.interactions.setEventDisposer(\"sprite-clickable\", value, function () {\n return new MultiDisposer([_this.events.on(\"down\", _this.handleDown, _this, false), _this.events.on(\"up\", _this.handleUp, _this, false)]);\n });\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"togglable\", {\n /**\r\n * @return Is togglable?\r\n */\n get: function get() {\n return this.getPropertyValue(\"togglable\");\n },\n /**\r\n * Indicates if element can be toggled on and off by subsequent clicks/taps.\r\n *\r\n * Togglable element will alternate its `isActive` property between `true`\r\n * and `false` with each click.\r\n *\r\n * @param value Is togglable?\r\n */\n set: function set(value) {\n var _this = this;\n value = $type.toBoolean(value);\n if (this.setPropertyValue(\"togglable\", value)) {\n if (!value && !this.isInteractive()) {\n // void\n } else {\n // setEventDisposer will also remove listeners if value == false\n this.interactions.setEventDisposer(\"sprite-togglable\", value, function () {\n return _this.events.on(\"hit\", _this.handleToggle, _this, false);\n });\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Handles toggling of the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event\r\n */\n Sprite.prototype.handleToggle = function (ev) {\n this.isActive = !this.isActive;\n };\n Object.defineProperty(Sprite.prototype, \"contextMenuDisabled\", {\n /**\r\n * @return Context menu disabled?\r\n */\n get: function get() {\n return this.getPropertyValue(\"contextMenuDisabled\");\n },\n /**\r\n * Should element prevent context menu to be displayed, e.g. when\r\n * right-clicked?\r\n *\r\n * @default false\r\n * @param value Context menu disabled?\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n if (this.setPropertyValue(\"contextMenuDisabled\", value)) {\n this.interactions.contextMenuDisabled = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"url\", {\n /**\r\n * @return URL\r\n */\n get: function get() {\n return this.getPropertyValue(\"url\");\n },\n /**\r\n * Click-through URL for this element.\r\n *\r\n * If set, clicking/tapping this element will open the new URL in a target\r\n * window/tab as set by `urlTarget`.\r\n *\r\n * Please note that URL will be parsed by data placeholders in curly\r\n * brackets, to be populated from data. E.g.:\r\n *\r\n * ```TypeScript\r\n * series.columns.template.url = \"https://www.google.com/search?q={category.urlEncode()}\";\r\n * ```\r\n * ```JavaScript\r\n * series.columns.template.url = \"https://www.google.com/search?q={category.urlEncode()}\";\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * // ...\r\n * \"columns\": {\r\n * \"url\": \"https://www.google.com/search?q={category.urlEncode()}\"\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @param value URL\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"url\", value)) {\n if (this._urlDisposer) {\n this._urlDisposer.dispose();\n }\n // If URL is not empty, set up events\n if ($utils.isNotEmpty(value)) {\n this._urlDisposer = this.events.on(\"hit\", this.urlHandler, this, false);\n // Set other required parameters\n this.clickable = true;\n this.cursorOverStyle = MouseCursorStyle.pointer;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"baseId\", {\n /**\r\n * [baseId description]\r\n *\r\n * @ignore\r\n * @return [description]\r\n */\n get: function get() {\n if (!this._baseId && this.parent) {\n this.baseId = this.parent.baseId;\n }\n return this._baseId;\n },\n /**\r\n * [baseId description]\r\n *\r\n * @ignore\r\n * @param value [description]\r\n */\n set: function set(value) {\n this.setBaseId(value);\n },\n enumerable: true,\n configurable: true\n });\n Sprite.prototype.setBaseId = function (value) {\n if (value != this._baseId) {\n if (this.invalid) {\n this.invalid = false;\n registry.removeFromInvalidSprites(this);\n this.invalidate();\n }\n this._baseId = value;\n }\n };\n Object.defineProperty(Sprite.prototype, \"baseSprite\", {\n /**\r\n * Returns the mail chart object that this element belongs to.\r\n *\r\n * In most cases it will mean the chart object.\r\n *\r\n * Can be used to retrieve chart object in various events and adapters.\r\n *\r\n * ```TypeScript\r\n * chart.seriesContainer.events.on(\"hit\", function(ev) {\r\n * console.log(ev.target.baseSprite);\r\n * });\r\n * ```\r\n * ```JavaScript\r\n * chart.seriesContainer.events.on(\"hit\", function(ev) {\r\n * console.log(ev.target.baseSprite);\r\n * });\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"seriesContainer\": {\r\n * \"events\": {\r\n * \"hit\": function(ev) {\r\n * console.log(ev.target.baseSprite);\r\n * }\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @readonly\r\n * @return Base chart object\r\n */\n get: function get() {\n if (this.isBaseSprite) {\n return this;\n } else if (this.parent) {\n return this.parent.baseSprite;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"urlTarget\", {\n /**\r\n * @return URL target\r\n */\n get: function get() {\n return this.getPropertyValue(\"urlTarget\");\n },\n /**\r\n * Target to use for URL clicks:\r\n *\r\n * * _blank\r\n * * _self (default)\r\n * * _parent\r\n * * _top\r\n * * Name of the window/frame\r\n *\r\n * Ignored if `url` is not set.\r\n *\r\n * @param value URL target\r\n */\n set: function set(value) {\n this.setPropertyValue(\"urlTarget\", value);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Handles URL transition on element click.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev An event object\r\n */\n Sprite.prototype.urlHandler = function (ev) {\n // Is URL set?\n if ($utils.isNotEmpty(this.url)) {\n // Proceed to the URL\n var url = this.populateString(this.url);\n if (this.urlTarget === \"_self\") {\n window.location.href = url;\n } else {\n window.open(url, this.urlTarget);\n }\n }\n };\n Object.defineProperty(Sprite.prototype, \"swipeOptions\", {\n /**\r\n * ==========================================================================\r\n * SWIPING GESTURE TRACKING\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Returns element's swipe gesture options.\r\n *\r\n * @return Swipe gesture options\r\n */\n get: function get() {\n if (!this.interactions.swipeOptions) {\n if (this.virtualParent) {\n return this.virtualParent.swipeOptions;\n }\n if (this.parent) {\n return this.parent.swipeOptions;\n }\n }\n return this.interactions.swipeOptions;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"swipeable\", {\n /**\r\n * @return Element swipable?\r\n */\n get: function get() {\n return this.getPropertyValue(\"swipeable\");\n },\n /**\r\n * Controls if element is swipeable.\r\n *\r\n * Swipable element will invoke `swipe`, `swipeleft` and `swiperight` events,\r\n * when quick horizontal drag action is performed with either mouse or touch.\r\n *\r\n * Please note that combining swipe and drag is possible, however will incur\r\n * a slight but noticeable delay in drag start.\r\n *\r\n * @param value Element swipable?\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n if (this.setPropertyValue(\"swipeable\", value)) {\n this.applyCursorStyle();\n if (!value && !this.isInteractive()) {\n // void\n } else {\n this.interactions.swipeable = value;\n }\n //interaction.processSwipeable(this);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"trackable\", {\n /**\r\n * @return Track cursor movement over element?\r\n */\n get: function get() {\n return this.getPropertyValue(\"trackable\");\n },\n /**\r\n * ==========================================================================\r\n * POINTER TRACKING\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Indicates if the element is trackable (mouse position over it is reported to\r\n * event listeners).\r\n *\r\n * Will invoke `track` events whenever pointer (cursor) changes position\r\n * while over element.\r\n *\r\n * Please note, touch devices will also invoke `track` events when touch\r\n * point is moved while holding down on a trackable element.\r\n *\r\n * @param value Track cursor movement over element?\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n if (this.setPropertyValue(\"trackable\", value)) {\n if (!value && !this.isInteractive()) {\n // void\n } else {\n this.applyCursorStyle();\n this.interactions.trackable = value;\n }\n //interaction.processTrackable(this);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"wheelable\", {\n /**\r\n * @return Mouse wheel events enabled?\r\n */\n get: function get() {\n return this.getPropertyValue(\"wheelable\");\n },\n /**\r\n * ==========================================================================\r\n * MOUSE-WHEEL RELATED\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Indicates if the element can be interacted with mouse wheel.\r\n *\r\n * Will invoke `wheel`, `wheelup`, `wheeldown`, `wheelleft`, and `wheelright`\r\n * events when using mouse wheel over the element.\r\n *\r\n * @param value Mouse wheel events enabled?\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"wheelable\", value)) {\n if (!value && !this.isInteractive()) {\n // void\n } else {\n this.applyCursorStyle();\n this.interactions.wheelable = value;\n }\n //interaction.processWheelable(this);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"resizable\", {\n /**\r\n * @return Element resizable?\r\n */\n get: function get() {\n return this.getPropertyValue(\"resizable\");\n },\n /**\r\n * ==========================================================================\r\n * RESIZE\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Indicates if this element is resizable.\r\n *\r\n * Enabling resize will turn on various interactions on the element. Their\r\n * actual functionality will depend on other properties.\r\n *\r\n * If the element also `draggable`, resize will only happen with two points\r\n * of contact on a touch device.\r\n *\r\n * If the element is not draggable, resize can be performed with just one\r\n * point of contact, touch or mouse.\r\n *\r\n * Will invoke `resize` event every time the size of the element changes.\r\n *\r\n * @param value Element resizable?\r\n */\n set: function set(value) {\n var _this = this;\n value = $type.toBoolean(value);\n if (this.setPropertyValue(\"resizable\", value)) {\n if (!value && !this.isInteractive()) {\n // void\n } else {\n this.applyCursorStyle();\n this.interactions.resizable = value;\n // setEventDisposer will also remove listeners if value == false\n this.interactions.setEventDisposer(\"sprite-resizable\", value, function () {\n return new MultiDisposer([_this.events.on(\"down\", _this.handleDown, _this, false), _this.events.on(\"resize\", _this.handleResize, _this, false)]);\n });\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Handles resize intermediate step.\r\n *\r\n * By default this method resizes actual element. Each element, can override\r\n * this method to implement their own resize logic.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n */\n Sprite.prototype.handleResize = function (ev) {\n if (!this.interactions.isTouchProtected || !ev.touch) {\n this._isResized = true;\n this.scale = this.interactions.originalScale * ev.scale;\n this.validatePosition();\n /*center: (io.draggable\r\n ? $math.getMidPoint(point1, point2)\r\n : {\r\n \"x\": io.originalPosition.x,\r\n \"y\": io.originalPosition.y\r\n })*/\n //this.moveTo(this.originalPosition.x + ev.shift.x, this.originalPosition.y + ev.shift.y);\n if (this.draggable || this.dragWhileResize) {\n this._isDragged = false;\n var svgPoint1 = $utils.documentPointToSvg(ev.point1, this.htmlContainer, this.svgContainer.cssScale);\n var svgPoint2 = $utils.documentPointToSvg(ev.point2, this.htmlContainer, this.svgContainer.cssScale);\n var svgMidPoint = $math.getMidPoint(svgPoint1, svgPoint2);\n var parentPoint1 = $utils.documentPointToSprite(ev.startPoint1, this.parent);\n var parentPoint2 = $utils.documentPointToSprite(ev.startPoint2, this.parent);\n var originalPosition = this.interactions.originalPosition;\n var originalScale = this.interactions.originalScale;\n if (originalPosition) {\n var spritePoint1 = {\n x: (parentPoint1.x - originalPosition.x) / originalScale,\n y: (parentPoint1.y - originalPosition.y) / originalScale\n };\n var spritePoint2 = {\n x: (parentPoint2.x - originalPosition.x) / originalScale,\n y: (parentPoint2.y - originalPosition.y) / originalScale\n };\n var spriteMidPoint = $math.getMidPoint(spritePoint1, spritePoint2);\n var parentPoint = $utils.svgPointToSprite(svgMidPoint, this.parent);\n this.moveTo({\n x: parentPoint.x - spriteMidPoint.x * this.scale,\n y: parentPoint.y - spriteMidPoint.y * this.scale\n }, undefined, undefined, true);\n }\n }\n }\n };\n Object.defineProperty(Sprite.prototype, \"cursorOptions\", {\n /**\r\n * ==========================================================================\r\n * MOUSE-RELATED\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Returns element's cursor options.\r\n *\r\n * Cursor options usually define cursor style for various states of the\r\n * hovered element.\r\n *\r\n * Elements inherit `cursorOptions` from their parents if they don't have\r\n * them set explicitly.\r\n *\r\n * @see {@link ICursorOptions} for a list of available options\r\n * @return Cursor options\r\n */\n get: function get() {\n if (!this.interactions.cursorOptions) {\n if (this.virtualParent) {\n return this.virtualParent.cursorOptions;\n }\n if (this.parent) {\n return this.parent.cursorOptions;\n }\n }\n return this.interactions.cursorOptions;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"cursorOverStyle\", {\n /**\r\n * A shortcut to setting mouse cursor on hover.\r\n *\r\n * Example:\r\n *\r\n * ```TypeScript\r\n * series.slices.template.cursorOverStyle = am4core.MouseCursorStyle.pointer;\r\n * ```\r\n * ```JavaScript\r\n * series.slices.template.cursorOverStyle = am4core.MouseCursorStyle.pointer;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": {\r\n * // ...\r\n * \"slices\": {\r\n * \"cursorOverStyle\": \"pointer\"\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @param style An array of styles to apply onhover\r\n */\n set: function set(style) {\n if (!this.cursorOptions.overStyle) {\n this.interactions.cursorOptions = {\n defaultStyle: this.cursorOptions.defaultStyle\n };\n }\n this.cursorOptions.overStyle = style;\n getInteraction().applyCursorOverStyle(this.interactions);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"cursorDownStyle\", {\n /**\r\n * A shortcut to setting mouse cursor when button is pressed down.\r\n *\r\n * Example:\r\n *\r\n * ```TypeScript\r\n * series.slices.template.cursorDownStyle = am4core.MouseCursorStyle.grabbing;\r\n * ```\r\n * ```JavaScript\r\n * series.slices.template.cursorDownStyle = am4core.MouseCursorStyle.grabbing;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": {\r\n * // ...\r\n * \"slices\": {\r\n * \"cursorDownStyle\": \"grabbing\"\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @param style An array of styles to apply onhover\r\n */\n set: function set(style) {\n this.cursorOptions.downStyle = style;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Applies default cursor styles for interactable elements.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Determine if this is necessary. Maybe let's not apply any cursor styles by default\r\n */\n Sprite.prototype.applyCursorStyle = function () {\n // Draggable styles\n /*if (this.draggable) {\r\n if (!$type.hasValue(this.cursorOptions.overStyle)) {\r\n this.cursorOptions.overStyle = MouseCursorStyle.grab;\r\n }\r\n if (!$type.hasValue(this.cursorOptions.downStyle)) {\r\n this.cursorOptions.downStyle = MouseCursorStyle.grabbing;\r\n }\r\n }*/\n };\n Object.defineProperty(Sprite.prototype, \"interactionsEnabled\", {\n /**\r\n * @return Is interaction enabled for this element?\r\n */\n get: function get() {\n var value = this.getPropertyValue(\"interactionsEnabled\");\n if (value === false) {\n return false;\n }\n if (this.virtualParent) {\n return this.virtualParent.interactionsEnabled;\n }\n if (this.parent) {\n return this.parent.interactionsEnabled;\n }\n return true;\n },\n /**\r\n * Setting this to `false` will effectively disable all interactivity on the\r\n * element.\r\n *\r\n * @param value Is interaction enabled for this element?\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n if (this.setPropertyValue(\"interactionsEnabled\", value)) {\n var pointerEvents = null; // must be null, not \"null\"!\n if (!value) {\n pointerEvents = \"none\";\n } else {\n // this is for IE\n this.group.node.style.pointerEvents = \"\";\n }\n this.group.node.style.pointerEvents = pointerEvents;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"exporting\", {\n /**\r\n * @return Export instance\r\n */\n get: function get() {\n return this.getExporting();\n },\n /**\r\n * ==========================================================================\r\n * EXPORT-RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * An [[Export]] instance.\r\n *\r\n * Used to access API of the chart export functionality.\r\n *\r\n * If `exporting` is not set, the element inherits [[Export]] instance from\r\n * its parents.\r\n *\r\n * Upon request, if no parent has such instance, a new one is created, using\r\n * default settings, what in most cases is just enough.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/exporting/} for more info about exporting\r\n * @param exp Export\r\n */\n set: function set(exp) {\n this._exporting.set(exp, exp);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * This is here as a method so that inheriting classes could override it.\r\n *\r\n * @return Export instance\r\n */\n Sprite.prototype.getExporting = function () {\n var _export = this._exporting.get();\n if (_export) {\n return _export;\n } else {\n if (this.isStandaloneInstance || !this.parent) {\n _export = new Export(this.svgContainer.SVGContainer);\n _export.sprite = this;\n _export.language = this.language;\n _export.dateFormatter = this.dateFormatter;\n _export.durationFormatter = this.durationFormatter;\n this._exporting.set(_export, _export);\n } else {\n return this.parent.exporting;\n }\n }\n return _export;\n };\n Object.defineProperty(Sprite.prototype, \"exportable\", {\n /**\r\n * @return Export?\r\n */\n get: function get() {\n return this._exportable;\n /*const svgContainer = this.svgContainer;\r\n return !svgContainer || $array.indexOf(svgContainer.nonExportableSprites, this) == -1;*/\n },\n /**\r\n * If set to `false` this element will be omitted when exporting the chart\r\n * to an image.\r\n *\r\n * @default true\r\n * @param value Export?\r\n */\n set: function set(value) {\n var svgContainer = this.svgContainer;\n this._exportable = value;\n if (svgContainer) {\n if (value) {\n $array.remove(svgContainer.nonExportableSprites, this);\n } else if ($array.indexOf(svgContainer.nonExportableSprites, this) == -1) {\n svgContainer.nonExportableSprites.push(this);\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * ==========================================================================\r\n * MODAL/POPUP RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Private method to be used for \"classPrefix\" adapter for modals/popups.\r\n *\r\n * @param value Prefix\r\n */\n Sprite.prototype.modalPrefix = function (value) {\n value = options.classNamePrefix + value;\n return value;\n };\n Object.defineProperty(Sprite.prototype, \"modal\", {\n /**\r\n * Returns a [[Modal]] instance, associated with this chart.\r\n * (elements top parent)\r\n *\r\n * Accessing modal does not make it appear. To make a modal appear, use\r\n * `showModal()` method.\r\n *\r\n * @see {@link Modal} for more information about using Modal windows\r\n * @return Modal instance\r\n */\n get: function get() {\n var svgContainer = this.svgContainer;\n if (svgContainer) {\n var modal = svgContainer.modal;\n if (!modal.adapter.has(\"classPrefix\", this.modalPrefix)) {\n modal.adapter.add(\"classPrefix\", this.modalPrefix);\n }\n return modal;\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Opens a modal window with specific content (`text` parameter) and,\r\n * optionally, `title`.\r\n *\r\n * The `text` parameter can contain HTML content.\r\n *\r\n * @see {@link Modal} for more information about using Modal windows\r\n * @param text Modal contents\r\n * @param title Title for the modal window\r\n */\n Sprite.prototype.openModal = function (text, title) {\n var svgContainer = this.svgContainer;\n if (svgContainer) {\n return svgContainer.openModal(text, title);\n }\n };\n /**\r\n * Hides modal window if there is one currently open.\r\n */\n Sprite.prototype.closeModal = function () {\n var svgContainer = this.svgContainer;\n if (svgContainer) {\n svgContainer.closeModal();\n }\n };\n Object.defineProperty(Sprite.prototype, \"popups\", {\n /**\r\n * A list of popups for this chart.\r\n *\r\n * @return Popups\r\n */\n get: function get() {\n var svgContainer = this.svgContainer;\n if (svgContainer) {\n var popups = svgContainer.popups;\n popups.template.sprite = this;\n if (!popups.template.adapter.has(\"classPrefix\", this.modalPrefix)) {\n popups.template.adapter.add(\"classPrefix\", this.modalPrefix);\n }\n return popups;\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates, opens, and returns a new [[Popup]] window.\r\n *\r\n * `text` can be any valid HTML.\r\n *\r\n * `title` is currently not supported.\r\n *\r\n * @param text Popup contents\r\n * @param title Popup title\r\n * @return Popup instance\r\n */\n Sprite.prototype.openPopup = function (text, title) {\n var svgContainer = this.svgContainer;\n if (svgContainer) {\n return svgContainer.openPopup(text, title);\n }\n };\n /**\r\n * Closes all currently open popup windows\r\n */\n Sprite.prototype.closeAllPopups = function () {\n var svgContainer = this.svgContainer;\n if (svgContainer) {\n svgContainer.closeAllPopups();\n }\n };\n Object.defineProperty(Sprite.prototype, \"x\", {\n /**\r\n * @return X coordinate\r\n */\n get: function get() {\n return this.getPropertyValue(\"x\");\n },\n /**\r\n * ==========================================================================\r\n * POSITIONAL PROPERTIES AND RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Element's absolute or relative X coordinate.\r\n *\r\n * If setting both X and Y, please consider using `moveTo()` method instead,\r\n * as it will be faster to set both coordinates at once.\r\n *\r\n * @param value X coordinate\r\n */\n set: function set(value) {\n if (!this.isDragged) {\n this.setPercentProperty(\"x\", value, false, true, this._positionPrecision, true);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"pixelX\", {\n /**\r\n * Returns element's current absolute X coordinate in pixels.\r\n *\r\n * @readonly\r\n * @return X coordinate (px)\r\n */\n get: function get() {\n return this.adapter.apply(\"pixelX\", $math.fitToRange(this.getPixelX(this.x), this.minX, this.maxX));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"relativeX\", {\n /**\r\n * Returns element's current relative X coordinate in [[Percent]].\r\n *\r\n * @return X coordinate ([[Percent]])\r\n */\n get: function get() {\n return this.adapter.apply(\"relativeX\", this.getRelativeX(this.x));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"minX\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Min X (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"minX\");\n },\n /**\r\n * The smallest allowable absolute X coordinate for this element.\r\n *\r\n * This is used to contain element movement within certain boundaries.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Min X (px)\r\n */\n set: function set(value) {\n if ($type.isNumber(value)) {\n value = $math.round(value, this._positionPrecision, true);\n this.setPropertyValue(\"minX\", value, false, true);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"maxX\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Max X (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"maxX\");\n },\n /**\r\n * The biggest allowable absolute X coordinate for this element.\r\n *\r\n * This is used to contain element movement within certain boundaries.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Max X (px)\r\n */\n set: function set(value) {\n if ($type.isNumber(value)) {\n value = $math.round(value, this._positionPrecision, true);\n this.setPropertyValue(\"maxX\", value, false, true);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"y\", {\n /**\r\n * @return Y coordinate\r\n */\n get: function get() {\n return this.getPropertyValue(\"y\");\n },\n /**\r\n * Element's absolute or relative Y coordinate.\r\n *\r\n * If setting both X and Y, please consider using `moveTo()` method instead,\r\n * as it will be faster to set both coordinates at once.\r\n *\r\n * @param value Y coordinate\r\n */\n set: function set(value) {\n if (!this.isDragged) {\n this.setPercentProperty(\"y\", value, false, true, this._positionPrecision, true);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"pixelY\", {\n /**\r\n * Returns element's current absolute Y coordinate in pixels.\r\n *\r\n * @readonly\r\n * @return Y coordinate (px)\r\n */\n get: function get() {\n return this.adapter.apply(\"pixelY\", $math.fitToRange(this.getPixelY(this.y), this.minY, this.maxY));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"relativeY\", {\n /**\r\n * Returns element's current relative Y coordinate in [[Percent]].\r\n *\r\n * @readonly\r\n * @return Y coordinate ([[Percent]])\r\n */\n get: function get() {\n return this.adapter.apply(\"relativeY\", this.getRelativeX(this.y));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"minY\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Min Y (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"minY\");\n },\n /**\r\n * The smallest allowable absolute Y coordinate for this element.\r\n *\r\n * This is used to contain element movement within certain boundaries.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Min Y (px)\r\n */\n set: function set(value) {\n if ($type.isNumber(value)) {\n value = $math.round(value, this._positionPrecision, true);\n this.setPropertyValue(\"minY\", value, false, true);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"maxY\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Max Y (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"maxY\");\n },\n /**\r\n * The biggest allowable absolute Y coordinate for this element.\r\n *\r\n * This is used to contain element movement within certain boundaries.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Max Y (px)\r\n */\n set: function set(value) {\n if ($type.isNumber(value)) {\n value = $math.round(value, this._positionPrecision, true);\n this.setPropertyValue(\"maxY\", value, false, true);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"dx\", {\n /**\r\n * @return Horizontal offset (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"dx\");\n },\n /**\r\n * A horizontal offset for the element in pixels.\r\n *\r\n * Can be negative value for offset to the left.\r\n *\r\n * @param value Horizontal offset (px)\r\n */\n set: function set(value) {\n if ($type.isNumber(value)) {\n value = $math.round(value, this._positionPrecision, true);\n this.setPropertyValue(\"dx\", value, false, true);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"dy\", {\n /**\r\n * @return Vertical offset (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"dy\");\n },\n /**\r\n * A vertical offset for the element in pixels.\r\n *\r\n * Can be negative value for offset upwards.\r\n *\r\n * @param value Vertical offset (px)\r\n */\n set: function set(value) {\n if ($type.isNumber(value)) {\n value = $math.round(value, this._positionPrecision, true);\n this.setPropertyValue(\"dy\", value, false, true);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"rotation\", {\n /**\r\n * @return Rotation (0-360)\r\n */\n get: function get() {\n return this.getPropertyValue(\"rotation\");\n },\n /**\r\n * Rotation of the element in degrees. (0-360)\r\n *\r\n * @param value Rotation (0-360)\r\n */\n set: function set(value) {\n value = $type.toNumber(value);\n if (!$type.isNumber(value)) {\n value = 0;\n }\n this.setPropertyValue(\"rotation\", value, false, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"align\", {\n /**\r\n * @return Horizontal align\r\n */\n get: function get() {\n return this.getPropertyValue(\"align\");\n },\n /**\r\n * Controls horizontal alignment of the element.\r\n *\r\n * This is used by parent [[Container]] when layouting its children.\r\n *\r\n * @param value Horizontal align\r\n */\n set: function set(value) {\n value = $type.toText(value);\n if (this.setPropertyValue(\"align\", value)) {\n if (this.parent) {\n this.parent.invalidateLayout();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"valign\", {\n /**\r\n * @return Vertical align\r\n */\n get: function get() {\n return this.getPropertyValue(\"valign\");\n },\n /**\r\n * Controls vertical alignment of the element.\r\n *\r\n * This is used by parent [[Container]] when layouting its children.\r\n *\r\n * @param value Vertical align\r\n */\n set: function set(value) {\n value = $type.toText(value);\n if (this.setPropertyValue(\"valign\", value)) {\n if (this.parent) {\n this.parent.invalidateLayout();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"horizontalCenter\", {\n /**\r\n * @return Horizontal center\r\n */\n get: function get() {\n return this.getPropertyValue(\"horizontalCenter\");\n },\n /**\r\n * Controls which part of the element to treat as a horizontal center.\r\n *\r\n * The setting will be used when positioning, resizing and rotating the\r\n * element.\r\n *\r\n * @param value Horizontal center\r\n */\n set: function set(value) {\n value = $type.toText(value);\n if (this.setPropertyValue(\"horizontalCenter\", value)) {\n this.updateCenter();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"verticalCenter\", {\n /**\r\n * @return Vertical center\r\n */\n get: function get() {\n return this.getPropertyValue(\"verticalCenter\");\n },\n /**\r\n * Controls which part of the element to treat as a vertical center.\r\n *\r\n * The setting will be used when positioning, resizing and rotating the\r\n * element.\r\n *\r\n * @param value Vertical center\r\n */\n set: function set(value) {\n value = $type.toText(value);\n if (this.setPropertyValue(\"verticalCenter\", value)) {\n this.updateCenter();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"maxWidth\", {\n /**\r\n * @return Maximum width (px)\r\n */\n get: function get() {\n var maxWidth = this.getPropertyValue(\"maxWidth\");\n if (!$type.isNumber(maxWidth)) {\n if (this.parent) {\n return this.parent.maxWidth;\n }\n }\n return maxWidth;\n },\n /**\r\n * ==========================================================================\r\n * DIMENSIONAL PROPERTIES AND RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Maximum allowed width for the element in pixels.\r\n *\r\n * @param value Maximum width (px)\r\n */\n set: function set(value) {\n this.setMaxWidth(value);\n },\n enumerable: true,\n configurable: true\n });\n Sprite.prototype.setMaxWidth = function (value) {\n var prevWidth = this.maxWidth;\n var prevHeight = this.maxHeight;\n if (this.setPropertyValue(\"maxWidth\", value)) {\n if ($type.isNumber(this.relativeWidth)) {\n this.invalidate();\n }\n var event_2 = {\n type: \"maxsizechanged\",\n target: this,\n previousWidth: prevWidth,\n previousHeight: prevHeight\n };\n this.dispatchImmediately(\"maxsizechanged\", event_2);\n }\n };\n Object.defineProperty(Sprite.prototype, \"maxHeight\", {\n /**\r\n * @return Maximum height (px)\r\n */\n get: function get() {\n var maxHeight = this.getPropertyValue(\"maxHeight\");\n if (!$type.isNumber(maxHeight)) {\n if (this.parent) {\n return this.parent.maxHeight;\n }\n }\n return maxHeight;\n },\n /**\r\n * Maximum allowed height for the element in pixels.\r\n *\r\n * @param value Maximum height (px)\r\n */\n set: function set(value) {\n this.setMaxHeight(value);\n },\n enumerable: true,\n configurable: true\n });\n Sprite.prototype.setMaxHeight = function (value) {\n var prevWidth = this.maxWidth;\n var prevHeight = this.maxHeight;\n if (this.setPropertyValue(\"maxHeight\", value)) {\n if ($type.isNumber(this.relativeHeight)) {\n this.invalidate();\n }\n var event_3 = {\n type: \"maxsizechanged\",\n target: this,\n previousWidth: prevWidth,\n previousHeight: prevHeight\n };\n this.dispatchImmediately(\"maxsizechanged\", event_3);\n }\n };\n Object.defineProperty(Sprite.prototype, \"minWidth\", {\n /**\r\n * @return Minimum width (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"minWidth\");\n },\n /**\r\n * Minimum width of the element in pixels.\r\n *\r\n * Set to `undefined` to remove the limit.\r\n *\r\n * @param value Minimum width (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"minWidth\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"minHeight\", {\n /**\r\n * @return Minimum height (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"minHeight\");\n },\n /**\r\n * Minimum height for the element in pixels.\r\n *\r\n * Set to `undefined` to remove the limit.\r\n *\r\n * @param value Minimum height (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"minHeight\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"width\", {\n /**\r\n * @return Width (absolute or relative)\r\n */\n get: function get() {\n return this.getPropertyValue(\"width\");\n },\n /**\r\n * Element's absolute or relative width.\r\n *\r\n * The width can either be absolute, set in numeric pixels, or relative, set\r\n * in [[Percent]].\r\n *\r\n * Relative width will be calculated using closest measured ancestor\r\n * [[Container]].\r\n *\r\n * @param value Width (numeric in pixels or relative)\r\n */\n set: function set(value) {\n var changed = this.setPercentProperty(\"width\", value, true, false, this._positionPrecision, true);\n if (changed) {\n this.percentWidth = undefined;\n this.relativeWidth = undefined;\n if (value instanceof Percent) {\n this.percentWidth = value.percent;\n if ($type.isNumber(this._pixelWidth)) {\n this.maxWidth = undefined;\n }\n this._pixelWidth = undefined;\n } else {\n this._pixelWidth = Number(value);\n //this._measuredWidth = this._pixelWidth;\n this.maxWidth = this._pixelWidth;\n }\n this.invalidatePosition();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"height\", {\n /**\r\n * @return height (absolute or relative)\r\n */\n get: function get() {\n return this.getPropertyValue(\"height\");\n },\n /**\r\n * Element's absolute or relative height.\r\n *\r\n * The height can either be absolute, set in numeric pixels, or relative, set\r\n * in [[Percent]].\r\n *\r\n * Relative height will be calculated using closest measured ancestor\r\n * [[Container]].\r\n *\r\n * @param value Height (numeric in pixels or relative)\r\n */\n set: function set(value) {\n var changed = this.setPercentProperty(\"height\", value, true, false, this._positionPrecision, true);\n if (changed) {\n this.percentHeight = undefined;\n this._relativeHeight = undefined;\n if (value instanceof Percent) {\n this.percentHeight = value.percent;\n if ($type.isNumber(this._pixelHeight)) {\n this.maxHeight = undefined;\n }\n this._pixelHeight = undefined;\n } else {\n this._pixelHeight = Number(value);\n //this._measuredHeight = this._pixelHeight;\n this.maxHeight = this._pixelHeight; // yes, we reset maxWidth\n }\n this.invalidatePosition();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"pixelWidth\", {\n /**\r\n * Returns element's width in pixels, if width was set. For actual width use measuredWidth property.\r\n *\r\n * @readonly\r\n * @return Width (px)\r\n */\n get: function get() {\n var width;\n if ($type.isNumber(this.percentWidth)) {\n width = this.maxWidth;\n } else if ($type.isNumber(this._pixelWidth)) {\n width = this._pixelWidth;\n } else {\n width = 0;\n }\n var minWidth = this.minWidth;\n if (minWidth != null && width < minWidth) {\n width = minWidth;\n }\n return this.adapter.apply(\"pixelWidth\", $math.round(width, this._positionPrecision, true));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"pixelHeight\", {\n /**\r\n * Returns element's height in pixels. For actual height use measuredHeight property.\r\n *\r\n * @readonly\r\n * @return Height (px)\r\n */\n get: function get() {\n var height;\n if ($type.isNumber(this.percentHeight)) {\n height = this.maxHeight;\n } else if ($type.isNumber(this._pixelHeight)) {\n height = this._pixelHeight;\n } else {\n height = 0; //this._measuredHeightSelf;\n }\n var minHeight = this.minHeight;\n if (minHeight != null && height < minHeight) {\n height = minHeight;\n }\n return this.adapter.apply(\"pixelHeight\", $math.round(height, this._positionPrecision, true));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"relativeWidth\", {\n /**\r\n * @return Relative width\r\n * @ignore\r\n */\n get: function get() {\n var relativeWidth = this._relativeWidth;\n if ($type.isNumber(relativeWidth)) {\n return this.adapter.apply(\"relativeWidth\", relativeWidth);\n }\n },\n /**\r\n * Element's relative width in [[Percent]].\r\n * @ignore\r\n *\r\n * @param value Relative width\r\n */\n set: function set(value) {\n if (this._relativeWidth != value) {\n this._relativeWidth = value;\n //\t\t\tthis.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"relativeHeight\", {\n /**\r\n * @return Relative height\r\n * @ignore\r\n */\n get: function get() {\n var relativeHeight = this._relativeHeight;\n if ($type.isNumber(relativeHeight)) {\n return this.adapter.apply(\"relativeHeight\", relativeHeight);\n }\n },\n /**\r\n * Element's relative height in [[Percent]].\r\n *\r\n * @param value Relative height\r\n * @ignore\r\n */\n set: function set(value) {\n if (this._relativeHeight != value) {\n this._relativeHeight = value;\n //\t\t\tthis.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"measuredWidth\", {\n /**\r\n * Returns element's measured width in pixels.\r\n *\r\n * A measured width is actual width of contents plus `paddingRight` and* `paddingLeft`, relative to sprite parent, meaning that\r\n * rotation and scale is taken into account.\r\n *\r\n * @readonly\r\n * @return Width (px)\r\n */\n get: function get() {\n if (this.disabled || this.__disabled) {\n return 0;\n }\n return this.adapter.apply(\"measuredWidth\", this._measuredWidth);\n // it's not good to fit to min/max range as then rotations and scale won't be taken into account\n //return this.adapter.apply(\"measuredWidth\", $math.fitToRange(this._measuredWidth, this.minWidth, this.maxWidth));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"measuredHeight\", {\n /**\r\n * Returns elements's measured height in pixels.\r\n *\r\n * A measured height is actual height of contents plus `paddingTop` and `paddingBottom`, relative to sprite parent, meaning that\r\n * rotation and scale taken into account.\r\n *\r\n * @readonly\r\n * @return Height (px)\r\n */\n get: function get() {\n if (this.disabled || this.__disabled) {\n return 0;\n }\n // it's not good to fit to min/max range as then rotations and scale won't be taken into account\n //return this.adapter.apply(\"measuredHeight\", $math.fitToRange(this._measuredHeight, this.minHeight, this.maxHeight));\n return this.adapter.apply(\"measuredHeight\", this._measuredHeight);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"outerWidth\", {\n /**\r\n * Returns element's measured width plus its left and right margins in\r\n * pixels.\r\n *\r\n * @readonly\r\n * @return Outer width (px)\r\n */\n get: function get() {\n return this.adapter.apply(\"outerWidth\", this.pixelWidth + this.pixelMarginRight + this.pixelMarginLeft);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"outerHeight\", {\n /**\r\n * Returns element's measured height plus its top and bottom margins in\r\n * pixels.\r\n *\r\n * @readonly\r\n * @return Outer height (px)\r\n */\n get: function get() {\n return this.adapter.apply(\"outerHeight\", this.pixelHeight + this.pixelMarginTop + this.pixelMarginBottom);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"innerWidth\", {\n /**\r\n * Returns element's measured inner width in pixels.\r\n *\r\n * Inner width is actual available space for content, e.g. element's width\r\n * minus horizontal padding.\r\n *\r\n * @readonly\r\n * @return Inner width (px)\r\n */\n get: function get() {\n return this.adapter.apply(\"innerWidth\", Math.max(0, this.pixelWidth - this.pixelPaddingRight - this.pixelPaddingLeft));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"innerHeight\", {\n /**\r\n * Returns element's measured inner height in pixels.\r\n *\r\n * Inner height is actual available space for content, e.g. element's height\r\n * minus vertical padding.\r\n *\r\n * @readonly\r\n * @return Inner height (px)\r\n */\n get: function get() {\n return this.adapter.apply(\"innerHeight\", Math.max(0, this.pixelHeight - this.pixelPaddingTop - this.pixelPaddingBottom));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"globalScale\", {\n /**\r\n * Returns element's current \"global\" scale.\r\n *\r\n * Scale values accumulate over hierarchy of elements.\r\n *\r\n * E.g. if a [[Container]] has `scale = 2` and it's child has a `scale = 2`,\r\n * the child's `globalScale` will be 4. (a multitude of `2 x 2`)\r\n *\r\n * @readonly\r\n * @return Global scale\r\n */\n get: function get() {\n var scale = this.scale;\n if (this.parent) {\n scale = scale * this.parent.globalScale;\n }\n return this.adapter.apply(\"globalScale\", scale);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"scale\", {\n /**\r\n * @return Scale (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"scale\");\n },\n /**\r\n * Scale of the element.\r\n *\r\n * The scale is set from 0 (element reduced to nothing) to 1 (default size).\r\n * * 2 will mean element is increased twice.\r\n * * 0.5 - reduced by 50%.\r\n *\r\n * Etc.\r\n *\r\n * @param value Scale (0-1)\r\n */\n set: function set(value) {\n value = $type.toNumber(value);\n if (value < 0) {\n value = 0;\n }\n if (value != this.getPropertyValue(\"scale\")) {\n this.setPropertyValue(\"scale\", value, false, true);\n this.handleGlobalScale();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets all four margins for the element at once.\r\n *\r\n * Margins are set in pixels.\r\n *\r\n * @param top Top margin\r\n * @param right Right margin\r\n * @param bottom Bottom margin\r\n * @param left Left margin\r\n * @return Current element\r\n */\n Sprite.prototype.margin = function (top, right, bottom, left) {\n this.marginTop = top;\n this.marginRight = right;\n this.marginBottom = bottom;\n this.marginLeft = left;\n return this;\n };\n Object.defineProperty(Sprite.prototype, \"marginLeft\", {\n /**\r\n * @return Margin value\r\n */\n get: function get() {\n return this.getPropertyValue(\"marginLeft\");\n },\n /**\r\n * Left margin - absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Margin value\r\n */\n set: function set(value) {\n this.setPercentProperty(\"marginLeft\", value, true, true, this._positionPrecision, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"marginRight\", {\n /**\r\n * @return Margin value\r\n */\n get: function get() {\n return this.getPropertyValue(\"marginRight\");\n },\n /**\r\n * Right margin - absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Margin value\r\n */\n set: function set(value) {\n this.setPercentProperty(\"marginRight\", value, true, true, this._positionPrecision, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"marginTop\", {\n /**\r\n * @return Margin value\r\n */\n get: function get() {\n return this.getPropertyValue(\"marginTop\");\n },\n /**\r\n * Top margin - absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Margin value\r\n */\n set: function set(value) {\n this.setPercentProperty(\"marginTop\", value, true, true, this._positionPrecision, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"marginBottom\", {\n /**\r\n * @return Margin value\r\n */\n get: function get() {\n return this.getPropertyValue(\"marginBottom\");\n },\n /**\r\n * Bottom margin - absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Margin value\r\n */\n set: function set(value) {\n this.setPercentProperty(\"marginBottom\", value, true, true, this._positionPrecision, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"pixelMarginRight\", {\n /**\r\n * Returns current right margin in pixels.\r\n *\r\n * @readonly\r\n * @return Right margin (px)\r\n */\n get: function get() {\n return this.adapter.apply(\"pixelMarginRight\", this.getPixelX(this.marginRight));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"relativeMarginRight\", {\n /**\r\n * Returns current relative right margin.\r\n *\r\n * @readonly\r\n * @return Relative right margin\r\n */\n get: function get() {\n // @todo Maybe use [[Percent]]?\n return this.adapter.apply(\"relativeMarginRight\", this.getRelativeX(this.marginRight));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"pixelMarginLeft\", {\n /**\r\n * Returns current left margin in pixels.\r\n *\r\n * @readonly\r\n * @return Left margin (px)\r\n */\n get: function get() {\n return this.adapter.apply(\"pixelMarginLeft\", this.getPixelX(this.marginLeft));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"relativeMarginLeft\", {\n /**\r\n * Returns current relative left margin.\r\n *\r\n * @readonly\r\n * @return Relative left margin\r\n */\n get: function get() {\n //@todo Maybe use [[Percent]]?\n return this.adapter.apply(\"relativeMarginLeft\", this.getRelativeX(this.marginLeft));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"pixelMarginTop\", {\n /**\r\n * Returns current top margin in pixels.\r\n *\r\n * @readonly\r\n * @return Top margin (px)\r\n */\n get: function get() {\n return this.adapter.apply(\"pixelMarginTop\", this.getPixelY(this.marginTop));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"relativeMarginTop\", {\n /**\r\n * Returns current relative top margin.\r\n *\r\n * @readonly\r\n * @return Relative top margin\r\n */\n get: function get() {\n // @todo Maybe use [[Percent]]?\n return this.adapter.apply(\"relativeMarginTop\", this.getRelativeY(this.marginTop));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"pixelMarginBottom\", {\n /**\r\n * Returns current bottom margin in pixels.\r\n *\r\n * @readonly\r\n * @return Bottom margin (px)\r\n */\n get: function get() {\n return this.adapter.apply(\"pixelMarginBottom\", this.getPixelY(this.marginBottom));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"relativeMarginBottom\", {\n /**\r\n * Returns current relative bottom margin.\r\n *\r\n * @readonly\r\n * @return Relative bottom margin\r\n */\n get: function get() {\n // @todo Maybe use [[Percent]]?\n return this.adapter.apply(\"relativeMarginBottom\", this.getRelativeY(this.marginBottom));\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets padding for the element in pixels.\r\n *\r\n * @param top Top padding (px)\r\n * @param right Right padding (px)\r\n * @param bottom Bottom padding (px)\r\n * @param left Left padding (px)\r\n * @return Element\r\n */\n Sprite.prototype.padding = function (top, right, bottom, left) {\n this.paddingTop = top;\n this.paddingRight = right;\n this.paddingBottom = bottom;\n this.paddingLeft = left;\n return this;\n };\n Object.defineProperty(Sprite.prototype, \"paddingLeft\", {\n /**\r\n * @return Padding value\r\n */\n get: function get() {\n return this.getPropertyValue(\"paddingLeft\");\n },\n /**\r\n * Left padding - absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Padding value\r\n */\n set: function set(value) {\n this.setPercentProperty(\"paddingLeft\", value, true, true, this._positionPrecision, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"paddingRight\", {\n /**\r\n * @return Padding value\r\n */\n get: function get() {\n return this.getPropertyValue(\"paddingRight\");\n },\n /**\r\n * Right padding - absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Padding value\r\n */\n set: function set(value) {\n this.setPercentProperty(\"paddingRight\", value, true, true, this._positionPrecision, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"paddingTop\", {\n /**\r\n * @return Padding value\r\n */\n get: function get() {\n return this.getPropertyValue(\"paddingTop\");\n },\n /**\r\n * Top padding - absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Padding value\r\n */\n set: function set(value) {\n this.setPercentProperty(\"paddingTop\", value, true, true, this._positionPrecision, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"paddingBottom\", {\n /**\r\n * @return Padding value\r\n */\n get: function get() {\n return this.getPropertyValue(\"paddingBottom\");\n },\n /**\r\n * Bottom padding - absolute (px) or relative ([[Percent]]).\r\n *\r\n * @param value Padding value\r\n */\n set: function set(value) {\n this.setPercentProperty(\"paddingBottom\", value, true, true, this._positionPrecision, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"pixelPaddingRight\", {\n /**\r\n * Returns current right padding in pixels.\r\n *\r\n * @readonly\r\n * @return Right padding (px)\r\n */\n get: function get() {\n return this.getPixelX(this.paddingRight);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"relativePaddingRight\", {\n /**\r\n * Returns current relative right padding.\r\n *\r\n * @readonly\r\n * @return Relative right padding\r\n */\n get: function get() {\n // @todo Maybe use [[Percent]]?\n return this.getRelativeX(this.paddingRight);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"pixelPaddingLeft\", {\n /**\r\n * Returns current left padding in pixels.\r\n *\r\n * @readonly\r\n * @return Left padding (px)\r\n */\n get: function get() {\n return this.getPixelX(this.paddingLeft);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"relativePaddingLeft\", {\n /**\r\n * Returns current relative left padding.\r\n *\r\n * @readonly\r\n * @return Relative left padding\r\n */\n get: function get() {\n // @todo Maybe use [[Percent]]?\n return this.getRelativeX(this.paddingLeft);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"pixelPaddingTop\", {\n /**\r\n * Returns current top padding in pixels.\r\n *\r\n * @readonly\r\n * @return Top padding (px)\r\n */\n get: function get() {\n return this.getPixelY(this.paddingTop);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"relativePaddingTop\", {\n /**\r\n * Returns current relative top padding.\r\n *\r\n * @readonly\r\n * @return Relative top padding\r\n */\n get: function get() {\n // @todo Maybe use [[Percent]]?\n return this.getRelativeY(this.paddingTop);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"pixelPaddingBottom\", {\n /**\r\n * Returns current bottom padding in pixels.\r\n *\r\n * @readonly\r\n * @return Bottom padding (px)\r\n */\n get: function get() {\n return this.getPixelY(this.paddingBottom);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"relativePaddingBottom\", {\n /**\r\n * Returns current relative bottom padding.\r\n *\r\n * @readonly\r\n * @return Relative bottom padding\r\n */\n get: function get() {\n // @todo Maybe use [[Percent]]?\n return this.getRelativeY(this.paddingBottom);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"path\", {\n /**\r\n * @return Path of a Sprite element\r\n */\n get: function get() {\n return this.getPropertyValue(\"path\");\n },\n /**\r\n * ==========================================================================\r\n * APPEARANCE-RELATED PROPERTIES AND RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Path of Sprite element\r\n */\n set: function set(value) {\n this.setPath(value);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n */\n Sprite.prototype.setPath = function (value) {\n if (this.setPropertyValue(\"path\", value)) {\n if (!this.element || !(this.element instanceof SVGPathElement)) {\n this.element = this.paper.add(\"path\");\n }\n this.element.attr({\n \"d\": value\n });\n this.invalidatePosition();\n // otherwise is 0x0\n if (!this.inited) {\n this.events.once(\"inited\", this.validatePosition, this, false);\n }\n return true;\n }\n return false;\n };\n Object.defineProperty(Sprite.prototype, \"fillModifier\", {\n /**\r\n * @return Fill color modifier\r\n */\n get: function get() {\n return this.getPropertyValue(\"fillModifier\");\n },\n /**\r\n * [[ColorModifier]] that can be used to modify color and pattern of the\r\n * element's fill, e.g. create gradients.\r\n *\r\n * @param value Fill color modifiier\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"fillModifier\", value)) {\n this.setFill(this.fill);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"strokeModifier\", {\n /**\r\n * @return Stroke color modifier\r\n */\n get: function get() {\n return this.getPropertyValue(\"strokeModifier\");\n },\n /**\r\n * [[ColorModifier]] that can be used to modify color and pattern of the\r\n * element's stroke (outline), e.g. create gradients.\r\n *\r\n * @param value Stroke color modifier\r\n */\n set: function set(value) {\n this.setPropertyValue(\"strokeModifier\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"fillOpacity\", {\n /**\r\n * @return Opacity (0-9)\r\n */\n get: function get() {\n return this.getPropertyValue(\"fillOpacity\");\n },\n /**\r\n * Element's fill opacity.\r\n *\r\n * Opacity ranges from 0 (fully transparent) to 1 (fully opaque).\r\n *\r\n * @param value Opacity (0-1)\r\n */\n set: function set(value) {\n value = $math.toNumberRange(value, 0, 1);\n if (this.setPropertyValue(\"fillOpacity\", value)) {\n this.setSVGAttribute({\n \"fill-opacity\": value\n });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"fill\", {\n /**\r\n * @return Fill\r\n */\n get: function get() {\n return this.getPropertyValue(\"fill\");\n },\n /**\r\n * Element's fill color or pattern.\r\n *\r\n * @param value Fill\r\n */\n set: function set(value) {\n this.setFill(value);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets actual `fill` property on the SVG element, including applicable color\r\n * modifiers.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Fill\r\n */\n Sprite.prototype.setFill = function (value) {\n if (!$type.isObject(value)) {\n value = toColor(value);\n }\n if (this.setColorProperty(\"fill\", value) || this.fillModifier) {\n // this can not go into next if, as value is turned to Gradient\n if (value instanceof Color) {\n if (this.fillModifier) {\n value = this.fillModifier.modify(value);\n }\n }\n this.realFill = value;\n // todo: review this place when some Color type will be added\n if (value instanceof Color) {\n this.setSVGAttribute({\n \"fill\": value.toString()\n });\n } else if (!$type.hasValue(value)) {\n this.removeSVGAttribute(\"fill\");\n } else if (value instanceof Pattern || value instanceof LinearGradient || value instanceof RadialGradient) {\n var fill = value;\n fill.paper = this.paper;\n this.setSVGAttribute({\n \"fill\": \"url(\\\"\" + $utils.getBaseURI() + fill.id + \"\\\")\"\n });\n }\n }\n };\n Object.defineProperty(Sprite.prototype, \"opacity\", {\n /**\r\n * @return Opacity (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"opacity\");\n },\n /**\r\n * Element's opacity.\r\n *\r\n * Opacity setting can range from 0 (fully transparent) to 1 (fully opaque).\r\n *\r\n * ATTENTION: It is highly not recommended to use `opacity` directly on the\r\n * element. The charts use `opacity` to hide/show elements, so your setting\r\n * might be lost if element is hidden and then later shown.\r\n *\r\n * Instead use methods `hide()` and `show()` to completely toggle off and on\r\n * the element.\r\n *\r\n * Or, use properties `fillOpacity` and `strokeOpacity`, if you need to make\r\n * the element semi-transparent.\r\n *\r\n * @param value Opacity (0-1)\r\n */\n set: function set(value) {\n value = $math.toNumberRange(value, 0, 1);\n if (this.setPropertyValue(\"opacity\", value)) {\n this.setSVGAttribute({\n \"opacity\": value\n });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"stroke\", {\n /**\r\n * @return Stroke setting\r\n */\n get: function get() {\n return this.getPropertyValue(\"stroke\");\n },\n /**\r\n * Element's stroke (outline) color or pattern.\r\n *\r\n * @param value Stroke setting\r\n */\n set: function set(value) {\n this.setStroke(value);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets actual `stroke` property on the SVG element, including applicable\r\n * color modifiers.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Stroke setting\r\n */\n Sprite.prototype.setStroke = function (value) {\n if (!$type.isObject(value)) {\n value = toColor(value);\n }\n if (this.setColorProperty(\"stroke\", value) || this.strokeModifier) {\n // this can not go into next if, as value is turned to Gradient\n if (value instanceof Color) {\n if (this.strokeModifier) {\n value = this.strokeModifier.modify(value);\n }\n }\n this.realStroke = value;\n if (value instanceof Color) {\n if (value.hex == \"none\") {\n this.removeSVGAttribute(\"stroke\");\n } else {\n this.setSVGAttribute({\n \"stroke\": value.toString()\n });\n }\n } else if (!$type.hasValue(value)) {\n this.removeSVGAttribute(\"stroke\");\n } else if (value instanceof Pattern || value instanceof LinearGradient || value instanceof RadialGradient) {\n var stroke = value;\n stroke.paper = this.paper;\n this.setSVGAttribute({\n \"stroke\": \"url(\\\"\" + $utils.getBaseURI() + stroke.id + \"\\\")\"\n });\n }\n }\n };\n Object.defineProperty(Sprite.prototype, \"strokeOpacity\", {\n /**\r\n * @return Opacity (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"strokeOpacity\");\n },\n /**\r\n * Stroke (outline) opacity.\r\n *\r\n * The values may range from 0 (fully transparent) to 1 (fully opaque).\r\n *\r\n * @param value Opacity (0-1)\r\n */\n set: function set(value) {\n value = $math.toNumberRange(value, 0, 1);\n if (this.setPropertyValue(\"strokeOpacity\", value)) {\n this.setSVGAttribute({\n \"stroke-opacity\": value\n });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"nonScalingStroke\", {\n /**\r\n * @return Do not scale stroke (outline)\r\n */\n get: function get() {\n return this.getPropertyValue(\"nonScalingStroke\");\n },\n /**\r\n * Controls if the element's stroke (outline) should remain keep constant\r\n * thicnkess and do not scale when the whole element is resized.\r\n *\r\n * @param value Do not scale stroke (outline)\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n if (this.setPropertyValue(\"nonScalingStroke\", value)) {\n this.strokeWidth = this.strokeWidth;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"nonScaling\", {\n /**\r\n * @return Is element scaleable?\r\n */\n get: function get() {\n return this.getPropertyValue(\"nonScaling\");\n },\n /**\r\n * Controls if element should keep constant size and not scale even if there is\r\n * space available, or it does not fit.\r\n *\r\n * @param value Is element scaleable?\r\n */\n set: function set(value) {\n // @todo Description (review)\n value = $type.toBoolean(value);\n this.setPropertyValue(\"nonScaling\", value, false, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"strokeWidth\", {\n /**\r\n * @return Thickness (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"strokeWidth\");\n },\n /**\r\n * Stroke (outline) thickness in pixels.\r\n *\r\n * @param value Thickness (px)\r\n */\n set: function set(value) {\n value = $type.toNumber(value);\n this.setPropertyValue(\"strokeWidth\", value, true);\n if (this.nonScalingStroke) {\n if (!$type.isNumber(value)) {\n value = 1;\n }\n value = value / this.globalScale;\n }\n this.setSVGAttribute({\n \"stroke-width\": value\n });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"strokeDasharray\", {\n /**\r\n * @return `stroke-dasharray`\r\n */\n get: function get() {\n return this.getPropertyValue(\"strokeDasharray\");\n },\n /**\r\n * A `stroke-dasharray` for the stroke (outline).\r\n *\r\n * \"Dasharray\" allows setting rules to make lines dashed, dotted, etc.\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray} for more info on `stroke-dasharray`\r\n * @param value `stroke-dasharray`\r\n */\n set: function set(value) {\n value = $type.toText(value);\n if (this.setPropertyValue(\"strokeDasharray\", value)) {\n this.setSVGAttribute({\n \"stroke-dasharray\": value\n });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"strokeDashoffset\", {\n /**\r\n * @return `stroke-dashoffset`\r\n */\n get: function get() {\n return this.getPropertyValue(\"strokeDashoffset\");\n },\n /**\r\n * A `stroke-dashoffset` for the stroke (outline).\r\n *\r\n * \"Dashoffset\" allows setting the start position of the dashes if\r\n * `strokeDasharray` is used.\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dashoffset} for more info on `stroke-dashoffset`\r\n * @param value `stroke-dashoffset`\r\n */\n set: function set(value) {\n value = $type.toNumber(value);\n if (this.setPropertyValue(\"strokeDashoffset\", value)) {\n this.setSVGAttribute({\n \"stroke-dashoffset\": value\n });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"strokeLinecap\", {\n /**\r\n * @return `stroke-linecap`\r\n */\n get: function get() {\n return this.getPropertyValue(\"strokeLinecap\");\n },\n /**\r\n * A `stroke-linecap` to indicate how line ends are drawn.\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Fills_and_Strokes#Stroke} for more info on `stroke-linecap`\r\n * @param value `stroke-linecap`\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"strokeLinecap\", value)) {\n this.setSVGAttribute({\n \"stroke-linecap\": value\n });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"strokeLinejoin\", {\n /**\r\n * @return `stroke-linejoin`\r\n */\n get: function get() {\n return this.getPropertyValue(\"strokeLinejoin\");\n },\n /**\r\n * A `stroke-linejoin` to indicate how line ends are drawn.\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Fills_and_Strokes#Stroke} for more info on `stroke-linejoin`\r\n * @param value `stroke-linejoin`\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"strokeLinejoin\", value)) {\n this.setSVGAttribute({\n \"stroke-linejoin\": value\n });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"shapeRendering\", {\n /**\r\n * @return 'shape-rendering' value\r\n */\n get: function get() {\n return this.getPropertyValue(\"shapeRendering\");\n },\n /**\r\n * An SVG-specific `shape-rendering` value.\r\n *\r\n * `shape-rendering` controls how vector graphics are drawn and rendered.\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering} for more information about `shape-rendering`\r\n * @default \"auto\"\r\n * @param value 'shape-rendering' value\r\n */\n set: function set(value) {\n value = $type.toText(value);\n if (this.setPropertyValue(\"shapeRendering\", value)) {\n this.setSVGAttribute({\n \"shape-rendering\": value\n });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"pixelPerfect\", {\n /**\r\n * @return Use pixel perfect?\r\n */\n get: function get() {\n return this.getPropertyValue(\"pixelPerfect\");\n },\n /**\r\n * Controls if SVG vectors should be drawn with \"pixel\" precision, producing\r\n * perfectly crisp lines on retina displays.\r\n *\r\n * Setting this to `true` might improve visual quality, but may have a\r\n * negative effect on performance.\r\n *\r\n * Different elements use different default setting for `pixelPerfect`.\r\n *\r\n * We recommend leaving this at their default settings, unless there's a\r\n * specific need.\r\n *\r\n * @param value Use pixel perfect?\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n if (value) {\n this._positionPrecision = 0;\n } else {\n this._positionPrecision = 3;\n }\n this.setPropertyValue(\"pixelPerfect\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"rtl\", {\n /**\r\n * @return RTL?\r\n */\n get: function get() {\n if ($type.hasValue(this._rtl)) {\n return this._rtl;\n } else if (this.virtualParent) {\n return this.virtualParent.rtl;\n } else if (this.parent) {\n return this.parent.rtl;\n }\n //this.rtl = false;\n return false;\n },\n /**\r\n * An RTL (right-to-left) setting.\r\n *\r\n * RTL may affect alignment, text, and other visual properties.\r\n *\r\n * @param value `true` for to use RTL\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n this._rtl = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * ==========================================================================\r\n * VISIBILITY AND ORDER PROPERTIES AND RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Reveals hidden element.\r\n *\r\n * Has no effect if element is already visible.\r\n *\r\n * If `duration` is not specified, it will use default.\r\n *\r\n * @param duration Fade in duration (ms)\r\n * @return Animation object if such object was created\r\n */\n Sprite.prototype.show = function (duration) {\n return this.showReal(duration);\n };\n /**\r\n * Performs actual operations to reveal this element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param duration Fade in duration (ms)\r\n * @return Fade in duration (ms)\r\n */\n Sprite.prototype.showReal = function (duration) {\n var _this = this;\n var transition;\n var properties = this.defaultState.properties;\n if (!this.disabled && (this.isHidden || !this.visible || this.isHiding || properties.opacity != null && this.opacity < properties.opacity && !this.isShowing) && !this.isDisposed()) {\n // helps to avoid flicker, as show might change opacity or visibility but item might be at invalid state/position\n if (this.invalid) {\n this.validate();\n }\n if (this.positionInvalid) {\n this.validatePosition();\n }\n if (!$type.isNumber(duration)) {\n duration = this.defaultState.transitionDuration;\n }\n if (this._hideAnimation) {\n this._hideAnimation.kill();\n this._hideAnimation = undefined;\n }\n // Cancel hide handler just in case it was there\n if (this._showHideDisposer) {\n this.removeDispose(this._showHideDisposer);\n }\n this._isHidden = false;\n this.isHiding = false;\n this.isShowing = true;\n // Apply current state\n transition = this.applyCurrentState(duration);\n if (transition && !transition.isFinished()) {\n this._showHideDisposer = transition.events.on(\"animationended\", function () {\n _this.isShowing = false;\n });\n this._disposers.push(this._showHideDisposer);\n } else {\n this.isShowing = false;\n }\n // Make it visible\n var visible = this.defaultState.properties.visible;\n if (!$type.hasValue(visible)) {\n visible = true;\n }\n this.visible = visible;\n // Unhide from screen readers\n this.readerHidden = false;\n // Dispatch \"show\" event\n this.dispatchImmediately(\"shown\");\n }\n return transition;\n };\n /**\r\n * Initiates hiding of Sprite.\r\n * When called it will fade out the the Sprite to transparency, then make it\r\n * invisible.\r\n * @param duration Duration in millisecons\r\n */\n /**\r\n * Hides the element, by applying `hidden` state.\r\n *\r\n * Has no effect if element is already hidden.\r\n *\r\n * If `duration` is not specified, it will use default.\r\n *\r\n * While element is fading out, its `isHiding` property will resolve to\r\n * `true`.\r\n *\r\n * When element is hidden, its `visible` property will resolve to `false`.\r\n *\r\n * @param duration Fade out duration (ms)\r\n * @return hide Animation object if such object was created\r\n */\n Sprite.prototype.hide = function (duration) {\n return this.hideReal(duration);\n };\n /**\r\n * Hides actual SVG elements and handles hiding animations.\r\n *\r\n * @param duration Fade out duration (ms)\r\n * @return Fade out duration (ms)\r\n * @ignore\r\n */\n Sprite.prototype.hideReal = function (duration) {\n var _this = this;\n var transition;\n if (!this.isHiding && this.visible && !this.isDisposed()) {\n this.hideTooltip(0);\n if (this._hideAnimation) {\n this._hideAnimation.kill();\n this._hideAnimation = undefined;\n }\n this.isShowing = false;\n // Cancel hide handler just in case it was there\n if (this._showHideDisposer) {\n this.removeDispose(this._showHideDisposer);\n }\n // Get state\n var hiddenState = this.hiddenState;\n // Transition to \"hidden\" state, provided Sprite has one set\n if (hiddenState) {\n // Yes, we have a \"hidden\" state\n // `setState` will return an `Animation` object which we can set\n // events on\n transition = this.setState(hiddenState, duration, undefined);\n if (transition && !transition.isFinished()) {\n this._hideAnimation = transition;\n this._showHideDisposer = transition.events.on(\"animationended\", function () {\n _this.isHiding = false;\n _this._isHidden = true;\n }, this);\n this._disposers.push(this._showHideDisposer);\n // Thrown everything into `_disposers` just in case Sprite gets\n // destroyed in the meantime\n this._disposers.push(transition);\n } else {\n this.isHiding = false;\n this._isHidden = true;\n }\n } else {\n // No hidden state, let's just set `visible` and call it a day\n this.visible = false;\n this.isHiding = false;\n this._isHidden = true;\n }\n // Hide from screen readers\n this.readerHidden = true;\n // Dispach \"hidden\" event\n this.dispatchImmediately(\"hidden\");\n this.invalidate(); // hide it at once to avoid flickers // validate() causes SO\n }\n if (!$type.isNumber(duration)) {\n duration = this.hiddenState.transitionDuration;\n }\n return transition;\n };\n Object.defineProperty(Sprite.prototype, \"visible\", {\n /**\r\n * Returns current visibility of the element.\r\n *\r\n * @return Visible?\r\n */\n get: function get() {\n return this.getVisibility();\n },\n /**\r\n * Sets visibility of the element.\r\n *\r\n * @param value Visible?\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n this.setVisibility(value);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns visibility value\r\n * @ignore\r\n */\n Sprite.prototype.getVisibility = function () {\n var value = this.getPropertyValue(\"visible\");\n if (!$type.hasValue(value)) {\n value = true;\n }\n return value;\n };\n /**\r\n * Sets `visibility` property:\r\n *\r\n * * `true` - visible\r\n * * `false` - hidden\r\n *\r\n * @param value true - visible, false - hidden\r\n * @return Current visibility\r\n */\n Sprite.prototype.setVisibility = function (value) {\n if (this.setPropertyValue(\"visible\", value)) {\n if (value) {\n this.group.removeAttr(\"visibility\");\n } else {\n this.group.attr({\n \"visibility\": \"hidden\"\n });\n }\n //this.invalidatePosition();\n if (this.events.isEnabled(\"visibilitychanged\")) {\n var event_4 = {\n type: \"visibilitychanged\",\n target: this,\n visible: value\n };\n this.events.dispatchImmediately(\"visibilitychanged\", event_4);\n }\n }\n };\n Object.defineProperty(Sprite.prototype, \"zIndex\", {\n /**\r\n * @return zIndex\r\n */\n get: function get() {\n return this.getPropertyValue(\"zIndex\");\n },\n /**\r\n * A \"zIndex\" of the element.\r\n *\r\n * \"zIndex\" determines the order of how elements are placed over each other.\r\n *\r\n * Higher \"zIndex\" will mean the element will be draw on top of elements\r\n * with lower \"zIndexes\".\r\n *\r\n * @param value zIndex\r\n */\n set: function set(value) {\n value = $type.toNumber(value);\n if (this.setPropertyValue(\"zIndex\", value)) {\n this.dispatch(\"zIndexChanged\");\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Moves the element to the very top in element order, so that it appears\r\n * in front of other elements.\r\n */\n Sprite.prototype.toFront = function () {\n var parent = this.parent;\n if (parent && parent.children.indexOf(this) != parent.children.length - 1) {\n parent.children.moveValue(this, parent.children.length - 1);\n this.dispatch(\"zIndexChanged\");\n }\n };\n /**\r\n * Moves the element to the very bottom in the element order, so that it\r\n * appears behind other elements.\r\n */\n Sprite.prototype.toBack = function () {\n var parent = this.parent;\n if (parent && parent.children.indexOf(this) != 0) {\n parent.children.moveValue(this, 0);\n this.dispatch(\"zIndexChanged\");\n }\n };\n Object.defineProperty(Sprite.prototype, \"tooltip\", {\n /**\r\n * @return Tooltip\r\n */\n get: function get() {\n if (this._tooltip) {\n return this._tooltip;\n } else if (this.virtualParent) {\n return this.virtualParent.tooltip;\n } else if (this.parent) {\n return this.parent.tooltip;\n }\n },\n /**\r\n * ==========================================================================\r\n * TOOLTIP-RELATED PROPERTIES STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * A [[Tooltip]] object to be used when displayed rollover information for\r\n * the element.\r\n *\r\n * @param tooltip Tooltip\r\n */\n set: function set(tooltip) {\n if (this._tooltip) {\n //this._tooltip.dispose();\n this.removeDispose(this._tooltip);\n }\n this._tooltip = tooltip;\n if (tooltip) {\n tooltip.parent = this.tooltipContainer;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"tooltipDataItem\", {\n /**\r\n * @return Tooltip data item\r\n */\n get: function get() {\n var tooltipDataItem = this._tooltipDataItem;\n if (tooltipDataItem) {\n return tooltipDataItem;\n } else {\n return this.dataItem;\n }\n },\n /**\r\n * A [[DataItem]] to use when populating content for the element's\r\n * [[Tooltip]].\r\n *\r\n * @see {@link Tooltip}\r\n * @see {@link DataItem}\r\n * @param value Tooltip data item\r\n */\n set: function set(value) {\n // important: do not dispose tooltip dataItem, as it is some actual data item from data!\n this._tooltipDataItem = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"tooltipColorSource\", {\n /**\r\n * @return Tooltip color source\r\n */\n get: function get() {\n return this._tooltipColorSource;\n },\n /**\r\n * A [[Sprite]] or sprite template to use when getting colors for tooltip. If a template is set,\r\n * tooltip will look for a clone in tooltipDataItem.sprites. If no clone is found, then template colors will be used.\r\n *\r\n * @see {@link Tooltip}\r\n * @see {@link Sprite}\r\n * @param sprite Sprite\r\n */\n set: function set(sprite) {\n this._tooltipColorSource = sprite;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Shows the element's [[Tooltip]].\r\n *\r\n * A tooltip will be populated using text templates in either `tooltipHTML` or\r\n * `tooltipText` as well as data in `tooltipDataItem`.\r\n *\r\n * @see {@link Tooltip}\r\n * @param optional point (sprite-related) to which tooltip must point.\r\n * @return returns true if the tooltip was shown and false if it wasn't (no text was found)\r\n */\n Sprite.prototype.showTooltip = function (point) {\n // do not show if hidden\n var sprite = this;\n while (sprite != undefined) {\n if (!sprite.visible || sprite.disabled || sprite.__disabled) {\n return;\n }\n sprite = sprite.parent;\n }\n if ($type.hasValue(this.tooltipText) || $type.hasValue(this.tooltipHTML)) {\n var tooltip = this.tooltip;\n var tooltipDataItem = this.tooltipDataItem;\n if (tooltip) {\n tooltip.targetSprite = this;\n var colorSource_1 = this;\n var tooltipColorSource_1 = this.tooltipColorSource;\n if ((tooltip.getStrokeFromObject || tooltip.getFillFromObject) && tooltipColorSource_1) {\n if (tooltipColorSource_1.isTemplate) {\n if (tooltipDataItem) {\n $array.eachContinue(tooltipDataItem.sprites, function (sprite) {\n if (sprite.clonedFrom == tooltipColorSource_1) {\n colorSource_1 = sprite;\n return false;\n }\n return true;\n });\n }\n } else {\n colorSource_1 = tooltipColorSource_1;\n }\n }\n if (tooltip.getStrokeFromObject) {\n var stroke = this.stroke;\n var source = colorSource_1;\n while (source.parent != undefined) {\n stroke = source.stroke;\n if (stroke == undefined) {\n source = source.parent;\n }\n if (stroke != undefined) {\n break;\n }\n }\n if (stroke instanceof Color) {\n tooltip.background.animate({\n property: \"stroke\",\n to: stroke\n }, tooltip.animationDuration);\n } else {\n tooltip.background.stroke = stroke;\n }\n }\n // Set data item\n tooltip.dataItem = tooltipDataItem;\n tooltip.label.populateStringFrom = this;\n if (tooltip.getFillFromObject) {\n var fill = this.fill;\n var source = colorSource_1;\n while (source.parent != undefined) {\n fill = source.fill;\n if (fill == undefined || fill instanceof Color && fill.rgb == undefined) {\n source = source.parent;\n } else if (fill != undefined) {\n break;\n }\n }\n if (fill == undefined) {\n fill = color(\"#000000\");\n }\n if (fill instanceof Color) {\n if (!tooltip.visible) {\n tooltip.background.fill = fill;\n } else {\n tooltip.background.animate({\n property: \"fill\",\n to: fill\n }, tooltip.animationDuration);\n }\n } else {\n tooltip.background.fill = fill;\n }\n if (tooltip.autoTextColor && fill instanceof Color) {\n tooltip.label.fill = fill.alternative;\n }\n }\n // Apply tooltip text\n var text = \"\";\n if (this.tooltipHTML) {\n tooltip.html = this.tooltipHTML;\n text = this.tooltipHTML;\n }\n if (this.tooltipText) {\n tooltip.text = this.tooltipText;\n text = this.tooltipText;\n }\n if (this.updateTooltipPosition(point)) {\n // Set accessibility option\n tooltip.readerDescribedBy = this.uidAttr();\n // make label to render to be able to check currentText\n if (tooltip.label.invalid) {\n tooltip.label.validate();\n }\n if (text != undefined && text != \"\" && tooltip.label.currentText != \"\") {\n //@todo: think of how to solve this better\n if (tooltip && !tooltip.parent) {\n tooltip.parent = this.tooltipContainer;\n }\n // Reveal tooltip\n // showing it in 1 ms helps to avoid strange flickering in IE\n var duration = tooltip.defaultState.transitionDuration;\n if (duration <= 0) {\n duration = 1;\n }\n tooltip.show(duration);\n return true;\n }\n } else {\n this.hideTooltip(0);\n }\n }\n }\n return false;\n };\n /**\r\n * @ignore\r\n */\n Sprite.prototype.updateTooltipPosition = function (point) {\n var _this = this;\n if (this.tooltipPosition == \"pointer\") {\n if (this._interactionDisposer) {\n this._interactionDisposer.dispose();\n }\n this._interactionDisposer = getInteraction().body.events.on(\"track\", function (ev) {\n return _this.pointTooltipTo($utils.documentPointToSvg(ev.point, _this.svgContainer.SVGContainer, _this.svgContainer.cssScale), true);\n });\n if (point) {\n return this.pointTooltipTo(point, true);\n }\n } else {\n // Point to the X/Y of this Sprite\n var globalPoint = $utils.spritePointToSvg({\n \"x\": this.tooltipX,\n \"y\": this.tooltipY\n }, this);\n return this.pointTooltipTo(globalPoint);\n }\n };\n /**\r\n * Sets the point the [[Tooltip]] should point to.\r\n *\r\n * @param point Coordinates to point to\r\n * @param instantly Move instantly without animation\r\n */\n Sprite.prototype.pointTooltipTo = function (point, instantly) {\n var tooltip = this.tooltip;\n if (tooltip) {\n if ($math.isInRectangle(point, {\n x: 0,\n y: 0,\n width: this.topParent.maxWidth,\n height: this.topParent.maxHeight\n })) {\n tooltip.pointTo(point, instantly);\n return true;\n }\n }\n return false;\n };\n /**\r\n * Hides element's [[Tooltip]].\r\n *\r\n * @see {@link Tooltip}\r\n */\n Sprite.prototype.hideTooltip = function (duration) {\n var tooltip = this.tooltip;\n if (tooltip) {\n if (tooltip.targetSprite == this) {\n tooltip.targetSprite = undefined;\n }\n tooltip.hide(duration);\n if (this._interactionDisposer) {\n this._interactionDisposer.dispose();\n this._interactionDisposer = undefined;\n }\n }\n };\n Object.defineProperty(Sprite.prototype, \"tooltipHTML\", {\n /**\r\n * @return Tooltip HTML content template\r\n */\n get: function get() {\n return this.getPropertyValue(\"tooltipHTML\");\n },\n /**\r\n * An HTML template to be used to populate [[Tooltip]] contents.\r\n *\r\n * If element has `tooltipDataItem` or `dataItem` set, this will be parsed\r\n * for any data values to be replaced with the values from respective data\r\n * items.\r\n *\r\n * @param value Tooltip HTML content template\r\n */\n set: function set(value) {\n value = $type.toText(value);\n this.hoverable = true;\n if (this.setPropertyValue(\"tooltipHTML\", value)) {\n if (this.tooltip) {\n if (this.tooltip.visible) {\n this.showTooltip();\n }\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"tooltipText\", {\n /**\r\n * @return Tooltip content template\r\n */\n get: function get() {\n return this.getPropertyValue(\"tooltipText\");\n },\n /**\r\n * A text template to be used to populate Tooltip's contents.\r\n *\r\n * If element has `tooltipDataItem` or `dataItem` set, this will be parsed\r\n * for any data values to be replaced with the values from respective data\r\n * items.\r\n *\r\n * This template will also be parsed for any special formatting tags.\r\n *\r\n * @param value Tooltip content template\r\n * @see {@link TextFormatter}\r\n */\n set: function set(value) {\n value = $type.toText(value);\n if (value) {\n this.hoverable = true;\n }\n if (this.setPropertyValue(\"tooltipText\", value)) {\n if (this.tooltip) {\n if (this.tooltip.visible) {\n this.showTooltip();\n }\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"tooltipContainer\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Container\r\n */\n get: function get() {\n if (this._tooltipContainer) {\n return this._tooltipContainer;\n } else if (this.parent) {\n return this.parent.tooltipContainer;\n }\n },\n /**\r\n * A container reference that should be used to place element's\r\n * [[Tooltip]] in.\r\n *\r\n * Will use parent's container if does not have one set.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Container\r\n * @todo Dispose of the old _tooltipContainer ?\r\n */\n set: function set(value) {\n this._tooltipContainer = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"tooltipX\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Tooltip X (px)\r\n */\n get: function get() {\n return this.getTooltipX();\n },\n /**\r\n * X coordinate the [[Tooltip]] should be shown at.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Tooltip X (px)\r\n */\n set: function set(value) {\n value = $type.toNumber(value);\n if (this.setPropertyValue(\"tooltipX\", value) && this.tooltip) {\n this.tooltip.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"tooltipPosition\", {\n /**\r\n * Position\r\n */\n get: function get() {\n return this.getPropertyValue(\"tooltipPosition\");\n },\n /**\r\n * Specifies if [[Tooltip]] should follow the mouse or touch pointer or stay\r\n * at the fixed position.\r\n *\r\n * @param value Position\r\n */\n set: function set(value) {\n this.setPropertyValue(\"tooltipPosition\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"tooltipY\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Tooltip Y (px)\r\n */\n get: function get() {\n return this.getTooltipY();\n },\n /**\r\n * Y coordinate the [[Tooltip]] should be shown at.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Tooltip Y (px)\r\n */\n set: function set(value) {\n value = $type.toNumber(value);\n if (this.setPropertyValue(\"tooltipY\", value) && this.tooltip) {\n this.tooltip.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns Tooltip X coordinate if it's set, or middle of the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return X (px)\r\n */\n Sprite.prototype.getTooltipX = function () {\n var x = this.getPropertyValue(\"tooltipX\");\n if (!$type.isNumber(x)) {\n x = this.maxLeft + this.measuredWidth / 2 - this.pixelPaddingLeft - this.ex; // overflow is know only for measured items, so this is not always good\n }\n return x;\n };\n /**\r\n * Returns Tooltip Y coordinate if it's set, or middle of the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Y (px)\r\n */\n Sprite.prototype.getTooltipY = function () {\n var y = this.getPropertyValue(\"tooltipY\");\n if (!$type.isNumber(y)) {\n y = this.maxTop + this.measuredHeight / 2 - this.pixelPaddingTop - this.ey; // overflow is know only for measured items, so this is not always good\n }\n return y;\n };\n /**\r\n * Displays a modal or console message with error, and halts any further\r\n * processing of this item.\r\n *\r\n * @ignore Exclude from docs\r\n * @param e Error\r\n * @todo Implement from applying further actions to this item\r\n */\n Sprite.prototype.raiseCriticalError = function (e) {\n if (this.svgContainer) {\n this.modal.content = this.adapter.apply(\"criticalError\", e).message;\n this.modal.closable = false;\n this.modal.open();\n this.disabled = true;\n }\n if (options.verbose) {\n console.log(e);\n }\n };\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n Sprite.prototype.processConfig = function (config) {\n if (config) {\n // Tooltip color source\n if ($type.hasValue(config.tooltipColorSource) && $type.isString(config.tooltipColorSource) && this.map.hasKey(config.tooltipColorSource)) {\n config.tooltipColorSource = this.map.getKey(config.tooltipColorSource);\n }\n // Cursor styles\n if ($type.hasValue(config.cursorOverStyle) && $type.isString(config.cursorOverStyle)) {\n config.cursorOverStyle = this.getCursorStyle(config.cursorOverStyle);\n }\n if ($type.hasValue(config.cursorDowntyle) && $type.isString(config.cursorDowntyle)) {\n config.cursorDowntyle = this.getCursorStyle(config.cursorDowntyle);\n }\n if ($type.hasValue(config.cursorOptions)) {\n if ($type.hasValue(config.cursorOptions.overStyle) && $type.isString(config.cursorOptions.overStyle)) {\n config.cursorOptions.overStyle = this.getCursorStyle(config.cursorOptions.overStyle);\n }\n if ($type.hasValue(config.cursorOptions.downStyle) && $type.isString(config.cursorOptions.downStyle)) {\n config.cursorOptions.downStyle = this.getCursorStyle(config.cursorOptions.downStyle);\n }\n }\n }\n _super.prototype.processConfig.call(this, config);\n };\n /**\r\n * Converts string name of the cursor into actual [[MouseCursorStyle]].\r\n *\r\n * @param style Cursor type\r\n * @return Cursor definition\r\n */\n Sprite.prototype.getCursorStyle = function (style) {\n switch (style) {\n case \"grab\":\n return MouseCursorStyle.grab;\n case \"grabbing\":\n return MouseCursorStyle.grabbing;\n case \"pointer\":\n return MouseCursorStyle.pointer;\n case \"horizontalResize\":\n return MouseCursorStyle.horizontalResize;\n case \"verticalResize\":\n return MouseCursorStyle.verticalResize;\n default:\n return MouseCursorStyle[\"default\"];\n }\n };\n /**\r\n * This function is used to sort element's JSON config properties, so that\r\n * some properties that absolutely need to be processed last, can be put at\r\n * the end.\r\n *\r\n * @ignore Exclude from docs\r\n * @param a Element 1\r\n * @param b Element 2\r\n * @return Sorting number\r\n */\n Sprite.prototype.configOrder = function (a, b) {\n if (a == b) {\n return 0;\n }\n // Must come last\n else if (a == \"tooltipColorSource\") {\n return 1;\n } else if (b == \"tooltipColorSource\") {\n return -1;\n } else {\n return _super.prototype.configOrder.call(this, a, b);\n }\n };\n Object.defineProperty(Sprite.prototype, \"isHidden\", {\n /**\r\n * If `sprite.hide()` is called, we set isHidden to true when sprite is hidden.\r\n * This was added becaus hidden state might have visibility set to true and so\r\n * there would not be possible to find out if a sprite is technically hidden or not.\r\n */\n get: function get() {\n if (this._isHidden) {\n return this._isHidden;\n } else if (this._parent) {\n return this._parent.isHidden;\n }\n return false;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"showOnInit\", {\n /**\r\n * @return Show on init?\r\n */\n get: function get() {\n return this.getPropertyValue(\"showOnInit\");\n },\n /**\r\n * If this is set to `true`, Sprite, when inited will be instantly hidden\r\n * (\"hidden\" state applied) and then shown (\"default\" state applied).\r\n *\r\n * If your \"default\" state's `transitionDuration > 0` this will result in\r\n * initial animation from \"hidden\" state to \"default\" state.\r\n *\r\n * If you need a Sprite which has `showOnInit = true` not to be shown\r\n * initially, set `sprite.hidden = true`. Setting `sprite.visible = false`\r\n * will not prevent the animation and the sprite will be shown.\r\n *\r\n * @param value show on init?\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n this.setShowOnInit(value);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n */\n Sprite.prototype.setShowOnInit = function (value) {\n if (this.setPropertyValue(\"showOnInit\", value)) {\n if (!this.isTemplate) {\n if (value && !this.inited && !this.hidden) {\n this._showOnInitDisposer = new MultiDisposer([registry.events.once(\"enterframe\", this.hideInitially, this), this.events.once(\"beforevalidated\", this.hideInitially, this, false), this.events.on(\"inited\", this.appear, this, false)]);\n this._disposers.push(this._showOnInitDisposer);\n } else {\n if (this._showOnInitDisposer) {\n this._showOnInitDisposer.dispose();\n }\n }\n }\n }\n };\n /**\r\n * @ignore\r\n */\n Sprite.prototype.hideInitially = function () {\n if (!this.isDisposed()) {\n this.appeared = false;\n //if (!this.hidden && !this._isHidden) { // not good for series, as on enterframe it doesn't have data items yet.\n if (!this.inited) {\n this.hide(0);\n }\n }\n };\n /**\r\n * Hides the chart instantly and then shows it. If defaultState.transitionDuration > 0, this will result an animation in which properties of hidden state will animate to properties of visible state.\r\n */\n Sprite.prototype.appear = function () {\n var _this = this;\n this.appeared = false;\n if (!this.hidden && !this.isHidden) {\n this.hide(0);\n }\n if (!this.hidden) {\n var animation = this.show();\n if (animation && !animation.isFinished()) {\n animation.events.on(\"animationended\", function () {\n _this.appeared = true;\n });\n } else {\n this.appeared = true;\n }\n } else {\n this.appeared = true;\n }\n };\n Object.defineProperty(Sprite.prototype, \"hidden\", {\n /**\r\n * @return Is initially hidden?\r\n */\n get: function get() {\n return this.getPropertyValue(\"hidden\");\n },\n /**\r\n * If a sprite has `showOnInit = true`, it will animate from \"hidden\" to\r\n * \"default\" state when initialized. To prevent this but keep\r\n * `showOnInit = true`, you can set `sprite.hidden = true`.\r\n *\r\n * @param value initially hidden?\r\n */\n set: function set(value) {\n value = $type.toBoolean(value);\n this.setPropertyValue(\"hidden\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"bbox\", {\n /**\r\n * Returns bounding box (square) for this element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n get: function get() {\n if (this.definedBBox) {\n return this.definedBBox;\n }\n return this._bbox;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sprite.prototype, \"plugins\", {\n /**\r\n * A list of plugins (objects that implement [[IPlugin]] interface) attached\r\n * to this object.\r\n *\r\n * @since 4.2.2\r\n * @return List of plugins\r\n */\n get: function get() {\n var _this = this;\n if (!this._plugins) {\n this._plugins = new List();\n this._disposers.push(this._plugins.events.on(\"inserted\", function (ev) {\n ev.newValue.target = _this;\n ev.newValue.init();\n }));\n this._disposers.push(new ListDisposer(this._plugins));\n }\n return this._plugins;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Called during the System.update method\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype._systemUpdate = function (skippedSprites) {\n this.validate();\n };\n /**\r\n * Called during the System.update method\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype._systemCheckIfValidate = function () {\n return true;\n };\n /**\r\n * Called during the System.validatePositions method\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype._systemValidatePositions = function () {\n this.validatePosition();\n };\n /**\r\n * Called during the System.validateLayouts method\r\n *\r\n * @ignore Exclude from docs\r\n */\n Sprite.prototype._systemValidateLayouts = function () {};\n return Sprite;\n}(BaseObjectEvents);\nexport { Sprite };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Sprite\"] = Sprite;","/**\r\n * A collection of DOM-related functions.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Disposer } from \"./Disposer\";\nimport { readFrame, writeFrame } from \"./AsyncPending\";\nimport * as $object from \"./Object\";\nimport * as $array from \"./Array\";\nimport * as $type from \"./Type\";\n/**\r\n * SVG namespace.\r\n *\r\n * @ignore Exclude from docs\r\n */\nexport var SVGNS = \"http://www.w3.org/2000/svg\";\n/**\r\n * XML namespace.\r\n *\r\n * @ignore Exclude from docs\r\n */\nexport var XMLNS = \"http://www.w3.org/2000/xmlns/\";\n/**\r\n * XLINK namespace.\r\n *\r\n * @ignore Exclude from docs\r\n */\nexport var XLINK = \"http://www.w3.org/1999/xlink\";\n/**\r\n * Function that adds a disposable event listener directly to a DOM element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dom A DOM element to add event to\r\n * @param type Event type\r\n * @param listener Event listener\r\n * @returns Disposable event\r\n */\nexport function addEventListener(dom, type, listener, options) {\n //@todo proper type check for options: EventListenerOptions | boolean (TS for some reason gives error on passive parameter)\n //console.log(type, dom);\n dom.addEventListener(type, listener, options || false);\n return new Disposer(function () {\n dom.removeEventListener(type, listener, options || false);\n });\n}\n/**\r\n * Finds and returns an element reference using following logic:\r\n * * If we pass in an element instance, we just return it back.\r\n * * If we pass in a string, the function looks for an element with such id.\r\n * * If no element with such id is found, we grab the first element with a tag name like this.\r\n *\r\n * @ignore Exclude from docs\r\n * @param el Element definition (reference, or id, or tag name)\r\n * @return Element reference\r\n * @todo Review this function as it seems pretty fuzzy and hacky\r\n */\nexport function getElement(el) {\n if ($type.isString(el)) {\n var e = document.getElementById(el);\n if (e == null) {\n e = document.getElementsByClassName(el)[0];\n }\n if (e instanceof HTMLElement) {\n return e;\n }\n } else if (el instanceof HTMLElement) {\n return el;\n }\n}\n/**\r\n * Adds a class name to an HTML or SVG element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param element Element\r\n * @param className Class name to add\r\n */\nexport function addClass(element, className) {\n if (element.classList) {\n element.classList.add(className);\n } else {\n var currentClassName = element.getAttribute(\"class\");\n if (currentClassName) {\n element.setAttribute(\"class\", currentClassName.split(\" \").filter(function (item) {\n return item !== className;\n }).join(\" \") + \" \" + className);\n } else {\n element.setAttribute(\"class\", className);\n }\n //element.className = element.className.replace(new RegExp(\"^\" + className + \"| \" + className), \"\") + \" \" + className;\n }\n}\n/**\r\n * Removes a class name from an HTML or SVG element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param element Element\r\n * @param className Class name to add\r\n */\nexport function removeClass(element, className) {\n if (element.classList) {\n element.classList.remove(className);\n } else {\n var currentClassName = element.getAttribute(\"class\");\n if (currentClassName) {\n element.setAttribute(\"class\", currentClassName.split(\" \").filter(function (item) {\n return item !== className;\n }).join(\" \"));\n }\n //element.className = element.className.replace(new RegExp(\"^\" + className + \"| \" + className), \"\");\n }\n}\n/**\r\n * Sets style property on DOM element.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Still needed?\r\n */\nexport function setStyle(element, property, value) {\n element.style[property] = value;\n}\n/**\r\n * Gets the computed style value for an element.\r\n *\r\n * @ignore Exclude from docs\r\n */\nexport function getComputedStyle(element, property) {\n if (element.currentStyle) {\n return element.currentStyle[property];\n }\n return document.defaultView.getComputedStyle(element, null).getPropertyValue(property);\n}\n/**\r\n * Removes focus from any element by shifting focus to body.\r\n *\r\n * @ignore Exclude from docs\r\n */\nexport function blur() {\n var input = document.createElement(\"input\");\n input.style.position = \"fixed\";\n input.style.top = \"0px\";\n input.style.left = \"-10000px\";\n document.body.appendChild(input);\n input.focus();\n input.blur();\n document.body.removeChild(input);\n}\n/**\r\n * Tries to focus the element.\r\n *\r\n * @ignore Exlude from docs\r\n * @param element Element to focus\r\n */\nexport function focus(element) {\n if (element instanceof HTMLElement) {\n element.focus();\n } else {\n var input = document.createElement(\"input\");\n var fo = document.createElementNS(SVGNS, \"foreignObject\");\n fo.appendChild(input);\n element.appendChild(fo);\n input.focus();\n input.disabled = true;\n fo.remove();\n }\n /*if ((<any>element).focus != undefined) {\r\n (<any>element).focus();\r\n }\r\n else if (element instanceof SVGSVGElement) {\r\n // Not implemented\r\n // @todo implement focus fallback\r\n }*/\n}\n/**\r\n * Returns markup for the element including the element tag itself.\r\n * SVG elements do not support `outerHTML` so this functions applies of\r\n * a workaround which creates a new temporary wrapper, clones element and uses\r\n * wrapper's `innerHTML`.\r\n *\r\n * @ignore Exclude from docs\r\n * @param element Element to get full markup for\r\n * @return Markup\r\n * @deprecated Not in use anywhere\r\n */\nexport function outerHTML(element) {\n if (element.outerHTML) {\n return element.outerHTML;\n } else {\n var twrap = document.createElement(\"div\");\n var tnode = element.cloneNode(true);\n twrap.appendChild(tnode);\n var content = twrap.innerHTML;\n return content;\n }\n}\n/**\r\n * Checks if element is a valid DOM node.\r\n *\r\n * @ignore Exclude from docs\r\n * @param el Element\r\n * @return `true` if element is a valid DOM node\r\n */\nexport function isElement(el) {\n return el instanceof Object && el && el.nodeType === 1;\n}\n/**\r\n * Checks of element `a` contains element `b`.\r\n *\r\n * @param a Aleged ascendant\r\n * @param b Aleged descendant\r\n * @return Contains?\r\n */\nexport function contains(a, b) {\n var cursor = b;\n while (true) {\n if (a === cursor) {\n return true;\n } else if (cursor.parentNode == null) {\n if (cursor.host == null) {\n return false;\n } else {\n cursor = cursor.host;\n }\n } else {\n cursor = cursor.parentNode;\n }\n }\n}\n/**\r\n * Gets the true target of the Event.\r\n *\r\n * This is needed to make events work with the shadow DOM.\r\n *\r\n * @param event Event\r\n * @return EventTarget\r\n */\nexport function eventTarget(event) {\n if (typeof event.composedPath === \"function\") {\n return event.composedPath()[0];\n } else {\n return event.target;\n }\n}\n/**\r\n * Copies attributes from one element to another.\r\n *\r\n * @ignore Exclude from docs\r\n * @param source Element to copy attributes from\r\n * @param target Element to copy attributes to\r\n */\nexport function copyAttributes(source, target) {\n $array.each(source.attributes, function (attr) {\n // TODO what if it's null ?\n if (attr.value != null) {\n target.setAttribute(attr.name, attr.value);\n }\n });\n}\n/**\r\n * [fixPixelPerfect description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param el Element\r\n */\nexport function fixPixelPerfect(el) {\n readFrame(function () {\n // sometimes IE doesn't like this\n // TODO figure out a way to remove this\n try {\n var rect = el.getBoundingClientRect();\n var left_1 = rect.left - Math.round(rect.left);\n var top_1 = rect.top - Math.round(rect.top);\n if (left_1 !== 0) {\n writeFrame(function () {\n el.style.left = left_1 + \"px\";\n });\n }\n if (top_1 !== 0) {\n writeFrame(function () {\n el.style.top = top_1 + \"px\";\n });\n }\n } catch (e) {}\n });\n}\n/**\r\n * [rootStylesheet description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nvar rootStylesheet;\n/**\r\n * [getStylesheet description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @return [description]\r\n */\nfunction getStylesheet() {\n if (!$type.hasValue(rootStylesheet)) {\n // TODO use createElementNS ?\n var e = document.createElement(\"style\");\n e.type = \"text/css\";\n document.head.appendChild(e);\n rootStylesheet = e.sheet;\n }\n return rootStylesheet;\n}\n/**\r\n * [makeStylesheet description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param selector [description]\r\n * @return [description]\r\n */\nfunction makeStylesheet(selector) {\n var root = getStylesheet();\n var index = root.cssRules.length;\n root.insertRule(selector + \"{}\", index);\n return root.cssRules[index];\n}\n/**\r\n * Defines a class for a CSS rule.\r\n *\r\n * Can be used to dynamically add CSS to the document.\r\n */\nvar StyleRule = /** @class */function (_super) {\n tslib_1.__extends(StyleRule, _super);\n /**\r\n * Constructor.\r\n *\r\n * @param selector CSS selector\r\n * @param styles An object of style attribute - value pairs\r\n */\n function StyleRule(selector, styles) {\n var _this =\n // TODO test this\n _super.call(this, function () {\n var root = getStylesheet();\n // TODO a bit hacky\n var index = $array.indexOf(root.cssRules, _this._rule);\n if (index === -1) {\n throw new Error(\"Could not dispose StyleRule\");\n } else {\n root.deleteRule(index);\n }\n }) || this;\n _this._rule = makeStylesheet(selector);\n $object.each(styles, function (key, value) {\n _this.setStyle(key, value);\n });\n return _this;\n }\n Object.defineProperty(StyleRule.prototype, \"selector\", {\n /**\r\n * @return CSS selector\r\n */\n get: function get() {\n return this._rule.selectorText;\n },\n /**\r\n * A CSS selector text.\r\n *\r\n * E.g.: `.myClass p`\r\n *\r\n * @param selector CSS selector\r\n */\n set: function set(selector) {\n this._rule.selectorText = selector;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets the same style properties with browser-specific prefixes.\r\n *\r\n * @param name Attribute name\r\n * @param value Attribute value\r\n */\n StyleRule.prototype._setVendorPrefixName = function (name, value) {\n var style = this._rule.style;\n style.setProperty(\"-webkit-\" + name, value, \"\");\n style.setProperty(\"-moz-\" + name, value, \"\");\n style.setProperty(\"-ms-\" + name, value, \"\");\n style.setProperty(\"-o-\" + name, value, \"\");\n style.setProperty(name, value, \"\");\n };\n /**\r\n * Sets a value for specific style attribute.\r\n *\r\n * @param name Attribute\r\n * @param value Value\r\n */\n StyleRule.prototype.setStyle = function (name, value) {\n if (name === \"transition\") {\n this._setVendorPrefixName(name, value);\n } else {\n this._rule.style.setProperty(name, value, \"\");\n }\n };\n return StyleRule;\n}(Disposer);\nexport { StyleRule };\n/**\r\n * An internal counter for unique style ids.\r\n *\r\n * @ignore Exclude from docs\r\n */\nvar styleId = 0;\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nvar StyleClass = /** @class */function (_super) {\n tslib_1.__extends(StyleClass, _super);\n /**\r\n * Constructor.\r\n *\r\n * @param styles An object of style attribute - value pairs\r\n * @param name Class name\r\n */\n function StyleClass(styles, name) {\n var _this = this;\n var className = !$type.hasValue(name)\n // TODO generate the classname randomly\n ? \"__style_\" + ++styleId + \"__\" : name;\n _this = _super.call(this, \".\" + className, styles) || this;\n _this._className = className;\n return _this;\n }\n Object.defineProperty(StyleClass.prototype, \"className\", {\n /**\r\n * @return Class name\r\n */\n get: function get() {\n return this._className;\n },\n /**\r\n * Class name.\r\n *\r\n * @param name Class name\r\n */\n set: function set(name) {\n this._className = name;\n this.selector = \".\" + name;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Converts the whole class to\r\n * @ignore Exclude from docs\r\n */\n StyleClass.prototype.toString = function () {\n return this._className;\n };\n return StyleClass;\n}(StyleRule);\nexport { StyleClass };\nexport function ready(f) {\n if (document.readyState !== \"loading\") {\n f();\n } else {\n var listener_1 = function listener_1() {\n if (document.readyState !== \"loading\") {\n document.removeEventListener(\"readystatechange\", listener_1);\n f();\n }\n };\n document.addEventListener(\"readystatechange\", listener_1);\n }\n}\n/**\r\n * Returns a font fmaily name for the element (directly set or\r\n * computed/inherited).\r\n *\r\n * @ignore Exclude from docs\r\n * @param element Element\r\n * @return Font family\r\n */\nexport function findFont(element) {\n // Check if element has styles set\n var font = getComputedStyle(element, \"font-family\");\n if (!font) {\n // Completely transparent. Look for a parent\n var parent_1 = element.parentElement || element.parentNode;\n if (parent_1) {\n return findFont(parent_1);\n } else {\n return undefined;\n }\n } else {\n return font;\n }\n}\n/**\r\n * Returns a font fmaily name for the element (directly set or\r\n * computed/inherited).\r\n *\r\n * @ignore Exclude from docs\r\n * @param element Element\r\n * @return Font family\r\n */\nexport function findFontSize(element) {\n // Check if element has styles set\n var font = getComputedStyle(element, \"font-size\");\n if (!font) {\n // Completely transparent. Look for a parent\n var parent_2 = element.parentElement || element.parentNode;\n if (parent_2) {\n return findFontSize(parent_2);\n } else {\n return undefined;\n }\n } else {\n return font;\n }\n}\n/**\r\n * Checks whether element is not visible, whether directly or via its\r\n * ascendants.\r\n *\r\n * @param element Target element\r\n * @return Hidden?\r\n */\nexport function isHidden(element) {\n return element.offsetParent === null;\n}","/**\r\n * Container module\r\n * @todo Needs description\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Sprite } from \"./Sprite\";\nimport { SpriteState } from \"./SpriteState\";\nimport { List } from \"./utils/List\";\nimport { MultiDisposer } from \"./utils/Disposer\";\nimport { Dictionary, DictionaryDisposer } from \"./utils/Dictionary\";\nimport { getInteraction } from \"./interaction/Interaction\";\nimport { Rectangle } from \"./elements/Rectangle\";\nimport { Percent } from \"./utils/Percent\";\nimport { registry } from \"./Registry\";\nimport { InterfaceColorSet } from \"../core/utils/InterfaceColorSet\";\nimport * as $iter from \"./utils/Iterator\";\nimport * as $array from \"./utils/Array\";\nimport * as $math from \"./utils/Math\";\nimport * as $type from \"./utils/Type\";\nimport { system } from \"./System\";\n;\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Container can contain multiple sprites and arrange them in various layouts.\r\n *\r\n * @see {@link IContainerEvents} for a list of available events\r\n * @see {@link IContainerAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar Container = /** @class */function (_super) {\n tslib_1.__extends(Container, _super);\n /**\r\n * Constructor\r\n */\n function Container() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * Container children. (sorted by layout)\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._childrenByLayout = [];\n /**\r\n * Container's disposers for its child elements.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._childrenDisposers = new Dictionary();\n /**\r\n * Indicates if this container contains any focused elements, including\r\n * itself.\r\n */\n _this.hasFocused = false;\n /**\r\n * An array of references to elements the state should be set, when it is set\r\n * on this element.\r\n */\n _this.setStateOnSprites = [];\n /*\r\n * @ignore\r\n */\n _this.layoutInvalid = false;\n _this._absoluteWidth = 0;\n _this._absoluteHeight = 0;\n /**\r\n * An array of child Sprites that should be ready before this object can\r\n * fire a \"ready\" event.\r\n */\n _this._shouldBeReady = [];\n /**\r\n * Enables touch tap protection.\r\n */\n _this._tapToActivate = false;\n /**\r\n * If `tapToActivate` is used, this setting will determine how long the chart\r\n * will stay in \"active\" mode.\r\n *\r\n * @default 3000\r\n * @since 4.4.0\r\n */\n _this.tapTimeout = 3000;\n _this.className = \"Container\";\n _this._element = _this.paper.addGroup(\"g\");\n _this.group.add(_this.element);\n _this.setPropertyValue(\"pixelPerfect\", false);\n _this.setPropertyValue(\"layout\", \"absolute\");\n _this.setPropertyValue(\"fixedWidthGrid\", false);\n _this.setPropertyValue(\"verticalCenter\", \"none\");\n _this.setPropertyValue(\"horizontalCenter\", \"none\");\n _this._positionPrecision = 4;\n _this._disposers.push(new DictionaryDisposer(_this._childrenDisposers));\n _this.children.events.on(\"inserted\", _this.handleChildAdded, _this);\n _this.children.events.on(\"removed\", _this.handleChildRemoved, _this);\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Handles adding of a new child into `children`. Adding new children might\r\n * affect the whole layout so it needs to be revalidated.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event object\r\n * @todo Throw an exception on adding a disposed object. Of course it's better NOT TO add disposed objects, so that what we should focus on.\r\n */\n Container.prototype.handleChildAdded = function (event) {\n this.processChild(event.newValue);\n };\n /**\r\n * @ignore\r\n */\n Container.prototype.processChild = function (child) {\n // try solves the problem when somedy adds child directly to children\n try {\n this._childrenDisposers.insertKey(child.uid, new MultiDisposer([\n // it's not enough to listen to POSITION_CHANGED only, as some extra redrawals will happen.\n child.events.on(\"transformed\", this.handleChildTransform, this), child.events.on(\"zIndexChanged\", this.sortAndAdd, this)]));\n } catch (err) {\n // void\n }\n if (this.element && !child.disabled) {\n var group = this.element;\n group.add(child.group);\n }\n child.parent = this;\n child.paper = this.paper;\n this.dispatchImmediately(\"childadded\", {\n type: \"childadded\",\n newValue: child\n });\n this.invalidate();\n };\n /**\r\n * @ignore\r\n */\n Container.prototype.sortAndAdd = function () {\n this.sortChildren();\n this.addChildren();\n };\n /**\r\n * Handles child removal. Changing size of the child may change the\r\n * whole layout of the Container, hence layout needs to be invalidated.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event object\r\n */\n Container.prototype.handleChildRemoved = function (event) {\n var child = event.oldValue;\n // TODO figure out why the key sometimes doesn't exist\n this._childrenDisposers.removeKey(child.uid);\n if (this.element) {\n var group = this.element;\n group.removeElement(child.group);\n }\n if (child.isMeasured) {\n this.invalidateLayout();\n }\n this.dispatchImmediately(\"childremoved\", {\n type: \"childremoved\",\n oldValue: child\n });\n };\n /**\r\n * Handles child transformation. Changing size of the child may change the\r\n * whole layout of the Container, hence layout needs to be invalidated.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event object\r\n */\n Container.prototype.handleChildTransform = function (event) {\n var child = event.target;\n if (child.isMeasured) {\n // && this.layout != \"none\" && this.layout != \"absolute\") {\n this.invalidateLayout();\n }\n };\n /**\r\n * Invalidates Container's layout, causing it to be re-evaluated again.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Container.prototype.invalidateLayout = function () {\n if (this.layoutInvalid || this.disabled || this.isTemplate || this.layout == \"none\" || this.__disabled) {\n return;\n }\n this.layoutInvalid = true;\n registry.addToInvalidLayouts(this);\n system.requestFrame();\n };\n /**\r\n * Invalidates element.\r\n *\r\n * Object will be redrawn during the next update cycle.\r\n *\r\n * Please note that in most cases elements will auto-invalidate when needed. If\r\n * everything works, DO NOT use this method. Use it only if some changes do\r\n * not take otherwise.\r\n */\n Container.prototype.invalidate = function () {\n _super.prototype.invalidate.call(this);\n this.invalidateLayout();\n };\n /**\r\n * Invalidates the whole element, including layout AND all its child\r\n * elements.\r\n *\r\n * As this will essentially force all elements to redraw, use only if\r\n * absolutely necessary.\r\n */\n Container.prototype.deepInvalidate = function () {\n _super.prototype.invalidate.call(this);\n //this.sortChildren();\n $array.each(this._childrenByLayout, function (child) {\n if (child instanceof Container) {\n child.deepInvalidate();\n } else {\n child.invalidate();\n }\n });\n this.invalidateLayout();\n };\n Object.defineProperty(Container.prototype, \"children\", {\n /**\r\n * Returns a list of the child [[Sprite]] elements contained in this\r\n * Container.\r\n *\r\n * @return List of child elements (Sprites)\r\n */\n get: function get() {\n // @todo Review if we can add all children to disposers\n if (!this._children) {\n this._children = new List();\n //this._disposers.push(new ListDisposer(this._children));\n }\n return this._children;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Container.prototype, \"minWidth\", {\n /**\r\n * @return Width (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"minWidth\");\n },\n /**\r\n * Minimum width (px) for the Container. A container will not\r\n * auto-shrink beyond this value, even if child elements are smaller.\r\n *\r\n * @param value Width (px)\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"minWidth\", value)) {\n this.invalidateLayout();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Container.prototype, \"minHeight\", {\n /**\r\n * @return Height (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"minHeight\");\n },\n /**\r\n * Minimum height (px) for the Container. A container will not\r\n * auto-shrink beyond this value, even if child elements are smaller.\r\n *\r\n * @param value Height (px)\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"minHeight\", value)) {\n this.invalidateLayout();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Overrides the original `removeElement` so that Container's actual element\r\n * is not removed. We do not need to remove element of a Container.\r\n *\r\n * We do this because remove element each time will fail the `getBBox`.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Container.prototype.removeElement = function () {};\n /**\r\n * Sorts Container's children: the ones with variable width and height are\r\n * put at the end of the list (depending on layout type), so that fixed-width\r\n * ones can be drawn first.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Container.prototype.sortChildren = function () {\n var _this = this;\n this._childrenByLayout = [];\n if (this.layout == \"none\" || this.layout == \"absolute\" || !this.layout) {\n //$iter.each(this.children.iterator(), (child) => {\n //\tthis._childrenByLayout.push(child);\n //});\n this._childrenByLayout = this.children.values;\n } else {\n // Assemble fixed-size and relative lists\n var fixed_1 = [];\n var relative_1 = [];\n $iter.each(this.children.iterator(), function (child) {\n if (_this.layout == \"horizontal\" || _this.layout == \"grid\") {\n if (!$type.isNumber(child.percentWidth)) {\n fixed_1.push(child);\n } else {\n relative_1.push(child);\n }\n } else if (_this.layout == \"vertical\") {\n if (!$type.isNumber(child.percentHeight)) {\n fixed_1.push(child);\n } else {\n relative_1.push(child);\n }\n } else {\n fixed_1.push(child);\n }\n });\n // Concat everything into list\n this._childrenByLayout = fixed_1.concat(relative_1);\n }\n this.calculateRelativeSize();\n };\n /**\r\n * Calculates relative sizes for all Container's children.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Make it protected?\r\n */\n Container.prototype.calculateRelativeSize = function () {\n var _this = this;\n var totalRelativeWidth = 0;\n var totalRelativeHeight = 0;\n $array.each(this._childrenByLayout, function (child) {\n // if child is not measured, we do not care about it at all.\n if (child.isMeasured) {\n if ($type.isNumber(child.percentWidth)) {\n totalRelativeWidth += child.percentWidth;\n }\n if ($type.isNumber(child.percentHeight)) {\n totalRelativeHeight += child.percentHeight;\n }\n }\n });\n $array.each(this._childrenByLayout, function (child) {\n if (child.isMeasured) {\n if (_this.layout == \"horizontal\") {\n if ($type.isNumber(child.percentWidth)) {\n child.relativeWidth = child.percentWidth / totalRelativeWidth;\n }\n if ($type.isNumber(child.percentHeight)) {\n child.relativeHeight = child.percentHeight / 100;\n }\n }\n if (_this.layout == \"vertical\") {\n if ($type.isNumber(child.percentHeight)) {\n child.relativeHeight = child.percentHeight / totalRelativeHeight;\n }\n if ($type.isNumber(child.percentWidth)) {\n child.relativeWidth = child.percentWidth / 100;\n }\n }\n if (_this.layout == \"grid\") {\n if ($type.isNumber(child.percentHeight)) {\n child.relativeHeight = child.percentHeight / 100;\n }\n if ($type.isNumber(child.percentWidth)) {\n child.relativeWidth = child.percentWidth / 100;\n }\n }\n }\n if (_this.layout == \"absolute\" || !child.isMeasured) {\n if ($type.isNumber(child.percentWidth)) {\n child.relativeWidth = child.percentWidth / 100;\n }\n if ($type.isNumber(child.percentHeight)) {\n child.relativeHeight = child.percentHeight / 100;\n }\n }\n });\n };\n /**\r\n * Adds all children to Container's SVG element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Container.prototype.addChildren = function () {\n /*\r\n Need this check because a child might be assigned to parent even before element is created, for example a theme\r\n access scrollbar.thumb\r\n */\n if (this.element) {\n var zindexed = $array.copy(this.children.values); // not children by layout!\n var sortArray = zindexed.map(function (data, idx) {\n return {\n idx: idx,\n data: data\n };\n });\n sortArray.sort(function (a, b) {\n var ai = a.data.zIndex || 0;\n var bi = b.data.zIndex || 0;\n if (ai < bi) {\n return -1;\n }\n if (ai > bi) {\n return 1;\n }\n return a.idx - b.idx;\n });\n zindexed = sortArray.map(function (val) {\n return val.data;\n });\n var group_1 = this.element;\n // check, maybe the order is good already\n var isCorrect = true;\n if (group_1.node && group_1.node.childNodes) {\n for (var i = 0, len = group_1.node.childNodes.length; i < len; i++) {\n if (group_1.node.childNodes[i] != zindexed[i].group.node) {\n isCorrect = false;\n break;\n }\n }\n }\n if (!isCorrect) {\n $array.each(zindexed, function (child) {\n if (child.group) {\n group_1.add(child.group);\n }\n });\n if (this._background) {\n this.group.addToBack(this._background.group);\n }\n this.invalidateLayout();\n }\n }\n };\n /**\r\n * Creates a new element of specific type and assigns as a child to the\r\n * Container.\r\n *\r\n * @param Class type for the new element\r\n * @return New element\r\n */\n Container.prototype.createChild = function (classType) {\n var sprite = new classType();\n sprite.parent = this;\n return sprite;\n };\n /**\r\n * Removes all Container's children without actually destroying them.\r\n *\r\n * To destroy children use `disposeChildren()` instead.\r\n */\n Container.prototype.removeChildren = function () {\n // remove all children\n // TODO use iteration instead\n while (this.children.length > 0) {\n var child = this.children.getIndex(0);\n child.parent = undefined;\n this.children.removeValue(child);\n }\n };\n /**\r\n * Removes and destroys all Container's children.\r\n *\r\n * To remove children from Container without destroying them, use\r\n * `removeChildren()`.\r\n */\n Container.prototype.disposeChildren = function () {\n // TODO use iteration instead\n while (this.children.length > 0) {\n var child = this.children.getIndex(0);\n child.dispose();\n this.children.removeValue(child);\n }\n };\n Object.defineProperty(Container.prototype, \"background\", {\n /**\r\n * @return Background element\r\n */\n get: function get() {\n if (!this._background) {\n this._background = this.createBackground();\n this.processBackground();\n }\n return this._background;\n },\n /**\r\n * An element to use as container background.\r\n *\r\n * @param background Background element\r\n */\n set: function set(background) {\n if (this._background && this.background != background) {\n this.removeDispose(this._background);\n }\n if (background) {\n this._background = background;\n this._disposers.push(background);\n this.processBackground();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Handles the situation where parent element is resized.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Container.prototype.handleGlobalScale = function () {\n _super.prototype.handleGlobalScale.call(this);\n this.children.each(function (child) {\n child.handleGlobalScale();\n });\n };\n /**\r\n * Creates and returns a [[Rectangle]] to use as a background for Container.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Background Rectangle element\r\n */\n Container.prototype.createBackground = function () {\n return new Rectangle();\n };\n /**\r\n * Decorates background element with required properties.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Container.prototype.processBackground = function () {\n var background = this._background;\n if (background) {\n background.isMeasured = false;\n this._background.fill = new InterfaceColorSet().getFor(\"background\");\n background.parent = this;\n background.isMeasured = false;\n this.children.removeValue(background);\n this._disposers.push(background);\n this.group.addToBack(this._background.group);\n }\n };\n /**\r\n * Measures the size of container and informs its children of how much size\r\n * they can occupy, by setting their relative `maxWidth` and `maxHeight`\r\n * properties.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Container.prototype.validateLayout = function () {\n var _this = this;\n registry.removeFromInvalidLayouts(this);\n this.layoutInvalid = false;\n // prevents from drawing if topparent is 0x0\n /*\r\n let topParent = this.topParent;\r\n if (topParent) {\r\n if (!topParent.maxWidth || !topParent.maxHeight) {\r\n this._disposers.push(topParent.events.once(\"maxsizechanged\", this.invalidateLayout, this));\r\n }\r\n }*/\n this._availableWidth = this.innerWidth;\n this._availableHeight = this.innerHeight;\n var measuredWidth = 0;\n var measuredHeight = 0;\n var allValid = true;\n if (this.children) {\n this.sortChildren();\n // we itterate through list of children, sorted by layout priority. sprites which width non-relative width/height will go first, so we will reduce available width before proceeding to sprites with relative width/height\n $array.each(this._childrenByLayout, function (child) {\n var maxWidth;\n var maxHeight;\n if ($type.isNumber(child.relativeWidth)) {\n maxWidth = $math.round(_this._availableWidth * child.relativeWidth, 2);\n if (_this.layout == \"horizontal\") {\n // || this.layout == \"absolute\") {\n maxWidth -= child.pixelMarginRight + child.pixelMarginLeft;\n }\n } else {\n if (_this.layout == \"horizontal\") {\n if (child.invalid) {\n child.validate();\n }\n }\n }\n if ($type.isNumber(child.relativeHeight)) {\n maxHeight = $math.round(_this._availableHeight * child.relativeHeight, 2);\n if (_this.layout == \"vertical\") {\n // || this.layout == \"absolute\") {\n maxHeight -= child.pixelMarginTop + child.pixelMarginBottom;\n }\n } else {\n if (_this.layout == \"vertical\") {\n if (child.invalid) {\n child.validate();\n }\n }\n }\n // if child is valid\n if (child.invalid == false) {\n if ($type.isNumber(child.relativeWidth)) {\n child.maxWidth = maxWidth;\n }\n if ($type.isNumber(child.relativeHeight)) {\n child.maxHeight = maxHeight;\n }\n if (child.isMeasured) {\n // reduce available width if this is horizontal layout\n if (_this.layout == \"horizontal\") {\n if (!$type.isNumber(child.percentWidth)) {\n if (child.measuredWidth > 0) {\n _this._availableWidth -= child.measuredWidth + child.pixelMarginLeft + child.pixelMarginRight;\n }\n }\n }\n // reduce available height if this is vertical layout\n if (_this.layout == \"vertical\") {\n if (!$type.isNumber(child.percentHeight)) {\n if (child.measuredHeight > 0) {\n _this._availableHeight -= child.measuredHeight + child.pixelMarginTop + child.pixelMarginBottom;\n }\n }\n }\n var childMeasuredWidth = child.measuredWidth;\n var childMeasuredHeight = child.measuredHeight;\n if (child.align != \"none\") {\n childMeasuredWidth += child.pixelMarginLeft + child.pixelMarginRight;\n }\n if (child.valign != \"none\") {\n childMeasuredHeight += child.pixelMarginTop + child.pixelMarginBottom;\n }\n measuredWidth = Math.max(measuredWidth, childMeasuredWidth);\n measuredHeight = Math.max(measuredHeight, childMeasuredHeight);\n }\n }\n // if child is not valid\n else {\n // tell child what maximum width/ height it can occupy\n if (child.isMeasured) {\n if ($type.isNumber(child.relativeWidth)) {\n if (child.maxWidth != maxWidth) {\n // need to check this because of allValid\n child.maxWidth = maxWidth;\n allValid = false;\n }\n }\n if ($type.isNumber(child.relativeHeight)) {\n if (child.maxHeight != maxHeight) {\n // need to check this because of allValid\n child.maxHeight = maxHeight;\n allValid = false;\n }\n }\n }\n }\n });\n }\n this._absoluteWidth = measuredWidth;\n this._absoluteHeight = measuredHeight;\n // arrange after measuring, only if all children are valid already\n if (allValid) {\n this.arrange();\n }\n };\n /**\r\n * Arranges children according to layout specs and available space / child\r\n * sizes.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Container.prototype.arrange = function () {\n var _this = this;\n var children = this.children;\n /*\r\n in this method we not only arrange children but also find out the size of the container\r\n it might seem it would be easier to get container size using sprite's measure method,\r\n however it would return only actual size of the bbox. However as each child meight have\r\n margins set, we need to check each child - we do it here.\r\n This method doesn't do anything with DOM, so it's not expensive\r\n */\n var measuredWidth = 0;\n var measuredHeight = 0;\n //let innerWidth: number = this.innerWidth; //$math.max(this.innerWidth, this._measuredWidth - paddingLeft - paddingRight);\n //let innerHeight: number = this.innerHeight; //$math.max(this.innerHeight, this._measuredHeight - paddingTop - paddingBottom);\n // above is wrong, as if a w/h is not specified, it is 0 and alignment doesn't work at all.\n var innerWidth = $math.max(this.innerWidth, this._absoluteWidth);\n var innerHeight = $math.max(this.innerHeight, this._absoluteHeight);\n var left; // = 0;\n var right; // = innerWidth;\n var top; // = 0;\n var bottom; // = innerHeight;\n var paddingLeft = this.pixelPaddingLeft;\n var paddingRight = this.pixelPaddingRight;\n var paddingTop = this.pixelPaddingTop;\n var paddingBottom = this.pixelPaddingBottom;\n var nextX = 0;\n var nextY = 0;\n var row = 0;\n var column = 0;\n var columnWidth = [];\n var rowHeight = [];\n var maxCellWidth;\n var minCellWidth;\n var columnCount;\n var maxWidth = this.maxWidth;\n var maxHeight = this.maxHeight;\n var minWidth = this.minWidth;\n var minHeight = this.minHeight;\n var childrenCopy = $array.copy(children.values);\n if (this.reverseOrder) {\n childrenCopy.reverse();\n }\n // GRID PRECALCULATIONS\n if (this.layout == \"grid\") {\n minCellWidth = maxWidth;\n maxCellWidth = 1;\n for (var i = 0, len = childrenCopy.length; i < len; i++) {\n var child = childrenCopy[i];\n if (child.isMeasured && !child.disabled && !child.__disabled) {\n var childMeasuredWidth = child.measuredWidth;\n if (childMeasuredWidth < minCellWidth) {\n minCellWidth = childMeasuredWidth;\n }\n if (childMeasuredWidth > maxCellWidth) {\n maxCellWidth = childMeasuredWidth;\n }\n }\n }\n minCellWidth = $math.fitToRange(minCellWidth, 1, maxWidth);\n maxCellWidth = $math.fitToRange(maxCellWidth, 1, maxWidth);\n if (this.fixedWidthGrid) {\n columnCount = maxWidth / maxCellWidth;\n } else {\n columnCount = maxWidth / minCellWidth; // predicted number of columns, yes it is usually much more than real number, but we fix that later\n }\n columnCount = $math.max(1, Math.floor(columnCount));\n columnCount = $math.min(this.maxColumns, columnCount);\n columnWidth = this.getColumnWidth(childrenCopy, columnCount, maxCellWidth);\n }\n var contentLeft;\n var contentRight;\n var contentTop;\n var contentBottom;\n // we itterate through array of children\n // TODO use iterator instead\n for (var i = 0, len = childrenCopy.length; i < len; i++) {\n var child = childrenCopy[i];\n if (child.isMeasured && !child.disabled && !child.__disabled) {\n var x = undefined; //child.pixelX; // must reset\n var y = undefined; //child.pixelY; // must reset\n var childMarginLeft = child.pixelMarginLeft;\n var childMarginRight = child.pixelMarginRight;\n var childMarginTop = child.pixelMarginTop;\n var childMarginBottom = child.pixelMarginBottom;\n var childWidth = child.measuredWidth;\n var childHeight = child.measuredHeight;\n var childLeft = void 0;\n var childRight = void 0;\n var childTop = void 0;\n var childBottom = void 0;\n switch (this.layout) {\n case \"none\":\n break;\n // absolute layout\n case \"absolute\":\n // horizontal alignment\n switch (child.align) {\n case \"left\":\n x = childMarginLeft - child.maxLeft;\n break;\n case \"center\":\n x = (innerWidth - childWidth) / 2 - child.maxLeft;\n break;\n case \"right\":\n x = innerWidth - childMarginRight - child.maxRight;\n break;\n default:\n if (!(child.x instanceof Percent)) {\n x = child.pixelX;\n }\n break;\n }\n // vertical alignment\n switch (child.valign) {\n case \"top\":\n y = childMarginTop - child.maxTop;\n break;\n case \"middle\":\n y = (innerHeight - childHeight) / 2 - child.maxTop;\n break;\n case \"bottom\":\n y = innerHeight - childMarginBottom - child.maxBottom;\n break;\n default:\n if (!(child.y instanceof Percent)) {\n y = child.pixelY;\n }\n break;\n }\n break;\n // vertical layout\n case \"vertical\":\n //if ($type.isNumber(child.relativeHeight)) {\n //\tchildHeight = child.maxHeight;\n //}\n switch (child.align) {\n case \"left\":\n x = childMarginLeft - child.maxLeft;\n break;\n case \"center\":\n x = (innerWidth - childWidth) / 2 - child.maxLeft;\n break;\n case \"right\":\n x = innerWidth - childMarginRight - child.maxRight;\n break;\n default:\n x = child.pixelX;\n break;\n }\n y = nextY + childMarginTop - child.maxTop;\n nextY = y + child.maxBottom + childMarginBottom;\n break;\n // horizontal layout\n case \"horizontal\":\n //if ($type.isNumber(child.relativeHeight)) {\n //\tchildHeight = child.maxHeight;\n //}\n switch (child.valign) {\n case \"top\":\n y = childMarginTop - child.maxTop;\n break;\n case \"middle\":\n y = (innerHeight - childHeight) / 2 - child.maxTop;\n break;\n case \"bottom\":\n y = innerHeight - childMarginBottom - child.maxBottom;\n break;\n default:\n y = child.pixelY;\n break;\n }\n x = nextX + childMarginLeft - child.maxLeft;\n nextX = x + child.maxRight + childMarginRight;\n break;\n case \"grid\":\n x = nextX + childMarginLeft - child.maxLeft;\n switch (child.valign) {\n case \"top\":\n y = nextY + childMarginTop - child.maxTop;\n break;\n case \"middle\":\n y = nextY + (innerHeight - childHeight) / 2 - child.maxTop;\n break;\n case \"bottom\":\n y = nextY + innerHeight - childMarginBottom - child.maxBottom;\n break;\n default:\n y = nextY - child.maxTop;\n break;\n }\n nextX += columnWidth[column];\n rowHeight[row] = $math.max(rowHeight[row], childHeight);\n column++;\n var nextColumnWidth = columnWidth[column];\n if (!$type.isNumber(nextColumnWidth)) {\n nextColumnWidth = maxCellWidth;\n }\n if (nextX > $math.min(this.innerWidth, maxWidth) - nextColumnWidth + 1 && column < columnCount) {\n columnCount = column;\n nextX = 0;\n nextY = 0;\n row = 0;\n column = 0;\n columnWidth = this.getColumnWidth(childrenCopy, columnCount, maxCellWidth);\n rowHeight = [];\n i = -1;\n continue;\n }\n if (column >= columnCount) {\n column = 0;\n nextY += rowHeight[row];\n row++;\n nextX = 0;\n }\n break;\n }\n if (this.layout !== \"none\") {\n child.moveTo({\n x: x,\n y: y\n }); // must use moveTo, otherwise x/y set in percent won't work\n childLeft = x + child.maxLeft - childMarginLeft;\n childRight = x + child.maxRight + childMarginRight;\n childTop = y + child.maxTop - childMarginTop;\n childBottom = y + child.maxBottom + childMarginBottom;\n if (childRight > right || !$type.isNumber(right)) {\n right = childRight;\n }\n if (childLeft < left || !$type.isNumber(left)) {\n left = childLeft;\n }\n if (childTop < top || !$type.isNumber(top)) {\n top = childTop;\n }\n if (childBottom > bottom || !$type.isNumber(bottom)) {\n bottom = childBottom;\n }\n if (childRight > contentRight || !$type.isNumber(contentRight)) {\n contentRight = childRight;\n }\n if (childLeft < contentLeft || !$type.isNumber(contentLeft)) {\n contentLeft = childLeft;\n }\n if (childTop < contentTop || !$type.isNumber(contentTop)) {\n contentTop = childTop;\n }\n if (childBottom > contentBottom || !$type.isNumber(contentBottom)) {\n contentBottom = contentBottom;\n }\n }\n } else {\n child.validatePosition();\n }\n }\n if (this.layout == \"none\") {\n var noneBBox = this.bbox;\n left = noneBBox.x;\n right = noneBBox.x + noneBBox.width;\n top = noneBBox.y;\n bottom = noneBBox.y + noneBBox.height;\n }\n if (!$type.isNumber(left)) {\n left = 0;\n contentLeft = 0;\n }\n if (!$type.isNumber(right)) {\n right = this._availableWidth;\n contentRight = right;\n }\n if (!$type.isNumber(top)) {\n top = 0;\n contentTop = 0;\n }\n if (!$type.isNumber(bottom)) {\n bottom = this._availableHeight;\n contentBottom = bottom;\n }\n if (!$type.isNumber(contentTop)) {\n contentTop = 0;\n }\n if (!$type.isNumber(contentBottom)) {\n contentBottom = contentTop;\n }\n if (!$type.isNumber(contentLeft)) {\n contentLeft = 0;\n }\n if (!$type.isNumber(contentRight)) {\n contentRight = contentLeft;\n }\n measuredWidth = right - left;\n measuredHeight = bottom - top;\n if ($type.isNumber(this.relativeWidth)) {\n measuredWidth = maxWidth - paddingLeft - paddingRight;\n left = 0;\n right = measuredWidth;\n }\n if ($type.isNumber(this.relativeHeight)) {\n measuredHeight = maxHeight - paddingTop - paddingBottom;\n top = 0;\n bottom = measuredHeight;\n }\n if ($type.isNumber(this._pixelWidth)) {\n left = 0;\n measuredWidth = this._pixelWidth - paddingLeft - paddingRight;\n }\n if ($type.isNumber(minWidth) && measuredWidth < minWidth) {\n left = 0;\n measuredWidth = this.minWidth - paddingLeft - paddingRight;\n }\n if ($type.isNumber(this._pixelHeight)) {\n top = 0;\n measuredHeight = this._pixelHeight - paddingTop - paddingBottom;\n }\n if ($type.isNumber(minHeight) && measuredHeight < minHeight) {\n top = 0;\n measuredHeight = minHeight - paddingTop - paddingBottom;\n }\n var measuredContentWidth = contentRight - contentLeft;\n var measuredContentHeight = contentBottom - contentTop;\n /// handle content alignment\n if (this.layout != \"none\" && (this.contentAlign || this.contentValign) && children.length > 0) {\n var dx_1;\n var dy_1;\n var mwa = measuredWidth;\n var mha = measuredHeight;\n if (mwa < measuredContentWidth) {\n mwa = measuredContentWidth;\n }\n if (mha < measuredContentHeight) {\n mha = measuredContentHeight;\n }\n if (this.contentAlign == \"center\") {\n dx_1 = (mwa - measuredContentWidth) / 2;\n }\n if (this.contentAlign == \"right\") {\n dx_1 = mwa - measuredContentWidth;\n }\n if (this.contentValign == \"middle\") {\n dy_1 = (mha - measuredContentHeight) / 2;\n }\n if (this.contentValign == \"bottom\") {\n dy_1 = mha - measuredContentHeight;\n }\n if ($type.isNumber(dx_1)) {\n $iter.each(children.iterator(), function (child) {\n var childLeft = child.maxLeft;\n var ddx = dx_1;\n if (_this.layout == \"horizontal\") {\n child.x = child.pixelX + ddx;\n }\n // individual grid elements can not be aligned vertically, that's why it's different from horizontal\n if (_this.layout == \"grid\") {\n child.x = child.pixelX + ddx;\n }\n if (_this.layout == \"vertical\") {\n ddx += child.pixelMarginLeft;\n if (child.align == \"none\") {\n child.x = ddx - childLeft;\n }\n }\n if (_this.layout == \"absolute\") {\n ddx += child.pixelMarginLeft;\n if (child.align == \"none\") {\n child.x = ddx - childLeft;\n }\n }\n });\n }\n if ($type.isNumber(dy_1)) {\n $iter.each(children.iterator(), function (child) {\n var childTop = child.maxTop;\n var ddy = dy_1;\n if (_this.layout == \"horizontal\") {\n ddy += child.pixelMarginTop;\n if (child.valign == \"none\") {\n child.y = ddy - childTop;\n }\n }\n // individual grid elements can not be aligned vertically, that's why it's different from horizontal\n if (_this.layout == \"grid\") {\n ddy += child.pixelMarginTop;\n child.y = ddy - childTop;\n }\n if (_this.layout == \"vertical\") {\n child.y = child.pixelY + ddy;\n }\n if (_this.layout == \"absolute\") {\n ddy += child.pixelMarginTop;\n if (child.valign == \"none\") {\n child.y = ddy - childTop;\n }\n }\n });\n }\n }\n var oldBBox = this.bbox;\n // this will mess up maxw/maxh set by container layout, we need a separate min/maxwidth for users\n // this prevents invalidating layout in such cases as scrolling category axis, when labels go outside bounds and results transformed event\n // todo: need to check if this doesn't cause other problems.\n //if (this.maxWidth > 0) {\n //measuredWidth = $math.min(measuredWidth, this.maxWidth);\n //measuredWidth = $math.max(measuredWidth, this.minWidth);\n //}\n //if (this.maxHeight > 0) {\n //measuredHeight = $math.min(measuredHeight, this.maxHeight);\n //measuredHeight = $math.max(measuredHeight, this.minHeight);\n //}\n measuredWidth = $math.max(measuredWidth, minWidth);\n measuredHeight = $math.max(measuredHeight, minHeight);\n this.contentWidth = measuredWidth;\n this.contentHeight = measuredHeight;\n // new\n measuredWidth = $math.min(measuredWidth, maxWidth);\n measuredHeight = $math.min(measuredHeight, maxHeight);\n this._bbox = {\n x: left,\n y: top,\n width: measuredWidth,\n height: measuredHeight\n };\n var prevLeft = this.maxLeft;\n var prevTop = this.maxTop;\n var prevBotttom = this.maxBottom;\n var prevRight = this.maxRight;\n this.measure();\n if (prevLeft != this.maxLeft || prevRight != this.maxRight || prevTop != this.maxTop || prevBotttom != this.maxBottom) {\n if (this.events.isEnabled(\"transformed\")) {\n var event_1 = {\n type: \"transformed\",\n target: this\n };\n if (oldBBox) {\n event_1.dummyData = oldBBox.width + \" \" + measuredWidth + \" \" + oldBBox.height + \" \" + measuredHeight;\n }\n this.events.dispatchImmediately(\"transformed\", event_1);\n }\n }\n };\n /**\r\n * Positions element according its center settings.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\n Container.prototype.updateCenter = function () {\n _super.prototype.updateCenter.call(this);\n this.updateBackground();\n };\n /**\r\n * Update the background to fit into specific dimensions.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Make it protected?\r\n */\n Container.prototype.updateBackground = function () {\n var background = this._background; // accessing protected, as getter creates instance if it doesn't exist\n if (background) {\n background.x = this.maxLeft;\n background.y = this.maxTop;\n background.width = this.maxRight - this.maxLeft;\n background.height = this.maxBottom - this.maxTop;\n }\n };\n /**\r\n * Returns widths of all columns in a horizontal Container layout.\r\n *\r\n * @ignore Exclude from docs\r\n * @param columnCount Number of columns\r\n * @param maxCellWidth Maximum width of one grid cell\r\n * @return An array of column widths\r\n */\n Container.prototype.getColumnWidth = function (children, columnCount, maxCellWidth) {\n var _this = this;\n var columnWidth = [];\n var column = 0;\n $array.each(children, function (child) {\n if (child.isMeasured) {\n if (_this.fixedWidthGrid) {\n columnWidth[column] = maxCellWidth;\n } else {\n columnWidth[column] = $math.max(columnWidth[column], child.measuredWidth + child.pixelMarginRight + child.pixelMarginLeft);\n }\n column++;\n if (column == columnCount) {\n column = 0;\n }\n }\n });\n return columnWidth;\n };\n Object.defineProperty(Container.prototype, \"layout\", {\n /**\r\n * @return Layout\r\n */\n get: function get() {\n return this.getPropertyValue(\"layout\");\n },\n /**\r\n * Container layout.\r\n *\r\n * Options: \"absolute\" (default), \"vertical\", \"horizontal\", \"grid\", \"none\". \"none\" is quite the same as \"absolute\" - the objects will\r\n * be positioned at their x, y coordinates, the difference is that with \"absolute\" you can still use align/valign for children and with \"none\" you can not.\r\n * Use \"none\" as much as you can as it's most cpu-saving layout.\r\n *\r\n * @default \"absolute\"\r\n * @param value Layout\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"layout\", value)) {\n this.invalidateLayout();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Container.prototype, \"contentValign\", {\n /**\r\n * @return Vertical alignment\r\n */\n get: function get() {\n return this.getPropertyValue(\"contentValign\");\n },\n /**\r\n * Vertical alignment of the elements for the vertical Container.\r\n *\r\n * This is used when Container is larger than the height of all its children.\r\n *\r\n * @param value vertical alignment\r\n */\n set: function set(value) {\n this.setPropertyValue(\"contentValign\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Container.prototype, \"contentAlign\", {\n /**\r\n * @return Horizontal alignment\r\n */\n get: function get() {\n return this.getPropertyValue(\"contentAlign\");\n },\n /**\r\n * Horizontal alignment of the elements for the horizontal Container.\r\n *\r\n * This is used when Container is larger than the height of all its children.\r\n *\r\n * @param value Horizontal alignment\r\n */\n set: function set(value) {\n this.setPropertyValue(\"contentAlign\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Container.prototype, \"fixedWidthGrid\", {\n /**\r\n * @return Should use fixed width grid?\r\n */\n get: function get() {\n return this.getPropertyValue(\"fixedWidthGrid\");\n },\n /**\r\n * Controls if the grid of the Container should use fixed width. Fixed width\r\n * grid will divide available space to all its columns/rows equally, without\r\n * adapting to actual child sizes or size requirements.\r\n *\r\n * @default false\r\n * @param value Should use fixed width grid?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"fixedWidthGrid\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Container.prototype, \"maxColumns\", {\n /**\r\n * @return Should use fixed width grid?\r\n */\n get: function get() {\n return this.getPropertyValue(\"maxColumns\");\n },\n /**\r\n * Maximum number of columns (when using `\"grid\"` layout).\r\n *\r\n * @param value Should use fixed width grid?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"maxColumns\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Container.prototype, \"reverseOrder\", {\n /**\r\n * @return Reverse children?\r\n */\n get: function get() {\n return this.getPropertyValue(\"reverseOrder\");\n },\n /**\r\n * If set to `true`, the children of the container will be drawn in reverse\r\n * order.\r\n *\r\n * @default false\r\n * @param value Reverse children?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"reverseOrder\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Container.prototype, \"setStateOnChildren\", {\n /**\r\n * @return Set state on children\r\n */\n get: function get() {\n return this.getPropertyValue(\"setStateOnChildren\");\n },\n /**\r\n * Specifies if, when state is applied on this container, the same state\r\n * should be applied to container's children as well as `background`.\r\n *\r\n * @default false\r\n * @param value Set state on children\r\n */\n set: function set(value) {\n this.setPropertyValue(\"setStateOnChildren\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Checks if point is within bounds of a container.\r\n *\r\n * @param point A coordinate to check\r\n * @return `true` if it fits within container\r\n */\n Container.prototype.fitsToBounds = function (point) {\n var x = point.x;\n var y = point.y;\n var deviation = 0.5; // sometimes coordinates are rounded to numbers like .999 so we add deviation here\n if (x >= -deviation && x <= this.pixelWidth + deviation && y >= -deviation && y <= this.pixelHeight + deviation) {\n return true;\n } else {\n return false;\n }\n };\n /**\r\n * Copies all properties from different Container, including background\r\n * clone.\r\n *\r\n * @param source Source Container to copy from\r\n */\n Container.prototype.copyFrom = function (source) {\n var _this = this;\n _super.prototype.copyFrom.call(this, source);\n this.layout = source.layout;\n this.setStateOnChildren = source.setStateOnChildren;\n if (source._background) {\n this.background = source._background.clone();\n this.background.copyFrom(source._background); // won't work without this\n }\n $iter.each(source.children.iterator(), function (child) {\n if (child.shouldClone) {\n var clonedChild = child.clone();\n clonedChild.parent = _this;\n }\n });\n };\n Object.defineProperty(Container.prototype, \"preloader\", {\n /**\r\n * @return Preloader instance\r\n */\n get: function get() {\n var preloader = this._preloader;\n if (preloader) {\n return preloader;\n } else if (this.parent) {\n return this.parent.preloader;\n }\n },\n /**\r\n * A [[Preloader]] instance to be used when Container is busy.\r\n *\r\n * @param preloader Preloader instance\r\n */\n set: function set(preloader) {\n if (this._preloader) {\n this.removeDispose(this._preloader);\n }\n this._preloader = preloader;\n if (preloader) {\n preloader.parent = this.tooltipContainer;\n this._disposers.push(preloader);\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets [[Paper]] instance to use to draw elements.\r\n * @ignore\r\n * @param paper Paper\r\n * @return true if paper was changed, false, if it's the same\r\n */\n Container.prototype.setPaper = function (paper) {\n var _this = this;\n var changed = _super.prototype.setPaper.call(this, paper);\n if (changed) {\n if (this._background) {\n this._background.paper = paper;\n this._background.topParent = this.topParent;\n }\n this.children.each(function (child) {\n child.setPaper(paper);\n child.topParent = _this.topParent;\n });\n }\n return changed;\n };\n /**\r\n * Removes Container from the system-wide list of invalid Containers.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Container.prototype.removeFromInvalids = function () {\n _super.prototype.removeFromInvalids.call(this);\n registry.removeFromInvalidLayouts(this);\n };\n /**\r\n * Sets a [[DataItem]] to be used as data for the Container.\r\n *\r\n * @todo Description\r\n * @param dataItem DataItem\r\n */\n Container.prototype.setDataItem = function (dataItem) {\n // this place is potentially dangerous, as if we set datItem for some dummy container, all children dataItems will be overriden\n // the main reason for doing this is that we need a setDataItem code to be called for each sprite, otherwise property fields won't be\n // applied. Also, getting dataItem from parent all the time is more expensive than saving value.\n if (this._dataItem != dataItem) {\n $iter.each(this.children.iterator(), function (child) {\n child.dataItem = dataItem;\n });\n }\n _super.prototype.setDataItem.call(this, dataItem);\n };\n /**\r\n * Measures the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Container.prototype.measureElement = function () {\n if (this.disabled || this.isTemplate || this.layout == \"none\" || this.__disabled) {\n // void\n } else {\n this.validateLayout();\n }\n };\n /**\r\n * Returns Tooltip X coordinate if it's set, or middle of the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return X (px)\r\n */\n Container.prototype.getTooltipX = function () {\n return _super.prototype.getTooltipX.call(this);\n };\n /**\r\n * Returns Tooltip Y coordinate if it's set, or middle of the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Y (px)\r\n */\n Container.prototype.getTooltipY = function () {\n return _super.prototype.getTooltipY.call(this);\n };\n Object.defineProperty(Container.prototype, \"fontFamily\", {\n /**\r\n * @return Font family\r\n */\n get: function get() {\n return this.getPropertyValue(\"fontFamily\");\n },\n /**\r\n * Font family to be used for the text.\r\n *\r\n * Parts of the text may override this setting using in-line formatting.\r\n *\r\n * @param value Font family value\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"fontFamily\", value, true)) {\n this.setSVGAttribute({\n \"font-family\": value\n });\n this.invalidateLabels();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Container.prototype, \"fontSize\", {\n /**\r\n * @return Font size\r\n */\n get: function get() {\n return this.getPropertyValue(\"fontSize\");\n },\n /**\r\n * Font size to be used for the text. The size can either be numeric, in\r\n * pixels, or other measurements.\r\n *\r\n * Parts of the text may override this setting using in-line formatting.\r\n *\r\n * @param value Font size value\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"fontSize\", value, true)) {\n this.setSVGAttribute({\n \"font-size\": value\n });\n this.invalidateLabels();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * When fontSize of fontFamily changes we need to hard-invalidate all Labels of this container to position them properly.\r\n */\n Container.prototype.invalidateLabels = function () {\n this.children.each(function (child) {\n // can't import Label because of Circular dependencies\n if (child[\"hardInvalidate\"]) {\n child[\"hardInvalidate\"]();\n } else if (child instanceof Container) {\n child.invalidateLabels();\n }\n });\n };\n Object.defineProperty(Container.prototype, \"fontWeight\", {\n /**\r\n * @return Font weight\r\n */\n get: function get() {\n return this.getPropertyValue(\"fontWeight\");\n },\n /**\r\n * Font weight to use for text.\r\n *\r\n * Parts of the text may override this setting using in-line formatting.\r\n *\r\n * @param value Font weight\r\n */\n set: function set(value) {\n this.setPropertyValue(\"fontWeight\", value);\n this.setSVGAttribute({\n \"font-weight\": value\n });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Container.prototype, \"textDecoration\", {\n /**\r\n * @return Decoration\r\n */\n get: function get() {\n return this.getPropertyValue(\"textDecoration\");\n },\n /**\r\n * A text decoration to use for text.\r\n *\r\n * Parts of the text may override this setting using in-line formatting.\r\n *\r\n * @param value Decoration\r\n */\n set: function set(value) {\n this.setPropertyValue(\"textDecoration\", value);\n this.setSVGAttribute({\n \"text-decoration\": value\n });\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Disposes (destroys) the element and all its children.\r\n */\n Container.prototype.dispose = function () {\n if (this._background) {\n this._background.dispose();\n }\n this._shouldBeReady = [];\n this.disposeChildren();\n _super.prototype.dispose.call(this);\n };\n /**\r\n * Applies a [[SpriteState]] on this element.\r\n *\r\n * The first parameter can either be a name of the state or a [[SpriteState]]\r\n * instance.\r\n *\r\n * When run, this method will apply SVG properties defined in a\r\n * [[SpriteState]], but only those that are relevant to this particular\r\n * element, that is are listed in its respective `properties` array.\r\n *\r\n * @see {@link SpriteState}\r\n * @param value A state - name key or instance\r\n * @param transitionDuration Duration of the transition between current and new state\r\n * @param easing An easing function\r\n */\n Container.prototype.setState = function (value, transitionDuration, easing) {\n var stateName = value;\n if (value instanceof SpriteState) {\n stateName = value.name;\n }\n if (this.setStateOnChildren) {\n $iter.each(this.children.iterator(), function (child) {\n child.setState(stateName, transitionDuration, easing);\n // not good to set it in child setState\n if (stateName != \"active\") {\n child.isActive = false;\n }\n });\n }\n if (this._background) {\n this._background.setState(stateName);\n }\n if (this.setStateOnSprites.length) {\n $array.each(this.setStateOnSprites, function (item) {\n item.setState(stateName, transitionDuration, easing);\n });\n }\n return _super.prototype.setState.call(this, value, transitionDuration, easing);\n };\n // otherwise isActive won't work properly with background\n Container.prototype.setActive = function (value) {\n _super.prototype.setActive.call(this, value);\n if (this._background) {\n this._background.isActive = value;\n }\n };\n /**\r\n * Dispatches ready event. Dispatches when all children are ready.\r\n */\n Container.prototype.dispatchReady = function () {\n var _this = this;\n if (!this.isReady() && !this.isDisposed()) {\n var allReady_1 = true;\n this.children.each(function (sprite) {\n if (!sprite.__disabled && !sprite.disabled && !sprite.isReady()) {\n allReady_1 = false;\n }\n });\n $array.each(this._shouldBeReady, function (sprite) {\n if (!sprite.__disabled && !sprite.disabled && !sprite.isReady()) {\n allReady_1 = false;\n }\n });\n if (allReady_1) {\n _super.prototype.dispatchReady.call(this);\n } else {\n registry.events.once(\"exitframe\", function () {\n _this.dispatchReady();\n system.requestFrame();\n }, undefined, false);\n }\n }\n };\n /**\r\n * Called during the System.update method\r\n *\r\n * @ignore Exclude from docs\r\n */\n Container.prototype._systemUpdate = function (skippedSprites) {\n this.children.each(function (child) {\n if (child.invalid) {\n if (!child._systemCheckIfValidate()) {\n skippedSprites.push(child);\n } else if (child.dataItem && child.dataItem.component && child.dataItem.component.dataInvalid) {\n skippedSprites.push(child);\n } else {\n child.validate();\n }\n }\n });\n _super.prototype._systemUpdate.call(this, skippedSprites);\n };\n /**\r\n * Called during the System.validatePositions method\r\n *\r\n * @ignore Exclude from docs\r\n */\n Container.prototype._systemValidatePositions = function () {\n this.children.each(function (sprite) {\n if (sprite.positionInvalid) {\n sprite.validatePosition();\n }\n });\n _super.prototype._systemValidatePositions.call(this);\n };\n /**\r\n * Called during the System.validateLayouts method\r\n *\r\n * @ignore Exclude from docs\r\n */\n Container.prototype._systemValidateLayouts = function () {\n if (this.layoutInvalid && !this.isDisposed()) {\n this.validateLayout();\n }\n };\n Object.defineProperty(Container.prototype, \"tapToActivate\", {\n /**\r\n * @return Enable touch protection?\r\n */\n get: function get() {\n return this._tapToActivate;\n },\n /**\r\n * If set to `true` the chart's regular touch functionality will be suspended\r\n * so that the whole page it is located in remains scrollable, even when\r\n * swiping over the chart's body.\r\n *\r\n * User will need to tap the chart in order to activate its regular touch\r\n * functionality.\r\n *\r\n * The chart will remain \"active\" as long as user keeps interacting with the\r\n * chart. After `tapTimeout` milliseconds the chart will return to its\r\n * \"protected\" mode.\r\n *\r\n * @default false\r\n * @since 4.4.0\r\n * @param value Enable touch protection?\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/touch/} For more information.\r\n */\n set: function set(value) {\n if (this._tapToActivate != value) {\n this.setTapToActivate(value);\n }\n },\n enumerable: true,\n configurable: true\n });\n Container.prototype.setTapToActivate = function (value) {\n var _this = this;\n this._tapToActivate = value;\n this.interactions.isTouchProtected = value;\n // setEventDisposer will also remove listeners if value == false\n if (value) {\n this.interactions.setEventDisposer(\"container-tapToActivate\", value, function () {\n return new MultiDisposer([_this.events.on(\"hit\", _this.handleTapToActivate, _this, false), _this.events.on(\"down\", _this.initTapTimeout, _this, false), _this.events.on(\"track\", _this.initTapTimeout, _this, false),\n //this.events.on(\"drag\", this.initTapTimeout, this, false),\n getInteraction().body.events.on(\"down\", function (ev) {\n if (!getInteraction().isLocalElement(ev.pointer, _this.paper.svg, _this.uid)) {\n _this.handleTapToActivateDeactivation();\n }\n }, _this, false)]);\n });\n }\n getInteraction();\n };\n /**\r\n * @todo Ignore on non-touch events\r\n */\n Container.prototype.handleTapToActivate = function () {\n this.interactions.isTouchProtected = false;\n this.initTapTimeout();\n };\n Container.prototype.handleTapToActivateDeactivation = function () {\n this.interactions.isTouchProtected = true;\n };\n Container.prototype.initTapTimeout = function () {\n var _this = this;\n if (this._tapToActivateTimeout) {\n this._tapToActivateTimeout.dispose();\n }\n if (this.tapToActivate && !this.interactions.isTouchProtected && this.tapTimeout) {\n this._tapToActivateTimeout = this.setTimeout(function () {\n _this.handleTapToActivateDeactivation();\n }, this.tapTimeout);\n }\n };\n return Container;\n}(Sprite);\nexport { Container };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Container\"] = Container;","const hMoney = (cents) => `£${(cents / 100).toFixed(2)}`\n\n\nexport {\n hMoney\n}\n","import { createContext } from \"react\";\n\ninterface AppContextProps {\n onSelectAction?: (x: any, y?: any) => void;\n selectedContainer?: any;\n setSelectedContainer?: (x: any) => void;\n formType?: string;\n setFormType?: (x: string) => void;\n cardTab?: string;\n setCardTab?: (x: string) => void;\n showTaggingForm?: boolean;\n setShowTaggingForm?: (x: boolean) => void;\n highlightedIds?: any[];\n setHighlightedIds?: (x: any) => void;\n currentTicketId?: string;\n requestedAtDate?: string;\n setRequestedAtDate?: (x: string) => void;\n eventId?: string;\n setEventId?: (x: string) => void;\n serviceUuid?: string;\n setServiceUuid?: (x: string) => void;\n requestType?: string;\n setRequestType: (x: string) => void;\n isDrawerOpen?: boolean;\n closeDrawer?: () => void;\n activeChannel?: string;\n setIsDrawerOpen?: (x: boolean) => void;\n setActiveChannel?: (x: string) => void;\n toggleDrawerAndSetChannel?: (x: any) => void;\n onSelectDate?: (x: any, y?: any) => void;\n openRemediation?: boolean;\n setOpenRemediation?: (x: any) => void;\n onOpenRemediation?: any;\n onCloseRemediation?: any;\n shouldScroll?: boolean,\n setShouldScroll?: (x: any) => void;\n}\n\nconst AppContext = createContext<AppContextProps>({\n onSelectAction: (_x, {}) => {},\n selectedContainer: undefined,\n setSelectedContainer: (_x) => {},\n formType: \"all\",\n setFormType: (_x) => {},\n cardTab: \"request\",\n setCardTab: (_x) => {},\n showTaggingForm: false,\n setShowTaggingForm: (_x) => {},\n highlightedIds: [],\n setHighlightedIds: (_x) => {},\n currentTicketId: \"\",\n requestedAtDate: \"\",\n setRequestedAtDate: (_x) => {},\n eventId: \"\",\n setEventId: (_x) => {},\n requestType: \"\",\n setRequestType: (_x) => {},\n serviceUuid: \"\",\n setServiceUuid: (_x) => {},\n isDrawerOpen: false,\n closeDrawer: () => {},\n activeChannel: \"\",\n setIsDrawerOpen: (_x) => {},\n setActiveChannel: (_x) => {},\n toggleDrawerAndSetChannel: (_x) => {},\n onSelectDate: (_x, _y) => {},\n});\n\nexport default AppContext;\n","import _ from 'lodashExtended';\n\nimport { getSectionData } from '../sections/selectors';\nimport GeneralInformation from '../components/sections/GeneralInformation';\n\nconst getInternalStorageTypes = (state) => {\n return _.orderBy(state.app.internalStorageTypes, 'sortOrder')\n}\n\nconst getInternalStorageType = (storageTypeId, state) => {\n return state.app.internalStorageTypes[storageTypeId] || {}\n}\n\nconst getInternalContainerTypes = (storageTypeId, state) => {\n return _(state.app.internalContainerTypes).filter({storageTypeId}).orderBy('sortOrder').value()\n}\n\nconst getInternalContainerType = (containerTypeId, state) => {\n return state.app.internalContainerTypes[containerTypeId] || {}\n}\n\nconst checkAllDataLoaded = (state) => {\n return _.difference(['waste_audits', 'sections', 'bins', 'rooms','bulkContainments'], Object.keys(state.firestore.data)).length === 0\n}\n\nconst getInternalContainerContaminants = (containerTypeId, state) => {\n return _(state.app.internalContainerContaminants)\n .filter(({checkInContainerTypeIds}) => _.includes(checkInContainerTypeIds, containerTypeId))\n .orderBy('sortOrder').value()\n}\n\nconst getInternalContainerContaminant = (containmentId, state) => {\n return state.app.internalContainerContaminants[containerTypeId] || {}\n}\n\nconst getAllInternalContainerContaminants = (state) => {\n return state.app.internalContainerContaminants\n}\n\nconst getBulkStorageTypes = (state) => {\n return _.orderBy(state.app.bulkStorageTypes, 'sortOrder')\n}\n\nconst getBulkStorageType = (storageTypeId, state) => {\n return state.app.bulkStorageTypes[storageTypeId] || {}\n}\n\nconst getExternalContainerContaminants = (storageTypeId, state) => {\n return _(state.app.externalContainerContaminants)\n .filter(({checkInStorageTypeIds}) => _.includes(checkInStorageTypeIds, storageTypeId))\n .orderBy('sortOrder').value()\n}\n\nconst getAllExternalContainerContaminants = (state) => {\n return state.app.externalContainerContaminants\n}\n\nconst getExternalContainerContaminant = (storageTypeId, state) => {\n return state.app.externalContainerContaminants[storageTypeId] || {}\n}\n\nconst getCoworkerContacts = (state) => {\n return state.app.coworkerContacts\n}\n\nconst getCurrentUser = (state) => {\n return state.app.currentUser\n}\n\nconst getStorageType = (storageTypeId, state) => {\n return(_.find([getInternalStorageType(storageTypeId, state), getBulkStorageType(storageTypeId, state)], _.isPresent))\n}\n\nconst getAllContaminants = (state) => {\n return {\n ...getAllInternalContainerContaminants(state),\n ...getAllExternalContainerContaminants(state)\n }\n}\n\nconst getClinicallyActiveRoomCount = (state) => parseInt(getSectionData(GeneralInformation.sectionId, state).clinicallyActiveRoomsCount)\n\nconst getRequiredRoomCount = (state) => {\n const clinicallyActiveRoomsCount = getClinicallyActiveRoomCount(state)\n if (clinicallyActiveRoomsCount === 1) {\n return 1;\n }\n else if (clinicallyActiveRoomsCount > 5) {\n return 4;\n }\n return 2;\n}\n\nexport {\n checkAllDataLoaded,\n getInternalStorageTypes,\n getInternalStorageType,\n getInternalContainerTypes,\n getInternalContainerType,\n getInternalContainerContaminants,\n getInternalContainerContaminant,\n getAllInternalContainerContaminants,\n getBulkStorageTypes,\n getBulkStorageType,\n getExternalContainerContaminants,\n getExternalContainerContaminant,\n getAllExternalContainerContaminants,\n getAllContaminants,\n getCoworkerContacts,\n getCurrentUser,\n getStorageType,\n getRequiredRoomCount,\n}\n","import { Tooltip, TooltipProps } from \"@mui/material\";\nimport _ from \"lodashExtended\";\nimport React from \"react\";\nimport { BinGroup } from \"./ticket/types\";\n\ninterface BinDotProps {\n binGroup: BinGroup;\n tooltipName?: boolean;\n tooltipPlace?: TooltipProps[\"placement\"];\n tooltipBackgroundColor?: string;\n tooltipColor?: string;\n arrowColor?: string;\n showImg?: boolean;\n imgSize?: string;\n}\n\nconst BinDot: React.FC<BinDotProps> = ({\n binGroup,\n tooltipName = false,\n tooltipPlace = \"right\",\n tooltipBackgroundColor = \"#000\",\n tooltipColor = \"#fff\",\n arrowColor = \"#000\",\n showImg = false,\n imgSize = \"30px\",\n ...props\n}) => {\n const { imageUrl } = props;\n if (_.isPresent(binGroup)) {\n const backgroundColor = binGroup.legendFillColor;\n const borderColor = binGroup.legendBorderColor;\n\n return (\n <Tooltip\n title={tooltipName ? binGroup.name : \"\"}\n placement={tooltipPlace}\n arrow\n slotProps={{\n tooltip: {\n style: {\n backgroundColor: tooltipBackgroundColor,\n color: tooltipColor,\n },\n },\n arrow: {\n style: {\n color: arrowColor,\n },\n },\n }}\n >\n {showImg && imageUrl ? (\n <img\n src={imageUrl}\n style={{ marginRight: \"10px\", width:imgSize, height: imgSize }}\n />\n ) : (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n version=\"1.1\"\n height=\"15\"\n width=\"15\"\n >\n <circle\n cx=\"7\"\n cy=\"7\"\n r=\"5\"\n fill={backgroundColor}\n stroke={borderColor}\n strokeWidth=\"3\"\n />\n </svg>\n )}\n </Tooltip>\n );\n } else {\n return <BinDotMissing />;\n }\n};\n\nexport const BinDotMissing = ({ color = \"#000000\" }) => {\n return (\n <svg\n version=\"1.1\"\n x=\"0px\"\n y=\"0px\"\n width=\"15px\"\n height=\"15px\"\n viewBox=\"0 0 40.124 40.124\"\n style={{ enableBackground: \"new 0 0 40.124 40.124\" }}\n >\n <g>\n <g>\n <path\n fill={color} // Usando el prop 'color'\n d=\"M19.938,12.141c1.856,0,2.971,0.99,2.971,2.66c0,3.033-5.414,3.869-5.414,7.55c0,0.99,0.648,2.072,1.979,2.072\n c2.042,0,1.795-1.516,2.538-2.6c0.989-1.453,5.6-3,5.6-7.023c0-4.361-3.897-6.188-7.858-6.188c-3.773,0-7.24,2.692-7.24,5.725\n c0,1.237,0.929,1.887,2.012,1.887C17.525,16.225,15.979,12.141,19.938,12.141z\"\n />\n <path\n fill={color} // Usando el prop 'color'\n d=\"M22.135,28.973c0-1.393-1.145-2.537-2.537-2.537s-2.537,1.146-2.537,2.537c0,1.393,1.145,2.537,2.537,2.537\n S22.135,30.366,22.135,28.973z\"\n />\n <path\n fill={color} // Usando el prop 'color'\n d=\"M40.124,20.062C40.124,9,31.124,0,20.062,0S0,9,0,20.062s9,20.062,20.062,20.062S40.124,31.125,40.124,20.062z M2,20.062\n C2,10.103,10.103,2,20.062,2c9.959,0,18.062,8.103,18.062,18.062c0,9.959-8.103,18.062-18.062,18.062\n C10.103,38.124,2,30.021,2,20.062z\"\n />\n </g>\n </g>\n </svg>\n );\n};\n\nexport default BinDot;\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\n\ninterface VisitDateState {\n value: Date | null;\n}\n\nconst initialState: VisitDateState = {\n value: null,\n};\n\nconst visitDateSlice = createSlice({\n name: \"visitDate\",\n initialState,\n reducers: {\n setVisitDate: (state, action: PayloadAction<Date>) => {\n state.value = action.payload;\n },\n },\n});\n\nexport const { setVisitDate } = visitDateSlice.actions;\n\nexport default visitDateSlice.reducer;\n","import { createReducer } from \"redux-act\";\nimport dotProp from \"dot-prop-immutable\";\nimport _ from \"lodashExtended\";\nimport moment from \"moment\";\nimport actions from \"./actions\";\n\nconst {\n fetchSpecificDataStart,\n fetchSpecificDataSuccess,\n fetchSpecificDataError,\n fetchPastDataStart,\n fetchPastDataSuccess,\n fetchPastDataError,\n fetchFutureDataStart,\n fetchFutureDataSuccess,\n fetchFutureDataError,\n fetchDetailsDataStart,\n fetchDetailsDataSuccess,\n fetchDetailsDataError,\n updateDataFromServer,\n updateDetailsFromServer\n} = actions;\n\nconst updateData = (oldState, data) => {\n\n const newStart =\n oldState.availableData.startDate === null ||\n moment(oldState.availableData.startDate) > moment(data.loadStartDate)\n ? data.loadStartDate\n : oldState.availableData.startDate;\n const newEnd =\n oldState.availableData.endDate === null ||\n moment(oldState.availableData.endDate) < moment(data.loadEndDate)\n ? data.loadEndDate\n : oldState.availableData.endDate;\n\n return {\n ...oldState,\n availableData: {\n startDate: newStart,\n endDate: newEnd,\n noData: data.noData,\n visits: { ...oldState.availableData.visits, ...data.visits },\n }\n };\n};\n\nconst d = dotProp\n\nconst updateDetails = (oldState, data) => {\n return { ...oldState.availableData.details, ...data.serviceReports };\n};\n\nlet calendarApiReducer = createReducer(\n {\n [fetchSpecificDataStart]: apiState => {\n return dotProp.set(apiState, \"fetchingCurrent\", true);\n },\n [fetchSpecificDataSuccess]: apiState => {\n return dotProp.set(apiState, \"fetchingCurrent\", false);\n },\n [fetchSpecificDataError]: apiState => {\n return { ...apiState, fetchingCurrent: false, errorCurrent: true };\n },\n [fetchPastDataStart]: apiState => {\n return dotProp.set(apiState, \"fetchingPast\", true);\n },\n [fetchPastDataSuccess]: apiState => {\n return dotProp.set(apiState, \"fetchingPast\", false);\n },\n [fetchPastDataError]: apiState => {\n return { ...apiState, fetchingPast: false, errorPast: true };\n },\n [fetchFutureDataStart]: apiState => {\n return dotProp.set(apiState, \"fetchingFuture\", true);\n },\n [fetchFutureDataSuccess]: apiState => {\n return dotProp.set(apiState, \"fetchingFuture\", false);\n },\n [fetchFutureDataError]: apiState => {\n return { ...apiState, fetchingFuture: false, errorFuture: true };\n },\n [fetchDetailsDataStart]: (apiState, date) => {\n return dotProp.set(\n apiState,\n \"fetchingDetails\",\n apiState.fetchingDetails.concat([date])\n );\n },\n [fetchDetailsDataSuccess]: (apiState, date) => {\n return {\n ...apiState,\n fetchingDetails: apiState.fetchingDetails.filter(item => item !== date),\n fetchedDetails: apiState.fetchedDetails.concat([date])\n };\n },\n [fetchDetailsDataError]: (apiState, date) => {\n return {\n ...apiState,\n fetchingDetails: apiState.fetchingDetails.filter(item => item !== date),\n errorDetails: apiState.errorDetails.concat([date])\n };\n },\n [updateDataFromServer]: (apiState, data) => {\n return updateData(apiState, data);\n },\n [updateDetailsFromServer]: (apiState, data) => {\n return _.reduce(data, (result, keyData, key) => {\n return d.merge(result, `availableData.${key}`, keyData)\n }, apiState)\n }\n },\n {\n fetchingPast: false,\n fetchingFuture: false,\n fetchingCurrent: false,\n fetchingDetails: [],\n fetchedDetails: [],\n errorDetails: [],\n errorPast: false,\n errorFuture: false,\n errorCurrent: false,\n availableData: {\n noData: false,\n startDate: null,\n endDate: null,\n visits: {},\n\n }\n }\n);\n\n\nexport { calendarApiReducer };\n\n","import {\n Action,\n configureStore,\n ConfigureStoreOptions,\n ThunkAction,\n} from \"@reduxjs/toolkit\";\nimport { api } from \"api/apiConfig\";\nimport visitDateReducer from \"api/visitDateSlice\";\nimport { createHashHistory } from \"history\";\nimport { TypedUseSelectorHook, useDispatch, useSelector } from \"react-redux\";\nimport { createReduxHistoryContext } from \"redux-first-history\";\nimport { calendarApiReducer } from \"service-calendar/reducer\";\n\ninterface RootStateInitial {\n ticketId: any;\n calendarApi: any;\n organisationId: string;\n locationId: string;\n developer: boolean;\n visitDate?: { value: string };\n api: any; // Replace 'any' with the actual type if you have it\n}\n\n// const createInitialHistory = () => {\n// const history = createBrowserHistory();\n// const currentLocation = window.location;\n\n// // Use the full pathname from the current location\n// let initialPath =\n// currentLocation.pathname + currentLocation.search + currentLocation.hash;\n\n// console.log(\"Initial path:\", initialPath);\n\n// // Only push to history if it's not already there\n// if (history.location.pathname !== initialPath) {\n// history.push(initialPath);\n// }\n\n// return history;\n// };\nconst initialHistory = createHashHistory();\n// initialHistory.push(window.location.pathname + window.location.search);\n\nconst { createReduxHistory, routerMiddleware, routerReducer } =\n createReduxHistoryContext({\n // history: createInitialHistory(),\n history: initialHistory,\n });\n\nconst rootReducer = (state: any, action: Action): RootStateInitial => {\n return {\n ...state,\n calendarApi: calendarApiReducer(state.calendarApi, action),\n router: routerReducer(state.router, action),\n [api.reducerPath]: api.reducer(state[api.reducerPath], action),\n visitDate: visitDateReducer(state.visitDate, action),\n };\n};\n\nconst createStore = (\n options?: ConfigureStoreOptions[\"preloadedState\"] | undefined\n) => {\n return configureStore({\n reducer: rootReducer,\n middleware: (getDefaultMiddleware) =>\n getDefaultMiddleware().concat(api.middleware).concat(routerMiddleware),\n ...options,\n });\n};\n\nexport const createStoreWithHistory = (preloadedState) => {\n const store = createStore({ preloadedState });\n const history = createReduxHistory(store);\n\n return { store, history };\n};\n\nexport type AppDispatch = ReturnType<typeof createStore>[\"dispatch\"];\nexport const useAppDispatch: () => AppDispatch = useDispatch;\nexport type RootState = ReturnType<typeof createStore>[\"getState\"];\nexport const useTypedSelector: TypedUseSelectorHook<RootStateInitial> =\n useSelector;\nexport type AppThunk<ReturnType = void> = ThunkAction<\n ReturnType,\n RootStateInitial,\n unknown,\n Action<string>\n>;\n","/**\r\n * Functionality for adding images in SVG tree.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Sprite } from \"../Sprite\";\nimport { registry } from \"../Registry\";\nimport * as $dom from \"../utils/DOM\";\nimport * as $type from \"../utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Used to add `<image>` elements to SVG.\r\n *\r\n * @see {@link IImageEvents} for a list of available events\r\n * @see {@link IImageAdapters} for a list of available Adapters\r\n */\nvar Image = /** @class */function (_super) {\n tslib_1.__extends(Image, _super);\n /**\r\n * Constructor\r\n */\n function Image() {\n var _this = _super.call(this) || this;\n _this.className = \"Image\";\n _this.element = _this.paper.add(\"image\");\n _this.applyTheme();\n _this.width = 50;\n _this.height = 50;\n return _this;\n }\n /**\r\n * Draws an `<image>` element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Image.prototype.draw = function () {\n _super.prototype.draw.call(this);\n if (this.href) {\n var width = this.innerWidth;\n var height = this.innerHeight;\n if ($type.isNumber(this.widthRatio)) {\n width = height * this.widthRatio;\n this.width = width;\n }\n if ($type.isNumber(this.heightRatio)) {\n height = width * this.heightRatio;\n this.height = height;\n }\n this.element.attr({\n \"width\": width,\n \"height\": height\n });\n this.element.attrNS($dom.XLINK, \"xlink:href\", this.href);\n }\n };\n Object.defineProperty(Image.prototype, \"href\", {\n /**\r\n * @return Image URI\r\n */\n get: function get() {\n return this.getPropertyValue(\"href\");\n },\n /**\r\n * An image URI.\r\n *\r\n * @param value Image URI\r\n */\n set: function set(value) {\n this.setPropertyValue(\"href\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Image.prototype, \"widthRatio\", {\n /**\r\n * @return Ratio\r\n */\n get: function get() {\n return this.getPropertyValue(\"widthRatio\");\n },\n /**\r\n * Sets image `width` relatively to its `height`.\r\n *\r\n * If image's `height = 100` and `widthRatio = 0.5` the actual width will be\r\n * `50`.\r\n *\r\n * @param value Ratio\r\n */\n set: function set(value) {\n this.setPropertyValue(\"widthRatio\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Image.prototype, \"heightRatio\", {\n /**\r\n * @return Ratio\r\n */\n get: function get() {\n return this.getPropertyValue(\"heightRatio\");\n },\n /**\r\n * Sets image `height` relatively to its `width`.\r\n *\r\n * If image's `width = 100` and `heightRatio = 0.5` the actual height will be\r\n * `50`.\r\n *\r\n * @param value Ratio\r\n */\n set: function set(value) {\n this.setPropertyValue(\"heightRatio\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Image.prototype, \"bbox\", {\n /**\r\n * Returns bounding box (square) for this element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n get: function get() {\n return {\n x: 0,\n y: 0,\n width: this.pixelWidth,\n height: this.pixelHeight\n };\n },\n enumerable: true,\n configurable: true\n });\n return Image;\n}(Sprite);\nexport { Image };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Image\"] = Image;","/**\r\n * Module for a multi-part arched line.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Polyline } from \"./Polyline\";\nimport { registry } from \"../Registry\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $path from \"../../core/rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws a multi-part arched line.\r\n *\r\n * @see {@link IPolyarcEvents} for a list of available events\r\n * @see {@link IPolyarcAdapters} for a list of available Adapters\r\n */\nvar Polyarc = /** @class */function (_super) {\n tslib_1.__extends(Polyarc, _super);\n /**\r\n * Constructor\r\n */\n function Polyarc() {\n var _this = _super.call(this) || this;\n _this.className = \"Polyarc\";\n _this.controlPointDistance = 0.5;\n _this.controlPointPosition = 0.5;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Creats and adds an SVG path for the arc.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Polyarc.prototype.makePath = function () {\n this._distance = 0;\n var segments = this.segments;\n if (segments && segments.length > 0) {\n var path = \"\";\n this._realSegments = [];\n for (var i = 0, len = segments.length; i < len; i++) {\n var points = segments[i];\n var realPoints = [];\n this._realSegments.push(realPoints);\n if (points.length > 0) {\n path += $path.moveTo(points[0]);\n for (var p = 1; p < points.length; p++) {\n var pointA = points[p - 1];\n var pointB = points[p];\n var distanceAB = $math.getDistance(pointB, pointA);\n var cpDistance = distanceAB * this.controlPointDistance;\n var controlPointPosition = this.controlPointPosition;\n var angle = -$math.getAngle(pointA, pointB);\n var cpx = pointA.x + (pointB.x - pointA.x) * controlPointPosition * 0.5 - cpDistance * $math.sin(angle);\n var cpy = pointA.y + (pointB.y - pointA.y) * controlPointPosition * 0.5 - cpDistance * $math.cos(angle);\n var controlPoint1 = {\n x: cpx,\n y: cpy\n };\n var cpx2 = pointA.x + (pointB.x - pointA.x) * controlPointPosition * 1.5 - cpDistance * $math.sin(angle);\n var cpy2 = pointA.y + (pointB.y - pointA.y) * controlPointPosition * 1.5 - cpDistance * $math.cos(angle);\n var controlPoint2 = {\n x: cpx2,\n y: cpy2\n };\n path += $path.cubicCurveTo(pointB, controlPoint1, controlPoint2);\n // we add a lot of points in order to get the position/angle later\n var stepCount = Math.ceil(distanceAB);\n var prevPoint = pointA;\n if (stepCount > 0) {\n for (var i_1 = 0; i_1 <= stepCount; i_1++) {\n var point = $math.getPointOnCubicCurve(pointA, pointB, controlPoint1, controlPoint2, i_1 / stepCount);\n realPoints.push(point);\n this._distance += $math.getDistance(prevPoint, point);\n prevPoint = point;\n }\n } else {\n realPoints.push(pointA);\n }\n }\n }\n }\n this.path = path;\n }\n };\n Object.defineProperty(Polyarc.prototype, \"controlPointPosition\", {\n /**\r\n * @return Position (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"controlPointPosition\");\n },\n /**\r\n * Relative position along the line the control point is. (0-1)\r\n *\r\n * @default 0.5\r\n * @param value Position (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"controlPointPosition\", value);\n this.makePath();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Polyarc.prototype, \"controlPointDistance\", {\n /**\r\n * @return Distance (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"controlPointDistance\");\n },\n /**\r\n * Relative distance of the control point. (0-1)\r\n *\r\n * Default is half the length of the line. (0.5)\r\n *\r\n * @default 0.5\r\n * @param value Distance (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"controlPointDistance\", value);\n this.makePath();\n },\n enumerable: true,\n configurable: true\n });\n return Polyarc;\n}(Polyline);\nexport { Polyarc };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Polyarc\"] = Polyarc;","/**\r\n * Morpher module contains functionality that allows morphing one polygon to\r\n * another.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObject } from \"../Base\";\nimport { Animation, AnimationDisposer } from \"../utils/Animation\";\nimport * as $math from \"../utils/Math\";\nimport * as $ease from \"../utils/Ease\";\nimport * as $type from \"../utils/Type\";\n/**\r\n * Morpher can be used to morph one polygon to some other polygon.\r\n */\nvar Morpher = /** @class */function (_super) {\n tslib_1.__extends(Morpher, _super);\n /**\r\n * Constructor.\r\n *\r\n * @param morphable An object to morph\r\n */\n function Morpher(morphable) {\n var _this = _super.call(this) || this;\n /**\r\n * A storage for measurements.\r\n */\n _this._bboxes = [];\n /**\r\n * Duration of the morphing animation in milliseconds.\r\n */\n _this.morphDuration = 800;\n /**\r\n * An easing function to use for morphing animation.\r\n *\r\n * @see {@link Ease}\r\n */\n _this.morphEasing = $ease.cubicOut;\n /**\r\n * If set to `true`, all separate parts of the multi-part polygon will\r\n * morph into a single circle or polygon when using built-in methods\r\n * `morphToCircle()` or `morphToPolygon()`.\r\n *\r\n * Otherwise each separate part of polygon will morph to individual target\r\n * circle or polgyon.\r\n */\n _this.morphToSingle = true;\n /**\r\n * A ratio to scale morphed object in relation to the source object.\r\n */\n _this.scaleRatio = 1;\n _this.className = \"Morpher\";\n _this.morphable = morphable;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Morphs a polygon to another polygon.\r\n *\r\n * @param toPoints Corner points of the target shape\r\n * @param duration Duration in milliseconds\r\n * @param easing Easing function\r\n * @return Animation\r\n */\n Morpher.prototype.morphToPolygon = function (toPoints, duration, easing) {\n var points = this.morphable.currentPoints;\n if (points && toPoints) {\n this.sortPoints(points);\n this.sortPoints(toPoints);\n this._morphFromPointsReal = [];\n this._morphToPointsReal = [];\n if (!$type.hasValue(duration)) {\n duration = this.morphDuration;\n }\n if (!$type.hasValue(easing)) {\n easing = this.morphEasing;\n }\n this._morphFromPointsReal = this.normalizePoints(toPoints, points);\n this._morphToPointsReal = this.normalizePoints(points, toPoints);\n this.morphable.currentPoints = this._morphFromPointsReal;\n var animation = new Animation(this, {\n property: \"morphProgress\",\n from: 0,\n to: 1\n }, duration, easing);\n this._disposers.push(animation);\n animation.start();\n return animation;\n }\n };\n /**\r\n * [normalizePoints description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param pointsA Point A\r\n * @param pointsB Point B\r\n * @return Normalized points\r\n */\n Morpher.prototype.normalizePoints = function (pointsA, pointsB) {\n for (var i = 0, len = pointsA.length; i < len; i++) {\n var surfaceA = pointsA[i][0];\n var holeA = pointsA[i][1];\n var bboxA = $type.getValue($math.getBBox(surfaceA));\n var middleX = bboxA.x + bboxA.width;\n var middleY = bboxA.y + bboxA.height;\n // check if we have the same in PointsB\n if (!pointsB[i]) {\n pointsB[i] = [];\n }\n // check if we have surface in pointsB\n if (surfaceA && !pointsB[i][0]) {\n pointsB[i][0] = [{\n x: middleX,\n y: middleY\n }, {\n x: middleX,\n y: middleY\n }];\n }\n if (pointsB[i][0]) {\n pointsB[i][0] = this.addPoints(pointsB[i][0], surfaceA.length);\n var distance = Infinity;\n var splitAt = 0;\n for (var a = 0; a < pointsB[i][0].length; a++) {\n var newDistance = $math.getDistance(pointsB[i][0][a], surfaceA[0]);\n if (newDistance < distance) {\n splitAt = a;\n distance = newDistance;\n }\n }\n var partA = pointsB[i][0].slice(0, splitAt);\n var partB = pointsB[i][0].slice(splitAt);\n pointsB[i][0] = partB.concat(partA);\n }\n if (holeA) {\n if (!pointsB[i][1]) {\n pointsB[i][1] = [{\n x: middleX,\n y: middleY\n }, {\n x: middleX,\n y: middleY\n }];\n }\n pointsB[i][1] = this.addPoints(pointsB[i][1], holeA.length);\n }\n }\n return pointsB;\n };\n /**\r\n * [sortPoints description]\r\n *\r\n * @ignore Exclude from doc\r\n * @todo Description\r\n * @param points [description]\r\n * @return common bbox of points\r\n */\n Morpher.prototype.sortPoints = function (points) {\n points.sort(function (a, b) {\n var bbox1 = $type.getValue($math.getBBox(a[0]));\n var bbox2 = $type.getValue($math.getBBox(b[0]));\n if (bbox1.width * bbox1.height > bbox2.width * bbox2.height) {\n return -1;\n } else {\n return 1;\n }\n });\n var bboxes = [];\n for (var i = 0, len = points.length; i < len; i++) {\n var surface = points[i][0];\n if (surface) {\n bboxes.push($type.getValue($math.getBBox(surface)));\n }\n }\n return $math.getCommonRectangle(bboxes);\n };\n /**\r\n * Morphs polygon to a circle (it is actually a polygon which makes a circle).\r\n *\r\n * @param radius Target circle radius (px)\r\n * @param duration Duration (ms)\r\n * @param easing Easing function\r\n * @return Animation\r\n */\n Morpher.prototype.morphToCircle = function (radius, duration, easing) {\n var points = this.morphable.points;\n var commonBBox = this.sortPoints(points);\n this._morphFromPointsReal = [];\n this._morphToPointsReal = [];\n if (!$type.hasValue(duration)) {\n duration = this.morphDuration;\n }\n if (!$type.hasValue(easing)) {\n easing = this.morphEasing;\n }\n // surface\n for (var i = 0, len = points.length; i < len; i++) {\n var surface = points[i][0];\n var hole = points[i][1];\n this._morphFromPointsReal[i] = [];\n this._morphToPointsReal[i] = [];\n if (surface) {\n var toPoints = surface;\n var fromPoints = surface;\n var bbox = $type.getValue($math.getBBox(fromPoints)); // this._bboxes[i];\n if (this.morphToSingle) {\n bbox = $type.getValue(commonBBox);\n }\n var middleX = bbox.x + bbox.width / 2;\n var middleY = bbox.y + bbox.height / 2;\n var realRadius = radius;\n if (!$type.isNumber(realRadius)) {\n realRadius = Math.min(bbox.width / 2, bbox.height / 2);\n }\n toPoints = [];\n // find angle for the first point\n var startAngle = $math.getAngle({\n x: middleX,\n y: middleY\n }, surface[0]);\n var count = 100;\n if (surface.length > count) {\n count = surface.length;\n }\n fromPoints = this.addPoints(surface, count);\n count = fromPoints.length; // add Points might increase number a bit\n var angle = 360 / (count - 1);\n for (var a = 0; a < count; a++) {\n var realAngle = angle * a + startAngle;\n var pointOnCircle = {\n x: middleX + realRadius * $math.cos(realAngle),\n y: middleY + realRadius * $math.sin(realAngle)\n };\n toPoints[a] = pointOnCircle;\n }\n if (hole && hole.length > 0) {\n for (var i_1 = 0, hlen = hole.length; i_1 < hlen; i_1++) {\n toPoints.push({\n x: middleX,\n y: middleY\n });\n }\n }\n this._morphFromPointsReal[i][0] = fromPoints;\n this._morphToPointsReal[i][0] = toPoints;\n }\n }\n this.morphable.currentPoints = this._morphFromPointsReal;\n var animation = new Animation(this, {\n property: \"morphProgress\",\n from: 0,\n to: 1\n }, duration, easing);\n this._disposers.push(animation);\n animation.start();\n return animation;\n };\n /**\r\n * [addPoints description]\r\n *\r\n * @ignore Exclude from doc\r\n * @todo Description\r\n * @param points [description]\r\n * @param mustHaveCount [description]\r\n * @return [description]\r\n */\n Morpher.prototype.addPoints = function (points, mustHaveCount) {\n var addToSegmentCount = Math.round(mustHaveCount / points.length);\n var newPoints = [];\n for (var i = 0, len = points.length; i < len; i++) {\n var point0 = points[i];\n var point1 = void 0;\n if (i == points.length - 1) {\n point1 = points[0];\n } else {\n point1 = points[i + 1];\n }\n newPoints.push(point0);\n for (var p = 1; p < addToSegmentCount; p++) {\n var percent = p / addToSegmentCount;\n var extraPoint = {\n x: point0.x + (point1.x - point0.x) * percent,\n y: point0.y + (point1.y - point0.y) * percent\n };\n newPoints.push(extraPoint);\n }\n // stop adding in case we already added more than left in original\n if (newPoints.length + points.length - i == mustHaveCount) {\n addToSegmentCount = 0;\n }\n }\n if (newPoints.length < mustHaveCount && points.length > 0) {\n var lastPoint = points[points.length - 1];\n for (var p = newPoints.length; p < mustHaveCount; p++) {\n // add same as last\n newPoints.push({\n x: lastPoint.x,\n y: lastPoint.y\n });\n }\n }\n return newPoints;\n };\n /**\r\n * Morphs polygon into a rectangular polygon.\r\n *\r\n * @param width Width of the target rectangle (px)\r\n * @param height Height of the target rectangle (px)\r\n * @param duration Duration (ms)\r\n * @param easing Easing function\r\n * @return Animation\r\n */\n Morpher.prototype.morphToRectangle = function (width, height, duration, easing) {\n var points = this.morphable.points;\n this.sortPoints(points);\n this._morphFromPointsReal = [];\n this._morphToPointsReal = [];\n if (!$type.hasValue(duration)) {\n duration = this.morphDuration;\n }\n if (!$type.hasValue(easing)) {\n easing = this.morphEasing;\n }\n //\t\tlet biggestBBox: IRectangle = this._bboxes[this._biggestIndex];\n // surface\n for (var i = 0, len = points.length; i < len; i++) {\n var surface = points[i][0];\n var hole = points[i][1];\n this._morphFromPointsReal[i] = [];\n this._morphToPointsReal[i] = [];\n if (surface) {\n var toPoints = surface;\n var fromPoints = surface;\n var bbox = this._bboxes[i];\n // we only work with first area. TODO: maybe we should find the biggest one?\n if (this.morphToSingle) {\n //if (i != this._biggestIndex) {\n //\tbbox = { x: biggestBBox.x + biggestBBox.width / 2, y: biggestBBox.y + biggestBBox.height / 2, width: 0, height: 0 };\n //}\n }\n var x = bbox.x;\n var y = bbox.y;\n var realWidth = width;\n var realHeight = height;\n if (!$type.isNumber(realWidth)) {\n realWidth = bbox.width;\n }\n if (!$type.isNumber(realHeight)) {\n realHeight = bbox.height;\n }\n toPoints = [{\n x: x,\n y: y\n }, {\n x: x + realWidth,\n y: y\n }, {\n x: x + realWidth,\n y: y + realHeight\n }, {\n x: x,\n y: y + realHeight\n }];\n toPoints = this.addPoints(toPoints, surface.length);\n // if polygon has less points then count, add\n if (surface.length < 4) {\n for (var i_2 = surface.length; i_2 < 4; i_2++) {\n toPoints.push({\n x: surface[i_2].x,\n y: surface[i_2].y\n });\n }\n }\n if (hole && hole.length > 0) {\n var middleX = bbox.x + bbox.width / 2;\n var middleY = bbox.y + bbox.height / 2;\n for (var i_3 = 0, hlen = hole.length; i_3 < hlen; i_3++) {\n toPoints.push({\n x: middleX,\n y: middleY\n });\n }\n }\n this._morphFromPointsReal[i][0] = fromPoints;\n this._morphToPointsReal[i][0] = toPoints;\n }\n }\n this.morphable.currentPoints = this._morphFromPointsReal;\n var animation = new Animation(this, {\n property: \"morphProgress\",\n from: 0,\n to: 1\n }, duration, easing);\n this._disposers.push(animation);\n animation.start();\n return animation;\n };\n Object.defineProperty(Morpher.prototype, \"morphProgress\", {\n /**\r\n * Returns the progress of morph transition.\r\n *\r\n * @return Progress (0-1)\r\n */\n get: function get() {\n return this._morphProgress;\n },\n /**\r\n * Progress of the morph transition.\r\n *\r\n * Setting this will also trigger actual transformation.\r\n *\r\n * @param value Progress (0-1)\r\n */\n set: function set(value) {\n this._morphProgress = value;\n var currentPoints = [];\n if (value != null) {\n var fromPoints = this._morphFromPointsReal;\n var toPoints = this._morphToPointsReal;\n if (fromPoints != null && toPoints != null) {\n for (var i = 0, len = fromPoints.length; i < len; i++) {\n var currentArea = [];\n currentPoints.push(currentArea);\n var surfaceFrom = fromPoints[i][0];\n var holeFrom = fromPoints[i][1];\n var surfaceTo = toPoints[i][0];\n var holeTo = toPoints[i][1];\n if (surfaceFrom && surfaceFrom.length > 0 && surfaceTo && surfaceTo.length > 0) {\n var currentSurface = [];\n for (var i_4 = 0, slen = surfaceFrom.length; i_4 < slen; i_4++) {\n var point0 = surfaceFrom[i_4];\n var point1 = surfaceTo[i_4];\n var currentPoint = {\n x: point0.x + (point1.x * this.scaleRatio - point0.x) * value,\n y: point0.y + (point1.y * this.scaleRatio - point0.y) * value\n };\n currentSurface.push(currentPoint);\n }\n currentArea[0] = currentSurface;\n }\n if (holeFrom && holeFrom.length > 0 && holeTo && holeTo.length > 0) {\n var currentHole = [];\n for (var i_5 = 0, hlen = holeFrom.length; i_5 < hlen; i_5++) {\n var point0 = holeFrom[i_5];\n var point1 = holeTo[i_5];\n var currentPoint = {\n x: point0.x + (point1.x * this.scaleRatio - point0.x) * value,\n y: point0.y + (point1.y * this.scaleRatio - point0.y) * value\n };\n currentHole.push(currentPoint);\n }\n currentArea[1] = currentHole;\n }\n }\n }\n }\n this.morphable.currentPoints = currentPoints;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Restores the polygon to its original appearance.\r\n *\r\n * @param duration Duration (ms)\r\n * @param easing Easing function\r\n * @return Animation\r\n */\n Morpher.prototype.morphBack = function (duration, easing) {\n this._morphToPointsReal = this._morphFromPointsReal;\n this._morphFromPointsReal = this.morphable.currentPoints;\n if (!$type.hasValue(duration)) {\n duration = this.morphDuration;\n }\n if (!$type.hasValue(easing)) {\n easing = this.morphEasing;\n }\n var animation = new Animation(this, {\n property: \"morphProgress\",\n from: 0,\n to: 1\n }, duration, easing);\n this._disposers.push(animation);\n animation.start();\n return animation;\n };\n Object.defineProperty(Morpher.prototype, \"animations\", {\n /**\r\n * Returns a list of morph animations currently being played.\r\n *\r\n * @return List of animations\r\n */\n get: function get() {\n if (!this._animations) {\n this._animations = [];\n this._disposers.push(new AnimationDisposer(this._animations));\n }\n return this._animations;\n },\n enumerable: true,\n configurable: true\n });\n return Morpher;\n}(BaseObject);\nexport { Morpher };","/**\r\n * Polygon module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Sprite } from \"../Sprite\";\nimport { Morpher } from \"../utils/Morpher\";\nimport { registry } from \"../Registry\";\nimport * as $path from \"../rendering/Path\";\nimport * as $type from \"../utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws a polygon.\r\n *\r\n * @see {@link IPolygonEvents} for a list of available events\r\n * @see {@link IPolygonAdapters} for a list of available Adapters\r\n */\nvar Polygon = /** @class */function (_super) {\n tslib_1.__extends(Polygon, _super);\n /**\r\n * Constructor\r\n */\n function Polygon() {\n var _this = _super.call(this) || this;\n _this.className = \"Polygon\";\n _this.element = _this.paper.add(\"path\");\n _this.shapeRendering = \"auto\";\n _this._currentPoints = [];\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(Polygon.prototype, \"points\", {\n /**\r\n * @return Polygon points\r\n */\n get: function get() {\n var points = this.getPropertyValue(\"points\");\n var path = this.path;\n if (path && (!points || points.length == 0)) {\n var valueStr = path.slice(1, path.length - 1);\n var segments = valueStr.split(\"ZM\");\n for (var s = 0; s < segments.length; s++) {\n var segment = segments[s];\n if (segment.length > 0) {\n var areaHole = segment.split(\"M\");\n var areaArr = areaHole[0];\n var holeArr = areaHole[1];\n if (areaArr && areaArr.length > 0) {\n var pointsArr = areaArr.split(\"L\");\n if (pointsArr.length > 0) {\n var area = [];\n var areaAndHole = [area];\n points.push(areaAndHole);\n for (var p = 0; p < pointsArr.length; p++) {\n var coords = pointsArr[p].split(\",\");\n area.push({\n x: +coords[0],\n y: +coords[1]\n });\n }\n if (holeArr && holeArr.length > 0) {\n var pointsArr_1 = holeArr.split(\"L\");\n if (pointsArr_1.length > 0) {\n var hole = [];\n areaAndHole.push(hole);\n for (var p = pointsArr_1.length - 1; p >= 0; p--) {\n var coords = pointsArr_1[p].split(\",\");\n hole.push({\n x: +coords[0],\n y: +coords[1]\n });\n }\n }\n }\n }\n }\n }\n }\n this.setPropertyValue(\"points\", points);\n this._currentPoints = points;\n }\n return points;\n },\n /**\r\n * An array of X/Y coordinates for each elbow of the polygon.\r\n *\r\n * @todo Example\r\n * @param points Polygon points\r\n */\n set: function set(points) {\n this.setPropertyValue(\"points\", points, true);\n this._currentPoints = points;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Polygon.prototype, \"currentPoints\", {\n /**\r\n * @return Polygon points\r\n */\n get: function get() {\n if ((!this._currentPoints || this._currentPoints.length == 0) && this.path) {\n this._currentPoints = this.points;\n }\n return this._currentPoints;\n },\n /**\r\n * Current points. Used when morphing the element, so that original `points`\r\n * are not overwritten.\r\n *\r\n * @param points Polygon points\r\n */\n set: function set(points) {\n if (this._currentPoints != points) {\n this._currentPoints = points;\n this.draw();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Polygon.prototype.draw = function () {\n var path = \"\";\n var points = this._currentPoints;\n var left;\n var right;\n var top;\n var bottom;\n if (points.length > 0) {\n // separate areas\n for (var i = 0, len = points.length; i < len; i++) {\n // surface\n var surface = points[i][0];\n var hole = points[i][1];\n if (surface && surface.length > 0) {\n var point = surface[0];\n path += $path.moveTo(point);\n for (var s = 0; s < surface.length; s++) {\n point = surface[s];\n path += $path.lineTo(point);\n if (!$type.isNumber(right) || right < point.x) {\n right = point.x;\n }\n if (!$type.isNumber(left) || left > point.x) {\n left = point.x;\n }\n if (!$type.isNumber(top) || top > point.y) {\n top = point.y;\n }\n if (!$type.isNumber(bottom) || bottom < point.y) {\n bottom = point.y;\n }\n }\n }\n // hole\n if (hole && hole.length > 0) {\n var point = hole[0];\n path += $path.moveTo(point);\n for (var h = 0, hlen = hole.length; h < hlen; h++) {\n point = hole[h];\n path += $path.lineTo(point);\n }\n }\n }\n if (path) {\n path += $path.closePath();\n }\n this.bbox.x = left;\n this.bbox.y = top;\n this.bbox.width = right - left;\n this.bbox.height = bottom - top;\n _super.prototype.setPath.call(this, path);\n }\n };\n /**\r\n * @ignore\r\n */\n Polygon.prototype.setPath = function (value) {\n if (_super.prototype.setPath.call(this, value)) {\n this.points = [];\n this._bbox = this.group.getBBox();\n return true;\n }\n return false;\n };\n /**\r\n * Measures element\r\n */\n Polygon.prototype.measureElement = function () {\n // Overriding to avoid extra measurement.\n };\n Object.defineProperty(Polygon.prototype, \"centerPoint\", {\n /**\r\n * A calculated center point for the shape.\r\n *\r\n * @readonly\r\n * @return Center\r\n */\n get: function get() {\n return {\n x: this.bbox.x + this.bbox.width / 2,\n y: this.bbox.y + this.bbox.height / 2\n };\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Polygon.prototype, \"morpher\", {\n /**\r\n * A [[Morpher]] instance that is used to morph polygon into some other\r\n * shape.\r\n *\r\n * @readonly\r\n * @return Morpher instance\r\n */\n get: function get() {\n if (!this._morpher) {\n this._morpher = new Morpher(this);\n this._disposers.push(this._morpher);\n }\n return this._morpher;\n },\n enumerable: true,\n configurable: true\n });\n return Polygon;\n}(Sprite);\nexport { Polygon };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Polygon\"] = Polygon;","/**\r\n * Preloader module.\r\n *\r\n * Preloader is a progress indicator.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../Container\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport { Slice } from \"./Slice\";\nimport { Label } from \"./Label\";\nimport { registry } from \"../Registry\";\nimport { percent } from \"../../core/utils/Percent\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A class used to draw and display progress indicator.\r\n *\r\n * @see {@link IPreloaderEvents} for a list of available events\r\n * @see {@link IPreloaderAdapters} for a list of available Adapters\r\n */\nvar Preloader = /** @class */function (_super) {\n tslib_1.__extends(Preloader, _super);\n /**\r\n * Constructor\r\n */\n function Preloader() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"Preloader\";\n // Set dimensions\n _this.width = percent(100);\n _this.height = percent(100);\n var interfaceColors = new InterfaceColorSet();\n // Create main container\n var sliceContainer = _this.createChild(Container);\n sliceContainer.shouldClone = false;\n // Add background (100%) slice\n var backgroundSlice = sliceContainer.createChild(Slice);\n backgroundSlice.shouldClone = false;\n backgroundSlice.radius = 53;\n backgroundSlice.arc = 360;\n backgroundSlice.fill = interfaceColors.getFor(\"fill\");\n backgroundSlice.fillOpacity = 0.8;\n backgroundSlice.innerRadius = 42;\n backgroundSlice.isMeasured = false;\n _this.backgroundSlice = backgroundSlice;\n // Add progress slice\n var progressSlice = sliceContainer.createChild(Slice);\n progressSlice.shouldClone = false;\n progressSlice.radius = 50;\n progressSlice.innerRadius = 45;\n progressSlice.fill = interfaceColors.getFor(\"alternativeBackground\");\n progressSlice.fillOpacity = 0.2;\n progressSlice.isMeasured = false;\n _this.progressSlice = progressSlice;\n // Add text label element\n var label = sliceContainer.createChild(Label);\n label.shouldClone = false;\n label.horizontalCenter = \"middle\";\n label.verticalCenter = \"middle\";\n label.isMeasured = false;\n label.fill = interfaceColors.getFor(\"text\");\n label.align = \"center\";\n label.valign = \"middle\";\n label.fillOpacity = 0.4;\n _this.label = label;\n // Set defaults\n _this.background.opacity = 1;\n _this.background.fill = interfaceColors.getFor(\"background\");\n _this.contentAlign = \"center\";\n _this.contentValign = \"middle\";\n _this.delay = 300;\n // Create hidden state\n var hiddenState = _this.states.create(\"hidden\");\n hiddenState.properties.opacity = 0;\n // Hide by default\n _this.visible = false;\n _this.hide(0);\n _this.__disabled = true;\n // Make it disposable\n // @todo Maybe it's enough to just dispose `sliceContainer`?\n _this._disposers.push(_this.backgroundSlice);\n _this._disposers.push(_this.progressSlice);\n _this._disposers.push(_this.label);\n _this._disposers.push(sliceContainer);\n return _this;\n }\n Object.defineProperty(Preloader.prototype, \"progress\", {\n /**\r\n * @return Progress (0-1)\r\n */\n get: function get() {\n return this.getPropertyValue(\"progress\");\n },\n /**\r\n * Current preload progress. (0-1)\r\n *\r\n * * 0 - 0%\r\n * * 0.5 - 50%\r\n * * 1 - 100%\r\n *\r\n * Setting this to a value less than 1, will automatically reveal the\r\n * preloader, while setting it to 1 (100%) will hide it.\r\n *\r\n * @param value Progress (0-1)\r\n */\n set: function set(value) {\n var _this = this;\n this.__disabled = false;\n this.validateLayout(); // show not in center without this\n this.setPropertyValue(\"progress\", value);\n /*if (!this.visible && value == 1) {\r\n return;\r\n }*/\n this.progressSlice.arc = 360 * value;\n if (this.label) {\n this.label.text = Math.round(value * 100) + \"%\";\n }\n if (value >= 1) {\n // Cancel the timeout\n if (this._started) {\n this._started = undefined;\n }\n // TODO remove closure ?\n registry.events.once(\"enterframe\", function () {\n var animation = _this.hide();\n if (animation && !animation.isFinished()) {\n animation.events.once(\"animationended\", function () {\n _this.__disabled = true;\n });\n } else {\n _this.__disabled = true;\n }\n });\n this.interactionsEnabled = false;\n this.setPropertyValue(\"progress\", 0);\n } else if (value > 0) {\n if (this.delay) {\n if (!this._started) {\n this._started = new Date().getTime();\n } else if (this._started + this.delay <= new Date().getTime()) {\n this.__disabled = false;\n this.show();\n this.interactionsEnabled = true;\n }\n } else {\n this.__disabled = false;\n this.show();\n this.interactionsEnabled = true;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Preloader.prototype, \"delay\", {\n /**\r\n * @return Delay (ms)\r\n */\n get: function get() {\n return this.getPropertyValue(\"delay\");\n },\n /**\r\n * Delay display of preloader by X milliseconds.\r\n *\r\n * When loading starts (`progress` is set to <1) and finishes (`progress` is\r\n * set to 1) before `delay` ms, the loader is never shown.\r\n *\r\n * This is used to avoid brief flashing of the preload for very quick loads.\r\n *\r\n * @default 1000\r\n * @param value Delay (ms)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"delay\", value);\n },\n enumerable: true,\n configurable: true\n });\n return Preloader;\n}(Container);\nexport { Preloader };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Preloader\"] = Preloader;","/**\r\n * Slider is a scrollbar with just one selection grip.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Scrollbar } from \"../../core/elements/Scrollbar\";\nimport { registry } from \"../Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a slider - a version of scrollbar with just one grip.\r\n *\r\n * @see {@link ISliderEvents} for a list of available events\r\n * @see {@link ISliderAdapters} for a list of available Adapters\r\n */\nvar Slider = /** @class */function (_super) {\n tslib_1.__extends(Slider, _super);\n /**\r\n * Constructor\r\n */\n function Slider() {\n var _this = _super.call(this) || this;\n _this.className = \"Slider\";\n _this.thumb.opacity = 0;\n _this.thumb.interactionsEnabled = false;\n _this.endGrip.opacity = 0;\n _this.endGrip.interactionsEnabled = false;\n _this.startGrip.events.on(\"drag\", function () {\n _this.endGrip.x = _this.startGrip.x;\n _this.endGrip.y = _this.startGrip.y;\n });\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(Slider.prototype, \"__end\", {\n /**\r\n * @return [description]\r\n */\n get: function get() {\n return this._start;\n },\n set: function set(value) {},\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Slider.prototype, \"end\", {\n /**\r\n * @return [description]\r\n */\n get: function get() {\n return this._start;\n },\n /**\r\n * Relative position (0-1) of the end grip.\r\n *\r\n * @param position Position (0-1)\r\n */\n set: function set(position) {},\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Slider.prototype, \"start\", {\n /**\r\n * @return Position (0-1)\r\n */\n get: function get() {\n return this._start;\n },\n /**\r\n * Relative position (0-1) of the start grip.\r\n *\r\n * @param position Position (0-1)\r\n */\n set: function set(position) {\n if (!this._isBusy) {\n this.__start = position;\n }\n },\n enumerable: true,\n configurable: true\n });\n return Slider;\n}(Scrollbar);\nexport { Slider };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Slider\"] = Slider;","/**\r\n * Play button functionality.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Button } from \"./Button\";\nimport { RoundedRectangle } from \"./RoundedRectangle\";\nimport { registry } from \"../Registry\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport { Triangle } from \"./Triangle\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a zoom out button.\r\n *\r\n * @see {@link IPlayButtonEvents} for a list of available events\r\n * @see {@link IPlayButtonAdapters} for a list of available Adapters\r\n */\nvar PlayButton = /** @class */function (_super) {\n tslib_1.__extends(PlayButton, _super);\n /**\r\n * Constructor\r\n */\n function PlayButton() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"PlayButton\";\n _this.padding(12, 12, 12, 12);\n _this.showSystemTooltip = true;\n var interfaceColors = new InterfaceColorSet();\n var background = _this.background;\n background.cornerRadius(25, 25, 25, 25);\n background.fill = interfaceColors.getFor(\"primaryButton\");\n background.stroke = interfaceColors.getFor(\"primaryButtonStroke\");\n background.strokeOpacity = 0;\n background.states.getKey(\"hover\").properties.fill = interfaceColors.getFor(\"primaryButtonHover\");\n background.states.getKey(\"down\").properties.fill = interfaceColors.getFor(\"primaryButtonActive\");\n // Create a play icon\n var playIcon = new Triangle();\n playIcon.direction = \"right\";\n playIcon.width = 9;\n playIcon.height = 11;\n playIcon.marginLeft = 1;\n playIcon.marginRight = 1;\n playIcon.horizontalCenter = \"middle\";\n playIcon.verticalCenter = \"middle\";\n playIcon.stroke = interfaceColors.getFor(\"primaryButtonText\");\n playIcon.fill = playIcon.stroke;\n _this.icon = playIcon;\n // Create a play icon\n var stopIcon = new RoundedRectangle();\n stopIcon.width = 11;\n stopIcon.height = 11;\n stopIcon.horizontalCenter = \"middle\";\n stopIcon.verticalCenter = \"middle\";\n stopIcon.cornerRadius(0, 0, 0, 0);\n stopIcon.stroke = interfaceColors.getFor(\"primaryButtonText\");\n stopIcon.fill = playIcon.stroke;\n _this.togglable = true;\n var activeState = _this.states.create(\"active\");\n activeState.transitionDuration = 0;\n activeState.properties.icon = stopIcon;\n _this.defaultState.transitionDuration = 0;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n PlayButton.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Play\");\n }\n };\n return PlayButton;\n}(Button);\nexport { PlayButton };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"PlayButton\"] = PlayButton;","import * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { RadialGradient } from \"./RadialGradient\";\nimport { GradientModifier } from \"./GradientModifier\";\nimport { registry } from \"../../Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * This class can be used to modify radial gradient steps, changing visual\r\n * properties like lightness, brightness, opacity of each set.\r\n *\r\n * It can also set offsets for each gradient step.\r\n *\r\n * E.g. if I want to fill a columns in a column series to be a solid fill from\r\n * top to 80% of height, then gradually fades out, I can use the following\r\n * gradient modifier as a `fillModifier`:\r\n *\r\n * ```TypeScript\r\n * let fillModifier = new am4core.LinearGradientModifier();\r\n * fillModifier.opacities = [1, 1, 0];\r\n * fillModifier.offsets = [0, 0.8, 1];\r\n * columnSeries.columns.template.fillModifier = fillModifier;\r\n * ```\r\n * ```JavaScript\r\n * var fillModifier = new am4core.LinearGradientModifier();\r\n * fillModifier.opacities = [1, 1, 0];\r\n * fillModifier.offsets = [0, 0.8, 1];\r\n * columnSeries.columns.template.fillModifier = fillModifier;\r\n * ```\r\n * ```JSON\r\n * \"series\": [{\r\n * \"type\": \"ColumnSeries\",\r\n * \"columns\": {\r\n * \"fillModifier\": {\r\n * \"type\": \"LinearGradientModifier\",\r\n * \"opacities\": [1, 1, 0],\r\n * \"offsets\": [0, 0.8, 1]\r\n * }\r\n * }\r\n * }]\r\n * ```\r\n */\nvar RadialGradientModifier = /** @class */function (_super) {\n tslib_1.__extends(RadialGradientModifier, _super);\n /**\r\n * Constructor.\r\n */\n function RadialGradientModifier() {\n var _this = _super.call(this) || this;\n _this.className = \"RadialGradientModifier\";\n _this.gradient = new RadialGradient();\n _this.applyTheme();\n return _this;\n }\n RadialGradientModifier.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.gradient = source.gradient.clone();\n };\n return RadialGradientModifier;\n}(GradientModifier);\nexport { RadialGradientModifier };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"RadialGradientModifier\"] = RadialGradientModifier;","import * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Pattern } from \"./Pattern\";\nimport { registry } from \"../../Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Line pattern.\r\n */\nvar LinePattern = /** @class */function (_super) {\n tslib_1.__extends(LinePattern, _super);\n /**\r\n * Constructor\r\n */\n function LinePattern() {\n var _this = _super.call(this) || this;\n _this._line = _this.paper.add(\"line\");\n _this.addElement(_this._line);\n return _this;\n }\n /**\r\n * Draws the pattern.\r\n */\n LinePattern.prototype.draw = function () {\n _super.prototype.draw.call(this);\n if (this._line) {\n this._line.attr({\n \"x2\": this.width * 2\n }); // to solve rotation\n }\n };\n return LinePattern;\n}(Pattern);\nexport { LinePattern };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"LinePattern\"] = LinePattern;","/**\r\n * Rectangular pattern module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Pattern } from \"./Pattern\";\nimport { registry } from \"../../Registry\";\n;\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Rectangular pattern\r\n */\nvar RectPattern = /** @class */function (_super) {\n tslib_1.__extends(RectPattern, _super);\n /**\r\n * Constructor\r\n */\n function RectPattern() {\n var _this = _super.call(this) || this;\n _this.rectHeight = 1;\n _this.rectWidth = 1;\n return _this;\n }\n /**\r\n * Draws the rectangular element.\r\n */\n RectPattern.prototype.draw = function () {\n if (this._rect) {\n this.removeElement(this._rect);\n }\n this._rect = this.paper.add(\"rect\");\n this._rect.attr({\n \"width\": this.rectWidth,\n \"height\": this.rectHeight\n });\n this.addElement(this._rect);\n _super.prototype.draw.call(this);\n };\n Object.defineProperty(RectPattern.prototype, \"rectWidth\", {\n /**\r\n * @return Width (px)\r\n */\n get: function get() {\n return this.properties[\"rectWidth\"];\n },\n /**\r\n * Rectangle width in pixels.\r\n *\r\n * @param value Width (px)\r\n */\n set: function set(value) {\n this.properties[\"rectWidth\"] = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RectPattern.prototype, \"rectHeight\", {\n /**\r\n * @return Height (px)\r\n */\n get: function get() {\n return this.properties[\"rectHeight\"];\n },\n /**\r\n * Rectangle height in pixels.\r\n *\r\n * @param value Height (px)\r\n */\n set: function set(value) {\n this.properties[\"rectHeight\"] = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n return RectPattern;\n}(Pattern);\nexport { RectPattern };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"RectPattern\"] = RectPattern;","/**\r\n * Module for \"Colorize\" filter.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Filter } from \"./Filter\";\nimport { registry } from \"../../Registry\";\n;\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a \"Colorize\" filter.\r\n */\nvar ColorizeFilter = /** @class */function (_super) {\n tslib_1.__extends(ColorizeFilter, _super);\n /**\r\n * Constructor\r\n */\n function ColorizeFilter() {\n var _this = _super.call(this) || this;\n _this.className = \"ColorizeFilter\";\n // Create elements\n // NOTE: we do not need to add each individual element to `_disposers`\n // because `filterPrimitives` has an event handler which automatically adds\n // anything added to it to `_disposers`\n _this.feColorMatrix = _this.paper.add(\"feColorMatrix\");\n _this.feColorMatrix.attr({\n \"type\": \"matrix\"\n });\n //this.feColorMatrix.setAttribute(\"in\", \"SourceAlpha\");\n _this.filterPrimitives.push(_this.feColorMatrix);\n // Set default properties\n _this.intensity = 1;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * (Re)applies colors to the already existing filter by modifying filyer's\r\n * color matrix element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n ColorizeFilter.prototype.applyFilter = function () {\n var i = this.intensity;\n var ii = 1 - i;\n var r;\n var g;\n var b;\n var color = this.color;\n if (color && color.rgb) {\n r = color.rgb.r / 255 * i;\n g = color.rgb.g / 255 * i;\n b = color.rgb.b / 255 * i;\n } else {\n r = 0;\n g = 0;\n b = 0;\n }\n this.feColorMatrix.attr({\n \"values\": ii + \" 0 0 0 \" + r + \" 0 \" + ii + \" 0 0 \" + g + \" 0 0 \" + ii + \" 0 \" + b + \" 0 0 0 1 0\"\n });\n };\n Object.defineProperty(ColorizeFilter.prototype, \"color\", {\n /**\r\n * @return Color\r\n */\n get: function get() {\n return this.properties[\"color\"];\n },\n /**\r\n * Target color to apply to the element.\r\n *\r\n * Depending on the `intensity`, all colors of the target element will steer\r\n * towards this color.\r\n *\r\n * E.g. setting to `am4core.color(\"greener\")` will make all colors greener.\r\n *\r\n * @param value Color\r\n */\n set: function set(value) {\n this.properties[\"color\"] = value;\n this.applyFilter();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ColorizeFilter.prototype, \"intensity\", {\n /**\r\n * @return Intensity (0-1)\r\n */\n get: function get() {\n return this.properties.intensity;\n },\n /**\r\n * Intensity of the color (0-1).\r\n *\r\n * The bigger the number the more of a `color` target's colors will become.\r\n *\r\n * 0 means the colors will remain as they are.\r\n * 1 means all colors will become the target `color`.\r\n *\r\n * @default 1\r\n * @param value Intensity (0-1)\r\n */\n set: function set(value) {\n this.properties.intensity = value;\n this.applyFilter();\n },\n enumerable: true,\n configurable: true\n });\n return ColorizeFilter;\n}(Filter);\nexport { ColorizeFilter };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"ColorizeFilter\"] = ColorizeFilter;","/**\r\n * Module for \"Blur\" filter.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Filter } from \"./Filter\";\nimport { registry } from \"../../Registry\";\n;\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a \"Blur\" filter.\r\n */\nvar BlurFilter = /** @class */function (_super) {\n tslib_1.__extends(BlurFilter, _super);\n /**\r\n * Constructor\r\n */\n function BlurFilter() {\n var _this = _super.call(this) || this;\n _this.className = \"BlurFilter\";\n // Create elements\n // NOTE: we do not need to add each individual element to `_disposers`\n // because `filterPrimitives` has an event handler which automatically adds\n // anything added to it to `_disposers`\n _this.feGaussianBlur = _this.paper.add(\"feGaussianBlur\");\n _this.feGaussianBlur.attr({\n \"result\": \"blurOut\",\n \"in\": \"SourceGraphic\"\n });\n _this.filterPrimitives.push(_this.feGaussianBlur);\n // Set default properties\n _this.width = 200;\n _this.height = 200;\n _this.blur = 1.5;\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(BlurFilter.prototype, \"blur\", {\n /**\r\n * @return Blur\r\n */\n get: function get() {\n return this.properties.blur;\n },\n /**\r\n * Blur value.\r\n *\r\n * The bigger the value, the blurrier the target element will become.\r\n *\r\n * @default 1.5\r\n * @param value Blur\r\n */\n set: function set(value) {\n this.properties.blur = value;\n this.feGaussianBlur.attr({\n \"stdDeviation\": value / this.scale\n });\n },\n enumerable: true,\n configurable: true\n });\n return BlurFilter;\n}(Filter);\nexport { BlurFilter };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"BlurFilter\"] = BlurFilter;","/**\r\n * Module for \"Focus\" filter.\r\n */\nimport * as tslib_1 from \"tslib\";\nimport { Filter } from \"./Filter\";\nimport { InterfaceColorSet } from \"../../utils/InterfaceColorSet\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a \"Focus\" filter.\r\n */\nvar FocusFilter = /** @class */function (_super) {\n tslib_1.__extends(FocusFilter, _super);\n /**\r\n * Constructor\r\n */\n function FocusFilter() {\n var _this = _super.call(this) || this;\n _this.className = \"FocusFilter\";\n // Create elements\n // NOTE: we do not need to add each individual element to `_disposers`\n // because `filterPrimitives` has an event handler which automatically adds\n // anything added to it to `_disposers`\n _this.feFlood = _this.paper.add(\"feFlood\");\n _this.feFlood.attr({\n \"flood-color\": new InterfaceColorSet().getFor(\"primaryButtonHover\"),\n \"result\": \"base\"\n });\n _this.filterPrimitives.push(_this.feFlood);\n _this.feMorphology = _this.paper.add(\"feMorphology\");\n _this.feMorphology.attr({\n \"result\": \"bigger\",\n \"in\": \"SourceGraphic\",\n \"operator\": \"dilate\",\n \"radius\": \"2\"\n });\n _this.filterPrimitives.push(_this.feMorphology);\n _this.feColorMatrix = _this.paper.add(\"feColorMatrix\");\n _this.feColorMatrix.attr({\n \"result\": \"mask\",\n \"in\": \"bigger\",\n \"type\": \"matrix\",\n \"values\": \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0\"\n });\n _this.filterPrimitives.push(_this.feColorMatrix);\n _this.feComposite = _this.paper.add(\"feComposite\");\n _this.feComposite.attr({\n \"result\": \"drop\",\n \"in\": \"base\",\n \"in2\": \"mask\",\n \"operator\": \"in\"\n });\n _this.filterPrimitives.push(_this.feComposite);\n _this.feBlend = _this.paper.add(\"feBlend\");\n _this.feBlend.attr({\n \"in\": \"SourceGraphic\",\n \"in2\": \"drop\",\n \"mode\": \"normal\"\n });\n _this.filterPrimitives.push(_this.feBlend);\n // Set default properties\n _this.width = 130;\n _this.height = 130;\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(FocusFilter.prototype, \"stroke\", {\n /**\r\n * @return Color\r\n */\n get: function get() {\n return this.properties[\"stroke\"];\n },\n /**\r\n * Stroke (outline) color.\r\n *\r\n * @param value Color\r\n */\n set: function set(value) {\n this.properties[\"stroke\"] = value;\n this.feFlood.attr({\n \"flood-color\": value\n });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FocusFilter.prototype, \"strokeWidth\", {\n /**\r\n * @return Outline thickness (px)\r\n */\n get: function get() {\n return this.properties[\"strokeWidth\"];\n },\n /**\r\n * Stroke (outline) thickness in pixels.\r\n *\r\n * @param value Outline thickness (px)\r\n */\n set: function set(value) {\n this.properties[\"strokeWidth\"] = value;\n this.feMorphology.attr({\n \"radius\": value\n });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FocusFilter.prototype, \"opacity\", {\n /**\r\n * @return Outline opacity (0-1)\r\n */\n get: function get() {\n return this.properties[\"opacity\"];\n },\n /**\r\n * Opacity of the outline. (0-1)\r\n *\r\n * @param value Outline opacity (0-1)\r\n */\n set: function set(value) {\n this.properties[\"opacity\"] = value;\n this.feColorMatrix.attr({\n \"values\": \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \" + value + \" 0\"\n });\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets filter's target element.\r\n *\r\n * In addition it also disables built-in focus outline on element this\r\n * filter is applied to.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Element filter is being attached to\r\n */\n FocusFilter.prototype.setSprite = function (value) {\n if (this._sprite && this._sprite != value) {\n this._sprite.group.removeStyle(\"outline\");\n }\n value.group.addStyle({\n \"outline\": \"none\"\n });\n _super.prototype.setSprite.call(this, value);\n };\n return FocusFilter;\n}(Filter);\nexport { FocusFilter };","/**\r\n * A plugin base class.\r\n */\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * This is a base class that provides core functionality for plugins.\r\n *\r\n * The easiest way to start off with a new plugin is to extend this class.\r\n *\r\n * It will provide all the mandatory functionality, such as disposers.\r\n *\r\n * @since 4.2.2\r\n */\nvar Plugin = /** @class */function () {\n /**\r\n * Constructor\r\n */\n function Plugin() {\n /**\r\n * Is this object disposed?\r\n */\n this._disposed = false;\n /**\r\n * List of IDisposer which will be disposed when the BaseObject is disposed.\r\n *\r\n * @ignore Exclude from docs\r\n */\n this._disposers = [];\n // Nothing to do here\n }\n /**\r\n * Decorates series with required events and adapters used to hijack its\r\n * data.\r\n */\n Plugin.prototype.init = function () {\n // Does nothing\n // Override it\n };\n /**\r\n * Returns if this element is already disposed.\r\n *\r\n * @return Is disposed?\r\n */\n Plugin.prototype.isDisposed = function () {\n return this._disposed;\n };\n /**\r\n * Disposes this object and related stuff.\r\n */\n Plugin.prototype.dispose = function () {\n if (!this._disposed) {\n this._disposed = true;\n var a = this._disposers;\n this._disposers = null;\n while (a.length !== 0) {\n var disposer = a.shift();\n disposer.dispose();\n }\n }\n };\n return Plugin;\n}();\nexport { Plugin };","/**\r\n * AmChartsLogo module.\r\n *\r\n * AmChartsLogo shows amCharts logo for non-commercial users of a library.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../Container\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport { Polyspline } from \"./Polyspline\";\nimport { color } from \"../utils/Color\";\nimport { LinearGradient } from \"../rendering/fills/LinearGradient\";\nimport { DesaturateFilter } from \"../rendering/filters/DesaturateFilter\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A class used to draw and display progress indicator.\r\n *\r\n * @see {@link IAmChartsLogoEvents} for a list of available events\r\n * @see {@link IAmChartsLogoAdapters} for a list of available Adapters\r\n * @ignore Exclude from docs\r\n */\nvar AmChartsLogo = /** @class */function (_super) {\n tslib_1.__extends(AmChartsLogo, _super);\n /**\r\n * Constructor\r\n */\n function AmChartsLogo() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"AmChartsLogo\";\n _this.valign = \"bottom\";\n var d = 0.3;\n _this.opacity = 0.3;\n _this.defaultState.properties.opacity = 0.4;\n _this.url = \"https://www.amcharts.com/\";\n _this.urlTarget = \"_blank\";\n _this.showSystemTooltip = true;\n _this.readerTitle = \"Chart created using amCharts library\";\n _this.width = 220 * d;\n _this.height = 70 * d;\n _this.background.opacity = 0;\n var aColor = color(\"#474758\");\n if (new InterfaceColorSet().getFor(\"background\").alternative.hex == \"#ffffff\") {\n aColor = color(\"#ffffff\");\n }\n var aGradient = new LinearGradient();\n aGradient.addColor(aColor);\n aGradient.addColor(aColor, 1, 0.75);\n aGradient.addColor(color(\"#3cabff\"), 1, 0.755);\n aGradient.rotation = -10;\n var aStroke = aGradient;\n var m = _this.createChild(Polyspline);\n m.shouldClone = false;\n m.isMeasured = false;\n m.segments = [[{\n x: 50 * d,\n y: 50 * d\n }, {\n x: 90 * d,\n y: 50 * d\n }, {\n x: 120 * d,\n y: 20 * d\n }, {\n x: 135 * d,\n y: 35 * d\n }, {\n x: 150 * d,\n y: 20 * d\n }, {\n x: 180 * d,\n y: 50 * d\n }, {\n x: 200 * d,\n y: 50 * d\n }]];\n m.strokeWidth = 6 * d;\n m.tensionX = 0.8;\n m.tensionY = 1;\n m.stroke = color(\"#3cabff\");\n var a = _this.createChild(Polyspline);\n a.shouldClone = false;\n a.isMeasured = false;\n a.segments = [[{\n x: 20 * d,\n y: 50 * d\n }, {\n x: 50 * d,\n y: 50 * d\n }, {\n x: 90 * d,\n y: 12 * d\n }, {\n x: 133 * d,\n y: 50 * d\n }, {\n x: 170 * d,\n y: 50 * d\n }, {\n x: 200 * d,\n y: 50 * d\n }]];\n a.strokeWidth = 6 * d;\n a.tensionX = 0.75;\n a.tensionY = 1;\n a.stroke = aStroke;\n _this._disposers.push(a);\n var desaturateFilter = new DesaturateFilter();\n _this.filters.push(desaturateFilter);\n var desaturateFilterHover = new DesaturateFilter();\n desaturateFilterHover.saturation = 1;\n var hoverState = _this.states.create(\"hover\");\n hoverState.properties.opacity = 1;\n hoverState.filters.push(desaturateFilterHover);\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n return AmChartsLogo;\n}(Container);\nexport { AmChartsLogo };","/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { system } from \"../System\";\nimport { registry } from \"../Registry\";\nimport { Container } from \"../Container\";\nimport { Paper } from \"../rendering/Paper\";\nimport { SVGContainer, svgContainers } from \"../rendering/SVGContainer\";\nimport { FocusFilter } from \"../rendering/filters/FocusFilter\";\nimport { Preloader } from \"../elements/Preloader\";\nimport { AmChartsLogo } from \"../elements/AmChartsLogo\";\nimport { Tooltip } from \"../elements/Tooltip\";\nimport { Disposer } from \"../utils/Disposer\";\nimport { percent } from \"./Percent\";\nimport { options } from \"../Options\";\nimport * as $array from \"./Array\";\nimport * as $type from \"./Type\";\nimport * as $dom from \"./DOM\";\nimport * as $utils from \"./Utils\";\n/**\r\n * ============================================================================\r\n * INSTANTIATION FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates all HTML and SVG containers needed for the chart instance, as well\r\n * as the new [[Sprite]] (as specified in `classType` parameter).\r\n *\r\n * @param htmlElement A container to creat elements in\r\n * @param classType A class definition of the new element to create\r\n * @return Newly-created Sprite object\r\n */\nfunction createChild(htmlElement, classType) {\n var htmlContainer = $dom.getElement(htmlElement);\n if (htmlContainer) {\n htmlContainer.innerHTML = \"\";\n //htmlContainer.style.overflow = \"hidden\";\n var svgDiv_1 = new SVGContainer(htmlContainer);\n var paper = new Paper(svgDiv_1.SVGContainer, \"svg-\" + (svgContainers.length - 1));\n // the approach with masks is chosen because overflow:visible is set on SVG element in order tooltips could go outside\n // svg area - this is often needed when working with small charts.\n // main container which holds content container and tooltips container\n var container_1 = new Container();\n container_1.htmlContainer = htmlContainer;\n container_1.svgContainer = svgDiv_1;\n container_1.width = percent(100);\n container_1.height = percent(100);\n container_1.background.fillOpacity = 0;\n container_1.paper = paper;\n paper.append(container_1.group);\n // this is set from parent container, but this one doesn't have, so do it manually.\n container_1.relativeWidth = 1;\n container_1.relativeHeight = 1;\n svgDiv_1.container = container_1;\n // creating classType instance\n var sprite_1 = container_1.createChild(classType);\n sprite_1.topParent = container_1;\n var uid = sprite_1.uid;\n registry.invalidSprites[uid] = [];\n registry.invalidDatas[uid] = [];\n registry.invalidPositions[uid] = [];\n registry.invalidLayouts[uid] = [];\n container_1.baseId = uid;\n sprite_1.isBaseSprite = true;\n sprite_1.focusFilter = new FocusFilter();\n registry.baseSprites.push(sprite_1);\n registry.baseSpritesByUid[uid] = sprite_1;\n sprite_1.maskRectangle = {\n x: 0,\n y: 0,\n width: svgDiv_1.width,\n height: svgDiv_1.height\n };\n // this solves issues with display:none, as all children are measured as 0x0\n container_1.events.on(\"maxsizechanged\", function (event) {\n if (event.previousWidth == 0 || event.previousHeight == 0) {\n container_1.deepInvalidate();\n }\n if (sprite_1.maskRectangle) {\n sprite_1.maskRectangle = {\n x: 0,\n y: 0,\n width: svgDiv_1.width,\n height: svgDiv_1.height\n };\n }\n });\n sprite_1.addDisposer(new Disposer(function () {\n $array.remove(registry.baseSprites, sprite_1);\n registry.baseSpritesByUid[sprite_1.uid] = undefined;\n }));\n // TODO figure out a better way of doing this\n sprite_1.addDisposer(container_1);\n // tooltip container\n var tooltipContainer_1 = container_1.createChild(Container);\n tooltipContainer_1.topParent = container_1;\n tooltipContainer_1.width = percent(100);\n tooltipContainer_1.height = percent(100);\n tooltipContainer_1.isMeasured = false;\n container_1.tooltipContainer = tooltipContainer_1;\n sprite_1.tooltip = new Tooltip();\n sprite_1.tooltip.hide(0);\n sprite_1.tooltip.setBounds({\n x: 0,\n y: 0,\n width: tooltipContainer_1.maxWidth,\n height: tooltipContainer_1.maxHeight\n });\n tooltipContainer_1.events.on(\"maxsizechanged\", function () {\n $type.getValue(sprite_1.tooltip).setBounds({\n x: 0,\n y: 0,\n width: tooltipContainer_1.maxWidth,\n height: tooltipContainer_1.maxHeight\n });\n }, undefined, false);\n //@todo: maybe we don't need to create one by default but only on request?\n var preloader_1 = new Preloader();\n preloader_1.events.on(\"inited\", function () {\n preloader_1.__disabled = true;\n }, undefined, false);\n container_1.preloader = preloader_1;\n if (!options.commercialLicense) {\n var logo_1 = tooltipContainer_1.createChild(AmChartsLogo);\n tooltipContainer_1.events.on(\"maxsizechanged\", function (ev) {\n if (tooltipContainer_1.maxWidth <= 100 || tooltipContainer_1.maxHeight <= 50) {\n logo_1.hide();\n } else if (logo_1.isHidden || logo_1.isHiding) {\n logo_1.show();\n }\n }, undefined, false);\n sprite_1.logo = logo_1;\n logo_1.align = \"left\";\n logo_1.valign = \"bottom\";\n }\n $utils.used(sprite_1.numberFormatter); // need to create one.\n // Set this as an autonomouse instance\n // Controls like Preloader, Export will use this.\n container_1.isStandaloneInstance = true;\n return sprite_1;\n } else {\n system.log(\"html container not found\");\n throw new Error(\"html container not found\");\n }\n}\n/**\r\n * A shortcut to creating a chart instance.\r\n *\r\n * The first argument is either a reference to or an id of a DOM element to be\r\n * used as a container for the chart.\r\n *\r\n * The second argument is the type reference of the chart type. (for plain\r\n * JavaScript users this can also be a string indicating chart type)\r\n *\r\n * ```TypeScript\r\n * let chart = am4core.create(\"chartdiv\", am4charts.PieChart);\r\n * ```\r\n * ```JavaScript\r\n * // Can pass in chart type reference like this:\r\n * var chart = am4core.create(\"chartdiv\", am4charts.PieChart);\r\n *\r\n * // ... or chart class type as a string:\r\n * var chart = am4core.create(\"chartdiv\", \"PieChart\");\r\n * ```\r\n *\r\n * @param htmlElement Reference or id of the target container element\r\n * @param classType Class type of the target chart type\r\n * @return Chart instance\r\n */\nexport function create(htmlElement, classType) {\n // This is a nasty hack for the benefit of vanilla JS users, who do not\n // enjoy benefits of type-check anyway.\n // We're allowing passing in a name of the class rather than type reference\n // itself.\n var classError;\n if ($type.isString(classType)) {\n if ($type.hasValue(registry.registeredClasses[classType])) {\n classType = registry.registeredClasses[classType];\n } else {\n classType = registry.registeredClasses[\"Container\"];\n classError = new Error(\"Class [\" + classType + \"] is not loaded.\");\n }\n }\n // Create the chart\n var chart = createChild(htmlElement, classType);\n // Error?\n if (classError) {\n chart.raiseCriticalError(classError);\n }\n return chart;\n}\n/**\r\n * A shortcut to creating a chart from a config object.\r\n *\r\n * Example:\r\n *\r\n * ```TypeScript\r\n * let chart am4core.createFromConfig({ ... }, \"chartdiv\", am4charts.XYChart );\r\n * ```\r\n * ```JavaScript\r\n * var chart am4core.createFromConfig({ ... }, \"chartdiv\", \"XYChart\" );\r\n * ```\r\n *\r\n * If `chartType` parameter is not supplied it must be set in a config object,\r\n * via reference to chart type, e.g.:\r\n *\r\n * ```TypeScript\r\n * {\r\n * \"type\": am4charts.XYChart,\r\n * // ...\r\n * }\r\n * ```\r\n * ```JavaScript\r\n * {\r\n * \"type\": am4charts.XYChart,\r\n * // ...\r\n * }\r\n * ```\r\n *\r\n * Or via string: (if you are using JavaScript)\r\n *\r\n * ```TypeScript\r\n * {\r\n * \"type\": \"XYChart\",\r\n * // ...\r\n * }\r\n * ```\r\n * ```JavaScript\r\n * {\r\n * \"type\": \"XYChart\",\r\n * // ...\r\n * }\r\n * ```\r\n *\r\n * A `container` can either be a reference to an HTML container to put chart\r\n * in, or it's unique id.\r\n *\r\n * If `container` is not specified, it must be included in the config object:\r\n *\r\n * ```TypeScript\r\n * {\r\n * \"type\": \"XYChart\",\r\n * \"container\": \"chartdiv\",\r\n * // ...\r\n * }\r\n * ```\r\n * ```JavaScript\r\n * {\r\n * \"type\": \"XYChart\",\r\n * \"container\": \"chartdiv\",\r\n * // ...\r\n * }\r\n * ```\r\n *\r\n * @param config Config object in property/value pairs\r\n * @param htmlElement Container reference or ID\r\n * @param objectType Chart type\r\n * @return A newly created chart instance\r\n * @todo Throw exception if type is not correct\r\n */\nexport function createFromConfig(config, htmlElement, classType) {\n // Extract chart type from config if necessary\n if (!$type.hasValue(classType)) {\n classType = config.type;\n delete config.type;\n }\n // Extract element from config if necessary\n if (!$type.hasValue(htmlElement)) {\n htmlElement = config.container;\n delete config.container;\n }\n // Check if we need to extract actual type reference\n var finalType;\n var classError;\n if ($type.isString(classType) && $type.hasValue(registry.registeredClasses[classType])) {\n finalType = registry.registeredClasses[classType];\n } else if (typeof classType !== \"function\") {\n finalType = Container;\n classError = new Error(\"Class [\" + classType + \"] is not loaded.\");\n } else {\n finalType = classType;\n }\n // Create the chart\n var chart = createChild(htmlElement, finalType);\n // Set config\n if (classError) {\n chart.raiseCriticalError(classError);\n } else {\n chart.config = config;\n }\n return chart;\n}\n/**\r\n * Applies a theme to System, and subsequently all chart instances created\r\n * from that point forward.\r\n *\r\n * amCharts supports multiple themes. Calling `useTheme` multiple times will\r\n * make the System apply multiple themes, rather than overwrite previously\r\n * set one.\r\n *\r\n * This enables combining features from multiple themes on the same chart.\r\n * E.g.:\r\n *\r\n * ```TypeScript\r\n * am4core.useTheme(am4themes.material);\r\n * am4core.useTheme(am4themes.animated);\r\n * ```\r\n * ```JavaScript\r\n * am4core.useTheme(am4themes.material);\r\n * am4core.useTheme(am4themes.animated);\r\n * ```\r\n *\r\n * The above will apply both the Material color and animation options to all\r\n * charts created.\r\n *\r\n * @param value A reference to a theme\r\n */\nexport function useTheme(value) {\n if (registry.themes.indexOf(value) === -1) {\n registry.themes.push(value);\n }\n}\n/**\r\n * Removes a theme from \"active themes\" list, so it won't get applied to any\r\n * charts created subsequently.\r\n *\r\n * @param value A reference to a theme\r\n */\nexport function unuseTheme(value) {\n $array.remove(registry.themes, value);\n}\n/**\r\n * Removes all \"active\" themes. Any charts created subsequently will not have\r\n * any theme applied to them.\r\n */\nexport function unuseAllThemes() {\n registry.themes = [];\n}","/**\r\n * This module contains a version of ColorSet that can (and should) be used for\r\n * coloring UI elements.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObject } from \"../Base\";\nimport { registry } from \"../Registry\";\nimport { color } from \"./Color\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * This module contains a version of ColorSet that can (and should) be used for\r\n * coloring UI elements.\r\n *\r\n * The main difference from the basic [[ColorSet]] is that instead of sequenced\r\n * colors, it uses a concept of named colors.\r\n *\r\n * This way, every element in the UI can extract an exact color theme author\r\n * meant for the specific purpose, like strokes, backgrounds, etc.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/colors/} for color-related info\r\n */\nvar InterfaceColorSet = /** @class */function (_super) {\n tslib_1.__extends(InterfaceColorSet, _super);\n /**\r\n * Constructor\r\n */\n function InterfaceColorSet() {\n var _this = _super.call(this) || this;\n /**\r\n * Maps the list of purposes (like \"stroke\") to an index of color of the\r\n * color set.\r\n */\n _this._purposes = {\n stroke: color(\"#e5e5e5\"),\n fill: color(\"#f3f3f3\"),\n primaryButton: color(\"#6794dc\"),\n primaryButtonHover: color(\"#6771dc\"),\n primaryButtonDown: color(\"#68dc75\"),\n primaryButtonActive: color(\"#68dc75\"),\n primaryButtonText: color(\"#FFFFFF\"),\n primaryButtonStroke: color(\"#FFFFFF\"),\n secondaryButton: color(\"#d9d9d9\"),\n secondaryButtonHover: color(\"#d9d9d9\").brighten(-0.25),\n secondaryButtonDown: color(\"#d9d9d9\").brighten(-0.35),\n secondaryButtonActive: color(\"#d9d9d9\").brighten(0.35),\n secondaryButtonText: color(\"#000000\"),\n secondaryButtonStroke: color(\"#FFFFFF\"),\n grid: color(\"#000000\"),\n background: color(\"#ffffff\"),\n alternativeBackground: color(\"#000000\"),\n text: color(\"#000000\"),\n alternativeText: color(\"#FFFFFF\"),\n disabledBackground: color(\"#999999\"),\n positive: color(\"#67dc75\"),\n negative: color(\"#dc6788\")\n };\n _this.className = \"InterfaceColorSet\";\n _this.applyTheme();\n return _this;\n }\n InterfaceColorSet.prototype.debug = function () {};\n /**\r\n * Returns a color to be used for the specific purpose.\r\n *\r\n * ```TypeScript\r\n * let uicolors = new am4core.InterfaceColorSet();\r\n * console.log(uicolors.getFor(\"stroke\"));\r\n * ```\r\n * ```JavaScript\r\n * var uicolors = new am4core.InterfaceColorSet();\r\n * console.log(uicolors.getFor(\"stroke\"));\r\n * ```\r\n *\r\n * @param purpose Color use purpuse\r\n * @return Color\r\n */\n InterfaceColorSet.prototype.getFor = function (purpose) {\n return this._purposes[purpose];\n };\n /**\r\n * Sets color to be used for the specific purpose.\r\n *\r\n * @param purpose Color use purpose\r\n * @param color Color\r\n */\n InterfaceColorSet.prototype.setFor = function (purpose, color) {\n this._purposes[purpose] = color;\n };\n return InterfaceColorSet;\n}(BaseObject);\nexport { InterfaceColorSet };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"InterfaceColorSet\"] = InterfaceColorSet;","import * as $type from \"../utils/Type\";\n/**\r\n * Maps time period names to their numeric representations in milliseconds.\r\n *\r\n * @ignore Exclude from docs\r\n */\nexport var timeUnitDurations = {\n millisecond: 1,\n second: 1000,\n minute: 60000,\n hour: 3600000,\n day: 86400000,\n week: 604800000,\n month: 2592000000,\n year: 31536000000\n};\n/**\r\n * Returns the next time unit that goes after source `unit`.\r\n *\r\n * E.g. \"hour\" is the next unit after \"minute\", etc.\r\n *\r\n * @ignore Exclude from docs\r\n * @param unit Source time unit\r\n * @return Next time unit\r\n */\nexport function getNextUnit(unit) {\n switch (unit) {\n case \"year\":\n return;\n case \"month\":\n return \"year\";\n case \"week\":\n return \"month\";\n case \"day\":\n return \"month\";\n // not a mistake\n case \"hour\":\n return \"day\";\n case \"minute\":\n return \"hour\";\n case \"second\":\n return \"minute\";\n case \"millisecond\":\n return \"second\";\n }\n}\n/**\r\n * Returns number of milliseconds in the `count` of time `unit`.\r\n *\r\n * Available units: \"millisecond\", \"second\", \"minute\", \"hour\", \"day\", \"week\",\r\n * \"month\", and \"year\".\r\n *\r\n * @ignore Exclude from docs\r\n * @param unit Time unit\r\n * @param count Number of units\r\n * @return Milliseconds\r\n */\nexport function getDuration(unit, count) {\n if (!$type.hasValue(count)) {\n count = 1;\n }\n return timeUnitDurations[unit] * count;\n}\n/**\r\n * Returns current `Date` object.\r\n *\r\n * @return Current date\r\n */\nexport function now() {\n return new Date();\n}\n/**\r\n * Returns current timestamp.\r\n *\r\n * @return Current timestamp\r\n */\nexport function getTime() {\n return now().getTime();\n}\n/**\r\n * Returns a copy of the `Date` object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param date Source date\r\n * @return Copy\r\n */\nexport function copy(date) {\n return new Date(date.getTime()); // todo: check if this is ok. new Date(date) used to strip milliseconds on FF in v3\n}\n/**\r\n * Checks if the `unit` part of two `Date` objects do not match. Two dates\r\n * represent a \"range\" of time, rather the same time date.\r\n *\r\n * @ignore Exclude from docs\r\n * @param dateOne Date 1\r\n * @param dateTwo Date 2\r\n * @param unit Time unit to check\r\n * @return Range?\r\n */\nexport function checkChange(dateOne, dateTwo, unit, utc) {\n dateOne = new Date(dateOne.getTime());\n dateTwo = new Date(dateTwo.getTime());\n var timeZoneOffset1 = 0;\n var timeZoneOffset2 = 0;\n if (!utc && unit != \"millisecond\") {\n timeZoneOffset1 = dateOne.getTimezoneOffset();\n dateOne.setUTCMinutes(dateOne.getUTCMinutes() - timeZoneOffset1);\n timeZoneOffset2 = dateTwo.getTimezoneOffset();\n dateTwo.setUTCMinutes(dateTwo.getUTCMinutes() - timeZoneOffset2);\n }\n var changed = false;\n switch (unit) {\n case \"year\":\n if (dateOne.getUTCFullYear() != dateTwo.getUTCFullYear()) {\n changed = true;\n }\n break;\n case \"month\":\n if (dateOne.getUTCFullYear() != dateTwo.getUTCFullYear()) {\n changed = true;\n } else if (dateOne.getUTCMonth() != dateTwo.getUTCMonth()) {\n changed = true;\n }\n break;\n case \"day\":\n if (dateOne.getUTCMonth() != dateTwo.getUTCMonth()) {\n changed = true;\n } else if (dateOne.getUTCDate() != dateTwo.getUTCDate()) {\n changed = true;\n }\n break;\n case \"hour\":\n if (dateOne.getUTCHours() != dateTwo.getUTCHours()) {\n changed = true;\n }\n break;\n case \"minute\":\n if (dateOne.getUTCMinutes() != dateTwo.getUTCMinutes()) {\n changed = true;\n }\n break;\n case \"second\":\n if (dateOne.getUTCSeconds() != dateTwo.getUTCSeconds()) {\n changed = true;\n }\n break;\n case \"millisecond\":\n if (dateOne.getTime() != dateTwo.getTime()) {\n changed = true;\n }\n break;\n }\n if (changed) {\n return true;\n }\n var nextUnit = getNextUnit(unit);\n if (nextUnit) {\n dateOne.setUTCMinutes(dateOne.getUTCMinutes() + timeZoneOffset1);\n dateTwo.setUTCMinutes(dateTwo.getUTCMinutes() + timeZoneOffset2);\n return checkChange(dateOne, dateTwo, nextUnit, utc);\n } else {\n return false;\n }\n}\n/**\r\n * Adds `count` of time `unit` to the source date. Returns a modified `Date` object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param date Source date\r\n * @param unit Time unit\r\n * @param count Number of units to add\r\n * @return Modified date\r\n */\nexport function add(date, unit, count, utc) {\n var timeZoneOffset = 0;\n if (!utc && unit != \"millisecond\") {\n timeZoneOffset = date.getTimezoneOffset();\n date.setUTCMinutes(date.getUTCMinutes() - timeZoneOffset);\n }\n switch (unit) {\n case \"day\":\n var day = date.getUTCDate();\n date.setUTCDate(day + count);\n break;\n case \"second\":\n var seconds = date.getUTCSeconds();\n date.setUTCSeconds(seconds + count);\n break;\n case \"millisecond\":\n var milliseconds = date.getUTCMilliseconds();\n date.setUTCMilliseconds(milliseconds + count);\n break;\n case \"hour\":\n var hours = date.getUTCHours();\n date.setUTCHours(hours + count);\n break;\n case \"minute\":\n var minutes = date.getUTCMinutes();\n date.setUTCMinutes(minutes + count);\n break;\n case \"year\":\n var year = date.getUTCFullYear();\n date.setUTCFullYear(year + count);\n break;\n case \"month\":\n var month = date.getUTCMonth();\n date.setUTCMonth(month + count);\n break;\n case \"week\":\n var wday = date.getUTCDate();\n date.setUTCDate(wday + count * 7);\n break;\n }\n if (!utc && unit != \"millisecond\") {\n date.setUTCMinutes(date.getUTCMinutes() + timeZoneOffset);\n if (unit == \"day\" || unit == \"week\" || unit == \"month\" || unit == \"year\") {\n var newTimeZoneOffset = date.getTimezoneOffset();\n if (newTimeZoneOffset != timeZoneOffset) {\n var diff = newTimeZoneOffset - timeZoneOffset;\n date.setUTCMinutes(date.getUTCMinutes() + diff);\n // solves issues if newe time falls back to old time zone\n if (date.getTimezoneOffset() != newTimeZoneOffset) {\n date.setUTCMinutes(date.getUTCMinutes() - diff);\n }\n }\n }\n }\n return date;\n}\n/**\r\n * \"Rounds\" the date to specific time unit.\r\n *\r\n * @ignore Exclude from docs\r\n * @param date Source date\r\n * @param unit Time unit\r\n * @param count Number of units to round to\r\n * @param firstDateOfWeek First day of week\r\n * @return New date\r\n */\nexport function round(date, unit, count, firstDateOfWeek, utc) {\n if (!$type.isNumber(count)) {\n count = 1;\n }\n var timeZoneOffset = 0;\n if (!utc && unit != \"millisecond\") {\n timeZoneOffset = date.getTimezoneOffset();\n date.setUTCMinutes(date.getUTCMinutes() - timeZoneOffset);\n }\n switch (unit) {\n case \"day\":\n var day = date.getUTCDate();\n if (count > 1) {\n day = Math.floor(day / count) * count;\n }\n date.setUTCDate(day);\n date.setUTCHours(0, 0, 0, 0);\n break;\n case \"second\":\n var seconds = date.getUTCSeconds();\n if (count > 1) {\n seconds = Math.floor(seconds / count) * count;\n }\n date.setUTCSeconds(seconds, 0);\n break;\n case \"millisecond\":\n if (count == 1) {\n return date; // much better for perf!\n }\n var milliseconds = date.getUTCMilliseconds();\n milliseconds = Math.floor(milliseconds / count) * count;\n date.setUTCMilliseconds(milliseconds);\n break;\n case \"hour\":\n var hours = date.getUTCHours();\n if (count > 1) {\n hours = Math.floor(hours / count) * count;\n }\n date.setUTCHours(hours, 0, 0, 0);\n break;\n case \"minute\":\n var minutes = date.getUTCMinutes();\n milliseconds = date.getUTCMilliseconds();\n if (count > 1) {\n minutes = Math.floor(minutes / count) * count;\n }\n date.setUTCMinutes(minutes, 0, 0);\n break;\n case \"month\":\n var month = date.getUTCMonth();\n if (count > 1) {\n month = Math.floor(month / count) * count;\n }\n date.setUTCMonth(month, 1);\n date.setUTCHours(0, 0, 0, 0);\n break;\n case \"year\":\n var year = date.getUTCFullYear();\n if (count > 1) {\n year = Math.floor(year / count) * count;\n }\n date.setUTCFullYear(year, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n //let nonUTCDateY = new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n //timeZoneOffset = nonUTCDateY.getTimezoneOffset();\n break;\n case \"week\":\n var wday = date.getUTCDate();\n var weekDay = date.getUTCDay();\n if (!$type.isNumber(firstDateOfWeek)) {\n firstDateOfWeek = 1;\n }\n // todo: rounding when count is not 1\n if (weekDay >= firstDateOfWeek) {\n wday = wday - weekDay + firstDateOfWeek;\n } else {\n wday = wday - (7 + weekDay) + firstDateOfWeek;\n }\n date.setUTCDate(wday);\n date.setUTCHours(0, 0, 0, 0);\n break;\n }\n if (!utc && unit != \"millisecond\") {\n date.setUTCMinutes(date.getUTCMinutes() + timeZoneOffset);\n if (unit == \"day\" || unit == \"week\" || unit == \"month\" || unit == \"year\") {\n var newTimeZoneOffset = date.getTimezoneOffset();\n if (newTimeZoneOffset != timeZoneOffset) {\n var diff = newTimeZoneOffset - timeZoneOffset;\n date.setUTCMinutes(date.getUTCMinutes() + diff);\n }\n }\n }\n return date;\n}","/**\r\n * Interaction manages all aspects of user interaction - mouse move,\r\n * click, hover, drag events, touch gestures.\r\n *\r\n * [[InteractionObject]] elements that want to use certain events, must attach event\r\n * listeners to Interaction instance.\r\n *\r\n * Interaction itself will not modify [[InteractionObject]] elements, it will be up to\r\n * those elements to handle interaction information received via event triggers.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObjectEvents } from \"../Base\";\nimport { List } from \"../utils/List\";\nimport { Animation } from \"../utils/Animation\";\nimport { MultiDisposer } from \"../utils/Disposer\";\nimport { InteractionObject } from \"./InteractionObject\";\nimport { InteractionKeyboardObject } from \"./InteractionKeyboardObject\";\nimport { Dictionary } from \"../utils/Dictionary\";\nimport { Inertia } from \"./Inertia\";\nimport { addEventListener } from \"../utils/DOM\";\nimport { keyboard } from \"../utils/Keyboard\";\nimport { system } from \"./../System\";\nimport * as $ease from \"../utils/Ease\";\nimport * as $math from \"../utils/Math\";\nimport * as $dom from \"../utils/DOM\";\nimport * as $iter from \"../utils/Iterator\";\nimport * as $type from \"../utils/Type\";\nimport * as $time from \"../utils/Time\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n* Interaction manages all aspects of user interaction - mouse move,\r\n* click, hover, drag events, touch gestures.\r\n*\r\n* [[InteractionObject]] elements that want to use certain events, must attach event\r\n* listeners to Interaction instance.\r\n*\r\n* Interaction itself will not modify [[InteractionObject]] elements, it will be up to\r\n* those elements to handle interaction information received via event triggers.\r\n*\r\n* @see {@link IInteractionEvents} for a list of available events\r\n*/\nvar Interaction = /** @class */function (_super) {\n tslib_1.__extends(Interaction, _super);\n /**\r\n * Constructor. Sets up universal document-wide move events to handle stuff\r\n * outside particular chart container.\r\n */\n function Interaction() {\n var _this =\n // Call super\n _super.call(this) || this;\n /**\r\n * An indicator of global events were already initialized.\r\n */\n _this._globalEventsAdded = false;\n /**\r\n * Holds which mouse event listeners to use.\r\n */\n _this._pointerEvents = {\n \"pointerdown\": \"mousedown\",\n \"pointerup\": \"mouseup\",\n \"pointermove\": \"mousemove\",\n \"pointercancel\": \"mouseup\",\n \"pointerover\": \"mouseover\",\n \"pointerout\": \"mouseout\",\n \"wheel\": \"wheel\"\n };\n /**\r\n * Indicates if Interaction should use only \"pointer\" type events, like\r\n * \"pointermove\", available in all modern browsers, ignoring \"legacy\"\r\n * events, like \"touchmove\".\r\n */\n _this._usePointerEventsOnly = false;\n /**\r\n * Use only touch events (for touch only devices such as tablets and phones)\r\n */\n _this._useTouchEventsOnly = false;\n /**\r\n * Add special hover events. Normally, touch device tap will also simulate\r\n * hover event. On some devices (ahem iOS) we want to prevent that so that\r\n * over/out events are not duplicated.\r\n */\n _this._addHoverEvents = true;\n /**\r\n * Indicates if passive mode options is supported by this browser.\r\n */\n _this._passiveSupported = false;\n /**\r\n * Holds list of delayed events\r\n */\n _this._delayedEvents = {\n out: []\n };\n /**\r\n * List of objects that current have a pointer hovered over them.\r\n */\n _this.overObjects = new List();\n /**\r\n * List of objects that currently has a pressed pointer.\r\n */\n _this.downObjects = new List();\n /**\r\n * List of objects that need mouse position to be reported to them.\r\n */\n _this.trackedObjects = new List();\n /**\r\n * List of objects that are currently being dragged.\r\n */\n _this.transformedObjects = new List();\n /**\r\n * Holds all known pointers.\r\n */\n _this.pointers = new Dictionary();\n /**\r\n * Inertia options that need to be applied to after element drag, if it's\r\n * `inert = true`.\r\n *\r\n * This is just a default, which can and probably will be overridden by\r\n * actual elements.\r\n */\n _this.inertiaOptions = new Dictionary();\n /**\r\n * Default options for click events. These can be overridden in\r\n * [[InteractionObject]].\r\n */\n _this.hitOptions = {\n //\"holdTime\": 1000,\n \"doubleHitTime\": 300,\n //\"delayFirstHit\": false,\n \"hitTolerance\": 10,\n \"noFocus\": true\n };\n /**\r\n * Default options for hover events. These can be overridden in\r\n * [[InteractionObject]].\r\n */\n _this.hoverOptions = {\n \"touchOutBehavior\": \"leave\",\n \"touchOutDelay\": 1000\n };\n /**\r\n * Default options for detecting a swipe gesture. These can be overridden in\r\n * [[InteractionObject]].\r\n */\n _this.swipeOptions = {\n \"time\": 500,\n \"verticalThreshold\": 75,\n \"horizontalThreshold\": 30\n };\n /**\r\n * Default options for keyboard operations. These can be overridden in\r\n * [[InteractionObject]].\r\n */\n _this.keyboardOptions = {\n \"speed\": 0.1,\n \"accelleration\": 1.2,\n \"accellerationDelay\": 2000\n };\n // Set class name\n _this.className = \"Interaction\";\n // Create InteractionObject for <body>\n _this.body = _this.getInteraction(document.body);\n _this._disposers.push(_this.body);\n // Detect browser capabilities and determine what event listeners to use\n if (window.hasOwnProperty(\"PointerEvent\")) {\n // IE10+/Edge without touch controls enabled\n _this._pointerEvents.pointerdown = \"pointerdown\";\n _this._pointerEvents.pointerup = \"pointerup\";\n _this._pointerEvents.pointermove = \"pointermove\";\n _this._pointerEvents.pointercancel = \"pointercancel\";\n _this._pointerEvents.pointerover = \"pointerover\";\n _this._pointerEvents.pointerout = \"pointerout\";\n //this._usePointerEventsOnly = true;\n } else if (window.hasOwnProperty(\"MSPointerEvent\")) {\n // IE9\n _this._pointerEvents.pointerdown = \"MSPointerDown\";\n _this._pointerEvents.pointerup = \"MSPointerUp\";\n _this._pointerEvents.pointermove = \"MSPointerMove\";\n _this._pointerEvents.pointercancel = \"MSPointerUp\";\n _this._pointerEvents.pointerover = \"MSPointerOver\";\n _this._pointerEvents.pointerout = \"MSPointerOut\";\n //this._usePointerEventsOnly = true;\n } else if (typeof matchMedia !== \"undefined\" && matchMedia('(pointer:fine)').matches) {\n // This is only for Safari as it does not support PointerEvent\n // Do nothing and let it use regular `mouse*` events\n // Hi Apple ;)\n // Additionally disable hover events for iOS devices\n if ('ontouchstart' in window) {\n _this._addHoverEvents = false;\n _this._useTouchEventsOnly = true;\n }\n } else if (window.navigator.userAgent.match(/MSIE /)) {\n // Oh looky, an MSIE that does not support PointerEvent. Hi granpa IE9!\n _this._usePointerEventsOnly = true;\n } else {\n // Uses defaults for normal browsers\n // We also assume that this must be a touch device that does not have\n // any pointer events\n _this._useTouchEventsOnly = true;\n }\n // Detect if device has a mouse\n // This is turning out to be not reliable\n // @todo remove\n /*if (!window.navigator.msPointerEnabled && (typeof matchMedia !== \"undefined\") && !matchMedia('(pointer:fine)').matches && !this.fullFF()) {\r\n this._useTouchEventsOnly = true;\r\n }*/\n // Detect proper mouse wheel events\n if (\"onwheel\" in document.createElement(\"div\")) {\n // Modern browsers\n _this._pointerEvents.wheel = \"wheel\";\n } else if ($type.hasValue(document.onmousewheel)) {\n // Webkit and IE support at least \"mousewheel\"\n _this._pointerEvents.wheel = \"mousewheel\";\n }\n // Set up default inertia options\n _this.inertiaOptions.setKey(\"move\", {\n \"time\": 100,\n \"duration\": 500,\n \"factor\": 1,\n \"easing\": $ease.polyOut3\n });\n _this.inertiaOptions.setKey(\"resize\", {\n \"time\": 100,\n \"duration\": 500,\n \"factor\": 1,\n \"easing\": $ease.polyOut3\n });\n // Set the passive mode support\n _this._passiveSupported = Interaction.passiveSupported;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * This is a nasty detection for Firefox. The reason why we have is that\r\n * Firefox ESR version does not support matchMedia correctly.\r\n *\r\n * On iOS, Firefox uses different userAgent, so we don't have to detect iOS.\r\n *\r\n * @return Full Firefox?\r\n */\n Interaction.prototype.fullFF = function () {\n return window.navigator.userAgent.match(/Firefox/) && !window.navigator.userAgent.match(/Android/);\n };\n Interaction.prototype.debug = function () {};\n /**\r\n * ==========================================================================\r\n * Processing\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Sets up global events.\r\n *\r\n * We need this so that we can track drag movement beyond chart's container.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Interaction.prototype.addGlobalEvents = function () {\n var _this = this;\n if (!this._globalEventsAdded) {\n if (!this._useTouchEventsOnly) {\n this._disposers.push(addEventListener(document, this._pointerEvents.pointerdown, function (ev) {\n _this.handleGlobalPointerDown(ev);\n }));\n this._disposers.push(addEventListener(document, this._pointerEvents.pointermove, function (ev) {\n _this.handleGlobalPointerMove(ev);\n }));\n this._disposers.push(addEventListener(document, this._pointerEvents.pointerup, function (ev) {\n _this.handleGlobalPointerUp(ev);\n }));\n this._disposers.push(addEventListener(document, this._pointerEvents.pointercancel, function (ev) {\n _this.handleGlobalPointerUp(ev, true);\n }));\n }\n // No need to duplicate events for hubrid systems that support both\n // pointer events and touch events. Touch events are need only for\n // some touch-only systems, like Mobile Safari.\n if (!this._usePointerEventsOnly) {\n this._disposers.push(addEventListener(document, \"touchstart\", function (ev) {\n _this.handleGlobalTouchStart(ev);\n }));\n this._disposers.push(addEventListener(document, \"touchmove\", function (ev) {\n _this.handleGlobalTouchMove(ev);\n }));\n this._disposers.push(addEventListener(document, \"touchend\", function (ev) {\n _this.handleGlobalTouchEnd(ev);\n }));\n }\n this._disposers.push(addEventListener(document, \"keydown\", function (ev) {\n _this.handleGlobalKeyDown(ev);\n }));\n this._disposers.push(addEventListener(document, \"keyup\", function (ev) {\n _this.handleGlobalKeyUp(ev);\n }));\n this._globalEventsAdded = true;\n }\n };\n /**\r\n * Sets if [[InteractionObject]] is clickable.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io [[InteractionObject]] instance\r\n */\n Interaction.prototype.processClickable = function (io) {\n // Add or remove touch events\n this.processTouchable(io);\n };\n /**\r\n * Sets if [[InteractionObject]] will display context menu when right-clicked.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io [[InteractionObject]] instance\r\n */\n Interaction.prototype.processContextMenu = function (io) {\n if (io.contextMenuDisabled) {\n if (!io.eventDisposers.hasKey(\"contextMenuDisabled\")) {\n io.eventDisposers.setKey(\"contextMenuDisabled\", addEventListener(io.element, \"contextmenu\", function (e) {\n e.preventDefault();\n }));\n }\n } else {\n if (io.eventDisposers.hasKey(\"contextMenuDisabled\")) {\n io.eventDisposers.getKey(\"contextMenuDisabled\").dispose();\n }\n }\n };\n /**\r\n * Sets if [[InteractionObject]] is hoverable.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io [[InteractionObject]] instance\r\n */\n Interaction.prototype.processHoverable = function (io) {\n var _this = this;\n if (io.hoverable || io.trackable) {\n // Add global events\n this.addGlobalEvents();\n // Add hover styles\n this.applyCursorOverStyle(io);\n // Add local events\n if (!io.eventDisposers.hasKey(\"hoverable\") && this._addHoverEvents) {\n io.eventDisposers.setKey(\"hoverable\", new MultiDisposer([addEventListener(io.element, this._pointerEvents.pointerout, function (e) {\n return _this.handlePointerOut(io, e);\n }), addEventListener(io.element, this._pointerEvents.pointerover, function (e) {\n return _this.handlePointerOver(io, e);\n })]));\n }\n if (io.trackable) {\n //sprite.addEventListener(\"touchmove\", this.handleTouchMove, false, this);\n }\n } else {\n var disposer = io.eventDisposers.getKey(\"hoverable\");\n if (disposer != null) {\n disposer.dispose();\n io.eventDisposers.removeKey(\"hoverable\");\n }\n }\n // Add or remove touch events\n this.processTouchable(io);\n };\n /**\r\n * Sets up [[InteractionObject]] as movable. Movable can be any\r\n * transformation, e.g. drag, swipe, resize, track.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n */\n Interaction.prototype.processMovable = function (io) {\n // Add unified events\n if (io.draggable || io.swipeable || io.trackable || io.resizable) {\n // Prep the element\n if (!this.isGlobalElement(io) && !io.isTouchProtected) {\n this.prepElement(io);\n }\n // Add hover styles\n this.applyCursorOverStyle(io);\n }\n // Add or remove touch events\n this.processTouchable(io);\n };\n /**\r\n * Checks if [[InteractionObject]] is trackable and sets relative events.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n */\n Interaction.prototype.processTrackable = function (io) {\n this.processHoverable(io);\n this.processMovable(io);\n if (io.trackable) {\n this.trackedObjects.moveValue(io);\n } else {\n this.trackedObjects.removeValue(io);\n }\n };\n /**\r\n * Checks if [[InteractionObject]] is draggable.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n */\n Interaction.prototype.processDraggable = function (io) {\n this.processMovable(io);\n };\n /**\r\n * Checks if [[InteractionObject]] is swipeable and sets relative events.\r\n *\r\n * A swipe event is triggered when a horizontal drag of 75px or more (and\r\n * less than 30px vertically) occurs within 700 milliseconds. This can be\r\n * overridden in sprites [[swipeOptions]].\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n */\n Interaction.prototype.processSwipeable = function (io) {\n this.processMovable(io);\n };\n /**\r\n * Checks if [[InteractionObject]] is resizable and attaches required events\r\n * to it.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n */\n Interaction.prototype.processResizable = function (io) {\n this.processMovable(io);\n };\n /**\r\n * Checks if [[InteractionObject]] is supposed to capture mouse wheel events\r\n * and prepares it to catch those events.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n */\n Interaction.prototype.processWheelable = function (io) {\n var _this = this;\n if (io.wheelable) {\n //io.hoverable = true;\n if (!io.eventDisposers.hasKey(\"wheelable\")) {\n io.eventDisposers.setKey(\"wheelable\", new MultiDisposer([addEventListener(io.element, this._pointerEvents.wheel, function (e) {\n return _this.handleMouseWheel(io, e);\n }, this._passiveSupported ? {\n passive: false\n } : false), io.events.on(\"out\", function (e) {\n if (io.wheelable) {\n _this.unlockWheel();\n }\n }), io.events.on(\"over\", function (e) {\n if (io.wheelable) {\n _this.lockWheel();\n }\n })]));\n }\n } else {\n var disposer = io.eventDisposers.getKey(\"wheelable\");\n if (disposer != null) {\n disposer.dispose();\n io.eventDisposers.removeKey(\"wheelable\");\n }\n }\n };\n /**\r\n * Checks if [[InteractionObject]] is focusable. A focusable element is an\r\n * element that will be highlighted when users presses TAB key. If the\r\n * element is focusable, this function will attach relative focus/blur\r\n * events to it.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n */\n Interaction.prototype.processFocusable = function (io) {\n var _this = this;\n if (io.focusable === true && io.tabindex > -1 && !this._useTouchEventsOnly) {\n if (!io.eventDisposers.hasKey(\"focusable\")) {\n io.eventDisposers.setKey(\"focusable\", new MultiDisposer([addEventListener(io.element, \"focus\", function (e) {\n return _this.handleFocus(io, e);\n }), addEventListener(io.element, \"blur\", function (e) {\n return _this.handleBlur(io, e);\n }), addEventListener(io.element, this._pointerEvents.pointerdown, function (e) {\n return _this.handleFocusBlur(io, e);\n }), addEventListener(io.element, \"touchstart\", function (e) {\n return _this.handleFocusBlur(io, e);\n }, this._passiveSupported ? {\n passive: false\n } : false)]));\n }\n } else {\n var disposer = io.eventDisposers.getKey(\"focusable\");\n if (disposer != null) {\n disposer.dispose();\n io.eventDisposers.removeKey(\"focusable\");\n }\n }\n };\n /**\r\n * Checks if [[InteractionObject]] is \"touchable\". It means any interaction\r\n * whatsoever: mouse click, touch screen tap, swipe, drag, resize, etc.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n */\n Interaction.prototype.processTouchable = function (io) {\n var _this = this;\n // Add unified events\n if (io.clickable || io.hoverable || io.trackable || io.draggable || io.swipeable || io.resizable) {\n // Add global events\n this.addGlobalEvents();\n // Add local events\n if (!io.eventDisposers.hasKey(\"touchable\")) {\n if (!this._useTouchEventsOnly && !this._usePointerEventsOnly) {\n io.eventDisposers.setKey(\"touchable\", new MultiDisposer([addEventListener(io.element, this._pointerEvents.pointerdown, function (e) {\n return _this.handlePointerDown(io, e);\n }), addEventListener(io.element, \"touchstart\", function (e) {\n return _this.handleTouchDown(io, e);\n }, this._passiveSupported ? {\n passive: false\n } : false)]));\n } else if (!this._useTouchEventsOnly) {\n io.eventDisposers.setKey(\"touchable\", addEventListener(io.element, this._pointerEvents.pointerdown, function (e) {\n return _this.handlePointerDown(io, e);\n }));\n } else if (!this._usePointerEventsOnly) {\n io.eventDisposers.setKey(\"touchable\", addEventListener(io.element, \"touchstart\", function (e) {\n return _this.handleTouchDown(io, e);\n }, this._passiveSupported ? {\n passive: false\n } : false));\n }\n }\n } else {\n var disposer = io.eventDisposers.getKey(\"touchable\");\n if (disposer != null) {\n disposer.dispose();\n io.eventDisposers.removeKey(\"touchable\");\n }\n }\n };\n /**\r\n * ==========================================================================\r\n * Non-pointer events\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Dispatches \"focus\" event when element gains focus.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param ev Original event\r\n */\n Interaction.prototype.handleFocus = function (io, ev) {\n if (!io.focusable) {\n ev.preventDefault();\n return;\n }\n io.isFocused = true;\n if (io.events.isEnabled(\"focus\") && !system.isPaused) {\n var imev = {\n type: \"focus\",\n target: io,\n event: ev\n };\n io.events.dispatchImmediately(\"focus\", imev);\n }\n };\n /**\r\n * Used by regular click events to prevent focus if \"noFocus\" is set.\r\n *\r\n * This should not be called by \"focus\" handlers.\r\n *\r\n * @param io Element\r\n * @param ev Original event\r\n */\n Interaction.prototype.handleFocusBlur = function (io, ev) {\n if (io.focusable !== false && this.getHitOption(io, \"noFocus\")) {\n io.events.once(\"focus\", function () {\n io.events.disableType(\"blur\");\n $dom.blur();\n if (io.sprite) {\n io.sprite.handleBlur();\n }\n io.events.enableType(\"blur\");\n });\n }\n };\n /**\r\n * Dispatches \"blur\" event when element loses focus.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param ev Original event\r\n */\n Interaction.prototype.handleBlur = function (io, ev) {\n if (!io.focusable) {\n ev.preventDefault();\n return;\n }\n io.isFocused = false;\n if (io.events.isEnabled(\"blur\") && !system.isPaused) {\n var imev = {\n type: \"blur\",\n target: io,\n event: ev\n };\n io.events.dispatchImmediately(\"blur\", imev);\n }\n };\n /**\r\n * ==========================================================================\r\n * Global keyboard-related even handlers\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Checks if there is an item that has currently focus and that they key is\r\n * one of the directional keys. If both of the conditions are true, it\r\n * creates an object to simulate movement of dragable element with keyboard.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev An original keyboard event\r\n */\n Interaction.prototype.handleGlobalKeyDown = function (ev) {\n if (this.focusedObject) {\n if (keyboard.isKey(ev, \"esc\")) {\n // ESC removes focus\n $dom.blur();\n } else if (this.focusedObject.draggable && keyboard.isKey(ev, [\"up\", \"down\", \"left\", \"right\"])) {\n // Prevent scrolling of the document\n ev.preventDefault();\n // Get focused object\n var io = this.focusedObject;\n // Get particular key\n var disposerKey = \"interactionKeyboardObject\";\n // If such disposer already exists we know the event is going on so we\n // just move on\n if (io.eventDisposers.hasKey(disposerKey)) {\n return;\n }\n // Create a keyboard mover\n var ko = new InteractionKeyboardObject(io, ev);\n io.eventDisposers.setKey(disposerKey, ko);\n switch (keyboard.getEventKey(ev)) {\n case \"up\":\n ko.directionY = -1;\n break;\n case \"down\":\n ko.directionY = 1;\n break;\n case \"left\":\n ko.directionX = -1;\n break;\n case \"right\":\n ko.directionX = 1;\n break;\n }\n }\n }\n };\n /**\r\n * Dispatches related events when the keyboard key is realeasd.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev An original keyboard event\r\n */\n Interaction.prototype.handleGlobalKeyUp = function (ev) {\n var disposerKey = \"interactionKeyboardObject\";\n if (this.focusedObject) {\n var disposer = this.focusedObject.eventDisposers.getKey(disposerKey);\n if (disposer != null) {\n // Prevent scrolling of the document\n ev.preventDefault();\n // Dispose stuff\n disposer.dispose();\n this.focusedObject.eventDisposers.removeKey(disposerKey);\n }\n }\n };\n /**\r\n * ==========================================================================\r\n * Global pointer-related even handlers\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Handler for a global \"pointermove\" event.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n */\n Interaction.prototype.handleGlobalPointerMove = function (ev) {\n // Get pointer\n var pointer = this.getPointer(ev);\n // Update current point position\n pointer.point = this.getPointerPoint(ev);\n // Prepare and fire global event\n if (this.events.isEnabled(\"track\") && !system.isPaused) {\n var imev = {\n type: \"track\",\n target: this,\n event: ev,\n pointer: pointer,\n touch: pointer.touch\n };\n this.events.dispatchImmediately(\"track\", imev);\n }\n // Track\n this.addBreadCrumb(pointer, pointer.point);\n // Process further\n this.handleGlobalMove(pointer, ev);\n };\n /**\r\n * Handler for a global \"pointerdown\" event.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n */\n Interaction.prototype.handleGlobalPointerDown = function (ev) {\n // Remove delayed hovers\n this.processDelayed();\n // Get pointer\n var pointer = this.getPointer(ev);\n // Prepare and fire global event\n if (this.events.isEnabled(\"down\") && !system.isPaused) {\n var imev = {\n type: \"down\",\n target: this,\n event: ev,\n pointer: pointer,\n touch: pointer.touch\n };\n this.events.dispatchImmediately(\"down\", imev);\n }\n };\n /**\r\n * Prevents touch action from firing.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event\r\n */\n Interaction.prototype.preventTouchAction = function (ev) {\n if (!ev.defaultPrevented) {\n ev.preventDefault();\n }\n };\n /**\r\n * Handler for a global \"pointerup\" event.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n */\n Interaction.prototype.handleGlobalPointerUp = function (ev, cancelled) {\n if (cancelled === void 0) {\n cancelled = false;\n }\n // Get pointer\n var pointer = this.getPointer(ev);\n // Prepare and fire global event\n if (this.events.isEnabled(\"up\") && !system.isPaused) {\n var imev = {\n type: \"up\",\n target: this,\n event: ev,\n pointer: pointer,\n touch: pointer.touch\n };\n this.events.dispatchImmediately(\"up\", imev);\n }\n // Process further\n this.handleGlobalUp(pointer, ev, cancelled);\n };\n /**\r\n * ==========================================================================\r\n * Global touch-related even handlers\r\n * ==========================================================================\r\n */\n /**\r\n * Handler for a global \"touchmove\" event.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n */\n Interaction.prototype.handleGlobalTouchMove = function (ev) {\n // Process each changed touch point\n for (var i = 0; i < ev.changedTouches.length; i++) {\n // Get pointer\n var pointer = this.getPointer(ev.changedTouches[i]);\n // Update current point position\n pointer.point = this.getPointerPoint(ev.changedTouches[i]);\n // Prepare and fire global event\n if (this.events.isEnabled(\"track\") && !system.isPaused) {\n var imev = {\n type: \"track\",\n target: this,\n event: ev,\n pointer: pointer,\n touch: pointer.touch\n };\n this.events.dispatchImmediately(\"track\", imev);\n }\n // Track\n this.addBreadCrumb(pointer, pointer.point);\n // Process further\n this.handleGlobalMove(pointer, ev);\n }\n };\n /**\r\n * Handler for a global \"touchstart\" event.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n */\n Interaction.prototype.handleGlobalTouchStart = function (ev) {\n // Remove delayed hovers\n this.processDelayed();\n // Process each changed touch point\n for (var i = 0; i < ev.changedTouches.length; i++) {\n // Get pointer\n var pointer = this.getPointer(ev.changedTouches[i]);\n // Prepare and fire global event\n if (!this._usePointerEventsOnly && this.events.isEnabled(\"down\") && !system.isPaused) {\n var imev = {\n type: \"down\",\n target: this,\n event: ev,\n pointer: pointer,\n touch: pointer.touch\n };\n this.events.dispatchImmediately(\"down\", imev);\n }\n }\n };\n /**\r\n * Handler for a global \"touchend\" event.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n */\n Interaction.prototype.handleGlobalTouchEnd = function (ev) {\n // Process each changed touch point\n for (var i = 0; i < ev.changedTouches.length; i++) {\n // Get pointer\n var pointer = this.getPointer(ev.changedTouches[i]);\n // Prepare and fire global event\n if (this.events.isEnabled(\"up\") && !system.isPaused) {\n var imev = {\n type: \"up\",\n target: this,\n event: ev,\n pointer: pointer,\n touch: pointer.touch\n };\n this.events.dispatchImmediately(\"up\", imev);\n }\n // Handle element-related events\n this.handleGlobalUp(pointer, ev);\n }\n };\n /**\r\n * ==========================================================================\r\n * Element-specific pointer-related even handlers\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Handles event when pointer is over [[InteractionObject]] and button is\r\n * pressed.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param ev Original event\r\n */\n Interaction.prototype.handlePointerDown = function (io, ev) {\n // Stop further propagation so we don't get multiple triggers on hybrid\n // devices (both mouse and touch capabilities)\n //ev.preventDefault();\n //ev.stopPropagation();\n //if (ev.defaultPrevented) {\n //}\n // Get pointer\n var pointer = this.getPointer(ev);\n // Ignore if it's anything but mouse's primary button\n if (!pointer.touch && ev.which != 1 && ev.which != 3) {\n return;\n }\n // Set mouse button\n pointer.button = ev.which;\n // Reset pointer\n this.resetPointer(pointer, ev);\n // Process down\n this.handleDown(io, pointer, ev);\n };\n /**\r\n * Handles event when [[InteractionObject]] is hovered by a mouse pointer.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param ev Original event\r\n */\n Interaction.prototype.handlePointerOver = function (io, ev) {\n // Get pointer\n var pointer = this.getPointer(ev);\n // Process down\n this.handleOver(io, pointer, ev);\n };\n /**\r\n * Handles event when [[InteractionObject]] loses hover from a mouse pointer.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param ev Original event\r\n */\n Interaction.prototype.handlePointerOut = function (io, ev) {\n // Get pointer\n var pointer = this.getPointer(ev);\n // Process down\n this.handleOut(io, pointer, ev);\n };\n /**\r\n * Handles event when mouse wheel is crolled over the [[InteractionObject]].\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param ev Original event\r\n * @todo Investigate more-cross browser stuff https://developer.mozilla.org/en-US/docs/Web/Events/wheel\r\n */\n Interaction.prototype.handleMouseWheel = function (io, ev) {\n // Get pointer\n var pointer = this.getPointer(ev);\n // Update current point position\n pointer.point = this.getPointerPoint(ev);\n // Init delta values\n var deltaX = 0,\n deltaY = 0;\n // Set up modifier\n // This is needed because FireFox reports wheel deltas in \"lines\" instead\n // of pixels so we have to approximate pixel value\n var mod = 1;\n if (ev.deltaMode == 1) {\n mod = 50;\n }\n // Calculate deltas\n if (ev instanceof WheelEvent) {\n deltaX = Math.round(-1 * ev.wheelDeltaX || ev.deltaX) * mod;\n deltaY = Math.round(-1 * ev.wheelDeltaY || ev.deltaY) * mod;\n } else {\n throw new Error(\"Invalid event type\");\n }\n // Handle the event\n this.handleWheel(io, pointer, deltaX, deltaY, ev);\n };\n /**\r\n * ==========================================================================\r\n * Element-specific touch-related even handlers\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Handles an event when an [[InteractionObject]] is touched on a touch\r\n * device.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param ev Original event\r\n */\n Interaction.prototype.handleTouchDown = function (io, ev) {\n // Stop further propagation so we don't get multiple triggers on hybrid\n // devices (both mouse and touch capabilities)\n //this.maybePreventDefault(io, ev);\n //return;\n // Process each changed touch point\n for (var i = 0; i < ev.changedTouches.length; i++) {\n // Get pointer\n var pointer = this.getPointer(ev.changedTouches[i]);\n this.maybePreventDefault(io, ev, pointer);\n // Reset pointer\n this.resetPointer(pointer, ev.changedTouches[i]);\n // Process down\n this.handleDown(io, pointer, ev);\n }\n };\n /**\r\n * ==========================================================================\r\n * Universal handlers\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Handles click/tap. Checks for doublehit.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Interaction object\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\n Interaction.prototype.handleHit = function (io, pointer, ev) {\n // Check if this is a double-hit\n var now = $time.getTime();\n if (io.lastHit && io.lastHit >= now - this.getHitOption(io, \"doubleHitTime\")) {\n // Yup - it's a double-hit\n // Cancel the hit\n //clearTimeout(io.lastHitPointer.hitTimeout);\n // If it happened too fast it probably means that hybrid device just\n // generated two events for the same tap\n if (now - io.lastHit < 100) {\n // Ignore\n return;\n }\n // Clear last hit\n io.lastHit = undefined;\n io.lastHitPointer = undefined;\n // Dispatch event\n if (io.events.isEnabled(\"doublehit\") && !system.isPaused) {\n var imev = {\n type: \"doublehit\",\n target: io,\n point: pointer.point,\n event: ev,\n touch: pointer.touch\n };\n io.events.dispatchImmediately(\"doublehit\", imev);\n }\n } else {\n // Log last hit\n io.lastHit = now;\n io.lastHitPointer = pointer;\n if (pointer.button === 3) {\n // Execute HIT now\n if (io.events.isEnabled(\"rightclick\") && !system.isPaused) {\n var imev = {\n type: \"rightclick\",\n target: io,\n event: ev\n };\n io.events.dispatchImmediately(\"rightclick\", imev);\n }\n } else {\n if (io.events.isEnabled(\"hit\") && !system.isPaused) {\n var imev = {\n type: \"hit\",\n target: io,\n event: ev,\n point: pointer.point,\n touch: pointer.touch\n };\n io.events.dispatchImmediately(\"hit\", imev);\n }\n }\n }\n };\n /**\r\n * Handles pointer hovering over [[InteractionObject]].\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Interaction object\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n * @param soft Invoked by helper function\r\n */\n Interaction.prototype.handleOver = function (io, pointer, ev, soft) {\n if (soft === void 0) {\n soft = false;\n }\n if (!io.hoverable) {\n return;\n }\n // Remove any delayed outs\n this.processDelayed();\n // Add pointer\n io.overPointers.moveValue(pointer);\n // Check if object is not yet hovered\n if (!io.isHover) {\n // Set element as hovered\n io.isHover = true;\n this.overObjects.moveValue(io);\n // Generate body track event. This is needed so that if element loads\n // under unmoved mouse cursor, we still need all the actions that are\n // required to happen to kick in.\n this.handleTrack(this.body, pointer, ev, true);\n // Event\n if (io.events.isEnabled(\"over\") && !system.isPaused) {\n var imev = {\n type: \"over\",\n target: io,\n event: ev,\n pointer: pointer,\n touch: pointer.touch\n };\n io.events.dispatchImmediately(\"over\", imev);\n }\n }\n };\n /**\r\n * Handles when [[InteractionObject]] is no longer hovered.\r\n *\r\n * If `soft = true`, this means that method is being invoked by some other\r\n * code, not hard \"out\" function, like `handleUp` which implies we need to\r\n * run additional checks before unhovering the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Interaction object\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n * @param soft Invoked by helper function\r\n * @param force Force imediate out\r\n */\n Interaction.prototype.handleOut = function (io, pointer, ev, soft, force) {\n var _this = this;\n if (soft === void 0) {\n soft = false;\n }\n if (force === void 0) {\n force = false;\n }\n if (!io.hoverable) {\n return;\n }\n // Remove pointer\n io.overPointers.removeValue(pointer);\n // Check if element is still hovered\n if (io.isHover && (!io.hasDelayedOut || force)) {\n // Should we run additional checks?\n if (soft && io.overPointers.length) {\n // There are still pointers hovering - don't do anything else and\n // wait until either no over pointers are there or we get a hard out\n // event.\n return;\n }\n // Should we delay \"out\" if this is happening on a touch device?\n if (pointer.touch && !force && !this.old(pointer)) {\n // This is a touch pointer, and it hasn't moved, let's pretend\n // the object is still hovered, and act as per \"behavior\" setting\n var behavior = this.getHoverOption(io, \"touchOutBehavior\");\n if (behavior == \"leave\") {\n // Set to \"leave\", so we do not execute any \"out\" event.\n // It will be handled by any other interaction that happens\n // afterwards.\n this._delayedEvents.out.push({\n type: \"out\",\n io: io,\n pointer: pointer,\n event: ev,\n keepUntil: $time.getTime() + 500\n });\n io.hasDelayedOut = true;\n return;\n } else if (behavior == \"delay\" && this.getHoverOption(io, \"touchOutDelay\")) {\n this._delayedEvents.out.push({\n type: \"out\",\n io: io,\n pointer: pointer,\n event: ev,\n keepUntil: $time.getTime() + 500,\n timeout: this.setTimeout(function () {\n _this.handleOut(io, pointer, ev, true);\n }, this.getHoverOption(io, \"touchOutDelay\"))\n });\n return;\n } else {\n // Nothing for \"remove\" - that's how it works \"out-of-the-box\"\n }\n }\n // Set element as not hovered\n io.isHover = false;\n this.overObjects.removeValue(io);\n // Invoke event\n if (io.events.isEnabled(\"out\") && !system.isPaused) {\n var imev = {\n type: \"out\",\n target: io,\n event: ev,\n pointer: pointer,\n touch: pointer.touch\n };\n io.events.dispatchImmediately(\"out\", imev);\n }\n // Reset object from lefover delayed outs, pointers\n io.overPointers.clear();\n io.hasDelayedOut = false;\n // @todo (clean delayed)\n }\n };\n /**\r\n * Processes dalyed events, such as \"out\" event that was initiated for\r\n * elements by touch.\r\n */\n Interaction.prototype.processDelayed = function () {\n var delayedEvent;\n while (true) {\n delayedEvent = this._delayedEvents.out.pop();\n if (!delayedEvent) {\n break;\n }\n if (delayedEvent.timeout) {\n delayedEvent.timeout.dispose();\n }\n this.handleOut(delayedEvent.io, delayedEvent.pointer, delayedEvent.event, false, true);\n }\n };\n /**\r\n * Performs tasks on pointer down.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\n Interaction.prototype.handleDown = function (io, pointer, ev) {\n // Need to prevent default event from happening on transformable objects\n this.maybePreventDefault(io, ev, pointer);\n // Stop inertia animations if they're currently being played out\n if (io.inert) {\n this.stopInertia(io);\n }\n // Trigger hover because some touch devices won't trigger over events\n // on their own\n this.handleOver(io, pointer, ev, true);\n // Add pointer to list\n io.downPointers.moveValue(pointer);\n // Apply styles if necessary\n this.applyCursorDownStyle(io, pointer);\n // Check if object is already down\n if (!io.isDown) {\n // Lose focus if needed\n if (io.focusable !== false && this.getHitOption(io, \"noFocus\") && this.focusedObject) {\n $dom.blur();\n }\n // Set object as hovered\n io.isDown = true;\n this.downObjects.moveValue(io);\n // Prep object for dragging and/or resizing\n if (io.draggable) {\n this.processDragStart(io, pointer, ev);\n }\n if (io.resizable) {\n this.processResizeStart(io, pointer, ev);\n }\n }\n // Dispatch \"down\" event\n if (io.events.isEnabled(\"down\") && !system.isPaused) {\n var imev = {\n type: \"down\",\n target: io,\n event: ev,\n pointer: pointer,\n touch: pointer.touch\n };\n io.events.dispatchImmediately(\"down\", imev);\n }\n };\n /**\r\n * Performs tasks on pointer up.\r\n *\r\n * @ignore Exclude from docs\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\n Interaction.prototype.handleGlobalUp = function (pointer, ev, cancelled) {\n var _this = this;\n if (cancelled === void 0) {\n cancelled = false;\n }\n // Process all down objects\n $iter.each(this.downObjects.backwards().iterator(), function (io) {\n // Check if this particular pointer is pressing down\n // on object\n if (io && io.downPointers.contains(pointer)) {\n _this.handleUp(io, pointer, ev, cancelled);\n }\n });\n };\n /**\r\n * Handles when [[InteractionObject]] is no longer hovered.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Interaction object\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\n Interaction.prototype.handleUp = function (io, pointer, ev, cancelled) {\n if (cancelled === void 0) {\n cancelled = false;\n }\n // Restore cursor style\n this.restoreCursorDownStyle(io, pointer);\n // Remove pointer from the list\n io.downPointers.removeValue(pointer);\n // Trigger out because some touch devices won't trigger out events\n // on their own\n if (pointer.touch || this._useTouchEventsOnly) {\n this.handleOut(io, pointer, ev, true);\n }\n // Check if object still down\n if (io.isDown) {\n // Check if there are no other pointers hovering this element\n if (io.downPointers.length == 0) {\n // Set element as no longer down\n io.isDown = false;\n this.downObjects.removeValue(io);\n }\n // Dispatch \"up\" event\n if (io.events.isEnabled(\"up\") && !system.isPaused) {\n var imev = {\n type: \"up\",\n target: io,\n event: ev,\n pointer: pointer,\n touch: pointer.touch\n };\n io.events.dispatchImmediately(\"up\", imev);\n }\n // Check if this was not a cancelled event.\n // If event was canelled (which might happen if gesture resulted in\n // navigation or page scroll) there's no point in triggering hit and\n // other actions.\n if (!cancelled) {\n // Handle swiping-related stuff\n if (io.swipeable && this.swiped(io, pointer)) {\n // Swiped - nothing else should happen\n this.handleSwipe(io, pointer, ev);\n } else {\n // Check if it maybe a click\n if (io.clickable && !this.moved(pointer, this.getHitOption(io, \"hitTolerance\"))) {\n this.handleHit(io, pointer, ev);\n }\n // Handle inertia\n if (io.inert && this.moved(pointer, this.getHitOption(io, \"hitTolerance\"))) {\n this.handleInertia(io, pointer);\n } else if (io.draggable) {\n this.processDragStop(io, pointer, ev);\n }\n if (io.resizable) {\n this.processResizeStop(io, pointer, ev);\n }\n }\n }\n }\n };\n /**\r\n * Checks if event needs to be prevented on draggable and such items, so that\r\n * touch gestures like navigation and scroll do not kick in.\r\n *\r\n * @param io Object\r\n * @param ev Event\r\n */\n Interaction.prototype.maybePreventDefault = function (io, ev, pointer) {\n if ($type.hasValue(ev) && (io.draggable || io.swipeable || io.trackable || io.resizable) && !this.isGlobalElement(io) && ev.cancelable !== false && (!io.isTouchProtected || !pointer || !pointer.touch)) {\n ev.preventDefault();\n }\n };\n /**\r\n * Handles pointer move.\r\n *\r\n * @ignore Exclude from docs\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\n Interaction.prototype.handleGlobalMove = function (pointer, ev) {\n var _this = this;\n // Process hovered elements\n // We check if the element became unhovered without reporting the mouseout\n // event. (it happens in some cases)\n if (!pointer.touch) {\n var target_1 = $dom.eventTarget(pointer.lastEvent);\n $iter.each(this.overObjects.backwards().iterator(), function (io) {\n // Is this pointer relevant to element?\n if (io && io.overPointers.contains(pointer) && io.hoverable) {\n // Check if the element is still hovered\n var reset = false;\n if (io.element && pointer.lastEvent) {\n if (!$dom.contains(io.element, target_1)) {\n reset = true;\n }\n } else {\n reset = true;\n }\n if (reset) {\n _this.handleOut(io, pointer, ev, true);\n }\n }\n });\n }\n // Process down elements\n $iter.each(this.transformedObjects.backwards().iterator(), function (io) {\n // Is this pointer relevant to element?\n if (io.downPointers.contains(pointer) &&\n // Swipe still happening?\n !(io.swipeable && _this.swiping(io, pointer)) && (io.draggable || io.resizable)) {\n _this.handleTransform(io, ev);\n }\n });\n // Process tracked elements\n $iter.each(this.trackedObjects.backwards().iterator(), function (io) {\n // Is this pointer relevant to element?\n if (!io.overPointers.contains(pointer)) {\n _this.handleTrack(io, pointer, ev);\n }\n });\n };\n /**\r\n * Handles reporting of pointer movement.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n * @param skipCheck Sould we skip check if cursor actually moved\r\n */\n Interaction.prototype.handleTrack = function (io, pointer, ev, skipCheck) {\n if (skipCheck === void 0) {\n skipCheck = false;\n }\n // Do nothing if the cursor did not actually move\n if (!skipCheck && !this.moved(pointer, 0)) {\n return;\n }\n // Initiate TRACK event\n if (io.events.isEnabled(\"track\") && !system.isPaused) {\n var imev = {\n type: \"track\",\n target: io,\n event: ev,\n point: pointer.point,\n pointer: pointer,\n touch: pointer.touch\n };\n io.events.dispatchImmediately(\"track\", imev);\n }\n };\n /**\r\n * Handles swipe action.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\n Interaction.prototype.handleSwipe = function (io, pointer, ev) {\n // We pass in InteractionEvent with shift in mouse coordinates\n // between when the drag started and ended\n if (io.events.isEnabled(\"swipe\") && !system.isPaused) {\n var imev = {\n type: \"swipe\",\n target: io,\n event: ev,\n touch: pointer.touch\n };\n io.events.dispatchImmediately(\"swipe\", imev);\n }\n if (pointer.startPoint.x < pointer.point.x) {\n if (io.events.isEnabled(\"swiperight\") && !system.isPaused) {\n var imev = {\n type: \"swiperight\",\n target: io,\n event: ev,\n touch: pointer.touch\n };\n io.events.dispatchImmediately(\"swiperight\", imev);\n }\n } else {\n if (io.events.isEnabled(\"swipeleft\") && !system.isPaused) {\n var imev = {\n type: \"swipeleft\",\n target: io,\n event: ev,\n touch: pointer.touch\n };\n io.events.dispatchImmediately(\"swipeleft\", imev);\n }\n }\n };\n /**\r\n * Handles event triggering for wheel rotation.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @param deltaX Horizontal shift\r\n * @param deltaY Vertical shift\r\n * @param ev Original event\r\n */\n Interaction.prototype.handleWheel = function (io, pointer, deltaX, deltaY, ev) {\n var shift = {\n x: deltaX,\n y: deltaY\n };\n // Trigger generic WHEEL event\n if (io.events.isEnabled(\"wheel\") && !system.isPaused) {\n io.events.dispatchImmediately(\"wheel\", {\n type: \"wheel\",\n target: io,\n event: ev,\n point: pointer.point,\n shift: shift\n });\n }\n // Trigger direction-specific events\n // Horizontal\n if (deltaX < 0) {\n if (io.events.isEnabled(\"wheelleft\") && !system.isPaused) {\n io.events.dispatchImmediately(\"wheelleft\", {\n type: \"wheelleft\",\n target: io,\n event: ev,\n point: pointer.point,\n shift: shift\n });\n }\n } else if (deltaX > 0) {\n if (io.events.isEnabled(\"swiperight\") && !system.isPaused) {\n io.events.dispatchImmediately(\"wheelright\", {\n type: \"wheelright\",\n target: io,\n event: ev,\n point: pointer.point,\n shift: shift\n });\n }\n // Vertical\n } else if (deltaY < 0) {\n if (io.events.isEnabled(\"wheelup\") && !system.isPaused) {\n io.events.dispatchImmediately(\"wheelup\", {\n type: \"wheelup\",\n target: io,\n event: ev,\n point: pointer.point,\n shift: shift\n });\n }\n } else if (deltaY > 0) {\n if (io.events.isEnabled(\"wheeldown\") && !system.isPaused) {\n io.events.dispatchImmediately(\"wheeldown\", {\n type: \"wheeldown\",\n target: io,\n event: ev,\n point: pointer.point,\n shift: shift\n });\n }\n }\n };\n /**\r\n * Initiates inertia checking sub-routines for different movement types:\r\n * drag, resize.\r\n *\r\n * @ignore Exclude from docs\r\n * @param sprite\r\n * @param pointer\r\n */\n Interaction.prototype.handleInertia = function (io, pointer) {\n if (io.draggable && io.downPointers.length === 0) {\n this.handleMoveInertia(io, pointer);\n }\n if (io.resizable && io.downPointers.length > 1) {\n this.handleResizeInertia(io, pointer);\n }\n };\n /**\r\n * Continues moving the element to simulate the effect of inertia. Happens\r\n * when `inert` and `draggable` object is dragged and then released.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n */\n Interaction.prototype.handleMoveInertia = function (io, pointer) {\n var interaction = io;\n var type = \"move\";\n var point = {\n \"x\": pointer.point.x,\n \"y\": pointer.point.y\n };\n var startPoint = {\n \"x\": pointer.startPoint.x,\n \"y\": pointer.startPoint.y\n };\n // Init inertia object\n var inertia = new Inertia(interaction, type, point, startPoint);\n // Get inertia data\n var ref = this.getTrailPoint(pointer, $time.getTime() - this.getInertiaOption(io, \"move\", \"time\"));\n if (typeof ref === \"undefined\") {\n this.processDragStop(io, pointer, pointer.lastUpEvent);\n return;\n }\n // Init animation options\n var factor = this.getInertiaOption(io, \"move\", \"factor\");\n var animationOptions = [{\n \"to\": pointer.point.x + (pointer.point.x - ref.point.x) * factor,\n \"property\": \"x\"\n }, {\n \"to\": pointer.point.y + (pointer.point.y - ref.point.y) * factor,\n \"property\": \"y\"\n }];\n // Start animation\n var animation = new Animation(inertia, animationOptions, this.getInertiaOption(io, \"move\", \"duration\"), this.getInertiaOption(io, \"move\", \"easing\")).start();\n this._disposers.push(animation.events.on(\"animationended\", function (ev) {\n inertia.done();\n }));\n // Add inertia object\n io.inertias.setKey(\"move\", inertia);\n };\n /**\r\n * Continues resizing of a `resizable` element after it is resized and\r\n * released.\r\n *\r\n * **NOTE:** this is is just a placeholder function. No actual fucntionality\r\n * is implemented, yet.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n */\n Interaction.prototype.handleResizeInertia = function (io, pointer) {\n // Some day, folks. Some day...\n };\n /**\r\n * Recalculates element's position and size based on position of\r\n * all its related pointers.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param ev Original event\r\n */\n Interaction.prototype.handleTransform = function (io, ev) {\n // Get primary pointer and its respective points\n var pointer1 = io.downPointers.getIndex(0);\n var point1 = null;\n var startPoint1 = null;\n if (pointer1) {\n point1 = pointer1.point;\n startPoint1 = pointer1.startPoint;\n }\n // Init secondary pointer\n var pointer2;\n var point2;\n var startPoint2;\n // Use center of the sprite to simulate \"second\" point of touch\n point2 = {\n \"x\": io.originalPosition.x,\n \"y\": io.originalPosition.y\n };\n startPoint2 = point2;\n // Determine if it's a sinngle pointer or multi\n var singlePoint = true;\n for (var i = 1; i < io.downPointers.length; i++) {\n // Get pointer\n var nextPointer = io.downPointers.getIndex(i);\n // Doublecheck if it's not the same pointer by comparing original position\n if (startPoint1.x != nextPointer.startPoint.x && startPoint1.y != nextPointer.startPoint.y) {\n // Several pointers down\n singlePoint = false;\n // Get second pointer\n pointer2 = nextPointer;\n point2 = pointer2.point;\n startPoint2 = pointer2.startPoint;\n // Stop looking\n break;\n }\n }\n // Primary touch point moved?\n var pointer1Moved = pointer1 && this.moved(pointer1, 0);\n // Report DRAG_START if necessary\n if (io.draggable && pointer1 && pointer1.dragStartEvents && pointer1.dragStartEvents.length && pointer1Moved) {\n if (io.events.isEnabled(\"dragstart\") && !system.isPaused) {\n io.events.dispatchImmediately(\"dragstart\", pointer1.dragStartEvents.shift());\n }\n //delete pointer1.dragStartEvents;\n }\n // Determine what we do in order of superiority\n if (singlePoint && io.draggable) {\n // We have only one pointer and the Sprite is draggable\n // There's nothing else to be done - just move it\n this.handleTransformMove(io, point1, startPoint1, ev, pointer1Moved, pointer1.touch);\n } else {\n // Check if second touch point moved\n var pointer2Moved = pointer2 && this.moved(pointer2, 0);\n if (io.draggable && io.resizable) {\n //this.handleTransformAll(io, point1, startPoint1, point2, startPoint2, ev, pointer1Moved && pointer2Moved);\n this.handleTransformMove(io, point1, startPoint1, ev, pointer1Moved && pointer2Moved, pointer1.touch);\n this.handleTransformResize(io, point1, startPoint1, point2, startPoint2, ev, pointer1Moved && pointer2Moved, pointer1.touch);\n } else {\n if (io.draggable) {\n this.handleTransformMove(io, point1, startPoint1, ev, pointer1Moved, pointer1.touch);\n }\n if (io.resizable && (!singlePoint || ev.ctrlKey)) {\n this.handleTransformResize(io, point1, startPoint1, point2, startPoint2, ev, pointer1Moved && pointer2Moved, pointer1.touch);\n }\n }\n }\n };\n /**\r\n * Handles movement of the dragged element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param point Current point of the pointer\r\n * @param startPoint Starting point of the pointer\r\n * @param ev Original event\r\n * @param pointerMoved Did pointer move?\r\n */\n Interaction.prototype.handleTransformMove = function (io, point, startPoint, ev, pointerMoved, touch) {\n if (pointerMoved) {\n if (io.events.isEnabled(\"drag\") && !system.isPaused && (!io.isTouchProtected || !touch)) {\n var imev = {\n type: \"drag\",\n target: io,\n event: ev,\n shift: {\n \"x\": point.x - startPoint.x,\n \"y\": point.y - startPoint.y\n },\n startPoint: startPoint,\n point: point,\n touch: touch\n };\n io.events.dispatchImmediately(\"drag\", imev);\n }\n }\n };\n /**\r\n * Handles resizing of the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param point1 Current position of reference point #1\r\n * @param startPoint1 Original position of reference point #1\r\n * @param point2 Current position of reference point #2\r\n * @param startPoint2 Original position of reference point #2\r\n * @param ev Original event\r\n * @param pointerMoved Did pointer move?\r\n */\n Interaction.prototype.handleTransformResize = function (io, point1, startPoint1, point2, startPoint2, ev, pointerMoved, touch) {\n if (io.events.isEnabled(\"resize\") && !system.isPaused && (!io.isTouchProtected || !touch)) {\n var imev = {\n type: \"resize\",\n target: io,\n event: ev,\n scale: $math.getScale(point1, startPoint1, point2, startPoint2),\n startPoint1: startPoint1,\n point1: point1,\n startPoint2: startPoint2,\n point2: point2,\n touch: touch\n };\n io.events.dispatchImmediately(\"resize\", imev);\n }\n };\n /**\r\n * Handles all the preparations of the element when it starts to be dragged.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\n Interaction.prototype.processDragStart = function (io, pointer, ev) {\n // Add to draggedObjects\n this.transformedObjects.moveValue(io);\n // Report \"dragstart\"\n var imev = {\n type: \"dragstart\",\n target: io,\n event: ev,\n touch: pointer ? pointer.touch : false\n };\n // Log object that we are starting to drag, so we can check against and\n // avoid hovers on other objects that might be in the path of movement.\n if (pointer) {\n pointer.dragTarget = io;\n //pointer.startPoint = pointer.point;\n }\n /**\r\n * If pointer is set we will not fire the event until the pointer has\r\n * actually moved. If it's not set we don't have to wait for anything, so we\r\n * just fire off the event right away.\r\n */\n if (pointer && pointer.dragStartEvents) {\n pointer.dragStartEvents.push(imev);\n } else {\n if (!system.isPaused) {\n io.dispatchImmediately(\"dragstart\", imev);\n }\n }\n };\n /**\r\n * Finishes up element drag operation.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\n Interaction.prototype.processDragStop = function (io, pointer, ev) {\n // Pointer set?\n if (!pointer) {\n pointer = this.getDragPointer(io);\n }\n // Unset drag object\n if (pointer) {\n pointer.dragTarget = undefined;\n }\n // Removed from transformedObjects\n this.transformedObjects.removeValue(io);\n // Unlock document\n //this.unlockDocument();\n // Report dragstop\n if (!pointer || this.moved(pointer, 0)) {\n if (io.events.isEnabled(\"dragstop\") && !system.isPaused) {\n var imev = {\n type: \"dragstop\",\n target: io,\n touch: pointer ? pointer.touch : false\n };\n io.events.dispatchImmediately(\"dragstop\", imev);\n }\n }\n };\n /**\r\n * Handles all the preparations of the element when it starts to be resized.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\n Interaction.prototype.processResizeStart = function (io, pointer, ev) {\n // Add to draggedObjects\n this.transformedObjects.moveValue(io);\n };\n /**\r\n * Finishes up element drag operation.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @param ev Original event\r\n */\n Interaction.prototype.processResizeStop = function (io, pointer, ev) {\n // Removed from transformedObjects\n this.transformedObjects.removeValue(io);\n };\n /**\r\n * ==========================================================================\r\n * Controls for InteractionObjects initiating directly\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Manually triggers drag start on the element. Could be useful in cases\r\n * where tracking or dragging one element can also influence dragging another\r\n * element.\r\n *\r\n * Passing in `pointer` reference is advisable. If not passed in it will try\r\n * to determine which pointer to attach to. However, it's better to specify\r\n * it explicitly.\r\n *\r\n * @param io Element\r\n * @param pointer Pointer\r\n */\n Interaction.prototype.dragStart = function (io, pointer) {\n if (!pointer) {\n pointer = this.getDragPointer(io);\n }\n if (pointer) {\n this.handleDown(io, pointer, pointer.lastDownEvent);\n }\n };\n /**\r\n * Manually ends drag on the element.\r\n *\r\n * @param io Element\r\n * @param pointer Pointer\r\n */\n Interaction.prototype.dragStop = function (io, pointer) {\n if (!pointer) {\n pointer = this.getDragPointer(io);\n }\n if (pointer) {\n this.handleGlobalUp(pointer, pointer.lastUpEvent);\n }\n };\n /**\r\n * This method uses a fuzzy logic to find the pointer to be used for dragging.\r\n * Beware that this is not a rock-solid solution. If there are a few objects\r\n * being dragged at the same time, you may get unexepected results.\r\n *\r\n * @param io InteractionObject to get pointers from\r\n * @return Pointer currently being used for dragging\r\n */\n Interaction.prototype.getDragPointer = function (io) {\n if (io) {\n // InteractionObject is supplied\n // Use it's first down pointer\n return io.downPointers.getIndex(0);\n } else if (this.transformedObjects.length) {\n // Use first dragged object\n return this.getDragPointer(this.transformedObjects.getIndex(0));\n } else {\n return undefined;\n }\n };\n /**\r\n * ==========================================================================\r\n * Utils\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Returns pointer id for the given event object.\r\n *\r\n * @param ev Event\r\n * @return Pointer ID\r\n */\n Interaction.prototype.getPointerId = function (ev) {\n var id = \"\";\n if ($type.hasValue(ev.identifier)) {\n id = \"\" + ev.identifier;\n } else if ($type.hasValue(ev.pointerId)) {\n id = \"\" + ev.pointerId;\n } else {\n id = \"m\";\n }\n return id.replace(\"-\", \"\");\n };\n /**\r\n * Returns a cursor position of the event.\r\n *\r\n * @param ev Original event\r\n * @return Event point\r\n */\n Interaction.prototype.getPointerPoint = function (ev) {\n return {\n \"x\": ev.clientX,\n \"y\": ev.clientY\n };\n };\n /**\r\n * Returns [[Pointer]] object that is associated with the Event.\r\n *\r\n * If no such [[Pointer]] object exists, it is created.\r\n *\r\n * @param ev Event\r\n * @return Pointer\r\n */\n Interaction.prototype.getPointer = function (ev) {\n // Get pointer id\n var id = this.getPointerId(ev);\n // Get current coordinates\n var point = this.getPointerPoint(ev);\n // Look for the pointer in the Dictionary if it maybe already exists\n var pointer;\n if (this.pointers.hasKey(id)) {\n // We already have such pointer\n pointer = this.pointers.getKey(id);\n // We need this, because Edge reuses pointer ids across touch and mouse\n pointer.touch = this.isPointerTouch(ev);\n // Reset pointer\n //pointer.point = point;\n } else {\n // Init pointer\n pointer = {\n \"id\": id,\n //\"touch\": !(ev instanceof MouseEvent) || ((<any>ev).pointerType && (<any>ev).pointerType != \"pointer\"),\n //\"touch\": !(ev instanceof MouseEvent) || ((<any>ev).pointerType && (<any>ev).pointerType != \"mouse\"),\n \"touch\": this.isPointerTouch(ev),\n \"startPoint\": point,\n \"startTime\": $time.getTime(),\n \"point\": point,\n \"track\": [],\n \"swipeCanceled\": false,\n \"dragStartEvents\": []\n };\n // Add first breadcrumb\n this.addBreadCrumb(pointer, point);\n // Add for re-use later\n this.pointers.setKey(id, pointer);\n }\n // Log last event\n pointer.lastEvent = ev;\n return pointer;\n };\n /**\r\n * Determines if pointer event originated from a touch pointer or mouse.\r\n *\r\n * @param ev Original event\r\n * @return Touch pointer?\r\n */\n Interaction.prototype.isPointerTouch = function (ev) {\n if (typeof Touch !== \"undefined\" && ev instanceof Touch) {\n return true;\n } else if (typeof PointerEvent !== \"undefined\" && ev instanceof PointerEvent && $type.hasValue(ev.pointerType)) {\n switch (ev.pointerType) {\n case \"touch\":\n case \"pen\":\n case 2:\n return true;\n case \"mouse\":\n case 4:\n return false;\n default:\n return !(ev instanceof MouseEvent);\n }\n } else if ($type.hasValue(ev.type)) {\n if (ev.type.match(/^mouse/)) {\n return false;\n }\n }\n return true;\n };\n /**\r\n * Resets the poiner to original state, i.e. cleans movement information,\r\n * starting point, etc.\r\n *\r\n * @param pointer Pointer\r\n */\n Interaction.prototype.resetPointer = function (pointer, ev) {\n // Get current coordinates\n var point = this.getPointerPoint(ev);\n ;\n pointer.startTime = $time.getTime();\n pointer.startPoint = {\n x: point.x,\n y: point.y\n };\n pointer.point = {\n x: point.x,\n y: point.y\n };\n pointer.track = [];\n pointer.swipeCanceled = false;\n //clearTimeout(pointer.swipeTimeout);\n //clearTimeout(pointer.holdTimeout);\n };\n /**\r\n * Adds a \"breadcrumb\" point to the [[Pointer]] to log its movement path.\r\n *\r\n * @param pointer Pointer\r\n * @param point Point coordinates\r\n */\n Interaction.prototype.addBreadCrumb = function (pointer, point) {\n pointer.track.push({\n \"timestamp\": $time.getTime(),\n \"point\": point\n });\n };\n /**\r\n * Prepares the document for various touch-related operations.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Interaction.prototype.lockDocument = function () {\n this.prepElement(this.body);\n };\n /**\r\n * Restores document functionality.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Interaction.prototype.unlockDocument = function () {\n if (this.transformedObjects.length == 0) {\n this.restoreAllStyles(this.body);\n }\n };\n /**\r\n * Lock element (disable all touch)\r\n *\r\n * @ignore Exclude from docs\r\n */\n Interaction.prototype.lockElement = function (io) {\n this.prepElement(io);\n };\n /**\r\n * Restores element's functionality.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Interaction.prototype.unlockElement = function (io) {\n this.restoreAllStyles(io);\n };\n /**\r\n * Locks document's wheel scroll.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Interaction.prototype.lockWheel = function () {\n window.addEventListener(this._pointerEvents.wheel, this.wheelLockEvent, this._passiveSupported ? {\n passive: false\n } : false);\n };\n /**\r\n * Unlocks document's wheel scroll.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Interaction.prototype.unlockWheel = function () {\n window.removeEventListener(this._pointerEvents.wheel, this.wheelLockEvent);\n };\n /**\r\n * Checks if top element at pointer's position belongs to the SVG.\r\n *\r\n * @ignore Exlude from docs\r\n * @param pointer Pointer\r\n * @param svg The <svg> element\r\n * @param id A unique identifier of the object that is checking for locality\r\n * @return Belongs to SVG\r\n */\n Interaction.prototype.isLocalElement = function (pointer, svg, id) {\n var cached = this.getCache(\"local_pointer_\" + pointer.id);\n if ($type.hasValue(cached)) {\n return cached;\n }\n var target = document.elementFromPoint(pointer.point.x, pointer.point.y);\n var local = target && $dom.contains(svg, target);\n this.setCache(\"local_pointer_\" + pointer.id + \"_\" + id, local, 100);\n return local;\n };\n /**\r\n * A function that cancels mouse wheel scroll.\r\n *\r\n * @ignore Exclude from docs\r\n * @param ev Event object\r\n * @return Returns `false` to cancel\r\n */\n Interaction.prototype.wheelLockEvent = function (ev) {\n ev.preventDefault();\n return false;\n };\n /**\r\n * Applies a set of styles to an element. Stores the original styles so they\r\n * can be restored later.\r\n *\r\n * @ignore\r\n * @param io Element\r\n */\n Interaction.prototype.prepElement = function (io) {\n var el = io.element;\n if (el) {\n // Define possible props\n var props = [\"touchAction\", \"webkitTouchAction\", \"MozTouchAction\", \"MSTouchAction\", \"msTouchAction\", \"oTouchAction\", \"userSelect\", \"webkitUserSelect\", \"MozUserSelect\", \"MSUserSelect\", \"msUserSelect\", \"oUserSelect\", \"touchSelect\", \"webkitTouchSelect\", \"MozTouchSelect\", \"MSTouchSelect\", \"msTouchSelect\", \"oTouchSelect\", \"touchCallout\", \"webkitTouchCallout\", \"MozTouchCallout\", \"MSTouchCallout\", \"msTouchCallout\", \"oTouchCallout\", \"contentZooming\", \"webkitContentZooming\", \"MozContentZooming\", \"MSContentZooming\", \"msContentZooming\", \"oContentZooming\", \"userDrag\", \"webkitUserDrag\", \"MozUserDrag\", \"MSUserDrag\", \"msUserDrag\", \"oUserDrag\"];\n for (var i = 0; i < props.length; i++) {\n if (props[i] in el.style) {\n this.setTemporaryStyle(io, props[i], \"none\");\n }\n }\n // Remove iOS-specific selection;\n this.setTemporaryStyle(io, \"tapHighlightColor\", \"rgba(0, 0, 0, 0)\");\n //this.setTemporaryStyle(io, \"webkitOverflowScrolling\", \"none\");\n }\n };\n /**\r\n * Restores replaced styles\r\n *\r\n * @ignore\r\n * @param io Element\r\n */\n Interaction.prototype.unprepElement = function (io) {\n var el = io.element;\n if (el) {\n // Define possible props\n var props = [\"touchAction\", \"webkitTouchAction\", \"MozTouchAction\", \"MSTouchAction\", \"msTouchAction\", \"oTouchAction\", \"userSelect\", \"webkitUserSelect\", \"MozUserSelect\", \"MSUserSelect\", \"msUserSelect\", \"oUserSelect\", \"touchSelect\", \"webkitTouchSelect\", \"MozTouchSelect\", \"MSTouchSelect\", \"msTouchSelect\", \"oTouchSelect\", \"touchCallout\", \"webkitTouchCallout\", \"MozTouchCallout\", \"MSTouchCallout\", \"msTouchCallout\", \"oTouchCallout\", \"contentZooming\", \"webkitContentZooming\", \"MozContentZooming\", \"MSContentZooming\", \"msContentZooming\", \"oContentZooming\", \"userDrag\", \"webkitUserDrag\", \"MozUserDrag\", \"MSUserDrag\", \"msUserDrag\", \"oUserDrag\"];\n for (var i = 0; i < props.length; i++) {\n if (props[i] in el.style) {\n this.restoreStyle(io, props[i]);\n }\n }\n // Remove iOS-specific selection;\n this.restoreStyle(io, \"tapHighlightColor\");\n //this.restoreStyle(io, \"webkitOverflowScrolling\");\n }\n };\n /**\r\n * Returns an option associated with hit events.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param option Option key\r\n * @return Option value\r\n */\n Interaction.prototype.getHitOption = function (io, option) {\n var res = io.hitOptions[option];\n if (typeof res === \"undefined\") {\n res = this.hitOptions[option];\n }\n return res;\n };\n /**\r\n * Returns an option associated with hover events.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param option Option key\r\n * @return Option value\r\n */\n Interaction.prototype.getHoverOption = function (io, option) {\n var res = io.hoverOptions[option];\n if (typeof res === \"undefined\") {\n res = this.hoverOptions[option];\n }\n return res;\n };\n /**\r\n * Returns an option associated with swipe events.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param option Option key\r\n * @return Option value\r\n */\n Interaction.prototype.getSwipeOption = function (io, option) {\n var res = io.swipeOptions[option];\n if (typeof res === \"undefined\") {\n res = this.swipeOptions[option];\n }\n return res;\n };\n /**\r\n * Returns an option for keyboard.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param option Option key\r\n * @return Option value\r\n */\n Interaction.prototype.getKeyboardOption = function (io, option) {\n var res = io.keyboardOptions[option];\n if (typeof res === \"undefined\") {\n res = this.keyboardOptions[option];\n }\n return res;\n };\n /**\r\n * Returns an option associated with inertia.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param type Inertia type\r\n * @param option Option key\r\n * @return Option value\r\n */\n Interaction.prototype.getInertiaOption = function (io, type, option) {\n var options = io.inertiaOptions.getKey(type);\n var res;\n if (options && $type.hasValue(options[option])) {\n res = options[option];\n } else {\n res = this.inertiaOptions.getKey(type)[option];\n }\n return res;\n };\n /**\r\n * Stops currently going on inertia. Useful if inertia is currently being\r\n * animated and the object is being interacted with.\r\n *\r\n * @param io Element\r\n */\n Interaction.prototype.stopInertia = function (io) {\n var x;\n var inertias = [\"move\", \"resize\"];\n for (var i = 0; i < inertias.length; i++) {\n x = inertias[i];\n if (io.inertias.hasKey(x)) {\n var inertia = io.inertias.getKey(x);\n if (inertia) {\n inertia.dispose();\n //io.inertiaAnimations.removeKey(x);\n //this.processDragStop(io);\n continue;\n }\n }\n }\n };\n /**\r\n * Check if swiping is currently being performed on an object.\r\n *\r\n * @param io Element\r\n * @param pointer Pointer to check\r\n * @return `true` if swiping\r\n */\n Interaction.prototype.swiping = function (io, pointer) {\n var now = $time.getTime();\n if (pointer.swipeCanceled || !io.swipeable) {\n return false;\n } else if (Math.abs(pointer.startPoint.y - pointer.point.y) < this.getSwipeOption(io, \"verticalThreshold\") && pointer.startTime > now - this.getSwipeOption(io, \"time\")) {\n return true;\n } else {\n return false;\n }\n };\n /**\r\n * Returns `true` if a successfull swipe action was performed on an element.\r\n *\r\n * @param io Element\r\n * @param pointer Pointer\r\n * @return Swiped?\r\n */\n Interaction.prototype.swiped = function (io, pointer) {\n var now = $time.getTime();\n if (pointer.swipeCanceled) {\n return false;\n } else if (Math.abs(pointer.startPoint.x - pointer.point.x) > this.getSwipeOption(io, \"horizontalThreshold\") && Math.abs(pointer.startPoint.y - pointer.point.y) < this.getSwipeOption(io, \"verticalThreshold\") && pointer.startTime > now - this.getSwipeOption(io, \"time\")) {\n return true;\n } else {\n return false;\n }\n };\n /**\r\n * Applies style to mouse cursor based on its stage in relation to\r\n * [[InteractionObject]].\r\n *\r\n * @ignore Exclude from docs\r\n * @param Element\r\n */\n Interaction.prototype.applyCursorOverStyle = function (io) {\n // Get sprite's cursor ooptions\n var options = io.cursorOptions;\n if (!$type.hasValue(options.overStyle)) {\n return;\n }\n // Apply cursor down styles\n for (var i = 0; i < options.overStyle.length; i++) {\n $dom.setStyle(io.element, options.overStyle[i].property, options.overStyle[i].value);\n }\n };\n /**\r\n * Applies style to mouse cursor based on its stage in relation to\r\n * [[InteractionObject]].\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n */\n Interaction.prototype.applyCursorDownStyle = function (io, pointer) {\n // Not applicable for touch pointers since they don't display a cursor\n if (pointer.touch) {\n return;\n }\n var downStyle = io.cursorOptions.downStyle;\n // Is down?\n if (io.downPointers.contains(pointer) && $type.hasValue(downStyle)) {\n // Apply cursor down styles\n for (var i = 0; i < downStyle.length; i++) {\n this.setTemporaryStyle(this.body, downStyle[i].property, downStyle[i].value);\n this.setTemporaryStyle(io, downStyle[i].property, downStyle[i].value);\n }\n }\n };\n /**\r\n * Restores original cursor style for the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param io Element\r\n * @param pointer Pointer\r\n */\n Interaction.prototype.restoreCursorDownStyle = function (io, pointer) {\n // Not applicable for touch pointers since they don't display a cursor\n if (pointer.touch) {\n return;\n }\n var downStyle = io.cursorOptions.downStyle;\n // Is down?\n if (io.downPointers.contains(pointer) && $type.hasValue(downStyle)) {\n // Apply cursor down styles\n for (var i = 0; i < downStyle.length; i++) {\n this.restoreStyle(this.body, downStyle[i].property);\n this.restoreStyle(io, downStyle[i].property);\n }\n }\n };\n /**\r\n * Sets style on the body of the document.\r\n *\r\n * @ignore Exclude from docs\r\n * @param style Style definitions\r\n */\n Interaction.prototype.setGlobalStyle = function (style) {\n var body = getInteraction().body;\n var styles = $type.isArray(style) ? style : [style];\n for (var i = 0; i < styles.length; i++) {\n this.setTemporaryStyle(body, styles[i].property, styles[i].value);\n }\n };\n /**\r\n * Restores style on the body of the document.\r\n *\r\n * @ignore Exclude from docs\r\n * @param style Style definitions\r\n */\n Interaction.prototype.restoreGlobalStyle = function (style) {\n var body = getInteraction().body;\n var styles = $type.isArray(style) ? style : [style];\n for (var i = 0; i < styles.length; i++) {\n this.restoreStyle(body, styles[i].property);\n }\n };\n /**\r\n * Checks if element is a non-cahrt element.\r\n *\r\n * @param io InteractionObject\r\n * @return Global element?\r\n */\n Interaction.prototype.isGlobalElement = function (io) {\n return document.body === io.element;\n };\n /**\r\n * Checks if pointer has moved since it was created.\r\n *\r\n * @param pointer Pointer\r\n * @param tolerance Tolerance in pixels\r\n * @param minTime Minimum time required for the pointer to be down to be considered moved\r\n * @return `true` if the pointer has moved\r\n */\n Interaction.prototype.moved = function (pointer, tolerance, minTime) {\n /*// If there was more time, we don't care if cursor actually moved\r\n let duration = $time.getTime() - pointer.startTime;\r\n if ($type.hasValue(minTime) && (minTime > duration)) {\r\n return false;\r\n }*/\n if (minTime === void 0) {\n minTime = 300;\n }\n // That was quick measure shift\n var shift = this.getShift(pointer);\n return Math.abs(shift.x) > tolerance || Math.abs(shift.y) > tolerance;\n };\n /**\r\n * Returns if pointer is \"old\", meaning it has been pressing for more than\r\n * X milliseconds.\r\n *\r\n * @ignore\r\n * @param pointer Pointer\r\n * @param minTime Minimum time to consider pointer old\r\n * @return {boolean}\r\n */\n Interaction.prototype.old = function (pointer, minTime) {\n if (minTime === void 0) {\n minTime = 300;\n }\n return $time.getTime() - pointer.startTime > minTime;\n };\n /**\r\n * Returns total a shift in pointers coordinates between its original\r\n * position and now.\r\n *\r\n * @param pointer Pointer\r\n * @return Shift in coordinates (x/y)\r\n */\n Interaction.prototype.getShift = function (pointer) {\n return {\n \"x\": pointer.startPoint.x - pointer.point.x,\n \"y\": pointer.startPoint.y - pointer.point.y\n };\n };\n /**\r\n * Returns a point from [[Pointer]]'s move history at a certain timetamp.\r\n *\r\n * @param pointer Pointer\r\n * @param timestamp Timestamp\r\n * @return Point\r\n */\n Interaction.prototype.getTrailPoint = function (pointer, timestamp) {\n var res;\n for (var i = 0; i < pointer.track.length; i++) {\n if (pointer.track[i].timestamp >= timestamp) {\n res = pointer.track[i];\n break;\n }\n }\n return res;\n };\n /**\r\n * Checks if same pointer already exists in the list.\r\n *\r\n * @param list List to check agains\r\n * @param pointer Pointer\r\n * @return Exists?\r\n */\n Interaction.prototype.pointerExists = function (list, pointer) {\n var exists = false;\n list.each(function (item) {\n if (item == pointer) {\n return;\n }\n exists = item.point.x == pointer.point.x && item.point.y == pointer.point.y;\n });\n return exists;\n };\n /**\r\n * Returns an [[InteractionObject]] representation of a DOM element.\r\n *\r\n * You can use this on any HTML or SVG element, to add interactive features\r\n * to it.\r\n *\r\n * @param element Element\r\n * @return InteractionObject\r\n */\n Interaction.prototype.getInteraction = function (element) {\n return new InteractionObject(element);\n };\n /**\r\n * Sets a style property on an element. Stores original value to be restored\r\n * later with [[restoreStyle]].\r\n *\r\n * @see {@link restoreStyle}\r\n * @param io Element\r\n * @param property Property\r\n * @param value Value\r\n */\n Interaction.prototype.setTemporaryStyle = function (io, property, value) {\n // Get element\n //let el = io.element.tagName == \"g\" ? <SVGSVGElement>io.element.parentNode : io.element;\n var el = io.element;\n // Save original property if it is set and hasn't been saved before already\n if ($type.hasValue(el.style[property]) && !io.replacedStyles.hasKey(property)) {\n io.replacedStyles.setKey(property, el.style[property]);\n }\n // Replace with the new one\n $dom.setStyle(el, property, value);\n };\n /**\r\n * Restores specific style on an element.\r\n *\r\n * @param io Element\r\n * @param property Style property\r\n */\n Interaction.prototype.restoreStyle = function (io, property) {\n // Reset style\n if (io.replacedStyles.hasKey(property)) {\n io.element.style[property] = io.replacedStyles.getKey(property);\n io.replacedStyles.removeKey(property);\n } else {\n delete io.element.style[property];\n }\n };\n /**\r\n * Restore temporarily reset styles on an element.\r\n *\r\n * @param io Element\r\n */\n Interaction.prototype.restoreAllStyles = function (io) {\n $iter.each(io.replacedStyles.iterator(), function (a) {\n var key = a[0];\n var value = a[1];\n io.element.style[key] = value;\n io.replacedStyles.removeKey(key);\n });\n };\n /**\r\n * Disposes this object and cleans up after itself.\r\n */\n Interaction.prototype.dispose = function () {\n if (!this.isDisposed()) {\n _super.prototype.dispose.call(this);\n this.restoreAllStyles(this.body);\n this.unlockWheel();\n }\n };\n // @ts-ignore Used for debugging\n Interaction.prototype.log = function (text, ev, io) {\n var show = true;\n if (show) {\n // Touchlist?\n if (ev.changedTouches) {\n for (var i = 0; i < ev.changedTouches.length; i++) {\n this.logTouch(text, ev.type, ev.changedTouches[i]);\n }\n return;\n }\n // Get type\n var type = \"\";\n if (ev.pointerType) {\n switch (ev.pointerType) {\n case 2:\n type = \"touch\";\n break;\n case 4:\n type = \"mouse\";\n break;\n default:\n type = ev.pointerType;\n break;\n }\n } else if (typeof TouchEvent != \"undefined\" && ev instanceof TouchEvent) {\n type = \"touch\";\n } else if (ev.type.match(/^mouse/)) {\n type = \"mouse\";\n } else {\n type = \"???\";\n }\n // Get ID\n var id = \"\";\n if ($type.hasValue(ev.identifier)) {\n id = ev.identifier;\n } else if ($type.hasValue(ev.pointerId)) {\n id = ev.pointerId;\n } else {\n id = \"???\";\n }\n if (io) {\n console.log(text + \" (\" + io.uid + \") \" + ev.type + \" \" + type + \" \" + id);\n } else {\n console.log(text + \" \" + ev.type + \" \" + type + \" \" + id);\n }\n }\n };\n Interaction.prototype.logTouch = function (text, type, ev) {\n console.log(text + \" \" + type + \" \" + \"touch\" + \" \" + ev.identifier);\n };\n Object.defineProperty(Interaction, \"passiveSupported\", {\n /**\r\n * Indicates if passive mode options is supported by this browser.\r\n */\n get: function get() {\n var _this = this;\n if (this._passiveSupported == null) {\n // Check for passive mode support\n try {\n var options = Object.defineProperty({}, \"passive\", {\n get: function get() {\n _this._passiveSupported = true;\n }\n });\n window.addEventListener(\"test\", options, options);\n window.removeEventListener(\"test\", options, options);\n } catch (err) {\n this._passiveSupported = false;\n }\n }\n return this._passiveSupported;\n },\n enumerable: true,\n configurable: true\n });\n return Interaction;\n}(BaseObjectEvents);\nexport { Interaction };\nvar interaction = null;\n/**\r\n * Returns a single unified global instance of [[Interaction]].\r\n *\r\n * All code should use this function, rather than create their own instances\r\n * of [[Interaction]].\r\n */\nexport function getInteraction() {\n if (interaction == null) {\n interaction = new Interaction();\n }\n return interaction;\n}","import { Box, TextField } from \"@mui/material\";\n\nconst NotesSection = ({ form, onSetForm }) => {\n const { notes } = form || {};\n return (\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n gap: 1,\n mx: '-16px',\n p: \"8px 8px 0 8px\",\n background: \"#EEEEEE\",\n\n \"& .MuiTypography-root\": {\n minWidth: \"85px\",\n },\n }}\n >\n <Box\n flex=\"1\"\n sx={{\n \"& .MuiOutlinedInput-input\": {\n padding: \"6px 10px\",\n },\n }}\n >\n <TextField\n placeholder=\"Notes\"\n multiline\n fullWidth\n maxRows={2}\n value={notes}\n onChange={(e) =>\n onSetForm({\n notes: e.target.value,\n })\n }\n InputProps={{\n sx: {\n p: 0,\n fontSize: \"12px\",\n background: \"none\",\n },\n }}\n />\n </Box>\n </Box>\n );\n};\n\nexport default NotesSection;\n","import { api } from \"./apiConfig\";\n\ninterface ImageURLs {\n url: string;\n thumb?: { url: string };\n header?: { url: string };\n small?: { url: string };\n large?: { url: string };\n}\n\ninterface Vendor {\n logo: ImageURLs;\n name: string;\n id: number;\n telephone: string;\n logoOnDark: ImageURLs;\n}\n\ninterface CalendarEvent {\n status: string;\n date: string;\n}\n\ninterface ServiceSpecification {\n serviceCode: string;\n quantity: number;\n visitActionId: string;\n}\n\ninterface BillingHistoryUnit {\n code: string;\n quantity: number;\n lastBilledDate: string;\n vendorServiceCodes: string[];\n vendorServiceDescriptors: string[];\n}\n\ninterface BillingHistoryDay {\n date: string;\n items: Array<{\n serviceCode: string;\n quantity: number;\n vendorServiceCode: string;\n vendorInvoiceUuids: string[];\n }>;\n}\n\ninterface Action {\n value: string;\n label: string;\n path: string;\n group?: string;\n}\n\ninterface Service {\n name: string;\n uuid: string;\n title: string;\n id: number;\n locationId: number;\n vendorId: number;\n vendorLocationCodes: string[];\n vendorServiceCodes: string[];\n status: string;\n visitPlanName: string;\n requestedVisitPlanName: string;\n vendorComments: string[];\n vendorName: string;\n specifications: { [key: string]: ServiceSpecification };\n log: any[];\n billingHistoryUnitAverages: { [key: string]: BillingHistoryUnit };\n billingHistory: BillingHistoryDay[];\n vendorAccountClosedMonthName?: string | null;\n vendorAccount: {\n id: number;\n number: string;\n name: string;\n };\n vendorLocationAccounts: Array<{\n lastBilledOn: string;\n firstBilledOn: string;\n vendorLocationCode: string;\n }>;\n actions: Action[];\n voidRequestActionUrl: string;\n}\n\nexport interface LocationServiceVendor {\n [vendorId: string]: {\n vendor: Vendor;\n calendar: {\n nextVisit: CalendarEvent;\n lastVisit: CalendarEvent;\n };\n services: Service[];\n };\n}\n\nexport const servicesApi = api.injectEndpoints({\n endpoints: (build) => ({\n getService: build.query<Service, string>({\n query: (serviceId) => ({ url: `/admin/services/${serviceId}` }),\n providesTags: [\"Service\"],\n //providesTags: (result = []) => [\n //...result.map(({ id }) => ({ type: 'Service', id } as const)),\n //],\n }),\n getLocationServiceVendor: build.query<\n LocationServiceVendor,\n { locationId: string; vendorId: string }\n >({\n query: ({ locationId, vendorId }) => ({\n url: `/admin/locations/${locationId}/vendor/${vendorId}/xservices`,\n }),\n providesTags: [\"Service\"],\n //providesTags: (result = []) => [\n //...result.map(({ id }) => ({ type: 'Service', id } as const)),\n //],\n }),\n getLocationServiceVendors: build.query<LocationServiceVendor, string>({\n query: (locationId) => ({\n url: `/admin/locations/${locationId}/services`,\n }),\n providesTags: [\"Service\"],\n //providesTags: (result = []) => [\n //...result.map(({ id }) => ({ type: 'Service', id } as const)),\n //],\n }),\n getTicketApp: build.query({\n query: (ticketId) => ({\n url: `admin/tickets/${ticketId}/app`,\n }),\n }),\n getLocationRemediation: build.query({\n query: (locationId) => ({\n url: `/admin/location_remediation/${locationId}`\n }),\n providesTags: [\"Remediation\"],\n }),\n\n getAllLocationRemediations: build.query({\n query: (locationId) => ({\n url: `/admin/location_remediation/${locationId}/all_remediations`\n }),\n providesTags: [\"Remediations\"],\n }),\n formServiceAction: build.mutation({\n query: ({ url, body }) => {\n return {\n url,\n method: \"POST\",\n body,\n };\n },\n invalidatesTags: [\n \"BinType\",\n \"BinGroup\",\n \"Ticket\",\n \"TicketReplies\",\n \"Service\",\n \"FailedVisitReport\",\n \"AdhocVisitRequests\",\n \"StockDeliveryRequests\",\n \"RemediationCases\",\n \"Visit\",\n \"VendorServiceMapping\",\n \"ServiceSuspensionRequests\",\n \"ServiceTerminationRequests\",\n \"ServiceResumptionRequests\",\n \"SpecChangeRequests\",\n \"VisitFrequencyChangeRequests\",\n \"Remediations\",\n \"Remediation\"\n ],\n }),\n }),\n});\n\nexport const {\n useGetServiceQuery,\n useGetLocationServiceVendorQuery,\n useGetLocationServiceVendorsQuery,\n useGetTicketAppQuery,\n useFormServiceActionMutation,\n useGetLocationRemediationQuery,\n useGetAllLocationRemediationsQuery\n} = servicesApi;\n\nexport const {\n endpoints: {\n getService,\n getLocationServiceVendor,\n getLocationServiceVendors,\n },\n} = servicesApi;\n\nexport default servicesApi;\n","import {\n DatePicker,\n LocalizationProvider,\n PickersDay,\n} from \"@mui/x-date-pickers\";\nimport { PickersDayProps } from \"@mui/lab\";\nimport { Tooltip } from \"@mui/material\";\nimport _, { startCase } from \"lodash\";\nimport dayjs, { Dayjs } from \"dayjs\";\nimport { AdapterDayjs } from \"@mui/x-date-pickers/AdapterDayjs\";\nimport \"dayjs/locale/en-gb\";\n\nexport const datePickerStyles = {\n calendarHeader: {\n sx: {\n fontSize: \"12px\",\n \"& .MuiPickersCalendarHeader-labelContainer\": { fontSize: \"12px\" },\n },\n },\n textField: {\n sx: {\n fontSize: \"12px\",\n width: \"100%\",\n \"& .MuiInputBase-root\": { fontSize: \"12px\" },\n \"& .MuiOutlinedInput-input\": {\n padding: \"8.5px 14px\",\n },\n },\n },\n layout: {\n sx: {\n \".MuiDayCalendar-weekDayLabel\": { fontSize: \"12px\" },\n \".MuiPickersDay-root\": { fontSize: \"12px\" },\n },\n },\n};\n\ninterface VisitDay {\n status: string;\n date: Dayjs;\n}\n\nconst visitDayStyles = {\n failure: { border: \"2px solid #EA3223\" },\n success: { border: \"2px solid #459539\" },\n conflicting: { border: \"2px solid #EF8635\" },\n unknown: { border: \"2px solid #3A21EF\" },\n planned: { border: \"2px solid #F5BD43\" },\n assumed: { border: \"2px solid #8F3FCD\" },\n cancelled: { border: \"2px solid #bebebe\" },\n};\n\nconst statusVisit = {\n failure: \"Failure Reported\",\n success: \"Success Reported\",\n conflicting: \"Conflicting Reports\",\n unknown: \"Status Unknown\",\n planned: \"Service Planned\",\n assumed: \"Service Assumed\",\n cancelled: \"Service Cancelled\",\n};\n\nfunction ServerDay(props: PickersDayProps<Dayjs> & { visitDays?: VisitDay[] }) {\n const {\n visitDays = [],\n day,\n outsideCurrentMonth,\n isFirstVisibleCell,\n isLastVisibleCell,\n ...other\n } = props;\n\n // Find a visitDay that matches the current day\n const visitDay = _.find(\n visitDays,\n ({ date }) => dayjs.isDayjs(date) && day.isSame(date, \"day\")\n );\n\n // Apply matched styles if visitDay exists\n const matchedStyles = visitDay ? visitDayStyles[visitDay.status] : {};\n const tooltipTitle = visitDay ? startCase(statusVisit[visitDay.status]) : \"\";\n\n return (\n <Tooltip title={tooltipTitle} placement=\"top\" arrow>\n <PickersDay\n {...other}\n onDaySelect={other.onDaySelect}\n outsideCurrentMonth={outsideCurrentMonth}\n day={day}\n isFirstVisibleCell={isFirstVisibleCell}\n isLastVisibleCell={isLastVisibleCell}\n sx={{\n ...matchedStyles,\n fontSize: \"12px\",\n }}\n />\n </Tooltip>\n );\n}\n\nconst ServiceCalendarDatePicker = ({\n open,\n setOpen,\n onChange,\n maxDate = null,\n visitDays = [],\n ...props\n}) => {\n return (\n <LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale=\"en-gb\">\n <DatePicker\n slots={{ day: ServerDay }}\n slotProps={{\n day: {\n visitDays,\n } as any,\n calendarHeader: datePickerStyles.calendarHeader,\n textField: {\n ...datePickerStyles.textField,\n onClick: () => setOpen(true),\n },\n layout: datePickerStyles.layout,\n }}\n open={open}\n onChange={onChange}\n onClose={() => setOpen(false)}\n maxDate={maxDate}\n {...props}\n />\n </LocalizationProvider>\n );\n};\n\nexport default ServiceCalendarDatePicker;\n","import $ from \"jquery\";\nimport _ from \"lodashExtended\";\n\nexport default (\n path,\n data,\n successCallback,\n errorCallback,\n { method = \"POST\" } = {},\n) => {\n $.ajax({\n type: method,\n url: path,\n retryLimit: 10,\n attempt: 1,\n data: JSON.stringify(data),\n success: (data, v) => {\n if (_.isFunction(successCallback)) {\n successCallback(data, v);\n }\n },\n error: function (a, b, c) {\n var self = this;\n\n if (\n _.includes([503, 504, 502], a.status) &&\n self.attempt++ <= self.retryLimit\n ) {\n var retry = function () {\n $.ajax(self);\n };\n console.log(\n `AJAX FAILED ${a.status} attempt ${self.attempt} waiting: `,\n 2000 * self.attempt,\n );\n setTimeout(retry, 2000 * self.attempt);\n } else {\n if (_.isFunction(errorCallback)) {\n errorCallback(a.responseJSON, a.status);\n }\n }\n },\n dataType: \"json\",\n contentType: \"application/json; charset=utf-8\",\n cache: false,\n beforeSend: (xhr) => {\n xhr.setRequestHeader(\n \"X-CSRF-Token\",\n $('meta[name=\"csrf-token\"]').attr(\"content\"),\n );\n },\n });\n};\n","import * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Disposer } from \"./Disposer\";\nimport { EventDispatcher } from \"./EventDispatcher\";\nimport * as $object from \"./Object\";\nimport * as $iter from \"./Iterator\";\nimport * as $string from \"./String\";\n/**\r\n * A disposable dictionary, which when disposed itself will call `dispose()`\r\n * method on all its items.\r\n */\nvar DictionaryDisposer = /** @class */function (_super) {\n tslib_1.__extends(DictionaryDisposer, _super);\n function DictionaryDisposer(dict) {\n var _this = this;\n var disposer = dict.events.on(\"removed\", function (x) {\n x.oldValue.dispose();\n }, undefined, false);\n _this = _super.call(this, function () {\n disposer.dispose();\n // TODO clear the dictionary ?\n $iter.each(dict.iterator(), function (a) {\n var v = a[1];\n v.dispose();\n });\n }) || this;\n return _this;\n }\n return DictionaryDisposer;\n}(Disposer);\nexport { DictionaryDisposer };\n/**\r\n * A Dictionary is collection where values of some type can be mapped to\r\n * string keys.\r\n *\r\n * You might call it an \"associative list\" or \"associative array\".\r\n */\nvar Dictionary = /** @class */function () {\n /**\r\n * Constructor\r\n */\n function Dictionary() {\n /**\r\n * Event dispatcher.\r\n */\n this.events = new EventDispatcher();\n this._dictionary = {};\n }\n /**\r\n * Returns `true` if key exists in Dictionary.\r\n *\r\n * @param key The key to search for\r\n * @return `true` if key exists, `false` if it doesn't\r\n */\n Dictionary.prototype.hasKey = function (key) {\n return $object.hasKey(this._dictionary, key);\n };\n /**\r\n * Returns the value for a specific key.\r\n *\r\n * @param key The key to search for\r\n * @return Value for the key, or `undefined` if it doesn't exist\r\n */\n Dictionary.prototype.getKey = function (key) {\n return this._dictionary[key];\n };\n /**\r\n * Inserts value at specific key.\r\n *\r\n * Will thrown an exception if the key already exists in the dictionary.\r\n *\r\n * @param key Key\r\n * @param value Value\r\n */\n Dictionary.prototype.insertKey = function (key, value) {\n if ($object.hasKey(this._dictionary, key)) {\n throw new Error(\"Key \" + key + \" already exists in dictionary\");\n } else {\n this._dictionary[key] = value;\n if (this.events.isEnabled(\"insertKey\")) {\n this.events.dispatchImmediately(\"insertKey\", {\n type: \"insertKey\",\n target: this,\n key: key,\n newValue: value\n });\n }\n }\n };\n /**\r\n * Adds or updates key/value into dictionary.\r\n *\r\n * If the key already exists, the old value will be overwritten.\r\n *\r\n * If the new value is exactly the same as the old value (using ===), it won't do anything.\r\n *\r\n * @param key Key\r\n * @param value Value\r\n */\n Dictionary.prototype.setKey = function (key, value) {\n if ($object.hasKey(this._dictionary, key)) {\n var oldValue = this._dictionary[key];\n if (oldValue !== value) {\n this._dictionary[key] = value;\n if (this.events.isEnabled(\"setKey\")) {\n this.events.dispatchImmediately(\"setKey\", {\n type: \"setKey\",\n target: this,\n key: key,\n oldValue: oldValue,\n newValue: value\n });\n }\n if (this.events.isEnabled(\"removed\")) {\n this.events.dispatchImmediately(\"removed\", {\n type: \"removed\",\n target: this,\n oldValue: oldValue\n });\n }\n }\n } else {\n this._dictionary[key] = value;\n if (this.events.isEnabled(\"insertKey\")) {\n this.events.dispatchImmediately(\"insertKey\", {\n type: \"insertKey\",\n target: this,\n key: key,\n newValue: value\n });\n }\n }\n };\n /**\r\n * Updates the value at specific `key` using custom function.\r\n *\r\n * Passes in current value into the function, and uses its output as a new\r\n * value.\r\n *\r\n * If the new value is exactly the same as the old value (using ===), it won't do anything.\r\n *\r\n * @ignore Exclude from docs\r\n * @param key Key\r\n * @param fn Function to transform the value\r\n */\n Dictionary.prototype.updateKey = function (key, fn) {\n if ($object.hasKey(this._dictionary, key)) {\n var oldValue = this._dictionary[key];\n var newValue = fn(oldValue);\n if (oldValue !== newValue) {\n this._dictionary[key] = newValue;\n if (this.events.isEnabled(\"setKey\")) {\n this.events.dispatchImmediately(\"setKey\", {\n type: \"setKey\",\n target: this,\n key: key,\n oldValue: oldValue,\n newValue: newValue\n });\n }\n if (this.events.isEnabled(\"removed\")) {\n this.events.dispatchImmediately(\"removed\", {\n type: \"removed\",\n target: this,\n oldValue: oldValue\n });\n }\n }\n } else {\n throw new Error(\"Key \" + key + \" doesn't exist in dictionary\");\n }\n };\n /**\r\n * Removes value at specific `key` from dictionary.\r\n *\r\n * @param key Key to remove\r\n */\n Dictionary.prototype.removeKey = function (key) {\n if ($object.hasKey(this._dictionary, key)) {\n var oldValue = this._dictionary[key];\n delete this._dictionary[key];\n if (this.events.isEnabled(\"removeKey\")) {\n this.events.dispatchImmediately(\"removeKey\", {\n type: \"removeKey\",\n target: this,\n key: key,\n oldValue: oldValue\n });\n }\n if (this.events.isEnabled(\"removed\")) {\n this.events.dispatchImmediately(\"removed\", {\n type: \"removed\",\n target: this,\n oldValue: oldValue\n });\n }\n }\n };\n /**\r\n * [insertKeyIfEmpty description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo description\r\n * @param key [description]\r\n * @param ifEmpty [description]\r\n * @return [description]\r\n */\n Dictionary.prototype.insertKeyIfEmpty = function (key, ifEmpty) {\n if (!this.hasKey(key)) {\n this.insertKey(key, ifEmpty());\n }\n return this.getKey(key);\n };\n /**\r\n * Removes all items from the dictionary.\r\n */\n Dictionary.prototype.clear = function () {\n var _this = this;\n // TODO dispatch this after clear\n if (this.events.isEnabled(\"removed\")) {\n $object.each(this._dictionary, function (key, value) {\n _this.events.dispatchImmediately(\"removed\", {\n type: \"removed\",\n target: _this,\n oldValue: value\n });\n });\n }\n this._dictionary = {};\n if (this.events.isEnabled(\"cleared\")) {\n this.events.dispatchImmediately(\"cleared\", {\n type: \"cleared\",\n target: this\n });\n }\n };\n /**\r\n * Copies items from another Dictionary.\r\n *\r\n * @param source A Dictionary to copy items from\r\n */\n Dictionary.prototype.copyFrom = function (source) {\n var _this = this;\n $iter.each(source.iterator(), function (a) {\n // TODO fix this type cast\n _this.setKey(a[0], a[1]);\n });\n };\n /**\r\n * Returns an interator that can be used to iterate through all items in\r\n * the dictionary.\r\n *\r\n * @return Iterator\r\n */\n Dictionary.prototype.iterator = function () {\n // @todo fix this type after the Iterator bug is fixed\n // https://github.com/Microsoft/TypeScript/issues/16730\n return $object.entries(this._dictionary);\n };\n /**\r\n * Returns an ES6 iterator for the keys/values of the dictionary.\r\n */\n Dictionary.prototype[Symbol.iterator] = function () {\n var _a, _b, _i, key;\n return tslib_1.__generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _a = [];\n for (_b in this._dictionary) _a.push(_b);\n _i = 0;\n _c.label = 1;\n case 1:\n if (!(_i < _a.length)) return [3 /*break*/, 4];\n key = _a[_i];\n if (!$object.hasKey(this._dictionary, key)) return [3 /*break*/, 3];\n return [4 /*yield*/, [key, this._dictionary[key]]];\n case 2:\n _c.sent();\n _c.label = 3;\n case 3:\n _i++;\n return [3 /*break*/, 1];\n case 4:\n return [2 /*return*/];\n }\n });\n };\n /**\r\n * Calls `f` for each key/value in the dictionary.\r\n */\n Dictionary.prototype.each = function (f) {\n $iter.each(this.iterator(), function (_a) {\n var _b = tslib_1.__read(_a, 2),\n key = _b[0],\n value = _b[1];\n return f(key, value);\n });\n };\n /**\r\n * Returns an iterator that can be used to iterate through all items in\r\n * the dictionary, ordered by key.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Iterator\r\n */\n Dictionary.prototype.sortedIterator = function () {\n return $iter.sort(this.iterator(), function (x, y) {\n return $string.order(x[0], y[0]);\n });\n };\n return Dictionary;\n}();\nexport { Dictionary };\n/**\r\n * A version of a [[Dictionary]] that has a \"template\".\r\n *\r\n * A template is an instance of an object, that can be used to create new\r\n * elements in the list without actually needing to create instances for those.\r\n *\r\n * When new element is created in the list, e.g. by calling its `create()`\r\n * method, an exact copy of the element is created (including properties and\r\n * other attributes), inserted into the list and returned.\r\n */\nvar DictionaryTemplate = /** @class */function (_super) {\n tslib_1.__extends(DictionaryTemplate, _super);\n /**\r\n * Constructor\r\n *\r\n * @param t Template object\r\n */\n function DictionaryTemplate(t) {\n var _this = _super.call(this) || this;\n _this.template = t;\n return _this;\n }\n Object.defineProperty(DictionaryTemplate.prototype, \"template\", {\n /**\r\n * @return Template object\r\n */\n get: function get() {\n return this._template;\n },\n /**\r\n * A \"template\" object to copy all properties from when creating new list\r\n * items.\r\n *\r\n * @param v Template object\r\n */\n set: function set(v) {\n v.isTemplate = true;\n this._template = v;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies all elements from other dictionary.\r\n *\r\n * @param source Source dictionary\r\n */\n DictionaryTemplate.prototype.copyFrom = function (source) {\n var _this = this;\n $iter.each(source.iterator(), function (a) {\n // TODO fix this type cast\n // TODO why does this need to clone ?\n _this.setKey(a[0], a[1].clone());\n });\n };\n /**\r\n * Instantiates a new object of the specified type, adds it to specified\r\n * `key` in the dictionary, and returns it.\r\n *\r\n * @param make Item type to use. Will use the default type for the dictionary if not specified.\r\n * @return Newly created item\r\n */\n DictionaryTemplate.prototype.create = function (key) {\n var _this = this;\n return this.insertKeyIfEmpty(key, function () {\n return _this.template.clone();\n });\n };\n return DictionaryTemplate;\n}(Dictionary);\nexport { DictionaryTemplate };","import CloseIcon from \"@mui/icons-material/Close\";\nimport { Box, IconButton, Typography } from \"@mui/material\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport ReactJson from \"react-json-view\";\nimport { Rnd } from \"react-rnd\";\nimport { useHistory, useLocation, useRouteMatch } from \"react-router-dom\";\nimport { useDeveloper } from \"ticket/selectors\";\nimport { DebugIcon } from \"./forms/common/VisitIcons\";\n\ntype DebugButtonProps = {\n sx?: React.CSSProperties;\n [key: string]: any;\n};\n\n// Luego, puedes usar ReactJson directamente sin React.lazy:\nconst JsonViewer = React.memo(({ src }: { src: any }) => (\n <ReactJson\n src={src}\n theme=\"rjv-default\"\n enableClipboard={true}\n style={{ fontFamily: \"monospace\", fontSize: \"12px\" }}\n collapsed={1}\n displayDataTypes={false}\n displayObjectSize={false}\n />\n));\n\nexport const DebugButton: React.FC<DebugButtonProps> = ({ buttonSize = 'large', sx, ...props }) => {\n const [isDebuggerOpen, setIsDebuggerOpen] = useState(false);\n const [position, setPosition] = useState({ x: 0, y: 0 });\n const [size, setSize] = useState({ width: 300, height: 500 });\n const isDeveloper = useDeveloper();\n\n const handleOpenDebugger = useCallback(() => {\n setIsDebuggerOpen(true);\n }, []);\n\n const handleCloseDebugger = useCallback(() => {\n setIsDebuggerOpen(false);\n }, []);\n\n useEffect(() => {\n if (isDebuggerOpen) {\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n const scrollX = window.pageXOffset;\n const scrollY = window.pageYOffset;\n\n const maxWidth = Math.min(viewportWidth * 0.9, 600);\n const maxHeight = Math.min(viewportHeight * 0.8, 800);\n\n const x = scrollX + Math.max(0, (viewportWidth - maxWidth) / 2);\n const y = scrollY + Math.max(0, (viewportHeight - maxHeight) / 2);\n\n setPosition({ x, y });\n setSize({ width: maxWidth, height: maxHeight });\n }\n }, [isDebuggerOpen]);\n\n const memoizedProps = useMemo(() => props, [props]);\n\n if (!isDeveloper) return null;\n\n return (\n <>\n <IconButton\n size={buttonSize}\n onClick={handleOpenDebugger}\n sx={{ ...sx, }}\n >\n <DebugIcon/>\n </IconButton>\n {isDebuggerOpen &&\n createPortal(\n <Rnd\n position={position}\n size={size}\n onDragStop={(_e, d) => setPosition({ x: d.x, y: d.y })}\n onResize={(_e, _direction, ref, _delta, position) => {\n setSize({\n width: Number(ref.style.width),\n height: Number(ref.style.height),\n });\n setPosition(position);\n }}\n style={{\n zIndex: 222,\n }}\n >\n <Box\n sx={{\n backgroundColor: \"#fff\",\n display: \"flex\",\n flexDirection: \"column\",\n height: \"100%\",\n width: \"100%\",\n pointerEvents: \"auto\",\n }}\n >\n <Box\n sx={{\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n padding: 1,\n borderBottom: \"1px solid #ddd\",\n }}\n >\n <Typography variant=\"h6\">Debug Info</Typography>\n <IconButton onClick={handleCloseDebugger}>\n <CloseIcon sx={{ fontSize: \"30px\" }} />\n </IconButton>\n </Box>\n <Box\n sx={{\n flexGrow: 1,\n overflow: \"auto\",\n padding: 2,\n }}\n >\n <JsonViewer src={memoizedProps} />\n </Box>\n </Box>\n </Rnd>,\n document.body\n )}\n </>\n );\n};\nexport const RouterDebugger = ({ sx }: { sx? }) => {\n const isDeveloper = useDeveloper();\n const match = useRouteMatch();\n const location = useLocation();\n const history = useHistory();\n const [showRouter, setShowRouter] = useState(false);\n if (!isDeveloper) return null;\n\n return (\n <>\n <IconButton\n sx={{ position: \"absolute\", left: -10, ...sx }}\n onClick={() => setShowRouter(!showRouter)}\n >\n <DebugIcon/>\n </IconButton>\n {showRouter && (\n <Box\n sx={{\n mt: 2,\n p: 2,\n bgcolor: match ? \"#e6ffe6\" : \"#ffe6e6\",\n borderRadius: 2,\n }}\n >\n <Typography>Match: {match ? \"Sí\" : \"No\"}</Typography>\n {match && <pre>{JSON.stringify(match, null, 2)}</pre>}\n <Typography>location</Typography>\n {location && <pre>{JSON.stringify(location, null, 2)}</pre>}\n <Typography>history</Typography>\n {history && <pre>{JSON.stringify(history, null, 2)}</pre>}\n </Box>\n )}\n </>\n );\n};\n","/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { registry } from \"./Registry\";\nimport { options } from \"./Options\";\nimport { raf } from \"./utils/AsyncPending\";\nimport { triggerIdle } from \"./utils/AsyncPending\";\nimport * as $array from \"./utils/Array\";\nimport * as $object from \"./utils/Object\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * The main class that handles system-wide tasks, like caching, heartbeats, etc.\r\n * @important\r\n */\nvar System = /** @class */function () {\n /**\r\n * Performs initialization of the System object.\r\n *\r\n * Called when the first [[Sprite]] object is created.\r\n *\r\n * @ignore Exclude from docs\r\n */\n function System() {\n /**\r\n * A flag indicating if the system is on pause.\r\n */\n this._isPaused = false;\n /**\r\n * Holds the list of currently playing animations.\r\n *\r\n * @ignore Exclude from docs\r\n */\n this.animations = [];\n /**\r\n * Unique ID of the object.\r\n */\n this.uid = registry.getUniqueId();\n /**\r\n * @todo Description\r\n * @todo Needed?\r\n * @ignore Exclude from docs\r\n */\n this.dummyCounter = 0;\n this._frameRequested = false;\n this.updateStepDuration = 45;\n this.time = Date.now();\n }\n /**\r\n * Reports time elapsed since timer was reset.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Needed?\r\n * @param msg Message to report in console\r\n * @param reset Reset time counter\r\n */\n System.prototype.reportTime = function (msg, reset) {\n if (this.dummyCounter < 6) {\n //console.log(Date.now() - this.time, msg, this.dummyCounter2);\n }\n if (reset) {\n this.time = Date.now();\n }\n };\n /**\r\n * Performs \"heartbeat\" operations `frameRate` number of times per second.\r\n *\r\n * When the chart element is invalidated, it is not immediately redrawn.\r\n *\r\n * Instead it waits for the next `update()` cycle to be re-validated.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Maybe should be private?\r\n */\n System.prototype.update = function () {\n var _this = this;\n if (this._isPaused) {\n return;\n }\n this._frameRequested = false;\n var time = Date.now();\n registry.dispatchImmediately(\"enterframe\");\n //this.validateLayouts();\n //this.validatePositions();\n /*\r\n for (let key in registry.invalidLayouts) {\r\n this.validateLayouts(key);\r\n }\r\n for (let key in registry.invalidPositions) {\r\n this.validatePositions(key);\r\n }\r\n */\n var skippedComponents = [];\n // data objects first - do all calculations\n // only data is parsed in chunks, thats why we do for loop instead of a while like with other invalid items.\n // important to go backwards, as items are removed!\n // TODO use iterator instead\n for (var key in registry.invalidDatas) {\n if ($object.hasKey(registry.invalidDatas, key)) {\n var invalidData = registry.invalidDatas[key];\n while (invalidData.length > 0) {\n var component = invalidData[0];\n var dataProvider = component.dataProvider;\n if (!component.isDisposed()) {\n if (dataProvider && dataProvider.dataInvalid) {\n try {\n dataProvider.validateData();\n if (dataProvider.dataValidationProgress < 1) {\n break;\n }\n } catch (e) {\n $array.remove(invalidData, dataProvider);\n dataProvider.raiseCriticalError(e);\n }\n } else {\n try {\n component.validateData();\n if (component.dataValidationProgress < 1) {\n break;\n }\n } catch (e) {\n $array.remove(invalidData, component);\n component.raiseCriticalError(e);\n }\n }\n } else {\n $array.remove(invalidData, component);\n }\n }\n if (Date.now() - time > this.updateStepDuration) {\n break;\n }\n }\n }\n while (registry.invalidRawDatas.length > 0) {\n var component = registry.invalidRawDatas[0];\n if (!component.isDisposed()) {\n try {\n component.validateRawData();\n } catch (e) {\n $array.remove(registry.invalidRawDatas, component);\n component.raiseCriticalError(e);\n }\n } else {\n $array.remove(registry.invalidRawDatas, component);\n }\n }\n // TODO use iterator instead\n while (registry.invalidDataItems.length > 0) {\n var component = registry.invalidDataItems[0];\n var dataProvider = component.dataProvider;\n // this is needed to avoid partial value validation when data is parsed in chunks\n if (component.isDisposed() || component.dataInvalid || dataProvider && dataProvider.dataInvalid) {\n // void\n } else {\n try {\n component.validateDataItems();\n } catch (e) {\n $array.remove(registry.invalidDataItems, component);\n component.raiseCriticalError(e);\n }\n }\n // this might seem too much, as validateValues removes from invalidDataItems aswell, but just to be sure (in case validateData is overriden and no super is called)\n $array.remove(registry.invalidDataItems, component);\n }\n // TODO use iterator instead\n while (registry.invalidDataRange.length > 0) {\n var component = registry.invalidDataRange[0];\n var dataProvider = component.dataProvider;\n if (component.isDisposed() || component.dataInvalid || dataProvider && dataProvider.dataInvalid) {\n // void\n } else {\n try {\n component.validateDataRange();\n if (!component.skipRangeEvent) {\n component.dispatchImmediately(\"datarangechanged\");\n }\n component.skipRangeEvent = false;\n } catch (e) {\n $array.remove(registry.invalidDataRange, component);\n component.raiseCriticalError(e);\n }\n }\n // this might seem too much, as validateDataRange removes from invalidDataRange aswell, but just to be sure (in case validateData is overriden and no super is called)\n $array.remove(registry.invalidDataRange, component);\n }\n var skippedSprites = [];\n // display objects later\n // TODO use iterator instead\n $object.each(registry.invalidLayouts, function (key) {\n _this.validateLayouts(key);\n });\n $object.each(registry.invalidPositions, function (key) {\n _this.validatePositions(key);\n });\n var hasSkipped = false;\n time = Date.now();\n $object.each(registry.invalidSprites, function (key, invalidSprites) {\n var count = 0;\n while (invalidSprites.length > 0) {\n _this.validateLayouts(key);\n _this.validatePositions(key);\n count++;\n if (count == 5) {\n if (Date.now() - time > _this.updateStepDuration) {\n break;\n }\n count = 0;\n }\n var sprite = invalidSprites[invalidSprites.length - 1];\n // we need to check this, as validateLayout might validate sprite\n if (sprite && !sprite.isDisposed()) {\n if (!sprite._systemCheckIfValidate()) {\n // void\n skippedSprites.push(sprite);\n } else {\n if (!_this.checkIfValidate2(sprite)) {\n // void\n skippedSprites.push(sprite);\n } else {\n try {\n sprite._systemUpdate(skippedSprites);\n } catch (e) {\n sprite.invalid = false;\n $array.remove(invalidSprites, sprite);\n sprite.raiseCriticalError(e);\n }\n }\n }\n // this might seem too much, but it's ok\n sprite.invalid = false;\n }\n $array.remove(invalidSprites, sprite);\n }\n registry.invalidSprites[key] = registry.invalidSprites[key].concat(skippedSprites);\n });\n $object.each(registry.invalidSprites, function (key, value) {\n if (value.length > 0) {\n hasSkipped = true;\n }\n });\n $object.each(registry.invalidDatas, function (key, value) {\n if (value.length > 0) {\n hasSkipped = true;\n }\n });\n // TODO make this more efficient\n // TODO don't copy the array\n $array.each($array.copy(this.animations), function (x) {\n x.update();\n });\n //if(!hasSkipped){\n $object.each(registry.invalidLayouts, function (key) {\n _this.validateLayouts(key);\n });\n $object.each(registry.invalidPositions, function (key) {\n _this.validatePositions(key);\n });\n //}\n triggerIdle();\n $object.each(registry.invalidLayouts, function (key) {\n _this.validateLayouts(key);\n });\n $object.each(registry.invalidPositions, function (key) {\n _this.validatePositions(key);\n });\n registry.dispatchImmediately(\"exitframe\");\n if (hasSkipped || this.animations.length > 0 || skippedComponents.length > 0) {\n this.requestFrame();\n }\n if (this.updateStepDuration < 200) {\n var all0_1 = true;\n $object.each(registry.invalidDatas, function (key, value) {\n if (value.length > 0) {\n all0_1 = false;\n }\n });\n $object.each(registry.invalidSprites, function (key, value) {\n if (value.length > 0) {\n all0_1 = false;\n }\n });\n if (all0_1) {\n this.updateStepDuration = 200;\n }\n }\n };\n System.prototype.checkIfValidate2 = function (sprite) {\n if (sprite.dataItem && sprite.dataItem.component && sprite.dataItem.component.dataInvalid && !sprite.dataItem.component.isTemplate) {\n return false;\n } else {\n return true;\n }\n };\n /**\r\n * Requests new animation frame\r\n */\n System.prototype.requestFrame = function () {\n var _this = this;\n if (!this._frameRequested) {\n raf(function () {\n _this.update();\n });\n this._frameRequested = true;\n }\n };\n /**\r\n * Triggers position re-validation on all [[Sprite]] elements that have\r\n * invalid(ated) positions.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Maybe should be private?\r\n */\n System.prototype.validatePositions = function (id) {\n // invalid positions\n // TODO use iterator instead\n var invalidPositions = registry.invalidPositions[id];\n while (invalidPositions.length > 0) {\n var sprite = invalidPositions[invalidPositions.length - 1];\n if (!sprite.isDisposed()) {\n try {\n sprite._systemValidatePositions();\n } catch (e) {\n sprite.positionInvalid = false;\n $array.remove(invalidPositions, sprite);\n sprite.raiseCriticalError(e);\n }\n } else {\n $array.remove(invalidPositions, sprite);\n }\n }\n };\n /**\r\n * Triggers position re-validation on all [[Container]] elements that have\r\n * invalid(ated) layouts.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Maybe should be private?\r\n */\n System.prototype.validateLayouts = function (id) {\n // invalid positions\n // TODO use iterator instead\n var invalidLayouts = registry.invalidLayouts[id];\n while (invalidLayouts.length > 0) {\n var container = invalidLayouts[invalidLayouts.length - 1];\n if (!container.isDisposed()) {\n try {\n container.children.each(function (sprite) {\n sprite._systemValidateLayouts();\n });\n container.validateLayout();\n } catch (e) {\n container.layoutInvalid = false;\n $array.remove(invalidLayouts, container);\n container.raiseCriticalError(e);\n }\n } else {\n $array.remove(invalidLayouts, container);\n }\n }\n };\n /**\r\n * Outputs string to console if `verbose` is `true`.\r\n *\r\n * @param value Message to output to console\r\n */\n System.prototype.log = function (value) {\n if (options.verbose) {\n if (console) {\n console.log(value);\n }\n }\n };\n Object.defineProperty(System.prototype, \"isPaused\", {\n /**\r\n * @return Is system on pause?\r\n */\n get: function get() {\n return this._isPaused;\n },\n /**\r\n * Pauses all the processes of all the amCharts objects on the page\r\n *\r\n * @return is paused?\r\n */\n set: function set(value) {\n this._isPaused = value;\n if (!value) {\n this._frameRequested = false;\n this.requestFrame();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * amCharts Version.\r\n *\r\n * This follows npm's semver specification.\r\n *\r\n * @see {@link https://docs.npmjs.com/misc/semver}\r\n */\n System.VERSION = \"4.5.3\";\n return System;\n}();\nexport { System };\n/**\r\n * A singleton global instance of [[System]].\r\n *\r\n * All code should use this, rather than instantiating their\r\n * own System objects.\r\n */\nexport var system = new System();","/**\r\n * Base functionality\r\n*/\nimport * as tslib_1 from \"tslib\";\nimport { List, ListTemplate } from \"./utils/List\";\nimport { Dictionary, DictionaryTemplate } from \"./utils/Dictionary\";\nimport { Disposer } from \"./utils/Disposer\";\nimport { EventDispatcher } from \"./utils/EventDispatcher\";\nimport { Adapter } from \"./utils/Adapter\";\nimport { Color, color } from \"./utils/Color\";\nimport { Percent, percent } from \"./utils/Percent\";\nimport { registry } from \"./Registry\";\nimport { cache } from \"./utils/Cache\";\nimport * as $array from \"./utils/Array\";\nimport * as $object from \"./utils/Object\";\nimport * as $type from \"./utils/Type\";\n//import * as $debug from \"./utils/Debug\";\n/**\r\n * Provides base functionality for all derivative objects, like generating ids,\r\n * handling cache, etc.\r\n */\nvar BaseObject = /** @class */function () {\n //protected _classes: { [index: string]: any } = {};\n /**\r\n * Constructor\r\n * * Sets class name\r\n */\n function BaseObject() {\n /**\r\n * Indicates if this object has already been deleted. Any\r\n * destruction/disposal code should take this into account when deciding\r\n * wheter to run potentially costly disposal operations if they already have\r\n * been run.\r\n *\r\n * @ignore Exclude from docs\r\n */\n this._disposed = false;\n /**\r\n * List of IDisposer which will be disposed when the BaseObject is disposed.\r\n *\r\n * @ignore Exclude from docs\r\n */\n this._disposers = [];\n this.className = \"BaseObject\";\n //this.debug();\n }\n BaseObject.prototype.debug = function () {\n //$debug.debug(this);\n };\n Object.defineProperty(BaseObject.prototype, \"uid\", {\n /**\r\n * Returns object's internal unique ID.\r\n *\r\n * @return Unique ID\r\n */\n get: function get() {\n if (!this._uid) {\n this._uid = registry.getUniqueId();\n registry.map.setKey(this._uid, this);\n }\n return this._uid;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BaseObject.prototype, \"id\", {\n /**\r\n * @return Id\r\n */\n get: function get() {\n return this._id;\n },\n /**\r\n * Sets the user-defined id of the element.\r\n *\r\n * @param value Id\r\n */\n set: function set(value) {\n //registry.map.setKey(value, this); // registry.map only stores by uid\n this._id = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BaseObject.prototype, \"map\", {\n /**\r\n * Returns a universal collection for mapping ids with objects.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Map collection\r\n */\n get: function get() {\n if (!this._map) {\n this._map = new Dictionary();\n }\n return this._map;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Applies properties from all assigned themes.\r\n *\r\n * @ignore Exclude from docs\r\n */\n BaseObject.prototype.applyTheme = function () {\n var _this = this;\n // TODO is this needed ?\n if (registry) {\n var themes = this.getCurrentThemes();\n // TODO is this needed ?\n if (themes) {\n $array.each(themes, function (theme, index) {\n theme(_this);\n });\n }\n }\n };\n Object.defineProperty(BaseObject.prototype, \"themes\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return An array of themes\r\n */\n get: function get() {\n return this._themes;\n },\n /**\r\n * A list of themes to be used for this element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value An array of themes\r\n */\n set: function set(value) {\n this._themes = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns a list of themes that should be applied to this element. It could\r\n * either be a list of themes set explicitly on this element, or system-wide.\r\n *\r\n * @return List of themes\r\n */\n BaseObject.prototype.getCurrentThemes = function () {\n return this.themes || registry.themes;\n };\n /**\r\n * Returns if this object has been already been disposed.\r\n *\r\n * @return Is disposed?\r\n */\n BaseObject.prototype.isDisposed = function () {\n return this._disposed;\n };\n /**\r\n * Destroys this object and all related data.\r\n */\n BaseObject.prototype.dispose = function () {\n if (!this._disposed) {\n this._disposed = true;\n var a = this._disposers;\n this._disposers = null;\n while (a.length !== 0) {\n var disposer = a.shift();\n disposer.dispose();\n }\n // Clear cache\n this.clearCache();\n // remove from clones list\n if (this.clonedFrom) {\n this.clonedFrom.clones.removeValue(this);\n }\n var uid = this._uid;\n if (uid != null) {\n registry.map.removeKey(uid);\n }\n }\n };\n /**\r\n * Adds an IDisposer, which will be disposed when this object is disposed.\r\n *\r\n * @param target Object to dispose\r\n * @ignore Exclude from docs\r\n */\n BaseObject.prototype.addDisposer = function (target) {\n this._disposers.push(target);\n };\n /**\r\n * Disposes disposable object and removes it from `_disposers`.\r\n *\r\n * @param target Object to dispose\r\n * @ignore Exclude from docs\r\n */\n BaseObject.prototype.removeDispose = function (target) {\n //if(target){\n if (!this._disposed) {\n var index = $array.indexOf(this._disposers, target);\n if (index > -1) {\n this._disposers.splice(index, 1);\n }\n }\n target.dispose();\n //}\n };\n /**\r\n * Makes a copy of this object and returns the clone. Try to avoid cloning complex objects like chart, create new instances if you need them.\r\n *\r\n * @param cloneId An id to use for clone (if not set a unique id will be generated)\r\n * @returns Clone\r\n */\n BaseObject.prototype.clone = function (cloneId) {\n if (!cloneId) {\n cloneId = \"clone-\" + registry.getUniqueId();\n }\n var newObject = new this.constructor();\n newObject.cloneId = cloneId;\n newObject.copyFrom(this);\n // add to clones list\n // this.clones.push(newObject); // moved this to copyFrom\n return newObject;\n };\n Object.defineProperty(BaseObject.prototype, \"clones\", {\n /**\r\n * Returns a collection of object's clones.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Clones\r\n */\n get: function get() {\n if (!this._clones) {\n this._clones = new List();\n }\n return this._clones;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies all properties and related data from different element.\r\n *\r\n * @param object Source element\r\n */\n BaseObject.prototype.copyFrom = function (object) {\n object.clones.push(this); // do not moveValue, as it is expensive! even if there will be several items in clones list, it's not that bad.\n this.clonedFrom = object;\n };\n Object.defineProperty(BaseObject.prototype, \"className\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Class name\r\n */\n get: function get() {\n return this._className;\n },\n /**\r\n * Element's class name. (a class that was used to instantiate the element)\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Class name\r\n */\n set: function set(value) {\n this._className = value;\n /*if (registry) {\r\n registry.registeredClasses[value] = typeof this;\r\n }*/\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Caches value in object's cache.\r\n *\r\n * @ignore Exclude from docs\r\n * @param key Key\r\n * @param value Value\r\n * @param ttl TTL in seconds\r\n */\n BaseObject.prototype.setCache = function (key, value, ttl) {\n cache.set(this.uid, key, value, ttl);\n };\n /**\r\n * Retrieves cached value.\r\n *\r\n * If optional second padarameter is specified, it will return that value\r\n * if cache is not available or is expired.\r\n *\r\n * @ignore Exclude from docs\r\n * @param key Key\r\n * @param value Value to return if cache is not available\r\n * @return Value\r\n */\n BaseObject.prototype.getCache = function (key, value) {\n if (value === void 0) {\n value = undefined;\n }\n return cache.get(this.uid, key, value);\n };\n /**\r\n * Clears object's local cache.\r\n *\r\n * @ignore Exclude from docs\r\n */\n BaseObject.prototype.clearCache = function () {\n cache.clear(this.uid);\n };\n /**\r\n * Creates [[Disposer]] for `setTimeout` function call. This ensures that all\r\n * timeouts created by the object will be cleared when object itself is\r\n * disposed.\r\n *\r\n * @ignore Exclude from docs\r\n * @param fn Callback function\r\n * @param delay Timeout (ms)\r\n * @return Disposer for timeout\r\n */\n BaseObject.prototype.setTimeout = function (fn, delay) {\n var _this = this;\n var id = setTimeout(function () {\n _this.removeDispose(disposer);\n fn();\n }, delay);\n var disposer = new Disposer(function () {\n clearTimeout(id);\n });\n this._disposers.push(disposer);\n return disposer;\n };\n /**\r\n * Creates [[Disposer]] for `setInterval` function call. This ensures that all\r\n * timeouts created by the object will be cleared when object itself is\r\n * disposed.\r\n *\r\n * @ignore Exclude from docs\r\n * @param fn Callback function\r\n * @param delay Timeout (ms)\r\n * @return Disposer for timeout\r\n */\n BaseObject.prototype.setInterval = function (fn, delay) {\n var _this = this;\n var id = setInterval(function () {\n _this.removeDispose(disposer);\n fn();\n }, delay);\n var disposer = new Disposer(function () {\n clearTimeout(id);\n });\n this._disposers.push(disposer);\n return disposer;\n };\n Object.defineProperty(BaseObject.prototype, \"config\", {\n /**\r\n * ==========================================================================\r\n * JSON-BASED CONFIG PROCESSING\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Use this property to set JSON-based config. When set, triggers processing\r\n * routine, which will go through all properties, and try to apply values,\r\n * create instances, etc.\r\n *\r\n * Use this with caution, as it is a time-consuming process. It's used for\r\n * initialchart setup only, not routine operations.\r\n *\r\n * @param json JSON config\r\n */\n set: function set(config) {\n try {\n this.processConfig(config);\n } catch (e) {\n /*if (this instanceof Sprite) {\r\n this.raiseCriticalError(e);\r\n }*/\n this.raiseCriticalError(e);\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Processes the JSON config.\r\n *\r\n * @param json JSON config\r\n * @ignore Exclude from docs\r\n */\n BaseObject.prototype.processConfig = function (config) {\n var _this = this;\n if (!config) {\n return;\n }\n // Get target\n var target = this;\n // Iterate through all of the items\n $object.eachOrdered(config, function (configKey, value) {\n var configValue = value;\n // Is this a callback?\n if (configKey == \"callback\" && typeof value == \"function\") {\n value.call(target);\n }\n // Check if there's a property in target\n if (_this.hasProperty(configKey)) {\n var item_1;\n // Do we have instructions to create an object?\n if ($type.isObject(configValue) && $type.hasValue(configValue[\"type\"])) {\n item_1 = _this.createClassInstance(configValue[\"type\"]);\n // Create new instance\n if (item_1) {\n target[configKey] = item_1;\n } else {\n item_1 = target[configKey];\n }\n } else {\n // Get item from the object\n item_1 = target[configKey];\n }\n /**\r\n * It is...\r\n * --------------------------------------------------------------------\r\n */\n if (item_1 instanceof Adapter) {\n // ... an Adapter, try to add handlers to it\n // ------------------------------------------------------------------\n _this.processAdapters(item_1, configValue);\n } else if (item_1 instanceof EventDispatcher) {\n // ... an EventDispatcher, try to add handlers to it\n // ------------------------------------------------------------------\n _this.processEvents(item_1, configValue);\n } else if (configKey == \"locale\" && $type.isString(configValue)) {\n // ... a locale specified as string, e.g. \"fr_FR\"\n // ------------------------------------------------------------------\n if (document[\"am4lang_\" + configValue]) {\n target[configKey] = document[\"am4lang_\" + configValue];\n }\n } else if (_this.asIs(configKey)) {\n // ... a special field, just set it to new value\n // ------------------------------------------------------------------\n // (no need to add each indvidual item)\n target[configKey] = configValue;\n } else if (configValue instanceof BaseObject) {\n // ... a BaseObject object, we just going to use it as it is\n // ------------------------------------------------------------------\n target[configKey] = configValue;\n } else if (item_1 instanceof BaseObject) {\n // ... another child BaseObject\n // ------------------------------------------------------------------\n // Let's just pass in config part in and let itself deal with it\n item_1.config = configValue;\n } else if (item_1 instanceof ListTemplate) {\n // ... a list with template\n // ------------------------------------------------------------------\n // Let's see what we can do with it\n if ($type.isArray(configValue)) {\n // It's an array.\n // Create a list item for entry, or try to apply properties to an\n // existing entry if possible and it is present.\n _this.processListTemplate(configValue, item_1);\n } else if ($type.isObject(configValue)) {\n // It's a single oject.\n // Treat it as a template.\n if (configValue instanceof BaseObject) {\n // Item is already a BaseObject, no need to process it further\n item_1.template = configValue;\n } else {\n // Now let's find out if the whole object if a template, or we\n // need to get it from `template` key\n var templateValue = void 0;\n if ($type.hasValue(configValue.template)) {\n templateValue = configValue.template;\n } else {\n templateValue = configValue;\n }\n if (item_1.template instanceof BaseObject) {\n // Template is a BaseObject so we will just let its config\n // deal with the configuration\n item_1.template.config = templateValue;\n } else {\n $object.each(templateValue, function (entryKey, entryValue) {\n var listItem = item_1.template[entryKey];\n if (listItem instanceof Adapter) {\n _this.processAdapters(listItem, entryValue);\n } else if (listItem instanceof EventDispatcher) {\n _this.processEvents(listItem, entryValue);\n } else if (listItem instanceof DictionaryTemplate) {\n _this.processDictionaryTemplate(listItem, entryValue);\n } else if (item_1.template[entryKey] instanceof BaseObject) {\n // Template is a BaseObject. Let it deal with its own config.\n item_1.template[entryKey].config = entryValue;\n } else if ($type.isObject(entryValue) && $type.hasValue(entryValue[\"type\"])) {\n listItem = _this.createClassInstance(entryValue[\"type\"]);\n if (listItem) {\n if (listItem instanceof BaseObject) {\n listItem.config = entryValue;\n }\n item_1.template[entryKey] = listItem;\n } else {\n item_1.template[entryKey] = entryValue;\n }\n } else if (listItem instanceof List) {\n // It's List, process it\n _this.processList(entryValue, listItem);\n } else {\n // Aything else. Just assing and be done with it.\n item_1.template[entryKey] = _this.maybeColorOrPercent(entryValue);\n }\n });\n }\n // Check maybe there are `values` to insert\n if ($type.hasValue(configValue.values)) {\n _this.processListTemplate(configValue.values, item_1);\n }\n }\n } else {\n // Something else?\n // Not sure what to do with it on a list - ignore\n }\n } else if (item_1 instanceof List) {\n // ... a list\n // ------------------------------------------------------------------\n if (configKey == \"children\") {\n _this.processList(configValue, item_1, _this);\n } else {\n _this.processList(configValue, item_1);\n }\n } else if (item_1 instanceof DictionaryTemplate) {\n // ... a dictionary with template\n // ------------------------------------------------------------------\n _this.processDictionaryTemplate(item_1, configValue);\n } else if (item_1 instanceof Dictionary) {\n // ... a dictionary\n // ------------------------------------------------------------------\n _this.processDictionary(item_1, configValue);\n } else if (item_1 instanceof Color || item_1 instanceof Percent) {\n // ... it's a Color or Percent\n // ------------------------------------------------------------------\n target[configKey] = _this.maybeColorOrPercent(configValue);\n } else if ($type.isObject(item_1) && $type.isObject(configValue)) {\n // ... a regular object\n // ------------------------------------------------------------------\n $object.copyAllProperties(configValue, item_1);\n } else {\n // ... something else - probably a simple property or object\n // ------------------------------------------------------------------\n // Maybe convert to `Percent` or `Color`?\n configValue = _this.maybeColorOrPercent(configValue);\n // Assign\n target[configKey] = configValue;\n }\n } else if (!_this.isReserved(configKey)) {\n // Doesn't have property set. But we're going to assume JSON config\n // creator knows what he/she is doing and set it anyway.\n target[configKey] = configValue;\n }\n }, this.configOrder);\n // Any errors?\n if (this.processingErrors.length) {\n var errors = this.processingErrors.join(\"\\n\");\n this._processingErrors = [];\n throw Error(errors);\n }\n };\n /**\r\n * Tries to detect if value is color or percent and converts to proper object\r\n * if necessary.\r\n *\r\n * Returns the same source value if no color/percent detected\r\n *\r\n * @param value Source value\r\n * @return Converted value\r\n */\n BaseObject.prototype.maybeColorOrPercent = function (value) {\n if ($type.isString(value)) {\n if (value.match(/^[\\-]?[0-9.]+\\%$/)) {\n return percent($type.toNumber(value));\n } else if (value.match(/^\\#[0-9abcdef]{3,}$/i)) {\n return color(value);\n }\n }\n return value;\n };\n BaseObject.prototype.processAdapters = function (item, config) {\n var _this = this;\n if ($type.isArray(config)) {\n $array.each(config, function (entry, index) {\n item.add(entry.key, entry.callback, entry.priority || 0, _this);\n });\n } else if ($type.isObject(config)) {\n $object.each(config, function (key, entry) {\n if (!item.has(key, entry)) {\n item.add(key, entry);\n }\n });\n }\n };\n BaseObject.prototype.processEvents = function (item, config) {\n var _this = this;\n if ($type.isObject(config)) {\n $object.each(config, function (key, entry) {\n if (!item.has(key, entry)) {\n item.on(key, entry);\n }\n });\n } else if ($type.isArray(config)) {\n $array.each(config, function (entry, index) {\n item.on(entry.type, entry.callback, _this);\n });\n }\n };\n /**\r\n * Processes JSON config for a [[DictionaryTemplate]] item.\r\n *\r\n * @todo Description\r\n * @param item Item\r\n * @param config Config\r\n */\n BaseObject.prototype.processDictionaryTemplate = function (item, config) {\n // We can only process object\n // Not sure what to do with other types - ignore\n if ($type.isObject(config)) {\n // Create an entry for each item, or override properties for\n // existing one.\n $object.each(config, function (entryKey, entryValue) {\n var listItem;\n // Get existing one, or create a new one\n if (entryKey == \"template\") {\n listItem = item.template;\n } else if (item.hasKey(entryKey)) {\n listItem = item.getKey(entryKey);\n } else {\n listItem = item.create(entryKey);\n }\n // Set data\n if (listItem instanceof BaseObject) {\n listItem.config = entryValue;\n } else if ($type.isObject(listItem) && $type.isObject(entryValue)) {\n $object.copyAllProperties(entryValue, listItem);\n } else {\n listItem.setKey(entryKey, entryValue);\n }\n });\n }\n };\n /**\r\n * Processes JSON config for a [[Dictionary]] item.\r\n *\r\n * @todo Description\r\n * @param item Item\r\n * @param config Config\r\n */\n BaseObject.prototype.processDictionary = function (item, config) {\n // We can only process object\n // Not sure what to do with other types - ignore\n if ($type.isObject(config)) {\n // Create an entry for each item, or override properties for\n // existing one.\n // @todo support for non-basic types\n $object.each(config, function (entryKey, entryValue) {\n item.setKey(entryKey, entryValue);\n });\n }\n };\n /**\r\n * Processes [[ListTemplate]].\r\n *\r\n * @param configValue Config value\r\n * @param item Item\r\n */\n BaseObject.prototype.processListTemplate = function (configValue, item) {\n var _this = this;\n $array.each(configValue, function (entry, index) {\n var type = _this.getConfigEntryType(entry);\n var listItem;\n if (item.hasIndex(index) && !entry[\"forceCreate\"]) {\n listItem = item.getIndex(index);\n } else if (entry instanceof BaseObject) {\n // Item is already a BaseObject, no need to process it further\n item.push(entry);\n return;\n } else if (type) {\n listItem = item.create(type);\n } else {\n listItem = item.create();\n }\n if ($type.isObject(entry)) {\n // If the list item is BaseObject, we just need to let it\n // deal if its own config\n if (listItem instanceof BaseObject) {\n listItem.config = entry;\n } else if ($type.isObject(listItem) && $type.isObject(entry)) {\n $object.copyAllProperties(entry, listItem);\n } else {\n item.setIndex(item.indexOf(listItem), entry);\n }\n }\n });\n // Truncate the list if it contains less items than the config\n // array\n while (configValue.length > item.length) {\n item.pop();\n }\n };\n /**\r\n * Processes [[List]].\r\n *\r\n * @param configValue Config value\r\n * @param item Item\r\n */\n BaseObject.prototype.processList = function (configValue, item, parent) {\n var _this = this;\n // Convert to array if necessary\n if (!$type.isArray(configValue)) {\n configValue = [configValue];\n }\n // It's an array\n // Create a list item for entry\n var itemCount = item.length;\n $array.each(configValue, function (entry, index) {\n if ($type.isObject(entry)) {\n // An object.\n //\n // Let's see if we can instantiate a class out of it, or we need\n // to push it into list as it is.\n //\n // If there are items already at the specified index in the list,\n // apply properties rather than create a new one.\n var listItem = void 0;\n if (index < itemCount && !entry[\"forceCreate\"]) {\n listItem = item.getIndex(index);\n } else if (entry instanceof BaseObject) {\n // Item is already a BaseObject, no need to process it further\n item.push(entry);\n return;\n } else {\n listItem = _this.createEntryInstance(entry);\n if (parent) {\n listItem.parent = parent;\n } else {\n item.push(listItem);\n }\n }\n // If the list item is BaseObject, we just need to let it\n // deal if its own config\n if (listItem instanceof BaseObject) {\n listItem.config = entry;\n } else if ($type.isObject(listItem) && $type.isObject(entry)) {\n $object.copyAllProperties(entry, listItem);\n }\n } else {\n // Basic value.\n // Just push it into list, or override existing value\n if (item.hasIndex(index)) {\n item.setIndex(index, entry);\n } else {\n item.push(entry);\n }\n }\n });\n // Truncate the list if it contains less items than the config\n // array\n while (configValue.length > item.length) {\n item.pop();\n }\n };\n /**\r\n * This function is used to sort element's JSON config properties, so that\r\n * some properties that absolutely need to be processed last, can be put at\r\n * the end.\r\n *\r\n * @ignore Exclude from docs\r\n * @param a Element 1\r\n * @param b Element 2\r\n * @return Sorting number\r\n */\n BaseObject.prototype.configOrder = function (a, b) {\n if (a == b) {\n return 0;\n }\n // Language must come first, so it's all set up when the rest of the\n // elements are being instantiated\n else if (a == \"language\") {\n return -1;\n } else if (b == \"language\") {\n return 1;\n } else {\n return 0;\n }\n };\n /**\r\n * Checks if field should be just assigned as is, without any checking when\r\n * processing JSON config.\r\n *\r\n * Extending functions can override this function to do their own checks.\r\n *\r\n * @param field Field name\r\n * @return Assign as is?\r\n */\n BaseObject.prototype.asIs = function (field) {\n return $array.indexOf([\"locale\"], field) != -1;\n };\n /**\r\n * Creates a relevant class instance if such class definition exists.\r\n *\r\n * @ignore Exclude from docs\r\n * @param className Class name\r\n * @return Instance\r\n */\n BaseObject.prototype.createClassInstance = function (className) {\n if ($type.hasValue(registry.registeredClasses[className])) {\n return new registry.registeredClasses[className]();\n }\n return;\n };\n /**\r\n * Creates a class instance for a config entry using it's type. (as set in\r\n * `type` property)\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config part\r\n * @return Instance\r\n */\n BaseObject.prototype.createEntryInstance = function (config) {\n var res;\n if ($type.hasValue(config[\"type\"])) {\n res = this.createClassInstance(config[\"type\"]);\n }\n if (!res) {\n return config;\n }\n return res;\n };\n /**\r\n * Determines config object type.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config part\r\n * @return Type\r\n */\n BaseObject.prototype.getConfigEntryType = function (config) {\n if ($type.hasValue(config[\"type\"])) {\n if ($type.hasValue(registry.registeredClasses[config[\"type\"]])) {\n return registry.registeredClasses[config[\"type\"]];\n } else {\n throw Error(\"Invalid type: \\\"\" + config[\"type\"] + \"\\\".\");\n }\n }\n return;\n };\n /**\r\n * Checks if this element has a property.\r\n *\r\n * @ignore Exclude from docs\r\n * @param prop Property name\r\n * @return Has property?\r\n */\n BaseObject.prototype.hasProperty = function (prop) {\n return prop in this ? true : false;\n };\n /**\r\n * Checkes whether JSON key is a reserved keyword.\r\n *\r\n * @param key Key\r\n * @return Reserved\r\n */\n BaseObject.prototype.isReserved = function (key) {\n return [\"type\", \"forceCreate\"].indexOf(key) !== -1;\n };\n Object.defineProperty(BaseObject.prototype, \"processingErrors\", {\n /**\r\n * A list of errors that happened during JSON processing.\r\n *\r\n * @return Errors\r\n */\n get: function get() {\n if (!this._processingErrors) {\n this._processingErrors = [];\n }\n return this._processingErrors;\n },\n enumerable: true,\n configurable: true\n });\n return BaseObject;\n}();\nexport { BaseObject };\n;\n/**\r\n * A version of [[BaseObject]] with events properties and methods.\r\n * Classes that use [[EventDispatcher]] should extend this instead of\r\n * [[BaseObject]] directly.\r\n */\nvar BaseObjectEvents = /** @class */function (_super) {\n tslib_1.__extends(BaseObjectEvents, _super);\n /**\r\n * Constructor\r\n */\n function BaseObjectEvents() {\n var _this = _super.call(this) || this;\n /**\r\n * An [[EventDispatcher]] instance\r\n */\n _this.events = new EventDispatcher();\n _this.className = \"BaseObjectEvents\";\n _this._disposers.push(_this.events);\n return _this;\n }\n /**\r\n * Dispatches an event using own event dispatcher. Will automatically\r\n * populate event data object with event type and target (this element).\r\n * It also checks if there are any handlers registered for this sepecific\r\n * event.\r\n *\r\n * @param eventType Event type (name)\r\n * @param data Data to pass into event handler(s)\r\n */\n BaseObjectEvents.prototype.dispatch = function (eventType, data) {\n // @todo Implement proper type check\n if (this.events.isEnabled(eventType)) {\n if (data) {\n data.type = eventType;\n data.target = data.target || this;\n this.events.dispatch(eventType, {\n type: eventType,\n target: this\n });\n } else {\n this.events.dispatch(eventType, {\n type: eventType,\n target: this\n });\n }\n }\n };\n /**\r\n * Works like `dispatch`, except event is triggered immediately, without\r\n * waiting for the next frame cycle.\r\n *\r\n * @param eventType Event type (name)\r\n * @param data Data to pass into event handler(s)\r\n */\n BaseObjectEvents.prototype.dispatchImmediately = function (eventType, data) {\n // @todo Implement proper type check\n if (this.events.isEnabled(eventType)) {\n if (data) {\n data.type = eventType;\n data.target = data.target || this;\n this.events.dispatchImmediately(eventType, data);\n } else {\n this.events.dispatchImmediately(eventType, {\n type: eventType,\n target: this\n });\n }\n }\n };\n /**\r\n * Copies all parameters from another [[Sprite]].\r\n *\r\n * @param source Source object\r\n */\n BaseObjectEvents.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.events.copyFrom(source.events);\n };\n return BaseObjectEvents;\n}(BaseObject);\nexport { BaseObjectEvents };","/**\r\n * Responsive functionality module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObjectEvents } from \"../Base\";\nimport { List } from \"../utils/List\";\nimport { Adapter } from \"../utils/Adapter\";\nimport { registry } from \"../Registry\";\nimport * as $iter from \"../utils/Iterator\";\nimport * as $array from \"../utils/Array\";\nimport * as $type from \"../utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Responsive is responsible for overriding certain properties when conditions\r\n * are met.\r\n *\r\n * This class is used to dynamically apply and change certain chart properties\r\n * based on the current values of properties.\r\n *\r\n * Mainly, this is used with [[Sprite]]'s dimensional properties, like\r\n * `pixelWidth` and `pixelHeight`. However, it can be used to dynamically\r\n * change any property, based on any other property's value.\r\n *\r\n * A default responsive rules are disabled.\r\n *\r\n * To enable, set `enabled = false`. E.g.:\r\n *\r\n * ```TypeScript\r\n * chart.responsive.enabled = true;\r\n * ```\r\n * ```JavaScript\r\n * chart.responsive.enabled = true;\r\n * ```\r\n *\r\n * @see {@link IResponsiveEvents} for a list of available events\r\n * @see {@link IResponsiveAdapters} for a list of available Adapters\r\n * @todo Add default rules\r\n * @todo Watch for rule modification\r\n * @important\r\n */\nvar Responsive = /** @class */function (_super) {\n tslib_1.__extends(Responsive, _super);\n /**\r\n * Constructor\r\n */\n function Responsive() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * Holds a list of responsive rules organized by object type.\r\n */\n _this._rules = new List();\n /**\r\n * Holds the list of the default responsive rules.\r\n * @deprecated\r\n */\n //protected _defaultRules = new List<IResponsiveRule>();\n /**\r\n * Holds the list of currently applied rules.\r\n */\n _this._appliedRules = {};\n /**\r\n * Use default rules in addition to the user-defined ones?\r\n */\n _this._useDefault = true;\n /**\r\n * Adapter.\r\n */\n _this.adapter = new Adapter(_this);\n /**\r\n * Indicates of responsive rules application is enabled.\r\n */\n _this._enabled = false;\n /**\r\n * Collection of objects and state ids that do not have any properties set.\r\n */\n _this._noStates = [];\n _this.className = \"Responsive\";\n // Set up rules list events\n _this.rules.events.on(\"inserted\", _this.checkRules, true);\n _this.rules.events.on(\"removed\", _this.checkRules, true);\n _this._disposers.push(_this.rules.events);\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(Responsive.prototype, \"component\", {\n /**\r\n * @return Target object\r\n */\n get: function get() {\n return this._component;\n },\n /**\r\n * A target object that responsive rules will need to be applied to.\r\n *\r\n * @param value Target object\r\n */\n set: function set(value) {\n // Check if it's the same\n if (value == this._component) {\n return;\n }\n // Check if we already have a set up component and remove its events\n if (this._sizeEventDisposer) {\n this.removeDispose(this._sizeEventDisposer);\n }\n // Set\n this._component = value;\n // Set up resize monitoring events\n this._sizeEventDisposer = $type.getValue(this.component).events.on(\"sizechanged\", this.checkRules, this);\n this._disposers.push(this._sizeEventDisposer);\n // Enable resoponsive\n this.enabled = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Responsive.prototype, \"enabled\", {\n /**\r\n * @return Apply responsive rules?\r\n */\n get: function get() {\n return this.adapter.apply(\"enabled\", this._enabled);\n },\n /**\r\n * Should responsive rules be checked against and applied?\r\n *\r\n * @default false\r\n * @param value Apply responsive rules?\r\n */\n set: function set(value) {\n if (this._enabled != value) {\n this._enabled = value;\n // Run `applyRules` so that any currently applied rules can be reset\n this.applyRules();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Responsive.prototype, \"useDefault\", {\n /**\r\n * @return Use default rules?\r\n */\n get: function get() {\n return this.adapter.apply(\"useDefault\", this._useDefault);\n },\n /**\r\n * Should default responsive rules be applied in addition to user-defined\r\n * ones.\r\n *\r\n * User-defined rules will take precedence over default rules whenever they\r\n * produce conflicting settings.\r\n *\r\n * @default true\r\n * @param value Use default rules?\r\n */\n set: function set(value) {\n if (this._useDefault != value) {\n this._useDefault = value;\n // Run `applyRules` so that any currently applied rules can be reset\n this.applyRules();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Responsive.prototype, \"rules\", {\n /**\r\n * @return User-defined rules\r\n */\n get: function get() {\n return this.adapter.apply(\"rules\", this._rules);\n },\n /**\r\n * User-defined responsive rules.\r\n *\r\n * User-defined rules will take precedence over default rules whenever they\r\n * produce conflicting settings.\r\n *\r\n * Use `allRules` to get all applicable rules including default and\r\n * user-defined ones.\r\n *\r\n * @param value User-defined rules\r\n */\n set: function set(value) {\n this._rules = value;\n this._enabled = true;\n this.applyRules();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Responsive.prototype, \"defaultRules\", {\n /**\r\n * Default responsive rules.\r\n *\r\n * @readonly\r\n * @return List of responsive rules\r\n */\n get: function get() {\n return this.adapter.apply(\"defaultRules\", defaultRules);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Responsive.prototype, \"allRules\", {\n /**\r\n * Returns all rules: default rules (if not disabled) combined with\r\n * user-defined ones.\r\n *\r\n * @readonly\r\n * @return List of all applicable rules\r\n */\n get: function get() {\n // Create empty list\n var rules = new List();\n // Add default rules if not disabled\n // A code, requesting `allRules` must ensure loading of default rules\n // by calling `loadDefaultRules()`\n if (this.useDefault) {\n rules.copyFrom(this.defaultRules);\n }\n // Add user-defined ones\n rules.copyFrom(this.rules);\n return this.adapter.apply(\"allRules\", rules);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Checks if rule by the particular id currently applied.\r\n *\r\n * @param ruleId Rule ID\r\n * @return Is currently applied?\r\n */\n Responsive.prototype.isApplied = function (ruleId) {\n var rule = this._appliedRules[ruleId];\n return $type.hasValue(rule) ? rule : false;\n };\n /**\r\n * Checks which responsive rules currently satisfy their conditions and\r\n * should be applied, or unapplied.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Responsive.prototype.checkRules = function () {\n // Check if default rules need to be loaded\n // If needed, we wait until it's loaded and then call `checkRules` again\n // This is not needed anymore since we are now populating public variable\n // `defaultRules` by each class indidividually\n /*if (this.useDefault && this.defaultRules.length == 0) {\r\n this.loadDefaultRules().then((res) => {\r\n this._defaultRules.setAll(res.default);\r\n this.checkRules();\r\n });\r\n return;\r\n }*/\n var _this = this;\n // Check if there are any rules\n var rules = this.allRules;\n if (!rules || rules.length == 0) {\n return;\n }\n // Init a list of rules to be applied\n var rulesChanged = false;\n var component = $type.getValue(this.component);\n // Check which rules match\n $iter.each(rules.iterator(), function (rule) {\n // Check if rule has an id\n if (!rule.id) {\n rule.id = registry.getUniqueId();\n }\n // Init indicator if this rule should be applied\n var apply = rule.relevant(component);\n // Let's check if this rule needs to be applied\n if (apply && !_this.isApplied(rule.id) || !apply && _this.isApplied(rule.id)) {\n rulesChanged = true;\n }\n _this._appliedRules[rule.id] = apply;\n });\n // Check if we need to re-apply the rules\n if (rulesChanged) {\n this.dispatchImmediately(\"ruleschanged\");\n this.applyRules();\n }\n };\n /**\r\n * Applies current rules to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param target Target object\r\n * @todo Better type check\r\n */\n Responsive.prototype.applyRules = function (target) {\n var _this = this;\n // If no target supplied, we assume the top-level element\n var newTarget = $type.hasValue(target) ? target : $type.getValue(this.component);\n // Check each rule\n var defaultStateApplied = false;\n if (this.enabled) {\n $iter.each(this.allRules.iterator(), function (rule) {\n // Get relevant state\n var state = _this.getState(rule, newTarget);\n // If there's a state, it means it needs to be applied\n if (state) {\n // Check if default state was already applied to this element.\n // We don't want to go resetting default states to ALL element,\n // if they don't have responsive states.\n if (!defaultStateApplied) {\n // Nope, reset states (instantly).\n newTarget.applyCurrentState(0);\n defaultStateApplied = true;\n }\n // Is this rule currently applied?\n if (_this.isApplied($type.getValue(rule.id))) {\n // Yes. Apply the responsive state\n newTarget.setState(state);\n _this.dispatchImmediately(\"ruleapplied\", {\n rule: rule\n });\n }\n }\n });\n }\n // Apply rules to the children\n if (newTarget.children) {\n $iter.each(newTarget.children.iterator(), function (child) {\n _this.applyRules(child);\n });\n }\n };\n /**\r\n * Applies specific oresponsive overrides to the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param rule Responsive rule\r\n * @param target Target element\r\n * @deprecated\r\n * @hidden\r\n */\n /*\tpublic applyRule(rule: IResponsiveRule, target: any): void {\r\n // Construct state id\r\n //let stateId = \"responsive-\" + rule.id;\r\n // Check if we need to create a state for the element\r\n let state = this.getState(rule, target);\r\n // Apply the state\r\n if (state) {\r\n //if (target.className == \"Container\" && target.parent.className == \"ZoomControl\") {\r\n console.log(\"Applying state to \" + target.className + \" (\" + target.uid + \"): \" + JSON.stringify(state.properties));\r\n //}\r\n target.setState(state);\r\n }\r\n }*/\n /**\r\n * Returns a relative state for the rule/target, or `undefined` if no state is\r\n * needed.\r\n *\r\n * @param rule [description]\r\n * @param target [description]\r\n * @return [description]\r\n */\n Responsive.prototype.getState = function (rule, target) {\n var stateId = \"responsive-\" + rule.id;\n var tmpId = target.uid + \"_\" + stateId;\n if ($array.indexOf(this._noStates, tmpId) !== -1) {\n return;\n } else if (!target.states.hasKey(stateId)) {\n var state = rule.state(target, stateId);\n if (!state) {\n this._noStates.push(tmpId);\n }\n return state;\n } else {\n return target.states.getKey(stateId);\n }\n };\n /**\r\n * Gets a value from an element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param target Target object\r\n * @param property Property\r\n * @return Property value\r\n */\n Responsive.prototype.getValue = function (target, property) {\n // This is a bit hacky, first we check if the property exist.\n // If it doesn't we try accessing target's property directly\n var value = target.getPropertyValue(property);\n if (!$type.hasValue(value) && $type.hasValue(target[property])) {\n value = target[property];\n }\n return value;\n };\n return Responsive;\n}(BaseObjectEvents);\nexport { Responsive };\n/**\r\n * [defaultRules description]\r\n *\r\n * @todo description\r\n */\nexport var defaultRules = new List();\ndefaultRules.events.on(\"inserted\", function (ev) {\n ev.newValue.id = registry.getUniqueId();\n});\n/**\r\n *\r\n * @todo description\r\n */\nvar ResponsiveBreakpoints = /** @class */function () {\n function ResponsiveBreakpoints() {}\n // Breakpoint functions (for use in `relevant` clause of the responsive rules)\n ResponsiveBreakpoints.widthXXS = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.XXS;\n };\n ResponsiveBreakpoints.widthXS = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.XS;\n };\n ResponsiveBreakpoints.widthS = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.S;\n };\n ResponsiveBreakpoints.widthM = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.M;\n };\n ResponsiveBreakpoints.widthL = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.L;\n };\n ResponsiveBreakpoints.widthXL = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.XL;\n };\n ResponsiveBreakpoints.widthXXL = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.XXL;\n };\n ResponsiveBreakpoints.heightXXS = function (container) {\n return container.pixelHeight <= ResponsiveBreakpoints.XXS;\n };\n ResponsiveBreakpoints.heightXS = function (container) {\n return container.pixelHeight <= ResponsiveBreakpoints.XS;\n };\n ResponsiveBreakpoints.heightS = function (container) {\n return container.pixelHeight <= ResponsiveBreakpoints.S;\n };\n ResponsiveBreakpoints.heightM = function (container) {\n return container.pixelHeight <= ResponsiveBreakpoints.M;\n };\n ResponsiveBreakpoints.heightL = function (container) {\n return container.pixelHeight <= ResponsiveBreakpoints.L;\n };\n ResponsiveBreakpoints.heightXL = function (container) {\n return container.pixelHeight <= ResponsiveBreakpoints.XL;\n };\n ResponsiveBreakpoints.heightXXL = function (container) {\n return container.pixelHeight <= ResponsiveBreakpoints.XXL;\n };\n ResponsiveBreakpoints.isXXS = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.XXS && container.pixelHeight <= ResponsiveBreakpoints.XXS;\n };\n ResponsiveBreakpoints.isXS = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.XS && container.pixelHeight <= ResponsiveBreakpoints.XS;\n };\n ResponsiveBreakpoints.isS = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.S && container.pixelHeight <= ResponsiveBreakpoints.S;\n };\n ResponsiveBreakpoints.isM = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.M && container.pixelHeight <= ResponsiveBreakpoints.M;\n };\n ResponsiveBreakpoints.isL = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.L && container.pixelHeight <= ResponsiveBreakpoints.L;\n };\n ResponsiveBreakpoints.isXL = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.XL && container.pixelHeight <= ResponsiveBreakpoints.XL;\n };\n ResponsiveBreakpoints.isXXL = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.XXL && container.pixelHeight <= ResponsiveBreakpoints.XXL;\n };\n ResponsiveBreakpoints.maybeXXS = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.XXS || container.pixelHeight <= ResponsiveBreakpoints.XXS;\n };\n ResponsiveBreakpoints.maybeXS = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.XS || container.pixelHeight <= ResponsiveBreakpoints.XS;\n };\n ResponsiveBreakpoints.maybeS = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.S || container.pixelHeight <= ResponsiveBreakpoints.S;\n };\n ResponsiveBreakpoints.maybeM = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.M || container.pixelHeight <= ResponsiveBreakpoints.M;\n };\n ResponsiveBreakpoints.maybeL = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.L || container.pixelHeight <= ResponsiveBreakpoints.L;\n };\n ResponsiveBreakpoints.maybeXL = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.XL || container.pixelHeight <= ResponsiveBreakpoints.XL;\n };\n ResponsiveBreakpoints.maybeXXL = function (container) {\n return container.pixelWidth <= ResponsiveBreakpoints.XXL || container.pixelHeight <= ResponsiveBreakpoints.XXL;\n };\n // Named pixel breakpoints\n ResponsiveBreakpoints.XXS = 100;\n ResponsiveBreakpoints.XS = 200;\n ResponsiveBreakpoints.S = 300;\n ResponsiveBreakpoints.M = 400;\n ResponsiveBreakpoints.L = 600;\n ResponsiveBreakpoints.XL = 800;\n ResponsiveBreakpoints.XXL = 1000;\n return ResponsiveBreakpoints;\n}();\nexport { ResponsiveBreakpoints };","import _ from 'lodashExtended'\nimport { isSectionComplete, isSectionStarted, sectionIncompleteMessage, orderedSectionIds } from '../components/sections'\nimport dotProp from 'dot-prop-immutable'\n\n\nconst getSectionData = (sectionId, state) => {\n return _.omit(dotProp.get(state.firestore, `data.sections.${sectionId}`) || {}, 'state')\n}\n\nconst getSectionState = (sectionId, state) => {\n return dotProp.get(state.firestore, `data.sections.${sectionId}.state`) || {}\n}\n\nconst isSectionSubmitted = (sectionId, state) => {\n return !!getSectionState(sectionId, state).submitted\n}\n\nconst isSectionViewed = (sectionId, state) => {\n return !!getSectionState(sectionId, state).viewed\n}\n\nconst getIncompleteMessage = (sectionId, state) => {\n return getSectionStatus(sectionId, state) == 'partially_complete' ? sectionIncompleteMessage(sectionId, state) : null \n}\n\nconst getSectionStatus = (sectionId, state) => {\n const submitted = isSectionSubmitted(sectionId, state)\n const viewed = isSectionViewed(sectionId, state)\n const started = isSectionStarted(sectionId, state)\n const completed = isSectionComplete(sectionId, state)\n\n if(completed) {\n return 'completed'\n } else {\n if(submitted || (started && viewed)) {\n return 'partially_complete'\n } else {\n return 'to_do'\n }\n }\n}\n\nconst areAllSectionsComplete = (state) => {\n return _.every(\n orderedSectionIds,\n (sectionId) => getSectionStatus(sectionId, state) === \"completed\"\n );\n}\n\nconst getSectionStatusById = (state) => {\n var sectionStatusById = {}\n _.each(\n orderedSectionIds,\n (sectionId) =>\n (sectionStatusById[sectionId] = getSectionStatus(sectionId, state))\n );\n return sectionStatusById\n}\n\nexport {\n getSectionData,\n getSectionStatus,\n getIncompleteMessage,\n areAllSectionsComplete,\n getSectionStatusById,\n}\n","// ActionFormLayout.tsx\nimport { Box } from \"@mui/material\";\nimport NotesSection from \"./NotesSection\";\nimport { ModelErrors } from \"sharedComponents\";\n\n\n\nexport const ActionFormTitle = ({ content }) => {\n\n return (\n <Box sx={{ padding: '6px 10px',\n border: '1px solid #646D78',\n borderTopLeftRadius: '10px',\n borderBottom: 'none',\n borderTopRightRadius: '10px',\n color: '#fff',\n backgroundColor: '#637381',\n }} >\n\n <Box>\n {content}\n </Box>\n\n </Box>\n )\n}\n\n\nexport const ActionFormBody = ({ content, contentSub=\"\" }) => {\n\n return (\n <Box sx={{ background: '#fff', padding: '10px 16px' }}>\n\n <Box sx={{ marginBottom: '10px', color: '#777777', fontWeight: '500' }}>\n {content}\n </Box>\n\n {contentSub}\n\n </Box>\n )\n}\n\nexport const ActionFormLayout = ({ title, body, form, onSetForm, errors }) => {\n\n const sub = (\n <>\n { errors && (\n <ModelErrors errors={errors} />\n ) }\n\n { onSetForm && form && (\n <NotesSection form={form} onSetForm={onSetForm} />\n )}\n </>\n )\n\n return (\n <>\n <ActionFormTitle content={title}/>\n\n <ActionFormBody content={body} contentSub={sub}/>\n </>\n\n )\n}\n\nexport default ActionFormLayout\n","import _ from 'lodashExtended'\nimport { isSectionComplete, isSectionStarted, sectionIncompleteMessage, orderedSectionIds } from '../components/sections'\nimport dotProp from 'dot-prop-immutable'\n\n\nconst getSectionData = (sectionId, state) => {\n return _.omit(dotProp.get(state.firestore, `data.sections.${sectionId}`) || {}, 'state')\n}\n\nconst getSectionState = (sectionId, state) => {\n return dotProp.get(state.firestore, `data.sections.${sectionId}.state`) || {}\n}\n\nconst isSectionSubmitted = (sectionId, state) => {\n return !!getSectionState(sectionId, state).submitted\n}\n\nconst isSectionViewed = (sectionId, state) => {\n return !!getSectionState(sectionId, state).viewed\n}\n\nconst getIncompleteMessage = (sectionId, state) => {\n return getSectionStatus(sectionId, state) == 'partially_complete' ? sectionIncompleteMessage(sectionId, state) : null\n}\n\nconst getSectionStatus = (sectionId, state) => {\n const submitted = isSectionSubmitted(sectionId, state)\n const viewed = isSectionViewed(sectionId, state)\n const started = isSectionStarted(sectionId, state)\n const completed = isSectionComplete(sectionId, state)\n\n if(completed) {\n return 'completed'\n } else {\n if(submitted || (started && viewed)) {\n return 'partially_complete'\n } else {\n return 'to_do'\n }\n }\n}\n\nconst areAllSectionsComplete = (state) => {\n return _.every(\n orderedSectionIds,\n (sectionId) => getSectionStatus(sectionId, state) === \"completed\"\n );\n}\n\nconst getSectionStatusById = (state) => {\n var sectionStatusById = {}\n _.each(\n orderedSectionIds,\n (sectionId) =>\n (sectionStatusById[sectionId] = getSectionStatus(sectionId, state))\n );\n return sectionStatusById\n}\n\nexport {\n getSectionData,\n getSectionStatus,\n getIncompleteMessage,\n areAllSectionsComplete,\n getSectionStatusById,\n}\n","var EventListener = /** @class */function () {\n function EventListener(eventTarget, eventName) {\n this.eventTarget = eventTarget;\n this.eventName = eventName;\n this.unorderedBindings = new Set();\n }\n EventListener.prototype.connect = function () {\n this.eventTarget.addEventListener(this.eventName, this, false);\n };\n EventListener.prototype.disconnect = function () {\n this.eventTarget.removeEventListener(this.eventName, this, false);\n };\n // Binding observer delegate\n EventListener.prototype.bindingConnected = function (binding) {\n this.unorderedBindings.add(binding);\n };\n EventListener.prototype.bindingDisconnected = function (binding) {\n this.unorderedBindings[\"delete\"](binding);\n };\n EventListener.prototype.handleEvent = function (event) {\n var extendedEvent = extendEvent(event);\n for (var _i = 0, _a = this.bindings; _i < _a.length; _i++) {\n var binding = _a[_i];\n if (extendedEvent.immediatePropagationStopped) {\n break;\n } else {\n binding.handleEvent(extendedEvent);\n }\n }\n };\n Object.defineProperty(EventListener.prototype, \"bindings\", {\n get: function get() {\n return Array.from(this.unorderedBindings).sort(function (left, right) {\n var leftIndex = left.index,\n rightIndex = right.index;\n return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;\n });\n },\n enumerable: true,\n configurable: true\n });\n return EventListener;\n}();\nexport { EventListener };\nfunction extendEvent(event) {\n if (\"immediatePropagationStopped\" in event) {\n return event;\n } else {\n var stopImmediatePropagation_1 = event.stopImmediatePropagation;\n return Object.assign(event, {\n immediatePropagationStopped: false,\n stopImmediatePropagation: function stopImmediatePropagation() {\n this.immediatePropagationStopped = true;\n stopImmediatePropagation_1.call(this);\n }\n });\n }\n}","import { EventListener } from \"./event_listener\";\nvar Dispatcher = /** @class */function () {\n function Dispatcher(application) {\n this.application = application;\n this.eventListenerMaps = new Map();\n this.started = false;\n }\n Dispatcher.prototype.start = function () {\n if (!this.started) {\n this.started = true;\n this.eventListeners.forEach(function (eventListener) {\n return eventListener.connect();\n });\n }\n };\n Dispatcher.prototype.stop = function () {\n if (this.started) {\n this.started = false;\n this.eventListeners.forEach(function (eventListener) {\n return eventListener.disconnect();\n });\n }\n };\n Object.defineProperty(Dispatcher.prototype, \"eventListeners\", {\n get: function get() {\n return Array.from(this.eventListenerMaps.values()).reduce(function (listeners, map) {\n return listeners.concat(Array.from(map.values()));\n }, []);\n },\n enumerable: true,\n configurable: true\n });\n // Binding observer delegate\n Dispatcher.prototype.bindingConnected = function (binding) {\n this.fetchEventListenerForBinding(binding).bindingConnected(binding);\n };\n Dispatcher.prototype.bindingDisconnected = function (binding) {\n this.fetchEventListenerForBinding(binding).bindingDisconnected(binding);\n };\n // Error handling\n Dispatcher.prototype.handleError = function (error, message, detail) {\n if (detail === void 0) {\n detail = {};\n }\n this.application.handleError(error, \"Error \" + message, detail);\n };\n Dispatcher.prototype.fetchEventListenerForBinding = function (binding) {\n var eventTarget = binding.eventTarget,\n eventName = binding.eventName;\n return this.fetchEventListener(eventTarget, eventName);\n };\n Dispatcher.prototype.fetchEventListener = function (eventTarget, eventName) {\n var eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n var eventListener = eventListenerMap.get(eventName);\n if (!eventListener) {\n eventListener = this.createEventListener(eventTarget, eventName);\n eventListenerMap.set(eventName, eventListener);\n }\n return eventListener;\n };\n Dispatcher.prototype.createEventListener = function (eventTarget, eventName) {\n var eventListener = new EventListener(eventTarget, eventName);\n if (this.started) {\n eventListener.connect();\n }\n return eventListener;\n };\n Dispatcher.prototype.fetchEventListenerMapForEventTarget = function (eventTarget) {\n var eventListenerMap = this.eventListenerMaps.get(eventTarget);\n if (!eventListenerMap) {\n eventListenerMap = new Map();\n this.eventListenerMaps.set(eventTarget, eventListenerMap);\n }\n return eventListenerMap;\n };\n return Dispatcher;\n}();\nexport { Dispatcher };","// capture nos.: 12 23 4 43 1 5 56 7 76\nvar descriptorPattern = /^((.+?)(@(window|document))?->)?(.+?)(#(.+))?$/;\nexport function parseDescriptorString(descriptorString) {\n var source = descriptorString.trim();\n var matches = source.match(descriptorPattern) || [];\n return {\n eventTarget: parseEventTarget(matches[4]),\n eventName: matches[2],\n identifier: matches[5],\n methodName: matches[7]\n };\n}\nfunction parseEventTarget(eventTargetName) {\n if (eventTargetName == \"window\") {\n return window;\n } else if (eventTargetName == \"document\") {\n return document;\n }\n}\nexport function stringifyEventTarget(eventTarget) {\n if (eventTarget == window) {\n return \"window\";\n } else if (eventTarget == document) {\n return \"document\";\n }\n}","import { parseDescriptorString, stringifyEventTarget } from \"./action_descriptor\";\nvar Action = /** @class */function () {\n function Action(element, index, descriptor) {\n this.element = element;\n this.index = index;\n this.eventTarget = descriptor.eventTarget || element;\n this.eventName = descriptor.eventName || getDefaultEventNameForElement(element) || error(\"missing event name\");\n this.identifier = descriptor.identifier || error(\"missing identifier\");\n this.methodName = descriptor.methodName || error(\"missing method name\");\n }\n Action.forToken = function (token) {\n return new this(token.element, token.index, parseDescriptorString(token.content));\n };\n Action.prototype.toString = function () {\n var eventNameSuffix = this.eventTargetName ? \"@\" + this.eventTargetName : \"\";\n return \"\" + this.eventName + eventNameSuffix + \"->\" + this.identifier + \"#\" + this.methodName;\n };\n Object.defineProperty(Action.prototype, \"eventTargetName\", {\n get: function get() {\n return stringifyEventTarget(this.eventTarget);\n },\n enumerable: true,\n configurable: true\n });\n return Action;\n}();\nexport { Action };\nvar defaultEventNames = {\n \"a\": function a(e) {\n return \"click\";\n },\n \"button\": function button(e) {\n return \"click\";\n },\n \"form\": function form(e) {\n return \"submit\";\n },\n \"input\": function input(e) {\n return e.getAttribute(\"type\") == \"submit\" ? \"click\" : \"change\";\n },\n \"select\": function select(e) {\n return \"change\";\n },\n \"textarea\": function textarea(e) {\n return \"change\";\n }\n};\nexport function getDefaultEventNameForElement(element) {\n var tagName = element.tagName.toLowerCase();\n if (tagName in defaultEventNames) {\n return defaultEventNames[tagName](element);\n }\n}\nfunction error(message) {\n throw new Error(message);\n}","var Binding = /** @class */function () {\n function Binding(context, action) {\n this.context = context;\n this.action = action;\n }\n Object.defineProperty(Binding.prototype, \"index\", {\n get: function get() {\n return this.action.index;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"eventTarget\", {\n get: function get() {\n return this.action.eventTarget;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"identifier\", {\n get: function get() {\n return this.context.identifier;\n },\n enumerable: true,\n configurable: true\n });\n Binding.prototype.handleEvent = function (event) {\n if (this.willBeInvokedByEvent(event)) {\n this.invokeWithEvent(event);\n }\n };\n Object.defineProperty(Binding.prototype, \"eventName\", {\n get: function get() {\n return this.action.eventName;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"method\", {\n get: function get() {\n var method = this.controller[this.methodName];\n if (typeof method == \"function\") {\n return method;\n }\n throw new Error(\"Action \\\"\" + this.action + \"\\\" references undefined method \\\"\" + this.methodName + \"\\\"\");\n },\n enumerable: true,\n configurable: true\n });\n Binding.prototype.invokeWithEvent = function (event) {\n try {\n this.method.call(this.controller, event);\n } catch (error) {\n var _a = this,\n identifier = _a.identifier,\n controller = _a.controller,\n element = _a.element,\n index = _a.index;\n var detail = {\n identifier: identifier,\n controller: controller,\n element: element,\n index: index,\n event: event\n };\n this.context.handleError(error, \"invoking action \\\"\" + this.action + \"\\\"\", detail);\n }\n };\n Binding.prototype.willBeInvokedByEvent = function (event) {\n var eventTarget = event.target;\n if (this.element === eventTarget) {\n return true;\n } else if (eventTarget instanceof Element && this.element.contains(eventTarget)) {\n return this.scope.containsElement(eventTarget);\n } else {\n return true;\n }\n };\n Object.defineProperty(Binding.prototype, \"controller\", {\n get: function get() {\n return this.context.controller;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"methodName\", {\n get: function get() {\n return this.action.methodName;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"element\", {\n get: function get() {\n return this.scope.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"scope\", {\n get: function get() {\n return this.context.scope;\n },\n enumerable: true,\n configurable: true\n });\n return Binding;\n}();\nexport { Binding };","var ElementObserver = /** @class */function () {\n function ElementObserver(element, delegate) {\n var _this = this;\n this.element = element;\n this.started = false;\n this.delegate = delegate;\n this.elements = new Set();\n this.mutationObserver = new MutationObserver(function (mutations) {\n return _this.processMutations(mutations);\n });\n }\n ElementObserver.prototype.start = function () {\n if (!this.started) {\n this.started = true;\n this.mutationObserver.observe(this.element, {\n attributes: true,\n childList: true,\n subtree: true\n });\n this.refresh();\n }\n };\n ElementObserver.prototype.stop = function () {\n if (this.started) {\n this.mutationObserver.takeRecords();\n this.mutationObserver.disconnect();\n this.started = false;\n }\n };\n ElementObserver.prototype.refresh = function () {\n if (this.started) {\n var matches = new Set(this.matchElementsInTree());\n for (var _i = 0, _a = Array.from(this.elements); _i < _a.length; _i++) {\n var element = _a[_i];\n if (!matches.has(element)) {\n this.removeElement(element);\n }\n }\n for (var _b = 0, _c = Array.from(matches); _b < _c.length; _b++) {\n var element = _c[_b];\n this.addElement(element);\n }\n }\n };\n // Mutation record processing\n ElementObserver.prototype.processMutations = function (mutations) {\n if (this.started) {\n for (var _i = 0, mutations_1 = mutations; _i < mutations_1.length; _i++) {\n var mutation = mutations_1[_i];\n this.processMutation(mutation);\n }\n }\n };\n ElementObserver.prototype.processMutation = function (mutation) {\n if (mutation.type == \"attributes\") {\n this.processAttributeChange(mutation.target, mutation.attributeName);\n } else if (mutation.type == \"childList\") {\n this.processRemovedNodes(mutation.removedNodes);\n this.processAddedNodes(mutation.addedNodes);\n }\n };\n ElementObserver.prototype.processAttributeChange = function (node, attributeName) {\n var element = node;\n if (this.elements.has(element)) {\n if (this.delegate.elementAttributeChanged && this.matchElement(element)) {\n this.delegate.elementAttributeChanged(element, attributeName);\n } else {\n this.removeElement(element);\n }\n } else if (this.matchElement(element)) {\n this.addElement(element);\n }\n };\n ElementObserver.prototype.processRemovedNodes = function (nodes) {\n for (var _i = 0, _a = Array.from(nodes); _i < _a.length; _i++) {\n var node = _a[_i];\n var element = this.elementFromNode(node);\n if (element) {\n this.processTree(element, this.removeElement);\n }\n }\n };\n ElementObserver.prototype.processAddedNodes = function (nodes) {\n for (var _i = 0, _a = Array.from(nodes); _i < _a.length; _i++) {\n var node = _a[_i];\n var element = this.elementFromNode(node);\n if (element && this.elementIsActive(element)) {\n this.processTree(element, this.addElement);\n }\n }\n };\n // Element matching\n ElementObserver.prototype.matchElement = function (element) {\n return this.delegate.matchElement(element);\n };\n ElementObserver.prototype.matchElementsInTree = function (tree) {\n if (tree === void 0) {\n tree = this.element;\n }\n return this.delegate.matchElementsInTree(tree);\n };\n ElementObserver.prototype.processTree = function (tree, processor) {\n for (var _i = 0, _a = this.matchElementsInTree(tree); _i < _a.length; _i++) {\n var element = _a[_i];\n processor.call(this, element);\n }\n };\n ElementObserver.prototype.elementFromNode = function (node) {\n if (node.nodeType == Node.ELEMENT_NODE) {\n return node;\n }\n };\n ElementObserver.prototype.elementIsActive = function (element) {\n if (element.isConnected != this.element.isConnected) {\n return false;\n } else {\n return this.element.contains(element);\n }\n };\n // Element tracking\n ElementObserver.prototype.addElement = function (element) {\n if (!this.elements.has(element)) {\n if (this.elementIsActive(element)) {\n this.elements.add(element);\n if (this.delegate.elementMatched) {\n this.delegate.elementMatched(element);\n }\n }\n }\n };\n ElementObserver.prototype.removeElement = function (element) {\n if (this.elements.has(element)) {\n this.elements[\"delete\"](element);\n if (this.delegate.elementUnmatched) {\n this.delegate.elementUnmatched(element);\n }\n }\n };\n return ElementObserver;\n}();\nexport { ElementObserver };","import { ElementObserver } from \"./element_observer\";\nvar AttributeObserver = /** @class */function () {\n function AttributeObserver(element, attributeName, delegate) {\n this.attributeName = attributeName;\n this.delegate = delegate;\n this.elementObserver = new ElementObserver(element, this);\n }\n Object.defineProperty(AttributeObserver.prototype, \"element\", {\n get: function get() {\n return this.elementObserver.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AttributeObserver.prototype, \"selector\", {\n get: function get() {\n return \"[\" + this.attributeName + \"]\";\n },\n enumerable: true,\n configurable: true\n });\n AttributeObserver.prototype.start = function () {\n this.elementObserver.start();\n };\n AttributeObserver.prototype.stop = function () {\n this.elementObserver.stop();\n };\n AttributeObserver.prototype.refresh = function () {\n this.elementObserver.refresh();\n };\n Object.defineProperty(AttributeObserver.prototype, \"started\", {\n get: function get() {\n return this.elementObserver.started;\n },\n enumerable: true,\n configurable: true\n });\n // Element observer delegate\n AttributeObserver.prototype.matchElement = function (element) {\n return element.hasAttribute(this.attributeName);\n };\n AttributeObserver.prototype.matchElementsInTree = function (tree) {\n var match = this.matchElement(tree) ? [tree] : [];\n var matches = Array.from(tree.querySelectorAll(this.selector));\n return match.concat(matches);\n };\n AttributeObserver.prototype.elementMatched = function (element) {\n if (this.delegate.elementMatchedAttribute) {\n this.delegate.elementMatchedAttribute(element, this.attributeName);\n }\n };\n AttributeObserver.prototype.elementUnmatched = function (element) {\n if (this.delegate.elementUnmatchedAttribute) {\n this.delegate.elementUnmatchedAttribute(element, this.attributeName);\n }\n };\n AttributeObserver.prototype.elementAttributeChanged = function (element, attributeName) {\n if (this.delegate.elementAttributeValueChanged && this.attributeName == attributeName) {\n this.delegate.elementAttributeValueChanged(element, attributeName);\n }\n };\n return AttributeObserver;\n}();\nexport { AttributeObserver };","export function add(map, key, value) {\n fetch(map, key).add(value);\n}\nexport function del(map, key, value) {\n fetch(map, key)[\"delete\"](value);\n prune(map, key);\n}\nexport function fetch(map, key) {\n var values = map.get(key);\n if (!values) {\n values = new Set();\n map.set(key, values);\n }\n return values;\n}\nexport function prune(map, key) {\n var values = map.get(key);\n if (values != null && values.size == 0) {\n map[\"delete\"](key);\n }\n}","import { add, del } from \"./set_operations\";\nvar Multimap = /** @class */function () {\n function Multimap() {\n this.valuesByKey = new Map();\n }\n Object.defineProperty(Multimap.prototype, \"values\", {\n get: function get() {\n var sets = Array.from(this.valuesByKey.values());\n return sets.reduce(function (values, set) {\n return values.concat(Array.from(set));\n }, []);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Multimap.prototype, \"size\", {\n get: function get() {\n var sets = Array.from(this.valuesByKey.values());\n return sets.reduce(function (size, set) {\n return size + set.size;\n }, 0);\n },\n enumerable: true,\n configurable: true\n });\n Multimap.prototype.add = function (key, value) {\n add(this.valuesByKey, key, value);\n };\n Multimap.prototype[\"delete\"] = function (key, value) {\n del(this.valuesByKey, key, value);\n };\n Multimap.prototype.has = function (key, value) {\n var values = this.valuesByKey.get(key);\n return values != null && values.has(value);\n };\n Multimap.prototype.hasKey = function (key) {\n return this.valuesByKey.has(key);\n };\n Multimap.prototype.hasValue = function (value) {\n var sets = Array.from(this.valuesByKey.values());\n return sets.some(function (set) {\n return set.has(value);\n });\n };\n Multimap.prototype.getValuesForKey = function (key) {\n var values = this.valuesByKey.get(key);\n return values ? Array.from(values) : [];\n };\n Multimap.prototype.getKeysForValue = function (value) {\n return Array.from(this.valuesByKey).filter(function (_a) {\n var key = _a[0],\n values = _a[1];\n return values.has(value);\n }).map(function (_a) {\n var key = _a[0],\n values = _a[1];\n return key;\n });\n };\n return Multimap;\n}();\nexport { Multimap };","var __extends = this && this.__extends || function () {\n var extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport { Multimap } from \"./multimap\";\nimport { add, del } from \"./set_operations\";\nvar IndexedMultimap = /** @class */function (_super) {\n __extends(IndexedMultimap, _super);\n function IndexedMultimap() {\n var _this = _super.call(this) || this;\n _this.keysByValue = new Map();\n return _this;\n }\n Object.defineProperty(IndexedMultimap.prototype, \"values\", {\n get: function get() {\n return Array.from(this.keysByValue.keys());\n },\n enumerable: true,\n configurable: true\n });\n IndexedMultimap.prototype.add = function (key, value) {\n _super.prototype.add.call(this, key, value);\n add(this.keysByValue, value, key);\n };\n IndexedMultimap.prototype[\"delete\"] = function (key, value) {\n _super.prototype[\"delete\"].call(this, key, value);\n del(this.keysByValue, value, key);\n };\n IndexedMultimap.prototype.hasValue = function (value) {\n return this.keysByValue.has(value);\n };\n IndexedMultimap.prototype.getKeysForValue = function (value) {\n var set = this.keysByValue.get(value);\n return set ? Array.from(set) : [];\n };\n return IndexedMultimap;\n}(Multimap);\nexport { IndexedMultimap };","import { AttributeObserver } from \"./attribute_observer\";\nimport { Multimap } from \"@stimulus/multimap\";\nvar TokenListObserver = /** @class */function () {\n function TokenListObserver(element, attributeName, delegate) {\n this.attributeObserver = new AttributeObserver(element, attributeName, this);\n this.delegate = delegate;\n this.tokensByElement = new Multimap();\n }\n Object.defineProperty(TokenListObserver.prototype, \"started\", {\n get: function get() {\n return this.attributeObserver.started;\n },\n enumerable: true,\n configurable: true\n });\n TokenListObserver.prototype.start = function () {\n this.attributeObserver.start();\n };\n TokenListObserver.prototype.stop = function () {\n this.attributeObserver.stop();\n };\n TokenListObserver.prototype.refresh = function () {\n this.attributeObserver.refresh();\n };\n Object.defineProperty(TokenListObserver.prototype, \"element\", {\n get: function get() {\n return this.attributeObserver.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TokenListObserver.prototype, \"attributeName\", {\n get: function get() {\n return this.attributeObserver.attributeName;\n },\n enumerable: true,\n configurable: true\n });\n // Attribute observer delegate\n TokenListObserver.prototype.elementMatchedAttribute = function (element) {\n this.tokensMatched(this.readTokensForElement(element));\n };\n TokenListObserver.prototype.elementAttributeValueChanged = function (element) {\n var _a = this.refreshTokensForElement(element),\n unmatchedTokens = _a[0],\n matchedTokens = _a[1];\n this.tokensUnmatched(unmatchedTokens);\n this.tokensMatched(matchedTokens);\n };\n TokenListObserver.prototype.elementUnmatchedAttribute = function (element) {\n this.tokensUnmatched(this.tokensByElement.getValuesForKey(element));\n };\n TokenListObserver.prototype.tokensMatched = function (tokens) {\n var _this = this;\n tokens.forEach(function (token) {\n return _this.tokenMatched(token);\n });\n };\n TokenListObserver.prototype.tokensUnmatched = function (tokens) {\n var _this = this;\n tokens.forEach(function (token) {\n return _this.tokenUnmatched(token);\n });\n };\n TokenListObserver.prototype.tokenMatched = function (token) {\n this.delegate.tokenMatched(token);\n this.tokensByElement.add(token.element, token);\n };\n TokenListObserver.prototype.tokenUnmatched = function (token) {\n this.delegate.tokenUnmatched(token);\n this.tokensByElement[\"delete\"](token.element, token);\n };\n TokenListObserver.prototype.refreshTokensForElement = function (element) {\n var previousTokens = this.tokensByElement.getValuesForKey(element);\n var currentTokens = this.readTokensForElement(element);\n var firstDifferingIndex = zip(previousTokens, currentTokens).findIndex(function (_a) {\n var previousToken = _a[0],\n currentToken = _a[1];\n return !tokensAreEqual(previousToken, currentToken);\n });\n if (firstDifferingIndex == -1) {\n return [[], []];\n } else {\n return [previousTokens.slice(firstDifferingIndex), currentTokens.slice(firstDifferingIndex)];\n }\n };\n TokenListObserver.prototype.readTokensForElement = function (element) {\n var attributeName = this.attributeName;\n var tokenString = element.getAttribute(attributeName) || \"\";\n return parseTokenString(tokenString, element, attributeName);\n };\n return TokenListObserver;\n}();\nexport { TokenListObserver };\nfunction parseTokenString(tokenString, element, attributeName) {\n return tokenString.trim().split(/\\s+/).filter(function (content) {\n return content.length;\n }).map(function (content, index) {\n return {\n element: element,\n attributeName: attributeName,\n content: content,\n index: index\n };\n });\n}\nfunction zip(left, right) {\n var length = Math.max(left.length, right.length);\n return Array.from({\n length: length\n }, function (_, index) {\n return [left[index], right[index]];\n });\n}\nfunction tokensAreEqual(left, right) {\n return left && right && left.index == right.index && left.content == right.content;\n}","import { TokenListObserver } from \"./token_list_observer\";\nvar ValueListObserver = /** @class */function () {\n function ValueListObserver(element, attributeName, delegate) {\n this.tokenListObserver = new TokenListObserver(element, attributeName, this);\n this.delegate = delegate;\n this.parseResultsByToken = new WeakMap();\n this.valuesByTokenByElement = new WeakMap();\n }\n Object.defineProperty(ValueListObserver.prototype, \"started\", {\n get: function get() {\n return this.tokenListObserver.started;\n },\n enumerable: true,\n configurable: true\n });\n ValueListObserver.prototype.start = function () {\n this.tokenListObserver.start();\n };\n ValueListObserver.prototype.stop = function () {\n this.tokenListObserver.stop();\n };\n ValueListObserver.prototype.refresh = function () {\n this.tokenListObserver.refresh();\n };\n Object.defineProperty(ValueListObserver.prototype, \"element\", {\n get: function get() {\n return this.tokenListObserver.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValueListObserver.prototype, \"attributeName\", {\n get: function get() {\n return this.tokenListObserver.attributeName;\n },\n enumerable: true,\n configurable: true\n });\n ValueListObserver.prototype.tokenMatched = function (token) {\n var element = token.element;\n var value = this.fetchParseResultForToken(token).value;\n if (value) {\n this.fetchValuesByTokenForElement(element).set(token, value);\n this.delegate.elementMatchedValue(element, value);\n }\n };\n ValueListObserver.prototype.tokenUnmatched = function (token) {\n var element = token.element;\n var value = this.fetchParseResultForToken(token).value;\n if (value) {\n this.fetchValuesByTokenForElement(element)[\"delete\"](token);\n this.delegate.elementUnmatchedValue(element, value);\n }\n };\n ValueListObserver.prototype.fetchParseResultForToken = function (token) {\n var parseResult = this.parseResultsByToken.get(token);\n if (!parseResult) {\n parseResult = this.parseToken(token);\n this.parseResultsByToken.set(token, parseResult);\n }\n return parseResult;\n };\n ValueListObserver.prototype.fetchValuesByTokenForElement = function (element) {\n var valuesByToken = this.valuesByTokenByElement.get(element);\n if (!valuesByToken) {\n valuesByToken = new Map();\n this.valuesByTokenByElement.set(element, valuesByToken);\n }\n return valuesByToken;\n };\n ValueListObserver.prototype.parseToken = function (token) {\n try {\n var value = this.delegate.parseValueForToken(token);\n return {\n value: value\n };\n } catch (error) {\n return {\n error: error\n };\n }\n };\n return ValueListObserver;\n}();\nexport { ValueListObserver };","import { Action } from \"./action\";\nimport { Binding } from \"./binding\";\nimport { ValueListObserver } from \"@stimulus/mutation-observers\";\nvar BindingObserver = /** @class */function () {\n function BindingObserver(context, delegate) {\n this.context = context;\n this.delegate = delegate;\n this.bindingsByAction = new Map();\n }\n BindingObserver.prototype.start = function () {\n if (!this.valueListObserver) {\n this.valueListObserver = new ValueListObserver(this.element, this.actionAttribute, this);\n this.valueListObserver.start();\n }\n };\n BindingObserver.prototype.stop = function () {\n if (this.valueListObserver) {\n this.valueListObserver.stop();\n delete this.valueListObserver;\n this.disconnectAllActions();\n }\n };\n Object.defineProperty(BindingObserver.prototype, \"element\", {\n get: function get() {\n return this.context.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BindingObserver.prototype, \"identifier\", {\n get: function get() {\n return this.context.identifier;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BindingObserver.prototype, \"actionAttribute\", {\n get: function get() {\n return this.schema.actionAttribute;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BindingObserver.prototype, \"schema\", {\n get: function get() {\n return this.context.schema;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BindingObserver.prototype, \"bindings\", {\n get: function get() {\n return Array.from(this.bindingsByAction.values());\n },\n enumerable: true,\n configurable: true\n });\n BindingObserver.prototype.connectAction = function (action) {\n var binding = new Binding(this.context, action);\n this.bindingsByAction.set(action, binding);\n this.delegate.bindingConnected(binding);\n };\n BindingObserver.prototype.disconnectAction = function (action) {\n var binding = this.bindingsByAction.get(action);\n if (binding) {\n this.bindingsByAction[\"delete\"](action);\n this.delegate.bindingDisconnected(binding);\n }\n };\n BindingObserver.prototype.disconnectAllActions = function () {\n var _this = this;\n this.bindings.forEach(function (binding) {\n return _this.delegate.bindingDisconnected(binding);\n });\n this.bindingsByAction.clear();\n };\n // Value observer delegate\n BindingObserver.prototype.parseValueForToken = function (token) {\n var action = Action.forToken(token);\n if (action.identifier == this.identifier) {\n return action;\n }\n };\n BindingObserver.prototype.elementMatchedValue = function (element, action) {\n this.connectAction(action);\n };\n BindingObserver.prototype.elementUnmatchedValue = function (element, action) {\n this.disconnectAction(action);\n };\n return BindingObserver;\n}();\nexport { BindingObserver };","import { BindingObserver } from \"./binding_observer\";\nvar Context = /** @class */function () {\n function Context(module, scope) {\n this.module = module;\n this.scope = scope;\n this.controller = new module.controllerConstructor(this);\n this.bindingObserver = new BindingObserver(this, this.dispatcher);\n try {\n this.controller.initialize();\n } catch (error) {\n this.handleError(error, \"initializing controller\");\n }\n }\n Context.prototype.connect = function () {\n this.bindingObserver.start();\n try {\n this.controller.connect();\n } catch (error) {\n this.handleError(error, \"connecting controller\");\n }\n };\n Context.prototype.disconnect = function () {\n try {\n this.controller.disconnect();\n } catch (error) {\n this.handleError(error, \"disconnecting controller\");\n }\n this.bindingObserver.stop();\n };\n Object.defineProperty(Context.prototype, \"application\", {\n get: function get() {\n return this.module.application;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"identifier\", {\n get: function get() {\n return this.module.identifier;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"schema\", {\n get: function get() {\n return this.application.schema;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"dispatcher\", {\n get: function get() {\n return this.application.dispatcher;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"element\", {\n get: function get() {\n return this.scope.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"parentElement\", {\n get: function get() {\n return this.element.parentElement;\n },\n enumerable: true,\n configurable: true\n });\n // Error handling\n Context.prototype.handleError = function (error, message, detail) {\n if (detail === void 0) {\n detail = {};\n }\n var _a = this,\n identifier = _a.identifier,\n controller = _a.controller,\n element = _a.element;\n detail = Object.assign({\n identifier: identifier,\n controller: controller,\n element: element\n }, detail);\n this.application.handleError(error, \"Error \" + message, detail);\n };\n return Context;\n}();\nexport { Context };","var __extends = this && this.__extends || function () {\n var extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nexport function blessDefinition(definition) {\n return {\n identifier: definition.identifier,\n controllerConstructor: blessControllerConstructor(definition.controllerConstructor)\n };\n}\nfunction blessControllerConstructor(controllerConstructor) {\n var constructor = extend(controllerConstructor);\n constructor.bless();\n return constructor;\n}\nvar extend = function () {\n function extendWithReflect(constructor) {\n function Controller() {\n var _newTarget = this && this instanceof Controller ? this.constructor : void 0;\n return Reflect.construct(constructor, arguments, _newTarget);\n }\n Controller.prototype = Object.create(constructor.prototype, {\n constructor: {\n value: Controller\n }\n });\n Reflect.setPrototypeOf(Controller, constructor);\n return Controller;\n }\n function testReflectExtension() {\n var a = function a() {\n this.a.call(this);\n };\n var b = extendWithReflect(a);\n b.prototype.a = function () {};\n return new b();\n }\n try {\n testReflectExtension();\n return extendWithReflect;\n } catch (error) {\n return function (constructor) {\n return /** @class */function (_super) {\n __extends(Controller, _super);\n function Controller() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Controller;\n }(constructor);\n };\n }\n}();","import { Context } from \"./context\";\nimport { blessDefinition } from \"./definition\";\nvar Module = /** @class */function () {\n function Module(application, definition) {\n this.application = application;\n this.definition = blessDefinition(definition);\n this.contextsByScope = new WeakMap();\n this.connectedContexts = new Set();\n }\n Object.defineProperty(Module.prototype, \"identifier\", {\n get: function get() {\n return this.definition.identifier;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Module.prototype, \"controllerConstructor\", {\n get: function get() {\n return this.definition.controllerConstructor;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Module.prototype, \"contexts\", {\n get: function get() {\n return Array.from(this.connectedContexts);\n },\n enumerable: true,\n configurable: true\n });\n Module.prototype.connectContextForScope = function (scope) {\n var context = this.fetchContextForScope(scope);\n this.connectedContexts.add(context);\n context.connect();\n };\n Module.prototype.disconnectContextForScope = function (scope) {\n var context = this.contextsByScope.get(scope);\n if (context) {\n this.connectedContexts[\"delete\"](context);\n context.disconnect();\n }\n };\n Module.prototype.fetchContextForScope = function (scope) {\n var context = this.contextsByScope.get(scope);\n if (!context) {\n context = new Context(this, scope);\n this.contextsByScope.set(scope, context);\n }\n return context;\n };\n return Module;\n}();\nexport { Module };","var DataMap = /** @class */function () {\n function DataMap(scope) {\n this.scope = scope;\n }\n Object.defineProperty(DataMap.prototype, \"element\", {\n get: function get() {\n return this.scope.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataMap.prototype, \"identifier\", {\n get: function get() {\n return this.scope.identifier;\n },\n enumerable: true,\n configurable: true\n });\n DataMap.prototype.get = function (key) {\n key = this.getFormattedKey(key);\n return this.element.getAttribute(key);\n };\n DataMap.prototype.set = function (key, value) {\n key = this.getFormattedKey(key);\n this.element.setAttribute(key, value);\n return this.get(key);\n };\n DataMap.prototype.has = function (key) {\n key = this.getFormattedKey(key);\n return this.element.hasAttribute(key);\n };\n DataMap.prototype[\"delete\"] = function (key) {\n if (this.has(key)) {\n key = this.getFormattedKey(key);\n this.element.removeAttribute(key);\n return true;\n } else {\n return false;\n }\n };\n DataMap.prototype.getFormattedKey = function (key) {\n return \"data-\" + this.identifier + \"-\" + dasherize(key);\n };\n return DataMap;\n}();\nexport { DataMap };\nfunction dasherize(value) {\n return value.replace(/([A-Z])/g, function (_, _char) {\n return \"-\" + _char.toLowerCase();\n });\n}","/** @private */\nexport function attributeValueContainsToken(attributeName, token) {\n return \"[\" + attributeName + \"~=\\\"\" + token + \"\\\"]\";\n}","import { attributeValueContainsToken } from \"./selectors\";\nvar TargetSet = /** @class */function () {\n function TargetSet(scope) {\n this.scope = scope;\n }\n Object.defineProperty(TargetSet.prototype, \"element\", {\n get: function get() {\n return this.scope.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TargetSet.prototype, \"identifier\", {\n get: function get() {\n return this.scope.identifier;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TargetSet.prototype, \"schema\", {\n get: function get() {\n return this.scope.schema;\n },\n enumerable: true,\n configurable: true\n });\n TargetSet.prototype.has = function (targetName) {\n return this.find(targetName) != null;\n };\n TargetSet.prototype.find = function () {\n var targetNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n targetNames[_i] = arguments[_i];\n }\n var selector = this.getSelectorForTargetNames(targetNames);\n return this.scope.findElement(selector);\n };\n TargetSet.prototype.findAll = function () {\n var targetNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n targetNames[_i] = arguments[_i];\n }\n var selector = this.getSelectorForTargetNames(targetNames);\n return this.scope.findAllElements(selector);\n };\n TargetSet.prototype.getSelectorForTargetNames = function (targetNames) {\n var _this = this;\n return targetNames.map(function (targetName) {\n return _this.getSelectorForTargetName(targetName);\n }).join(\", \");\n };\n TargetSet.prototype.getSelectorForTargetName = function (targetName) {\n var targetDescriptor = this.identifier + \".\" + targetName;\n return attributeValueContainsToken(this.schema.targetAttribute, targetDescriptor);\n };\n return TargetSet;\n}();\nexport { TargetSet };","import { DataMap } from \"./data_map\";\nimport { TargetSet } from \"./target_set\";\nimport { attributeValueContainsToken } from \"./selectors\";\nvar Scope = /** @class */function () {\n function Scope(schema, identifier, element) {\n this.schema = schema;\n this.identifier = identifier;\n this.element = element;\n this.targets = new TargetSet(this);\n this.data = new DataMap(this);\n }\n Scope.prototype.findElement = function (selector) {\n return this.findAllElements(selector)[0];\n };\n Scope.prototype.findAllElements = function (selector) {\n var head = this.element.matches(selector) ? [this.element] : [];\n var tail = this.filterElements(Array.from(this.element.querySelectorAll(selector)));\n return head.concat(tail);\n };\n Scope.prototype.filterElements = function (elements) {\n var _this = this;\n return elements.filter(function (element) {\n return _this.containsElement(element);\n });\n };\n Scope.prototype.containsElement = function (element) {\n return element.closest(this.controllerSelector) === this.element;\n };\n Object.defineProperty(Scope.prototype, \"controllerSelector\", {\n get: function get() {\n return attributeValueContainsToken(this.schema.controllerAttribute, this.identifier);\n },\n enumerable: true,\n configurable: true\n });\n return Scope;\n}();\nexport { Scope };","import { Scope } from \"./scope\";\nimport { ValueListObserver } from \"@stimulus/mutation-observers\";\nvar ScopeObserver = /** @class */function () {\n function ScopeObserver(element, schema, delegate) {\n this.element = element;\n this.schema = schema;\n this.delegate = delegate;\n this.valueListObserver = new ValueListObserver(this.element, this.controllerAttribute, this);\n this.scopesByIdentifierByElement = new WeakMap();\n this.scopeReferenceCounts = new WeakMap();\n }\n ScopeObserver.prototype.start = function () {\n this.valueListObserver.start();\n };\n ScopeObserver.prototype.stop = function () {\n this.valueListObserver.stop();\n };\n Object.defineProperty(ScopeObserver.prototype, \"controllerAttribute\", {\n get: function get() {\n return this.schema.controllerAttribute;\n },\n enumerable: true,\n configurable: true\n });\n // Value observer delegate\n ScopeObserver.prototype.parseValueForToken = function (token) {\n var element = token.element,\n identifier = token.content;\n var scopesByIdentifier = this.fetchScopesByIdentifierForElement(element);\n var scope = scopesByIdentifier.get(identifier);\n if (!scope) {\n scope = new Scope(this.schema, identifier, element);\n scopesByIdentifier.set(identifier, scope);\n }\n return scope;\n };\n ScopeObserver.prototype.elementMatchedValue = function (element, value) {\n var referenceCount = (this.scopeReferenceCounts.get(value) || 0) + 1;\n this.scopeReferenceCounts.set(value, referenceCount);\n if (referenceCount == 1) {\n this.delegate.scopeConnected(value);\n }\n };\n ScopeObserver.prototype.elementUnmatchedValue = function (element, value) {\n var referenceCount = this.scopeReferenceCounts.get(value);\n if (referenceCount) {\n this.scopeReferenceCounts.set(value, referenceCount - 1);\n if (referenceCount == 1) {\n this.delegate.scopeDisconnected(value);\n }\n }\n };\n ScopeObserver.prototype.fetchScopesByIdentifierForElement = function (element) {\n var scopesByIdentifier = this.scopesByIdentifierByElement.get(element);\n if (!scopesByIdentifier) {\n scopesByIdentifier = new Map();\n this.scopesByIdentifierByElement.set(element, scopesByIdentifier);\n }\n return scopesByIdentifier;\n };\n return ScopeObserver;\n}();\nexport { ScopeObserver };","import { Module } from \"./module\";\nimport { Multimap } from \"@stimulus/multimap\";\nimport { ScopeObserver } from \"./scope_observer\";\nvar Router = /** @class */function () {\n function Router(application) {\n this.application = application;\n this.scopeObserver = new ScopeObserver(this.element, this.schema, this);\n this.scopesByIdentifier = new Multimap();\n this.modulesByIdentifier = new Map();\n }\n Object.defineProperty(Router.prototype, \"element\", {\n get: function get() {\n return this.application.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"schema\", {\n get: function get() {\n return this.application.schema;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"controllerAttribute\", {\n get: function get() {\n return this.schema.controllerAttribute;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"modules\", {\n get: function get() {\n return Array.from(this.modulesByIdentifier.values());\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"contexts\", {\n get: function get() {\n return this.modules.reduce(function (contexts, module) {\n return contexts.concat(module.contexts);\n }, []);\n },\n enumerable: true,\n configurable: true\n });\n Router.prototype.start = function () {\n this.scopeObserver.start();\n };\n Router.prototype.stop = function () {\n this.scopeObserver.stop();\n };\n Router.prototype.loadDefinition = function (definition) {\n this.unloadIdentifier(definition.identifier);\n var module = new Module(this.application, definition);\n this.connectModule(module);\n };\n Router.prototype.unloadIdentifier = function (identifier) {\n var module = this.modulesByIdentifier.get(identifier);\n if (module) {\n this.disconnectModule(module);\n }\n };\n Router.prototype.getContextForElementAndIdentifier = function (element, identifier) {\n var module = this.modulesByIdentifier.get(identifier);\n if (module) {\n return module.contexts.find(function (context) {\n return context.element == element;\n });\n }\n };\n // Error handler delegate\n /** @private */\n Router.prototype.handleError = function (error, message, detail) {\n this.application.handleError(error, message, detail);\n };\n // Scope observer delegate\n /** @private */\n Router.prototype.scopeConnected = function (scope) {\n this.scopesByIdentifier.add(scope.identifier, scope);\n var module = this.modulesByIdentifier.get(scope.identifier);\n if (module) {\n module.connectContextForScope(scope);\n }\n };\n /** @private */\n Router.prototype.scopeDisconnected = function (scope) {\n this.scopesByIdentifier[\"delete\"](scope.identifier, scope);\n var module = this.modulesByIdentifier.get(scope.identifier);\n if (module) {\n module.disconnectContextForScope(scope);\n }\n };\n // Modules\n Router.prototype.connectModule = function (module) {\n this.modulesByIdentifier.set(module.identifier, module);\n var scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n scopes.forEach(function (scope) {\n return module.connectContextForScope(scope);\n });\n };\n Router.prototype.disconnectModule = function (module) {\n this.modulesByIdentifier[\"delete\"](module.identifier);\n var scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n scopes.forEach(function (scope) {\n return module.disconnectContextForScope(scope);\n });\n };\n return Router;\n}();\nexport { Router };","export var defaultSchema = {\n controllerAttribute: \"data-controller\",\n actionAttribute: \"data-action\",\n targetAttribute: \"data-target\"\n};","var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : new P(function (resolve) {\n resolve(result.value);\n }).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [0, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n};\nimport { Dispatcher } from \"./dispatcher\";\nimport { Router } from \"./router\";\nimport { defaultSchema } from \"./schema\";\nvar Application = /** @class */function () {\n function Application(element, schema) {\n if (element === void 0) {\n element = document.documentElement;\n }\n if (schema === void 0) {\n schema = defaultSchema;\n }\n this.element = element;\n this.schema = schema;\n this.dispatcher = new Dispatcher(this);\n this.router = new Router(this);\n }\n Application.start = function (element, schema) {\n var application = new Application(element, schema);\n application.start();\n return application;\n };\n Application.prototype.start = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, domReady()];\n case 1:\n _a.sent();\n this.router.start();\n this.dispatcher.start();\n return [2 /*return*/];\n }\n });\n });\n };\n Application.prototype.stop = function () {\n this.router.stop();\n this.dispatcher.stop();\n };\n Application.prototype.register = function (identifier, controllerConstructor) {\n this.load({\n identifier: identifier,\n controllerConstructor: controllerConstructor\n });\n };\n Application.prototype.load = function (head) {\n var _this = this;\n var rest = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n rest[_i - 1] = arguments[_i];\n }\n var definitions = Array.isArray(head) ? head : [head].concat(rest);\n definitions.forEach(function (definition) {\n return _this.router.loadDefinition(definition);\n });\n };\n Application.prototype.unload = function (head) {\n var _this = this;\n var rest = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n rest[_i - 1] = arguments[_i];\n }\n var identifiers = Array.isArray(head) ? head : [head].concat(rest);\n identifiers.forEach(function (identifier) {\n return _this.router.unloadIdentifier(identifier);\n });\n };\n Object.defineProperty(Application.prototype, \"controllers\", {\n // Controllers\n get: function get() {\n return this.router.contexts.map(function (context) {\n return context.controller;\n });\n },\n enumerable: true,\n configurable: true\n });\n Application.prototype.getControllerForElementAndIdentifier = function (element, identifier) {\n var context = this.router.getContextForElementAndIdentifier(element, identifier);\n return context ? context.controller : null;\n };\n // Error handling\n Application.prototype.handleError = function (error, message, detail) {\n console.error(\"%s\\n\\n%o\\n\\n%o\", message, error, detail);\n };\n return Application;\n}();\nexport { Application };\nfunction domReady() {\n return new Promise(function (resolve) {\n if (document.readyState == \"loading\") {\n document.addEventListener(\"DOMContentLoaded\", resolve);\n } else {\n resolve();\n }\n });\n}","export function defineTargetProperties(constructor) {\n var prototype = constructor.prototype;\n var targetNames = getTargetNamesForConstructor(constructor);\n targetNames.forEach(function (name) {\n var _a;\n return defineLinkedProperties(prototype, (_a = {}, _a[name + \"Target\"] = {\n get: function get() {\n var target = this.targets.find(name);\n if (target) {\n return target;\n } else {\n throw new Error(\"Missing target element \\\"\" + this.identifier + \".\" + name + \"\\\"\");\n }\n }\n }, _a[name + \"Targets\"] = {\n get: function get() {\n return this.targets.findAll(name);\n }\n }, _a[\"has\" + capitalize(name) + \"Target\"] = {\n get: function get() {\n return this.targets.has(name);\n }\n }, _a));\n });\n}\nfunction getTargetNamesForConstructor(constructor) {\n var ancestors = getAncestorsForConstructor(constructor);\n return Array.from(ancestors.reduce(function (targetNames, constructor) {\n getOwnTargetNamesForConstructor(constructor).forEach(function (name) {\n return targetNames.add(name);\n });\n return targetNames;\n }, new Set()));\n}\nfunction getAncestorsForConstructor(constructor) {\n var ancestors = [];\n while (constructor) {\n ancestors.push(constructor);\n constructor = Object.getPrototypeOf(constructor);\n }\n return ancestors;\n}\nfunction getOwnTargetNamesForConstructor(constructor) {\n var definition = constructor[\"targets\"];\n return Array.isArray(definition) ? definition : [];\n}\nfunction defineLinkedProperties(object, properties) {\n Object.keys(properties).forEach(function (name) {\n if (!(name in object)) {\n var descriptor = properties[name];\n Object.defineProperty(object, name, descriptor);\n }\n });\n}\nfunction capitalize(name) {\n return name.charAt(0).toUpperCase() + name.slice(1);\n}","import { defineTargetProperties } from \"./target_properties\";\nvar Controller = /** @class */function () {\n function Controller(context) {\n this.context = context;\n }\n Controller.bless = function () {\n defineTargetProperties(this);\n };\n Object.defineProperty(Controller.prototype, \"application\", {\n get: function get() {\n return this.context.application;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"scope\", {\n get: function get() {\n return this.context.scope;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"element\", {\n get: function get() {\n return this.scope.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"identifier\", {\n get: function get() {\n return this.scope.identifier;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"targets\", {\n get: function get() {\n return this.scope.targets;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"data\", {\n get: function get() {\n return this.scope.data;\n },\n enumerable: true,\n configurable: true\n });\n Controller.prototype.initialize = function () {\n // Override in your subclass to set up initial controller state\n };\n Controller.prototype.connect = function () {\n // Override in your subclass to respond when the controller is connected to the DOM\n };\n Controller.prototype.disconnect = function () {\n // Override in your subclass to respond when the controller is disconnected from the DOM\n };\n Controller.targets = [];\n return Controller;\n}();\nexport { Controller };","/**\r\n * A collection of String-based constants.\r\n * @hidden\r\n * @ignore Exclude from docs\r\n */\n/**\r\n * @ignore Exclude from docs\r\n */\nexport var PX = \"px\";\n/**\r\n * @ignore Exclude from docs\r\n */\nexport var STRING = \"string\";\n/**\r\n * @ignore Exclude from docs\r\n */\nexport var NUMBER = \"number\";\n/**\r\n * @ignore Exclude from docs\r\n */\nexport var DATE = \"date\";\n/**\r\n * @ignore Exclude from docs\r\n */\nexport var DURATION = \"duration\";\n/**\r\n * @ignore Exclude from docs\r\n */\nexport var PLACEHOLDER = \"__§§§__\";\n/**\r\n * @ignore Exclude from docs\r\n */\nexport var PLACEHOLDER2 = \"__§§§§__\";","import actions from './actions'\nimport { push } from 'connected-react-router'\nimport { orderedSectionIds } from '../components/sections'\nimport { getRoomData } from '../rooms/selectors'\nimport { getBinData } from '../bins/selectors'\nimport { getBulkContainmentData } from '../bulkContainments/selectors'\nimport { submitSection } from '../sections/operations'\nimport _ from 'lodashExtended'\nimport submitToServer from 'submitToServer'\nimport path from 'path'\n\nconst goToNextSectionPath = (sectionId) => (dispatch, getState, { getFirebase, getFirestore}) => {\n\n const state = getState()\n var nextSectionId\n\n const index = _.indexOf(orderedSectionIds, sectionId)\n\n if(index != -1 ) {\n nextSectionId = orderedSectionIds[index + 1]\n }\n\n if(nextSectionId) {\n dispatch(push(`/section/${nextSectionId}`))\n } else {\n dispatch(push('/'))\n }\n\n}\n\nconst goToSummaryPage = () => (dispatch, getState) => {\n _(orderedSectionIds).each((sectionId) => dispatch(submitSection(sectionId, false)))\n dispatch(push(\"/submitSummary\"))\n}\n\n\nconst goToEditBinPhotoPath = (binId, attribute) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n\n var subpath\n\n if(attribute == 'exteriorPhoto') {\n subpath = 'takeExteriorPhoto'\n } else if(attribute == 'interiorPhoto') {\n subpath = 'takeInteriorPhoto'\n }\n\n if(subpath) {\n dispatch(goToEditBinPath(binId, subpath))\n }\n}\n\n\nconst goToEditBinPath = (binId, subpath) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const x = getBinData\n const { sectionId, roomId } = getBinData(binId, state)\n\n if(roomId) {\n dispatch(push(`/section/${sectionId}/rooms/${roomId}/bins/${binId}/edit/${subpath}`))\n } else {\n dispatch(push(`/section/${sectionId}/bins/${binId}/edit/${subpath}`))\n }\n}\n\n\n\nconst goToEditBulkContainmentPhotoPath = (bulkContainmentId, attribute) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n\n var subpath\n\n if(attribute == 'bulkStorageAreaPhoto') {\n subpath = 'takeBulkStorageAreaPhoto'\n }\n\n if(subpath) {\n dispatch(goToEditBulkContainmentPath(bulkContainmentId, subpath))\n }\n}\n\n\nconst goToEditBulkContainmentPath = (bulkContainmentId, subpath) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const x = getBinData\n const { sectionId } = getBulkContainmentData(bulkContainmentId, state)\n dispatch(push(`/section/${sectionId}/bulkContainments/${bulkContainmentId}/edit/${subpath}`))\n}\n\nconst goToEditRoomPath = (roomId) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const x = getRoomData\n const { sectionId } = getRoomData(roomId, state)\n\n if(sectionId) {\n dispatch(push(`/section/${sectionId}/rooms/${roomId}/edit`))\n }\n}\n\n\nconst submitAudit = (successPath) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const submitPath = state.app.submitPath\n\n submitToServer(submitPath, { } ,\n (data,v) => {\n dispatch(push(successPath))\n },\n (data, status) => {\n }, { method: 'POST' })\n\n console.log('submit')\n}\n\nconst switchDevice = (switchDevicePath, method, methodValue) => (dispatch, getState) => {\n\n const state = getState()\n const submitPath = state.app.switchDevicePath\n\n submitToServer(submitPath, { switchDevicePath, method, methodValue },\n (data,v) => {\n },\n (data, status) => {\n alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`)\n }, { method: 'POST' })\n\n}\n\nconst getHelp = (email, sectionIds, comment) => (dispatch, getState) => {\n\n const state = getState()\n const submitPath = state.app.getHelpPath\n\n submitToServer(submitPath, { wasteAuditHelpRequest: { email, sectionIds, comment } } ,\n (data,v) => {\n },\n (data, status) => {\n alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`)\n }, { method: 'POST' })\n\n}\n\nconst uploadSubcollectionImage = (attributeName, documentId, image, subcollection) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const firebase = getFirebase()\n\n const { auditDocumentId } = state.app\n\n const collection = `waste_audits/${auditDocumentId}/${subcollection}`\n const storagePath = `${collection}/${documentId}/${attributeName}`\n\n if(image) {\n firebase.uploadFile(storagePath, image, collection, {\n metadataFactory: (uploadRes, firebase, metadata, downloadURL) => {\n var p = path\n\n let extension = p.extname(metadata.name)\n let regex = new RegExp(`\\\\${extension}$`)\n let basename = metadata.name.replace(regex,'')\n\n //Files get converted to png on the server, so rename extension here\n var otherVersions = { }\n _.each({\n thumb: '200x200',\n modal: '300x400',\n },(dimensions, name) => {\n otherVersions[name] = {}\n otherVersions[name].url = downloadURL.replace(encodeURIComponent(metadata.name),`${encodeURIComponent(basename)}_${dimensions}.png`)\n otherVersions[name].fullPath = metadata.fullPath.replace(metadata.name,`${basename}_${dimensions}.png`)\n } )\n\n const newDownloadURL = downloadURL.replace(encodeURIComponent(metadata.name),`${encodeURIComponent(basename)}.png`)\n return { [attributeName]: { url: downloadURL, otherVersions, name: metadata.name, metadata: _.omitBy(metadata, _.isBlank) } }\n },\n documentId,\n progress: true,\n storeProgressAt: `${subcollection}/${documentId}/${attributeName}`\n })\n .then((snap) => {\n console.log('upload successful', snap)})\n .catch((err) => {\n console.error('error uploading image', err)\n })\n\n }\n}\n\nconst deleteSubcollectionImage = (attributeName, documentId, image, subcollection) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const firebase = getFirebase()\n\n const { auditDocumentId } = state.app\n\n const collection = `waste_audits/${auditDocumentId}/${subcollection}`\n const storagePath = `${collection}/${documentId}`\n\n if(image) {\n dispatch(updateSubcollection(documentId, {[attributeName]: null}, subcollection))\n\n _([image.metadata.fullPath, _.map(image.otherVersions, 'fullPath')]).flatten().compact().each((fullPath) => {\n firebase.deleteFile(fullPath).then((snap) => {\n console.log('delete successful', snap)})\n .catch((err) => {\n console.error('error deleting image', err)\n })\n })\n\n }\n}\n\n\nconst updateSubcollection = (documentId, args, subcollection) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const firestore = getFirestore()\n\n if(args.storageTypeId) {\n args.storageType = getStorageType(args.storageTypeId, state)\n args.containerType = null\n args.containerTypeId = null\n }\n\n if(args.containerTypeId) {\n args.containerType = getInternalContainerType(args.containerTypeId, state)\n }\n\n firestore.set(\n {\n collection: 'waste_audits',\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: subcollection, doc: documentId }],\n },\n args,\n {merge: true}\n )\n\n}\n\n\n\n\nexport {\n goToEditBinPath,\n goToEditBinPhotoPath,\n goToNextSectionPath,\n goToEditRoomPath,\n goToEditBulkContainmentPath,\n goToEditBulkContainmentPhotoPath,\n submitAudit,\n switchDevice,\n getHelp,\n goToSummaryPage,\n uploadSubcollectionImage,\n deleteSubcollectionImage,\n updateSubcollection\n}\n\n\n\n\n","import { faExclamationCircle } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { SummaryRow } from 'auditComponents';\n\n\n// This is used for a custom error message used explicitly for PAWA\nexport const CustomSummaryRow = (props) => (\n <SummaryRow\n defaultValue={\n props.notRequired ? (\n <div></div>\n ) : (\n <span>\n <FontAwesomeIcon className=\"text-danger\" icon={faExclamationCircle} />{\" \"}\n <span className=\"text-danger\">\n Please provide the answer. All answers are required!\n </span>\n </span>\n )\n }\n {...props}\n />\n);\n\n\n// This is used to flag errors in a custom format\nexport const SubmitSummaryRowWithValidation = ({ label, children, value, validator }) => {\n const validationResult = validator?.(value)\n const validation = validationResult && (\n <span>\n <FontAwesomeIcon className=\"text-danger\" icon={faExclamationCircle} />{\" \"}\n <span className=\"text-danger\">\n {validationResult}\n </span>\n </span>\n );\n\n return (\n <div className=\"summary__row\">\n <div className=\"summary__row--label col-12\">{label}</div>\n <div className=\"summary__row--value col-md-9 col-sm-8 col-12\">\n {value != null ? value : children } {validation}\n </div>\n </div>\n );\n};\n","import { createAction } from \"redux-act\";\n\nconst fetchSpecificDataStart = createAction(\"fetchspecificdatastart\");\nconst fetchSpecificDataSuccess = createAction(\"fetchspecificdatasuccess\");\nconst fetchSpecificDataError = createAction(\"fetchspecificdataerror\");\nconst fetchPastDataStart = createAction(\"fetchpastdatastart\");\nconst fetchPastDataSuccess = createAction(\"fetchpastdatasuccess\");\nconst fetchPastDataError = createAction(\"fetchpastdataerror\");\nconst fetchFutureDataStart = createAction(\"fetchfuturedatastart\");\nconst fetchFutureDataSuccess = createAction(\"fetchfuturedatasuccess\");\nconst fetchFutureDataError = createAction(\"fetchfuturedataerror\");\nconst updateDataFromServer = createAction(\"updatedatafromserver\");\nconst fetchDetailsDataStart = createAction(\"fetchdetailsdatastart\");\nconst fetchDetailsDataSuccess = createAction(\"fetchdetailsdatasuccess\");\nconst fetchDetailsDataError = createAction(\"fetchdetailsdataerror\");\nconst updateDetailsFromServer = createAction(\"updatedetailsfromserver\");\n\nexport default {\n fetchSpecificDataStart,\n fetchSpecificDataSuccess,\n fetchSpecificDataError,\n fetchPastDataStart,\n fetchPastDataSuccess,\n fetchPastDataError,\n fetchFutureDataStart,\n fetchFutureDataSuccess,\n fetchFutureDataError,\n updateDataFromServer,\n fetchDetailsDataStart,\n fetchDetailsDataSuccess,\n fetchDetailsDataError,\n updateDetailsFromServer\n};\n","import {\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TableRow,\n styled,\n} from \"@mui/material\";\nimport { startCase } from \"lodash\";\n\nconst StyledTableHeader = styled(TableCell)(() => ({\n fontSize: \"11px\",\n textWrap: \"nowrap\",\n fontWeight: \"bold\",\n color: \"#9AA0B0\",\n border: \"none\",\n borderRight: \"1px solid #393F4F\",\n padding: \"5px\",\n}));\n\nexport const StyledCell = styled(TableCell)(() => ({\n fontSize: \"11px\",\n fontWeight: \"bold\",\n color: \"#fff\",\n border: \"none\",\n borderRight: \"1px solid #393F4F\",\n padding: \"5px\",\n}));\n\nconst VisitBoxTable = ({ rows, headers }) => {\n return (\n <TableContainer>\n <Table size=\"small\">\n <TableHead>\n <TableRow>\n {headers.map((header) => (\n <StyledTableHeader key={header}>\n {startCase(header)}\n </StyledTableHeader>\n ))}\n </TableRow>\n </TableHead>\n\n <TableBody>{rows}</TableBody>\n </Table>\n </TableContainer>\n );\n};\n\nexport default VisitBoxTable;\n","import { goToNextSectionPath } from \"../app/operations\";\nimport { push } from \"connected-react-router\";\n\nconst submitSection = (sectionId, goToNext = true) => (\n dispatch,\n getState,\n { getFirebase, getFirestore }\n) => {\n const state = getState();\n const firestore = getFirestore();\n firestore\n .set(\n {\n collection: \"waste_audits\",\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: \"sections\", doc: sectionId }]\n },\n { state: { submitted: true } },\n { merge: true }\n )\n .then(() => {\n if (goToNext) {\n dispatch(goToNextSectionPath(sectionId));\n }\n dispatch({ type: \"UPDATE SUCCESS\" });\n })\n .catch(err => {\n dispatch({ type: \"UPDATE ERROR\" }, err);\n });\n};\n\nconst navigateFromSection = navigatedFromSectionId => (dispatch, getState) => {\n if (_.isPresent(navigatedFromSectionId)) {\n dispatch(\n updateSectionData(navigatedFromSectionId, { state: { viewed: true } })\n );\n }\n};\n\nconst updateSectionData = (sectionId, args) => (\n dispatch,\n getState,\n { getFirebase, getFirestore }\n) => {\n const state = getState();\n const firestore = getFirestore();\n\n firestore\n .set(\n {\n collection: \"waste_audits\",\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: \"sections\", doc: sectionId }]\n },\n args,\n { merge: true }\n )\n .then(() => {\n dispatch({ type: \"UPDATE SUCCESS\" });\n })\n .catch(err => {\n dispatch({ type: \"UPDATE ERROR\" }, err);\n });\n};\n\nconst uploadFile = (attributeName, sectionId, file) => (\n dispatch,\n getState,\n { getFirebase, getFirestore }\n) => {\n const state = getState();\n const firebase = getFirebase();\n\n const { auditDocumentId } = state.app;\n\n const collection = `waste_audits/${auditDocumentId}/sections`;\n const storagePath = `${collection}/${sectionId}/${attributeName}`;\n\n if (file) {\n firebase\n .uploadFile(storagePath, file, collection, {\n metadataFactory: (uploadRes, firebase, metadata, downloadURL) => {\n return {\n [attributeName]: {\n url: downloadURL,\n name: metadata.name,\n metadata: _.omitBy(metadata, _.isBlank)\n }\n };\n },\n documentId: sectionId,\n progress: true,\n storeProgressAt: `sections/${sectionId}/${attributeName}`\n })\n .then(snap => {\n console.log(\"upload successful\", snap);\n })\n .catch(err => {\n console.error(\"error uploading file\", err);\n });\n }\n};\n\nconst deleteFile = (attributeName, sectionId, file) => (\n dispatch,\n getState,\n { getFirebase, getFirestore }\n) => {\n const state = getState();\n const firebase = getFirebase();\n\n const { auditDocumentId } = state.app;\n\n const collection = `waste_audits/${auditDocumentId}/sections`;\n const storagePath = `${collection}/${sectionId}`;\n\n if (file) {\n dispatch(updateSectionData(sectionId, { [attributeName]: null }));\n\n firebase\n .deleteFile(file.metadata.fullPath)\n .then(snap => {\n console.log(\"delete successful\", snap);\n })\n .catch(err => {\n console.error(\"error deleting file\", err);\n });\n }\n};\n\nexport {\n updateSectionData,\n submitSection,\n uploadFile,\n deleteFile,\n navigateFromSection\n};\n","// ReportLogLayout.tsx\nimport ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport { Stack, Box, Collapse, Divider, IconButton, Typography } from \"@mui/material\";\nimport { TextSmallMuted, TextSmall, TextMuted } from 'sharedComponents';\nimport { useState } from \"react\";\nimport { useTicket } from \"ticket/selectors\";\nimport { flatMap } from \"lodash\";\nimport { formatDate } from \"sharedUtils\";\n\n\nconst ReportLogLayout = ({ logHeader, logContent, notes2, createdAt, object = undefined, extraLinks = undefined, startOpen = false }) => {\n const { stakeholderContacts } = useTicket() || {};\n const allStakeholders = flatMap(stakeholderContacts || [], (x) => x);\n const inputtedBy = allStakeholders?.find((x) => x.id === object?.metadata?.inputtedById);\n const [open, setOpen] = useState(startOpen);\n const { notes } = object?.data || {};\n\n return (\n <>\n <Stack direction=\"row\" onClick={() => setOpen(!open)}\n sx={{\n justifyContent: \"space-between\",\n alignItems: \"center\",\n cursor: 'pointer',\n pl: '8px',\n backgroundColor: open ? \"#121212\" : \"inherit\",\n borderBottom: '0px dashed #4B4B4B',\n borderWidth: open ? \"1px\" : \"0\",\n }}\n >\n\n <Box>\n {logHeader}\n </Box>\n <Box sx={{ textAlign: 'right' }}>\n {extraLinks}\n <IconButton disableRipple sx={{color: '#fff'}}>\n {open ? <ExpandLessIcon /> : <ExpandMoreIcon />}\n </IconButton>\n </Box>\n </Stack>\n\n\n\n <Collapse in={open} timeout={0} unmountOnExit >\n <Box sx={{ m: '6px 0 10px 8px', px: '10px', borderLeft: '1px solid #4B4B4B' }}>\n {logContent}\n {notes && (\n <Box><strong>Note:</strong> {notes}</Box>\n )}\n {inputtedBy && (\n <Box sx={{ mt: '5px', textAlign: 'right' }}>\n <TextSmall>\n Inputted by <strong>{inputtedBy?.nameWithoutEmail}</strong> on <strong>{formatDate(object?.createdAt)}</strong>\n </TextSmall>\n </Box>\n )}\n </Box>\n </Collapse>\n </>\n );\n};\n\nexport default ReportLogLayout;\n\n\n\n","import { styled } from \"@mui/material/styles\";\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport TableHead from \"@mui/material/TableHead\";\nimport TableRow from \"@mui/material/TableRow\";\n\nexport const StyledTableContainer = styled(TableContainer)(() => ({\n margin: \"8px 0\",\n \"& .MuiTableCell-root\": {\n fontSize: \"11px\",\n fontWeight: \"inherit\",\n color: \"inherit\",\n },\n}));\n\nexport const StyledTableRow = styled(TableRow)(() => ({\n textWrap: \"nowrap\",\n fontWeight: \"bold\",\n color: \"#828B98\",\n border: \"1px solid transparent\",\n}));\n\nexport const StyledTableBody = styled(TableBody)(() => ({\n \"& .MuiTableCell-root\": {\n borderTop: \"1px solid #F1F1F5\",\n borderBottom: \"1px solid #F1F1F5\",\n },\n}));\n\nconst CustomTable = ({\n rows,\n headers = [\"Type\", \"Name\", \"Code\", \"Cancel Deliver # Units\"],\n}) => {\n return (\n <StyledTableContainer>\n <Table size=\"small\">\n <TableHead>\n <StyledTableRow>\n {headers.map((header) => (\n <TableCell key={header}>{header}</TableCell>\n ))}\n </StyledTableRow>\n </TableHead>\n <StyledTableBody>{rows}</StyledTableBody>\n </Table>\n </StyledTableContainer>\n );\n};\n\nexport default CustomTable;\n","export const getCurrentChannel = (channel: string) => {\n const key =\n channel === \"organisation\"\n ? \"organisation_response_expected\"\n : \"vendor_response_expected\";\n\n return key;\n};\n","import { api } from \"./apiConfig\";\nimport { getCurrentChannel } from \"./utils\";\n\n// Ticket interfaces\nexport interface Ticket {\n id: number;\n subject: string;\n organisationResponseExpected: boolean;\n vendorResponseExpected: boolean;\n submitPath: string;\n updateTicketPath: string;\n defaultContactMap: DefaultContactMap;\n stakeholderContacts: {\n organisation: StakeholderContacts;\n agent: StakeholderContacts;\n vendor: StakeholderContacts;\n };\n assignedAgent: Agent;\n replies: TicketReply[];\n vendor: {\n id: string;\n name: string;\n };\n location: {\n id: number;\n name: string;\n externalCode: string;\n uuid: string;\n authority_id: number;\n };\n organisationStatus: string;\n vendorStatus: string;\n replyEmails: {\n agent: string;\n organisation: string;\n vendor: string;\n };\n actions?: TicketAction[];\n}\nexport interface AppData {\n agentsMap: Record<number, Agent>;\n cannedResponsesMap: {\n organisation: CannedResponse[];\n agent: CannedResponse[];\n vendor: CannedResponse[];\n };\n}\nexport interface Agent {\n id: string;\n name: string;\n}\n\ninterface CannedResponse {\n id: number;\n name: string;\n authorised_at: null | string;\n authorised_by_id: null | number;\n description: string;\n copy: string;\n stakeholder_id: number;\n created_at: string;\n updated_at: string;\n snippet: boolean;\n}\n\nexport interface Contact {\n id: number;\n displayName: string;\n nameWithoutEmail: string;\n}\n\nexport type StakeholderContacts = Record<string, Contact>;\n\ninterface DefaultContactMap {\n organisation: string;\n agent: null | string;\n vendor: string;\n}\n\ninterface Attachment {\n url: string;\n name: string;\n}\n\ninterface Event {\n id: string;\n name: string;\n createdAt: string;\n metadata: { [key: string]: string };\n data: { [key: string]: string };\n requestdUuid?: string;\n reportUuid?: string;\n}\n\ninterface TicketAction {\n current: string;\n label: string;\n path: string;\n type: string;\n value: string;\n group?: string;\n serviceUuid?: string;\n}\n\n// Ticket Reply\nexport interface TicketReply {\n id: number;\n channel: string;\n createdAt: string;\n htmlSafeDisplayMessage: string;\n message: string;\n //processed: boolean;\n //processedStatus: string;\n sentByName: string;\n sentToName: string | null;\n stakeholderId: number;\n stakeholderName: string;\n test: string;\n url: string;\n attachments: Attachment[];\n //tags: string[];\n //\n processed: boolean;\n status: string; //\n reminder: boolean | string;\n event_data: Event[];\n tagActions: TicketAction[];\n responseActions: TicketAction[];\n}\n\ninterface TicketResponse {\n channel: string;\n to_contact_id: number;\n message: string;\n clear_reminder: number;\n new_reminder_on: string;\n assigned_agent_id: number;\n response_expected: boolean;\n}\n\n// Ticket API Slice\nexport const appApi = api.injectEndpoints({\n endpoints: (build) => ({\n getApp: build.query<AppData, void>({\n query: () => ({ url: `/admin/tickets/app_data` }),\n }),\n updateTicket: build.mutation({\n query: ({ url, channel, expectedResponse, ...props }) => ({\n url: url,\n method: \"PATCH\",\n body: {\n ticket: {\n [getCurrentChannel(channel)]: expectedResponse,\n ...props,\n },\n },\n }),\n invalidatesTags: [\"Ticket\"],\n }),\n }),\n});\n\nexport const { useGetAppQuery, useUpdateTicketMutation } = appApi;\nexport const {\n endpoints: { getApp: getTicket },\n} = appApi;\n\n// Ticket Replies API Slice\nexport const ticketRepliesApi = api.injectEndpoints({\n endpoints: (build) => ({\n getTicket: build.query<Ticket, string>({\n query: (ticketId: string) => ({\n url: `/admin/tickets/${ticketId}/app_show`,\n }),\n providesTags: [\"Ticket\", \"TicketReplies\"],\n }),\n editTicketReply: build.mutation({\n query: ({ url, processed, channel, response }) => {\n const key = getCurrentChannel(channel);\n const body = {\n processed,\n // if processed exist, add ticket object\n ...(processed && { ticket: { [key]: response } }),\n };\n return {\n url,\n method: \"PATCH\",\n body,\n };\n },\n invalidatesTags: [\"Ticket\", \"TicketReplies\"],\n }),\n addTicketReply: build.mutation<TicketResponse, any>({\n query: ({\n url,\n channel,\n message,\n responseExpected,\n blobFiles,\n originalFileNames,\n assignedAgentId,\n data,\n }) => {\n const formData = new FormData();\n\n // Add nested 'ticket_response' object fields\n formData.append(\"ticket_response[channel]\", channel);\n formData.append(\n \"ticket_response[to_contact_id]\",\n data?.to_contact_id || \"\"\n );\n formData.append(\"ticket_response[message]\", message || \"\");\n formData.append(\n \"ticket_response[clear_reminder]\",\n data?.clear_reminder || \"0\"\n );\n formData.append(\n \"ticket_response[new_reminder_on]\",\n data?.new_reminder_on || \"\"\n );\n formData.append(\n \"ticket_response[assigned_agent_id]\",\n assignedAgentId || \"152\"\n );\n formData.append(\n \"ticket_response[response_expected]\",\n responseExpected.toString()\n );\n\n // Add attachments\n if (blobFiles && blobFiles.length > 0) {\n blobFiles.forEach((blobFile, index) => {\n const originalFileName = originalFileNames[index];\n formData.append(\n `ticket_response[attachments_attributes][${index}][file]`,\n blobFile,\n originalFileName\n );\n formData.append(\n `ticket_response[attachments_attributes][${index}][_destroy]`,\n \"false\"\n );\n });\n }\n\n // Add ticket_id at the root level\n formData.append(\"ticket_id\", \"2324\");\n\n return {\n url: url,\n method: \"POST\",\n body: formData,\n };\n },\n invalidatesTags: [\"Ticket\", \"TicketReplies\"],\n }),\n getFailedVisitReports: build.query<any, string>({\n query: (ticketId: string) => ({\n url: `/admin/tickets/${ticketId}/failed_visit_reports`,\n }),\n providesTags: [\"FailedVisitReport\"],\n }),\n getAdhocVisitRequests: build.query<any, string>({\n query: (ticketId: string) => ({\n url: `/admin/tickets/${ticketId}/adhoc_visit_requests`,\n }),\n providesTags: [\"AdhocVisitRequests\"],\n }),\n getAdhocVisitRequestsByLocationAndVendor: build.query<any, any>({\n query: (queryObject) => ({\n url: `/admin/locations/${queryObject.locationId}/vendor/${queryObject.vendorId}/adhoc_visit_requests`,\n }),\n providesTags: [\"AdhocVisitRequests\"],\n }),\n getStockDeliveryRequests: build.query<any, string>({\n query: (ticketId: string) => ({\n url: `/admin/tickets/${ticketId}/stock_delivery_requests`,\n }),\n providesTags: [\"StockDeliveryRequests\"],\n }),\n getRemediationCases: build.query<any, string>({\n query: (ticketId: string) => ({\n url: `/admin/tickets/${ticketId}/remediation_cases`,\n }),\n providesTags: [\"RemediationCases\"],\n }),\n getServiceSuspensionRequests: build.query<any, string>({\n query: (ticketId: string) => ({\n url: `/admin/tickets/${ticketId}/service_suspension_requests`,\n }),\n providesTags: [\"ServiceSuspensionRequests\"],\n }),\n getServiceTerminationRequests: build.query<any, string>({\n query: (ticketId: string) => ({\n url: `/admin/tickets/${ticketId}/service_termination_requests`,\n }),\n providesTags: [\"ServiceTerminationRequests\"],\n }),\n getServiceResumptionRequests: build.query<any, string>({\n query: (ticketId: string) => ({\n url: `/admin/tickets/${ticketId}/service_resumption_requests`,\n }),\n providesTags: [\"ServiceResumptionRequests\"],\n }),\n getSpecChangeRequests: build.query<any, string>({\n query: (ticketId: string) => ({\n url: `/admin/tickets/${ticketId}/spec_change_requests`,\n }),\n providesTags: [\"SpecChangeRequests\"],\n }),\n getVisitFrequencyChangeRequests: build.query<any, string>({\n query: (ticketId: string) => ({\n url: `/admin/tickets/${ticketId}/visit_frequency_change_requests`,\n }),\n providesTags: [\"VisitFrequencyChangeRequests\"],\n }),\n getLocationTickets: build.query<any, any>({\n query: (locationId) => ({\n url: `/admin/locations/${locationId}/tickets.json`,\n }),\n providesTags: [\"LocationTickets\"],\n }),\n addTicket: build.mutation<any, any>({\n query: (ticket) => ({\n url: `/admin/tickets/`,\n method: \"POST\",\n body: ticket,\n }),\n invalidatesTags: [\"LocationTickets\"],\n }),\n }),\n});\n\nexport const {\n useGetTicketQuery,\n useEditTicketReplyMutation,\n useAddTicketReplyMutation,\n useGetFailedVisitReportsQuery,\n useGetAdhocVisitRequestsQuery,\n useGetAdhocVisitRequestsByLocationAndVendorQuery,\n useGetStockDeliveryRequestsQuery,\n useGetRemediationCasesQuery,\n useGetServiceSuspensionRequestsQuery,\n useGetServiceTerminationRequestsQuery,\n useGetServiceResumptionRequestsQuery,\n useGetSpecChangeRequestsQuery,\n useGetVisitFrequencyChangeRequestsQuery,\n useGetLocationTicketsQuery,\n useAddTicketMutation,\n} = ticketRepliesApi;\n","/**\r\n * An Adapter can be used to apply chained synchronous transformations to any\r\n * value at runtime.\r\n *\r\n * Each type class using Adapters must have `adapters` property and adapter\r\n * interface defined.\r\n *\r\n * Adapters can be used to allow external code to apply transformations to any\r\n * value at any time.\r\n *\r\n * For example we have a Weather class which has a method `now()` which returns\r\n * current temperature.\r\n *\r\n * ```\r\n * function now() {\r\n * // ... calculate temperature\r\n * let temp = \"Temperature now is \" + degrees + \"F\";\r\n * return temp;\r\n * }\r\n * ```\r\n *\r\n * Now, supposed we want to let other classes to modify the output of the\r\n * `now()`? We just apply an adapter to the `temp` before it is returned:\r\n *\r\n * ```\r\n * temp = this.adapters.apply(\"now\", {\r\n * temp: temp,\r\n * degrees: degrees\r\n * }).temp;\r\n * ```\r\n *\r\n * Some other class might tap onto it by defining an Adapter that calculates\r\n * the temperature in Celsius:\r\n *\r\n * weather.adapters.add(\"now\", (arg) => {\r\n * arg.temp += \"(\" + farenheitToCelsius(arg.degrees) + \"C)\";\r\n * return arh;\r\n * });\r\n *\r\n * Furthermore some time-related class could add time:\r\n *\r\n * weather.adapters.add(\"now\", (arg) => {\r\n * arg.temp += \"; the time now is \" + (new Date().toLocaleString());\r\n * return arh;\r\n * });\r\n *\r\n * So without adapters we would get output like this:\r\n *\r\n * ```\r\n * Temperature now is 90F\r\n * ```\r\n *\r\n * With adapters applied we now have:\r\n *\r\n * ```\r\n * Temperature now is 90F (32C); the time now is 12/11/2012, 7:00:00 PM\r\n * ```\r\n */\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { SortedList } from \"./SortedList\";\nimport * as $number from \"./Number\";\nimport * as $order from \"./Order\";\nimport * as $iter from \"../utils/Iterator\";\nimport * as $array from \"../utils/Array\";\nimport * as $type from \"../utils/Type\";\n/**\r\n * ============================================================================\r\n * GLOBAL ADAPTER\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A global adapter is an adpater that is attached to a class type rather than\r\n * specific object instance.\r\n *\r\n * @ignore Exclude from docs\r\n */\nvar GlobalAdapter = /** @class */function () {\n function GlobalAdapter() {\n /**\r\n * Callback id iterator.\r\n */\n this._callbackId = 0;\n /**\r\n * A list of if callbacks (adapters).\r\n */\n this._callbacks = new SortedList(function (left, right) {\n return $order.or($number.order(left.priority, right.priority), $number.order(left.id, right.id));\n });\n }\n /**\r\n * Adds a global callback which is not specific to any particular object.\r\n * Whenever an adapter in any object of the specific class type is invoked\r\n * global adapters will kick in.\r\n *\r\n * @param type Class type\r\n * @param key Adapter key\r\n * @param callback Callback function\r\n * @param priority Priority (higher priority meaning adapter will be applied later)\r\n * @param scope Callback function scaope\r\n */\n GlobalAdapter.prototype.addAll = function (type, key, callback, priority, scope) {\n if (priority === void 0) {\n priority = 0;\n }\n this._callbacks.insert({\n id: ++this._callbackId,\n key: key,\n callback: callback,\n priority: priority,\n scope: scope,\n type: type\n });\n };\n /**\r\n * Returns if there are adapters for specific type available.\r\n *\r\n * @param type Adapter type\r\n * @param key Adapter key\r\n * @return {boolean}\r\n */\n GlobalAdapter.prototype.isEnabled = function (type, key) {\n // TODO check the type and key\n return this._callbacks.length > 0;\n };\n /**\r\n * Applies global adapters for the object of the specific type.\r\n *\r\n * @param type Class type\r\n * @param key Adapter key\r\n * @param value Value\r\n */\n GlobalAdapter.prototype.applyAll = function (type, key, value) {\n // This is needed to improve the performance and reduce garbage collection\n var callbacks = this._callbacks.values;\n var length = callbacks.length;\n if (length == 0) {\n return value;\n }\n // Cycle through all callbacks and find the ones we need to use\n for (var i = 0; i < length; ++i) {\n var item = callbacks[i];\n if (item.key === key && type instanceof item.type) {\n value = item.callback.call(item.scope, value, type, key);\n }\n }\n return value;\n };\n return GlobalAdapter;\n}();\nexport { GlobalAdapter };\n/**\r\n * A global Adapter for plugins that want to add specific\r\n * functionality for any chart, not just specific instance.\r\n *\r\n * If you want to add an adapter which applies to all instances of the same\r\n * object type, like, for instance all slices in PieSeries, you can use\r\n * global adapter.\r\n *\r\n * Global adapter is a system-wide instance, accessible via `globalAdapter`.\r\n *\r\n * ```TypeScript\r\n * am4core.globalAdapter.addAll<am4charts.IPieSeriesAdapters, am4charts.PieSeries, \"fill\">(am4charts.PieSeries, \"fill\", (value, target, key) => {\r\n * return am4core.color(\"#005500\");\r\n * });\r\n * ```\r\n * ```JavaScript\r\n * am4core.globalAdapter.addAll(am4charts.PieSeries, \"fill\", (value, target, key) => {\r\n * return am4core.color(\"#005500\");\r\n * });\r\n * ```\r\n *\r\n * @todo Description (improve)\r\n */\nexport var globalAdapter = new GlobalAdapter();\n/**\r\n * ============================================================================\r\n * REGULAR ADAPTER\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Adapter allows adding ordered callback functions and associating them with a\r\n * string-based key. An Adapter user can then easily invoke those callbacks to\r\n * apply custom functions on its input, output or intermediate values.\r\n *\r\n * Custom code and plugins can add their own callbacks to modify and enhance\r\n * core functionality.\r\n *\r\n * See the description of `add()` for an example.\r\n *\r\n * Almost any object in amCharts4 has own adapter, accessible with `adapter`\r\n * property.\r\n *\r\n * Any adapters added to it will be applied to that object only.\r\n *\r\n * ### Global Adapters\r\n *\r\n * If you want to add an adapter which applies to all instances of the same\r\n * object type, like, for instance all slices in PieSeries, you can use\r\n * global adapter.\r\n *\r\n * Global adapter is a system-wide instance, accessible via `globalAdapter`.\r\n *\r\n * ```TypeScript\r\n * am4core.globalAdapter.addAll<am4charts.IPieSeriesAdapters, am4charts.PieSeries, \"fill\">(am4charts.PieSeries. \"fill\", (value, target, key) => {\r\n * return am4core.color(\"#005500\");\r\n * });\r\n * ```\r\n * ```JavaScript\r\n * am4core.globalAdapter.addAll(am4charts.PieSeries. \"fill\", (value, target, key) => {\r\n * return am4core.color(\"#005500\");\r\n * });\r\n * ```\r\n *\r\n * {@link https://www.amcharts.com/docs/v4/reference/adapter_module/#globalAdapter_property More info}.\r\n *\r\n * @important\r\n */\nvar Adapter = /** @class */function () {\n /**\r\n * Constructor, sets the object referece this Adapter should be used for.\r\n *\r\n * @param c Object\r\n */\n function Adapter(c) {\n /**\r\n * Internal counter for callback ids.\r\n */\n this._callbackId = 0;\n /**\r\n * A list of adapter callbacks.\r\n *\r\n * @param $number.order(left.priority, right.priority) [description]\r\n * @param $number.order(left.id, right.id));\t} [description]\r\n */\n this._callbacks = new SortedList(function (left, right) {\n return $order.or($number.order(left.priority, right.priority), $number.order(left.id, right.id));\n });\n this.object = c;\n // TODO this exposes the internal events\n this.events = this._callbacks.events;\n }\n /**\r\n * Adds a callback for a specific key.\r\n *\r\n * ```TypeScript\r\n * // Override fill color value and make all slices green\r\n * chart.series.template.adapter.add(\"fill\", (value, target, key) => {\r\n * return am4core.color(\"#005500\");\r\n * });\r\n * ```\r\n * ```JavaScript\r\n * // Override fill color value and make all slices green\r\n * chart.series.template.adapter.add(\"fill\", function(value, target, key) {\r\n * return am4core.color(\"#005500\");\r\n * });\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * // ...\r\n * \"adapter\": {\r\n * \t// Override fill color value and make all slices green\r\n * \t\"fill\": function(value, target, key) {\r\n * \t return am4core.color(\"#005500\");\r\n * \t}\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * The above will call user-defined function (adapter) whenever `fill` value\r\n * is requested from the Pie series, allowing it to override the default\r\n * using custom code and any fuzzy logic.\r\n *\r\n * There can be any number of adapters set on one property key.\r\n *\r\n * In this case adapters will be applied in daisy-chain fashion. The first\r\n * adapter in queue will make its transformation. The next one will have\r\n * the output of the first adapter as a starting value, etc.\r\n *\r\n * The order of the adapters are determined either by the order they were\r\n * added in, or their `priority` value.\r\n *\r\n * The heigher the `priority`, the later in the game adapter will be applied.\r\n *\r\n * @param key Key\r\n * @param callback A callback function\r\n * @param priority The higher priority, the more chance the adapter will be applied last\r\n * @param scope Scope for the callback function\r\n */\n Adapter.prototype.add = function (key, callback, priority, scope) {\n if (priority === void 0) {\n priority = 0;\n }\n this._callbacks.insert({\n id: ++this._callbackId,\n key: key,\n callback: callback,\n priority: priority,\n scope: scope\n });\n };\n /**\r\n * Checks whether specific adapter is already set.\r\n *\r\n * @param key Key\r\n * @param callback A callback function\r\n * @param priority The higher priority, the more chance the adapter will be applied last\r\n * @param scope Scope for the callback function\r\n * @returns Adapter set?\r\n */\n Adapter.prototype.has = function (key, callback, priority, scope) {\n if (priority === void 0) {\n priority = 0;\n }\n // @todo Implement actual check\n return false;\n };\n /**\r\n * Removes adapter callbacks for the specific `key`.\r\n *\r\n * If `priority` is specified, only callbacks for that priority are removed.\r\n *\r\n * @param key Key\r\n * @param priority Priority\r\n * @todo Implement\r\n */\n Adapter.prototype.remove = function (key, priority) {\n var _this = this;\n // It has to make a copy because it removes the elements while iterating\n // TODO inefficient\n $array.each($iter.toArray(this._callbacks.iterator()), function (item) {\n // TODO test this\n if (item.key === key && (!$type.isNumber(priority) || priority === item.priority)) {\n _this._callbacks.remove(item);\n }\n });\n };\n /**\r\n * Returns if there are any adapters set for the specific `key`.\r\n *\r\n * @returns Are there any adapters for the key?\r\n */\n Adapter.prototype.isEnabled = function (key) {\n // TODO check the key\n return this._callbacks.length > 0 || globalAdapter.isEnabled(this.object, key);\n };\n /**\r\n * Passes the input value through all the callbacks for the defined `key`.\r\n *\r\n * @param key Key\r\n * @param value Input value\r\n * @param ...rest Rest of the parameters to be passed into callback\r\n * @return Output value\r\n */\n Adapter.prototype.apply = function (key, value) {\n // This is needed to improve the performance and reduce garbage collection\n var callbacks = this._callbacks.values;\n var length = callbacks.length;\n if (length > 0) {\n for (var i = 0; i < length; ++i) {\n var item = callbacks[i];\n if (item.key === key) {\n value = item.callback.call(item.scope, value, this.object, key);\n }\n }\n }\n // Apply global adapters\n value = globalAdapter.applyAll(this.object, key, value);\n return value;\n };\n /**\r\n * Returns all adapter keys that are currently in effect.\r\n *\r\n * @return Adapter keys\r\n */\n Adapter.prototype.keys = function () {\n // TODO inefficient\n return $iter.toArray($iter.map(this._callbacks.iterator(), function (x) {\n return x.key;\n }));\n };\n /**\r\n * Copies all the adapter callbacks from `source`.\r\n *\r\n * @param source An Adapter to copy items from\r\n */\n Adapter.prototype.copyFrom = function (source) {\n var _this = this;\n $iter.each(source._callbacks.iterator(), function (x) {\n _this.add(x.key, x.callback, x.priority, x.scope);\n });\n };\n /**\r\n * Clears all callbacks from this Adapter.\r\n */\n Adapter.prototype.clear = function () {\n this._callbacks.clear();\n };\n return Adapter;\n}();\nexport { Adapter };","import React, { useState, useEffect, useRef, useLayoutEffect } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\n\n//The uploaded images get transformed on the server and take some time.\n//Rather than display a broken link retry the file until it works and show the placeholder instead\n\nfunction ImagePoller({\n src,\n placeholderSrc,\n className,\n onLoadImage,\n loadingPlaceholder,\n onTimeout,\n onClick\n}) {\n const [imageLoaded, setImageLoaded] = useState(false);\n const [timeToLoad, setTimeToLoad] = useState(0);\n\n useLayoutEffect(() => {\n if (imageLoaded && onLoadImage) onLoadImage();\n }, [imageLoaded, onLoadImage]);\n\n useEffect(() => {\n checkImageLoaded(src, setImageLoaded);\n }, [src]);\n\n useInterval(\n () => {\n checkImageLoaded(src, setImageLoaded);\n console.log(timeToLoad)\n if(timeToLoad == 30 && onTimeout) onTimeout();\n setTimeToLoad(timeToLoad + 1)\n },\n !imageLoaded && _.isPresent(src) ? 500 : null\n );\n\n var styles = onClick ? { cursor: 'pointer' } : null\n\n return (\n <div className=\"h-100\" onClick={onClick} style={styles}>\n {\n imageLoaded ? <img src={src} className={className} /> :\n loadingPlaceholder ? loadingPlaceholder :\n placeholderSrc ? <img src={placeholderSrc} className={className} /> : null\n }\n </div>\n );\n}\n\nfunction useInterval(callback, delay) {\n const savedCallback = useRef();\n\n // Remember the latest function.\n useEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n\n // Set up the interval.\n useEffect(() => {\n function tick() {\n savedCallback.current();\n }\n if (delay !== null) {\n let id = setInterval(tick, delay);\n return () => clearInterval(id);\n }\n }, [delay]);\n}\n\nconst checkImageLoaded = (imageSrc, setState) => {\n if (imageSrc) {\n var img = new Image();\n img.onload = () => setState(true);\n img.onerror = () => setState(false);\n img.src = imageSrc;\n }\n};\n\nImagePoller.propTypes = {\n src: PropTypes.string,\n placeholderSrc: PropTypes.string,\n onLoadImage: PropTypes.func,\n};\n\nexport default ImagePoller;\n","import _ from 'lodashExtended'\n\nconst getBinData = (binId, state) => {\n return {\n id: binId,\n ...(_.get(state.firestore, `data.bins.${binId}`) || {})\n }\n}\n\nconst getBinsForRoom = (roomId, state) => {\n return _.filter((_.get(state.firestore, `ordered.bins`) || []), {roomId})\n}\n\nconst getBinsForSection = (sectionId, state) => {\n return _.filter((_.get(state.firestore, `ordered.bins`) || []), {sectionId})\n}\n\nexport {\n getBinData,\n getBinsForRoom,\n getBinsForSection\n}\n","import { registry } from \"../core/Registry\";\n// TODO put this someplace else ?\n// TODO export this in core.ts ?\nexport function is(object, name) {\n var x = registry.registeredClasses[name];\n return x != null && object instanceof x;\n}","import { is } from \"./ITheme\";\nvar theme = function theme(object) {\n if (is(object, \"SpriteState\")) {\n object.transitionDuration = 400;\n }\n if (is(object, \"Component\")) {\n object.rangeChangeDuration = 700;\n object.interpolationDuration = 700;\n object.sequencedInterpolation = false;\n if (is(object, \"SankeyDiagram\")) {\n object.sequencedInterpolation = true;\n }\n if (is(object, \"FunnelSeries\")) {\n object.sequencedInterpolation = true;\n }\n }\n if (is(object, \"Chart\")) {\n object.defaultState.transitionDuration = 2000;\n object.hiddenState.transitionDuration = 1000;\n }\n if (is(object, \"Tooltip\")) {\n object.animationDuration = 400;\n object.defaultState.transitionDuration = 400;\n object.hiddenState.transitionDuration = 400;\n }\n if (is(object, \"Scrollbar\")) {\n object.animationDuration = 700;\n }\n if (is(object, \"Series\")) {\n object.defaultState.transitionDuration = 1000;\n object.hiddenState.transitionDuration = 700;\n object.hiddenState.properties.opacity = 1;\n object.showOnInit = true;\n }\n if (is(object, \"MapSeries\")) {\n object.hiddenState.properties.opacity = 0;\n }\n if (is(object, \"PercentSeries\")) {\n object.hiddenState.properties.opacity = 0;\n }\n if (is(object, \"FunnelSlice\")) {\n object.defaultState.transitionDuration = 800;\n object.hiddenState.transitionDuration = 1000;\n object.hiddenState.properties.opacity = 1;\n }\n if (is(object, \"Slice\")) {\n object.defaultState.transitionDuration = 700;\n object.hiddenState.transitionDuration = 1000;\n object.hiddenState.properties.opacity = 1;\n }\n if (is(object, \"Preloader\")) {\n object.hiddenState.transitionDuration = 2000;\n }\n if (is(object, \"Column\")) {\n object.defaultState.transitionDuration = 700;\n object.hiddenState.transitionDuration = 1000;\n object.hiddenState.properties.opacity = 1;\n }\n if (is(object, \"Column3D\")) {\n object.hiddenState.properties.opacity = 0;\n }\n};\nexport default theme;","import { goToEditBinPath, uploadSubcollectionImage, deleteSubcollectionImage } from '../app/operations'\nimport { getStorageType, getInternalContainerType } from '../app/selectors'\n\nconst updateBinData = (binId, args) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const firestore = getFirestore()\n\n if(args.storageTypeId) {\n args.storageType = _.omit(getStorageType(args.storageTypeId, state), ['exampleInteriorPhotoUrl', 'exampleExteriorPhotoUrl', 'exampleBulkInternalPhotoUrl'])\n args.containerType = null\n args.containerTypeId = null\n }\n\n if(args.containerTypeId) {\n args.containerType = getInternalContainerType(args.containerTypeId, state)\n }\n\n firestore.set(\n {\n collection: 'waste_audits',\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: 'bins', doc: binId }],\n },\n args,\n {merge: true}\n )\n\n}\n\nconst addBin = (sectionId, roomId) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const firestore = getFirestore()\n\n var args = _.omitBy({ sectionId, roomId }, _.isBlank)\n\n firestore.add(\n {\n collection: 'waste_audits',\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: 'bins' }],\n },\n { ...args, createdAt: new Date },\n ).then((result) => {\n dispatch(goToEditBinPath(result.id))\n })\n\n}\n\nconst deleteBin = (binId) => (dispatch, getState, { getFirebase, getFirestore }) => {\n const state = getState()\n const firestore = getFirestore()\n\n if(_.isPresent(binId)) {\n firestore.delete(\n {\n collection: 'waste_audits',\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: 'bins', doc: binId }],\n }\n )\n }\n\n}\n\nconst uploadImage = (attributeName, documentId, image) => uploadSubcollectionImage(attributeName, documentId, image, 'bins')\nconst deleteImage = (attributeName, documentId, image) => deleteSubcollectionImage(attributeName, documentId, image, 'bins')\n\nexport {\n updateBinData,\n addBin,\n deleteBin,\n uploadImage,\n deleteImage\n}\n","/**\r\n * Animation module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObjectEvents } from \"../Base\";\nimport { SVGDefaults } from \"../defs/SVGDefaults\";\nimport { Disposer } from \"../utils/Disposer\";\nimport { Color } from \"../utils/Color\";\nimport { Percent, percent } from \"../utils/Percent\";\nimport * as $async from \"../utils/AsyncPending\";\nimport * as $ease from \"../utils/Ease\";\nimport * as $colors from \"../utils/Colors\";\nimport * as $math from \"../utils/Math\";\nimport * as $array from \"../utils/Array\";\nimport * as $type from \"../utils/Type\";\nimport { system } from \"../System\";\n/**\r\n * Calls a `callback` function for the `duration` of milliseconds.\r\n *\r\n * @todo Needed?\r\n * @deprecated Not used anywhere\r\n * @ignore Exclude from docs\r\n * @param duration Duration (ms)\r\n * @param callback Callback function\r\n * @return Disposer\r\n */\nexport function animate(duration, callback) {\n var disposed = false;\n // TODO use performance.now() ?\n var startTime = Date.now();\n function loop(now) {\n if (!disposed) {\n var diff = now - startTime;\n if (diff >= duration) {\n callback(1);\n } else {\n $async.nextFrame(loop);\n callback(diff / duration);\n }\n }\n }\n $async.nextFrame(loop);\n return new Disposer(function () {\n disposed = true;\n });\n}\n/**\r\n * Returns numeric value accoring to progress between start and end values.\r\n *\r\n * @param progress Progress (0-1)\r\n * @param from\r\n * @param to\r\n * @return Value according to progress\r\n */\nfunction getProgressNumber(progress, from, to) {\n return from + (to - from) * progress;\n}\n/**\r\n * Returns [[Percent]] value accoring to progress between start and end\r\n * values.\r\n *\r\n * @param progress Progress (0-1)\r\n * @param from\r\n * @param to\r\n * @return Value according to progress\r\n */\nfunction getProgressPercent(progress, from, to) {\n return new Percent(getProgressNumber(progress, from.percent, to.percent));\n}\n/**\r\n * Returns color value accoring to progress between start and end values.\r\n *\r\n * @param progress Progress (0-1)\r\n * @param from\r\n * @param to\r\n * @return Color according to progress\r\n */\nfunction getProgressColor(progress, from, to) {\n return new Color($colors.interpolate(from.rgb, to.rgb, progress));\n}\n/**\r\n * [getHybridProperty description]\r\n *\r\n * @todo Description\r\n * @param property [description]\r\n * @param type [description]\r\n * @return [description]\r\n */\nfunction getHybridProperty(property, type) {\n return type + property.charAt(0).toUpperCase() + property.substr(1);\n}\nvar AnimationDisposer = /** @class */function () {\n function AnimationDisposer(array) {\n this._disposer = new Disposer(function () {\n while (array.length !== 0) {\n array[0].dispose();\n }\n });\n }\n AnimationDisposer.prototype.isDisposed = function () {\n return this._disposer.isDisposed();\n };\n AnimationDisposer.prototype.dispose = function () {\n this._disposer.dispose();\n };\n return AnimationDisposer;\n}();\nexport { AnimationDisposer };\n/**\r\n * Animation can be used to transition certain properties on an object that\r\n * implements [[IAnimatable]] interface.\r\n *\r\n * @see {@link IAnimationEvents} for a list of available events\r\n */\nvar Animation = /** @class */function (_super) {\n tslib_1.__extends(Animation, _super);\n /**\r\n * Constructor\r\n *\r\n * @param object An object animation should run on\r\n * @param animationOptions One or several (array) of animation options\r\n * @param duration Duration (ms)\r\n * @param easing Easing function\r\n */\n function Animation(object, animationOptions, duration, easing) {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * Duration of the animation in milliseconds.\r\n */\n _this.duration = 0;\n /**\r\n * Easing function to use.\r\n *\r\n * @see {@link Ease}\r\n */\n _this.easing = $ease.linear;\n /**\r\n * Contains progress of the current animation: 0 (start) to 1 (end).\r\n */\n _this.progress = 0;\n /**\r\n * Indicated how many times animation should loop.\r\n */\n _this._loop = 0;\n /**\r\n * Animation is paused.\r\n */\n _this._pause = false;\n /**\r\n * Holds reference to timeout for delayed play.\r\n */\n _this._delayTimeout = null;\n /**\r\n * Elapsed time in currently playing animation.\r\n */\n _this._time = 0;\n _this._isFinished = false;\n _this.className = \"Animation\";\n // Set parameters\n _this.object = object;\n _this.animationOptions = $array.toArray(animationOptions);\n _this.duration = duration;\n if (easing) {\n _this.easing = easing;\n }\n // Run check if there are already animations playing on the same properties\n // and stop them - the last animation takes precedence\n //this.stopSameAnimations();\n /*if ($type.hasValue(callback)) {\r\n // TODO don't use .call\r\n this.events.on(\"animationended\", callback, object);\r\n }*/\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n // TODO verify that this is correct\n Animation.prototype.debug = function () {};\n /**\r\n * Disposes this object, clears up after itself.\r\n */\n Animation.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n this.pause();\n };\n /**\r\n * Delays animation start by X milliseconds.\r\n *\r\n * @param delay Delay (ms)\r\n * @return Animation\r\n */\n Animation.prototype.delay = function (delay) {\n var _this = this;\n //@todo Maybe not use `bind()`\n if (delay > 0) {\n this.pause();\n // This is so that it will get disposed if `this.object` is disposed\n // TODO hacky, figure out a better way\n $array.move(this.object.animations, this);\n var id_1 = setTimeout(function () {\n _this._delayTimeout = null;\n _this.start();\n }, delay);\n this._delayTimeout = new Disposer(function () {\n clearTimeout(id_1);\n });\n }\n return this;\n };\n Animation.prototype._start = function () {\n this._isFinished = false;\n // Clear delay timeout if there was one\n if (this._delayTimeout) {\n this.removeDispose(this._delayTimeout);\n this._delayTimeout = null;\n }\n // Run check if there are already animations playing on the same properties\n // and stop them - the last animation takes precedence\n this.stopSameAnimations();\n // Reset counters\n this._pause = false;\n // Register animation\n $array.move(system.animations, this);\n // Register this animation in object's `animations` list\n $array.move(this.object.animations, this);\n system.requestFrame();\n };\n /**\r\n * Starts animation.\r\n *\r\n * @return Animation\r\n */\n Animation.prototype.start = function () {\n this._start();\n this._startTime = Date.now();\n this._time = 0;\n this.staticOptions = [];\n // Process initial property values\n for (var i = this.animationOptions.length - 1; i >= 0; i--) {\n var options = this.animationOptions[i];\n if (!$type.hasValue(options.from)) {\n if (options.childObject) {\n options.from = options.childObject[options.property];\n } else {\n options.from = this.object[options.property];\n if (!$type.hasValue(options.from)) {\n options.from = SVGDefaults[options.property];\n }\n }\n /*if (!$type.hasValue(options.from)) {\r\n throw Error(\"Could not get initial transition value.\");\r\n }*/\n }\n if (options.from == options.to) {\n // || options.to == (<any>this.object)[options.property]){ this is not good, as dataItem.value is set to final at once, and we animate workingValue\n $array.remove(this.animationOptions, options);\n } else if (!$type.hasValue(options.from)) {\n // Initial value is undefined, treat it as static\n this.staticOptions.push(options);\n $array.remove(this.animationOptions, options);\n } else {\n // Use different update methods for different value types\n if ($type.isNumber(options.to)) {\n // Numeric value\n options.updateMethod = getProgressNumber;\n // Check if initial value is not Percent\n if (options.from instanceof Percent) {\n // It is. Let's convert it to pixel value\n // @todo Check if we can do this in a less hacky way\n var convertedFrom = this.object[getHybridProperty(options.property, \"pixel\")];\n if (!isNaN(convertedFrom)) {\n options.from = convertedFrom;\n } else {\n this.staticOptions.push(options);\n $array.remove(this.animationOptions, options);\n }\n } else if (isNaN(options.from)) {\n // Static value\n this.staticOptions.push(options);\n $array.remove(this.animationOptions, options);\n }\n } else {\n // Check if maybe we have a color or percent value\n if (options.to instanceof Color) {\n // Yup - set resolved named color\n //options.from = $colors.stringToColor(<string>options.from);\n if (options.from) {\n options.updateMethod = getProgressColor;\n } else {\n // Static value\n this.staticOptions.push(options);\n $array.remove(this.animationOptions, options);\n }\n } else if (options.to instanceof Percent) {\n // Percent\n options.updateMethod = getProgressPercent;\n // Check if the initial value is maybe in pixels\n if (!isNaN(options.from)) {\n // It is. Let's convert it\n // @todo Check if we can do this in a less hacky way\n var convertedFrom = this.object[getHybridProperty(options.property, \"relative\")];\n if (!isNaN(convertedFrom)) {\n options.from = percent(convertedFrom * 100);\n }\n }\n } else {\n // Static value\n this.staticOptions.push(options);\n $array.remove(this.animationOptions, options);\n }\n }\n }\n }\n // Apply static options (just in case they were reset by previous\n // animation loop)\n this.applyStaticOptions();\n if (this.events.isEnabled(\"animationstarted\")) {\n var event_1 = {\n type: \"animationstarted\",\n target: this,\n progress: this.progress\n };\n this.events.dispatchImmediately(\"animationstarted\", event_1);\n }\n this.update();\n // If duration is 0, just end animation\n if (this.duration === 0) {\n this.end();\n }\n return this;\n };\n /**\r\n * Sets loop count for the animation. If parameter is not a valid number the\r\n * animation will keep on looping indefinitely.\r\n *\r\n * @param count Number of times to loop animation\r\n * @return Animation\r\n */\n Animation.prototype.loop = function (count) {\n if (!$type.isNumber(count)) {\n count = Infinity;\n }\n this._loop = count;\n return this;\n };\n /**\r\n * Pauses animation.\r\n *\r\n * @return Animation\r\n */\n Animation.prototype.pause = function () {\n this._pause = true;\n if (this._delayTimeout) {\n this.removeDispose(this._delayTimeout);\n this._delayTimeout = null;\n }\n $array.remove(system.animations, this);\n $array.remove(this.object.animations, this);\n return this;\n };\n /**\r\n * Resumes paused animation.\r\n *\r\n * @return Animation\r\n */\n Animation.prototype.resume = function () {\n this._start();\n this._startTime = Date.now() - this._time;\n return this;\n };\n /**\r\n * Jumps to animation end. If animation is set to loop, this will start\r\n * another round of animation from start.\r\n *\r\n * @return Animation\r\n */\n Animation.prototype.end = function () {\n // Pause and complete the progress\n if (this._loop == 0) {\n this.pause();\n }\n this.setProgress(1);\n // Apply static options\n this.applyStaticOptions();\n if (this.events.isEnabled(\"animationended\")) {\n var event_2 = {\n type: \"animationended\",\n target: this,\n progress: this.progress\n };\n this.events.dispatchImmediately(\"animationended\", event_2);\n }\n // Check if we should loop\n if (this._loop > 0) {\n this._loop--;\n this.start();\n } else {\n this.stop();\n this._isFinished = true;\n }\n return this;\n };\n Animation.prototype.kill = function () {\n this.pause();\n this._isFinished = true;\n };\n /**\r\n * Returns indicator if this animation is finished or not\r\n *\r\n * @return Is finished?\r\n */\n Animation.prototype.isFinished = function () {\n return this._isFinished;\n };\n /**\r\n * Applies static options that can't be animated.\r\n */\n Animation.prototype.applyStaticOptions = function () {\n var _this = this;\n $array.each(this.staticOptions, function (options) {\n if (options.childObject) {\n options.childObject[options.property] = _this.progress == 1 ? options.to : options.from;\n } else {\n _this.object[options.property] = _this.progress == 1 ? options.to : options.from;\n }\n });\n };\n /**\r\n * Stops animation.\r\n *\r\n * When animation is stopped, the properties of the target object will remain\r\n * where they were at the moment when `stop()` was called.\r\n *\r\n * @param skipEvent Do not trigger `animationstopped` event\r\n * @return Animation\r\n */\n Animation.prototype.stop = function (skipEvent) {\n this.pause();\n if (!skipEvent) {\n if (this.events.isEnabled(\"animationstopped\")) {\n var event_3 = {\n type: \"animationstopped\",\n target: this,\n progress: this.progress\n };\n this.events.dispatchImmediately(\"animationstopped\", event_3);\n }\n }\n return this;\n };\n /**\r\n * Sets current progress and updates object's numeric and color values.\r\n *\r\n * @param progress Progress (0-1)\r\n */\n Animation.prototype.setProgress = function (progress) {\n var _this = this;\n this._time = this.duration * progress; // just in case we call this from outside\n $array.each(this.animationOptions, function (options) {\n if (options.updateMethod && $type.hasValue(options.from)) {\n var value = options.updateMethod(progress, options.from, options.to);\n if (options.childObject) {\n options.childObject[options.property] = value;\n } else {\n _this.object[options.property] = value;\n }\n }\n });\n this.progress = progress;\n if (this.events.isEnabled(\"animationprogress\")) {\n var event_4 = {\n type: \"animationprogress\",\n target: this,\n progress: this.progress\n };\n this.events.dispatchImmediately(\"animationprogress\", event_4);\n }\n system.requestFrame();\n };\n /**\r\n * Tracks and sets progress according to time or frames.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Animation\r\n */\n Animation.prototype.update = function () {\n if (!this._pause) {\n var progress = void 0;\n this._time = $math.fitToRange(Date.now() - this._startTime, 0, this.duration);\n var timeProgress = this._time / this.duration;\n progress = this.easing(timeProgress);\n if (this.duration == 0 || !$type.isNumber(progress) || timeProgress >= 1) {\n progress = 1;\n }\n this.setProgress(progress);\n if ($math.round(this._time / this.duration, 6) == 1) {\n this.end();\n }\n }\n return this;\n };\n Object.defineProperty(Animation.prototype, \"delayed\", {\n /**\r\n * Returns `true` if this animation is delayed.\r\n *\r\n * @readonly\r\n * @return [description]\r\n */\n get: function get() {\n return this._delayTimeout ? true : false;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Checks other animations currently running on the same object and removes\r\n * overlapping options from those other animations that are contained in\r\n * this animation.\r\n *\r\n * This is needed to ensure that no two confurent animations step on each\r\n * other's toes by trying to animate the same property.\r\n */\n Animation.prototype.stopSameAnimations = function () {\n var _this = this;\n // stop animation of the same property\n // TODO make this more efficient\n // TODO don't copy the array\n $array.each($array.copy(this.object.animations), function (animation) {\n if (animation !== _this && !animation.delayed) {\n var killed_1 = [];\n $array.each(_this.animationOptions, function (newOptions) {\n $array.each(animation.animationOptions, function (oldOptions) {\n if (newOptions.property == oldOptions.property && newOptions.childObject == oldOptions.childObject) {\n killed_1.push(oldOptions);\n if (animation.animationOptions.length == 0) {\n animation.kill();\n }\n }\n });\n });\n $array.each(killed_1, function (oldOptions) {\n $array.remove(animation.animationOptions, oldOptions);\n });\n }\n });\n };\n return Animation;\n}(BaseObjectEvents);\nexport { Animation };","import _ from 'lodashExtended';\n\nimport generalInformationSection from './Sec1GeneralInformation';\nimport wasteProductionAreas from './Sec2WasteProductionAreas';\nimport wasteProducedAndSegregation from './Sec3WasteProducedAndSegregation';\nimport otherWasteProduced from './Sec4OtherWasteProduced';\nimport wasteStorageAndTraining from './Sec5WasteStorageAndTraining';\n\nconst orderedSections = [\n generalInformationSection,\n wasteProductionAreas,\n wasteProducedAndSegregation,\n otherWasteProduced,\n wasteStorageAndTraining,\n];\n\nconst orderedSectionComponents = _.map(orderedSections, \"Component\");\nconst orderedSectionSummaryViews = _.map(orderedSections, \"SummaryView\");\n\nconst incompleteMessageBySectionId = {};\n_.each(\n orderedSections,\n ({ sectionId, incompleteMessage }) =>\n (incompleteMessageBySectionId[sectionId] = incompleteMessage)\n);\nconst sectionIncompleteMessage = (sectionId, state) =>\n incompleteMessageBySectionId[sectionId](state);\n\nconst isSectionComplete = (sectionId, state) =>\n _.isBlank(sectionIncompleteMessage(sectionId, state));\n\nvar isStartedBySectionId = {};\n_.each(\n orderedSections,\n ({ sectionId, isStarted }) => (isStartedBySectionId[sectionId] = isStarted)\n);\nconst isSectionStarted = (sectionId, state) =>\n isStartedBySectionId[sectionId](state);\nexport const areAnySectionStarted = (state) => {\n // NOTE: only checking section 1*, section 2, and section 5 to determine if user has started or not\n const careAboutSectionIds = [\n generalInformationSection,\n wasteProductionAreas,\n wasteStorageAndTraining,\n ].map((section) => section.sectionId);\n\n return Object.entries(isStartedBySectionId)\n .filter(([sectionId]) => careAboutSectionIds.includes(sectionId))\n .some(([sectionId, selectHasSectionStarted]) => {\n const sectionHasStarted = selectHasSectionStarted(state);\n if (sectionHasStarted) {\n console.info(`*** Detecting section:${sectionId} has started`);\n }\n return sectionHasStarted;\n });\n};\n\nconst orderedSectionIds = _.map(orderedSections, \"sectionId\");\n\nvar titleBySectionId = {};\n_.each(\n orderedSections,\n ({ sectionId, title }) => (titleBySectionId[sectionId] = title)\n);\nconst getSectionTitle = (sectionId) => titleBySectionId[sectionId];\n\nexport default orderedSectionComponents;\n\nexport {\n orderedSectionComponents,\n isSectionComplete,\n sectionIncompleteMessage,\n orderedSectionIds,\n isSectionStarted,\n orderedSections,\n orderedSectionSummaryViews,\n getSectionTitle,\n};\n","import React, { useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { useDropzone } from \"react-dropzone\";\nimport classNames from \"classnames\";\nimport { Link, Btn } from \"sharedComponents\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faUpload } from \"@fortawesome/free-solid-svg-icons\";\nimport { isMobile } from \"react-device-detect\";\nimport ProgressBar from \"react-bootstrap4/ProgressBar\";\n\nconst SUPPORTED_EXT_TO_MIME_TYPES = {\n doc: 'application/msword',\n pdf: 'application/pdf',\n docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n ods: 'application/vnd.oasis.opendocument.spreadsheet',\n odt: 'application/vnd.oasis.opendocument.text',\n xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n xls: 'application/vnd.ms-excel',\n}\n\nconst SUPPORTED_IMAGE_EXT_TO_MIME_TYPES = {\n png: 'image/png',\n jpg: 'image/jpeg'\n}\n\nfunction supportedExt(allowImages) {\n var defaultExt = Object.keys(SUPPORTED_EXT_TO_MIME_TYPES)\n var imageExt = Object.keys(SUPPORTED_IMAGE_EXT_TO_MIME_TYPES)\n return _(allowImages ? defaultExt.concat(imageExt) : defaultExt).map((x) => `.${x}`)\n}\n\nfunction supportedMimeTypes(allowImages) {\n var defaultMimeTypes = Object.values(SUPPORTED_EXT_TO_MIME_TYPES)\n var imageMimeTypes = Object.values(SUPPORTED_IMAGE_EXT_TO_MIME_TYPES)\n return allowImages ? defaultMimeTypes.concat(imageMimeTypes) : defaultMimeTypes\n}\n\nfunction truncateFilename(n, len) {\n var ext = n.substring(n.lastIndexOf(\".\") + 1, n.length).toLowerCase();\n var filename = n.replace(\".\" + ext, \"\");\n if (filename.length <= len) {\n return n;\n }\n filename = filename.substr(0, len) + (n.length > len ? \"[...]\" : \"\");\n return filename + \".\" + ext;\n}\n\nconst baseStyle = {\n flex: 1,\n display: \"flex\",\n flexDirection: \"row\",\n flexWrap: \"wrap\",\n alignItems: \"center\",\n padding: \"40px 40px 50px\",\n backgroundColor: \"#F7F7F7\",\n color: \"#bdbdbd\",\n outline: \"none\",\n transition: \"border .24s ease-in-out\",\n};\n\nconst activeStyle = {\n borderColor: \"#2196f3\",\n};\n\nconst acceptStyle = {\n borderColor: \"#00e676\",\n};\n\nconst rejectStyle = {\n borderColor: \"#ff1744\",\n};\n\nconst StyledDropzone = ({ onDrop, allowImages }) => {\n var accept = _.join(supportedMimeTypes(allowImages),\",\");\n\n const {\n getRootProps,\n getInputProps,\n isDragActive,\n isDragAccept,\n isDragReject,\n } = useDropzone({\n accept,\n onDrop: (files) => onDrop(files[0]),\n multiple: false,\n });\n\n const style = useMemo(\n () => ({\n ...baseStyle,\n ...(isDragActive ? activeStyle : {}),\n ...(isDragAccept ? acceptStyle : {}),\n ...(isDragReject ? rejectStyle : {}),\n }),\n [isDragActive, isDragReject, isDragAccept]\n );\n\n const renderContent = () => {\n if (!isMobile) {\n return (\n <div {...getRootProps({ style })} className=\"upload-container\">\n <FontAwesomeIcon\n icon={faUpload}\n size=\"3x\"\n className=\"upload-container--icon\"\n />\n <div className=\"upload-container__upload-area\">\n <p className=\"upload-container__upload-area--text\">\n Drop File Here\n </p>\n <span className=\"upload-container__upload-area--or\">or</span>\n <div>\n <input\n {...getInputProps()}\n className=\"input-file-custom\"\n id=\"file\"\n />\n <label htmlFor=\"file\" onClick={(e) => e.stopPropagation()}>\n Choose file to upload\n </label>\n </div>\n </div>\n </div>\n );\n } else {\n console.log(getInputProps())\n return (\n <div>\n <input {...getInputProps()} className=\"input-file-custom\" id=\"file\" />\n <label htmlFor=\"file\">\n {allowImages\n ? \"Browse a photo or Open camera\"\n : \"Choose file to upload\"}\n </label>\n </div>\n );\n }\n };\n\n return <div>{renderContent()}</div>;\n};\n\nconst UploadProgress = ({ document = {} }) => {\n var percentage = document.percentUploaded || 0;\n\n return (\n <div className=\"upload-container upload-img-container\">\n <div className=\"upload-container__upload-area upload-container-attaching\">\n <p> Attaching file...</p>\n <div className=\"progress-upload-container\">\n <ProgressBar\n variant=\"success\"\n now={percentage}\n label={`${percentage}%`}\n />\n </div>\n </div>\n </div>\n );\n};\n\nconst DocumentView = ({ document, onDelete }) => {\n return (\n <div>\n <i\n className=\"fa fa-trash-o fa-4 pull-right\"\n aria-hidden=\"true\"\n onClick={onDelete}\n ></i>\n <i className=\"fa fa-file-text-o fa-6\" aria-hidden=\"true\"></i> \n <Link target=\"_blank\" href={document.url}>\n {truncateFilename(document.metadata.name, 25)}\n </Link>\n </div>\n );\n};\n\nvar DocumentUploader = ({\n label,\n document,\n onDocumentUpload,\n onDocumentDelete,\n allErrors = {},\n allowImages = false,\n className,\n}) => {\n var url = _.get(document, \"url\");\n var supportedFormatText = `Supported file formats: ${ _(supportedExt(allowImages)).join(\", \") }`\n\n var show = url ? (\n <DocumentView\n document={document}\n onDelete={() => onDocumentDelete(document)}\n />\n ) : document ? (\n <UploadProgress document={document} />\n ) : (\n <StyledDropzone allowImages={allowImages} onDrop={onDocumentUpload} />\n );\n\n //show = <UploadProgress document={document}/>\n\n return (\n <div className={classNames(\"form-group\", \"string\", className)}>\n <label className={classNames(\"form-control-label\", \"string\")}>\n {label}\n </label>\n <p>Supported file formats: {supportedFormatText}</p>\n {show}\n </div>\n );\n};\n\nDocumentUploader.propTypes = {\n onDocumentUpload: PropTypes.func.isRequired,\n label: PropTypes.string.isRequired,\n};\n\nexport default DocumentUploader;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport Section from \"../Section\";\nimport SubmitSummarySection from \"../SubmitSummarySection\";\nimport {\n YesNoInput,\n TextInput,\n DateInput,\n SummaryRow\n} from 'auditComponents'\n\nimport DocumentUploader from \"../DocumentUploader\";\nimport { updateSectionData, submitSection } from \"../../sections/operations\";\nimport { getSectionData } from \"../../sections/selectors\";\nimport { uploadFile, deleteFile } from \"../../sections/operations\";\nimport { Link } from \"sharedComponents\";\nimport moment from \"moment\";\n\nconst SECTION_ID = \"waste_management_policy\";\nconst TITLE = \"Waste Management Policy\";\n\nconst incompleteMessage = (state) => {\n\n let {\n hasWasteManagementPolicy,\n policyDocument,\n policyOwnerName,\n policyLastReviewDate,\n } = getSectionData(SECTION_ID, state);\n\n var toCheck = [hasWasteManagementPolicy];\n\n if (hasWasteManagementPolicy == \"yes\") {\n toCheck = _.concat(\n toCheck,\n policyDocument,\n policyOwnerName,\n policyLastReviewDate\n );\n }\n\n const blankFields = _.filter(toCheck, _.isBlank).length\n\n return blankFields > 0 ? `There ${blankFields == 1 ? 'is' : 'are'} ${blankFields} unanswered question${blankFields == 1 ? '' : 's'} remaining` : null\n};\n\nconst isStarted = (state) => {\n return !_.isEmpty(getSectionData(SECTION_ID, state));\n};\n\nvar WasteManagementPolicy = ({\n onChange,\n onFileUpload,\n onFileDelete,\n sectionData,\n}) => {\n const {\n hasWasteManagementPolicy,\n policyDocument,\n policyOwnerName,\n policyLastReviewDate,\n } = sectionData;\n\n return (\n <Section\n sectionId={SECTION_ID}\n title={TITLE}\n subtext=\"You will be required to attach a copy of your Waste Management Policy in this section\"\n >\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n <YesNoInput\n name=\"hasWasteManagementPolicy\"\n value={hasWasteManagementPolicy}\n label={\"Does your Practice have a Waste Management Policy?\"}\n onChange={onChange}\n />\n {hasWasteManagementPolicy == \"yes\" ? (\n <div>\n <DocumentUploader\n label=\"Please attach a Copy\"\n document={policyDocument}\n onDocumentDelete={(file) => onFileDelete(file, \"policyDocument\") }\n onDocumentUpload={(file) => onFileUpload(file, \"policyDocument\") }\n className=\"mt-45\"\n />\n <TextInput\n name=\"policyOwnerName\"\n value={policyOwnerName}\n label=\"Name of the Owner\"\n subtext=\"Please provide the name of the Owner or Author of the Waste Management Policy\"\n onChange={onChange}\n className=\"mt-45\"\n />\n <div className=\"mt-45\">\n <DateInput\n name=\"policyLastReviewDate\"\n value={policyLastReviewDate}\n label=\"Last Review Date\"\n onChange={onChange}\n />\n </div>\n </div>\n ) : null}\n </div>\n </div>\n </Section>\n );\n};\n\nvar SummaryView = ({ onChange, wasteAudit }) => {\n const {\n hasWasteManagementPolicy,\n policyDocument,\n policyOwnerName,\n policyLastReviewDate,\n } = wasteAudit.sections[SECTION_ID] || {};\n\n return (\n <SubmitSummarySection sectionId={SECTION_ID} title={TITLE}>\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n <SummaryRow\n value={hasWasteManagementPolicy}\n label={\"Has a Waste Management Policy?\"}\n />\n {hasWasteManagementPolicy == \"yes\" ? (\n <React.Fragment>\n <SummaryRow label=\"Policy copy\">\n {policyDocument ? (\n <Link target=\"_blank\" href={policyDocument.url}>\n {policyDocument.metadata.name}\n </Link>\n ) : null }\n </SummaryRow>\n <SummaryRow value={policyOwnerName} label={\"Name of the Owner\"} />\n <SummaryRow\n value={\n policyLastReviewDate &&\n moment(policyLastReviewDate).format(\"DD/MM/YYYY\")\n }\n label={\"Last Review Date\"}\n />\n </React.Fragment>\n ) : null}\n </div>\n </div>\n </SubmitSummarySection>\n );\n};\n\nconst mapStateToProps = (state) => {\n return {\n sectionData: getSectionData(SECTION_ID, state),\n };\n};\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onChange: (value, name) => {\n dispatch(updateSectionData(SECTION_ID, { [name]: value }));\n },\n onFileUpload: (file, name) => dispatch(uploadFile(name, SECTION_ID, file)),\n onFileDelete: (file, name) => dispatch(deleteFile(name, SECTION_ID, file)),\n };\n};\n\nWasteManagementPolicy = connect(\n mapStateToProps,\n mapDispatchToProps\n)(WasteManagementPolicy);\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n incompleteMessage,\n isStarted,\n Component: WasteManagementPolicy,\n SummaryView,\n};\n","import React, { useReducer } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport dotProp from \"dot-prop-immutable\";\nimport Section from \"../Section\";\nimport SubmitSummarySection from \"../SubmitSummarySection\";\nimport {\n YesNoInput,\n TextInput,\n CheckboxInput,\n DateInput,\n SelectWithOtherInput,\n SummaryRow\n} from 'auditComponents'\nconst Checkbox = CheckboxInput.Checkbox\n\nimport DocumentUploader from \"../DocumentUploader\";\nimport { updateSectionData, submitSection } from \"../../sections/operations\";\nimport { getSectionData } from \"../../sections/selectors\";\nimport { uploadFile, deleteFile } from \"../../sections/operations\";\nimport { Link } from \"sharedComponents\";\nimport moment from \"moment\";\nimport emailAddressCheck from \"email-addresses\";\n\nconst SECTION_ID = \"hwcn_records\";\nconst TITLE = \"Hazardous Waste Consignment Notes (HWCN)\";\n\nconst d = dotProp;\n\nfunction getErrors(attr){\n var emailAttr = 'providedByFormat.electronic'\n var email = attr[emailAttr]\n var errors = {}\n if(_.isPresent(email)) {\n errors[emailAttr] = emailAddressCheck.parseOneAddress(email) ? null : [\"please enter a valid email address\"]\n }\n return errors\n}\n\nfunction mergeErrors(allErrors, attr) {\n return {\n ...allErrors,\n ...getErrors(attr),\n }\n\n}\n\nconst incompleteMessage = (state) => {\n let {\n hasHwcnRecords,\n has3YearsHwcnRecords,\n recentHwcnDocument,\n historicHwcnDocument,\n recentHwcnDocumentDate,\n historicHwcnDocumentDate,\n providedByFormat,\n } = getSectionData(SECTION_ID, state);\n var toCheck = [hasHwcnRecords];\n\n if (hasHwcnRecords == \"yes\") {\n toCheck = _.concat(\n toCheck,\n providedByFormat,\n recentHwcnDocument,\n recentHwcnDocumentDate,\n has3YearsHwcnRecords\n );\n }\n\n if (has3YearsHwcnRecords == \"yes\" && hasHwcnRecords == \"yes\") {\n toCheck = _.concat(\n toCheck,\n historicHwcnDocumentDate,\n historicHwcnDocumentDate\n );\n }\n\n const blankFields = _.filter(toCheck, _.isBlank).length\n return blankFields > 0 ? `There ${blankFields == 1 ? 'is' : 'are'} ${blankFields} unanswered question${blankFields == 1 ? '' : 's'} remaining` : null\n};\n\nconst isStarted = (state) => {\n return !_.isEmpty(getSectionData(SECTION_ID, state));\n};\n\nvar HazardousWasteConsignmentNotes = ({\n onChange,\n onFileUpload,\n onFileDelete,\n sectionData,\n}) => {\n const {\n hasHwcnRecords,\n has3YearsHwcnRecords,\n recentHwcnDocument,\n historicHwcnDocument,\n recentHwcnDocumentDate,\n historicHwcnDocumentDate,\n providedByFormat = {},\n } = sectionData;\n\n const [errors, setErrors] = useReducer(mergeErrors, {})\n const { paper, electronic, anenta } = providedByFormat;\n\n var threeYearsAgo = new Date()\n threeYearsAgo.setFullYear(threeYearsAgo.getFullYear() - 3);\n\n return (\n <Section\n sectionId={SECTION_ID}\n title={TITLE}\n subtext=\"You will require copies of your Hazardous Waste Consignment Notes (HWCN)\"\n >\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n <YesNoInput\n name=\"hasHwcnRecords\"\n value={hasHwcnRecords}\n label={\n \"Does the site keep records of Hazardous Waste Consignment Notes?\"\n }\n onChange={onChange}\n />\n {hasHwcnRecords == \"yes\" ? (\n <React.Fragment>\n <CheckboxInput\n label=\"Which format are HWCNs provided to you by the waste contractor?\"\n className=\"mt-45\"\n >\n <Checkbox\n value={paper}\n name=\"providedByFormat.paper\"\n label=\"Paper\"\n onSelect={onChange}\n />\n <Checkbox\n value={anenta}\n name=\"providedByFormat.anenta\"\n label=\"Online in my Anenta Account\"\n onSelect={onChange}\n />\n <Checkbox\n value={electronic}\n name=\"providedByFormat.electronic\"\n label=\"Electronic\"\n onSelect={onChange}\n >\n <TextInput\n name=\"providedByFormat.electronic\"\n value={electronic === true ? null : electronic}\n blankValue={true}\n placeholder=\"Email address are they sent to?\"\n onChange={onChange}\n onValidate={setErrors}\n allErrors={errors}\n />\n </Checkbox>\n </CheckboxInput>\n <DocumentUploader\n label=\"Provide a sample of a recent HWCN\"\n document={recentHwcnDocument}\n onDocumentDelete={(file) =>\n onFileDelete(file, \"recentHwcnDocument\")\n }\n onDocumentUpload={(file) =>\n onFileUpload(file, \"recentHwcnDocument\")\n }\n allowImages={true}\n className=\"mt-45\"\n />\n <div className=\"mt-45\">\n <DateInput\n name=\"recentHwcnDocumentDate\"\n value={recentHwcnDocumentDate}\n label=\"Please confirm the date of the uploaded HWCN\"\n onChange={onChange}\n />\n </div>\n\n <YesNoInput\n name=\"has3YearsHwcnRecords\"\n value={has3YearsHwcnRecords}\n label={\"Have you retained up to 3 years of HWCN records?\"}\n subtext=\"Or since the practice opened if less than 3 years ago\"\n onChange={onChange}\n className=\"mt-45\"\n />\n {has3YearsHwcnRecords == \"yes\" ? (\n <React.Fragment>\n <DocumentUploader\n label=\"Please provide a sample HWCN that is 3 years old\"\n document={historicHwcnDocument}\n onDocumentDelete={(file) =>\n onFileDelete(file, \"historicHwcnDocument\")\n }\n onDocumentUpload={(file) =>\n onFileUpload(file, \"historicHwcnDocument\")\n }\n allowImages={true}\n subtext=\"If your practice has not been in operation for 3 years please provide the oldest HWCN from your records\"\n className=\"mt-45\"\n />\n <div className=\"mt-45\">\n <DateInput\n name=\"historicHwcnDocumentDate\"\n value={historicHwcnDocumentDate}\n label=\"Please confirm the date of the HWCN\"\n scrollableYearDropdown={true}\n showYearDropdown={true}\n openToDate={threeYearsAgo}\n onChange={onChange}\n />\n </div>\n </React.Fragment>\n ) : null}\n </React.Fragment>\n ) : null}\n </div>\n </div>\n </Section>\n );\n};\n\nconst getDisplayText = (value, trueText, valuePrefix) => {\n return value\n ? `${trueText}${value !== true ? `, ${valuePrefix}${value}` : \"\"}`\n : null;\n};\n\nvar SummaryView = ({ onChange, wasteAudit }) => {\n const {\n hasHwcnRecords,\n has3YearsHwcnRecords,\n recentHwcnDocument,\n historicHwcnDocument,\n recentHwcnDocumentDate,\n historicHwcnDocumentDate,\n providedByFormat = {},\n } = wasteAudit.sections[SECTION_ID] || {};\n\n const { paper, electronic, anenta } = providedByFormat;\n\n return (\n <SubmitSummarySection sectionId={SECTION_ID} title={TITLE}>\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n <SummaryRow value={hasHwcnRecords} label={\"Has HWCN records?\"} />\n {hasHwcnRecords == \"yes\" ? (\n <React.Fragment>\n <SummaryRow label={\"HWCN Format\"}>\n {[\n [paper, \"Paper\"],\n [electronic, \"Electronic\", \"sent to \"],\n [anenta, \"Online via Anenta\"],\n ].map((x, index) => (\n <div key={index}>{getDisplayText(...x)}</div>\n ))}\n </SummaryRow>\n <SummaryRow label=\"Sample of a recent HWCN\">\n {recentHwcnDocument ? (\n <Link target=\"_blank\" href={recentHwcnDocument.url}>\n {recentHwcnDocument.metadata.name}\n </Link>\n ) : null}\n </SummaryRow>\n <SummaryRow\n value={\n recentHwcnDocumentDate &&\n moment(recentHwcnDocumentDate).format(\"DD/MM/YYYY\")\n }\n label={\"Date of the recent HWCN\"}\n />\n <SummaryRow\n value={has3YearsHwcnRecords}\n label={\"HWCN older than 3 years\"}\n />\n {has3YearsHwcnRecords == \"yes\" ? (\n <React.Fragment>\n <SummaryRow label=\"Sample of HWCN older than 3 years\">\n { historicHwcnDocument ? (\n <Link target=\"_blank\" href={historicHwcnDocument.url}>\n {historicHwcnDocument.metadata.name}\n </Link>\n ) : null }\n </SummaryRow>\n <SummaryRow\n value={\n historicHwcnDocumentDate &&\n moment(historicHwcnDocumentDate).format(\"DD/MM/YYYY\")\n }\n label={\"Date of the HWCN older than 3 years\"}\n />\n </React.Fragment>\n ) : null}\n </React.Fragment>\n ) : null}\n </div>\n </div>\n </SubmitSummarySection>\n );\n};\n\nconst mapStateToProps = (state) => {\n return {\n sectionData: getSectionData(SECTION_ID, state),\n };\n};\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onChange: (value, name) => {\n dispatch(updateSectionData(SECTION_ID, d.set({}, name, value)));\n },\n onFileUpload: (file, name) => dispatch(uploadFile(name, SECTION_ID, file)),\n onFileDelete: (file, name) => dispatch(deleteFile(name, SECTION_ID, file)),\n };\n};\n\nHazardousWasteConsignmentNotes = connect(\n mapStateToProps,\n mapDispatchToProps\n)(HazardousWasteConsignmentNotes);\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n incompleteMessage,\n isStarted,\n Component: HazardousWasteConsignmentNotes,\n SummaryView,\n};\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport dotProp from \"dot-prop-immutable\";\nimport Section from \"../Section\";\nimport SubmitSummarySection from \"../SubmitSummarySection\";\nimport {\n YesNoInput,\n TextAreaInput,\n TextInput,\n RadioInput,\n CheckboxInput,\n SelectWithOtherInput,\n SummaryRow\n} from 'auditComponents'\nconst Checkbox = CheckboxInput.Checkbox\nimport DocumentUploader from \"../DocumentUploader\";\nimport { updateSectionData, submitSection } from \"../../sections/operations\";\nimport { getSectionData } from \"../../sections/selectors\";\nimport { uploadFile, deleteFile } from \"../../sections/operations\";\nimport { Link } from \"sharedComponents\";\n\nconst SECTION_ID = \"waste_management_training\";\nconst TITLE = \"Waste Management Training\";\nconst d = dotProp;\n\nconst incompleteMessage = (state) => {\n let {\n doesWasteManagementTraining,\n hasWasteManagementTrainingRecords,\n trainingProvidedTo,\n trainingRecordSample,\n whenIsTrainingDone,\n hasSegregationSignage,\n trainingMethod,\n } = getSectionData(SECTION_ID, state);\n\n var toCheck = [doesWasteManagementTraining, hasSegregationSignage];\n\n if (doesWasteManagementTraining == \"yes\") {\n toCheck = _.concat(\n toCheck,\n trainingProvidedTo,\n whenIsTrainingDone,\n trainingMethod,\n hasWasteManagementTrainingRecords\n );\n }\n\n if (hasWasteManagementTrainingRecords == \"yes\" && doesWasteManagementTraining == \"yes\") {\n toCheck = _.concat(toCheck, trainingRecordSample);\n }\n\n const blankFields = _.filter(toCheck, _.isBlank).length\n\n return blankFields > 0 ? `There ${blankFields == 1 ? 'is' : 'are'} ${blankFields} unanswered question${blankFields == 1 ? '' : 's'} remaining` : null\n};\n\nconst isStarted = (state) => {\n return !_.isEmpty(getSectionData(SECTION_ID, state));\n};\n\nconst selectFrequencyOptions = [\n { value: \"Annually\", label: \"Annually\" },\n { value: \"Every 6 Months\", label: \"Every 6 Months\" },\n];\n\nconst selectTrainedStaffOptions = [\n {\n value: \"All staff (including non-clinical staff)\",\n label: \"All staff (including non-clinical staff)\",\n },\n { value: \"Clinical staff only\", label: \"Clinical staff only\" },\n];\n\nvar WasteManagementTraining = ({\n onChange,\n onFileUpload,\n onFileDelete,\n sectionData,\n}) => {\n const {\n doesWasteManagementTraining,\n hasWasteManagementTrainingRecords,\n trainingProvidedTo,\n trainingRecordSample,\n hasSegregationSignage,\n whenIsTrainingDone = {},\n trainingMethod = {},\n } = sectionData;\n const { atInduction, adHoc, regularly } = whenIsTrainingDone;\n const { online, group, onToOne } = trainingMethod;\n\n \n return (\n <Section\n sectionId={SECTION_ID}\n title={TITLE}\n subtext=\"You will be required to attach a sample of your Waste Management Training records in this section\"\n >\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n <YesNoInput\n name=\"doesWasteManagementTraining\"\n value={doesWasteManagementTraining}\n label=\"Does your Practice provide Waste Management Training?\"\n onChange={onChange}\n />\n\n {doesWasteManagementTraining == \"yes\" ? (\n <div>\n <RadioInput\n name=\"trainingProvidedTo\"\n selectedValue={trainingProvidedTo}\n label=\"Who is training provided to?\"\n options={selectTrainedStaffOptions}\n onSelect={onChange}\n />\n <CheckboxInput\n label=\"When do your staff members receive Waste Management Training?\"\n className=\"mt-45\"\n >\n <Checkbox\n value={atInduction}\n name=\"whenIsTrainingDone.atInduction\"\n label=\"At Induction\"\n onSelect={onChange}\n />\n <Checkbox\n value={adHoc}\n name=\"whenIsTrainingDone.adHoc\"\n label=\"Ad hoc (ie. on policy changes)\"\n onSelect={onChange}\n />\n <Checkbox\n value={regularly}\n name=\"whenIsTrainingDone.regularly\"\n label=\"Regularly\"\n onSelect={onChange}\n >\n <SelectWithOtherInput\n name=\"whenIsTrainingDone.regularly\"\n value={regularly}\n placeholder=\"Select frequency\"\n onChange={onChange}\n blankValue={true}\n isSearchable={false}\n otherPlaceholder=\"What is the frequency of training?\"\n options={selectFrequencyOptions}\n />\n </Checkbox>\n </CheckboxInput>\n <CheckboxInput\n label=\"How is the Training Provided? \"\n className=\"mt-45\"\n >\n <Checkbox\n value={onToOne}\n name=\"trainingMethod.onToOne\"\n label=\"One to One\"\n onSelect={onChange}\n />\n <Checkbox\n value={group}\n name=\"trainingMethod.group\"\n label=\"Group\"\n onSelect={onChange}\n />\n <Checkbox\n value={online}\n name=\"trainingMethod.online\"\n label=\"Online\"\n onSelect={onChange}\n >\n <TextInput\n name=\"trainingMethod.online\"\n value={online === true ? null : online}\n blankValue={true}\n label=\"\"\n subtext=\"What is the name of the system that you use for the training?\"\n onChange={onChange}\n />\n </Checkbox>\n </CheckboxInput>\n <YesNoInput\n name=\"hasWasteManagementTrainingRecords\"\n value={hasWasteManagementTrainingRecords}\n label={\n \"Does your Practice have Waste Management Training records?\"\n }\n onChange={onChange}\n />\n {hasWasteManagementTrainingRecords == \"yes\" ? (\n <DocumentUploader\n label=\"Sample of a Training Record\"\n document={trainingRecordSample}\n onDocumentDelete={(file) =>\n onFileDelete(file, \"trainingRecordSample\")\n }\n onDocumentUpload={(file) =>\n onFileUpload(file, \"trainingRecordSample\")\n }\n allowImages={true}\n className=\"mt-45\"\n />\n ) : null}\n </div>\n ) : null}\n <YesNoInput\n name=\"hasSegregationSignage\"\n value={hasSegregationSignage}\n label=\"Are there signs at each bin in your practice outlining waste segregation by waste type?\"\n onChange={onChange}\n />\n\n </div>\n </div>\n </Section>\n );\n};\n\nconst getDisplayText = (value, trueText) => {\n return value ? `${trueText}${value !== true ? `, ${value}` : \"\"}` : null;\n};\n\nvar SummaryView = ({ onChange, wasteAudit }) => {\n const {\n doesWasteManagementTraining,\n hasWasteManagementTrainingRecords,\n trainingProvidedTo,\n trainingRecordSample,\n hasSegregationSignage,\n whenIsTrainingDone = {},\n trainingMethod = {},\n } = wasteAudit.sections[SECTION_ID] || {};\n\n const { atInduction, adHoc, regularly } = whenIsTrainingDone;\n const { online, group, onToOne } = trainingMethod;\n\n return (\n <SubmitSummarySection sectionId={SECTION_ID} title={TITLE}>\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n <SummaryRow\n value={doesWasteManagementTraining}\n label={\"Provides waste management training?\"}\n />\n {doesWasteManagementTraining == \"yes\" ? (\n <React.Fragment>\n <SummaryRow\n value={trainingProvidedTo}\n label={\"Training is provided to\"}\n />\n <SummaryRow label={\"How often is the training?\"}>\n {[\n [atInduction, \"At Induction\"],\n [adHoc, \"Ad Hoc\"],\n [regularly, \"Regularly\"],\n ].map((x, index) => (\n <div key={index}>{getDisplayText(...x)}</div>\n ))}\n </SummaryRow>\n <SummaryRow label={\"Training format\"}>\n {[\n [online, \"Online\"],\n [group, \"Group\"],\n [onToOne, \"One to one\"],\n ].map((x, index) => (\n <div key={index}>{getDisplayText(...x)}</div>\n ))}\n </SummaryRow>\n <SummaryRow label=\"Sample of a Training Record\">\n {trainingRecordSample ? (\n <Link target=\"_blank\" href={trainingRecordSample.url}>\n {trainingRecordSample.metadata.name}\n </Link>\n ) : null }\n </SummaryRow>\n </React.Fragment>\n ) : null}\n <SummaryRow\n value={hasSegregationSignage}\n label={\"Has segregation signage?\"}\n />\n </div>\n </div>\n </SubmitSummarySection>\n );\n};\n\nconst mapStateToProps = (state) => {\n return {\n sectionData: getSectionData(SECTION_ID, state),\n };\n};\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onChange: (value, name) => {\n dispatch(updateSectionData(SECTION_ID, d.set({}, name, value)));\n },\n onFileUpload: (file, name) => dispatch(uploadFile(name, SECTION_ID, file)),\n onFileDelete: (file, name) => dispatch(deleteFile(name, SECTION_ID, file)),\n };\n};\n\nWasteManagementTraining = connect(\n mapStateToProps,\n mapDispatchToProps\n)(WasteManagementTraining);\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n incompleteMessage,\n isStarted,\n Component: WasteManagementTraining,\n SummaryView,\n};\n","import generalInformationSection from './GeneralInformation'\nimport wasteManagementPolicySection from './WasteManagementPolicy'\nimport hazardousWasteConsignmentNotesSection from './HazardousWasteConsignmentNotes'\nimport wasteManagementTrainingSection from './WasteManagementTraining'\nimport internalWasteContainmentSection from './InternalWasteContainment'\n//import externalWasteContainmentSection from './ExternalWasteContainment'\n//import bulkInternalContainmentSection from './BulkInternalContainment'\nimport bulkWasteStorageContainmentSection from './BulkWasteStorageContainment'\n\nimport _ from 'lodashExtended'\n\nconst orderedSections = [\n generalInformationSection,\n wasteManagementPolicySection,\n wasteManagementTrainingSection,\n hazardousWasteConsignmentNotesSection,\n internalWasteContainmentSection,\n bulkWasteStorageContainmentSection,\n]\n\nconst orderedSectionComponents = _.map(orderedSections, 'Component')\nconst orderedSectionSummaryViews = _.map(orderedSections, 'SummaryView')\n\nconst incompleteMessageBySectionId = {}\n_.each(orderedSections, ({sectionId, incompleteMessage}) => incompleteMessageBySectionId[sectionId] = incompleteMessage )\nconst sectionIncompleteMessage = (sectionId, state) => incompleteMessageBySectionId[sectionId](state)\n\nconst isSectionComplete = (sectionId, state) => _.isBlank(sectionIncompleteMessage(sectionId,state))\n\nvar isStartedBySectionId = {}\n_.each(orderedSections, ({sectionId, isStarted}) => isStartedBySectionId[sectionId] = isStarted )\nconst isSectionStarted = (sectionId, state) => isStartedBySectionId[sectionId](state)\n\nconst orderedSectionIds = _.map(orderedSections, 'sectionId')\n\n\nvar titleBySectionId = {}\n_.each(orderedSections, ({sectionId, title}) => titleBySectionId[sectionId] = title )\nconst getSectionTitle = (sectionId) => titleBySectionId[sectionId]\n\n\nexport default orderedSectionComponents\n\nexport {\n orderedSectionComponents,\n isSectionComplete,\n sectionIncompleteMessage,\n orderedSectionIds,\n isSectionStarted,\n orderedSections,\n orderedSectionSummaryViews,\n getSectionTitle\n}\n\n\n\n\n\n\n\n","/**\r\n * Mouse-related functionality\r\n */\n/**\r\n * Defines static methods that hold style list for various mouse cursor styles,\r\n * maintaining browser compatibility.\r\n */\nvar MouseCursorStyle = /** @class */function () {\n function MouseCursorStyle() {}\n /**\r\n * Styles for \"grab\" mouse cursor.\r\n */\n MouseCursorStyle.grab = [{\n \"property\": \"cursor\",\n \"value\": \"move\"\n }, {\n \"property\": \"cursor\",\n \"value\": \"grab\"\n }, {\n \"property\": \"cursor\",\n \"value\": \"-webkit-grab\"\n }];\n /**\r\n * Styles for \"grabbing\" mouse cursor.\r\n */\n MouseCursorStyle.grabbing = [{\n \"property\": \"cursor\",\n \"value\": \"move\"\n }, {\n \"property\": \"cursor\",\n \"value\": \"grabbing\"\n }, {\n \"property\": \"cursor\",\n \"value\": \"-webkit-grabbing\"\n }];\n /**\r\n * Styles for \"pointer\" mouse cursor. (usually used for links)\r\n */\n MouseCursorStyle.pointer = [{\n \"property\": \"cursor\",\n \"value\": \"pointer\"\n }];\n /**\r\n * Styles for default mouse cursor. (browser determines style)\r\n */\n MouseCursorStyle[\"default\"] = [{\n \"property\": \"cursor\",\n \"value\": \"default\"\n }];\n /**\r\n * Styles for horizontal bi-directional resize mouse cursor.\r\n */\n MouseCursorStyle.horizontalResize = [{\n \"property\": \"cursor\",\n \"value\": \"ew-resize\"\n }];\n /**\r\n * Styles for vertical bi-directional mouse cursor.\r\n */\n MouseCursorStyle.verticalResize = [{\n \"property\": \"cursor\",\n \"value\": \"ns-resize\"\n }];\n return MouseCursorStyle;\n}();\nexport { MouseCursorStyle };","import {\n FetchArgs,\n createApi,\n fetchBaseQuery,\n retry,\n} from \"@reduxjs/toolkit/query/react\";\n\nconst staggeredBaseQueryWithBailOut = retry(\n async (args: string | FetchArgs, api, extraOptions) => {\n const result = await fetchBaseQuery({\n baseUrl: \"/\",\n prepareHeaders: (headers) => {\n headers.set(\"Accept\", \"application/json\");\n\n const csrfToken = document\n .querySelector('meta[name=\"csrf-token\"]')\n ?.getAttribute(\"content\");\n if (csrfToken) {\n headers.set(\"X-CSRF-Token\", csrfToken);\n headers.set(\"Accept\", \"application/json\");\n }\n return headers;\n },\n })(args, api, extraOptions);\n\n // bail out of re-tries immediately if unauthorized,\n // because we know successive re-retries would be redundant\n if ([401, 403, 404, 422, 500].includes(Number(result.error?.status))) {\n retry.fail(result.error);\n }\n\n return result;\n },\n {\n maxRetries: 0,\n }\n);\n\n/**\n * Create a base API to inject endpoints into elsewhere.\n * Components using this API should import from the injected site,\n * in order to get the appropriate types,\n * and to ensure that the file injecting the endpoints is loaded\n */\nexport const api = createApi({\n /**\n * `reducerPath` is optional and will not be required by most users.\n * This is useful if you have multiple API definitions,\n * e.g. where each has a different domain, with no interaction between endpoints.\n * Otherwise, a single API definition should be used in order to support tag invalidation,\n * among other features\n */\n reducerPath: \"api\",\n /**\n * A bare bones base query would just be `baseQuery: fetchBaseQuery({ baseUrl: '/' })`\n */\n baseQuery: staggeredBaseQueryWithBailOut,\n //baseQuery: baseQueryWithRetry,\n /**\n * Tag types must be defined in the original API definition\n * for any tags that would be provided by injected endpoints\n */\n tagTypes: [\n \"BinType\",\n \"BinGroup\",\n \"Ticket\",\n \"TicketReplies\",\n \"Service\",\n \"FailedVisitReport\",\n \"AdhocVisitRequests\",\n \"StockDeliveryRequests\",\n \"RemediationCases\",\n \"Visit\",\n \"VendorServiceMapping\",\n \"ServiceSuspensionRequests\",\n \"ServiceTerminationRequests\",\n \"ServiceResumptionRequests\",\n \"SpecChangeRequests\",\n \"VisitFrequencyChangeRequests\",\n \"LocationTickets\",\n \"AllTimeStaff\",\n \"Vendors\",\n \"Remediations\",\n \"Remediation\"\n ],\n /**\n * This api has endpoints injected in adjacent files,\n * which is why no endpoints are shown below.\n * If you want all endpoints defined in the same file, they could be included here instead\n */\n endpoints: () => ({}),\n});\n\nexport const enhancedApi = api.enhanceEndpoints({\n endpoints: () => ({}),\n});\n","import { Badge, Box, MenuItem, Select, styled, Tab, Tabs } from \"@mui/material\";\nimport { size } from \"lodash\";\nimport { useContext } from \"react\";\nimport AppContext from \"ticket/AppContext\";\nimport {\n useAdhocVisitRequests,\n useFailedVisitReports,\n useRemediationCases,\n useServiceResumptionRequests,\n useServiceSuspensionRequests,\n useServiceTerminationRequests,\n useSpecChangeRequests,\n useStockDeliveryRequests,\n useVisitFrequencyChangeRequests,\n} from \"ticket/selectors\";\nimport AdhocVisitRequestTab from \"./AdhocVisitRequestTab\";\nimport AllRequestTab from \"./AllRequestTab\";\nimport RemediationCaseTab from \"./RemediationCaseTab\";\nimport ReportTab from \"./ReportTab\";\nimport ServiceResumptionRequestTab from \"./ServiceResumptionRequestTab\";\nimport ServiceSuspensionRequestTab from \"./ServiceSuspensionRequestTab\";\nimport ServiceTerminationRequestTab from \"./ServiceTerminationRequestTab\";\nimport SpecChangeRequestTab from \"./SpecChangeRequestTab\";\nimport StockDeliveryRequestTab from \"./StockDeliveryRequestTab\";\nimport VisitFrequencyChangeRequestTab from \"./VisitFrequencyChangeRequestTab\";\n\nexport const StyledTabs = styled(Tabs)({\n backgroundColor: \"#2C3237\",\n // borderRadius: \"4px\",\n \".MuiTabs-indicator\": {\n display: \"none\",\n },\n});\n\nexport const StyledTab = styled(Tab)({\n padding: '1px 20px',\n // fontSize: \"12px\",\n color: \"#fff\",\n // minWidth: \"120px\",\n textTransform: \"none\",\n \"&.Mui-selected\": {\n // color: \"#fff\",\n backgroundColor: \"#1F2328\",\n },\n \"&.Mui-focusVisible\": {\n backgroundColor: \"#262B30\",\n },\n});\n\nexport const TabPanel = ({ children, value, index, ...other }) => {\n return (\n <Box\n role=\"tabpanel\"\n id={`simple-tabpanel-${index}`}\n aria-labelledby={`simple-tab-${index}`}\n {...other}\n >\n {value == index && children}\n </Box>\n );\n};\n\nconst BadgeTabLabel = ({ count, label, color, ...other }) => (\n <Badge\n color={color}\n badgeContent={count > 0 ? count : null}\n slotProps={{\n badge: {\n style: {\n right: \"-10px\",\n top: 0,\n },\n },\n }}\n {...other}\n >\n {label}\n </Badge>\n);\n\nconst MainTabs = () => {\n const { formType, setFormType, cardTab, setCardTab } = useContext(AppContext);\n const adhocVisitRequests = useAdhocVisitRequests();\n const stockDeliveryRequests = useStockDeliveryRequests();\n const remediationCase = useRemediationCases();\n const failedVisitReports = useFailedVisitReports();\n const serviceSuspensionRequests = useServiceSuspensionRequests();\n const serviceTerminationRequests = useServiceTerminationRequests();\n const serviceResumptionRequests = useServiceResumptionRequests();\n const specChangeRequests = useSpecChangeRequests();\n const visitFrequencyChangeRequests = useVisitFrequencyChangeRequests();\n\n const handleChange = (_event, newValue) => {\n setCardTab(newValue);\n };\n\n const handleformTypeChange = (event) => {\n setFormType(event.target.value);\n };\n\n const requestsCount =\n size(adhocVisitRequests) +\n size(stockDeliveryRequests) +\n size(specChangeRequests) +\n size(visitFrequencyChangeRequests) +\n size(serviceSuspensionRequests) +\n size(serviceResumptionRequests) +\n size(serviceTerminationRequests);\n\n return (\n <Box sx={{ width: \"100%\", backgroundColor: \"#1E2328\", borderRadius: 2 }}>\n <Box sx={{ borderBottom: 1, borderColor: \"divider\" }}>\n <StyledTabs value={cardTab} onChange={handleChange}>\n <StyledTab\n value=\"request\"\n label={\n <BadgeTabLabel\n color=\"primary\"\n count={requestsCount}\n label=\"Requests\"\n />\n }\n />\n <StyledTab\n value=\"report\"\n label={\n <BadgeTabLabel\n color=\"primary\"\n count={failedVisitReports?.length}\n label=\"Reports\"\n />\n }\n />\n <StyledTab\n value=\"case\"\n label={\n <Badge\n color=\"secondary\"\n badgeContent={remediationCase ? \"!\" : null}\n slotProps={{\n badge: {\n style: {\n right: \"-10px\",\n top: 0,\n },\n },\n }}\n >\n Case\n </Badge>\n }\n sx={{\n ...(remediationCase ? { border: \"2px solid #9c27b0\" } : {}),\n }}\n />\n </StyledTabs>\n </Box>\n <TabPanel value={cardTab} index=\"request\">\n <Box sx={{ p: 2 }}>\n <Select\n value={formType}\n onChange={handleformTypeChange}\n displayEmpty\n fullWidth\n SelectDisplayProps={{\n style: {\n background: \"#31363A\",\n color: \"#fff\",\n fontSize: \"12px\",\n },\n }}\n inputProps={{\n \"aria-label\": \"Without label\",\n }}\n sx={{\n \"& .MuiSvgIcon-root\": {\n color: \"#fff\",\n },\n }}\n >\n <MenuItem sx={{ fontSize: \"12px\" }} value=\"all\">\n All Requests\n </MenuItem>\n <MenuItem sx={{ fontSize: \"12px\" }} value=\"adhoc\">\n Adhoc Visit Requests\n </MenuItem>\n <MenuItem sx={{ fontSize: \"12px\" }} value=\"stock\">\n Stock Delivery Requests\n </MenuItem>\n <MenuItem sx={{ fontSize: \"12px\" }} value=\"spec\">\n Spec Change Requests\n </MenuItem>\n <MenuItem sx={{ fontSize: \"12px\" }} value=\"frequency\">\n Visit Frequency Change Requests\n </MenuItem>\n <MenuItem sx={{ fontSize: \"12px\" }} value=\"suspension\">\n Service Suspension Requests\n </MenuItem>\n <MenuItem sx={{ fontSize: \"12px\" }} value=\"termination\">\n Service Termination Requests\n </MenuItem>\n <MenuItem sx={{ fontSize: \"12px\" }} value=\"resumption\">\n Service Resumption Requests\n </MenuItem>\n </Select>\n </Box>\n {formType === \"all\" && (\n <AllRequestTab\n adhocVisitRequests={adhocVisitRequests}\n stockDeliveryRequests={stockDeliveryRequests}\n specChangeRequests={specChangeRequests}\n visitFrequencyChangeRequests={visitFrequencyChangeRequests}\n serviceSuspensionRequests={serviceSuspensionRequests}\n serviceTerminationRequests={serviceTerminationRequests}\n serviceResumptionRequests={serviceResumptionRequests}\n />\n )}\n {formType === \"adhoc\" && (\n <AdhocVisitRequestTab adhocVisitRequests={adhocVisitRequests} />\n )}\n {formType === \"stock\" && (\n <StockDeliveryRequestTab\n stockDeliveryRequests={stockDeliveryRequests}\n />\n )}\n {formType === \"spec\" && (\n <SpecChangeRequestTab specChangeRequests={specChangeRequests} />\n )}\n {formType === \"frequency\" && (\n <VisitFrequencyChangeRequestTab\n visitFrequencyChangeRequests={visitFrequencyChangeRequests}\n />\n )}\n {formType === \"suspension\" && (\n <ServiceSuspensionRequestTab\n serviceSuspensionRequests={serviceSuspensionRequests}\n />\n )}\n {formType === \"termination\" && (\n <ServiceTerminationRequestTab\n serviceTerminationRequests={serviceTerminationRequests}\n />\n )}\n {formType === \"resumption\" && (\n <ServiceResumptionRequestTab\n serviceResumptionRequests={serviceResumptionRequests}\n />\n )}\n </TabPanel>\n <TabPanel value={cardTab} index=\"report\">\n <ReportTab failedVisitReports={failedVisitReports} />\n </TabPanel>\n\n <TabPanel value={cardTab} index=\"case\">\n <Box sx={{ p: 2 }}>\n <RemediationCaseTab remediationCase={remediationCase} />\n </Box>\n </TabPanel>\n </Box>\n );\n};\n\nexport default MainTabs;\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport {\n ModalBox,\n SelectListInput\n} from 'auditComponents'\n\nvar SelectStorageType = ({\n title = 'Select the waste type',\n subtext = 'Select the waste type you will audit',\n storageTypeId,\n storageTypes,\n onChange,\n ...modalProps\n}) => {\n\n var storageTypesOptions = _(storageTypes).orderBy('sortOrder').map(({name, id}) => { return({ value: id, label: name })} ).value()\n\n return(\n <ModalBox\n title={title}\n buttonsDisabled={!storageTypeId}\n {...modalProps}\n >\n <SelectListInput name='storageTypeId' selectedValue={storageTypeId} onSelect={onChange} options={storageTypesOptions} />\n </ModalBox>\n )\n\n}\n\nSelectStorageType.propTypes = {\n title: PropTypes.node,\n subtext: PropTypes.node,\n onClose: PropTypes.func,\n onNext: PropTypes.func,\n onBack: PropTypes.func,\n onChange: PropTypes.func.isRequired,\n storageTypeId: PropTypes.string,\n storageTypes: PropTypes.arrayOf(PropTypes.shape({\n name: PropTypes.string.isRequired,\n id: PropTypes.string.isRequired\n })).isRequired,\n\n};\n\nexport default SelectStorageType;\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport {\n ModalBox,\n SelectListInput\n} from 'auditComponents'\n\nvar SelectContainerType = ({title= 'Select the container type', subtext, storageTypeId, containerTypeId, containerTypes, onChange, ...modalProps}) => {\n\n var containerTypesOptions = _(containerTypes).orderBy('sortOrder').map(({name, id}) => { return({ value: id, label: name })} ).value()\n\n var buttonsDisabled = !containerTypeId\n\n return(\n <ModalBox title={title} subtext={subtext} buttonsDisabled={buttonsDisabled} {...modalProps}>\n <SelectListInput name='containerTypeId' selectedValue={containerTypeId} onSelect={onChange} options={containerTypesOptions} />\n </ModalBox>\n )\n\n}\n\nSelectContainerType.propTypes = {\n title: PropTypes.node.isRequired,\n onClose: PropTypes.func,\n onNext: PropTypes.func,\n onBack: PropTypes.func,\n onChange: PropTypes.func.isRequired,\n storageTypeId: PropTypes.string,\n containerTypeId: PropTypes.string,\n containerTypes: PropTypes.arrayOf(PropTypes.shape({\n name: PropTypes.string.isRequired,\n id: PropTypes.string.isRequired\n })).isRequired,\n\n};\n\n\nexport default SelectContainerType;\n\n\n\n","import React, { useMemo, useState } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { useDropzone } from \"react-dropzone\";\nimport classNames from \"classnames\";\nimport { Link } from \"sharedComponents\";\nimport ImagePoller from \"./ImagePoller\";\nimport ProgressBar from \"react-bootstrap4/ProgressBar\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faUpload, faTimes} from \"@fortawesome/free-solid-svg-icons\";\nimport { isMobile } from \"react-device-detect\";\n\nconst baseStyle = {\n flex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n padding: \"20px\",\n borderWidth: 2,\n borderRadius: 2,\n borderColor: \"#eeeeee\",\n borderStyle: \"dashed\",\n backgroundColor: \"#fafafa\",\n bonderRadius: \"12px\",\n color: \"#bdbdbd\",\n outline: \"none\",\n transition: \"border .24s ease-in-out\",\n};\n\nconst activeStyle = {\n borderColor: \"#2196f3\",\n};\n\nconst acceptStyle = {\n borderColor: \"#00e676\",\n};\n\nconst rejectStyle = {\n borderColor: \"#ff1744\",\n};\n\nconst StyledDropzone = ({ onDrop }) => {\n const {\n getRootProps,\n getInputProps,\n isDragActive,\n isDragAccept,\n isDragReject,\n } = useDropzone({\n accept: \"image/jpeg,image/png,image/webp\",\n onDrop: (files) => onDrop(files[0]),\n multiple: false,\n });\n\n const style = useMemo(\n () => ({\n ...baseStyle,\n ...(isDragActive ? activeStyle : {}),\n ...(isDragAccept ? acceptStyle : {}),\n ...(isDragReject ? rejectStyle : {}),\n }),\n [isDragActive, isDragReject, isDragAccept]\n );\n\n if (!isMobile) {\n return (\n <div\n {...getRootProps({ style })}\n className=\"upload-container upload-img-container\"\n >\n <div className=\"upload-container__upload-area\">\n <FontAwesomeIcon\n icon={faUpload}\n size=\"3x\"\n className=\"upload-container--icon\"\n />\n <p className=\"upload-container__upload-area--text\">Drop File Here</p>\n <span className=\"upload-container__upload-area--or\">or</span>\n <div>\n <input\n {...getInputProps()}\n className=\"input-file-custom\"\n id=\"file\"\n />\n <label htmlFor=\"file\" onClick={(e) => e.stopPropagation()}>\n Choose file to upload\n </label>\n </div>\n </div>\n </div>\n );\n } else {\n return (\n <div>\n <div className=\"my-3\">\n <input {...getInputProps()} className=\"input-file-custom\" id=\"file\" />\n <label htmlFor=\"file\">Browse a photo or Open camera</label>\n </div>\n </div>\n );\n }\n};\n\nconst ImageView = ({ placeholderSrc, onReplace, url }) => {\n const [enableReplaceBtn, setEnableReplaceBtn] = useState(false);\n const [loadingError, setLoadingError] = useState(false);\n\n var loadingPlaceholder, replaceBtn\n\n if(loadingError) {\n loadingPlaceholder = <div className=\"upload-container upload-img-container p-4 text-center\">\n <img\n src={placeholderSrc}\n className={ \"w-100 placeholder-image\"}\n />\n <div className=\"mt-2 mb-1\">\n <FontAwesomeIcon\n icon={faTimes}\n size=\"3x\"\n className=\"upload-container--icon text-danger\"\n />\n </div>\n <div className='text-danger'>Error</div>\n <div className='text-muted'>Please check the image file</div>\n </div>\n\n replaceBtn = <button\n onClick={onReplace}\n className=\"btn btn-danger img-preview--btn\"\n >\n Try Again\n </button>\n\n } else {\n loadingPlaceholder = <div className=\"upload-container upload-img-container p-4 text-center\">\n <img\n src={placeholderSrc}\n className={ \"w-100 placeholder-image\"}\n />\n <div className=\"loader loader-sm mt-2 mb-1\"></div>\n <div>Loading</div>\n </div>\n\n replaceBtn = enableReplaceBtn ? <button\n onClick={onReplace}\n className=\"btn btn-primary img-preview--btn\"\n >\n Replace Photo\n </button> : null\n }\n\n\n return (\n <div className=\"img-preview h-100\">\n { replaceBtn }\n\n <ImagePoller\n src={url}\n loadingPlaceholder={loadingPlaceholder}\n className=\"w-100 \"\n onTimeout={() => {\n setLoadingError(true)\n setEnableReplaceBtn(false) }\n }\n onLoadImage={() => {\n setLoadingError(false)\n setEnableReplaceBtn(true)\n } }\n />\n </div>\n );\n};\n\nconst UploadProgress = ({ image }) => {\n var percentage = image.percentUploaded || 0;\n\n return (\n <div className=\"upload-container upload-img-container\">\n <div className=\"upload-container__upload-area upload-container-attaching\">\n <p> Attaching file...</p>\n <div className=\"progress-upload-container\">\n <ProgressBar\n variant=\"success\"\n now={percentage}\n label={`${percentage}%`}\n />\n </div>\n </div>\n </div>\n );\n};\n\nvar ImageUploader = ({\n label,\n image,\n placeholderSrc,\n onImageUpload,\n onImageDelete,\n width = \"300px\",\n maxWidth = \"100%\",\n margin = \"0 auto\",\n allErrors = {},\n}) => {\n var url = _.get(image, \"otherVersions.modal.url\");\n\n var show = url ? (\n <ImageView\n placeholderSrc={placeholderSrc}\n onReplace={() => onImageDelete(image)}\n url={url}\n />\n ) : image ? (\n <UploadProgress image={image} />\n ) : (\n <StyledDropzone width={width} height=\"100%\" onDrop={onImageUpload} />\n );\n\n //show = <UploadProgress image={image}/>\n\n return (\n <div\n style={{ width, maxWidth, margin }}\n className={classNames(\"form-group\", \"string\", \"h-100\")}\n >\n {label ? (\n <label className={classNames(\"form-control-label\", \"string\")}>\n {label}\n </label>\n ) : null}\n {show}\n </div>\n );\n};\n\nImageUploader.propTypes = {\n onImageUpload: PropTypes.func.isRequired,\n onImageDelete: PropTypes.func.isRequired,\n label: PropTypes.string,\n};\n\nexport default ImageUploader;\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport SwitchDeviceButton from './SwitchDeviceButton'\nimport { isMobile } from \"react-device-detect\";\n\nvar SwitchDeviceAlert = ( { } ) => {\n if(!isMobile) {\n return(\n <div className=\"an-primary-alert\" role=\"alert\">\n Switch to a mobile device to take a photos <SwitchDeviceButton/>\n </div>\n )} else {\n return null\n }\n}\n\nexport default SwitchDeviceAlert;\n\n\n\n\n\n\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _ from \"lodashExtended\";\nimport ImageUploader from \"../ImageUploader\";\nimport { useMediaQuery } from \"react-responsive\";\n\nvar TakePhotoRow = ({\n name,\n photo,\n examplePhotoUrl,\n onImageDelete,\n onImageUpload,\n}) => {\n const showColumns = useMediaQuery({ minWidth: 576 });\n\n if (!examplePhotoUrl) {\n return (\n <div className=\"row\">\n <div className=\"h-300-image mx-auto\">\n <ImageUploader\n image={photo}\n placeholderSrc=\"https://res.cloudinary.com/anenta-ltd/image/upload/v1600078844/waste_audit_examples/img-resize-1.svg\"\n onImageDelete={(file) => onImageDelete(file, name)}\n onImageUpload={(file) => onImageUpload(file, name)}\n />\n </div>\n </div>\n );\n } else {\n return (\n <div className=\"row\">\n {!(!showColumns && photo) ? (\n <div className=\"col-sm-6 h-300-image\">\n <img src={examplePhotoUrl} className=\"w-100\" />\n </div>\n ) : null}\n <div className=\"col-sm-6 h-300-image\">\n <ImageUploader\n image={photo}\n placeholderSrc=\"https://res.cloudinary.com/anenta-ltd/image/upload/v1600078844/waste_audit_examples/img-resize-1.svg\"\n onImageDelete={(file) => onImageDelete(file, name)}\n onImageUpload={(file) => onImageUpload(file, name)}\n />\n </div>\n </div>\n );\n }\n};\n\nTakePhotoRow.propTypes = {\n name: PropTypes.string.isRequired,\n photo: PropTypes.object,\n onImageUpload: PropTypes.func.isRequired,\n onImageDelete: PropTypes.func.isRequired,\n examplePhotoUrl: PropTypes.string,\n};\n\nexport default TakePhotoRow;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport ImageUploader from \"../ImageUploader\";\nimport {\n YesNoInput,\n ModalBox\n} from 'auditComponents'\nimport SwitchDeviceAlert from \"../SwitchDeviceAlert\";\nimport TakePhotoRow from \"./TakePhotoRow\";\n\nvar TakeExteriorPhoto = ({\n takePhoto,\n exteriorPhoto,\n hasCorrectLabel,\n onChange,\n examplePhotoUrl,\n onImageDelete,\n onImageUpload,\n storageType,\n ...modalProps\n}) => {\n const { labelingRequired } = storageType;\n\n let title = `Take a photo of the ${takePhoto}`;\n let subtext = `The photo should clearly show the${\n labelingRequired ? \" label \" : \" \"\n }of the ${takePhoto}. Images should be high quality and with good light${\n examplePhotoUrl ? \", see example below\" : \"\"\n }`;\n\n let buttonsDisabled = !(\n exteriorPhoto &&\n (hasCorrectLabel || !labelingRequired)\n );\n\n return (\n <ModalBox\n title={title}\n subtext={subtext}\n buttonsDisabled={buttonsDisabled}\n bodyClassName=\"wide-body\"\n {...modalProps}\n >\n <TakePhotoRow\n photo={exteriorPhoto}\n name=\"exteriorPhoto\"\n examplePhotoUrl={examplePhotoUrl}\n onImageDelete={onImageDelete}\n onImageUpload={onImageUpload}\n />\n <div className=\"mt-3\">\n {exteriorPhoto && labelingRequired ? (\n <YesNoInput\n name=\"hasCorrectLabel\"\n value={hasCorrectLabel}\n label={\"Has the Container been labelled correctly?\"}\n onChange={onChange}\n />\n ) : null}\n {!exteriorPhoto ? <SwitchDeviceAlert /> : null}\n </div>\n </ModalBox>\n );\n};\n\nTakeExteriorPhoto.propTypes = {\n takePhoto: PropTypes.string.isRequired,\n onClose: PropTypes.func,\n onNext: PropTypes.func,\n onBack: PropTypes.func,\n onChange: PropTypes.func.isRequired,\n onImageUpload: PropTypes.func.isRequired,\n onImageDelete: PropTypes.func.isRequired,\n examplePhotoUrl: PropTypes.string,\n hasCorrectLabel: PropTypes.string,\n};\n\nexport default TakeExteriorPhoto;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport ImageUploader from \"../ImageUploader\";\nimport {\n YesNoInput,\n ModalBox\n} from 'auditComponents'\nimport SwitchDeviceAlert from \"../SwitchDeviceAlert\";\nimport TakePhotoRow from \"./TakePhotoRow\";\n\nvar TakeBulkStorageAreaPhoto = ({\n takePhoto,\n bulkStorageAreaPhoto,\n onChange,\n examplePhotoUrl,\n onImageDelete,\n onImageUpload,\n storageType,\n ...modalProps\n}) => {\n let title = `Take a photo of the ${takePhoto}`;\n let subtext = `Take of photo of the entire bulk storage area where ${takePhoto} is stored. Images should be high quality and with good light${\n examplePhotoUrl ? \", see example below\" : \"\"\n }`;\n\n let buttonsDisabled = !bulkStorageAreaPhoto;\n\n return (\n <ModalBox\n title={title}\n subtext={subtext}\n buttonsDisabled={buttonsDisabled}\n bodyClassName=\"wide-body\"\n {...modalProps}\n >\n <TakePhotoRow\n photo={bulkStorageAreaPhoto}\n name=\"bulkStorageAreaPhoto\"\n examplePhotoUrl={examplePhotoUrl}\n onImageDelete={onImageDelete}\n onImageUpload={onImageUpload}\n />\n <div className=\"mt-3\">\n {!bulkStorageAreaPhoto ? <SwitchDeviceAlert /> : null}\n </div>\n </ModalBox>\n );\n};\n\nTakeBulkStorageAreaPhoto.propTypes = {\n takePhoto: PropTypes.string.isRequired,\n onClose: PropTypes.func,\n onNext: PropTypes.func,\n onBack: PropTypes.func,\n onChange: PropTypes.func.isRequired,\n onImageUpload: PropTypes.func.isRequired,\n onImageDelete: PropTypes.func.isRequired,\n examplePhotoUrl: PropTypes.string,\n};\n\nexport default TakeBulkStorageAreaPhoto;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport {\n YesNoInput,\n TextAreaInput,\n ModalBox\n} from 'auditComponents'\n\nimport {\n getRequiredFields\n} from '../ExternalBin'\n\nvar ExternalBinComtainmentInfo = (props) => {\n\n const {\n storageAreaDescription,\n storageType,\n isBinLocked,\n isAreaLocked,\n onChange,\n storageName,\n ...modalProps\n } = props\n\n let title = storageType.takeAreaPhoto\n let placeholder = 'Please describe the storage area.'\n let subtext = `Where is the ${storageType.takeAreaPhoto} being stored?`\n\n const requiredFields = getRequiredFields(props)\n var buttonsDisabled = !_.every(_.intersection(['storageAreaDescription', 'isAreaLocked', 'isBinLocked'], Object.keys(_.pickBy(requiredFields, _.isTrue))), (attr) => _.isPresent(props[attr]) )\n\n return(\n <ModalBox\n title={title}\n subtext={subtext}\n buttonsDisabled={buttonsDisabled}\n {...modalProps}>\n { requiredFields.storageAreaDescription && <TextAreaInput name='storageAreaDescription' value={storageAreaDescription} placeholder={placeholder} onChange={onChange}/> }\n { requiredFields.isAreaLocked && <YesNoInput name='isAreaLocked' value={isAreaLocked} label='Are the clinical waste bins stored in a secure location?' onChange={onChange}/> }\n { requiredFields.isBinLocked && <YesNoInput name='isBinLocked' value={isBinLocked} label='Is the clinical waste stored in a locked container?' onChange={onChange}/> }\n </ModalBox>\n );\n};\n\nExternalBinComtainmentInfo.propTypes = {\n onClose: PropTypes.func,\n onNext: PropTypes.func,\n onBack: PropTypes.func,\n onChange: PropTypes.func.isRequired,\n storageAreaDescription: PropTypes.string,\n isPubliclyAccessible: PropTypes.string,\n isAreaLocked: PropTypes.string,\n storageType: PropTypes.shape({\n takeAreaPhoto: PropTypes.string.isRequired,\n id: PropTypes.string.isRequired\n }).isRequired,\n};\n\nexport default ExternalBinComtainmentInfo;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport {\n YesNoInput,\n TextAreaInput,\n ModalBox\n} from 'auditComponents'\n\nimport {\n getRequiredFields\n} from '../BulkContainment'\n\n//const getRequiredFields = ({\n //storageType,\n//}) => {\n //let checkLocked = _.get(storageType,'id') == 'clinical'\n\n //let requiredFields = {\n //storageAreaDescription: true\n //}\n\n //if(storageType.id == 'clinical') {\n //requiredFields['isAreaLocked'] = true\n //requiredFields['isPubliclyAccessible'] = true\n //}\n //return requiredFields\n//}\n\nvar BulkStorageAreaInfo = (props) => {\n\n const {\n storageAreaDescription,\n storageType,\n isPubliclyAccessible,\n isAreaLocked,\n onChange,\n storageName,\n ...modalProps\n } = props\n\n let title = 'Describe the Bulk Storage Area'\n let placeholder = 'Please describe the storage area.'\n let subtext = `Where is the ${storageType.takeAreaPhoto} being stored?`\n\n const requiredFields = getRequiredFields(props)\n\n var buttonsDisabled = !_.every(_.intersection([\n 'storageAreaDescription',\n 'isAreaLocked',\n 'isPubliclyAccessible'\n ], Object.keys(_.pickBy(requiredFields, _.isTrue))), (attr) => _.isPresent(props[attr]) )\n\n return(\n <ModalBox\n title={title}\n subtext={subtext}\n buttonsDisabled={buttonsDisabled}\n {...modalProps}>\n { requiredFields.storageAreaDescription && <TextAreaInput name='storageAreaDescription' value={storageAreaDescription} placeholder={placeholder} onChange={onChange}/> }\n { requiredFields.isAreaLocked && <YesNoInput name='isAreaLocked' value={isAreaLocked} label='Is the area secured? (i.e. room that is locked at all times)' onChange={onChange}/> }\n { requiredFields.isPubliclyAccessible && <YesNoInput name='isPubliclyAccessible' value={isPubliclyAccessible} label='Is this area accessible by the public?' onChange={onChange}/> }\n </ModalBox>\n );\n};\n\nBulkStorageAreaInfo.propTypes = {\n onClose: PropTypes.func,\n onNext: PropTypes.func,\n onBack: PropTypes.func,\n onChange: PropTypes.func.isRequired,\n storageAreaDescription: PropTypes.string,\n isBinLocked: PropTypes.string,\n isAreaLocked: PropTypes.string,\n storageType: PropTypes.shape({\n takePhoto: PropTypes.string.isRequired,\n id: PropTypes.string.isRequired\n }).isRequired,\n};\n\nexport default BulkStorageAreaInfo;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport ImageUploader from \"../ImageUploader\";\nimport {\n YesNoInput,\n ModalBox\n} from 'auditComponents'\nimport SwitchDeviceAlert from \"../SwitchDeviceAlert\";\nimport TakePhotoRow from \"./TakePhotoRow\";\n\nvar TakeInteriorPhoto = ({\n takePhoto,\n interiorPhoto,\n onChange,\n examplePhotoUrl,\n onImageDelete,\n onImageUpload,\n ...modalProps\n}) => {\n const buttonsDisabled = !interiorPhoto;\n\n let title = `Take a photo of the contents of the ${takePhoto}`;\n let subtext = `The photo should clearly show the contents of the ${takePhoto}. Images should be high quality and with good light${\n examplePhotoUrl ? \", see example below\" : \"\"\n }`;\n\n return (\n <ModalBox\n title={title}\n subtext={subtext}\n buttonsDisabled={buttonsDisabled}\n bodyClassName=\"wide-body\"\n {...modalProps}\n >\n <TakePhotoRow\n photo={interiorPhoto}\n name=\"interiorPhoto\"\n examplePhotoUrl={examplePhotoUrl}\n onImageDelete={onImageDelete}\n onImageUpload={onImageUpload}\n />\n <div className=\"mt-3\">\n {!interiorPhoto ? <SwitchDeviceAlert /> : null}\n </div>\n </ModalBox>\n );\n};\n\nTakeInteriorPhoto.propTypes = {\n takePhoto: PropTypes.string.isRequired,\n onClose: PropTypes.func,\n onNext: PropTypes.func,\n onBack: PropTypes.func,\n onChange: PropTypes.func.isRequired,\n onImageUpload: PropTypes.func.isRequired,\n onImageDelete: PropTypes.func.isRequired,\n examplePhotoUrl: PropTypes.string,\n checkForContaminants: PropTypes.bool,\n};\n\nexport default TakeInteriorPhoto;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\n\nimport {\n TextAreaInput,\n CheckboxInput,\n ModalBox\n} from 'auditComponents'\nconst Checkbox = CheckboxInput.Checkbox\nimport ImagePoller from \"../ImagePoller\";\nimport { useMediaQuery } from \"react-responsive\";\n\n\n\nconst isIncompleteMessage = (data) => {\n return data.contaminants && _.some(Object.values(data.contaminants), _.isPresent) ? null : 'Please select an option'\n}\n\nvar SelectContaminants = (props) => {\n let {\n contaminants,\n photo,\n allContaminants,\n onChange,\n noneOption = true,\n allowOther = false,\n ...modalProps\n } = props\n\n let title = \"Describe any contamination\"\n\n const noContaminants = contaminants === 'none'\n contaminants = noContaminants ? {} : contaminants\n const otherContaminants = _.get(contaminants, \"other\");\n var buttonsDisabled = !!isIncompleteMessage(props)\n const showColumns = useMediaQuery({ minWidth: 576 }) && photo\n\n var contaminantSelect = (\n <CheckboxInput>\n {_.map(allContaminants, ({ id, name }) => (\n <Checkbox\n key={id}\n value={_.get(contaminants, id)}\n name={`contaminants.${id}`}\n label={name}\n onSelect={onChange}\n className=\"select-item-checkbox\"\n />))}\n {allowOther ? (\n <Checkbox\n value={otherContaminants}\n name=\"contaminants.other\"\n label=\"Other\"\n onSelect={onChange}\n className=\"select-item-checkbox\"\n >\n <TextAreaInput\n name=\"contaminants.other\"\n value={otherContaminants === true ? null : otherContaminants}\n blankValue={true}\n label=\"\"\n subtext=\"Describe the other contaminants\"\n onChange={onChange}\n />\n </Checkbox>\n ) : null}\n {noneOption ? (\n <Checkbox\n key={'noContaminants'}\n value={noContaminants}\n name={`contaminants.none`}\n label={'No Contamination Found'}\n onSelect={ (x,y) => { onChange(x ? 'none' : x, 'contaminants') } }\n className=\"select-item-checkbox\"\n />\n ) : null}\n </CheckboxInput>\n )\n\n\n var image = (\n <ImagePoller\n className=\"w-100 \"\n src={_.get(photo, \"otherVersions.modal.url\")}\n placeholderSrc=\"https://res.cloudinary.com/anenta-ltd/image/upload/v1598996270/waste_audit_examples/200x200_bin_placeholder.png\"\n />\n )\n\n return (\n <ModalBox\n title={title}\n className=\"nw-modal-500\"\n buttonsDisabled={buttonsDisabled}\n \n {...modalProps}\n >\n { showColumns ?\n <div className=\"row\">\n <div className=\"col-sm-6 h-300-image\">\n {image}\n </div>\n <div className=\"col-sm-6\">\n {contaminantSelect}\n </div>\n </div> :\n contaminantSelect\n }\n </ModalBox>\n );\n};\n\nSelectContaminants.propTypes = {\n onClose: PropTypes.func,\n onNext: PropTypes.func,\n onBack: PropTypes.func,\n photo: PropTypes.object,\n onChange: PropTypes.func.isRequired,\n contaminants: PropTypes.oneOfType(\n [\n PropTypes.object,\n PropTypes.string\n ]\n ),\n allContaminants: PropTypes.arrayOf(\n PropTypes.shape({\n name: PropTypes.string.isRequired,\n id: PropTypes.string.isRequired,\n })\n ).isRequired,\n allowOther: PropTypes.bool,\n};\n\nexport default SelectContaminants;\n","/**\r\n * Text class deals with all text placed on chart.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../Container\";\nimport { registry } from \"../Registry\";\nimport { getTextFormatter } from \"../formatters/TextFormatter\";\nimport { MultiDisposer } from \"../utils/Disposer\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport * as $math from \"../utils/Math\";\nimport * as $utils from \"../utils/Utils\";\nimport * as $type from \"../utils/Type\";\nimport * as $dom from \"../utils/DOM\";\nimport { defaultRules, ResponsiveBreakpoints } from \"../utils/Responsive\";\n;\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Text is used to display highly configurable, data-enabled textual elements.\r\n *\r\n * ## Data Binding\r\n *\r\n * A Text element can dynamically parse and populate its contents with values\r\n * from a [[DataItem]].\r\n *\r\n * To activate such binding, set element's `dataItem` property.\r\n *\r\n * When activated, text contents will be parsed for special tags, e.g.:\r\n *\r\n * ```TypeScript\r\n * label.dataItem = myDataItem;\r\n * label.text = \"The title is: {title}\";\r\n * ```\r\n * ```JavaScript\r\n * label.dataItem = myDataItem;\r\n * label.text = \"The title is: {title}\";\r\n * ```\r\n *\r\n * The above will automatically replace \"{title}\" in the string with the\r\n * actual data value from `myDataItem`.\r\n *\r\n * Note, that most often dataItem is set by the Component.\r\n *\r\n *\r\n * @see {@link ILabelEvents} for a list of available events\r\n * @see {@link ILabelAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-strings/} for info on string formatting and data binding\r\n * @todo Vertical align\r\n * @important\r\n */\nvar Label = /** @class */function (_super) {\n tslib_1.__extends(Label, _super);\n /**\r\n * Constructor\r\n */\n function Label() {\n var _this =\n // Execute super's constructor\n _super.call(this) || this;\n /**\r\n * Indicates if the whole text does not fit into max dimenstions set for it.\r\n */\n _this.isOversized = false;\n // Set this class name\n _this.className = \"Label\";\n _this.fill = new InterfaceColorSet().getFor(\"text\");\n // not good to set this, as then these will appear on each label and values set on container won't be applied.\n //this.textDecoration = \"none\";\n //this.fontWeight = \"normal\";\n // Set defaults\n _this.wrap = false;\n _this.truncate = false;\n _this.fullWords = true;\n _this.ellipsis = \"...\";\n _this.textAlign = \"start\";\n _this.textValign = \"top\";\n _this.layout = \"absolute\";\n _this.baseLineRatio = -0.27;\n // Set up adapters for manipulating accessibility\n _this.adapter.add(\"readerTitle\", function (arg) {\n if (!arg) {\n arg = _this.populateString($utils.plainText($utils.isNotEmpty(_this.html) ? _this.html : _this.text));\n }\n return arg;\n });\n // Add events to watch for maxWidth/maxHeight changes so that we can\n // invalidate this\n _this.events.on(\"maxsizechanged\", function () {\n if (_this.inited) {\n _this.handleMaxSize();\n }\n }, _this, false);\n // this solves strange bug when text just added to svg is 0x0\n _this.events.once(\"validated\", _this.handleValidate, _this, false);\n // Aply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * A placeholder method that is called **after** element finishes drawing\r\n * itself.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Label.prototype.afterDraw = function () {\n // since we removed validatePosition from sprite, we still need it here to handle rotated text\n _super.prototype.afterDraw.call(this);\n this.validatePosition();\n };\n /**\r\n * Sets [[Paper]] instance to use to draw elements.\r\n * @ignore\r\n * @param paper Paper\r\n * @return true if paper was changed, false, if it's the same\r\n */\n Label.prototype.setPaper = function (paper) {\n var changed = _super.prototype.setPaper.call(this, paper);\n if (changed) {\n this.hardInvalidate();\n }\n return changed;\n };\n /**\r\n * @ignore\r\n */\n Label.prototype.handleValidate = function () {\n if ((this.currentText || this.text) && (this.bbox.width == 0 || this.bbox.height == 0)) {\n registry.events.once(\"exitframe\", this.hardInvalidate, this);\n }\n };\n /**\r\n * @ignore\r\n */\n Label.prototype.handleMaxSize = function () {\n if (this.bbox.width > this.availableWidth || this.bbox.width < this.availableWidth && (this.isOversized || this.truncate) || this.bbox.height > this.availableHeight || this.bbox.height < this.availableHeight && this.isOversized) {\n this.invalidate();\n } else {\n this.alignSVGText();\n }\n };\n /**\r\n * [arrange description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n Label.prototype.arrange = function () {};\n /**\r\n * Updates current text according to data item and supported features.\r\n * Returns `true` if current text has changed.\r\n *\r\n * @return Text changed?\r\n */\n Label.prototype.updateCurrentText = function () {\n // Determine output format\n var output, text;\n if ($utils.isNotEmpty(this.html) && this.paper.supportsForeignObject()) {\n // We favor HTML text if it's set and browser supports `foreignObject`\n output = \"html\";\n text = this.html;\n } else {\n output = \"svg\";\n text = this.text;\n }\n // Need to format text all the time\n if ($type.hasValue(text) && text !== \"\") {\n text = this.populateString(text, this.dataItem);\n }\n if (output == \"html\") {\n text = this.adapter.apply(\"htmlOutput\", text);\n } else {\n text = this.adapter.apply(\"textOutput\", text);\n }\n // Update the text\n var changed = text != this.currentText || output != this._currentFormat;\n this.currentText = text;\n this._currentFormat = output;\n return changed;\n };\n /**\r\n * Hard invalidate means the text will be redrawn even if it hasn't changed.\r\n * This is used when we change `fontSize`, `fontFamily`, or for some other\r\n * reasons.\r\n */\n Label.prototype.hardInvalidate = function () {\n this._prevStatus = \"\";\n this.invalidate();\n };\n /**\r\n * Gets line bbox, uses caching to save cpu\r\n * @ignore\r\n */\n Label.prototype.getLineBBox = function (lineInfo) {\n //let cacheKey = lineInfo.text + lineInfo.style;\n //let lineBBox = this.getCache(cacheKey);\n //if (!lineBBox) {\n //lineBBox = lineInfo.element.getBBox();\n //if (lineBBox.width != 0 && lineBBox.height != 0) {\n //\tthis.setCache(cacheKey, lineBBox, 5000);\n //}\n //}\n var element = lineInfo && lineInfo.element;\n var node = element && element.node;\n // Check for the parent Node to avoid FF from throwing errors\n if (node && node.parentNode) {\n lineInfo.bbox = element.getBBox();\n }\n };\n /**\r\n * Draws the textual label.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Label.prototype.draw = function () {\n // Draw super\n _super.prototype.draw.call(this);\n var oldW = this.bbox.width;\n var oldH = this.bbox.height;\n var topParent = this.topParent;\n if (topParent) {\n if (!topParent.maxWidth || !topParent.maxHeight) {\n topParent.events.once(\"maxsizechanged\", this.hardInvalidate, this, false);\n return;\n }\n }\n // Calculate max width and height\n var maxWidth = $math.max(this.availableWidth - this.pixelPaddingLeft - this.pixelPaddingRight, 0);\n var maxHeight = $math.max(this.availableHeight - this.pixelPaddingTop - this.pixelPaddingBottom, 0);\n // save\n var status = maxHeight + \",\" + maxWidth + this.wrap + this.truncate + this.fullWords + this.rtl + this.ellipsis;\n // Update text\n if (!this.updateCurrentText() && this.inited && this._prevStatus == status) {\n return;\n }\n this._measuredWidth = 0;\n this._measuredHeight = 0;\n // Reset\n this.isOversized = false;\n // Determine output format\n var output = this._currentFormat;\n var text = this.currentText;\n // Empty string\n if (!$type.hasValue(text) || text == \"\") {\n this.element.attr({\n display: \"none\"\n });\n return;\n }\n // Chop up text into lines\n // We're still processing SVG and HTML in the same way for now\n var lines = text.split(\"\\n\");\n // Do we need to go through the trouble of measuring lines\n //let measure: boolean = true;// (lines.length > 1) || this.wrap;\n this._prevStatus = status;\n this.textAlign = this.textAlign;\n // need this to measure\n var display = this.group.getAttr(\"display\");\n if (display == \"none\") {\n this.group.removeAttr(\"display\");\n }\n if (this.textPathElement) {\n this.textPathElement.removeChildren();\n }\n // SVG or HTML?\n if (output === \"svg\") {\n /**\r\n * SVG\r\n */\n this.element.removeAttr(\"display\");\n // Clear the element\n var group = this.element;\n this.resetBBox();\n // Init state variables\n var currentHeight = 0;\n var currentFormat = \"\";\n // Process each line\n for (var i = 0; i < lines.length; i++) {\n // Get line\n var line = lines[i];\n // Check if line is empty\n if (line == \"\") {\n // It is, let's just update currentHeight and go to the next one\n // If it's the first line, we'll have to use arbirary line height,\n // since there's nothing to measure. For subsequent lines we can take\n // previous line's height\n var tempElement = this.getSVGLineElement(\"\", 0);\n tempElement.add(this.getSvgElement(\".\", getTextFormatter().translateStyleShortcuts(currentFormat)));\n group.add(tempElement);\n var offset = Math.ceil(tempElement.getBBox().height);\n if (offset > 0) {\n currentHeight += offset;\n }\n group.removeElement(tempElement);\n continue;\n }\n // Chunk up the line and process each chunk\n var chunks = getTextFormatter().chunk(line, null, this.ignoreFormatting);\n var currentLineHeight = 0;\n var firstChunk = true;\n var skipTextChunks = false;\n // Create line element or grab it from cache\n var lineInfo = this.getLineInfo(i);\n if (lineInfo) {\n // Empty line\n lineInfo.element.textContent = \"\";\n } else {\n // Init new line info\n lineInfo = {\n \"element\": this.getSVGLineElement(\"\", 0),\n \"complex\": false\n };\n // Create the line element\n //lineInfo.element = this.getSVGLineElement(\"\", 0);\n //lineElement = this.getSVGLineElement(\"\", 0);\n group.add(lineInfo.element);\n }\n lineInfo.element.removeAttr(\"display\");\n lineInfo.element.removeChildren(); // memory leak without this\n if (this.textPathElement) {\n lineInfo.element.add(this.textPathElement);\n }\n /*// @todo not needed anymore\r\n if (this.rtl) {\r\n chunks.reverse();\r\n }*/\n // Process each chunk\n for (var x = 0; x < chunks.length; x++) {\n // If there's more than one chunk, means the line is \"complex\"\n if (x) {\n lineInfo.complex = true;\n }\n // Get chunk\n var chunk = chunks[x];\n // Is this chunk format or text?\n if (chunk.type === \"format\") {\n // Log current format, so that we can apply it to multiple lines if\n // necessary\n currentFormat = chunk.text;\n } else {\n // It's text block\n // Need to skip?\n // We do this when truncating. We can't just simply go ahead and\n // abandon chunk processing as they might have formatting\n // instructions in them that are relevant for subsequent lines\n if (skipTextChunks) {\n continue;\n }\n // Add chunk to the current element\n //lineInfo.element.content += $utils.trim(getTextFormatter().format(currentFormat + chunk.text, output));\n lineInfo.text = chunk.text;\n lineInfo.style = getTextFormatter().translateStyleShortcuts(currentFormat);\n var tspan = this.getSvgElement(lineInfo.text, lineInfo.style);\n if (this.textPathElement) {\n this.textPathElement.add(tspan);\n } else {\n lineInfo.element.add(tspan);\n }\n this.getLineBBox(lineInfo);\n lineInfo.bbox.width = Math.ceil(lineInfo.bbox.width);\n // Updated current line height\n if (currentLineHeight < lineInfo.bbox.height) {\n currentLineHeight = lineInfo.bbox.height;\n }\n // Wrapping?\n if ((this.wrap || this.truncate) && lineInfo.bbox.width > maxWidth) {\n // Set oversized\n this.isOversized = true;\n // Take temporary measurements\n var lineText = lineInfo.element.textContent;\n var avgCharWidth = lineInfo.bbox.width / lineText.length; // * .9;\n // Calculate average number of symbols / width\n var excessChars = $math.min(Math.ceil((lineInfo.bbox.width - maxWidth) / avgCharWidth), lineText.length);\n // Are we truncating or auto-wrapping text?\n if (this.truncate) {\n /**\r\n * Processing line truncation\r\n * With the addition of each text chunk we measure if current\r\n * line does not exceed maxWidth. If it does, we will stop\r\n * addition of further chunks as well as try to truncate\r\n * current or any number of previous chunks with an added\r\n * ellipsis\r\n */\n // Indicator whether we need to add ellipsis to the current\n // element, even if it fits. This is needed to indicate\n // whether we have already removed some subsequent chunks in\n // which case we need to add ellipsis.\n var addEllipsis = false;\n // Process each child in the temporary line, until the whole\n // line fits, preferably with an ellipsis\n // TODO use iterator instead\n var node_1 = lineInfo.element.node;\n if (node_1 && node_1.childNodes) {\n for (var e = lineInfo.element.node.childNodes.length - 1; e >= 0; e--) {\n // Get current element\n var node_2 = lineInfo.element.node.childNodes[e];\n // Add ellipsis only if previous chunk was removed in full\n // and this chunk already fits\n //if (addEllipsis && (bbox.width <= maxWidth)) {\n if (addEllipsis && lineInfo.bbox.width <= maxWidth) {\n // Add ellipsis\n node_2.textContent += \" \" + this.ellipsis;\n // Measure again (we need to make sure ellipsis fits)\n lineInfo.bbox = lineInfo.element.getBBox();\n lineInfo.bbox.width = Math.floor(lineInfo.bbox.width);\n // If it fits, we're done here\n // If it doesn't we continue rolling\n if (lineInfo.bbox.width <= maxWidth) {\n break;\n }\n }\n addEllipsis = false;\n // Get element text\n var elementText = node_2.textContent;\n // Calculate average number of symbols / width\n lineText = lineInfo.element.textContent;\n excessChars = $math.min(Math.ceil((lineInfo.bbox.width - maxWidth) / avgCharWidth), lineText.length);\n // Do this until we fit\n while (lineInfo.bbox.width > maxWidth && excessChars <= lineText.length && excessChars > 0) {\n // Calculate max available chars\n var maxChars = $math.max(elementText.length - excessChars - this.ellipsis.length, 1);\n // Is there anything left?\n if (maxChars <= 1) {\n // Nope, let's jump to the previous item\n // Set excess characters to zero so that this loop does\n // not repeat when it over\n excessChars = 0;\n // Add ellipsis to previous item\n // Subsequent iterations will check if the ellipsis fits\n if (e > 0) {\n // Indicating to add ellipsis to previous item\n addEllipsis = true;\n // Removing this node\n lineInfo.element.node.removeChild(node_2);\n }\n }\n // Truncate the text\n elementText = $utils.truncateWithEllipsis(elementText, maxChars, this.ellipsis, this.fullWords, this.rtl);\n if (elementText.length > maxChars && this.fullWords) {\n // Still too long?\n // Let's try truncating breaking words anyway\n elementText = $utils.truncateWithEllipsis(elementText, maxChars, this.ellipsis, false, this.rtl);\n }\n // Set truncated text\n node_2.textContent = elementText;\n // Measure again\n lineInfo.bbox = lineInfo.element.getBBox();\n lineInfo.bbox.width = Math.floor(lineInfo.bbox.width);\n // Increase excess characters count, just in case it still\n // doesn't fit and we have to go at it again\n excessChars = Math.ceil(excessChars * 1.1);\n }\n // Do not process further chunks\n skipTextChunks = true;\n }\n }\n } else {\n /**\r\n * Processign auto-wrap\r\n * In this case we're going to be adding text chunks until\r\n * they don't fit into current line. Once that happens we will\r\n * inject the rest of the chunks to the next line\r\n */\n // Get last node added and measure it\n var node_3 = lineInfo.element.node;\n if (node_3) {\n var lastNode = lineInfo.element.node.lastChild;\n // Init split lines\n var splitLines = void 0;\n while (lineInfo.bbox.width > maxWidth && excessChars <= lineText.length && excessChars > 0) {\n // Calculate max available chars\n var maxChars = $math.max(chunk.text.length - excessChars, 1);\n // Don't split the words mid-word if it's not the first chunk\n // in the line\n if (firstChunk) {\n // Split mid-word if necessary\n splitLines = $utils.splitTextByCharCount(chunk.text, maxChars, true, this.rtl);\n } else {\n // Don't split mid-word\n splitLines = $utils.splitTextByCharCount(chunk.text, maxChars, true, this.rtl);\n // Check if the first word is too long\n if (splitLines[0].length > maxChars || maxChars === 1) {\n // Yes - move the whole chunk to the next line\n // Remove the element we just added\n lineInfo.element.node.removeChild(lastNode);\n // Break out of the while on next cycle\n excessChars = 0;\n }\n }\n // Use the first line to update last item\n if (excessChars > 0) {\n lastNode.textContent = getTextFormatter().cleanUp($utils.trim(splitLines.shift()));\n }\n // Measure again, just in case\n lineInfo.bbox = lineInfo.element.getBBox();\n lineInfo.bbox.width = Math.floor(lineInfo.bbox.width);\n // Increase excess characters count, just in case it still\n // doesn't fit and we have to go at it again\n excessChars = Math.ceil(excessChars * 1.1);\n }\n // Construct the rest of the line\n if (splitLines.length > 0) {\n var restOfLine = \"\";\n // Add leftovers from splitting the current chunk\n if ($type.hasValue(splitLines)) {\n if (this.rtl) {\n restOfLine += splitLines.join(\"\") + currentFormat;\n } else {\n restOfLine += currentFormat + splitLines.join(\"\");\n }\n }\n // Add the rest of the chunks\n for (var c = x + 1; c < chunks.length; c++) {\n restOfLine += chunks[c].text;\n }\n // Inject the rest of the lines as chunks for subsequent\n lines.splice(i + 1, 0, restOfLine);\n }\n // Skip processing the rest of the chunks\n skipTextChunks = true;\n }\n }\n }\n // Let's update the text's bbox with the line's one\n if (this.bbox.width < lineInfo.bbox.width) {\n this.bbox.width = lineInfo.bbox.width;\n }\n // commented to avoid bug (seen on sankey link) where text is incorrectly aligned\n //if (this.bbox.x > lineInfo.bbox.x) {\n //this.bbox.x = lineInfo.bbox.x;\n //}\n this.bbox.height = currentHeight + currentLineHeight;\n // Position current line\n if (!this.textPathElement) {\n lineInfo.element.attr({\n \"x\": \"0\",\n \"y\": currentHeight + currentLineHeight,\n \"dy\": $math.round(this.baseLineRatio * currentLineHeight, 3).toString()\n });\n } else {\n lineInfo.element.attr({\n \"dy\": -this.paddingBottom.toString()\n });\n }\n firstChunk = false;\n }\n }\n // Trim the last item\n var node = lineInfo.element.node;\n if (node) {\n var lastNode = node.lastChild;\n if (lastNode) {\n lastNode.textContent = this.rtl ? $utils.ltrim(lastNode.textContent) : $utils.rtrim(lastNode.textContent);\n }\n }\n // Increment collective height\n currentHeight += currentLineHeight;\n // Save line cache\n this.addLineInfo(lineInfo, i);\n }\n // Check if maybe we need to hide the whole label if it doesn't fit\n this.maybeHideOversized();\n // Updated measured dims\n this._measuredWidth = $math.max(this.bbox.width, this.pixelWidth - this.pixelPaddingLeft - this.pixelPaddingRight);\n this._measuredHeight = $math.max(this.bbox.height, this.pixelHeight - this.pixelPaddingTop - this.pixelPaddingBottom);\n // Align the lines\n this.alignSVGText();\n this.bbox.width = this._measuredWidth;\n this.bbox.height = this._measuredHeight;\n if (oldH != this._measuredHeight || oldW != this._measuredWidth) {\n this.dispatch(\"transformed\");\n }\n this.hideUnused(lines.length);\n } else {\n /**\r\n * HTML\r\n */\n this.element.removeAttr(\"display\");\n this.resetBBox();\n // Clear the element\n var group = this.element;\n group.removeChildren();\n // Create a ForeignObject to use as HTML container\n var fo = this.paper.foreignObject();\n group.add(fo);\n // Create line element\n //let lineElement: HTMLElement = this.getHTMLLineElement(getTextFormatter().format(this.html, output));\n var lineElement = this.getHTMLLineElement(text);\n fo.node.appendChild(lineElement);\n // Temporarily set to inline-block so we can measure real width and height\n lineElement.style.display = \"inline-block\";\n var clientWidth = lineElement.clientWidth;\n var clientHeight = lineElement.clientHeight;\n lineElement.style.display = \"block\";\n this._bbox = {\n x: 0,\n y: 0,\n width: clientWidth,\n height: clientHeight\n };\n // Set exact dimensions of foreignObject so it is sized exactly as\n // the content within\n fo.attr({\n width: clientWidth,\n height: clientHeight\n });\n // Check if maybe we need to hide the whole label if it doesn't fit\n this.maybeHideOversized();\n // Set measurements and update bbox\n this._measuredWidth = $math.max(this.bbox.width, this.pixelWidth - this.pixelPaddingLeft - this.pixelPaddingRight);\n this._measuredHeight = $math.max(this.bbox.height, this.pixelHeight - this.pixelPaddingTop - this.pixelPaddingBottom);\n this.bbox.width = this._measuredWidth;\n this.bbox.height = this._measuredHeight;\n // Don't let labels bleed out of the alotted area\n if (this.truncate) {\n lineElement.style.overflow = \"hidden\";\n }\n if (clientWidth > maxWidth || clientHeight > maxHeight) {\n this.isOversized = true;\n }\n }\n // Set applicable styles\n this.setStyles();\n this.updateCenter();\n this.updateBackground();\n if (display == \"none\") {\n this.group.attr({\n display: \"none\"\n });\n }\n if (this.pathElement) {\n this.paper.appendDef(this.pathElement);\n }\n };\n /**\r\n * Hides element if it does not fit into available space\r\n */\n Label.prototype.maybeHideOversized = function () {\n if (this.hideOversized) {\n if (this.availableWidth < this.bbox.width || this.availableHeight < this.bbox.height) {\n this.element.attr({\n display: \"none\"\n });\n this.isOversized = true;\n } else {\n this.element.removeAttr(\"display\");\n this.isOversized = false;\n }\n }\n };\n /**\r\n * Aligns the lines horizontally ant vertically, based on properties.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Label.prototype.alignSVGText = function () {\n // Get Group\n var group = this.element;\n var children = group.node.children || group.node.childNodes;\n // Is there anything to align?\n if (!children || children && children.length == 0) {\n return;\n }\n var width = this._measuredWidth;\n var height = this._measuredHeight;\n // TODO maybe these aren't needed ?\n $utils.used(this.pixelPaddingLeft);\n $utils.used(this.pixelPaddingRight);\n $utils.used(this.pixelPaddingTop);\n $utils.used(this.pixelPaddingBottom);\n // Process each line\n //$iter.each(group.children.backwards().iterator(), (element) => {\n for (var i = children.length - 1; i >= 0; i--) {\n // Align horizontally\n // Since we are using `text-anchor` for horizontal alignment, all we need\n // to do here is move the `x` position\n var node = children[i];\n node.setAttribute(\"text-anchor\", this.textAlign);\n if (this.textPathElement) {\n node.removeAttribute(\"x\");\n node.removeAttribute(\"y\");\n } else {\n switch (this.textAlign) {\n case \"middle\":\n node.setAttribute(\"x\", (width / 2).toString() + \"px\");\n break;\n case \"end\":\n if (this.rtl) {} else {\n node.setAttribute(\"x\", width.toString());\n }\n break;\n default:\n if (this.rtl) {\n node.setAttribute(\"x\", width.toString());\n } else {\n node.removeAttribute(\"text-anchor\");\n }\n break;\n }\n var y = $type.toNumber(node.getAttribute(\"y\"));\n switch (this.textValign) {\n case \"middle\":\n node.setAttribute(\"y\", (y + (height - this.bbox.height) / 2).toString());\n break;\n case \"bottom\":\n node.setAttribute(\"y\", (y + height - this.bbox.height).toString());\n break;\n default:\n node.setAttribute(\"y\", y.toString());\n break;\n }\n }\n }\n };\n /**\r\n * Produces an SVG line element with formatted text.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Text to wrap into line\r\n * @param y Current line vertical position\r\n * @return A DOM element\r\n * @todo Implement HTML support\r\n */\n Label.prototype.getSVGLineElement = function (text, y) {\n // Create a <text> node and set text\n var element = this.paper.addGroup(\"text\");\n element.textContent = text;\n // Set parameters\n element.attr({\n \"x\": \"0\"\n //\"alignment-baseline\": \"hanging\",\n //\"baseline-shift\": \"-20%\",\n //\"text-anchor\": \"center\"\n });\n // Set `y` position\n if ($type.hasValue(y)) {\n element.attr({\n \"y\": y.toString()\n });\n }\n // Don't let labels blled out of the alotted area\n if (this.truncate || this.wrap) {\n element.attr({\n \"overflow\": \"hidden\"\n });\n }\n // Add RTL?\n if (this.rtl) {\n element.attr({\n \"direction\": \"rtl\"\n });\n }\n return element;\n };\n /**\r\n * Resets cached BBox.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Label.prototype.resetBBox = function () {\n this._bbox = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n };\n /**\r\n * Creates and returns an HTML line element (`<div>`).\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Text to add\r\n * @return `<div>` element reference\r\n */\n Label.prototype.getHTMLLineElement = function (text) {\n // Create the <div> element\n var div = document.createElement(\"div\");\n div.innerHTML = text;\n // Set text alignment\n switch (this.textAlign) {\n case \"middle\":\n div.style.textAlign = \"center\";\n break;\n case \"end\":\n div.style.textAlign = \"right\";\n break;\n }\n // Disable or enable wrapping\n if (this.wrap) {\n div.style.wordWrap = \"break-word\";\n } else {\n div.style.whiteSpace = \"nowrap\";\n }\n // Don't let labels bleed out of the alotted area\n // Moved to `draw()` because setting \"hidden\" kills all measuring\n /*if (this.truncate) {\r\n div.style.overflow = \"hidden\";\r\n }*/\n // Set RTL-related styles\n if (this.rtl) {\n div.style.direction = \"rtl\";\n //div.style.unicodeBidi = \"bidi-override\";\n }\n // Translate some of the SVG styles into CSS\n if ($type.hasValue(this.fill)) {\n div.style.color = this.fill.toString();\n }\n return div;\n };\n /**\r\n * Applies specific styles to text to make it not selectable, unless it is\r\n * explicitly set as `selectable`.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Set styles via AMElement\r\n */\n Label.prototype.setStyles = function () {\n var group = this.element;\n if (!this.selectable || this.draggable || this.resizable || this.swipeable) {\n group.addStyle({\n \"webkitUserSelect\": \"none\",\n \"msUserSelect\": \"none\"\n });\n } else if (this.selectable) {\n group.removeStyle(\"webkitUserSelect\");\n group.removeStyle(\"msUserSelect\");\n }\n };\n /**\r\n * Hides unused lines\r\n */\n Label.prototype.hideUnused = function (index) {\n this.initLineCache();\n var lines = this.getCache(\"lineInfo\");\n if (lines.length >= index) {\n for (var i = index; i < lines.length; i++) {\n var line = lines[i];\n if (line && line.element) {\n line.element.attr({\n \"display\": \"none\"\n });\n }\n }\n }\n };\n Object.defineProperty(Label.prototype, \"text\", {\n /**\r\n * @return SVG text\r\n */\n get: function get() {\n return this.getPropertyValue(\"text\");\n },\n /**\r\n * An SVG text.\r\n *\r\n * Please note that setting `html` will override this setting if browser\r\n * supports `foreignObject` in SGV, such as most modern browsers excluding\r\n * IEs.\r\n *\r\n * @param value SVG Text\r\n */\n set: function set(value) {\n //this.setPropertyValue(\"html\", undefined);\n this.setPropertyValue(\"text\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Label.prototype, \"path\", {\n /**\r\n * @return Path\r\n */\n get: function get() {\n return this.getPropertyValue(\"path\");\n },\n /**\r\n * An SVG path string to position text along. If set, the text will follow\r\n * the curvature of the path.\r\n *\r\n * Location along the path can be set using `locationOnPath`.\r\n *\r\n * IMPORTANT: Only SVG text can be put on path. If you are using HTML text\r\n * this setting will be ignored.\r\n *\r\n * @since 4.1.2\r\n * @param value Path\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"path\", value, true)) {\n if (this.pathElement) {\n this.pathElement.dispose();\n }\n if (this.textPathElement) {\n this.textPathElement.dispose();\n }\n this.pathElement = this.paper.add(\"path\");\n this.pathElement.attr({\n \"d\": value\n });\n this.pathElement.attr({\n \"id\": \"text-path-\" + this.uid\n });\n this._disposers.push(this.pathElement);\n this.textPathElement = this.paper.addGroup(\"textPath\");\n this.textPathElement.attrNS($dom.XLINK, \"xlink:href\", \"#text-path-\" + this.uid);\n // TODO remove after https://bugzilla.mozilla.org/show_bug.cgi?id=455986 is fixed\n this.textPathElement.attr({\n \"path\": value\n });\n this._disposers.push(this.textPathElement);\n this.hardInvalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Label.prototype, \"locationOnPath\", {\n /**\r\n * @return Relatvie location on path\r\n */\n get: function get() {\n return this.getPropertyValue(\"locationOnPath\");\n },\n /**\r\n * Relative label location on `path`. Value range is from 0 (beginning)\r\n * to 1 (end).\r\n *\r\n * Works only if you set `path` setting to an SVG path.\r\n *\r\n * @since 4.1.2\r\n * @default 0\r\n * @param value Relatvie location on path\r\n */\n set: function set(value) {\n this.setPropertyValue(\"locationOnPath\", value);\n if (this.textPathElement) {\n this.textPathElement.attr({\n \"startOffset\": value * 100 + \"%\"\n });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Label.prototype, \"baseLineRatio\", {\n /**\r\n * @return Base line ratio\r\n */\n get: function get() {\n return this.getPropertyValue(\"baseLineRatio\");\n },\n /**\r\n * A ratio to calculate text baseline. Ralative distance from the bottom of\r\n * the label.\r\n *\r\n * @since 4.4.2\r\n * @default -0.27\r\n * @param value Base line ratio\r\n */\n set: function set(value) {\n this.setPropertyValue(\"baseLineRatio\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Label.prototype, \"wrap\", {\n /**\r\n * @return Auto-wrap enabled or not\r\n */\n get: function get() {\n return this.getPropertyValue(\"wrap\");\n },\n /**\r\n * Enables or disables autowrapping of text.\r\n *\r\n * @param value Auto-wrapping enabled\r\n */\n set: function set(value) {\n this.resetBBox();\n this.setPropertyValue(\"wrap\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Label.prototype, \"truncate\", {\n /**\r\n * @return Truncate text?\r\n */\n get: function get() {\n return this.getPropertyValue(\"truncate\");\n },\n /**\r\n * Indicates if text lines need to be truncated if they do not fit, using\r\n * configurable `ellipsis` string.\r\n *\r\n * `truncate` overrides `wrap` if both are set to `true`.\r\n *\r\n * NOTE: For HTML text, this setting **won't** trigger a parser and actual\r\n * line truncation with ellipsis. It will just hide everything that goes\r\n * outside the label.\r\n *\r\n * @param value trincate text?\r\n */\n set: function set(value) {\n this.resetBBox();\n this.setPropertyValue(\"truncate\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Label.prototype, \"fullWords\", {\n /**\r\n * @return Truncate on full words?\r\n */\n get: function get() {\n return this.getPropertyValue(\"fullWords\");\n },\n /**\r\n * If `truncate` is enabled, should Label try to break only on full words\r\n * (`true`), or whenever needed, including middle of the word. (`false`)\r\n *\r\n * @default true\r\n * @param value Truncate on full words?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"fullWords\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Label.prototype, \"ellipsis\", {\n /**\r\n * @return Ellipsis string\r\n */\n get: function get() {\n return this.getPropertyValue(\"ellipsis\");\n },\n /**\r\n * Ellipsis character to use if `truncate` is enabled.\r\n *\r\n * @param value Ellipsis string\r\n * @default \"...\"\r\n */\n set: function set(value) {\n this.setPropertyValue(\"ellipsis\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Label.prototype, \"selectable\", {\n /**\r\n * @return Text selectable?\r\n */\n get: function get() {\n return this.getPropertyValue(\"selectable\");\n },\n /**\r\n * Forces the text to be selectable. This setting will be ignored if the\r\n * object has some kind of interaction attached to it, such as it is\r\n * `draggable`, `swipeable`, `resizable`.\r\n *\r\n * @param value Text selectable?\r\n * @default false\r\n */\n set: function set(value) {\n this.setPropertyValue(\"selectable\", value, true);\n this.setStyles();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Label.prototype, \"textAlign\", {\n /**\r\n * @return Alignment\r\n */\n get: function get() {\n return this.getPropertyValue(\"textAlign\");\n },\n /**\r\n * Horizontal text alignment.\r\n *\r\n * Available choices:\r\n * * \"start\"\r\n * * \"middle\"\r\n * * \"end\"\r\n *\r\n * @param value Alignment\r\n */\n set: function set(value) {\n this.setPropertyValue(\"textAlign\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Label.prototype, \"textValign\", {\n /**\r\n * @ignore Exclude from docs (not used)\r\n * @return Alignment\r\n * @deprecated\r\n */\n get: function get() {\n return this.getPropertyValue(\"textValign\");\n },\n /**\r\n * Vertical text alignment.\r\n *\r\n * @ignore Exclude from docs (not used)\r\n * @param value Alignment\r\n * @deprecated\r\n */\n set: function set(value) {\n this.setPropertyValue(\"textValign\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Label.prototype, \"html\", {\n /**\r\n * @return HTML content\r\n */\n get: function get() {\n return this.getPropertyValue(\"html\");\n },\n /**\r\n * Raw HTML to be used as text.\r\n *\r\n * NOTE: HTML text is subject to browser support. It relies on browsers\r\n * supporting SVG `foreignObject` nodes. Some browsers (read IEs) do not\r\n * support it. On those browsers, the text will fall back to basic SVG text,\r\n * striping out all HTML markup and styling that goes with it.\r\n *\r\n * For more information about `foreignObject` and its browser compatibility\r\n * refer to [this page](https://developer.mozilla.org/en/docs/Web/SVG/Element/foreignObject#Browser_compatibility).\r\n *\r\n * @param value HTML text\r\n */\n set: function set(value) {\n this.setPropertyValue(\"html\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Label.prototype, \"hideOversized\", {\n /**\r\n * @return Hide if text does not fit?\r\n */\n get: function get() {\n return this.getPropertyValue(\"hideOversized\");\n },\n /**\r\n * Indicates whether the whole text should be hidden if it does not fit into\r\n * its allotted space.\r\n *\r\n * @param value Hide if text does not fit?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"hideOversized\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Label.prototype, \"ignoreFormatting\", {\n /**\r\n * @return Ignore formatting?\r\n */\n get: function get() {\n return this.getPropertyValue(\"ignoreFormatting\");\n },\n /**\r\n * If set to `true` square-bracket formatting blocks will be treated as\r\n * regular text.\r\n *\r\n * @default false\r\n * @param value Ignore formatting?\r\n */\n set: function set(value) {\n this.setPropertyValue(\"ignoreFormatting\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Override `mesaureElement` so it does not get measure again, because\r\n * internal `_bbox` is being updated by measuring routines in Text itself.\r\n */\n Label.prototype.measureElement = function () {};\n /**\r\n * Returns information about a line element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param index Line index\r\n * @return Line info object\r\n */\n Label.prototype.getLineInfo = function (index) {\n this.initLineCache();\n var lines = this.getCache(\"lineInfo\");\n return lines.length > index ? lines[index] : undefined;\n };\n /**\r\n * Adds a line to line info cache.\r\n *\r\n * @ignore Exclude from docs\r\n * @param line Line info object\r\n * @param index Insert at specified index\r\n */\n Label.prototype.addLineInfo = function (line, index) {\n this.initLineCache();\n this.getCache(\"lineInfo\")[index] = line;\n };\n /**\r\n * Checks if line cache is initialized and initializes it.\r\n */\n Label.prototype.initLineCache = function () {\n if (!$type.hasValue(this.getCache(\"lineInfo\"))) {\n this.setCache(\"lineInfo\", [], 0);\n }\n };\n /**\r\n * Sets a [[DataItem]] to use for populating dynamic sections of the text.\r\n *\r\n * Check the description for [[Text]] class, for data binding.\r\n *\r\n * @param dataItem Data item\r\n */\n Label.prototype.setDataItem = function (dataItem) {\n if (this._sourceDataItemEvents) {\n this._sourceDataItemEvents.dispose();\n }\n if (dataItem) {\n this._sourceDataItemEvents = new MultiDisposer([dataItem.events.on(\"valuechanged\", this.invalidate, this, false), dataItem.events.on(\"workingvaluechanged\", this.invalidate, this, false), dataItem.events.on(\"calculatedvaluechanged\", this.invalidate, this, false), dataItem.events.on(\"propertychanged\", this.invalidate, this, false)]);\n }\n _super.prototype.setDataItem.call(this, dataItem);\n };\n Object.defineProperty(Label.prototype, \"availableWidth\", {\n /**\r\n * Returns available horizontal space.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Available width (px)\r\n */\n get: function get() {\n return $type.hasValue(this.maxWidth) ? this.maxWidth : this.pixelWidth;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Label.prototype, \"availableHeight\", {\n /**\r\n * Returns available vertical space.\r\n *\r\n * @return Available height (px)\r\n */\n get: function get() {\n return $type.hasValue(this.maxHeight) ? this.maxHeight : this.pixelHeight;\n },\n enumerable: true,\n configurable: true\n });\n // temp, replacing textFormatter method\n Label.prototype.getSvgElement = function (text, style) {\n var element = this.paper.add(\"tspan\");\n element.textContent = text;\n if (style) {\n element.node.setAttribute(\"style\", style);\n }\n return element;\n };\n /**\r\n * Invalidates the whole element, including layout AND all its child\r\n * elements.\r\n */\n Label.prototype.deepInvalidate = function () {\n _super.prototype.deepInvalidate.call(this);\n this.hardInvalidate();\n };\n return Label;\n}(Container);\nexport { Label };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Label\"] = Label;\n/**\r\n * Add default responsive rules\r\n */\n/**\r\n * Hide labels added directly to chart, like titles if chart is short.\r\n */\ndefaultRules.push({\n relevant: ResponsiveBreakpoints.heightXS,\n state: function state(target, stateId) {\n if (target instanceof Label && target.parent && target.parent.isBaseSprite) {\n var state = target.states.create(stateId);\n state.properties.disabled = true;\n return state;\n }\n return null;\n }\n});","import CheckOutlinedIcon from \"@mui/icons-material/CheckOutlined\";\nimport HighlightOffOutlinedIcon from \"@mui/icons-material/HighlightOffOutlined\";\nimport LinkIcon from \"@mui/icons-material/Link\";\nimport TagIcon from \"@mui/icons-material/Tag\";\nimport {\n Box, Card, CardContent, Chip, Collapse, IconButton, Link, Stack, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Tooltip, Typography,\n} from \"@mui/material\";\nimport { Contact } from \"api/tickets\";\nimport { useGetLocationRemediationQuery } from \"api/services\";\nimport { flatMap, map, size, startCase, toLower, mapKeys, camelCase } from \"lodash\";\nimport { useContext, useMemo, useState } from \"react\";\n// import { useHistory, useLocation } from \"react-router-dom\";\nimport BinDot from \"service/BinDot\";\nimport { formatDate, useBinFetch } from \"sharedUtils\";\nimport { useTypedSelector } from \"ticket/app/store\";\nimport AppContext from \"ticket/AppContext\";\nimport { getLocationId, getTicketId, useTicket } from \"ticket/selectors\";\nimport { getRequestType, getTypographyLabel,} from \"./AdhocVisitRequestCardDetails\";\nimport ReportRequestCardLayout from \"./ReportRequestCardLayout\"\nimport { TypoHaveInfo, TypoNeedInfo } from 'sharedComponents';\n\n\n\nconst AdhocVisitRequestCard = ({ request }) => {\n const { binTypes, binGroups } = useBinFetch();\n\n const { deliveryUnits } = request || {};\n // const history = useHistory();\n // const location = useLocation();\n const locationId = getLocationId();\n const {\n currentTicketId,\n highlightedIds,\n setHighlightedIds,\n onOpenRemediation,\n setRequestedAtDate,\n setEventId,\n setRequestType\n } = useContext(AppContext);\n\n // const [open, setOpen] = useState(true);\n const clearAll = request?.clearAll;\n const collectionUnits = clearAll ? [] : request?.collectionUnits;\n\n const isCollect = size(collectionUnits) > 0;\n const isDelivery = size(deliveryUnits) > 0;\n const isCollectAndDelivery = isCollect && isDelivery;\n\n const { stakeholderContacts } = useTicket() || {};\n\n // Get all stakeholders\n const allStakeholders: Contact[] = flatMap(\n stakeholderContacts || [],\n (x) => x,\n );\n\n const inputtedBy = allStakeholders?.find(\n (x) => x.id === request?.inputtedById,\n );\n\n const requestType = getRequestType({\n clearAll,\n isCollectAndDelivery,\n isCollect,\n isDelivery,\n });\n const headers = useMemo(() => {\n switch (requestType) {\n case \"clearAllAndDeliver\":\n return [\"\", \"Deliver Additional\", \"Action\"];\n case \"collect\":\n return [\"\", \"Collect\", \"Action\"];\n case \"collectAndDeliver\":\n return [\"\", \"Collect\", \"Deliver Additional\", \"Action\"];\n case \"deliver\":\n return [\"\", \"Deliver Additional\", \"Action\"];\n default:\n return [\"\", \"Collect\", \"Deliver\", \"Action\"];\n }\n }, [requestType]);\n\n const label = getTypographyLabel(requestType);\n\n\n\n const collectAndDeliver = collectionUnits?.reduce((acc, unit) => {\n acc[unit?.serviceCode] = { ...unit };\n return acc;\n }, {});\n\n deliveryUnits?.forEach((deliveryUnit) => {\n if (collectAndDeliver[deliveryUnit?.serviceCode]) {\n collectAndDeliver[deliveryUnit?.serviceCode].deliveryQty =\n deliveryUnit?.quantity;\n } else {\n collectAndDeliver[deliveryUnit?.serviceCode] = {\n serviceCode: deliveryUnit?.serviceCode,\n deliveryQty: deliveryUnit?.quantity,\n };\n }\n });\n\n\n const newRows = map(\n collectAndDeliver,\n ({\n serviceCode,\n quantity: collectionQuantity,\n visitActionId,\n deliveryQty: deliveryQuantity,\n }) => {\n const binType = binTypes[serviceCode];\n const binGroup = binGroups[binType?.binGroupId];\n\n return (\n <TableRow key={serviceCode}>\n <TableCell\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 1,\n }}\n >\n <BinDot\n binGroup={binGroup}\n tooltipName={true}\n tooltipPlace=\"top\"\n {...binType}\n />{\" \"}\n <Typography>{binType?.name}</Typography>\n </TableCell>\n\n {[\"collect\", \"collectAndDeliver\"].includes(requestType) && (\n <TableCell>\n {collectionQuantity === \"all\" ? \"All\" : collectionQuantity}\n </TableCell>\n )}\n\n {[\"clearAllAndDeliver\", \"collectAndDeliver\", \"deliver\"].includes(\n requestType,\n ) && <TableCell>{deliveryQuantity || 0}</TableCell>}\n\n <TableCell\n sx={{\n color: \"#5F6369 !important\",\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n }}\n >\n {visitActionId ? <span>{startCase(visitActionId)}</span> : null}\n\n <span>{serviceCode}</span>\n </TableCell>\n </TableRow>\n );\n },\n );\n\n\nconst title = (\n <span>\n Adhoc Visit Request\n {!request.date && !request.cancelledAt && (\n <TypoNeedInfo><strong> Awaiting Date </strong></TypoNeedInfo>\n )}\n </span>\n )\n\n\n const body = (\n <>\n\n {newRows.length > 0 && (\n <AdhocCardTable rows={newRows} headers={headers} />\n )}\n\n {request?.date ? (\n <Typography sx={{ fontSize: \"13px\", color: \"#828B98\" }}>\n Visit confirmed for{\" \"}\n <span style={{ color: \"#19E53B\" }}>\n {formatDate(request?.date)}\n </span>\n <Typography\n component=\"span\"\n sx={{ fontSize: \"11px\", color: \"#828B98\" }}\n >\n {\" \"}\n on{\" \"}\n <span style={{ color: \"#BFBFBF\" }}>\n {formatDate(request?.confirmedAt)}\n </span>{\" \"}\n by{\" \"}\n <span style={{ color: \"#BFBFBF\" }}>\n {inputtedBy?.nameWithoutEmail || \"No Agent\"}\n </span>\n </Typography>\n </Typography>\n ) : request?.cancelledAt ? (\n <Typography sx={{ fontSize: \"13px\", color: \"#828B98\" }}>\n Request was cancelled on{\" \"}\n <span style={{ color: \"red\" }}>\n {formatDate(request?.cancelledAt)}\n </span>{\" \"}\n <Typography component=\"span\" sx={{ fontSize: \"11px\" }}>\n by{\" \"}\n <span style={{ color: \"#BFBFBF\" }}>\n {inputtedBy?.nameWithoutEmail || \"No Agent\"}\n </span>\n </Typography>\n </Typography>\n ) : (\n <Typography sx={{ fontSize: \"13px\", color: \"#828B98\" }}>\n Visit confirmed for{\" \"}\n <Chip\n label=\"Awaiting Date\"\n size=\"small\"\n component=\"span\"\n sx={{\n background: \"#5F6369\",\n color: \"#BFBFBF\",\n fontSize: \"11px\",\n fontWeight: \"bold\",\n }}\n />\n </Typography>\n )}\n\n </>\n)\n\n return (\n <ReportRequestCardLayout title={title} links='' label={label} body={body} request={request} />\n );\n\n\n};\n\nexport default AdhocVisitRequestCard;\n\nexport const AdhocCardTable = ({ rows, headers }) => {\n return (\n <TableContainer>\n <Table\n sx={{\n \"& .MuiTableCell-root\": {\n border: \"none\",\n padding: 0,\n },\n }}\n >\n <TableHead>\n <TableRow>\n {headers.map((header) => (\n <TableCell sx={{ color: \"#5F6369\", fontSize: \"11px\" }}>\n {header}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody\n sx={{\n \"& .MuiTableCell-root\": {\n fontSize: \"11px\",\n color: \"#BFBFBF\",\n },\n }}\n >\n {rows}\n </TableBody>\n </Table>\n </TableContainer>\n );\n};\n\n\n\n\nexport const ActionButtons = ({ actions, isActive, request, linkSelected }) => {\n const ticketId = useTypedSelector(getTicketId);\n const { onSelectAction, setSelectedContainer } = useContext(AppContext);\n const scrollToTagInCompositeId = () => {\n const specificId = request.id;\n setSelectedContainer(specificId);\n\n const element = document.getElementById(specificId);\n if (element) {\n element.scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n } else {\n const potentialTargets = document.querySelectorAll(\"[id]\");\n const targetsArray = Array.from(potentialTargets); // Convert NodeList to Array\n for (let el of targetsArray) {\n if (el.id.includes(specificId)) {\n el.scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n break;\n }\n }\n }\n };\n\n return (\n <Box sx={{ display: \"flex\", alignItems: \"center\" }}>\n {isActive && (\n <>\n {actions?.map((action) => (\n <Tooltip\n arrow\n placement=\"top\"\n title={startCase(action.value)}\n key={action.value}\n >\n <IconButton\n aria-label={action.label}\n onClick={() => onSelectAction(null, { path: action.path })}\n sx={{ py: 0 }}\n >\n {toLower(action.label) === \"confirm\" ? (\n <CheckOutlinedIcon sx={{ color: \"#AAB2BD\" }} />\n ) : (\n <HighlightOffOutlinedIcon sx={{ color: \"#AAB2BD\" }} />\n )}\n </IconButton>\n </Tooltip>\n ))}\n </>\n )}\n {ticketId === request?.linkedTicketIds[0] ? (\n <Tooltip arrow placement=\"top\" title=\"Go to reply\">\n <IconButton\n onClick={scrollToTagInCompositeId}\n sx={{\n ...(linkSelected && {\n border: \"1px solid #6c8c89\",\n }),\n }}\n >\n <LinkIcon\n sx={{\n color: \"#AAB2BD\",\n ...(linkSelected && {\n fill: \"#6c8c89\",\n }),\n }}\n />\n </IconButton>\n </Tooltip>\n ) : (\n <Tooltip arrow placement=\"top\" title=\"Go to ticket\">\n <IconButton\n onClick={() =>\n window.open(\n `/admin/tickets/${request?.linkedTicketIds[0]}/app`,\n \"_blank\",\n )\n }\n >\n <TagIcon\n sx={{\n color: \"#AAB2BD\",\n ...(linkSelected && {\n fill: \"#6c8c89\",\n }),\n }}\n />\n </IconButton>\n </Tooltip>\n )}\n </Box>\n );\n};\n","import AddIcon from \"@mui/icons-material/Add\";\nimport {\n Autocomplete,\n Box,\n IconButton,\n Popover,\n TextField,\n Typography,\n} from \"@mui/material\";\nimport { useEffect, useState } from \"react\";\nimport BinDot from \"service/BinDot\";\nimport { useBinFetch } from \"sharedUtils\";\n\nexport const QuantitySelector = ({ onChange, quantity }) => {\n const [inputValue, setInputValue] = useState(\n Math.max(0, quantity).toString()\n );\n\n useEffect(() => {\n setInputValue(Math.max(0, quantity).toString());\n }, [quantity]);\n\n const handleChange = (e) => {\n const value = e.target.value;\n setInputValue(value);\n\n // Convert to number and update only if it's a valid non-negative number\n const numValue = Math.max(0, parseInt(value, 10));\n if (!isNaN(numValue)) {\n onChange(numValue);\n } else if (value === \"\") {\n onChange(0);\n }\n };\n\n const handleBlur = () => {\n // If focus is lost without a valid number, set to 0\n const numValue = Math.max(0, parseInt(inputValue, 10));\n if (isNaN(numValue)) {\n setInputValue(\"0\");\n onChange(0);\n } else {\n setInputValue(numValue.toString());\n onChange(numValue);\n }\n };\n\n return (\n <input\n style={{\n width: 41,\n display: \"inline-block\",\n textAlign: \"center\",\n }}\n type=\"number\"\n inputMode=\"numeric\"\n pattern=\"[0-9]*\"\n min=\"0\"\n value={inputValue}\n onChange={handleChange}\n onBlur={handleBlur}\n />\n );\n};\n\nexport const CollectionQuantitySelector = ({\n onChangeQuantity,\n onChangeCollectAll,\n quantity,\n collectAll,\n}) => {\n return (\n <>\n {!collectAll ? (\n <QuantitySelector quantity={quantity} onChange={onChangeQuantity} />\n ) : (\n <span>All</span>\n )}{\" \"}\n <i\n className=\"link fa fa-exchange\"\n style={{ color: \"#3BAFDA\", cursor: \"pointer\" }}\n onClick={() => onChangeCollectAll(!collectAll)}\n ></i>\n </>\n );\n};\n\nexport const HeaderDetails = ({ onClick, noOptions }) => {\n return (\n <Box\n sx={{\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n backgroundColor: \"#E9E8E8\",\n padding: 1,\n }}\n >\n <Typography\n sx={{\n fontSize: \"12px\",\n textTransform: \"uppercase\",\n fontWeight: \"bold\",\n }}\n >\n Details\n </Typography>\n\n <Box\n sx={{\n visibility: !noOptions ? \"visible\" : \"hidden\",\n }}\n >\n <AddIcon\n onClick={onClick}\n sx={{ cursor: \"pointer\", fontSize: \"20px\" }}\n />\n </Box>\n </Box>\n );\n};\n\nexport const BinTypeSelectorPopover = ({\n anchorEl,\n setAnchorEl,\n options,\n addBinHandler,\n}) => {\n const { binGroups } = useBinFetch();\n\n const headerStyle = {\n display: \"flex\",\n width: \"100%\",\n backgroundColor: \"#f5f5f5\",\n borderBottom: \"1px solid #ccc\",\n padding: \"8px 0\",\n };\n\n const cellStyle = {\n width: \"25%\",\n padding: \"8px\",\n boxSizing: \"border-box\",\n textAlign: \"center\",\n borderRight: \"1px solid #ccc\",\n alignItems: \"center\",\n display: \"flex\",\n justifyContent: \"center\",\n };\n\n const headerCellStyle = {\n ...cellStyle,\n fontWeight: \"bold\",\n color: \"#333\",\n };\n return (\n <Popover\n open={Boolean(anchorEl)}\n anchorEl={anchorEl}\n onClose={() => setAnchorEl(null)}\n anchorOrigin={{\n vertical: \"top\",\n horizontal: \"right\",\n }}\n transformOrigin={{\n vertical: \"top\",\n horizontal: \"left\",\n }}\n >\n <Autocomplete\n sx={{ minWidth: \"500px\" }}\n options={options}\n getOptionLabel={(option) =>\n `${options.name} ${option.groupName} ${option.serviceCode}`\n }\n renderOption={(props, option) => {\n const index = _.findIndex(\n _.values(options),\n (unit) => unit.serviceCode === option.serviceCode\n );\n\n return (\n <React.Fragment key={option.serviceCode}>\n {index === 0 && (\n <div style={headerStyle} key={`header-${option.serviceCode}`}>\n <div style={headerCellStyle}>TYPE</div>\n <div style={headerCellStyle}>NAME</div>\n <div style={headerCellStyle}>CODE</div>\n <div style={{ ...headerCellStyle, borderRight: \"none\" }}>\n ADD NEW\n </div>\n </div>\n )}\n <div style={{ display: \"flex\", width: \"100%\" }}>\n <div style={cellStyle}>\n <BinDot binGroup={binGroups[option.binGroupId]} />\n </div>\n <div style={cellStyle}>\n {option.imageUrl && (\n <img\n src={option.imageUrl}\n alt={option.name}\n style={{\n marginRight: \"10px\",\n width: \"30px\",\n height: \"30px\",\n }}\n />\n )}\n\n {option.name}\n </div>\n\n <div style={cellStyle}>{option.serviceCode}</div>\n <div style={{ ...cellStyle, borderRight: \"none\" }}>\n <IconButton\n onClick={() => {\n addBinHandler(option?.serviceCode);\n if (options.length === 1) {\n // when only 1, close after add\n setAnchorEl(null);\n }\n }}\n >\n <AddIcon />\n </IconButton>\n </div>\n </div>\n </React.Fragment>\n );\n }}\n renderInput={(params) => (\n <TextField {...params} label=\"Search and Select\" />\n )}\n />\n </Popover>\n );\n};\n","import { SvgIcon } from \"@mui/material\";\n\nexport const FailureIcon = (props) => (\n <SvgIcon {...props}>\n <svg\n width=\"11\"\n height=\"13\"\n viewBox=\"0 0 11 13\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6.06182 0H0.861822C0.378965 0 0.000107388 0.364 0.000107388 0.817143V12.1903C-0.00732118 12.6434 0.371536 13.0074 0.861822 13.0074H9.53839C10.0138 13.0074 10.4075 12.6434 10.4075 12.1903V4.06343L6.06182 0ZM7.45096 4.36057H4.39782V6.50743H7.25782V7.78514H4.39782V10.8977H2.94182V3.09029H7.45096V4.36057Z\"\n fill=\"white\"\n />\n </svg>\n </SvgIcon>\n);\n\nexport const ServiceIcon = (props) => (\n <SvgIcon {...props}>\n <svg\n width=\"11\"\n height=\"13\"\n viewBox=\"0 0 11 13\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6.06578 0H0.861332C0.386175 0 0.000107326 0.363792 0.000107326 0.816676V12.1833C-0.007317 12.6362 0.371327 13 0.861332 13H9.53295C10.0081 13 10.4016 12.6362 10.4016 12.1833V4.06111L6.06578 0ZM6.89731 10.5871L6.53352 10.8247C6.09548 11.0623 5.54608 11.181 4.90759 11.181C4.07606 11.181 3.4153 11.0474 2.87332 10.7801L2.74711 10.7207V9.11708L3.06635 9.27299C3.3856 9.4289 3.71227 9.54769 4.03152 9.62193C4.92244 9.83724 5.53123 9.77784 5.83563 9.53284C5.99897 9.3992 6.08063 9.22844 6.08063 8.99086C6.08063 8.78298 6.00639 8.61222 5.8579 8.47116C5.67972 8.3004 5.27138 8.07767 4.70713 7.84752C4.03152 7.55797 3.56379 7.23872 3.27424 6.8675C2.98469 6.48886 2.8362 6.02855 2.8362 5.50143C2.8362 4.82581 3.07378 4.29126 3.53409 3.9052C3.98697 3.52656 4.59577 3.33352 5.33078 3.33352C6.06578 3.33352 6.71913 3.48943 7.40959 3.80868L7.5952 3.89777L7.07549 5.27127L6.86019 5.17476C6.27366 4.91491 5.74654 4.78869 5.29365 4.78869C4.98925 4.78869 4.75168 4.85551 4.61061 4.98172C4.46955 5.10794 4.40273 5.27127 4.40273 5.47173C4.40273 5.61279 4.43243 5.73901 4.49183 5.84295C4.5438 5.93946 4.64774 6.0434 4.79622 6.14734C4.90759 6.22159 5.16001 6.37007 5.69457 6.60023C6.20684 6.82296 6.60034 7.03826 6.86761 7.24615C7.13489 7.46145 7.33535 7.70645 7.45413 7.98115C7.58035 8.27813 7.63974 8.58252 7.63974 8.92404C7.63974 9.63678 7.38732 10.201 6.88246 10.6094L6.89731 10.5871Z\"\n fill=\"white\"\n />\n </svg>\n </SvgIcon>\n);\n\nexport const HWCNIcon = (props) => (\n <SvgIcon {...props}>\n <svg\n width=\"11\"\n height=\"13\"\n viewBox=\"0 0 11 13\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6.06579 0H0.861329C0.386172 0 0.000107327 0.363792 0.000107327 0.816676V12.1833C-0.007317 12.6362 0.371324 13 0.861329 13H9.53295C10.0081 13 10.4016 12.6362 10.4016 12.1833V4.06853L6.06579 0.00742432V0ZM8.39702 11.1736H6.7117V7.83267H3.69V11.1736H2.0121V3.30383H3.69V6.33295H6.7117V3.30383H8.39702V11.1736Z\"\n fill=\"white\"\n />\n </svg>\n </SvgIcon>\n);\n\nexport const InvoiceIcon = (props) => (\n <SvgIcon {...props}>\n <svg\n width=\"11\"\n height=\"13\"\n viewBox=\"0 0 11 13\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.1566 0C9.9042 0 9.74829 0.118789 9.66662 0.296973C9.60722 0.438035 9.53298 0.72016 9.15434 0.72016C8.7757 0.72016 8.73115 0.438035 8.66433 0.296973C8.58267 0.118789 8.41191 0 8.1669 0C7.9219 0 7.75114 0.118789 7.6769 0.296973C7.6175 0.44546 7.54326 0.72016 7.16462 0.72016C6.78598 0.72016 6.72658 0.438035 6.65234 0.296973C6.55582 0.126214 6.42219 0 6.17718 0C5.93218 0 5.76142 0.118789 5.68718 0.296973C5.62778 0.44546 5.55354 0.72016 5.1749 0.72016C4.79626 0.72016 4.73686 0.438035 4.66262 0.296973C4.5661 0.126214 4.42504 0 4.17261 0C3.92019 0 3.76428 0.118789 3.68261 0.296973C3.62321 0.438035 3.5564 0.72016 3.18518 0.72016C2.81396 0.72016 2.74714 0.438035 2.6729 0.296973C2.57638 0.126214 2.43532 0 2.18289 0C1.93047 0 1.77456 0.118789 1.68546 0.296973C1.62607 0.423187 1.58152 0.72016 1.19546 0.72016C0.913334 0.72016 0.772272 0.593946 0.668331 0.371216C0.594088 0.22273 0.534693 0 0.259993 0C-0.0147073 0 0.000141332 0 0.000141332 0.512279V12.4877C0.000141332 12.8292 0.17585 13 0.527269 13H9.85965C10.2111 13 10.3868 12.8292 10.3868 12.4877V0.512279C10.3868 0.17076 10.3002 0 10.1269 0H10.1566ZM8.47873 11.1736H1.96016V9.80754L2.1235 9.76299C2.33138 9.7036 2.50956 9.62936 2.65805 9.53284L2.68775 9.51799C2.81396 9.43632 2.91048 9.32496 2.9773 9.19132C3.05154 9.04283 3.09609 8.84238 3.09609 8.6048V7.89949H1.99729V6.58538H3.09609V5.5534C3.09609 5.04854 3.2223 4.62536 3.45988 4.29126C3.69746 3.95717 4.03155 3.70474 4.44731 3.54141C4.84823 3.38549 5.30111 3.30383 5.80597 3.30383C6.25143 3.30383 6.67461 3.34837 7.05325 3.43004C7.43189 3.51171 7.77341 3.60822 8.07781 3.72701L8.30797 3.81611L7.65462 5.13021L7.46902 5.05597C7.22401 4.95945 6.96416 4.88521 6.69689 4.81839C6.42961 4.75157 6.16233 4.72187 5.89506 4.72187C5.58324 4.72187 5.33081 4.79612 5.15263 4.93718C4.99671 5.06339 4.91505 5.28612 4.91505 5.61279V6.5928H7.23886V7.90691H4.91505V8.59737C4.91505 8.89435 4.86308 9.14677 4.76656 9.34723C4.69974 9.48087 4.6255 9.60708 4.52898 9.71102H8.48615V11.1885L8.47873 11.1736Z\"\n fill=\"white\"\n />\n </svg>\n </SvgIcon>\n);\n\nexport const PlanIcon = (props) => (\n <SvgIcon {...props}>\n <svg\n width=\"10\"\n height=\"13\"\n viewBox=\"0 0 10 13\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.83654 0H0.836538C0.375 0 0 0.356044 0 0.810989V12.056C0 12.5011 0.355769 12.867 0.826923 12.867H9.16346C9.625 12.867 10 12.511 10 12.056V4.02527L5.83654 0ZM6.67308 7.36813C6.13462 7.96154 5.25 8.28791 4.19231 8.28791C3.98077 8.28791 3.75 8.28791 3.52885 8.24835V11.4231H2.24038V3.25385L2.35577 3.23407C2.96154 3.13516 3.61538 3.07582 4.30769 3.07582C5.31731 3.07582 6.07692 3.31319 6.58654 3.77802C7.05769 4.19341 7.31731 4.82637 7.31731 5.55824C7.31731 6.29011 7.10577 6.92308 6.67308 7.36813Z\"\n fill=\"white\"\n />\n <path\n d=\"M4.32689 4.18359C3.99996 4.18359 3.72112 4.20337 3.52881 4.24293V7.11107C3.7115 7.15063 3.93265 7.16052 4.2115 7.16052C5.35573 7.16052 6.01919 6.59678 6.01919 5.59788C6.01919 4.36162 4.9615 4.18359 4.32689 4.18359Z\"\n fill=\"white\"\n />\n </svg>\n </SvgIcon>\n);\n\nexport const DebugIcon = (props) => (\n <SvgIcon {...props}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n >\n <g fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\">\n <circle cx=\"11.5\" cy=\"11.5\" r=\"9.5\" />\n <path\n strokeLinecap=\"round\"\n d=\"M11.5 15.5a3 3 0 0 1-3-3v-2m3 5a3 3 0 0 0 3-3v-2m-3 5v-5m3 0a3 3 0 1 0-6 0m6 0h-6m6.072 1H16m-9 0h1.5m6 2.5l1 .5m-7-.5l-1 .5m7-5.5l1-.5m-7 .5l-1-.5m11 10L22 22\"\n />\n </g>\n </svg>\n </SvgIcon>\n);\n","export var options = {\n verbose: true,\n commercialLicense: false,\n classNamePrefix: \"amcharts-\",\n autoSetClassName: false,\n minPolylineStep: 0.5,\n onlyShowOnViewport: false,\n queue: false\n};","import { goToNextSectionPath } from \"../app/operations\";\nimport { push } from \"connected-react-router\";\n\nconst submitSection = (sectionId, goToNext = true) => (\n dispatch,\n getState,\n { getFirebase, getFirestore }\n) => {\n const state = getState();\n const firestore = getFirestore();\n firestore\n .set(\n {\n collection: \"pre_acceptance_waste_audits\",\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: \"sections\", doc: sectionId }]\n },\n { state: { submitted: true } },\n { merge: true }\n )\n .then(() => {\n if (goToNext) {\n dispatch(goToNextSectionPath(sectionId));\n }\n dispatch({ type: \"UPDATE SUCCESS\" });\n })\n .catch(err => {\n dispatch({ type: \"UPDATE ERROR\" }, err);\n });\n};\n\nconst navigateFromSection = navigatedFromSectionId => (dispatch, getState) => {\n if (_.isPresent(navigatedFromSectionId)) {\n dispatch(\n updateSectionData(navigatedFromSectionId, { state: { viewed: true } })\n );\n }\n};\n\nconst updateSectionData = (sectionId, args) => (\n dispatch,\n getState,\n { getFirebase, getFirestore }\n) => {\n const state = getState();\n const firestore = getFirestore();\n\n firestore\n .set(\n {\n collection: \"pre_acceptance_waste_audits\",\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: \"sections\", doc: sectionId }]\n },\n args,\n { merge: true }\n )\n .then(() => {\n dispatch({ type: \"UPDATE SUCCESS\" });\n })\n .catch(err => {\n dispatch({ type: \"UPDATE ERROR\" }, err);\n });\n};\n\nconst uploadFile = (attributeName, sectionId, file) => (\n dispatch,\n getState,\n { getFirebase, getFirestore }\n) => {\n const state = getState();\n const firebase = getFirebase();\n\n const { auditDocumentId } = state.app;\n\n const collection = `pre_acceptance_waste_audits/${auditDocumentId}/sections`;\n const storagePath = `${collection}/${sectionId}/${attributeName}`;\n\n if (file) {\n firebase\n .uploadFile(storagePath, file, collection, {\n metadataFactory: (uploadRes, firebase, metadata, downloadURL) => {\n return {\n [attributeName]: {\n url: downloadURL,\n name: metadata.name,\n metadata: _.omitBy(metadata, _.isBlank)\n }\n };\n },\n documentId: sectionId,\n progress: true,\n storeProgressAt: `sections/${sectionId}/${attributeName}`\n })\n .then(snap => {\n console.log(\"upload successful\", snap);\n })\n .catch(err => {\n console.error(\"error uploading file\", err);\n });\n }\n};\n\nconst deleteFile = (attributeName, sectionId, file) => (\n dispatch,\n getState,\n { getFirebase, getFirestore }\n) => {\n const state = getState();\n const firebase = getFirebase();\n\n const { auditDocumentId } = state.app;\n\n const collection = `pre_acceptance_waste_audits/${auditDocumentId}/sections`;\n const storagePath = `${collection}/${sectionId}`;\n\n if (file) {\n dispatch(updateSectionData(sectionId, { [attributeName]: null }));\n\n firebase\n .deleteFile(file.metadata.fullPath)\n .then(snap => {\n console.log(\"delete successful\", snap);\n })\n .catch(err => {\n console.error(\"error deleting file\", err);\n });\n }\n};\n\nexport {\n updateSectionData,\n submitSection,\n uploadFile,\n deleteFile,\n navigateFromSection\n};\n","/**\r\n * A collection of easing functions\r\n *\r\n * Parts of this collection are taken from D3.js library (https://d3js.org/)\r\n */\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport * as $math from \"../utils/Math\";\n/**\r\n * The functions below are from D3.js library (https://d3js.org/)\r\n *\r\n * ----------------------------------------------------------------------------\r\n * Copyright 2017 Mike Bostock\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n *\r\n * 1. Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n *\r\n * 2. Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * 3. Neither the name of the copyright holder nor the names of its\r\n * contributors may be used to endorse or promote products derived from this\r\n * software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n * ----------------------------------------------------------------------------\r\n * @hidden\r\n */\n/**\r\n * ============================================================================\r\n * LINEAR FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Easing function: \"linear\".\r\n */\nexport function linear(t) {\n return +t;\n}\n/**\r\n * Easing function: \"quadIn\".\r\n */\nexport function quadIn(t) {\n return t * t;\n}\n/**\r\n * Easing function: \"quadOut\".\r\n */\nexport function quadOut(t) {\n return t * (2 - t);\n}\n/**\r\n * Easing function: \"quadInOut\".\r\n */\nexport function quadInOut(t) {\n t *= 2;\n return (t <= 1 ? t * t : --t * (2 - t) + 1) / 2;\n}\n/**\r\n * Easing function: \"polyIn\".\r\n */\nexport function polyIn(t, e) {\n return Math.pow(t, e);\n}\n/**\r\n * Easing function: \"polyOut\".\r\n */\nexport function polyOut(t, e) {\n return 1 - Math.pow(1 - t, e);\n}\n/**\r\n * Easing function: \"polyInOut\".\r\n */\nexport function polyInOut(t, e) {\n t *= 2;\n return (t <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;\n}\n/**\r\n * Easing function: \"polyIn3\".\r\n */\nexport function polyIn3(t) {\n return polyIn(t, 3);\n}\n/**\r\n * Easing function: \"polyOut3\".\r\n */\nexport function polyOut3(t) {\n return polyOut(t, 3);\n}\n/**\r\n * Easing function: \"polyInOut3\".\r\n */\nexport function polyInOut3(t) {\n return polyInOut(t, 3);\n}\n/**\r\n * ============================================================================\r\n * EXPONENTIAL FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Easing function: \"expIn\".\r\n */\nexport function expIn(t) {\n return Math.pow(2, 10 * t - 10);\n}\n/**\r\n * Easing function: \"expOut\".\r\n */\nexport function expOut(t) {\n return 1 - Math.pow(2, -10 * t);\n}\n/**\r\n * Easing function: \"expInOut\".\r\n */\nexport function expInOut(t) {\n t *= 2;\n return (t <= 1 ? Math.pow(2, 10 * t - 10) : 2 - Math.pow(2, 10 - 10 * t)) / 2;\n}\n/**\r\n * ============================================================================\r\n * SINE FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Easing function: \"sinIn\".\r\n */\nexport function sinIn(t) {\n return 1 - Math.cos(t * $math.HALFPI);\n}\n/**\r\n * Easing function: \"sinOut\".\r\n */\nexport function sinOut(t) {\n return Math.sin(t * $math.HALFPI);\n}\n/**\r\n * Easing function: \"sinInOut\".\r\n */\nexport function sinInOut(t) {\n return (1 - Math.cos($math.PI * t)) / 2;\n}\n/**\r\n * ============================================================================\r\n * CUBIC FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Easing function: \"cubicIn\".\r\n */\nexport function cubicIn(t) {\n return t * t * t;\n}\n/**\r\n * Easing function: \"cubicOut\".\r\n */\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\n/**\r\n * Easing function: \"cubicInOut\".\r\n */\nexport function cubicInOut(t) {\n t *= 2;\n return (t <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n/**\r\n * ============================================================================\r\n * CIRCLE FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Easing function: \"circleIn\".\r\n */\nexport function circleIn(t) {\n return 1 - Math.sqrt(1 - t * t);\n}\n/**\r\n * Easing function: \"circleOut\".\r\n */\nexport function circleOut(t) {\n return Math.sqrt(1 - --t * t);\n}\n/**\r\n * Easing function: \"circleInOut\".\r\n */\nexport function circleInOut(t) {\n t *= 2;\n return (t <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;\n}\n/**\r\n * ============================================================================\r\n * BOUNCE FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\nvar b1 = 4 / 11,\n b2 = 6 / 11,\n b3 = 8 / 11,\n b4 = 3 / 4,\n b5 = 9 / 11,\n b6 = 10 / 11,\n b7 = 15 / 16,\n b8 = 21 / 22,\n b9 = 63 / 64,\n b0 = 1 / b1 / b1;\n/**\r\n * Easing function: \"bounceIn\".\r\n */\nexport function bounceIn(t) {\n return 1 - bounceOut(1 - t);\n}\n/**\r\n * Easing function: \"bounceOut\".\r\n */\nexport function bounceOut(t) {\n t = +t;\n return t < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;\n}\n/**\r\n * Easing function: \"bounceInOut\".\r\n */\nexport function bounceInOut(t) {\n t *= 2;\n return (t <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;\n}\n/**\r\n * ============================================================================\r\n * ELASTIC FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\nvar tau = 2 * Math.PI;\nvar amplitude = 1;\nvar period = 0.3 / tau;\nvar s = Math.asin(1 / amplitude) * period;\n/**\r\n * Easing function: \"elasticIn\".\r\n *\r\n * @function elasticIn\r\n * @param a Amplitude\r\n * @param p period\r\n */\nexport function elasticIn(t) {\n return amplitude * Math.pow(2, 10 * --t) * Math.sin((s - t) / period);\n}\n/**\r\n * Easing function: \"elasticOut\".\r\n *\r\n * @function elasticOut\r\n * @param a Amplitude\r\n * @param p period\r\n */\nexport function elasticOut(t) {\n return 1 - amplitude * Math.pow(2, -10 * (t = +t)) * Math.sin((t + s) / period);\n}\n/**\r\n * Easing function: \"elasticInOut\".\r\n *\r\n * @function elasticInOut\r\n * @param a Amplitude\r\n * @param p period\r\n */\nexport function elasticInOut(t) {\n t = t * 2 - 1;\n return (t < 0 ? amplitude * Math.pow(2, 10 * t) * Math.sin((s - t) / period) : 2 - amplitude * Math.pow(2, -10 * t) * Math.sin((s + t) / period)) / 2;\n}","/**\r\n * A collection of color-related functions\r\n */\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport * as $math from \"./Math\";\nimport * as $type from \"./Type\";\n/**\r\n * Define named colors for easy resolution to RGB.\r\n */\nvar namedColors = {\n aliceblue: {\n r: 240,\n g: 248,\n b: 255\n },\n antiquewhite: {\n r: 250,\n g: 235,\n b: 215\n },\n aqua: {\n r: 0,\n g: 255,\n b: 255\n },\n aquamarine: {\n r: 127,\n g: 255,\n b: 212\n },\n azure: {\n r: 240,\n g: 255,\n b: 255\n },\n beige: {\n r: 245,\n g: 245,\n b: 220\n },\n bisque: {\n r: 255,\n g: 228,\n b: 196\n },\n black: {\n r: 0,\n g: 0,\n b: 0\n },\n blanchedalmond: {\n r: 255,\n g: 235,\n b: 205\n },\n blue: {\n r: 0,\n g: 0,\n b: 255\n },\n blueviolet: {\n r: 138,\n g: 43,\n b: 226\n },\n brown: {\n r: 165,\n g: 42,\n b: 42\n },\n burlywood: {\n r: 222,\n g: 184,\n b: 135\n },\n cadetblue: {\n r: 95,\n g: 158,\n b: 160\n },\n chartreuse: {\n r: 127,\n g: 255,\n b: 0\n },\n chocolate: {\n r: 210,\n g: 105,\n b: 30\n },\n coral: {\n r: 255,\n g: 127,\n b: 80\n },\n cornflowerblue: {\n r: 100,\n g: 149,\n b: 237\n },\n cornsilk: {\n r: 255,\n g: 248,\n b: 220\n },\n crimson: {\n r: 220,\n g: 20,\n b: 60\n },\n cyan: {\n r: 0,\n g: 255,\n b: 255\n },\n darkblue: {\n r: 0,\n g: 0,\n b: 139\n },\n darkcyan: {\n r: 0,\n g: 139,\n b: 139\n },\n darkgoldenrod: {\n r: 184,\n g: 134,\n b: 11\n },\n darkgray: {\n r: 169,\n g: 169,\n b: 169\n },\n darkgrey: {\n r: 169,\n g: 169,\n b: 169\n },\n darkgreen: {\n r: 0,\n g: 100,\n b: 0\n },\n darkkhaki: {\n r: 189,\n g: 183,\n b: 107\n },\n darkmagenta: {\n r: 139,\n g: 0,\n b: 139\n },\n darkolivegreen: {\n r: 85,\n g: 107,\n b: 47\n },\n darkorange: {\n r: 255,\n g: 140,\n b: 0\n },\n darkorchid: {\n r: 153,\n g: 50,\n b: 204\n },\n darkred: {\n r: 139,\n g: 0,\n b: 0\n },\n darksalmon: {\n r: 233,\n g: 150,\n b: 122\n },\n darkseagreen: {\n r: 143,\n g: 188,\n b: 143\n },\n darkslateblue: {\n r: 72,\n g: 61,\n b: 139\n },\n darkslategray: {\n r: 47,\n g: 79,\n b: 79\n },\n darkslategrey: {\n r: 47,\n g: 79,\n b: 79\n },\n darkturquoise: {\n r: 0,\n g: 206,\n b: 209\n },\n darkviolet: {\n r: 148,\n g: 0,\n b: 211\n },\n deeppink: {\n r: 255,\n g: 20,\n b: 147\n },\n deepskyblue: {\n r: 0,\n g: 191,\n b: 255\n },\n dimgray: {\n r: 105,\n g: 105,\n b: 105\n },\n dimgrey: {\n r: 105,\n g: 105,\n b: 105\n },\n dodgerblue: {\n r: 30,\n g: 144,\n b: 255\n },\n firebrick: {\n r: 178,\n g: 34,\n b: 34\n },\n floralwhite: {\n r: 255,\n g: 250,\n b: 240\n },\n forestgreen: {\n r: 34,\n g: 139,\n b: 34\n },\n fuchsia: {\n r: 255,\n g: 0,\n b: 255\n },\n gainsboro: {\n r: 220,\n g: 220,\n b: 220\n },\n ghostwhite: {\n r: 248,\n g: 248,\n b: 255\n },\n gold: {\n r: 255,\n g: 215,\n b: 0\n },\n goldenrod: {\n r: 218,\n g: 165,\n b: 32\n },\n gray: {\n r: 128,\n g: 128,\n b: 128\n },\n grey: {\n r: 128,\n g: 128,\n b: 128\n },\n green: {\n r: 0,\n g: 128,\n b: 0\n },\n greenyellow: {\n r: 173,\n g: 255,\n b: 47\n },\n honeydew: {\n r: 240,\n g: 255,\n b: 240\n },\n hotpink: {\n r: 255,\n g: 105,\n b: 180\n },\n indianred: {\n r: 205,\n g: 92,\n b: 92\n },\n indigo: {\n r: 75,\n g: 0,\n b: 130\n },\n ivory: {\n r: 255,\n g: 255,\n b: 240\n },\n khaki: {\n r: 240,\n g: 230,\n b: 140\n },\n lavender: {\n r: 230,\n g: 230,\n b: 250\n },\n lavenderblush: {\n r: 255,\n g: 240,\n b: 245\n },\n lawngreen: {\n r: 124,\n g: 252,\n b: 0\n },\n lemonchiffon: {\n r: 255,\n g: 250,\n b: 205\n },\n lightblue: {\n r: 173,\n g: 216,\n b: 230\n },\n lightcoral: {\n r: 240,\n g: 128,\n b: 128\n },\n lightcyan: {\n r: 224,\n g: 255,\n b: 255\n },\n lightgoldenrodyellow: {\n r: 250,\n g: 250,\n b: 210\n },\n lightgray: {\n r: 211,\n g: 211,\n b: 211\n },\n lightgrey: {\n r: 211,\n g: 211,\n b: 211\n },\n lightgreen: {\n r: 144,\n g: 238,\n b: 144\n },\n lightpink: {\n r: 255,\n g: 182,\n b: 193\n },\n lightsalmon: {\n r: 255,\n g: 160,\n b: 122\n },\n lightseagreen: {\n r: 32,\n g: 178,\n b: 170\n },\n lightskyblue: {\n r: 135,\n g: 206,\n b: 250\n },\n lightslategray: {\n r: 119,\n g: 136,\n b: 153\n },\n lightslategrey: {\n r: 119,\n g: 136,\n b: 153\n },\n lightsteelblue: {\n r: 176,\n g: 196,\n b: 222\n },\n lightyellow: {\n r: 255,\n g: 255,\n b: 224\n },\n lime: {\n r: 0,\n g: 255,\n b: 0\n },\n limegreen: {\n r: 50,\n g: 205,\n b: 50\n },\n linen: {\n r: 250,\n g: 240,\n b: 230\n },\n magenta: {\n r: 255,\n g: 0,\n b: 255\n },\n maroon: {\n r: 128,\n g: 0,\n b: 0\n },\n mediumaquamarine: {\n r: 102,\n g: 205,\n b: 170\n },\n mediumblue: {\n r: 0,\n g: 0,\n b: 205\n },\n mediumorchid: {\n r: 186,\n g: 85,\n b: 211\n },\n mediumpurple: {\n r: 147,\n g: 112,\n b: 219\n },\n mediumseagreen: {\n r: 60,\n g: 179,\n b: 113\n },\n mediumslateblue: {\n r: 123,\n g: 104,\n b: 238\n },\n mediumspringgreen: {\n r: 0,\n g: 250,\n b: 154\n },\n mediumturquoise: {\n r: 72,\n g: 209,\n b: 204\n },\n mediumvioletred: {\n r: 199,\n g: 21,\n b: 133\n },\n midnightblue: {\n r: 25,\n g: 25,\n b: 112\n },\n mintcream: {\n r: 245,\n g: 255,\n b: 250\n },\n mistyrose: {\n r: 255,\n g: 228,\n b: 225\n },\n moccasin: {\n r: 255,\n g: 228,\n b: 181\n },\n navajowhite: {\n r: 255,\n g: 222,\n b: 173\n },\n navy: {\n r: 0,\n g: 0,\n b: 128\n },\n oldlace: {\n r: 253,\n g: 245,\n b: 230\n },\n olive: {\n r: 128,\n g: 128,\n b: 0\n },\n olivedrab: {\n r: 107,\n g: 142,\n b: 35\n },\n orange: {\n r: 255,\n g: 165,\n b: 0\n },\n orangered: {\n r: 255,\n g: 69,\n b: 0\n },\n orchid: {\n r: 218,\n g: 112,\n b: 214\n },\n palegoldenrod: {\n r: 238,\n g: 232,\n b: 170\n },\n palegreen: {\n r: 152,\n g: 251,\n b: 152\n },\n paleturquoise: {\n r: 175,\n g: 238,\n b: 238\n },\n palevioletred: {\n r: 219,\n g: 112,\n b: 147\n },\n papayawhip: {\n r: 255,\n g: 239,\n b: 213\n },\n peachpuff: {\n r: 255,\n g: 218,\n b: 185\n },\n peru: {\n r: 205,\n g: 133,\n b: 63\n },\n pink: {\n r: 255,\n g: 192,\n b: 203\n },\n plum: {\n r: 221,\n g: 160,\n b: 221\n },\n powderblue: {\n r: 176,\n g: 224,\n b: 230\n },\n purple: {\n r: 128,\n g: 0,\n b: 128\n },\n rebeccapurple: {\n r: 102,\n g: 51,\n b: 153\n },\n red: {\n r: 255,\n g: 0,\n b: 0\n },\n rosybrown: {\n r: 188,\n g: 143,\n b: 143\n },\n royalblue: {\n r: 65,\n g: 105,\n b: 225\n },\n saddlebrown: {\n r: 139,\n g: 69,\n b: 19\n },\n salmon: {\n r: 250,\n g: 128,\n b: 114\n },\n sandybrown: {\n r: 244,\n g: 164,\n b: 96\n },\n seagreen: {\n r: 46,\n g: 139,\n b: 87\n },\n seashell: {\n r: 255,\n g: 245,\n b: 238\n },\n sienna: {\n r: 160,\n g: 82,\n b: 45\n },\n silver: {\n r: 192,\n g: 192,\n b: 192\n },\n skyblue: {\n r: 135,\n g: 206,\n b: 235\n },\n slateblue: {\n r: 106,\n g: 90,\n b: 205\n },\n slategray: {\n r: 112,\n g: 128,\n b: 144\n },\n slategrey: {\n r: 112,\n g: 128,\n b: 144\n },\n snow: {\n r: 255,\n g: 250,\n b: 250\n },\n springgreen: {\n r: 0,\n g: 255,\n b: 127\n },\n steelblue: {\n r: 70,\n g: 130,\n b: 180\n },\n tan: {\n r: 210,\n g: 180,\n b: 140\n },\n teal: {\n r: 0,\n g: 128,\n b: 128\n },\n thistle: {\n r: 216,\n g: 191,\n b: 216\n },\n tomato: {\n r: 255,\n g: 99,\n b: 71\n },\n turquoise: {\n r: 64,\n g: 224,\n b: 208\n },\n violet: {\n r: 238,\n g: 130,\n b: 238\n },\n wheat: {\n r: 245,\n g: 222,\n b: 179\n },\n white: {\n r: 255,\n g: 255,\n b: 255\n },\n whitesmoke: {\n r: 245,\n g: 245,\n b: 245\n },\n yellow: {\n r: 255,\n g: 255,\n b: 0\n },\n yellowgreen: {\n r: 154,\n g: 205,\n b: 50\n }\n};\n/**\r\n * Tries to resolve a named color into a hex color representation.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Color name\r\n * @return Color\r\n * @deprecated\r\n * @hidden\r\n */\n/*export function resolveNamedColor(value: string): Color {\r\n return (<any>namedColors)[value] ? (<any>namedColors)[value] : undefined;\r\n}*/\n/**\r\n * Converts a proper color hex code (i.e. \"#FF5500\") or named color (i.e. \"red\")\r\n * into an {iRGB} object. If the code is not correctly formatted, an RGB of\r\n * black is returned.\r\n *\r\n * @ignore Exclude from docs\r\n * @param color Color code\r\n * @param alpha Alpha (0-1)\r\n * @return RGB\r\n */\nexport function rgb(color, alpha) {\n // Init return value\n var rgb;\n // Try resolving color format\n // Named color?\n if (namedColors[color]) {\n rgb = namedColors[color];\n }\n // Hex code?\n else if (color.charAt(0) === \"#\") {\n rgb = hexToRgb(color);\n }\n // rgb() format?\n else if (color.match(/^rgba?\\(/)) {\n rgb = rgbaToRgb(color);\n }\n // Was not able to resolve?\n if (!rgb) {\n rgb = {\n r: 0,\n g: 0,\n b: 0,\n a: 1\n };\n }\n // Set alpha\n if ($type.hasValue(alpha)) {\n rgb.a = alpha;\n }\n return rgb;\n}\n/**\r\n * Converts a hex color code (i.e. \"#FF5500\") to an [[iRGB]] object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param hex Hex color code\r\n * @return RGB\r\n */\nexport function hexToRgb(hex) {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n var shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n hex = hex.replace(shorthandRegex, function (m, r, g, b) {\n return r + r + g + g + b + b;\n });\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16)\n } : undefined;\n}\n/**\r\n * Converts color strings in format like `rgb()` and `rgba()` to [[iRGB]].\r\n *\r\n * @ignore Exclude from docs\r\n * @param color Color code\r\n * @return RGB\r\n */\nexport function rgbaToRgb(color) {\n color = color.replace(/[ ]/g, \"\");\n // Init\n var matches = color.match(/^rgb\\(([0-9]*),([0-9]*),([0-9]*)\\)/i);\n // Try rgb() format\n if (matches) {\n matches.push(\"1\");\n } else {\n matches = color.match(/^rgba\\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\\)/i);\n if (!matches) {\n return;\n }\n }\n return {\n r: parseInt(matches[1]),\n g: parseInt(matches[2]),\n b: parseInt(matches[3]),\n a: parseFloat(matches[4])\n };\n}\n/**\r\n * Converts an [[iRGB]] object into a hex color code.\r\n *\r\n * @ignore Exclude from docs\r\n * @param rgb RGB\r\n * @return Hex color code\r\n */\nexport function rgbToHex(rgb) {\n return \"#\" + pad2(rgb.r.toString(16)) + pad2(rgb.g.toString(16)) + pad2(rgb.b.toString(16));\n}\n/**\r\n * Converts an [[iRGB]] object into its `rgb()` or `rgba()` representation.\r\n *\r\n * @ignore Exclude from docs\r\n * @param rgb RGB\r\n * @return `rgba()` syntax\r\n */\nexport function rgbToRGBA(rgb) {\n if ($type.hasValue(rgb.a) && rgb.a !== 1) {\n return \"rgba(\" + rgb.r + \",\" + rgb.g + \",\" + rgb.b + \",\" + rgb.a + \")\";\n } else {\n return \"rgb(\" + rgb.r + \",\" + rgb.g + \",\" + rgb.b + \")\";\n }\n}\n/**\r\n * Pads a 1-digit string with a zero.\r\n *\r\n * @ignore Exclude from docs\r\n * @param c Input string\r\n * @return Padded string\r\n */\nexport function pad2(c) {\n return c.length == 1 ? \"0\" + c : \"\" + c;\n}\n/**\r\n * Returns an intermediate color between two colors based on the relative\r\n * position. Position needs to be in range between 0 and 1. Zero meaning the\r\n * resulting color will be closest to the first reference color.\r\n *\r\n * @ignore Exclude from docs\r\n * @param color1 First reference color\r\n * @param color2 Second reference color\r\n * @param percent Relative position (0-1)\r\n * @return Interpolated color\r\n */\nexport function interpolate(rgb1, rgb2, percent) {\n percent = $math.fitToRange(percent, 0, 1);\n if (rgb1) {\n if (rgb2) {\n return {\n r: rgb1.r + Math.round((rgb2.r - rgb1.r) * percent),\n g: rgb1.g + Math.round((rgb2.g - rgb1.g) * percent),\n b: rgb1.b + Math.round((rgb2.b - rgb1.b) * percent),\n a: (rgb1.a || 1) + Math.round(((rgb2.a || 1) - (rgb1.a || 1)) * percent)\n };\n } else {\n return rgb1;\n }\n } else if (rgb2) {\n return rgb2;\n } else {\n return rgb1;\n }\n}\n/**\r\n * Returns a color that is `percent` brighter than the reference color.\r\n *\r\n * @ignore Exclude from docs\r\n * @param color Reference color\r\n * @param percent Brightness percent\r\n * @return Hex code of the new color\r\n */\nexport function lighten(rgb, percent) {\n if (rgb) {\n return {\n r: Math.max(0, Math.min(255, rgb.r + getLightnessStep(rgb.r, percent))),\n g: Math.max(0, Math.min(255, rgb.g + getLightnessStep(rgb.g, percent))),\n b: Math.max(0, Math.min(255, rgb.b + getLightnessStep(rgb.b, percent))),\n a: rgb.a\n };\n } else {\n // TODO is this correct ?\n return rgb;\n }\n}\n;\n/**\r\n * Gets lightness step.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Value\r\n * @param percent Percent\r\n * @return Step\r\n */\nexport function getLightnessStep(value, percent) {\n var base = percent > 0 ? 255 - value : value;\n return Math.round(base * percent);\n}\n/**\r\n * Returns a color that is `percent` brighter than the source `color`.\r\n *\r\n * @ignore Exclude from docs\r\n * @param color Source color\r\n * @param percent Brightness percent\r\n * @return New color\r\n */\nexport function brighten(rgb, percent) {\n if (rgb) {\n var base = Math.min(Math.max(rgb.r, rgb.g, rgb.b), 230);\n //let base = Math.max(rgb.r, rgb.g, rgb.b);\n var step = getLightnessStep(base, percent);\n return {\n r: Math.max(0, Math.min(255, Math.round(rgb.r + step))),\n g: Math.max(0, Math.min(255, Math.round(rgb.g + step))),\n b: Math.max(0, Math.min(255, Math.round(rgb.b + step))),\n a: rgb.a\n };\n } else {\n // TODO is this correct ?\n return rgb;\n }\n}\n;\n/**\r\n * Returns brightness step.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Value\r\n * @param percent Percent\r\n * @return Step\r\n */\nexport function getBrightnessStep(value, percent) {\n var base = 255; //percent > 0 ? 255 - value : value;\n return Math.round(base * percent);\n}\n/**\r\n * Returns a new [[iRGB]] object based on `rgb` parameter with specific\r\n * saturation applied.\r\n *\r\n * `saturation` can be in the range of 0 (fully desaturated) to 1 (fully\r\n * saturated).\r\n *\r\n * @ignore Exclude from docs\r\n * @param color Base color\r\n * @param saturation Saturation (0-1)\r\n * @return New color\r\n */\nexport function saturate(rgb, saturation) {\n if (rgb == null || saturation == 1) {\n return rgb;\n }\n var hsl = rgbToHsl(rgb);\n hsl.s = saturation;\n return hslToRgb(hsl);\n}\n/*\r\n// not used\r\nexport function rgbToMatrix(rgb: iRGB): string {\r\n let r = $type.toText($math.round((rgb.r || 0) / 255, 10));\r\n let g = $type.toText($math.round((rgb.g || 0) / 255, 10));\r\n let b = $type.toText($math.round((rgb.b || 0) / 255, 10));\r\n let a = $type.toText(rgb.a || 1);\r\n return\t r + \" 0 0 0 0\" +\r\n \" 0 \" + g + \" 0 0 0\" +\r\n \" 0 0 \" + b + \" 0 0\" +\r\n \" 0 0 0 \" + a + \" 0\";\r\n}\r\n*/\n/**\r\n * The functions below are taken and adapted from Garry Tan's blog post:\r\n * http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c\r\n *\r\n * The further attributions go mjijackson.com, which now seems to be defunct.\r\n */\n/**\r\n * Converts an HSL color value to RGB. Conversion formula\r\n * adapted from http://en.wikipedia.org/wiki/HSL_color_space.\r\n * Assumes h, s, and l are contained in the set [0, 1] and\r\n * returns r, g, and b in the set [0, 255].\r\n *\r\n * Function adapted from:\r\n * http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c\r\n *\r\n * @ignore Exclude from docs\r\n * @param h The hue\r\n * @param s The saturation\r\n * @param l The lightness\r\n * @return The RGB representation\r\n */\nexport function hslToRgb(color) {\n var r, g, b;\n var h = color.h;\n var s = color.s;\n var l = color.l;\n if (s == 0) {\n r = g = b = l; // achromatic\n } else {\n var hue2rgb = function hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n };\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n return {\n r: Math.round(r * 255),\n g: Math.round(g * 255),\n b: Math.round(b * 255)\n };\n}\n/**\r\n * Converts an RGB color value to HSL. Conversion formula\r\n * adapted from http://en.wikipedia.org/wiki/HSL_color_space.\r\n * Assumes r, g, and b are contained in the set [0, 255] and\r\n * returns h, s, and l in the set [0, 1].\r\n *\r\n * Function adapted from:\r\n * http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c\r\n *\r\n * @ignore Exclude from docs\r\n * @param r The red color value\r\n * @param g The green color value\r\n * @param b The blue color value\r\n * @return The HSL representation\r\n */\nexport function rgbToHsl(color) {\n var r = color.r / 255;\n var g = color.g / 255;\n var b = color.b / 255;\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var s = 0;\n var l = (max + min) / 2;\n if (max === min) {\n h = s = 0; // achromatic\n } else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n return {\n h: h,\n s: s,\n l: l\n };\n}\n/**\r\n * Converts an RGB color value to HSV. Conversion formula\r\n * adapted from http://en.wikipedia.org/wiki/HSV_color_space.\r\n * Assumes r, g, and b are contained in the set [0, 255] and\r\n * returns h, s, and v in the set [0, 1].\r\n *\r\n * @ignore Exclude from docs\r\n * @param Number r The red color value\r\n * @param Number g The green color value\r\n * @param Number b The blue color value\r\n * @return Array The HSV representation\r\n */\nexport function rgbToHsv(color) {\n var r = color.r / 255;\n var g = color.g / 255;\n var b = color.b / 255;\n var max = Math.max(r, g, b),\n min = Math.min(r, g, b);\n var h = 0;\n var s = 0;\n var v = max;\n var d = max - min;\n s = max == 0 ? 0 : d / max;\n if (max == min) {\n h = 0; // achromatic\n } else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n return {\n h: h,\n s: s,\n v: v\n };\n}\n/**\r\n * Converts an HSV color value to RGB. Conversion formula\r\n * adapted from http://en.wikipedia.org/wiki/HSV_color_space.\r\n * Assumes h, s, and v are contained in the set [0, 1] and\r\n * returns r, g, and b in the set [0, 255].\r\n *\r\n * @ignore Exclude from docs\r\n * @param Number h The hue\r\n * @param Number s The saturation\r\n * @param Number v The value\r\n * @return Array The RGB representation\r\n */\nexport function hsvToRgb(color) {\n var r = 0;\n var g = 0;\n var b = 0;\n var h = color.h;\n var s = color.s;\n var v = color.v;\n var i = Math.floor(h * 6);\n var f = h * 6 - i;\n var p = v * (1 - s);\n var q = v * (1 - f * s);\n var t = v * (1 - (1 - f) * s);\n switch (i % 6) {\n case 0:\n r = v;\n g = t;\n b = p;\n break;\n case 1:\n r = q;\n g = v;\n b = p;\n break;\n case 2:\n r = p;\n g = v;\n b = t;\n break;\n case 3:\n r = p;\n g = q;\n b = v;\n break;\n case 4:\n r = t;\n g = p;\n b = v;\n break;\n case 5:\n r = v;\n g = p;\n b = q;\n break;\n }\n return {\n r: Math.round(r * 255),\n g: Math.round(g * 255),\n b: Math.round(b * 255)\n };\n}\n/**\r\n * Returns `true` if color is \"light\". Useful indetermining which contrasting\r\n * color to use for elements over this color. E.g.: you would want to use\r\n * black text over light background, and vice versa.\r\n *\r\n * @ignore Exclude from docs\r\n * @param color Source color\r\n * @return Light?\r\n */\nexport function isLight(color) {\n return (color.r * 299 + color.g * 587 + color.b * 114) / 1000 >= 128;\n}","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nconst Loader = ({message}) => {\n return (\n <div className=\"loader\" style={{ textAlign: 'center' }}>\n <svg version=\"1.1\"\n x=\"0px\"\n y=\"0px\"\n width=\"80px\"\n viewBox=\"0 0 100 100\"\n enableBackground=\"new 0 0 0 0\">\n <circle fill=\"none\" stroke=\"#fff\" strokeWidth=\"4\" cx=\"50\" cy=\"50\" r=\"44\" style={{ opacity: 0.1 }} />\n <circle fill=\"silver\" stroke=\"#F6BB42\" strokeWidth=\"3\" cx=\"8\" cy=\"54\" r=\"6\" >\n <animateTransform\n attributeName=\"transform\"\n dur=\"1.3s\"\n type=\"rotate\"\n from=\"0 50 48\"\n to=\"360 50 52\"\n repeatCount=\"indefinite\" />\n </circle>\n </svg>\n {message &&\n <p>\n {message}\n </p>\n }\n </div>\n )\n}\n\nLoader.propTypes = {\n message: PropTypes.string\n};\n\nexport default Loader;\n","export default () =>\n{\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n var r = Math.random()*16|0, v = c === 'x' ? r : (r&0x3|0x8);\n return v.toString(16);\n });\n}\n","import CheckIcon from \"@mui/icons-material/Check\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport UnknownIcon from \"@mui/icons-material/Remove\";\nimport BinDot from \"service/BinDot\";\nimport {\n Box, IconButton, MenuItem, Select, Table, TableBody, TableCell, TableContainer, TableRow, Typography,\n} from \"@mui/material\";\nimport { useEffect, useState } from \"react\";\nimport { StatusChip } from \"./SttatusChip\";\n\nconst BinReportTable = ({\n inUseBinGroups,\n onSetForm,\n failureReasonSlug,\n failureReasons,\n mode,\n isClient = false,\n initialStatus,\n initialBinGroupStatus,\n}: {\n inUseBinGroups: any[];\n onSetForm: any;\n failureReasonSlug?: string;\n failureReasons?: any[];\n mode: \"collection\" | \"delivery\";\n isClient?: boolean;\n initialStatus?: string;\n initialBinGroupStatus?: Record<string, boolean | null>;\n}) => {\n const [status, setStatus] = useState(initialStatus || \"total_failure\");\n const [checkedStates, setCheckedStates] = useState(() => {\n if (mode === \"collection\") {\n if (initialBinGroupStatus) {\n return initialBinGroupStatus;\n }\n return Object.fromEntries(inUseBinGroups.map((bg) => [bg.id, false]));\n }\n return {};\n });\n\n const handleStatusChange = (newStatus) => {\n setStatus(newStatus);\n\n if (mode === \"collection\") {\n let newCheckedStates;\n if (newStatus === \"total_failure\") {\n newCheckedStates = Object.fromEntries(\n inUseBinGroups.map((bg) => [bg.id, false])\n );\n } else if (newStatus === \"success\") {\n newCheckedStates = Object.fromEntries(\n inUseBinGroups.map((bg) => [bg.id, true])\n );\n } else {\n newCheckedStates = Object.fromEntries(\n inUseBinGroups.map((bg) => [bg.id, null])\n );\n }\n setCheckedStates(newCheckedStates);\n // Ready for binGroupDeliveryStatus\n // onSetForm({ [`binGroup${startCase(mode)}Status`]: newCheckedStates });\n onSetForm({ binGroupCollectionStatus: newCheckedStates });\n }\n\n onSetForm({ [`${mode}ResultSlug`]: newStatus });\n };\n\n const handleCheckboxChange = (binGroupId) => {\n if (mode === \"delivery\") return;\n setCheckedStates((prev) => {\n const currentState = prev[binGroupId];\n let newState;\n\n if (currentState === null) {\n newState = true;\n } else if (currentState === true) {\n newState = false;\n } else {\n newState = null;\n }\n\n const updatedState = {\n ...prev,\n [binGroupId]: newState,\n };\n\n onSetForm({ binGroupCollectionStatus: updatedState });\n return updatedState;\n });\n\n setStatus(\"partial_failure\");\n };\n\n const updateStatus = (states) => {\n const values = Object.values(states);\n const allTrue = values.every((val) => val === true);\n const allFalse = values.every((val) => val === false);\n\n if (allTrue) {\n setStatus(\"success\");\n } else if (allFalse) {\n setStatus(\"total_failure\");\n } else {\n setStatus(\"partial_failure\");\n }\n onSetForm({\n [`${mode}ResultSlug`]: status,\n });\n };\n\n useEffect(() => {\n if (mode === \"delivery\") return;\n updateStatus(checkedStates);\n }, [checkedStates]);\n\n return (\n <Box >\n <StatusChips\n status={status}\n handleStatusChange={handleStatusChange}\n failureReasonSlug={failureReasonSlug}\n failureReasons={failureReasons}\n onSetForm={onSetForm}\n mode={mode}\n isClient={isClient}\n />\n {mode === \"collection\" && (\n <TableContainer>\n <Table\n size=\"small\"\n sx={{\n width: \"100%\",\n \"& .MuiTableCell-root\": {\n padding: 0,\n px: 1,\n fontSize: \"11px\",\n },\n }}\n >\n <TableBody sx={{ borderTop: \"1px solid #F1F1F5\",}}>\n {inUseBinGroups.map((bg) => (\n <CollectedRow\n key={bg.id}\n binGroup={bg}\n isChecked={checkedStates[bg.id]}\n onCheckboxChange={() => handleCheckboxChange(bg.id)}\n />\n ))}\n </TableBody>\n </Table>\n </TableContainer>\n )}\n </Box>\n );\n};\n\nexport default BinReportTable;\n\nconst StatusChips = ({\n status,\n handleStatusChange,\n failureReasonSlug,\n failureReasons,\n onSetForm,\n mode,\n isClient,\n}) => {\n return (\n\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: 1, mb: 1 }}>\n <Typography >\n What was {mode === \"collection\" ? \"collected\" : \"delivered\"}?\n </Typography>\n <StatusChip\n label=\"Nothing\"\n status=\"total_failure\"\n currentStatus={status}\n onClick={() => handleStatusChange(\"total_failure\")}\n />\n <StatusChip\n label=\"Partial\"\n status=\"partial_failure\"\n currentStatus={status}\n onClick={() => handleStatusChange(\"partial_failure\")}\n />\n <StatusChip\n label=\"All\"\n status=\"success\"\n currentStatus={status}\n onClick={() => handleStatusChange(\"success\")}\n />\n {!isClient && (\n <Select\n size=\"small\"\n displayEmpty\n value={failureReasonSlug}\n onChange={(event) => {\n onSetForm({\n [`${mode}FailureReasonSlug`]: event.target.value,\n });\n }}\n >\n <MenuItem value={null} disabled>\n Reason for failure\n </MenuItem>\n {failureReasons.map((reason) => (\n <MenuItem\n key={reason.slug}\n value={reason.slug}\n sx={{ fontSize: \"12px\" }}\n >\n {reason.name}\n </MenuItem>\n ))}\n </Select>\n )}\n </Box>\n );\n};\n\nconst CollectedRow = ({ binGroup, isChecked, onCheckboxChange }) => {\n\n const getIconColor = () => {\n if (isChecked === true) return \"success.main\";\n if (isChecked === false) return \"error.main\";\n return \"action.disabled\";\n };\n\n const getIcon = () => {\n\n const iconSx = { color: getIconColor(), fontSize: '18px', }\n\n if (isChecked === true) return (\n <CheckIcon sx={{...iconSx}}/>\n );\n if (isChecked === false) return (\n <CloseIcon sx={{...iconSx}}/>\n );\n return (\n <UnknownIcon sx={{...iconSx}}/>\n );\n };\n\n\n\n return (\n <TableRow onClick={onCheckboxChange}\n sx={{\n cursor: 'pointer',\n borderLeft: \"1px solid #F1F1F5\",\n borderRight: \"1px solid #F1F1F5\",\n }}\n >\n <TableCell\n align=\"center\"\n sx={{\n minHeight: '20px',\n display: 'flex',\n alignItems: 'center',\n borderBottom: \"1px solid #F1F1F5\",\n borderRight: \"1px solid #F1F1F5\",\n }}\n >\n {getIcon()}\n </TableCell>\n <TableCell\n sx={{\n borderBottom: \"1px solid #F1F1F5\",\n borderRight: \"1px solid #F1F1F5\",\n }}\n >\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: 1 }}>\n <BinDot binGroup={binGroup} tooltipName={true} tooltipPlace=\"top\" />\n <Typography noWrap>{binGroup.name}</Typography>\n </Box>\n </TableCell>\n\n <TableCell sx={{ borderBottom: \"1px solid #F1F1F5\" }}>\n <Typography noWrap>{binGroup?.binTypes?.join(\", \")}</Typography>\n </TableCell>\n </TableRow>\n );\n};\n","export enum Channel {\n Organisation = \"organisation\",\n Agent = \"agent\",\n Vendor = \"vendor\",\n}\n\nexport interface BinGroup {\n id: number;\n name: string;\n legendFillColor: string;\n legendBorderColor: string;\n}\n\nexport interface BinType {\n id: number;\n name: string;\n groupName: string;\n binGroupId: number;\n}\n\nexport interface CollectionUnit {\n quantity: string | number;\n serviceCode: string;\n visitActionId: string;\n}\n\nexport interface DeliveryUnit {\n serviceCode: string;\n quantity: string | number;\n}\n\nexport interface Specification {\n serviceCode: string;\n quantity: string | number;\n visitActionId: string;\n}\n\ninterface ClientFeedback {\n reportedAt: string;\n deliveryResultSlug: \"total_failure\" | \"partial_failure\" | \"success\";\n collectionResultSlug: \"total_failure\" | \"partial_failure\" | \"success\";\n collectedBinGroupIds: number[];\n uncollectedBinGroupIds: number[];\n type: \"client\" | \"vendor\";\n}\n\ninterface VendorFeedback extends ClientFeedback {\n collectionFailureReasonSlug: string;\n deliveryFailureReasonSlug: string;\n}\n\nexport interface FailedVisitReport {\n id: string;\n linkedTicketIds: number[];\n reportedAt: string;\n vendorId: number;\n serviceUuid: string;\n locationUuid: string;\n date: string;\n collectionResultSlug: string;\n deliveryResultSlug: string;\n reportedByStakeholderId: number;\n clientFeedback: ClientFeedback[];\n feedback: VendorFeedback[];\n visitReport: {\n driverTurnUp: boolean;\n deliveryResultSlug: string;\n collectionResultSlug: string;\n collectedBinGroupIds: [];\n deliveredBinGroupIds: [];\n uncollectedBinGroupIds: [];\n undeliveredBinGroupIds: [];\n };\n reportNotes: any[] | null;\n serviceId: number;\n notes: Note[];\n}\n\ninterface AdhocVisitRequestAction {\n value: string;\n label: string;\n path: string;\n}\n\ninterface Note {\n userId: number;\n userName: string;\n text: string;\n timestamp: string;\n}\n\nexport interface AdhocVisitRequest {\n id: string;\n type: string;\n clearAll: boolean;\n date: string | null;\n cancelledAt: string | null;\n requestedAt: string;\n linkedTicketIds: number[];\n isActive: boolean;\n isCancelled: boolean;\n isConfirmed: boolean;\n collectionUnits: Record<string, any>;\n deliveryUnits: Record<string, any>;\n actions: AdhocVisitRequestAction[];\n requestDeliveryCodes: string[];\n notes: Note[];\n}\n\nexport type AdhocVisitRequests = AdhocVisitRequest[];\n\nexport interface StockDeliveryRequest {\n id: string;\n type: string;\n date: string;\n confirmedAt: string | null;\n cancelledAt: string | null;\n requestedAt: string;\n linkedTicketIds: number[];\n isCancelled: boolean;\n isConfirmed: boolean;\n isActive: boolean;\n deliveryUnits: Record<string, DeliveryUnit>;\n requestDeliveryCodes: string[];\n notes: Note[];\n actions: AdhocVisitRequestAction[];\n}\n\nexport type StockDeliveryRequests = StockDeliveryRequest[];\n\nexport interface SpecChangeRequest {\n id: string;\n requestedAt: string;\n linkedTicketIds: number[];\n type: string;\n specifications: Record<string, Specification>;\n notes: Note[];\n}\n\nexport type SpecChangeRequests = SpecChangeRequest[];\n\nexport interface VisitFrequencyChangeRequest {\n id: string;\n requestedAt: string;\n linkedTicketIds: number[];\n type: string;\n requestedVisitPlanName: string;\n intervals: number[];\n notes: Note[];\n}\n\nexport type VisitFrequencyChangeRequests = VisitFrequencyChangeRequest[];\n\nexport interface ServiceSuspensionRequest {\n id: string;\n requestedAt: string;\n linkedTicketIds: number[];\n type: string;\n reasonName: string;\n withImmediateEffect: boolean;\n noVisitsExpectedAfter: string;\n notes: Note[];\n}\n\nexport type ServiceSuspensionRequests = ServiceSuspensionRequest[];\n\nexport interface ServiceTerminationRequest {\n id: string;\n requestedAt: string;\n linkedTicketIds: number[];\n type: string;\n finalCollectionRequired: boolean;\n finalCollectionRequiredBefore: string;\n notes: Note[];\n}\n\nexport type ServiceTerminationRequests = ServiceTerminationRequest[];\n\nexport interface ServiceResumptionRequest {\n id: string;\n requestedAt: string;\n linkedTicketIds: number[];\n type: string;\n noVisitsExpectedAfter: string;\n notes: Note[];\n}\n\nexport type ServiceResumptionRequests = ServiceResumptionRequest[];\n\nexport interface ReattemptVisitRequest {\n id: string;\n confirmedAt: string | null;\n type: string;\n requestedAt: string;\n linkedTicketIds: number[];\n reattemptDate: string | null;\n isActive: boolean;\n notes: Note[];\n actions: AdhocVisitRequestAction[];\n}\n\nexport type ReattemptVisitRequests = ReattemptVisitRequest[];\n","import { Button, ButtonProps, darken, styled } from \"@mui/material\";\n\nexport const STATUS_COLORS = {\n failure: \"#EA3223\",\n info: \"#3BAFDA\",\n success: \"#7BB841\",\n assumed: \"#8f3fcd\",\n unknown: \"#2B78E4\",\n disabled: \"#8B93AB\",\n visit: \"#2B78E4\",\n planned: \"#f5bd43\",\n canceled: \"#A1A4A9\",\n conflicting: \"#ef8635\",\n};\n\ninterface CustomButtonProps extends ButtonProps {\n selected?: boolean;\n}\n\nconst createCustomButton = (\n colorKey: keyof typeof STATUS_COLORS,\n defaultProps: Partial<ButtonProps> & { selected?: boolean } = {}\n) => {\n const CustomButton = styled(Button)<CustomButtonProps>(({ selected }) => ({\n fontSize: \"12px\",\n color: \"#fff\",\n textTransform: \"none\",\n padding: \"4px\",\n backgroundColor: STATUS_COLORS[colorKey],\n \"&:hover\": {\n backgroundColor: darken(STATUS_COLORS[colorKey], 0.2),\n },\n ...(selected && {\n border: \"1px solid white\",\n }),\n // Conditional spread operator\n ...(colorKey === \"disabled\" && {\n color: `${STATUS_COLORS.disabled} !important`,\n border: `1px solid ${STATUS_COLORS[colorKey]}`,\n }),\n }));\n\n CustomButton.defaultProps = {\n size: \"small\",\n variant: \"contained\",\n ...defaultProps,\n };\n\n return CustomButton;\n};\n\nexport const FailureButton = createCustomButton(\"failure\");\n\nexport const InfoButton = createCustomButton(\"info\");\n\nexport const SuccessButton = createCustomButton(\"success\");\n\nexport const VisitPlanButton = createCustomButton(\"visit\");\n\nexport const DisableButton = createCustomButton(\"disabled\", {\n disabled: true,\n});\n\nexport const ConditionalButton = ({ condition, ButtonComponent, text }) => {\n return condition ? (\n ButtonComponent\n ) : (\n <DisableButton>{`No ${text}`}</DisableButton>\n );\n};\n","/**\r\n * Contains code and logic for generating linear gradients.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObject } from \"../../Base\";\nimport { List } from \"../../utils/List\";\nimport { getGhostPaper } from \"../Paper\";\nimport { registry } from \"../../Registry\";\nimport * as $iter from \"../../utils/Iterator\";\nimport * as $math from \"../../utils/Math\";\nimport * as $type from \"../../utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Linear gradient class.\r\n */\nvar LinearGradient = /** @class */function (_super) {\n tslib_1.__extends(LinearGradient, _super);\n /**\r\n * Constructor.\r\n */\n function LinearGradient() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * List of colors switch definitions in a gradient.\r\n */\n _this._stops = new List();\n /**\r\n * Gradient direction.\r\n */\n _this._rotation = 0;\n _this.className = \"LinearGradient\";\n _this._stops.events.on(\"setIndex\", _this.validate, _this);\n _this._stops.events.on(\"inserted\", _this.validate, _this);\n // Create element\n _this.element = _this.paper.addGroup(\"linearGradient\");\n _this.id = \"gradient-\" + registry.getUniqueId();\n _this.element.attr({\n \"id\": _this.id\n });\n _this._disposers.push(_this.element);\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws gradient.\r\n *\r\n * @ignore Exclude from docs\r\n */\n LinearGradient.prototype.validate = function () {\n var _this = this;\n var rotation = (this._rotation + 90) * $math.RADIANS;\n var x1 = Math.round(50 + Math.sin(rotation + Math.PI) * 50) + '%';\n var y1 = Math.round(50 + Math.cos(rotation) * 50) + '%';\n var x2 = Math.round(50 + Math.sin(rotation) * 50) + '%';\n var y2 = Math.round(50 + Math.cos(rotation + Math.PI) * 50) + '%';\n var gradientElement = this.element;\n gradientElement.removeChildNodes();\n gradientElement.attr({\n \"x1\": x1,\n \"x2\": x2,\n \"y1\": y1,\n \"y2\": y2\n });\n $iter.each($iter.indexed(this._stops.iterator()), function (a) {\n var i = a[0];\n var stop = a[1];\n var offset = stop.offset;\n if (!$type.isNumber(offset)) {\n offset = i / (_this._stops.length - 1);\n }\n var gradientStop = _this.paper.add(\"stop\");\n if ($type.hasValue(stop.color)) {\n gradientStop.attr({\n \"stop-color\": stop.color.toString()\n });\n }\n if ($type.isNumber(stop.opacity)) {\n gradientStop.attr({\n \"stop-opacity\": stop.opacity\n });\n }\n if ($type.isNumber(offset)) {\n gradientStop.attr({\n \"offset\": offset\n });\n }\n gradientElement.add(gradientStop);\n });\n };\n /**\r\n * Clears the gradient.\r\n *\r\n * @ignore Exclude from docs\r\n */\n LinearGradient.prototype.clear = function () {\n this._stops.clear();\n };\n /**\r\n * Adds a color step to the gradient.\r\n *\r\n * @param color Color (hex code or named color)\r\n * @param opacity Opacity (value from 0 to 1; 0 completely transaprent, 1 fully opaque)\r\n * @param offset Position of color in the gradient (value 0 to 1; 0 meaning start of the gradient and 1 end)\r\n */\n LinearGradient.prototype.addColor = function (color, opacity, offset) {\n this._stops.push({\n color: color,\n opacity: opacity,\n offset: offset\n });\n };\n Object.defineProperty(LinearGradient.prototype, \"stops\", {\n /**\r\n * A list of color stops in the gradient.\r\n *\r\n * @return Stops\r\n */\n get: function get() {\n return this._stops;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LinearGradient.prototype, \"paper\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Paper\r\n */\n get: function get() {\n if (this._paper) {\n return this._paper;\n }\n return getGhostPaper();\n },\n /**\r\n * [[Paper]] instace to use for the gradient.\r\n *\r\n * @ignore Exclude from docs\r\n * @param paper Paper\r\n */\n set: function set(paper) {\n if (this._paper != paper) {\n this._paper = paper;\n this.validate();\n paper.appendDef(this.element);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LinearGradient.prototype, \"rotation\", {\n /**\r\n * @return Rotation\r\n */\n get: function get() {\n return this._rotation;\n },\n /**\r\n * Rotation (direction) of the gradient in degrees.\r\n *\r\n * @param value Rotation\r\n */\n set: function set(value) {\n //this.element.attr({ \"gradientTransform\": \"rotate(\" + value + \" 10 100)\" });\n this._rotation = value;\n this.validate();\n },\n enumerable: true,\n configurable: true\n });\n LinearGradient.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.stops.copyFrom(source.stops);\n this._rotation = source.rotation;\n };\n return LinearGradient;\n}(BaseObject);\nexport { LinearGradient };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"LinearGradient\"] = LinearGradient;","/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { registry } from \"../Registry\";\nimport * as $path from \"./Path\";\nimport * as $array from \"../utils/Array\";\nimport * as $utils from \"../utils/Utils\";\nimport * as $math from \"../utils/Math\";\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nvar Tension = /** @class */function () {\n /**\r\n * Constructor.\r\n *\r\n * @param tensionX [description]\r\n * @param tensionY [description]\r\n */\n function Tension(tensionX, tensionY) {\n this._tensionX = tensionX;\n this._tensionY = tensionY;\n }\n /**\r\n * [smooth description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param points [description]\r\n * @return [description]\r\n */\n Tension.prototype.smooth = function (points) {\n var tensionX = this._tensionX;\n var tensionY = this._tensionY;\n if (points.length < 3 || tensionX >= 1 && tensionY >= 1) {\n return $path.polyline(points);\n }\n var first = points[0];\n var last = points[points.length - 1];\n var closed = false;\n if ($math.round(first.x, 3) == $math.round(last.x) && $math.round(first.y) == $math.round(last.y)) {\n closed = true;\n }\n // Can't moveTo here, as it wont be possible to have fill then.\n var path = \"\";\n for (var i = 0, len = points.length - 1; i < len; i++) {\n var p0 = points[i - 1];\n var p1 = points[i];\n var p2 = points[i + 1];\n var p3 = points[i + 2];\n if (i === 0) {\n if (closed) {\n p0 = points[points.length - 2];\n } else {\n p0 = points[i];\n }\n } else if (i == points.length - 2) {\n if (closed) {\n p3 = points[1];\n } else {\n p3 = points[i + 1];\n }\n }\n var controlPointA = $math.getCubicControlPointA(p0, p1, p2, p3, tensionX, tensionY);\n var controlPointB = $math.getCubicControlPointB(p0, p1, p2, p3, tensionX, tensionY);\n path += $path.cubicCurveTo(p2, controlPointA, controlPointB);\n }\n return path;\n };\n return Tension;\n}();\nexport { Tension };\n/**\r\n * Returns a waved line SVG path between two points.\r\n *\r\n * @ignore Exclude from docs\r\n * @param point1 Starting point\r\n * @param point2 Ending point\r\n * @param waveLength Wave length\r\n * @param waveHeight Wave height\r\n * @param adjustWaveLength Adjust wave length based on the actual line length\r\n * @return SVG path\r\n */\nexport function wavedLine(point1, point2, waveLength, waveHeight, tension, adjustWaveLength) {\n var x1 = point1.x;\n var y1 = point1.y;\n var x2 = point2.x;\n var y2 = point2.y;\n var distance = $math.getDistance(point1, point2);\n if (adjustWaveLength) {\n waveLength = distance / Math.round(distance / waveLength);\n }\n var d = registry.getCache($utils.stringify([\"wavedLine\", point1.x, point2.x, point1.y, point2.y, waveLength, waveHeight]));\n if (!d) {\n if (distance > 0) {\n var angle = Math.atan2(y2 - y1, x2 - x1);\n var cos = Math.cos(angle);\n var sin = Math.sin(angle);\n var waveLengthX = waveLength * cos;\n var waveLengthY = waveLength * sin;\n if (waveLength <= 1 || waveHeight <= 1) {\n d = $path.lineTo(point2);\n } else {\n var halfWaveCount = Math.round(2 * distance / waveLength);\n var points = [];\n var sign = 1;\n if (x2 < x1) {\n sign *= -1;\n }\n if (y2 < y1) {\n sign *= -1;\n }\n for (var i = 0; i <= halfWaveCount; i++) {\n sign *= -1;\n var x = x1 + i * waveLengthX / 2 + sign * waveHeight / 2 * sin;\n var y = y1 + i * waveLengthY / 2 - sign * waveHeight / 2 * cos;\n points.push({\n x: x,\n y: y\n });\n }\n d = new Tension(tension, tension).smooth(points);\n }\n } else {\n d = \"\";\n }\n registry.setCache($utils.stringify([\"wavedLine\", point1.x, point2.x, point1.y, point2.y, waveLength, waveHeight]), d);\n }\n return d;\n}\n/**\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nvar Basis = /** @class */function () {\n /**\r\n * Constructor.\r\n *\r\n * @param info [description]\r\n */\n function Basis(info) {\n this._closed = info.closed;\n }\n /**\r\n * [smooth description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param points [description]\r\n * @return [description]\r\n */\n Basis.prototype.smooth = function (points) {\n var _this = this;\n var x0 = NaN;\n var x1 = NaN;\n var x2 = NaN;\n var x3 = NaN;\n var x4 = NaN;\n var y0 = NaN;\n var y1 = NaN;\n var y2 = NaN;\n var y3 = NaN;\n var y4 = NaN;\n var point = 0;\n var output = \"\";\n var pushCurve = function pushCurve(x, y) {\n output += $path.cubicCurveTo({\n x: (x0 + 4 * x1 + x) / 6,\n y: (y0 + 4 * y1 + y) / 6\n }, {\n x: (2 * x0 + x1) / 3,\n y: (2 * y0 + y1) / 3\n }, {\n x: (x0 + 2 * x1) / 3,\n y: (y0 + 2 * y1) / 3\n });\n };\n var pushPoint = function pushPoint(_a) {\n var x = _a.x,\n y = _a.y;\n switch (point) {\n case 0:\n point = 1;\n if (_this._closed) {\n x2 = x;\n y2 = y;\n } else {\n output += $path.lineTo({\n x: x,\n y: y\n });\n }\n break;\n case 1:\n point = 2;\n if (_this._closed) {\n x3 = x;\n y3 = y;\n }\n break;\n case 2:\n point = 3;\n if (_this._closed) {\n x4 = x;\n y4 = y;\n output += $path.moveTo({\n x: (x0 + 4 * x1 + x) / 6,\n y: (y0 + 4 * y1 + y) / 6\n });\n break;\n } else {\n output += $path.lineTo({\n x: (5 * x0 + x1) / 6,\n y: (5 * y0 + y1) / 6\n });\n // fall-through\n }\n default:\n pushCurve(x, y);\n break;\n }\n x0 = x1;\n x1 = x;\n y0 = y1;\n y1 = y;\n };\n $array.each(points, pushPoint);\n if (this._closed) {\n switch (point) {\n case 1:\n output += $path.moveTo({\n x: x2,\n y: y2\n });\n output += $path.closePath();\n break;\n case 2:\n output += $path.moveTo({\n x: (x2 + 2 * x3) / 3,\n y: (y2 + 2 * y3) / 3\n });\n output += $path.lineTo({\n x: (x3 + 2 * x2) / 3,\n y: (y3 + 2 * y2) / 3\n });\n output += $path.closePath();\n break;\n case 3:\n pushPoint({\n x: x2,\n y: y2\n });\n pushPoint({\n x: x3,\n y: y3\n });\n pushPoint({\n x: x4,\n y: y4\n });\n break;\n }\n } else {\n switch (point) {\n case 3:\n pushCurve(x1, y1);\n // fall-through\n case 2:\n output += $path.lineTo({\n x: x1,\n y: y1\n });\n break;\n }\n output += $path.closePath();\n }\n return output;\n };\n return Basis;\n}();\nexport { Basis };","import React from 'react';\nimport { Typography, Box, Chip } from '@mui/material';\nimport { useTheme } from '@mui/material/styles';\n\n\n\n\n\nconst TypoNeedInfo = ({ children, sx, ...props }) => {\n const theme = useTheme();\n return (\n <Typography component=\"span\" {...props} sx={{ ...sx, color: theme.palette.needInfo }}>\n {children}\n </Typography>\n );\n};\n\n\nconst TypoHaveInfo = ({ children, sx, ...props }) => {\n const theme = useTheme();\n return (\n <Typography component=\"span\" {...props} sx={{ ...sx, color: theme.palette.haveInfo }}>\n {children}\n </Typography>\n );\n};\n\n\n\nconst TypoSuccess = ({ children, sx, ...props }) => {\n const theme = useTheme();\n return (\n <Typography component=\"span\" {...props} sx={{ ...sx, color: theme.palette.success.main }}>\n {children}\n </Typography>\n );\n};\n\nconst TypoError = ({ children, sx, ...props }) => {\n const theme = useTheme();\n return (\n <Typography component=\"span\" {...props} sx={{ ...sx, color: theme.palette.error.main }}>\n {children}\n </Typography>\n );\n};\n\n\nconst TypoWarning = ({ children, sx, ...props }) => {\n const theme = useTheme();\n return (\n <Typography component=\"span\" {...props} sx={{ ...sx, color: theme.palette.warning.main }}>\n {children}\n </Typography>\n );\n};\n\n\n\n\n\n\n\nconst TextSmall = ({ children, sx, ...props }) => {\n return (\n <Box\n component=\"span\"\n sx={{\n typography: 'small',\n ...sx, // Merge additional styles\n }}\n {...props} // Spread additional props like onClick, etc.\n >\n {children}\n </Box>\n );\n};\n\nconst TextMuted = ({ children, sx, ...props }) => {\n const theme = useTheme();\n return (\n <Box\n component=\"span\"\n sx={{\n color: theme.palette.grey[400],\n ...sx, // Merge additional styles\n }}\n {...props} // Spread additional props like onClick, etc.\n >\n {children}\n </Box>\n );\n};\n\nconst TextSmallMuted = ({ children, sx, ...props }) => {\n return (\n <TextSmall\n component=\"span\"\n sx={{\n color: 'textMuted',\n ...sx, // Merge additional styles\n }}\n {...props} // Spread additional props like onClick, etc.\n >\n {children}\n </TextSmall>\n );\n};\n\n\n\nconst BoxVendorServiceArea = ({ children, sx, ...props }) => {\n const theme = useTheme();\n\n return (\n <Box\n sx={{\n padding: '0 8px',\n borderBottom: `1px solid ${theme.palette.borderGrey}`, // Correctly referencing theme color\n ...sx, // Merge additional styles\n }}\n {...props} // Spread additional props like onClick, etc.\n >\n {children}\n </Box>\n );\n};\n\n\nconst ChipGroup = ({ leftLabel = 'left', rightLabel = 'right', leftColor = 'default', rightColor = 'success', boxProps }) => {\n return (\n <>\n <Box display=\"inline-flex\" sx={{ borderRadius: '16px', overflow: 'hidden', ...boxProps }}>\n <Chip\n label={leftLabel}\n color={leftColor}\n size=\"small\"\n sx={{ borderRadius: '16px 0 0 16px', color: leftColor === 'default' ? '#777777' : undefined }}\n />\n <Chip\n label={rightLabel}\n color={rightColor}\n size=\"small\"\n sx={{ borderRadius: '0 16px 16px 0' }}\n />\n </Box>\n </>\n );\n};\n\n\n\nconst FrequencyChip = ({ anentaColor = 'default', anentaLabel = 'Anenta', vendorColor = 'default', vendorLabel = 'Vendor' }) => {\n return (\n <>\n <ChipGroup\n leftLabel=\"Anenta\"\n rightLabel={anentaLabel}\n rightColor={anentaColor}\n />\n <ChipGroup\n leftLabel=\"Vendor\"\n rightLabel={vendorLabel}\n rightColor={vendorColor}\n boxProps={{ ml:1 }}\n />\n </>\n );\n};\n\n\n\n// Export all custom Box components\nexport { TypoSuccess, TypoWarning, TypoError, TypoHaveInfo, TypoNeedInfo, TextSmall, TextSmallMuted, TextMuted, BoxVendorServiceArea, FrequencyChip };\n","/**\r\n * Rounded rectangle module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Sprite } from \"../Sprite\";\nimport { registry } from \"../Registry\";\nimport * as $math from \"../utils/Math\";\nimport * as $type from \"../utils/Type\";\nimport * as $utils from \"../utils/Utils\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws a rectangle with rounded corners.\r\n *\r\n * @see {@link IRoundedRectangleEvents} for a list of available events\r\n * @see {@link IRoundedRectangleAdapters} for a list of available Adapters\r\n */\nvar RoundedRectangle = /** @class */function (_super) {\n tslib_1.__extends(RoundedRectangle, _super);\n /**\r\n * Constructor\r\n */\n function RoundedRectangle() {\n var _this = _super.call(this) || this;\n _this.className = \"RoundedRectangle\";\n _this.element = _this.paper.add(\"path\");\n //this.pixelPerfect = false;\n _this.cornerRadius(3, 3, 3, 3);\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n RoundedRectangle.prototype.draw = function () {\n _super.prototype.draw.call(this);\n var w = this.innerWidth;\n var h = this.innerHeight;\n if ($type.isNumber(w) && $type.isNumber(h)) {\n var minSide = $math.min(w, h) / 2;\n var cornerRadiusTopLeft = $utils.relativeToValue(this.cornerRadiusTopLeft, minSide);\n var cornerRadiusTopRight = $utils.relativeToValue(this.cornerRadiusTopRight, minSide);\n var cornerRadiusBottomRight = $utils.relativeToValue(this.cornerRadiusBottomRight, minSide);\n var cornerRadiusBottomLeft = $utils.relativeToValue(this.cornerRadiusBottomLeft, minSide);\n var maxcr = $math.min(Math.abs(w / 2), Math.abs(h / 2));\n var crtl = $math.fitToRange(cornerRadiusTopLeft, 0, maxcr);\n var crtr = $math.fitToRange(cornerRadiusTopRight, 0, maxcr);\n var crbr = $math.fitToRange(cornerRadiusBottomRight, 0, maxcr);\n var crbl = $math.fitToRange(cornerRadiusBottomLeft, 0, maxcr);\n var lineT = \"M\" + crtl + \",0 L\" + (w - crtr) + \",0\";\n var lineB = \" L\" + crbl + \",\" + h;\n var lineL = \" L0,\" + crtl;\n var lineR = \" L\" + w + \",\" + (h - crbr);\n var arcTR = \" a\" + crtr + \",\" + crtr + \" 0 0 1 \" + crtr + \",\" + crtr;\n var arcBR = \" a\" + crbr + \",\" + crbr + \" 0 0 1 -\" + crbr + \",\" + crbr;\n var arcBL = \" a\" + crbl + \",\" + crbl + \" 0 0 1 -\" + crbl + \",-\" + crbl;\n var arcTL = \" a\" + crtl + \",\" + crtl + \" 0 0 1 \" + crtl + \",-\" + crtl;\n var path = lineT + arcTR + lineR + arcBR + lineB + arcBL + lineL + arcTL + \" Z\";\n this.path = path;\n }\n };\n /**\r\n * Sets radius for all four corners at ones.\r\n *\r\n * All numbers are in pixels.\r\n *\r\n * @param tl Top-left corner\r\n * @param tr Top-right corner\r\n * @param bl Bottom-left corner\r\n * @param br Bottom-right corner\r\n */\n RoundedRectangle.prototype.cornerRadius = function (tl, tr, bl, br) {\n this.cornerRadiusTopLeft = tl;\n this.cornerRadiusTopRight = tr;\n this.cornerRadiusBottomLeft = bl;\n this.cornerRadiusBottomRight = br;\n };\n Object.defineProperty(RoundedRectangle.prototype, \"cornerRadiusTopLeft\", {\n /**\r\n * @return Radius (px or Percent)\r\n */\n get: function get() {\n return this.getPropertyValue(\"cornerRadiusTopLeft\");\n },\n /**\r\n * Radius of the top-left corner in pixels.\r\n *\r\n * @default 3\r\n * @param value Radius (px or Percent)\r\n */\n set: function set(value) {\n this.setPercentProperty(\"cornerRadiusTopLeft\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RoundedRectangle.prototype, \"cornerRadiusTopRight\", {\n /**\r\n * @return Radius (px or Percent)\r\n */\n get: function get() {\n return this.getPropertyValue(\"cornerRadiusTopRight\");\n },\n /**\r\n * Radius of the top-right corner in pixels.\r\n *\r\n * @default 3\r\n * @param value Radius (px or Percent)\r\n */\n set: function set(value) {\n this.setPercentProperty(\"cornerRadiusTopRight\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RoundedRectangle.prototype, \"cornerRadiusBottomRight\", {\n /**\r\n * @return Radius (px or Percent)\r\n */\n get: function get() {\n return this.getPropertyValue(\"cornerRadiusBottomRight\");\n },\n /**\r\n * Radius of the bottom-right corner in pixels.\r\n *\r\n * @default 3\r\n * @param value Radius (px or Percent)\r\n */\n set: function set(value) {\n this.setPercentProperty(\"cornerRadiusBottomRight\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RoundedRectangle.prototype, \"cornerRadiusBottomLeft\", {\n /**\r\n * @return Radius (px or Percent)\r\n */\n get: function get() {\n return this.getPropertyValue(\"cornerRadiusBottomLeft\");\n },\n /**\r\n * Radius of the bottom-left corner in pixels.\r\n *\r\n * @default 3\r\n * @param value Radius (px or Percent)\r\n */\n set: function set(value) {\n this.setPercentProperty(\"cornerRadiusBottomLeft\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Measures the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n RoundedRectangle.prototype.measureElement = function () {};\n Object.defineProperty(RoundedRectangle.prototype, \"bbox\", {\n /**\r\n * Returns bounding box (square) for this element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n get: function get() {\n if (this.definedBBox) {\n return this.definedBBox;\n }\n if (this.isMeasured) {\n return {\n x: 0,\n y: 0,\n width: this.innerWidth,\n height: this.innerHeight\n };\n } else {\n return {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n }\n },\n enumerable: true,\n configurable: true\n });\n return RoundedRectangle;\n}(Sprite);\nexport { RoundedRectangle };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"RoundedRectangle\"] = RoundedRectangle;","import { Stack, Box, ToggleButton, ToggleButtonGroup, Typography } from \"@mui/material\";\n\nexport default ({ label, value, onChange, trueText=\"Yes\", falseText=\"No\", layout='inline' }) => {\n const handleChange = (_event, newValue) => {\n // Only update if a new value is selected\n if (newValue !== null) {\n onChange(newValue);\n }\n };\n\n const YesNoToggle = (\n <ToggleButtonGroup\n size=\"small\"\n value={value}\n exclusive\n onChange={handleChange}\n sx={{\n \"& .MuiToggleButton-root\": {\n py: 0,\n fontSize: \"12px\",\n textTransform: \"none\",\n \"&.Mui-selected\": {\n backgroundColor: \"#007bff\",\n color: \"#fff\",\n \"&:hover\": {\n backgroundColor: \"#0056b3\",\n },\n },\n },\n \"& .MuiToggleButtonGroup-grouped\": {\n borderRadius: 1,\n mx: 0,\n },\n }}\n >\n <ToggleButton value={true}>{trueText}</ToggleButton>\n <ToggleButton value={false}>{falseText}</ToggleButton>\n </ToggleButtonGroup>\n )\n\nswitch (layout) {\n case 'horizontal':\n return (\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ justifyContent: \"space-between\", alignItems: \"center\", }}\n >\n <Box>{label}</Box>\n <Box>{YesNoToggle}</Box>\n </Stack>\n );\n case 'vertical':\n return (\n <>\n <Box>{label}</Box>\n {YesNoToggle}\n </>\n );\n default:\n return (\n <>\n <span>{label}  </span>\n {YesNoToggle}\n </>\n );\n}\n\n\n};\n","/**\r\n * A collection of low-level async operation stuff.\r\n */\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport * as $array from \"./Array\";\nvar pendingFrame = false;\nvar nextQueue = [];\nvar readQueue = [];\nvar writeQueue = [];\nvar idleQueue = [];\nvar fps = 1000 / 60;\n/**\r\n * [raf description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nexport var raf = typeof requestAnimationFrame === \"function\" ? function (fn) {\n requestAnimationFrame(fn);\n} : function (fn) {\n setTimeout(fn, fps);\n};\n/**\r\n * [frameLoop description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nfunction frameLoop() {\n var now = Date.now();\n var length = nextQueue.length;\n for (var i = 0; i < length; ++i) {\n nextQueue[i](now);\n }\n $array.shiftLeft(nextQueue, length);\n for (var i = 0; i < readQueue.length; ++i) {\n readQueue[i](now);\n }\n readQueue.length = 0;\n for (var i = 0; i < writeQueue.length; ++i) {\n writeQueue[i](now);\n }\n writeQueue.length = 0;\n if (nextQueue.length === 0 && readQueue.length === 0) {\n pendingFrame = false;\n } else {\n raf(frameLoop);\n }\n}\n/**\r\n * [pendFrame description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\nfunction pendFrame() {\n if (!pendingFrame) {\n pendingFrame = true;\n raf(frameLoop);\n }\n}\n/**\r\n * [nextFrame description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param fn [description]\r\n */\nexport function nextFrame(fn) {\n nextQueue.push(fn);\n pendFrame();\n}\n/**\r\n * [readFrame description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param fn [description]\r\n */\nexport function readFrame(fn) {\n readQueue.push(fn);\n pendFrame();\n}\n/**\r\n * [writeFrame description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param fn [description]\r\n */\nexport function writeFrame(fn) {\n writeQueue.push(fn);\n pendFrame();\n}\n/**\r\n * [whenIdle description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param fn [description]\r\n */\nexport function whenIdle(fn) {\n idleQueue.push(fn);\n}\n/**\r\n * [triggerIdle description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @todo Maybe don't trigger a callback which was added while in the middle of triggering?\r\n */\nexport function triggerIdle() {\n var now = Date.now();\n var length = idleQueue.length;\n for (var i = 0; i < length; ++i) {\n idleQueue.shift()(now);\n }\n}","/**\r\n * Event Dispatcher module is used for registering listeners and dispatching\r\n * events across amCharts system.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Disposer } from \"./Disposer\";\nimport * as $array from \"./Array\";\nimport * as $async from \"./AsyncPending\";\nimport * as $type from \"./Type\";\n/*export interface IEventDispatcher<T> {\r\n isDisposed(): boolean;\r\n dispose(): void;\r\n hasListeners(): boolean;\r\n enable(): void;\r\n disable(): void;\r\n enableType<Key extends keyof T>(type: Key): void;\r\n disableType<Key extends keyof T>(type: Key, amount?: number): void;\r\n isEnabled<Key extends keyof T>(type: Key): boolean;\r\n has<C, Key extends keyof T>(type: Key, callback?: (this: C, event: T[Key]) => void, context?: C): boolean;\r\n dispatchImmediately<Key extends keyof T>(type: Key, event: T[Key]): void;\r\n dispatch<Key extends keyof T>(type: Key, event: T[Key]): void;\r\n onAll<C, Key extends keyof T>(callback: (this: C, type: Key, event: T[Key]) => void, context?: C): IDisposer;\r\n on<C, Key extends keyof T>(type: Key, callback: (this: C, event: T[Key]) => void, context?: C): IDisposer;\r\n once<C, Key extends keyof T>(type: Key, callback: (this: C, event: T[Key]) => void, context?: C): IDisposer;\r\n off<C, Key extends keyof T>(type: Key, callback: (this: C, event: T[Key]) => void, context?: C): void;\r\n off<C, Key extends keyof T>(type: Key, callback: (this: C, event: T[Key]) => void, context?: C): void;\r\n copyFrom(source: this): void;\r\n}*/\n/**\r\n * Universal Event Dispatcher.\r\n *\r\n * @important\r\n */\nvar EventDispatcher = /** @class */function () {\n /**\r\n * Constructor\r\n */\n function EventDispatcher() {\n this._listeners = [];\n this._killed = [];\n this._disabled = {};\n this._iterating = 0;\n this._enabled = true;\n this._disposed = false;\n }\n /**\r\n * Returns if this object has been already disposed.\r\n *\r\n * @return Disposed?\r\n */\n EventDispatcher.prototype.isDisposed = function () {\n return this._disposed;\n };\n /**\r\n * Dispose (destroy) this object.\r\n */\n EventDispatcher.prototype.dispose = function () {\n if (!this._disposed) {\n this._disposed = true;\n var a = this._listeners;\n this._iterating = 1;\n this._listeners = null;\n this._disabled = null;\n try {\n $array.each(a, function (x) {\n x.disposer.dispose();\n });\n } finally {\n this._killed = null;\n this._iterating = null;\n }\n }\n };\n /**\r\n * Checks if this particular event dispatcher has any listeners set.\r\n *\r\n * @return Has listeners?\r\n */\n EventDispatcher.prototype.hasListeners = function () {\n return this._listeners.length !== 0;\n };\n /**\r\n * Checks if this particular event dispatcher has any particular listeners set.\r\n *\r\n * @return Has particular event listeners?\r\n */\n EventDispatcher.prototype.hasListenersByType = function (type) {\n return $array.any(this._listeners, function (x) {\n return (x.type === null || x.type === type) && !x.killed;\n });\n };\n /**\r\n * Enable dispatching of events if they were previously disabled by\r\n * `disable()`.\r\n */\n EventDispatcher.prototype.enable = function () {\n this._enabled = true;\n };\n /**\r\n * Disable dispatching of events until re-enabled by `enable()`.\r\n */\n EventDispatcher.prototype.disable = function () {\n this._enabled = false;\n };\n /**\r\n * Enable dispatching particular event, if it was disabled before by\r\n * `disableType()`.\r\n *\r\n * @param type Event type\r\n */\n EventDispatcher.prototype.enableType = function (type) {\n delete this._disabled[type];\n };\n /**\r\n * Disable dispatching of events for a certain event type.\r\n *\r\n * Optionally, can set how many dispatches to skip before automatically\r\n * re-enabling the dispatching.\r\n *\r\n * @param type Event type\r\n * @param amount Number of event dispatches to skip\r\n */\n EventDispatcher.prototype.disableType = function (type, amount) {\n if (amount === void 0) {\n amount = Infinity;\n }\n this._disabled[type] = amount;\n };\n /**\r\n * Removes listener from dispatcher.\r\n *\r\n * Will throw an exception if such listener does not exists.\r\n *\r\n * @param listener Listener to remove\r\n */\n EventDispatcher.prototype._removeListener = function (listener) {\n if (this._iterating === 0) {\n var index = this._listeners.indexOf(listener);\n if (index === -1) {\n throw new Error(\"Invalid state: could not remove listener\");\n }\n this._listeners.splice(index, 1);\n } else {\n this._killed.push(listener);\n }\n };\n /**\r\n * Removes existing listener by certain parameters.\r\n *\r\n * @param once Listener's once setting\r\n * @param type Listener's type\r\n * @param callback Callback function\r\n * @param context Callback context\r\n */\n EventDispatcher.prototype._removeExistingListener = function (once, type, callback, context) {\n if (this._disposed) {\n throw new Error(\"EventDispatcher is disposed\");\n }\n this._eachListener(function (info) {\n if (info.once === once &&\n // TODO is this correct ?\n info.type === type && (callback == null || info.callback === callback) && info.context === context) {\n info.disposer.dispose();\n }\n });\n };\n /**\r\n * Checks if dispatching for particular event type is enabled.\r\n *\r\n * @param type Event type\r\n * @return Enabled?\r\n */\n EventDispatcher.prototype.isEnabled = function (type) {\n if (this._disposed) {\n throw new Error(\"EventDispatcher is disposed\");\n }\n // TODO is this check correct ?\n return this._enabled && this._listeners.length > 0 && this.hasListenersByType(type) && this._disabled[type] == null;\n };\n /**\r\n * Checks if there's already a listener with specific parameters.\r\n *\r\n * @param type Listener's type\r\n * @param callback Callback function\r\n * @param context Callback context\r\n * @return Has listener?\r\n */\n EventDispatcher.prototype.has = function (type, callback, context) {\n var index = $array.findIndex(this._listeners, function (info) {\n return info.once !== true &&\n // Ignoring \"once\" listeners\n info.type === type && (callback == null || info.callback === callback) && info.context === context;\n });\n return index !== -1;\n };\n /**\r\n * Checks whether event of the particular type should be dispatched.\r\n *\r\n * @param type Event type\r\n * @return Dispatch?\r\n */\n EventDispatcher.prototype._shouldDispatch = function (type) {\n if (this._disposed) {\n throw new Error(\"EventDispatcher is disposed\");\n }\n var count = this._disabled[type];\n if (!$type.isNumber(count)) {\n return this._enabled;\n } else {\n if (count <= 1) {\n delete this._disabled[type];\n } else {\n --this._disabled[type];\n }\n return false;\n }\n };\n /**\r\n * [_eachListener description]\r\n *\r\n * All of this extra code is needed when a listener is removed while iterating\r\n *\r\n * @todo Description\r\n * @param fn [description]\r\n */\n EventDispatcher.prototype._eachListener = function (fn) {\n var _this = this;\n ++this._iterating;\n try {\n $array.each(this._listeners, fn);\n } finally {\n --this._iterating;\n // TODO should this be inside or outside the finally ?\n if (this._iterating === 0 && this._killed.length !== 0) {\n // Remove killed listeners\n $array.each(this._killed, function (killed) {\n _this._removeListener(killed);\n });\n this._killed.length = 0;\n }\n }\n };\n /**\r\n * Dispatches an event immediately without waiting for next cycle.\r\n *\r\n * @param type Event type\r\n * @param event Event object\r\n * @todo automatically add in type and target properties if they are missing\r\n */\n EventDispatcher.prototype.dispatchImmediately = function (type, event) {\n if (this._shouldDispatch(type)) {\n // TODO check if it's faster to use an object of listeners rather than a single big array\n // TODO if the function throws, maybe it should keep going ?\n this._eachListener(function (listener) {\n if (!listener.killed && (listener.type === null || listener.type === type)) {\n listener.dispatch(type, event);\n }\n });\n }\n };\n /**\r\n * Shelves the event to be dispatched within next update cycle.\r\n *\r\n * @param type Event type\r\n * @param event Event object\r\n * @todo automatically add in type and target properties if they are missing\r\n */\n EventDispatcher.prototype.dispatch = function (type, event) {\n if (this._shouldDispatch(type)) {\n this._eachListener(function (listener) {\n // TODO check if it's faster to use an object of listeners rather than a single big array\n if (!listener.killed && (listener.type === null || listener.type === type)) {\n // TODO if the function throws, maybe it should keep going ?\n // TODO dispatch during the update cycle, rather than using whenIdle\n $async.whenIdle(function () {\n if (!listener.killed) {\n listener.dispatch(type, event);\n }\n });\n }\n });\n }\n };\n /**\r\n * Creates, catalogs and returns an [[EventListener]].\r\n *\r\n * Event listener can be disposed.\r\n *\r\n * @param once Listener's once setting\r\n * @param type Listener's type\r\n * @param callback Callback function\r\n * @param context Callback context\r\n * @param shouldClone Whether the listener should be copied when the EventDispatcher is copied\r\n * @param dispatch\r\n * @returns An event listener\r\n */\n EventDispatcher.prototype._on = function (once, type, callback, context, shouldClone, dispatch) {\n var _this = this;\n if (this._disposed) {\n throw new Error(\"EventDispatcher is disposed\");\n }\n this._removeExistingListener(once, type, callback, context);\n var info = {\n type: type,\n callback: callback,\n context: context,\n shouldClone: shouldClone,\n dispatch: dispatch,\n killed: false,\n once: once,\n disposer: new Disposer(function () {\n info.killed = true;\n _this._removeListener(info);\n })\n };\n this._listeners.push(info);\n return info;\n };\n /**\r\n * Creates an event listener to be invoked on **any** event.\r\n *\r\n * @param callback Callback function\r\n * @param context Callback context\r\n * @param shouldClone Whether the listener should be copied when the EventDispatcher is copied\r\n * @returns A disposable event listener\r\n * @todo what if `listen` is called on the same function twice ?\r\n */\n EventDispatcher.prototype.onAll = function (callback, context, shouldClone) {\n if (shouldClone === void 0) {\n shouldClone = true;\n }\n return this._on(false, null, callback, context, shouldClone, function (type, event) {\n return callback.call(context, type, event);\n }).disposer;\n };\n /**\r\n * Creates an event listener to be invoked on a specific event type.\r\n *\r\n * ```TypeScript\r\n * series.events.on(\"hidden\", (ev) => {\r\n * console.log(\"Series hidden: \" + ev.target.name);\r\n * }, this);\r\n * ```\r\n * ```JavaScript\r\n * series.events.on(\"hidden\", function(ev) {\r\n * console.log(\"Series hidden: \" + ev.target.name);\r\n * }, this);\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * // ...\r\n * \"events\": {\r\n * \t\"hidden\": function(ev) {\r\n * \t console.log(\"Series hidden: \" + ev.target.name);\r\n * \t}\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * The above will invoke our custom event handler whenever series we put\r\n * event on is hidden.\r\n *\r\n * @param type Listener's type\r\n * @param callback Callback function\r\n * @param context Callback context\r\n * @param shouldClone Whether the listener should be copied when the EventDispatcher is copied\r\n * @returns A disposable event listener\r\n * @todo what if `listen` is called on the same function twice ?\r\n */\n EventDispatcher.prototype.on = function (type, callback, context, shouldClone) {\n if (shouldClone === void 0) {\n shouldClone = true;\n }\n return this._on(false, type, callback, context, shouldClone, function (type, event) {\n return callback.call(context, event);\n }).disposer;\n };\n /**\r\n * Creates an event listener to be invoked on a specific event type once.\r\n *\r\n * Once the event listener is invoked, it is automatically disposed.\r\n *\r\n * ```TypeScript\r\n * series.events.on(\"hidden\", (ev) => {\r\n * console.log(\"Series hidden: \" + ev.target.name);\r\n * }, this);\r\n * ```\r\n * ```JavaScript\r\n * series.events.on(\"hidden\", function(ev) {\r\n * console.log(\"Series hidden: \" + ev.target.name);\r\n * }, this);\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * // ...\r\n * \"events\": {\r\n * \t\"hidden\": function(ev) {\r\n * \t console.log(\"Series hidden: \" + ev.target.name);\r\n * \t}\r\n * }\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * The above will invoke our custom event handler the first time series we\r\n * put event on is hidden.\r\n *\r\n * @param type Listener's type\r\n * @param callback Callback function\r\n * @param context Callback context\r\n * @param shouldClone Whether the listener should be copied when the EventDispatcher is copied\r\n * @returns A disposable event listener\r\n * @todo what if `listen` is called on the same function twice ?\r\n */\n EventDispatcher.prototype.once = function (type, callback, context, shouldClone) {\n if (shouldClone === void 0) {\n shouldClone = true;\n }\n var x = this._on(true, type, callback, context, shouldClone, function (type, event) {\n x.disposer.dispose();\n callback.call(context, event);\n });\n // TODO maybe this should return a different Disposer ?\n return x.disposer;\n };\n /**\r\n * Removes the event listener with specific parameters.\r\n *\r\n * @param type Listener's type\r\n * @param callback Callback function\r\n * @param context Callback context\r\n */\n EventDispatcher.prototype.off = function (type, callback, context) {\n this._removeExistingListener(false, type, callback, context);\n };\n /**\r\n * Copies all dispatcher parameters, including listeners, from another event\r\n * dispatcher.\r\n *\r\n * @param source Source event dispatcher\r\n */\n EventDispatcher.prototype.copyFrom = function (source) {\n var _this = this;\n if (this._disposed) {\n throw new Error(\"EventDispatcher is disposed\");\n }\n if (source === this) {\n throw new Error(\"Cannot copyFrom the same TargetedEventDispatcher\");\n }\n $array.each(source._listeners, function (x) {\n // TODO is this correct ?\n if (!x.killed && x.shouldClone) {\n if (x.type === null) {\n _this.onAll(x.callback, x.context);\n } else if (x.once) {\n _this.once(x.type, x.callback, x.context);\n } else {\n _this.on(x.type, x.callback, x.context);\n }\n }\n });\n };\n return EventDispatcher;\n}();\nexport { EventDispatcher };\n/**\r\n * A version of the [[EventDispatcher]] that dispatches events for a specific\r\n * target object.\r\n *\r\n * @important\r\n */\nvar TargetedEventDispatcher = /** @class */function (_super) {\n tslib_1.__extends(TargetedEventDispatcher, _super);\n /**\r\n * Constructor\r\n *\r\n * @param target Event dispatcher target\r\n */\n function TargetedEventDispatcher(target) {\n var _this = _super.call(this) || this;\n _this.target = target;\n return _this;\n }\n /**\r\n * Copies all dispatcher parameters, including listeners, from another event\r\n * dispatcher.\r\n *\r\n * @param source Source event dispatcher\r\n */\n TargetedEventDispatcher.prototype.copyFrom = function (source) {\n var _this = this;\n if (this._disposed) {\n throw new Error(\"EventDispatcher is disposed\");\n }\n if (source === this) {\n throw new Error(\"Cannot copyFrom the same TargetedEventDispatcher\");\n }\n $array.each(source._listeners, function (x) {\n // TODO very hacky\n if (x.context === source.target) {\n return;\n }\n // TODO is this correct ?\n if (!x.killed && x.shouldClone) {\n if (x.type === null) {\n _this.onAll(x.callback, x.context);\n } else if (x.once) {\n _this.once(x.type, x.callback, x.context);\n } else {\n _this.on(x.type, x.callback, x.context);\n }\n }\n });\n };\n return TargetedEventDispatcher;\n}(EventDispatcher);\nexport { TargetedEventDispatcher };","import React, { useEffect } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\n\nimport {\n Section\n} from 'auditComponents'\n\nimport { submitSection, navigateFromSection } from \"../sections/operations\";\nimport { getSectionStatus, getIncompleteMessage } from \"../sections/selectors\";\n\nconst mapStateToProps = (state, { sectionId } ) => {\n return {\n sectionStatus: getSectionStatus(sectionId, state),\n incompleteMessage: getIncompleteMessage(sectionId, state)\n };\n};\n\nconst mapDispatchToProps = (dispatch, { sectionId, ...rest }) => {\n return {\n onSubmit: () => { dispatch(submitSection(sectionId)) },\n onNavigateFrom: (navigateFromSectionId) => { dispatch(navigateFromSection(navigateFromSectionId))},\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Section);\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { getSectionStatus, getIncompleteMessage } from \"../sections/selectors\";\n\nimport {\n SubmitSummarySection\n} from 'auditComponents'\n\nconst mapStateToProps = (state, { sectionId }) => {\n return {\n sectionStatus: getSectionStatus(sectionId, state),\n incompleteMessage: getIncompleteMessage(sectionId, state),\n };\n};\n\nexport default connect(mapStateToProps, null)(SubmitSummarySection);;\n","import _ from 'lodashExtended'\n\nconst getRoomData = (roomId, state) => {\n var room = _.get(state.firestore, `data.rooms.${roomId}`) || {}\n return {\n title: getRoomTitle(room),\n ...room\n }\n}\n\nconst getRoomsForSection = (sectionId, state) => {\n return _(_.get(state.firestore, `ordered.rooms`) || []).filter({sectionId}).map((room) => {\n return {\n title: getRoomTitle(room),\n ...room\n }\n }).value()\n}\n\nconst getOtherRoomNames = (roomId, state) => {\n const { sectionId } = getRoomData(roomId, state)\n const sectionRooms = getRoomsForSection(sectionId, state)\n const otherRooms = _.filter(sectionRooms, ({id}) => id != roomId)\n\n return _(otherRooms).map('name').filter(_.isPresent).value()\n}\n\nconst getRoomTitle = (room) => {\n const { name, type } = room || {}\n return `${name || 'Unnamed Room'} ${ type ? `- ${type}` : '' }`\n}\n\nexport {\n getRoomData,\n getRoomsForSection,\n getOtherRoomNames\n}\n","import dotProp from 'dot-prop-immutable';\nimport _ from 'lodashExtended';\n\nimport { checkAllDataLoaded } from '../app/selectors';\nimport { orderedSectionIds } from '../components/sections';\nimport { selectWasteProductionAreasState } from '../components/sections/Sec2WasteProductionAreas';\nimport { getConfirmatoryStatement } from '../confirmatoryStatements/selectors';\nimport { getSectionData } from '../sections/selectors';\n\nexport const getAuditDocument = (auditDocumentId, state) => {\n if (checkAllDataLoaded(state)) {\n let confirmatoryStatement = getConfirmatoryStatement(state);\n\n let wasteProductionAreas = selectWasteProductionAreasState(state);\n\n let audit = dotProp.get(\n state.firestore,\n `data.pre_acceptance_waste_audits.${auditDocumentId}`\n );\n\n let sections = {};\n\n _.each(orderedSectionIds, (sectionId) => {\n var extraData = {};\n\n var sectionData = getSectionData(sectionId, state);\n\n // Spread `binGroupSurveys` to these 2 sections:\n // - waste_produced_and_segregation_at_this_premises\n // - other_waste_produced_at_this_premises\n /**\n * { waste_produced_and_segregation_at_this_premises: { binGroupSurveys: { 146: {} }} }\n */\n\n const binGroupIdsForSection = Object.entries(\n dotProp.get(state.firestore, `data.binGroupSurveys`) || {}\n )\n .filter(([key, value]) => value.sectionId === sectionId)\n .map(([key, value]) => key);\n // console.log({ binGroupIdsForSection, sectionId });\n sections[sectionId] = {\n ...extraData,\n ...sectionData,\n binGroupIdsForSection,\n };\n });\n\n var x = {\n confirmatoryStatement,\n ...audit,\n wasteProductionAreas,\n sections,\n };\n\n console.log('getAuditDocument', x);\n\n return x;\n }\n\n return null;\n};\n\nexport const selectRequiredBinGroupsForSectionId = (sectionId) => (state) => {\n const binGroupsHash = state.app.binGroups || {};\n\n const bgSurveysForSectionList = Object.values(\n dotProp.get(state.firestore, `data.binGroupSurveys`) || {}\n ).filter((bgSurvey) => bgSurvey.sectionId === sectionId);\n\n return bgSurveysForSectionList.map((bgSurvey) => ({\n // layer 1: bin group lookup data\n ...binGroupsHash[bgSurvey.id],\n\n // default data\n totalKg: bgSurvey.estimatedAnnualKg,\n\n // actual user input\n ...bgSurvey,\n }));\n};\n\nexport const updateBgSurvey =\n (bgSurveyId, updateAttrs) =>\n (dispatch, getState, { getFirestore }) => {\n const state = getState();\n const firestore = getFirestore();\n // console.log({ updateAttrs, bgSurveyId });\n\n firestore\n .set(\n {\n collection: \"pre_acceptance_waste_audits\",\n doc: state.app.auditDocumentId,\n subcollections: [\n { collection: \"binGroupSurveys\", doc: bgSurveyId.toString() },\n ],\n },\n updateAttrs,\n { merge: true }\n )\n .then(() => {\n dispatch({ type: \"UPDATE binGroupSurvey SUCCESS\" });\n })\n .catch((err) => {\n dispatch({ type: \"UPDATE binGroupSurvey ERROR\" }, err);\n });\n };\n","import _ from \"lodashExtended\";\nimport { getSectionData } from \"../sections/selectors\";\n\nconst checkAllDataLoaded = (state) => {\n //add additional sub collections here\n return (\n _.difference(\n [\"pre_acceptance_waste_audits\", \"sections\", \"confirmatoryStatements\"],\n Object.keys(state.firestore.data)\n ).length === 0\n );\n};\n\nconst getCurrentUser = (state) => {\n return state.app.currentUser;\n};\n\nexport { checkAllDataLoaded, getCurrentUser };\n","import _ from 'lodashExtended'\nimport { getCurrentUser } from '../app/selectors'\nimport dotProp from 'dot-prop-immutable'\n\nconst getConfirmatoryStatement = (state) => {\n const { id } = getCurrentUser(state)\n return dotProp.get(state.firestore, `data.confirmatoryStatements.${id}`)\n}\n\nexport {\n getConfirmatoryStatement\n}\n","/**\r\n * Line drawing functionality.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Sprite } from \"../Sprite\";\nimport { color } from \"../utils/Color\";\nimport { LinearGradient } from \"../rendering/fills/LinearGradient\";\nimport { registry } from \"../Registry\";\nimport * as $type from \"../utils/Type\";\nimport * as $math from \"../utils/Math\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws a line.\r\n *\r\n * @see {@link ILineEvents} for a list of available events\r\n * @see {@link ILineAdapters} for a list of available Adapters\r\n */\nvar Line = /** @class */function (_super) {\n tslib_1.__extends(Line, _super);\n /**\r\n * Constructor\r\n */\n function Line() {\n var _this = _super.call(this) || this;\n _this.className = \"Line\";\n _this.element = _this.paper.add(\"line\");\n _this.fill = color(); //\"none\";\n _this.x1 = 0;\n _this.y1 = 0;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the line.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Line.prototype.draw = function () {\n _super.prototype.draw.call(this);\n if (this.x1 == this.x2 || this.y1 == this.y2) {\n this.pixelPerfect = true;\n } else {\n this.pixelPerfect = false;\n }\n this.x1 = this.x1;\n this.x2 = this.x2;\n this.y1 = this.y1;\n this.y2 = this.y2;\n };\n Object.defineProperty(Line.prototype, \"x1\", {\n /**\r\n * @return X\r\n */\n get: function get() {\n return this.getPropertyValue(\"x1\");\n },\n /**\r\n * X coordinate of first end.\r\n *\r\n * @param value X\r\n */\n set: function set(value) {\n if (!$type.isNumber(value)) {\n value = 0;\n }\n var delta = 0;\n if (this.pixelPerfect && this.stroke instanceof LinearGradient) {\n delta = 0.00001;\n }\n this.setPropertyValue(\"x1\", value, true);\n this.element.attr({\n \"x1\": value + delta\n });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Line.prototype, \"x2\", {\n /**\r\n * @return X\r\n */\n get: function get() {\n var value = this.getPropertyValue(\"x2\");\n if (!$type.isNumber(value)) {\n value = this.pixelWidth;\n }\n return value;\n },\n /**\r\n * X coordinate of second end.\r\n *\r\n * @param value X\r\n */\n set: function set(value) {\n if (!$type.isNumber(value)) {\n value = 0;\n }\n this.setPropertyValue(\"x2\", value, true);\n this.element.attr({\n \"x2\": value\n });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Line.prototype, \"y1\", {\n /**\r\n * @return Y\r\n */\n get: function get() {\n return this.getPropertyValue(\"y1\");\n },\n /**\r\n * Y coordinate of first end.\r\n *\r\n * @param value Y\r\n */\n set: function set(value) {\n if (!$type.isNumber(value)) {\n value = 0;\n }\n var delta = 0;\n if (this.pixelPerfect && this.stroke instanceof LinearGradient) {\n delta = 0.00001;\n }\n this.setPropertyValue(\"y1\", value, true);\n this.element.attr({\n \"y1\": value + delta\n });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Line.prototype, \"y2\", {\n /**\r\n * @return Y\r\n */\n get: function get() {\n var value = this.getPropertyValue(\"y2\");\n if (!$type.isNumber(value)) {\n value = this.pixelHeight;\n }\n return value;\n },\n /**\r\n * Y coordinate of second end.\r\n *\r\n * @param value Y\r\n */\n set: function set(value) {\n if (!$type.isNumber(value)) {\n value = 0;\n }\n this.setPropertyValue(\"y2\", value, true);\n this.element.attr({\n \"y2\": value\n });\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Converts relative position along the line (0-1) into pixel coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @return Coordinates\r\n */\n Line.prototype.positionToPoint = function (position) {\n var point1 = {\n x: this.x1,\n y: this.y1\n };\n var point2 = {\n x: this.x2,\n y: this.y2\n };\n var point = $math.getMidPoint(point1, point2, position);\n var angle = $math.getAngle(point1, point2);\n return {\n x: point.x,\n y: point.y,\n angle: angle\n };\n };\n return Line;\n}(Sprite);\nexport { Line };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Line\"] = Line;","/**\r\n * amCharts 4 locale\r\n *\r\n * Locale: en\r\n * Language: International English\r\n * Author: Martynas Majeris\r\n *\r\n * Follow instructions in [on this page](https://www.amcharts.com/docs/v4/tutorials/creating-translations/) to make corrections or add new translations.\r\n *\r\n * ---\r\n * Edit but leave the header section above this line. You can remove any\r\n * subsequent comment sections.\r\n * ---\r\n *\r\n * Use this file as a template to create translations. Leave the key part in\r\n * English intact. Fill the value with a translation.\r\n *\r\n * Empty string means no translation, so default \"International English\"\r\n * will be used.\r\n *\r\n * If you need the translation to literally be an empty string, use `null`\r\n * instead.\r\n *\r\n * IMPORTANT:\r\n * When translating make good effort to keep the translation length\r\n * at least the same chartcount as the English, especially for short prompts.\r\n *\r\n * Having significantly longer prompts may distort the actual charts.\r\n *\r\n * NOTE:\r\n * Some prompts - like months or weekdays - come in two versions: full and\r\n * shortened.\r\n *\r\n * If there's no official shortened version of these in your language, and it\r\n * would not be possible to invent such short versions that don't seem weird\r\n * to native speakers of that language, fill those with the same as full\r\n * version.\r\n *\r\n * PLACEHOLDERS:\r\n * Some prompts have placeholders like \"%1\". Those will be replaced by actual\r\n * values during translation and should be retained in the translated prompts.\r\n *\r\n * Placeholder positions may be changed to better suit structure of the\r\n * sentence.\r\n *\r\n * For example \"From %1 to %2\", when actually used will replace \"%1\" with an\r\n * actual value representing range start, and \"%2\" will be replaced by end\r\n * value.\r\n *\r\n * E.g. in a Scrollbar for Value axis \"From %1 to %2\" will become\r\n * \"From 100 to 200\". You may translate \"From\" and \"to\", as well as re-arrange\r\n * the order of the prompt itself, but make sure the \"%1\" and \"%2\" remain, in\r\n * places where they will make sense.\r\n *\r\n * Save the file as language_LOCALE, i.e. `en_GB.ts`, `fr_FR.ts`, etc.\r\n */\nexport default {\n // Number formatting options.\n // \n // Please check with the local standards which separator is accepted to be\n // used for separating decimals, and which for thousands.\n \"_decimalSeparator\": \".\",\n \"_thousandSeparator\": \",\",\n // Suffixes for numbers\n // When formatting numbers, big or small numers might be reformatted to\n // shorter version, by applying a suffix.\n // \n // For example, 1000000 might become \"1m\".\n // Or 1024 might become \"1KB\" if we're formatting byte numbers.\n // \n // This section defines such suffixes for all such cases.\n \"_big_number_suffix_3\": \"k\",\n \"_big_number_suffix_6\": \"M\",\n \"_big_number_suffix_9\": \"G\",\n \"_big_number_suffix_12\": \"T\",\n \"_big_number_suffix_15\": \"P\",\n \"_big_number_suffix_18\": \"E\",\n \"_big_number_suffix_21\": \"Z\",\n \"_big_number_suffix_24\": \"Y\",\n \"_small_number_suffix_3\": \"m\",\n \"_small_number_suffix_6\": \"μ\",\n \"_small_number_suffix_9\": \"n\",\n \"_small_number_suffix_12\": \"p\",\n \"_small_number_suffix_15\": \"f\",\n \"_small_number_suffix_18\": \"a\",\n \"_small_number_suffix_21\": \"z\",\n \"_small_number_suffix_24\": \"y\",\n \"_byte_suffix_B\": \"B\",\n \"_byte_suffix_KB\": \"KB\",\n \"_byte_suffix_MB\": \"MB\",\n \"_byte_suffix_GB\": \"GB\",\n \"_byte_suffix_TB\": \"TB\",\n \"_byte_suffix_PB\": \"PB\",\n // Default date formats for various periods.\n // \n // This should reflect official or de facto formatting universally accepted\n // in the country translation is being made for\n // Available format codes here:\n // https://www.amcharts.com/docs/v4/concepts/formatters/formatting-date-time/#Format_codes\n // \n // This will be used when formatting date/time for particular granularity,\n // e.g. \"_date_hour\" will be shown whenever we need to show time as hours.\n // \n // \"date\" is used as in default date format when showing standalone dates.\n \"_date\": \"yyyy-MM-dd\",\n \"_date_millisecond\": \"mm:ss SSS\",\n \"_date_second\": \"HH:mm:ss\",\n \"_date_minute\": \"HH:mm\",\n \"_date_hour\": \"HH:mm\",\n \"_date_day\": \"MMM dd\",\n \"_date_week\": \"ww\",\n \"_date_month\": \"MMM\",\n \"_date_year\": \"yyyy\",\n // Default duration formats for various base units.\n // \n // This will be used by DurationFormatter to format numeric values into\n // duration.\n // \n // Notice how each duration unit comes in several versions. This is to ensure\n // that each base unit is shown correctly.\n // \n // For example, if we have baseUnit set to \"second\", meaning our duration is\n // in seconds.\n // \n // If we pass in `50` to formatter, it will know that we have just 50 seconds\n // (less than a minute) so it will use format in `\"_duration_second\"` (\"ss\"),\n // and the formatted result will be in like `\"50\"`.\n // \n // If we pass in `70`, which is more than a minute, the formatter will switch\n // to `\"_duration_second_minute\"` (\"mm:ss\"), resulting in \"01:10\" formatted\n // text.\n // \n // Available codes here:\n // https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/#Available_Codes\n \"_duration_millisecond\": \"SSS\",\n \"_duration_millisecond_second\": \"ss.SSS\",\n \"_duration_millisecond_minute\": \"mm:ss SSS\",\n \"_duration_millisecond_hour\": \"hh:mm:ss SSS\",\n \"_duration_millisecond_day\": \"d'd' mm:ss SSS\",\n \"_duration_millisecond_week\": \"d'd' mm:ss SSS\",\n \"_duration_millisecond_month\": \"M'm' dd'd' mm:ss SSS\",\n \"_duration_millisecond_year\": \"y'y' MM'm' dd'd' mm:ss SSS\",\n \"_duration_second\": \"ss\",\n \"_duration_second_minute\": \"mm:ss\",\n \"_duration_second_hour\": \"hh:mm:ss\",\n \"_duration_second_day\": \"d'd' hh:mm:ss\",\n \"_duration_second_week\": \"d'd' hh:mm:ss\",\n \"_duration_second_month\": \"M'm' dd'd' hh:mm:ss\",\n \"_duration_second_year\": \"y'y' MM'm' dd'd' hh:mm:ss\",\n \"_duration_minute\": \"mm\",\n \"_duration_minute_hour\": \"hh:mm\",\n \"_duration_minute_day\": \"d'd' hh:mm\",\n \"_duration_minute_week\": \"d'd' hh:mm\",\n \"_duration_minute_month\": \"M'm' dd'd' hh:mm\",\n \"_duration_minute_year\": \"y'y' MM'm' dd'd' hh:mm\",\n \"_duration_hour\": \"hh'h'\",\n \"_duration_hour_day\": \"d'd' hh'h'\",\n \"_duration_hour_week\": \"d'd' hh'h'\",\n \"_duration_hour_month\": \"M'm' dd'd' hh'h'\",\n \"_duration_hour_year\": \"y'y' MM'm' dd'd' hh'h'\",\n \"_duration_day\": \"d'd'\",\n \"_duration_day_week\": \"d'd'\",\n \"_duration_day_month\": \"M'm' dd'd'\",\n \"_duration_day_year\": \"y'y' MM'm' dd'd'\",\n \"_duration_week\": \"w'w'\",\n \"_duration_week_month\": \"w'w'\",\n \"_duration_week_year\": \"w'w'\",\n \"_duration_month\": \"M'm'\",\n \"_duration_month_year\": \"y'y' MM'm'\",\n \"_duration_year\": \"y'y'\",\n // Era translations\n \"_era_ad\": \"AD\",\n \"_era_bc\": \"BC\",\n // Day part, used in 12-hour formats, e.g. 5 P.M.\n // Please note that these come in 3 variants:\n // * one letter (e.g. \"A\")\n // * two letters (e.g. \"AM\")\n // * two letters with dots (e.g. \"A.M.\")\n // \n // All three need to to be translated even if they are all the same. Some\n // users might use one, some the other.\n \"A\": \"\",\n \"P\": \"\",\n \"AM\": \"\",\n \"PM\": \"\",\n \"A.M.\": \"\",\n \"P.M.\": \"\",\n // Date-related stuff.\n // \n // When translating months, if there's a difference, use the form which is\n // best for a full date, e.g. as you would use it in \"2018 January 1\".\n // \n // Note that May is listed twice. This is because in English May is the same\n // in both long and short forms, while in other languages it may not be the\n // case. Translate \"May\" to full word, while \"May(short)\" to shortened\n // version.\n // \n // Should month names and weekdays be capitalized or not?\n // \n // Rule of thumb is this: if the names should always be capitalized,\n // regardless of name position within date (\"January\", \"21st January 2018\",\n // etc.) use capitalized names. Otherwise enter all lowercase.\n // \n // The date formatter will automatically capitalize names if they are the\n // first (or only) word in resulting date.\n \"January\": \"\",\n \"February\": \"\",\n \"March\": \"\",\n \"April\": \"\",\n \"May\": \"\",\n \"June\": \"\",\n \"July\": \"\",\n \"August\": \"\",\n \"September\": \"\",\n \"October\": \"\",\n \"November\": \"\",\n \"December\": \"\",\n \"Jan\": \"\",\n \"Feb\": \"\",\n \"Mar\": \"\",\n \"Apr\": \"\",\n \"May(short)\": \"May\",\n \"Jun\": \"\",\n \"Jul\": \"\",\n \"Aug\": \"\",\n \"Sep\": \"\",\n \"Oct\": \"\",\n \"Nov\": \"\",\n \"Dec\": \"\",\n // Weekdays.\n \"Sunday\": \"\",\n \"Monday\": \"\",\n \"Tuesday\": \"\",\n \"Wednesday\": \"\",\n \"Thursday\": \"\",\n \"Friday\": \"\",\n \"Saturday\": \"\",\n \"Sun\": \"\",\n \"Mon\": \"\",\n \"Tue\": \"\",\n \"Wed\": \"\",\n \"Thu\": \"\",\n \"Fri\": \"\",\n \"Sat\": \"\",\n // Date ordinal function.\n // \n // This is used when adding number ordinal when formatting days in dates.\n // \n // E.g. \"January 1st\", \"February 2nd\".\n // \n // The function accepts day number, and returns a string to be added to the\n // day, like in default English translation, if we pass in 2, we will receive\n // \"nd\" back.\n \"_dateOrd\": function _dateOrd(day) {\n var res = \"th\";\n if (day < 11 || day > 13) {\n switch (day % 10) {\n case 1:\n res = \"st\";\n break;\n case 2:\n res = \"nd\";\n break;\n case 3:\n res = \"rd\";\n break;\n }\n }\n return res;\n },\n // Various chart controls.\n // Shown as a tooltip on zoom out button.\n \"Zoom Out\": \"\",\n // Timeline buttons\n \"Play\": \"\",\n \"Stop\": \"\",\n // Chart's Legend screen reader title.\n \"Legend\": \"\",\n // Legend's item screen reader indicator.\n \"Click, tap or press ENTER to toggle\": \"\",\n // Shown when the chart is busy loading something.\n \"Loading\": \"\",\n // Shown as the first button in the breadcrumb navigation, e.g.:\n // Home > First level > ...\n \"Home\": \"\",\n // Chart types.\n // Those are used as default screen reader titles for the main chart element\n // unless developer has set some more descriptive title.\n \"Chart\": \"\",\n \"Serial chart\": \"\",\n \"X/Y chart\": \"\",\n \"Pie chart\": \"\",\n \"Gauge chart\": \"\",\n \"Radar chart\": \"\",\n \"Sankey diagram\": \"\",\n \"Flow diagram\": \"\",\n \"Chord diagram\": \"\",\n \"TreeMap chart\": \"\",\n \"Force directed tree\": \"\",\n \"Sliced chart\": \"\",\n // Series types.\n // Used to name series by type for screen readers if they do not have their\n // name set.\n \"Series\": \"\",\n \"Candlestick Series\": \"\",\n \"OHLC Series\": \"\",\n \"Column Series\": \"\",\n \"Line Series\": \"\",\n \"Pie Slice Series\": \"\",\n \"Funnel Series\": \"\",\n \"Pyramid Series\": \"\",\n \"X/Y Series\": \"\",\n // Map-related stuff.\n \"Map\": \"\",\n \"Press ENTER to zoom in\": \"\",\n \"Press ENTER to zoom out\": \"\",\n \"Use arrow keys to zoom in and out\": \"\",\n \"Use plus and minus keys on your keyboard to zoom in and out\": \"\",\n // Export-related stuff.\n // These prompts are used in Export menu labels.\n // \n // \"Export\" is the top-level menu item.\n // \n // \"Image\", \"Data\", \"Print\" as second-level indicating type of export\n // operation.\n // \n // Leave actual format untranslated, unless you absolutely know that they\n // would convey more meaning in some other way.\n \"Export\": \"\",\n \"Image\": \"\",\n \"Data\": \"\",\n \"Print\": \"\",\n \"Click, tap or press ENTER to open\": \"\",\n \"Click, tap or press ENTER to print.\": \"\",\n \"Click, tap or press ENTER to export as %1.\": \"\",\n 'To save the image, right-click this link and choose \"Save picture as...\"': \"\",\n 'To save the image, right-click thumbnail on the left and choose \"Save picture as...\"': \"\",\n \"(Press ESC to close this message)\": \"\",\n \"Image Export Complete\": \"\",\n \"Export operation took longer than expected. Something might have gone wrong.\": \"\",\n \"Saved from\": \"\",\n \"PNG\": \"\",\n \"JPG\": \"\",\n \"GIF\": \"\",\n \"SVG\": \"\",\n \"PDF\": \"\",\n \"JSON\": \"\",\n \"CSV\": \"\",\n \"XLSX\": \"\",\n // Scrollbar-related stuff.\n // \n // Scrollbar is a control which can zoom and pan the axes on the chart.\n // \n // Each scrollbar has two grips: left or right (for horizontal scrollbar) or\n // upper and lower (for vertical one).\n // \n // Prompts change in relation to whether Scrollbar is vertical or horizontal.\n // \n // The final section is used to indicate the current range of selection.\n \"Use TAB to select grip buttons or left and right arrows to change selection\": \"\",\n \"Use left and right arrows to move selection\": \"\",\n \"Use left and right arrows to move left selection\": \"\",\n \"Use left and right arrows to move right selection\": \"\",\n \"Use TAB select grip buttons or up and down arrows to change selection\": \"\",\n \"Use up and down arrows to move selection\": \"\",\n \"Use up and down arrows to move lower selection\": \"\",\n \"Use up and down arrows to move upper selection\": \"\",\n \"From %1 to %2\": \"\",\n \"From %1\": \"\",\n \"To %1\": \"\",\n // Data loader-related.\n \"No parser available for file: %1\": \"\",\n \"Error parsing file: %1\": \"\",\n \"Unable to load file: %1\": \"\",\n \"Invalid date\": \"\"\n};","/**\r\n * Language module contains everything related to language-specific operations:\r\n * * Translating prompts\r\n * * Translating functions\r\n * * Date format localizations\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObjectEvents } from \"../Base\";\nimport { Adapter } from \"./Adapter\";\nimport * as $array from \"./Array\";\nimport * as $type from \"./Type\";\nimport en from \"../../../lang/en\";\nimport { options } from \"../Options\";\n;\n;\n/**\r\n * Handles all language-related tasks, like loading and storing translations,\r\n * translating prompts, lists of prompts and even functions.\r\n *\r\n * Almost every object in amCharts4 universe will have a `language` property,\r\n * which can be accessed for prompt translation.\r\n *\r\n * @see {@link ILanguageAdapters} for a list of available Adapters\r\n * @todo Make prompt keys case-insensitive\r\n * @important\r\n */\nvar Language = /** @class */function (_super) {\n tslib_1.__extends(Language, _super);\n /**\r\n * Constructor\r\n */\n function Language() {\n var _this = _super.call(this) || this;\n /**\r\n * Adapter.\r\n */\n _this.adapter = new Adapter(_this);\n /**\r\n * Current locale.\r\n */\n _this._locale = en;\n /**\r\n * Default locale. A locale to fall back to if none is specified, or\r\n * if there's no translation for the prompt for the current language.\r\n */\n _this._defaultLocale = en;\n _this.className = \"Language\";\n // Set default language if necessary\n if ($type.hasValue(options.defaultLocale)) {\n _this.locale = options.defaultLocale;\n }\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Returns locale that is currently used.\r\n *\r\n * @param locale Force locale. Will use current language if not set.\r\n * @return Locale\r\n */\n Language.prototype.getLocale = function (locale) {\n if (locale == null) {\n locale = this._locale;\n }\n return this.adapter.apply(\"locale\", {\n locale: locale\n }).locale;\n };\n /**\r\n * Returns the translation of the string.\r\n *\r\n * If the translation is empty, it will return untranslated prompt.\r\n *\r\n * Third parameter and up are strings that can be used to replace \"%X\"\r\n * placeholders in prompt.\r\n *\r\n * E.g.:\r\n *\r\n * ```TypeScript\r\n * // Results in \"This is a first translation test\"\r\n * chart.language.translate(\"This is a %1 translation %2\", null, \"first\", \"test\");\r\n * ```\r\n * ```JavaScriptScript\r\n * // Results in \"This is a first translation test\"\r\n * chart.language.translate(\"This is a %1 translation %2\", null, \"first\", \"test\");\r\n * ```\r\n *\r\n * @param prompt A string to translate\r\n * @param locale Force translation into specific locale, e.g. fr_FR\r\n * @param ...rest Parameters to replace in string\r\n * @return Translation\r\n */\n Language.prototype.translate = function (prompt, locale) {\n var rest = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n rest[_i - 2] = arguments[_i];\n }\n // Get langauge\n locale = this.getLocale(locale);\n // Init translation\n var translation = prompt;\n // Get translations for the locale\n var translations = this.getTranslations(locale);\n var value = translations[prompt];\n // Try to look for the translation\n if (value === null) {\n value = \"\";\n } else if ($type.hasValue(value)) {\n // It might be an empty string\n if (value) {\n translation = value;\n }\n } else if (locale !== this._defaultLocale) {\n // Try to look in default language\n return this.translate.apply(this, tslib_1.__spread([prompt, this._defaultLocale], rest));\n }\n // Replace %1, %2, etc params\n if (rest.length) {\n for (var len = rest.length, i = 0; i < len; ++i) {\n translation = translation.split(\"%\" + (i + 1)).join(rest[i]);\n }\n }\n // Return the translation\n return this.adapter.apply(\"translate\", {\n translation: translation,\n locale: locale\n }).translation;\n };\n /**\r\n * Translates prompt.\r\n *\r\n * If translation is empty, it will return empty string, which is a different\r\n * behavior than that of regular `translate`.\r\n *\r\n * @param prompt A string to translate\r\n * @param locale Force translation into specific locale, e.g. fr_FR\r\n * @param ...rest Parameters to replace in string\r\n * @return Translation\r\n */\n Language.prototype.translateEmpty = function (prompt, locale) {\n var rest = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n rest[_i - 2] = arguments[_i];\n }\n var translation = this.translate.apply(this, tslib_1.__spread([prompt, locale], rest));\n return translation == prompt ? \"\" : translation;\n };\n /**\r\n * Translates a function.\r\n *\r\n * This method will return a function reference, but will not run it. It's\r\n * up to the caller script to run the function.\r\n *\r\n * @param prompt A function id to translate\r\n * @param locale Force translation into specific locale. e.g. fr_FR\r\n * @return A language-specific version of the function\r\n * @todo Apply adapter\r\n */\n Language.prototype.translateFunc = function (prompt, locale) {\n // Get langauge\n locale = this.getLocale(locale);\n // Get translations for the locale\n var translations = this.getTranslations(locale);\n var value = translations[prompt];\n // Try to look for the translation\n if (value != null) {\n return value;\n }\n // Try to look in default language\n if (locale !== this._defaultLocale) {\n return this.translateFunc(prompt, this._defaultLocale);\n }\n // Fail - return empty function\n return function () {\n return \"\";\n };\n };\n /**\r\n * Translates a list of prompts in one go.\r\n *\r\n * @param list An array of strings to translate\r\n * @param locale Force translation into specific locale. e.g. fr_FR\r\n * @return An array of translated strings in the same order as source list\r\n */\n Language.prototype.translateAll = function (list, locale) {\n var _this = this;\n // Translate all items in the list\n if (!this.isDefault()) {\n return $array.map(list, function (x) {\n return _this.translate(x, locale);\n });\n } else {\n return list;\n }\n };\n /**\r\n * Returns `true` if the currently selected locale is a default locale.\r\n *\r\n * @return `true` if locale is default; `false` if it is not.\r\n */\n Language.prototype.isDefault = function () {\n return this._defaultLocale === this._locale;\n };\n Object.defineProperty(Language.prototype, \"locale\", {\n /**\r\n * @return Locale definition\r\n */\n get: function get() {\n return this._locale;\n },\n /**\r\n * Current locale.\r\n *\r\n * @param value Locale definition (translations)\r\n */\n set: function set(value) {\n if (this._locale != value) {\n this._locale = value;\n if (this.events.isEnabled(\"localechanged\")) {\n var event_1 = {\n type: \"localechanged\",\n locale: value,\n target: this\n };\n this.events.dispatchImmediately(\"localechanged\", event_1);\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns translations for a given locale.\r\n *\r\n * @ignore\r\n * @deprecated\r\n * @param locale Locale\r\n * @return Translations\r\n */\n Language.prototype.getTranslations = function (locale) {\n return this.adapter.apply(\"translations\", {\n translations: locale,\n locale: locale\n }).translations;\n };\n return Language;\n}(BaseObjectEvents);\nexport { Language };","/**\r\n * A collection of keyboard-related utilities accessible via `keyboard`\r\n * instance.\r\n */\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport * as $type from \"./Type\";\n/**\r\n * A class that represents collection of keyboard-related utilities.\r\n *\r\n * Do not instantiate this class directly, but rather use `keyboard` variable.\r\n */\nvar Keyboard = /** @class */function () {\n function Keyboard() {}\n /**\r\n * Returns a named key based on information contained in the event or\r\n * \"other\".\r\n *\r\n * @param ev A keyboard event\r\n * @return Keyboard named key\r\n */\n Keyboard.prototype.getEventKey = function (ev) {\n // Get the key code\n var code = ev.keyCode || ev.which,\n key;\n // Map to internal key\n switch (code) {\n case 38:\n key = \"up\";\n break;\n case 40:\n key = \"down\";\n break;\n case 37:\n key = \"left\";\n break;\n case 39:\n key = \"right\";\n break;\n case 13:\n key = \"enter\";\n break;\n case 27:\n key = \"esc\";\n break;\n case 36:\n key = \"home\";\n break;\n case 35:\n key = \"end\";\n break;\n case 9:\n key = \"tab\";\n break;\n case 17:\n key = \"ctrl\";\n break;\n case 18:\n key = \"alt\";\n break;\n case 16:\n key = \"shift\";\n break;\n case 32:\n key = \"space\";\n break;\n case 36:\n key = \"home\";\n break;\n case 35:\n key = \"end\";\n break;\n case 33:\n key = \"pgup\";\n break;\n case 34:\n key = \"pgdn\";\n break;\n case 45:\n key = \"ins\";\n break;\n case 46:\n key = \"del\";\n break;\n case 107:\n key = \"plus\";\n break;\n case 109:\n key = \"minus\";\n break;\n default:\n key = \"other\";\n break;\n }\n return key;\n };\n /**\r\n * Checks if event key is one or more of the selected named keys.\r\n *\r\n * @param ev Keyboard event\r\n * @param key Named key or array of keys\r\n * @return Is event key one of the list?\r\n */\n Keyboard.prototype.isKey = function (ev, key) {\n var eventKey = this.getEventKey(ev);\n if ($type.isString(key)) {\n key = [key];\n }\n return key.indexOf(eventKey) !== -1;\n };\n /**\r\n * Returns `true` if shift key was presset at the moment of the event.\r\n *\r\n * @param ev Event object\r\n * @return Was shift pressed?\r\n */\n Keyboard.prototype.shiftKey = function (ev) {\n return ev.shiftKey;\n };\n /**\r\n * Returns `true` if ctrl key was presset at the moment of the event.\r\n *\r\n * @param ev Event object\r\n * @return Was ctrl pressed?\r\n */\n Keyboard.prototype.ctrlKey = function (ev) {\n return ev.ctrlKey;\n };\n /**\r\n * Returns `true` if alt key was presset at the moment of the event\r\n * @param ev Event object\r\n * @return Was alt pressed?\r\n */\n Keyboard.prototype.altKey = function (ev) {\n return ev.altKey;\n };\n /**\r\n * Returns `true` if meta key was presset at the moment of the event\r\n * @param ev Event object\r\n * @return Was meta pressed?\r\n */\n Keyboard.prototype.metaKey = function (ev) {\n return ev.metaKey;\n };\n return Keyboard;\n}();\nexport { Keyboard };\n/**\r\n * A single [[Keyboard]] instance to be reused across all elements so that\r\n * they don't need to instantiate their own.\r\n *\r\n * @ignore Exclude from docs\r\n */\nexport var keyboard = new Keyboard();","/**\r\n * Handles formatting of pseudo-markup in text.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObject } from \"../Base\";\nimport { AMElement } from \"../rendering/AMElement\";\nimport { Adapter } from \"../utils/Adapter\";\nimport { registry } from \"../Registry\";\nimport * as $strings from \"../utils/Strings\";\nimport * as $type from \"../utils/Type\";\n/**\r\n * Handles formatting of pseudo-markdown in text.\r\n *\r\n * @todo Encode < > in output\r\n * @todo Add more adapters\r\n * @important\r\n */\nvar TextFormatter = /** @class */function (_super) {\n tslib_1.__extends(TextFormatter, _super);\n /**\r\n * Constructor\r\n */\n function TextFormatter() {\n var _this = _super.call(this) || this;\n /**\r\n * Adapter.\r\n */\n _this.adapter = new Adapter(_this);\n _this.className = \"TextFormatter\";\n _this.applyTheme();\n return _this;\n }\n TextFormatter.prototype.debug = function () {};\n /**\r\n * Formats the text according to specifications passed in.\r\n *\r\n * @param text Text to format\r\n * @param output Output format (svg, html)\r\n * @return Formatted text\r\n */\n TextFormatter.prototype.format = function (text, output) {\n // Apply default\n if (!$type.hasValue(output)) {\n output = \"svg\";\n }\n // Init return value\n var formatted = \"\";\n // Replace double (escaped) square spaces with remporary codes\n text = this.escape(text);\n // Divvy up the string by style tags\n var styles = text.match(/\\[([^\\]]*?)\\]/gm);\n if (!styles) {\n // Nothing to do here - no formatting elements\n return this.wrap(text, \"\", output);\n }\n // Get pure text - no style tags\n var texts = text.split(/\\[[^\\[\\]]*\\]/);\n // Go through each of the texts and wrap it in style tags\n for (var i = 0, len = texts.length; i < len; i++) {\n // Get text bit\n var t = texts[i];\n // Check if string is empty\n if (t === \"\") {\n continue;\n }\n // Run through an adapter\n t = this.adapter.apply(\"chunk\", t);\n // Get related style\n var s = \"\";\n if (i > 0) {\n s = styles[i - 1].replace('[', '').replace(']', '');\n }\n // Wrap text in tag\n formatted += this.wrap(t, s, output);\n }\n // Replace placeholders back\n formatted = this.unescape(formatted);\n // Return result\n return this.cleanUp(formatted);\n };\n /**\r\n * Replaces brackets with temporary placeholders.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Input text\r\n * @return Escaped text\r\n */\n TextFormatter.prototype.escape = function (text) {\n return text.replace(/\\[\\[/g, registry.getPlaceholder(\"1\")).replace(/([^\\/]{1})\\]\\]/g, \"$1\" + registry.getPlaceholder(\"2\")).replace(/\\{\\{/g, registry.getPlaceholder(\"3\")).replace(/\\}\\}/g, registry.getPlaceholder(\"4\")).replace(/\\'\\'/g, registry.getPlaceholder(\"5\"));\n };\n /**\r\n * Replaces placeholders back to brackets.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Escaped text\r\n * @return Unescaped text\r\n */\n TextFormatter.prototype.unescape = function (text) {\n return text.replace(new RegExp(registry.getPlaceholder(\"1\"), \"g\"), \"[[\").replace(new RegExp(registry.getPlaceholder(\"2\"), \"g\"), \"]]\").replace(new RegExp(registry.getPlaceholder(\"3\"), \"g\"), \"{{\").replace(new RegExp(registry.getPlaceholder(\"4\"), \"g\"), \"}}\").replace(new RegExp(registry.getPlaceholder(\"5\"), \"g\"), \"'\");\n };\n /**\r\n * Cleans up the text text for leftover double square brackets.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Input text\r\n * @return Cleaned up text\r\n */\n TextFormatter.prototype.cleanUp = function (text) {\n return text.replace(/\\[\\[/g, \"[\").replace(/\\]\\]/g, \"]\").replace(/\\{\\{/g, \"{\").replace(/\\}\\}/g, \"}\").replace(/\\'\\'/g, \"'\");\n };\n /**\r\n * Wraps text into corresponding tags.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Text to wrap\r\n * @param style Styles\r\n * @param output Format to output in (svg, html)\r\n * @return Formatted string\r\n */\n TextFormatter.prototype.wrap = function (text, style, output) {\n if (style === \"\" || style === \"/\") {\n //return text;\n style = \"\";\n }\n switch (output) {\n case \"html\":\n return this.wrapHtml(text, this.translateStyleShortcuts(style));\n default:\n return this.wrapSvg(text, this.translateStyleShortcuts(style));\n }\n };\n /**\r\n * Wraps text in styled SVG tag.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Text to wrap\r\n * @param style Style property\r\n * @return Formatted tag\r\n */\n TextFormatter.prototype.wrapSvg = function (text, style) {\n if (style === \"\") {\n return \"<tspan>\" + text + \"</tspan>\";\n } else {\n return \"<tspan style='\" + style + \"'>\" + text + \"</tspan>\";\n }\n };\n /**\r\n * Returns an SVG `<tspan>` element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Text\r\n * @param style Style\r\n * @return Element\r\n */\n TextFormatter.prototype.getSvgElement = function (text, style) {\n var element = new AMElement(\"tspan\");\n element.textContent = text;\n if (style) {\n element.node.setAttribute(\"style\", style);\n }\n return element;\n };\n /**\r\n * Wraps text in HTML <span> tag.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Text to wrap\r\n * @param style Style property\r\n * @return Formatted tag\r\n * @todo Translate SVG styles into HTML ones\r\n */\n TextFormatter.prototype.wrapHtml = function (text, style) {\n if (style === \"\") {\n return \"<span>\" + text + \"</span>\";\n } else {\n return \"<span style='\" + this.styleSvgToHtml(style) + \"'>\" + text + \"</span>\";\n }\n };\n /**\r\n * Returns an HTML `<span>` element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Text/HTML\r\n * @param style Style definition\r\n * @return HTML element\r\n */\n TextFormatter.prototype.getHtmlElement = function (text, style) {\n var element = document.createElement(\"span\");\n element.innerHTML = text;\n if (style) {\n element.setAttribute(\"style\", style);\n }\n return element;\n };\n /**\r\n * Trabslates SVG CSS into HTML CSS.\r\n *\r\n * @ignore Exclude from docs\r\n * @param style SVG CSS\r\n * @return HTML CSS\r\n * @todo Implement actual translation\r\n */\n TextFormatter.prototype.styleSvgToHtml = function (style) {\n style = style.replace(/fill:/, \"color:\");\n return style;\n };\n /**\r\n * Translates style shortcuts into full styles, i.e.:\r\n * \"bold\" => \"font-weight: bold\"\r\n * \"#f00\" => \"fill: #f00\"\r\n *\r\n * @ignore Exclude from docs\r\n * @param style Untranslated style\r\n * @return Translated style\r\n * @todo Implement actual translation\r\n */\n TextFormatter.prototype.translateStyleShortcuts = function (style) {\n if (style == \"\" || style == \"[ ]\") {\n return \"\";\n }\n var cached = registry.getCache(\"translateStyleShortcuts_\" + style);\n if (cached) {\n return cached;\n }\n // Get style parts\n var b = style.match(/([\\w\\-]*:[\\s]?[^;\\s\\]]*)|(\\#[\\w]{1,6})|([\\w]+)|(\\/)/gi);\n // Empty?\n if (!b) {\n return style;\n }\n // Check each part\n for (var i = 0; i < b.length; i++) {\n if (b[i].match(/^bold$/i)) {\n // Bold\n b[i] = \"font-weight:\" + b[i];\n } else if (b[i] == \"/\") {\n // Just closing tag\n // Do nothing\n b[i] = \"\";\n } else if (!b[i].match(/:/)) {\n // Color\n b[i] = \"fill:\" + b[i];\n }\n }\n var res = b.join(';');\n registry.setCache(\"translateStyleShortcuts_\" + style, res);\n return res;\n };\n /**\r\n * Splits string into chunks. (style blocks, quoted blocks, regular blocks)\r\n *\r\n * If the second parameter `quotedBlocks` is set to `true` this method will\r\n * also single out text blocks enclosed within single quotes that no\r\n * formatting should be applied to, and they should be displayed as is.\r\n *\r\n * Default for the above is `false`, so that you can use single quote in text\r\n * without escaping it.\r\n *\r\n * If enabled, single quotes can be escaped by doubling it - adding two\r\n * single quotes, which will be replaced by a one single quote in the final\r\n * output.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Text to chunk\r\n * @param quotedBlocks Use quoted blocks\r\n * @param noFormatting Formatting blocks will be treated as regular text\r\n * @return Array of string chunks\r\n */\n TextFormatter.prototype.chunk = function (text, quotedBlocks, noFormatting) {\n if (quotedBlocks === void 0) {\n quotedBlocks = false;\n }\n if (noFormatting === void 0) {\n noFormatting = false;\n }\n // Init result\n var res = [];\n // Replace double (escaped) square spaces and quotes with temporary codes\n text = this.escape(text);\n // Deal with style blocks\n var chunks = quotedBlocks ? text.split(\"'\") : [text];\n for (var i = 0; i < chunks.length; i++) {\n var chunk = chunks[i];\n // Empty?\n if (chunk === \"\") {\n continue;\n }\n if (i % 2 === 0) {\n // Text outside quotes\n // Parse for style blocks which are \"text\" chunks, the rest chunks are\n // \"value\"\n chunk = chunk.replace(/\\]\\[/g, \"]\" + $strings.PLACEHOLDER + \"[\");\n chunk = chunk.replace(/\\[\\]/g, \"[ ]\");\n var chunks2 = chunk.split(/[\\[\\]]+/);\n for (var i2 = 0; i2 < chunks2.length; i2++) {\n var chunk2 = this.cleanUp(this.unescape(chunks2[i2]));\n // Placeholder?\n if (chunk2 === $strings.PLACEHOLDER) {\n continue;\n }\n // Empty?\n if (chunk2 === \"\") {\n continue;\n }\n // Block or value\n if (i2 % 2 === 0) {\n res.push({\n \"type\": \"value\",\n \"text\": this.adapter.apply(\"chunk\", chunk2)\n });\n } else {\n res.push({\n \"type\": noFormatting ? \"value\" : \"format\",\n \"text\": \"[\" + chunk2 + \"]\"\n });\n }\n }\n } else {\n // A text within doublequotes\n // All chunks are \"text\"\n var chunks2 = chunk.split(/[\\[\\]]+/);\n for (var i2 = 0; i2 < chunks2.length; i2++) {\n var chunk2 = this.cleanUp(this.unescape(chunks2[i2]));\n // Empty?\n if (chunk2 === \"\") {\n continue;\n }\n // Block or text\n if (i2 % 2 === 0) {\n res.push({\n \"type\": \"text\",\n \"text\": chunk2\n });\n } else if (this.isImage(chunk2)) {\n res.push({\n \"type\": \"image\",\n \"text\": \"[\" + chunk2 + \"]\"\n });\n } else {\n res.push({\n \"type\": \"format\",\n \"text\": \"[\" + chunk2 + \"]\"\n });\n }\n }\n }\n }\n return res;\n };\n /**\r\n * Checks if supplied format contains image information and should be\r\n * formatted as such.\r\n * I.e.: `[img: myImage.png]`\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Format\r\n * @return `true` if it is an image\r\n */\n TextFormatter.prototype.isImage = function (text) {\n return text.match(/img[ ]?:/) ? true : false;\n };\n return TextFormatter;\n}(BaseObject);\nexport { TextFormatter };\nvar formatter;\n/**\r\n * Returns the global instance of [[TextFormatter]].\r\n *\r\n * All classes and instances should reuse this universal text formatter,\r\n * rather than create their own instance of it.\r\n */\nexport function getTextFormatter() {\n if (formatter == null) {\n formatter = new TextFormatter();\n }\n return formatter;\n}\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"TextFormatter\"] = TextFormatter;","import _ from 'lodashExtended'\n\nconst getBulkContainmentData = (bulkContainmentId, state) => {\n return (_.get(state.firestore, `data.bulkContainments.${bulkContainmentId}`) || {})\n}\n\nconst getBulkContainmentsForSection = (sectionId, state) => {\n return _.filter((_.get(state.firestore, `ordered.bulkContainments`) || []), {sectionId})\n}\n\nexport {\n getBulkContainmentData,\n getBulkContainmentsForSection\n}\n","import CloseIcon from \"@mui/icons-material/Close\";\nimport { Box, Button, IconButton, Stack } from \"@mui/material\";\nimport { StakeholderContacts } from \"api/tickets\";\nimport {\n prepareCannedResponse,\n useCannedResponses,\n} from \"hooks/useCannedResponses\";\nimport { useFetch } from \"hooks/useFetch\";\nimport { lowerCase, pick } from \"lodash\";\nimport React, { createContext, useContext, useEffect, useState } from \"react\";\nimport getType from \"service/forms\";\nimport { scrollToBottom } from \"service/ticket/utils\";\nimport { useFormServiceActionMutation } from \"../../api/services\";\nimport { ServiceActionMessageForm } from \"./ServiceActionMessageForm\";\nimport FormSkeleton from \"./common/FormSkeleton\";\nimport AppContext from \"ticket/AppContext\";\nimport { useTicket } from \"ticket/selectors\";\nimport AgentSelect from \"service/ticket/channel-footer/form/AgentSelect\";\nimport { DebugButton } from \"service/GlobalDebugger\";\n\ninterface NewMessageActionFormProps {\n formUrl: string;\n onClose: () => void;\n stakeholderContacts: {\n organisation: StakeholderContacts;\n agent: StakeholderContacts;\n vendor: StakeholderContacts;\n };\n reply?: any;\n}\n\nconst formTypeMapping = {\n adhoc: [\"adhoc\"],\n resumption: [\"resumption\"],\n stock: [\"stock\"],\n spec: [\"spec\"],\n frequency: [\"frequency\"],\n suspension: [\"suspension\"],\n termination: [\"termination\"],\n};\n\nexport const MessageFormContext = createContext({\n vendorResponse: {\n message: \"\",\n toContactId: \"\",\n setToContactId: (_x) => {},\n resetToCannedResponse: () => {},\n setMessage: (_x) => {},\n },\n vendorError: false,\n sendMessageVendor: false,\n setSendMessageVendor: (_x) => {},\n stakeholderContacts: {},\n setVendorError: (_x) => {},\n organisationResponse: {\n message: \"\",\n toContactId: \"\",\n setToContactId: (_x) => {},\n resetToCannedResponse: () => {},\n setMessage: (_x) => {},\n },\n organisationError: false,\n sendMessageOrganisation: false,\n setSendMessageOrganisation: (_x) => {},\n setOrganisationError: (_x) => {},\n formData: {},\n});\n\n\nconst NewMessageActionForm: React.FC<NewMessageActionFormProps> = ({\n formUrl,\n onClose,\n stakeholderContacts,\n reply,\n}) => {\n const ticket = useTicket();\n const { setFormType, setCardTab } = useContext(AppContext);\n const [sendMessageOrganisation, setSendMessageOrganisation] = useState(true);\n const [sendMessageVendor, setSendMessageVendor] = useState(true);\n\n const [organisationError, setOrganisationError] = useState(false);\n const [vendorError, setVendorError] = useState(false);\n const [assignedAgentId, setAssignedAgentId] = useState(\n ticket?.assignedAgent?.id || \"\"\n );\n\n const [formData, setFormData, formLoaded] = useFetch(formUrl, {\n credentials: \"same-origin\",\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n });\n\n const [submitForm, submitFormResult] = useFormServiceActionMutation();\n\n const { isError: isSubmitError, isLoading: isSubmittting } = submitFormResult;\n\n const {\n vendorResponse,\n organisationResponse,\n formDefaults,\n responsesLoaded,\n } = useCannedResponses(formUrl, formData);\n\n const isOrganisationMessageEmpty =\n sendMessageOrganisation && !organisationResponse?.message;\n const isVendorMessageEmpty = sendMessageVendor && !vendorResponse?.message;\n\n const FormType = formData ? getType(formData?.type) : null;\n\n const updateForm = (newFormArgs) => {\n setFormData((prevData) => {\n return {\n ...prevData,\n form: {\n ...prevData.form,\n ...newFormArgs,\n },\n };\n });\n };\n\n const submitHandler = () => {\n let hasError = false;\n\n if (isOrganisationMessageEmpty) {\n setOrganisationError(true);\n hasError = true;\n }\n\n if (isVendorMessageEmpty) {\n setVendorError(true);\n hasError = true;\n }\n\n if (hasError) return;\n\n submitForm({\n url: formUrl,\n body: prepareCannedResponse({\n form: {\n ...formData.form,\n assignedAgentId,\n organisationResponse: pick(organisationResponse, [\n \"toContactId\",\n \"responseExpected\",\n sendMessageOrganisation && \"message\",\n ]),\n vendorResponse: pick(vendorResponse, [\n \"toContactId\",\n \"responseExpected\",\n sendMessageVendor && \"message\",\n ]),\n },\n }),\n })\n .unwrap()\n .then(({ data }) => setFormData(data))\n .then(() => {\n const formTypeLowerCase = lowerCase(formData.type);\n // Find the form type based on the formData.type\n const foundFormType = Object.keys(formTypeMapping).find((key) =>\n formTypeMapping[key].some((type) => formTypeLowerCase.includes(type))\n );\n\n if (formTypeLowerCase.includes(\"report\")) {\n setCardTab(\"report\");\n } else {\n // Set the found form type, default to a fallback if not found\n setFormType(foundFormType || \"all\");\n }\n })\n .then(() => scrollToBottom())\n .then(() => onClose())\n .catch(({ data }) => setFormData(data));\n };\n\n const showForm = formLoaded && responsesLoaded && FormType;\n\n useEffect(() => {\n const errors = formData?.errors;\n if (errors?.vendorMessage) setVendorError(true);\n if (errors?.organisationMessage) setOrganisationError(true);\n }, [formData]);\n\n return (\n <>\n <Box\n sx={{\n display: \"flex\",\n justifyContent: \"end\",\n position: \"absolute\",\n top: '2px',\n right: '0px',\n }}\n >\n <DebugButton buttonSize=\"small\" {...formData} />\n <IconButton sx={{ color: '#fff', }} onClick={onClose}>\n <CloseIcon />\n </IconButton>\n </Box>\n\n {showForm ? (\n <MessageFormContext.Provider\n value={{\n vendorResponse,\n vendorError,\n sendMessageVendor,\n setSendMessageVendor,\n setVendorError,\n stakeholderContacts,\n organisationResponse,\n organisationError,\n sendMessageOrganisation,\n setSendMessageOrganisation,\n setOrganisationError,\n formData,\n }}\n >\n\n <Box>\n\n <FormType\n {...formData}\n replyVisitFailure={reply}\n onSetForm={updateForm}\n />\n <ServiceActionMessageForm formDefaults={formDefaults || formData?.formDefaults} />\n\n </Box>\n\n <Stack\n direction=\"row\"\n justifyContent=\"flex-end\"\n alignItems=\"center\"\n spacing={1}\n sx={{ width: \"100%\", backgroundColor: '#637381', padding: '10px', border: '1px solid #646D78', borderTop: 'none', borderBottomRightRadius: '10px', borderBottomLeftRadius: '10px'}}\n >\n <AgentSelect\n assignedAgentId={assignedAgentId}\n setAssignedAgentId={setAssignedAgentId}\n />\n <Box sx={{ flex: 1 }} />\n <Button\n variant=\"outlined\"\n color=\"info\"\n onClick={() => onClose()}\n sx={{ fontSize: \"12px\", width: \"150px\", color: '#fff', borderColor: '#868d93',\n \"&:hover\": {\n backgroundColor: \"#EEEEEE\",\n },\n }}\n >\n Cancel\n </Button>\n <Box>\n <Button\n type=\"submit\"\n variant=\"contained\"\n disabled={isSubmittting || organisationError || vendorError}\n onClick={submitHandler}\n color={isSubmitError ? \"error\" : \"success\"}\n sx={{ fontSize: \"12px\", width: \"200px\" }}\n >\n Submit\n </Button>\n </Box>\n </Stack>\n </MessageFormContext.Provider>\n ) : (\n <FormSkeleton />\n )}\n </>\n );\n};\n\nexport default NewMessageActionForm;\n","/**\r\n * Paper class just like the white sheet of pressed fiber it draws its name\r\n * inspiration from is used as a starting point to start a drawing.\r\n *\r\n * Before we can start adding elements (drawing) we need to take out a new sheet\r\n * of paper, or in this instance create a blank SVG element.\r\n *\r\n * This class creates such element, as well as implements methods needed to\r\n * start adding elements to it.\r\n */\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { AMElement } from \"./AMElement\";\nimport { Group } from \"./Group\";\nimport { SVGContainer } from \"./SVGContainer\";\nimport * as $dom from \"../utils/DOM\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Paper class which when instantiated will create an SVG element as well as\r\n * some of the sub-elements like `<desc>`, `<defs>`.\r\n *\r\n * Use its methods like `addGroup` and `append` to add elements to the paper.\r\n */\nvar Paper = /** @class */function () {\n /**\r\n * Creates main `<svg>` container and related elements.\r\n *\r\n * @param container A reference to HTML element to create `<svg>` in\r\n */\n function Paper(container, id) {\n // Store container reference\n this.container = container;\n this.id = id;\n // Create SVG element\n var svg = document.createElementNS($dom.SVGNS, \"svg\");\n svg.setAttribute(\"version\", \"1.1\");\n svg.setAttributeNS($dom.XMLNS, \"xmlns\", $dom.SVGNS);\n svg.setAttributeNS($dom.XMLNS, \"xmlns:xlink\", $dom.XLINK);\n svg.setAttribute(\"role\", \"group\");\n this.container.appendChild(svg);\n // Add description\n var desc = document.createElementNS($dom.SVGNS, \"desc\");\n desc.appendChild(document.createTextNode(\"JavaScript chart by amCharts\"));\n svg.appendChild(desc);\n // Add defs\n this.defs = document.createElementNS($dom.SVGNS, \"defs\");\n svg.appendChild(this.defs);\n // Set width and height to fit container\n svg.style.width = \"100%\";\n svg.style.height = \"100%\";\n svg.style.overflow = \"visible\";\n // Store variable\n this.svg = svg;\n }\n /**\r\n * Creates and returns a new element. Does not attach it to Paper yet.\r\n *\r\n * @param elementName Element name\r\n * @return New element\r\n */\n Paper.prototype.add = function (elementName) {\n return new AMElement(elementName);\n };\n /**\r\n * Creates and returns a new Group element. Does not attach it to Paper.\r\n *\r\n * @param groupName Element name\r\n * @return New Group\r\n */\n Paper.prototype.addGroup = function (groupName) {\n return new Group(groupName);\n };\n /**\r\n * Appends an element to Paper.\r\n *\r\n * @param element Element to append\r\n */\n Paper.prototype.append = function (element) {\n if (element) {\n this.svg.appendChild(element.node);\n }\n };\n /**\r\n * Appends an element to `<defs>` block of the Paper.\r\n *\r\n * @param element Element\r\n */\n Paper.prototype.appendDef = function (element) {\n if (element) {\n this.defs.appendChild(element.node);\n }\n };\n /**\r\n * Creates and returns new `<foreignObject>` element. Does not append it to\r\n * Paper.\r\n *\r\n * @return A foreignObject element\r\n */\n Paper.prototype.foreignObject = function () {\n var element = new AMElement(\"foreignObject\");\n //this.append(element);\n return element;\n };\n /**\r\n * Checks if browser supports `<foreignObject>` elements.\r\n *\r\n * @return Supports `foreignObject`?\r\n */\n Paper.prototype.supportsForeignObject = function () {\n return document.implementation.hasFeature(\"http://www.w3.org/TR/SVG11/feature#Extensibility\", \"1.1\");\n };\n return Paper;\n}();\nexport { Paper };\nvar ghostPaper = null;\n/**\r\n * A [[Paper]] instance to create elements, that are not yet ready to be\r\n * placed in visible DOM.\r\n *\r\n * @ignore Exclude from docs\r\n */\nexport function getGhostPaper() {\n if (ghostPaper === null) {\n // ghost is used to draw elements while real paper is not yet created or Sprite doesn't know parent yet\n var ghostDiv = document.createElement(\"div\");\n ghostDiv.hidden = true;\n document.body.appendChild(ghostDiv);\n var ghostSvgContainer = new SVGContainer(ghostDiv);\n ghostPaper = new Paper(ghostSvgContainer.SVGContainer, \"ghost\");\n }\n return ghostPaper;\n}","import React from 'react';\nimport classNames from 'classnames'\nimport PropTypes from 'prop-types'\nimport _ from 'lodashExtended'\n\nconst InlineVariable = ({ present, blank = '<blank>', isBlank, noWrap, strong = false, color, children }) => {\n var linkClass = classNames({ link: !isBlank, 'link-required-value': isBlank})\n var noWrap = _.isBoolean(noWrap) ? noWrap : true\n var linkStyle = _.isNull(color) ? null : { color: color }\n\n return (\n <span className={linkClass} style={linkStyle}>\n <span style={{ fontWeight: strong ? 'bold' : 'normal' }}>\n <span style={{ whiteSpace: (noWrap ? 'nowrap' : 'normal') }}>\n { _.isPresent(children) ? children : isBlank ? blank : present}\n </span>\n </span>\n </span>\n )\n}\n\nInlineVariable.propTypes = {\n present: PropTypes.node.isRequired,\n blank: PropTypes.node,\n isBlank: PropTypes.bool.isRequired,\n noWrap: PropTypes.bool,\n strong: PropTypes.bool,\n color: PropTypes.string\n};\n\nexport default InlineVariable\n","import { createTheme } from \"@mui/material/styles\";\n\nconst defaultTheme = createTheme();\n\nconst successMain = '#8CC152';\nconst errorMain = '#D2302F';\nconst warningMain = '#ED6C01';\n\nexport const theme = createTheme({\n typography: {\n body1: {\n fontWeight: 'inherit',\n },\n small: {\n fontSize:'0.875rem'\n },\n medium: {\n fontSize:'1rem'\n },\n tiny: {\n fontSize:'0.6rem'\n },\n xsmall: {\n fontSize:'11px'\n },\n h5: {\n fontSize:'1.2rem'\n },\n },\n palette: {\n\n borderGrey: defaultTheme.palette.grey[300],\n darkBackgroundGrey: '#1F2328',\n\n success: {\n main: successMain,\n contrastText: \"#fff\",\n },\n error: {\n main: errorMain,\n contrastText: \"#fff\",\n },\n warning: {\n main: warningMain,\n contrastText: \"#fff\",\n },\n\n\n outlined: {\n main: \"#555656\",\n },\n white: {\n main: \"#fff\",\n },\n info: {\n main: \"#637381\",\n },\n needInfo: {\n color: \"#FFA600\"\n },\n haveInfo: {\n color: \"#1CAF38\" // #19E53B Brighter\n },\n textMuted: \"#777777\",\n\n visits: {\n\n success: {\n main: \"#7BB841\",\n contrastText: \"#fff\"\n },\n failure: {\n main: \"#EA3223\",\n contrastText: \"#fff\"\n },\n conflicting: {\n main: \"#EF8635\",\n contrastText: \"#fff\"\n },\n unknown: {\n main: \"#2B78E4\",\n contrastText: \"#fff\"\n },\n planned: {\n main: \"#f5bd43\",\n contrastText: \"#fff\"\n },\n assumed: {\n main: \"#8f3fcd\",\n contrastText: \"#fff\"\n },\n canceled: {\n main: \"#A1A4A9\",\n contrastText: \"#fff\"\n },\n },\n\n },\n components: {\n MuiChip: {\n styleOverrides: {\n root: {\n color: 'white',\n },\n },\n variants: [\n {\n props: { size: 'xsmall' },\n style: {\n height: '20px',\n borderRadius: '5px',\n '& .MuiChip-label': {\n paddingLeft: '6px',\n paddingRight: '6px',\n },\n },\n },\n ],\n },\n\n MuiBox: {\n styleOverrides: {\n root: {\n fontSize: '13px', // Override the default font size for Box components\n },\n },\n },\n MuiButton: {\n styleOverrides: {\n root: {\n textTransform: \"none\",\n fontStyle: \"normal\",\n fontWeight: 600,\n boxShadow: 'none', // Remove shadow\n '&:hover': {\n boxShadow: 'none', // Remove shadow on hover\n },\n },\n },\n },\n MuiDivider: {\n styleOverrides: {\n root: {\n margin: \"10px 0px\",\n \"&::before\": {\n borderTop: \"3px solid rgba(0, 0, 0, 0.12)\",\n },\n \"&::after\": {\n borderTop: \"3px solid rgba(0, 0, 0, 0.12)\",\n },\n },\n },\n },\n MuiSvgIcon: {\n styleOverrides: {\n root: {\n color: 'inherit',\n fontSize: 'inherit',\n },\n colorSuccess: {\n color: successMain,\n },\n },\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n color: 'inherit',\n fontSize: 'inherit',\n '&:hover': {\n color: '#4FC1E9', // Color changes to red on hover\n },\n },\n\n },\n },\n MuiLink: {\n styleOverrides: {\n root: {\n color: '#5F6369',\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'none',\n },\n '&:active': {\n textDecoration: 'none',\n },\n }\n }\n },\n MuiTooltip: {\n styleOverrides: {\n tooltip: {\n // fontSize: \"13px\", // Set the default fontSize for tooltip content\n background: \"#000\",\n },\n arrow: {\n color: \"#000\",\n },\n },\n },\n MuiSelect: {\n defaultProps: {\n SelectDisplayProps: {\n style: {\n // fontSize: \"13px\",\n },\n },\n },\n },\n MuiList: {\n styleOverrides: {\n root: {\n // fontSize: \"13px\",\n },\n },\n },\n MuiBadge: {\n styleOverrides: {\n badge: {\n // fontSize: \"13px\",\n },\n },\n },\n },\n});\n\ndeclare module \"@mui/material/Button\" {\n interface ButtonPropsColorOverrides {\n info: true;\n }\n}\n\n\nexport default theme;\n","import React, { useEffect } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\n\nimport {\n Section\n} from 'auditComponents'\n\nimport { submitSection, navigateFromSection } from \"../sections/operations\";\nimport { getSectionStatus, getIncompleteMessage } from \"../sections/selectors\";\n\nconst mapStateToProps = (state, { sectionId } ) => {\n return {\n sectionStatus: getSectionStatus(sectionId, state),\n incompleteMessage: getIncompleteMessage(sectionId, state)\n };\n};\n\nconst mapDispatchToProps = (dispatch, { sectionId, ...rest }) => {\n return {\n onSubmit: () => { dispatch(submitSection(sectionId)) },\n onNavigateFrom: (navigateFromSectionId) => { dispatch(navigateFromSection(navigateFromSectionId))},\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Section);\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { getSectionStatus, getIncompleteMessage } from \"../sections/selectors\";\n\nimport {\n SubmitSummarySection\n} from 'auditComponents'\n\nconst mapStateToProps = (state, { sectionId }) => {\n return {\n sectionStatus: getSectionStatus(sectionId, state),\n incompleteMessage: getIncompleteMessage(sectionId, state),\n };\n};\n\nexport default connect(mapStateToProps, null)(SubmitSummarySection);;\n","import ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport LinkIcon from \"@mui/icons-material/Link\";\nimport { RemediationIcon } from \"service/utils/Icons\";\nimport { useGetLocationRemediationQuery } from \"api/services\";\n\nimport { flatMap, map, size, startCase, toLower, mapKeys, camelCase } from \"lodash\";\n\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport { Link, Card, CardContent, Stack, Box, Collapse, Divider, IconButton, Typography } from \"@mui/material\";\nimport { TextSmallMuted, TextSmall, TextMuted } from 'sharedComponents';\nimport { useContext, useMemo, useState } from \"react\";\nimport { useHistory, useLocation } from \"react-router-dom\";\nimport { formatDate } from \"sharedUtils\";\nimport { getLocationId, getTicketId, useTicket } from \"ticket/selectors\";\nimport AppContext from \"ticket/AppContext\";\n\n\nconst ReportRequestCardLayout = ({ request, title, label, links, body, startOpen = true }) => {\n\n const [open, setOpen] = useState(startOpen);\n\n const { stakeholderContacts } = useTicket() || {};\n const history = useHistory();\n\n const location = useLocation();\n const locationId = getLocationId();\n\n const {\n currentTicketId,\n highlightedIds,\n setHighlightedIds,\n onOpenRemediation,\n setRequestedAtDate,\n setEventId,\n setRequestType,\n setServiceUuid,\n setShouldScroll,\n } = useContext(AppContext);\n\n\n const remediationData = useGetLocationRemediationQuery(locationId, {skip: !locationId}).data?.remediation;\n const remediation = remediationData ? mapKeys(remediationData, (_, k) => camelCase(k)) : null;\n\n // Get all stakeholders\n const allStakeholders: Contact[] = flatMap(\n stakeholderContacts || [],\n (x) => x,\n );\n\n // Find who inputted the request\n // TODO: Get inputtedById on the request ?\n const inputtedBy = allStakeholders?.find(\n (x) => x.id === request?.inputtedById,\n );\n\n const isInCurrentPath = (request?.linkedTicketIds && request.linkedTicketIds?.length > 0)\n ? currentTicketId === String(request?.linkedTicketIds[0])\n : false;\n const isInCurrentPathRemediation = currentTicketId === String(request?.remediationTicketId)\n\n const isSelected = useMemo(() => {\n return (\n request?.replyIds &&\n request?.replyIds.length > 0 &&\n request?.replyIds?.every((id) => highlightedIds?.includes(String(id)))\n );\n }, [highlightedIds]);\n\n\n// if(label === 'bob') {\n// debugger\n// }\n\n const toggleHighlightedReplies = () => {\n\n const searchParams = new URLSearchParams(location.search);\n\n if (String(request.linkedTicketIds[0]) === currentTicketId) {\n // We're on the same ticket\n let newHighlights = [];\n\n if (isSelected) {\n // If this request is already selected, deselect it\n newHighlights = [];\n } else {\n // If this request is not selected, select it and deselect others\n newHighlights = [...request.replyIds];\n }\n\n // Update search params\n searchParams.delete(\"highlight\");\n if (newHighlights.length > 0) {\n newHighlights.forEach((id) => searchParams.append(\"highlight\", id));\n }\n\n setHighlightedIds(newHighlights);\n setShouldScroll(true);\n\n // Update the URL and push to history\n history.replace({\n pathname: location.pathname,\n search: searchParams.toString(),\n });\n } else {\n // We are not on the same ticket\n const ticketId = request?.linkedTicketIds[0];\n const queryParam = `highlight=${request?.replyIds.join(\"&highlight=\")}`;\n const newTabUrl = `/admin/locations/${locationId}/app#/tickets/${ticketId}?${queryParam}`;\n window.open(newTabUrl, \"_blank\");\n }\n };\n const toggleHighlightedRepliesRemediation = () => {\n const searchParams = new URLSearchParams(location.search);\n\n if (String(remediation.remediationTicketId) === currentTicketId) {\n // We're on the same ticket\n let newHighlights = [];\n\n if (isSelected) {\n // If this request is already selected, deselect it\n newHighlights = [];\n } else {\n // If this request is not selected, select it and deselect others\n newHighlights = [...remediation.replyIds];\n }\n\n // Update search params\n searchParams.delete(\"highlight\");\n if (newHighlights.length > 0) {\n newHighlights.forEach((id) => searchParams.append(\"highlight\", id));\n }\n\n setHighlightedIds(newHighlights);\n\n // Update the URL and push to history\n history.replace({\n pathname: location.pathname,\n search: searchParams.toString(),\n });\n } else {\n // We are not on the same ticket\n const ticketId = remediation?.remediationTicketId;\n const queryParam = `highlight=${remediation?.replyIds.join(\"&highlight=\")}`;\n const newTabUrl = `/admin/locations/${locationId}/app#/tickets/${ticketId}?${queryParam}`;\n window.open(newTabUrl, \"_blank\");\n }\n };\n\n return (\n\n <Box\n key={request.id}\n data-link-card={request.id}\n sx={{\n background: \"#1E1E1E\",\n color: \"#BFBFBF\",\n borderTop: '1px solid #656D78',\n }}\n >\n\n\n <Stack direction=\"row\"\n sx={{\n justifyContent: \"space-between\",\n alignItems: \"center\",\n cursor: 'pointer',\n pl: '10px',\n minHeight: '40px',\n backgroundColor: open ? \"#121212\" : \"inherit\",\n borderBottom: '0px dashed #4B4B4B',\n borderWidth: open ? \"1px\" : \"0\",\n }}\n >\n\n <Box>\n <strong>{title}</strong>\n </Box>\n\n <Box>\n { request?.linkedTicketIds && (\n <>\n {isInCurrentPath ? (\n <IconButton size=\"small\"\n onClick={() => toggleHighlightedReplies()} sx={{\n color: isSelected ? \"#4FC1E9 !important\" : \"#5F6369\",\n }}>\n <LinkIcon/>\n </IconButton>\n ) : (\n <Typography variant=\"xsmall\">\n <Link onClick={() => toggleHighlightedReplies()}\n\n sx={{\n color: \"#5F6369\",\n \"&:hover\": {\n ...(isInCurrentPath ? { color: \"#5F6369\" } : {}),\n },\n }}\n >\n #{request?.linkedTicketIds[0]}\n </Link>\n </Typography>\n )}\n </>\n )}\n { request?.remediationTicketId && (\n <>\n {isInCurrentPathRemediation ? (\n <>\n {links}\n <IconButton size=\"small\"\n onClick={() => toggleHighlightedRepliesRemediation()} sx={{\n color: isSelected ? \"#4FC1E9 !important\" : \"#5F6369\",\n }}>\n <LinkIcon/>\n </IconButton>\n </>\n ) : (\n <Typography variant=\"xsmall\">\n <Link onClick={() => toggleHighlightedRepliesRemediation()}\n\n sx={{\n color: \"#5F6369\",\n \"&:hover\": {\n ...(isInCurrentPathRemediation ? { color: \"#5F6369\" } : {}),\n },\n }}\n >\n #{request?.remediationTicketId}\n </Link>\n </Typography>\n )}\n </>\n )}\n\n\n { isInCurrentPath && (!remediation || remediation.status == \"accepted\" || remediation.status == \"cancelled\") && (\n <IconButton size=\"small\"\n onClick={() => {\n setRequestedAtDate(request?.requestedAt || request?.reportedAt);\n setEventId(request?.id);\n setRequestType(request?.type);\n setServiceUuid(request?.serviceUuid);\n onOpenRemediation();\n }}\n >\n <RemediationIcon />\n </IconButton>\n )}\n <DebugButton buttonSize=\"small\" {...request} />\n\n <IconButton size=\"small\" onClick={() => setOpen(!open)}>\n {open ? <ExpandLessIcon /> : <ExpandMoreIcon />}\n </IconButton>\n </Box>\n\n </Stack>\n\n\n <Box\n sx={{\n display: \"flex\", justifyContent: \"space-between\", alignItems: \"center\",\n padding: open ? '5px 10px 5px 10px' : '0px 10px 10px 10px',\n }}\n >\n { label && (\n <Typography variant={open ? 'medium' : 'small'}>\n {label}\n </Typography>\n )}\n\n { open && (\n <Typography variant=\"xsmall\" sx={{ textAlign: 'right' }}>\n Requested on{\" \"} <strong> {formatDate(request?.requestedAt)} </strong> by\n <strong> {inputtedBy?.nameWithoutEmail || remediation?.inputedByFullName || \"No Agent\"} </strong>\n </Typography>\n ) }\n </Box>\n\n\n <Collapse in={open} timeout=\"auto\" unmountOnExit>\n <Box sx={{\n m: '6px 0 10px 6px',\n padding: '6px 6px 6px 15px',\n borderLeft: '1px solid #4B4B4B',\n backgroundColor: open ? \"#121212\" : \"inherit\",\n borderTop: '0px dashed #4B4B4B',\n borderBottom: '0px dashed #4B4B4B',\n borderWidth: open ? \"1px\" : \"0\",\n }}>\n\n {body}\n </Box>\n </Collapse>\n\n </Box>\n\n )\n}\n\n\nexport default ReportRequestCardLayout;\n","import { Divider, ListItemButton } from \"@mui/material\";\nimport { ExpandLess, ExpandMore } from \"@mui/icons-material\";\n\nconst ShowMoreDivider = ({ toggleOpen, isOpen }) => {\n return (\n <ListItemButton\n onClick={toggleOpen}\n disableRipple\n sx={{\n p: 0,\n width: \"100%\",\n fontWeight: \"bold\",\n \"&:hover\": {\n backgroundColor: \"transparent\",\n },\n }}\n >\n <Divider\n sx={{\n flex: 1,\n p: 0,\n m: 0,\n color: \"#fff\",\n \"&::before\": {\n borderTop: \"3px solid #323B45\",\n },\n \"&::after\": {\n borderTop: \"3px solid #323B45\",\n },\n }}\n >\n Show {isOpen ? \"less\" : \"more\"}\n {isOpen ? <ExpandLess /> : <ExpandMore />}\n </Divider>\n </ListItemButton>\n );\n};\n\nexport default ShowMoreDivider;\n","import React, { useState } from \"react\";\nimport { IconButton } from \"@mui/material\";\nimport DebuggerCollapsible from \"./common/DebuggerCollapsible\";\n\nimport { DebugIcon } from \"./common/VisitIcons\";\n\nimport { useDeveloper } from \"ticket/selectors\";\n\nconst Debugger = ({ ...props }) => {\n const [openDebugger, setOpenDebugger] = useState(false);\n const isDeveloper = useDeveloper();\n\n return (\n isDeveloper && (\n <>\n <IconButton\n sx={{\n position: \"absolute\",\n left: 0,\n top: props?.top ? props.top : 0,\n color: \"white\",\n padding: \"5px\",\n fontSize: \"10px\",\n }}\n onClick={() => setOpenDebugger(!openDebugger)}\n >\n <DebugIcon sx={{ color: \"rgb(139, 147, 171)\", fontSize: \"10px\" }} />\n </IconButton>\n <DebuggerCollapsible data={props} open={openDebugger} />\n </>\n )\n );\n};\n\nexport default Debugger;\n","import { SvgIcon } from \"@mui/material\";\n\nexport const StreamIcon = (props) => (\n <SvgIcon {...props}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fill=\"currentColor\"\n d=\"M7.5 9.25a5.75 5.75 0 0 1 5.75-5.75h.5a.75.75 0 0 0 0-1.5h-.5A7.25 7.25 0 0 0 6 9.25v1a.75.75 0 0 1-.75.75H4.9l1.294 1.293A2.25 2.25 0 0 0 7.5 10.25zm-1.097 7.248l-1.23 1.23A.75.75 0 0 0 5.75 18h.5a7.25 7.25 0 0 0 7.25-7.25v-1a.75.75 0 0 1 .75-.75h3a.75.75 0 0 0 0-1.5h-3A2.25 2.25 0 0 0 12 9.75v1a5.75 5.75 0 0 1-5.597 5.748m.788-3.084a2.22 2.22 0 0 1 .24 1.53A4.75 4.75 0 0 0 10.5 10.5v-1a3.25 3.25 0 0 1 3.25-3.25h3.5a.75.75 0 0 0 0-1.5h-3.5A4.75 4.75 0 0 0 9 9.5v1a3.25 3.25 0 0 1-1.809 2.914M1.72 10.97a.75.75 0 0 1 1.06 0l3 3a.75.75 0 0 1 0 1.06l-3 3a.75.75 0 0 1-1.06-1.06l1.72-1.72H.75a.75.75 0 0 1 0-1.5h2.69l-1.72-1.72a.75.75 0 0 1 0-1.06\"\n opacity=\"0.79\"\n />\n </svg>\n </SvgIcon>\n);\n\nexport const IncomingEmailIcon = (props) => (\n <SvgIcon viewBox=\"0 0 371.6 324.39\" {...props}>\n <svg\n width=\"12\"\n height=\"10\"\n viewBox=\"0 0 12 10\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g filter=\"url(#filter0_i_11_29)\">\n <path\n d=\"M10.7914 8.98791C10.1555 8.44233 9.51213 7.88339 8.89015 7.34246C8.58272 7.07505 8.27502 6.80764 7.96705 6.54081C7.82539 6.4164 7.68154 6.29316 7.54235 6.17399L7.49686 6.13504L7.45412 6.16992C7.43138 6.18852 7.41275 6.2048 7.39521 6.2202C7.38507 6.22922 7.37548 6.23764 7.3648 6.24695C7.22615 6.36728 7.08696 6.4882 6.94777 6.60911C6.81433 6.72509 6.68117 6.84077 6.54828 6.95617C6.28086 7.19015 5.98932 7.23927 5.68244 7.10266C5.59668 7.06255 5.5153 6.99831 5.44023 6.93524C5.25062 6.77305 5.05909 6.6065 4.87414 6.44518C4.76865 6.35333 4.66261 6.2609 4.55575 6.16818L4.53411 6.1519H4.48506L4.46616 6.16847C4.25244 6.35449 4.0442 6.5347 3.83596 6.71492C3.40085 7.09307 2.96519 7.47122 2.52953 7.84909C2.08428 8.23538 1.63903 8.62167 1.19433 9.00826C1.09076 9.09894 1.04034 9.19632 1.04445 9.29805C1.04856 9.40007 1.10692 9.49309 1.21789 9.57447C1.38038 9.69423 1.56286 9.70963 1.70342 9.70963H9.80284C9.86066 9.70963 9.91847 9.71079 9.97629 9.71196C10.0336 9.71312 10.0916 9.71428 10.15 9.71428C10.2243 9.71428 10.2991 9.71254 10.3739 9.70672C10.5018 9.69393 10.6306 9.65731 10.7375 9.60354C10.8651 9.53669 10.9419 9.43757 10.9536 9.32392C10.966 9.20736 10.9082 9.0879 10.7914 8.98762V8.98791ZM10.8177 9.30822C10.8112 9.37072 10.7613 9.42943 10.678 9.47303C10.5862 9.51925 10.4736 9.55093 10.3626 9.56226C10.2369 9.57215 10.1059 9.56953 9.9793 9.56721C9.92066 9.56604 9.86203 9.56488 9.80339 9.56488H1.70369C1.52203 9.56488 1.4001 9.53233 1.29598 9.45559C1.24502 9.41839 1.18392 9.35967 1.18118 9.29253C1.17844 9.22567 1.23406 9.16231 1.28119 9.12104C1.72561 8.73474 2.17086 8.34845 2.61611 7.96216C3.05177 7.584 3.48743 7.20585 3.92254 6.82798C4.11708 6.65969 4.3119 6.4911 4.51082 6.31787C4.60343 6.39809 4.69549 6.47831 4.78701 6.55796C4.97223 6.71957 5.16403 6.88641 5.35446 7.04918C5.43694 7.11865 5.52708 7.18928 5.62819 7.23666C5.98685 7.39623 6.32579 7.33984 6.63514 7.06894C6.76775 6.95384 6.90119 6.83787 7.03463 6.72189C7.17382 6.60097 7.31301 6.47977 7.45111 6.36001C7.46179 6.35071 7.4722 6.3417 7.48316 6.33211C7.48727 6.32833 7.49166 6.32484 7.49577 6.32077C7.62236 6.42919 7.75196 6.54081 7.88019 6.653C8.18844 6.92012 8.49587 7.18754 8.80357 7.45466C9.42582 7.99558 10.0692 8.55453 10.7054 9.10069C10.7846 9.1687 10.8246 9.24224 10.8177 9.30793V9.30822Z\"\n fill=\"#FEFEFE\"\n />\n <path\n d=\"M10.7914 8.98791C10.1555 8.44233 9.51213 7.88339 8.89015 7.34246C8.58272 7.07505 8.27502 6.80764 7.96705 6.54081C7.82539 6.4164 7.68154 6.29316 7.54235 6.17399L7.49686 6.13504L7.45412 6.16992C7.43138 6.18852 7.41275 6.2048 7.39521 6.2202C7.38507 6.22922 7.37548 6.23764 7.3648 6.24695C7.22615 6.36728 7.08696 6.4882 6.94777 6.60911C6.81433 6.72509 6.68117 6.84077 6.54828 6.95617C6.28086 7.19015 5.98932 7.23927 5.68244 7.10266C5.59668 7.06255 5.5153 6.99831 5.44023 6.93524C5.25062 6.77305 5.05909 6.6065 4.87414 6.44518C4.76865 6.35333 4.66261 6.2609 4.55575 6.16818L4.53411 6.1519H4.48506L4.46616 6.16847C4.25244 6.35449 4.0442 6.5347 3.83596 6.71492C3.40085 7.09307 2.96519 7.47122 2.52953 7.84909C2.08428 8.23538 1.63903 8.62167 1.19433 9.00826C1.09076 9.09894 1.04034 9.19632 1.04445 9.29805C1.04856 9.40007 1.10692 9.49309 1.21789 9.57447C1.38038 9.69423 1.56286 9.70963 1.70342 9.70963H9.80284C9.86066 9.70963 9.91847 9.71079 9.97629 9.71196C10.0336 9.71312 10.0916 9.71428 10.15 9.71428C10.2243 9.71428 10.2991 9.71254 10.3739 9.70672C10.5018 9.69393 10.6306 9.65731 10.7375 9.60354C10.8651 9.53669 10.9419 9.43757 10.9536 9.32392C10.966 9.20736 10.9082 9.0879 10.7914 8.98762V8.98791ZM10.8177 9.30822C10.8112 9.37072 10.7613 9.42943 10.678 9.47303C10.5862 9.51925 10.4736 9.55093 10.3626 9.56226C10.2369 9.57215 10.1059 9.56953 9.9793 9.56721C9.92066 9.56604 9.86203 9.56488 9.80339 9.56488H1.70369C1.52203 9.56488 1.4001 9.53233 1.29598 9.45559C1.24502 9.41839 1.18392 9.35967 1.18118 9.29253C1.17844 9.22567 1.23406 9.16231 1.28119 9.12104C1.72561 8.73474 2.17086 8.34845 2.61611 7.96216C3.05177 7.584 3.48743 7.20585 3.92254 6.82798C4.11708 6.65969 4.3119 6.4911 4.51082 6.31787C4.60343 6.39809 4.69549 6.47831 4.78701 6.55796C4.97223 6.71957 5.16403 6.88641 5.35446 7.04918C5.43694 7.11865 5.52708 7.18928 5.62819 7.23666C5.98685 7.39623 6.32579 7.33984 6.63514 7.06894C6.76775 6.95384 6.90119 6.83787 7.03463 6.72189C7.17382 6.60097 7.31301 6.47977 7.45111 6.36001C7.46179 6.35071 7.4722 6.3417 7.48316 6.33211C7.48727 6.32833 7.49166 6.32484 7.49577 6.32077C7.62236 6.42919 7.75196 6.54081 7.88019 6.653C8.18844 6.92012 8.49587 7.18754 8.80357 7.45466C9.42582 7.99558 10.0692 8.55453 10.7054 9.10069C10.7846 9.1687 10.8246 9.24224 10.8177 9.30793V9.30822Z\"\n fill=\"white\"\n />\n <path\n d=\"M1.2409 2.88188C1.2483 2.88711 1.25597 2.89438 1.26502 2.90281C1.2705 2.90775 1.2757 2.91298 1.282 2.9185C2.73146 4.17417 4.20503 5.45368 5.6301 6.69104C5.76272 6.8073 5.88547 6.86543 6.00795 6.86543C6.1307 6.86543 6.25318 6.8073 6.38552 6.69133L9.14743 4.29335C9.34663 4.12011 9.5461 3.94716 9.7453 3.77422C10.1012 3.46553 10.4692 3.14609 10.8301 2.83101C10.9471 2.7287 10.9693 2.62609 10.9673 2.55808C10.9654 2.48948 10.9372 2.38775 10.8131 2.29183C10.6835 2.19184 10.5344 2.14127 10.37 2.14127H8.05198C8.03335 2.14127 8.01554 2.14301 7.99965 2.14446C7.98677 2.14563 7.97444 2.14708 7.9643 2.14708H7.90457L7.89662 2.20986C7.74592 3.38415 6.83131 3.99861 6.00548 3.99861C5.17965 3.99861 4.26421 3.38415 4.11434 2.20986H4.11406V2.14708H4.00528C3.80581 2.14708 3.60662 2.14679 3.40742 2.1465C2.82051 2.14592 2.2136 2.14534 1.61601 2.1497C1.50066 2.1497 1.38311 2.1962 1.30502 2.23486C1.15322 2.30927 1.06061 2.42437 1.05157 2.5511C1.0428 2.67231 1.11021 2.78974 1.2409 2.88159V2.88188ZM1.36283 2.36682C1.45709 2.32002 1.5445 2.29532 1.61656 2.29532C2.01495 2.29241 2.41746 2.29183 2.81531 2.29183C3.01423 2.29183 3.21206 2.29183 3.40742 2.29212C3.60059 2.29212 3.79376 2.29241 3.9872 2.29241C4.0694 2.83188 4.31436 3.29549 4.69823 3.63615C5.06731 3.96373 5.53146 4.14394 6.00521 4.14394C6.87652 4.14394 7.84018 3.50681 8.02403 2.28805C8.0339 2.28718 8.04321 2.2866 8.05198 2.2866H10.37C10.507 2.2866 10.6254 2.32671 10.7325 2.40926C10.7761 2.44298 10.8287 2.49704 10.8306 2.56244C10.8325 2.62697 10.784 2.68306 10.7432 2.71882C10.3826 3.03361 10.0146 3.35305 9.65899 3.66173C9.45979 3.83468 9.26032 4.00762 9.06112 4.18086L6.29893 6.57913C6.08713 6.76516 5.92958 6.76516 5.71751 6.57913C4.29216 5.34148 2.81859 4.06198 1.36968 2.8066C1.36503 2.80224 1.36037 2.79817 1.35598 2.7941C1.3442 2.78334 1.33215 2.77201 1.31708 2.76125C1.2294 2.69963 1.18364 2.629 1.18857 2.56273C1.19378 2.49035 1.25734 2.41914 1.36311 2.36711L1.36283 2.36682Z\"\n fill=\"#FEFEFE\"\n />\n <path\n d=\"M1.2409 2.88188C1.2483 2.88711 1.25597 2.89438 1.26502 2.90281C1.2705 2.90775 1.2757 2.91298 1.282 2.9185C2.73146 4.17417 4.20503 5.45368 5.6301 6.69104C5.76272 6.8073 5.88547 6.86543 6.00795 6.86543C6.1307 6.86543 6.25318 6.8073 6.38552 6.69133L9.14743 4.29335C9.34663 4.12011 9.5461 3.94716 9.7453 3.77422C10.1012 3.46553 10.4692 3.14609 10.8301 2.83101C10.9471 2.7287 10.9693 2.62609 10.9673 2.55808C10.9654 2.48948 10.9372 2.38775 10.8131 2.29183C10.6835 2.19184 10.5344 2.14127 10.37 2.14127H8.05198C8.03335 2.14127 8.01554 2.14301 7.99965 2.14446C7.98677 2.14563 7.97444 2.14708 7.9643 2.14708H7.90457L7.89662 2.20986C7.74592 3.38415 6.83131 3.99861 6.00548 3.99861C5.17965 3.99861 4.26421 3.38415 4.11434 2.20986H4.11406V2.14708H4.00528C3.80581 2.14708 3.60662 2.14679 3.40742 2.1465C2.82051 2.14592 2.2136 2.14534 1.61601 2.1497C1.50066 2.1497 1.38311 2.1962 1.30502 2.23486C1.15322 2.30927 1.06061 2.42437 1.05157 2.5511C1.0428 2.67231 1.11021 2.78974 1.2409 2.88159V2.88188ZM1.36283 2.36682C1.45709 2.32002 1.5445 2.29532 1.61656 2.29532C2.01495 2.29241 2.41746 2.29183 2.81531 2.29183C3.01423 2.29183 3.21206 2.29183 3.40742 2.29212C3.60059 2.29212 3.79376 2.29241 3.9872 2.29241C4.0694 2.83188 4.31436 3.29549 4.69823 3.63615C5.06731 3.96373 5.53146 4.14394 6.00521 4.14394C6.87652 4.14394 7.84018 3.50681 8.02403 2.28805C8.0339 2.28718 8.04321 2.2866 8.05198 2.2866H10.37C10.507 2.2866 10.6254 2.32671 10.7325 2.40926C10.7761 2.44298 10.8287 2.49704 10.8306 2.56244C10.8325 2.62697 10.784 2.68306 10.7432 2.71882C10.3826 3.03361 10.0146 3.35305 9.65899 3.66173C9.45979 3.83468 9.26032 4.00762 9.06112 4.18086L6.29893 6.57913C6.08713 6.76516 5.92958 6.76516 5.71751 6.57913C4.29216 5.34148 2.81859 4.06198 1.36968 2.8066C1.36503 2.80224 1.36037 2.79817 1.35598 2.7941C1.3442 2.78334 1.33215 2.77201 1.31708 2.76125C1.2294 2.69963 1.18364 2.629 1.18857 2.56273C1.19378 2.49035 1.25734 2.41914 1.36311 2.36711L1.36283 2.36682Z\"\n fill=\"white\"\n />\n <path\n d=\"M4.20749 5.98475L4.27216 5.92865L4.20749 5.87255C3.09314 4.90348 1.97851 3.93615 1.02088 3.10514L0.909088 3.00806V8.84925L1.02115 8.75187C1.67026 8.18653 2.32375 7.61974 2.95559 7.07154C3.37289 6.70938 3.78992 6.34779 4.20777 5.98475H4.20749ZM1.04609 8.54202V3.31471C1.95933 4.10706 3.00655 5.01597 4.05625 5.92836C3.66004 6.27251 3.26466 6.61549 2.86901 6.95877C2.27333 7.47557 1.65875 8.00865 1.04636 8.54172L1.04609 8.54202Z\"\n fill=\"#FEFEFE\"\n />\n <path\n d=\"M4.20749 5.98475L4.27216 5.92865L4.20749 5.87255C3.09314 4.90348 1.97851 3.93615 1.02088 3.10514L0.909088 3.00806V8.84925L1.02115 8.75187C1.67026 8.18653 2.32375 7.61974 2.95559 7.07154C3.37289 6.70938 3.78992 6.34779 4.20777 5.98475H4.20749ZM1.04609 8.54202V3.31471C1.95933 4.10706 3.00655 5.01597 4.05625 5.92836C3.66004 6.27251 3.26466 6.61549 2.86901 6.95877C2.27333 7.47557 1.65875 8.00865 1.04636 8.54172L1.04609 8.54202Z\"\n fill=\"white\"\n />\n <path\n d=\"M10.9791 3.10802C9.91489 4.03088 8.87095 4.93659 7.79797 5.86933L7.73331 5.92543L7.79797 5.98153C8.32789 6.44223 8.85588 6.90003 9.38361 7.35783C9.91462 7.81853 10.4459 8.27923 10.9791 8.74284L11.0909 8.84021V3.01123L10.9791 3.10831V3.10802ZM10.9539 8.53356C10.4582 8.1028 9.96421 7.67436 9.47019 7.24592C8.96384 6.80673 8.45749 6.36753 7.94922 5.92572C8.96192 5.0453 9.94969 4.18842 10.9539 3.31759V8.53356Z\"\n fill=\"#FEFEFE\"\n />\n <path\n d=\"M10.9791 3.10802C9.91489 4.03088 8.87095 4.93659 7.79797 5.86933L7.73331 5.92543L7.79797 5.98153C8.32789 6.44223 8.85588 6.90003 9.38361 7.35783C9.91462 7.81853 10.4459 8.27923 10.9791 8.74284L11.0909 8.84021V3.01123L10.9791 3.10831V3.10802ZM10.9539 8.53356C10.4582 8.1028 9.96421 7.67436 9.47019 7.24592C8.96384 6.80673 8.45749 6.36753 7.94922 5.92572C8.96192 5.0453 9.94969 4.18842 10.9539 3.31759V8.53356Z\"\n fill=\"white\"\n />\n <path\n d=\"M5.99156 3.67892C5.9932 3.67892 5.99512 3.67892 5.99676 3.67892C6.87877 3.67892 7.59993 2.92407 7.60541 1.99365C7.60815 1.53818 7.44348 1.11061 7.14181 0.789427C6.84068 0.468243 6.43626 0.289775 6.00334 0.286868L5.83702 0.285706L5.84771 0.297041C5.48329 0.332793 5.1438 0.501088 4.87912 0.780126C4.57388 1.10189 4.40565 1.53062 4.40565 1.98696C4.40428 2.43255 4.5695 2.85518 4.87117 3.17723C5.17285 3.49929 5.57097 3.67747 5.99183 3.67892H5.99156ZM4.97529 0.883311C5.24984 0.5941 5.61179 0.435107 5.99539 0.435107C5.99868 0.435107 6.00169 0.435107 6.00498 0.435107L6.09431 0.435688C6.45599 0.460976 6.79054 0.620842 7.04508 0.891741C7.32073 1.18531 7.47115 1.57626 7.46869 1.99249C7.46348 2.84326 6.80369 3.53359 5.99704 3.53359C5.99539 3.53359 5.99375 3.53359 5.9921 3.53359C5.60768 3.53214 5.24409 3.36936 4.96817 3.07463C4.69253 2.78019 4.54128 2.39418 4.54237 1.98725C4.54237 1.56957 4.69609 1.17746 4.97529 0.883311Z\"\n fill=\"#FEFEFE\"\n />\n <path\n d=\"M5.99156 3.67892C5.9932 3.67892 5.99512 3.67892 5.99676 3.67892C6.87877 3.67892 7.59993 2.92407 7.60541 1.99365C7.60815 1.53818 7.44348 1.11061 7.14181 0.789427C6.84068 0.468243 6.43626 0.289775 6.00334 0.286868L5.83702 0.285706L5.84771 0.297041C5.48329 0.332793 5.1438 0.501088 4.87912 0.780126C4.57388 1.10189 4.40565 1.53062 4.40565 1.98696C4.40428 2.43255 4.5695 2.85518 4.87117 3.17723C5.17285 3.49929 5.57097 3.67747 5.99183 3.67892H5.99156ZM4.97529 0.883311C5.24984 0.5941 5.61179 0.435107 5.99539 0.435107C5.99868 0.435107 6.00169 0.435107 6.00498 0.435107L6.09431 0.435688C6.45599 0.460976 6.79054 0.620842 7.04508 0.891741C7.32073 1.18531 7.47115 1.57626 7.46869 1.99249C7.46348 2.84326 6.80369 3.53359 5.99704 3.53359C5.99539 3.53359 5.99375 3.53359 5.9921 3.53359C5.60768 3.53214 5.24409 3.36936 4.96817 3.07463C4.69253 2.78019 4.54128 2.39418 4.54237 1.98725C4.54237 1.56957 4.69609 1.17746 4.97529 0.883311Z\"\n fill=\"white\"\n />\n <path\n d=\"M5.85011 2.70521C5.94327 2.80404 6.05835 2.82438 6.14329 2.74009C6.31043 2.57732 6.46935 2.40873 6.62279 2.23433C6.70225 2.14423 6.68307 2.01343 6.60361 1.92914C6.52415 1.84775 6.40633 1.84484 6.31317 1.91751C6.29399 1.93495 6.27207 1.95239 6.23919 1.98146V1.19376C6.23919 1.02226 6.13507 0.917625 5.98985 0.937972C5.87203 0.952505 5.80079 1.05133 5.80079 1.20248V1.98436L5.79805 1.98146C5.76791 1.9553 5.75695 1.94658 5.74599 1.93786C5.63091 1.83322 5.50487 1.83031 5.41993 1.93495C5.33499 2.03378 5.34321 2.16458 5.44459 2.27503C5.57885 2.42036 5.71311 2.56279 5.85011 2.70521Z\"\n fill=\"#FEFEFE\"\n />\n <path\n d=\"M5.85011 2.70521C5.94327 2.80404 6.05835 2.82438 6.14329 2.74009C6.31043 2.57732 6.46935 2.40873 6.62279 2.23433C6.70225 2.14423 6.68307 2.01343 6.60361 1.92914C6.52415 1.84775 6.40633 1.84484 6.31317 1.91751C6.29399 1.93495 6.27207 1.95239 6.23919 1.98146V1.19376C6.23919 1.02226 6.13507 0.917625 5.98985 0.937972C5.87203 0.952505 5.80079 1.05133 5.80079 1.20248V1.98436L5.79805 1.98146C5.76791 1.9553 5.75695 1.94658 5.74599 1.93786C5.63091 1.83322 5.50487 1.83031 5.41993 1.93495C5.33499 2.03378 5.34321 2.16458 5.44459 2.27503C5.57885 2.42036 5.71311 2.56279 5.85011 2.70521Z\"\n fill=\"white\"\n />\n </g>\n <defs>\n <filter\n id=\"filter0_i_11_29\"\n x=\"0.909088\"\n y=\"0.285706\"\n width=\"10.1818\"\n height=\"13.4286\"\n filterUnits=\"userSpaceOnUse\"\n colorInterpolationFilters=\"sRGB\"\n >\n <feFlood floodOpacity=\"0\" result=\"BackgroundImageFix\" />\n <feBlend\n mode=\"normal\"\n in=\"SourceGraphic\"\n in2=\"BackgroundImageFix\"\n result=\"shape\"\n />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feOffset dy=\"4\" />\n <feGaussianBlur stdDeviation=\"2\" />\n <feComposite in2=\"hardAlpha\" operator=\"arithmetic\" k2=\"-1\" k3=\"1\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"shape\"\n result=\"effect1_innerShadow_11_29\"\n />\n </filter>\n </defs>\n </svg>\n </SvgIcon>\n);\n\nexport const UpArrowIcon = (props) => (\n <SvgIcon {...props}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"M3 19h18a1.002 1.002 0 0 0 .823-1.569l-9-13c-.373-.539-1.271-.539-1.645 0l-9 13A.999.999 0 0 0 3 19\"\n ></path>\n </svg>\n </SvgIcon>\n);\n\nexport const DownArrowIcon = (props) => (\n <SvgIcon {...props}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 15 15\"\n >\n <path fill=\"currentColor\" d=\"M7.5 12L0 4h15z\"></path>\n </svg>\n </SvgIcon>\n);\n\nexport const RemediationIcon = (props) => (\n <SvgIcon {...props}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 16 16\"\n >\n <path\n fill=\"currentColor\"\n d=\"M3.5 1A2.5 2.5 0 0 0 1 3.5v7A2.5 2.5 0 0 0 3.5 13h1.992a2.5 2.5 0 0 1 .242-.28l.72-.72H3.5A1.5 1.5 0 0 1 2 10.5V5h10v.026a4.5 4.5 0 0 1 1 .004V3.5A2.5 2.5 0 0 0 10.5 1zm5.431 5.724l-.577-.578a.5.5 0 1 0-.708.708l.745.744q.216-.461.54-.874m-2.577.13a.5.5 0 1 0-.708-.708l-2 2a.5.5 0 0 0 0 .708l2 2a.5.5 0 0 0 .708-.708L4.707 8.5zm6.538-.83c.366.042.471.48.21.742l-.975.975a1.507 1.507 0 1 0 2.132 2.132l.975-.975c.261-.261.7-.156.742.21a3.518 3.518 0 0 1-4.676 3.723l-2.726 2.727a1.507 1.507 0 1 1-2.132-2.132L9.168 10.7a3.518 3.518 0 0 1 3.724-4.676\"\n ></path>\n </svg>\n </SvgIcon>\n);\n","import submitToServer from \"submitToServer\";\nimport actions from \"./actions\";\n\n//const fetchDetails = (date) => (dispatch, getState) => {\n //const state = getState();\n //const locationId = state.locationId;\n //const vendorId = state.vendorId;\n \n //const formated = date.format(\"YYYY-MM-DD\");\n //dispatch(actions.fetchDetailsDataStart(formated));\n\n //submitToServer(\n //`/admin/locations/${locationId}/calendar/details/${formated}.json`,\n //null,\n //(data, _v) => {\n //dispatch(actions.updateDetailsFromServer(data));\n //dispatch(actions.fetchDetailsDataSuccess(formated));\n //},\n //(data, _status) => {\n //dispatch(actions.fetchDetailsDataError(formated));\n //},\n //{ method: \"GET\" }\n //);\n//};\n\nconst fetchAtDate = (date) => (dispatch, getState) => {\n const state = getState();\n const locationId = state.locationId;\n const vendorId = state.vendorId;\n\n dispatch(actions.fetchSpecificDataStart());\n\n let fetchDate;\n if (moment.isMoment(date)) {\n fetchDate = date.format(\"YYYY-MM-DD\");\n } else if (\n typeof date === \"string\" &&\n moment(date, \"YYYY-MM-DD\", true).isValid()\n ) {\n fetchDate = date;\n } else {\n fetchDate = moment().format(\"YYYY-MM-DD\");\n }\n\n const url = vendorId ? `/admin/locations/${locationId}/calendar/init/${fetchDate}.json?vendor_id=${vendorId}` : `/admin/locations/${locationId}/calendar/init/${fetchDate}.json`\n\n fetch(url, {\n method: 'GET',\n credentials: 'same-origin',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n }).then(res => {\n res.json().then(data => {\n dispatch(actions.updateDataFromServer(data));\n dispatch(actions.fetchSpecificDataSuccess());\n console.log(data)\n })\n })\n .catch((res) => {\n dispatch(actions.fetchSpecificDataError());\n console.log(res);\n })\n\n\n\n};\n\n\n\nconst fetchMoreData = (direction) => (dispatch, getState) => {\n const state = getState();\n const locationId = state.locationId;\n const vendorId = state.vendorId;\n let date = null;\n\n if (direction === \"back\") {\n date = moment(state.calendarApi.availableData.startDate);\n dispatch(actions.fetchPastDataStart());\n } else {\n date = moment(state.calendarApi.availableData.endDate);\n dispatch(actions.fetchFutureDataStart());\n }\n\n const url = vendorId ? `/admin/locations/${locationId}/calendar/${direction}/${date.format(\"YYYY-MM-DD\")}.json?vendor_id=${vendorId}` : `/admin/locations/${locationId}/calendar/${direction}/${date.format(\"YYYY-MM-DD\")}.json`\n\n fetch(url, {\n method: 'GET',\n credentials: 'same-origin',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n }).then(res => {\n res.json().then(data => {\n dispatch(actions.updateDataFromServer(data));\n if (direction === \"back\") {\n dispatch(actions.fetchPastDataSuccess());\n } else {\n dispatch(actions.fetchFutureDataSuccess());\n }\n console.log(data)\n })\n })\n .catch((res) => {\n if (direction === \"back\") {\n dispatch(actions.fetchPastDataError());\n } else {\n dispatch(actions.fetchFutureDataError());\n }\n console.log(res);\n })\n};\n\nexport {\n fetchAtDate,\n fetchMoreData,\n};\n","import { SxProps, Theme } from \"@mui/system\";\n\nconst paper = {\n padding: \"5px 8px\",\n color: \"#fff\",\n height: \"100%\",\n borderRadius: '4px'\n};\n\nconst formControl: SxProps<Theme> = {\n backgroundColor: \"#262B30\",\n color: \"#fff\",\n borderRadius: '4px',\n width: \"100%\",\n \"& .MuiFormLabel-root\": {\n color: \"#fff\",\n },\n \"& .MuiFormLabel-asterisk\": {\n colro: \"#fff\",\n },\n};\n\nconst select: SxProps<Theme> = {\n backgroundColor: \"#fff\",\n fontSize: \"11px\",\n maxHeight: '24px',\n '& .MuiSelect-root': { padding: 0, },\n '& .MuiOutlinedInput-notchedOutline': { border: 'none', },\n};\n\nconst messageField: SxProps<Theme> = {\n backgroundColor: \"#262B30\",\n color: \"#fff\",\n borderRadius: '4px',\n outline: 'none',\n height: \"100%\",\n};\n\nconst inputProps: SxProps<Theme> = {\n color: \"#fff\",\n fontSize: \"12px\",\n overflow: \"auto\",\n boxSizing: \"border-box\",\n height: \"200px\",\n alignItems: \"flex-start\",\n};\n\nconst gridItemMessage: SxProps<Theme> = {\n paddingTop: \"5px !important\",\n};\n\nconst buttonsContainer: SxProps<Theme> = {\n display: \"flex\",\n flexDirection: \"column\",\n gap: 1,\n};\n\nconst closeButton: SxProps<Theme> = {\n alignSelf: \"flex-end\",\n color: \"#fff\",\n marginLeft: \"auto\",\n};\n\nconst selectAgent: SxProps<Theme> = {\n height: \"35px\",\n backgroundColor: \"#fff\",\n fontSize: \"12px\",\n '& .MuiSelect-root': { padding: 0, },\n '& .MuiOutlinedInput-notchedOutline': { border: 'none', },\n};\n\nconst newReminder: SxProps<Theme> = {\n backgroundColor: \"#262b30\",\n fontSize: \"12px\",\n color: \"#fff\",\n};\n\nexport const styles = {\n paper,\n formControl,\n select,\n messageField,\n inputProps,\n gridItemMessage,\n buttonsContainer,\n closeButton,\n selectAgent,\n newReminder,\n};\n","/**\r\n * Defines functionality for \"Data Item\"\r\n *\r\n * A Data Item can be any object that can hold data. For example [[LineSeries]]\r\n * holds a number of values, that comprise a line graph. Each of those values\r\n * (data points) is a {DataItem}.\r\n *\r\n * Furthermore the [[LineSeries]] itself can be represented as a entry in the\r\n * legend. Since legend needs access to Line Series' value, a DataItem is\r\n * created for the series.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObjectEvents } from \"./Base\";\nimport { Adapter } from \"./utils/Adapter\";\nimport { Animation, AnimationDisposer } from \"./utils/Animation\";\nimport * as $utils from \"./utils/Utils\";\nimport * as $array from \"./utils/Array\";\nimport * as $object from \"./utils/Object\";\nimport * as $type from \"./utils/Type\";\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * DataItem represents single element in data, for example a data point in a\r\n * Serial Chart Series, e.g. a column.\r\n *\r\n * DataItem defines relationship between structured data, required for specific\r\n * chart type or task, and raw source data.\r\n *\r\n * It also implements required calculations, updates related visual elements,\r\n * etc.\r\n *\r\n * @todo Description\r\n * @important\r\n */\nvar DataItem = /** @class */function (_super) {\n tslib_1.__extends(DataItem, _super);\n /**\r\n * Constructor\r\n * @todo Adding events to disposers produces errors in some cases, which means that chart is using disposed Data Items which is not right\r\n */\n function DataItem() {\n var _this = _super.call(this) || this;\n /**\r\n * Holds Adapter.\r\n */\n _this.adapter = new Adapter(_this);\n /**\r\n * This Data Item is currently disabled.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._disabled = false;\n /**\r\n * Indicates whether Data Item has any properties set.\r\n *\r\n * If it does not have any, the code can use this property to check whether\r\n * they need to apply costly operation of re-applying properties, whenever\r\n * Data Item-related element is redrawn, e.g. series.\r\n */\n _this.hasProperties = false;\n /**\r\n * An object containing calculated values.\r\n */\n _this.values = {};\n /**\r\n * An object container current working values.\r\n */\n //public readonly workingValues: { [index: string]: { [index: string]: number } } = {};\n /**\r\n * An object containing categories.\r\n */\n _this.categories = {};\n /**\r\n * An object containing dates.\r\n */\n _this.dates = {};\n /**\r\n * An object containing locations for the Data Item.\r\n *\r\n * A location is a position within date or category, or, in some other cases,\r\n * where there is no single point but rather some period.\r\n */\n _this.locations = {};\n /**\r\n * Current working locations.\r\n */\n _this.workingLocations = {};\n /**\r\n * An object containing Data Item specific appearance properties in key-value\r\n * pairs.\r\n *\r\n * Sometimes a single Data Item needs to apply different properties than the\r\n * rest of the data [[Series]] it is part of. E.g. a single column,\r\n * represented by a Data Item needs to be filled with a different color than\r\n * the reset of the [[ColumnSeries]] it belongs to.\r\n *\r\n * That's where Data Item's `properties` come into play.\r\n *\r\n * Please note that you should set Data Item-specific properties using\r\n * `setProperty()` method, rather than access `properties` object directly.\r\n */\n _this.properties = {};\n /**\r\n * A list of [[Sprite]] elements that are associated with this Data Item.\r\n *\r\n * E.g. an [[Axis]] Data Item has several separate elements associated with\r\n * it, like [[AxisTick]], [[AxisLabel]], and [[Grid]].\r\n *\r\n * Data Item keeps track of all of them, so it can toggle all related visual\r\n * elements when it itself is toggled.\r\n */\n _this.sprites = [];\n /**\r\n * Identifies if this object is a \"template\" and should not be treated as\r\n * real object that is drawn or actually used in the chart.\r\n */\n _this.isTemplate = false;\n /**\r\n * The current index within the dataItems\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._index = null;\n /**\r\n * Is Data Item currently visible?\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._visible = true;\n /**\r\n * Is Data Item currently hidden?\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._hidden = false;\n /**\r\n * Should this Data Item be used when calculating data ranges and scales?\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._ignoreMinMax = false;\n /**\r\n * Some of the Data Item's data fields may contain an array of children. This\r\n * property contains an object indicating which fields hold an array, so that\r\n * they can be processed properly.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this.hasChildren = {};\n /**\r\n * Indicates whether Data Item is currently animiting from visible to hidden\r\n * state.\r\n */\n _this.isHiding = false;\n /**\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._valueAnimations = {};\n /**\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._locationAnimations = {};\n _this.className = \"DataItem\";\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(DataItem.prototype, \"index\", {\n /**\r\n * Data Item's position index in Component's data.\r\n *\r\n * @return Index\r\n */\n get: function get() {\n if (this.component) {\n if (this._index != null) {\n return this._index;\n } else {\n return -1;\n }\n } else {\n return -1;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataItem.prototype, \"animations\", {\n /**\r\n * A list of [[Animations]] objects currently mutating Data Item's values.\r\n *\r\n * @return [description]\r\n */\n get: function get() {\n if (!this._animations) {\n this._animations = [];\n this._disposers.push(new AnimationDisposer(this._animations));\n }\n return this._animations;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataItem.prototype, \"visible\", {\n /**\r\n * Returns `true` if this Data Item is currently visible.\r\n *\r\n * @return Visible?\r\n */\n get: function get() {\n if (this._hidden) {\n return false;\n }\n return this._visible;\n },\n /**\r\n * Sets visibility of the Data Item.\r\n *\r\n * @param value Visible?\r\n */\n set: function set(value) {\n if (value) {\n this.hidden = false;\n }\n if (this._visible != value) {\n this.setVisibility(value);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataItem.prototype, \"hidden\", {\n /**\r\n * Returns `true` if this Data Item is currently hidden.\r\n *\r\n * @return Hidden?\r\n */\n get: function get() {\n return this._hidden;\n },\n /**\r\n * Sets hidden flag for data item. Mostly used to initially hide data item.\r\n *\r\n * @param value Hidden?\r\n */\n set: function set(value) {\n if (this._hidden != value) {\n this._hidden = value;\n if (value) {\n this.setVisibility(false);\n } else {\n this.setVisibility(true, true);\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataItem.prototype, \"__disabled\", {\n /**\r\n * Is this Data Item currently disabled?\r\n *\r\n * @ignore Exclude from docs\r\n * @param {boolean}\r\n */\n get: function get() {\n return this._disabled;\n },\n /**\r\n * Disables all Sprites associated with this Data Item.\r\n *\r\n * @ignore Exclude from docs\r\n * @param {boolean}\r\n */\n set: function set(value) {\n //\tif (this._disabled != value) { // not good\n this._disabled = value;\n $array.each(this.sprites, function (sprite) {\n sprite.__disabled = value;\n });\n //\t}\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets visibility of the Data Item.\r\n *\r\n * @param value Data Item\r\n */\n DataItem.prototype.setVisibility = function (value, noChangeValues) {\n $array.each(this.sprites, function (sprite) {\n if (value) {\n sprite.visible = sprite.defaultState.properties.visible;\n } else {\n if (sprite.hiddenState) {\n sprite.visible = sprite.hiddenState.properties.visible;\n } else {\n sprite.visible = false;\n }\n }\n });\n this._visible = value;\n if (this.events.isEnabled(\"visibilitychanged\")) {\n var event_1 = {\n type: \"visibilitychanged\",\n target: this,\n visible: value\n };\n this.events.dispatchImmediately(\"visibilitychanged\", event_1);\n }\n };\n /**\r\n * Shows the Data Item and related visual elements.\r\n *\r\n * @param duration Animation duration (ms)\r\n * @param delay Delay animation (ms)\r\n * @param fields A list of fields to set values of\r\n */\n DataItem.prototype.show = function (duration, delay, fields) {\n var _this = this;\n if (!this.hidden) {\n this.setVisibility(true, true);\n this.isHiding = false;\n if (this._hideDisposer) {\n this.removeDispose(this._hideDisposer);\n }\n var animation_1;\n if (fields) {\n $array.each(fields, function (field) {\n animation_1 = _this.setWorkingValue(field, _this.values[field].value, duration, delay);\n });\n }\n $array.each(this.sprites, function (sprite) {\n var animation = sprite.show(duration);\n if (animation != null && !animation.isFinished()) {\n _this._disposers.push(animation);\n if (delay != null && delay > 0) {\n animation.delay(delay);\n }\n }\n });\n return animation_1;\n }\n };\n /**\r\n * Destroys this object and all related data.\r\n */\n DataItem.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n $array.each(this.sprites, function (sprite) {\n sprite.dispose();\n });\n this.sprites = [];\n };\n /**\r\n * Hides the Data Item and related visual elements.\r\n *\r\n * @param duration Animation duration (ms)\r\n * @param delay Delay animation (ms)\r\n * @param toValue A value to set to `fields` when hiding\r\n * @param fields A list of data fields to set value to `toValue`\r\n */\n DataItem.prototype.hide = function (duration, delay, toValue, fields) {\n var _this = this;\n this.isHiding = true;\n $array.each(this.sprites, function (sprite) {\n var animation = sprite.hide(duration);\n if (animation != null && !animation.isFinished()) {\n _this._disposers.push(animation);\n if (delay != null && delay > 0) {\n animation.delay(delay);\n }\n }\n });\n if ($type.isNumber(toValue) && fields) {\n var animation_2;\n $array.each(fields, function (field) {\n var anim = _this.setWorkingValue(field, toValue, duration, delay);\n if (anim) {\n animation_2 = anim;\n }\n });\n if (animation_2 && !animation_2.isFinished()) {\n this._hideDisposer = animation_2.events.on(\"animationended\", function () {\n _this.setVisibility(false, true);\n _this.isHiding = false;\n });\n this._disposers.push(this._hideDisposer);\n return animation_2;\n } else {\n this.isHiding = false;\n this.setVisibility(false, true);\n }\n } else {\n this.isHiding = false;\n this.setVisibility(false);\n }\n };\n /**\r\n * Returns a duration (ms) the Data Item should take to animate from one\r\n * value to another.\r\n *\r\n * If the duration is not specified via parameter, this method will try to\r\n * request a default duration from the related `Component`.\r\n *\r\n * @param duration Default duration (ms)\r\n * @return Duration (ms)\r\n */\n DataItem.prototype.getDuration = function (duration) {\n if (!$type.isNumber(duration)) {\n var component = this.component;\n if (component) {\n duration = component.interpolationDuration;\n }\n }\n if (duration != null) {\n return this.adapter.apply(\"duration\", duration);\n }\n };\n /**\r\n * Returns a numeric value for specific data field.\r\n *\r\n * If `calculated` is not set, it will return a raw value, as it is in\r\n * source data.\r\n *\r\n * If `calculated` is set, it will return a pre-calculated specific value.\r\n *\r\n * @param name Data field name\r\n * @param calculated A calculated value name\r\n * @return Value\r\n */\n DataItem.prototype.getValue = function (name, calculated) {\n if (name && this.component) {\n if (!calculated) {\n calculated = this.component.dataFields[name + \"Show\"];\n if (!calculated) {\n calculated = \"value\";\n }\n }\n var value = this.values[name][calculated];\n if (this.adapter.isEnabled(\"value\")) {\n return this.adapter.apply(\"value\", {\n value: value,\n field: name\n }).value;\n } else {\n return value;\n }\n }\n };\n /**\r\n * Returns a current working value for a specific data field.\r\n *\r\n * The actual value may differ from the one returned by `getValue()`. The\r\n * latter returns static values from the data source.\r\n *\r\n * `getWorkingValue()` returns current value, which is usually different if\r\n * Data Item is animating from one state to another.\r\n *\r\n * @param name Data field name\r\n * @return Value\r\n */\n DataItem.prototype.getWorkingValue = function (name) {\n if (name && this.component) {\n var realName = this.component.dataFields[name + \"Show\"];\n if (!realName) {\n realName = \"workingValue\";\n }\n return this.adapter.apply(\"workingValue\", {\n workingValue: this.values[name][realName],\n field: name\n }).workingValue;\n }\n };\n /**\r\n * @ignore\r\n * @return Value\r\n */\n DataItem.prototype.getActualWorkingValue = function (name) {\n return this.values[name].workingValue;\n };\n /**\r\n * Sets a numeric value for specific data field.\r\n *\r\n * @param name Data field name\r\n * @param value Value\r\n * @param calculated Calculated data field name\r\n * @param duration Duration (ms) to animate to new value to\r\n * @param delay Delay animation (ms)\r\n */\n DataItem.prototype.setValue = function (name, value, duration, delay) {\n var currentValue = this.values[name].value;\n var newDuration = this.getDuration(duration);\n value = $type.toNumber(value);\n if (currentValue !== value) {\n this.values[name].value = value;\n if (this.events.isEnabled(\"valuechanged\")) {\n var event_2 = {\n type: \"valuechanged\",\n target: this,\n property: name\n };\n this.events.dispatchImmediately(\"valuechanged\", event_2);\n }\n if (this.component) {\n this.component.handleDataItemValueChange(this, name);\n }\n }\n this.setWorkingValue(name, value, newDuration, delay);\n };\n DataItem.prototype.setCalculatedValue = function (name, value, calculated) {\n var currentValue = this.values[name][calculated];\n if (currentValue !== value && $type.isNumber(value)) {\n this.values[name][calculated] = value;\n if (this.events.isEnabled(\"calculatedvaluechanged\")) {\n var event_3 = {\n type: \"calculatedvaluechanged\",\n target: this,\n property: name\n };\n this.events.dispatchImmediately(\"calculatedvaluechanged\", event_3);\n }\n if (this.component) {\n this.component.handleDataItemCalculatedValueChange(this, name);\n }\n }\n };\n /**\r\n * Set current working numeric value for a specific data field.\r\n *\r\n * @param name Data field name\r\n * @param value Value\r\n * @param calculated Calculated data field name\r\n * @param duration Duration (ms) to animate to new value to\r\n * @param delay Delay animation (ms)\r\n * @return An [[Animation]] object used for transition to new values\r\n */\n DataItem.prototype.setWorkingValue = function (name, value, duration, delay) {\n if ($type.isNumber(this.values[name].value)) {\n var newDuration = this.getDuration(duration);\n var workingValue = this.values[name].workingValue;\n if (newDuration != null && newDuration > 0 && $type.isNumber(workingValue) && this.component) {\n // sometimes NaN is passed, so only change this to != null if all cases of NaN are handled, otherwise animation won't stop\n if (workingValue != value) {\n var animation = this.animate({\n childObject: this.values[name],\n property: \"workingValue\",\n from: workingValue,\n to: value,\n dummyData: name\n }, newDuration, this.component.interpolationEasing);\n if (delay != null) {\n animation.delay(delay);\n }\n animation.events.on(\"animationstarted\", this.handleInterpolationProgress, this);\n animation.events.on(\"animationprogress\", this.handleInterpolationProgress, this);\n animation.events.on(\"animationended\", this.handleInterpolationProgress, this);\n this._valueAnimations[name] = animation;\n return animation;\n } else {\n var valueAnimation = this._valueAnimations[name];\n if (valueAnimation) {\n valueAnimation.stop();\n }\n this.values[name].workingValue = value;\n }\n } else {\n var valueAnimation = this._valueAnimations[name];\n if (valueAnimation) {\n valueAnimation.stop();\n }\n this.values[name].workingValue = value;\n if (this.events.isEnabled(\"workingvaluechanged\")) {\n var event_4 = {\n type: \"workingvaluechanged\",\n target: this,\n property: name\n };\n this.events.dispatchImmediately(\"workingvaluechanged\", event_4);\n }\n if (this.component) {\n this.component.handleDataItemWorkingValueChange(this, name);\n }\n }\n }\n };\n /**\r\n * Sets a relative location for a data field.\r\n *\r\n * A location is always relative on a 0 to 1 scale, with 0 being beginning,\r\n * 0.5 middle and 1 end.\r\n *\r\n * @todo Rewiew description\r\n * @param name Data field name\r\n * @param value Location (0-1)\r\n * @param duration Duration (ms) to animate to new value to\r\n * @param delay Delay animation (ms)\r\n */\n DataItem.prototype.setLocation = function (name, value, duration, delay) {\n var currentLocation = this.locations[name];\n if (currentLocation !== value) {\n this.locations[name] = value;\n if (this.events.isEnabled(\"locationchanged\")) {\n var event_5 = {\n type: \"locationchanged\",\n target: this,\n property: name\n };\n this.events.dispatchImmediately(\"locationchanged\", event_5);\n }\n if (this.component) {\n this.component.handleDataItemValueChange(this, name); // correct\n }\n this.setWorkingLocation(name, value, duration, delay);\n }\n };\n /**\r\n * Sets a current working location for a data field.\r\n *\r\n * @todo Rewiew description\r\n * @param name Data field name\r\n * @param value Location (0-1)\r\n * @param duration Duration (ms) to animate to new value to\r\n * @param delay Delay animation (ms)\r\n */\n DataItem.prototype.setWorkingLocation = function (name, value, duration, delay) {\n var newDuration = this.getDuration(duration);\n var workingLocation = this.workingLocations[name];\n if (newDuration != null && newDuration > 0 && $type.isNumber(workingLocation) && this.component) {\n // sometimes NaN is passed, so only change this to != null if all cases of NaN are handled, otherwise animation won't stop\n if (workingLocation != value) {\n var animation = this.animate({\n childObject: this.workingLocations,\n property: name,\n from: workingLocation,\n to: value,\n dummyData: name\n }, newDuration, this.component.interpolationEasing);\n if (delay != null) {\n animation.delay(delay);\n }\n animation.events.on(\"animationstarted\", this.handleInterpolationProgress, this);\n animation.events.on(\"animationprogress\", this.handleInterpolationProgress, this);\n animation.events.on(\"animationended\", this.handleInterpolationProgress, this);\n this._locationAnimations[name] = animation;\n return animation;\n } else {\n var locationAnimation = this._locationAnimations[name];\n if (locationAnimation) {\n locationAnimation.stop();\n }\n this.workingLocations[name] = value;\n }\n } else {\n var locationAnimation = this._locationAnimations[name];\n if (locationAnimation) {\n locationAnimation.stop();\n }\n this.workingLocations[name] = value;\n if (this.events.isEnabled(\"workinglocationchanged\")) {\n var event_6 = {\n type: \"workinglocationchanged\",\n target: this,\n property: name\n };\n this.events.dispatchImmediately(\"workinglocationchanged\", event_6);\n }\n if (this.component) {\n this.component.handleDataItemWorkingLocationChange(this, name);\n }\n }\n };\n /**\r\n * Sets Date value to a data field.\r\n *\r\n * @param name Data field name\r\n * @param date Date object\r\n * @param duration Duration (ms) to animate to new value to\r\n */\n DataItem.prototype.setDate = function (name, date, duration) {\n if (!$type.isDate(date) && this.component) {\n date = this.component.dateFormatter.parse(date);\n }\n var currentDate = this.dates[name];\n if (currentDate !== date) {\n this.dates[name] = date;\n this.setValue(name, date.getTime(), duration);\n }\n };\n /**\r\n * Returns a Date value of the data field.\r\n *\r\n * @param name Data field name\r\n * @return Date object\r\n */\n DataItem.prototype.getDate = function (name) {\n return this.adapter.apply(\"date\", {\n date: this.dates[name],\n field: name\n }).date;\n };\n /**\r\n * Sets a Data Item-specific visual properties to apply to related elements.\r\n *\r\n * @param name Property name\r\n * @param value Property value\r\n */\n DataItem.prototype.setProperty = function (name, value) {\n if (this.properties[name] !== value) {\n this.hasProperties = true;\n this.properties[name] = value;\n if (this.events.isEnabled(\"propertychanged\")) {\n var event_7 = {\n type: \"propertychanged\",\n target: this,\n property: name,\n value: value\n };\n this.events.dispatchImmediately(\"propertychanged\", event_7);\n }\n if (this.component) {\n this.component.handleDataItemPropertyChange(this, name);\n }\n }\n };\n /**\r\n * Sets a related category for this Data Item.\r\n *\r\n * @todo Review description\r\n * @param name Data field name\r\n * @param value Category\r\n */\n DataItem.prototype.setCategory = function (name, value) {\n if (!$type.isString(value)) {\n value = $type.castString(value);\n }\n if (this.categories[name] !== value) {\n this.categories[name] = value;\n }\n };\n /**\r\n * Clones the Data Item, including all related data.\r\n *\r\n * @return New Data Item clone\r\n */\n DataItem.prototype.clone = function (cloneId) {\n var dataItem = _super.prototype.clone.call(this, cloneId);\n dataItem.copyFrom(this);\n return dataItem;\n };\n /**\r\n * Copies all properties and related data from different data item.\r\n *\r\n * @param object Source data item\r\n */\n DataItem.prototype.copyFrom = function (source) {\n var _this = this;\n _super.prototype.copyFrom.call(this, source);\n if (source.dataContext) {\n this.dataContext = $utils.copy(source.dataContext, {});\n }\n $utils.copyProperties(source.locations, this.locations);\n $utils.copyProperties(source.properties, this.properties);\n $utils.copyProperties(source.categories, this.categories);\n $utils.copyProperties(source.values, this.values);\n $utils.copyProperties(source.dates, this.dates);\n $object.each(source.values, function (name, value) {\n _this.values[name] = $object.copy(value);\n });\n this.adapter.copyFrom(source.adapter);\n this.events.copyFrom(source.events);\n this.component = source.component;\n };\n Object.defineProperty(DataItem.prototype, \"opacity\", {\n /**\r\n * Sets opacity for all Data Item's related elements (Sprites).\r\n *\r\n * @param value Opacity (0-1)\r\n */\n set: function set(value) {\n $array.each(this.sprites, function (sprite) {\n sprite.opacity = value;\n });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataItem.prototype, \"ignoreMinMax\", {\n /**\r\n * Exclude from min/max calculations?\r\n * @return Exclude from min/max calculations?\r\n */\n get: function get() {\n return this._ignoreMinMax;\n },\n /**\r\n * Sets whether this data point should not be included in the scale and\r\n * minimum/maximum calculations.\r\n *\r\n * E.g. some we may want to exclude a particular data point from influencing\r\n * [[ValueAxis]] scale.\r\n *\r\n * @param value Exclude from min/max calculations?\r\n */\n set: function set(value) {\n this._ignoreMinMax = value;\n if (this.events.isEnabled(\"propertychanged\")) {\n var event_8 = {\n type: \"propertychanged\",\n target: this,\n property: \"ignoreMinMax\",\n value: value\n };\n this.events.dispatchImmediately(\"propertychanged\", event_8);\n }\n if (this.component) {\n this.component.handleDataItemPropertyChange(this, \"ignoreMinMax\");\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates and starts an [[Animation]] to interpolate (morph) Data Item's\r\n * properties and/or values.\r\n *\r\n * @see {@link Animation}\r\n * @param animationOptions Animation options\r\n * @param duration Animation duration (ms)\r\n * @param easing Easing function\r\n * @return Animation\r\n */\n DataItem.prototype.animate = function (animationOptions, duration, easing) {\n return new Animation(this, animationOptions, duration, easing).start();\n };\n /**\r\n * Handles intermediate steps when Data Item is interpolating (morphing) from\r\n * one value to another.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event object\r\n */\n DataItem.prototype.handleInterpolationProgress = function (event) {\n var animation = event.target;\n // it's always only one options, no need cycle\n var animationOptions = animation.animationOptions[0];\n if (animationOptions) {\n if (this.events.isEnabled(\"workingvaluechanged\")) {\n var event_9 = {\n type: \"workingvaluechanged\",\n target: this,\n property: animationOptions.dummyData\n };\n this.events.dispatchImmediately(\"workingvaluechanged\", event_9);\n }\n if (this.component) {\n this.component.handleDataItemWorkingValueChange(this, animationOptions.dummyData);\n }\n }\n };\n /**\r\n * Checks whether Data Item has values set for all of the data fields,\r\n * supplied via argument.\r\n *\r\n * @ignore Exclude from docs\r\n * @param fields Field list to check\r\n * @return Has values for all fields?\r\n */\n DataItem.prototype.hasValue = function (fields) {\n // todo: what about categories?\n for (var i = 0, len = fields.length; i < len; i++) {\n var values = this.values[fields[i]];\n if (!values || !$type.hasValue(values.value)) {\n return false;\n }\n }\n return true;\n };\n Object.defineProperty(DataItem.prototype, \"depth\", {\n /**\r\n * Depth of the Data Item.\r\n *\r\n * In nested data structures, like TreeMap, this indicates the level this\r\n * data point is at, in relation to the parent Data Item.\r\n *\r\n * @return Depth\r\n */\n get: function get() {\n if (!this.parent) {\n return 0;\n } else {\n return this.parent.depth + 1;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataItem.prototype, \"dataContext\", {\n /**\r\n * Sets to a reference to an original object from Component's data.\r\n *\r\n * @return [description]\r\n */\n get: function get() {\n return this._dataContext;\n },\n /**\r\n * A reference to an original object in Component's data, that this Data Item\r\n * is derived from.\r\n *\r\n * @param value Original data object\r\n */\n set: function set(value) {\n this._dataContext = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * adds a sprite to dataItem.sprites array\r\n * @ignore\r\n */\n DataItem.prototype.addSprite = function (sprite) {\n if (sprite.dataItem && sprite.dataItem != this) {\n $array.remove(sprite.dataItem.sprites, sprite);\n }\n if (!this.visible) {\n sprite.hide(0);\n }\n if (this.isHiding) {\n sprite.hide();\n }\n this.sprites.push(sprite);\n sprite.dataItem = this;\n };\n return DataItem;\n}(BaseObjectEvents);\nexport { DataItem };","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","/**\r\n * This module contains a base class for an SVG filter.\r\n *\r\n * Filters can be used to decorate, change and transform just about any DOM\r\n * element.\r\n *\r\n * A Filter works by applying one or more effects (primitives) to SVG element.\r\n *\r\n * For more information on how SVG filters work, refer to\r\n * [this MDN tutorial](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/SVG_Filters_Tutorial).\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObject } from \"../../Base\";\nimport { getGhostPaper } from \"../Paper\";\nimport { Animation, AnimationDisposer } from \"../../utils/Animation\";\nimport { List } from \"../../utils/List\";\nimport * as $object from \"../../utils/Object\";\nimport * as $iter from \"../../utils/Iterator\";\n;\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Base filter class.\r\n *\r\n * This class while can be instantiated will not do anything. It is just a base\r\n * functionality for any other \"real\" filters to extend.\r\n *\r\n * Filters can be used to decorate, change and transform just about any DOM\r\n * element.\r\n *\r\n * A Filter works by applying one or more effects (primitives) to SVG element.\r\n *\r\n * For more information on how SVG filters work, refer to\r\n * [this MDN tutorial](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/SVG_Filters_Tutorial).\r\n *\r\n * @todo Example\r\n */\nvar Filter = /** @class */function (_super) {\n tslib_1.__extends(Filter, _super);\n /**\r\n * Constructor\r\n */\n function Filter() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * A storage for Filter property/value pairs.\r\n *\r\n * @ignore Exclude from docs\r\n * @see {@link FilterProperties}\r\n */\n _this.properties = {};\n /**\r\n * Identifies if this object is a \"template\" and should not be treated as\r\n * real object that is drawn or actually used in the chart.\r\n */\n _this.isTemplate = false;\n /**\r\n * [_scale description]\r\n *\r\n * @todo Description\r\n */\n _this._scale = 1;\n /**\r\n * [_nonScaling description]\r\n *\r\n * @todo Description\r\n */\n _this._nonScaling = true;\n _this.className = \"Filter\";\n // Create a list to hold primitives (effect elements)\n _this.filterPrimitives = new List();\n // Automatically add added primitives to `_disposers` so they are discarded\n // when Filter object is destroyed (disposed)\n _this.filterPrimitives.events.on(\"inserted\", function (ev) {\n _this._disposers.push(ev.newValue);\n });\n // Set default dimensions\n _this.width = 120;\n _this.height = 120;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Appends actual filter elements to the filter group.\r\n *\r\n * @ignore Exclude from docs\r\n * @param filterElement An SVG `<group>` element to add filter element to\r\n */\n Filter.prototype.appendPrimitives = function (filterElement) {\n $iter.each(this.filterPrimitives.iterator(), function (filterPrimitive) {\n filterElement.add(filterPrimitive);\n });\n };\n /**\r\n * Uses Transitions filter's values from current to target. This is used to\r\n * smoothly appear filter, rather than it pop into effect.\r\n *\r\n * @ignore Exclude from docs\r\n * @param animationOptions Animation options\r\n * @param duration Duration in milliseconds\r\n * @param easing Easing function\r\n * @return Animation instance\r\n */\n Filter.prototype.animate = function (animationOptions, duration, easing) {\n var animation = new Animation(this, animationOptions, duration, easing).start();\n return animation;\n };\n Object.defineProperty(Filter.prototype, \"width\", {\n /**\r\n * @return Width (%)\r\n */\n get: function get() {\n return this.properties[\"width\"];\n },\n /**\r\n * Width of the filter element in percent.\r\n *\r\n * If the filter is designed to \"bleed out\" of the original target element,\r\n * like for example a shadow, you need this bigger than 100, or the\r\n * non-fitting parts will be clipped.\r\n *\r\n * @default 120\r\n * @param value Width (px)\r\n */\n set: function set(value) {\n this.properties[\"width\"] = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Filter.prototype, \"height\", {\n /**\r\n * @return Height\r\n */\n get: function get() {\n return this.properties[\"height\"];\n },\n /**\r\n * Height of the filter element in percent.\r\n *\r\n * If the filter is designed to \"bleed out\" of the original target element,\r\n * like for example a shadow, you need this bigger than 100, or the\r\n * non-fitting parts will be clipped.\r\n *\r\n * @default 120\r\n * @param value Height (%)\r\n */\n set: function set(value) {\n this.properties[\"height\"] = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies properties from another [[Filter]] object.\r\n *\r\n * @param filter Source [[Filter]] object\r\n */\n Filter.prototype.copyFrom = function (filter) {\n var _this = this;\n _super.prototype.copyFrom.call(this, filter);\n $object.each(filter.properties, function (key, value) {\n _this[key] = value;\n });\n };\n Object.defineProperty(Filter.prototype, \"paper\", {\n /**\r\n * @return Paper\r\n */\n get: function get() {\n if (this._paper) {\n return this._paper;\n }\n return getGhostPaper();\n },\n /**\r\n * Sets [[Paper]] instance to create filter's elements in.\r\n *\r\n * @ignore Exclude from docs\r\n * @param paper Paper\r\n */\n set: function set(paper) {\n if (this._paper != paper) {\n this._paper = paper;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Filter.prototype, \"animations\", {\n /**\r\n * All animations currently in play.\r\n *\r\n * @ignore Exclude from docs\r\n * @return List of animations\r\n */\n get: function get() {\n if (!this._animations) {\n this._animations = [];\n this._disposers.push(new AnimationDisposer(this._animations));\n }\n return this._animations;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Filter.prototype, \"scale\", {\n /**\r\n * @ignore Exclude from docs\r\n */\n get: function get() {\n return this._scale;\n },\n /**\r\n * [[Sprite]] uses this method to inform filter about it's scale.\r\n *\r\n * @ignore Exclude from docs\r\n */\n set: function set(value) {\n this._scale = value;\n this.updateScale();\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Updates filter properties which depend on scale.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Filter.prototype.updateScale = function () {\n // Dummy method for extending classes to override.\n };\n Object.defineProperty(Filter.prototype, \"nonScaling\", {\n /**\r\n * @return Non scaling?\r\n */\n get: function get() {\n return this._nonScaling;\n },\n /**\r\n * If a filter is non scaling, it will look the same even if the sprite is\r\n * scaled, otherwise filter will scale together with a [[Sprite]].\r\n *\r\n * @default false\r\n * @param value Non scaling?\r\n */\n set: function set(value) {\n this._nonScaling = value;\n if (!value) {\n this._scale = 1;\n }\n this.updateScale();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Filter.prototype, \"sprite\", {\n /**\r\n * A target element this filter is currently attached to.\r\n *\r\n * We need to keep track of it because one filter can be used for just one\r\n * element, so we have to remove it from the old \"parent\" when attaching to\r\n * the new one.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Target element\r\n */\n set: function set(value) {\n this.setSprite(value);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets filter's target element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Element filter is being attached to\r\n */\n Filter.prototype.setSprite = function (value) {\n if (this._sprite && this._sprite != value) {\n this._sprite.filters.removeValue(this);\n }\n this._sprite = value;\n };\n return Filter;\n}(BaseObject);\nexport { Filter };","/**\r\n * Contains code and logic for generating radial gradients.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObject } from \"../../Base\";\nimport { List } from \"../../utils/List\";\nimport { getGhostPaper } from \"../Paper\";\nimport { registry } from \"../../Registry\";\nimport * as $iter from \"../../utils/Iterator\";\nimport * as $type from \"../../utils/Type\";\nimport { Percent } from \"../../utils/Percent\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Radial gradient class.\r\n */\nvar RadialGradient = /** @class */function (_super) {\n tslib_1.__extends(RadialGradient, _super);\n /**\r\n * Constructor\r\n */\n function RadialGradient() {\n var _this = _super.call(this) || this;\n /**\r\n * List of colors switch definitions in a gradient.\r\n */\n _this._stops = new List();\n _this.element = _this.paper.addGroup(\"radialGradient\");\n _this.id = \"gradient-\" + registry.getUniqueId();\n _this.element.attr({\n \"id\": _this.id\n });\n _this._disposers.push(_this.element);\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws gradient.\r\n */\n RadialGradient.prototype.draw = function () {\n var _this = this;\n var gradientElement = this.element;\n if ($type.isNumber(this.cx)) {\n var value = this.cx;\n if (value instanceof Percent) {\n value = value.percent + \"%\";\n }\n gradientElement.attr({\n \"cx\": value\n });\n }\n if ($type.isNumber(this.cy)) {\n var value = this.cy;\n if (value instanceof Percent) {\n value = value.percent + \"%\";\n }\n gradientElement.attr({\n \"cy\": value\n });\n }\n if (this.fx) {\n var value = this.fx;\n if (value instanceof Percent) {\n value = value.percent + \"%\";\n }\n gradientElement.attr({\n \"fx\": value\n });\n }\n if (this.fy) {\n var value = this.fy;\n if (value instanceof Percent) {\n value = value.percent + \"%\";\n }\n gradientElement.attr({\n \"fy\": value\n });\n }\n gradientElement.removeChildNodes();\n $iter.each($iter.indexed(this._stops.iterator()), function (a) {\n var i = a[0];\n var stop = a[1];\n var offset = stop.offset;\n if (!$type.isNumber(offset)) {\n offset = i / (_this._stops.length - 1);\n }\n var gradientStop = _this.paper.add(\"stop\");\n if ($type.hasValue(stop.color)) {\n gradientStop.attr({\n \"stop-color\": stop.color.toString()\n });\n }\n if ($type.isNumber(stop.opacity)) {\n gradientStop.attr({\n \"stop-opacity\": stop.opacity\n });\n }\n if ($type.isNumber(offset)) {\n gradientStop.attr({\n \"offset\": offset\n });\n }\n gradientElement.add(gradientStop);\n });\n };\n /**\r\n * Adds a color step to the gradient.\r\n *\r\n * @param color Color (hex code or named color)\r\n * @param opacity Opacity (value from 0 to 1; 0 completely transaprent, 1 fully opaque)\r\n * @param offset Position of color in the gradient (value 0 to 1; 0 meaning start of the gradient and 1 end)\r\n */\n RadialGradient.prototype.addColor = function (color, opacity, offset) {\n this._stops.push({\n color: color,\n opacity: opacity,\n offset: offset\n });\n this.draw();\n };\n Object.defineProperty(RadialGradient.prototype, \"paper\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Paper\r\n */\n get: function get() {\n if (this._paper) {\n return this._paper;\n }\n return getGhostPaper();\n },\n /**\r\n * A [[Paper]] instace to use for the gradient.\r\n *\r\n * @ignore Exclude from docs\r\n * @param paper Paper\r\n */\n set: function set(paper) {\n if (this._paper != paper) {\n this._paper = paper;\n this.draw();\n paper.appendDef(this.element);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RadialGradient.prototype, \"cx\", {\n get: function get() {\n return this._cx;\n },\n /**\r\n * Center x coordinate of the gradient, can be set as number or Percent\r\n *\r\n * @param point Center point\r\n */\n set: function set(value) {\n this._cx = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RadialGradient.prototype, \"cy\", {\n get: function get() {\n return this._cy;\n },\n /**\r\n * Center y coordinate of the gradient, can be set as number or Percent\r\n *\r\n * @param point Center point\r\n */\n set: function set(value) {\n this._cy = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RadialGradient.prototype, \"fx\", {\n get: function get() {\n return this._fx;\n },\n /**\r\n * y coordinate of the focal point of a gradient, can be set in pixels or as Percent\r\n *\r\n * @param point Center point\r\n */\n set: function set(value) {\n this._fx = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RadialGradient.prototype, \"fy\", {\n get: function get() {\n return this._fy;\n },\n /**\r\n * y coordinate of the focal point of a gradient, can be set in pixels or as Percent\r\n *\r\n * @param point Center point\r\n */\n set: function set(value) {\n this._fy = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n RadialGradient.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.stops.copyFrom(source.stops);\n this.cx = source.cx;\n this.cy = source.cy;\n this.fx = source.fx;\n this.fy = source.fy;\n };\n Object.defineProperty(RadialGradient.prototype, \"stops\", {\n /**\r\n * A list of color stops in the gradient.\r\n *\r\n * @return Stops\r\n */\n get: function get() {\n return this._stops;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Clears the gradient.\r\n *\r\n * @ignore Exclude from docs\r\n */\n RadialGradient.prototype.clear = function () {\n this._stops.clear();\n };\n return RadialGradient;\n}(BaseObject);\nexport { RadialGradient };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"RadialGradient\"] = RadialGradient;","import dotProp from 'dot-prop-immutable';\nimport _ from 'lodashExtended';\nimport { useReducer } from 'react';\nimport { connect } from 'react-redux';\nimport { Route, Switch, useHistory, useRouteMatch } from 'react-router-dom';\nimport { Btn } from 'sharedComponents';\n\nimport { updateSectionData } from '../../sections/operations';\nimport { getSectionData } from '../../sections/selectors';\nimport Section from '../Section';\nimport SubmitSummarySection from '../SubmitSummarySection';\nimport { CustomSummaryRow } from './PAASummaryRow';\nimport { addWasteProductionArea } from './Sec2WasteProductionAreas/operations';\nimport WasteProductionArea from './Sec2WasteProductionAreas/WasteProductionArea';\n\nconst SECTION_ID = \"waste_production_areas\";\nconst TITLE = \"Waste Production Areas\";\n\nconst d = dotProp;\n\nfunction mergeErrors(allErrors, attr) {\n return {\n ...allErrors,\n ...getErrors(attr),\n };\n}\n\nconst incompleteMessage = (state) => {\n const wasteProductionAreasForm = getSectionData(SECTION_ID, state);\n const wasteProductionAreasData = selectWasteProductionAreasState(state);\n\n const blankFields = !!Object.values(wasteProductionAreasData).filter(\n (wpa) => wpa.isAreaIncludedInAudit === \"yes\"\n ).length\n ? 0\n : 1;\n\n const invalidWPACount = Object.values(wasteProductionAreasData).filter(wpa => \n !wpa.areaName || !wpa.areaType || !wpa.processDescription\n ).length\n\n const invalidFields = blankFields + invalidWPACount\n\n const result =\n invalidFields > 0\n ? `There ${\n invalidFields == 1 ? \"is\" : \"are\"\n } ${invalidFields} unanswered question${\n invalidFields == 1 ? \"\" : \"s\"\n } remaining`\n : null;\n\n return result;\n};\n\nconst isStarted = (state) => {\n const wasteProductionAreasData = selectWasteProductionAreasState(state);\n return _(wasteProductionAreasData).isPresent();\n};\n\nconst WasteProductionAreas = ({\n onChange,\n number,\n sectionData,\n onAddWasteProductionArea,\n wasteProductionAreasData,\n}) => {\n const { url } = useRouteMatch();\n const history = useHistory();\n const locationUpdateModalPath = `${url}/locationDetailsUpdate`;\n const [errors, setErrors] = useReducer(mergeErrors, {});\n const preamble = (\n <div>\n <p>\n Provide a list of <b>all</b> the different areas{\" \"}\n <b>(wards, departments, or clinically functional areas)</b> that exist\n within the premises. This should detail all the specific processes\n producing relevant wastes at the practice, for example,{\" \"}\n <b>pharmacy, primary care, dental, acute or laboratory</b>. This area\n must{\" \"}\n <b>\n <i>NOT</i>\n </b>{\" \"}\n be external or internal storage space.\n <b>{\" \"}(If you have 20 clinically active or consulting room you must list all 20)</b>\n </p>\n </div>\n );\n\n return (\n <Section sectionId={SECTION_ID} title={TITLE} subtext=\"\" wideBody=\"true\" number={number}>\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n {preamble}\n <h4 className=\"h5 d-flex flex-grow-1\">\n <span className=\"px-2\" style={{ width: \"45%\" }}>\n List of Waste Production Area (WPA) on Site\n </span>\n <span className=\"px-2\" style={{ width: \"40%\" }}>\n Waste Production Process\n </span>\n <span className=\"px-2\" style={{ width: \"15%\" }}>\n Included in Audit\n </span>\n <span style={{ width: \"10%\" }}></span>\n </h4>\n {_.map(wasteProductionAreasData, (wasteProductionArea, areaId) => {\n return (\n <Switch key={areaId}>\n <Route\n path={`${url}/${SECTION_ID}/${areaId}`}\n render={({ match }) => (\n <WasteProductionArea\n match={match}\n key={areaId}\n areaId={areaId}\n {...wasteProductionArea}\n selected={true}\n />\n )}\n />\n <Route\n path={`${url}`}\n render={({ match }) => (\n <WasteProductionArea\n match={match}\n key={areaId}\n areaId={areaId}\n {...wasteProductionArea}\n selected={false}\n />\n )}\n />\n </Switch>\n );\n })}\n <div className=\"text-center\">\n <Route exact path={`${url}`}>\n <Btn styles=\"outline-primary\" onClick={onAddWasteProductionArea}>\n Add Area\n </Btn>\n </Route>\n </div>\n </div>\n </div>\n </Section>\n );\n};\n\nconst NeedsToBeFilled = () => <span className=\"text-danger\">This needs to be filled</span>\n\nvar SummaryView = ({ wasteAudit: pawaAudit }) => {\n\n const wasteProductionAreasData = pawaAudit.wasteProductionAreas || {};\n\n //console.log('summary', { wasteProductionAreasData });\n\n return (\n <SubmitSummarySection sectionId={SECTION_ID} title={TITLE}>\n <div className=\"media\">\n <div className=\"media-body\">\n {/* NOTE: \" \" - empty space to make it truthy so it won't display the warning msg */}\n <CustomSummaryRow\n value={\n Object.values(wasteProductionAreasData).length ? \" \" : null\n }\n label={\"Waste production areas in audit\"}\n />\n <div>Please note that one of the waste production area should be included.</div>\n <table>\n <thead>\n <tr>\n <th>List of Waste Production Area (WPA) on Site</th>\n <th className=\"pl-2\">Area Type</th>\n <th className=\"pl-2\">Waste Production Process</th>\n <th className=\"pl-2\">WPA being Audited</th>\n </tr>\n </thead>\n <tbody>\n {Object.values(wasteProductionAreasData).map((wpa, idx) => (\n <tr key={idx}>\n <td>{wpa.areaName || <NeedsToBeFilled />}</td>\n <td className=\"pl-2\">{wpa.areaType || <NeedsToBeFilled />}</td>\n <td className=\"pl-2\">{wpa.processDescription || <NeedsToBeFilled />}</td>\n <td className=\"pl-2\">{wpa.isAreaIncludedInAudit || \"no\"}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </div>\n </SubmitSummarySection>\n );\n};\n\nexport const selectWasteProductionAreasState = (state) => {\n const wasteProductionAreas =\n dotProp.get(state.firestore, `data.wasteProductionAreas`) || {};\n\n return Object.fromEntries(\n Object.entries(wasteProductionAreas).filter(\n ([key, value]) => value !== null\n )\n );\n //console.log('selectWasteProductionAreasState', {wasteProductionAreas})\n};\n\nconst mapStateToProps = (state, ownProps) => {\n return {\n sectionData: getSectionData(SECTION_ID, state),\n wasteProductionAreasData: selectWasteProductionAreasState(state),\n };\n};\n\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onChange: (value, name) => {\n dispatch(updateSectionData(SECTION_ID, d.set({}, name, value)));\n },\n onAddWasteProductionArea: (history) => {\n dispatch(addWasteProductionArea(SECTION_ID, history));\n },\n onChangeBin: (binId, value, name) => {\n dispatch(updateBinData(binId, d.set({}, name, value)));\n },\n };\n};\n\nconst ConnectedWasteProductionAreas = connect(\n mapStateToProps,\n mapDispatchToProps\n)(WasteProductionAreas);\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n incompleteMessage,\n isStarted,\n Component: ConnectedWasteProductionAreas,\n SummaryView,\n};\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nconst Error = () => {\n return (\n <div className=\"loading-error\" style={{ textAlign: \"center\" }}>\n <svg version=\"1.1\" x=\"0px\" y=\"0px\" viewBox=\"0 0 512 512\" width=\"40\">\n <g>\n <g>\n <path\n fill=\"white\"\n d=\"M256,0C114.509,0,0,114.497,0,256c0,141.491,114.497,256,256,256c141.491,0,256-114.497,256-256\n\t\t\tC512,114.509,397.503,0,256,0z M368.32,305.16c17.441,17.441,17.441,45.718,0,63.159c-17.441,17.441-45.718,17.442-63.159,0\n\t\t\tl-49.16-49.16l-49.16,49.16c-17.441,17.441-45.718,17.442-63.159,0c-17.441-17.441-17.441-45.718,0-63.159l49.16-49.16\n\t\t\tl-49.16-49.16c-17.441-17.441-17.441-45.718,0-63.159c17.441-17.441,45.718-17.441,63.159,0l49.16,49.16l49.16-49.16\n\t\t\tc17.441-17.441,45.718-17.441,63.159,0c17.441,17.441,17.441,45.718,0,63.159L319.16,256L368.32,305.16z\"\n />\n </g>\n </g>\n </svg>\n <p style={{ color: \"#fff\" }}>Error fetching data from server!</p>\n </div>\n );\n};\n\nError.propTypes = {};\n\nexport default Error;\n","import { Table, TableCell, TableHead, TableRow } from \"@mui/material\";\nimport _ from \"lodash\";\nimport React, { useMemo } from \"react\";\nimport BinDot from \"service/BinDot\";\nimport { useBinFetch } from \"sharedUtils\";\nimport {\n StyledTableBody,\n StyledTableContainer,\n StyledTableRow,\n} from \"./forms/common/CustomTable\";\nimport { DeliveryUnit } from \"./ticket/types\";\n\ninterface DeliveryInstructionProps {\n deliveryUnits: Record<string, DeliveryUnit>;\n requestDeliveryCodes: string[];\n status: \"confirmation\" | \"cancelation\";\n}\n\nconst DeliveryInstruction: React.FC<DeliveryInstructionProps> = ({\n deliveryUnits,\n requestDeliveryCodes,\n status,\n}) => {\n const { binTypes, binGroups } = useBinFetch(requestDeliveryCodes);\n\n const rows = _.map(deliveryUnits, ({ serviceCode, quantity }) => {\n const binType = binTypes[serviceCode];\n const binGroup = binGroups[binType?.binGroupId];\n\n return (\n <TableRow key={serviceCode}>\n <TableCell scope=\"row\">\n <BinDot\n binGroup={binGroup}\n tooltipName={true}\n tooltipPlace=\"top\"\n showImg\n {...binType}\n />\n </TableCell>\n <TableCell>{binType?.name}</TableCell>\n <TableCell>{serviceCode}</TableCell>\n <TableCell>{quantity}</TableCell>\n </TableRow>\n );\n });\n\n const hasAtLeastOneObject = useMemo(\n () => _.some(deliveryUnits, _.isPlainObject),\n [deliveryUnits]\n );\n\n const renderNoDelivery = () => (\n <li>\n <strong>No Additional Stock Delivery Requested</strong>\n </li>\n );\n\n return hasAtLeastOneObject ? (\n <DeliveryTable rows={rows} status={status} />\n ) : (\n renderNoDelivery()\n );\n};\n\ninterface DeliveryTableProps {\n rows: JSX.Element[];\n label?: boolean;\n status?: \"confirmation\" | \"cancelation\";\n}\n\nexport const DeliveryTable: React.FC<DeliveryTableProps> = ({\n rows,\n label = true,\n status,\n}) => (\n <>\n {label && (\n <li>\n <strong>\n {status === \"confirmation\"\n ? \"Vendor has confirmed to deliver the following in addition to like for like\"\n : \"Vendor was requested to deliver the following in addition to like for like\"}\n </strong>\n </li>\n )}\n <StyledTableContainer>\n <Table size=\"small\">\n <TableHead>\n <StyledTableRow>\n <TableCell>Type</TableCell>\n <TableCell>Name</TableCell>\n <TableCell>Code</TableCell>\n <TableCell>Deliver Additional</TableCell>\n </StyledTableRow>\n </TableHead>\n <StyledTableBody>{rows}</StyledTableBody>\n </Table>\n </StyledTableContainer>\n </>\n);\n\nexport default DeliveryInstruction;\n","/**\r\n * ============================================================================\r\n * COMPARING FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Comparing function used for ordering.\r\n *\r\n * @ignore Exclude from docs\r\n * @param a Number 1\r\n * @param b Number 2\r\n * @return Result\r\n */\nexport function order(a, b) {\n if (a === b) {\n return 0;\n } else if (a < b) {\n return -1;\n } else {\n return 1;\n }\n}","import dayjs from \"dayjs\";\nimport { isString } from \"lodash\";\nimport React from \"react\";\nimport { TypedUseSelectorHook, useDispatch, useSelector } from \"react-redux\";\nimport { useHistory, useLocation } from \"react-router-dom\";\nimport { updateQueryStringParameter } from \"sharedUtils\";\nimport type { AppDispatch, RootState } from \"./store\";\n\n// Use throughout your app instead of plain `useDispatch` and `useSelector`\nexport const useAppDispatch = () => useDispatch<AppDispatch>();\nexport const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;\n\nexport const useNavigation = () => {\n const history = useHistory();\n const location = useLocation();\n\n const onSelectDate = (d, tabName) => {\n const updatedSearchWithTab = updateQueryStringParameter(\n location.search,\n \"sideTab\",\n tabName\n );\n const finalUpdatedSearch = updateQueryStringParameter(\n updatedSearchWithTab,\n \"detailsDate\",\n isString(d) ? d : dayjs(d).format(\"YYYY-MM-DD\")\n );\n\n history.replace({\n pathname: \"\",\n search: finalUpdatedSearch,\n });\n };\n\n const onSelectSideTab = (tabName) => {\n history.replace({\n pathname: \"\",\n search: updateQueryStringParameter(location.search, \"sideTab\", tabName),\n });\n };\n\n return { onSelectDate, onSelectSideTab };\n};\n\nexport function useQuery() {\n const { search } = useLocation();\n\n return React.useMemo(() => new URLSearchParams(search), [search]);\n}\n","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","var core = module.exports = { version: '2.5.7' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","import * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { EventDispatcher } from \"./EventDispatcher\";\nimport * as $array from \"./Array\";\nimport * as $iter from \"./Iterator\";\nimport * as $type from \"./Type\";\n/**\r\n * Ordered list contains values of any type in an indexed array.\r\n */\nvar OrderedList = /** @class */function () {\n /**\r\n * Constructor\r\n *\r\n * @param initial Inital list of values to add to list\r\n */\n function OrderedList(initial) {\n /**\r\n * Holds list values.\r\n */\n this._values = [];\n /**\r\n * Event dispatcher.\r\n */\n this.events = new EventDispatcher();\n if (initial != null) {\n this.setAll(initial);\n }\n }\n Object.defineProperty(OrderedList.prototype, \"values\", {\n /**\r\n * All items of the list.\r\n *\r\n * Do not modify the list directly. Rather use `insert()` and `remove()`\r\n * methods.\r\n *\r\n * @return List values\r\n */\n get: function get() {\n return this._values;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Inserts a value into list item array.\r\n *\r\n * @param value Value\r\n */\n OrderedList.prototype._insert = function (value) {\n this._values.push(value);\n return this._values.length - 1;\n };\n Object.defineProperty(OrderedList.prototype, \"length\", {\n /**\r\n * Number of items in the list.\r\n *\r\n * @readonly\r\n * @return Length\r\n */\n get: function get() {\n return this._values.length;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns the index of the specific `value`.\r\n *\r\n * -1 if not found.\r\n *\r\n * @param value Value\r\n * @return Index\r\n */\n OrderedList.prototype.indexOf = function (value) {\n return $array.indexOf(this._values, value);\n };\n /**\r\n * Checks if list contains the `value`.\r\n *\r\n * @param value Value\r\n * @return In the list?\r\n */\n OrderedList.prototype.contains = function (value) {\n return this.indexOf(value) !== -1;\n };\n /**\r\n * Returns an item at specific `index`.\r\n *\r\n * @param index Index\r\n * @return Item\r\n */\n OrderedList.prototype.getIndex = function (index) {\n return this._values[index];\n };\n Object.defineProperty(OrderedList.prototype, \"first\", {\n /**\r\n * First item in the list.\r\n *\r\n * @return Item\r\n */\n get: function get() {\n return this._values[0];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(OrderedList.prototype, \"last\", {\n /**\r\n * Last item in the list.\r\n *\r\n * @return Item\r\n */\n get: function get() {\n return this._values[this._values.length - 1];\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Inserts a value into list.\r\n *\r\n * @param value Value\r\n */\n OrderedList.prototype.insert = function (value) {\n var index = this._insert(value);\n if (this.events.isEnabled(\"inserted\")) {\n this.events.dispatchImmediately(\"inserted\", {\n type: \"inserted\",\n target: this,\n index: index,\n newValue: value\n });\n }\n };\n /**\r\n * Removes an item with the `value` from the list.\r\n *\r\n * @param value Value\r\n */\n OrderedList.prototype.remove = function (value) {\n var index = this.indexOf(value);\n if (index !== -1) {\n var oldValue = this._values[index];\n $array.removeIndex(this._values, index);\n if (this.events.isEnabled(\"removed\")) {\n this.events.dispatchImmediately(\"removed\", {\n type: \"removed\",\n target: this,\n index: index,\n oldValue: oldValue\n });\n }\n }\n };\n /**\r\n * Sets multiple items to the list.\r\n *\r\n * All current items are removed.\r\n *\r\n * @param newArray New items\r\n */\n OrderedList.prototype.setAll = function (newArray) {\n var _this = this;\n $array.eachReverse(this._values, function (x, i) {\n _this._values.pop();\n if (_this.events.isEnabled(\"removed\")) {\n _this.events.dispatchImmediately(\"removed\", {\n type: \"removed\",\n target: _this,\n index: i,\n oldValue: x\n });\n }\n });\n $array.each(newArray, function (value) {\n _this.insert(value);\n });\n };\n /**\r\n * Removes all items from the list.\r\n */\n OrderedList.prototype.clear = function () {\n this.setAll([]);\n };\n /**\r\n * Returns part of the list between `start` and `end` indexes, as a new\r\n * [[OrderedList]].\r\n *\r\n * @param start Start index\r\n * @param end End index\r\n * @return Items in range\r\n */\n OrderedList.prototype.slice = function (start, end) {\n var out = new OrderedList();\n out._values = this._values.slice(start, end);\n return out;\n };\n /**\r\n * Finds a closest available index to the `value` in specified direction.\r\n *\r\n * @ignore exclude from docs\r\n * @param value value to search for\r\n * @param fn A callback function that returns value of the item\r\n * @param direction Direciton\r\n * @return Index\r\n */\n OrderedList.prototype.findClosestIndex = function (value, fn, direction) {\n if (direction === void 0) {\n direction = \"any\";\n }\n // Init temporary values\n var closestIndex = -1;\n var closestValue;\n var closestDifference;\n var i = 0;\n $iter.eachContinue(this.iterator(), function (element) {\n var item = fn(element);\n // Calc difference\n if (direction === \"any\") {\n // Exact match?\n if (item === value) {\n // Found exact value - don't bother searching further\n closestIndex = i;\n return false;\n }\n var difference = Math.abs(value - item);\n if (!$type.hasValue(closestDifference) || closestDifference > difference) {\n closestIndex = i;\n closestValue = item;\n closestDifference = difference;\n }\n } else if (direction === \"left\" && item < value) {\n if (!$type.hasValue(closestValue) || closestValue < item) {\n closestIndex = i;\n closestValue = item;\n }\n } else if (direction === \"right\" && item >= value) {\n if (!$type.hasValue(closestValue) || closestValue >= item) {\n closestIndex = i;\n closestValue = item;\n }\n }\n ++i;\n return true;\n });\n // Found nothing?\n if (closestIndex === -1) {\n if (direction === \"left\") {\n // Use First one\n closestIndex = 0;\n } else if (direction === \"right\") {\n // Use last item\n closestIndex = this.length - 1;\n }\n }\n return closestIndex;\n };\n /**\r\n * Returns a list iterator.\r\n *\r\n * @return Iterator\r\n */\n OrderedList.prototype.iterator = function () {\n return $iter.fromArray(this._values);\n };\n /**\r\n * Returns an ES6 iterator for the list.\r\n */\n OrderedList.prototype[Symbol.iterator] = function () {\n var length, i;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n length = this._values.length;\n i = 0;\n _a.label = 1;\n case 1:\n if (!(i < length)) return [3 /*break*/, 4];\n return [4 /*yield*/, this._values[i]];\n case 2:\n _a.sent();\n _a.label = 3;\n case 3:\n ++i;\n return [3 /*break*/, 1];\n case 4:\n return [2 /*return*/];\n }\n });\n };\n /**\r\n * Calls `f` for each element in the list.\r\n */\n OrderedList.prototype.each = function (f) {\n $array.each(this._values, f);\n };\n return OrderedList;\n}();\nexport { OrderedList };\n/**\r\n * A list where all items are ordered according to specific ordering function,\r\n * which is passed in via constructor parameter, when creating an instance of\r\n * [[SortedList]].\r\n */\nvar SortedList = /** @class */function (_super) {\n tslib_1.__extends(SortedList, _super);\n /**\r\n * Constructor.\r\n *\r\n * @param sort Ordering function\r\n */\n function SortedList(sort) {\n var _this = _super.call(this) || this;\n _this._ordering = sort;\n return _this;\n }\n /**\r\n * Inserts item into the list.\r\n *\r\n * @param value Item\r\n */\n SortedList.prototype._insert = function (value) {\n var index = $array.getSortedIndex(this._values, this._ordering, value).index;\n $array.insertIndex(this._values, index, value);\n return index;\n };\n /**\r\n * Returns index of the item in list if found.\r\n *\r\n * -1 if item is not in the list.\r\n *\r\n * @param value Item to search for\r\n * @return Index\r\n */\n SortedList.prototype.indexOf = function (value) {\n var _a = $array.getSortedIndex(this._values, this._ordering, value),\n found = _a.found,\n index = _a.index;\n if (found) {\n return index;\n } else {\n return -1;\n }\n };\n /**\r\n * [udpate description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param value [description]\r\n */\n SortedList.prototype.update = function (value) {\n // @todo test this\n var index = $array.indexOf(this._values, value);\n // @todo throw an error if it doesn't exist ?\n if (index !== -1) {\n var last = this._values.length - 1;\n // Check if the current ordering is correct\n if (!((index === 0 || this._ordering(this._values[index - 1], value) < 0) && (index === last || this._ordering(value, this._values[index + 1]) < 0))) {\n // TODO send remove/insert/move events\n $array.removeIndex(this._values, index);\n this._insert(value);\n }\n }\n };\n return SortedList;\n}(OrderedList);\nexport { SortedList };\n/**\r\n * A version of a [[OrderedList]] that has a \"template\".\r\n *\r\n * A template is an instance of an object, that can be used to create new\r\n * elements in the list without actually needing to create instances for those.\r\n *\r\n * When new element is created in the list, e.g. by calling its `create()`\r\n * method, an exact copy of the element is created (including properties and\r\n * other attributes), inserted into the list and returned.\r\n */\nvar OrderedListTemplate = /** @class */function (_super) {\n tslib_1.__extends(OrderedListTemplate, _super);\n /**\r\n * Constructor\r\n *\r\n * @param t Template object\r\n */\n function OrderedListTemplate(t) {\n var _this = _super.call(this) || this;\n _this.template = t;\n return _this;\n }\n Object.defineProperty(OrderedListTemplate.prototype, \"template\", {\n /**\r\n * @return Template object\r\n */\n get: function get() {\n return this._template;\n },\n /**\r\n * A \"template\" object to copy all properties from when creating new list\r\n * items.\r\n *\r\n * @param v Template object\r\n */\n set: function set(v) {\n v.isTemplate = true;\n this._template = v;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies all elements from other list.\r\n *\r\n * @param source Source list\r\n */\n OrderedListTemplate.prototype.copyFrom = function (source) {\n var _this = this;\n $iter.each(source.iterator(), function (value) {\n _this.insert(value.clone());\n });\n };\n /**\r\n * Returns part of the list, starting at `start` and ending at `end` indexes,\r\n * as a new [[OrderedListTemplate]].\r\n *\r\n * @param start Start index\r\n * @param end End index\r\n * @return New list\r\n */\n OrderedListTemplate.prototype.slice = function (start, end) {\n var out = new OrderedListTemplate(this.template);\n out._values = this._values.slice(start, end);\n return out;\n };\n OrderedListTemplate.prototype.create = function (make) {\n var clone = make != null ? new make() : this.template.clone();\n this.insert(clone);\n return clone;\n };\n return OrderedListTemplate;\n}(OrderedList);\nexport { OrderedListTemplate };\n/**\r\n * A version of a [[SortedList]] that has a \"template\".\r\n *\r\n * A template is an instance of an object, that can be used to create new\r\n * elements in the list without actually needing to create instances for those.\r\n *\r\n * When new element is created in the list, e.g. by calling its `create()`\r\n * method, an exact copy of the element is created (including properties and\r\n * other attributes), inserted into the list and returned.\r\n */\nvar SortedListTemplate = /** @class */function (_super) {\n tslib_1.__extends(SortedListTemplate, _super);\n /**\r\n * Constructor\r\n *\r\n * @param t Template object\r\n * @param sort Ordering function\r\n */\n function SortedListTemplate(t, sort) {\n var _this = _super.call(this, sort) || this;\n _this.template = t;\n return _this;\n }\n Object.defineProperty(SortedListTemplate.prototype, \"template\", {\n /**\r\n * @return Template object\r\n */\n get: function get() {\n return this._template;\n },\n /**\r\n * A \"template\" object to copy all properties from when creating new list\r\n * items.\r\n *\r\n * @param v Template object\r\n */\n set: function set(v) {\n v.isTemplate = true;\n this._template = v;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies all elements from other list.\r\n *\r\n * @param source Source list\r\n */\n SortedListTemplate.prototype.copyFrom = function (source) {\n var _this = this;\n $iter.each(source.iterator(), function (value) {\n _this.insert(value.clone());\n });\n };\n SortedListTemplate.prototype.create = function (make) {\n var clone = make != null ? new make() : this.template.clone();\n this.insert(clone);\n return clone;\n };\n return SortedListTemplate;\n}(SortedList);\nexport { SortedListTemplate };","/**\r\n * Slice module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../Container\";\nimport { Sprite } from \"../Sprite\";\nimport { registry } from \"../Registry\";\nimport * as $math from \"../utils/Math\";\nimport * as $path from \"../rendering/Path\";\nimport * as $type from \"../utils/Type\";\nimport * as $utils from \"../utils/Utils\";\nimport { RadialGradient } from \"../rendering/fills/RadialGradient\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws a wedged semi-circle - slice. Usually used for Pie/Donut charts.\r\n *\r\n * @see {@link ISliceEvents} for a list of available events\r\n * @see {@link ISliceAdapters} for a list of available Adapters\r\n */\nvar Slice = /** @class */function (_super) {\n tslib_1.__extends(Slice, _super);\n /**\r\n * Constructor\r\n */\n function Slice() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"Slice\";\n // Set defaults\n _this.setPropertyValue(\"cornerRadius\", 0);\n _this.setPropertyValue(\"startAngle\", 0);\n _this.setPercentProperty(\"innerRadius\", 0);\n _this.setPercentProperty(\"radius\", 0);\n _this.setPropertyValue(\"arc\", 0);\n _this.setPropertyValue(\"shiftRadius\", 0);\n _this.strokeOpacity = 1;\n _this.setPropertyValue(\"layout\", \"none\");\n // Create a slice wedge element\n _this.slice = _this.createChild(Sprite);\n _this.slice.isMeasured = false;\n _this._disposers.push(_this.slice);\n //this.element.attr({ \"stroke-linejoin\": \"round\" });\n //this.element.attr({ \"stroke-linecap\": \"round\" });\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Slice.prototype.draw = function () {\n _super.prototype.draw.call(this);\n var radiusY = this.radiusY;\n if (this.radius > 0 && radiusY == 0) {\n radiusY = 0.01;\n }\n this.slice.path = $path.arc(this.startAngle, this.arc, this.radius, this.pixelInnerRadius, radiusY, this.cornerRadius, this.innerCornerRadius);\n this.slice.invalidate();\n this.shiftRadius = this.shiftRadius;\n if (this.realFill instanceof RadialGradient) {\n this.updateGradient(this.realFill);\n }\n if (this.realStroke instanceof RadialGradient) {\n this.updateGradient(this.realStroke);\n }\n };\n Slice.prototype.updateGradient = function (gradient) {\n gradient.element.attr({\n \"gradientUnits\": \"userSpaceOnUse\"\n });\n gradient.element.attr({\n \"r\": this.radius\n });\n gradient.cx = 0;\n gradient.cy = 0;\n gradient.element.attr({\n radius: this.radius\n });\n };\n Object.defineProperty(Slice.prototype, \"bbox\", {\n /**\r\n * Returns bounding box (square) for this element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n get: function get() {\n if (this.definedBBox) {\n return this.definedBBox;\n }\n if (this.isMeasured) {\n var innerRect = $math.getArcRect(this.startAngle, this.startAngle + this.arc, this.pixelInnerRadius);\n var outerRect = $math.getArcRect(this.startAngle, this.startAngle + this.arc, this.radius);\n return $math.getCommonRectangle([innerRect, outerRect]);\n } else {\n return {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Slice.prototype, \"startAngle\", {\n /**\r\n * @return Angle (0-360)\r\n */\n get: function get() {\n return this.getPropertyValue(\"startAngle\");\n },\n /**\r\n * The angle at which left edge of the slice is drawn. (0-360)\r\n *\r\n * 0 is to the right of the center.\r\n *\r\n * @param value Angle (0-360)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"startAngle\", $math.normalizeAngle(value), true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Slice.prototype, \"arc\", {\n /**\r\n * @return [description]\r\n */\n get: function get() {\n return this.getPropertyValue(\"arc\");\n },\n /**\r\n * [arc description]\r\n *\r\n * @todo Description\r\n * @param value [description]\r\n */\n set: function set(value) {\n if (!$type.isNumber(value)) {\n value = 0;\n }\n this.setPropertyValue(\"arc\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Slice.prototype, \"radius\", {\n /**\r\n * @return Radius (px)\r\n */\n get: function get() {\n var radius = this.getPropertyValue(\"radius\");\n if (!$type.isNumber(radius)) {\n radius = 0;\n }\n return radius;\n },\n /**\r\n * Radius of the slice in pixels.\r\n *\r\n * @param value Radius (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"radius\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Slice.prototype, \"radiusY\", {\n /**\r\n * @return Vertical radius (0-1)\r\n */\n get: function get() {\n var value = this.getPropertyValue(\"radiusY\");\n if (!$type.isNumber(value)) {\n value = this.radius;\n }\n return value;\n },\n /**\r\n * Vertical radius for creating skewed slices.\r\n *\r\n * This is relevant to `radius`, e.g. 0.5 will set vertical radius to half\r\n * the `radius`.\r\n *\r\n * @param value Vertical radius (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"radiusY\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Slice.prototype, \"innerRadius\", {\n /**\r\n * @return Radius (px or %)\r\n */\n get: function get() {\n return this.getPropertyValue(\"innerRadius\");\n },\n /**\r\n * Inner radius of the slice for creating cut out (donut) slices.\r\n *\r\n * @default 0\r\n * @param value Radius (px or %)\r\n */\n set: function set(value) {\n this.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Slice.prototype, \"pixelInnerRadius\", {\n /**\r\n * @return Radius px\r\n */\n get: function get() {\n return $utils.relativeToValue(this.innerRadius, this.radius);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Slice.prototype, \"cornerRadius\", {\n /**\r\n * @return Radius (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"cornerRadius\");\n },\n /**\r\n * Radius of slice's outer corners in pixels.\r\n *\r\n * @default 0\r\n * @param value Radius (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"cornerRadius\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Slice.prototype, \"innerCornerRadius\", {\n /**\r\n * @return Radius (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"innerCornerRadius\");\n },\n /**\r\n * Radius of slice's inner corners in pixels.\r\n *\r\n * @default 0\r\n * @param value Radius (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"innerCornerRadius\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Slice.prototype, \"shiftRadius\", {\n /**\r\n * @return Radius shift\r\n */\n get: function get() {\n return this.getPropertyValue(\"shiftRadius\");\n },\n /**\r\n * Indicates far relatively to center a slice should be moved.\r\n *\r\n * The value is relative to the radius of the slice. Meaning 0 no shift,\r\n * 1 - slice shifted outside by whole of its radius.\r\n *\r\n * @param value Radius shift\r\n */\n set: function set(value) {\n this.setPropertyValue(\"shiftRadius\", value);\n this.dx = value * this.radius * this.ix;\n this.dy = value * this.radiusY * this.iy;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Slice.prototype, \"ix\", {\n /**\r\n * [ix description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @return [description]\r\n */\n get: function get() {\n return $math.cos(this.middleAngle);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Slice.prototype, \"iy\", {\n /**\r\n * [iy description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @return [description]\r\n */\n get: function get() {\n if (this.radius > 0) {\n return $math.sin(this.middleAngle);\n } else {\n return $math.sin(this.middleAngle);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Slice.prototype, \"middleAngle\", {\n /**\r\n * An angle of the slice's middle.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Angle\r\n */\n get: function get() {\n return this.startAngle + this.arc / 2;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * X coordinate for the slice tooltip.\r\n *\r\n * @return X\r\n */\n Slice.prototype.getTooltipX = function () {\n var value = this.getPropertyValue(\"tooltipX\");\n if (!$type.isNumber(value)) {\n var innerRadius = $utils.relativeToValue(this.innerRadius, this.radius);\n value = this.ix * (innerRadius + (this.radius - innerRadius) / 2);\n }\n return value;\n };\n /**\r\n * Y coordinate for the slice tooltip.\r\n *\r\n * @return Y\r\n */\n Slice.prototype.getTooltipY = function () {\n var value = this.getPropertyValue(\"tooltipY\");\n if (!$type.isNumber(value)) {\n var innerRadius = $utils.relativeToValue(this.innerRadius, this.radius);\n value = this.iy * (innerRadius + (this.radiusY - innerRadius) / 2) + this.slice.dy;\n }\n return value;\n };\n return Slice;\n}(Container);\nexport { Slice };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Slice\"] = Slice;","import React from 'react'\nimport classNames from 'classnames'\nimport PropTypes from 'prop-types'\nimport { Modal, ModalHeader, ModalTitle, ModalClose, ModalBody, ModalFooter } from 'react16-modal-bootstrap'\nimport requiredIf from 'react-required-if';\nimport Bowser from \"bowser\"\nimport _ from 'lodashExtended'\n\n\n\nconst StatelessModal = ({\n title,\n subtitle,\n body,\n children,\n isOpen,\n onCloseModal,\n onOpenModal,\n target,\n footerContent,\n size,\n includeBodyPadding }) => {\n\n var includeBodyPadding = _.isUndefined(includeBodyPadding) ? true : includeBodyPadding\n var bodyStyle = includeBodyPadding ? {} : { padding: 0 }\n var footerStyle = includeBodyPadding ? { padding: 7 } : { marginTop: 0, padding: 7 }\n\n var b = Bowser\n\n function openModal() {\n if(b.msie) { $('.pdfobject').hide() }\n onOpenModal()\n }\n\n function closeModal() {\n if(b.msie) { $('.pdfobject').show() }\n onCloseModal()\n }\n\n var Title = title ? <h4 style={{ marginBottom: subtitle ? 10 : 0 }}>{title}</h4> : null\n var Subtitle = subtitle ? <div>{subtitle}</div> : null\n var Footer = footerContent ? <div className=\"modal-footer\" style={footerStyle}>{footerContent}</div> : null\n var Target = target ? <span onClick={openModal}>{target}</span> : null\n\n\n return(<span>\n {Target}\n <Modal\n isOpen={isOpen}\n size={size}\n onRequestHide={closeModal}>\n <ModalHeader>\n <ModalClose onClick={closeModal}/>\n {Title}\n {Subtitle}\n </ModalHeader>\n <div className=\"modal-body\" style={bodyStyle}>\n {body || children}\n </div>\n {Footer}\n </Modal>\n </span>)\n\n}\n\n\nStatelessModal.propTypes = {\n title: PropTypes.node,\n target: PropTypes.node,\n subtitle: PropTypes.node,\n onOpenModal: requiredIf(PropTypes.func, props => props.target),\n onCloseModal: PropTypes.func.isRequired,\n}\n\n\n\nexport default StatelessModal\n\n","import React from 'react'\nimport ReactPopover from 'react-popover'\nimport classNames from 'classnames'\n\nconst StatelessPopover = ({title, body, children, isOpen, preferPlace = 'below', onOuterAction, onTargetClicked, onCloseClicked, target, ...restOfProps }) => {\n\n var content = <div>\n <div className=\"Popover-header\">\n <div className=\"pull-right\"><i className=\"fa fa-times text-muted\" style={{ marginLeft: 15, cursor: 'pointer' }} onClick={onCloseClicked}></i></div>\n {title}\n </div>\n {body || children}\n </div>\n\n return <ReactPopover {...restOfProps} isOpen={isOpen} body={content} preferPlace={preferPlace} tipSize={0.01} onOuterAction={onOuterAction}>\n <a className={ classNames(\"popover-target\", (isOpen ? \"popover-open\" : \"popover-closed\") ) } onClick={onTargetClicked} style={{ cursor: 'pointer'}}>{target}</a>\n </ReactPopover>\n\n}\n\nexport default StatelessPopover\n","import _ from 'lodashExtended'\nconst daysOfWeek = {\n 1: \"Monday\",\n 2: \"Tuesday\",\n 3: \"Wednesday\",\n 4: \"Thursday\",\n 5: \"Friday\",\n 6: \"Saturday\",\n 0: \"Sunday\",\n}\nconst dayOrder = [1,2,3,4,5,6,0]\n\nconst getDaysOfWeekText = (dayIds) => {\n if(_.isPresent(dayIds)) {\n var abbrDays = {}\n _.each(dayIds, (dayId) => abbrDays[dayId] = daysOfWeek[dayId].substring(0,3) )\n return arrayToSentence(_(dayOrder).map((dayId) => abbrDays[dayId]).compact().value())\n } else {\n return ''\n }\n}\n\nexport default {\n daysOfWeek,\n dayOrder,\n getDaysOfWeekText\n}\n\n","import {\n Timeline,\n TimelineContent,\n TimelineItem,\n TimelineOppositeContent,\n} from \"@mui/lab\";\nimport { Typography } from \"@mui/material\";\nimport React from \"react\";\nimport { formatDate } from \"sharedUtils\";\n\ninterface Note {\n timestamp: string;\n userName: string;\n text: string;\n}\n\ninterface CustomTimelineProps {\n notes: Note[];\n}\n\nconst CustomTimelineNotes: React.FC<CustomTimelineProps> = ({ notes }) => {\n if (!notes.length) return null;\n return (\n <Timeline\n sx={{\n pb: 0,\n \"& .MuiTimelineOppositeContent-root\": {\n flex: 0.2,\n },\n \"& .MuiTimelineItem-root\": {\n minHeight: 0,\n },\n }}\n >\n {notes.map((note) => (\n <TimelineItem key={note.timestamp}>\n <TimelineOppositeContent>\n <Typography variant=\"h6\">{note.userName}</Typography>\n <Typography variant=\"h6\" color=\"gray\" noWrap>\n on {formatDate(note.timestamp)}\n </Typography>\n </TimelineOppositeContent>\n\n <TimelineContent>\n <Typography>{note.text}</Typography>\n </TimelineContent>\n </TimelineItem>\n ))}\n </Timeline>\n );\n};\n\nexport default CustomTimelineNotes;\n","import { SxProps, Theme } from \"@mui/system\";\n\nexport const getBorderColor = (stakeholderName: string) => {\n const colors = {\n Agent: \"#DD9907\",\n Vendor: \"#CF2D42\",\n default: \"#37BC9B\",\n };\n return colors[stakeholderName] || colors.default;\n};\n\nconst card = (reply: any): SxProps<Theme> => ({\n borderColor: getBorderColor(reply.stakeholderName),\n borderRadius: '4px',\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n width: \"100%\",\n color: \"#bfbfbf\",\n position: \"relative\",\n marginBottom: '10px'\n});\n\nconst cardContent: SxProps<Theme> = {\n whiteSpace: \"pre-line\",\n fontSize: \"12px\",\n color: \"white\",\n WebkitFontSmoothing: 'auto',\n padding: '16px',\n};\n\nconst processContainer: SxProps<Theme> = {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n fontSize: \"12px\",\n marginTop: (theme: Theme) => theme.spacing(2),\n};\n\nconst processed: SxProps<Theme> = {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n width: \"100%\",\n};\n\nconst cardActions: SxProps<Theme> = {\n padding: \"8px 16px\",\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"flex-end\",\n mt: \"auto\",\n};\n\nconst actionButton: SxProps<Theme> = {\n color: \"#4FC1E9\",\n borderColor: \"#4FC1E9\",\n};\n\nconst responseButtons = (theme: Theme): SxProps<Theme> => ({\n display: \"flex\",\n flexDirection: \"column\",\n gap: theme.spacing(1),\n});\n\nconst tooltipStyles: SxProps<Theme> = {\n tooltip: {\n color: \"#262B30\",\n backgroundColor: \"#FFF\",\n fontSize: \"14px\",\n fontWeight: 500,\n },\n arrow: {\n color: \"#fff\",\n },\n};\n\nconst notProcessedContainer: SxProps<Theme> = {\n display: \"flex\",\n justifyContent: \"space-between\",\n width: \"100%\",\n};\n\nconst notProcessedBox: SxProps<Theme> = {\n display: \"flex\",\n alignItems: \"center\",\n alignSelf: \"flex-end\",\n};\n\nconst buttonsBox: SxProps<Theme> = {\n display: \"flex\",\n flexDirection: \"column\",\n gap: 1,\n};\n\nconst successButton: SxProps<Theme> = {\n borderRadius: (theme) => theme.spacing(1),\n fontSize: \"11px\",\n};\n\nconst errorButton: SxProps<Theme> = {\n borderRadius: (theme) => theme.spacing(1),\n fontSize: \"11px\",\n};\n\nconst flexCenterGap: SxProps<Theme> = {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"2px\",\n};\n\nconst successText: SxProps<Theme> = {\n color: (theme) => theme.palette.success.main,\n};\n\nconst successMain: SxProps<Theme> = {\n color: \"success.main\",\n};\n\nconst errorText: SxProps<Theme> = {\n color: (theme) => theme.palette.error.main,\n};\n\nconst errorMain: SxProps<Theme> = {\n color: \"error.main\",\n};\n\nexport const styles = {\n card,\n cardContent,\n processContainer,\n processed,\n cardActions,\n actionButton,\n responseButtons,\n tooltipStyles,\n notProcessedContainer,\n notProcessedBox,\n buttonsBox,\n successButton,\n errorButton,\n flexCenterGap,\n successText,\n successMain,\n errorText,\n errorMain,\n};\n","/**\n * Averages an array of hex colors. Returns one hex value (with leading #)\n *\n * @param {Array} colors - An array of hex strings, e.g. [\"#001122\", \"#001133\", ...]\n */\nexport function averageHex(colors) {\n if (!colors) return\n if (colors.length == 1) {\n return colors[0];\n }\n // transform all hex codes to integer arrays, e.g. [[R, G, B], [R,G,B], ...]\n let numbers = colors.map(function (hex) {\n // split in seperate R, G and B\n let split = hex.match(/[\\da-z]{2}/gi);\n\n // transform to integer values\n return split.map(function (toInt) {\n return parseInt(toInt, 16);\n });\n });\n // setup an initial value for the reduce\n let initialValue = new Array(3).fill(0);\n // reduce the array by averaging all values, resulting in an average [R, G, B]\n let averages = numbers.reduce(function (total, amount, index, array) {\n return total.map(function (subtotal, subindex) {\n // if we reached the last color, average it out and return the hex value\n if (index == array.length - 1) {\n let result = Math.round(\n (subtotal + amount[subindex]) / array.length\n ).toString(16);\n\n // add a leading 0 if it is only one character\n return result.length == 2 ? \"\" + result : \"0\" + result;\n } else {\n return subtotal + amount[subindex];\n }\n });\n }, initialValue);\n\n // return them as a single hex string\n return \"#\" + averages.join(\"\");\n}\n\nexport const colorShade = (col, amt) => {\n col = col.replace(/^#/, \"\");\n if (col.length === 3)\n col = col[0] + col[0] + col[1] + col[1] + col[2] + col[2];\n\n let [r, g, b] = col.match(/.{2}/g);\n [r, g, b] = [\n parseInt(r, 16) + amt,\n parseInt(g, 16) + amt,\n parseInt(b, 16) + amt,\n ];\n\n r = Math.max(Math.min(255, r), 0).toString(16);\n g = Math.max(Math.min(255, g), 0).toString(16);\n b = Math.max(Math.min(255, b), 0).toString(16);\n\n const rr = (r.length < 2 ? \"0\" : \"\") + r;\n const gg = (g.length < 2 ? \"0\" : \"\") + g;\n const bb = (b.length < 2 ? \"0\" : \"\") + b;\n\n return `#${rr}${gg}${bb}`;\n};\n","export const ORGANISATION_COLOR = \"#37BC9B\";\nexport const VENDOR_COLOR = \"#E95740\";\nexport const AGENT_COLOR = \"#F6BB42\";\n\nexport const channelConfigs = {\n organisation: {\n color: ORGANISATION_COLOR,\n label: \"Organisation\",\n },\n vendor: {\n color: VENDOR_COLOR,\n label: \"Vendor\",\n },\n};\n","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"./Container\";\nimport { List, ListDisposer } from \"./utils/List\";\nimport { OrderedListTemplate } from \"./utils/SortedList\";\nimport { Dictionary } from \"./utils/Dictionary\";\nimport { Disposer, MultiDisposer } from \"./utils/Disposer\";\nimport { DataSource } from \"./data/DataSource\";\nimport { Responsive } from \"./utils/Responsive\";\nimport { system } from \"./System\";\nimport { DataItem } from \"./DataItem\";\nimport { registry } from \"./Registry\";\nimport * as $math from \"./utils/Math\";\nimport * as $array from \"./utils/Array\";\nimport * as $ease from \"./utils/Ease\";\nimport * as $utils from \"./utils/Utils\";\nimport * as $iter from \"./utils/Iterator\";\nimport * as $object from \"./utils/Object\";\nimport * as $type from \"./utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A Component represents an independent functional element or control, that\r\n * can have it's own behavior, children, data, etc.\r\n *\r\n * A few examples of a Component: [[Legend]], [[Series]], [[Scrollbar]].\r\n *\r\n * @see {@link IComponentEvents} for a list of available events\r\n * @see {@link IComponentAdapters} for a list of available Adapters\r\n * @important\r\n */\nvar Component = /** @class */function (_super) {\n tslib_1.__extends(Component, _super);\n /**\r\n * Constructor\r\n */\n function Component() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * Holds data field names.\r\n *\r\n * Data fields define connection beween [[DataItem]] and actual properties\r\n * in raw data.\r\n */\n _this.dataFields = {};\n /**\r\n * A list of [[DataSource]] definitions of external data source.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._dataSources = {};\n /**\r\n * This is used when only new data is invalidated (if added using `addData`\r\n * method).\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._parseDataFrom = 0;\n /**\r\n * Holds the disposers for the dataItems and dataUsers\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._dataDisposers = [];\n /**\r\n * [_start description]\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._start = 0;\n /**\r\n * [_end description]\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._end = 1;\n /**\r\n * If set to `true`, changing data range in element will not trigger\r\n * `daterangechanged` event.\r\n */\n _this.skipRangeEvent = false;\n /**\r\n * Whenever selected scope changes (chart is zoomed or panned), for example\r\n * by interaction from a Scrollbar, or API, a chart needs to reposition\r\n * its contents.\r\n *\r\n * `rangeChangeDuration` influences how this is performed.\r\n *\r\n * If set to zero (0), the change will happen instantenously.\r\n *\r\n * If set to non-zero value, the chart will gradually animate into new\r\n * position for the set amount of milliseconds.\r\n *\r\n * @default 0\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\n _this.rangeChangeDuration = 0;\n /**\r\n * An easing function to use for range change animation.\r\n *\r\n * @see {@link Ease}\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\n _this.rangeChangeEasing = $ease.cubicOut;\n /**\r\n * A duration (ms) of each data parsing step. A Component parses its data in\r\n * chunks in order to avoid completely freezing the machine when large data\r\n * sets are used. This setting will control how many milliseconds should pass\r\n * when parsing data until parser stops for a brief moment to let other\r\n * processes catch up.\r\n */\n _this.parsingStepDuration = 50;\n /**\r\n * [dataInvalid description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n _this.dataInvalid = false;\n /**\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this.rawDataInvalid = false;\n /**\r\n * [dataRangeInvalid description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n _this.dataRangeInvalid = false;\n /**\r\n * [dataItemsInvalid description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n _this.dataItemsInvalid = false;\n /**\r\n * If set to a non-zero number the element will \"animate\" data values of its\r\n * children.\r\n *\r\n * This will happen on first load and whenever data values change.\r\n *\r\n * Enabling interpolation will mean that elements will transit smoothly into\r\n * new values rather than updating instantly.\r\n *\r\n * @default 0\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\n _this.interpolationDuration = 0;\n /**\r\n * An easing function to use for interpolating values when transiting from\r\n * one source value to another.\r\n *\r\n * @default cubicOut\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n * @see {@link Ease}\r\n */\n _this.interpolationEasing = $ease.cubicOut;\n /**\r\n * Indicates whether transition between data item's values should start and\r\n * play out all at once, or with a small delay (as defined by\r\n * `sequencedInterpolationDelay`) for each subsequent data item.\r\n *\r\n * @default true\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\n _this.sequencedInterpolation = true;\n /**\r\n * A delay (ms) to wait between animating each subsequent data item's\r\n * interpolation animation.\r\n *\r\n * Relative only if `sequencedInterpolation = true`.\r\n *\r\n * @default 0\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\n _this.sequencedInterpolationDelay = 0;\n /**\r\n * A progress (0-1) for the data validation process.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this.dataValidationProgress = 0;\n _this._addAllDataItems = true;\n _this.className = \"Component\";\n _this.minZoomCount = 1;\n _this._dataItems = new OrderedListTemplate(_this.createDataItem());\n _this._dataItems.events.on(\"inserted\", _this.handleDataItemAdded, _this, false);\n _this._dataItems.events.on(\"removed\", _this.handleDataItemRemoved, _this, false);\n _this._disposers.push(new ListDisposer(_this._dataItems));\n _this._disposers.push(_this._dataItems.template);\n _this.invalidateData();\n // TODO what about remove ?\n _this.dataUsers.events.on(\"inserted\", _this.handleDataUserAdded, _this, false);\n // Set up disposers\n _this._disposers.push(new MultiDisposer(_this._dataDisposers));\n _this._start = 0;\n _this._end = 1;\n _this.maxZoomDeclination = 1;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\n Component.prototype.createDataItem = function () {\n return new DataItem();\n };\n /**\r\n * [handleDataUserAdded description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param event Event object\r\n */\n Component.prototype.handleDataUserAdded = function (event) {\n var dataUser = event.newValue;\n dataUser.dataProvider = this;\n };\n /**\r\n * [handleDataItemValueChange description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n Component.prototype.handleDataItemValueChange = function (dataItem, name) {\n if (!this.dataItemsInvalid) {\n this.invalidateDataItems();\n }\n };\n /**\r\n * [handleDataItemWorkingValueChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.handleDataItemWorkingValueChange = function (dataItem, name) {};\n /**\r\n * [handleDataItemWorkingLocationChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.handleDataItemWorkingLocationChange = function (dataItem, name) {};\n /**\r\n * [handleDataItemCalculatedValueChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.handleDataItemCalculatedValueChange = function (dataItem, name) {};\n /**\r\n * [handleDataItemPropertyChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.handleDataItemPropertyChange = function (dataItem, name) {};\n /**\r\n * Populates a [[DataItem]] width data from data source.\r\n *\r\n * Loops through all the fields and if such a field is found in raw data\r\n * object, a corresponding value on passed in `dataItem` is set.\r\n *\r\n * @ignore Exclude from docs\r\n * @param item\r\n */\n Component.prototype.processDataItem = function (dataItem, dataContext) {\n var _this = this;\n if (dataItem) {\n if (!dataContext) {\n dataContext = {};\n }\n // store reference to original data item\n dataItem.dataContext = dataContext;\n var hasSomeValues_1 = false;\n $object.each(this.dataFields, function (key, fieldValue) {\n var fieldName = key;\n var value = dataContext[fieldValue];\n // Apply adapters to a retrieved value\n if (_this.adapter.isEnabled(\"dataContextValue\")) {\n value = _this.adapter.apply(\"dataContextValue\", {\n field: fieldName,\n value: value,\n dataItem: dataItem\n }).value;\n }\n if (dataItem.hasChildren[fieldName]) {\n if ($type.hasValue(value)) {\n hasSomeValues_1 = true;\n var template = _this.createDataItem();\n template.copyFrom(_this.dataItems.template);\n var children = new OrderedListTemplate(template);\n children.events.on(\"inserted\", _this.handleDataItemAdded, _this, false);\n children.events.on(\"removed\", _this.handleDataItemRemoved, _this, false);\n _this._dataDisposers.push(new ListDisposer(children));\n var count = value.length;\n for (var i = 0; i < count; i++) {\n var rawDataItem = value[i];\n var childDataItem = children.create();\n childDataItem.parent = dataItem;\n _this.processDataItem(childDataItem, rawDataItem);\n }\n var anyDataItem = dataItem;\n anyDataItem[fieldName] = children;\n }\n } else {\n // data is converted to numbers/dates in each dataItem\n if ($type.hasValue(value)) {\n hasSomeValues_1 = true;\n dataItem[fieldName] = value;\n }\n }\n });\n $object.each(this.propertyFields, function (key, fieldValue) {\n var f = key;\n var value = dataContext[fieldValue];\n if ($type.hasValue(value)) {\n hasSomeValues_1 = true;\n dataItem.setProperty(f, value);\n }\n });\n // @todo we might need some flag which would tell whether we should create empty data items or not.\n if (!this._addAllDataItems && !hasSomeValues_1) {\n this.dataItems.remove(dataItem);\n }\n }\n };\n /**\r\n *\r\n * When validating raw data, instead of processing data item, we update it\r\n *\r\n * @ignore Exclude from docs\r\n * @param item\r\n */\n Component.prototype.updateDataItem = function (dataItem) {\n var _this = this;\n if (dataItem) {\n var dataContext_1 = dataItem.dataContext;\n $object.each(this.dataFields, function (key, fieldValue) {\n var fieldName = key;\n var value = dataContext_1[fieldValue];\n // Apply adapters to a retrieved value\n value = _this.adapter.apply(\"dataContextValue\", {\n field: fieldName,\n value: value,\n dataItem: dataItem\n }).value;\n if (dataItem.hasChildren[fieldName]) {\n if (value) {\n var anyDataItem = dataItem;\n var children = anyDataItem[fieldName];\n $iter.each(children.iterator(), function (child) {\n _this.updateDataItem(child);\n });\n }\n } else {\n // data is converted to numbers/dates in each dataItem\n if ($type.hasValue(value)) {\n dataItem[fieldName] = value;\n }\n }\n });\n $object.each(this.propertyFields, function (key, fieldValue) {\n var f = key;\n var value = dataContext_1[fieldValue];\n if ($type.hasValue(value)) {\n dataItem.setProperty(f, value);\n }\n });\n }\n };\n /**\r\n * [validateDataElements description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n Component.prototype.validateDataElements = function () {\n var count = this.endIndex;\n for (var i = this.startIndex; i < count; i++) {\n var dataItem = this.dataItems.getIndex(i);\n // TODO is this correct\n if (dataItem) {\n this.validateDataElement(dataItem);\n }\n }\n };\n /**\r\n * Validates this element and its related elements.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.validate = function () {\n this.validateDataElements();\n _super.prototype.validate.call(this);\n };\n /**\r\n * [validateDataElement description]\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem [description]\r\n */\n Component.prototype.validateDataElement = function (dataItem) {};\n /**\r\n * Adds one or several (array) of data items to the existing data.\r\n *\r\n * @param rawDataItem One or many raw data item objects\r\n */\n Component.prototype.addData = function (rawDataItem, removeCount) {\n var _this = this;\n // need to check if data is invalid, as addData might be called multiple times\n if (!this.dataInvalid && this.inited) {\n this._parseDataFrom = this.data.length; // save length of parsed data\n }\n if (rawDataItem instanceof Array) {\n // can't use concat because new array is returned\n $array.each(rawDataItem, function (dataItem) {\n _this.data.push(dataItem);\n });\n } else {\n this.data.push(rawDataItem); // add to raw data array\n }\n if (this.inited) {\n this.removeData(removeCount);\n } else {\n if ($type.isNumber(removeCount)) {\n while (removeCount > 0) {\n this.data.shift();\n removeCount--;\n }\n }\n }\n this.invalidateData();\n };\n /**\r\n * Removes elements from the beginning of data\r\n *\r\n * @param count number of elements to remove\r\n */\n Component.prototype.removeData = function (count) {\n if ($type.isNumber(count)) {\n while (count > 0) {\n var dataItem = this.dataItems.getIndex(0);\n if (dataItem) {\n this.dataItems.remove(dataItem);\n }\n this.dataUsers.each(function (dataUser) {\n var dataItem = dataUser.dataItems.getIndex(0);\n if (dataItem) {\n dataUser.dataItems.remove(dataItem);\n }\n });\n this.data.shift();\n this._parseDataFrom--;\n count--;\n }\n }\n };\n /**\r\n * Triggers a data (re)parsing.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.invalidateData = function () {\n if (this.disabled || this.isTemplate) {\n return;\n }\n //if(!this.dataInvalid){\n registry.addToInvalidComponents(this);\n system.requestFrame();\n this.dataInvalid = true;\n $iter.each(this.dataUsers.iterator(), function (x) {\n x.invalidateDataItems();\n });\n //}\n };\n /**\r\n * [invalidateDataUsers description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n Component.prototype.invalidateDataUsers = function () {\n $iter.each(this.dataUsers.iterator(), function (x) {\n x.invalidate();\n });\n };\n /**\r\n * Invalidates data values. When data array is not changed, but values within\r\n * it changes, we invalidate data so that component would process changes.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.invalidateDataItems = function () {\n if (this.disabled || this.isTemplate) {\n return;\n }\n //if(!this.dataItemsInvalid){\n $array.move(registry.invalidDataItems, this);\n system.requestFrame();\n this.dataItemsInvalid = true;\n $iter.each(this.dataUsers.iterator(), function (x) {\n x.invalidateDataItems();\n });\n //}\n };\n /**\r\n * Invalidates data range. This is done when data which must be shown\r\n * changes (chart is zoomed for example).\r\n *\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.invalidateDataRange = function () {\n if (this.disabled || this.isTemplate) {\n return;\n }\n //if(!this.dataRangeInvalid){\n this.dataRangeInvalid = true;\n $array.move(registry.invalidDataRange, this);\n system.requestFrame();\n //}\n };\n /**\r\n * Processes data range.\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.validateDataRange = function () {\n $array.remove(registry.invalidDataRange, this);\n this.dataRangeInvalid = false;\n if (this.startIndex != this._prevStartIndex || this.endIndex != this._prevEndIndex) {\n this.rangeChangeUpdate();\n this.appendDataItems();\n this.invalidate();\n this.dispatchImmediately(\"datarangechanged\");\n }\n };\n /**\r\n * [sliceData description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.sliceData = function () {\n this._workingStartIndex = this.startIndex;\n this._workingEndIndex = this.endIndex;\n };\n /**\r\n * [rangeChangeUpdate description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.rangeChangeUpdate = function () {\n this.sliceData();\n this._prevStartIndex = this.startIndex;\n this._prevEndIndex = this.endIndex;\n };\n /**\r\n * [appendDataItems description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.appendDataItems = function () {\n // TODO use an iterator instead\n var count = this.endIndex;\n for (var i = this.startIndex; i < count; i++) {\n // data item\n var dataItem = this.dataItems.getIndex(i);\n if (dataItem) {\n dataItem.__disabled = false;\n }\n }\n for (var i = 0; i < this.startIndex; i++) {\n var dataItem = this.dataItems.getIndex(i);\n dataItem.__disabled = true;\n }\n for (var i = this.endIndex; i < this.dataItems.length; i++) {\n var dataItem = this.dataItems.getIndex(i);\n dataItem.__disabled = true;\n }\n };\n /**\r\n * If you want to have a smooth transition from one data values to another, you change your raw data and then you must call this method.\r\n * then instead of redrawing everything, the chart will check raw data and smoothly transit from previous to new data\r\n */\n Component.prototype.invalidateRawData = function () {\n if (this.disabled || this.isTemplate) {\n return;\n }\n //if(!this.rawDataInvalid){\n $array.move(registry.invalidRawDatas, this);\n system.requestFrame();\n this.rawDataInvalid = true;\n $iter.each(this.dataUsers.iterator(), function (x) {\n x.invalidateRawData();\n });\n //}\n };\n /**\r\n * @ignore\r\n */\n Component.prototype.validateRawData = function () {\n var _this = this;\n $array.remove(registry.invalidRawDatas, this);\n $iter.each(this.dataItems.iterator(), function (dataItem) {\n if (dataItem) {\n _this.updateDataItem(dataItem);\n }\n });\n };\n /**\r\n * Destroys this object and all related data.\r\n */\n Component.prototype.dispose = function () {\n this.dataItems.template.clones.clear();\n _super.prototype.dispose.call(this);\n };\n /**\r\n * @ignore\r\n */\n Component.prototype.disposeData = function () {\n this.dataItems.template.clones.clear();\n $array.each(this._dataDisposers, function (x) {\n x.dispose();\n });\n // and for all components\n $iter.each(this.dataUsers.iterator(), function (dataUser) {\n dataUser.disposeData();\n });\n this._dataDisposers.length = 0;\n this._startIndex = undefined;\n this._endIndex = undefined;\n // dispose old\n this.dataItems.clear();\n this.dataItems.template.clones.clear();\n };\n Component.prototype.getDataItem = function (dataContext) {\n return this.dataItems.create();\n };\n /**\r\n * Validates (processes) data.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.validateData = function () {\n this.dispatchImmediately(\"beforedatavalidated\");\n this.dataInvalid = false;\n registry.removeFromInvalidComponents(this);\n this.dataValidationProgress = 0;\n // need this to slice new data\n this._prevStartIndex = undefined;\n this._prevEndIndex = undefined;\n // todo: this needs some overthinking, maybe some extra settings like zoomOotonDataupdate like in v3 or so. some charts like pie chart probably should act like this always\n this._startIndex = undefined;\n this._endIndex = undefined;\n if (this.dataFields.data && this.dataItem) {\n var dataContext = this.dataItem.dataContext;\n this._data = dataContext[this.dataFields.data];\n }\n // data items array is reset only if all data is validated, if _parseDataFrom is not 0, we append new data only\n // check heatmap demo if uncommented\n // fixed both issues by adding && this.data.length > 0\n // check adding series example if changed\n if (this._parseDataFrom === 0 && this.data.length > 0) {\n this.disposeData();\n }\n if (this.data.length > 0) {\n var preloader = this.preloader;\n // and for all components\n $iter.each(this.dataUsers.iterator(), function (dataUser) {\n // todo: this needs some overthinking, maybe some extra settings like zoomOUtonDataupdate like in v3 or so. some charts like pie chart probably should act like this always\n dataUser._startIndex = undefined;\n dataUser._endIndex = undefined;\n });\n var counter = 0;\n var startTime = Date.now();\n // parse data\n var i = this._parseDataFrom;\n var n = this.data.length;\n var _loop_1 = function _loop_1() {\n var rawDataItem = this_1.data[i];\n var dataItem = this_1.getDataItem(rawDataItem);\n this_1.processDataItem(dataItem, rawDataItem);\n this_1.dataUsers.each(function (dataUser) {\n if (dataUser.data.length == 0) {\n // checking if data is not set directly\n var dataUserDataItem = dataUser.getDataItem(rawDataItem);\n dataUser.processDataItem(dataUserDataItem, rawDataItem);\n }\n });\n counter++;\n // show preloader if this takes too many time\n if (counter == 100) {\n // no need to check it on each data item\n counter = 0;\n var elapsed = Date.now() - startTime;\n if (elapsed > this_1.parsingStepDuration) {\n if (i < this_1.data.length - 10) {\n this_1._parseDataFrom = i + 1;\n // update preloader\n if (preloader) {\n if (i / this_1.data.length > 0.5 && !preloader.visible) {\n // do not start showing\n } else {\n preloader.progress = i / this_1.data.length;\n }\n }\n this_1.dataValidationProgress = i / this_1.data.length;\n i = this_1.data.length; // stops cycle\n this_1.invalidateData();\n return {\n value: void 0\n };\n }\n }\n }\n };\n var this_1 = this;\n for (i; i < n; i++) {\n var state_1 = _loop_1();\n if (_typeof(state_1) === \"object\") return state_1.value;\n }\n if (preloader) {\n preloader.progress = 1;\n }\n this.dataUsers.each(function (dataUser) {\n if (dataUser.hidden) {\n dataUser.hide(0);\n }\n });\n }\n this.dataValidationProgress = 1;\n this._parseDataFrom = 0; // reset this index, it is set to dataItems.length if addData() method was used.\n this.invalidateDataItems();\n if (!this._internalDefaultsApplied) {\n this.applyInternalDefaults();\n }\n this.dispatch(\"datavalidated\"); // can't zoom chart if dispatched immediately\n };\n /**\r\n * Validates (processes) data items.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.validateDataItems = function () {\n $array.remove(registry.invalidDataItems, this);\n this.dataItemsInvalid = false;\n this.invalidateDataRange();\n this.invalidate();\n this.dispatch(\"dataitemsvalidated\");\n };\n Object.defineProperty(Component.prototype, \"data\", {\n /**\r\n * Returns element's source (raw) data.\r\n *\r\n * @return Data\r\n */\n get: function get() {\n if (!this._data) {\n this._data = [];\n }\n return this.adapter.apply(\"data\", this._data);\n },\n /**\r\n * Sets source (raw) data for the element. The \"data\" is always an `Array`\r\n * of objects.\r\n *\r\n * @param value Data\r\n */\n set: function set(value) {\n this.setData(value);\n },\n enumerable: true,\n configurable: true\n });\n Component.prototype.setData = function (value) {\n // array might be the same, but there might be items added\n // todo: check if array changed, toString maybe?\n //if (this._data != value) {\n this._parseDataFrom = 0;\n this.disposeData();\n this._data = value;\n if (value && value.length > 0) {\n this.invalidateData();\n }\n //}\t\t\n };\n /**\r\n * Returns (creates if necessary) a [[DataSource]] bound to any specific\r\n * property.\r\n *\r\n * For example if I want to bind `data` to an external JSON file, I'd create\r\n * a DataSource for it.\r\n *\r\n * @param property Property to bind external data to\r\n * @return A DataSource for property\r\n */\n Component.prototype.getDataSource = function (property) {\n var _this = this;\n if (!$type.hasValue(this._dataSources[property])) {\n this._dataSources[property] = new DataSource();\n this._dataSources[property].component = this;\n this.setDataSourceEvents(this._dataSources[property], property);\n this._dataSources[property].adapter.add(\"dateFields\", function (val) {\n return _this.dataSourceDateFields(val);\n });\n this._dataSources[property].adapter.add(\"numberFields\", function (val) {\n return _this.dataSourceNumberFields(val);\n });\n this.events.on(\"inited\", function () {\n _this.loadData(property);\n }, this, false);\n }\n return this._dataSources[property];\n };\n Object.defineProperty(Component.prototype, \"dataSource\", {\n /**\r\n * @return Data source\r\n */\n get: function get() {\n if (!this._dataSources[\"data\"]) {\n this.getDataSource(\"data\");\n }\n return this._dataSources[\"data\"];\n },\n /**\r\n *A [[DataSource]] to be used for loading Component's data.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/loading-external-data/} for more on loading external data\r\n * @param value Data source\r\n */\n set: function set(value) {\n var _this = this;\n if (this._dataSources[\"data\"]) {\n this.removeDispose(this._dataSources[\"data\"]);\n }\n this._dataSources[\"data\"] = value;\n this._dataSources[\"data\"].component = this;\n this.events.on(\"inited\", function () {\n _this.loadData(\"data\");\n }, this, false);\n this.setDataSourceEvents(value, \"data\");\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Initiates loading of the external data via [[DataSource]].\r\n *\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.loadData = function (property) {\n this._dataSources[property].load();\n };\n /**\r\n * This function is called by the [[DataSource]]'s `dateFields` adapater\r\n * so that particular chart types can popuplate this setting with their\r\n * own type-specific data fields so they are parsed properly.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Array of date fields\r\n * @return Array of date fields populated with chart's date fields\r\n */\n Component.prototype.dataSourceDateFields = function (value) {\n return value;\n };\n /**\r\n * This function is called by the [[DataSource]]'s `numberFields` adapater\r\n * so that particular chart types can popuplate this setting with their\r\n * own type-specific data fields so they are parsed properly.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Array of number fields\r\n * @return Array of number fields populated with chart's number fields\r\n */\n Component.prototype.dataSourceNumberFields = function (value) {\n return value;\n };\n /**\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param list [description]\r\n * @param dataFields [description]\r\n * @param targetList [description]\r\n * @return [description]\r\n */\n Component.prototype.populateDataSourceFields = function (list, dataFields, targetList) {\n $array.each(targetList, function (value) {\n if (dataFields[value] && $array.indexOf(list, dataFields[value]) === -1) {\n list.push(dataFields[value]);\n }\n });\n return list;\n };\n /**\r\n * Sets events on a [[DataSource]].\r\n *\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.setDataSourceEvents = function (ds, property) {\n var _this = this;\n ds.events.on(\"started\", function (ev) {\n var preloader = _this.preloader;\n if (preloader) {\n preloader.progress = 0;\n //preloader.label.text = this.language.translate(\"Loading\");\n }\n }, undefined, false);\n ds.events.on(\"loadstarted\", function (ev) {\n var preloader = _this.preloader;\n if (preloader) {\n preloader.progress = 0.25;\n }\n }, undefined, false);\n ds.events.on(\"loadended\", function (ev) {\n var preloader = _this.preloader;\n if (preloader) {\n preloader.progress = 0.5;\n }\n }, undefined, false);\n ds.events.on(\"parseended\", function (ev) {\n var preloader = _this.preloader;\n if (preloader) {\n preloader.progress = 0.75;\n }\n }, undefined, false);\n ds.events.on(\"ended\", function (ev) {\n var preloader = _this.preloader;\n if (preloader) {\n preloader.progress = 1;\n }\n }, undefined, false);\n ds.events.on(\"error\", function (ev) {\n var preloader = _this.preloader;\n if (preloader) {\n preloader.progress = 1;\n }\n _this.openModal(ev.message);\n }, undefined, false);\n if (property) {\n ds.events.on(\"done\", function (ev) {\n var preloader = _this.preloader;\n if (preloader) {\n preloader.progress = 1;\n }\n if (property == \"data\" && !$type.isArray(ev.data)) {\n ev.data = [ev.data];\n }\n if (ds.incremental && property == \"data\" && _this.data.length) {\n _this.addData(ev.data, ds.keepCount ? ev.data.length : 0);\n } else {\n _this[property] = ev.data;\n }\n });\n }\n };\n Object.defineProperty(Component.prototype, \"responsive\", {\n /**\r\n * @return Data source\r\n */\n get: function get() {\n if (!this._responsive) {\n this._responsive = new Responsive();\n this._responsive.component = this;\n }\n return this._responsive;\n },\n /**\r\n * A [[Responsive]] instance to be used when applying conditional\r\n * property values.\r\n *\r\n * NOTE: Responsive features are currently in development and may not work\r\n * as expected, if at all.\r\n *\r\n * @param value Data source\r\n */\n set: function set(value) {\n this._responsive = value;\n this._responsive.component = this;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets current zoom.\r\n *\r\n * The range uses relative values from 0 to 1, with 0 marking beginning and 1\r\n * marking end of the available data range.\r\n *\r\n * This method will not have any effect when called on a chart object.\r\n * Since the chart can have a number of axes and series, each with its own\r\n * data, the meaning of \"range\" is very ambiguous.\r\n *\r\n * To zoom the chart use `zoom*` methods on its respective axes.\r\n *\r\n * @param range Range\r\n * @param skipRangeEvent Should rangechanged event not be triggered?\r\n * @param instantly Do not animate?\r\n * @return Actual modidied range (taking `maxZoomFactor` into account)\r\n */\n Component.prototype.zoom = function (range, skipRangeEvent, instantly, declination) {\n var _this = this;\n if (skipRangeEvent === void 0) {\n skipRangeEvent = false;\n }\n if (instantly === void 0) {\n instantly = false;\n }\n var start = range.start;\n var end = range.end;\n var priority = range.priority;\n if (!$type.isNumber(declination)) {\n declination = this.maxZoomDeclination;\n }\n if (!$type.isNumber(start) || !$type.isNumber(end)) {\n return {\n start: this.start,\n end: this.end\n };\n }\n if (this._finalStart != start || this._finalEnd != end) {\n var maxZoomFactor = this.maxZoomFactor / this.minZoomCount;\n // most likely we are dragging left scrollbar grip here, so we tend to modify end\n if (priority == \"start\") {\n // add to the end\n if (1 / (end - start) > maxZoomFactor) {\n end = start + 1 / maxZoomFactor;\n }\n //unless end is > 0\n if (end > 1 && end - start < 1 / maxZoomFactor) {\n //end = 1;\n start = end - 1 / maxZoomFactor;\n }\n }\n // most likely we are dragging right, so we modify left\n else {\n // remove from start\n if (1 / (end - start) > maxZoomFactor) {\n start = end - 1 / maxZoomFactor;\n }\n if (start < 0 && end - start < 1 / maxZoomFactor) {\n //start = 0;\n end = start + 1 / maxZoomFactor;\n }\n }\n if (start < -declination) {\n start = -declination;\n }\n if (1 / (end - start) > maxZoomFactor) {\n end = start + 1 / maxZoomFactor;\n }\n if (end > 1 + declination) {\n end = 1 + declination;\n }\n if (1 / (end - start) > maxZoomFactor) {\n start = end - 1 / maxZoomFactor;\n }\n this._finalEnd = end;\n this._finalStart = start;\n this.skipRangeEvent = skipRangeEvent;\n if (this.rangeChangeDuration > 0 && !instantly) {\n // todo: maybe move this to Animation\n var rangeChangeAnimation = this.rangeChangeAnimation;\n if (rangeChangeAnimation && rangeChangeAnimation.progress < 1) {\n var options = rangeChangeAnimation.animationOptions;\n if (options.length > 1) {\n if (options[0].to == start && options[1].to == end) {\n return {\n start: start,\n end: end\n };\n }\n }\n }\n this.dispatchImmediately(\"rangechangestarted\");\n if (this.rangeChangeAnimation) {\n this.rangeChangeAnimation.kill();\n }\n rangeChangeAnimation = this.animate([{\n property: \"start\",\n to: start\n }, {\n property: \"end\",\n to: end\n }], this.rangeChangeDuration, this.rangeChangeEasing);\n this.rangeChangeAnimation = rangeChangeAnimation;\n if (rangeChangeAnimation && !rangeChangeAnimation.isFinished()) {\n rangeChangeAnimation.events.on(\"animationended\", function () {\n _this.dispatchImmediately(\"rangechangeended\");\n });\n } else {\n this.dispatchImmediately(\"rangechangeended\");\n }\n } else {\n this.start = start;\n this.end = end;\n }\n }\n return {\n start: start,\n end: end\n };\n };\n /**\r\n * Zooms to specific data items using their index in data.\r\n *\r\n * This method will not have any effect when called on a chart object.\r\n * Since the chart can have a number of axes and series, each with its own\r\n * data, the meaning of \"index\" is very ambiguous.\r\n *\r\n * To zoom the chart use `zoom*` methods on its respective axes.\r\n *\r\n * @param startIndex Index of the starting data item\r\n * @param endIndex Index of the ending data item\r\n * @param skipRangeEvent Should rangechanged event not be triggered?\r\n * @param instantly Do not animate?\r\n */\n Component.prototype.zoomToIndexes = function (startIndex, endIndex, skipRangeEvent, instantly) {\n if (!$type.isNumber(startIndex) || !$type.isNumber(endIndex)) {\n return;\n }\n var start = startIndex / this.dataItems.length;\n var end = endIndex / this.dataItems.length;\n this.zoom({\n start: start,\n end: end\n }, skipRangeEvent, instantly);\n };\n Object.defineProperty(Component.prototype, \"zoomFactor\", {\n /**\r\n * A current zoom factor (0-1). 1 meaning fully zoomed out. (showing all of\r\n * the available data)\r\n *\r\n * @return Zoom factor\r\n */\n get: function get() {\n return $math.fitToRange(1 / (this.end - this.start), 1, this.maxZoomFactor);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Component.prototype, \"maxZoomFactor\", {\n /**\r\n * @return Maximum zoomFactor\r\n */\n get: function get() {\n return this.getPropertyValue(\"maxZoomFactor\");\n },\n /**\r\n * Max available `zoomFactor`.\r\n *\r\n * The element will not allow zoom to occur beyond this factor.\r\n *\r\n * [[DateAxis]] and [[CategoryAxis]] calculate this atutomatically so that\r\n * category axis could be zoomed to one category and date axis allows to be\r\n * zoomed up to one base interval.\r\n *\r\n * In case you want to restrict category or date axis to be zoomed to more\r\n * than one category or more than one base interval, use `minZoomCount`\r\n * property (set it to `> 1`).\r\n *\r\n * Default value of [[ValueAxis]]'s `maxZoomFactor` is `1000`.\r\n *\r\n * Feel free to modify it to allow bigger zoom or to restrict zooming.\r\n *\r\n * @param value Maximum zoomFactor\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"maxZoomFactor\", value)) {\n if (value == 1) {\n this.maxZoomDeclination = 0;\n }\n this.invalidateDataRange();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Component.prototype, \"maxZoomDeclination\", {\n /**\r\n * @ignore\r\n * @return Maximum zoom declination\r\n */\n get: function get() {\n return this.getPropertyValue(\"maxZoomDeclination\");\n },\n /**\r\n * Max zoom declination.\r\n *\r\n * @ignore\r\n * @default 1\r\n * @param value Maximum zoom declination\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"maxZoomDeclination\", value)) {\n this.invalidateDataRange();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Component.prototype, \"startIndex\", {\n /**\r\n * Current starting index.\r\n *\r\n * @return Start index\r\n */\n get: function get() {\n if (!$type.isNumber(this._startIndex)) {\n this._startIndex = 0;\n }\n return this._startIndex;\n },\n /**\r\n * Sets current starting index.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Start index\r\n */\n set: function set(value) {\n this._startIndex = $math.fitToRange(Math.round(value), 0, this.dataItems.length);\n //this._workingStartIndex = this._startIndex; // not good, breaks adjusted working start index of line series\n this.start = this.indexToPosition(this._startIndex);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n * @todo:review description\r\n * returns item's relative position by the index of the item\r\n * @param index\r\n */\n Component.prototype.indexToPosition = function (index) {\n return index / this.dataItems.length;\n };\n Object.defineProperty(Component.prototype, \"endIndex\", {\n /**\r\n * Current ending index.\r\n *\r\n * @return End index\r\n */\n get: function get() {\n if (!$type.isNumber(this._endIndex)) {\n this._endIndex = this.dataItems.length;\n }\n return this._endIndex;\n },\n /**\r\n * Sets current ending index.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value End index\r\n */\n set: function set(value) {\n this._endIndex = $math.fitToRange(Math.round(value), 0, this.dataItems.length);\n //this._workingEndIndex = this._endIndex; // not good, breaks adjusted workingend index of line series\n this.end = this.indexToPosition(this._endIndex);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Component.prototype, \"start\", {\n /**\r\n * @return Start (0-1)\r\n */\n get: function get() {\n return this._start;\n },\n /**\r\n * Start of the current data range (zoom).\r\n *\r\n * These are relative values from 0 (beginning) to 1 (end).\r\n *\r\n * @param value Start (0-1)\r\n */\n set: function set(value) {\n // value = $math.round(value, 10); not good\n //if (1 / (this.end - value) > this.maxZoomFactor) {\n //\tvalue = this.end - 1 / this.maxZoomFactor;\n //}\n if (this._start != value) {\n this._start = value;\n var startIndex = Math.max(0, Math.floor(this.dataItems.length * value) || 0);\n this._startIndex = Math.min(startIndex, this.dataItems.length);\n this.invalidateDataRange();\n this.invalidate();\n this.dispatchImmediately(\"startchanged\");\n this.dispatch(\"startendchanged\");\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Component.prototype, \"end\", {\n /**\r\n * @return End (0-1)\r\n */\n get: function get() {\n return this._end;\n },\n /**\r\n * End of the current data range (zoom).\r\n *\r\n * These are relative values from 0 (beginning) to 1 (end).\r\n *\r\n * @param value End (0-1)\r\n */\n set: function set(value) {\n // value = $math.round(value, 10); // not good\n //if (1 / (value - this.start) > this.maxZoomFactor) {\n //\tvalue = 1 / this.maxZoomFactor + this.start;\n //}\n if (this._end != value) {\n this._end = value;\n this._endIndex = Math.min(this.dataItems.length, Math.ceil(this.dataItems.length * value) || 0);\n this.invalidateDataRange();\n this.invalidate();\n this.dispatchImmediately(\"endchanged\");\n this.dispatch(\"startendchanged\");\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * [removeFromInvalids description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n Component.prototype.removeFromInvalids = function () {\n _super.prototype.removeFromInvalids.call(this);\n registry.removeFromInvalidComponents(this);\n $array.remove(registry.invalidDataItems, this);\n $array.remove(registry.invalidDataRange, this);\n $array.remove(registry.invalidRawDatas, this);\n };\n Object.defineProperty(Component.prototype, \"dataItems\", {\n /**\r\n * Returns a list of source [[DataItem]] objects.\r\n *\r\n * @return List of data items\r\n */\n get: function get() {\n return this._dataItems;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Updates the indexes for the dataItems\r\n *\r\n * @ignore Exclude from docs\r\n */\n Component.prototype._updateDataItemIndexes = function (startIndex) {\n var dataItems = this.dataItems.values;\n var length = dataItems.length;\n for (var i = startIndex; i < length; ++i) {\n dataItems[i]._index = i;\n }\n };\n /**\r\n * Processes newly added [[DataItem]] as well as triggers data re-validation.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event [description]\r\n */\n Component.prototype.handleDataItemAdded = function (event) {\n event.newValue.component = this;\n this._updateDataItemIndexes(event.index);\n if (!this.dataItemsInvalid) {\n this.invalidateDataItems();\n }\n };\n /**\r\n * removes [[DataItem]] as well as triggers data re-validation.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event [description]\r\n */\n Component.prototype.handleDataItemRemoved = function (event) {\n //\t\tevent.oldValue.component = undefined; // not good, as some items might be not removed from component lists\n this._updateDataItemIndexes(event.index);\n if (!this.dataItemsInvalid) {\n this.invalidateDataItems();\n }\n };\n Object.defineProperty(Component.prototype, \"dataMethods\", {\n /**\r\n * [dataMethods description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @deprecated Not used?\r\n * @param List of data methods\r\n */\n get: function get() {\n if (!this._dataMethods) {\n this._dataMethods = new Dictionary();\n }\n return this._dataMethods;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Binds a data element's field to a specific field in raw data.\r\n * For example, for the very basic column chart you'd want to bind a `value`\r\n * field to a field in data, such as `price`.\r\n *\r\n * Some more advanced Components, like [[CandlestickSeries]] need several\r\n * data fields bound to data, such as ones for open, high, low and close\r\n * values.\r\n *\r\n * @todo Example\r\n * @param field Field name\r\n * @param value Field name in data\r\n */\n Component.prototype.bindDataField = function (field, value) {\n this.dataFields[field] = value;\n this.invalidateDataRange();\n };\n /**\r\n * Invalidates processed data.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Component.prototype.invalidateProcessedData = function () {\n this.resetProcessedRange();\n this.invalidateDataRange();\n };\n /**\r\n * [resetProcessedRange description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\n Component.prototype.resetProcessedRange = function () {\n this._prevEndIndex = null;\n this._prevStartIndex = null;\n };\n Object.defineProperty(Component.prototype, \"dataUsers\", {\n /**\r\n * Returns all other [[Component]] objects that are using this element's\r\n * data.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @return [description]\r\n */\n get: function get() {\n var _this = this;\n if (!this._dataUsers) {\n this._dataUsers = new List();\n //this._disposers.push(new ListDisposer(this._dataUsers));\n // TODO better way of handling this? e.g. move into another module ?\n this._disposers.push(new Disposer(function () {\n // TODO clear the list ?\n $iter.each(_this._dataUsers.iterator(), function (x) {\n x.dispose();\n });\n }));\n }\n return this._dataUsers;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns a clone of this element.\r\n *\r\n * @return Clone\r\n */\n Component.prototype.clone = function () {\n var component = _super.prototype.clone.call(this);\n component.dataFields = $utils.copyProperties(this.dataFields, {});\n return component;\n };\n /**\r\n * Copies all parameters from another [[Component]].\r\n *\r\n * @param source Source Component\r\n */\n Component.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.data = source.data;\n this.sequencedInterpolation = source.sequencedInterpolation;\n this.sequencedInterpolationDelay = source.sequencedInterpolationDelay;\n this.interpolationDuration = source.interpolationDuration;\n this.interpolationEasing = source.interpolationEasing;\n };\n /**\r\n * Invalidates the whole element, including all its children, causing\r\n * complete re-parsing of data and redraw.\r\n *\r\n * Use sparingly!\r\n */\n Component.prototype.reinit = function () {\n this._inited = false;\n this.deepInvalidate();\n };\n /**\r\n * Add an adapter for data.\r\n *\r\n * @return Exporting\r\n */\n Component.prototype.getExporting = function () {\n var _export = _super.prototype.getExporting.call(this);\n if (!_export.adapter.has(\"data\", this._exportData, null, this)) {\n _export.adapter.add(\"data\", this._exportData, null, this);\n this.events.on(\"datavalidated\", function (ev) {\n if (_export.menu) {\n _export.menu.invalidate();\n }\n _export.handleDataUpdated();\n });\n }\n return _export;\n };\n Component.prototype._exportData = function (arg) {\n arg.data = this.data;\n return arg;\n };\n Component.prototype.setDisabled = function (value) {\n var changed = _super.prototype.setDisabled.call(this, value);\n if (changed) {\n this.invalidateData();\n }\n return changed;\n };\n /**\r\n * @ignore\r\n */\n Component.prototype.setShowOnInit = function (value) {\n if (value != this.getPropertyValue(\"showOnInit\")) {\n if (value && !this.inited && !this.hidden) {\n this._showOnInitDisposer2 = this.events.once(\"dataitemsvalidated\", this.hideInitially, this, false);\n this._disposers.push(this._showOnInitDisposer2);\n } else {\n if (this._showOnInitDisposer2) {\n this._showOnInitDisposer2.dispose();\n }\n }\n }\n // important order here\n _super.prototype.setShowOnInit.call(this, value);\n };\n Component.prototype.setBaseId = function (value) {\n if (value != this._baseId) {\n if (this.dataInvalid) {\n this.dataInvalid = false;\n registry.removeFromInvalidComponents(this);\n this._baseId = value;\n this.invalidateData();\n }\n }\n _super.prototype.setBaseId.call(this, value);\n };\n Object.defineProperty(Component.prototype, \"minZoomCount\", {\n /**\r\n * @return Min zoom count\r\n */\n get: function get() {\n return this.getPropertyValue(\"minZoomCount\");\n },\n /**\r\n * Use this for [[CategoryAxis]] or [[DateAxis]].\r\n *\r\n * Allows restricting zoom in beyond certain number of categories or base\r\n * intervals.\r\n *\r\n * @default 1\r\n * @param value Min zoom count\r\n */\n set: function set(value) {\n this.setPropertyValue(\"minZoomCount\", value);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Called during the System.update method\r\n *\r\n * @ignore Exclude from docs\r\n */\n Component.prototype._systemCheckIfValidate = function () {\n if (this.dataInvalid || this.dataProvider && this.dataProvider.dataInvalid) {\n return false;\n } else {\n return true;\n }\n };\n return Component;\n}(Container);\nexport { Component };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Component\"] = Component;","/**\r\n * Functionality for drawing simple buttons.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../Container\";\nimport { Label } from \"./Label\";\nimport { RoundedRectangle } from \"../elements/RoundedRectangle\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport { registry } from \"../Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Button class is capable of drawing a simple rectangular button with\r\n * optionally rounded corners and an icon in it.\r\n *\r\n * @see {@link IButtonEvents} for a list of available events\r\n * @see {@link IButtonAdapters} for a list of available Adapters\r\n */\nvar Button = /** @class */function (_super) {\n tslib_1.__extends(Button, _super);\n /**\r\n * Constructor\r\n */\n function Button() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"Button\";\n _this.tooltipY = 0;\n // Set defaults\n _this.iconPosition = \"left\";\n _this.layout = \"horizontal\";\n _this.contentAlign = \"center\";\n _this.contentValign = \"middle\";\n _this.padding(8, 16, 8, 16);\n var interfaceColors = new InterfaceColorSet();\n // Create background\n var background = _this.background;\n background.fill = interfaceColors.getFor(\"secondaryButton\");\n background.stroke = interfaceColors.getFor(\"secondaryButtonStroke\");\n background.fillOpacity = 1;\n background.strokeOpacity = 1;\n background.cornerRadius(3, 3, 3, 3);\n // Create the label element\n _this.label = new Label();\n _this.label.fill = interfaceColors.getFor(\"secondaryButtonText\");\n ;\n // Create default states\n var hoverState = background.states.create(\"hover\");\n hoverState.properties.fillOpacity = 1;\n hoverState.properties.fill = interfaceColors.getFor(\"secondaryButtonHover\");\n var downState = background.states.create(\"down\");\n downState.transitionDuration = 100;\n downState.properties.fill = interfaceColors.getFor(\"secondaryButtonDown\");\n downState.properties.fillOpacity = 1;\n // Set up accessibility\n // A button should be always focusable\n _this.role = \"button\";\n _this.focusable = true;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(Button.prototype, \"icon\", {\n /**\r\n * @return Icon Sprite\r\n */\n get: function get() {\n return this.getPropertyValue(\"icon\");\n },\n /**\r\n * A [[Sprite]] to be used as an icon on button.\r\n *\r\n * @param icon Icon Sprite\r\n */\n set: function set(icon) {\n var currentIcon = this.getPropertyValue(\"icon\");\n if (currentIcon) {\n //this._icon.dispose();\n //this.removeDispose(currentIcon);\n currentIcon.parent = undefined;\n }\n if (icon) {\n this.setPropertyValue(\"icon\", icon);\n icon.parent = this;\n icon.interactionsEnabled = false;\n this.iconPosition = this.iconPosition;\n this._disposers.push(icon);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Button.prototype, \"iconPosition\", {\n /**\r\n * @return Icon position\r\n */\n get: function get() {\n return this.getPropertyValue(\"iconPosition\");\n },\n /**\r\n * Icon position: \"left\" or \"right\".\r\n *\r\n * @default \"left\"\r\n * @param position Icon position\r\n */\n set: function set(position) {\n this.setPropertyValue(\"iconPosition\", position);\n if (this.icon) {\n if (position == \"left\") {\n this.icon.toBack();\n } else {\n this.icon.toFront();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Button.prototype, \"label\", {\n /**\r\n * @return Label element\r\n */\n get: function get() {\n return this._label;\n },\n /**\r\n * [[Label]] element to be used for text.\r\n *\r\n * @param label element\r\n */\n set: function set(label) {\n if (this._label) {\n //this._label.dispose();\n this.removeDispose(this._label);\n }\n this._label = label;\n if (label) {\n label.parent = this;\n label.interactionsEnabled = false;\n this._disposers.push(this._label);\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates a background element for the button.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Background element\r\n */\n Button.prototype.createBackground = function () {\n return new RoundedRectangle();\n };\n return Button;\n}(Container);\nexport { Button };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Button\"] = Button;","/**\r\n * Functionality for drawing circles.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Sprite } from \"../Sprite\";\nimport { percent } from \"../utils/Percent\";\nimport { registry } from \"../Registry\";\nimport * as $utils from \"../utils/Utils\";\nimport * as $math from \"../utils/Math\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Used to create a circle\r\n * @see {@link ICircleEvents} for a list of available events\r\n * @see {@link ICircleAdapters} for a list of available Adapters\r\n */\nvar Circle = /** @class */function (_super) {\n tslib_1.__extends(Circle, _super);\n /**\r\n * Constructor\r\n */\n function Circle() {\n var _this = _super.call(this) || this;\n _this.className = \"Circle\";\n _this.element = _this.paper.add(\"circle\");\n _this.setPercentProperty(\"radius\", percent(100));\n _this.setPropertyValue(\"horizontalCenter\", \"middle\");\n _this.setPropertyValue(\"verticalCenter\", \"middle\");\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the circle.\r\n */\n Circle.prototype.draw = function () {\n _super.prototype.draw.call(this);\n this.element.attr({\n \"r\": this.pixelRadius\n });\n };\n Object.defineProperty(Circle.prototype, \"radius\", {\n /**\r\n * @return Radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"radius\");\n },\n /**\r\n * Radius of the circle.\r\n *\r\n * Can be either absolute (pixels) or relative ([Percent]).\r\n *\r\n * @param value Radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"radius\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Circle.prototype, \"pixelRadius\", {\n /**\r\n * Radius of the circle in pixels.\r\n *\r\n * This is a read-only property. To set radius in pixels, use `radius`\r\n * property.\r\n *\r\n * @readonly\r\n * @return Radius (px)\r\n */\n get: function get() {\n return $utils.relativeToValue(this.radius, $math.min(this.innerWidth / 2, this.innerHeight / 2));\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Updates bounding box.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Circle.prototype.measureElement = function () {\n var pixelRadius = this.pixelRadius;\n this._bbox = {\n x: -pixelRadius,\n y: -pixelRadius,\n width: pixelRadius * 2,\n height: pixelRadius * 2\n };\n };\n return Circle;\n}(Sprite);\nexport { Circle };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Circle\"] = Circle;","/**\r\n * ============================================================================\r\n * COMPARING FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Comparing function used for ordering.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Use localeCompare\r\n * @param a Item 1\r\n * @param b Item 2\r\n * @return Result\r\n */\nexport function order(a, b) {\n if (a === b) {\n return 0;\n } else if (a < b) {\n return -1;\n } else {\n return 1;\n }\n}\n/**\r\n * ============================================================================\r\n * OTHER FUNCTIONS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Repeats a `string` number of times as set in `amount`.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Make this faster\r\n * @param string Source string\r\n * @param amount Number of times to repeat string\r\n * @return New string\r\n */\nexport function repeat(string, amount) {\n return new Array(amount + 1).join(string);\n}\n/**\r\n * Generates a random string `characters` length.\r\n *\r\n * @param chars Number of characters\r\n * @return Random string\r\n */\nexport function random(chars) {\n var res = \"\";\n var choice = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for (var i = 0; i < chars; i++) {\n res += choice.charAt(Math.floor(Math.random() * choice.length));\n }\n return res;\n}","/**\r\n * Functionality for drawing waved lines.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Line } from \"./Line\";\nimport { color } from \"../utils/Color\";\nimport { wavedLine } from \"../rendering/Smoothing\";\nimport * as $path from \"../rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws a waved line.\r\n *\r\n * @see {@link IWavedLineEvents} for a list of available events\r\n * @see {@link IWavedLineAdapters} for a list of available Adapters\r\n */\nvar WavedLine = /** @class */function (_super) {\n tslib_1.__extends(WavedLine, _super);\n /**\r\n * Constructor\r\n */\n function WavedLine() {\n var _this = _super.call(this) || this;\n _this.className = \"WavedLine\";\n _this.element = _this.paper.add(\"path\");\n _this.waveLength = 16;\n _this.waveHeight = 4;\n _this.tension = 0.8;\n _this.pixelPerfect = false;\n _this.fill = color();\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the waved line.\r\n *\r\n * @ignore Exclude from docs\r\n */\n WavedLine.prototype.draw = function () {\n //super.draw();\n var p1 = {\n x: this.x1,\n y: this.y1\n };\n var p2 = {\n x: this.x2,\n y: this.y2\n };\n this.path = $path.moveTo(p1) + wavedLine(p1, p2, this.waveLength, this.waveHeight, this.tension, true);\n };\n Object.defineProperty(WavedLine.prototype, \"waveLength\", {\n /**\r\n * @return Wave length (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"waveLength\");\n },\n /**\r\n * Wave length in pixels.\r\n *\r\n * @default 16\r\n * @param value Wave length (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"waveLength\", value);\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(WavedLine.prototype, \"waveHeight\", {\n /**\r\n * @return Wave height (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"waveHeight\");\n },\n /**\r\n * Wave height in pixels.\r\n *\r\n * @default 4\r\n * @param value Wave height (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"waveHeight\", value);\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(WavedLine.prototype, \"tension\", {\n /**\r\n * @return Tension\r\n */\n get: function get() {\n return this.getPropertyValue(\"tension\");\n },\n /**\r\n * Tension of the wave.\r\n *\r\n * @default 0.8\r\n * @param value Tension\r\n */\n set: function set(value) {\n this.setPropertyValue(\"tension\", value);\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n return WavedLine;\n}(Line);\nexport { WavedLine };","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","/**\r\n * A collection of functions for ordering.\r\n */\n/**\r\n * [reverse description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param a [description]\r\n * @return [description]\r\n */\nexport function reverse(a) {\n switch (a) {\n case 0:\n return 0;\n case -1:\n return 1;\n case 1:\n return -1;\n }\n}\n/**\r\n * [or description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param a Item 1\r\n * @param b Item 2\r\n * @return [description]\r\n */\nexport function or(a, b) {\n if (a === 0) {\n return b;\n } else {\n return a;\n }\n}","import { push } from 'connected-react-router';\nimport dotProp from 'dot-prop-immutable';\n\n// NOTE: ran into a problem trying to nest `area` into `sections.wasteProductionAreas`, and especially retrieving it is challenging.\nexport const addWasteProductionArea =\n (sectionId, args) =>\n (dispatch, getState, { getFirebase, getFirestore }) => {\n const state = getState();\n const firestore = getFirestore();\n const existingAreas = dotProp.get(\n state.firestore,\n `data.pre_acceptance_waste_audits.${state.app.auditDocumentId}.wasteProductionAreas`\n );\n\n firestore\n .add(\n {\n collection: \"pre_acceptance_waste_audits\",\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: \"wasteProductionAreas\" }],\n },\n { createdAt: new Date() }\n )\n .then((result) => {\n dispatch(\n goToEditWasteProductionAreaPath({\n wasteProductionAreaId: result.id,\n subpath: \"\",\n })\n );\n });\n };\n\nconst getWasteProductionAreaData = (wasteProductionAreaId, state) => {\n var wasteProductionArea =\n _.get(\n state.firestore,\n `data.sections.waste_production_areas.${wasteProductionAreaId}`\n ) || {};\n return {\n title: wasteProductionArea.name ?? \"Unamed Area\",\n ...wasteProductionArea,\n };\n};\n\nconst goToEditWasteProductionAreaPath =\n ({ wasteProductionAreaId, subpath = \"\" }) =>\n (dispatch, getState, { getFirebase, getFirestore }) => {\n if (wasteProductionAreaId) {\n dispatch(\n push(\n `/section/waste_production_areas/${wasteProductionAreaId}/edit${subpath}`\n )\n );\n }\n };\n\nexport const deleteWasteProductionArea =\n (areaId) =>\n (dispatch, getState, { getFirestore }) => {\n const state = getState();\n const firestore = getFirestore();\n\n if (!areaId) return;\n\n firestore\n .delete({\n collection: \"pre_acceptance_waste_audits\",\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: \"wasteProductionAreas\", doc: areaId }],\n })\n .then(() => {\n dispatch({ type: \"DELETE SUCCESS\" });\n })\n .catch((err) => {\n dispatch({ type: \"DELETE ERROR\" }, err);\n });\n };\n\n\nexport const updateWasteProductionAreaData =\n (areaId, args) =>\n (dispatch, getState, { getFirestore }) => {\n const state = getState();\n const firestore = getFirestore();\n\n firestore\n .set(\n {\n collection: \"pre_acceptance_waste_audits\",\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: \"wasteProductionAreas\", doc: areaId }],\n },\n args,\n { merge: true }\n )\n .then(() => {\n dispatch({ type: \"UPDATE SUCCESS\" });\n })\n .catch((err) => {\n dispatch({ type: \"UPDATE ERROR\" }, err);\n });\n};\n","import React, { useMemo } from \"react\";\nimport BinDot from \"service/BinDot\";\nimport { BinGroup, BinType, CollectionUnit } from \"./ticket/types\";\nimport { Table, TableCell, TableHead, TableRow } from \"@mui/material\";\nimport { useBinFetch } from \"sharedUtils\";\nimport {\n StyledTableBody,\n StyledTableContainer,\n StyledTableRow,\n} from \"./forms/common/CustomTable\";\nimport _ from \"lodash\";\n\ninterface CollectionInstructionProps {\n collectionUnits: CollectionUnit[];\n clearAll: boolean;\n requestCollectionCodes: string[];\n status: \"confirmation\" | \"cancelation\";\n}\n\nconst CollectionInstruction: React.FC<CollectionInstructionProps> = ({\n collectionUnits,\n clearAll,\n requestCollectionCodes,\n status,\n}) => {\n const { binTypes, binGroups } = useBinFetch(requestCollectionCodes);\n const hasAtLeastOneObject = useMemo(\n () => _.some(collectionUnits, _.isPlainObject),\n [collectionUnits]\n );\n const rows = _.map(\n collectionUnits,\n ({ serviceCode, quantity, visitActionId }) => {\n const binType = binTypes[serviceCode];\n const binGroup = binGroups[binType?.binGroupId];\n\n return (\n <TableRow key={serviceCode}>\n <TableCell scope=\"row\">\n <BinDot\n binGroup={binGroup}\n tooltipName={true}\n tooltipPlace=\"top\"\n showImg\n {...binType}\n />\n </TableCell>\n <TableCell>{binType?.name}</TableCell>\n <TableCell>{serviceCode}</TableCell>\n <TableCell>{quantity}</TableCell>\n <TableCell>{_.startCase(visitActionId)}</TableCell>\n </TableRow>\n );\n }\n );\n\n const renderClearAll = () => (\n <li>\n <strong>Vendor requested to clear all bins presented</strong>\n </li>\n );\n\n const renderNoCollection = () => (\n <li>\n <strong>\n No Collection Requested. Vendor requested to deliver stock only\n </strong>\n </li>\n );\n\n if (clearAll) return renderClearAll();\n if (hasAtLeastOneObject)\n return <CollectionTable rows={rows} status={status} />;\n return renderNoCollection();\n};\n\ninterface CollectionTableProps {\n rows: JSX.Element[];\n label?: boolean;\n deliveryAdditional?: boolean;\n status?: \"confirmation\" | \"cancelation\";\n}\n\nexport const CollectionTable: React.FC<CollectionTableProps> = ({\n rows,\n label = true,\n deliveryAdditional = false,\n status,\n}) => (\n <>\n {label && (\n <li>\n <strong>\n {status === \"confirmation\"\n ? \"Vendor has confirmed to collect the following\"\n : \"Vendor was requested to collect the following\"}\n </strong>\n </li>\n )}\n <StyledTableContainer>\n <Table size=\"small\">\n <TableHead>\n <StyledTableRow>\n <TableCell>Type</TableCell>\n <TableCell>Name</TableCell>\n <TableCell>Code</TableCell>\n <TableCell>Collect</TableCell>\n {deliveryAdditional && <TableCell>Deliver Additional</TableCell>}\n <TableCell>Visit Action</TableCell>\n </StyledTableRow>\n </TableHead>\n <StyledTableBody>{rows}</StyledTableBody>\n </Table>\n </StyledTableContainer>\n </>\n);\n\nexport default CollectionInstruction;\n","import { pickBy } from \"lodash\";\nimport BinDot from \"service/BinDot\";\nimport { useBinFetch } from \"sharedUtils\";\n\nconst PartialCollectionTooltip = ({ feedback }) => {\n const { binGroups } = useBinFetch();\n const collectedBinGroupIds = pickBy(binGroups, (bg) =>\n feedback?.collectedBinGroupIds?.includes(bg.id),\n );\n\n const uncollectedBinGroupIds = pickBy(binGroups, (bg) =>\n feedback?.uncollectedBinGroupIds?.includes(bg.id),\n );\n\n return (\n <table>\n {Object.keys(collectedBinGroupIds).length > 0 && (\n <tr>\n <td>Collected</td>\n <td\n style={{\n padding: \"0px 10px\",\n display: \"flex\",\n justifyContent: \"space-between\",\n gap: \"10px\",\n }}\n >\n {Object.values(collectedBinGroupIds).map((b) => (\n <BinDot\n key={b.id}\n binGroup={b}\n tooltipName={true}\n tooltipPlace=\"top\"\n tooltipBackgroundColor=\"#fff\"\n tooltipColor=\"#000\"\n arrowColor=\"#fff\"\n />\n ))}\n </td>\n </tr>\n )}\n {Object.keys(uncollectedBinGroupIds).length > 0 && (\n <tr>\n <td>Not Collected</td>\n <td\n style={{\n padding: \"0px 10px\",\n display: \"flex\",\n justifyContent: \"space-between\",\n gap: \"10px\",\n }}\n >\n {Object.values(uncollectedBinGroupIds).map((b) => (\n <BinDot\n key={b.id}\n binGroup={b}\n tooltipName={true}\n tooltipPlace=\"top\"\n tooltipBackgroundColor=\"#fff\"\n tooltipColor=\"#000\"\n arrowColor=\"#fff\"\n />\n ))}\n </td>\n </tr>\n )}\n </table>\n );\n};\n\nexport default PartialCollectionTooltip;\n","import { useState } from \"react\";\nimport { Channel } from \"service/ticket/types\";\nimport {\n getDefaultContactId,\n getDefaultResponseExpected,\n getTicketId,\n} from \"ticket/selectors\";\n\nexport const useResponse = (channel: Channel) => {\n const ticketId = getTicketId();\n\n const [responseExpected, setResponseExpected] = useState(\n getDefaultResponseExpected(channel)\n );\n const [message, setMessage] = useState();\n const [messageOverridden, setMessageOverridden] = useState(false);\n const [toContactId, setToContactId] = useState(getDefaultContactId(channel));\n\n return {\n channel,\n ticketId,\n toContactId,\n responseExpected,\n message,\n messageOverridden,\n setResponseExpected,\n setToContactId,\n setMessage,\n setMessageOverridden,\n };\n};\n","import { useEffect, useRef, useState } from \"react\";\n\nexport const useCannedResponse = (response, cannedMessage) => {\n const { message } = response;\n const previousMessage = useRef();\n const editedCannedMessage = useRef();\n\n const [staleMessage, setStaleMessage] = useState(false);\n\n useEffect(() => {\n if (!!message && !previousMessage.current) {\n editedCannedMessage.current = cannedMessage;\n } else if (!message) {\n editedCannedMessage.current = undefined;\n }\n\n if (\n !!editedCannedMessage.current &&\n cannedMessage != editedCannedMessage.current\n ) {\n setStaleMessage(true);\n } else {\n setStaleMessage(false);\n }\n\n previousMessage.current = message;\n }, [message, cannedMessage]);\n\n const resetToCannedResponse = () => {\n response.setMessage(undefined);\n };\n\n return {\n ...response,\n message: response.message || cannedMessage,\n staleMessage,\n resetToCannedResponse: staleMessage ? resetToCannedResponse : undefined,\n };\n};\n","import { pick } from \"lodash\";\nimport { useEffect, useState } from \"react\";\nimport { Channel } from \"service/ticket/types\";\nimport { useDebounce } from \"usehooks-ts\";\nimport { useResponse } from \"./useResponse\";\nimport stringify from \"json-stable-stringify\";\nimport _ from \"lodashExtended\";\nimport { prepareSubmitData as _prepareSubmitData } from \"sharedUtils\";\nimport { useCannedResponse } from \"./useCannedResponse\";\n\nexport const prepareCannedResponse = (data) => {\n var attributeKeyNames = [\n \"specifications\",\n \"deliveryUnits\",\n \"collectionUnits\",\n \"organisationResponse\",\n \"vendorResponse\",\n ];\n\n return _prepareSubmitData(data, attributeKeyNames);\n};\n\nexport const useCannedResponses = (formUrl, formData) => {\n const [cannedResponse, setCannedResponse] = useState({});\n const [responsesLoaded, setResponsesLoaded] = useState(false);\n\n var organisationResponse = useResponse(Channel.Organisation);\n var vendorResponse = useResponse(Channel.Vendor);\n\n const responseTemplateData = {\n organisationResponse: pick(organisationResponse, [\n \"toContactId\",\n \"responseExpected\",\n ]),\n vendorResponse: pick(vendorResponse, [\"toContactId\", \"responseExpected\"]),\n };\n\n const deboucedFormData = useDebounce(stringify(formData), 300);\n const deboucedResponseTemplateData = useDebounce(\n stringify(responseTemplateData),\n 300\n );\n\n useEffect(() => {\n if (formUrl && _.isPresent(formData)) {\n var renderUrl = formUrl.replace(/\\.json/, \"/render_message.json\");\n const csrfToken = $('meta[name=\"csrf-token\"]').attr(\"content\");\n fetch(renderUrl, {\n method: \"PUT\",\n credentials: \"same-origin\",\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n \"X-CSRF-Token\": csrfToken,\n },\n body: JSON.stringify(\n prepareCannedResponse({\n form: {\n ...responseTemplateData,\n ...formData.form,\n },\n })\n ),\n })\n .then((res) => res.json())\n .then((data) => {\n setCannedResponse(data);\n setResponsesLoaded(true);\n })\n .catch((x) => {\n console.error(x);\n });\n }\n }, [formUrl, deboucedFormData, deboucedResponseTemplateData]);\n\n const cannedOrganisationResponse = useCannedResponse(\n organisationResponse,\n cannedResponse.organisationMessage\n );\n const cannedVendorResponse = useCannedResponse(\n vendorResponse,\n cannedResponse.vendorMessage\n );\n\n return {\n vendorResponse: cannedVendorResponse,\n organisationResponse: cannedOrganisationResponse,\n responsesLoaded,\n formDefaults: cannedResponse.formDefaults,\n formData,\n };\n};\n","import { CollectionTable } from \"service/CollectionInstruction\";\nimport { DeliveryTable } from \"service/DeliveryInstruction\";\nexport function getRequestType({\n clearAll,\n isCollectAndDelivery,\n isCollect,\n isDelivery,\n}) {\n if (clearAll) return isDelivery ? \"clearAllAndDeliver\" : \"clearAll\";\n\n if (isCollectAndDelivery) return \"collectAndDeliver\";\n\n if (isCollect) return \"collect\";\n\n if (isDelivery) return \"deliver\";\n\n return \"default\";\n}\n\nexport function getTypographyLabel(requestType) {\n switch (requestType) {\n case \"clearAllAndDeliver\":\n return (\n <>\n Collect <strong>all</strong> and deliver specific{\" \"}\n <strong>items</strong>\n </>\n );\n // return \"Clear all presented waste and deliver additional like for like.\";\n case \"clearAll\":\n return (\n <>\n Collect and replace <strong>all</strong>\n </>\n );\n // return \"Clear all presented waste\";\n case \"collectAndDeliver\":\n return (\n <>\n Collect and deliver specific <strong>items</strong>\n </>\n );\n // return \"Collect specific items only and deliver additional like for like.\";\n case \"collect\":\n return (\n <>\n Collect specific <strong>items</strong>\n </>\n );\n case \"deliver\":\n return \"Only deliver additional stock.\";\n default:\n return \"\";\n }\n}\n\nconst AdhocVisitRequestCardDetails = ({\n clearAll,\n isCollectAndDelivery,\n isCollect,\n isDelivery,\n deliveryRows,\n collectionRows,\n collectAndDeliveryRows,\n}) => {\n function renderRequestContent() {\n const requestType = getRequestType({\n clearAll,\n isCollectAndDelivery,\n isCollect,\n isDelivery,\n });\n\n switch (requestType) {\n case \"clearAllAndDeliver\":\n return <DeliveryTable rows={deliveryRows} label={false} />;\n case \"clearAll\":\n case \"collect\":\n case \"deliver\":\n return (\n <>\n {requestType === \"collect\" && (\n <CollectionTable rows={collectionRows} label={false} />\n )}\n {requestType === \"deliver\" && (\n <DeliveryTable rows={deliveryRows} label={false} />\n )}\n </>\n );\n case \"collectAndDeliver\":\n return (\n <CollectionTable\n rows={collectAndDeliveryRows}\n label={false}\n deliveryAdditional\n />\n );\n default:\n return null;\n }\n }\n\n return renderRequestContent();\n};\n\nexport default AdhocVisitRequestCardDetails;\n","/**\r\n * Handles date and time formatting\r\n */\nimport * as tslib_1 from \"tslib\";\nimport { Language } from \"../utils/Language\";\nimport { BaseObject } from \"../Base\";\nimport { getTextFormatter } from \"../formatters/TextFormatter\";\nimport { registry } from \"../Registry\";\nimport * as $strings from \"../utils/Strings\";\nimport * as $utils from \"../utils/Utils\";\nimport * as $type from \"../utils/Type\";\n/**\r\n * Handles date and time formatting.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-date-time/} Tutorial on date/time formatting\r\n * @todo Better type casting of passed in date?\r\n * @todo Quarter support?\r\n * @todo When parsing named months make the search case-insensitive\r\n * @todo Escape a.m./p.m. properly when used in RegEx\r\n */\nvar DateFormatter = /** @class */function (_super) {\n tslib_1.__extends(DateFormatter, _super);\n /**\r\n * Constructor\r\n */\n function DateFormatter() {\n var _this = _super.call(this) || this;\n /**\r\n * Date format.\r\n */\n _this._dateFormat = \"yyyy-MM-dd\";\n /**\r\n * Input date format.\r\n */\n _this._inputDateFormat = \"yyyy-MM-dd\";\n /**\r\n * Assume UTC time zone.\r\n */\n _this._utc = false;\n /**\r\n * First day of week.\r\n *\r\n * 0 - Sunday\r\n * 1 - Monday\r\n *\r\n * Etc.\r\n */\n _this._firstDayOfWeek = 1;\n /**\r\n * A list of month names.\r\n */\n _this._months = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n /**\r\n * A list of short month names.\r\n *\r\n * @param {Array<ShortMonthNames>}\r\n */\n _this._monthsShort = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May(short)\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n /**\r\n * A list of weekday names.\r\n */\n _this._weekdays = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\n /**\r\n * A list of short weekday names.\r\n */\n _this._weekdaysShort = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n /**\r\n * Output format to produce. If the format calls for applying color to the\r\n * formatted value, this setting will determine what markup to use: SVG or\r\n * HTML.\r\n *\r\n * Available options: svg, html.\r\n *\r\n * @default \"svg\"\r\n */\n _this._outputFormat = \"svg\";\n /**\r\n * Should the first letter of the formatted date be capitalized?\r\n *\r\n * @default true\r\n */\n _this.capitalize = true;\n _this.className = \"DateFormatter\";\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(DateFormatter.prototype, \"language\", {\n /**\r\n * @return Language\r\n */\n get: function get() {\n return this._language;\n },\n /**\r\n * A reference to [[Language]] object.\r\n *\r\n * @param value Language\r\n */\n set: function set(value) {\n this._language = value;\n this.dateFormat = this._language.translate(\"_date\");\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Formats the date value according to specified format.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-date-time/} Tutorial on date/time formatting\r\n * @param source Date value\r\n * @param format Format\r\n * @return Formatted date string\r\n */\n DateFormatter.prototype.format = function (source, format) {\n // No language?\n if (!this.language) {\n if (this.sprite) {\n this.language = this.sprite.language;\n } else {\n this.language = new Language();\n }\n }\n // No format passed in or it's empty\n if (typeof format === \"undefined\" || format === \"\") {\n format = this._dateFormat;\n }\n // Clean format\n format = $utils.cleanFormat(format);\n // get format info (it will also deal with parser caching)\n var info = this.parseFormat(format);\n // Do casting if required\n // This will take care of timestamps as well as Date objects\n var date;\n if ($type.isString(source)) {\n // If it's a string, let's try parsing it using our own functionality\n date = this.parse(source);\n } else {\n date = $utils.anyToDate(source);\n }\n // Should we apply custom time zone?\n if ($type.hasValue(this.timezoneOffset)) {\n date.setMinutes(date.getMinutes() + date.getTimezoneOffset() - this.timezoneOffset);\n }\n // Check if it's a valid date\n if (!$type.isNumber(date.getTime())) {\n return this.language.translate(\"Invalid date\");\n }\n // Apply format\n var formatted = this.applyFormat(date, info, this.language);\n // Capitalize\n if (this.capitalize) {\n formatted = formatted.replace(/^.{1}/, formatted.substr(0, 1).toUpperCase());\n }\n // We're done\n return formatted;\n };\n /**\r\n * Parses format into structured infromation.\r\n *\r\n * @param format Format template\r\n */\n DateFormatter.prototype.parseFormat = function (format) {\n // Check cache\n var cached = this.getCache(format);\n if ($type.hasValue(cached)) {\n return cached;\n }\n // Init format parse info holder\n var info = {\n \"template\": \"\",\n \"parts\": []\n };\n // Let TextFormatter split into chunks\n var chunks = getTextFormatter().chunk(format, true);\n for (var i = 0; i < chunks.length; i++) {\n var chunk = chunks[i];\n if (chunk.type === \"value\") {\n // Just \"Date\"?\n if (chunk.text.match(/^date$/i)) {\n chunk.text = this._dateFormat;\n }\n // Find all possible parts\n var matches = chunk.text.match(/G|yyyy|yyy|yy|y|YYYY|YYY|YY|Y|u|MMMMM|MMMM|MMM|MM|M|ww|w|W|dd|d|DDD|DD|D|F|g|EEEEE|EEEE|EEE|EE|E|eeeee|eeee|eee|ee|e|aaa|aa|a|hh|h|HH|H|KK|K|kk|k|mm|m|ss|s|SSS|SS|S|A|zzzz|zzz|zz|z|ZZ|Z|t|x|nnn|nn|n|i|I/g);\n // Found?\n if (matches) {\n // Populate template\n for (var x = 0; x < matches.length; x++) {\n info.parts.push(matches[x]);\n chunk.text = chunk.text.replace(matches[x], $strings.PLACEHOLDER);\n }\n }\n }\n // Apply to template\n info.template += chunk.text;\n }\n // Apply style formatting\n //info.template = getTextFormatter().format(info.template, this.outputFormat);\n // Save cache\n this.setCache(format, info);\n return info;\n };\n /**\r\n * Applies format to Date.\r\n *\r\n * @param date Date object\r\n * @param info Parsed format information\r\n * @param language Language\r\n * @return Formatted date string\r\n */\n DateFormatter.prototype.applyFormat = function (date, info, language) {\n // Init return value\n var res = info.template;\n // Get values\n var fullYear,\n month,\n weekday,\n day,\n hours,\n minutes,\n seconds,\n milliseconds,\n offset = date.getTimezoneOffset(),\n timestamp = date.getTime();\n if (this.utc) {\n fullYear = date.getUTCFullYear();\n month = date.getUTCMonth();\n weekday = date.getUTCDay();\n day = date.getUTCDate();\n hours = date.getUTCHours();\n minutes = date.getUTCMinutes();\n seconds = date.getUTCSeconds();\n milliseconds = date.getUTCMilliseconds();\n } else {\n fullYear = date.getFullYear();\n month = date.getMonth();\n weekday = date.getDay();\n day = date.getDate();\n hours = date.getHours();\n minutes = date.getMinutes();\n seconds = date.getSeconds();\n milliseconds = date.getMilliseconds();\n }\n // Go through each part and format/replace it in template\n for (var i = 0, len = info.parts.length; i < len; i++) {\n var value = \"\";\n switch (info.parts[i]) {\n case \"G\":\n value = language.translate(fullYear < 0 ? \"_era_bc\" : \"_era_ad\");\n break;\n case \"yyyy\":\n value = Math.abs(fullYear).toString();\n if (fullYear < 0) {\n value += language.translate(\"_era_bc\");\n }\n break;\n case \"yyy\":\n case \"yy\":\n case \"y\":\n value = Math.abs(fullYear).toString().substr(-info.parts[i].length);\n if (fullYear < 0) {\n value += language.translate(\"_era_bc\");\n }\n break;\n case \"YYYY\":\n case \"YYY\":\n case \"YY\":\n case \"Y\":\n var week = $utils.getWeek(date);\n var year = fullYear;\n if (week == 1 && weekday > 1) {\n year--;\n }\n if (info.parts[i] == \"YYYY\") {\n value = Math.abs(year).toString();\n } else {\n value = Math.abs(year).toString().substr(-info.parts[i].length);\n }\n if (year < 0) {\n value += language.translate(\"_era_bc\");\n }\n break;\n case \"u\":\n // @todo\n break;\n case \"MMMMM\":\n value = language.translate(this._months[month]).substr(0, 1);\n break;\n case \"MMMM\":\n value = language.translate(this._months[month]);\n break;\n case \"MMM\":\n value = language.translate(this._monthsShort[month]);\n break;\n case \"MM\":\n value = $utils.padString(month + 1, 2, \"0\");\n break;\n case \"M\":\n value = (month + 1).toString();\n break;\n case \"ww\":\n value = $utils.padString($utils.getWeek(date, this.utc), 2, \"0\");\n break;\n case \"w\":\n value = $utils.getWeek(date, this.utc).toString();\n break;\n case \"W\":\n value = $utils.getMonthWeek(date, this.utc).toString();\n break;\n case \"dd\":\n value = $utils.padString(day, 2, \"0\");\n break;\n case \"d\":\n value = day.toString();\n break;\n case \"DD\":\n case \"DDD\":\n value = $utils.padString($utils.getYearDay(date, this.utc).toString(), info.parts[i].length, \"0\");\n break;\n case \"D\":\n value = $utils.getYearDay(date, this.utc).toString();\n break;\n case \"F\":\n // @todo\n break;\n case \"g\":\n // @todo\n break;\n case \"t\":\n value = language.translateFunc(\"_dateOrd\").call(this, day);\n break;\n case \"E\":\n value = (weekday || 7).toString();\n break;\n case \"EE\":\n value = $utils.padString((weekday || 7).toString(), 2, \"0\");\n break;\n case \"EEE\":\n case \"eee\":\n value = language.translate(this._weekdaysShort[weekday]);\n break;\n case \"EEEE\":\n case \"eeee\":\n value = language.translate(this._weekdays[weekday]);\n break;\n case \"EEEEE\":\n case \"eeeee\":\n value = language.translate(this._weekdays[weekday]).substr(0, 1);\n break;\n case \"e\":\n case \"ee\":\n value = (weekday - this.firstDayOfWeek + 1).toString();\n if (info.parts[i] == \"ee\") {\n value = $utils.padString(value, 2, \"0\");\n }\n break;\n case \"a\":\n if (hours >= 12) {\n value = language.translate(\"PM\");\n } else {\n value = language.translate(\"AM\");\n }\n break;\n case \"aa\":\n if (hours >= 12) {\n value = language.translate(\"P.M.\");\n } else {\n value = language.translate(\"A.M.\");\n }\n break;\n case \"aaa\":\n if (hours >= 12) {\n value = language.translate(\"P\");\n } else {\n value = language.translate(\"A\");\n }\n break;\n case \"h\":\n value = $utils.get12Hours(hours).toString();\n break;\n case \"hh\":\n value = $utils.padString($utils.get12Hours(hours), 2, \"0\");\n break;\n case \"H\":\n value = hours.toString();\n break;\n case \"HH\":\n value = $utils.padString(hours, 2, \"0\");\n break;\n case \"K\":\n value = $utils.get12Hours(hours, 0).toString();\n break;\n case \"KK\":\n value = $utils.padString($utils.get12Hours(hours, 0), 2, \"0\");\n break;\n case \"k\":\n value = (hours + 1).toString();\n break;\n case \"kk\":\n value = $utils.padString(hours + 1, 2, \"0\");\n break;\n case \"m\":\n value = minutes.toString();\n break;\n case \"mm\":\n value = $utils.padString(minutes, 2, \"0\");\n break;\n case \"s\":\n value = seconds.toString();\n break;\n case \"ss\":\n value = $utils.padString(seconds, 2, \"0\");\n break;\n case \"S\":\n case \"SS\":\n case \"SSS\":\n value = Math.round(milliseconds / 1000 * Math.pow(10, info.parts[i].length)).toString();\n break;\n case \"x\":\n value = timestamp.toString();\n break;\n case \"n\":\n case \"nn\":\n case \"nnn\":\n value = $utils.padString(milliseconds, info.parts[i].length, \"0\");\n break;\n case \"z\":\n value = $utils.getTimeZone(date, false, false, this.utc);\n break;\n case \"zz\":\n value = $utils.getTimeZone(date, true, false, this.utc);\n break;\n case \"zzz\":\n value = $utils.getTimeZone(date, false, true, this.utc);\n break;\n case \"zzzz\":\n value = $utils.getTimeZone(date, true, true, this.utc);\n break;\n case \"Z\":\n case \"ZZ\":\n var tz = Math.abs(offset) / 60;\n var tzh = Math.floor(tz);\n var tzm = tz * 60 - tzh * 60;\n if (this.utc) {\n tzh = 0;\n tzm = 0;\n }\n if (info.parts[i] == \"Z\") {\n value = \"GMT\";\n value += offset > 0 ? \"-\" : \"+\";\n value += $utils.padString(tzh, 2) + \":\" + $utils.padString(tzm, 2);\n } else {\n value = offset > 0 ? \"-\" : \"+\";\n value += $utils.padString(tzh, 2) + $utils.padString(tzm, 2);\n }\n break;\n case \"i\":\n value = date.toISOString();\n break;\n case \"I\":\n value = date.toUTCString();\n break;\n }\n res = res.replace($strings.PLACEHOLDER, value);\n }\n return res;\n };\n /**\r\n * Parses any input value into Date object.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-date-time/#Parsing_Dates} Tutorial on date/time parsing\r\n * @param source Source value\r\n * @param format Source format\r\n * @return Date object\r\n */\n DateFormatter.prototype.parse = function (source, format) {\n // Format set?\n if (!$type.hasValue(format)) {\n format = this.inputDateFormat;\n }\n // Is it already a Date\n if (source instanceof Date) {\n return source;\n }\n // Is it a numeric timestamp\n if (typeof source === \"number\") {\n return new Date(source);\n }\n // No? Let's check if it's string, and try converting to it if nec\n if (typeof source !== \"string\") {\n source = source.toString();\n }\n // no language?\n if (!this.language) {\n if (this.sprite) {\n this.language = this.sprite.language;\n } else {\n this.language = new Language();\n }\n }\n // Init return value\n var res = new Date(1970, 0, 1, 0, 0, 0);\n // Init RegEx for parsing\n var reg = \"\";\n // Clean format\n format = $utils.cleanFormat(format);\n // Clip format to length of the source string\n format = format.substr(0, source.length);\n // Parse format\n var info = this.parseFormat(format);\n // Init parsed items holder\n var parsedIndexes = {\n \"year\": -1,\n \"year3\": -1,\n \"year2\": -1,\n \"year1\": -1,\n \"month\": -1,\n \"monthShort\": -1,\n \"monthLong\": -1,\n \"weekdayShort\": -1,\n \"weekdayLong\": -1,\n \"day\": -1,\n \"yearDay\": -1,\n \"week\": -1,\n \"hourBase0\": -1,\n \"hour12Base0\": -1,\n \"hourBase1\": -1,\n \"hour12Base1\": -1,\n \"minute\": -1,\n \"second\": -1,\n \"millisecond\": -1,\n \"millisecondDigits\": -1,\n \"am\": -1,\n \"zone\": -1,\n \"timestamp\": -1,\n \"iso\": -1\n };\n // Index adjuster\n var indexAdjust = 0,\n index = 0;\n // Iterate through all of the parts\n for (var i = 0; i < info.parts.length; i++) {\n // Set current match index\n index = i + indexAdjust + 1;\n switch (info.parts[i]) {\n case \"yyyy\":\n case \"YYYY\":\n reg += \"([0-9]{4})\";\n parsedIndexes.year = index;\n break;\n case \"yyy\":\n case \"YYY\":\n reg += \"([0-9]{3})\";\n parsedIndexes.year3 = index;\n break;\n case \"yy\":\n case \"YY\":\n reg += \"([0-9]{2})\";\n parsedIndexes.year2 = index;\n break;\n case \"y\":\n case \"Y\":\n reg += \"([0-9]{1})\";\n parsedIndexes.year1 = index;\n break;\n case \"MMMM\":\n reg += \"(\" + this.getStringList(this._months).join(\"|\") + \")\";\n parsedIndexes.monthLong = index;\n break;\n case \"MMM\":\n reg += \"(\" + this.getStringList(this._monthsShort).join(\"|\") + \")\";\n parsedIndexes.monthShort = index;\n break;\n case \"MM\":\n case \"M\":\n reg += \"([0-9]{2}|[0-9]{1})\";\n parsedIndexes.month = index;\n break;\n case \"ww\":\n case \"w\":\n reg += \"([0-9]{2}|[0-9]{1})\";\n parsedIndexes.week = index;\n break;\n case \"dd\":\n case \"d\":\n reg += \"([0-9]{2}|[0-9]{1})\";\n parsedIndexes.day = index;\n break;\n case \"DDD\":\n case \"DD\":\n case \"D\":\n reg += \"([0-9]{3}|[0-9]{2}|[0-9]{1})\";\n parsedIndexes.yearDay = index;\n break;\n case \"dddd\":\n reg += \"(\" + this.getStringList(this._weekdays).join(\"|\") + \")\";\n parsedIndexes.weekdayLong = index;\n break;\n case \"ddd\":\n reg += \"(\" + this.getStringList(this._weekdaysShort).join(\"|\") + \")\";\n parsedIndexes.weekdayShort = index;\n break;\n case \"aaa\":\n case \"aa\":\n case \"a\":\n // TODO: fix (escape regex)\n reg += \"(\" + this.getStringList([\"AM\", \"PM\", \"A\\.M\\.\", \"P\\.M\\.\", \"A\", \"P\"]).join(\"|\") + \")\";\n parsedIndexes.am = index;\n break;\n case \"hh\":\n case \"h\":\n reg += \"([0-9]{2}|[0-9]{1})\";\n parsedIndexes.hour12Base1 = index;\n break;\n case \"HH\":\n case \"H\":\n reg += \"([0-9]{2}|[0-9]{1})\";\n parsedIndexes.hourBase0 = index;\n break;\n case \"KK\":\n case \"K\":\n reg += \"([0-9]{2}|[0-9]{1})\";\n parsedIndexes.hour12Base0 = index;\n break;\n case \"kk\":\n case \"k\":\n reg += \"([0-9]{2}|[0-9]{1})\";\n parsedIndexes.hourBase1 = index;\n break;\n case \"mm\":\n case \"m\":\n reg += \"([0-9]{2}|[0-9]{1})\";\n parsedIndexes.minute = index;\n break;\n case \"ss\":\n case \"s\":\n reg += \"([0-9]{2}|[0-9]{1})\";\n parsedIndexes.second = index;\n break;\n case \"SSS\":\n case \"SS\":\n case \"S\":\n reg += \"([0-9]{3}|[0-9]{2}|[0-9]{1})\";\n parsedIndexes.millisecond = index;\n parsedIndexes.millisecondDigits = info.parts[i].length;\n break;\n case \"nnn\":\n case \"nn\":\n case \"n\":\n reg += \"([0-9]{3}|[0-9]{2}|[0-9]{1})\";\n parsedIndexes.millisecond = index;\n break;\n case \"x\":\n reg += \"([0-9]{1,})\";\n parsedIndexes.timestamp = index;\n break;\n case \"Z\":\n reg += \"GMT([-+]+[0-9]{2}:[0-9]{2})\";\n parsedIndexes.zone = index;\n break;\n case \"ZZ\":\n reg += \"([\\\\-+]+[0-9]{2}[0-9]{2})\";\n parsedIndexes.zone = index;\n break;\n case \"i\":\n reg += \"([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})\\.([0-9]{3})([Zz]?)\";\n parsedIndexes.iso = index;\n indexAdjust += 7;\n break;\n case \"G\":\n case \"YYYY\":\n case \"YYY\":\n case \"YY\":\n case \"Y\":\n case \"MMMMM\":\n case \"W\":\n case \"EEEEE\":\n case \"EEEE\":\n case \"EEE\":\n case \"EE\":\n case \"E\":\n case \"eeeee\":\n case \"eeee\":\n case \"eee\":\n case \"ee\":\n case \"e\":\n case \"zzzz\":\n case \"zzz\":\n case \"zz\":\n case \"z\":\n case \"t\":\n // Ignore\n indexAdjust--;\n break;\n }\n reg += \"[^0-9]*\";\n }\n // Try matching\n var regex = new RegExp(reg);\n var matches = source.match(regex);\n if (matches) {\n // Populate the date object\n // Full year\n if (parsedIndexes.year > -1) {\n var val = parseInt(matches[parsedIndexes.year]);\n if (this.utc) {\n res.setUTCFullYear(val);\n } else {\n res.setFullYear(val);\n }\n }\n // 3-digit year\n if (parsedIndexes.year3 > -1) {\n var val = parseInt(matches[parsedIndexes.year3]);\n val += 1000;\n if (this.utc) {\n res.setUTCFullYear(val);\n } else {\n res.setFullYear(val);\n }\n }\n // 2-digit year\n if (parsedIndexes.year2 > -1) {\n var val = parseInt(matches[parsedIndexes.year2]);\n if (val > 50) {\n val += 1000;\n } else {\n val += 2000;\n }\n if (this.utc) {\n res.setUTCFullYear(val);\n } else {\n res.setFullYear(val);\n }\n }\n // 1-digit year\n if (parsedIndexes.year1 > -1) {\n var val = parseInt(matches[parsedIndexes.year1]);\n val = Math.floor(new Date().getFullYear() / 10) * 10 + val;\n if (this.utc) {\n res.setUTCFullYear(val);\n } else {\n res.setFullYear(val);\n }\n }\n // Full month\n if (parsedIndexes.monthLong > -1) {\n var val = this.resolveMonth(matches[parsedIndexes.monthLong]);\n if (this.utc) {\n res.setUTCMonth(val);\n } else {\n res.setMonth(val);\n }\n }\n // Short month\n if (parsedIndexes.monthShort > -1) {\n var val = this.resolveShortMonth(matches[parsedIndexes.monthShort]);\n if (this.utc) {\n res.setUTCMonth(val);\n } else {\n res.setMonth(val);\n }\n }\n // Numeric month\n if (parsedIndexes.month > -1) {\n var val = parseInt(matches[parsedIndexes.month]) - 1;\n if (this.utc) {\n res.setUTCMonth(val);\n } else {\n res.setMonth(val);\n }\n }\n // Weekday\n // @todo\n // Week\n if (parsedIndexes.week > -1 && parsedIndexes.day === -1) {\n // We parse weeks ONLY if day is not explicitly set\n // TODO: this needs work\n // (but maybe later - I can hardly imagine anyone passing their dates in weeks)\n var val = $utils.getDayFromWeek(parseInt(matches[parsedIndexes.week]), this.utc ? res.getUTCFullYear() : res.getFullYear(), 1, this.utc);\n if (this.utc) {\n res.setUTCMonth(0);\n res.setUTCDate(val);\n } else {\n res.setMonth(0);\n res.setDate(val);\n }\n }\n // Day\n if (parsedIndexes.day > -1) {\n var val = parseInt(matches[parsedIndexes.day]);\n if (this.utc) {\n res.setUTCDate(val);\n } else {\n res.setDate(val);\n }\n }\n // Year day\n if (parsedIndexes.yearDay > -1) {\n var val = parseInt(matches[parsedIndexes.yearDay]);\n if (this.utc) {\n res.setUTCMonth(0);\n res.setUTCDate(val);\n } else {\n res.setMonth(0);\n res.setDate(val);\n }\n }\n // 24 Hour (0-23)\n if (parsedIndexes.hourBase0 > -1) {\n var val = parseInt(matches[parsedIndexes.hourBase0]);\n if (this.utc) {\n res.setUTCHours(val);\n } else {\n res.setHours(val);\n }\n }\n // 24 Hour (1-24)\n if (parsedIndexes.hourBase1 > -1) {\n var val = parseInt(matches[parsedIndexes.hourBase1]) - 1;\n if (this.utc) {\n res.setUTCHours(val);\n } else {\n res.setHours(val);\n }\n }\n // 12 Hour (0-11)\n if (parsedIndexes.hour12Base0 > -1) {\n var val = parseInt(matches[parsedIndexes.hour12Base0]);\n if (val == 11) {\n val = 0;\n }\n if (parsedIndexes.am > -1 && !this.isAm(matches[parsedIndexes.am])) {\n val += 12;\n }\n if (this.utc) {\n res.setUTCHours(val);\n } else {\n res.setHours(val);\n }\n }\n // 12 Hour (1-12)\n if (parsedIndexes.hour12Base1 > -1) {\n var val = parseInt(matches[parsedIndexes.hour12Base1]);\n if (val == 12) {\n val = 0;\n }\n if (parsedIndexes.am > -1 && !this.isAm(matches[parsedIndexes.am])) {\n val += 12;\n }\n if (this.utc) {\n res.setUTCHours(val);\n } else {\n res.setHours(val);\n }\n }\n // Minute\n if (parsedIndexes.minute > -1) {\n var val = parseInt(matches[parsedIndexes.minute]);\n if (this.utc) {\n res.setUTCMinutes(val);\n } else {\n res.setMinutes(val);\n }\n }\n // Second\n if (parsedIndexes.second > -1) {\n var val = parseInt(matches[parsedIndexes.second]);\n if (this.utc) {\n res.setUTCSeconds(val);\n } else {\n res.setSeconds(val);\n }\n }\n // Millisecond\n if (parsedIndexes.millisecond > -1) {\n var val = parseInt(matches[parsedIndexes.millisecond]);\n if (parsedIndexes.millisecondDigits == 2) {\n val *= 10;\n } else if (parsedIndexes.millisecondDigits == 1) {\n val *= 100;\n }\n if (this.utc) {\n res.setUTCMilliseconds(val);\n } else {\n res.setMilliseconds(val);\n }\n }\n // Timestamp\n if (parsedIndexes.timestamp > -1) {\n res.setTime(parseInt(matches[parsedIndexes.timestamp]));\n }\n // Adjust time zone\n if (parsedIndexes.zone > -1) {\n var zone = matches[parsedIndexes.zone].replace(/:/, \"\");\n var match = $type.getValue(zone.match(/([+\\-]?)([0-9]{2})([0-9]{2})/));\n var dir = match[1];\n var hour = match[2];\n var minute = match[3];\n var offset = parseInt(hour) * 60 + parseInt(minute);\n // Adjust offset\n // Making it negative does not seem to make sense, but it's right\n // because of how JavaScript calculates GTM offsets\n if (dir == \"+\") {\n offset *= -1;\n }\n // Check the difference in offset\n var originalOffset = res.getTimezoneOffset();\n var diff = offset - originalOffset;\n if (diff != 0) {\n res.setMinutes(res.getMinutes() + diff);\n }\n }\n // ISO\n if (parsedIndexes.iso > -1) {\n if (matches[parsedIndexes.iso + 7] == \"Z\" || matches[parsedIndexes.iso + 7] == \"z\") {\n res = new Date();\n res.setUTCFullYear($type.toNumber(matches[parsedIndexes.iso + 0]));\n res.setUTCMonth($type.toNumber(matches[parsedIndexes.iso + 1]) - 1);\n res.setUTCDate($type.toNumber(matches[parsedIndexes.iso + 2]));\n res.setUTCHours($type.toNumber(matches[parsedIndexes.iso + 3]));\n res.setUTCMinutes($type.toNumber(matches[parsedIndexes.iso + 4]));\n res.setUTCSeconds($type.toNumber(matches[parsedIndexes.iso + 5]));\n res.setUTCMilliseconds($type.toNumber(matches[parsedIndexes.iso + 6]));\n } else {\n res = new Date($type.toNumber(matches[parsedIndexes.iso + 0]), $type.toNumber(matches[parsedIndexes.iso + 1]) - 1, $type.toNumber(matches[parsedIndexes.iso + 2]), $type.toNumber(matches[parsedIndexes.iso + 3]), $type.toNumber(matches[parsedIndexes.iso + 4]), $type.toNumber(matches[parsedIndexes.iso + 5]), $type.toNumber(matches[parsedIndexes.iso + 6]));\n }\n }\n } else {\n // Didn't match anything\n // Let's try dropping it into Date constructor and hope for the best\n res = new Date(source);\n }\n return res;\n };\n /**\r\n * Resolves month name (i.e. \"December\") into a month number (11).\r\n *\r\n * @param value Month name\r\n * @return Month number\r\n */\n DateFormatter.prototype.resolveMonth = function (value) {\n // Let's try English first\n var month = this._months.indexOf(value);\n if (month > -1) {\n return month;\n }\n // Try the translation\n if (this.language && !this.language.isDefault()) {\n month = this.language.translateAll(this._months).indexOf(value);\n if (month > -1) {\n return month;\n }\n }\n return 0;\n };\n /**\r\n * Resolves short month name (i.e. \"Dec\") into a month number.\r\n *\r\n * @param value Short month name\r\n * @return Month number\r\n */\n DateFormatter.prototype.resolveShortMonth = function (value) {\n // Let's try English first\n var month = this._monthsShort.indexOf(value);\n if (month > -1) {\n return month;\n }\n // Try the translation\n if (this.language && !this.language.isDefault()) {\n month = this.language.translateAll(this._monthsShort).indexOf(value);\n if (month > -1) {\n return month;\n }\n }\n return 0;\n };\n /**\r\n * Checks if passed in string represents AM/PM notation in many of its\r\n * versions.\r\n *\r\n * @param value Source string\r\n * @return Is it AM/PM?\r\n */\n DateFormatter.prototype.isAm = function (value) {\n var list = this.getStringList([\"AM\", \"A.M.\", \"A\"]);\n return list.indexOf(value.toUpperCase()) > -1;\n };\n /**\r\n * Invalidates related [[Sprite]] causing it to redraw.\r\n */\n DateFormatter.prototype.invalidateSprite = function () {\n if (this.sprite) {\n this.sprite.invalidate();\n }\n };\n /**\r\n * Translates list of strings.\r\n *\r\n * @param list Source strings\r\n * @return Translated strings\r\n */\n DateFormatter.prototype.getStringList = function (list) {\n var res = [];\n for (var i = 0; i < list.length; i++) {\n res.push($utils.escapeForRgex(list[i]));\n // translate?\n if (this.language && !this.language.isDefault()) {\n res.push($utils.escapeForRgex(this.language.translate(list[i])));\n }\n }\n return res;\n };\n Object.defineProperty(DateFormatter.prototype, \"dateFormat\", {\n /**\r\n * @return Date format\r\n */\n get: function get() {\n return this._dateFormat;\n },\n /**\r\n * Date format to use.\r\n *\r\n * If format is not supplied in-line in the string, this setting will be\r\n * used.\r\n *\r\n * @default \"yyyy-MM-dd\"\r\n * @param value Date format\r\n */\n set: function set(value) {\n this._dateFormat = value;\n this.invalidateSprite();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateFormatter.prototype, \"inputDateFormat\", {\n /**\r\n * @return Date format\r\n */\n get: function get() {\n return this._inputDateFormat;\n },\n /**\r\n * Date format to use when parsing dates.\r\n *\r\n * @default \"yyyy-MM-dd\"\r\n * @param value Date format\r\n */\n set: function set(value) {\n this._inputDateFormat = value;\n this.invalidateSprite();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateFormatter.prototype, \"utc\", {\n /**\r\n * @return Use UTC?\r\n */\n get: function get() {\n return this._utc;\n },\n /**\r\n * Should formatter use UTC functions?\r\n *\r\n * If UTC is used, all date/time values will be independent on client's\r\n * time zone.\r\n *\r\n * @param value Use UTC?\r\n */\n set: function set(value) {\n this._utc = value;\n this.invalidateSprite();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateFormatter.prototype, \"timezoneOffset\", {\n /**\r\n * @return Offset (minutes)\r\n */\n get: function get() {\n return this._timezoneOffset;\n },\n /**\r\n * If set, will format date/time in specific time zone.\r\n *\r\n * The value is a number of minutes from target time zone to UTC.\r\n *\r\n * E.g. `300` will recalculate Dates in \"GMT-5\" time zone.\r\n *\r\n * @param value Offset (minutes)\r\n */\n set: function set(value) {\n if (this._timezoneOffset != value) {\n this._timezoneOffset = value;\n this.invalidateSprite();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateFormatter.prototype, \"firstDayOfWeek\", {\n /**\r\n * @return First day of week\r\n */\n get: function get() {\n return this._firstDayOfWeek;\n },\n /**\r\n * Dirst day of the week:\r\n *\r\n * * 0 - Sunday\r\n * * 1 - Monday\r\n * * 2 - Tuesday\r\n *\r\n * Etc.\r\n *\r\n * @param value First day of week\r\n */\n set: function set(value) {\n this._firstDayOfWeek = value;\n this.invalidateSprite();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateFormatter.prototype, \"outputFormat\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Format\r\n */\n get: function get() {\n return this._outputFormat;\n },\n /**\r\n * Output format for the formatted date.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Format\r\n */\n set: function set(value) {\n this._outputFormat = value.toLowerCase();\n this.invalidateSprite();\n },\n enumerable: true,\n configurable: true\n });\n return DateFormatter;\n}(BaseObject);\nexport { DateFormatter };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"DateFormatter\"] = DateFormatter;","/**\r\n * This module contains ColorSet object definition\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObject } from \"../Base\";\nimport { Color, color } from \"./Color\";\nimport { registry } from \"../Registry\";\nimport * as $colors from \"./Colors\";\nimport * as $type from \"./Type\";\nimport * as $utils from \"./Utils\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Represents a set of colors. Can also generate colors according to set rules.\r\n *\r\n * @important\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/colors/} for color-related info\r\n */\nvar ColorSet = /** @class */function (_super) {\n tslib_1.__extends(ColorSet, _super);\n /**\r\n * Constructor\r\n */\n function ColorSet() {\n var _this = _super.call(this) || this;\n /**\r\n * Holds the list of the colors in this set. (preset or auto-generated)\r\n */\n _this._list = [];\n /**\r\n * Current step in a color generator's cycle.\r\n */\n _this._currentStep = 0;\n /**\r\n * If set to non-zero value, the ColorSet will start iterating colors from\r\n * that particular index, not the first color in the list.\r\n */\n _this._startIndex = 0;\n /**\r\n * Current pass in the color generator's cycle. Normally a generator would\r\n * cycle through all available hue range, then repeat it, alternating other\r\n * color properties, to generate distinctive colors.\r\n */\n _this._currentPass = 0;\n /**\r\n * A base color. If there are no colors pre-set in the color list, ColorSet\r\n * will use this color as a base when generating new ones, applying\r\n * `stepOptions` and `passOptions` to this base color.\r\n */\n _this.baseColor = new Color({\n r: 103,\n g: 183,\n b: 220\n });\n /**\r\n * Modifications to apply with each new generated color.\r\n */\n _this.stepOptions = {};\n /**\r\n * Modifications to apply on top of `stepOptions` for each \"pass\" of the\r\n * color generation.\r\n *\r\n * A \"pass\" is when ColorSet generates `minColors` number of colors.\r\n */\n _this.passOptions = {\n brighten: -0.2\n };\n /**\r\n * An index increment to use when iterating through color list.\r\n *\r\n * Default is 1, which means returning each and every color.\r\n *\r\n * Setting it to a bigger number will make ColorSet `next()` iterator skip\r\n * some colors.\r\n *\r\n * E.g. setting to 2, will return every second color in the list.\r\n *\r\n * This is useful, when the color list has colors that are too close each\r\n * other for contrast.\r\n *\r\n * However, having bigger number will mean that `next()` iterator will go\r\n * through the list quicker, and the generator will kick sooner.\r\n */\n _this.step = 1;\n /**\r\n * A number of colors to generate in one \"pass\".\r\n *\r\n * This setting can be automatically overridden, if ColorSet has a list of\r\n * pre-set colors. In such case ColorSet will generate exactly the same\r\n * number of colors with each pass as there were colors in original set.\r\n */\n _this.minColors = 20;\n /**\r\n * Do not let the \"lightness\" of generated color to fall below this\r\n * threshold.\r\n */\n _this.minLightness = 0.2;\n /**\r\n * Do not let the \"lightness\" of generated color to get above this threshold.\r\n */\n _this.maxLightness = 0.9;\n /**\r\n * Randomly shuffle generated colors.\r\n */\n _this.shuffle = false;\n /**\r\n * When colors are generated, based on `stepOptions`, each generated color\r\n * gets either lighter or darker.\r\n *\r\n * If this is set to `true`, color generator will switch to opposing spectrum\r\n * when reaching `minLightness` or `maxLightness`.\r\n *\r\n * E.g. if we start off with a red color, then gradually generate lighter\r\n * colors through rose shades, then switch back to dark red and gradually\r\n * increase the lightness of it until it reaches the starting red.\r\n *\r\n * If set to `false` it will stop there and cap lightness at whatever level\r\n * we hit `minLightness` or `maxLightness`, which may result in a number of\r\n * the same colors.\r\n */\n _this.wrap = true;\n /**\r\n * Re-use same colors in the pre-set list, when ColorSet runs out of colors,\r\n * rather than start generating new ones.\r\n */\n _this.reuse = false;\n /**\r\n * Saturation of colors. This will change saturation of all colors of color\r\n * set.\r\n *\r\n * It is recommended to set this in theme, as changing it at run time won't\r\n * make the items to redraw and change color.\r\n */\n _this.saturation = 1;\n _this.className = \"ColorSet\";\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(ColorSet.prototype, \"list\", {\n /**\r\n * Returns current list of colors.\r\n *\r\n * If there are none, a new list of colors is generated, based on various\r\n * ColorSet settings.\r\n *\r\n * @return Color list\r\n */\n get: function get() {\n if (!this._list) {\n this.generate(this.minColors);\n }\n return this._list;\n },\n /**\r\n * Sets a list of pre-defined colors to use for the iterator.\r\n *\r\n * @param value Color list\r\n */\n set: function set(value) {\n this._list = value;\n this.reset();\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Gets reusable color.\r\n *\r\n * @param index Index of color\r\n * @return Color\r\n */\n ColorSet.prototype.getReusableColor = function (index) {\n if (this._list.length == 0) {\n this.generate(1);\n return this.list[0];\n } else {\n var tmpstep = index - Math.floor(index / this._list.length) * this.list.length;\n return this.list[tmpstep];\n }\n };\n /**\r\n * Returns next color in the list using internal iterator counter.\r\n *\r\n * If `step` is set to something other than 1, it may return other color than\r\n * exact next one in the list.\r\n *\r\n * @return Color\r\n */\n ColorSet.prototype.next = function () {\n var color;\n if (this.list.length <= this._currentStep) {\n if (this.reuse) {\n color = this.getReusableColor(this._currentStep);\n } else {\n this.generate(this.minColors);\n color = this.list[this._currentStep];\n }\n } else {\n color = this.list[this._currentStep];\n }\n this._currentStep += this.step;\n return color.saturate(this.saturation);\n };\n /**\r\n * Returns a color at specific index in the list.\r\n *\r\n * @param i Index\r\n * @return Color\r\n */\n ColorSet.prototype.getIndex = function (i) {\n var color;\n if (this.list.length <= i) {\n if (this.reuse) {\n color = this.getReusableColor(i);\n } else {\n this.generate(this.minColors);\n color = this.getIndex(i);\n }\n } else {\n color = this.list[i];\n }\n return color.saturate(this.saturation);\n };\n /**\r\n * Resets internal iterator.\r\n *\r\n * Calling `next()` after this will return the very first color in the color\r\n * list, even if it was already returned before.\r\n */\n ColorSet.prototype.reset = function () {\n this._currentStep = this._startIndex;\n };\n Object.defineProperty(ColorSet.prototype, \"currentStep\", {\n /**\r\n * @return Step\r\n */\n get: function get() {\n return this._currentStep;\n },\n /**\r\n * Sets current color iteration. You can use this property to skip some\r\n * colors from iteration. E.g. setting it to `10` will skip first ten\r\n * colors.\r\n *\r\n * Please note that the number is zero-based.\r\n *\r\n * @param value Step\r\n */\n set: function set(value) {\n this._currentStep = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ColorSet.prototype, \"startIndex\", {\n /**\r\n * @return Index\r\n */\n get: function get() {\n return this._startIndex;\n },\n /**\r\n * If set to non-zero value, the ColorSet will start iterating colors from\r\n * that particular index, not the first color in the list.\r\n *\r\n * @default 0\r\n * @since 4.4.9\r\n * @param value Index\r\n */\n set: function set(value) {\n this._startIndex = value;\n this.reset();\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Generates colors based on the various ColorSet settings.\r\n *\r\n * @param count Number of colors to generate\r\n */\n ColorSet.prototype.generate = function (count) {\n // Init\n var curColor = this.currentColor;\n var hsl = $colors.rgbToHsl($type.getValue(curColor.rgb));\n var hueStep = $type.hasValue(this.stepOptions.hue) ? this.stepOptions.hue : 1 / count;\n var mods = {\n brighten: 0,\n lighten: 0,\n hue: hsl.h,\n lightness: hsl.l,\n saturation: hsl.s\n };\n // Generate list of hues, and shuffle them\n var hues = [];\n if (this.reuse) {\n for (var i = 0; i < count; i++) {\n hues.push($colors.rgbToHsl($type.getValue(this._list[i].rgb)).h);\n }\n } else {\n for (var i = 0; i < count; i++) {\n var h = hsl.h + hueStep * i;\n if (this.wrap && h > 1) {\n h -= 1;\n }\n hues.push(h);\n }\n }\n // Shuffle colors randomly\n if (this.shuffle) {\n hues.sort(function (a, b) {\n return Math.random() - 0.5;\n });\n }\n // Generate colors by rotating hue\n for (var i = 0; i < count; i++) {\n // Update hue\n if (this.reuse) {\n hsl = $colors.rgbToHsl($type.getValue(this._list[i].rgb));\n } else {\n hsl.h = hues.shift();\n }\n // Apply HSL mods\n this.applyStepOptions(hsl, mods, i + 1, this._currentPass);\n // Convert back to Color\n var c = color($colors.hslToRgb(hsl));\n // Apply regular color mods\n var brighten = (this.stepOptions.brighten || 0) * (i + 1) + (this.passOptions.brighten || 0) * this._currentPass;\n if (brighten != 0) {\n if (this.wrap) {\n brighten = $utils.fitNumberRelative(brighten, this.minLightness, this.maxLightness);\n } else {\n brighten = $utils.fitNumber(brighten, this.minLightness, this.maxLightness);\n }\n c = c.brighten(brighten);\n }\n var lighten = (this.stepOptions.lighten || 0) * (i + 1) + (this.passOptions.lighten || 0) * this._currentPass;\n if (lighten != 0) {\n if (this.wrap) {\n lighten = $utils.fitNumberRelative(lighten, this.minLightness, this.maxLightness);\n } else {\n lighten = $utils.fitNumber(lighten, this.minLightness, this.maxLightness);\n }\n c = c.lighten(lighten);\n }\n this._list.push(c);\n }\n this._currentPass++;\n };\n Object.defineProperty(ColorSet.prototype, \"currentColor\", {\n /**\r\n * Returns current last color. It's either the last color in the list of\r\n * colors, or `baseColor` if list is empty.\r\n *\r\n * @return Color\r\n */\n get: function get() {\n if (this._list.length == 0) {\n return this.baseColor.saturate(this.saturation);\n } else {\n return this._list[this._list.length - 1].saturate(this.saturation);\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Generates modifiers for color, based on what step and pass.\r\n *\r\n * @param hsl Curren HSL value of the color to modify\r\n * @param base The modifiers that were before modification to use as a base\r\n * @param step Current step\r\n * @param pass Current pass\r\n */\n ColorSet.prototype.applyStepOptions = function (hsl, base, step, pass) {\n // Process lightness\n hsl.l = base.lightness + (this.stepOptions.lightness || 0) * step + (this.passOptions.lightness || 0) * pass;\n if (this.wrap) {\n if (hsl.l > 1) {\n hsl.l = hsl.l - Math.floor(hsl.l);\n } else if (hsl.l < 0) {\n hsl.l = -(hsl.l - Math.floor(hsl.l));\n }\n hsl.l = $utils.fitNumberRelative(hsl.l, this.minLightness, this.maxLightness);\n } else {\n if (hsl.l > 1) {\n hsl.l = 1;\n } else if (hsl.l < 0) {\n hsl.l = 0;\n }\n hsl.l = $utils.fitNumber(hsl.l, this.minLightness, this.maxLightness);\n }\n };\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n ColorSet.prototype.processConfig = function (config) {\n if (config) {\n // Set up axis ranges\n if ($type.hasValue(config.list) && $type.isArray(config.list)) {\n for (var i = 0, len = config.list.length; i < len; i++) {\n if (!(config.list[i] instanceof Color)) {\n config.list[i] = color(config.list[i]);\n }\n }\n }\n }\n _super.prototype.processConfig.call(this, config);\n };\n return ColorSet;\n}(BaseObject);\nexport { ColorSet };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"ColorSet\"] = ColorSet;","/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Dictionary } from \"./Dictionary\";\nimport * as $type from \"./Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Represents object cache.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Better storage\r\n * @todo TTL logging\r\n * @todo Garbage collector\r\n */\nvar Cache = /** @class */function () {\n function Cache() {\n /**\r\n * Storage for cache items.\r\n */\n this._storage = new Dictionary();\n /**\r\n * Default TTL in milliseconds.\r\n */\n this.ttl = 1000;\n }\n /**\r\n * Caches or updates cached value, resets TTL.\r\n *\r\n * If `ttl` is set to zero, item will never expire.\r\n *\r\n * @param owner An id of the object that owns this cache\r\n * @param key Index key\r\n * @param value Value\r\n * @param ttl TTL of the cache to live in milliseconds\r\n */\n Cache.prototype.set = function (owner, key, value, ttl) {\n // Create if storage does not exist for this owner\n var ownerStorage = this._storage.insertKeyIfEmpty(owner, function () {\n return new Dictionary();\n });\n // Create cache item\n var item = {\n \"touched\": new Date().getTime(),\n \"ttl\": $type.isNumber(ttl) ? ttl : this.ttl,\n \"value\": value\n };\n // Set\n ownerStorage.setKey(key, item);\n };\n /**\r\n * Rerturns cached item, respecting TTL.\r\n *\r\n * @param owner An id of the object that owns this cache\r\n * @param key Index key\r\n * @param value Value to return if cache not available\r\n * @return Value, or `undefined` if not set\r\n */\n Cache.prototype.get = function (owner, key, value) {\n if (value === void 0) {\n value = undefined;\n }\n // \t\t || ypeof this._storage[owner][key] === \"undefined\" || this._storage[owner][key].expired === true) {\n if (this._storage.hasKey(owner)) {\n var ownerStorage = this._storage.getKey(owner);\n if (ownerStorage.hasKey(key)) {\n var cacheItem = ownerStorage.getKey(key);\n if (cacheItem.ttl && cacheItem.touched + cacheItem.ttl < new Date().getTime()) {\n cacheItem.expired = true;\n }\n if (cacheItem.expired) {\n ownerStorage.removeKey(key);\n return value;\n }\n return cacheItem.value;\n } else {\n return value;\n }\n } else {\n return value;\n }\n };\n /**\r\n * Clears cache for specific owner or everything.\r\n *\r\n * @param owner Owner to clear cache for\r\n */\n Cache.prototype.clear = function (owner) {\n if (owner) {\n this._storage.removeKey(owner);\n } else {\n this._storage.clear();\n }\n };\n return Cache;\n}();\nexport { Cache };\n/**\r\n * ============================================================================\r\n * GLOBAL INSTANCE\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A global instance of cache. Use this instance to cache any values.\r\n *\r\n * @ignore Exclude from docs\r\n */\nexport var cache = new Cache();","import React from 'react';\nimport PropTypes from 'prop-types';\n\nlet CheckWithLabel = ({checked, disabled = false, onClick, children}) => {\n var icon = checked ? 'check' : 'times'\n var textStyle = checked ? { color: '#3BAFDA', cursor: 'pointer', fontWeight: 'bold' } :\n disabled ? { color: '#e0e0e0', cursor: 'not-allowed' } : { color: '#999999', cursor: 'pointer' }\n return (\n <label onClick={disabled ? null : () => onClick(!checked) } style={textStyle}>\n <i className={`fa fa-${icon} fa-lg fa-fw`} aria-hidden=\"true\"></i>\n {children}\n </label>)\n}\n\n\nCheckWithLabel.propTypes = {\n checked: PropTypes.bool.isRequired,\n disabled: PropTypes.bool,\n onClick: PropTypes.func.isRequired,\n children: PropTypes.node\n};\n\nexport default CheckWithLabel\n","import React from 'react'\nimport ReactPopover from 'react-popover'\nimport classNames from 'classnames'\nimport StatelessPopover from './StatelessPopover'\n\n\nclass Popover extends React.Component {\n\n constructor(props){\n super(props);\n this.state = { isOpen: props.isOpen || false }\n this.open = this.open.bind(this)\n this.close = this.close.bind(this)\n }\n open () {\n this.setState({ isOpen: true })\n }\n close () {\n this.setState({ isOpen: false })\n }\n render () {\n return (\n <span><StatelessPopover {...this.props} isOpen={this.state.isOpen} onCloseClicked={this.close} onTargetClicked={this.open} onOuterAction={this.close}/></span>\n )\n }\n}\n\nexport default Popover\n\n","import { createAction } from 'redux-act';\n\n//const updateRequest = createAction('update requested');\n//const updateSuccess = createAction('update success');\n//const setOnlineStatus = createAction('set online status')\n\nexport default {\n //updateRequest,\n //updateSuccess,\n //setOnlineStatus\n}\n\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { confirmAlert } from \"react-confirm-alert\"; // Import\nimport { Btn } from \"sharedComponents\";\nimport ImagePoller from \"./ImagePoller\";\nimport {\n SummaryField\n} from 'auditComponents'\nimport { faTrash, faEdit, faTrashAlt } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nconst Attribute = ({ label, value }) => {\n return (\n <div>\n <strong>{label}</strong>: {_.isPresent(value) ? value : 'Not Answered' }\n </div>\n );\n};\n\nconst getRequiredFields = ({storageType}) => {\n const { labelingRequired, packagingRequired, checkSecurity } = storageType;\n\n var requiredFields = {\n storageAreaDescription: true,\n isBinLocked: !!checkSecurity,\n isAreaLocked: !!checkSecurity,\n contaminants: _.isPresent(storageType),\n }\n\n return requiredFields\n}\n\nlet ExternalBin = ({\n id,\n containerType,\n storageType = {},\n exteriorPhoto,\n interiorPhoto,\n isBinLocked,\n isAreaLocked,\n contaminantNames,\n name,\n onDelete,\n onEdit,\n onEditPhoto,\n storageAreaDescription,\n ...props\n}) => {\n let deleteConfirm;\n\n const { name: containerName } = containerType || {};\n const { name: storageName } = storageType;\n\n const requiredFields = getRequiredFields({storageType})\n\n const displayName = name || containerName || storageName || \"New Bin\";\n\n if (onDelete) {\n deleteConfirm = () => {\n confirmAlert({\n title: `Delete the ${displayName} container`,\n message: (\n <span>\n Are you sure to do this? <br />{\" \"}\n <span className=\"text-danger\">\n All photos and data for this bin will be lost\n </span>\n </span>\n ),\n buttons: [\n {\n label: \"Yes Delete\",\n onClick: () => onDelete(id),\n },\n {\n label: \"No\",\n },\n ],\n });\n };\n }\n var placeholderSrc =\n \"https://res.cloudinary.com/anenta-ltd/image/upload/v1598996270/waste_audit_examples/200x200_bin_placeholder.png\";\n\n return (\n <React.Fragment>\n <div className=\"bin\">\n <div className=\"bin__img-box\">\n <ImagePoller\n className=\"bin__img-box--img\"\n src={_.get(exteriorPhoto, \"otherVersions.thumb.url\")}\n placeholderSrc={placeholderSrc}\n onClick={onEditPhoto && exteriorPhoto ? () => { onEditPhoto(id, 'exteriorPhoto')} : null }\n />\n <ImagePoller\n className=\"bin__img-box--img\"\n src={_.get(interiorPhoto, \"otherVersions.thumb.url\")}\n placeholderSrc={placeholderSrc}\n onClick={onEditPhoto && interiorPhoto ? () => { onEditPhoto(id, 'interiorPhoto')} : null }\n />\n </div>\n <div className=\"bin__details\">\n <div className=\"bin__details--name\">{displayName}</div>\n {onEdit || deleteConfirm ? (\n <div className=\"bin__details--btns\">\n {onEdit ? (\n <Btn\n btn=\"info\"\n onClick={() => onEdit(id)}\n className=\"bin__details--edit\"\n >\n <FontAwesomeIcon icon={faEdit} />\n Edit\n </Btn>\n ) : null}\n\n {deleteConfirm ? (\n <Btn\n btn=\"danger\"\n onClick={deleteConfirm}\n className=\"bin__details--delete\"\n >\n <FontAwesomeIcon icon={faTrashAlt} />\n Delete\n </Btn>\n ) : null}\n </div>\n ) : null}\n { requiredFields.contaminants ? <div className=\"bin__details--contaminations\">\n <Attribute\n label={\"Contaminants\"}\n value={_.join(contaminantNames, \", \")}\n />\n </div> : null }\n { requiredFields.storageAreaDescription ? <div className=\"bin__details--storage-area-description\">\n <Attribute\n label={\"Storage Area Description\"}\n value={storageAreaDescription}\n />\n </div> : null }\n { requiredFields.isAreaLocked ? <div className=\"bin__details--contaminations\">\n <Attribute\n label={\"Is Area Locked?\"}\n value={isAreaLocked}\n />\n </div> : null }\n { requiredFields.isBinLocked ? <div className=\"bin__details--contaminations\">\n <Attribute\n label={\"Is Bin Locked?\"}\n value={isBinLocked}\n />\n </div> : null }\n </div>\n </div>\n <hr className=\"mt-4 mb-1\"></hr>\n </React.Fragment>\n );\n};\n\nExternalBin.propTypes = {\n onEdit: PropTypes.func,\n onDelete: PropTypes.func,\n id: PropTypes.string.isRequired,\n};\n\nexport default ExternalBin;\n\nexport {\n getRequiredFields,\n}\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { confirmAlert } from \"react-confirm-alert\"; // Import\nimport { Btn } from \"sharedComponents\";\nimport ImagePoller from \"./ImagePoller\";\nimport { faTrash, faEdit, faTrashAlt } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nconst Attribute = ({ label, value }) => {\n return (\n <div>\n <strong>{label}</strong>: {_.isPresent(value) ? value : 'Not Answered' }\n </div>\n );\n};\n\n\nconst getRequiredFields = ({storageType}) => {\n const { checkSecurity } = storageType;\n\n var requiredFields = {\n\n storageAreaDescription: true,\n isPubliclyAccessible: !!checkSecurity,\n isAreaLocked: !!checkSecurity,\n contaminants: _.isPresent(storageType),\n }\n\n return requiredFields\n}\n\n\n\nlet BulkContainment = ({\n id,\n storageType = {},\n exteriorPhoto,\n interiorPhoto,\n contaminantNames,\n storageAreaDescription,\n isAreaLocked,\n isPubliclyAccessible,\n bulkStorageAreaPhoto,\n name,\n onDelete,\n onEdit,\n onEditPhoto,\n ...props\n}) => {\n let deleteConfirm;\n\n const { name: storageName } = storageType || {};\n\n const displayName = name || storageName || \"New Bulk Internal Storage\";\n const requiredFields = getRequiredFields({storageType})\n\n if (onDelete) {\n deleteConfirm = () => {\n confirmAlert({\n title: `Delete the ${displayName} container`,\n message: (\n <span>\n Are you sure to do this? <br />{\" \"}\n <span className=\"text-danger\">\n All photos and data for this bulk storage containment will be lost\n </span>\n </span>\n ),\n buttons: [\n {\n label: \"Yes Delete\",\n onClick: () => onDelete(id),\n },\n {\n label: \"No\",\n },\n ],\n });\n };\n }\n\n var placeholderSrc =\n \"https://res.cloudinary.com/anenta-ltd/image/upload/v1598996270/waste_audit_examples/200x200_bin_placeholder.png\";\n\n return (\n <React.Fragment>\n <div className=\"bin\">\n <div className=\"bin__img-box\">\n <ImagePoller\n className=\"bin__img-box--img\"\n src={_.get(bulkStorageAreaPhoto, \"otherVersions.thumb.url\")}\n placeholderSrc={placeholderSrc}\n onClick={onEditPhoto && bulkStorageAreaPhoto ? () => { onEditPhoto(id, 'bulkStorageAreaPhoto')} : null }\n />\n </div>\n <div className=\"bin__details\">\n <div className=\"bin__details--name\">{displayName}</div>\n {onEdit || deleteConfirm ? (\n <div className=\"bin__details--btns\">\n {onEdit ? (\n <Btn\n btn=\"info\"\n onClick={() => onEdit(id)}\n className=\"bin__details--edit\"\n >\n <FontAwesomeIcon icon={faEdit} />\n Edit\n </Btn>\n ) : null}\n\n {deleteConfirm ? (\n <Btn\n btn=\"danger\"\n onClick={deleteConfirm}\n className=\"bin__details--delete\"\n >\n <FontAwesomeIcon icon={faTrashAlt} />\n Delete\n </Btn>\n ) : null}\n </div>\n ) : null}\n\n { requiredFields.contaminants ? <div className=\"bin__details--contaminations\">\n <Attribute\n label={\"Contaminants\"}\n value={_.join(contaminantNames, \", \")}\n />\n </div> : null }\n { requiredFields.storageAreaDescription ? <div className=\"bin__details--storage-area-description\">\n <Attribute\n label={\"Storage Area Description\"}\n value={storageAreaDescription}\n />\n </div> : null }\n { requiredFields.isAreaLocked ? <div className=\"bin__details--contaminations\">\n <Attribute\n label={\"Is Area Locked?\"}\n value={isAreaLocked}\n />\n </div> : null }\n { requiredFields.isPubliclyAccessible ? <div className=\"bin__details--contaminations\">\n <Attribute\n label={\"Is Accessible to Public?\"}\n value={isPubliclyAccessible}\n />\n </div> : null }\n </div>\n </div>\n <hr className=\"mt-4 mb-1\"></hr>\n </React.Fragment>\n );\n};\n\nBulkContainment.propTypes = {\n onEdit: PropTypes.func,\n onDelete: PropTypes.func,\n id: PropTypes.string.isRequired,\n};\n\nexport default BulkContainment;\n\nexport {\n getRequiredFields,\n}\n","import _ from 'lodashExtended'\nimport dotProp from 'dot-prop-immutable'\nimport { orderedSectionIds } from '../components/sections'\nimport { getBinsForRoom, getBinsForSection } from '../bins/selectors';\nimport { getBulkContainmentsForSection } from '../bulkContainments/selectors';\nimport { getRoomsForSection } from '../rooms/selectors';\nimport { getSectionData } from '../sections/selectors';\nimport { checkAllDataLoaded, getAllInternalContainerContaminants, getAllExternalContainerContaminants } from '../app/selectors'\nimport bulkWasteStorageContainment from '../components/sections/BulkWasteStorageContainment'\n//import externalWasteContainment from '../components/sections/ExternalWasteContainment'\nimport internalWasteContainment from '../components/sections/InternalWasteContainment'\n\nfunction getContaminantNames(contaminants, allContaminants) {\n if(contaminants === 'none') {\n return ['None Found']\n } else {\n return _(contaminants).map((value,id) => {\n return value ? id == 'other' ? (value === true ? null : value) : _.get(allContaminants, [id, 'name']) : null\n }).compact().value()\n }\n}\n\nconst getAuditDocument = (auditDocumentId, state) => {\n\n if(checkAllDataLoaded(state)) {\n let wasteAudit = dotProp.get(state.firestore, `data.waste_audits.${auditDocumentId}`)\n\n let sections = {}\n\n _.each(orderedSectionIds, (sectionId) => {\n\n var extraData = {}\n\n if(sectionId == internalWasteContainment.sectionId) {\n var allContaminants = getAllInternalContainerContaminants(state)\n\n extraData['rooms'] = getRoomsForSection(sectionId, state).map(room => {\n var bins = _.map(getBinsForRoom(room.id, state), (bin) => {\n var newBin = {...bin}\n if(newBin.contaminants) {\n newBin.contaminantNames = getContaminantNames(newBin.contaminants, allContaminants)\n }\n return newBin\n })\n return {\n ...room,\n bins\n }\n })\n } else if(sectionId == bulkWasteStorageContainment.sectionId) {\n\n var allContaminants = getAllExternalContainerContaminants(state)\n extraData['bins'] = _.map(getBinsForSection(sectionId, state), (bin) => {\n var newBin = {...bin}\n if(newBin.contaminants) {\n newBin.contaminantNames = getContaminantNames(newBin.contaminants, allContaminants)\n }\n return newBin\n })\n\n extraData['bulkContainments'] = _.map(getBulkContainmentsForSection(sectionId, state), (bulkContainment) => {\n var newBulkContainment = {...bulkContainment}\n if(newBulkContainment.contaminants) {\n newBulkContainment.contaminantNames = getContaminantNames(newBulkContainment.contaminants, allContaminants)\n }\n return newBulkContainment\n })\n }\n\n var sectionData = getSectionData(sectionId, state)\n\n sections[sectionId] = { ...extraData, ...sectionData }\n })\n\n return {\n ...wasteAudit,\n sections,\n }\n }\n\n return null\n\n}\n\nexport {\n getAuditDocument,\n getContaminantNames,\n}\n","import { Dialog, DialogContent, IconButton } from \"@mui/material\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { PDFObject } from \"react-pdfobject\";\n\nconst PdfModal = ({ open, onClose, pdfUrl }) => {\n return (\n <Dialog open={open} onClose={onClose} maxWidth=\"lg\" fullWidth>\n <IconButton\n aria-label=\"close\"\n onClick={onClose}\n sx={{\n position: \"absolute\",\n right: 8,\n top: 8,\n color: (theme) => theme.palette.grey[500],\n }}\n >\n <CloseIcon />\n </IconButton>\n <DialogContent>\n <PDFObject url={pdfUrl} height=\"700px\" />\n </DialogContent>\n </Dialog>\n );\n};\n\nexport default PdfModal;\n","import LinkIcon from \"@mui/icons-material/Link\";\nimport {\n Box, Card, CardContent, Chip, Collapse, IconButton, Link, Stack, TableCell, TableRow, Typography,\n} from \"@mui/material\";\nimport { Contact } from \"api/tickets\";\nimport { flatMap, map, startCase, mapKeys, camelCase } from \"lodash\";\nimport { useContext, useMemo, useState } from \"react\";\nimport { useHistory, useLocation } from \"react-router-dom\";\nimport BinDot from \"service/BinDot\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport { formatDate, useBinFetch } from \"sharedUtils\";\nimport AppContext from \"ticket/AppContext\";\nimport { getLocationId, useTicket } from \"ticket/selectors\";\nimport { AdhocCardTable } from \"./AdhocVisitRequestCard\";\nimport ReportRequestCardLayout from \"./ReportRequestCardLayout\"\nimport { TypoHaveInfo, TypoNeedInfo } from 'sharedComponents';\n\nconst StockDeliveryRequestCard = ({ request }) => {\n const { stakeholderContacts } = useTicket() || {};\n const { deliveryUnits, requestDeliveryCodes } = request;\n\n const locationId = getLocationId();\n\n const {\n currentTicketId,\n highlightedIds,\n setHighlightedIds,\n onOpenRemediation,\n setRequestedAtDate,\n setEventId,\n setRequestType\n } = useContext(AppContext);\n\n const { binTypes, binGroups } = useBinFetch(requestDeliveryCodes);\n\n const [open, setOpen] = useState(true);\n\n const isInCurrentPath =\n currentTicketId === String(request?.linkedTicketIds[0]);\n\n const isSelected = useMemo(() => {\n return (\n request?.replyIds.length > 0 &&\n request?.replyIds?.every((id) => highlightedIds?.includes(String(id)))\n );\n }, [highlightedIds]);\n\n const allStakeholders: Contact[] = flatMap(\n stakeholderContacts || [],\n (x) => x,\n );\n const inputtedBy = allStakeholders?.find(\n (x) => x.id === request?.inputtedById,\n );\n\n const deliveryRows = map(\n deliveryUnits,\n ({ serviceCode, quantity: deliveryQuantity, visitActionId }) => {\n const binType = binTypes[serviceCode];\n\n const binGroup = binGroups[binType?.binGroupId];\n\n return (\n <TableRow key={serviceCode}>\n <TableCell\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 1,\n }}\n >\n <BinDot\n binGroup={binGroup}\n tooltipName={true}\n tooltipPlace=\"top\"\n {...binType}\n />{\" \"}\n <Typography>{binType?.name}</Typography>\n </TableCell>\n <TableCell>{deliveryQuantity || 0}</TableCell>\n <TableCell\n sx={{\n color: \"#5F6369 !important\",\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n }}\n >\n {visitActionId ? <span>{startCase(visitActionId)}</span> : null}\n\n <span>{serviceCode}</span>\n </TableCell>\n </TableRow>\n );\n },\n );\n\n const title = (\n <span>\n Delivery of Stock Request\n {!request.date && !request.cancelledAt && (\n <TypoNeedInfo><strong> Awaiting Date </strong></TypoNeedInfo>\n )}\n </span>\n )\n\n const label = \"Deliver as specified\"\n\n const body = (\n <>\n\n\n {deliveryRows.length > 0 && (\n <AdhocCardTable\n rows={deliveryRows}\n headers={[\"\", \"Deliver Additional\", \"Code\"]}\n />\n )}\n\n {request?.date ? (\n <Typography sx={{ fontSize: \"13px\", color: \"#828B98\" }}>\n Visit confirmed for{\" \"}\n <span style={{ color: \"#19E53B\" }}>\n {formatDate(request?.date)}\n </span>\n <Typography\n component=\"span\"\n sx={{ fontSize: \"11px\", color: \"#828B98\" }}\n >\n {\" \"}\n on{\" \"}\n <span style={{ color: \"#BFBFBF\" }}>\n {formatDate(request?.confirmedAt)}\n </span>{\" \"}\n by{\" \"}\n <span style={{ color: \"#BFBFBF\" }}>\n {inputtedBy?.nameWithoutEmail || \"No Agent\"}\n </span>\n </Typography>\n </Typography>\n ) : request?.cancelledAt ? (\n <Typography sx={{ fontSize: \"13px\", color: \"#828B98\" }}>\n Request was cancelled on{\" \"}\n <span style={{ color: \"red\" }}>\n {formatDate(request?.cancelledAt)}\n </span>{\" \"}\n <Typography component=\"span\" sx={{ fontSize: \"11px\" }}>\n by{\" \"}\n <span style={{ color: \"#BFBFBF\" }}>\n {inputtedBy?.nameWithoutEmail || \"No Agent\"}\n </span>\n </Typography>\n </Typography>\n ) : (\n <Typography sx={{ fontSize: \"13px\", color: \"#828B98\" }}>\n Visit confirmed for{\" \"}\n <Chip\n label=\"Awaiting Date\"\n size=\"small\"\n sx={{\n background: \"#5F6369\",\n color: \"#BFBFBF\",\n fontSize: \"11px\",\n fontWeight: \"bold\",\n }}\n />\n </Typography>\n )\n }\n\n </>\n\n )\n\n return (\n <ReportRequestCardLayout title={title} links='' label={label} body={body} request={request} />\n );\n};\n\nexport default StockDeliveryRequestCard;\n","import React from \"react\";\nimport { Skeleton, Stack, Box, Typography } from \"@mui/material\";\n\nfunction FormSkeleton() {\n return (\n <Box>\n <Skeleton variant=\"text\" width=\"95%\" />\n <Box display=\"flex\" justifyContent=\"space-between\" mt={2}>\n <Box width=\"48%\">\n <Stack spacing={1}>\n <Skeleton variant=\"rectangular\" height={118} />\n <Skeleton variant=\"text\" width=\"80%\" />\n <Skeleton variant=\"text\" />\n </Stack>\n </Box>\n <Box width=\"48%\">\n <Stack spacing={1}>\n <Skeleton variant=\"rectangular\" height={118} />\n <Skeleton variant=\"text\" width=\"80%\" />\n <Skeleton variant=\"text\" />\n </Stack>\n </Box>\n </Box>\n </Box>\n );\n}\n\nexport default FormSkeleton;\n","import RemoveIcon from \"@mui/icons-material/Remove\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport React, { useState } from \"react\";\nimport \"./styles.scss\";\nimport Debugger from \"./Debugger\";\nimport { ModelErrors } from \"sharedComponents\";\nimport VisitActionSelector from \"./VisitActionSelector\";\nimport dotProp from \"dot-prop-immutable\";\nimport { sanatizeDotProp, useBinFetch } from \"sharedUtils\";\nimport ReactTooltip from \"react-tooltip\";\nimport BinDot from \"service/BinDot\";\nimport {\n Box,\n IconButton,\n Stack,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TableRow,\n Typography,\n} from \"@mui/material\";\nimport _ from \"lodash\";\nimport {\n BinTypeSelectorPopover,\n HeaderDetails,\n QuantitySelector,\n} from \"./common/QuantitySelector\";\nimport NotesSection from \"./common/NotesSection\";\nimport ActionFormLayout from './common/ActionFormLayout';\nimport { TextMuted } from 'sharedComponents';\n\n\n\nconst d = dotProp;\ninterface BinGroup {\n id: number;\n name: string;\n legendFillColor: string;\n legendBorderColor: string;\n}\n\ninterface VisitAction {\n id: string;\n name: string;\n type: string;\n}\n\ninterface BinType {\n id: number;\n name: string;\n groupName: string;\n binGroupId: number;\n possibleVisitActions: VisitAction[];\n}\n\ninterface Specification {\n serviceCode: string;\n quantity: number;\n notInContract: boolean;\n visitActionId: string;\n}\n\ninterface FormProps {\n specifications: Record<string, Specification>;\n notes: string;\n sourceContactId: number;\n requestedAt: string;\n}\n\ninterface ContextProps {\n serviceName: string;\n vendorLocationCode: string;\n visitPlanName: string;\n binGroups: Record<string, BinGroup>;\n binTypes: Record<string, BinType>;\n onContractServiceCodes: string[];\n}\n\ninterface RequestSpecChangeFormProps {\n form: FormProps;\n context: ContextProps;\n errors: any;\n onSetForm: (newForm: any) => void;\n}\n\nvar RequestSpecChangeForm: React.FC<RequestSpecChangeFormProps> = ({\n form,\n context,\n errors,\n onSetForm,\n}) => {\n const [anchorElem, setAnchorElem] = useState(null);\n const { specifications } = form;\n\n const { serviceName, onContractServiceCodes } = context;\n\n const { binTypes, binGroups } = useBinFetch();\n\n const availableSpecs = _.pick(\n binTypes,\n _.difference(onContractServiceCodes, _.map(specifications, \"serviceCode\"))\n );\n\n const updateQuantity = (quantity, serviceCode) => {\n const newSpecs = d.merge(specifications, sanatizeDotProp(serviceCode), {\n quantity,\n });\n specifications;\n onSetForm({ specifications: newSpecs });\n };\n\n const updateVisitActionId = (visitActionId, serviceCode) => {\n const newSpecs = d.merge(specifications, sanatizeDotProp(serviceCode), {\n visitActionId,\n });\n specifications;\n onSetForm({ specifications: newSpecs });\n };\n\n const updateSpecsHandler = (serviceCode) => {\n const newSpecs = d.merge(specifications, sanatizeDotProp(serviceCode), {\n serviceCode,\n notInContract: false,\n quantity: 0,\n visit_action_id: \"collect_and_replace\",\n });\n onSetForm({ specifications: newSpecs });\n };\n\n const removeSpec = (serviceCode) => {\n const newSpecs = _.omit(specifications, serviceCode);\n onSetForm({ specifications: newSpecs });\n };\n\n const specRows = _.map(\n specifications,\n ({ serviceCode, quantity, notInContract, visitActionId }) => {\n const {\n name = null,\n groupName = null,\n possibleVisitActions = null,\n binGroupId = null,\n } = binTypes[serviceCode] ?? {};\n\n const bg = binGroups[binGroupId];\n\n const notInContractTooltipId = notInContract\n ? `notInContractTooltip-${serviceCode}`\n : null;\n\n let notInContractTooltip;\n\n if (notInContractTooltipId) {\n notInContractTooltip = (\n <>\n <ReactTooltip\n id={notInContractTooltipId}\n type=\"dark\"\n place={\"left\"}\n effect=\"solid\"\n >\n <p>\n {name} - {groupName} is not under contract <br />\n for this account. ({serviceCode})\n </p>\n <p>\n You cannot request the vendor collects this unless <br />\n it is added to the vendor service on the account\n </p>\n </ReactTooltip>\n <i\n className={`text-danger fa fa-warning`}\n data-tip\n data-for={notInContractTooltipId}\n />\n </>\n );\n }\n\n return (\n <TableRow key={serviceCode}>\n <TableCell scope=\"row\">\n <BinDot\n binGroup={bg}\n tooltipName={true}\n showImg\n {...binTypes[serviceCode]}\n />\n </TableCell>\n <TableCell>{name}</TableCell>\n <TableCell>{serviceCode}</TableCell>\n <TableCell>\n {visitActionId != \"do_not_collect\" ? (\n <QuantitySelector\n quantity={quantity}\n onChange={(q) => updateQuantity(q, serviceCode)}\n />\n ) : (\n \"-\"\n )}\n </TableCell>\n <TableCell style={{ width: \"35%\" }}>\n <VisitActionSelector\n defaultValue=\"collect_and_replace\"\n visitActionId={visitActionId}\n possibleVisitActions={possibleVisitActions}\n disabledCollect={notInContract}\n onChange={(vaId) => updateVisitActionId(vaId, serviceCode)}\n />\n </TableCell>\n <TableCell sx={{ display: \"flex\", justifyContent: \"center\" }}>\n <IconButton\n sx={{\n m: 0,\n p: 0,\n }}\n >\n <RemoveIcon\n onClick={() => removeSpec(serviceCode)}\n sx={{\n fontSize: \"35px\",\n color: \"red\",\n }}\n />\n </IconButton>\n </TableCell>\n </TableRow>\n );\n }\n );\n\n\n\nconst title = (\n <span>\n <strong>Request Bin Spec Change</strong>   <TextMuted> {serviceName}</TextMuted>\n </span>\n )\n\n const body = (\n <>\n <HeaderDetails\n onClick={(e) => setAnchorElem(e.currentTarget)}\n noOptions={_.toArray(availableSpecs).length === 0}\n />\n <TableContainer\n sx={{\n marginY: 1,\n \"& .MuiTableCell-root\": {\n fontSize: \"11px\",\n fontWeight: \"inherit\",\n color: \"inherit\",\n },\n }}\n >\n <Table size=\"small\">\n <TableHead>\n <TableRow\n sx={{\n textWrap: \"nowrap\",\n fontWeight: \"bold\",\n color: \"#828B98\",\n border: \"1px solid transparent\",\n }}\n >\n <TableCell>Type</TableCell>\n <TableCell>Name</TableCell>\n <TableCell>Code</TableCell>\n <TableCell>Quantity</TableCell>\n <TableCell>Visit Action</TableCell>\n <TableCell></TableCell>\n </TableRow>\n </TableHead>\n <TableBody\n sx={{\n \"& .MuiTableCell-root\": {\n borderTop: \"1px solid #F1F1F5\",\n borderBottom: \"1px solid #F1F1F5\",\n padding: 0,\n },\n }}\n >\n {specRows}\n </TableBody>\n </Table>\n </TableContainer>\n\n <BinTypeSelectorPopover\n anchorEl={anchorElem}\n setAnchorEl={setAnchorElem}\n options={_.toArray(availableSpecs)}\n addBinHandler={updateSpecsHandler}\n />\n </>\n )\n\n return (\n <ActionFormLayout title={title} body={body} form={form} onSetForm={onSetForm} errors={errors}/>\n )\n\n // return (\n // <div>\n // <Stack\n // direction=\"row\"\n // justifyContent=\"flex-start\"\n // alignItems=\"center\"\n // spacing={3}\n // >\n // <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n // Request Bin Spec Change\n // </Typography>\n // <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n // / {serviceName}\n // </Typography>\n // </Stack>\n // <Box sx={{ my: 2 }}>\n // <HeaderDetails\n // onClick={(e) => setAnchorElem(e.currentTarget)}\n // noOptions={_.toArray(availableSpecs).length === 0}\n // />\n // <TableContainer\n // sx={{\n // marginY: 1,\n // \"& .MuiTableCell-root\": {\n // fontSize: \"11px\",\n // fontWeight: \"inherit\",\n // color: \"inherit\",\n // },\n // }}\n // >\n // <Table size=\"small\">\n // <TableHead>\n // <TableRow\n // sx={{\n // textWrap: \"nowrap\",\n // fontWeight: \"bold\",\n // color: \"#828B98\",\n // border: \"1px solid transparent\",\n // }}\n // >\n // <TableCell>Type</TableCell>\n // <TableCell>Name</TableCell>\n // <TableCell>Code</TableCell>\n // <TableCell>Quantity</TableCell>\n // <TableCell>Visit Action</TableCell>\n // <TableCell></TableCell>\n // </TableRow>\n // </TableHead>\n // <TableBody\n // sx={{\n // \"& .MuiTableCell-root\": {\n // borderTop: \"1px solid #F1F1F5\",\n // borderBottom: \"1px solid #F1F1F5\",\n // padding: 0,\n // },\n // }}\n // >\n // {specRows}\n // </TableBody>\n // </Table>\n // </TableContainer>\n // </Box>\n\n // <NotesSection\n // form={form}\n // onSetForm={onSetForm}\n // context={context}\n // contactPlaceholder=\"Who requested the change?\"\n // contactLabel=\"Requested By\"\n // dateLabel=\"Requested on\"\n // dateValue={form?.requestedAt}\n // onChange={(newValue) =>\n // onSetForm({\n // requestedAt: newValue.format(\"DD/MM/YYYY\"),\n // })\n // }\n // />\n // <BinTypeSelectorPopover\n // anchorEl={anchorElem}\n // setAnchorEl={setAnchorElem}\n // options={_.toArray(availableSpecs)}\n // addBinHandler={updateSpecsHandler}\n // />\n // <DebugButton specifications={specifications} />\n // <ModelErrors errors={errors} />\n // </div>\n // );\n};\n\nexport default RequestSpecChangeForm;\n","import { Box, Stack, Typography } from \"@mui/material\";\nimport { TextMuted } from \"sharedComponents\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport dayjs from \"dayjs\";\nimport _ from \"lodash\";\nimport React, { useState } from \"react\";\nimport \"react-infinite-calendar/styles.css\";\nimport { ModelErrors, ShowDate } from \"sharedComponents\";\nimport CollectionInstruction from \"../CollectionInstruction\";\nimport DeliveryInstruction from \"../DeliveryInstruction\";\nimport Debugger from \"./Debugger\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport \"./styles.scss\";\nimport ThreeColumnFlexBox from \"./common/ThreeColumnFlexBox\";\nimport NotesSection from \"./common/NotesSection\";\nimport ActionFormLayout from './common/ActionFormLayout';\n\ninterface FormProps {\n date: string;\n sourceContactId: number;\n notes: string;\n confirmedAt: string;\n}\n\ninterface ContextProps {\n serviceName: string;\n vendorLocationCode: string;\n visitPlanName: string;\n sourceIsUnknown: boolean;\n requestDeliveryUnits: any;\n requestCollectionUnits: any;\n requestCollectionCodes: string[];\n requestDeliveryCodes: string[];\n requestClearAll: boolean;\n nextVisits: any[];\n}\n\ninterface ConfirmAdhocVisitFormProps {\n form: FormProps;\n context: ContextProps;\n errors: any;\n onSetForm: (form: any) => void;\n}\n\nconst ConfirmAdhocVisitForm: React.FC<ConfirmAdhocVisitFormProps> = ({\n form,\n context,\n errors,\n onSetForm,\n}) => {\n const [open, setOpen] = useState(false);\n\n const {\n visitPlanName,\n serviceName,\n requestDeliveryUnits,\n requestDeliveryCodes,\n requestCollectionUnits,\n requestCollectionCodes,\n requestClearAll,\n nextVisits,\n } = context;\n\n const nextVisit = nextVisits[0];\n const visitDays = nextVisits?.map((visit) => {\n return { ...visit, date: dayjs(visit.date) };\n });\n\n\n const title = (\n <span>\n <strong>Confirm Adhoc Visit Date</strong>   <TextMuted> {serviceName}</TextMuted>\n </span>\n )\n\n\n const body = (\n <>\n<Box sx={{ color: \"#828B98\", marginTop: 1 }}>\n Next Planned Visit: <ShowDate date={nextVisit?.date} />\n {nextVisit?.status && ` (${_.capitalize(nextVisit.status)})`}\n </Box>\n <ThreeColumnFlexBox>\n <Box>\n <label>Confirmed Visit Date</label>\n <ServiceCalendarDatePicker\n visitDays={visitDays}\n // minDate={dayjs(new Date())}\n open={open}\n setOpen={setOpen}\n onChange={(newValue) =>\n onSetForm({ date: newValue.format(\"DD/MM/YYYY\") })\n }\n />\n </Box>\n </ThreeColumnFlexBox>\n <Box sx={{ mt: 1 }}>\n <CollectionInstruction\n {...context}\n collectionUnits={requestCollectionUnits}\n requestCollectionCodes={requestCollectionCodes}\n clearAll={requestClearAll}\n status={\"confirmation\"}\n />\n\n <DeliveryInstruction\n deliveryUnits={requestDeliveryUnits}\n requestDeliveryCodes={requestDeliveryCodes}\n status={\"confirmation\"}\n {...context}\n />\n </Box>\n </>\n )\n\n return (\n <ActionFormLayout title={title} body={body} form={form} onSetForm={onSetForm} errors={errors}/>\n )\n\n\n // return (\n // <div>\n // <Stack\n // direction=\"row\"\n // justifyContent=\"flex-start\"\n // alignItems=\"center\"\n // spacing={2}\n // >\n // {\" \"}\n // <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n // Confirm the Adhoc Visit Date\n // </Typography>\n // <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n // {serviceName}\n // </Typography>\n // </Stack>\n // <Box sx={{ color: \"#828B98\", marginTop: 1 }}>\n // Next Planned Visit: <ShowDate date={nextVisit?.date} />\n // {nextVisit?.status && ` (${_.capitalize(nextVisit.status)})`}\n // </Box>\n // <ThreeColumnFlexBox>\n // <Box>\n // <label>Confirmed Visit Date</label>\n // <ServiceCalendarDatePicker\n // visitDays={visitDays}\n // // minDate={dayjs(new Date())}\n // open={open}\n // setOpen={setOpen}\n // onChange={(newValue) =>\n // onSetForm({ date: newValue.format(\"DD/MM/YYYY\") })\n // }\n // />\n // </Box>\n // </ThreeColumnFlexBox>\n // <Box sx={{ mt: 1 }}>\n // <CollectionInstruction\n // {...context}\n // collectionUnits={requestCollectionUnits}\n // requestCollectionCodes={requestCollectionCodes}\n // clearAll={requestClearAll}\n // status={\"confirmation\"}\n // />\n\n // <DeliveryInstruction\n // deliveryUnits={requestDeliveryUnits}\n // requestDeliveryCodes={requestDeliveryCodes}\n // status={\"confirmation\"}\n // {...context}\n // />\n // </Box>\n // <NotesSection\n // form={form}\n // onSetForm={onSetForm}\n // context={context}\n // fart={'dfs'}\n // contactLabel=\"Confirmed by\"\n // contactPlaceholder=\"Who is confirming the visit?\"\n // dateLabel=\"Received on\"\n // dateValue={form?.confirmedAt}\n // onChange={(newValue) =>\n // onSetForm({\n // confirmedAt: newValue.format(\"DD/MM/YYYY\"),\n // })\n // }\n // />\n // <DebugButton {...form} />\n // <ModelErrors errors={errors} />\n // </div>\n // );\n};\n\nexport default ConfirmAdhocVisitForm;\n","import ConfirmNextRoutineVisitForm from \"./ConfirmNextRoutineVisitForm\";\nimport ConfirmFinalCollectionForm from \"./ConfirmFinalCollectionForm\";\nimport RequestVisitFrequencyChangeForm from \"./RequestVisitFrequencyChangeForm\";\nimport AcceptVisitFrequencyChangeForm from \"./AcceptVisitFrequencyChangeForm\";\nimport ConfirmVisitFrequencyChangeForm from \"./ConfirmVisitFrequencyChangeForm\";\nimport CancelVisitFrequencyChangeForm from \"./CancelVisitFrequencyChangeForm\";\nimport RequestTerminationForm from \"./RequestTerminationForm\";\nimport CancelTerminationForm from \"./CancelTerminationForm\";\nimport ConfirmTerminationForm from \"./ConfirmTerminationForm\";\nimport RequestResumptionForm from \"./RequestResumptionForm\";\nimport CancelResumptionForm from \"./CancelResumptionForm\";\nimport ConfirmResumptionForm from \"./ConfirmResumptionForm\";\nimport RequestReinstatementForm from \"./RequestReinstatementForm\";\nimport CancelReinstatementForm from \"./CancelReinstatementForm\";\nimport ConfirmReinstatementForm from \"./ConfirmReinstatementForm\";\nimport RequestSpecChangeForm from \"./RequestSpecChangeForm\";\nimport CancelSpecChangeForm from \"./CancelSpecChangeForm\";\nimport RequestSuspensionForm from \"./RequestSuspensionForm\";\nimport CancelSuspensionForm from \"./CancelSuspensionForm\";\nimport ConfirmSuspensionForm from \"./ConfirmSuspensionForm\";\nimport RequestAdhocVisitForm from \"./RequestAdhocVisitForm\";\nimport RequestStockDeliveryForm from \"./RequestStockDeliveryForm\";\nimport CancelStockDeliveryForm from \"./CancelStockDeliveryForm\";\nimport ConfirmStockDeliveryForm from \"./ConfirmStockDeliveryForm\";\nimport CancelAdhocVisitForm from \"./CancelAdhocVisitForm\";\nimport ConfirmAdhocVisitForm from \"./ConfirmAdhocVisitForm\";\nimport ClientFeedbackOnFailedVisitReportForm from \"./ClientFeedbackOnFailedVisitReportForm\";\nimport VendorFeedbackOnFailedVisitReportForm from \"./VendorFeedbackOnFailedVisitReportForm\";\nimport ConfirmVisitFailureReattemptDateForm from \"./ConfirmVisitFailureReattemptDateForm\";\nimport RequestReattemptDateForm from \"./RequestReattemptDateForm\";\nimport VendorReportVisitFailureResponseForm from \"./VendorReportVisitFailureResponseForm\";\nimport VendorReportVisitFailureTagForm from \"./VendorReportVisitFailureTagForm\";\nimport ClientReportVisitFailureForm from \"./ClientReportVisitFailureForm\";\nimport CancelRemediationForm from \"./CancelRemediationForm\";\nimport LogRemediationReplyForm from \"./LogRemediationReplyForm\";\nimport NoActionRequiredForm from \"./NoActionRequiredForm\";\n\nconst types = {\n ConfirmNextRoutineVisitForm,\n ConfirmFinalCollectionForm,\n RequestVisitFrequencyChangeForm,\n AcceptVisitFrequencyChangeForm,\n ConfirmVisitFrequencyChangeForm,\n CancelVisitFrequencyChangeForm,\n RequestTerminationForm,\n CancelTerminationForm,\n ConfirmTerminationForm,\n RequestResumptionForm,\n CancelResumptionForm,\n ConfirmResumptionForm,\n RequestReinstatementForm,\n CancelReinstatementForm,\n ConfirmReinstatementForm,\n RequestSuspensionForm,\n CancelSuspensionForm,\n ConfirmSuspensionForm,\n RequestAdhocVisitForm,\n RequestSpecChangeForm,\n CancelSpecChangeForm,\n RequestStockDeliveryForm,\n CancelStockDeliveryForm,\n ConfirmStockDeliveryForm,\n CancelAdhocVisitForm,\n ConfirmAdhocVisitForm,\n ClientFeedbackOnFailedVisitReportForm,\n VendorFeedbackOnFailedVisitReportForm,\n ConfirmVisitFailureReattemptDateForm,\n RequestReattemptDateForm,\n VendorReportVisitFailureResponseForm,\n VendorReportVisitFailureTagForm,\n ClientReportVisitFailureForm,\n CancelRemediationForm,\n LogRemediationReplyForm,\n NoActionRequiredForm,\n};\n\nexport default (type) => {\n const component = types[type];\n\n if (component) {\n return component;\n } else {\n throw (\n 'missing form component for \"' +\n type +\n '\", perhaps you forgot to add it to forms/index.js?'\n );\n }\n};\n","import React, { useState } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport classNames from \"classnames\";\nimport PhoneInput from 'react-phone-number-input/input-core'\nimport {\n isValidPhoneNumber as _isValidPhoneNumber,\n isPossiblePhoneNumber as _isPossiblePhoneNumber,\n parsePhoneNumber as _parsePhoneNumber\n} from 'react-phone-number-input/core'\nimport metadata from 'libphonenumber-metadata.gb-mobile.json'\n\n\nvar MobilePhoneInput = ({\n allErrors = {},\n value,\n onChange,\n subtext,\n placeholder,\n disabled = false,\n label,\n name,\n optional = false,\n className,\n}) => {\n let errors = _.uniq(allErrors[name] || []);\n let hasError = _.isPresent(errors);\n\n const [disabledState, setDisabledState] = useState(disabled);\n\n return (\n <div\n className={classNames(\"form-group\", \"string\", className, {\n optional: optional,\n \"form-group-invalid\": hasError,\n })}\n >\n {label ? (\n <div\n className={classNames({\n \"label-w-subtext\": subtext,\n })}\n >\n <label\n className={classNames(\"form-control-label\", \"text\", {\n optional: optional,\n })}\n >\n {label}\n </label>\n {subtext ? <div className=\"edit-btn-text\">{subtext}</div> : null}\n </div>\n ) : null}\n <div className=\"input-group mb-2\">\n <div className=\"input-group-prepend\">\n <div className=\"input-group-text\">+44</div>\n </div>\n <PhoneInput\n className={classNames(\"form-control\", \"string\", {\n optional: optional,\n \"is-invalid\": hasError,\n })}\n type=\"text\"\n country=\"GB\"\n metadata={metadata}\n international\n defaultValue={value}\n onChange={(value) => onChange(value, name)}\n disabled={disabledState}\n placeholder={placeholder}\n name={name}\n />\n </div>\n {_.map(errors, (error) => (\n <div\n key={error}\n style={{ display: \"block\" }}\n className=\"invalid-feedback\"\n >\n <strong>{error}</strong>\n </div>\n ))}\n </div>\n );\n};\n\nMobilePhoneInput.propTypes = {\n name: PropTypes.string.isRequired,\n label: PropTypes.node,\n subtext: PropTypes.node,\n};\n\nexport default MobilePhoneInput;\n\nfunction call(func, _arguments) {\n\tvar args = Array.prototype.slice.call(_arguments)\n\targs.push(metadata)\n\treturn func.apply(this, args)\n}\n\nexport function parsePhoneNumber() {\n\treturn call(_parsePhoneNumber, arguments)\n}\n\nexport function isValidPhoneNumber() {\n\treturn call(_isValidPhoneNumber, arguments)\n}\n\nexport function isPossiblePhoneNumber() {\n\treturn call(_isPossiblePhoneNumber, arguments)\n}\n\n\n\n\n\n\n\n","import React, { useState, useReducer } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { Btn } from \"sharedComponents\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n faPaperPlane,\n faCheck,\n faEnvelope,\n faMobileAlt,\n faTimes,\n} from \"@fortawesome/free-solid-svg-icons\";\nimport classNames from \"classnames\";\n\nimport {\n TextInput\n} from 'auditComponents'\n\nimport MobilePhoneInput, { parsePhoneNumber } from \"./MobilePhoneInput\";\nimport { getCurrentUser } from \"../app/selectors\";\nimport emailAddressCheck from \"email-addresses\";\nimport { switchDevice } from \"../app/operations\";\n\nconst getErrors = (method, email, phone) => {\n switch (method) {\n case \"email\":\n return emailAddressCheck.parseOneAddress(email)\n ? null\n : { email: [\"please enter a valid email address\"] };\n case \"phone\":\n let parsePhone = parsePhoneNumber(phone || \"\");\n return parsePhone &&\n parsePhone.isPossible() &&\n parsePhone.getType() === \"MOBILE\"\n ? null\n : { phone: [\"please enter a valid mobile phone number\"] };\n }\n};\n\nconst getMethodValue = (method, email, phone) => {\n switch (method) {\n case \"email\":\n return email;\n case \"phone\":\n return phone;\n }\n};\n\n\nvar SwitchDeviceModal = ({ onSubmit, closeModal, userEmail, parentPath }) => {\n const [method, setMethod] = useState(\"email\");\n const [allErrors, setErrors] = useState();\n const [email, setEmail] = useState(userEmail);\n const [phone, setPhone] = useState();\n const [summitted, setSubmited] = useState(false);\n\n const switchPath = `${window.location.pathname}#${parentPath}`;\n\n return (\n <div className=\"an-modal an-switch-modal\">\n <div className=\"an-modal__nav\">\n <span className=\"an-modal__nav--close\" onClick={closeModal}>\n <FontAwesomeIcon\n icon={faTimes}\n aria-hidden=\"true\"\n />\n </span>\n </div>\n {!summitted ? (\n <React.Fragment>\n <div className=\"an-modal__header text-left\">\n <div className=\"an-modal__header--title\">\n Open on another device\n </div>\n <div className=\"an-modal__header--sub-title\">\n Select the way you want to get the link to open this step on\n another device\n </div>\n </div>\n <div className=\"an-modal__body\">\n <div className=\"btn-group btn-group-toggle\">\n <label\n className={classNames(\"btn\", { active: method == \"phone\" })}\n onClick={() => setMethod(\"phone\")}\n >\n <FontAwesomeIcon icon={faMobileAlt} /> Mobile Phone\n </label>\n <label\n className={classNames(\"btn\", { active: method == \"email\" })}\n onClick={() => setMethod(\"email\")}\n >\n <FontAwesomeIcon icon={faEnvelope} /> Email\n </label>\n </div>\n {method == \"email\" ? (\n <TextInput\n name=\"email\"\n value={email}\n label={\"Email address\"}\n placeholder=\"Please enter an email address\"\n onChange={(v) => setEmail(v)}\n allErrors={allErrors}\n />\n ) : null}\n {method == \"phone\" ? (\n <MobilePhoneInput\n name=\"phone\"\n label={\"Mobile Phone\"}\n placeholder=\"Please enter a mobile phone number\"\n value={phone}\n onChange={(v) => setPhone(v)}\n allErrors={allErrors}\n />\n ) : null}\n </div>\n <div className=\"an-modal__footer\">\n <Btn\n onClick={() => {\n let errors = getErrors(method, email, phone);\n if (_.isBlank(errors)) {\n onSubmit(\n switchPath,\n method,\n getMethodValue(method, email, phone)\n );\n setSubmited(true);\n } else {\n setErrors(errors);\n }\n }}\n className=\"pull-right w-phone-100 btn-w-icon\"\n styles=\"primary\"\n >\n <FontAwesomeIcon icon={faPaperPlane} /> Send the Link\n </Btn>\n\n <Btn\n onClick={closeModal}\n className=\"pull-right w-phone-100\"\n styles=\"outline-primary\"\n >\n Cancel\n </Btn>\n </div>\n </React.Fragment>\n ) : (\n <React.Fragment>\n <div className=\"an-modal__body text-center\">\n <FontAwesomeIcon\n className=\"text-success\"\n icon={faCheck}\n size=\"4x\"\n />\n <p>{method == \"email\" ? \"Link\" : \"SMS\"} Sent!</p>\n <p>\n Link to this step sent to {getMethodValue(method, email, phone)}\n </p>\n </div>\n <div className=\"an-switch-modal__footer\">\n <Btn\n onClick={closeModal}\n className=\"w-phone-100 m-0\"\n styles=\"outline-primary\"\n >\n Close\n </Btn>\n </div>\n </React.Fragment>\n )}\n </div>\n );\n};\n\nSwitchDeviceModal.propTypes = {\n parentPath: PropTypes.string.isRequired,\n onSubmit: PropTypes.func.isRequired,\n};\n\nconst mapStateToProps = (state, {}) => {\n return {\n userEmail: getCurrentUser(state).email,\n };\n};\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onSubmit: (url, method, methodValue) => {\n dispatch(switchDevice(url, method, methodValue));\n },\n };\n};\n\nSwitchDeviceModal = connect(\n mapStateToProps,\n mapDispatchToProps\n)(SwitchDeviceModal);\n\nexport default SwitchDeviceModal;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { useRouteMatch, useHistory } from \"react-router-dom\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faExternalLinkAlt } from \"@fortawesome/free-solid-svg-icons\";\nimport { Btn } from \"sharedComponents\";\nimport SwitchDeviceModal from \"./SwitchDeviceModal\";\n\nimport { ModalLink } from \"auditComponents\" //temp fix\n//import { ModalLink } from 'react-router-modal'\n\nvar SwitchDeviceButton = ({}) => {\n const { url } = useRouteMatch();\n\n return (\n <ModalLink\n path={`${url}/switchDevice`}\n parentPath={url}\n linkClassName=\"switch-device\"\n component={SwitchDeviceModal}\n >\n <FontAwesomeIcon\n icon={faExternalLinkAlt}\n className=\"switch-device--icon\"\n />\n Switch device\n </ModalLink>\n );\n};\n\nSwitchDeviceButton.propTypes = {};\n\nexport default SwitchDeviceButton;\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","/**\r\n * [[AMElement]] represents any SVG element and related functionality.\r\n */\nimport * as $dom from \"../utils/DOM\";\nimport * as $object from \"../utils/Object\";\nimport * as $type from \"../utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A base class for all SVG elements. Provides low-level DOM functionality.\r\n *\r\n * All visual elements extend this class.\r\n */\nvar AMElement = /** @class */function () {\n /**\r\n * Constructor creates a new element or uses the one that was passed in.\r\n *\r\n * @param element Element reference node type\r\n */\n function AMElement(element) {\n /**\r\n * Indicates if the element was already disposed.\r\n */\n this._isDisposed = false;\n /**\r\n * Current X coordinate.\r\n */\n this._x = 0;\n /**\r\n * Current Y coordinate.\r\n */\n this._y = 0;\n /**\r\n * Current rotation.\r\n */\n this._rotation = 0;\n /**\r\n * Current scale.\r\n */\n this._scale = 1;\n if (typeof element === \"string\") {\n this.node = document.createElementNS($dom.SVGNS, element);\n } else {\n this.node = element;\n }\n }\n /**\r\n * Removes element's node from DOM.\r\n */\n AMElement.prototype.removeNode = function () {\n if (this.node) {\n if (this.node.parentNode) {\n this.node.parentNode.removeChild(this.node);\n }\n }\n };\n Object.defineProperty(AMElement.prototype, \"transformString\", {\n /**\r\n * Returns `transform` attribute of the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Transform attribute value\r\n */\n get: function get() {\n if (this.node) {\n return this._transformString;\n /*\r\n const value = this.node.getAttribute(\"transform\");\r\n if (value !== null) {\r\n return value;\r\n }*/\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Appply position, rotation and scale properties via elemen's `transform`\r\n * property\r\n *\r\n * @ignore Exclude from docs\r\n */\n AMElement.prototype.transform = function () {\n var transfromString = \"translate(\" + this._x + \",\" + this._y + \")\";\n if (this._scale != 1) {\n transfromString += (transfromString ? \" \" : \"\") + \"scale(\" + this._scale + \")\";\n }\n if (this._rotation != 0) {\n transfromString += (transfromString ? \" \" : \"\") + \"rotate(\" + this._rotation + \")\";\n }\n this._transformString = transfromString;\n this.node.setAttribute(\"transform\", transfromString);\n };\n /**\r\n * Returns bounding box of the element.\r\n *\r\n * ATTENTION: Bounding box calculations are extremely costly so should be\r\n * used sparingly and cached whenever possible.\r\n *\r\n * @return Bounding rectangle\r\n */\n AMElement.prototype.getBBox = function () {\n var bbox = {\n width: 0,\n height: 0,\n x: 0,\n y: 0\n };\n // FF would fail if getBBox() is called without node added to parent\n if (this.node && this.node.parentNode) {\n try {\n // again for ff. TODO: check if this doesn't slow down\n var svgbbox = this.node.getBBox();\n bbox.x = svgbbox.x;\n bbox.y = svgbbox.y;\n bbox.width = svgbbox.width;\n bbox.height = svgbbox.height;\n } catch (err) {}\n }\n return bbox;\n };\n /**\r\n * Moves the element to new coordinates.\r\n *\r\n * @param x Target X\r\n * @param y Target Y\r\n */\n AMElement.prototype.moveTo = function (point) {\n if (point) {\n var x = point.x;\n var y = point.y;\n if (this._x != x || this._y != y) {\n this._x = x;\n this._y = y;\n this.transform();\n }\n }\n };\n Object.defineProperty(AMElement.prototype, \"content\", {\n /**\r\n * Returns element's contents as SVG markup.\r\n *\r\n * @return Contents\r\n */\n get: function get() {\n // @todo Do not use `innerHTML` as this is not reliable and will not work on all browsers\n return this.node.innerHTML || \"\";\n },\n /**\r\n * Element's SVG contents.\r\n *\r\n * @param value Contents\r\n */\n set: function set(value) {\n // @todo Do not use `innerHTML` as this is not reliable and will not work on all browsers\n this.node.innerHTML = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AMElement.prototype, \"textContent\", {\n /**\r\n * @return Text contents\r\n */\n get: function get() {\n return this.node.textContent || \"\";\n },\n /**\r\n * Text contents of the SVG element.\r\n *\r\n * @param value Text contents\r\n */\n set: function set(value) {\n this.node.textContent = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AMElement.prototype, \"x\", {\n /**\r\n * @return X coordinate (px)\r\n */\n get: function get() {\n return this._x;\n },\n /**\r\n * Element's X position in pixels.\r\n *\r\n * @param value X coordinate (px)\r\n */\n set: function set(value) {\n if (this._x != value) {\n this._x = value;\n this.transform();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AMElement.prototype, \"y\", {\n /**\r\n * @return Y coordinate (px)\r\n */\n get: function get() {\n return this._y;\n },\n /**\r\n * Element's Y position in pixels.\r\n *\r\n * @param value Y coordinate (px)\r\n */\n set: function set(value) {\n if (this._y != value) {\n this._y = value;\n this.transform();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AMElement.prototype, \"rotation\", {\n /**\r\n * @return Rotation\r\n */\n get: function get() {\n return this._rotation;\n },\n /**\r\n * Element's rotation in degrees.\r\n *\r\n * @param value Rotation\r\n */\n set: function set(angle) {\n if (this._rotation != angle) {\n this._rotation = angle;\n this.transform();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AMElement.prototype, \"scale\", {\n /**\r\n * @return Scale\r\n */\n get: function get() {\n return this._scale;\n },\n /**\r\n * Element's scale where 1 is original size.\r\n *\r\n * Setting to 0.5 will reduce element's size by 50%, 2 will make element\r\n * twice as large, etc.\r\n *\r\n * @param value Scale\r\n */\n set: function set(value) {\n if (this._scale != value) {\n this._scale = value;\n this.transform();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Removes an attribute from element.\r\n *\r\n * @param attribute Attribute to remove\r\n */\n AMElement.prototype.removeAttr = function (attribute) {\n this.node.removeAttribute(attribute);\n };\n /**\r\n * Sets a set of attributes on a element.\r\n *\r\n * @param attributes An object with attribute names (key) and values\r\n * @return The same element\r\n */\n AMElement.prototype.attr = function (attributes) {\n var _this = this;\n $object.each(attributes, function (attributeName, attributeValue) {\n if (!$type.hasValue(attributeValue)) {\n _this.node.removeAttribute(attributeName);\n } else {\n // this is for performance testing\n //if(attributeValue == this.node.getAttribute(attributeName)){\n //\tconsole.log(attributeName, attributeValue)\n //}\n _this.node.setAttribute(attributeName, attributeValue);\n }\n });\n return this;\n };\n /**\r\n * Returns a value of a node attribute.\r\n *\r\n * @param attribute Attribute name\r\n * @return Attribute value\r\n */\n AMElement.prototype.getAttr = function (attribute) {\n return this.node.getAttribute(attribute);\n };\n /**\r\n * Sets a single attribute of the element's node using namesspace.\r\n *\r\n * @param ns Namespace\r\n * @param attribute Attribute\r\n * @param value Value\r\n * @return The same element\r\n */\n AMElement.prototype.attrNS = function (ns, attribute, value) {\n this.node.setAttributeNS(ns, attribute, value);\n return this;\n };\n /**\r\n * Returns a namespaced attribute value from node.\r\n *\r\n * @param ns Namespace\r\n * @param attribute Attribute\r\n * @return Attribute value\r\n */\n AMElement.prototype.getAttrNS = function (ns, attribute) {\n return this.node.getAttributeNS(ns, attribute);\n };\n /**\r\n * Removes `style` attribute from node.\r\n *\r\n * @param attribute Attribute to remove\r\n */\n AMElement.prototype.removeStyle = function (attribute) {\n // @todo Review because it's a bit messy and maybe not needed (pratically not used)\n delete this.node.style[attribute];\n };\n /**\r\n * Returns style attribute value.\r\n *\r\n * @param attribute Style attribute value\r\n * @return Attribute value\r\n */\n AMElement.prototype.getStyle = function (attribute) {\n // @todo Review because it's a bit messy and maybe not needed (pratically not used)\n return this.node.style[attribute];\n };\n /**\r\n * Adds style attributes to element's node.\r\n *\r\n * @param attributes Object containing attribute: value pairs\r\n * @return The same element\r\n */\n AMElement.prototype.addStyle = function (attributes) {\n var _this = this;\n // @todo Review because it's a bit messy and maybe not needed (pratically not used)\n $object.each(attributes, function (attributeName, attributeValue) {\n if (!$type.hasValue(attributeValue)) {\n _this.removeStyle(attributeName);\n } else {\n _this.node.style[attributeName] = attributeValue;\n }\n });\n return this;\n };\n /**\r\n * Adds a class to element.\r\n *\r\n * @param name Class name\r\n */\n AMElement.prototype.addClass = function (name) {\n $dom.addClass(this.node, name);\n };\n /**\r\n * Removes a class from element.\r\n *\r\n * @param name Class name\r\n */\n AMElement.prototype.removeClass = function (name) {\n $dom.removeClass(this.node, name);\n };\n /**\r\n * Sets a class name on element.\r\n *\r\n * @param name Class name\r\n */\n AMElement.prototype.setClass = function (name) {\n this.node.setAttribute(\"class\", name);\n };\n /**\r\n * Removes all element's child nodes, basically leaving it empty.\r\n */\n AMElement.prototype.removeChildNodes = function () {\n // remove all children\n while (this.node.childNodes.length > 0) {\n this.node.removeChild(this.node.firstChild);\n }\n };\n /**\r\n * Was this element already been disposed?\r\n *\r\n * @return Disposed?\r\n */\n AMElement.prototype.isDisposed = function () {\n return this._isDisposed;\n };\n /**\r\n * Disposes element.\r\n */\n AMElement.prototype.dispose = function () {\n this.removeNode();\n };\n return AMElement;\n}();\nexport { AMElement };","/**\r\n * Pattern module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObject } from \"../../Base\";\nimport { getGhostPaper } from \"../Paper\";\nimport { List, ListDisposer } from \"../../utils/List\";\nimport { Animation, AnimationDisposer } from \"../../utils/Animation\";\nimport { registry } from \"../../Registry\";\nimport { InterfaceColorSet } from \"../../utils/InterfaceColorSet\";\nimport * as $iter from \"../../utils/Iterator\";\nimport * as $object from \"../../utils/Object\";\nimport * as $type from \"../../utils/Type\";\n;\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Base class to define patterns.\r\n */\nvar Pattern = /** @class */function (_super) {\n tslib_1.__extends(Pattern, _super);\n //public propertyValues = new Dictionary<PatternProperties, any>();\n /**\r\n * Constructor\r\n */\n function Pattern() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * List of elements the pattern consists of.\r\n */\n _this._elements = new List();\n /**\r\n * A storage for Filter property/value pairs.\r\n *\r\n * @ignore Exclude from docs\r\n * @see {@link PatternProperties}\r\n */\n _this.properties = {};\n _this.className = \"Pattern\";\n // Set defaults\n _this.width = 10;\n _this.height = 10;\n _this.x = 0;\n _this.y = 0;\n _this.patternUnits = \"userSpaceOnUse\";\n var interfaceColors = new InterfaceColorSet();\n _this.backgroundFill = interfaceColors.getFor(\"background\");\n _this.backgroundOpacity = 0;\n _this.fillOpacity = 1;\n _this.fill = interfaceColors.getFor(\"alternativeBackground\");\n _this.stroke = interfaceColors.getFor(\"alternativeBackground\");\n _this.strokeOpacity = 1;\n _this.strokeWidth = 1;\n _this.shapeRendering = \"crispEdges\";\n _this.rotation = 0;\n // Create main group to store pattern elements inelements\n _this.element = _this.paper.addGroup(\"pattern\");\n _this.id = \"pattern-\" + registry.getUniqueId();\n _this.element.attr({\n \"id\": _this.id\n });\n _this._disposers.push(_this.element);\n // Make elements disposable\n _this._disposers.push(new ListDisposer(_this._elements));\n // Request again to trigger getter/setter code\n _this.patternUnits = _this.patternUnits;\n _this.width = _this.width;\n _this.height = _this.height;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the pattern.\r\n */\n Pattern.prototype.draw = function () {\n var _this = this;\n var patternElement = this.element;\n if (patternElement) {\n patternElement.removeChildNodes();\n var background = this.paper.add(\"rect\");\n background.attr({\n \"width\": this.width,\n \"height\": this.height,\n \"shape-rendering\": \"crispEdges\",\n \"fill\": this.backgroundFill.hex,\n \"fill-opacity\": this.backgroundOpacity,\n \"stroke\": this.backgroundFill.hex,\n \"stroke-opacity\": this.backgroundOpacity\n });\n patternElement.add(background);\n patternElement.attr({\n \"x\": this.x,\n \"y\": this.y,\n \"width\": this.width,\n \"height\": this.height,\n \"stroke\": this.stroke.hex,\n \"fill\": this.fill.hex,\n \"fill-opacity\": this.fillOpacity,\n \"stroke-opacity\": this.strokeOpacity,\n \"stroke-width\": this.strokeWidth,\n \"shape-rendering\": this.shapeRendering,\n \"patternUnits\": this.patternUnits\n });\n $iter.each(this._elements.iterator(), function (element) {\n element.rotation = _this.rotation;\n _this.element.add(element);\n });\n }\n };\n /**\r\n * Animate pattern properties.\r\n *\r\n * @see {@link Animation}\r\n * @param animationOptions Animation options\r\n * @param duration Duration (ms)\r\n * @param easing Easing function\r\n * @return Animation instance\r\n */\n Pattern.prototype.animate = function (animationOptions, duration, easing) {\n return new Animation(this, animationOptions, duration, easing).start();\n };\n /**\r\n * Adds an element to the pattern.\r\n *\r\n * @param element Element\r\n */\n Pattern.prototype.addElement = function (element) {\n this._elements.push(element);\n this._disposers.push(element);\n };\n /**\r\n * Remove an element from the pattern.\r\n *\r\n * @param element Element\r\n */\n Pattern.prototype.removeElement = function (element) {\n this._elements.removeValue(element);\n this.removeDispose(element);\n };\n Object.defineProperty(Pattern.prototype, \"elements\", {\n /**\r\n * Returns the list of SVG elements comprising the pattern.\r\n *\r\n * @return Pattern elements\r\n */\n get: function get() {\n return this._elements;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Pattern.prototype, \"fillOpacity\", {\n /**\r\n * @return Opacity (0-1)\r\n */\n get: function get() {\n return this.properties[\"fillOpacity\"];\n },\n /**\r\n * Pattern fill opacity. (0-1)\r\n *\r\n * @param value Opacity (0-1)\r\n */\n set: function set(value) {\n this.properties[\"fillOpacity\"] = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Pattern.prototype, \"fill\", {\n /**\r\n * @return Fill color\r\n */\n get: function get() {\n return this.properties[\"fill\"];\n },\n /**\r\n * Fill color of the pattern.\r\n *\r\n * @param value Fill color\r\n */\n set: function set(value) {\n this.properties[\"fill\"] = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Pattern.prototype, \"backgroundFill\", {\n /**\r\n * @return Background color\r\n */\n get: function get() {\n return this.properties[\"backgroundFill\"];\n },\n /**\r\n * Pattern background fill color.\r\n *\r\n * @param value Background color\r\n */\n set: function set(value) {\n this.properties[\"backgroundFill\"] = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Pattern.prototype, \"backgroundOpacity\", {\n /**\r\n * @return Background opacity (0-1)\r\n */\n get: function get() {\n return this.properties[\"backgroundOpacity\"];\n },\n /**\r\n * Pattern backgorund opacity. (0-1)\r\n *\r\n * @param value Background opacity (0-1)\r\n */\n set: function set(value) {\n this.properties[\"backgroundOpacity\"] = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Pattern.prototype, \"stroke\", {\n /**\r\n * @return Color\r\n */\n get: function get() {\n return this.properties[\"stroke\"];\n },\n /**\r\n * Pattern stroke (border) color.\r\n *\r\n * @param value Color\r\n */\n set: function set(value) {\n this.properties[\"stroke\"] = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Pattern.prototype, \"strokeOpacity\", {\n /**\r\n * @return Opacity (0-1)\r\n */\n get: function get() {\n return this.properties[\"strokeOpacity\"];\n },\n /**\r\n * Pattern stroke opacity. (0-1)\r\n *\r\n * @param value Opacity (0-1)\r\n */\n set: function set(value) {\n this.properties[\"strokeOpacity\"] = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Pattern.prototype, \"strokeWidth\", {\n /**\r\n * @return Stroke thickness (px)\r\n */\n get: function get() {\n return this.properties[\"strokeWidth\"];\n },\n /**\r\n * Pattern stroke thickness in pixels.\r\n *\r\n * @param value Stroke thickness (px)\r\n */\n set: function set(value) {\n this.properties[\"strokeWidth\"] = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Pattern.prototype, \"shapeRendering\", {\n get: function get() {\n return this.properties[\"shapeRendering\"];\n },\n /**\r\n * Shape rendering\r\n * @param value [description]\r\n */\n set: function set(value) {\n this.properties[\"shapeRendering\"] = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Pattern.prototype, \"rotation\", {\n /**\r\n * @return Rotation\r\n */\n get: function get() {\n return this.properties[\"rotation\"];\n },\n /**\r\n * Pattern rotation in degrees.\r\n *\r\n * @param value Rotation\r\n */\n set: function set(value) {\n this.properties[\"rotation\"] = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Pattern.prototype, \"patternUnits\", {\n /**\r\n * @return Units\r\n */\n get: function get() {\n return this.properties[\"patternUnits\"];\n },\n /**\r\n * Pattern measuring units.\r\n *\r\n * Available options: \"userSpaceOnUse\" | \"objectBoundingBox\".\r\n *\r\n * @param value Units\r\n */\n set: function set(value) {\n this.properties[\"patternUnits\"] = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Pattern.prototype, \"width\", {\n /**\r\n * @return Width (px)\r\n */\n get: function get() {\n return this.properties[\"width\"];\n },\n /**\r\n * Pattern width in pixels.\r\n *\r\n * @param value Width (px)\r\n */\n set: function set(value) {\n this.properties[\"width\"] = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Pattern.prototype, \"height\", {\n /**\r\n * @return Height (px)\r\n */\n get: function get() {\n return this.properties[\"height\"];\n },\n /**\r\n * Pattern height in pixels.\r\n *\r\n * @param value Height (px)\r\n */\n set: function set(value) {\n this.properties[\"height\"] = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Pattern.prototype, \"x\", {\n /**\r\n * @return X (px)\r\n */\n get: function get() {\n return this.properties[\"x\"];\n },\n /**\r\n * X position. (pixels)\r\n *\r\n * @param value X (px)\r\n */\n set: function set(value) {\n this.properties[\"x\"] = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Pattern.prototype, \"y\", {\n /**\r\n * @return Y (px)\r\n */\n get: function get() {\n return this.properties[\"y\"];\n },\n /**\r\n * Y position (px).\r\n *\r\n * @param value Y (px)\r\n */\n set: function set(value) {\n this.properties[\"y\"] = value;\n this.draw();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Pattern.prototype, \"paper\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Paper\r\n */\n get: function get() {\n if (this._paper) {\n return this._paper;\n }\n return getGhostPaper();\n },\n /**\r\n * [[Paper]] instance to draw pattern in.\r\n *\r\n * @ignore Exclude from docs\r\n * @param paper Paper\r\n */\n set: function set(paper) {\n if (this._paper != paper) {\n this._paper = paper;\n this.draw();\n paper.appendDef(this.element);\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies properties from another Pattern instance.\r\n *\r\n * @param source Source pattern\r\n */\n Pattern.prototype.copyFrom = function (source) {\n var _this = this;\n _super.prototype.copyFrom.call(this, source);\n $object.each(source.properties, function (key, value) {\n _this[key] = value;\n });\n };\n Object.defineProperty(Pattern.prototype, \"animations\", {\n /**\r\n * A list of animations currently running on the patter.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Animation list\r\n */\n get: function get() {\n if (!this._animations) {\n this._animations = [];\n this._disposers.push(new AnimationDisposer(this._animations));\n }\n return this._animations;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n Pattern.prototype.processConfig = function (config) {\n if (config) {\n // Set up series\n if ($type.hasValue(config.elements) && $type.isArray(config.elements)) {\n for (var i = 0, len = config.elements.length; i < len; i++) {\n var element = config.elements[i];\n if ($type.hasValue(element[\"type\"])) {\n var sprite = this.createEntryInstance(element);\n if (sprite instanceof BaseObject) {\n sprite.config = element;\n }\n this.addElement($type.hasValue(element[\"typeProperty\"]) ? sprite[element[\"typeProperty\"]] : sprite.element);\n }\n }\n }\n }\n _super.prototype.processConfig.call(this, config);\n };\n return Pattern;\n}(BaseObject);\nexport { Pattern };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Pattern\"] = Pattern;","/**\r\n * Polyline module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Sprite } from \"../Sprite\";\nimport { color } from \"../utils/Color\";\nimport { registry } from \"../Registry\";\nimport * as $path from \"../rendering/Path\";\nimport * as $math from \"../utils/Math\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws a polyline.\r\n *\r\n * @see {@link IPolylineEvents} for a list of available events\r\n * @see {@link IPolylineAdapters} for a list of available Adapters\r\n */\nvar Polyline = /** @class */function (_super) {\n tslib_1.__extends(Polyline, _super);\n /**\r\n * Constructor\r\n */\n function Polyline() {\n var _this = _super.call(this) || this;\n /**\r\n * [_distance description]\r\n *\r\n * @todo Description\r\n */\n _this._distance = 0;\n _this.className = \"Polyline\";\n _this.element = _this.paper.add(\"path\");\n _this.shapeRendering = \"auto\";\n _this.fill = color();\n _this.strokeOpacity = 1;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Creats and adds an SVG path for the arc.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Polyline.prototype.makePath = function () {\n this._distance = 0;\n var segments = this.segments;\n if (segments && segments.length > 0) {\n var path = \"\";\n for (var i = 0, len = segments.length; i < len; i++) {\n var points = segments[i];\n if (points.length > 0) {\n path += $path.moveTo(points[0]);\n for (var p = 1; p < points.length; p++) {\n var point = points[p];\n path += $path.lineTo(point);\n this._distance += $math.getDistance(points[p - 1], point);\n }\n }\n }\n this.path = path;\n }\n this._realSegments = segments;\n };\n Object.defineProperty(Polyline.prototype, \"segments\", {\n /**\r\n * @return Segments\r\n */\n get: function get() {\n return this.getPropertyValue(\"segments\");\n },\n /**\r\n * A list of segment coordinates for the multi-part line.\r\n *\r\n * @todo Example\r\n * @param segments Segments\r\n */\n set: function set(segments) {\n this.setPropertyValue(\"segments\", segments);\n this.makePath();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Polyline.prototype, \"distance\", {\n /**\r\n * [distance description]\r\n *\r\n * @todo Description\r\n * @return [description]\r\n */\n get: function get() {\n return this._distance;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Converts relative position along the line (0-1) into pixel coordinates.\r\n *\r\n * @param position Position (0-1)\r\n * @return Coordinates\r\n */\n Polyline.prototype.positionToPoint = function (position) {\n var deltaAngle = 0;\n if (position < 0) {\n position = Math.abs(position);\n deltaAngle = 180;\n }\n var segments = this._realSegments;\n if (segments) {\n var totalDistance = this.distance;\n var currentDistance = 0;\n var distanceAB = void 0;\n var positionA = 0;\n var positionB = 0;\n var pointA = void 0;\n var pointB = void 0;\n for (var s = 0; s < segments.length; s++) {\n var points = segments[s];\n if (points.length > 1) {\n for (var p = 1; p < points.length; p++) {\n pointA = points[p - 1];\n pointB = points[p];\n positionA = currentDistance / totalDistance;\n distanceAB = $math.getDistance(pointA, pointB);\n currentDistance += distanceAB;\n positionB = currentDistance / totalDistance;\n if (positionA <= position && positionB > position) {\n s = segments.length;\n break;\n }\n }\n } else if (points.length == 1) {\n pointA = points[0];\n pointB = points[0];\n positionA = 0;\n positionB = 1;\n }\n }\n if (pointA && pointB) {\n var positionAB = (position - positionA) / (positionB - positionA);\n var midPoint = $math.getMidPoint(pointA, pointB, positionAB);\n return {\n x: midPoint.x,\n y: midPoint.y,\n angle: deltaAngle + $math.getAngle(pointA, pointB)\n };\n }\n }\n return {\n x: 0,\n y: 0,\n angle: 0\n };\n };\n return Polyline;\n}(Sprite);\nexport { Polyline };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Polyline\"] = Polyline;","/**\r\n * JSON parser.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { DataParser } from \"./DataParser\";\nimport * as $object from \"../utils/Object\";\nimport * as $type from \"../utils/Type\";\n/**\r\n * A parser for JSON.\r\n *\r\n * @important\r\n */\nvar JSONParser = /** @class */function (_super) {\n tslib_1.__extends(JSONParser, _super);\n function JSONParser() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\r\n * Content-type suitable for JSON format.\r\n */\n _this.contentType = \"application/json\";\n /**\r\n * Parser options.\r\n *\r\n * @see {@link IJSONOptions} for description of each option\r\n */\n _this.options = {};\n return _this;\n }\n /**\r\n * Tests if the data is valid JSON.\r\n *\r\n * @param data Source data\r\n * @return Is it JSON?\r\n */\n JSONParser.isJSON = function (data) {\n try {\n // Try parsing JSON\n JSON.parse(data);\n // If we got to this point it means it's a valid JSON\n return true;\n } catch (e) {\n return false;\n }\n };\n /**\r\n * Parses and returns data.\r\n *\r\n * @param data Unparsed data\r\n * @return Parsed data\r\n */\n JSONParser.prototype.parse = function (data) {\n var _this = this;\n // Init return\n var res;\n // Try parsing\n try {\n if ($type.hasValue(JSON)) {\n res = JSON.parse(data);\n }\n } catch (e) {\n return undefined;\n }\n // Do we need to cast some fields to numbers or dates?\n var empty = $type.hasValue(this.options.emptyAs);\n var numbers = this.parsableNumbers;\n var dates = this.parsableDates;\n if (Array.isArray(res) && (numbers || dates || empty)) {\n var _loop_1 = function _loop_1(i, len) {\n var row = res[i];\n $object.each(row, function (key, value) {\n if (empty) {\n row[key] = _this.maybeToEmpty(row[key]);\n }\n if (numbers) {\n row[key] = _this.maybeToNumber(key, row[key]);\n }\n if (dates) {\n row[key] = _this.maybeToDate(key, row[key]);\n }\n });\n };\n // Iterate through the data and check if it needs to be converted\n for (var i = 0, len = res.length; i < len; i++) {\n _loop_1(i, len);\n }\n }\n // Convert to array\n //return Array.isArray(res) ? res : [res];\n return res;\n };\n return JSONParser;\n}(DataParser);\nexport { JSONParser };","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","/**\r\n * Functionality for drawing rectangles.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Sprite } from \"../Sprite\";\nimport { registry } from \"../Registry\";\nimport * as $math from \"../utils/Math\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Used to draw a rectangle.\r\n *\r\n * @see {@link IRectangleEvents} for a list of available events\r\n * @see {@link IRectangleAdapters} for a list of available Adapters\r\n */\nvar Rectangle = /** @class */function (_super) {\n tslib_1.__extends(Rectangle, _super);\n /**\r\n * Constructor\r\n * * Creates a `<rect>` element\r\n * * Creates default state\r\n */\n function Rectangle() {\n var _this = _super.call(this) || this;\n _this.className = \"Rectangle\";\n _this.element = _this.paper.add(\"rect\");\n //this.pixelPerfect = false;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Rectangle.prototype.draw = function () {\n _super.prototype.draw.call(this);\n var precision = this._positionPrecision;\n if (this.pixelPerfect) {\n precision = 0;\n }\n var w = $math.round(this.innerWidth, precision);\n var h = $math.round(this.innerHeight, precision);\n this.element.attr({\n \"width\": w,\n \"height\": h\n });\n };\n /**\r\n * Measures the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Rectangle.prototype.measureElement = function () {};\n Object.defineProperty(Rectangle.prototype, \"bbox\", {\n /**\r\n * Returns bounding box (square) for this element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n get: function get() {\n if (this.definedBBox) {\n return this.definedBBox;\n }\n if (this.isMeasured) {\n return {\n x: 0,\n y: 0,\n width: this.innerWidth,\n height: this.innerHeight\n };\n } else {\n return {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n }\n },\n enumerable: true,\n configurable: true\n });\n return Rectangle;\n}(Sprite);\nexport { Rectangle };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Rectangle\"] = Rectangle;","/**\r\n * Provides functionality used to creating and showing tooltips (balloons).\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../Container\";\nimport { registry } from \"../../core/Registry\";\nimport { PointedRectangle } from \"./PointedRectangle\";\nimport { Label } from \"../elements/Label\";\nimport { Animation } from \"../utils/Animation\";\nimport { color } from \"../utils/Color\";\nimport { DropShadowFilter } from \"../rendering/filters/DropShadowFilter\";\nimport * as $math from \"../utils/Math\";\nimport * as $ease from \"../utils/Ease\";\nimport * as $utils from \"../utils/Utils\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Tooltip displays text and/or multimedia information in a balloon over chart\r\n * area.\r\n * @see {@link ITooltipEvents} for a list of available events\r\n * @see {@link ITooltipAdapters} for a list of available Adapters\r\n */\nvar Tooltip = /** @class */function (_super) {\n tslib_1.__extends(Tooltip, _super);\n /**\r\n * Constructor\r\n */\n function Tooltip() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * Holds numeric boundary values. Calculated from the `boundingContainer`.\r\n * @ignore\r\n */\n _this._boundingRect = {\n x: -40000,\n y: -40000,\n width: 80000,\n height: 80000\n };\n /**\r\n * Coordinates tooltip's pointer (stem) should point to.\r\n */\n _this._pointTo = {\n x: 0,\n y: 0\n };\n /**\r\n * If set to `true` the pointer/stem of the Tooltip will not go outside\r\n * Tooltip's width or height depending on pointer's orientation.\r\n *\r\n * @default false\r\n */\n _this.fitPointerToBounds = false;\n /**\r\n * If `tooltipOrientation` is vertical, it can be drawn below or above point\r\n * We need to know this when solving overlapping.\r\n */\n _this._verticalOrientation = \"up\";\n _this.className = \"Tooltip\";\n _this.isMeasured = false;\n _this.getFillFromObject = true;\n _this.margin(5, 5, 5, 5);\n _this.defaultState.transitionDuration = 1;\n _this.hiddenState.transitionDuration = 1;\n // Create chrome/background\n var background = _this.background;\n background.interactionsEnabled = false;\n background.fillOpacity = 0.9;\n background.strokeWidth = 1;\n background.strokeOpacity = 1;\n background.stroke = color(\"#ffffff\");\n background.cornerRadius = 3;\n background.pointerLength = 6;\n background.pointerBaseWidth = 10;\n var dropShadow = new DropShadowFilter();\n dropShadow.dy = 1;\n dropShadow.dx = 1;\n dropShadow.opacity = 0.5;\n background.filters.push(dropShadow);\n _this.autoTextColor = true;\n // Create text element\n var label = _this.createChild(Label);\n label.shouldClone = false;\n _this.label = label;\n label.padding(7, 12, 4, 12);\n label.interactionsEnabled = false;\n label.horizontalCenter = \"middle\";\n label.fill = color(\"#ffffff\");\n _this._disposers.push(label);\n _this.label.events.on(\"sizechanged\", _this.drawBackground, _this);\n _this.label.zIndex = 1; // @todo remove this line when bg sorting is solved\n // Set defaults\n _this.pointerOrientation = \"vertical\";\n _this.animationDuration = 0;\n _this.animationEasing = $ease.cubicOut;\n // Set accessibility options\n _this.role = \"tooltip\";\n _this.visible = false;\n _this.opacity = 0;\n _this.x = 0;\n _this.y = 0;\n _this.events.on(\"visibilitychanged\", _this.handleVisibility, _this);\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n Tooltip.prototype.handleVisibility = function () {\n if (this.visible) {\n this.label.invalidate();\n }\n };\n Object.defineProperty(Tooltip.prototype, \"getStrokeFromObject\", {\n /**\r\n * Specifies if tooltip background should get stroke color from the sprite it is pointing to.\r\n *\r\n * @return {boolean}\r\n * @default false\r\n */\n get: function get() {\n return this.getPropertyValue(\"getStrokeFromObject\");\n },\n /**\r\n * Specifies if tooltip background should get stroke color from the sprite it is pointing to.\r\n *\r\n * @param value boolean\r\n */\n set: function set(value) {\n this.setPropertyValue(\"getStrokeFromObject\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Tooltip.prototype, \"autoTextColor\", {\n /**\r\n * @return {boolean}\r\n */\n get: function get() {\n return this.getPropertyValue(\"autoTextColor\");\n },\n /**\r\n * Specifies if text color should be chosen automatically for a better\r\n * readability.\r\n *\r\n * IMPORTANT: this feature is generally ignored, if `getFillFromObject = false`.\r\n *\r\n * If inheriting of `fill` color from object tooltip is displayed for is\r\n * disabled, this feature will not work. If you are explicitly setting a\r\n * color for tooltip background, you may set a color for its label as well\r\n * using `tooltip.label.fill` property.\r\n *\r\n *\r\n * @param value boolean\r\n */\n set: function set(value) {\n this.setPropertyValue(\"autoTextColor\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Tooltip.prototype, \"keepTargetHover\", {\n /**\r\n * @return Keep target hovered?\r\n */\n get: function get() {\n return this.getPropertyValue(\"keepTargetHover\");\n },\n /**\r\n * If this tooltip is displayed on hover on some other object, keep that\r\n * element hovered if hovering on the tooltip.\r\n *\r\n * @default false\r\n * @since 4.1.13\r\n * @param value Keep target hovered?\r\n */\n set: function set(value) {\n var _this = this;\n if (this.setPropertyValue(\"keepTargetHover\", value, true)) {\n if (value) {\n this.hoverable = true;\n this.background.interactionsEnabled = true;\n this._disposers.push(this.events.on(\"over\", function (ev) {\n if (_this.targetSprite && _this.targetSprite.hoverable) {\n _this.targetSprite.isHover = true;\n }\n }));\n this._disposers.push(this.events.on(\"out\", function (ev) {\n if (_this.targetSprite && _this.targetSprite.hoverable) {\n //this.hideTooltip();\n //this.targetSprite.handleOut();\n _this.targetSprite.isHover = false;\n }\n }));\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Tooltip.prototype, \"getFillFromObject\", {\n /**\r\n * Specifies if tooltip background should get fill color from the sprite it is pointing to.\r\n *\r\n * @return {boolean}\r\n * @default true\r\n */\n get: function get() {\n return this.getPropertyValue(\"getFillFromObject\");\n },\n /**\r\n * @param value boolean\r\n */\n set: function set(value) {\n this.setPropertyValue(\"getFillFromObject\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates and returns a background element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Background\r\n */\n Tooltip.prototype.createBackground = function () {\n return new PointedRectangle();\n };\n Object.defineProperty(Tooltip.prototype, \"pointerOrientation\", {\n /**\r\n * @return Orientation\r\n */\n get: function get() {\n return this.getPropertyValue(\"pointerOrientation\");\n },\n /**\r\n * Pointer orientation: `\"horizontal\"`, `\"vertical\"`, `\"up\"`, `\"down\"`,\r\n * `\"right\"`, or `\"left\"`.\r\n *\r\n * Options`\"horizontal\"` or `\"vertical\"` ar location-aware, meaning they\r\n * will change position of the Tooltip based on the target point's position\r\n * in relation to chart center.\r\n *\r\n * Options `\"up\"`, `\"down\"`, `\"right\"`, `\"left\"` ar static and will point\r\n * in the specified direction regardless of the position, even if that means\r\n * going out of chart/screen bounds.\r\n *\r\n * @default \"vertical\"\r\n * @param value Orientation\r\n */\n set: function set(value) {\n this.setPropertyValue(\"pointerOrientation\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Tooltip.prototype, \"animationDuration\", {\n /**\r\n * @return Orientation\r\n */\n get: function get() {\n return this.getPropertyValue(\"animationDuration\");\n },\n /**\r\n * Duration in milliseconds for the animation to take place when the tooltip\r\n * is moving from one place to another.\r\n *\r\n * @default 0\r\n * @param value number\r\n */\n set: function set(value) {\n this.setPropertyValue(\"animationDuration\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Tooltip.prototype, \"animationEasing\", {\n /**\r\n * @return {Function}\r\n */\n get: function get() {\n return this.getPropertyValue(\"animationEasing\");\n },\n /**\r\n * Tooltip animation (moving from one place to another) easing function.\r\n *\r\n * @default $ease.cubicOut\r\n * @param value (value: number) => number\r\n */\n set: function set(value) {\n this.setPropertyValue(\"animationEasing\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Tooltip.prototype, \"html\", {\n /**\r\n * @return HTML content\r\n */\n get: function get() {\n return this.label.html;\n },\n /**\r\n * HTML content for the Tooltip.\r\n *\r\n * Provided value will be used as is, without applying any further\r\n * formatting to it.\r\n *\r\n * @param value HTML content\r\n */\n set: function set(value) {\n if (this.label.html != value) {\n this.label.html = value;\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Tooltip.prototype, \"text\", {\n /**\r\n * @return SVG text\r\n */\n get: function get() {\n return this.label.text;\n },\n /**\r\n * SVG text content for the Tooltip.\r\n *\r\n * Text can have a number of formatting options supported by\r\n * [[TextFormatter]].\r\n *\r\n * @param value SVG text\r\n */\n set: function set(value) {\n if (this.label.text != value) {\n this.label.text = value;\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates the Tooltip.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Tooltip.prototype.draw = function () {\n _super.prototype.draw.call(this);\n var label = this.label;\n if (label.invalid) {\n label.validate();\n }\n var x = this._pointTo.x;\n var y = this._pointTo.y;\n var boundingRect = this._boundingRect;\n var textW = label.measuredWidth;\n var textH = label.measuredHeight;\n var pointerLength = this.background.pointerLength;\n var textX;\n var textY;\n // try to handle if text is wider than br\n if (textW > boundingRect.width) {\n // TODO maybe this isn't needed ?\n $utils.spritePointToDocument({\n x: boundingRect.x,\n y: boundingRect.y\n }, this.parent);\n var p1 = $utils.spritePointToDocument({\n x: boundingRect.x + boundingRect.width,\n y: boundingRect.y + boundingRect.height\n }, this.parent);\n var documentWidth = document.body.offsetWidth;\n // TODO maybe this isn't needed ?\n $utils.used(document.body.offsetHeight);\n if (p1.x > documentWidth / 2) {\n boundingRect.x = boundingRect.width - textW;\n } else {\n boundingRect.width = boundingRect.x + textW;\n }\n }\n var pointerOrientation = this.pointerOrientation;\n // horizontal\n if (pointerOrientation == \"horizontal\" || pointerOrientation == \"left\" || pointerOrientation == \"right\") {\n textY = -textH / 2;\n if (pointerOrientation == \"horizontal\") {\n if (x > boundingRect.x + boundingRect.width / 2) {\n textX = -textW / 2 - pointerLength;\n } else {\n textX = textW / 2 + pointerLength;\n }\n } else if (pointerOrientation == \"left\") {\n textX = textW / 2 + pointerLength;\n } else {\n textX = -textW / 2 - pointerLength;\n }\n }\n // vertical pointer\n else {\n textX = $math.fitToRange(0, boundingRect.x - x + textW / 2, boundingRect.x - x + boundingRect.width - textW / 2);\n if (pointerOrientation == \"vertical\") {\n if (y > boundingRect.y + textH + pointerLength) {\n textY = -textH - pointerLength;\n this._verticalOrientation = \"up\";\n } else {\n textY = pointerLength;\n this._verticalOrientation = \"down\";\n }\n } else if (pointerOrientation == \"down\") {\n textY = -textH - pointerLength;\n this._verticalOrientation = \"up\";\n } else {\n textY = pointerLength;\n this._verticalOrientation = \"down\";\n }\n }\n textY = $math.fitToRange(textY, boundingRect.y - y, boundingRect.y + boundingRect.height - textH - y);\n label.x = textX;\n label.y = textY;\n this.drawBackground();\n };\n /**\r\n * Overrides functionality from the superclass.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Tooltip.prototype.updateBackground = function () {\n this.group.addToBack(this.background.group);\n };\n /**\r\n * Draws Tooltip background (chrome, background and pointer/stem).\r\n *\r\n * @ignore Exclude from docs\r\n */\n Tooltip.prototype.drawBackground = function () {\n var label = this.label;\n var background = this.background;\n var textWidth = label.measuredWidth;\n var textHeight = label.measuredHeight;\n var boundingRect = this._boundingRect;\n var bgWidth = textWidth;\n var bgX = label.pixelX - textWidth / 2;\n var bgHeight = textHeight;\n var bgY = label.pixelY;\n var x = this._pointTo.x;\n var y = this._pointTo.y;\n var boundX1 = boundingRect.x - x;\n var boundX2 = boundX1 + boundingRect.width;\n var boundY1 = boundingRect.y - y;\n var boundY2 = boundY1 + boundingRect.height;\n background.x = bgX;\n background.y = bgY;\n background.width = bgWidth;\n background.height = bgHeight;\n if (this.fitPointerToBounds) {\n background.pointerX = $math.fitToRange(-background.x, boundX1 - background.x, boundX2 - background.x);\n background.pointerY = $math.fitToRange(-background.y, boundY1 - background.y, boundY2 - background.y);\n } else {\n background.pointerX = -background.x;\n background.pointerY = -background.y;\n }\n background.validate();\n };\n /**\r\n * Set nes tooltip's anchor point and moves whole tooltip.\r\n *\r\n * @param x X coordinate\r\n * @param y Y coordinate\r\n */\n Tooltip.prototype.pointTo = function (point, instantly) {\n if (this._pointTo.x != point.x || this._pointTo.y != point.y) {\n this._pointTo = point;\n this.invalidate();\n // this helps to avoid strange animation from nowhere on initial show or when balloon was hidden already\n if (!this.visible || instantly) {\n this.moveTo(this._pointTo);\n if (this._animation) {\n this._animation.kill();\n }\n } else {\n // helps to avoid flicker on top/left corner\n if (this.pixelX == 0 && this.pixelY == 0) {\n this.moveTo(this._pointTo);\n } else {\n if (this._animation) {\n this._animation.kill();\n }\n this._animation = new Animation(this, [{\n property: \"x\",\n to: point.x,\n from: this.pixelX\n }, {\n property: \"y\",\n to: point.y,\n from: this.pixelY\n }], this.animationDuration, this.animationEasing).start();\n }\n }\n }\n };\n /**\r\n * Sets numeric boundaries Tooltip needs to obey (so it does not go outside\r\n * specific area).\r\n *\r\n * @ignore Exclude from docs\r\n * @param rectangle Boundary rectangle\r\n */\n Tooltip.prototype.setBounds = function (rectangle) {\n var oldRect = this._boundingRect;\n if (oldRect.x != rectangle.x || oldRect.y != rectangle.y || oldRect.width != rectangle.width || oldRect.height != rectangle.height) {\n this._boundingRect = rectangle;\n this.invalidate();\n }\n };\n Object.defineProperty(Tooltip.prototype, \"boundingContainer\", {\n /**\r\n * Sets a [[Container]] instance to be used when calculating numeric\r\n * boundaries for the Tooltip.\r\n *\r\n * @ignore Exclude from docs\r\n * @param container Boundary container\r\n */\n set: function set(container) {\n this._boundingContainer = container;\n // TODO remove closures ?\n container.events.on(\"sizechanged\", this.updateBounds, this);\n container.events.on(\"positionchanged\", this.updateBounds, this);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Updates numeric boundaries for the Tooltip, based on the\r\n * `boundingCountrainer`.\r\n */\n Tooltip.prototype.updateBounds = function () {\n var boundingContainer = this._boundingContainer;\n // to global\n var rect = $utils.spriteRectToSvg({\n x: boundingContainer.pixelX,\n y: boundingContainer.pixelY,\n width: boundingContainer.maxWidth,\n height: boundingContainer.maxHeight\n }, boundingContainer);\n this.setBounds(rect);\n };\n Object.defineProperty(Tooltip.prototype, \"verticalOrientation\", {\n /**\r\n * If tooltipOrientation is vertical, it can be drawn below or above point.\r\n * We need to know this when solving overlapping.\r\n *\r\n * @ignore Exclude from docs\r\n * @return \"up\" | \"down\"\r\n */\n get: function get() {\n return this._verticalOrientation;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Tooltip.prototype, \"tooltip\", {\n /**\r\n * To avoid stackoverflow\r\n * @ignore\r\n */\n get: function get() {\n return undefined;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies properties and other attributes.\r\n *\r\n * @param source Source\r\n */\n Tooltip.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.label.copyFrom(source.label);\n if (source._boundingRect) {\n this._boundingRect = source._boundingRect;\n }\n };\n return Tooltip;\n}(Container);\nexport { Tooltip };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Tooltip\"] = Tooltip;","/**\r\n * CSV parser.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { DataParser } from \"./DataParser\";\nimport * as $type from \"../utils/Type\";\nimport * as $array from \"../utils/Array\";\n/**\r\n * Define possible separators.\r\n */\nvar separators = [\",\", \";\", \"\\t\"];\n/**\r\n * A parser for CSV format.\r\n *\r\n * @important\r\n */\nvar CSVParser = /** @class */function (_super) {\n tslib_1.__extends(CSVParser, _super);\n function CSVParser() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\r\n * Content-type suitable for CSV format.\r\n */\n _this.contentType = \"text/csv\";\n /**\r\n * Parser options.\r\n *\r\n * @see {@link ICSVOptions} for description of each option\r\n */\n _this.options = {\n delimiter: \"\",\n reverse: false,\n skipRows: 0,\n skipEmpty: true,\n useColumnNames: false\n };\n return _this;\n }\n /**\r\n * Tests if the format is CSV.\r\n *\r\n * @param data Source data\r\n * @return Is it CSV?\r\n */\n CSVParser.isCSV = function (data) {\n return CSVParser.getDelimiterFromData(data) ? true : false;\n };\n /**\r\n * Tries to determine a column separator.\r\n *\r\n * @param data Source data\r\n * @return Separator\r\n */\n CSVParser.getDelimiterFromData = function (data) {\n // We're going to take first few lines of the CSV with different\n // possible separators and check if it results in same number of columns.\n // If it does, we're going to assume it's a CSV\n var lines = data.split(\"\\n\");\n var len = lines.length;\n var separator;\n $array.each(separators, function (sep) {\n var columns = 0,\n lineColums = 0;\n // TODO replace with iterators\n for (var i = 0; i < len; ++i) {\n // Get number of columns in a line\n columns = lines[i].split(sep).length;\n if (columns > 1) {\n // More than one column - possible candidate\n if (lineColums === 0) {\n // First line\n lineColums = columns;\n } else if (columns != lineColums) {\n // Incorrect number of columns, give up on this separator\n lineColums = 0;\n break;\n }\n } else {\n // Not this separator\n // Not point in continuing\n lineColums = 0;\n break;\n }\n }\n // Check if we have a winner\n if (lineColums) {\n separator = sep;\n }\n });\n return separator;\n };\n /**\r\n * Parses and returns data.\r\n *\r\n * @param data Unparsed data\r\n * @return Parsed data\r\n */\n CSVParser.prototype.parse = function (csv) {\n // Check if we have delimiter set\n if (!this.options.delimiter) {\n this.options.delimiter = CSVParser.getDelimiterFromData(csv);\n }\n // Get CSV data as array\n var data = this.CSVToArray(csv, this.options.delimiter);\n // Do we need to cast some fields to numbers?\n var empty = $type.hasValue(this.options.emptyAs);\n var numbers = this.parsableNumbers;\n var dates = this.parsableDates;\n // Init resuling array\n var res = [],\n cols = [],\n col,\n i;\n // Skip rows\n for (i = 0; i < this.options.skipRows; i++) {\n data.shift();\n }\n // First row holds column names?\n if (this.options.useColumnNames) {\n cols = data.shift();\n // Normalize column names\n for (var x = 0; x < cols.length; x++) {\n // trim\n col = $type.hasValue(cols[x]) ? cols[x].replace(/^\\s+|\\s+$/gm, \"\") : \"\";\n // Check for empty\n if (\"\" === col) {\n col = \"col\" + x;\n }\n cols[x] = col;\n }\n }\n // Iterate through the result set\n var row;\n while (true) {\n row = this.options.reverse ? data.pop() : data.shift();\n if (!row) {\n break;\n }\n if (this.options.skipEmpty && row.length === 1 && row[0] === \"\") {\n continue;\n }\n var dataPoint = {};\n for (i = 0; i < row.length; i++) {\n col = undefined === cols[i] ? \"col\" + i : cols[i];\n dataPoint[col] = row[i] === \"\" ? this.options.emptyAs : row[i];\n // Convert\n if (empty) {\n dataPoint[col] = this.maybeToEmpty(dataPoint[col]);\n }\n if (numbers) {\n dataPoint[col] = this.maybeToNumber(col, dataPoint[col]);\n }\n if (dates) {\n dataPoint[col] = this.maybeToDate(col, dataPoint[col]);\n }\n }\n res.push(dataPoint);\n }\n return res;\n };\n /**\r\n * Converts CSV into array.\r\n *\r\n * The functionality of this function is taken from here:\r\n * http://www.bennadel.com/blog/1504-ask-ben-parsing-csv-strings-with-javascript-exec-regular-expression-command.htm\r\n *\r\n * @param data Source data\r\n * @param delimiter Column delimiter\r\n * @return Parsed array\r\n */\n CSVParser.prototype.CSVToArray = function (data, delimiter) {\n // Check to see if the delimiter is defined. If not,\n // then default to comma.\n delimiter = delimiter || ',';\n // Create a regular expression to parse the CSV values.\n var objPattern = new RegExp(\n // Delimiters.\n \"(\\\\\" + delimiter + \"|\\\\r?\\\\n|\\\\r|^)\" +\n // Quoted fields.\n \"(?:\\\"([^\\\"]*(?:\\\"\\\"[^\\\"]*)*)\\\"|\" +\n // Standard fields.\n \"([^\\\"\\\\\" + delimiter + \"\\\\r\\\\n]*))\", \"gi\");\n // Create an array to hold our data. Give the array\n // a default empty first row.\n var arrData = [[]];\n // Create an array to hold our individual pattern\n // matching groups.\n var arrMatches = null;\n // Keep looping over the regular expression matches\n // until we can no longer find a match.\n while (true) {\n arrMatches = objPattern.exec(data);\n if (!arrMatches) {\n break;\n }\n // Get the delimiter that was found.\n var strMatchedDelimiter = arrMatches[1];\n // Check to see if the given delimiter has a length\n // (is not the start of string) and if it matches\n // field delimiter. If id does not, then we know\n // that this delimiter is a row delimiter.\n if (strMatchedDelimiter.length && strMatchedDelimiter !== delimiter) {\n // Since we have reached a new row of data,\n // add an empty row to our data array.\n arrData.push([]);\n }\n // Now that we have our delimiter out of the way,\n // let's check to see which kind of value we\n // captured (quoted or unquoted).\n var strMatchedValue = void 0;\n if (arrMatches[2]) {\n // We found a quoted value. When we capture\n // this value, unescape any double quotes.\n strMatchedValue = arrMatches[2].replace(new RegExp(\"\\\"\\\"\", \"g\"), \"\\\"\");\n } else {\n // We found a non-quoted value.\n strMatchedValue = arrMatches[3];\n }\n // Now that we have our value string, let's add\n // it to the data array.\n arrData[arrData.length - 1].push(strMatchedValue);\n }\n // Return the parsed data.\n return arrData;\n };\n return CSVParser;\n}(DataParser);\nexport { CSVParser };","import React from \"react\";\n\nimport { Btn } from \"sharedComponents\";\n\nconst AddContainerBtn = ({text, onClick}) => {\n return (\n <div className=\"text-center\">\n <Btn\n onClick={onClick}\n className=\"w-phone-100\"\n styles=\"outline-primary\"\n >\n {text}\n </Btn>\n </div>\n );\n};\n\nexport default AddContainerBtn;\n","import { push } from 'connected-react-router';\nimport _ from 'lodashExtended';\nimport submitToServer from 'submitToServer';\n\nimport { orderedSectionIds } from '../components/sections';\nimport { submitSection } from '../sections/operations';\n\nconst goToNextSectionPath =\n (sectionId) =>\n (dispatch, getState, { getFirebase, getFirestore }) => {\n const state = getState();\n var nextSectionId;\n\n const index = _.indexOf(orderedSectionIds, sectionId);\n\n if (index != -1) {\n nextSectionId = orderedSectionIds[index + 1];\n }\n\n if (nextSectionId) {\n dispatch(push(`/section/${nextSectionId}`));\n } else {\n dispatch(push(\"/\"));\n }\n };\n\nconst goToSummaryPage = () => (dispatch, getState) => {\n _(orderedSectionIds).each((sectionId) =>\n dispatch(submitSection(sectionId, false))\n );\n dispatch(push(\"/submitSummary\"));\n};\n\nconst submitAudit =\n (successPath) =>\n (dispatch, getState, { getFirebase, getFirestore }) => {\n const state = getState();\n\n const pawaDataSlice = state.firestore.data;\n\n // Merge in the latest binGroup data from the props.json\n const binGroupDictionary = state.app.binGroups;\n const binGroupSurveys = Object.fromEntries(\n Object.entries(pawaDataSlice.binGroupSurveys).map(\n ([binGroupId, binGroup]) => [\n binGroupId,\n {\n ...binGroup,\n ...binGroupDictionary[binGroupId],\n },\n ]\n )\n );\n const submitPath = state.app.submitPath;\n\n submitToServer(\n submitPath,\n {\n ...pawaDataSlice,\n binGroupSurveys,\n },\n (data, v) => {\n dispatch(push(successPath));\n },\n (data, status) => {},\n { method: \"PUT\" }\n );\n\n console.log(\"submit\");\n };\n\nconst updateSubcollection =\n (documentId, args, subcollection) =>\n (dispatch, getState, { getFirebase, getFirestore }) => {\n const state = getState();\n const firestore = getFirestore();\n\n if (args.storageTypeId) {\n args.storageType = getStorageType(args.storageTypeId, state);\n args.containerType = null;\n args.containerTypeId = null;\n }\n\n if (args.containerTypeId) {\n args.containerType = getInternalContainerType(\n args.containerTypeId,\n state\n );\n }\n\n firestore.set(\n {\n collection: \"pre_acceptance_waste_audits\",\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: subcollection, doc: documentId }],\n },\n args,\n { merge: true }\n );\n };\n\nexport {\n goToNextSectionPath,\n submitAudit,\n goToSummaryPage,\n updateSubcollection,\n};\n","import Tooltip, { TooltipProps, tooltipClasses } from \"@mui/material/Tooltip\";\nimport { styled } from \"@mui/material/styles\";\n\n// Creating a custom Tooltip component using the styled utility\nconst DarkTooltip = styled(({ className, ...props }: TooltipProps) => (\n <Tooltip {...props} classes={{ popper: className }} />\n))(({ theme }) => ({\n [`& .${tooltipClasses.tooltip}`]: {\n backgroundColor: theme.palette.common.black,\n },\n [`& .${tooltipClasses.arrow}`]: {\n color: theme.palette.common.black,\n },\n}));\n\nexport default DarkTooltip;\n","import { alpha, Button, styled } from \"@mui/material\";\nimport { useGetLocationServiceVendorsQuery } from \"api/services\";\nimport _ from \"lodash\";\nimport { NestedDropdown } from \"mui-nested-menu\";\nimport { useMemo } from \"react\";\nimport { getLocationId, useTicket } from \"ticket/selectors\";\n\nconst ACTION_COLOR = \"#4FC1E9\";\n\nexport const CustomOutlinedButton = styled(Button)(({}) => ({\n border: \"1px solid\",\n borderColor: ACTION_COLOR,\n color: ACTION_COLOR,\n fontSize: \"12px\",\n \"&:hover\": {\n borderColor: ACTION_COLOR,\n backgroundColor: alpha(ACTION_COLOR, 0.1),\n color: ACTION_COLOR,\n },\n}));\n\nconst ActionMenuButton = ({\n serviceActions,\n onClickHandler,\n icon,\n isFooterMenu = false,\n}) => {\n const ticket = useTicket();\n const locationId = getLocationId();\n const vendorId = ticket?.vendor?.id;\n const { data: locationServiceVendors } =\n useGetLocationServiceVendorsQuery(locationId);\n\n const currentServices = useMemo(\n () => locationServiceVendors?.[vendorId]?.services || [],\n [locationServiceVendors, vendorId]\n );\n\n const transformMenuItem = (item) => ({\n ...item,\n callback: (event) => onClickHandler(event, item),\n });\n\n const groupActionsByUUID = (actions) => {\n return _.groupBy(actions, \"service_uuid\");\n };\n\n const groupActionsByGroupAndLabel = (actions) => {\n return _.groupBy(actions, (action) => action.group || \"noGroup\");\n };\n\n const createMenuStructure = (actions) => {\n const groupedActions = groupActionsByUUID(actions);\n\n if (currentServices?.length > 1) {\n return Object.entries(groupedActions).map(([uuid, actions]) => {\n const currentService = currentServices.find((x) => x.uuid === uuid);\n const groupedByGroupAndLabel = groupActionsByGroupAndLabel(actions);\n const items = Object.entries(groupedByGroupAndLabel).map(\n ([groupName, groupActions]) => {\n if (groupName === \"noGroup\") {\n return groupActions.map(transformMenuItem);\n } else {\n return {\n label: groupName,\n items: groupActions.map(transformMenuItem),\n };\n }\n }\n );\n return {\n label: `${currentService?.shortName}`,\n items: _.flattenDeep(items),\n };\n });\n } else {\n // Single service case\n const groupedByGroupAndLabel = groupActionsByGroupAndLabel(serviceActions);\n\n return _.flattenDeep(\n Object.entries(groupedByGroupAndLabel).map(\n ([groupName, groupActions]) => {\n if (groupName === \"noGroup\") {\n return groupActions.map(transformMenuItem);\n } else {\n return {\n label: groupName,\n items: groupActions.map(transformMenuItem),\n };\n }\n }\n )\n );\n }\n };\n\n const menuItemsData = {\n label: \"\",\n items: createMenuStructure(serviceActions),\n };\n\n const footerStlye = {\n border: \"1px solid #bfbfbf\",\n px: 0\n };\n\n const replyStyle = {\n border: \"none\",\n borderRadius: 0,\n borderRight: \"1px solid rgba(255, 255, 255, 0.2)\",\n p: \"3px\",\n \"&:hover\": {\n border: \"none\",\n borderRight: \"1px solid rgba(255, 255, 255, 0.2)\",\n },\n };\n\n if (serviceActions?.length === 0) {\n return <div style={{ minWidth: \"34px\" }}></div>;\n }\n return (\n <NestedDropdown\n menuItemsData={menuItemsData}\n MenuProps={{\n elevation: 3,\n }}\n ButtonProps={{\n variant: \"outlined\",\n size: \"small\",\n startIcon: icon,\n sx: {\n color: \"#bfbfbf\",\n fontSize: \"12px\",\n minWidth: \"34px\",\n \"& .MuiButton-startIcon\": {\n m: 0,\n p: 0,\n },\n \"& .MuiButton-endIcon\": {\n m: 0,\n p: 0,\n display: \"inherit\",\n },\n \"& .MuiSvgIcon-root\": {\n fontSize: \"18px\",\n },\n \"&:hover\": {\n backgroundColor: alpha(\"#bfbfbf\", 0.1),\n color: \"#bfbfbf\",\n },\n ...(isFooterMenu ? footerStlye : replyStyle),\n },\n }}\n />\n );\n};\n\nexport default ActionMenuButton;\n","import { Box, Chip, Link, Typography } from \"@mui/material\";\nimport { formatDate } from \"sharedUtils\";\nimport PdfModal from \"service/forms/common/PdfModal\";\nimport { useState } from \"react\";\nimport ReportLogLayout from \"./ReportLogLayout\";\nimport { mapKeys, camelCase } from \"lodash\";\nimport { useGetLocationRemediationQuery } from \"api/services\";\nimport { useTicket } from \"ticket/selectors\";\n\nconst statusMessages = {\n RemediationSent: { text: \"sent\", color: \"#FFA600\" },\n RemediationCancelled: { text: \"Cancelled\", color: \"red\" },\n RemediationReplyLogged: { text: \"response received\", color: \"#19E53B\" },\n RemediationResponseAccepted: {\n text: \"The remediation response is logged as a Valid PDF\",\n color: \"#19E53B\",\n },\n RemediationResponseRejected: {\n text: \"Remediation review required for Adhoc Visit by Kim (contract manager)\",\n color: \"#FFA600\",\n },\n};\n\nconst RemediationLog = ({ request }) => {\n const [openModal, setOpenModal] = useState(false);\n const statusMessage = statusMessages[request.name];\n const { location } = useTicket();\n const remediationData = useGetLocationRemediationQuery(location?.id, {\n skip: !location?.id,\n }).data?.remediation;\n const remediation = remediationData\n ? mapKeys(remediationData, (_, k) => camelCase(k))\n : null;\n\n const logHeader = (\n <>\n Remediation\n <Typography\n component=\"span\"\n sx={{\n fontSize: \"13px\",\n fontWeight: \"700\",\n color: statusMessage.color,\n }}\n >\n {` ${statusMessage.text}`}\n </Typography>\n <span style={{ color: \"#828B98\" }}> for{\" \"}</span>\n <strong>{request.data.serviceActionReason}</strong>\n </>\n );\n\n const extraLinks = remediation?.status !== 'cancelled' && (\n <Link\n onClick={() => setOpenModal(true)}\n underline=\"none\"\n sx={{ fontSize: \"11px\" }}\n >\n View\n </Link>\n );\n\n const logContent = (\n <>\n <Box sx={{ mb: \"7px\" }}>\n <strong>Contract Failure  </strong>\n <Chip\n size=\"xsmall\"\n color=\"error\"\n label={formatDate(remediation?.dateOfContractFailure)}\n />\n </Box>\n\n {request.name == \"RemediationSent\"\n ? request.data.notice.message\n : undefined}\n </>\n );\n\n const pdfUrl = request.name == \"RemediationSent\" ? request.data.notice?.noticePdfUrl : request.data.reply?.attachmentUrl;\n\n return (\n <>\n <ReportLogLayout\n logHeader={logHeader}\n logContent={logContent}\n extraLinks={extraLinks}\n object={request}\n />\n <PdfModal\n open={openModal}\n onClose={() => setOpenModal(false)}\n pdfUrl={pdfUrl}\n />\n </>\n );\n};\n\nexport default RemediationLog;\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","/**\r\n * Module contains functionality related to [[Sprite]] states.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObject } from \"./Base\";\nimport { registry } from \"./Registry\";\nimport { Adapter } from \"./utils/Adapter\";\nimport { List, ListDisposer } from \"./utils/List\";\nimport { toColor } from \"./utils/Color\";\nimport { percent } from \"./utils/Percent\";\nimport * as $utils from \"./utils/Utils\";\nimport * as $ease from \"./utils/Ease\";\nimport * as $object from \"./utils/Object\";\nimport * as $type from \"./utils/Type\";\n/**\r\n * Defines a state for [[Sprite]].\r\n *\r\n * A \"state\" is a special object that has all the same properties as the\r\n * [[Sprite]] of the same type, and which can be used to quickly apply a set\r\n * of property values. (set state)\r\n *\r\n * When [[Sprite]] (or any object that extends Sprite) is created it creates a\r\n * \"default\" state. You can modify the \"default\" state so that when the Sprite\r\n * returns to default state certain properties are added.\r\n *\r\n * Default state can be accessed using Sprite's `defaultState` getter.\r\n *\r\n * ```TypeScript\r\n * sprite.defaultState.properties.fillOpacity = 0.5;\r\n * ```\r\n * ```JavaScript\r\n * sprite.defaultState.properties.fillOpacity = 0.5;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"defaultState\": {\r\n * \"properties\": {\r\n * \"fillOpacity\": 0.5\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * If Sprite is \"hoverable\", it automatically adds a \"hover\" state, which is\r\n * applied when it has a cursor over it.\r\n *\r\n * ```TypeScript\r\n * let hoverstate = sprite.states.create(\"hover\");\r\n * hoverstate.properties.fillOpacity = 1;\r\n * ```\r\n * ```JavaScript\r\n * var hoverstate = sprite.states.create(\"hover\");\r\n * hoverstate.properties.fillOpacity = 1;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"states\": {\r\n * \"hover\": {\r\n * \"properties\": {\r\n * \"fillOpacity\": 0.5\r\n * }\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * The above will automatically apply \"hover\" state when the Sprite is hovered,\r\n * thus will set its `fillOpacity` property to 1, and will reset it to 0.5 when\r\n * it's no longer hovered.\r\n *\r\n * Every object that inherits from [[Sprite]] can and will add their own\r\n * properties to the available list.\r\n *\r\n * User can create their own states, and apply them as needed:\r\n *\r\n * ```TypeScript\r\n * let myCustomState = sprite.states.create(\"mystate\");\r\n * myCustomState.properties.fillOpacity = 0.5;\r\n * myCustomState.properties.strokeOpacity = 0.8;\r\n * sprite.setState(\"mystate\");\r\n * ```\r\n * ```JavaScript\r\n * var myCustomState = sprite.states.create(\"mystate\");\r\n * myCustomState.properties.fillOpacity = 0.5;\r\n * myCustomState.properties.strokeOpacity = 0.8;\r\n * sprite.setState(\"mystate\");\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/states/}\r\n * @important\r\n */\nvar SpriteState = /** @class */function (_super) {\n tslib_1.__extends(SpriteState, _super);\n /**\r\n * Constructor\r\n */\n function SpriteState() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * Holds Adapter.\r\n */\n _this.adapter = new Adapter(_this);\n /**\r\n * Duration of the transition to this state. 0 means instantenous transition.\r\n * Any number means the [[Sprite]] will transit smoothly to this state,\r\n * animating all animatable properties.\r\n *\r\n * @default 0\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\n _this.transitionDuration = 0;\n /**\r\n * Easing function to use when transitioning to this state.\r\n *\r\n * @default cubicOut\r\n * @see {@link Ease}\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\n _this.transitionEasing = $ease.cubicOut;\n /**\r\n * Collection of properties and their values that should be applied to [[Sprite]]\r\n * when switching to this State.\r\n *\r\n * The property values set on a [[SpriteState]] will override the ones set\r\n * directly on a [[Sprite]].\r\n */\n _this.properties = {};\n /**\r\n * A collection of key/value pairs that can be used to bind specific Sprite\r\n * properties to [[DataItem]].\r\n *\r\n * For example: `fill` property can be bound to `myCustomColor` field in\r\n * DataItem. The Sprite will automatically get the value for `fill` from its\r\n * DataItem.\r\n *\r\n * SpriteState-specific binding will override binding set directly on\r\n * [[Sprite]]. I.e. you can make Sprite use different fill color on hover by\r\n * adding a `fill` binding to a different DataItem key for Sprite's \"hover\"\r\n * state object.\r\n *\r\n * @see {@link Sprite}\r\n */\n _this.propertyFields = {};\n //public propertyFields: Dictionary<keyof this[\"_properties\"], string> = new Dictionary<keyof this[\"_properties\"], string>();;\n /**\r\n * A list of [[Filter]] elements to be applied to the relative [[Sprite]]\r\n * when switching to this State.\r\n *\r\n * @param {List}\r\n */\n _this.filters = new List();\n /**\r\n * Identifies if this object is a \"template\" and should not be treated as\r\n * real object that is drawn or actually used in the chart.\r\n */\n _this.isTemplate = false;\n _this.className = \"SpriteState\";\n // Make filter list disposable\n _this._disposers.push(new ListDisposer(_this.filters));\n // Decorate adapter with events so that we can apply its settings whenever\n // it is modified\n _this.adapter.events.on(\"inserted\", function (ev) {\n _this[ev.newValue.key] = _this[ev.newValue.key];\n }, undefined, false);\n _this.adapter.events.on(\"removed\", function (ev) {\n _this[ev.newValue.key] = _this[ev.newValue.key];\n }, undefined, false);\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Returns [[Sprite]] element's property value.\r\n *\r\n * Will check if there are any bindings with [[DataItem]] and if there are\r\n * any method callbacks set up for the specific property.\r\n *\r\n * @param propertyName Property name\r\n * @return Property value\r\n */\n SpriteState.prototype.getPropertyValue = function (propertyName) {\n var propValue = this.properties[propertyName];\n var sprite = this.sprite;\n if (sprite) {\n var fieldName = this.propertyFields[propertyName];\n if ($type.hasValue(fieldName)) {\n if (sprite.dataItem) {\n propValue = sprite.dataItem.dataContext[fieldName];\n }\n }\n // Apply adapters\n // If the value itself is undefined, we're going to pass in Sprite's\n // value to adapters\n // @todo get rid of <any>\n if (!$type.hasValue(propValue)) {\n var spriteValue = sprite.getPropertyValue(propertyName);\n propValue = this.adapter.apply(propertyName, sprite.getPropertyValue(propertyName));\n if (propValue == spriteValue) {\n propValue = undefined;\n }\n } else {\n propValue = this.adapter.apply(propertyName, propValue);\n }\n /*let method = this.propertyMethods.getKey(propertyName);\r\n if (method) {\r\n propValue = method(sprite, propertyName);\r\n }*/\n }\n return propValue;\n };\n /**\r\n * Copies all property and style values from another [[SpriteState]] object.\r\n *\r\n * @param source Source [[SpriteState]]\r\n */\n SpriteState.prototype.copyFrom = function (source) {\n if (source && source != this) {\n this.transitionDuration = source.transitionDuration;\n this.transitionEasing = source.transitionEasing;\n $utils.copyProperties(source.properties, this.properties);\n $utils.copyProperties(source.propertyFields, this.propertyFields);\n this.filters.copyFrom(source.filters);\n this.adapter.copyFrom(source.adapter);\n }\n };\n Object.defineProperty(SpriteState.prototype, \"allValues\", {\n /**\r\n * Returns all values that should be applied by the SpriteState.\r\n *\r\n * It takes adapters into account.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Properties\r\n * @todo Add adapter values\r\n * @todo proper type this[\"_properties\"]\r\n */\n get: function get() {\n var _this = this;\n // Init return value\n var res = {};\n // Apply adapters to all values\n $object.each(this.properties, function (prop, value) {\n res[prop] = _this.getPropertyValue(prop);\n });\n // Cycle through all adapters and add values for missing properties\n var keys = this.adapter.keys();\n $object.each(keys, function (_x, prop) {\n var value = _this.getPropertyValue(prop);\n res[prop] = value;\n });\n // Cycle through all property fileds and add values for missing properties\n var propertyFields = this.propertyFields;\n $object.each(propertyFields, function (prop) {\n var value = _this.getPropertyValue(prop);\n res[prop] = value;\n });\n return res;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Resets the State to initial state - no values or Filters applied.\r\n */\n SpriteState.prototype.reset = function () {\n this.properties = {};\n this.filters.clear();\n };\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n SpriteState.prototype.processConfig = function (config) {\n if ($type.hasValue(config) && $type.hasValue(config[\"properties\"])) {\n $object.each(config[\"properties\"], function (key, value) {\n if ($type.isString(value)) {\n if (value.match(/^[0-9.\\-]+\\%$/)) {\n config[\"properties\"][key] = percent($type.toNumber(value));\n } else if (value.match(/^\\#[0-9abcdef]{3,}$/i)) {\n config[\"properties\"][key] = toColor(value);\n }\n }\n });\n }\n _super.prototype.processConfig.call(this, config);\n };\n return SpriteState;\n}(BaseObject);\nexport { SpriteState };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"SpriteState\"] = SpriteState;","/**\r\n * This functionality is related to the HTML wrapper that houses `<svg>` tag.\r\n */\nimport { Disposer } from \"../utils/Disposer\";\nimport { Popup } from \"../elements/Popup\";\nimport { Modal } from \"../elements/Modal\";\nimport { ListTemplate, ListDisposer } from \"../utils/List\";\nimport * as $utils from \"../utils/Utils\";\nimport * as $dom from \"../utils/DOM\";\nimport * as $array from \"../utils/Array\";\nimport * as $type from \"../utils/Type\";\nimport ResizeSensor from \"css-element-queries/src/ResizeSensor\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A array of all SVG Containers (one SVG container per chart instance).\r\n *\r\n * @ignore Exclude from docs\r\n */\nexport var svgContainers = [];\n/**\r\n * A class used to create an HTML wrapper for the SVG contents.\r\n */\nvar SVGContainer = /** @class */function () {\n /**\r\n * Constructor\r\n *\r\n * * Creates an HTML wrapper for SVG\r\n */\n function SVGContainer(htmlElement) {\n var _this = this;\n /**\r\n * Indicates if this object has already been deleted. Any\r\n * destruction/disposal code should take this into account when deciding\r\n * wheter to run potentially costly disposal operations if they already have\r\n * been run.\r\n */\n this._disposed = false;\n /**\r\n * If this component is in a separate HTML container, `autoResize` means the\r\n * module will constantly measure container's size and adopt contents to it.\r\n */\n this.autoResize = true;\n /**\r\n * Holds list of references to [[Sprite]] objects that should not be exported\r\n * when exporting chart to an image.\r\n *\r\n * @ignore\r\n */\n this.nonExportableSprites = [];\n /**\r\n * List of objects that need to be disposed when this one is disposed.\r\n */\n this._disposers = [];\n this.cssScale = 1;\n // Log parent HTML element\n this.htmlElement = htmlElement;\n var callback = function callback() {\n _this.measure();\n };\n this.resizeSensor = new ResizeSensor(htmlElement, callback);\n this._disposers.push(new Disposer(function () {\n _this.resizeSensor.detach(callback);\n }));\n // Adds to containers array\n svgContainers.push(this);\n /**\r\n * Create child div for the container - it will have svg node\r\n * It might seem that this container is not necessay, however having it solves\r\n * a problems with mouse position detection and some other.\r\n */\n var svgContainer = document.createElement(\"div\");\n var style = svgContainer.style;\n style.width = \"100%\";\n style.height = \"100%\";\n style.position = \"relative\";\n htmlElement.appendChild(svgContainer);\n this.SVGContainer = svgContainer;\n }\n /**\r\n * Measures size of parent HTML element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n SVGContainer.prototype.measure = function () {\n var width = $utils.width(this.htmlElement);\n var height = $utils.height(this.htmlElement);\n var container = this.container;\n if (container) {\n if (this.width != width || this.height != height) {\n this.width = width;\n this.height = height;\n if (width > 0) {\n container.maxWidth = width;\n }\n if (height > 0) {\n container.maxHeight = height;\n }\n $dom.fixPixelPerfect(this.SVGContainer);\n }\n if (!container.maxWidth) {\n container.maxWidth = 0;\n }\n if (!container.maxHeight) {\n container.maxHeight = 0;\n }\n this.cssScale = 1;\n this.checkTransform(this.htmlElement);\n }\n };\n Object.defineProperty(SVGContainer.prototype, \"container\", {\n /**\r\n * @return Container\r\n */\n get: function get() {\n return this._container;\n },\n /**\r\n * A [[Container]] element which is placed into container.\r\n *\r\n * @param container Container\r\n */\n set: function set(container) {\n this._container = container;\n this.measure();\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns if this object has been already been disposed.\r\n *\r\n * @return Is disposed?\r\n */\n SVGContainer.prototype.isDisposed = function () {\n return this._disposed;\n };\n /**\r\n * Removes this container from SVG container list in system, which\r\n * effectively disables size change monitoring for it.\r\n */\n SVGContainer.prototype.dispose = function () {\n if (!this._disposed) {\n $array.remove(svgContainers, this);\n }\n $array.each(this._disposers, function (item) {\n item.dispose();\n });\n };\n Object.defineProperty(SVGContainer.prototype, \"hideOverflow\", {\n /**\r\n * Indicates if chart container should have its style set\r\n * to `overflow: hidden`.\r\n *\r\n * Normally, we don't want that, so that certain elements, such as tooltips,\r\n * would be able to go outside chart area.\r\n *\r\n * There is one issue though. Some browsers ignore SVG masks and would\r\n * display scrollbars if chart elements, that go outside chart area extend\r\n * outside window.\r\n *\r\n * This is especially true for [[MapChart]], which can have its elements\r\n * extend very widely when zoomed in. Even if those parts are not visible\r\n * because of SVG masks, some browsers might still display window scrollbars.\r\n *\r\n * This is why we set this setting to `true` in [[MapChart]].\r\n *\r\n * Other charts use default of `false`.\r\n */\n set: function set(value) {\n if (value) {\n this.SVGContainer.style.overflow = \"hidden\";\n } else {\n this.SVGContainer.style.overflow = \"\";\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SVGContainer.prototype, \"modal\", {\n /**\r\n * ==========================================================================\r\n * MODAL/POPUP RELATED STUFF\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Returns a [[Modal]] instance, associated with this chart.\r\n * (elements top parent)\r\n *\r\n * Accessing modal does not make it appear. To make a modal appear, use\r\n * `showModal()` method.\r\n *\r\n * @see {@link Modal} for more information about using Modal windows\r\n * @return Modal instance\r\n */\n get: function get() {\n if (!$type.hasValue(this._modal)) {\n // Create new modal\n this._modal = new Modal();\n this._modal.container = this.SVGContainer;\n // Add to disposers\n this._disposers.push(this._modal);\n }\n return this._modal;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Opens a modal window with specific content (`text` parameter) and,\r\n * optionally, `title`.\r\n *\r\n * The `text` parameter can contain HTML content.\r\n *\r\n * @see {@link Modal} for more information about using Modal windows\r\n * @param text Modal contents\r\n * @param title Title for the modal window\r\n */\n SVGContainer.prototype.openModal = function (text, title) {\n // Hide previous modal\n this.closeModal();\n // Create modal\n var modal = this.modal;\n modal.content = text;\n modal.readerTitle = title;\n modal.open();\n return modal;\n };\n /**\r\n * Hides modal window if there is one currently open.\r\n */\n SVGContainer.prototype.closeModal = function () {\n if (this._modal) {\n this.modal.close();\n }\n };\n Object.defineProperty(SVGContainer.prototype, \"popups\", {\n /**\r\n * A list of popups for this chart.\r\n *\r\n * @return Popups\r\n */\n get: function get() {\n if (!$type.hasValue(this._popups)) {\n // Create popup template\n var popupTemplate = new Popup();\n popupTemplate.container = this.SVGContainer;\n // Create the list\n this._popups = new ListTemplate(popupTemplate);\n // Add to disposers\n this._disposers.push(new ListDisposer(this._popups));\n this._disposers.push(this._popups.template);\n }\n return this._popups;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates, opens, and returns a new [[Popup]] window.\r\n *\r\n * `text` can be any valid HTML.\r\n *\r\n * `title` is currently not supported.\r\n *\r\n * @param text Popup contents\r\n * @param title Popup title\r\n * @return Popup instance\r\n */\n SVGContainer.prototype.openPopup = function (text, title) {\n var popup = this.popups.create();\n popup.content = text;\n if ($type.hasValue(title)) {\n popup.title = title;\n }\n popup.open();\n return popup;\n };\n /**\r\n * Closes all currently open popup windows\r\n */\n SVGContainer.prototype.closeAllPopups = function () {\n this.popups.each(function (popup) {\n popup.close();\n });\n };\n SVGContainer.prototype.checkTransform = function (div) {\n if (window.getComputedStyle) {\n if (div && div.style) {\n var style = window.getComputedStyle(div, null);\n if (style) {\n var matrix = style.getPropertyValue(\"-webkit-transform\") || style.getPropertyValue(\"-moz-transform\") || style.getPropertyValue(\"-ms-transform\") || style.getPropertyValue(\"-o-transform\") || style.getPropertyValue(\"transform\");\n if (matrix && matrix !== \"none\") {\n var values = matrix.split('(')[1].split(')')[0].split(',');\n var a = Number(values[0]);\n var b = Number(values[1]);\n var scale = Math.sqrt(a * a + b * b);\n if (!isNaN(scale)) {\n this.cssScale *= scale;\n }\n }\n }\n }\n if (div.parentNode && div.parentNode instanceof HTMLElement) {\n this.checkTransform(div.parentNode);\n }\n }\n };\n return SVGContainer;\n}();\nexport { SVGContainer };","/**\r\n * Data Loader is responsible for loading and parsing external data\r\n */\nimport { CSVParser } from \"./CSVParser\";\nimport { JSONParser } from \"./JSONParser\";\nimport { Adapter } from \"../utils/Adapter\";\nimport * as $net from \"../utils/Net\";\nimport * as $array from \"../utils/Array\";\n;\n/**\r\n * Data Loader is responsible for loading and parsing external data.\r\n *\r\n * There is just one instance of DataLoader per system. Unless you have a\r\n * speicific reason, do not instantiate additional instances.\r\n *\r\n * The global instance of Data Loader is accessible via:\r\n *\r\n * ```TypeScript\r\n * am4core.dataLoader;\r\n * ```\r\n * ```JavaScript\r\n * am4core.dataLoader;\r\n * ```\r\n *\r\n * A loading of specific data source is done via [[DataSource]].\r\n *\r\n Please refer to [[DataSource]] for information how to use it.\r\n *\r\n * @see {@link IDataLoaderAdapters} for a list of available Adapters\r\n */\nvar DataLoader = /** @class */function () {\n function DataLoader() {\n /**\r\n * Adapter.\r\n */\n this.adapter = new Adapter(this);\n }\n /**\r\n * Loads a supplied [[DataSource]] or an array of data sources, then calls\r\n * their respective `parse` methods.\r\n *\r\n * @param source A single data source or an array of multiple of data sources\r\n */\n DataLoader.prototype.load = function (source) {\n var sources = Array.isArray(source) ? source : [source];\n // Add each Source to the list to be loaded simultaneously\n var promises = $array.map(sources, function (x) {\n // Dispatch events\n x.dispatchImmediately(\"started\");\n x.dispatchImmediately(\"loadstarted\");\n return $net.load(x.url, x, x.requestOptions);\n });\n // Run all promises in parallel\n Promise.all(promises).then(function (res) {\n // Process each loaded source\n $array.each(res, function (result) {\n // Get Source\n var source = result.target;\n // Dispatch events\n source.dispatchImmediately(\"loadended\");\n if (result.error) {\n if (source.events.isEnabled(\"error\")) {\n source.events.dispatchImmediately(\"error\", {\n type: \"error\",\n code: result.xhr.status,\n message: source.language.translate(\"Unable to load file: %1\", null, source.url),\n target: source\n });\n }\n } else {\n // Initiate parsing of the loaded data\n source.processData(result.response, result.type);\n }\n source.dispatchImmediately(\"ended\");\n });\n })[\"catch\"](function (res) {\n if (res.target) {\n res.target.dispatchImmediately(\"loadended\");\n if (res.target.events.isEnabled(\"error\")) {\n res.target.events.dispatchImmediately(\"error\", {\n type: \"error\",\n code: res.xhr.status,\n message: res.target.language.translate(\"Unable to load file: %1\", null, res.target.url),\n target: res.target\n });\n }\n res.target.dispatchImmediately(\"ended\");\n }\n });\n };\n /**\r\n * Instantiates a [[DataParser]] object based on the data type.\r\n * Built-in parser types are as follows:\r\n *\r\n * * \"csv\" or \"text/csv\"\r\n * * \"json\" or \"application/json\"\r\n *\r\n * @param contentType A format type\r\n * @return A parser object\r\n */\n DataLoader.prototype.getParserByType = function (contentType) {\n // Let some plugin decide\n var parser = this.adapter.apply(\"getParserByType\", {\n parser: null,\n type: contentType\n }).parser;\n if (parser) {\n return parser;\n }\n if (contentType == \"csv\" || contentType == \"text/csv\" || contentType == \"application/vnd.ms-excel\") {\n return new CSVParser();\n }\n if (contentType == \"json\" || contentType == \"application/json\") {\n return new JSONParser();\n }\n return;\n };\n /**\r\n * Tries to determine a parser out of content type and/or actual data.\r\n *\r\n * @param data Data\r\n * @param contentType Content-type\r\n * @return Parser instance\r\n */\n DataLoader.prototype.getParserByData = function (data, contentType) {\n // Let some plugin decide\n var parser = this.adapter.apply(\"getParserByData\", {\n parser: null,\n data: data,\n type: contentType\n }).parser;\n // Check if we have parser from outside code\n if (!parser) {\n // No, let's try to figure it out\n parser = this.getParserByType(contentType);\n if (parser) {\n // We're able to figure out parser by content-type\n return parser;\n } else if (JSONParser.isJSON(data)) {\n return this.getParserByType(\"json\");\n } else if (CSVParser.isCSV(data)) {\n return this.getParserByType(\"csv\");\n }\n }\n return parser;\n };\n return DataLoader;\n}();\nexport { DataLoader };\n/**\r\n * Create instance of Data Loader\r\n */\nexport var dataLoader = new DataLoader();","/**\r\n * Polyspline (smoothed line) module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Polyline } from \"./Polyline\";\nimport { registry } from \"../Registry\";\nimport * as $math from \"../../core/utils/Math\";\nimport * as $path from \"../../core/rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws a polysline. (smoothed multi-sigment line)\r\n *\r\n * @see {@link IPolysplineEvents} for a list of available events\r\n * @see {@link IPolysplineAdapters} for a list of available Adapters\r\n */\nvar Polyspline = /** @class */function (_super) {\n tslib_1.__extends(Polyspline, _super);\n /**\r\n * Constructor\r\n */\n function Polyspline() {\n var _this = _super.call(this) || this;\n _this.className = \"Polyspline\";\n _this.tensionX = 0.5;\n _this.tensionY = 0.5;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Creats and adds an SVG path for the arc.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Polyspline.prototype.makePath = function () {\n this._distance = 0;\n var segments = this.segments;\n var tensionX = this.tensionX;\n var tensionY = this.tensionY;\n if (segments && segments.length > 0) {\n var path = \"\";\n this._realSegments = [];\n for (var i = 0, len = segments.length; i < len; i++) {\n var points = segments[i];\n var realPoints = [];\n this._realSegments.push(realPoints);\n if (points.length > 0) {\n path += $path.moveTo(points[0]);\n for (var p = 0; p < points.length - 1; p++) {\n var p0 = points[p - 1];\n var p1 = points[p];\n var p2 = points[p + 1];\n var p3 = points[p + 2];\n if (p === 0) {\n p0 = points[p];\n } else if (p == points.length - 2) {\n p3 = points[p + 1];\n }\n if (!p3) {\n p3 = p2;\n }\n var controlPointA = $math.getCubicControlPointA(p0, p1, p2, p3, tensionX, tensionY);\n var controlPointB = $math.getCubicControlPointB(p0, p1, p2, p3, tensionX, tensionY);\n path += $path.cubicCurveTo(p2, controlPointA, controlPointB);\n // now split to small segments so that we could have positionToPoint later\n var stepCount = Math.ceil($math.getDistance(p1, p2)) / 2;\n var prevPoint = p1;\n if (stepCount > 0) {\n for (var s = 0; s <= stepCount; s++) {\n var point = $math.getPointOnCubicCurve(p1, p2, controlPointA, controlPointB, s / stepCount);\n realPoints.push(point);\n this._distance += $math.getDistance(prevPoint, point);\n //path += $path.lineTo(point);\n prevPoint = point;\n }\n } else {\n realPoints.push(p0);\n }\n }\n }\n }\n this.path = path;\n }\n };\n Object.defineProperty(Polyspline.prototype, \"tensionX\", {\n /**\r\n * @return Tension\r\n */\n get: function get() {\n return this.getPropertyValue(\"tensionX\");\n },\n /**\r\n * Horizontal tension for the spline.\r\n *\r\n * Used by the line smoothing algorithm.\r\n *\r\n * @default 0.5\r\n * @param value Tension\r\n */\n set: function set(value) {\n this.setPropertyValue(\"tensionX\", value);\n this.makePath();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Polyspline.prototype, \"tensionY\", {\n /**\r\n * @return Tension\r\n */\n get: function get() {\n return this.getPropertyValue(\"tensionY\");\n },\n /**\r\n * Vertical tension for the spline.\r\n *\r\n * Used by the line smoothing algorithm.\r\n *\r\n * @default 0.5\r\n * @param value Tensions\r\n */\n set: function set(value) {\n this.setPropertyValue(\"tensionY\", value, true);\n this.makePath();\n },\n enumerable: true,\n configurable: true\n });\n return Polyspline;\n}(Polyline);\nexport { Polyspline };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Polyspline\"] = Polyspline;","import * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { LinearGradient } from \"./LinearGradient\";\nimport { GradientModifier } from \"./GradientModifier\";\nimport { registry } from \"../../Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * This class can be used to modify linear gradient steps, changing visual\r\n * properties like lightness, brightness, opacity of each set.\r\n *\r\n * It can also set offsets for each gradient step.\r\n *\r\n * E.g. if I want to fill a columns in a column series to be a solid fill from\r\n * top to 80% of height, then gradually fades out, I can use the following\r\n * gradient modifier as a `fillModifier`:\r\n *\r\n * ```TypeScript\r\n * let fillModifier = new am4core.LinearGradientModifier();\r\n * fillModifier.opacities = [1, 1, 0];\r\n * fillModifier.offsets = [0, 0.8, 1];\r\n * columnSeries.columns.template.fillModifier = fillModifier;\r\n * ```\r\n * ```JavaScript\r\n * var fillModifier = new am4core.LinearGradientModifier();\r\n * fillModifier.opacities = [1, 1, 0];\r\n * fillModifier.offsets = [0, 0.8, 1];\r\n * columnSeries.columns.template.fillModifier = fillModifier;\r\n * ```\r\n * ```JSON\r\n * \"series\": [{\r\n * \"type\": \"ColumnSeries\",\r\n * \"columns\": {\r\n * \"fillModifier\": {\r\n * \"type\": \"LinearGradientModifier\",\r\n * \"opacities\": [1, 1, 0],\r\n * \"offsets\": [0, 0.8, 1]\r\n * }\r\n * }\r\n * }]\r\n * ```\r\n */\nvar LinearGradientModifier = /** @class */function (_super) {\n tslib_1.__extends(LinearGradientModifier, _super);\n /**\r\n * Constructor.\r\n */\n function LinearGradientModifier() {\n var _this = _super.call(this) || this;\n _this.className = \"LinearGradientModifier\";\n _this.gradient = new LinearGradient();\n _this.applyTheme();\n return _this;\n }\n LinearGradientModifier.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.gradient = source.gradient.clone();\n };\n return LinearGradientModifier;\n}(GradientModifier);\nexport { LinearGradientModifier };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"LinearGradientModifier\"] = LinearGradientModifier;","/**\r\n * Module for \"Desaturate\" filter.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Filter } from \"./Filter\";\nimport { registry } from \"../../Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creats a \"Desaturate\" filter\r\n */\nvar DesaturateFilter = /** @class */function (_super) {\n tslib_1.__extends(DesaturateFilter, _super);\n /**\r\n * Constructor\r\n */\n function DesaturateFilter() {\n var _this = _super.call(this) || this;\n _this.className = \"DesaturateFilter\";\n // Create elements\n // NOTE: we do not need to add each individual element to `_disposers`\n // because `filterPrimitives` has an event handler which automatically adds\n // anything added to it to `_disposers`\n _this.feColorMatrix = _this.paper.add(\"feColorMatrix\");\n _this.feColorMatrix.attr({\n \"type\": \"saturate\"\n });\n _this.filterPrimitives.push(_this.feColorMatrix);\n // Set default properties\n _this.width = 120;\n _this.height = 120;\n _this.saturation = 0;\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(DesaturateFilter.prototype, \"saturation\", {\n /**\r\n * @return Saturation (0-1)\r\n */\n get: function get() {\n return this.properties[\"saturation\"];\n },\n /**\r\n * Saturation.\r\n *\r\n * 0 - completely desaturated.\r\n * 1 - fully saturated (gray).\r\n *\r\n * @param value Saturation (0-1)\r\n */\n set: function set(value) {\n this.properties[\"saturation\"] = value;\n this.feColorMatrix.attr({\n \"values\": value.toString()\n });\n },\n enumerable: true,\n configurable: true\n });\n return DesaturateFilter;\n}(Filter);\nexport { DesaturateFilter };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"DesaturateFilter\"] = DesaturateFilter;","import classNames from \"classnames\";\nimport _ from \"lodashExtended\";\nimport PropTypes from \"prop-types\";\nimport React from \"react\";\n\nconst Btn = ({\n text,\n icon,\n children,\n disabled,\n onClick,\n styles = \"\",\n className,\n style,\n}) => {\n var btnClassName = _.isPresent(styles)\n ? _.map(styles.split(\" \"), function (b) {\n return \"btn-\" + b;\n }).join(\" \")\n : \"\";\n\n return (\n <a\n href=\"#\"\n onClick={\n disabled\n ? (e) => {\n e.preventDefault();\n }\n : (e) => {\n e.preventDefault();\n onClick();\n }\n }\n className={classNames(\"btn btn-flat \" + btnClassName + \" \" + className, {\n disabled,\n })}\n style={style}\n >\n {_.isBlank(icon) ? null : (\n <span>\n <i className={\"fa fa-\" + icon}></i>  \n </span>\n )}\n {text || children}\n </a>\n );\n};\n\nBtn.propTypes = {\n onClick: PropTypes.func,\n text: PropTypes.node,\n children: PropTypes.node,\n icon: PropTypes.string,\n disabled: PropTypes.bool,\n styles: PropTypes.string,\n style: PropTypes.object,\n};\n\nexport default Btn;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nlet CheckBoxWithLabel = ({\n checked,\n disabled = false,\n color,\n onClick,\n children,\n hint\n}) => {\n var icon = checked ? \"check-square\" : \"square-o\";\n var textStyle = checked\n ? { color, cursor: \"pointer\", fontWeight: \"bold\" }\n : disabled\n ? { color, cursor: \"not-allowed\" }\n : { color, cursor: \"pointer\" };\n return (\n <label\n onClick={disabled ? null : () => onClick(!checked)}\n style={textStyle}\n >\n <i className={`fa fa-${icon} fa-lg fa-fw`} aria-hidden=\"true\"></i>\n {children}\n { hint && <div className=\"help-block ml-5\">{hint}</div> }\n </label>\n );\n};\n\nCheckBoxWithLabel.propTypes = {\n checked: PropTypes.bool.isRequired,\n disabled: PropTypes.bool,\n onClick: PropTypes.func.isRequired,\n children: PropTypes.node,\n};\n\nexport default CheckBoxWithLabel;\n","import React from 'react';\nimport StatelessModal from './StatelessModal'\nimport classNames from 'classnames'\nimport InfiniteCalendar from 'react-infinite-calendar'\nimport InlineVariable from './InlineVariable'\nimport PropTypes from 'prop-types'\nimport moment from 'moment'\nimport _ from 'lodashExtended'\nimport 'react-infinite-calendar/styles.css'\n\nclass DateSelect extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n calendarOpen: false,\n };\n this.handleCalendarSelect = this.handleCalendarSelect.bind(this)\n this.openCalendar = this.openCalendar.bind(this)\n this.closeCalendar = this.closeCalendar.bind(this)\n this.handleClearDate = this.handleClearDate.bind(this)\n }\n\n openCalendar () { this.setState({ calendarOpen: true }) }\n closeCalendar () { this.setState({ calendarOpen: false }) }\n\n handleCalendarSelect(date) {\n if(!!this.props.closeOnSelect) { this.setState( { calendarOpen: false } ) }\n this.props.onSelectDate(moment(date).format('YYYY-MM-DD'))\n }\n\n handleClearDate() {\n this.props.onClearDate()\n this.closeCalendar()\n }\n\n render() {\n var {selectedDate, closeOnSelect, title, subtitle, dateFormat = \"ddd, Do MMM YYYY\",\n blankText, strongTarget, targetColor, required, children, target, ...passThroughProps} = this.props\n\n title = title || \"Select a date\"\n\n var modalFooter = _.isFunction(this.props.onClearDate) && _.isPresent(selectedDate) ? <span className=\"btn btn-flat btn-default btn-xs\" onClick={this.handleClearDate}>Clear Date</span> : null\n selectedDate = _.isPresent(selectedDate) ? moment(selectedDate) : null\n\n var targetColor = _.isUndefined(targetColor) ? ((required && _.isBlank(selectedDate)) ? \"#E9573F\" : \"#3BAFDA\") : targetColor\n // {_.isBlank(selectedDate) ? blankText : }\n\n\n var target = _.isPresent(target) ? target : <InlineVariable present={moment(selectedDate).format(dateFormat)}\n blank={blankText || '<select date>'}\n isBlank={_.isBlank(selectedDate)}\n strong={strongTarget}\n color={targetColor}>{children}</InlineVariable>\n\n return (\n <StatelessModal title={title}\n subtitle={subtitle}\n target={target}\n isOpen={this.state.calendarOpen}\n onCloseModal={this.closeCalendar}\n onOpenModal={this.openCalendar}\n includeBodyPadding={false}\n footerContent={modalFooter}>\n <InfiniteCalendar\n min={new Date(2017, 0, 1)}\n {...passThroughProps}\n selected={selectedDate}\n rowHeight={50} width={600} height={500}\n onSelect={this.handleCalendarSelect}\n displayOptions={{ showOverlay: false, layout: 'landscape' }} />\n\n </StatelessModal>\n )\n }\n}\n\n\nDateSelect.propTypes = {\n selectedDate: PropTypes.string,\n closeOnSelect: PropTypes.bool,\n title: PropTypes.node,\n subtitle: PropTypes.node,\n blankText: PropTypes.node,\n strongTarget: PropTypes.bool,\n targetColor: PropTypes.string,\n required: PropTypes.bool,\n onSelectDate: PropTypes.func.isRequired,\n onClearDate: PropTypes.func\n};\n\n\n\nexport default DateSelect\n","import React from 'react';\nimport Popover from './Popover';\nimport CheckWithLabel from './CheckWithLabel';\nimport dotProp from 'dot-prop-immutable';\nimport InlineVariable from './InlineVariable';\nimport _ from 'lodashExtended'\nimport dayHelpers from './dayHelpers';\nconst { dayOrder, daysOfWeek, getDaysOfWeekText } = dayHelpers;\n\nclass DayOfWeekForm extends React.Component {\n\n constructor(props) {\n super(props);\n\n var { numberOfDaysToSelect, selectedDayIds, requiredDayId } = this.props\n var daysSelected = this.getDaysSelected(numberOfDaysToSelect, selectedDayIds)\n\n if(requiredDayId && daysSelected[requiredDayId] != undefined) { daysSelected[requiredDayId] = true }\n\n this.state = { daysSelected }\n this.handleInputToggle = this.handleInputToggle.bind(this)\n }\n\n render() {\n\n var { numberOfDaysToSelect, requiredDayId } = this.props\n var { daysSelected } = this.state\n var numberOfDaysSelected = _.size(_.pickBy(daysSelected, x => x))\n\n\n var inputs = _.map(dayOrder, (dayId) => {\n var dayName = daysOfWeek[dayId]\n var checked = daysSelected[dayId]\n var disabled = (numberOfDaysSelected >= numberOfDaysToSelect && !checked) || requiredDayId == dayId\n return(\n <div key={dayId}>\n <CheckWithLabel disabled={disabled} checked={checked} onClick={() => { this.handleInputToggle(dayId) } }>   {dayName} </CheckWithLabel>\n </div>\n )\n })\n\n return <div>\n <span className='pull-right'>selected: {numberOfDaysSelected} / {numberOfDaysToSelect}</span>\n {inputs}\n </div>\n }\n\n handleInputToggle(dayId) {\n var newState = dotProp.toggle(this.state, `daysSelected.${dayId}`)\n this.setState(newState, () => {\n var selectedDayIds = _.keys(_.pickBy(this.state.daysSelected, x => x))\n if(this.props.numberOfDaysToSelect == selectedDayIds.length) {\n this.props.onSelectDayIds(selectedDayIds)\n }\n } )\n }\n\n getDaysSelected(numberOfDaysToSelect, selectedDayIds, d ) {\n var daysSelected = {}\n _.each(dayOrder, (dayId) => { daysSelected[dayId] = false } )\n _.each(selectedDayIds, (dayId) => { daysSelected[dayId] = true } )\n return daysSelected\n }\n\n}\n\nlet DaysOfWeekSelect = ({\n timesPerWeek,\n requiredDayId,\n selectedDayIds,\n selectedDate,\n blankText,\n onSelectDayIds\n}) => {\n\n var linkText = blankText\n\n if(_.isPresent(selectedDayIds)) {\n linkText = getDaysOfWeekText(selectedDayIds)\n }\n\n linkText = <InlineVariable\n present={linkText}\n blank={blankText}\n //isBlank={!_.isPresent(selectedDayIds)}\n isBlank={selectedDayIds.length != timesPerWeek}\n />\n\n return (\n <Popover target={linkText} title={`Select ${timesPerWeek} days of the week`}>\n <DayOfWeekForm selectedDayIds={selectedDayIds} requiredDayId={requiredDayId} numberOfDaysToSelect={timesPerWeek} onSelectDayIds={onSelectDayIds}/>\n </Popover>\n )\n}\n\nexport default DaysOfWeekSelect\n","import React from 'react';\nimport StatelessPopover from './StatelessPopover'\nimport classNames from 'classnames'\nimport InlineVariable from './InlineVariable'\nimport PropTypes from 'prop-types'\nimport _ from 'lodashExtended'\n\nconst DropdownSelectOption = ({value, label, onSelect, isSelected, isCurrent, isDisabled}) => {\n\n var classes = classNames('list-group-item', { 'active': (isSelected && !isDisabled), 'disabled': isDisabled, 'current': isCurrent });\n\n var iconClasses = classNames('fa', 'fa-fw', { 'fa-check': isSelected });\n\n return <a href=\"#\" className={classes} key={'option-'+value} onClick={ (e) => { e.preventDefault(); onSelect(value) } }>\n { isCurrent ? <div className=\"pull-right text-muted\">Current</div> : null }\n <i className={iconClasses} style={{ marginRight: 7}} /> {label}\n </a>\n}\n\nDropdownSelectOption.propTypes = {\n value: PropTypes.oneOfType([\n PropTypes.any.isRequired,\n PropTypes.oneOf([null]).isRequired,\n ]),\n label: PropTypes.any.isRequired,\n onSelect: PropTypes.func.isRequired,\n isSelected: PropTypes.bool,\n isCurrent: PropTypes.bool,\n isDisabled: PropTypes.bool,\n}\n\nclass DropdownSelect extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n dropdownOpen: false,\n };\n this.handleSelect = this.handleSelect.bind(this)\n this.openDropdown = this.openDropdown.bind(this)\n this.closeDropdown = this.closeDropdown.bind(this)\n }\n\n openDropdown () { this.setState({ dropdownOpen: true }) }\n closeDropdown () { this.setState({ dropdownOpen: false }) }\n\n handleSelect(value) {\n if(!this.props.disableCurrentValue || (this.props.disableCurrentValue && value != this.props.currentValue)) {\n var selectedValueObject = _.find(this.props.options, { value } )\n this.props.onChange(value, selectedValueObject)\n this.setState( { dropdownOpen: false } )\n }\n\n }\n\n render() {\n var {selectedValue, options, title, blankText, target, children, showBlankValue, currentValue, allowNull, disableCurrentValue, noWrapTarget, strongTarget, targetColor, required, ...passThroughProps} = this.props\n\n var noWrapTarget = _.isBoolean(noWrapTarget) ? noWrapTarget : true\n var selectedValueObject = _.find(options, { value: selectedValue } )\n var selectedValueLabel = selectedValueObject ? selectedValueObject['label'] : ''\n var targetColor = _.isUndefined(targetColor) ? ((required && !selectedValueObject) ? \"#E9573F\" : \"#3BAFDA\") : targetColor\n\n return (\n <StatelessPopover title={title}\n target={target || <InlineVariable present={selectedValueLabel}\n blank={blankText}\n isBlank={!showBlankValue && !selectedValueObject}\n noWrap={noWrapTarget}\n strong={strongTarget}\n color={targetColor}>{children}</InlineVariable>}\n isOpen={this.state.dropdownOpen}\n onCloseClicked={this.closeDropdown}\n onOuterAction={this.closeDropdown}\n onTargetClicked={this.openDropdown}>\n\n <div className=\"list-group list-group-in-popover\" style={{ marginBottom: -10 }}>\n { _.map(options, ({ value, label, ...opt }) => {\n var {\n isDisabled = (disableCurrentValue && currentValue == value),\n isSelected = (selectedValue == value)\n } = opt\n return <DropdownSelectOption isCurrent={currentValue == value} isDisabled={isDisabled} isSelected={isSelected} value={value} label={label} onSelect={this.handleSelect} key={value + label}/>\n })}\n { allowNull && selectedValue !== null ? <DropdownSelectOption value={null} label={<span className=\"text-muted\">-clear selection-</span>} onSelect={this.handleSelect} key={\"clear-selection\"}/> : null }\n </div>\n\n\n </StatelessPopover>\n )\n }\n}\n\nDropdownSelect.propTypes = {\n selectedValue: PropTypes.any,\n currentValue: PropTypes.any,\n title: PropTypes.node,\n blankText: PropTypes.node,\n strongTarget: PropTypes.bool,\n targetColor: PropTypes.string,\n required: PropTypes.bool,\n showBlankValue: PropTypes.bool,\n disableCurrentValue: PropTypes.bool,\n noWrapTarget: PropTypes.bool,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n value: PropTypes.any.isRequired,\n label: PropTypes.node.isRequired\n })\n ).isRequired,\n onChange: PropTypes.func.isRequired,\n allowNull: PropTypes.bool\n};\n\n\n\nexport default DropdownSelect\n","import React from 'react'\nimport PropTypes from 'prop-types'\n\nconst Link = ({\n children,\n href,\n target = '_self',\n onClick,\n ...passThrough\n}) => {\n const onClickWrapper = (e) => {\n e.stopPropagation();\n onClick ? onClick(e) : null\n }\n return <a {...passThrough} href={ href || \"javascript:undefined\"} target={target} onClick={onClickWrapper}>{children}</a>\n}\n\n\nLink.propTypes = {\n children: PropTypes.node.isRequired,\n href: PropTypes.string,\n target: PropTypes.string,\n onClick: PropTypes.func\n};\n\nexport default Link\n\n","import React from 'react';\nimport classNames from 'classnames'\nimport PropTypes from 'prop-types'\n\n\nconst ListGroup = ({ children }) => {\n return (\n <div className=\"list-group\" style={{ marginLeft: -10, marginRight: -10 }}>\n {children}\n </div>\n )\n}\n\nListGroup.propTypes = {\n children: PropTypes.node.isRequired,\n};\n\n\nexport default ListGroup\n","import React from 'react';\nimport classNames from 'classnames'\nimport PropTypes from 'prop-types'\nimport _ from 'lodashExtended'\n\nconst ListGroupItem = ({ children, handleDelete, handleEdit }) => {\n\n const remove = _.isFunction(handleDelete) ? (<span style={{cursor: 'pointer'}} className='pull-right' onClick={handleDelete}>\n <i className=\"fa fa-times text-muted\" style={{ cursor: 'pointer', marginRight: -5, marginLeft: 15 }}></i>\n </span>) : null\n\n const edit = _.isFunction(handleEdit) ? (<span style={{cursor: 'pointer'}} className='pull-right' onClick={handleEdit}>\n <i className=\"fa fa-pencil text-muted\" style={{ cursor: 'pointer', marginRight: -5, marginLeft: 15 }}></i>\n </span>) : null\n\n return (\n <div className=\"list-group-item\">\n {remove}\n {edit}\n {children}\n </div>\n )\n}\n\nListGroupItem.propTypes = {\n children: PropTypes.node.isRequired,\n handleDelete: PropTypes.func,\n handleEdit: PropTypes.func\n};\n\n\nexport default ListGroupItem\n\n","import React from 'react'\nimport StatelessModal from './StatelessModal'\nimport classNames from 'classnames'\n\n\nclass Modal extends React.Component {\n\n constructor(props){\n super(props);\n this.state = { isOpen: props.isOpen || false }\n }\n\n open () {\n this.setState({ isOpen: true })\n }\n close () {\n this.setState({ isOpen: false })\n }\n render () {\n return (\n <span><StatelessModal {...this.props} isOpen={this.state.isOpen} onOpenModal={this.open} onCloseModal={this.close}/></span>\n )\n }\n}\n\nexport default Modal\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended'\n\nconst ModelErrors = ({errors, showColumName = true}) => {\n if(_.isPresent(errors)) {\n var displayItems = _.map(errors, (messages, columnName) => {\n var displayName = showColumName ? `${_.startCase(columnName)}:` : null\n return <li key={columnName} className=\"text-danger\">{displayName} {messages.join(', ')}</li>\n })\n return <ul>{displayItems}</ul>\n } else {\n return null\n }\n\n}\nModelErrors.propTypes = {\n errors: PropTypes.object,\n showColumName: PropTypes.bool\n};\n\n\nexport default ModelErrors\n","import React from 'react';\n\nconst NoWrap = ({ children }) => {\n return (\n <span className='no-wrap'>\n {children}\n </span>\n )\n}\n\nexport default NoWrap\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended'\n\nclass Scroller extends React.Component {\n render() {\n var { children, height } = this.props\n\n return _.isUndefined(height) || _.isNull(height) || parseInt(height) == 0 ? <div ref=\"scrollingDiv\">{children}</div> : (\n <div ref=\"scrollingDiv\" className=\"scrolling-area\" style={{maxHeight: height, height: height, overflowY: 'scroll', paddingRight: 10}}>\n {children}\n </div>\n )\n }\n componentDidMount() {\n if(this.props.scrollToDidMount == 'bottom') {\n this.refs.scrollingDiv.scrollTop = this.refs.scrollingDiv.scrollHeight\n }\n }\n componentDidUpdate() {\n if(this.props.scrollToDidUpdate == 'bottom') {\n this.refs.scrollingDiv.scrollTop = this.refs.scrollingDiv.scrollHeight\n }\n }\n}\n\nScroller.propTypes = {\n children: PropTypes.node.isRequired,\n height: PropTypes.number,\n scrollToDidMount: PropTypes.string\n};\n\n\nexport default Scroller\n","import React from 'react'\nimport PropTypes from 'prop-types'\n\nconst TickCross = ({test, trueLabel,falseLabel}) => {\n\n if(test) {\n return <span className=\"text-success\"><i className=\"fa fa-check\"> </i>{trueLabel}</span>\n } else {\n return <span className=\"text-danger\"><i className=\"fa fa-times\"> </i>{falseLabel}</span>\n }\n\n}\n\n\nTickCross.propTypes = {\n test: PropTypes.bool.isRequired,\n trueLabel: PropTypes.string,\n falseLabel: PropTypes.string\n};\n\nexport default TickCross\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport classNames from 'classnames';\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCircle, faDotCircle } from \"@fortawesome/free-regular-svg-icons\";\n\n\nvar Radio = ({\n label,\n className,\n value,\n selected,\n onSelect,\n children\n}) => {\n return(\n <div\n style={{cursor: 'pointer'}}\n className={` ${className} `}>\n <div\n className='mb-1'\n onClick={() => {onSelect(value)}}>\n { selected ?\n <FontAwesomeIcon size='lg' className='text-primary' icon={faDotCircle} /> :\n <FontAwesomeIcon size='lg' className='text-muted' icon={faCircle} /> }\n    \n <span className=\"text-muted \">{label}</span>\n </div>\n </div>\n )\n}\n\nvar RadioInput = ({\n onSelect,\n label,\n selectedValue,\n name,\n subtext,\n radioClassName = '',\n selectedClassName,\n options\n}) => {\n\n\n\n return(\n <div className={classNames('form-group', { 'form-group-invalid': false } )}>\n { label ? <label className={classNames('form-control-label mr-1' )}>{label}</label> : null }\n { subtext ? <p>{subtext}</p> : null }\n { _.map(options, ({value, label}) => {\n var selected = value === selectedValue\n return <Radio key={value}\n value={value}\n className={`${radioClassName} ${selected ? selectedClassName : null}`}\n label={label || value}\n onSelect={(value) => onSelect(value, name)}\n selected={selected}/>\n })\n }\n </div>\n )\n}\n\n\nRadioInput.propTypes = {\n options: PropTypes.arrayOf(PropTypes.shape({\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]),\n label: PropTypes.node\n })),\n selectedValue: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]),\n label: PropTypes.node,\n onSelect: PropTypes.func.isRequired,\n};\n\n\nexport default RadioInput;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport classNames from \"classnames\";\n\nvar TextAreaInput = ({\n allErrors = {},\n subtext,\n value,\n onChange,\n blankValue = null,\n label,\n name,\n optional = false,\n placeholder,\n className,\n}) => {\n let errors = _.uniq(allErrors[name] || []);\n let hasError = _.isPresent(errors);\n return (\n <div\n className={classNames(\"form-group\", \"text\", \"mt-2\", {\n optional: optional,\n \"form-group-invalid\": hasError,\n })}\n >\n {label ? (\n <label\n className={classNames(\"form-control-label\", \"text\", {\n optional: optional,\n })}\n >\n {label}\n </label>\n ) : null}\n {subtext ? <p>{subtext}</p> : null}\n <textarea\n className={classNames(\"form-control\", \"string\", {\n optional: optional,\n \"is-invalid\": hasError,\n })}\n rows=\"2\"\n placeholder={placeholder}\n defaultValue={value}\n onChange={(e) => onChange(e.target.value || blankValue, name)}\n name={name}\n ></textarea>\n {_.map(errors, (error) => (\n <div\n key={error}\n style={{ display: \"block\" }}\n className=\"invalid-feedback\"\n >\n <strong>{error}</strong>\n </div>\n ))}\n </div>\n );\n};\n\nTextAreaInput.propTypes = {};\n\nexport default TextAreaInput;\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport _ from 'lodashExtended'\nimport classNames from 'classnames';\nimport { DateSelect } from 'sharedComponents'\nimport moment from 'moment'\n\nvar DateInput = ({allErrors = {}, value, onChange, label, name, optional = false }) => {\n let errors = _.uniq(allErrors[name] || [])\n let hasError = _.isPresent(errors)\n var dateFormat = \"ddd, Do MMM YYYY\"\n var displayValue = value ? moment(value).format(dateFormat) : ''\n\n return (\n <div className={classNames('form-group', 'date', { optional: optional, 'form-group-invalid': hasError } )}>\n <label className={classNames('form-control-label', 'date', { optional: optional } )}>{label}</label>\n <DateSelect title={label}\n required={!optional}\n maxDate={new Date()}\n selectedDate={value}\n closeOnSelect={true}\n target={<input className={classNames('form-control', 'date', { optional: optional, 'is-invalid': hasError })} type=\"text\" value={displayValue} name={name}/>}\n onClearDate={() => onChange(null) }\n onSelectDate={onChange}/>\n {_.map(errors, (error) => <div key={error} style={{ display: 'block' }} className=\"invalid-feedback\"><strong>{error}</strong></div> ) }\n </div>\n )\n}\n\n\nexport default DateInput\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport classNames from 'classnames';\n\n//import { DropdownSelect, DateSelect, ModelErrors, Link } from 'sharedComponents'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar TextInput = ({allErrors = {}, value, onChange, label, name, optional = false }) => {\n let errors = _.uniq(allErrors[name] || [])\n let hasError = _.isPresent(errors)\n return (\n <div className={classNames('form-group', 'string', { optional: optional, 'form-group-invalid': hasError } )}>\n <label className={classNames('form-control-label', 'string', { optional: optional} )}>{label}</label>\n <input className={classNames('form-control', 'string', { optional: optional, 'is-invalid': hasError })} type=\"text\" defaultValue={value} onChange={(e)=> onChange(e.target.value) } name={name}/>\n {_.map(errors, (error) => <div key={error} style={{ display: 'block' }} className=\"invalid-feedback\"><strong>{error}</strong></div> ) }\n </div>\n )\n}\n\n\nTextInput.propTypes = {\n};\n\nexport default TextInput;\n\n\n\n\n\n\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport moment from \"moment\";\n\nconst ShowDate = ({date}) => {\n if(date) {\n const currentYear = moment().year();\n const momentDate = moment(date)\n const formatString = momentDate.year() == currentYear ? \"dddd Do MMMM\" : \"dddd Do MMMM YYYY\"\n return momentDate.format(formatString)\n } else {\n return null\n }\n}\n\n\nShowDate.propTypes = {\n date: PropTypes.string.isRequired\n}\n\nexport default ShowDate\n\n","import React from \"react\";\nimport Dialog from \"@mui/material/Dialog\";\nimport { styled } from \"@mui/material/styles\";\nconst CustomDialog = styled(Dialog)(({ theme }) => ({\n \"& .MuiBackdrop-root\": {\n background: \"rgba(38, 43, 48, 0.8)\",\n },\n \"& .MuiDialogContent-root\": {\n borderRadius: \"4px\",\n backgroundColor: \"#292929\",\n boxShadow:\n \"0px 0px 2px 0px rgba(0, 0, 0, 0.24), 0px 8px 16px 0px rgba(0, 0, 0, 0.28);\",\n },\n}));\n\nconst StyledDialog = ({ open, onClose, children, ...otherProps }) => {\n return (\n <CustomDialog open={open} onClose={onClose} {...otherProps}>\n {children}\n </CustomDialog>\n );\n};\n\nexport default StyledDialog;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport classNames from \"classnames\";\n\n//import { DropdownSelect, DateSelect, ModelErrors, Link } from 'sharedComponents'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n//\n//\n\n// NOTE: the zIndex: 0 fixes active buttons laying on top of dropdowns\nvar YesNoSelect = ({ value, onChange, className, canSelectNA }) => {\n return (\n <span className={className}>\n <div className=\"btn-group btn-group-toggle yesno-toggle\">\n <label\n className={classNames(\"btn\", { active: value == \"yes\" })}\n onClick={() => onChange(\"yes\")}\n style={{ zIndex: 0 }}\n >\n Yes\n </label>\n <label\n className={classNames(\"btn\", { active: value == \"no\" })}\n onClick={() => onChange(\"no\")}\n style={{ zIndex: 0 }}\n >\n No\n </label>\n {canSelectNA && (\n <label\n className={classNames(\"btn\", { active: value == \"n/a\" })}\n onClick={() => onChange(\"n/a\")}\n style={{ zIndex: 0 }}\n >\n N/A\n </label>\n )}\n </div>\n </span>\n );\n};\n\nvar YesNoInput = ({\n allErrors = {},\n value,\n subtext,\n onChange,\n label,\n name,\n optional = false,\n className,\n canSelectNA = false,\n}) => {\n let errors = _.uniq(allErrors[name] || []);\n let hasError = _.isPresent(errors);\n return (\n <div\n className={classNames(\n \"form-group\",\n \"form-group-toggle\",\n \"string\",\n \"yesno-input\",\n className,\n {\n optional: optional,\n \"form-group-invalid\": hasError,\n }\n )}\n >\n <div style={{ marginRight: \"1rem\" }}>\n <label\n className={classNames(\"form-control-label\", \"string\", {\n optional: optional,\n })}\n >\n {label}\n </label>\n {subtext ? <p>{subtext}</p> : null}\n </div>\n <YesNoSelect\n canSelectNA={canSelectNA}\n className={\"pull-right\"}\n name={name}\n value={value}\n onChange={(newValue) => onChange(newValue, name)}\n />\n {_.map(errors, (error) => (\n <div\n key={error}\n style={{ display: \"block\" }}\n className=\"invalid-feedback\"\n >\n <strong>{error}</strong>\n </div>\n ))}\n </div>\n );\n};\n\nYesNoInput.propTypes = {\n value: PropTypes.oneOf([\"no\", \"yes\", \"n/a\"]),\n name: PropTypes.string.isRequired,\n};\n\nexport default YesNoInput;\n","import classNames from 'classnames';\nimport _ from 'lodashExtended';\nimport React from 'react';\n\nvar TextAreaInput = ({\n allErrors = {},\n subtext,\n value,\n onChange,\n blankValue = null,\n label,\n name,\n optional = false,\n placeholder,\n className,\n onValidate,\n}) => {\n let errors = _.uniq(allErrors[name] || []);\n let hasError = _.isPresent(errors);\n return (\n <div\n className={classNames(\"form-group\", \"text\", {\n optional: optional,\n \"form-group-invalid\": hasError,\n })}\n >\n {label ? (\n <label\n className={classNames(\"form-control-label\", \"text\", {\n optional: optional,\n })}\n >\n {label}\n </label>\n ) : null}\n {subtext ? <p>{subtext}</p> : null}\n <textarea\n className={classNames(\"form-control\", \"string\", {\n optional: optional,\n \"is-invalid\": hasError,\n })}\n rows=\"5\"\n placeholder={placeholder}\n defaultValue={value}\n onChange={(e) => {\n onChange(e.target.value || blankValue, name);\n onValidate?.({ [name]: e.target.value });\n }}\n name={name}\n ></textarea>\n {_.map(errors, (error) => (\n <div\n key={error}\n style={{ display: \"block\" }}\n className=\"invalid-feedback\"\n >\n <strong>{error}</strong>\n </div>\n ))}\n </div>\n );\n};\n\nTextAreaInput.propTypes = {};\n\nexport default TextAreaInput;\n","import React, { useState } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport classNames from \"classnames\";\n\nvar TextInput = ({\n allErrors = {},\n value,\n onChange,\n subtext,\n placeholder,\n disabled = false,\n label,\n name,\n optional = false,\n className,\n onValidate,\n}) => {\n let errors = _.uniq(allErrors[name] || []);\n let hasError = _.isPresent(errors);\n\n const [disabledState, setDisabledState] = useState(disabled);\n\n var inputProps = {\n onChange: (e) => {\n var value = e.target.value;\n onChange(value, name);\n hasError && onValidate && onValidate({ [name]: value });\n },\n onBlur: () => onValidate && onValidate({ [name]: value }),\n };\n\n return (\n <div\n className={classNames(\"form-group\", \"string\", className, {\n optional: optional,\n \"form-group-invalid\": hasError,\n })}\n >\n {label || subtext ? (\n <div\n className={classNames({\n \"label-w-subtext\": subtext,\n })}\n >\n <label\n className={classNames(\"form-control-label\", \"text\", {\n optional: optional,\n })}\n >\n {label ? label : null}\n </label>\n {subtext ? (\n <div\n className={classNames(\"edit-btn-text\", {\n \"mr-auto\": !label,\n })}\n >\n {subtext}\n </div>\n ) : null}\n </div>\n ) : null}\n <input\n {...inputProps}\n className={classNames(\"form-control\", \"string\", {\n optional: optional,\n \"is-invalid\": hasError,\n })}\n type=\"text\"\n defaultValue={value}\n disabled={disabledState}\n placeholder={placeholder}\n name={name}\n />\n {_.map(errors, (error) => (\n <div\n key={error}\n style={{ display: \"block\" }}\n className=\"invalid-feedback\"\n >\n <strong>{error}</strong>\n </div>\n ))}\n </div>\n );\n};\n\nTextInput.propTypes = {\n name: PropTypes.string.isRequired,\n label: PropTypes.node,\n subtext: PropTypes.node,\n};\n\nexport default TextInput;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _ from \"lodashExtended\";\nimport { faBan } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nconst SummaryField = ({\n label,\n attrKey,\n attributes,\n value\n}) => {\n value = value || attributes[attrKey];\n var renderValue = _.isPresent(value) ? (\n value\n ) : (\n <span>\n <FontAwesomeIcon icon={faBan} /> Not Answered\n </span>\n );\n return (\n <div>\n <strong>{label}</strong>: {renderValue}\n </div>\n );\n};\n\n\nSummaryField.propTypes = {\n label: PropTypes.node.isRequired,\n children: PropTypes.node,\n value: PropTypes.node,\n attributes: PropTypes.object.isRequired,\n attrKey: PropTypes.string.isRequired,\n};\n\nexport default SummaryField;\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport classNames from 'classnames';\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCircle, faDotCircle } from \"@fortawesome/free-regular-svg-icons\";\n\n\nvar Radio = ({label, value, selected, onSelect, children}) => {\n return(\n <div className='mb-1'>\n <div onClick={() => {onSelect(value)}}>\n { selected ?\n <FontAwesomeIcon size='lg' className='text-primary' icon={faDotCircle} /> :\n <FontAwesomeIcon size='lg' className='text-muted' icon={faCircle} /> }\n  \n <label className=\"form-control-label\">\n <span className=\"text-muted\">{label}</span>\n </label>\n </div>\n </div>\n )\n}\n\nvar RadioInput = ( {onSelect,label, selectedValue, name, subtext, options} ) => {\n\n return(\n <div className={classNames('form-group', { 'form-group-invalid': false } )}>\n <label className={classNames('form-control-label mr-1' )}>{label}</label>\n { subtext ? <p>{subtext}</p> : null }\n { _.map(options, ({value, label}) => {\n var selected = value === selectedValue\n return <Radio key={value} value={value} label={label || value} onSelect={(value) => onSelect(value, name)} selected={selected}/>\n })\n }\n </div>\n )\n}\n\n\nRadioInput.propTypes = {\n options: PropTypes.arrayOf(PropTypes.shape({\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]),\n label: PropTypes.node\n })),\n selectedValue: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]),\n label: PropTypes.node.isRequired,\n onSelect: PropTypes.func.isRequired,\n};\n\n\nexport default RadioInput;\n\n\n\n\n\n\n","import classNames from 'classnames';\nimport _ from 'lodashExtended';\nimport React from 'react';\n\n//import { DropdownSelect, DateSelect, ModelErrors, Link } from 'sharedComponents'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar NumberInput = ({\n allErrors = {},\n value,\n subtext,\n onChange,\n disabled = false,\n label,\n name,\n optional = false,\n onValidate,\n style = {}\n}) => {\n let errors = _.uniq(allErrors[name] || []);\n let hasError = _.isPresent(errors);\n return (\n <div className=\"form-group\" style={style}>\n <div\n className={classNames(\"form-group-number\", \"string\", {\n optional: optional,\n \"form-group-invalid\": hasError,\n })}\n >\n <div>\n <label\n className={classNames(\"form-control-label\", \"string\", {\n optional: optional,\n })}\n >\n {label}\n </label>\n {subtext ? <p>{subtext}</p> : null}\n </div>\n\n <input\n className={classNames(\n \"form-control\",\n \"form-control-number\",\n \"string\",\n \"pull-right\",\n { optional: optional, \"is-invalid\": hasError }\n )}\n type=\"number\"\n min={0}\n defaultValue={value}\n onChange={(e) => {\n onChange(e.target.value, name);\n onValidate?.({ [name]: value });\n }}\n onMouseUp={(e) => {\n onChange(e.target.value, name);\n onValidate?.({ [name]: value });\n }}\n onKeyUp={(e) => {\n onChange(e.target.value, name);\n onValidate?.({ [name]: value });\n }}\n onBlur={(e) => {\n onValidate?.({ [name]: value });\n }}\n disabled={disabled}\n name={name}\n />\n </div>\n {/* This keeps this layout consistent */}\n\n {_.map(errors, (error) => (\n <div\n key={error}\n style={{ display: \"block\" }}\n className=\"invalid-feedback\"\n >\n <strong>{error}</strong>\n </div>\n ))}\n </div>\n );\n};\n\nNumberInput.propTypes = {};\n\nexport default NumberInput;\n","import React, { useState } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport classNames from \"classnames\";\n\n//import { DropdownSelect, DateSelect, ModelErrors, Link } from 'sharedComponents'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar MultiLineTextInput = ({\n allErrors = {},\n name,\n onChange,\n disabled = false,\n subtext,\n label,\n valueBylineName = {},\n placeholderBylineName = {},\n optional = false,\n}) => {\n const [disabledState, setDisabledState] = useState(disabled);\n\n let errors = _.uniq(allErrors[name] || []);\n let hasError = _.isPresent(errors);\n return (\n <div\n className={classNames(\"form-group\", \"string\", {\n optional: optional,\n \"form-group-invalid\": hasError,\n })}\n >\n {label ? (\n <div\n className={classNames({\n \"label-w-subtext\": subtext,\n })}\n >\n <label\n className={classNames(\"form-control-label\", \"text\", {\n optional: optional,\n })}\n >\n {label}\n </label>\n {subtext ? (\n <div className=\"edit-btn-text\">{subtext}</div>\n ) : null}\n </div>\n ) : null}\n {_.map(valueBylineName, (value, lineName) => (\n <input\n key={lineName}\n className={classNames(\"form-control\", \"string\", \"mb-2\", {\n optional,\n \"is-invalid\": hasError,\n })}\n type=\"text\"\n defaultValue={value}\n onChange={(e) => onChange(e.target.value, lineName)}\n disabled={disabledState}\n placeholder={placeholderBylineName[lineName]}\n name={lineName}\n />\n ))}\n {_.map(errors, (error) => (\n <div\n key={error}\n style={{ display: \"block\" }}\n className=\"invalid-feedback\"\n >\n <strong>{error}</strong>\n </div>\n ))}\n </div>\n );\n};\n\nMultiLineTextInput.propTypes = {};\n\nexport default MultiLineTextInput;\n","// @flow\n// Temp fix. \n// Check for updates here\n// https://github.com/davidmfoley/react-router-modal/pull/60/commits/a3cca6c9e35d859cb11c56d21f5aebc476e18ab7\nimport React from 'react'; // eslint-disable-line no-unused-vars\nimport { Link, withRouter } from 'react-router-dom';\nimport { ModalRoute } from 'react-router-modal';\n\n/* type Props = {\n * match: {url: string},\n * path: string,\n * children?: any,\n * component?: any,\n * exact?: boolean,\n * props?: any,\n * modalClassName?: string,\n * linkClassName?: string,\n * tabIndex?: string,\n * parentPath?: string | (match: { url: string }) => string,\n * } */\n\n/**\n* Link and ModalRoute in one convenient component\n* Renders a link that, when clicked, will navigate to the route that shows the modal.\n*\n* @param {Object} props\n* @param {String} props.path path to match\n* @param {Boolean} props.exact If set, only show modal if route exactly matches path.\n* @param {String} props.parentPath path to navigate to when backdrop is clicked\n*\n* @param {String} props.linkClassName class name to apply to <Link />\n* @param {String} props.modalClassName class name to apply to modal container\n* @param {Children} props.children Link contents. Note that Modal content must be specified by the component property.\n* @param {ReactComponent} props.component Component to render in the modal.\n* @param {Object} props.props Props to be passed to the react component specified by the component property.\n*\n*\n* @example <caption>Example ModalLink</caption>\n*\n* <ModalLink path='/hello' component={HelloComponent}>\n* Say Hello\n* </ModalLink>\n*/\nfunction ModalLink(props) {\n const {\n exact,\n path,\n children,\n component,\n linkClassName,\n tabIndex,\n match,\n parentPath,\n modalClassName\n } = props;\n\n return (\n <React.Fragment>\n <Link to={path} className={linkClassName} tabIndex={tabIndex}>\n {children}\n </Link>\n <ModalRoute\n exact={exact}\n path={path}\n props={props.props}\n component={component}\n className={modalClassName}\n parentPath={parentPath || match.url}\n />\n </React.Fragment>\n );\n}\n\nexport default withRouter(ModalLink);\n\n\n\n\n\n\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport classNames from \"classnames\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faSquare, faCheckSquare } from \"@fortawesome/free-regular-svg-icons\";\n\nvar Checkbox = ({\n label,\n value,\n selectValue = true,\n name,\n onSelect,\n className,\n children,\n}) => {\n let selected = !!value\n\n let onClick = () => {\n onSelect(selected ? null : selectValue, name);\n };\n return (\n <React.Fragment>\n <div onClick={onClick} className={`d-flex ${className ?? ''}`}>\n {selected ? (\n <FontAwesomeIcon\n size=\"lg\"\n className=\"text-primary\"\n icon={faCheckSquare}\n />\n ) : (\n <FontAwesomeIcon size=\"lg\" className=\"text-muted\" icon={faSquare} />\n )}\n  \n <label className=\"form-control-label\">\n <span className=\"text-muted\">{label}</span>\n </label>\n </div>\n {selected && _.isPresent(children) ? (\n <div style={{ margin: \"8px 0\" }} className=\"f-100\">\n {children}\n </div>\n ) : null}\n </React.Fragment>\n );\n};\n\nvar CheckboxInput = ({ errors, subtext, label, children, className }) => {\n return (\n <div\n className={classNames(\n \"form-group\",\n { \"form-group-invalid\": false },\n className\n )}\n >\n {label ? (\n <label className={classNames(\"form-control-label\", \"mb-3\")}>\n {label}\n </label>\n ) : null}\n {subtext ? <p>{subtext}</p> : null}\n {children}\n </div>\n );\n};\n\nexport default CheckboxInput\n\nCheckboxInput.Checkbox = Checkbox\n","import React, { useState, forwardRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport classNames from \"classnames\";\nimport moment from \"moment\";\nimport { isMobile } from \"react-device-detect\";\nimport MobileDatePicker from \"react-mobile-datepicker\";\nimport DatePicker from \"react-datepicker\";\nimport \"react-datepicker/dist/react-datepicker.css\";\nimport { faCalendarAlt } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nconst monthMap = {\n 1: \"Jan\",\n 2: \"Feb\",\n 3: \"Mar\",\n 4: \"Apr\",\n 5: \"May\",\n 6: \"Jun\",\n 7: \"Jul\",\n 8: \"Aug\",\n 9: \"Sep\",\n 10: \"Oct\",\n 11: \"Nov\",\n 12: \"Dec\",\n};\n\nconst dateConfig = {\n year: {\n format: \"YYYY\",\n caption: \"Year\",\n step: 1,\n },\n month: {\n format: (value) => monthMap[value.getMonth() + 1],\n caption: \"Month\",\n step: 1,\n },\n date: {\n format: \"DD\",\n caption: \"Day\",\n step: 1,\n },\n};\n\nvar DateInput = ({\n allErrors = {},\n value,\n subtext,\n onChange,\n label,\n name,\n optional = false,\n className,\n ...passThroughProps\n}) => {\n const ref = React.createRef();\n let errors = _.uniq(allErrors[name] || []);\n let hasError = _.isPresent(errors);\n let maxDate = new Date();\n const [selectOpen, setSelectOpen] = useState(false);\n let pickerValue = _.isPresent(value) ? new Date(value) : new Date();\n var dateFormat = \"Do MMM YYYY\";\n var displayValue = _.isPresent(value) ? moment(value).format(dateFormat) : \"\";\n\n const targetProps = {\n name,\n hasError,\n displayValue,\n optional,\n };\n\n const TargetInput = forwardRef(\n ({ onClick, name, hasError, displayValue, optional }, _ref) => {\n return (\n <div className=\"input-group ml-1 mb-2\" onClick={onClick}>\n <div className=\"input-group-prepend\">\n <div className=\"input-group-text\">\n <FontAwesomeIcon icon={faCalendarAlt} className=\"date-icon\" />\n </div>\n </div>\n <input\n className={classNames(\"form-control\", \"date\", className, {\n optional: optional,\n \"is-invalid\": hasError,\n })}\n type=\"text\"\n value={displayValue}\n readOnly\n name={name}\n ref={_ref}\n />\n </div>\n );\n }\n );\n\n const dateInput = isMobile ? (\n //const dateInput = true ?\n <div >\n <TargetInput {...targetProps} onClick={() => setSelectOpen(true)} />\n <MobileDatePicker\n value={pickerValue}\n isOpen={selectOpen}\n confirmText=\"Confirm\"\n cancelText=\"Cancel\"\n showCaption={true}\n max={maxDate}\n dateConfig={dateConfig}\n customHeader=\"Select Date\"\n onSelect={(date) => {\n onChange(date.toISOString(), name);\n setSelectOpen(false);\n }}\n onCancel={() => setSelectOpen(false)}\n />\n </div>\n ) : (\n <DatePicker\n selected={pickerValue}\n maxDate={maxDate}\n onChange={(date) => {\n onChange(date.toISOString(), name);\n }}\n {...passThroughProps}\n customInput={<TargetInput {...targetProps} ref={ref} />}\n />\n );\n\n return (\n <div\n className={classNames(\"form-group\", \"date-container\", {\n optional: optional,\n \"form-group-invalid\": hasError,\n })}\n >\n <label\n className={classNames(\"form-control-label\", {\n optional: optional,\n })}\n >\n {label}\n </label>\n {subtext ? <p>{subtext}</p> : null}\n {dateInput}\n {_.map(errors, (error) => (\n <div\n key={error}\n style={{ display: \"block\" }}\n className=\"invalid-feedback\"\n >\n <strong>{error}</strong>\n </div>\n ))}\n </div>\n );\n};\n\nDateInput.propTypes = {};\n\nexport default DateInput;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _ from \"lodashExtended\";\nimport classNames from \"classnames\";\nimport Select from \"react-select\";\n\nconst MANUAL_MODE_VALUE = \"**!_manual_mode_!**\";\n\nclass SelectWithOtherInput extends React.Component {\n constructor(props) {\n super(props);\n\n const { value, options, blankValue } = props;\n\n this.state = {\n manualMode:\n _.isPresent(value) &&\n value !== blankValue &&\n !_.some(options, { value }),\n };\n this.handleSelectInput = this.handleSelectInput.bind(this);\n this.handleManualInput = this.handleManualInput.bind(this);\n }\n\n handleSelectInput({ value: newValue }) {\n var inManualMode = newValue === MANUAL_MODE_VALUE;\n if (inManualMode) {\n newValue = this.props.blankValue || null;\n }\n\n this.setState({ manualMode: inManualMode }, () =>\n this.props.onChange(newValue || this.props.blankValue, this.props.name)\n );\n }\n\n handleManualInput(e) {\n this.props.onChange(\n e.target.value || this.props.blankValue,\n this.props.name\n );\n }\n\n render() {\n const {\n allErrors = {},\n value,\n onChange,\n disabled = false,\n subtext,\n options,\n label,\n name,\n placeholder,\n optional = false,\n otherLabel = \"Other\",\n otherPlaceholder,\n ...selectProps\n } = this.props;\n\n const { manualMode } = this.state;\n let errors = _.uniq(allErrors[name] || []);\n let hasError = _.isPresent(errors);\n\n var sortedOptions = _.isPresent(options[0].sort)\n ? _.sortBy(options, \"sort\")\n : options;\n var amendedOptions = sortedOptions.concat({\n value: MANUAL_MODE_VALUE,\n label: otherLabel,\n });\n\n var selectValue = manualMode ? MANUAL_MODE_VALUE : value;\n var inputValue = _.some(options, { value }) ? null : value;\n\n const defaultValueOption = _.find(amendedOptions, { value: selectValue });\n\n // NOTE: quick solution to hide |v| arrow, if need to expand thsi feature we should consider using `styled` library or some other tool\n const reactSelectStyle = {\n dropdownIndicator: (provided, state) => {\n return { ...provided, display: state.isDisabled ? \"none\" : \"block\" };\n },\n };\n\n return (\n <div\n className={classNames(\"form-group\", \"select\", {\n optional: optional,\n \"form-group-invalid\": hasError,\n })}\n >\n {label ? (\n <label\n className={classNames(\"form-control-label\", \"text\", {\n optional: optional,\n })}\n >\n {label}\n </label>\n ) : null}\n {subtext ? <p>{subtext}</p> : null}\n <Select\n {...selectProps}\n options={amendedOptions}\n onChange={this.handleSelectInput}\n placeholder={placeholder}\n defaultValue={defaultValueOption}\n isDisabled={disabled}\n styles={reactSelectStyle}\n />\n {manualMode ? (\n <input\n style={{ marginTop: \"5px\" }}\n className={classNames(\"form-control\", \"string\", {\n optional: optional,\n \"is-invalid\": hasError,\n })}\n type=\"text\"\n onChange={this.handleManualInput}\n placeholder={otherPlaceholder}\n defaultValue={_.isString(inputValue) ? inputValue : null}\n name={name}\n />\n ) : null}\n {_.map(errors, (error) => (\n <div\n key={error}\n style={{ display: \"block\" }}\n className=\"invalid-feedback\"\n >\n <strong>{error}</strong>\n </div>\n ))}\n </div>\n );\n }\n}\n\nSelectWithOtherInput.propTypes = {\n name: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n};\n\nexport default SelectWithOtherInput;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _ from \"lodashExtended\";\nimport classNames from \"classnames\";\nimport Select from \"react-select\";\n\nconst MANUAL_MODE_SYMBOL = \"**!_manual_mode_!**\";\n\n/**\n * Kept this mostly similar to Single Select with Other Input works if we later want to merge the two,\n * the behavior of this matches a normal multiselect, in addition:\n * - it will remove the `MANUAL_MODE_SYMBOL` from the resulting values during onChange phase\n * - it will read the input as another value only if the `Other` property is selected\n * During load\n * - if any value is given that's outside of options range, it will add `Other` to its values and populate the `manualInput`\n */\nexport class MultiSelectWithOtherInput extends React.Component {\n constructor(props) {\n super(props);\n\n const { value, options, blankValue } = props;\n\n const optionValues = options.map((opt) => opt.value);\n\n // v Uncertain values\n const outlierOption = value?.filter?.(\n (singleValue) => !optionValues.includes(singleValue)\n );\n const willBeManualMode = !!outlierOption?.length;\n\n // Only grabbing 1st\n const manualInput = outlierOption?.[0] || \"\";\n\n const initialValues = value?.filter?.((singleValue) =>\n optionValues.includes(singleValue)\n );\n\n this.state = {\n values: initialValues || [],\n manualInput,\n manualMode: willBeManualMode,\n };\n }\n\n handleSelectInput = (...args) => {\n const [selectedOptions] = args;\n\n // NOTE: this could be `null` when emptied\n const values = (selectedOptions || []).map((opt) => opt.value);\n var inManualMode = values.includes(MANUAL_MODE_SYMBOL);\n\n this.setState({ manualMode: inManualMode, values }, () => {\n this.handleChange();\n });\n };\n\n handleChange = () => {\n const { values, manualInput, manualMode } = this.state;\n this.props.onChange(\n [\n ...values.filter((singleValue) => singleValue !== MANUAL_MODE_SYMBOL),\n ...(manualMode && !!manualInput ? [manualInput] : []),\n ],\n this.props.name\n );\n };\n\n handleManualInput = (e) => {\n this.setState(\n {\n manualInput: e.target.value,\n },\n () => this.handleChange()\n );\n };\n\n render() {\n const {\n allErrors = {},\n value,\n onChange,\n disabled = false,\n subtext,\n options,\n label,\n name,\n placeholder,\n optional = false,\n otherLabel = \"Other\",\n otherPlaceholder,\n isMulti,\n ...selectProps\n } = this.props;\n\n const { manualMode, manualInput, values } = this.state;\n let errors = _.uniq(allErrors[name] || []);\n let hasError = _.isPresent(errors);\n\n var sortedOptions = _.isPresent(options[0].sort)\n ? _.sortBy(options, \"sort\")\n : options;\n var amendedOptions = sortedOptions.concat({\n value: MANUAL_MODE_SYMBOL,\n label: otherLabel,\n });\n\n var selectValue = manualMode ? MANUAL_MODE_SYMBOL : value;\n var inputValue = _.some(options, { value }) ? null : value;\n\n const defaultValueOption = _.find(amendedOptions, { value: selectValue });\n\n return (\n <div\n className={classNames(\"form-group\", \"select\", {\n optional: optional,\n \"form-group-invalid\": hasError,\n })}\n >\n {label ? (\n <label\n className={classNames(\"form-control-label\", \"text\", {\n optional: optional,\n })}\n >\n {label}\n </label>\n ) : null}\n {subtext ? <p>{subtext}</p> : null}\n <Select\n {...selectProps}\n options={amendedOptions}\n onChange={this.handleSelectInput}\n placeholder={placeholder}\n isDisabled={disabled}\n value={_.filter(amendedOptions, (option) =>\n values.includes(option.value)\n )}\n isMulti\n />\n {manualMode ? (\n <input\n style={{ marginTop: \"5px\" }}\n className={classNames(\"form-control\", \"string\", {\n optional: optional,\n \"is-invalid\": hasError,\n })}\n type=\"text\"\n onChange={this.handleManualInput}\n placeholder={otherPlaceholder}\n value={manualInput}\n name={name}\n />\n ) : null}\n {_.map(errors, (error) => (\n <div\n key={error}\n style={{ display: \"block\" }}\n className=\"invalid-feedback\"\n >\n <strong>{error}</strong>\n </div>\n ))}\n </div>\n );\n }\n}\n\nMultiSelectWithOtherInput.propTypes = {\n name: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n};\n\nexport default MultiSelectWithOtherInput;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n faPaperPlane,\n faArrowRight,\n faCheck,\n} from \"@fortawesome/free-solid-svg-icons\";\nimport { Btn } from \"sharedComponents\";\nimport { faArrowLeft, faTimes } from \"@fortawesome/free-solid-svg-icons\";\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar ModalBox = ({\n onClose,\n title,\n subtext,\n children,\n onBack,\n onNext,\n onAck,\n onDone,\n onSend,\n buttonsDisabled = false,\n className,\n bodyClassName,\n}) => {\n return (\n <div className={className + \" an-modal\"}>\n <div className=\"an-modal__nav\">\n {onBack ? (\n <span\n onClick={onBack}\n className=\" an-modal__nav--back\"\n styles=\"primary\"\n >\n <FontAwesomeIcon icon={faArrowLeft} aria-hidden=\"true\" /> Back\n </span>\n ) : null}\n\n {onClose ? (\n <span className=\"an-modal__nav--close\" onClick={onClose}>\n <FontAwesomeIcon icon={faTimes} aria-hidden=\"true\" />\n </span>\n ) : null}\n </div>\n <div className=\"an-modal__header\">\n <div className=\"an-modal__header--title\">{title}</div>\n {subtext ? (\n <div className=\"an-modal__header--sub-title\"> {subtext}</div>\n ) : null}\n </div>\n <div className={\"an-modal__body \" + bodyClassName}>{children}</div>\n <div className=\"an-modal__footer\">\n <div className=\"px-4\">\n {onNext ? (\n <Btn\n disabled={buttonsDisabled}\n onClick={onNext}\n className=\"an-modal__footer--btn\"\n styles=\"primary\"\n >\n Next <FontAwesomeIcon icon={faArrowRight} />\n </Btn>\n ) : null}\n {onDone ? (\n <Btn\n disabled={buttonsDisabled}\n onClick={onDone}\n className=\"an-modal__footer--btn\"\n styles=\"primary\"\n >\n <FontAwesomeIcon icon={faCheck} /> Done\n </Btn>\n ) : null}\n {onSend ? (\n <Btn\n disabled={buttonsDisabled}\n onClick={onSend}\n className=\"an-modal__footer--btn\"\n styles=\"primary\"\n >\n <FontAwesomeIcon icon={faPaperPlane} /> Send Request\n </Btn>\n ) : null}\n\n {onAck ? (\n <Btn\n disabled={buttonsDisabled}\n onClick={onAck}\n className=\"an-modal__footer--btn\"\n styles=\"primary\"\n >\n Ok\n </Btn>\n ) : null}\n </div>\n </div>\n </div>\n );\n};\n\nModalBox.propTypes = {\n onClose: PropTypes.func,\n children: PropTypes.node.isRequired,\n title: PropTypes.node.isRequired,\n subtext: PropTypes.node,\n onNext: PropTypes.func,\n onBack: PropTypes.func,\n onDone: PropTypes.func,\n onSend: PropTypes.func,\n buttonsDisabled: PropTypes.bool,\n};\n\nexport default ModalBox;\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport classNames from 'classnames';\n\nvar ListItem = ({label, value, selected, onSelect, children}) => {\n return(\n <li style={{cursor: 'pointer'}} className={`mb-2 list-group-item list-group-item-${selected ? 'primary' : 'grey' }`} onClick={() => onSelect(value)} >{label || value}</li>\n )\n}\n\nvar SelectListInput = ( {onSelect,label, selectedValue, name, subtext, options} ) => {\n\n return(\n <div className={classNames('form-group', { 'form-group-invalid': false } )}>\n { label ? <label className={classNames('form-control-label' )}>{label}</label> : null }\n { subtext ? <p>{subtext}</p> : null }\n <ul className=\"list-group\">\n\n { _.map(options, ({value, label}) => {\n var selected = value === selectedValue\n return <ListItem key={value} value={value} label={label || value} onSelect={!selected ? (value) => onSelect(value, name) : () => {}} selected={selected}/>\n })\n }\n </ul>\n </div>\n )\n}\n\nSelectListInput.propTypes = {\n options: PropTypes.arrayOf(PropTypes.shape({\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]),\n label: PropTypes.node\n })),\n selectedValue: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]),\n label: PropTypes.node,\n onSelect: PropTypes.func.isRequired,\n};\n\n\nexport default SelectListInput;\n\n\n\n\n\n\n\n\n","import React, { useEffect } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { Btn } from \"sharedComponents\";\nimport { useHistory, useParams } from \"react-router-dom\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n faCheck,\n faExclamationCircle,\n faExclamationTriangle,\n} from \"@fortawesome/free-solid-svg-icons\";\nimport { useMediaQuery } from \"react-responsive\";\n\nconst statusToStyle = (status) => {\n var styleMap = {\n completed: \"success\",\n partially_complete: \"warning\",\n in_progress: \"warning\",\n to_do: \"info\",\n };\n return styleMap[status] || \"default\";\n};\n\nconst titleize = (input) => {\n if (typeof input !== \"string\") {\n throw new TypeError(\"Expected a string\");\n }\n return _.startCase(input.toLowerCase().replace(/(-|_)/, \" \"));\n};\n\nclass Content extends React.Component {\n componentDidMount() {\n var element = document.getElementById(this.props.scrollAnchor);\n element.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n }\n\n render() {\n return <div className={this.props.className}>{this.props.children}</div>;\n }\n}\n\nvar Section = ({\n title,\n number,\n sectionId,\n subtext,\n onSubmit,\n sectionStatus,\n topRight,\n onNavigateFrom,\n incompleteMessage,\n children,\n wideBody\n}) => {\n let history = useHistory();\n let { sectionId: selectedSectionId } = useParams();\n let onSelect = () => {\n onNavigateFrom(selectedSectionId)\n history.push(`/section/${sectionId}`)\n }\n const isMobileMode = useMediaQuery({ maxWidth: 576 });\n let minimized = selectedSectionId != sectionId;\n\n const content = minimized ? null : (\n <div>\n <Content scrollAnchor={sectionId} className={wideBody ? \"md-width-90\" : \"md-width-75\"}>\n {children}\n </Content>\n <hr />\n <Btn\n onClick={onSubmit}\n className=\"pull-right w-phone-100 btn-w-icon\"\n styles=\"primary\"\n >\n <FontAwesomeIcon icon={faCheck} /> Save\n </Btn>\n </div>\n );\n\n return (\n <div\n className=\"card mb-4 shadow-sm\"\n style={{ position: \"relative\", cursor: minimized ? \"pointer\" : \"auto\" }}\n onClick={minimized ? onSelect : null}\n >\n <div\n id={sectionId}\n style={{ position: \"absolute\", top: \"-100px\", left: 0 }}\n ></div>\n <div className=\"card-body\">\n <div className=\"mb-3\">\n <div className=\"section-title h4\" style={{ fontWeight: \"bold\" }}>\n <div className=\"m-0\">{number ? `${number}. ` : null}{title}</div>\n <div className=\"section-title-btns\">\n {minimized || isMobileMode ? (\n <p\n className={`badge badge-${statusToStyle(sectionStatus)} m-0`}\n >\n {titleize(sectionStatus)}\n </p>\n ) : null}\n {(topRight && !minimized) ||\n (topRight && minimized && isMobileMode) ? (\n <p onClick={(e) => e.stopPropagation()}>{topRight}</p>\n ) : null}\n </div>\n </div>\n {incompleteMessage ? (\n <div className=\"md-width-100 my-2\">\n <FontAwesomeIcon\n icon={faExclamationCircle}\n className=\"text-warning\"\n />{\" \"}\n {incompleteMessage}\n </div>\n ) : null}\n <div className=\"md-width-100\">{subtext}</div>\n </div>\n {content}\n </div>\n </div>\n );\n};\n\nSection.propTypes = {\n title: PropTypes.node.isRequired,\n subtext: PropTypes.node.isRequired,\n children: PropTypes.node.isRequired,\n sectionId: PropTypes.string.isRequired,\n sectionStatus: PropTypes.string.isRequired,\n incompleteMessage: PropTypes.string,\n onSubmit: PropTypes.func.isRequired,\n onNavigateFrom: PropTypes.func.isRequired,\n};\n\n\nexport default Section;\n","import { faExclamationCircle } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport classNames from 'classnames';\nimport _ from 'lodashExtended';\nimport PropTypes from 'prop-types';\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { Detector, Online } from 'react-detect-offline';\n//import { Detector, Offline, Online } from 'react-detect-offline';\nimport { useMediaQuery } from 'react-responsive';\nimport { useHistory, useParams } from 'react-router-dom';\nimport { Btn } from 'sharedComponents';\n\n//import { connect } from \"react-redux\";\nconst statusToClassName = {\n completed: \"at-progressbar--finished\",\n partially_complete: \"at-progressbar--issue\",\n to_do: \"\",\n};\n\nvar StatusSummary = ({\n sectionStatusById,\n showSubmit,\n goToSummaryPage,\n allSectionsComplete,\n orderedSectionIds,\n}) => {\n let history = useHistory();\n const isMobileMode = useMediaQuery({ maxWidth: 992 });\n let { sectionId: selectedSectionId } = useParams();\n const [focused, setFocused] = useState(false);\n const timer = useRef();\n\n useEffect(() => () => timer.current && clearTimeout(timer.current), []);\n\n return (\n <div\n className=\"my-4 card shadow-sm shadow-bg\"\n tabIndex=\"0\"\n onFocus={() => setFocused(true)}\n onBlur={() => {\n timer.current = setTimeout(() => {\n console.log(\"blur\");\n setFocused(false);\n }, 100);\n }}\n >\n <Detector onChange={(online) => posthog.capture('User Online Status Changed', {\n online,\n date: moment().format(),\n userAgent: navigator.userAgent\n })}\n render={()=> null}\n />\n\n <div className=\"card-body\">\n <div className=\"row justify-content-between align-items-center my-2 px-3 mx-0\">\n <h4 className=\"font-weight-bold\">Audit Progress</h4>\n </div>\n <ul className=\"at-progressbar\">\n {_.map(orderedSectionIds, (sectionId) => {\n let unSelectedClassName =\n statusToClassName[sectionStatusById[sectionId]];\n let className =\n selectedSectionId == sectionId\n ? \"at-progressbar--active\"\n : unSelectedClassName;\n return (\n <li\n className={className}\n key={sectionId}\n style={{ cursor: \"pointer\" }}\n onClick={() => history.push(`/section/${sectionId}`)}\n ></li>\n );\n })}\n </ul>\n {focused || allSectionsComplete || showSubmit || !isMobileMode ? (\n <div className={classNames(\"mt-4\")}>\n <Btn\n onClick={goToSummaryPage}\n styles={`${\n !allSectionsComplete ? \"outline-\" : \"\"\n }primary w-100`}\n className=\"w-100\"\n >\n Review and Submit Audit\n </Btn>\n </div>\n ) : null}\n </div>\n </div>\n );\n};\n\nStatusSummary.propTypes = {\n sectionStatusById: PropTypes.object.isRequired,\n goToSummaryPage: PropTypes.func.isRequired,\n showSubmit: PropTypes.bool,\n allSectionsComplete: PropTypes.bool.isRequired,\n orderedSectionIds: PropTypes.arrayOf(PropTypes.string).isRequired,\n};\n\nexport default StatusSummary;\n\n\n //<Online>\n //{focused || allSectionsComplete || showSubmit || !isMobileMode ? (\n //<div className={classNames(\"mt-4\")}>\n //<Btn\n //onClick={goToSummaryPage}\n //styles={`${\n //!allSectionsComplete ? \"outline-\" : \"\"\n //}primary w-100`}\n //className=\"w-100\"\n //>\n //Review and Submit Audit\n //</Btn>\n //</div>\n //) : null}\n //</Online>\n //<Offline>\n //<div className=\"text-center text-warning mb-1\">\n //<FontAwesomeIcon icon={faExclamationCircle} /> You are offline,\n //changes are saved locally\n //</div>\n //</Offline>\n\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _ from \"lodashExtended\";\nimport { faExclamationCircle } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nvar SubmitSummaryRow = ({ label, children, value, defaultValue }) => {\n defaultValue = defaultValue || (\n <span>\n <FontAwesomeIcon className=\"text-warning\" icon={faExclamationCircle} />{\" \"}\n Not Answered, this can affect audit result\n </span>\n );\n\n return (\n <div className=\"summary__row\">\n <div className=\"summary__row--label col-12\">{label}</div>\n <div className=\"summary__row--value col-md-9 col-sm-8 col-12\">\n {value || children || defaultValue}\n </div>\n </div>\n );\n};\n\nSubmitSummaryRow.propTypes = {\n label: PropTypes.node.isRequired,\n children: PropTypes.node,\n value: PropTypes.node,\n};\n\nexport default SubmitSummaryRow;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { Btn } from \"sharedComponents\";\nimport { useHistory } from \"react-router-dom\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n faExclamationCircle,\n faExclamationTriangle,\n} from \"@fortawesome/free-solid-svg-icons\";\n//var {\n//} = actions\n\nvar SubmitSummarySection = ({\n title,\n sectionId,\n children,\n sectionStatus,\n incompleteMessage,\n}) => {\n let history = useHistory();\n\n return (\n <div className=\"summary__section\">\n <div className=\"summary__section--title\">\n <span style={{maxWidth: \"72%\" }}>{title}</span>\n <span>\n <Btn\n icon=\"edit\"\n styles=\"light\"\n onClick={() => history.push(`/section/${sectionId}`)}\n >\n Edit\n </Btn>\n </span>\n\n {incompleteMessage ? (\n <div className=\"summary__section--title-subtext\">\n <FontAwesomeIcon\n className=\"text-warning\"\n icon={faExclamationCircle}\n />{\" \"}\n {incompleteMessage}\n </div>\n ) : null}\n </div>\n\n <div>{children}</div>\n </div>\n );\n};\n\nSubmitSummarySection.propTypes = {\n title: PropTypes.string.isRequired,\n sectionId: PropTypes.string.isRequired,\n sectionStatus: PropTypes.string.isRequired,\n incompleteMessage: PropTypes.string,\n children: PropTypes.node.isRequired,\n};\n\n\nexport default SubmitSummarySection;\n","import React, { useEffect } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { Btn } from \"sharedComponents\";\nimport { useHistory, useRouteMatch } from \"react-router-dom\";\nimport { ModalRoute } from \"react-router-modal\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n faExclamationCircle,\n faExclamationTriangle,\n} from \"@fortawesome/free-solid-svg-icons\";\n//import { Offline, Online } from \"react-detect-offline\";\n\nvar SubmitSummary = ({\n title,\n closeModal,\n afterSubmitPath,\n onSubmitAudit,\n orderedSectionSummaryViews,\n submitWarningModal,\n submittedModal,\n allSectionsComplete,\n allFieldsRequired = false,\n ...props\n}) => {\n let history = useHistory();\n let { url } = useRouteMatch();\n useEffect(() => {\n window.scrollTo(0, 0);\n }, []);\n\n const onSubmit = () => onSubmitAudit(`${url}/submitted`);\n\n return (\n <div className=\"summary\">\n <ModalRoute\n path={`${url}/confirmSubmit`}\n parentPath={url}\n props={{\n onSubmit,\n }}\n component={submitWarningModal}\n />\n\n <ModalRoute\n path={`${url}/submitted`}\n onBackdropClick={() => {}}\n component={submittedModal}\n props={{ afterSubmitPath }}\n />\n <div>\n <i\n className=\"fa fa-times pull-right\"\n aria-hidden=\"true\"\n onClick={() => history.push(\"/\")}\n ></i>\n <div className=\"summary--title\">{title}</div>\n </div>\n <div>\n {_.map(orderedSectionSummaryViews, (SummaryView, i) => (\n <SummaryView {...props} key={i} />\n ))}\n </div>\n <div className=\"d-flex flex-wrap justify-content-between\">\n {!allSectionsComplete &&\n (allFieldsRequired ? (\n <span className=\"text-danger d-block mb-2\">\n <FontAwesomeIcon icon={faExclamationCircle} /> Some sections\n remain incomplete. All answers are required!\n </span>\n ) : (\n <span className=\"text-warning d-block mb-2\">\n <FontAwesomeIcon icon={faExclamationCircle} /> Some sections\n remain incomplete. This will affect your audit result\n </span>\n ))}\n <Btn\n onClick={() => {\n allSectionsComplete\n ? onSubmit()\n : history.push(`${url}/confirmSubmit`);\n }}\n className=\"pull-right w-phone-100 btn-w-icon\"\n styles=\"primary\"\n disabled={!allSectionsComplete && allFieldsRequired}\n >\n Submit Audit\n </Btn>\n </div>\n </div>\n );\n};\n\nSubmitSummary.propTypes = {\n onSubmitAudit: PropTypes.func.isRequired,\n wasteAudit: PropTypes.object.isRequired,\n afterSubmitPath: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n allSectionsComplete: PropTypes.bool.isRequired,\n submitWarningModal: PropTypes.elementType.isRequired,\n submittedModal: PropTypes.elementType.isRequired,\n orderedSectionSummaryViews: PropTypes.arrayOf(PropTypes.elementType)\n .isRequired,\n};\n\nexport default SubmitSummary;\n\n\n //<Online>\n //<Btn\n //onClick={() => {\n //allSectionsComplete\n //? onSubmit()\n //: history.push(`${url}/confirmSubmit`);\n //}}\n //className=\"pull-right w-phone-100 btn-w-icon\"\n //styles=\"primary\"\n //disabled={!allSectionsComplete && allFieldsRequired}\n //>\n //Submit Audit\n //</Btn>\n //</Online>\n //<Offline>\n //<div className=\"text-danger d-block mb-2\">\n //<FontAwesomeIcon icon={faExclamationCircle} /> You are offline. You\n //must be online to submit the Audit.\n //</div>\n //<Btn\n //disabled\n //className=\"pull-right w-phone-100 btn-w-icon\"\n //styles=\"primary\"\n //>\n //Submit Audit\n //</Btn>\n //</Offline>\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _ from \"lodashExtended\";\nimport BinDot from \"service/BinDot\";\n\nvar CollectionInstruction = ({\n collectionUnits,\n clearAll,\n binTypes,\n binGroups,\n}) => {\n if (clearAll) {\n return <strong>Vendor requested to clear all bins presented</strong>;\n } else if (_.isPresent(collectionUnits)) {\n return (\n <>\n <strong>Vendor was requested to collect the following</strong>\n <table className=\"table table-condensed\">\n <thead>\n <tr>\n <th scope=\"col\">Type</th>\n <th scope=\"col\">Name</th>\n <th scope=\"col\">Code</th>\n <th style={{ width: \"10%\" }} scope=\"col\">\n Quantity\n </th>\n <th style={{ width: \"30%\" }} scope=\"col\">\n Visit Action\n </th>\n </tr>\n </thead>\n <tbody>\n {_.map(\n collectionUnits,\n ({\n serviceCode,\n quantity,\n collectAll,\n visitActionId,\n visitActionName,\n }) => {\n const { name, groupName, binGroupId, possibleVisitActions } =\n binTypes[serviceCode];\n\n const binGroup = binGroups[binGroupId];\n return (\n <tr key={serviceCode}>\n <th scope=\"row\">\n <BinDot\n binGroup={binGroup}\n tooltipName={true}\n showImg\n {...binTypes[serviceCode]}\n />\n </th>\n <td>{name}</td>\n <td>{serviceCode}</td>\n <td>\n {visitActionId != \"do_not_collect\" ? quantity : \"-\"}\n </td>\n <td style={{ width: \"30%\" }}>{visitActionName}</td>\n </tr>\n );\n }\n )}\n </tbody>\n </table>\n </>\n );\n } else {\n return (\n <strong>\n No Collection Requested. Vendor requested to deliver stock only\n </strong>\n );\n }\n};\n\nCollectionInstruction.propTypes = {\n binGroups: PropTypes.objectOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n name: PropTypes.string.isRequired,\n legendFillColor: PropTypes.string.isRequired,\n legendBorderColor: PropTypes.string.isRequired,\n })\n ).isRequired,\n binTypes: PropTypes.objectOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n name: PropTypes.string.isRequired,\n groupName: PropTypes.string.isRequired,\n binGroupId: PropTypes.number.isRequired,\n })\n ).isRequired,\n collectionUnits: PropTypes.objectOf(\n PropTypes.shape({\n quantity: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n serviceCode: PropTypes.string.isRequired,\n visitActionName: PropTypes.string.isRequired,\n })\n ),\n clearAll: PropTypes.bool.isRequired,\n};\n\nexport default CollectionInstruction;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _ from \"lodashExtended\";\n\nimport BinDot from \"service/BinDot\";\n\nvar DeliveryInstruction = ({ deliveryUnits, binTypes, binGroups }) => {\n if (_.isPresent(deliveryUnits)) {\n return (\n <>\n <strong>\n Vendor requested to deliver the following in addition to like for like\n </strong>\n <table className=\"table table-condensed\">\n <thead>\n <tr>\n <th scope=\"col\">Type</th>\n <th scope=\"col\">Name</th>\n <th scope=\"col\">Code</th>\n <th scope=\"col\">Deliver # Units</th>\n </tr>\n </thead>\n <tbody>\n {_.map(deliveryUnits, ({ serviceCode, quantity }) => {\n const { name, groupName, binGroupId } = binTypes[serviceCode];\n\n const binGroup = binGroups[binGroupId];\n return (\n <tr key={serviceCode}>\n <th scope=\"row\">\n <BinDot\n binGroup={binGroup}\n tooltipName={true}\n showImg\n {...binTypes[serviceCode]}\n />\n </th>\n <td>{name}</td>\n <td>{serviceCode}</td>\n <td>{quantity}</td>\n </tr>\n );\n })}\n </tbody>\n </table>\n </>\n );\n } else {\n return <strong>No Additional Stock Delivery Requested</strong>;\n }\n};\n\nDeliveryInstruction.propTypes = {\n binGroups: PropTypes.objectOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n name: PropTypes.string.isRequired,\n legendFillColor: PropTypes.string.isRequired,\n legendBorderColor: PropTypes.string.isRequired,\n })\n ).isRequired,\n binTypes: PropTypes.objectOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n name: PropTypes.string.isRequired,\n groupName: PropTypes.string.isRequired,\n binGroupId: PropTypes.number.isRequired,\n })\n ).isRequired,\n deliveryUnits: PropTypes.objectOf(\n PropTypes.shape({\n quantity: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n serviceCode: PropTypes.string.isRequired,\n })\n ),\n};\n\nexport default DeliveryInstruction;\n","import React from \"react\";\nimport _ from \"lodashExtended\";\nimport PropTypes from \"prop-types\";\nimport {\n DropdownSelect,\n} from 'sharedComponents'\n\n\n\nlet ServiceActionMenu = ({actions, onSelectAction}) => {\n\n return(\n <span className='pull-right'>\n <DropdownSelect title=\"What do you need to do?\"\n onChange={onSelectAction }\n options={actions}>\n <span className='btn btn-flat btn-xs btn-primary'><i className=\"fa fa-plus\"></i>  Actions</span>\n </DropdownSelect>\n </span>\n )\n}\n\n\nServiceActionMenu.propTypes = {\n onSelectAction: PropTypes.func.isRequired,\n actions: PropTypes.array\n};\n\n\nexport default ServiceActionMenu;\n\n","import React, { useState, useEffect } from \"react\";\nimport PropTypes from 'prop-types'\nimport _ from 'lodashExtended'\nimport Form from './Form'\nimport Drawer from 'react-modern-drawer'\nimport 'react-modern-drawer/dist/index.css'\n\n\nvar ServiceFormDrawer = ({\n formUrl,\n onClose,\n onSubmitSuccess,\n}) => {\n\n return(\n <Drawer\n open={_.isPresent(formUrl)}\n onClose={onClose}\n direction='right'\n enableOverlay={false}\n size='33vw'\n style={{overflow: 'scroll'}}\n >\n <div style={{padding: '90px 10px'}}>\n <div >\n { _.isPresent(formUrl) ?\n <Form\n url={formUrl}\n onClose={onClose}\n onSubmitSuccess={onSubmitSuccess}\n /> : null }\n </div>\n </div>\n </Drawer>\n )\n}\n\nServiceFormDrawer.propTypes = {\n onSubmitSuccess: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n formUrl: PropTypes.string\n}\n\nexport default ServiceFormDrawer\n","import React, { useState, useEffect } from \"react\";\nimport PropTypes from 'prop-types'\nimport getType from 'service/forms'\nimport { Btn } from 'sharedComponents'\nimport { prepareSubmitData } from 'sharedUtils'\n\n\nfunction useFetch(url, opts) {\n const [data, setData] = useState(null)\n const [loading, setLoading] = useState(true)\n const [hasError, setHasError] = useState(false)\n useEffect(() => {\n setLoading(true)\n fetch(url, opts)\n .then(res => res.json())\n .then((data) => {\n setData(data)\n setLoading(false)\n })\n .catch(() => {\n setHasError(true)\n setLoading(false)\n })\n }, [ url ])\n return [ data, setData, loading, hasError ]\n}\n\n\nvar Form = ({\n url,\n onClose,\n onSubmitSuccess\n}) => {\n\n const [data, setData, loading, hasError] = useFetch(url, {\n credentials: 'same-origin',\n headers: {\n 'Accept': 'application/json'\n }\n })\n\n const [submitting, setSubmitting] = useState(false)\n\n const onSetForm = (newFormArgs) => {\n\n console.log('set attt', newFormArgs)\n\n var newData = {\n ...data,\n form: {\n ...data.form,\n ...newFormArgs\n }\n }\n console.log({ newData })\n setData(newData)\n }\n\n\n const onSubmit = () => {\n setSubmitting(true)\n\n var attributeKeyNames = [\n 'specifications',\n 'deliveryUnits',\n 'collectionUnits'\n ]\n\n fetch(url, {\n method: 'POST',\n credentials: 'same-origin',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(prepareSubmitData({ form: data.form }, attributeKeyNames))\n })\n .then(res => {\n\n setSubmitting(false)\n\n res.json().then(data => {\n\n if(res.status == 422) {\n setData(data)\n } else if(res.status == 201) {\n onSubmitSuccess(data)\n onClose()\n } else {\n throw res\n }\n console.log(data)\n })\n })\n\n .catch((res) => {\n console.log(res);\n })\n }\n\n if(loading) {\n return(<div>Loading...</div>)\n } else {\n\n console.log(data)\n const FormType = getType(data.type)\n\n const submitIcon = _.isPresent(data.errors) ? \"warning\" : \"check\"\n const buttonColor = _.isPresent(data.errors) ? \"danger\" : \"success\"\n\n return(\n <div>\n <div>\n { submitting ? null : <span className='pull-right' onClick={onClose}>CLOSE</span> }\n </div>\n <FormType {...data} onSetForm={onSetForm}/>\n <div className='row'>\n <div className=\"col-md-4\">\n <Btn styles='default block sm flat' disabled={submitting} icon='times' onClick={onClose}>Cancel</Btn>\n </div>\n <div className=\"col-md-8\">\n <Btn styles={`${buttonColor} block sm flat`} disabled={submitting} icon={submitIcon} onClick={onSubmit}>Submit</Btn>\n </div>\n </div>\n </div>\n )\n }\n\n}\n\nForm.propTypes = {\n url: PropTypes.string.isRequired,\n onClose: PropTypes.func.isRequired,\n onSubmitSuccess: PropTypes.func.isRequired\n}\n\nexport default Form\n","import { Box } from \"@mui/material\";\nimport { orderBy } from \"lodash\";\nimport AdhocVisitRequestCard from \"./AdhocVisitRequestCard\";\nimport RemediationCard from \"./RemediationCard\";\nimport ServiceTerminationRequestCard from \"./ServiceTerminationRequestCard\";\nimport ReattemptVisitCard from \"./ReattemptVisitCard\";\nimport StockDeliveryRequestCard from \"./StockDeliveryCard\";\n\nconst requestComponents = {\n Adhoc: AdhocVisitRequestCard,\n // Termination: ServiceTerminationRequestCard,\n Reattempt: ReattemptVisitCard,\n Stock: StockDeliveryRequestCard,\n};\n\nconst RequestCard = ({ request }) => {\n const getRequestComponent = (requestType) => {\n const componentKey = Object.keys(requestComponents).find((key) =>\n requestType?.includes(key),\n );\n return componentKey ? requestComponents[componentKey] : null;\n };\n\n\n const SpecificRequestComponent = getRequestComponent(request?.type);\n\n if (!SpecificRequestComponent) return null;\n\n return (\n\n <SpecificRequestComponent request={request} />\n\n );\n};\n\nconst RequestsCards = ({ requests, remediations }) => {\n return (\n <Box\n sx={{\n backgroundColor: \"#262b31\",\n }}\n >\n {orderBy(requests, [\"requestedAt\"], [\"desc\"]).map((request, index) => (\n <RequestCard key={request.id || index} request={request} />\n ))}\n {remediations.map(remediation => (<RemediationCard key={remediation.id} remediation={remediation} />))}\n\n </Box>\n );\n};\n\nexport default RequestsCards;\n","import ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport { Box, Collapse, IconButton, Tooltip, Typography } from \"@mui/material\";\nimport dayjs from \"dayjs\";\nimport relativeTime from \"dayjs/plugin/relativeTime\";\nimport { startCase, uniq } from \"lodash\";\nimport { useEffect, useRef, useState } from \"react\";\nimport ReportsCards from \"service/report-request-box/ReportsCards\";\nimport { useTheme } from '@mui/material/styles';\n\ndayjs.extend(relativeTime);\n\nconst RequestRows = ({ requests }) => {\n const history = useHistory();\n const location = useLocation();\n const locationId = getLocationId();\n const { currentTicketId } = useContext(AppContext);\n const { highlightedIds, setHighlightedIds } = useContext(AppContext);\n\n // TODO: This is broken, we need to add replyIds to reports\n const handleIconClick = (request) => {\n const searchParams = new URLSearchParams(location.search);\n const currentHighlights = searchParams.getAll(\"highlight\").map(Number);\n\n if (String(request.linkedTicketIds[0]) === currentTicketId) {\n // We're on the same ticket\n const newHighlights = request?.replyIds?.every((id) =>\n currentHighlights?.includes(id)\n )\n ? currentHighlights.filter((id) => !request?.replyIds?.includes(id)) // Remove all if all are currently highlighted\n : Array.from(new Set([...currentHighlights, ...request.replyIds])); // Add any that aren't already highlighted\n\n if (newHighlights.length > 0) {\n searchParams.delete(\"highlight\"); // Clear existing highlights\n newHighlights.forEach((id) => searchParams.append(\"highlight\", id));\n } else {\n searchParams.delete(\"highlight\");\n }\n\n setHighlightedIds(newHighlights);\n\n // Update the URL and push to history\n history.push({\n pathname: location.pathname,\n search: searchParams.toString(),\n });\n } else {\n // We are not on the same ticket\n const ticketId = request?.linkedTicketIds[0];\n const queryParam = `highlight=${request?.replyIds.join(\"&highlight=\")}`;\n const newTabUrl = `/admin/locations/${locationId}/app#/tickets/${ticketId}?${queryParam}`;\n window.open(newTabUrl, \"_blank\");\n }\n };\n const handleLinkClick = (e, isInCurrentPath) => {\n if (isInCurrentPath) {\n e.preventDefault();\n }\n };\n\n return requests.map((request, index) => {\n const isSelected =\n request?.replyIds.length > 0 &&\n request?.replyIds?.every((id) => highlightedIds?.includes(String(id)));\n const isInCurrentPath =\n currentTicketId === String(request?.linkedTicketIds[0]);\n const isLastRow = index === requests.length - 1;\n\n return (\n <TableRow\n key={index}\n sx={{\n color: \"#fff\",\n ...(isLastRow && {\n \"& .MuiTableCell-root\": {\n borderBottom: \"none\",\n },\n }),\n }}\n >\n <TableCell>\n <Typography variant=\"h6\">{formatDate(request.date)}</Typography>\n </TableCell>\n <TableCell>\n <Typography variant=\"h6\">\n {request.reportedByStakeholderId === 1 ||\n request.reportedByStakeholderId === 2\n ? \"Client\"\n : \"Vendor\"}\n </Typography>\n </TableCell>\n <TableCell>\n <Link\n target=\"_blank\"\n href={`/admin/tickets/${request.linkedTicketIds[0]}/app`}\n onClick={(e) => handleLinkClick(e, isInCurrentPath)}\n underline=\"none\"\n sx={{\n color: isInCurrentPath ? \"#fff\" : \"#4FC1E9 !important\",\n \"&:hover\": {\n ...(isInCurrentPath ? { color: \"#fff\" } : {}),\n },\n }}\n >\n {isInCurrentPath ? \"This ticket\" : `#${request.linkedTicketIds[0]}`}\n </Link>\n </TableCell>\n <TableCell>\n <Tooltip title={formatDate(request.reportedAt)} arrow>\n <span>\n <TimeAgo date={request?.reportedAt} />\n </span>\n </Tooltip>\n </TableCell>\n <TableCell>\n <IconButton onClick={() => handleIconClick(request)}>\n <LinkIcon\n sx={{\n color: isSelected ? \"#4FC1E9\" : \"#fff\",\n }}\n />\n </IconButton>\n <DebugButton data={request} />\n </TableCell>\n </TableRow>\n );\n });\n};\n\nconst FailedVisitsCollapsible = ({ service }) => {\n const theme = useTheme();\n const typesContainerRef = useRef(null);\n const { latestVisitFailureReports: reports } = service;\n\n const [open, setOpen] = useState(true);\n const [hasOverflow, setHasOverflow] = useState(false);\n\n const requestsList = uniq(reports?.map((r) => r.type));\n\n useEffect(() => {\n const checkOverflow = () => {\n if (typesContainerRef.current) {\n setHasOverflow(\n typesContainerRef.current.scrollWidth >\n typesContainerRef.current.clientWidth\n );\n }\n };\n\n checkOverflow();\n window.addEventListener(\"resize\", checkOverflow);\n return () => window.removeEventListener(\"resize\", checkOverflow);\n }, [requestsList]);\n\n return (\n <>\n <Box onClick={() => setOpen(!open)} sx={{\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n minHeight: \"40px\",\n px: '10px',\n cursor: 'pointer',\n }}\n >\n <Box sx={{\n display: \"flex\",\n alignItems: \"center\",\n overflow: \"hidden\",\n }}\n >\n <Typography\n sx={{\n whiteSpace: \"nowrap\",\n }}\n >\n\n <strong>Failed Visit Reports</strong> <span>{reports?.length > 0 ? reports.length : \"None\"} </span> in last six months\n\n </Typography>\n <Box\n ref={typesContainerRef}\n sx={{\n display: \"flex\",\n overflow: \"hidden\",\n maxWidth: \"calc(100% - 200px)\",\n }}\n >\n\n </Box>\n </Box>\n {reports.length > 0 && (\n <IconButton\n disableRipple\n sx={{\n color: \"#fff\"\n }}\n >\n {open ? <ExpandLessIcon /> : <ExpandMoreIcon />}\n </IconButton>\n )}\n </Box>\n\n {reports?.length > 0 && (\n <Collapse\n in={open}\n timeout=\"auto\"\n unmountOnExit\n sx={{\n }}\n >\n <ReportsCards service={service} />\n </Collapse>\n )}\n </>\n );\n};\n\nexport default FailedVisitsCollapsible;\n","import { Box, Divider, Typography, Chip, Stack, Grid } from \"@mui/material\";\nimport { useTheme } from '@mui/material/styles';\nimport { TextSmallMuted, BoxVendorServiceArea } from 'sharedComponents';\nimport { Link } from \"react-router-dom\";\nimport { startCase } from \"lodash\";\nimport { useContext } from \"react\";\nimport { formatDate } from \"sharedUtils\";\nimport AppContext from \"ticket/AppContext\";\nimport { STATUS_COLORS } from \"./forms/common/VisitBoxButtons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faEye } from \"@fortawesome/free-solid-svg-icons\";\n\n\nimport { useBinFetch } from \"sharedUtils\";\n\n\n\nconst VendorHeader = ({ vendor, calendar }) => {\n\n const { nextVisit, lastVisit } = calendar;\n const { onSelectDate } = useContext(AppContext);\n const theme = useTheme();\n\n const getStatusColors = (visit) => {\n return theme['palette']['visits'][visit?.status] || {\n main: theme.palette.grey[400],\n contrastText: theme.palette.white,\n };\n };\n\n const lastVisitColors = getStatusColors(lastVisit);\n const nextVisitColors = getStatusColors(nextVisit);\n\n return (\n\n <>\n <BoxVendorServiceArea sx={{ pt: '6px' }}>\n <Stack direction=\"row\" spacing={2}>\n <Box sx={{ flex: 1, textAlign: 'left' }}>\n <strong>{vendor.name}</strong>\n <a href={`/admin/vendors/${vendor?.id}`}>\n <small>\n <FontAwesomeIcon icon={faEye} />\n </small>\n </a>\n <TextSmallMuted sx={{ pl: 2 }}> {vendor?.telephone} </TextSmallMuted>\n </Box>\n\n <Box sx={{ flex: 1, textAlign: 'right' }}>\n <Box\n component=\"img\"\n src={vendor.logo.header.url}\n alt={vendor.name}\n onClick={() => window.open(`/admin/vendors/${vendor?.id}`, \"_blank\")}\n sx={{\n cursor: \"pointer\",\n height: '20px',\n objectFit: \"contain\",\n }}\n />\n </Box>\n </Stack>\n </BoxVendorServiceArea>\n\n\n <BoxVendorServiceArea sx={{ pt: '6px', pb: '6px'}}>\n\n {/* <Stack direction=\"row\" spacing={2}>\n <Box sx={{ flex: 1, textAlign: 'center' }}>\n*/}\n\n\n <TextSmallMuted sx={{mr: 1}}>Next Visit</TextSmallMuted>\n\n <Box component=\"span\" sx={{ borderRadius: '16px', overflow: 'hidden' }}>\n <Chip\n label={nextVisit?.date && formatDate(nextVisit?.date)}\n onClick={() => onSelectDate(nextVisit?.date, \"visitDetails\")}\n size=\"small\"\n sx={{\n cursor: \"pointer\",\n fontWeight: 'bold',\n color: theme.palette.common.white,\n backgroundColor: \"#7BB841\",\n borderRadius: '16px 0 0 16px',\n '&:hover': { backgroundColor: nextVisitColors['main'] },\n }}\n />\n\n <Chip\n label={startCase(nextVisit?.status)}\n size=\"small\"\n sx={{\n color: nextVisitColors['contrastText'],\n backgroundColor: nextVisitColors['main'],\n borderRadius: '0 16px 16px 0',\n\n }}\n />\n </Box>\n\n\n {/* </Box>\n <Box sx={{ flex: 1, textAlign: 'center' }}>\n*/}\n\n\n <TextSmallMuted sx={{ml: 2, mr: 1}}>Last</TextSmallMuted>\n <Box component=\"span\" sx={{ borderRadius: '16px', overflow: 'hidden' }}>\n <Chip\n label={lastVisit?.date && formatDate(lastVisit?.date)}\n onClick={() => onSelectDate(lastVisit?.date, \"visitDetails\")}\n size=\"small\"\n sx={{\n cursor: \"pointer\",\n fontWeight: 'bold',\n color: theme.palette.common.white,\n backgroundColor: \"#7BB841\",\n borderRadius: '16px 0 0 16px',\n '&:hover': { backgroundColor: lastVisitColors['main'] },\n }}\n />\n\n <Chip\n label={startCase(lastVisit?.status)}\n size=\"small\"\n sx={{\n color: lastVisitColors['contrastText'],\n backgroundColor: lastVisitColors['main'],\n borderRadius: '0 16px 16px 0',\n\n }}\n />\n </Box>\n\n{/*\n </Box>\n </Stack>*/}\n\n </BoxVendorServiceArea>\n\n </>\n );\n\n};\n\nexport default VendorHeader;\n","import ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport HistoryIcon from '@mui/icons-material/History';\nimport ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';\nimport { styled } from '@mui/material/styles';\nimport { Collapse, Divider, IconButton, Link, Typography, Box, Stack, Grid, Chip, Tooltip } from \"@mui/material\";\nimport { TextSmallMuted, BoxVendorServiceArea, TextMuted } from 'sharedComponents';\nimport _, { first, map } from \"lodash\";\nimport { useState } from \"react\";\nimport { useBinFetch } from \"sharedUtils\";\nimport ServiceBoxContext from \"ticket/ServiceBoxContext\";\nimport BinDot from \"./BinDot\";\nimport { DebugButton } from \"./GlobalDebugger\";\nimport \"./service-box.scss\";\nimport { StatusRow } from \"./service-box/StatusRow\";\nimport VendorAccountLink from \"./service-box/VendorAccountLink\";\nimport { VisitFrequencyRow } from \"./service-box/VisitFrequencyRow\";\nimport VlcSection from \"./service-box/VlcSection\";\nimport { Specification } from \"./Specification\";\nimport { StreamIcon } from \"./utils/Icons\";\nimport { useTheme } from '@mui/material/styles';\n\n\n\nconst ServiceBox = ({\n service,\n openService,\n setOpenServiceMap: setOpenService,\n }) => {\n\n const theme = useTheme();\n\n const currentVendorLocationAccount: any = first(service?.serviceMappings);\n\n const specifications = service?.specifications;\n const billingHistoryUnitAverages = service?.billingHistoryUnitAverages;\n\n const [open, setOpen] = useState(true);\n\n const allCodes = _([\n _.map(specifications, \"serviceCode\"),\n _.map(billingHistoryUnitAverages, \"code\"),\n ]).flatten().uniq().value();\n\n const { binGroups } = useBinFetch(allCodes);\n\n const availableBinGroups = map(binGroups, (b, key) => {\n return <BinDot key={key} binGroup={b} tooltipName={true} tooltipPlace=\"top\" />;\n });\n\n const noSpecs = Object.keys(specifications).length === 0;\n\n return (\n\n\n <ServiceBoxContext.Provider value={{ currentVendorLocationAccount, }} >\n\n <Box>\n\n <Box sx={{ borderBottom: `1px solid ${theme.palette.borderGrey}`, padding: '3px',}}>\n\n <Grid container spacing={0}>\n <Grid item xs sx={{ alignItems: 'center' }}>\n\n <IconButton size=\"small\" onClick={() => setOpenService(!openService)}>\n {openService ? <ExpandLessIcon /> : <ExpandMoreIcon />}\n </IconButton>\n\n <TextSmallMuted><strong>{service?.title}</strong></TextSmallMuted>\n\n </Grid>\n <Grid item xs sx={{ alignItems: 'center', textAlign: 'right' }}>\n\n {!openService && (\n <>\n {allCodes.length > 0 && (\n <Chip label={availableBinGroups} size=\"small\" sx={{ paddingTop:'5px', backgroundColor: '#f5f5f5'}} />\n )}\n <Box component=\"span\" sx={{ pl: 1 }}><StatusRow service={service}/></Box>\n </>\n )}\n\n\n <Box component=\"span\" sx={{ pl: 1 }}>\n\n <DebugButton buttonSize=\"small\" { ...service} />\n\n {service?.streamUrl && (\n <IconButton size=\"small\" onClick={() => window.open(service?.streamUrl, \"_blank\")}>\n <StreamIcon/>\n </IconButton>\n )}\n\n </Box>\n\n\n </Grid>\n </Grid>\n\n </Box>\n\n\n <Collapse in={openService} timeout={0} unmountOnExit>\n\n <Box sx={{ borderBottom: `1px solid ${theme.palette.grey[200]}`, p: '6px', pl: '10px' }} >\n <VlcSection service={service} />\n </Box>\n\n\n <Stack direction=\"row\" sx={{borderBottom: `1px solid ${theme.palette.grey[200]}`, p: '6px', pl: '10px'}}>\n\n <Box sx={{ flex: 1, justifyContent: 'left', textAlign: 'left', alignItems: 'center'}}>\n <TextSmallMuted sx={{mr: 1}}>Freq.</TextSmallMuted>\n <VisitFrequencyRow service={service} />\n </Box>\n\n <Box sx={{ flex: 1, justifyContent: 'right', textAlign: 'right', alignItems: 'center'}}>\n\n <TextSmallMuted sx={{mr: 1}}>\n {noSpecs && \"Undefined\"} Specs\n </TextSmallMuted>\n\n {allCodes.length > 0 && (\n <Chip label={availableBinGroups} size=\"small\" sx={{ mr: 1, paddingTop:'5px', backgroundColor: '#f5f5f5'}} />\n )}\n\n\n <TextSmallMuted sx={{mr: 1}}>Status</TextSmallMuted>\n <StatusRow service={service} />\n\n <IconButton size=\"small\" sx={{ ml: 1 }}>\n <Tooltip title=\"Should open chart\" >\n <HistoryIcon/>\n </Tooltip>\n </IconButton>\n\n </Box>\n </Stack>\n\n <Box sx={{ borderBottom: `1px solid ${theme.palette.grey[200]}`, py: '6px', px: '0px' }} >\n <Specification {...service}/>\n </Box>\n </Collapse>\n\n </Box>\n\n\n </ServiceBoxContext.Provider>\n\n\n\n );\n};\n\nexport default ServiceBox;\n\n\n\n\n","import { createContext } from \"react\"\n\nconst ServiceBoxContext = createContext({\n currentVendorLocationAccount: {}\n})\n\nexport default ServiceBoxContext\n","import { alpha } from \"@material-ui/core\";\nimport AddCircleOutlineIcon from \"@mui/icons-material/AddCircleOutline\";\nimport CheckIcon from \"@mui/icons-material/Check\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport HourglassTopIcon from \"@mui/icons-material/HourglassTop\";\nimport {\n Box,\n Button,\n Card,\n CardContent,\n Chip,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n FormControlLabel,\n Radio,\n RadioGroup,\n Skeleton,\n Stack,\n Typography,\n} from \"@mui/material\";\nimport { useAddTicketMutation, useGetLocationTicketsQuery } from \"api/tickets\";\nimport dayjs from \"dayjs\";\nimport relativeTime from \"dayjs/plugin/relativeTime\";\nimport { orderBy, startCase } from \"lodash\";\nimport { useContext, useState } from \"react\";\nimport { useHistory } from \"react-router-dom\";\nimport TimeAgo from \"react-timeago\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport { formatDate } from \"sharedUtils\";\nimport { useTypedSelector } from \"ticket/app/store\";\nimport AppContext from \"ticket/AppContext\";\nimport { getLocationId } from \"ticket/selectors\";\n\ndayjs.extend(relativeTime);\n\nconst TicketsList = ({ vendor }) => {\n const history = useHistory();\n const locationId = getLocationId();\n const organisationId = useTypedSelector((state) => state.organisationId);\n const { data: tickets, isFetching: isFetchingTickets } =\n useGetLocationTicketsQuery(getLocationId());\n const [addTicket, { isLoading: isCreatingTicket }] = useAddTicketMutation();\n const { currentTicketId } = useContext(AppContext);\n\n const [open, setOpen] = useState(false);\n const [subject, setSubject] = useState(\"\");\n\n const handleClickOpen = () => {\n setOpen(true);\n };\n\n const handleClose = () => {\n setOpen(false);\n };\n\n const handleAddTicket = async () => {\n await addTicket({\n locationId: locationId,\n organisationId: organisationId,\n subject: subject,\n });\n handleClose();\n };\n\n const handleSubjectChange = (event) => {\n setSubject(event.target.value);\n };\n\n const handleTicketChange = (_event, newValue) => {\n if (newValue) {\n history.replace(`/tickets/${newValue.id}`);\n }\n };\n\n const filteredTickets = vendor && tickets ? tickets.filter(ticket => ticket.vendor.id === vendor.id) : tickets;\n const sortedTickets = orderBy(filteredTickets, [\"openedOn\"], [\"desc\"]);\n\n return (\n <Box\n sx={{\n \"*\": {\n fontSize: \"12px\",\n },\n }}\n >\n <Button\n variant=\"contained\"\n onClick={handleClickOpen}\n startIcon={<AddCircleOutlineIcon />}\n fullWidth\n sx={{\n background: \"#4FC1E9\",\n \"&:hover\": {\n backgroundColor: alpha(\"#4FC1E9\", 0.8),\n },\n }}\n >\n NEW TICKET\n </Button>\n <DebugButton\n {...tickets}\n sx={{\n position: \"absolute\",\n left: 0,\n }}\n />\n {isFetchingTickets || isCreatingTicket ? (\n <Box\n sx={{\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n height: \"100%\",\n width: \"100%\",\n backgroundColor: \"#E3E6E9\",\n }}\n >\n <Skeleton variant=\"rectangular\" width=\"100%\" height={100} />\n <Skeleton variant=\"rectangular\" width=\"100%\" height={100} />\n <Skeleton variant=\"rectangular\" width=\"100%\" height={100} />\n </Box>\n ) : (\n <>\n {Object.values(sortedTickets).map(\n (ticket) => {\n const isCurrentTicket = String(ticket.id) === currentTicketId;\n\n return (\n <Card\n key={ticket.id}\n sx={{\n borderRadius: 0,\n \"&:hover\": {\n cursor: \"pointer\",\n backgroundColor: \"#E3E6E9\",\n },\n \"& .MuiCardContent-root:last-child\": {\n pb: 2,\n },\n ...(isCurrentTicket && {\n backgroundColor: \"#E3E6E9\",\n }),\n }}\n onClick={(e) => handleTicketChange(e, ticket)}\n >\n <CardContent>\n <Box sx={{ display: \"flex\", gap: 1 }}>\n <Typography\n sx={{\n fontSize: \"12px\",\n color: \"#454F5E\",\n }}\n >\n #{ticket.id}\n </Typography>\n <Box sx={{ flex: 1 }}>\n <Box\n sx={{\n display: \"flex\",\n gap: 1,\n alignItems: \"baseline\",\n }}\n >\n <Typography\n sx={{\n fontSize: \"12px\",\n color: \"#454F5E\",\n }}\n >\n Opened by {ticket.openedByAssociationName}\n </Typography>\n <Typography sx={{ color: \"#777\", fontSize: \"10px\" }}>\n {formatDate(ticket.openedOn)}\n </Typography>\n </Box>\n\n <ClientStatus ticket={ticket} />\n\n <VendorStatus ticket={ticket} />\n\n {ticket.requests.length > 0 ||\n ticket.failedVisitReports.length > 0 ? (\n <>\n {ticket.requests.map((r) => (\n <Typography\n key={r.id}\n sx={{\n color: \"#777\",\n fontSize: \"10px\",\n display: \"flex\",\n alignItems: \"center\",\n \"& .MuiSvgIcon-root\": {\n fontSize: \"12px\",\n },\n }}\n >\n {r.title}\n {icon[r.status]}\n </Typography>\n ))}\n {ticket.failedVisitReports.map((r) => (\n <Typography\n key={r.id}\n sx={{\n color: \"#777\",\n fontSize: \"10px\",\n display: \"flex\",\n alignItems: \"center\",\n \"& .MuiSvgIcon-root\": {\n fontSize: \"12px\",\n },\n }}\n >\n Failed Visit Report\n {icon[\"cancelled\"]}\n </Typography>\n ))}\n </>\n ) : (\n <Typography sx={{ color: \"#777\", fontSize: \"10px\" }}>\n {ticket.subject}\n </Typography>\n )}\n\n {}\n </Box>\n\n <Box>\n {ticket.new && (\n <Chip\n label=\"New\"\n color=\"success\"\n size=\"small\"\n sx={{ mr: 1 }}\n />\n )}\n <TimeChip date={ticket.openedOn} />\n <Typography\n sx={{\n textAlign: \"end\",\n fontSize: \"12px\",\n color: ticket?.assignedAgent?.name\n ? \"orange\"\n : undefined,\n }}\n >\n {ticket?.assignedAgent?.name\n ? `${ticket.assignedAgent.name}`\n : \"Not Assigned\"}\n </Typography>\n </Box>\n </Box>\n </CardContent>\n </Card>\n );\n }\n )}\n </>\n )}\n\n <Dialog\n open={open}\n onClose={handleClose}\n sx={{ \"*\": { fontSize: \"12px\" } }}\n >\n <DialogTitle sx={{ background: \"#3BAFDA\", color: \"#fff\" }}>\n New Ticket\n </DialogTitle>\n <DialogContent sx={{ p: 2, pt: \"16px !important\" }}>\n <Typography sx={{ fontSize: \"12px\", mb: 1 }}>\n Type of Ticket\n </Typography>\n <RadioGroup value={subject} onChange={handleSubjectChange}>\n {subjects.map((option) => (\n <FormControlLabel\n key={option}\n value={option}\n control={<Radio size=\"small\" sx={{ p: 0 }} />}\n label={option}\n sx={{\n ml: 2,\n \"& .MuiFormControlLabel-label\": { fontSize: \"12px\" },\n }}\n />\n ))}\n </RadioGroup>\n </DialogContent>\n <DialogActions>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-end\"\n alignItems=\"center\"\n spacing={1}\n sx={{ width: \"100%\", borderTop: \"1px solid #ddd\" }}\n >\n <Button\n type=\"submit\"\n variant=\"contained\"\n onClick={handleAddTicket}\n color=\"success\"\n sx={{ fontSize: \"12px\", width: \"200px\" }}\n >\n Submit\n </Button>\n <Button\n variant=\"outlined\"\n color=\"info\"\n onClick={handleClose}\n sx={{ fontSize: \"12px\", width: \"200px\" }}\n >\n Cancel\n </Button>\n </Stack>\n </DialogActions>\n </Dialog>\n </Box>\n );\n};\n\nexport default TicketsList;\n\nconst icon = {\n confirmed: <CheckIcon sx={{ color: \"green\" }} />,\n awaiting_response: <HourglassTopIcon sx={{ color: \"orange\" }} />,\n cancelled: <CloseIcon sx={{ color: \"red\" }} />,\n};\n\nconst TimeChip = ({ date }) => {\n const now = dayjs();\n const requestDate = dayjs(date);\n const diffInHours = now.diff(requestDate, \"h\");\n const green = diffInHours < 2;\n const yellow = diffInHours >= 2 && diffInHours < 10;\n\n return (\n <Chip\n label={<TimeAgo date={date} />}\n sx={{\n fontSize: \"11px\",\n background: green ? \"#8CC152\" : yellow ? \"#DD9907\" : \"#CF2D42\",\n color: \"#fff\",\n }}\n size=\"small\"\n />\n );\n};\n\nconst subjects = [\n \"NHSE Emergency Collection\",\n \"Missed Collection\",\n \"Rescheduled Collection\",\n \"Ad-hoc Collection\",\n \"Stock Delivery\",\n \"Failed Like-for-like Replacements\",\n \"Service Issue\",\n \"Service Amendment\",\n \"General Question\",\n \"Documentation Required\",\n \"Pre-Acceptance Audit Required\",\n \"Direct Waste Order\",\n \"Product Order\",\n \"Stop Service\",\n];\n\nconst statusColor = {\n new_message: \"#CF2D42\",\n awaiting_response: \"#CF2D42\",\n no_response_required: \"#8CC152\",\n};\n\nconst VendorStatus = ({ ticket }) => {\n return (\n <Typography\n sx={{\n fontSize: \"12px\",\n color: \"#454F5E\",\n }}\n >\n {ticket?.vendor?.name ? startCase(ticket.vendor.name) : \"Vendor\"}{\" \"}\n <Typography\n component={\"span\"}\n sx={{\n fontSize: \"12px\",\n color: statusColor[ticket.vendorStatus],\n }}\n >\n {ticket.vendorStatus === \"inactive\"\n ? \"Not Included\"\n : startCase(ticket.vendorStatus)}\n </Typography>{\" \"}\n {ticket?.lastVendorReplyAt &&\n `on ${formatDate(ticket.lastVendorReplyAt)}`}\n </Typography>\n );\n};\n\nconst ClientStatus = ({ ticket }) => {\n return (\n <Typography\n sx={{\n fontSize: \"12px\",\n color: \"#454F5E\",\n }}\n >\n Client{\" \"}\n <Typography\n component={\"span\"}\n sx={{\n fontSize: \"12px\",\n color: statusColor[ticket.organisationStatus],\n }}\n >\n {startCase(ticket.organisationStatus)}\n </Typography>{\" \"}\n {ticket?.lastOrganisationReplyAt &&\n `on ${formatDate(ticket.lastOrganisationReplyAt)}`}\n </Typography>\n );\n};\n","import { DebugButton } from \"service/GlobalDebugger\";\nimport {\n Box,\n Card,\n CardContent,\n Collapse,\n List,\n Stack,\n Typography,\n} from \"@mui/material\";\nimport { SpecChangeRequest } from \"service/ticket/types\";\nimport { formatDate } from \"sharedUtils\";\nimport ShowMoreDivider from \"service/forms/common/ShowMoreDivider\";\nimport React, { useContext } from \"react\";\nimport SpecChangeRequestCardDetails from \"./SpecChangeRequestCardDetails\";\nimport AppContext from \"ticket/AppContext\";\nimport { ActionButtons } from \"./AdhocVisitRequestCard\";\nimport Debugger from \"service/forms/Debugger\";\nimport CustomTimelineNotes from \"service/forms/common/CustomTimeLineNotes\";\n\ninterface SpecChangeRequestCardProps {\n request: SpecChangeRequest;\n isOpen: boolean;\n toggleOpen: () => void;\n}\n\nconst SpecChangeRequestCard: React.FC<SpecChangeRequestCardProps> = ({\n request,\n isOpen,\n toggleOpen,\n}) => {\n const { notes } = request;\n\n const { selectedContainer } = useContext(AppContext);\n\n return (\n <Box\n sx={{\n p: 1,\n pt: 0,\n position: \"relative\",\n ...(selectedContainer === request.id && {\n \"& .MuiPaper-root\": {\n border: \"3px solid #6c8c89\",\n },\n }),\n }}\n key={request.id}\n data-link-card={request.id}\n >\n <Card\n variant=\"outlined\"\n sx={{\n borderRadius: 2,\n background: \"#262B30\",\n \"& .MuiCardContent-root:last-child\": {\n pb: 1,\n },\n \"& *\": {\n fontSize: \"12px\",\n color: \"#fff\",\n },\n }}\n >\n <CardContent>\n <Stack\n direction=\"row\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n spacing={1}\n >\n <Box display={\"flex\"} alignItems={\"center\"}>\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Spec Change Request\n </Typography>\n <Typography color=\"grey\" sx={{ ml: \"4px\", fontSize: \"10px\" }}>\n on {formatDate(request?.requestedAt)}\n </Typography>\n </Box>\n <ActionButtons\n // TODO: Add actions and active\n actions={request?.actions}\n isActive={request?.isActive}\n request={request}\n linkSelected={selectedContainer === request.id}\n />\n </Stack>\n\n <List sx={{ width: \"100%\" }} component=\"nav\">\n <ShowMoreDivider toggleOpen={toggleOpen} isOpen={isOpen} />\n\n <Collapse in={isOpen} timeout=\"auto\" unmountOnExit>\n <SpecChangeRequestCardDetails request={request} />\n <CustomTimelineNotes notes={notes} />\n </Collapse>\n </List>\n </CardContent>\n <DebugButton {...request} />\n </Card>\n </Box>\n );\n};\n\nexport default SpecChangeRequestCard;\n","import React from \"react\";\nimport { SpecChangeRequest, Specification } from \"service/ticket/types\";\nimport { Table, TableCell, TableHead, TableRow } from \"@mui/material\";\nimport {\n StyledTableBody,\n StyledTableContainer,\n StyledTableRow,\n} from \"service/forms/common/CustomTable\";\nimport BinDot from \"service/BinDot\";\nimport { useBinFetch } from \"sharedUtils\";\nimport { startCase } from \"lodash\";\n\ninterface SpecChangeRequestCardDetailsProps {\n request: SpecChangeRequest;\n}\n\nconst SpecChangeRequestCardDetails: React.FC<\n SpecChangeRequestCardDetailsProps\n> = ({ request }) => {\n const { binTypes, binGroups } = useBinFetch();\n const specificationRows = Object.entries(request.specifications).map(\n ([code, spec]: [string, Specification]) => {\n const binType = binTypes[spec?.serviceCode];\n const binGroup = binGroups[binType?.binGroupId];\n\n return (\n <TableRow key={code}>\n <TableCell scope=\"row\">\n <BinDot\n binGroup={binGroup}\n tooltipName={true}\n tooltipPlace=\"top\"\n showImg\n {...binType}\n />\n </TableCell>\n\n <TableCell>{spec.serviceCode}</TableCell>\n <TableCell>{spec.quantity}</TableCell>\n <TableCell>{startCase(spec.visitActionId)}</TableCell>\n </TableRow>\n );\n }\n );\n\n return (\n <>\n <StyledTableContainer>\n <Table size=\"small\">\n <TableHead>\n <StyledTableRow>\n <TableCell>Type</TableCell>\n <TableCell>Service Code</TableCell>\n <TableCell>Quantity</TableCell>\n <TableCell>Visit Action ID</TableCell>\n </StyledTableRow>\n </TableHead>\n <StyledTableBody>{specificationRows}</StyledTableBody>\n </Table>\n </StyledTableContainer>\n </>\n );\n};\n\nexport default SpecChangeRequestCardDetails;\n","import { DebugButton } from \"service/GlobalDebugger\";\nimport {\n Box,\n Card,\n CardContent,\n Collapse,\n List,\n Stack,\n Typography,\n} from \"@mui/material\";\nimport { VisitFrequencyChangeRequest } from \"service/ticket/types\";\nimport { formatDate } from \"sharedUtils\";\nimport ShowMoreDivider from \"service/forms/common/ShowMoreDivider\";\nimport React, { useContext } from \"react\";\nimport { ActionButtons } from \"./AdhocVisitRequestCard\";\nimport AppContext from \"ticket/AppContext\";\nimport Debugger from \"service/forms/Debugger\";\nimport CustomTimelineNotes from \"service/forms/common/CustomTimeLineNotes\";\n\ninterface VisitFrequencyChangeRequestCardProps {\n request: VisitFrequencyChangeRequest;\n isOpen: boolean;\n toggleOpen: () => void;\n}\n\nconst VisitFrequencyChangeRequestCard: React.FC<\n VisitFrequencyChangeRequestCardProps\n> = ({ request, isOpen, toggleOpen }) => {\n const { notes } = request;\n const { selectedContainer } = useContext(AppContext);\n\n return (\n <Box\n sx={{\n p: 1,\n pt: 0,\n position: \"relative\",\n ...(selectedContainer === request.id && {\n \"& .MuiPaper-root\": {\n border: \"3px solid #6c8c89\",\n },\n }),\n }}\n key={request.id}\n data-link-card={request.id}\n >\n <Card\n variant=\"outlined\"\n sx={{\n borderRadius: 2,\n background: \"#262B30\",\n \"& .MuiCardContent-root:last-child\": {\n pb: 1,\n },\n \"& *\": {\n fontSize: \"12px\",\n color: \"#fff\",\n },\n }}\n >\n <CardContent>\n <Stack\n direction=\"row\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n spacing={1}\n >\n <Box display={\"flex\"} alignItems={\"center\"}>\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Visit Frequency Change Request\n </Typography>\n <Typography color=\"grey\" sx={{ ml: \"4px\", fontSize: \"10px\" }}>\n on {formatDate(request?.requestedAt)}\n </Typography>\n </Box>\n <ActionButtons\n actions={request?.actions}\n isActive={request?.isActive}\n request={request}\n linkSelected={selectedContainer === request.id}\n />\n </Stack>\n\n <Typography>Change to {request?.requestedVisitPlanName}</Typography>\n\n {notes && notes.length > 0 && (\n <List sx={{ width: \"100%\" }} component=\"nav\">\n <ShowMoreDivider toggleOpen={toggleOpen} isOpen={isOpen} />\n\n <Collapse in={isOpen} timeout=\"auto\" unmountOnExit>\n <CustomTimelineNotes notes={notes} />\n </Collapse>\n </List>\n )}\n </CardContent>\n\n <DebugButton {...request} />\n </Card>\n </Box>\n );\n};\n\nexport default VisitFrequencyChangeRequestCard;\n","import LinkIcon from \"@mui/icons-material/Link\";\nimport {\n Box,\n Card,\n CardContent,\n Chip,\n Collapse,\n IconButton,\n Link,\n Stack,\n Typography,\n} from \"@mui/material\";\nimport { Contact } from \"api/tickets\";\nimport { useGetLocationRemediationQuery } from \"api/services\";\nimport { flatMap, camelCase, mapKeys } from \"lodash\";\nimport { useContext, useMemo, useState } from \"react\";\nimport { useHistory, useLocation } from \"react-router-dom\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport {\n DownArrowIcon,\n RemediationIcon,\n UpArrowIcon,\n} from \"service/utils/Icons\";\nimport { formatDate } from \"sharedUtils\";\nimport AppContext from \"ticket/AppContext\";\nimport { getLocationId, useTicket } from \"ticket/selectors\";\n\nconst ServiceTerminationRequestCard = ({ request }) => {\n const { stakeholderContacts } = useTicket() || {};\n\n const history = useHistory();\n const location = useLocation();\n const locationId = getLocationId();\n const {\n currentTicketId,\n highlightedIds,\n setHighlightedIds,\n onOpenRemediation,\n setRequestedAtDate,\n setEventId,\n setServiceUuid,\n setRequestType\n } = useContext(AppContext);\n\n const remediationData = useGetLocationRemediationQuery(locationId, {skip: !locationId}).data?.remediation;\n const remediation = remediationData ? mapKeys(remediationData, (_, k) => camelCase(k)) : null;\n\n const [open, setOpen] = useState(true);\n\n // Get all stakeholders\n const allStakeholders: Contact[] = flatMap(\n stakeholderContacts || [],\n (x) => x\n );\n\n // Find who inputted the request\n // TODO: Get inputtedById on the request ?\n const inputtedBy = allStakeholders?.find(\n (x) => x.id === request?.inputtedById\n );\n\n const isSelected = useMemo(() => {\n return (\n request?.replyIds.length > 0 &&\n request?.replyIds?.every((id) => highlightedIds?.includes(String(id)))\n );\n }, [highlightedIds]);\n\n const isInCurrentPath =\n currentTicketId === String(request?.linkedTicketIds[0]);\n\n const toggleHighlightedReplies = () => {\n const searchParams = new URLSearchParams(location.search);\n\n if (String(request.linkedTicketIds[0]) === currentTicketId) {\n // We're on the same ticket\n let newHighlights = [];\n\n if (isSelected) {\n // If this request is already selected, deselect it\n newHighlights = [];\n } else {\n // If this request is not selected, select it and deselect others\n newHighlights = [...request.replyIds];\n }\n\n // Update search params\n searchParams.delete(\"highlight\");\n if (newHighlights.length > 0) {\n newHighlights.forEach((id) => searchParams.append(\"highlight\", id));\n }\n\n setHighlightedIds(newHighlights);\n\n // Update the URL and push to history\n history.replace({\n pathname: location.pathname,\n search: searchParams.toString(),\n });\n } else {\n // We are not on the same ticket\n const ticketId = request?.linkedTicketIds[0];\n const queryParam = `highlight=${request?.replyIds.join(\"&highlight=\")}`;\n const newTabUrl = `/admin/locations/${locationId}/app#/tickets/${ticketId}?${queryParam}`;\n window.open(newTabUrl, \"_blank\");\n }\n };\n\n return (\n <>\n <Box\n sx={{\n mx: -2,\n \"& .MuiPaper-root\": {\n borderRadius: \"0px\",\n },\n \"& .MuiCardContent-root:last-child\": {\n pb: 1,\n },\n }}\n key={request.id}\n data-link-card={request.id}\n >\n <Card\n variant=\"outlined\"\n sx={{\n background: \"#1E1E1E\",\n }}\n >\n <CardContent sx={{ pt: 1 }}>\n <Stack\n direction=\"row\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n spacing={1}\n sx={{}}\n >\n <Box>\n <Typography\n sx={{ fontSize: \"13px\", fontWeight: \"700\", color: \"#BFBFBF\" }}\n >\n Service Termination Request\n {!request.date && !request.cancelledAt && (\n <Typography\n component=\"span\"\n sx={{\n fontSize: \"13px\",\n fontWeight: \"700\",\n color: \"#FFA600\",\n }}\n >\n {\" \"}\n Awaiting Date\n </Typography>\n )}\n </Typography>\n </Box>\n <Box\n sx={{\n \"& .MuiSvgIcon-root\": {\n fontSize: \"14px\",\n color: \"#5F6369\",\n },\n }}\n >\n {isInCurrentPath ? (\n <IconButton onClick={() => toggleHighlightedReplies()}>\n <LinkIcon\n sx={{\n color: isSelected ? \"#4FC1E9 !important\" : \"###5F6369\",\n }}\n />\n </IconButton>\n ) : (\n <Link\n onClick={() => toggleHighlightedReplies()}\n underline=\"none\"\n sx={{\n fontSize: \"11px\",\n cursor: \"pointer\",\n color: \"#5F6369\",\n \"&:hover\": {\n ...(isInCurrentPath ? { color: \"#5F6369\" } : {}),\n },\n }}\n >\n #{request?.linkedTicketIds[0]}\n </Link>\n )}\n <IconButton onClick={() => setOpen(!open)}>\n {open ? <UpArrowIcon /> : <DownArrowIcon />}\n </IconButton>\n\n {\n (!remediation || remediation.status == \"cancelled\") && <IconButton\n onClick={() => {\n setRequestedAtDate(request?.requestedAt);\n setEventId(request?.id);\n setRequestType(request?.type);\n setServiceUuid(request?.serviceUuid);\n onOpenRemediation();\n }}>\n <RemediationIcon />\n </IconButton>\n }\n <DebugButton {...request} />\n </Box>\n </Stack>\n\n <Box\n sx={{\n mx: -2,\n my: \"3px\",\n borderBottom: \"1px solid #5F6369\",\n }}\n />\n\n <Box\n sx={{\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n }}\n >\n <Typography\n sx={{ fontSize: \"13px\", fontWeight: \"400\", color: \"#BFBFBF\" }}\n >\n Service Termination\n </Typography>\n <Typography\n color=\"grey\"\n sx={{ fontSize: \"11px\", color: \"#5F6369\" }}\n >\n Requested on{\" \"}\n <span style={{ color: \"#828B98\" }}>\n {formatDate(request?.requestedAt)}\n </span>{\" \"}\n by{\" \"}\n <span style={{ color: \"#828B98\" }}>\n {inputtedBy?.nameWithoutEmail || \"No Agent\"}\n </span>\n </Typography>\n </Box>\n\n <Collapse in={open} timeout=\"auto\" unmountOnExit>\n <Typography sx={{ fontSize: \"13px\", color: \"#828B98\" }}>\n Vendor has been requested to terminate the service from{\" \"}\n {formatDate(request?.requestedAt)}\n </Typography>\n {request?.finalCollectionRequired && (\n <Typography sx={{ fontSize: \"13px\", color: \"#828B98\" }}>\n Final Collection Required Before:{\" \"}\n {formatDate(request?.finalCollectionRequiredBefore)}\n </Typography>\n )}\n {request?.confirmedAt ? (\n <Typography sx={{ fontSize: \"13px\", color: \"#828B98\" }}>\n Service termination confirmed\n <Typography\n component=\"span\"\n sx={{ fontSize: \"11px\", color: \"#828B98\" }}\n >\n {\" \"}\n on{\" \"}\n <span style={{ color: \"#BFBFBF\" }}>\n {formatDate(request?.confirmedAt)}\n </span>{\" \"}\n by{\" \"}\n <span style={{ color: \"#BFBFBF\" }}>\n {inputtedBy?.nameWithoutEmail || \"No Agent\"}\n </span>\n </Typography>\n </Typography>\n ) : request?.cancelledAt ? (\n <Typography sx={{ fontSize: \"13px\", color: \"#828B98\" }}>\n Service termination cancelled on{\" \"}\n <span style={{ color: \"red\" }}>\n {formatDate(request?.cancelledAt)}\n </span>{\" \"}\n <Typography component=\"span\" sx={{ fontSize: \"11px\" }}>\n by{\" \"}\n <span style={{ color: \"#BFBFBF\" }}>\n {inputtedBy?.nameWithoutEmail || \"No Agent\"}\n </span>\n </Typography>\n </Typography>\n ) : (\n <Typography sx={{ fontSize: \"13px\", color: \"#828B98\" }}>\n Service termination confirmed for{\" \"}\n <Chip\n label=\"Awaiting Date\"\n size=\"small\"\n sx={{\n background: \"#5F6369\",\n color: \"#BFBFBF\",\n fontSize: \"11px\",\n fontWeight: \"bold\",\n }}\n />\n </Typography>\n )}\n </Collapse>\n </CardContent>\n </Card>\n </Box>\n </>\n );\n};\n\nexport default ServiceTerminationRequestCard;\n","import { DebugButton } from \"service/GlobalDebugger\";\nimport {\n Box,\n Card,\n CardContent,\n Collapse,\n List,\n Stack,\n Typography,\n} from \"@mui/material\";\nimport { formatDate } from \"sharedUtils\";\nimport ShowMoreDivider from \"service/forms/common/ShowMoreDivider\";\nimport React, { useContext } from \"react\";\nimport { ServiceResumptionRequest } from \"service/ticket/types\";\nimport AppContext from \"ticket/AppContext\";\nimport { ActionButtons } from \"./AdhocVisitRequestCard\";\nimport Debugger from \"service/forms/Debugger\";\nimport CustomTimelineNotes from \"service/forms/common/CustomTimeLineNotes\";\n\ninterface ServiceResumptionRequestCardProps {\n request: ServiceResumptionRequest;\n isOpen: boolean;\n toggleOpen: () => void;\n}\n\nconst ServiceResumptionRequestCard: React.FC<\n ServiceResumptionRequestCardProps\n> = ({ request, isOpen, toggleOpen }) => {\n const { notes } = request;\n const { selectedContainer } = useContext(AppContext);\n\n return (\n <Box\n sx={{\n p: 1,\n pt: 0,\n position: \"relative\",\n ...(selectedContainer === request.id && {\n \"& .MuiPaper-root\": {\n border: \"3px solid #6c8c89\",\n },\n }),\n }}\n data-link-card={request.id}\n >\n <Card\n variant=\"outlined\"\n sx={{\n borderRadius: 2,\n background: \"#262B30\",\n \"& .MuiCardContent-root:last-child\": { pb: 1 },\n \"& *\": { fontSize: \"12px\", color: \"#fff\" },\n }}\n >\n <CardContent>\n <Stack\n direction=\"row\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n spacing={1}\n >\n <Box display={\"flex\"} alignItems={\"center\"}>\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Service Resumption Request\n </Typography>\n <Typography color=\"grey\" sx={{ ml: \"4px\", fontSize: \"10px\" }}>\n on {formatDate(request?.requestedAt)}\n </Typography>\n </Box>\n <ActionButtons\n actions={request?.actions}\n isActive={request?.isActive}\n request={request}\n linkSelected={selectedContainer === request.id}\n />\n </Stack>\n\n <Typography>\n Vendor has confirmed resumption of service from{\" \"}\n {formatDate(request?.noVisitsExpectedAfter)}\n </Typography>\n\n {notes && notes.length > 0 && (\n <List sx={{ width: \"100%\" }} component=\"nav\">\n <ShowMoreDivider toggleOpen={toggleOpen} isOpen={isOpen} />\n <Collapse in={isOpen} timeout=\"auto\" unmountOnExit>\n <CustomTimelineNotes notes={notes} />\n </Collapse>\n </List>\n )}\n </CardContent>\n <DebugButton {...request} />\n </Card>\n </Box>\n );\n};\n\nexport default ServiceResumptionRequestCard;\n","import {\n Timeline,\n TimelineContent,\n TimelineItem,\n timelineItemClasses,\n TimelineOppositeContent,\n timelineOppositeContentClasses,\n} from \"@mui/lab\";\nimport {\n Box,\n Card,\n CardContent,\n Collapse,\n List,\n Stack,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TableRow,\n Typography,\n} from \"@mui/material\";\nimport _ from \"lodash\";\nimport { formatDate } from \"sharedUtils\";\nimport PartialCollectionTooltip from \"./PartialCollectionTooltip\";\nimport ReportVisitFailureCardTable from \"./ReportVisitFailureCardTable\";\nimport ShowMoreDivider from \"service/forms/common/ShowMoreDivider\";\nimport DarkTooltip from \"service/forms/common/DarkTooltip\";\nimport React, { useMemo } from \"react\";\nimport { FailedVisitReport } from \"service/ticket/types\";\n\ninterface ReportVisitFailureCardProps {\n report: FailedVisitReport;\n toggleOpen: (open: any) => void;\n isOpen: boolean;\n}\n\nconst collectedResults = {\n total_failure: \"Nothing collected\",\n partial_failure: \"Some collected\",\n success: \"All stock collected\",\n};\n\nconst deliveredResults = {\n total_failure: \"Nothing delivered\",\n partial_failure: \"Some delivered\",\n success: \"All stock delivered\",\n};\n\nexport const colorForSlug = {\n success: \"#0FA764\",\n total_failure: \"#FF5733\",\n partial_failure: \"#ed6c02\",\n};\n\nconst ReportVisitFailureCard: React.FC<ReportVisitFailureCardProps> = ({\n report,\n toggleOpen,\n isOpen,\n}) => {\n const allFeedback = useMemo(() => {\n return _.orderBy(\n [...report?.feedback, ...report?.clientFeedback],\n \"reportedAt\",\n \"desc\"\n );\n }, [report]);\n\n return (\n <Box sx={{ }}>\n <Card\n variant=\"outlined\"\n sx={{\n borderRadius: 2,\n background: \"#262B30\",\n \"& .MuiCardContent-root:last-child\": {\n pb: 1,\n },\n \"& .MuiTypography-root\": {\n fontSize: \"12px\",\n color: \"#fff\",\n },\n }}\n >\n <CardContent>\n <Stack\n direction=\"row\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n spacing={1}\n >\n <Box display=\"flex\" alignItems=\"center\">\n <Typography fontWeight=\"bold\" variant=\"h5\">\n Failure Visit Report\n </Typography>\n\n <Typography\n sx={{\n ml: \"4px\",\n color: \"grey !important\",\n fontSize: \"10px !important\",\n }}\n >\n for {formatDate(report?.reportedAt)}\n </Typography>\n </Box>\n </Stack>\n <Typography className=\"custom-typography\" fontWeight=\"bold\">\n Visit failed on{\" \"}\n <span style={{ color: colorForSlug.total_failure }}>\n {formatDate(report?.date)}\n </span>\n </Typography>\n <ReportVisitFailureCardTable report={report} />\n <List sx={{ width: \"100%\" }} component=\"nav\">\n <ShowMoreDivider toggleOpen={toggleOpen} isOpen={isOpen} />\n <Collapse\n in={isOpen}\n timeout=\"auto\"\n unmountOnExit\n sx={{ color: \"#fff\" }}\n >\n <TableContainer>\n <Table\n size=\"small\"\n sx={{\n \"& .MuiTableCell-root\": {\n color: \"#FFFFFF\",\n fontSize: \"12px\",\n fontWeight: \"bold\",\n borderBottom: \"1px solid #323B45\",\n },\n \"& .MuiTypography-root\": {\n fontWeight: \"bold\",\n },\n }}\n >\n <TableHead>\n <TableRow>\n <TableCell>RECEIVED</TableCell>\n <TableCell>STAKEHOLDER</TableCell>\n <TableCell>COLLECTION</TableCell>\n <TableCell>DELIVERY</TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n <TableRow>\n <TableCell>\n <Typography noWrap>\n {formatDate(report.reportedAt)}\n </Typography>\n </TableCell>\n <TableCell>\n {report.reportedByStakeholderId === 1 ||\n report.reportedByStakeholderId === 2\n ? \"CLIENT\"\n : \"VENDOR\"}\n </TableCell>\n <TableCell>\n <DarkTooltip\n arrow\n title={\n report?.collectionResultSlug ===\n \"partial_failure\" && (\n <PartialCollectionTooltip feedback={report} />\n )\n }\n >\n <Typography\n noWrap\n sx={{\n color: `${\n colorForSlug[report.collectionResultSlug]\n } !important`,\n }}\n >\n {collectedResults[report.collectionResultSlug]}\n </Typography>\n </DarkTooltip>\n </TableCell>\n <TableCell>\n <Typography\n noWrap\n sx={{\n color: `${\n colorForSlug[report.deliveryResultSlug]\n } !important`,\n }}\n >\n {deliveredResults[report.deliveryResultSlug]}\n </Typography>\n </TableCell>\n </TableRow>\n {allFeedback.map((feedback, index) => (\n <TableRow key={`combined-${index + 1}`}>\n <TableCell>{formatDate(feedback.reportedAt)}</TableCell>\n <TableCell>{feedback.type.toUpperCase()}</TableCell>\n <TableCell>\n <DarkTooltip\n arrow\n title={\n feedback?.collectionResultSlug ===\n \"partial_failure\" && (\n <PartialCollectionTooltip feedback={feedback} />\n )\n }\n >\n <Typography\n noWrap\n sx={{\n color: `${\n colorForSlug[feedback.collectionResultSlug]\n } !important`,\n }}\n >\n {collectedResults[feedback.collectionResultSlug]}\n </Typography>\n </DarkTooltip>\n </TableCell>\n <TableCell>\n <Typography\n noWrap\n sx={{\n color: `${\n colorForSlug[feedback.deliveryResultSlug]\n } !important`,\n }}\n >\n {deliveredResults[feedback.deliveryResultSlug]}\n </Typography>\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </TableContainer>\n <Timeline\n sx={{\n pb: 0,\n [`& .${timelineOppositeContentClasses.root}`]: {\n flex: 0.2,\n },\n [`& .${timelineItemClasses.root}`]: {\n minHeight: 0,\n },\n }}\n >\n {report?.notes.map((note) => (\n <TimelineItem key={note.timestamp}>\n <TimelineOppositeContent>\n <Typography variant=\"h6\">{note.userName}</Typography>\n <Typography variant=\"h6\" color=\"gray\" noWrap>\n on {formatDate(note.timestamp)}\n </Typography>\n </TimelineOppositeContent>\n\n <TimelineContent>\n <p>{note.text}</p>\n </TimelineContent>\n </TimelineItem>\n ))}\n </Timeline>\n </Collapse>\n </List>\n </CardContent>\n </Card>\n </Box>\n );\n};\n\nexport default ReportVisitFailureCard;\n","import React from \"react\";\nimport { Tooltip } from \"@mui/material\";\nimport PartialCollectionTooltip from \"./PartialCollectionTooltip\";\nimport { startCase } from \"lodash\";\nimport { colorForSlug } from \"./ReportVisitFailureCard\";\nimport { FailedVisitReport } from \"service/ticket/types\";\n\ninterface ReportVisitFailureCardTableProps {\n report: FailedVisitReport;\n}\n\nconst ReportVisitFailureCardTable: React.FC<\n ReportVisitFailureCardTableProps\n> = ({ report }) => {\n const { feedback, visitReport } = report;\n\n const getFailureReason = (type: \"collection\" | \"delivery\") => {\n const feedbackSlug = feedback?.[`${type}FailureReasonSlug`];\n const visitReportSlug = visitReport?.[`${type}ResultSlug`];\n return feedbackSlug || visitReportSlug;\n };\n\n const collectionFailureReason = getFailureReason(\"collection\");\n const deliveryFailureReason = getFailureReason(\"delivery\");\n\n const tableStyles = {\n width: \"100%\",\n fontWeight: \"bold\" as const,\n color: \"#979797\",\n fontSize: \"12px\",\n marginTop: \"5px\",\n tableLayout: \"fixed\" as const,\n };\n\n const ResultCell: React.FC<{ type: \"collection\" | \"delivery\" }> = ({\n type,\n }) => {\n const slug = visitReport?.[`${type}ResultSlug`];\n return (\n <td style={{ color: colorForSlug[slug || \"\"] }}>\n <Tooltip\n title={\n slug === \"partial_failure\" && type === \"collection\" ? (\n <PartialCollectionTooltip feedback={report?.visitReport} />\n ) : null\n }\n arrow\n >\n <div>\n {generateResultTooltipText(\n slug,\n type === \"collection\" ? \"collected\" : \"delivered\",\n )}\n </div>\n </Tooltip>\n </td>\n );\n };\n\n return (\n <table style={tableStyles}>\n <thead>\n <tr>\n <th></th>\n <th>Collection</th>\n <th>Delivery</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Feedback</td>\n <ResultCell type=\"collection\" />\n <ResultCell type=\"delivery\" />\n </tr>\n {(collectionFailureReason || deliveryFailureReason) && (\n <tr>\n <td>Reason for Failure</td>\n <td style={{ color: \"#fff\" }}>\n {startCase(collectionFailureReason)}\n </td>\n <td style={{ color: \"#fff\" }}>\n {startCase(deliveryFailureReason)}\n </td>\n </tr>\n )}\n </tbody>\n </table>\n );\n};\n\nexport default ReportVisitFailureCardTable;\n\nconst generateResultTooltipText = (\n resultSlug: string | undefined,\n type: string,\n): string => {\n switch (resultSlug) {\n case \"total_failure\":\n return `Nothing was ${type}`;\n case \"partial_failure\":\n return `Some was ${type}`;\n case \"success\":\n return `All stock was ${type}`;\n default:\n return \"\";\n }\n};\n","import { useState, useEffect } from \"react\";\n\nconst groupBinsByGroup = (\n vendorServiceCodes,\n vendorServiceMappings,\n binTypes\n) => {\n let grouped = {};\n vendorServiceCodes.forEach(code => {\n const mappedCode = vendorServiceMappings[code];\n if (mappedCode) {\n if (mappedCode.match(/^ABC-/)) {\n\n const btc = binTypes[mappedCode].binGroupId;\n if (btc in grouped) {\n grouped[btc].push(mappedCode);\n } else {\n grouped[btc] = [mappedCode];\n }\n }\n } else {\n if (\"Unmapped\" in grouped) {\n grouped[\"Unmapped\"].push(code);\n } else {\n grouped[\"Unmapped\"] = [code];\n }\n }\n });\n return grouped;\n};\n\nconst useOnScreen = ref => {\n const [isIntersecting, setIntersecting] = useState(false);\n\n const observer = new IntersectionObserver(([entry]) =>\n setIntersecting(entry.isIntersecting)\n );\n\n useEffect(() => {\n if (ref.current) {\n observer.observe(ref.current);\n }\n // Remove the observer as soon as the component is unmounted\n return () => {\n observer.disconnect();\n };\n }, []);\n\n return isIntersecting;\n};\n\nconst statusToText = status => {\n switch (status) {\n case \"success\":\n return \"Success Reported\";\n case \"failure\":\n return \"Failure Reported\";\n case \"conflict\":\n return \"Conflicting Reports\";\n case \"unknown\":\n return \"Status Unknown\";\n case \"assumed\":\n return \"Service Assumed\";\n case \"cancelled\":\n return \"Service Cancelled\";\n case \"planned\":\n return \"Service Planned\";\n default:\n return status.charAt(0).toUpperCase() + status.slice(1);\n }\n};\n\nexport {\n groupBinsByGroup,\n useOnScreen,\n statusToText\n};\n","import {\n Box,\n Card,\n CardContent,\n Divider,\n IconButton,\n Tooltip,\n Typography,\n} from \"@mui/material\";\nimport Link from \"@mui/material/Link\";\nimport TableRow from \"@mui/material/TableRow\";\nimport _, { isEmpty, map, startCase, upperCase } from \"lodash\";\nimport { FC, useState } from \"react\";\nimport { formatDate, useVendorServiceMappingsFetch } from \"sharedUtils\";\nimport { getLocationId, useDeveloper } from \"ticket/selectors\";\nimport DebuggerCollapsible from \"./forms/common/DebuggerCollapsible\";\nimport { VendorInvoiceTable } from \"./forms/common/InvoiceCollapse\";\nimport PdfModal from \"./forms/common/PdfModal\";\nimport {\n ConditionalButton,\n FailureButton,\n InfoButton,\n STATUS_COLORS,\n SuccessButton,\n VisitPlanButton,\n} from \"./forms/common/VisitBoxButtons\";\nimport VisitBoxTable, { StyledCell } from \"./forms/common/VisitBoxTable\";\nimport {\n DebugIcon,\n FailureIcon,\n HWCNIcon,\n InvoiceIcon,\n PlanIcon,\n ServiceIcon,\n} from \"./forms/common/VisitIcons\";\nimport PartialCollectionTooltip from \"./report-request-box/PartialCollectionTooltip\";\n\ninterface DataPointLinkProps {\n messageGid: string;\n children?: React.ReactNode;\n}\n\nconst DataPointLink: FC<DataPointLinkProps> = ({ messageGid, children }) =>\n messageGid ? (\n <Link\n target=\"_blank\"\n href={`https://mail.google.com/mail?authuser=data@anenta.com#all/${messageGid}`}\n underline=\"none\"\n sx={{ color: \"#3BAFDA !important\" }}\n >\n {children || \"Source\"}\n </Link>\n ) : null;\n\nconst TicketLink = ({ ticketId }) => {\n const locationId = getLocationId();\n\n return ticketId ? (\n <Link\n target=\"_blank\"\n href={`/admin/locations/${locationId}/app#/tickets/${ticketId}`}\n underline=\"none\"\n sx={{ color: \"#3BAFDA !important\" }}\n >\n Ticket #{ticketId}\n </Link>\n ) : null;\n};\n\nconst VisitBox = ({ visit, locationServiceVendors, startOpen = false }) => {\n const { planSourcesMap, failureSourcesMap, serviceReportSources } = visit;\n\n const [openDebugger, setOpenDebugger] = useState(false);\n const [isPdfModalOpen, setPdfModalOpen] = useState(false);\n const [currentPdfUrl, setCurrentPdfUrl] = useState(\"\");\n\n const isDeveloper = useDeveloper();\n\n const vendor = locationServiceVendors?.[visit?.vendorId]?.vendor;\n\n const vendorServiceMappings = useVendorServiceMappingsFetch(visit?.vendorId);\n\n const getDefaultSelected = () => {\n if (visit?.hasInvoice) return \"invoice\";\n if (!isEmpty(planSourcesMap)) return \"plan\";\n if (visit?.hasHwcn) return \"hwcn\";\n if (!isEmpty(serviceReportSources)) return \"service\";\n if (!isEmpty(failureSourcesMap)) return \"failure\";\n return null;\n };\n\n const [selected, setSelected] = useState(\n startOpen ? getDefaultSelected() : null\n );\n //const [selected, setSelected] = useState(null);\n\n const handleSelection = (type) => {\n setSelected(selected === type ? null : type);\n // if (selected !== type) {\n // setSelected(type);\n // }\n };\n\n const visitPlanRows = map(\n visit?.planSourcesMap,\n (\n {\n type,\n vendorLocationCode,\n messageGid,\n ticketId,\n routeNames,\n receivedOn,\n },\n index\n ) => (\n <TableRow key={index}>\n <StyledCell>{startCase(type)}</StyledCell>\n <StyledCell>{vendorLocationCode}</StyledCell>\n <StyledCell>{routeNames?.join(\", \")}</StyledCell>\n <StyledCell>{formatDate(receivedOn)}</StyledCell>\n <StyledCell>\n <TicketLink ticketId={ticketId} />\n <DataPointLink messageGid={messageGid} />\n </StyledCell>\n </TableRow>\n )\n );\n\n //TODO add cancelledSourcesMap and figure out why next_routine_confirmation has not changed the schedule nor is it in the plan\n\n const vendorDataFailureReportContext = _.filter(\n visit?.failureSourcesMap,\n (failure) => failure.vendorLocationCode\n );\n const vendorDataFailureRows = _.map(\n vendorDataFailureReportContext,\n (failure, index) => (\n <TableRow key={index}>\n {renderCell(failure.type)}\n {renderCell(failure.vendorLocationCode)}\n {renderCell(formatDate(failure.reportedAt))}\n {renderCell(failure.messageGid, (gid) => (\n <DataPointLink messageGid={gid} />\n ))}\n </TableRow>\n )\n );\n\n const failureVisitReportContext = _.filter(\n visit?.failureSourcesMap,\n (failure) => !failure?.vendorLocationCode\n );\n\n const failureVisitReportRows = _.map(\n [\n ...failureVisitReportContext,\n ...(visit?.clientFailureFeedback ?? []),\n ...(visit?.vendorFailureFeedback ?? []),\n ],\n (visit) => (\n <TableRow>\n {renderCell(startCase(visit?.type))}\n {renderCollectionResult(visit)}\n {renderDeliveryResult(visit)}\n {renderCell(formatDate(visit?.reportedAt))}\n {renderCell(visit?.ticketId, (ticketId) => (\n <TicketLink ticketId={ticketId} />\n ))}\n </TableRow>\n )\n );\n\n const hwcnRows = map(\n visit?.hwcnSources,\n ({ type, code, vendorLocationCode, derived, pdfUrl }, index) => (\n <TableRow key={index}>\n <StyledCell>{upperCase(type)}</StyledCell>\n <StyledCell>{code}</StyledCell>\n <StyledCell>\n <Link\n target=\"_blank\"\n href={`/admin/vendors/${\n visit?.vendorId\n }/location_mappings/${encodeURIComponent(vendorLocationCode)}`}\n underline=\"none\"\n sx={{ color: \"#3BAFDA !important\" }}\n >\n {derived ? \"Using Descriptor\" : vendorLocationCode}\n </Link>\n </StyledCell>\n <StyledCell>\n {/* <DataPointLink messageGid={messageGid} /> */}\n {pdfUrl && (\n <Link\n underline=\"none\"\n sx={{ color: \"#3BAFDA !important\" }}\n onClick={() => {\n setCurrentPdfUrl(pdfUrl);\n setPdfModalOpen(true);\n }}\n >\n View\n </Link>\n )}\n </StyledCell>\n </TableRow>\n )\n );\n\n const serviceReportRows = map(\n visit?.serviceReportSources,\n ({ type, vendorLocationCode, pdfUrl }, index) => (\n <TableRow key={index}>\n <StyledCell>{vendorLocationCode}</StyledCell>\n <StyledCell>{type}</StyledCell>\n <StyledCell>\n {/* <DataPointLink messageGid={messageGid} /> */}\n {pdfUrl && (\n <Link\n underline=\"none\"\n sx={{ color: \"#3BAFDA !important\" }}\n onClick={() => {\n setCurrentPdfUrl(pdfUrl);\n setPdfModalOpen(true);\n }}\n >\n View\n </Link>\n )}\n </StyledCell>\n </TableRow>\n )\n );\n\n return (\n <>\n <Card\n sx={{\n position: \"relative\",\n background: \"#2D3240\",\n border: `2px solid ${STATUS_COLORS[visit?.status]}`,\n borderTopWidth: \"4px\",\n minWidth: \"500px\",\n mt: 1,\n \"& .MuiTypography-root\": { color: \"#fff\", fontSize: \"12px\" },\n \"& .MuiCardContent-root:last-child\": {\n paddingBottom: 0,\n },\n }}\n >\n <CardContent sx={{ m: 2, p: 0 }}>\n <Header vendor={vendor} visit={visit} />\n <Divider />\n\n <Box\n sx={{\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n mb: 1,\n }}\n >\n <Typography\n sx={{ fontWeight: \"bold\", fontSize: \"14px !important\" }}\n >\n {visit?.title}\n </Typography>\n\n {/* TODO: Refactor, same code */}\n <Box display=\"flex\" gap={1}>\n <ConditionalButton\n condition={!isEmpty(failureSourcesMap)}\n text=\"Failure Report\"\n ButtonComponent={\n <FailureButton\n startIcon={<FailureIcon />}\n selected={selected === \"failure\"}\n onClick={() => handleSelection(\"failure\")}\n >\n Failure Report\n </FailureButton>\n }\n />\n\n <ConditionalButton\n condition={!isEmpty(serviceReportSources)}\n text=\"Service Report\"\n ButtonComponent={\n <InfoButton\n startIcon={<ServiceIcon />}\n selected={selected === \"service\"}\n onClick={() => handleSelection(\"service\")}\n >\n Service Report\n </InfoButton>\n }\n />\n </Box>\n </Box>\n\n <Box sx={{ display: \"flex\", justifyContent: \"space-between\", mb: 1 }}>\n <ConditionalButton\n condition={!isEmpty(planSourcesMap)}\n text=\"Visit Plan\"\n ButtonComponent={\n <VisitPlanButton\n startIcon={<PlanIcon />}\n selected={selected === \"plan\"}\n onClick={() => handleSelection(\"plan\")}\n >\n Visit Plan\n </VisitPlanButton>\n }\n />\n\n <Box display=\"flex\" gap={1}>\n <ConditionalButton\n condition={visit?.hasInvoice}\n text=\"Invoice\"\n ButtonComponent={\n <SuccessButton\n startIcon={<InvoiceIcon />}\n selected={selected === \"invoice\"}\n onClick={() => handleSelection(\"invoice\")}\n >\n {visit?.invoiceSources?.length === 1\n ? `${visit?.invoiceSources[0].number}`\n : \"Invoiced\"}\n </SuccessButton>\n }\n />\n\n <ConditionalButton\n condition={visit?.hasHwcn}\n text=\"HWCN\"\n ButtonComponent={\n <InfoButton\n startIcon={<HWCNIcon />}\n selected={selected === \"hwcn\"}\n onClick={() => handleSelection(\"hwcn\")}\n >\n HWCN\n </InfoButton>\n }\n />\n </Box>\n </Box>\n\n {!isEmpty(planSourcesMap) && selected === \"plan\" && (\n <VisitBoxTable\n rows={visitPlanRows}\n headers={[\"type\", \"VLC\", \"Frequency\", \"Received On\", \"View\"]}\n />\n )}\n {!isEmpty(vendorDataFailureReportContext) &&\n selected === \"failure\" && (\n <>\n <VisitBoxTable\n rows={vendorDataFailureRows}\n headers={[\"type\", \"VLC\", \"reportedAt\", \"View\"]}\n />\n </>\n )}\n {!isEmpty(failureVisitReportRows) && selected === \"failure\" && (\n <VisitBoxTable\n rows={failureVisitReportRows}\n headers={[\n \"type\",\n \"collection result\",\n \"delivery result\",\n \"reportedAt\",\n \"view\",\n ]}\n />\n )}\n\n {!isEmpty(visit?.invoiceSources) && selected === \"invoice\" && (\n <VendorInvoiceTable\n invoiceSources={visit?.invoiceSources}\n vendorId={visit?.vendorId}\n vendorServiceMappings={vendorServiceMappings}\n />\n )}\n {!isEmpty(visit?.hwcnSources) && selected === \"hwcn\" && (\n <VisitBoxTable\n rows={hwcnRows}\n headers={[\"type\", \"code\", \"VLC\", \"View\"]}\n />\n )}\n {!isEmpty(visit?.serviceReportSources) && selected === \"service\" && (\n <VisitBoxTable\n rows={serviceReportRows}\n headers={[\"VLC\", \"Type\", \"View\"]}\n />\n )}\n </CardContent>\n {isDeveloper && (\n <>\n <IconButton\n sx={{\n position: \"absolute\",\n right: 0,\n top: 0,\n color: \"white\",\n padding: \"5px\",\n fontSize: \"10px\",\n }}\n onClick={() => setOpenDebugger(!openDebugger)}\n >\n <DebugIcon\n sx={{ color: \"rgb(139, 147, 171)\", fontSize: \"10px\" }}\n />\n </IconButton>\n <DebuggerCollapsible data={visit} open={openDebugger} />\n </>\n )}\n </Card>\n <PdfModal\n open={isPdfModalOpen}\n onClose={() => setPdfModalOpen(false)}\n pdfUrl={currentPdfUrl}\n />\n </>\n );\n};\n\nconst Header = ({ vendor, visit }) => {\n return (\n <Box sx={{ display: \"flex\", justifyContent: \"space-between\", gap: 2 }}>\n <Box\n component=\"img\"\n src={\n vendor?.logoOnDark?.url || vendor?.logo?.white_silhouette_header?.url\n }\n alt={vendor?.name}\n sx={{\n height: \"30px\",\n }}\n />\n\n <Typography fontWeight=\"bold\">\n {visit?.type}{\" \"}\n <span style={{ color: `${STATUS_COLORS[visit?.status]}` }}>\n {startCase(visit?.status)}\n </span>\n </Typography>\n </Box>\n );\n};\n\nfunction renderCell(value, renderFunction = (val) => val) {\n return <StyledCell>{value ? renderFunction(value) : \" \"}</StyledCell>;\n}\n\nconst renderCollectionResult = (visit) => {\n if (\n visit?.collectionResult === \"Total Failure\" &&\n visit?.type !== \"VendorFailureFeedback\"\n )\n return renderCell(visit?.collectionResult);\n if (visit?.collectionResult !== \"Success\") {\n return (\n <Tooltip\n title={\n <>\n {visit?.collectionFailureReason && (\n <div>Reason for failure: {visit?.collectionFailureReason}</div>\n )}\n {visit?.collectionResult === \"Partial Failure\" && (\n <PartialCollectionTooltip\n feedback={{\n collectedBinGroupIds: visit.collectedBinGroupIds,\n uncollectedBinGroupIds: visit.uncollectedBinGroupIds,\n }}\n />\n )}\n </>\n }\n arrow\n >\n {renderCell(visit.collectionResult)}\n </Tooltip>\n );\n }\n return renderCell(visit.collectionResult);\n};\n\nconst renderDeliveryResult = (visit) => {\n if (visit?.deliveryResult !== \"Success\" && visit?.deliveryFailureReason) {\n return (\n <Tooltip\n title={<div>Reason for failure: {visit?.deliveryFailureReason}</div>}\n arrow\n >\n {renderCell(visit.deliveryResult)}\n </Tooltip>\n );\n }\n return renderCell(visit.deliveryResult);\n};\n\nexport default VisitBox;\n","import Collapse from \"@mui/material/Collapse\";\n\nconst DebuggerCollapsible = ({ data, open }) => {\n return (\n <Collapse in={open}>\n <pre\n style={{\n whiteSpace: \"pre-wrap\",\n wordBreak: \"break-word\",\n overflowX: \"auto\",\n maxWidth: \"100%\",\n color: \"#000\",\n }}\n >\n {JSON.stringify(data, null, 2)}\n </pre>\n </Collapse>\n );\n};\n\nexport default DebuggerCollapsible;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport DarkTooltip from 'service/forms/common/DarkTooltip';\nimport { Typography } from \"@mui/material\";\n\n// Tooltips content\nconst statusTooltipContentPast = {\n \"Failure Reported\": \"A failure has been reported by either the client or vendor. Currently, there's no evidence to indicate that the intended visit has occurred.\",\n \"Success Reported\": \"Evidence indicates that the visit was successful. There have been no contrary reports of failure.\",\n \"Conflicting Reports\": \"There is conflicting information regarding this visit; it has been reported as both successful and failed by the vendor or client. Further investigation may be required.\",\n \"Status Unknown\": \"No evidence is available to confirm the occurrence of the expected visits. The status remains unknown, and updates are awaited.\",\n};\n\n\nconst statusTooltipContentFuture = {\n \"Service Planned\": \"This service date has been explicitly confirmed by the vendor's operational departments, indicating a scheduled upcoming visit.\",\n \"Service Assumed\": \"Based on historical frequency data from the vendor's operational departments, the timing of this visit is assumed and not explicitly confirmed.\",\n \"Service Cancelled\": \"Information indicates that this previously planned visit has been cancelled. The cancellation may be due to instructions from us or an advance notice from the vendor.\",\n};\n\n// Function to create status divs with tooltips\nconst createStatusDivsWithTooltips = (statusTooltipContent) => {\n return Object.entries(statusTooltipContent).map(([status, tooltipContent]) => {\n const key = status.replace(/\\s+/g, '-').toLowerCase();\n return (\n <DarkTooltip key={key} arrow title={<Typography style={{ fontSize: '1.5rem' }}>{tooltipContent}</Typography>}>\n <div className={'status status-' + key}>{status}</div>\n </DarkTooltip>\n );\n });\n};\n\nconst StatusBar = () => {\n const statusesPastDivs = createStatusDivsWithTooltips(statusTooltipContentPast);\n const statusesFutureDivs = createStatusDivsWithTooltips(statusTooltipContentFuture);\n\n return (\n <div className=\"statuses\">\n <div className=\"statuses-past\">\n <div className=\"status-title\">Past</div>\n <div className=\"statuses-list\">\n {statusesPastDivs}\n </div>\n </div>\n <div className=\"statuses-future\">\n <div className=\"status-title\">Future</div>\n <div className=\"statuses-list\">\n {statusesFutureDivs}\n </div>\n </div>\n </div>\n );\n};\n\nStatusBar.propTypes = {};\n\nexport default StatusBar;\n\n\n\n\n//const statusTooltipContentPast = {\n //\"Failure Reported\": \"Failure has been reported by the client or vendor and no data has been provided to suggest that a visit has occured\",\n //\"Success Reported\": \"We have data that reports that this visit was successful. No reports of failure has been provided. Collecitons with Evidence\",\n //\"Conflicting Reports\": \"We have data that both suggests this visit was successful however it waas also reported as failed by either the vendor or client. \",\n //\"Status Unknown\": \"Expected collections with no Evidence. There is no data that suggests anything has occured. Awaiting updates.\",\n//};\n\n//const statusTooltipContentFuture = {\n //\"Service Planned\": \"Upcomping service date that was explicitly confirmed by vendor operation departments\",\n //\"Service Assumed\": \"Visit days are assumed based of the previous frequency data provdided by vendor operation departments. \",\n //\"Service Cancelled\": \"We have data to suggest that this previously planned visit will no longer occur. Either becayse we instructed the vendor to not go or they informed us in advance it was not going to occur. \",\n//};\n\n","import { Box, Card, CardContent, Typography } from \"@mui/material\";\nimport { useEffect, useState } from \"react\";\nimport RequestsCards from \"./report-request-box/RequestsCards\";\nimport FailedVisitsCollapsible from \"./service-box/FailedVisitsCollapsible\";\nimport OutstandingRequestsCollapsible from \"./service-box/OutstandingRequestsCollapsible\";\nimport VendorHeader from \"./VendorHeader\";\nimport ServiceBox from \"./ServiceBox\";\nimport { useTheme } from '@mui/material/styles';\nimport { useGetAllLocationRemediationsQuery } from \"api/services\";\nimport { getLocationId } from \"ticket/selectors\";\nimport { mapKeys, camelCase } from \"lodash\";\n\nconst LocationServicesVendorBox = ({\n vendor,\n services,\n calendar,\n initialOpenState,\n}) => {\n const [openServiceMap, setOpenServiceMap] = useState({});\n\n const theme = useTheme();\n\n useEffect(() => {\n const newOpenServiceMap = {};\n services?.forEach((service) => {\n if (\n service?.status === \"terminated\" ||\n service?.status === \"account_closed\"\n ) {\n newOpenServiceMap[service.id] = false;\n } else {\n newOpenServiceMap[service.id] = initialOpenState;\n }\n });\n setOpenServiceMap(newOpenServiceMap);\n }, [services, initialOpenState]);\n\n const handleOpenServiceChange = (serviceId, isOpen) => {\n setOpenServiceMap((prevState) => ({\n ...prevState,\n [serviceId]: isOpen,\n }));\n };\n\n const locationId = getLocationId();\n const remediationsData = useGetAllLocationRemediationsQuery(locationId, {skip: !locationId}).data?.remediations || [];\n const remediations = remediationsData.map(remediation => mapKeys(remediation, (_, key) => camelCase(key)));\n\n return (\n <Box sx={{background: 'white', borderRadius: '4px' }}>\n\n <VendorHeader vendor={vendor} calendar={calendar} />\n\n {services?.map((service, key) => (\n <Box key={key}>\n <ServiceBox\n key={service.id}\n service={service}\n openService={openServiceMap[service.id]}\n setOpenServiceMap={(isOpen) =>\n handleOpenServiceChange(service.id, isOpen)\n }\n />\n\n <Box sx={{\n background: '#23272D',\n color: \"#fff\",\n borderRadius: '0 0 4px 4px',\n border: '1px solid #656D78',\n borderTop: 'none',\n }}>\n {openServiceMap[service.id] && (\n <Box sx={{\n // borderBottom: `1px dashed #656D78`,\n }}\n >\n <FailedVisitsCollapsible service={service} />\n </Box>\n )}\n\n <RequestsCards requests={service?.requests} remediations={remediations} />\n\n {openServiceMap[service.id] && (\n <Box sx={{ px: '10px', mt: 0 }}>\n <OutstandingRequestsCollapsible service={service} />\n </Box>\n )}\n </Box>\n </Box>\n ))}\n </Box>\n );\n};\n\n\n\nexport default LocationServicesVendorBox;\n","import { Alert, Box } from \"@mui/material\";\nimport { useGetLocationVisitsQuery } from \"api/calendar\";\nimport { LocationServiceVendor } from \"api/services\";\nimport { map } from \"lodash\";\nimport { FC } from \"react\";\nimport VisitBox from \"service/VisitBox\";\nimport { getLocationId } from \"ticket/selectors\";\n\ninterface VisitDetailsProps {\n onBack: () => void;\n locationServiceVendors?: LocationServiceVendor;\n date: string;\n}\n\nlet VisitDetails: FC<VisitDetailsProps> = ({\n locationServiceVendors,\n date,\n}) => {\n const locationId = getLocationId();\n\n const { data, isFetching: isVisitsFetching } = useGetLocationVisitsQuery(\n {\n locationId,\n date,\n },\n { skip: !date } // Skip the query if date is null or undefined\n );\n\n if (isVisitsFetching) {\n return <div>Loading...</div>;\n } else {\n if (!data?.visits[date]) {\n return (\n <Box padding={2}>\n <Alert severity=\"warning\" sx={{ p: 1, fontSize: \"14px\" }}>\n There is no data for this date\n </Alert>\n </Box>\n );\n } else {\n return (\n <>\n {map(data.visits[date], (v, index) => {\n return (\n <VisitBox\n startOpen={true}\n visit={v}\n key={index}\n locationServiceVendors={locationServiceVendors}\n />\n );\n })}\n </>\n );\n }\n }\n};\n\nexport default VisitDetails;\n","import { useEffect, useState } from \"react\";\n\nexport const useFetch = (url, opts) => {\n const [data, setData] = useState(null);\n const [loaded, setLoaded] = useState(false);\n const [hasError, setHasError] = useState(false);\n\n useEffect(() => {\n // Define an async function inside useEffect\n const fetchData = async () => {\n if (url) {\n try {\n setLoaded(false);\n const response = await fetch(url, opts);\n const result = await response.json();\n setData(result);\n setLoaded(true);\n } catch (error) {\n console.error(\"Error fetching data: \", error);\n setHasError(true);\n setLoaded(true);\n }\n }\n };\n\n // Call the async function\n fetchData();\n }, [url]);\n\n return [data, setData, loaded, hasError];\n};\n","import { Checkbox, MenuItem, Select, Typography } from \"@mui/material\";\nimport dayjs from \"dayjs\";\nimport { useEffect, useState } from \"react\";\nimport { formatDate } from \"sharedUtils\";\n\nconst AssumedCancelledVisits = ({\n potentialCancellationDates,\n selectedDates,\n setSelectedDates,\n onSetForm,\n ...props\n}) => {\n const handleChange = (event) => {\n const { value } = event.target;\n\n const newValue = typeof value === \"string\" ? value.split(\",\") : value;\n onSetForm({\n cancelledVisitDates: newValue,\n });\n setSelectedDates(newValue);\n };\n\n useEffect(() => {\n if (potentialCancellationDates.length > 0) {\n setSelectedDates(potentialCancellationDates);\n }\n }, potentialCancellationDates);\n\n return (\n <Select\n value={selectedDates}\n multiple\n fullWidth\n onChange={handleChange}\n size=\"small\"\n renderValue={(selected) =>\n selected.map((date) => dayjs(date).format(\"Do MMM\")).join(\", \")\n }\n {...props}\n >\n {potentialCancellationDates.map((date) => (\n <MenuItem key={date} value={date} sx={{ \"& *\": { fontSize: \"12px\" } }}>\n <Checkbox checked={selectedDates.indexOf(date) > -1} />\n <Typography>\n {formatDate(date)} will be marked as Cancelled\n </Typography>\n </MenuItem>\n ))}\n </Select>\n );\n};\n\nexport default AssumedCancelledVisits;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _ from \"lodashExtended\";\nimport Select from \"react-select\";\n\nconst VisitActionSelector = ({\n visitActionId,\n possibleVisitActions,\n disabledCollect = false,\n onChange,\n defaultValue,\n}) => {\n const options = _.map(possibleVisitActions, ({ name, id, isCollected }) => {\n return { label: name, value: id, isCollected };\n });\n\n const defaultOption = _.find(options, { value: defaultValue });\n\n return (\n <Select\n menuPosition=\"fixed\"\n styles={{\n control: (provided, state) => ({\n ...provided,\n minHeight: \"30px\",\n height: \"30px\",\n boxShadow: state.isFocused ? null : null,\n }),\n valueContainer: (provided, state) => ({\n ...provided,\n height: \"30px\",\n }),\n input: (provided, state) => ({\n ...provided,\n margin: \"0px\",\n }),\n indicatorsContainer: (provided, state) => ({\n ...provided,\n height: \"30px\",\n }),\n }}\n options={options}\n // isClearable\n isOptionDisabled={(option) => disabledCollect && option.isCollected}\n value={_.find(options, { value: visitActionId }) || defaultOption}\n onChange={(option) => {\n let { value = null } = option || {};\n onChange(value);\n }}\n />\n );\n};\n\nVisitActionSelector.propTypes = {\n visitActionId: PropTypes.string,\n possibleVisitActions: PropTypes.arrayOf(\n PropTypes.shape({\n name: PropTypes.string.isRequired,\n id: PropTypes.string.isRequired,\n }),\n ),\n onChange: PropTypes.func.isRequired,\n disabledCollect: PropTypes.bool,\n defaultValue: PropTypes.string,\n};\n\nexport default VisitActionSelector;\n","import BinDot from \"service/BinDot\";\nimport { HeaderDetails, QuantitySelector } from \"./QuantitySelector\";\nimport RemoveIcon from \"@mui/icons-material/Remove\";\nimport {\n IconButton,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TableRow,\n} from \"@mui/material\";\nimport _ from \"lodash\";\n\nconst DeliveryUnitsTable = ({\n headerDetailsHandler,\n deliveryUnits,\n binTypes,\n binGroups,\n updateDeliveryQuantity,\n removeUnit,\n availableDeliveryOptions,\n}) => {\n const noOptions = availableDeliveryOptions.length === 0;\n const deliveryRows = _.map(deliveryUnits, ({ serviceCode, quantity }) => {\n const binTypeInfo = binTypes[serviceCode] || {};\n const { name = \"\", binGroupId, imageUrl } = binTypeInfo;\n const binGroup = binGroups[binGroupId];\n\n return (\n <TableRow key={serviceCode}>\n <TableCell scope=\"row\">\n <BinDot binGroup={binGroup} tooltipName={true} />\n </TableCell>\n <TableCell>\n {imageUrl && (\n <img\n src={imageUrl}\n alt={name}\n style={{ marginRight: \"10px\", width: \"30px\", height: \"30px\" }}\n />\n )}\n {name}\n </TableCell>\n <TableCell>{serviceCode}</TableCell>\n <TableCell style={{ width: \"10%\" }}>\n <QuantitySelector\n quantity={quantity}\n onChange={(q) => updateDeliveryQuantity(q, serviceCode)}\n />\n </TableCell>\n <TableCell>\n <IconButton\n sx={{\n m: 0,\n p: 0,\n }}\n >\n <RemoveIcon\n fontSize=\"large\"\n onClick={(_e) => removeUnit(serviceCode)}\n sx={{\n cursor: \"pointer\",\n fontSize: \"35px\",\n color: \"red\",\n display: \"block\",\n margin: \"auto\",\n }}\n />\n </IconButton>\n </TableCell>\n </TableRow>\n );\n });\n return (\n <>\n <HeaderDetails onClick={headerDetailsHandler} noOptions={noOptions} />\n <TableContainer\n sx={{\n marginY: 1,\n \"& .MuiTableCell-root\": {\n fontSize: \"11px\",\n fontWeight: \"inherit\",\n color: \"inherit\",\n },\n }}\n >\n <Table size=\"small\">\n <TableHead>\n <TableRow\n sx={{\n textWrap: \"nowrap\",\n fontWeight: \"bold\",\n color: \"#828B98\",\n border: \"1px solid transparent\",\n }}\n >\n <TableCell>Type</TableCell>\n <TableCell>Name</TableCell>\n <TableCell>Code</TableCell>\n <TableCell>Deliver Additional Units</TableCell>\n <TableCell></TableCell>\n </TableRow>\n </TableHead>\n <TableBody\n sx={{\n \"& .MuiTableCell-root\": {\n borderTop: \"1px solid #F1F1F5\",\n borderBottom: \"1px solid #F1F1F5\",\n padding: 0,\n },\n }}\n >\n {deliveryRows}\n </TableBody>\n </Table>\n </TableContainer>\n </>\n );\n};\n\nexport default DeliveryUnitsTable;\n","import { Box } from \"@mui/material\";\n\nconst ThreeColumnFlexBox = ({ children }) => (\n <Box\n sx={{\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-evenly\",\n alignItems: \"center\",\n gap: 1,\n my: 1,\n \"& > *\": {\n flex: 1,\n },\n }}\n >\n {children}\n </Box>\n);\n\nexport default ThreeColumnFlexBox;\n","export const scrollToBottom = () => {\n const footer = document.querySelector(\".footer\");\n if (footer) {\n footer.scrollIntoView({ behavior: \"smooth\", block: \"end\" });\n }\n};\n\nexport const extractIdFromUrl = (url) => {\n const regex =\n /\\/(service_actions|stock_delivery_requests|adhoc_visit_requests|failed_visit_reports)\\/([0-9a-fA-F-]+)/;\n const match = url?.match(regex);\n return match ? match[2] : \"\";\n};\n","import {\n Box,\n ToggleButton,\n ToggleButtonGroup,\n Typography,\n} from \"@mui/material\";\nimport { startCase } from \"lodash\";\nimport { useContext } from \"react\";\nimport { MessageFormContext } from \"../NewMessageActionForm\";\nimport ReportProblemIcon from \"@mui/icons-material/ReportProblem\";\nimport { TypoError } from \"sharedComponents\";\n\n\n\nexport const ResponseExpectedToggleButton = ({ disabled, channel }) => {\n // Get both organisationResponse & vendorResponse\n const { [channel + \"Response\"]: channelResponse } =\n useContext(MessageFormContext);\n\n return (\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 1,\n minHeight: \"35px\",\n }}\n >\n {disabled ? (\n <TypoError sx={{ fontSize: \"12px\", display: \"flex\" }}>\n <strong>Requires a response from the{\" \"} {startCase(channel)}</strong>\n </TypoError>\n ) : (\n <>\n <Typography sx={{ fontSize: \"12px\" }}>\n Does this message requries a response from the{\" \"}\n <b>{startCase(channel)}</b> ?\n </Typography>\n <ToggleButtonGroup\n size=\"small\"\n value={channelResponse.responseExpected}\n exclusive\n onChange={() =>\n channelResponse.setResponseExpected(\n !channelResponse.responseExpected,\n )\n }\n sx={{\n \"& .MuiToggleButton-root\": {\n py: 0,\n fontSize: \"12px\",\n textTransform: \"none\",\n backgroundColor: \"#fff\",\n \"&.Mui-selected\": {\n backgroundColor: \"#007bff\",\n color: \"#fff\",\n \"&:hover\": {\n backgroundColor: \"#0056b3\",\n },\n },\n },\n \"& .MuiToggleButtonGroup-grouped\": {\n borderRadius: 1,\n mx: 0,\n },\n }}\n >\n <ToggleButton value={true}>Yes</ToggleButton>\n <ToggleButton value={false}>No</ToggleButton>\n </ToggleButtonGroup>\n </>\n )}\n </Box>\n );\n};\n","import React from \"react\";\nimport { Select, MenuItem } from \"@mui/material\";\nimport { useTicket } from \"ticket/selectors\";\nimport { useGetAppQuery } from \"api/tickets\";\n\nconst AgentSelect = ({ assignedAgentId, setAssignedAgentId }) => {\n const { data: appData } = useGetAppQuery();\n\n const onChange = (e) => {\n setAssignedAgentId(e.target.value);\n };\n\n return (\n <Select\n value={assignedAgentId}\n onChange={onChange}\n displayEmpty\n renderValue={(selected) => {\n if (selected === \"\" || selected === \"unassigned\") {\n return \"Unassigned\";\n }\n const selectedAgent = appData?.agentsMap?.find(\n (agent: any) => agent.id === selected\n );\n return selectedAgent ? selectedAgent.name : \"Unassigned\";\n }}\n sx={{\n textWrap: \"nowrap\",\n backgroundColor: '#E2E2EA',\n maxHeight: '33px',\n '& .MuiSelect-root': { padding: 0, },\n '& .MuiOutlinedInput-notchedOutline': { border: 'none', },\n }}\n >\n <MenuItem value={\"\"}>Unassigned</MenuItem>\n {appData?.agentsMap?.map((agent: any) => (\n <MenuItem key={agent.id} value={agent.id}>\n {agent.name}\n </MenuItem>\n ))}\n </Select>\n );\n};\n\nexport default AgentSelect;\n","import {\n Alert,\n Box,\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n IconButton,\n Stack,\n Tooltip,\n Typography,\n} from \"@mui/material\";\nimport { useFormServiceActionMutation } from \"api/services\";\nimport { useState } from \"react\";\nimport NotesSection from \"service/forms/common/NotesSection\";\nimport { useService } from \"ticket/selectors\";\nimport BlockIcon from \"@mui/icons-material/Block\";\n\nconst LogActionButton = ({ event }) => {\n const [dialogOpen, setDialogOpen] = useState(false);\n const handleOpenDialog = () => {\n setDialogOpen(true);\n };\n const onClose = () => {\n setDialogOpen(false);\n };\n return (\n <>\n <Tooltip title=\"Void\" arrow placement=\"top\">\n\n <Button variant=\"outlined\" size=\"small\" color=\"error\" onClick={handleOpenDialog}>Void</Button>\n\n </Tooltip>\n\n {dialogOpen && (\n <VoidFormDialog\n serviceUuid={event?.data?.serviceUuid}\n eventId={event?.data?.eventId}\n onClose={onClose}\n dialogOpen={dialogOpen}\n />\n )}\n </>\n );\n};\n\nconst VoidFormDialog = ({ serviceUuid, eventId, onClose, dialogOpen }) => {\n const service = useService(serviceUuid);\n\n const [formData, setFormData] = useState({ notes: \"\" });\n const [submitForm] = useFormServiceActionMutation();\n\n const submitHandler = () => {\n submitForm({\n url: service?.voidRequestActionUrl,\n body: {\n form: {\n voidEventId: eventId,\n notes: formData?.notes,\n },\n },\n })\n .unwrap()\n .then(onClose)\n .catch((error) => {\n console.log(error);\n });\n };\n\n return (\n <>\n <Dialog open={dialogOpen} onClose={onClose}>\n <DialogTitle sx={{ fontWeight: \"bold\", fontSize: \"12px\" }}>\n Void Service Action\n </DialogTitle>\n <DialogContent sx={{ p: \"8px 16px\" }}>\n <Alert severity=\"error\" sx={{ fontSize: \"12px\" }}>\n <p>\n Voiding this action will remove all assocated records in vector.\n This will NOT revoke any requests already sent to the vendor. This\n should only be used in the case that at reply was incorrectly\n tagged.{\" \"}\n </p>\n\n <p>\n If the request is no longer needed, use the cancelation feature.\n If the data was inputted incorrectly, void and then re-tag\n </p>\n </Alert>\n <NotesSection form={formData} onSetForm={setFormData} />\n </DialogContent>\n <DialogActions>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-end\"\n alignItems=\"center\"\n spacing={1}\n sx={{ width: \"100%\" }}\n >\n <Button\n variant=\"outlined\"\n color=\"info\"\n onClick={onClose}\n >\n Cancel\n </Button>\n <Box>\n <Button\n type=\"submit\"\n variant=\"contained\"\n onClick={submitHandler}\n color=\"error\"\n >\n Void\n </Button>\n </Box>\n </Stack>\n </DialogActions>\n </Dialog>\n </>\n );\n};\n\nexport default LogActionButton;\n","import { ModalBox, RadioInput, TextInput } from 'auditComponents';\nimport _ from 'lodashExtended';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { connect } from 'react-redux';\n\nimport { getOtherRoomNames } from '../rooms/selectors';\n\nconst areaTypes = [\n { value: \"GP Consulting Room\" },\n { value: \"Nurses Consulting Room\" },\n { value: \"Multifunctional Treatment Room\" },\n { value: \"Dispensary\" },\n { value: \"Pharmacy Dispensary\" }\n];\n\nfunction getErrors({ name, otherRoomNames }) {\n var errors = {};\n if (_.includes(otherRoomNames, name)) {\n errors[\"name\"] = [\"please use unique names for the rooms\"];\n }\n return errors;\n}\n\nvar EditRoomModal = ({\n id,\n name,\n bins,\n type,\n onChange,\n onAddNewBin,\n otherRoomNames,\n ...modalProps\n}) => {\n const errors = getErrors({ name, otherRoomNames });\n var buttonsDisabled = _.some([name, type], _.isBlank) || _.isPresent(errors);\n\n return (\n <ModalBox\n title=\"Select the room\"\n subtext=\"Select a room for the audit, you will need to check all containers in this room\"\n buttonsDisabled={buttonsDisabled}\n {...modalProps}\n >\n <TextInput\n name=\"name\"\n value={name}\n label=\"Room Name\"\n onChange={onChange}\n placeholder=\"Enter room name\"\n allErrors={errors}\n />\n <RadioInput\n name=\"type\"\n selectedValue={type}\n label=\"Select Area Type\"\n options={areaTypes}\n onSelect={onChange}\n />\n </ModalBox>\n );\n};\n\nEditRoomModal.propTypes = {\n onClose: PropTypes.func.isRequired,\n onChange: PropTypes.func.isRequired,\n onAddNewBin: PropTypes.func.isRequired,\n};\n\nconst mapStateToProps = (state, { id, sectionId }) => {\n return {\n otherRoomNames: getOtherRoomNames(id, state),\n };\n};\n\nEditRoomModal = connect(mapStateToProps, null)(EditRoomModal);\n\nexport default EditRoomModal;\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { getBinData } from '../bins/selectors'\nimport { updateBinData } from '../bins/operations'\nimport {\n getInternalStorageTypes,\n getInternalContainerTypes,\n getInternalStorageType,\n getInternalContainerType,\n getInternalContainerContaminants\n} from '../app/selectors'\nimport { Switch, Route, Redirect, useHistory } from 'react-router-dom'\nimport {\n SelectStorageType,\n SelectContainerType,\n TakeExteriorPhoto,\n TakeInteriorPhoto,\n SelectContaminants\n} from \"./binModals\"\nimport dotProp from 'dot-prop-immutable'\nimport { uploadImage, deleteImage } from '../bins/operations'\n\nconst d = dotProp\n\n//import { DropdownSelect, DateSelect, ModelErrors, Link } from 'sharedComponents'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar EditInternalBinModal = ({\n binData,\n storageType,\n containerType,\n closeModal,\n match,\n ...props}) => {\n\n\n let history = useHistory()\n\n let { storageTypeId, containerTypeId } = binData\n\n let goToPath = (path) => history.push(`${match.url}/${path}`)\n\n let modalProps = {\n onClose: closeModal,\n //onBack: history.goBack,\n containerType,\n storageType,\n ...props\n }\n\n let defaultPath = 'storageType'\n\n return(\n <Switch>\n <Route path={`${match.url}/storageType`}>\n <SelectStorageType {...binData}\n onBack={closeModal}\n onNext={()=> goToPath('containerType')}\n {...modalProps}/>\n </Route>\n <Route path={`${match.url}/containerType`}>\n <SelectContainerType {...binData}\n title={`Select a ${storageType.selectType} type` }\n onBack={()=> goToPath('storageType')}\n onNext={()=> goToPath('takeExteriorPhoto')}\n {...modalProps}/>\n </Route>\n <Route path={`${match.url}/takeExteriorPhoto`}>\n { containerTypeId ? <TakeExteriorPhoto {...binData}\n examplePhotoUrl={containerType.exampleExteriorPhotoUrl}\n takePhoto={containerType.takePhoto}\n onBack={()=> goToPath('containerType')}\n onNext={()=> goToPath('takeInteriorPhoto')}\n {...modalProps}/> : null }\n </Route>\n <Route path={`${match.url}/takeInteriorPhoto`}>\n { containerTypeId ? <TakeInteriorPhoto {...binData}\n examplePhotoUrl={containerType.exampleInteriorPhotoUrl}\n takePhoto={containerType.takePhoto}\n onBack={()=> goToPath('takeExteriorPhoto')}\n onNext={() => goToPath('selectContaminants') }\n {...modalProps}/> : null }\n </Route>\n <Route path={`${match.url}/selectContaminants`}>\n <SelectContaminants {...binData}\n allowOther={true}\n onBack={()=> goToPath('takeInteriorPhoto')}\n onDone={closeModal}\n {...modalProps}/>\n </Route>\n <Redirect from={match.url} to={`${match.url}/${defaultPath}`} />\n </Switch>\n );\n}\n\n\n\n\n\nEditInternalBinModal.propTypes = {\n};\n\n\nconst mapStateToProps = (state, {match}) => {\n\n const { binId } = match.params\n const binData = getBinData(binId, state)\n const { storageTypeId, containerTypeId } = binData\n const storageType = getInternalStorageType(storageTypeId, state)\n const containerType = getInternalContainerType(containerTypeId, state)\n\n return {\n binData,\n storageType,\n containerType,\n binId,\n storageTypes: getInternalStorageTypes(state),\n containerTypes: getInternalContainerTypes(binData.storageTypeId, state),\n allContaminants: getInternalContainerContaminants(containerTypeId, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, { match }) => {\n const { binId } = match.params\n return {\n onChange: (value, name) => { dispatch(updateBinData(binId, d.set({}, name, value))) },\n onImageUpload: (image, name) => dispatch(uploadImage(name, binId, image)),\n onImageDelete: (image, name) => dispatch(deleteImage(name, binId, image)),\n }\n}\n\nEditInternalBinModal = connect(\n mapStateToProps,\n mapDispatchToProps\n)(EditInternalBinModal)\n\n\nexport default EditInternalBinModal;\n\n\n\n\n\n\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { confirmAlert } from \"react-confirm-alert\"; // Import\nimport { Btn } from \"sharedComponents\";\nimport ImagePoller from \"./ImagePoller\";\nimport {\n SummaryField\n} from 'auditComponents'\nimport { faTrash, faEdit, faTrashAlt } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nconst Attribute = ({ label, value }) => {\n return (\n <div>\n <strong>{label}</strong>: {_.isPresent(value) ? value : 'Not Answered' }\n </div>\n );\n};\n\nconst getRequiredFields = ({storageType}) => {\n const { labelingRequired } = storageType;\n\n var requiredFields = {\n interiorPhoto: true,\n exteriorPhoto: true,\n hasCorrectLabel: !!labelingRequired,\n contaminants: _.isPresent(storageType),\n }\n\n return requiredFields\n}\n\n\nlet IternalBin = ({\n id,\n containerType,\n storageType = {},\n exteriorPhoto,\n interiorPhoto,\n contaminantNames,\n hasCorrectLabel,\n name,\n onDelete,\n onEdit,\n onEditPhoto,\n storageAreaDescription,\n ...props\n}) => {\n let deleteConfirm;\n\n const { name: containerName } = containerType || {};\n const { name: storageName } = storageType;\n\n const requiredFields = getRequiredFields({storageType})\n\n const displayName = name || containerName || storageName || \"New Bin\";\n\n if (onDelete) {\n deleteConfirm = () => {\n confirmAlert({\n title: `Delete the ${displayName} container`,\n message: (\n <span>\n Are you sure to do this? <br />{\" \"}\n <span className=\"text-danger\">\n All photos and data for this bin will be lost\n </span>\n </span>\n ),\n buttons: [\n {\n label: \"Yes Delete\",\n onClick: () => onDelete(id),\n },\n {\n label: \"No\",\n },\n ],\n });\n };\n }\n var placeholderSrc =\n \"https://res.cloudinary.com/anenta-ltd/image/upload/v1598996270/waste_audit_examples/200x200_bin_placeholder.png\";\n\n return (\n <React.Fragment>\n <div className=\"bin\">\n <div className=\"bin__img-box\">\n <ImagePoller\n className=\"bin__img-box--img\"\n src={_.get(exteriorPhoto, \"otherVersions.thumb.url\")}\n placeholderSrc={placeholderSrc}\n onClick={onEditPhoto && exteriorPhoto ? () => { onEditPhoto(id, 'exteriorPhoto')} : null }\n />\n <ImagePoller\n className=\"bin__img-box--img\"\n src={_.get(interiorPhoto, \"otherVersions.thumb.url\")}\n placeholderSrc={placeholderSrc}\n onClick={onEditPhoto && interiorPhoto ? () => { onEditPhoto(id, 'interiorPhoto')} : null }\n />\n </div>\n <div className=\"bin__details\">\n <div className=\"bin__details--name\">{displayName}</div>\n {onEdit || deleteConfirm ? (\n <div className=\"bin__details--btns\">\n {onEdit ? (\n <Btn\n btn=\"info\"\n onClick={() => onEdit(id)}\n className=\"bin__details--edit\"\n >\n <FontAwesomeIcon icon={faEdit} />\n Edit\n </Btn>\n ) : null}\n\n {deleteConfirm ? (\n <Btn\n btn=\"danger\"\n onClick={deleteConfirm}\n className=\"bin__details--delete\"\n >\n <FontAwesomeIcon icon={faTrashAlt} />\n Delete\n </Btn>\n ) : null}\n </div>\n ) : null}\n { requiredFields.hasCorrectLabel ? <div className=\"bin__details--contaminations\">\n <Attribute\n label={\"Has correct label\"}\n value={hasCorrectLabel}\n />\n </div> : null }\n { requiredFields.contaminants ? <div className=\"bin__details--contaminations\">\n <Attribute\n label={\"Contaminants\"}\n value={_.join(contaminantNames, \", \")}\n />\n </div> : null }\n </div>\n </div>\n <hr className=\"mt-4 mb-1\"></hr>\n </React.Fragment>\n );\n};\n\nIternalBin.propTypes = {\n onEdit: PropTypes.func,\n onDelete: PropTypes.func,\n id: PropTypes.string.isRequired,\n};\n\nexport default IternalBin;\n\n\nexport {\n getRequiredFields,\n}\n","import React, { useState } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { deleteRoom, updateRoomData } from \"../rooms/operations\";\nimport { deleteBin, addBin } from \"../bins/operations\";\nimport { Btn } from \"sharedComponents\";\nimport { confirmAlert } from \"react-confirm-alert\"; // Import\n\nimport {\n TextInput,\n RadioInput\n} from 'auditComponents'\n\nimport EditRoomModal from \"./EditRoomModal\";\nimport EditInternalBinModal from \"./EditInternalBinModal\";\nimport InternalBin from \"./InternalBin\";\nimport \"react-confirm-alert/src/react-confirm-alert.css\"; // Import css\nimport dotProp from \"dot-prop-immutable\";\nimport { Switch, Route, useHistory, Link } from \"react-router-dom\";\nimport { ModalRoute } from \"react-router-modal\";\nimport { goToEditBinPath, goToEditBinPhotoPath } from \"../app/operations\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n faEdit,\n faTrash,\n faEllipsisV,\n faPlusCircle,\n} from \"@fortawesome/free-solid-svg-icons\";\nimport Dropdown from \"react-bootstrap4/Dropdown\";\nimport AddContainerBtn from \"./AddContainerBtn\";\n\n// The forwardRef is important!!\n// Dropdown needs access to the DOM node in order to position the Menu\nconst CustomToggle = React.forwardRef(({ children, onClick }, ref) => (\n <div\n style={{ cursor: \"pointer\" }}\n ref={ref}\n className=\"p-2\"\n onClick={(e) => {\n onClick(e);\n }}\n >\n {children}\n </div>\n));\n\n// forwardRef again here!\n// Dropdown needs access to the DOM of the Menu to measure it\nconst CustomMenu = React.forwardRef(\n ({ children, style, className, \"aria-labelledby\": labeledBy }, ref) => {\n const [value, setValue] = useState(\"\");\n\n return (\n <div\n ref={ref}\n style={style}\n className={className}\n aria-labelledby={labeledBy}\n >\n <ul className=\"list-unstyled\">\n {React.Children.toArray(children).filter(\n (child) =>\n !value || child.props.children.toLowerCase().startsWith(value)\n )}\n </ul>\n </div>\n );\n }\n);\n\nconst d = dotProp;\n\nvar Room = ({ match, ...roomProps }) => {\n const {\n name = \"New Room\",\n title,\n id,\n type,\n bins,\n sectionId,\n selected,\n onDelete,\n onBinEdit,\n onBinPhotoEdit,\n onBinDelete,\n onAddNewBin,\n } = roomProps;\n\n let history = useHistory();\n\n if (selected) {\n let onCloseModal = () => history.push(match.url);\n let onEdit = () => history.push(`${match.url}/edit`);\n\n const someBins = _.some(bins, \"storageTypeId\");\n\n var modalProps = {\n onClose: onCloseModal,\n onNext: !someBins ? onAddNewBin : null,\n onDone: someBins ? onCloseModal : null,\n };\n\n return (\n <div className=\"room\">\n <div className=\"room__header\">\n <h4 className=\"room__header--title\">\n {title}\n </h4>\n <div>\n <Btn\n onClick={() => history.push(`${match.url}/edit`)}\n className=\"bin__details--edit\"\n >\n <FontAwesomeIcon icon={faEdit} />\n Edit Room Details\n </Btn>\n </div>\n </div>\n <div className=\"room__body\">\n {_.map(bins, (bin) => (\n <InternalBin\n key={bin.id}\n {...bin}\n onEdit={onBinEdit}\n onEditPhoto={onBinPhotoEdit}\n onDelete={onBinDelete}\n />\n ))}\n\n <div className=\"mt-4\">\n <AddContainerBtn\n text=\"+ Add container\"\n onClick={onAddNewBin}\n />\n </div>\n </div>\n\n <div className=\"room__footer\">\n <Btn\n onClick={() => history.push(`/section/${sectionId}`)}\n className=\"btn btn-primary w-phone-100\"\n >\n Finish audit of room\n </Btn>\n </div>\n <Switch>\n <ModalRoute\n exact\n path={`${match.url}/edit`}\n parentPath={match.url}\n className=\"an-modal-lg react-router-modal__modal\"\n >\n <EditRoomModal {...roomProps} {...modalProps} />\n </ModalRoute>\n <ModalRoute\n path={`${match.url}/bins/:binId/edit`}\n parentPath={match.url}\n component={EditInternalBinModal}\n className=\"an-modal-lg react-router-modal__modal\"\n />\n </Switch>\n </div>\n );\n } else {\n const deleteConfirm = () => {\n confirmAlert({\n title: `Delete the room \"${name}\"`,\n message: \"Are you sure to do this? All data will be lost\",\n buttons: [\n {\n label: \"Yes Delete\",\n onClick: onDelete,\n },\n {\n label: \"No\",\n },\n ],\n });\n };\n\n return (\n <div\n style={{\n border: \"1px solid #D1D1D1\",\n marginBottom: \"0.7rem\",\n borderRadius: \"6px\",\n }}\n >\n <div className=\"room__header\">\n <h4 className=\"room__header--title\">\n {title}\n </h4>\n <div>\n <Dropdown>\n <Dropdown.Toggle\n as={CustomToggle}\n id=\"dropdown-custom-components\"\n >\n <FontAwesomeIcon size=\"2x\" icon={faEllipsisV} />\n </Dropdown.Toggle>\n\n <Dropdown.Menu>\n <Dropdown.Item\n onSelect={() => history.push(`${match.url}/rooms/${id}`)}\n >\n <FontAwesomeIcon icon={faEdit} /> Edit Room\n </Dropdown.Item>\n <Dropdown.Item onSelect={deleteConfirm} className=\"text-danger\">\n <FontAwesomeIcon icon={faTrash} /> Delete Room\n </Dropdown.Item>\n </Dropdown.Menu>\n </Dropdown>\n </div>\n </div>\n <div style={{ padding: \"10px\" }}>\n {_.map(bins, (bin) => (\n <InternalBin key={bin.id} {...bin} />\n ))}\n </div>\n </div>\n );\n }\n};\n\nRoom.propTypes = {};\n\nconst mapStateToProps = (state, { id, sectionId }) => {\n return {};\n};\n\nconst mapDispatchToProps = (dispatch, { sectionId, id }) => {\n return {\n onDelete: () => dispatch(deleteRoom(id)),\n onAddNewBin: () => dispatch(addBin(sectionId, id)),\n onBinEdit: (binId) => dispatch(goToEditBinPath(binId)),\n onBinPhotoEdit: (binId, attr) => dispatch(goToEditBinPhotoPath(binId, attr)),\n onBinDelete: (binId) => dispatch(deleteBin(binId)),\n onChange: (value, name) => {\n dispatch(updateRoomData(id, d.set({}, name, value)));\n },\n };\n};\n\nRoom = connect(mapStateToProps, mapDispatchToProps)(Room);\n\nexport default Room;\n","import { addBin } from '../bins/operations'\nimport { goToEditRoomPath } from '../app/operations'\n\nconst updateRoomData = (roomId, args) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const firestore = getFirestore()\n\n firestore.set(\n {\n collection: 'waste_audits',\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: 'rooms', doc: roomId }],\n },\n args,\n {merge: true}\n ).then(() => {\n dispatch({ type: 'UPDATE SUCCESS' });\n }).catch(err => {\n dispatch({ type: 'UPDATE ERROR' }, err);\n });\n\n}\n\n\n\nconst addRoom = (sectionId, args) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const firestore = getFirestore()\n\n firestore.add(\n {\n collection: 'waste_audits',\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: 'rooms' }],\n },\n { sectionId, createdAt: new Date },\n ).then((result) => {\n dispatch(goToEditRoomPath(result.id));\n })\n\n}\n\nconst deleteRoom = (roomId, history) => (dispatch, getState, { getFirebase, getFirestore }) => {\n const state = getState()\n const firestore = getFirestore()\n\n if(_.isPresent(roomId)) {\n firestore.delete(\n {\n collection: 'waste_audits',\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: 'rooms', doc: roomId }],\n }\n ).then(() => {\n //dispatch({ type: 'UPDATE SUCCESS' });\n }).catch(err => {\n //dispatch({ type: 'UPDATE ERROR' }, err);\n });\n }\n\n}\n\n\nexport {\n updateRoomData,\n addRoom,\n //addRoomBin,\n deleteRoom,\n //uploadFile,\n //deleteFile\n}\n\n\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _ from \"lodashExtended\";\nimport ImagePoller from \"./ImagePoller\";\nimport { faBan } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n SummaryField\n} from 'auditComponents'\nimport {\n getRequiredFields\n} from './InternalBin'\n\n\nvar IternalBinSummary = ({\n id,\n containerType,\n storageType = {},\n exteriorPhoto,\n interiorPhoto,\n name,\n ...attributes\n}) => {\n const { name: containerName } = containerType || {};\n const { name: storageName } = storageType;\n\n const { hasCorrectLabel } = attributes;\n\n const requiredFields = getRequiredFields({storageType})\n \n const displayName = name || containerName || storageName;\n\n return (\n <div className=\"bin bin-summary\">\n <div className=\"bin__img-box bin__img-box-summary\">\n <ImagePoller\n className=\"bin__img-box--img\"\n src={_.get(exteriorPhoto, \"otherVersions.thumb.url\")}\n placeholderSrc=\"https://res.cloudinary.com/anenta-ltd/image/upload/v1598996270/waste_audit_examples/200x200_bin_placeholder.png\"\n />\n <ImagePoller\n className=\"bin__img-box--img\"\n src={_.get(interiorPhoto, \"otherVersions.thumb.url\")}\n placeholderSrc=\"https://res.cloudinary.com/anenta-ltd/image/upload/v1598996270/waste_audit_examples/200x200_bin_placeholder.png\"\n />\n </div>\n <div className=\"bin__details bin__details-summary\">\n <div className=\"bin__details-summary--name\">{displayName}</div>\n\n <div className=\"bin__details--desc\">\n { requiredFields.hasCorrectLabel ? <SummaryField\n label={\"Has correct label?\"}\n attributes={attributes}\n attrKey=\"hasCorrectLabel\"\n /> : null }\n { requiredFields.contaminants ? <SummaryField\n label={\"Contaminants\"}\n attributes={attributes}\n attrKey=\"contaminantNames\"\n value={_.join(attributes.contaminantNames, \", \")}\n /> : null }\n </div>\n\n </div>\n </div>\n );\n};\n\nexport default IternalBinSummary;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { firestoreConnect } from \"react-redux-firebase\";\nimport { Btn } from \"sharedComponents\";\nimport Section from \"../Section\";\nimport SubmitSummarySection from \"../SubmitSummarySection\";\nimport {\n SummaryRow\n} from \"auditComponents\";\n\nimport SwitchDeviceButton from \"../SwitchDeviceButton\";\nimport Room from \"../Room\";\nimport InternalBinSummary from \"../InternalBinSummary\";\nimport { updateSectionData, submitSection } from \"../../sections/operations\";\nimport { getSectionData } from \"../../sections/selectors\";\nimport { getRoomsForSection } from \"../../rooms/selectors\";\nimport { getBinsForRoom } from \"../../bins/selectors\";\nimport { updateBinData } from \"../../bins/operations\";\nimport { addRoom } from \"../../rooms/operations\";\nimport { getInternalStorageTypes } from \"../../app/selectors\";\nimport { Route, Switch, useRouteMatch } from \"react-router-dom\";\nimport { getRequiredRoomCount } from \"../../app/selectors\";\n\nconst SECTION_ID = \"internal_waste_containment\";\nconst TITLE = \"Internal Waste Containment\";\n\nconst incompleteMessage = (state) => {\n const rooms = getRoomsForSection(SECTION_ID, state);\n const requiredRooms = getRequiredRoomCount(state)\n\n\n const completedRooms = _.filter(rooms, ({ id }) => {\n const bins = getBinsForRoom(id, state);\n const completedBins = _.filter(\n bins,\n ({ exteriorPhoto, interiorPhoto, contaminants }) => {\n var toCheck = [exteriorPhoto, interiorPhoto, contaminants];\n return _.every(toCheck, _.isPresent);\n }\n );\n\n return _.some(completedBins);\n })\n\n\n const completed =\n _.isPresent(rooms) && completedRooms.length >= requiredRooms;\n\n return completed ? null : `You should completely audit at least ${requiredRooms} rooms. Only ${completedRooms.length} ${completedRooms.length > 1 ? 'have' : 'has'} been audited so far.`;\n};\n\nconst isStarted = (state) => {\n const rooms = getRoomsForSection(SECTION_ID, state);\n return _.some(rooms);\n};\n\nvar InternalWasteContainment = ({\n sectionData,\n onAddRoom,\n onChange,\n onChangeBin,\n ...rest\n}) => {\n const { rooms } = sectionData;\n const { url } = useRouteMatch();\n\n const preamble = (\n <div>\n <p>If you are using your desktop you have the option to switch device by pressing the above button. If you already gathered these images feel free to continue on the desktop version.</p>\n\n <p>A number of clinical rooms should be inspected as part of this audit to give a representative view of the entire facility. The number required depends on the number of rooms that contain hazardous waste containers.</p>\n\n <p>Example:</p>\n <p>\n Two clinical rooms should be inspected if there are five or less clinical rooms that contain hazardous waste. Four rooms if there are more than Five. If there aren’t sufficient rooms containing clinical waste at this time, return to this section when such waste is available.\n </p>\n <p>\n Different room types should be inspected, i.e. a GP consulting room, a Nurses consulting room or minor surgery room.\n </p>\n\n <p>\n Please ensure you select a room that has clinical waste containers that are in use. No empty rooms should be audited. If some but not all bins in a room are empty, still report those empty bins.\n </p>\n\n <p>\n <strong>\n <span style={{color: 'red'}}>All waste bins (clinical and non-clinical)</span> in a room need to be reported to ensure there is no cross-contamination\n </strong>\n </p>\n </div>\n );\n\n return (\n <Section\n sectionId={SECTION_ID}\n title={TITLE}\n subtext=\"For this step, we recommend using a mobile phone with a quality camera.\"\n topRight={<SwitchDeviceButton />}\n wideBody=\"true\"\n >\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n {preamble}\n {_.map(rooms, (room) => {\n return (\n <Switch key={room.id}>\n <Route\n path={`${url}/rooms/${room.id}`}\n render={({ match }) => (\n <Room\n match={match}\n key={room.id}\n {...room}\n selected={true}\n />\n )}\n />\n <Route\n path={`${url}`}\n render={({ match }) => (\n <Room\n match={match}\n key={room.id}\n {...room}\n selected={false}\n />\n )}\n />\n </Switch>\n );\n })}\n <div className=\"text-center\">\n <Route exact path={`${url}`}>\n <Btn styles=\"outline-primary\" onClick={onAddRoom}>\n Add room\n </Btn>\n </Route>\n </div>\n </div>\n </div>\n </Section>\n );\n};\n\nInternalWasteContainment.propTypes = {};\n\nvar SummaryView = ({ wasteAudit }) => {\n const { rooms } = wasteAudit.sections[SECTION_ID] || {};\n\n return (\n <SubmitSummarySection sectionId={SECTION_ID} title={TITLE}>\n <div className=\"media mb-3 mt-3 media-w-border\">\n <div className=\"media-body\">\n {_.map(rooms, ({ title, id, bins }) => (\n <SummaryRow\n key={id}\n label={title}\n >\n {_.map(bins, (bin) => (\n <InternalBinSummary key={bin.id} {...bin} />\n ))}\n </SummaryRow>\n ))}\n </div>\n </div>\n </SubmitSummarySection>\n );\n};\n\nconst mapStateToProps = (state, { wasteAudit }) => {\n return {\n sectionData: wasteAudit.sections[SECTION_ID],\n };\n};\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onChange: (value, name) => {\n dispatch(updateSectionData(SECTION_ID, d.set({}, name, value)));\n },\n onAddRoom: (history) => {\n dispatch(addRoom(SECTION_ID, history));\n },\n onChangeBin: (binId, value, name) => {\n dispatch(updateBinData(binId, d.set({}, name, value)));\n },\n };\n};\n\nInternalWasteContainment = connect(\n mapStateToProps,\n mapDispatchToProps\n)(InternalWasteContainment);\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n incompleteMessage,\n isStarted,\n Component: InternalWasteContainment,\n SummaryView,\n};\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _ from \"lodashExtended\";\nimport ImagePoller from \"./ImagePoller\";\nimport { faBan } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n SummaryField\n} from 'auditComponents'\n\nimport {\n getRequiredFields\n} from './ExternalBin'\n\nvar ExternalBinSummary = ({\n id,\n containerType,\n storageType = {},\n exteriorPhoto,\n interiorPhoto,\n name,\n ...attributes\n}) => {\n const { name: containerName } = containerType || {};\n const { name: storageName } = storageType || {};\n\n const { hasCorrectLabel } = attributes;\n const requiredFields = getRequiredFields({storageType})\n\n const displayName = name || containerName || storageName;\n\n return (\n <div className=\"bin bin-summary\">\n <div className=\"bin__img-box bin__img-box-summary\">\n <ImagePoller\n className=\"bin__img-box--img\"\n src={_.get(exteriorPhoto, \"otherVersions.thumb.url\")}\n placeholderSrc=\"https://res.cloudinary.com/anenta-ltd/image/upload/v1598996270/waste_audit_examples/200x200_bin_placeholder.png\"\n />\n <ImagePoller\n className=\"bin__img-box--img\"\n src={_.get(interiorPhoto, \"otherVersions.thumb.url\")}\n placeholderSrc=\"https://res.cloudinary.com/anenta-ltd/image/upload/v1598996270/waste_audit_examples/200x200_bin_placeholder.png\"\n />\n </div>\n <div className=\"bin__details bin__details-summary\">\n <div className=\"bin__details-summary--name\">{displayName}</div>\n\n <div className=\"bin__details--desc\">\n { requiredFields.contaminants ? <SummaryField\n label={\"Contaminants\"}\n attributes={attributes}\n attrKey=\"contaminantNames\"\n value={_.join(attributes.contaminantNames, \", \")}\n /> : null }\n { requiredFields.storageAreaDescription ? <SummaryField\n label={\"Storage Area Description\"}\n attributes={attributes}\n attrKey=\"storageAreaDescription\"\n /> : null }\n { requiredFields.isAreaLocked ? <SummaryField\n label={\"Is Area Locked?\"}\n attributes={attributes}\n attrKey=\"isAreaLocked\"\n /> : null }\n { requiredFields.isBinLocked ? <SummaryField\n label={\"Is Bin Locked?\"}\n attributes={attributes}\n attrKey=\"isBinLocked\"\n /> : null }\n </div>\n </div>\n </div>\n );\n};\n\nexport default ExternalBinSummary;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _ from \"lodashExtended\";\nimport ImagePoller from \"./ImagePoller\";\n\nimport {\n SummaryField\n} from 'auditComponents'\n\nimport {\n getRequiredFields\n} from './BulkContainment'\n\nvar BulkContainmentSummary = ({\n id,\n containerType,\n storageType = {},\n exteriorPhoto,\n interiorPhoto,\n bulkStorageAreaPhoto,\n name,\n ...attributes\n}) => {\n const { name: storageName } = storageType;\n\n const { hasCorrectLabel } = attributes;\n\n const displayName = name || storageName;\n const requiredFields = getRequiredFields({storageType})\n\n var placeholderSrc =\n \"https://res.cloudinary.com/anenta-ltd/image/upload/v1598996270/waste_audit_examples/200x200_bin_placeholder.png\";\n\n return (\n <div className=\"bin bin-summary\">\n <div className=\"bin__img-box bin__img-box-summary\">\n <ImagePoller\n className=\"bin__img-box--img\"\n src={_.get(bulkStorageAreaPhoto, \"otherVersions.thumb.url\")}\n placeholderSrc={placeholderSrc}\n />\n </div>\n <div className=\"bin__details bin__details-summary\">\n <div className=\"bin__details-summary--name\">{displayName}</div>\n <div className=\"bin__details--desc\">\n { requiredFields.isAreaLocked ? <SummaryField\n label={\"Storage Area locked?\"}\n attributes={attributes}\n attrKey=\"isAreaLocked\"\n /> : null }\n { requiredFields.isPubliclyAccessible ? <SummaryField\n label={\"Accessible to public?\"}\n attributes={attributes}\n attrKey=\"isPubliclyAccessible\"\n /> : null }\n { requiredFields.storageAreaDescription ? <SummaryField\n label={\"Storage Area Description\"}\n attributes={attributes}\n attrKey=\"storageAreaDescription\"\n /> : null }\n { requiredFields.contaminants ? <SummaryField\n label={\"Contaminants\"}\n attributes={attributes}\n attrKey=\"contaminantNames\"\n value={_.join(attributes.contaminantNames, \", \")}\n /> : null }\n </div>\n </div>\n </div>\n );\n};\n\nexport default BulkContainmentSummary;\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { getBulkContainmentData } from '../bulkContainments/selectors'\nimport { updateBulkContainmentData } from '../bulkContainments/operations'\nimport {\n getBulkStorageTypes,\n getBulkStorageType,\n getExternalContainerContaminants,\n} from '../app/selectors'\nimport { Switch, Route, Redirect, useHistory } from 'react-router-dom'\nimport {\n SelectStorageType,\n TakeExteriorPhoto,\n TakeBulkStorageAreaPhoto,\n TakeInteriorPhoto,\n BulkStorageAreaInfo,\n SelectContaminants\n} from \"./binModals\"\nimport dotProp from 'dot-prop-immutable'\nimport { uploadImage, deleteImage } from '../bulkContainments/operations'\n\nconst d = dotProp\n\nvar EditBulkStorageModal = ({\n bulkContainmentData,\n storageType,\n closeModal,\n match,\n allContaminants,\n ...props\n}) => {\n let history = useHistory()\n\n let { storageTypeId } = bulkContainmentData\n\n let goToPath = (path) => history.push(`${match.url}/${path}`)\n\n const checkForContaminants = allContaminants.length > 0\n\n let modalProps = {\n onClose: closeModal,\n //onBack: history.goBack,\n storageType,\n allContaminants,\n checkForContaminants,\n ...props\n }\n\n let defaultPath = 'storageType'\n\n return(\n <Switch>\n <Route path={`${match.url}/storageType`}>\n <SelectStorageType {...bulkContainmentData}\n onBack={closeModal}\n onNext={()=> goToPath('takeBulkStorageAreaPhoto')}\n {...modalProps}/>\n </Route>\n <Route path={`${match.url}/takeBulkStorageAreaPhoto`}>\n { storageTypeId ? <TakeBulkStorageAreaPhoto {...bulkContainmentData}\n examplePhotoUrl={storageType.exampleBulkInternalPhotoUrl}\n takePhoto={storageType.takeAreaPhoto}\n onBack={()=> goToPath('storageType')}\n onNext={()=> goToPath('bulkStorageAreaInfo')}\n {...modalProps}/> : null }\n </Route>\n <Route path={`${match.url}/bulkStorageAreaInfo`}>\n { storageTypeId ? <BulkStorageAreaInfo {...bulkContainmentData}\n onBack={()=> goToPath('takeBulkStorageAreaPhoto')}\n onNext={() => goToPath('selectContaminants') }\n {...modalProps}/> : null }\n </Route>\n <Route path={`${match.url}/selectContaminants`}>\n <SelectContaminants {...bulkContainmentData}\n title={`Describe the contamination` }\n allowOther={true}\n photo={bulkContainmentData.bulkStorageAreaPhoto}\n onBack={()=> goToPath('bulkStorageAreaInfo')}\n onDone={closeModal}\n {...modalProps}/>\n </Route>\n <Redirect from={match.url} to={`${match.url}/${defaultPath}`} />\n </Switch>\n );\n}\n\n\n\nEditBulkStorageModal.propTypes = {\n};\n\n\nconst mapStateToProps = (state, {match}) => {\n\n const { bulkContainmentId } = match.params\n const bulkContainmentData = getBulkContainmentData(bulkContainmentId, state)\n\n const { storageTypeId } = bulkContainmentData\n const storageType = getBulkStorageType(storageTypeId, state)\n\n return {\n bulkContainmentData,\n storageType,\n bulkContainmentId,\n storageTypes: getBulkStorageTypes(state),\n allContaminants: getExternalContainerContaminants(storageTypeId, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, { match }) => {\n const { bulkContainmentId } = match.params\n return {\n onChange: (value, name) => { dispatch(updateBulkContainmentData(bulkContainmentId, d.set({}, name, value))) },\n onImageUpload: (image, name) => dispatch(uploadImage(name, bulkContainmentId, image)),\n onImageDelete: (image, name) => dispatch(deleteImage(name, bulkContainmentId, image)),\n }\n}\n\nEditBulkStorageModal = connect(\n mapStateToProps,\n mapDispatchToProps\n)(EditBulkStorageModal)\n\n\nexport default EditBulkStorageModal;\n\n\n\n\n\n\n","import { goToEditBulkContainmentPath, uploadSubcollectionImage, deleteSubcollectionImage } from '../app/operations'\nimport { getStorageType } from '../app/selectors'\n\nconst updateBulkContainmentData = (bulkContainmentId, args) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const firestore = getFirestore()\n\n if(args.storageTypeId) {\n args.storageType = _.omit(getStorageType(args.storageTypeId, state), ['exampleInteriorPhotoUrl', 'exampleExteriorPhotoUrl', 'exampleBulkInternalPhotoUrl'])\n }\n\n firestore.set(\n {\n collection: 'waste_audits',\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: 'bulkContainments', doc: bulkContainmentId }],\n },\n args,\n {merge: true}\n )\n\n}\n\nconst addBulkContainment = (sectionId) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const firestore = getFirestore()\n\n firestore.add(\n {\n collection: 'waste_audits',\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: 'bulkContainments' }],\n },\n { sectionId, createdAt: new Date },\n ).then((result) => {\n dispatch(goToEditBulkContainmentPath(result.id))\n })\n\n}\n\nconst deleteBulkContainment = (bulkContainmentId) => (dispatch, getState, { getFirebase, getFirestore }) => {\n const state = getState()\n const firestore = getFirestore()\n\n if(_.isPresent(bulkContainmentId)) {\n firestore.delete(\n {\n collection: 'waste_audits',\n doc: state.app.auditDocumentId,\n subcollections: [{ collection: 'bulkContainments', doc: bulkContainmentId }],\n }\n )\n }\n\n}\nconst uploadImage = (attributeName, documentId, image) => uploadSubcollectionImage(attributeName, documentId, image, 'bulkContainments')\nconst deleteImage = (attributeName, documentId, image) => deleteSubcollectionImage(attributeName, documentId, image, 'bulkContainments')\n\nexport {\n updateBulkContainmentData,\n addBulkContainment,\n deleteBulkContainment,\n uploadImage,\n deleteImage\n}\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { getBinData } from '../bins/selectors'\nimport { updateBinData } from '../bins/operations'\nimport {\n getBulkStorageTypes,\n getBulkStorageType,\n getExternalContainerContaminants,\n} from '../app/selectors'\nimport { Switch, Route, Redirect, useHistory } from 'react-router-dom'\nimport {\n SelectStorageType,\n SelectContainerType,\n TakeExteriorPhoto,\n TakeInteriorPhoto,\n ExternalBinComtainmentInfo,\n SelectContaminants\n} from \"./binModals\"\nimport dotProp from 'dot-prop-immutable'\nimport { uploadImage, deleteImage } from '../bins/operations'\n\nconst d = dotProp\n\nvar EditExternalBinModal = ({\n binData,\n storageType,\n closeModal,\n match,\n allContaminants,\n ...props\n}) => {\n let history = useHistory()\n\n let { storageTypeId, hasContaminants } = binData\n\n let goToPath = (path) => history.push(`${match.url}/${path}`)\n\n const checkForContaminants = allContaminants.length > 0\n\n let modalProps = {\n onClose: closeModal,\n storageType,\n allContaminants,\n checkForContaminants,\n ...props\n }\n let defaultPath = 'storageType'\n\n return(\n <Switch>\n <Route path={`${match.url}/storageType`}>\n <SelectStorageType {...binData}\n title='Select waste type'\n onBack={closeModal}\n onNext={()=> goToPath('binSecurity')}\n {...modalProps}/>\n </Route>\n <Route path={`${match.url}/binSecurity`}>\n { storageTypeId ? <ExternalBinComtainmentInfo {...binData}\n onBack={()=> goToPath('storageType')}\n onNext={()=> goToPath('takeExteriorPhoto')}\n {...modalProps}/> : null }\n </Route>\n <Route path={`${match.url}/takeExteriorPhoto`}>\n { storageTypeId ? <TakeExteriorPhoto {...binData}\n examplePhotoUrl={storageType.exampleExteriorPhotoUrl}\n takePhoto={storageType.takePhoto}\n onBack={()=> goToPath('binSecurity')}\n onNext={()=> goToPath('takeInteriorPhoto')}\n {...modalProps}/> : null }\n </Route>\n <Route path={`${match.url}/takeInteriorPhoto`}>\n { storageTypeId ? <TakeInteriorPhoto {...binData}\n examplePhotoUrl={storageType.exampleInteriorPhotoUrl}\n takePhoto={storageType.takePhoto}\n onBack={()=> goToPath('takeExteriorPhoto')}\n onNext={() => goToPath('selectContaminants') }\n {...modalProps}/> : null }\n </Route>\n <Route path={`${match.url}/selectContaminants`}>\n <SelectContaminants {...binData}\n allowOther={true}\n photo={binData.interiorPhoto}\n onBack={()=> goToPath('takeInteriorPhoto')}\n onDone={closeModal}\n {...modalProps}/>\n </Route>\n <Redirect from={match.url} to={`${match.url}/${defaultPath}`} />\n </Switch>\n );\n}\n\n\n\nEditExternalBinModal.propTypes = {\n};\n\n\nconst mapStateToProps = (state, {match}) => {\n\n const { binId } = match.params\n const binData = getBinData(binId, state)\n\n const { storageTypeId } = binData\n const storageType = getBulkStorageType(storageTypeId, state)\n\n return {\n binData,\n storageType,\n binId,\n storageTypes: getBulkStorageTypes(state),\n allContaminants: getExternalContainerContaminants(storageTypeId, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, { match }) => {\n const { binId } = match.params\n return {\n onChange: (value, name) => { dispatch(updateBinData(binId, d.set({}, name, value))) },\n onImageUpload: (image, name) => dispatch(uploadImage(name, binId, image)),\n onImageDelete: (image, name) => dispatch(deleteImage(name, binId, image)),\n }\n}\n\nEditExternalBinModal = connect(\n mapStateToProps,\n mapDispatchToProps\n)(EditExternalBinModal)\n\n\nexport default EditExternalBinModal;\n\n\n\n\n\n\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport dotProp from \"dot-prop-immutable\";\nimport { firestoreConnect } from \"react-redux-firebase\";\nimport { Btn } from \"sharedComponents\";\nimport Section from \"../Section\";\nimport SubmitSummarySection from \"../SubmitSummarySection\";\nimport SwitchDeviceButton from \"../SwitchDeviceButton\";\nimport ExternalBinSummary from \"../ExternalBinSummary\";\nimport BulkContainmentSummary from \"../BulkContainmentSummary\";\nimport BulkContainment from \"../BulkContainment\";\nimport EditBulkContainmentModal from \"../EditBulkContainmentModal\";\nimport ExternalBin from \"../ExternalBin\";\n\nimport {\n YesNoInput,\n SummaryRow\n} from 'auditComponents'\n\nimport EditExternalBinModal from \"../EditExternalBinModal\";\nimport { updateSectionData, submitSection } from \"../../sections/operations\";\nimport { getSectionData } from \"../../sections/selectors\";\nimport { getBulkContainmentsForSection } from \"../../bulkContainments/selectors\";\nimport {\n deleteBulkContainment,\n addBulkContainment,\n} from \"../../bulkContainments/operations\";\nimport { getBinsForSection } from \"../../bins/selectors\";\nimport { deleteBin, addBin } from \"../../bins/operations\";\nimport { getInternalStorageTypes } from \"../../app/selectors\";\nimport { Route, Switch, useRouteMatch } from \"react-router-dom\";\nimport {\n goToEditBinPath,\n goToEditBinPhotoPath,\n goToEditBulkContainmentPath,\n goToEditBulkContainmentPhotoPath,\n} from \"../../app/operations\";\nimport { ModalRoute } from \"react-router-modal\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faPlusCircle } from \"@fortawesome/free-solid-svg-icons\";\nimport AddContainerBtn from \"../AddContainerBtn\";\nconst d = dotProp;\n\nconst SECTION_ID = \"bulk_waste_storage_containment\";\nconst TITLE = \"Bulk Waste Storage Containment\";\n\nconst incompleteMessage = (state) => {\n let {\n hasExternalContainment,\n hasBulkInternalWasteContainment,\n } = getSectionData(SECTION_ID, state);\n\n var toCheck = [hasExternalContainment, hasBulkInternalWasteContainment];\n\n let needToAddRecords = [];\n\n if (hasExternalContainment == \"yes\") {\n const bins = getBinsForSection(SECTION_ID, state);\n\n const completedBins = _.filter(\n bins,\n ({ exteriorPhoto, interiorPhoto, storageTypeId, contaminants }) => {\n var subFieldstoCheck = [exteriorPhoto, interiorPhoto, contaminants];\n return _.every(subFieldstoCheck, _.isPresent);\n }\n );\n\n if (!_.some(completedBins)) {\n needToAddRecords = needToAddRecords.concat(\"one external bin\");\n }\n }\n\n if (hasBulkInternalWasteContainment == \"yes\") {\n const bulkContainments = getBulkContainmentsForSection(SECTION_ID, state);\n const completedBulkContainments = _.filter(\n bulkContainments,\n ({\n exteriorPhoto,\n interiorPhoto,\n bulkStorageAreaPhoto,\n contaminants,\n }) => {\n var subFieldstoCheck = [bulkStorageAreaPhoto, contaminants];\n return _.every(subFieldstoCheck, _.isPresent);\n }\n );\n\n if (!_.some(completedBulkContainments)) {\n needToAddRecords = needToAddRecords.concat(\"one bulk storage area\");\n }\n }\n\n const blankFields = _.filter(toCheck, _.isBlank).length;\n if (blankFields > 0) {\n return `There ${\n blankFields == 1 ? \"is\" : \"are\"\n } ${blankFields} unanswered question${\n blankFields == 1 ? \"\" : \"s\"\n } remaining`;\n } else {\n return _.some(needToAddRecords)\n ? `Please audit at least ${_.join(needToAddRecords, \" and \")}`\n : null;\n }\n};\n\nconst isStarted = (state) => {\n const bins = getBinsForSection(SECTION_ID, state);\n return _.some(bins);\n};\n\nvar BulkWasteStorageContainment = ({\n sectionData,\n onAddNewBulkContainment,\n onBulkContainmentEdit,\n onBulkContainmentPhotoEdit,\n onBulkContainmentDelete,\n onAddNewBin,\n onBinEdit,\n onBinPhotoEdit,\n onBinDelete,\n onChange,\n ...rest\n}) => {\n const { url } = useRouteMatch();\n const {\n bins,\n hasExternalContainment,\n bulkContainments,\n hasBulkInternalWasteContainment,\n } = sectionData;\n\n const preamble = (\n <div>\n <p>\n All external Waste Bins (Clinical and non Clinical) need to be checked\n to ensure that there is no cross-contamination.\n </p>\n <p>i.e. A clinical bag is in the general waste.</p>\n\n <p>\n If internal storage areas are used the same process as external will\n apply however you may not have bins to take images of. We will need\n images of the entire internal storage\n </p>\n </div>\n );\n\n return (\n <Section\n sectionId={SECTION_ID}\n title={TITLE}\n subtext=\"For this step, we recommend using a mobile phone with a quality camera\"\n topRight={<SwitchDeviceButton />}\n >\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n {preamble}\n <YesNoInput\n name=\"hasExternalContainment\"\n value={hasExternalContainment}\n label={\"Do you store any waste in external containers?\"}\n onChange={onChange}\n className=\"mt-45\"\n />\n {hasExternalContainment == \"yes\" ? (\n <div>\n {_.map(bins, (bin) => (\n <ExternalBin\n key={bin.id}\n {...bin}\n onEdit={onBinEdit}\n onEditPhoto={onBinPhotoEdit}\n onDelete={onBinDelete}\n />\n ))}\n <div className=\"mt-4\">\n <AddContainerBtn text=\"+ Add container\" onClick={onAddNewBin} />\n </div>\n </div>\n ) : null}\n <YesNoInput\n name=\"hasBulkInternalWasteContainment\"\n value={hasBulkInternalWasteContainment}\n label={\"Do you store any bulk waste internally at the premises?\"}\n onChange={onChange}\n className=\"mt-45\"\n />\n {hasBulkInternalWasteContainment == \"yes\" ? (\n <div>\n {_.map(bulkContainments, (bulkContainment) => (\n <BulkContainment\n key={bulkContainment.id}\n {...bulkContainment}\n onEdit={onBulkContainmentEdit}\n onEditPhoto={onBulkContainmentPhotoEdit}\n onDelete={onBulkContainmentDelete}\n />\n ))}\n\n <div className=\"mt-4\">\n <AddContainerBtn\n text=\"+ Add new internal bulk storage\"\n onClick={onAddNewBulkContainment}\n />\n </div>\n </div>\n ) : null}\n </div>\n <ModalRoute\n path={`${url}/bins/:binId/edit`}\n parentPath={url}\n component={EditExternalBinModal}\n className=\"an-modal-lg react-router-modal__modal\"\n />\n <ModalRoute\n path={`${url}/bulkContainments/:bulkContainmentId/edit`}\n parentPath={url}\n component={EditBulkContainmentModal}\n className=\"an-modal-lg react-router-modal__modal\"\n />\n </div>\n </Section>\n );\n};\n\nBulkWasteStorageContainment.propTypes = {};\n\nvar SummaryView = ({ onChange, wasteAudit }) => {\n const {\n bins,\n hasExternalContainment,\n bulkContainments,\n hasBulkInternalWasteContainment,\n } = wasteAudit.sections[SECTION_ID] || {};\n\n return (\n <SubmitSummarySection sectionId={SECTION_ID} title={TITLE}>\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n {hasExternalContainment == \"yes\" ? (\n _(bins)\n .groupBy(\"storageTypeId\")\n .map((groupedBins, storageTypeId) => {\n let label = _(groupedBins)\n .map(({ storageType }) => _.get(storageType, \"name\"))\n .find(_.isPresent);\n if (label) {\n return (\n <SummaryRow key={storageTypeId} label={label}>\n {_.map(groupedBins, (bin) => (\n <ExternalBinSummary key={bin.id} {...bin} name=\" \" />\n ))}\n </SummaryRow>\n );\n }\n })\n .compact()\n .value()\n ) : (\n <SummaryRow\n value={hasExternalContainment}\n label={\"Has external waste containment?\"}\n />\n )}\n {hasBulkInternalWasteContainment == \"yes\" ? (\n _(bulkContainments)\n .groupBy(\"storageTypeId\")\n .map((groupedBulkContainments, storageTypeId) => {\n let label = _(groupedBulkContainments)\n .map(({ storageType }) => _.get(storageType, \"name\"))\n .find(_.isPresent);\n if (label) {\n return (\n <SummaryRow key={storageTypeId} label={label}>\n {_.map(groupedBulkContainments, (bulkContainment) => (\n <BulkContainmentSummary\n key={bulkContainment.id}\n {...bulkContainment}\n name=\" \"\n />\n ))}\n </SummaryRow>\n );\n }\n })\n .compact()\n .value()\n ) : (\n <SummaryRow\n value={hasBulkInternalWasteContainment}\n label={\"Has internal bulk waste storage?\"}\n />\n )}\n </div>\n </div>\n </SubmitSummarySection>\n );\n};\n\nconst mapStateToProps = (state, { wasteAudit }) => {\n return {\n sectionData: wasteAudit.sections[SECTION_ID],\n };\n};\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onChange: (value, name) => {\n dispatch(updateSectionData(SECTION_ID, d.set({}, name, value)));\n },\n onAddNewBin: () => dispatch(addBin(SECTION_ID)),\n onBinEdit: (binId) => dispatch(goToEditBinPath(binId)),\n onBinPhotoEdit: (binId, attr) => dispatch(goToEditBinPhotoPath(binId, attr)),\n onBinDelete: (binId) => dispatch(deleteBin(binId)),\n onAddNewBulkContainment: () => dispatch(addBulkContainment(SECTION_ID)),\n onBulkContainmentEdit: (bulkContainmentId) =>\n dispatch(goToEditBulkContainmentPath(bulkContainmentId)),\n onBulkContainmentPhotoEdit: (bulkContainmentId, attr) =>\n dispatch(goToEditBulkContainmentPhotoPath(bulkContainmentId, attr)),\n onBulkContainmentDelete: (bulkContainmentId) =>\n dispatch(deleteBulkContainment(bulkContainmentId)),\n //onChangeBin: (binId, value, name) => { dispatch(updateBinData(binId, d.set({}, name, value))) }\n };\n};\n\nBulkWasteStorageContainment = connect(\n mapStateToProps,\n mapDispatchToProps\n)(BulkWasteStorageContainment);\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n incompleteMessage,\n isStarted,\n Component: BulkWasteStorageContainment,\n SummaryView,\n};\n","import React, { useRef, useEffect, useState, FC } from \"react\";\nimport { connect } from \"react-redux\";\nimport moment from \"moment\";\nimport Error from \"./Error\";\nimport { useOnScreen } from \"../utils\";\nimport Loader from \"../../../components/shared/Loader\";\nimport { Box, Divider, Grid, Alert } from \"@mui/material\";\nimport VisitBox from \"service/VisitBox\";\nimport { useGetLocationServiceVendorsQuery } from \"api/services\";\nimport { getLocationId } from \"ticket/selectors\";\nimport dayjs from \"dayjs\";\nimport stringify from \"json-stable-stringify\";\nimport advancedFormat from \"dayjs/plugin/advancedFormat\";\nimport { fetchMoreData, fetchAtDate } from \"service-calendar/operations\";\nimport _ from \"lodash\";\nimport StatusBar from \"./StatusBar\";\n\ndayjs.extend(advancedFormat);\n\ninterface CollectionsProps {\n calendarApi: any;\n fetchMore?: any;\n}\n\nconst VisitBoxMemo = React.memo(VisitBox);\n\nlet ListView: FC<CollectionsProps> = ({\n calendarApi,\n fetchInit,\n fetchMore,\n}) => {\n const locationId = getLocationId();\n const {\n availableData,\n fetchingPast,\n fetchingCurrent,\n fetchingFuture,\n errorPast,\n errorFuture,\n } = calendarApi;\n // Specify the type for useRef. Assuming they are div elements\n const scrollRef = useRef<HTMLDivElement>(null);\n const selectedRef = useRef<HTMLDivElement>(null);\n const todayRef = useRef<HTMLHRElement>(null);\n const isTodayVisible = useOnScreen(todayRef);\n const [previousScrollPosition, setPreviousScrollPosition] = useState(null);\n\n let collections = [];\n\n const { data: locationServiceVendors } =\n useGetLocationServiceVendorsQuery(locationId);\n\n useEffect(() => {\n if (selectedRef.current) {\n selectedRef.current.scrollIntoView({\n block: \"center\",\n });\n } else if (todayRef.current) {\n todayRef.current.scrollIntoView({\n block: \"center\",\n });\n }\n }, []);\n\n useEffect(() => {\n const checkContentFillsContainer = () => {\n if (scrollRef.current && !fetchingPast) {\n const { scrollHeight, clientHeight } = scrollRef.current;\n if (scrollHeight <= clientHeight) {\n fetchInit(dayjs());\n }\n }\n };\n\n if (!availableData.noData) {\n checkContentFillsContainer();\n }\n }, [stringify(availableData), fetchInit]);\n\n const jumpToToday = () => {\n if (todayRef.current) {\n todayRef.current.scrollIntoView({\n behavior: \"smooth\",\n block: \"center\",\n });\n }\n };\n const fetchMoreDataFromServer = (direction) => {\n fetchMore(direction);\n };\n\n const onScroll = () => {\n if (scrollRef.current) {\n const { scrollTop, scrollHeight, clientHeight } = scrollRef.current;\n const scrolledPercentage =\n (scrollTop / (scrollHeight - clientHeight)) * 100;\n // console.log(`Scrolled: ${scrolledPercentage}%`);\n // console.log({\n // scrollTop,\n // scrollHeight,\n // clientHeight,\n // });\n if (scrollTop + clientHeight >= scrollHeight) {\n fetchMore(\"forward\");\n } else if (scrolledPercentage < 15 && !fetchingPast) {\n setPreviousScrollPosition(collections[0].key.split(\"-\")[0]);\n fetchMoreDataFromServer(\"back\");\n } else {\n setPreviousScrollPosition(null);\n }\n }\n };\n\n let previous = previousScrollPosition;\n if (previousScrollPosition) {\n const sorted = Object.keys(availableData.visits).sort();\n sorted.forEach((key, index) => {\n if (key === previousScrollPosition) {\n previous = sorted[index - 1];\n }\n });\n }\n let previousDate = null;\n const hasTodayService = Object.keys(availableData.visits).includes(\n moment().format(\"YYYY-MM-DD\"),\n );\n\n Object.keys(availableData.visits)\n .sort()\n .forEach((date) => {\n const currentDate = moment(date);\n if (previousDate && currentDate.diff(previousDate, \"days\") > 0) {\n const daysGap = currentDate.diff(previousDate, \"days\");\n\n let gapText;\n if (daysGap > 7) {\n const weeksGap = _.floor(daysGap / 7); // Usa lodash para redondear hacia abajo\n gapText = `${weeksGap} ${weeksGap > 1 ? \"WEEKS\" : \"WEEK\"} GAP`;\n } else {\n gapText = `${daysGap} ${daysGap > 1 ? \"DAYS\" : \"DAY\"} GAP`;\n }\n\n collections.push(\n <Divider sx={{ color: \"#8b93ab\", fontWeight: \"bold\" }}>\n {gapText}\n </Divider>,\n );\n }\n\n if (previousDate && previousDate <= moment() && moment(date) > moment()) {\n collections.push(\n <Box\n sx={{\n overflow: \"visible\",\n borderTop: \"1px dashed #5dadd6\",\n position: \"relative\",\n \"&::before\": {\n content: '\"▴ Today\"',\n fontWeight: \"bold\",\n color: \"white\",\n backgroundColor: \"#5dadd6\",\n padding: \"1px 8px\",\n borderRadius: \"3px\",\n position: \"absolute\",\n fontSize: \"11px\",\n top: \"-9px\",\n left: \"20px\",\n },\n }}\n ref={hasTodayService ? null : todayRef}\n />,\n );\n }\n\n previousDate = currentDate;\n const visits = availableData.visits[date];\n const isToday =\n moment(date).format(\"YYYYMMDD\") === moment().format(\"YYYYMMDD\");\n\n const visitsContainer = visits.map((visit) => {\n return (\n <Grid item xs={6} sx={{}}>\n <VisitBoxMemo\n visit={visit}\n locationServiceVendors={locationServiceVendors}\n />\n </Grid>\n );\n });\n\n const data = (\n <Box\n key={moment(date).format(\"YYYYMMDD\")}\n ref={isToday ? todayRef : null}\n sx={{\n display: \"flex\",\n flexDirection: \"row\",\n p: 1,\n overflowX: \"auto\",\n }}\n >\n <Box\n sx={{\n background: \"#313E63\",\n color: \"#fff\",\n fontSize: \"14px\",\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"center\",\n alignItems: \"center\",\n minWidth: \"80px\",\n }}\n >\n <span>{dayjs(date).format(\"dddd\")}</span>\n <span>{dayjs(date).format(\"MMM Do\")}</span>\n <span>{dayjs(date).format(\"YYYY\")}</span>\n </Box>\n <Grid\n container\n spacing={1}\n sx={{\n m: 0,\n\n \"& .MuiGrid-item\": {\n pt: 0,\n },\n \"& .MuiCard-root\": { mt: 0 },\n }}\n >\n {visitsContainer}\n </Grid>\n </Box>\n );\n\n collections.push(data);\n });\n\n return (\n <>\n <StatusBar />\n <div id=\"calendar\">\n <div\n id=\"calendar-scroll\"\n onScroll={() => onScroll()}\n ref={scrollRef}\n style={{ height: \"75vh\", overflow: \"auto\" }}\n >\n {availableData.noData && (\n <Box padding={2}>\n <Alert severity=\"warning\" sx={{ p: 1, fontSize: \"14px\" }}>\n There is no visit data available at this time\n </Alert>\n </Box>\n )}\n {fetchingPast && <Loader />}\n {errorPast && <Error />}\n {collections}\n {errorFuture && <Error />}\n {fetchingFuture && <Loader />}\n </div>\n {todayRef.current && (\n <button className=\"jump-to-today\" onClick={() => jumpToToday()}>\n Jump to Today\n </button>\n )}\n </div>\n </>\n );\n};\n\nconst mapStateToProps = (state) => {\n return {\n locationId: state.locationId,\n vendorServiceMappings: state.vendorServiceMappings,\n };\n};\nconst mapDispatchToProps = (dispatch) => {\n return {\n fetchInit: (date) => {\n dispatch(fetchAtDate(date));\n },\n fetchMore: (direction) => {\n dispatch(fetchMoreData(direction));\n },\n };\n};\n\nListView = connect(mapStateToProps, mapDispatchToProps)(ListView);\n\nexport default ListView;\n","import CalendarMonthIcon from \"@mui/icons-material/CalendarMonth\";\nimport ViewListIcon from \"@mui/icons-material/ViewList\";\nimport { ToggleButton, ToggleButtonGroup } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport ListView from \"service-calendar/components/ListView\";\nimport Calendar from \"service/Calendar\";\nimport { TabPanel } from \"service/report-request-box/MainTabs\";\nimport { useTypedSelector } from \"ticket/app/store\";\n\nconst VisitActivityTab = ({\n appTab,\n onSelectDate,\n onSelectSideTab,\n selectedDate,\n}) => {\n const [calendarView, setCalendarView] = useState(\"calendar\");\n\n const handleCalendarView = (\n _event: React.MouseEvent<HTMLElement>,\n newCalendarView: string | null\n ) => {\n if (calendarView !== newCalendarView && newCalendarView !== null) {\n setCalendarView(newCalendarView);\n if (newCalendarView === \"list\") {\n onSelectSideTab(\"services\");\n }\n }\n };\n\n return (\n <TabPanel value={appTab} index={1} sx={{ position: \"relative\" }}>\n <ToggleButtonGroup\n value={calendarView}\n exclusive\n onChange={handleCalendarView}\n sx={{\n position: \"absolute\",\n right: 0,\n background: \"#2C3237\",\n \"& *\": { color: \"#fff\" },\n }}\n >\n <ToggleButton value=\"calendar\">\n <CalendarMonthIcon />\n </ToggleButton>\n <ToggleButton value=\"list\">\n <ViewListIcon />\n </ToggleButton>\n </ToggleButtonGroup>\n {calendarView === \"calendar\" && (\n <Calendar\n calendarApi={useTypedSelector((state) => state.calendarApi)}\n onDayClick={onSelectDate}\n selectedDay={selectedDate}\n />\n )}\n {calendarView === \"list\" && (\n <div className=\"anenta-calendar\">\n <ListView\n calendarApi={useTypedSelector((state) => state.calendarApi)}\n />\n </div>\n )}\n </TabPanel>\n );\n};\n\nexport default VisitActivityTab;\n","import React, { useState, useReducer } from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\n\nimport {\n TextAreaInput,\n TextInput,\n MultiLineTextInput,\n ModalBox,\n} from 'auditComponents'\n\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCheck } from \"@fortawesome/free-solid-svg-icons\";\nimport { Btn } from \"sharedComponents\";\n\nconst dataReducer = (data, { value, name }) => {\n return {\n ...data,\n [name]: value\n }\n};\n\nvar LocationUpdateModal = ( {\n closeModal,\n locationData,\n onSubmit\n} ) => {\n \n const [submited, setSubmit] = useState(false);\n const [updateData, _setRequestData] = useReducer(dataReducer, locationData)\n const setRequestData = (value, name) => _setRequestData({value, name})\n const { name, postcode, postTown, comment } = updateData\n \n\n if (!submited) {\n\n return(\n <ModalBox\n title=\"Location Update Request\"\n subtext=\"Please send us any incorrect details\"\n onClose={closeModal}\n onSend={() => {\n onSubmit()\n setSubmit(true)\n }}\n className=\"location-update-modal\"\n >\n <TextInput\n name=\"name\"\n value={name}\n onChange={setRequestData}\n label={\"Practice Name\"}\n />\n\n <MultiLineTextInput\n name=\"address\"\n label={\"Address\"}\n onChange={setRequestData}\n valueBylineName={{\n addressLine1: updateData.addressLine1,\n addressLine2: updateData.addressLine2,\n addressLine3: updateData.addressLine3,\n }}\n />\n <TextInput\n name=\"postTown\"\n value={postTown}\n label={\"Post Town\"}\n onChange={setRequestData}\n />\n <TextInput\n name=\"postcode\"\n value={postcode}\n label={\"Postcode\"}\n onChange={setRequestData}\n />\n\n <TextAreaInput\n name=\"comment\"\n value={comment}\n label=\"Comment\"\n onChange={setRequestData}\n placeholder=\"Provide please any additional information\"\n onChange={setRequestData}\n />\n </ModalBox>\n )\n } else {\n return (\n <React.Fragment>\n <div className=\"an-modal__body text-center\">\n <div className=\"an-modal__header--title\">Thank you for the feedback</div>\n <FontAwesomeIcon\n className=\"text-success\"\n icon={faCheck}\n size=\"4x\"\n />\n <p style={{ marginBottom: \"0\" }}>\n We will review your changes. You may not see the updates happen immediately.\n </p>\n </div>\n <div className=\"an-switch-modal__footer\">\n <Btn\n onClick={closeModal}\n className=\"w-phone-100 m-0\"\n styles=\"outline-primary\"\n >\n Continue\n </Btn>\n </div>\n </React.Fragment>\n );\n }\n}\n\nLocationUpdateModal.propTypes = {\n};\n\n\n\nexport default LocationUpdateModal;\n\n\n\n\n\n\n","import { MultiLineTextInput, NumberInput, SummaryRow, TextInput, YesNoInput } from 'auditComponents';\nimport dotProp from 'dot-prop-immutable';\nimport emailAddressCheck from 'email-addresses';\nimport _ from 'lodashExtended';\nimport React, { useReducer } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useRouteMatch } from 'react-router-dom';\nimport { ModalRoute } from 'react-router-modal';\n\nimport { updateSectionData } from '../../sections/operations';\nimport { getSectionData } from '../../sections/selectors';\nimport LocationUpdateModal from '../LocationUpdateModal';\nimport Section from '../Section';\nimport SubmitSummarySection from '../SubmitSummarySection';\n\nconst SECTION_ID = \"general_information\";\nconst TITLE = \"General Information\";\n\nconst d = dotProp;\n\nconst FoundMistake = ({ label, onClick }) => {\n return (\n <div>\n Found a mistake?{\" \"}\n <span style={{ textDecoration: \"underline\" }} onClick={onClick}>\n Please update the {label}\n </span>\n </div>\n );\n};\n\nfunction getErrors({ email }) {\n var errors = {};\n if (_.isPresent(email)) {\n errors[\"email\"] = emailAddressCheck.parseOneAddress(email)\n ? null\n : [\"please enter a valid email address\"];\n }\n\n return errors;\n}\n\nfunction mergeErrors(allErrors, attr) {\n return {\n ...allErrors,\n ...getErrors(attr),\n };\n}\n\nconst incompleteMessage = (state) => {\n const {\n fullName,\n jobTitle,\n email,\n hasKnowledgeOfHtm0701,\n hasKnowledgeOfEpr507,\n clinicalEmployeeCount,\n clinicallyActiveRoomsCount,\n } = getSectionData(SECTION_ID, state);\n\n const toCheck = [\n fullName,\n jobTitle,\n email,\n hasKnowledgeOfHtm0701,\n hasKnowledgeOfEpr507,\n clinicalEmployeeCount,\n clinicallyActiveRoomsCount,\n ];\n\n const blankFields = _.filter(toCheck, _.isBlank).length;\n\n return blankFields > 0\n ? `There ${\n blankFields == 1 ? \"is\" : \"are\"\n } ${blankFields} unanswered question${\n blankFields == 1 ? \"\" : \"s\"\n } remaining`\n : null;\n};\n\nconst isStarted = (state) => {\n const sectionData = getSectionData(SECTION_ID, state);\n return _(sectionData).omit(\"location\").isPresent();\n};\n\nvar GeneralInformation = ({ onChange, sectionData }) => {\n const {\n fullName,\n jobTitle,\n email,\n hasKnowledgeOfHtm0701,\n hasKnowledgeOfEpr507,\n clinicalEmployeeCount,\n clinicallyActiveRoomsCount,\n location = {},\n } = sectionData;\n\n const { url } = useRouteMatch();\n const history = useHistory();\n const locationUpdateModalPath = `${url}/locationDetailsUpdate`;\n const goToLocationUpdateModal = () => history.push(locationUpdateModalPath);\n const [errors, setErrors] = useReducer(mergeErrors, {});\n\n return (\n <Section\n sectionId={SECTION_ID}\n title={TITLE}\n subtext=\"You will be required to confirm the practice's details\"\n >\n <ModalRoute\n path={locationUpdateModalPath}\n parentPath={url}\n props={{ locationData: location, onSubmit: () => {} }}\n component={LocationUpdateModal}\n className=\"an-modal-lg react-router-modal__modal\"\n />\n\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n <div className=\"h5 mt-4 mb-3 strong\">\n Person conducting the Waste Management Audit\n </div>\n\n <TextInput\n name=\"fullName\"\n value={fullName}\n label={\"Full Name\"}\n onChange={onChange}\n allErrors={errors}\n placeholder={\"Enter your first and last name\"}\n />\n <TextInput\n name=\"jobTitle\"\n value={jobTitle}\n label={\"Job Title\"}\n onChange={onChange}\n allErrors={errors}\n placeholder={\"Enter your Job title\"}\n />\n <TextInput\n name=\"email\"\n value={email}\n label={\"Email Address\"}\n onChange={onChange}\n onValidate={setErrors}\n allErrors={errors}\n placeholder={\"Enter your email address\"}\n />\n <YesNoInput\n name=\"hasKnowledgeOfHtm0701\"\n value={hasKnowledgeOfHtm0701}\n label=\"Do you have a working knowledge of Health Technical Memorandum (HTM) 07-01?\"\n onChange={onChange}\n />\n <YesNoInput\n name=\"hasKnowledgeOfEpr507\"\n value={hasKnowledgeOfEpr507}\n label=\"Do you have a working knowledge of Environmental Permitting Regulations (EPR) 5.07?\"\n onChange={onChange}\n />\n\n <div className=\"h5 mt-5 mb-3 strong\">\n Practice general information\n </div>\n <TextInput\n name=\"practiceName\"\n disabled={true}\n subtext={\n <FoundMistake\n label={\"practice name\"}\n onClick={goToLocationUpdateModal}\n />\n }\n value={location.name}\n label={\"Practice Name\"}\n allErrors={errors}\n />\n <MultiLineTextInput\n name=\"address\"\n disabled={true}\n subtext={\n <FoundMistake\n label={\"address\"}\n onClick={goToLocationUpdateModal}\n />\n }\n label={\"Address\"}\n valueBylineName={_(location)\n .pick([\n \"addressLine1\",\n \"addressLine2\",\n \"addressLine3\",\n \"postTown\",\n \"postcode\",\n ])\n .omitBy(_.isBlank)\n .value()}\n allErrors={errors}\n />\n <NumberInput\n name=\"clinicalEmployeeCount\"\n value={clinicalEmployeeCount}\n label={\"Clinical Employees\"}\n onChange={onChange}\n allErrors={errors}\n subtext={\n \"What is the number of clinically active employees at this location?\"\n }\n />\n <NumberInput\n name=\"clinicallyActiveRoomsCount\"\n value={clinicallyActiveRoomsCount}\n label={\"Clinically active rooms\"}\n onChange={onChange}\n allErrors={errors}\n subtext={\n \"How many clinically active rooms are there at this location?\"\n }\n />\n </div>\n </div>\n </Section>\n );\n};\n\nGeneralInformation.propTypes = {};\n\nvar SummaryView = ({ wasteAudit }) => {\n const {\n errors,\n fullName,\n jobTitle,\n email,\n hasKnowledgeOfHtm0701,\n hasKnowledgeOfEpr507,\n clinicalEmployeeCount,\n clinicallyActiveRoomsCount,\n location = {},\n } = wasteAudit.sections[SECTION_ID] || {};\n\n return (\n <SubmitSummarySection sectionId={SECTION_ID} title={TITLE}>\n <div className=\"media\">\n <div className=\"media-body\">\n <h4 className=\"h5 summary__section--subtitle\">\n Person conducting the Waste Management Audit\n </h4>\n <SummaryRow value={fullName} label={\"Full Name\"} />\n <SummaryRow value={jobTitle} label={\"Job Title\"} />\n <SummaryRow value={email} label={\"Email Address\"} />\n <SummaryRow\n value={hasKnowledgeOfHtm0701}\n label={\"Has working knowledge of Health Technical Memorandum 07-01\"}\n />\n <SummaryRow\n value={hasKnowledgeOfEpr507}\n label={\n \"Has working knowledge of Environmental Permitting Regulations 5.07\"\n }\n />\n <h4 className=\"h5 mt-4 mb-3 strong\">Practice general information</h4>\n <SummaryRow value={location.name} label={\"Practice Name\"} />\n <SummaryRow value={location.address} label={\"Address\"} />\n <SummaryRow\n value={clinicalEmployeeCount}\n label={\"Clinical Employees\"}\n />\n <SummaryRow\n value={clinicallyActiveRoomsCount}\n label={\"Clinically active rooms\"}\n />\n </div>\n </div>\n </SubmitSummarySection>\n );\n};\n\nconst mapStateToProps = (state) => {\n return {\n sectionData: getSectionData(SECTION_ID, state),\n };\n};\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onChange: (value, name) => {\n dispatch(updateSectionData(SECTION_ID, d.set({}, name, value)));\n },\n };\n};\n\nGeneralInformation = connect(\n mapStateToProps,\n mapDispatchToProps\n)(GeneralInformation);\n\n//export default GeneralInformation;\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n incompleteMessage,\n isStarted,\n Component: GeneralInformation,\n SummaryView,\n};\n","import React from \"react\";\nimport { Typography } from \"@mui/material\";\nimport { ServiceSuspensionRequest } from \"service/ticket/types\";\nimport { formatDate } from \"sharedUtils\";\n\ninterface ServiceSuspensionRequestCardDetailsProps {\n request: ServiceSuspensionRequest;\n}\n\nconst ServiceSuspensionRequestCardDetails: React.FC<\n ServiceSuspensionRequestCardDetailsProps\n> = ({ request }) => {\n const immediateEffectText = request.withImmediateEffect\n ? \"with immediate effect\"\n : \"\";\n const noVisitsExpectedAfterText = request.noVisitsExpectedAfter\n ? `Effective From: ${formatDate(request.noVisitsExpectedAfter)}`\n : \"\";\n\n return (\n <>\n <Typography>\n Vendor has been requested to suspend service {immediateEffectText}\n </Typography>\n <Typography>Reason: {request?.reasonName}</Typography>\n\n {request.noVisitsExpectedAfter && <Typography>{noVisitsExpectedAfterText}</Typography>}\n </>\n );\n};\n\nexport default ServiceSuspensionRequestCardDetails;\n","import { DebugButton } from \"service/GlobalDebugger\";\nimport {\n Box,\n Card,\n CardContent,\n Collapse,\n List,\n Stack,\n Typography,\n} from \"@mui/material\";\nimport { formatDate } from \"sharedUtils\";\nimport ShowMoreDivider from \"service/forms/common/ShowMoreDivider\";\nimport React, { useContext } from \"react\";\nimport ServiceSuspensionRequestCardDetails from \"./ServiceSuspensionRequestCardDetails\";\nimport { ServiceSuspensionRequest } from \"service/ticket/types\";\nimport { ActionButtons } from \"./AdhocVisitRequestCard\";\nimport AppContext from \"ticket/AppContext\";\nimport Debugger from \"service/forms/Debugger\";\nimport CustomTimelineNotes from \"service/forms/common/CustomTimeLineNotes\";\n\ninterface ServiceSuspensionRequestCardProps {\n request: ServiceSuspensionRequest;\n isOpen: boolean;\n toggleOpen: () => void;\n}\n\nconst ServiceSuspensionRequestCard: React.FC<\n ServiceSuspensionRequestCardProps\n> = ({ request, isOpen, toggleOpen }) => {\n const { notes } = request;\n const { selectedContainer } = useContext(AppContext);\n\n return (\n <Box\n sx={{\n p: 1,\n pt: 0,\n position: \"relative\",\n ...(selectedContainer === request.id && {\n \"& .MuiPaper-root\": {\n border: \"3px solid #6c8c89\",\n },\n }),\n }}\n data-link-card={request.id}\n >\n <Card\n variant=\"outlined\"\n sx={{\n borderRadius: 2,\n background: \"#262B30\",\n \"& .MuiCardContent-root:last-child\": { pb: 1 },\n \"& *\": { fontSize: \"12px\", color: \"#fff\" },\n }}\n >\n <CardContent>\n <Stack\n direction=\"row\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n spacing={1}\n >\n <Box display={\"flex\"} alignItems={\"center\"}>\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Service Suspension Request\n </Typography>\n <Typography color=\"grey\" sx={{ ml: \"4px\", fontSize: \"10px\" }}>\n on {formatDate(request?.requestedAt)}\n </Typography>\n </Box>\n <ActionButtons\n // TODO: Add actions and active\n actions={request?.actions}\n isActive={request?.isActive}\n request={request}\n linkSelected={selectedContainer === request.id}\n />\n </Stack>\n\n <ServiceSuspensionRequestCardDetails request={request} />\n <List sx={{ width: \"100%\" }} component=\"nav\">\n <ShowMoreDivider toggleOpen={toggleOpen} isOpen={isOpen} />\n <Collapse in={isOpen} timeout=\"auto\" unmountOnExit>\n <CustomTimelineNotes notes={notes} />\n </Collapse>\n </List>\n </CardContent>\n <DebugButton {...request} />\n </Card>\n </Box>\n );\n};\n\nexport default ServiceSuspensionRequestCard;\n","import { colorShade } from '../utils'\nimport { Tooltip } from '@mui/material'\n\nexport const BillingDot = ({ color = '#007495' }) => {\n return (\n <svg\n width='18'\n height='18'\n viewBox='0 0 21 21'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <circle cx='10.5' cy='10.5' r='10.5' fill={color} />\n </svg>\n )\n}\n\nexport const BillingDotHole = ({ color = '#007495' }) => {\n return (\n <svg\n width='18'\n height='18'\n viewBox='0 0 21 21'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <circle\n cx='10.5'\n cy='10.5'\n r='8.5'\n fill='none'\n stroke={color}\n strokeWidth='3'\n />\n </svg>\n )\n}\n\nexport const BillingInfo = ({ uuid, closedAccount, locationVendorAccountUuids, color, isTerminatedThisMonth, month, monthClosed, closedOn }) => {\n const content = (\n <div style={{ display: 'flex' }}>\n {locationVendorAccountUuids.includes(uuid)\n ? <BillingDot color={colorShade(color, -70)} />\n : <BillingDotHole color='transparent' />}\n\n </div>\n )\n\n return (\n <div\n className='service-account-bar' style={{\n width: '100%',\n background: closedAccount ? 'rgba(233, 87, 63, 0.2)' : color,\n borderTop: closedAccount ? '5px solid rgba(233, 87, 63, 1)' : '',\n borderLeft: monthClosed ? '5px solid rgba(233, 87, 63, 1)' : '',\n borderBottom: closedAccount\n ? '5px solid rgba(233, 87, 63, 1)'\n : ''\n }}\n >\n {closedAccount\n ? (\n <Tooltip\n placement='top'\n arrow\n title={`Account closed from ${closedOn}`}\n slotProps={{\n tooltip: { sx: { fontSize: '15px', backgroundColor: theme => theme.palette.error.light, color: theme => theme.palette.error.contrastText } },\n arrow: { sx: { color: theme => theme.palette.error.light } }\n }}\n >\n {content}\n </Tooltip>\n )\n : isTerminatedThisMonth\n ? (\n <Tooltip\n placement='top'\n arrow\n title={`Terminated ${month.shortName}`}\n slotProps={{\n tooltip: { sx: { fontSize: '15px', backgroundColor: theme => theme.palette.error.light, color: theme => theme.palette.error.contrastText } },\n arrow: { sx: { color: theme => theme.palette.error.light } }\n }}\n >\n {content}\n </Tooltip>\n )\n : content}\n\n </div>\n )\n}\n","import { Chip } from \"@mui/material\";\n\nconst chipStyles = {\n total_failure: {\n backgroundColor: \"#DC6B4C\",\n },\n success: {\n backgroundColor: \"#0FA764\",\n },\n partial_failure: {\n backgroundColor: \"#bf850f\",\n },\n};\n\nexport const StatusChip = ({ label, status, currentStatus, onClick }) => {\n const isSelected = status === currentStatus;\n\n return (\n <Chip\n label={label}\n size=\"small\"\n variant={isSelected ? \"filled\" : \"outlined\"}\n onClick={isSelected ? undefined : onClick}\n sx={{\n minWidth: \"53px\",\n borderColor: chipStyles[status].backgroundColor,\n borderWidth: '2px',\n color: chipStyles[status].backgroundColor,\n ...(isSelected && {\n backgroundColor: chipStyles[status].backgroundColor,\n color: \"#fff\",\n cursor: \"not-allowed\",\n }),\n }}\n />\n );\n};\n","import CheckIcon from \"@mui/icons-material/Check\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport TagIcon from \"@mui/icons-material/Tag\";\nimport { Box, Card, CardActions, Tooltip, Typography } from \"@mui/material\";\nimport { TicketReply } from \"api/tickets\";\nimport { useGetAllStaffQuery } from \"api/users\";\nimport { startCase, upperCase } from \"lodash\";\nimport { useContext } from \"react\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport LogComponent from \"service/request-logs/LogComponent\";\nimport { formatTime, updateQueryStringParameter } from \"sharedUtils\";\nimport AppContext from \"ticket/AppContext\";\nimport ActionMenuButton from \"../actions-menu/ActionMenuButton\";\nimport ReplyCardContent from \"./ReplyCardContent\";\nimport ReplyCardHeader from \"./ReplyCardHeader\";\nimport { getBorderColor, styles } from \"./ReplyCardStyles\";\nimport { TextSmallMuted, TextSmall, TextMuted } from 'sharedComponents';\n\nconst getChannelColors = (channel, stakeholderName) => {\n if (channel === \"organisation\" && stakeholderName === \"Organisation\") {\n return { shadow: \"#37BC9B\", background: \"#264E50\" };\n } else if (channel === \"vendor\" && stakeholderName === \"Vendor\") {\n return { shadow: \"#CF2D42\", background: \"#2E070C\" };\n } else {\n return { shadow: \"#DD9907\", background: \"#2A2518\" };\n }\n};\n\nconst ReplyStatus = ({ reply }) => {\n const { data: usersById, isLoading } = useGetAllStaffQuery();\n\n const { processedEvents, status, processedByDefault } = reply;\n\n if (processedByDefault) {\n return null;\n } else {\n return (\n status !== \"new_message\" && (\n <>\n <Tooltip\n title={\n !isLoading && (\n <>\n {processedEvents.map(\n ({ name, inputtedById, createdAt, id }) => (\n <div\n style={{ whiteSpace: \"nowrap\" }}\n key={id || \"legacy\"}\n >\n - {name} by {usersById[inputtedById].fullName} on{\" \"}\n {formatTime(createdAt)}\n </div>\n ),\n )}\n </>\n )\n }\n placement=\"top\"\n arrow\n slotProps={{ fontSize: '13px'}}\n >\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: \"4px\", mr: 1 }}>\n <CheckIcon size=\"small\" sx={{ color: \"#37BC9B\" }} />\n <TextSmall color=\"#37BC9B\">\n {startCase(status)}\n </TextSmall>\n </Box>\n </Tooltip>\n </>\n )\n );\n }\n};\n\nconst ReplyCard = ({\n reply,\n toggleOpenForm,\n setOpenFormUrl,\n selected,\n}: {\n reply: TicketReply;\n toggleOpenForm;\n setOpenFormUrl;\n selected;\n}) => {\n const { setShowTaggingForm } = useContext(AppContext);\n const { channel, tagActions, responseActions } = reply;\n\n const isNewMessage = reply?.status === \"new_message\";\n const { shadow, background } = getChannelColors(\n channel,\n reply?.stakeholderName,\n );\n\n const responseFormOnClickHandler = (_e: any, option: any) => {\n toggleOpenForm();\n setOpenFormUrl(\n updateQueryStringParameter(option.path, \"respond_to_reply_id\", reply.id),\n );\n };\n\n const taggingFormOnClickHandler = (_e: any, option: any) => {\n toggleOpenForm();\n setShowTaggingForm(true);\n setOpenFormUrl(\n updateQueryStringParameter(option.path, \"tagged_reply_id\", reply.id),\n );\n };\n\n return (\n <Card\n sx={{\n backgroundColor: '#23272D',\n ...styles.card(reply),\n ...(isNewMessage && {\n // background: background,\n }),\n ...(selected && {\n borderWidth: '3px',\n backgroundColor: '#1E1E1E', // TODO this is not changing on select, the border is.\n }),\n display: \"flex\",\n flexDirection: \"column\",\n }}\n key={reply.id}\n >\n\n <ReplyCardHeader reply={reply} />\n <ReplyCardContent reply={reply} />\n\n {channel !== \"agent\" && (\n <CardActions\n sx={{\n padding: 0,\n display: \"flex\",\n alignItems: \"center\",\n mt: \"auto\",\n borderTop: \"1px solid rgba(255, 255, 255, 0.2)\",\n \"& > :not(style) ~ :not(style)\": {\n marginLeft: \"0px\", // Override the default 8px margin\n },\n }}\n >\n {responseActions.length > 0 && (\n <ActionMenuButton\n onClickHandler={responseFormOnClickHandler}\n icon={<ReplyIcon />}\n serviceActions={responseActions}\n />\n )}\n\n {tagActions.length > 0 && (\n <ActionMenuButton\n onClickHandler={taggingFormOnClickHandler}\n icon={<TagIcon />}\n serviceActions={tagActions}\n />\n )}\n\n <Box flex=\"1\" />\n {reply?.status === \"new_message\" && (\n <Typography fontSize=\"11px\" fontWeight=\"bold\" sx={{ mr: 1 }}>\n {upperCase(reply.status)}\n </Typography>\n )}\n\n <ReplyStatus reply={reply} />\n\n <Box sx={{ mr: 1 }}>\n <DebugButton buttonSize=\"small\" {...reply} />\n </Box>\n\n </CardActions>\n )}\n {reply?.event_data.length > 0 && (\n <LogComponent eventData={reply.event_data} url={reply.url} />\n )}\n </Card>\n );\n};\n\nexport default ReplyCard;\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","/**\r\n * Modal class is used to display information over chart area.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Popup } from \"./Popup\";\nimport { Adapter } from \"../utils/Adapter\";\n/**\r\n * Shows an HTML modal which covers window or a chart area.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/popups-and-modals/} For examples and docs on Popups and Modals.\r\n */\nvar Modal = /** @class */function (_super) {\n tslib_1.__extends(Modal, _super);\n /**\r\n * Constructor\r\n */\n function Modal() {\n var _this = _super.call(this) || this;\n /**\r\n * Adapter.\r\n */\n _this.adapter = new Adapter(_this);\n _this.className = \"Modal\";\n _this.showCurtain = true;\n _this.draggable = false;\n return _this;\n }\n return Modal;\n}(Popup);\nexport { Modal };","/**\r\n * Duration formatting functionality.\r\n */\nimport * as tslib_1 from \"tslib\";\nimport { Language } from \"../utils/Language\";\nimport { BaseObject } from \"../Base\";\nimport { getTextFormatter } from \"../formatters/TextFormatter\";\nimport { registry } from \"../Registry\";\nimport * as $strings from \"../utils/Strings\";\nimport * as $object from \"../utils/Object\";\nimport * as $utils from \"../utils/Utils\";\nimport * as $type from \"../utils/Type\";\nimport * as $math from \"../utils/Math\";\n/**\r\n * DurationFormatter class. Formats numbers as durations.\r\n *\r\n * `1000` as `16:40`\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/} Tutorial on duration formatting\r\n */\nvar DurationFormatter = /** @class */function (_super) {\n tslib_1.__extends(DurationFormatter, _super);\n /**\r\n * Constructor\r\n */\n function DurationFormatter() {\n var _this = _super.call(this) || this;\n /**\r\n * A base value for negative numbers. Will treat all numbers below this value\r\n * as negative numbers.\r\n */\n _this._negativeBase = 0;\n /**\r\n * A base unit to consider values are in.\r\n *\r\n * @default \"s\"\r\n */\n _this._baseUnit = \"second\";\n /**\r\n * Output format to produce. If the format calls for applying color to the\r\n * formatted value, this setting will determine what markup to use: SVG or\r\n * HTML.\r\n *\r\n * Available options: svg, html.\r\n *\r\n * @default \"svg\"\r\n */\n _this._outputFormat = \"svg\";\n /**\r\n * How many milliseconds each unit represents.\r\n */\n _this._unitValues = {\n \"millisecond\": 1,\n \"second\": 1000,\n \"minute\": 60000,\n \"hour\": 3600000,\n \"day\": 86400000,\n \"week\": 604800000,\n \"month\": 2592000000,\n \"year\": 31536000000\n };\n /**\r\n * Collection of aliases for units.\r\n */\n _this._unitAliases = {\n \"Y\": \"y\",\n \"D\": \"d\",\n \"H\": \"h\",\n \"K\": \"h\",\n \"k\": \"h\",\n \"n\": \"S\"\n };\n _this.className = \"DurationFormatter\";\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Formats the number according as duration.\r\n *\r\n * For example `1000` (base unit seconds) would be converted to `16:40` as in\r\n * 16 minutes and 40 seconds.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/} Tutorial on duration formatting\r\n * @param value Value to format\r\n * @param format Format to apply\r\n * @param base Override base unit\r\n * @return Formatted number\r\n */\n DurationFormatter.prototype.format = function (value, format, base) {\n // no language?\n if (!this.language) {\n if (this.sprite) {\n this.language = this.sprite.language;\n } else {\n this.language = new Language();\n }\n }\n // no base unit?\n var baseUnit = base || this._baseUnit;\n // no format passed in or empty\n if (typeof format === \"undefined\" || format === \"\") {\n if ($type.hasValue(this.durationFormat)) {\n format = this.durationFormat;\n } else {\n format = this.getFormat($type.toNumber(value), null, baseUnit);\n }\n }\n // Clean format\n format = $utils.cleanFormat(format);\n // get format info (it will also deal with parser caching)\n var info = this.parseFormat(format, baseUnit);\n // cast to number just in case\n // TODO: maybe use better casting\n var source = Number(value);\n // format and replace the number\n var details;\n if (source > this._negativeBase) {\n details = info.positive;\n } else if (source < this._negativeBase) {\n details = info.negative;\n } else {\n details = info.zero;\n }\n // Format\n var formatted = this.applyFormat(source, details);\n // Apply color?\n if (details.color !== \"\") {\n if (this._outputFormat === \"svg\") {\n formatted = \"<tspan fill='\" + details.color + \"'>\" + formatted + \"</tspan>\";\n } else if (this._outputFormat === \"html\") {\n formatted = \"<span style='color: \" + details.color + \";'>\" + formatted + \"</span>\";\n }\n }\n return formatted;\n };\n /**\r\n * Parses supplied format into structured object which can be used to format\r\n * the number.\r\n *\r\n * @param format Format string, i.e. \"#,###.00\"\r\n * @param base Override base unit\r\n * @return Parsed information\r\n */\n DurationFormatter.prototype.parseFormat = function (format, base) {\n var _this = this;\n // Check cache\n var cached = this.getCache(format);\n if ($type.hasValue(cached)) {\n return cached;\n }\n // no base unit?\n var baseUnit = base || this._baseUnit;\n // Initialize duration parsing info\n var info = {\n \"positive\": {\n \"color\": \"\",\n \"template\": \"\",\n \"parts\": [],\n \"source\": \"\",\n \"baseUnit\": baseUnit,\n \"parsed\": false,\n \"absolute\": false\n },\n \"negative\": {\n \"color\": \"\",\n \"template\": \"\",\n \"parts\": [],\n \"source\": \"\",\n \"baseUnit\": baseUnit,\n \"parsed\": false,\n \"absolute\": false\n },\n \"zero\": {\n \"color\": \"\",\n \"template\": \"\",\n \"parts\": [],\n \"source\": \"\",\n \"baseUnit\": baseUnit,\n \"parsed\": false,\n \"absolute\": false\n }\n };\n // Escape double vertical bars (that mean display one vertical bar)\n format = format.replace(\"||\", $strings.PLACEHOLDER2);\n // Split it up and deal with different formats\n var parts = format.split(\"|\");\n info.positive.source = parts[0];\n if (typeof parts[2] === \"undefined\") {\n info.zero = info.positive;\n } else {\n info.zero.source = parts[2];\n }\n if (typeof parts[1] === \"undefined\") {\n info.negative = info.positive;\n } else {\n info.negative.source = parts[1];\n }\n // Parse each\n $object.each(info, function (part, item) {\n // Already parsed\n if (item.parsed) {\n return;\n }\n // Check cached\n if (typeof _this.getCache(item.source) !== \"undefined\") {\n info[part] = _this.getCache(item.source);\n return;\n }\n // Begin parsing\n var partFormat = item.source;\n // Check for [] directives\n var dirs = [];\n dirs = item.source.match(/^\\[([^\\]]*)\\]/);\n if (dirs && dirs.length && dirs[0] !== \"\") {\n partFormat = item.source.substr(dirs[0].length);\n item.color = dirs[1];\n }\n // Let TextFormatter split into chunks\n var chunks = getTextFormatter().chunk(partFormat, true);\n for (var i = 0; i < chunks.length; i++) {\n var chunk = chunks[i];\n // replace back double vertical bar\n chunk.text = chunk.text.replace($strings.PLACEHOLDER2, \"|\");\n if (chunk.type === \"value\") {\n // Just \"Duration\"?\n // if (chunk.text.toLowerCase() === \"duration\") {\n // \tchunk.text = durationFormat;\n // }\n // Check for \"a\" (absolute) modifier\n if (chunk.text.match(/[yYMdDwhHKkmsSn]+a/)) {\n item.absolute = true;\n chunk.text = chunk.text.replace(/([yYMdDwhHKkmsSn]+)a/, \"$1\");\n }\n // Find all possible parts\n var matches = chunk.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);\n if (matches) {\n // Populate template\n for (var x = 0; x < matches.length; x++) {\n // Is it an alias?\n if (!$type.hasValue(matches[x])) {\n matches[x] = _this._unitAliases[matches[x]];\n }\n item.parts.push(matches[x]);\n chunk.text = chunk.text.replace(matches[x], $strings.PLACEHOLDER);\n }\n }\n }\n // Apply to template\n item.template += chunk.text;\n }\n // Apply style formatting\n //item.template = getTextFormatter().format(item.template, this.outputFormat);\n // Save cache\n _this.setCache(item.source, item);\n // Mark this as parsed\n item.parsed = true;\n });\n // Save cache (the whole thing)\n this.setCache(format, info);\n return info;\n };\n /**\r\n * Applies parsed format to a numeric value.\r\n *\r\n * @param value Value\r\n * @param details Parsed format as returned by {parseFormat}\r\n * @return Formatted duration\r\n */\n DurationFormatter.prototype.applyFormat = function (value, details) {\n // Use absolute values\n var negative = !details.absolute && value < this._negativeBase;\n value = Math.abs(value);\n // Recalculate to milliseconds\n var tstamp = this.toTimeStamp(value, details.baseUnit);\n // Init return value\n var res = details.template;\n // Iterate through duration parts\n for (var i = 0, len = details.parts.length; i < len; i++) {\n // Gather the part\n var part = details.parts[i];\n var unit = this.toTimeUnit(part.substr(0, 1));\n var digits = part.length;\n // Calculate current unit value\n var ints = Math.floor(tstamp / this._unitValues[unit]);\n res = res.replace($strings.PLACEHOLDER, $utils.padString(ints, digits, \"0\"));\n // Reduce timestamp\n tstamp -= ints * this._unitValues[unit];\n }\n // Reapply negative sign\n if (negative) {\n res = \"-\" + res;\n }\n return res;\n };\n /**\r\n * Converts numeric value to timestamp in milliseconds.\r\n *\r\n * @param value A source value\r\n * @param baseUnit Base unit the source value is in: \"q\", \"s\", \"i\", \"h\", \"d\", \"w\", \"m\", \"y\"\r\n * @return Value representation as a timestamp in milliseconds\r\n */\n DurationFormatter.prototype.toTimeStamp = function (value, baseUnit) {\n return value * this._unitValues[baseUnit];\n };\n DurationFormatter.prototype.toTimeUnit = function (code) {\n switch (code) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"w\":\n return \"week\";\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n }\n ;\n };\n /**\r\n * Invalidates the parent [[Sprite]] object.\r\n */\n DurationFormatter.prototype.invalidateSprite = function () {\n if (this.sprite) {\n this.sprite.invalidate();\n }\n };\n Object.defineProperty(DurationFormatter.prototype, \"baseUnit\", {\n /**\r\n * @return Base unit\r\n */\n get: function get() {\n return this._baseUnit;\n },\n /**\r\n * Base unit the values are in.\r\n *\r\n * A base unit will be used to recalculate the numeric value to millisecond\r\n * timestamps.\r\n *\r\n * Available options:\r\n *\r\n * * \"millisecond\"\r\n * * \"second\"\r\n * * \"minute\"\r\n * * \"hour\"\r\n * * \"day\"\r\n * * \"week\"\r\n * * \"month\"\r\n * * \"year\"\r\n *\r\n * @default \"s\"\r\n * @param baseUnit A base unit\r\n */\n set: function set(baseUnit) {\n this._baseUnit = baseUnit;\n this.invalidateSprite();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DurationFormatter.prototype, \"outputFormat\", {\n /**\r\n * Getter for output format.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Output format\r\n */\n get: function get() {\n return this._outputFormat;\n },\n /**\r\n * Setter for output format: \"svg\" or \"html.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Output format\r\n */\n set: function set(outputFormat) {\n this._outputFormat = outputFormat.toLowerCase();\n this.invalidateSprite();\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns appropriate default format for the value.\r\n *\r\n * If `maxValue` is sepcified, it will use that value to determine the time\r\n * unit for the format.\r\n *\r\n * For example if your `baseUnit` is `\"second\"` and you pass in `10`, you\r\n * will get `\"10\"`.\r\n *\r\n * However, you might want it to be formatted in the context of bigger scale,\r\n * say 10 minutes (600 seconds). If you pass in `600` as `maxValue`, all\r\n * values, including small ones will use format with minutes, e.g.:\r\n * `00:10`, `00:50`, `12: 30`, etc.\r\n *\r\n * @param value Value to format\r\n * @param maxValue Maximum value to be used to determine format\r\n * @param baseUnit Base unit of the value\r\n * @return Format\r\n */\n DurationFormatter.prototype.getFormat = function (value, maxValue, baseUnit) {\n // Is format override set?\n if ($type.hasValue(this.durationFormat)) {\n return this.durationFormat;\n }\n // Get base unit\n if (!baseUnit) {\n baseUnit = this.baseUnit;\n }\n if ($type.hasValue(maxValue) && value != maxValue) {\n value = Math.abs(value);\n maxValue = Math.abs(maxValue);\n var maxUnit = this.getValueUnit($math.max(value, maxValue), baseUnit);\n //let diffUnit = this.getValueUnit(Math.abs(maxValue - value), baseUnit);\n //console.log(maxUnit, diffUnit);\n return this.durationFormats[baseUnit][maxUnit];\n } else {\n var unit = this.getValueUnit(value, baseUnit);\n return this.durationFormats[baseUnit][unit];\n }\n };\n /**\r\n * Returns value's closest denominator time unit, e.g 100 seconds is\r\n * `\"minute\"`, while 59 seconds would still be `second`.\r\n *\r\n * @param value Source duration value\r\n * @param baseUnit Base unit\r\n * @return Denominator\r\n */\n DurationFormatter.prototype.getValueUnit = function (value, baseUnit) {\n // Get base unit\n if (!baseUnit) {\n baseUnit = this.baseUnit;\n }\n // Convert to milliseconds\n var currentUnit;\n var ms = this.getMilliseconds(value, baseUnit);\n $object.eachContinue(this._unitValues, function (key, val) {\n if (key == baseUnit || currentUnit) {\n var num = ms / val;\n if (num <= 1) {\n if (!currentUnit) {\n currentUnit = key;\n }\n return false;\n }\n currentUnit = key;\n }\n return true;\n });\n return currentUnit;\n };\n /**\r\n * Converts value to milliseconds according to `baseUnit`.\r\n *\r\n * @param value Source duration value\r\n * @param baseUnit Base unit\r\n * @return Value in milliseconds\r\n */\n DurationFormatter.prototype.getMilliseconds = function (value, baseUnit) {\n // Get base unit\n if (!baseUnit) {\n baseUnit = this.baseUnit;\n }\n return value * this._unitValues[baseUnit];\n };\n Object.defineProperty(DurationFormatter.prototype, \"durationFormat\", {\n /**\r\n * @return Format\r\n */\n get: function get() {\n return this._durationFormat;\n },\n /**\r\n * If set, this format will be used instead of the one determined dynamically\r\n * based on the basedUnit and range of values.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-duration/} Available fomatting codes\r\n * @param value Format\r\n */\n set: function set(value) {\n if (this._durationFormat != value) {\n this._durationFormat = value;\n this.invalidateSprite();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DurationFormatter.prototype, \"durationFormats\", {\n /**\r\n * @return Formats\r\n */\n get: function get() {\n if (!this._durationFormats) {\n this._durationFormats = {\n \"millisecond\": {\n \"millisecond\": this.language.translate(\"_duration_millisecond\"),\n \"second\": this.language.translate(\"_duration_millisecond_second\"),\n \"minute\": this.language.translate(\"_duration_millisecond_minute\"),\n \"hour\": this.language.translate(\"_duration_millisecond_hour\"),\n \"day\": this.language.translate(\"_duration_millisecond_day\"),\n \"week\": this.language.translate(\"_duration_millisecond_week\"),\n \"month\": this.language.translate(\"_duration_millisecond_month\"),\n \"year\": this.language.translate(\"_duration_millisecond_year\")\n },\n \"second\": {\n \"second\": this.language.translate(\"_duration_second\"),\n \"minute\": this.language.translate(\"_duration_second_minute\"),\n \"hour\": this.language.translate(\"_duration_second_hour\"),\n \"day\": this.language.translate(\"_duration_second_day\"),\n \"week\": this.language.translate(\"_duration_second_week\"),\n \"month\": this.language.translate(\"_duration_second_month\"),\n \"year\": this.language.translate(\"_duration_second_year\")\n },\n \"minute\": {\n \"minute\": this.language.translate(\"_duration_minute\"),\n \"hour\": this.language.translate(\"_duration_minute_hour\"),\n \"day\": this.language.translate(\"_duration_minute_day\"),\n \"week\": this.language.translate(\"_duration_minute_week\"),\n \"month\": this.language.translate(\"_duration_minute_month\"),\n \"year\": this.language.translate(\"_duration_minute_year\")\n },\n \"hour\": {\n \"hour\": this.language.translate(\"_duration_hour\"),\n \"day\": this.language.translate(\"_duration_hour_day\"),\n \"week\": this.language.translate(\"_duration_hour_week\"),\n \"month\": this.language.translate(\"_duration_hour_month\"),\n \"year\": this.language.translate(\"_duration_hour_year\")\n },\n \"day\": {\n \"day\": this.language.translate(\"_duration_day\"),\n \"week\": this.language.translate(\"_duration_day_week\"),\n \"month\": this.language.translate(\"_duration_day_month\"),\n \"year\": this.language.translate(\"_duration_day_year\")\n },\n \"week\": {\n \"week\": this.language.translate(\"_duration_week\"),\n \"month\": this.language.translate(\"_duration_week_month\"),\n \"year\": this.language.translate(\"_duration_week_year\")\n },\n \"month\": {\n \"month\": this.language.translate(\"_duration_month\"),\n \"year\": this.language.translate(\"_duration_month_year\")\n },\n \"year\": {\n \"year\": this.language.translate(\"_duration_year\")\n }\n };\n }\n return this._durationFormats;\n },\n /**\r\n * Duration formats for various combination of base units.\r\n *\r\n * @param value Formats\r\n */\n set: function set(value) {\n this._durationFormats = value;\n this.invalidateSprite();\n },\n enumerable: true,\n configurable: true\n });\n return DurationFormatter;\n}(BaseObject);\nexport { DurationFormatter };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"DurationFormatter\"] = DurationFormatter;","/**\r\n * This module defines a [[Validatable]] class which can be used by all\r\n * non-[[Sprite]] classes to use system beats to revalidate themselves.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObjectEvents } from \"../Base\";\nimport { registry } from \"../Registry\";\n/**\r\n * This module defines a [[Validatable]] class which can be used by all\r\n * non-[[Sprite]] classes to use system update cycle to revalidate themselves.\r\n *\r\n * @ignore Exclude from docs\r\n */\nvar Validatable = /** @class */function (_super) {\n tslib_1.__extends(Validatable, _super);\n function Validatable() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\r\n * Is invalid and should be revalidated?\r\n */\n _this._invalid = false;\n return _this;\n }\n /**\r\n * Invalidates the element, so that it can re-validate/redraw itself in the\r\n * next cycle.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Validatable.prototype.invalidate = function () {\n if (this._invalid === false) {\n this._invalid = true;\n registry.events.on(\"exitframe\", this.validate, this);\n }\n };\n /**\r\n * Validates itself.\r\n *\r\n * Most probably the extending class will have an overriding `validate()`\r\n * method which will do actual work, as well as call this method using\r\n * `super.validate()`.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Validatable.prototype.validate = function () {\n if (this._invalid === true) {\n this._invalid = false;\n registry.events.off(\"exitframe\", this.validate, this);\n }\n };\n return Validatable;\n}(BaseObjectEvents);\nexport { Validatable };","/**\r\n * Data parser module.\r\n */\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { DateFormatter } from \"../formatters/DateFormatter\";\nimport * as $utils from \"../utils/Utils\";\nimport * as $type from \"../utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Base class for the data parsers.\r\n */\nvar DataParser = /** @class */function () {\n function DataParser() {}\n /**\r\n * A \"placeholder\" function for real parsers to override.\r\n *\r\n * @ignore Exclude from docs\r\n * @param data Source data\r\n * @return Parsed data (empty)\r\n */\n DataParser.prototype.parse = function (data) {\n return [];\n };\n ;\n Object.defineProperty(DataParser.prototype, \"parsableNumbers\", {\n /**\r\n * Checks if there are any numeric fields that need to be converted to\r\n * numbers.\r\n *\r\n * @return Numeric fields?\r\n */\n get: function get() {\n return this.options.numberFields && this.options.numberFields.length > 0;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Converts a value to 'number' if it is in `numberFields`.\r\n *\r\n * @param field Field name\r\n * @param value Value\r\n * @return Parsed or original value\r\n */\n DataParser.prototype.maybeToNumber = function (field, value) {\n if (this.options.numberFields.indexOf(field) !== -1) {\n return $utils.anyToNumber(value);\n }\n return value;\n };\n Object.defineProperty(DataParser.prototype, \"parsableDates\", {\n /**\r\n * Checks if there are any date fields that need to be converted to `Date`\r\n * objects.\r\n *\r\n * @return Date fields?\r\n */\n get: function get() {\n return this.options.dateFields && this.options.dateFields.length > 0;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Converts a value to `Date` if it is in `dateFields`.\r\n *\r\n * @param field Field name\r\n * @param value Value\r\n * @return Parsed or original value\r\n */\n DataParser.prototype.maybeToDate = function (field, value) {\n if (this.options.dateFields.indexOf(field) !== -1) {\n return this.options.dateFormatter.parse(value, this.dateFormat);\n }\n return value;\n };\n /**\r\n * Replaces empty value with something else.\r\n *\r\n * @param value Source value\r\n * @return Source value or replacement\r\n */\n DataParser.prototype.maybeToEmpty = function (value) {\n if ((!$type.hasValue(value) || value == \"\") && $type.hasValue(this.options.emptyAs)) {\n return this.options.emptyAs;\n }\n return value;\n };\n Object.defineProperty(DataParser.prototype, \"dateFormatter\", {\n /**\r\n * [[DateFormatter]] object for date parsing.\r\n *\r\n * If there was not [[DateFormatter]] supplied in parser options, a new one\r\n * is created.\r\n *\r\n * @return Date formatter\r\n * @see {@link DateFormatter}\r\n */\n get: function get() {\n if (!this.options.dateFormatter) {\n this.options.dateFormatter = new DateFormatter();\n if (this.options.dateFormat) {\n this.options.dateFormat = this.options.dateFormat;\n }\n }\n return this.options.dateFormatter;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataParser.prototype, \"dateFormat\", {\n /**\r\n * A date format to use when parsing dates.\r\n *\r\n * @return Date format\r\n * @see {@link DateFormatter}\r\n */\n get: function get() {\n return this.options.dateFormat || this.dateFormatter.inputDateFormat;\n },\n enumerable: true,\n configurable: true\n });\n return DataParser;\n}();\nexport { DataParser };","/**\r\n * Provides functionality used to build scrollbars.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../Container\";\nimport { ResizeButton } from \"../elements/ResizeButton\";\nimport { Button } from \"../elements/Button\";\nimport { getInteraction } from \"../interaction/Interaction\";\nimport { MouseCursorStyle } from \"../interaction/Mouse\";\nimport { RoundedRectangle } from \"../elements/RoundedRectangle\";\nimport { registry } from \"../Registry\";\nimport { keyboard } from \"../utils/Keyboard\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport { percent, Percent } from \"../utils/Percent\";\nimport * as $math from \"../utils/Math\";\nimport * as $ease from \"../utils/Ease\";\nimport * as $type from \"../utils/Type\";\nimport * as $utils from \"../utils/Utils\";\n;\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Scrollbar is a generic control allowing to select a range of values or pan\r\n * the selection.\r\n *\r\n * @see {@link IScrollbarEvents} for a list of available events\r\n * @see {@link IScrollbarAdapters} for a list of available Adapters\r\n */\nvar Scrollbar = /** @class */function (_super) {\n tslib_1.__extends(Scrollbar, _super);\n /**\r\n * Construtor\r\n */\n function Scrollbar() {\n var _this = _super.call(this) || this;\n /**\r\n * A value of previously selected lower value, used for doubleclick function.\r\n */\n _this._prevStart = 0;\n /**\r\n * A value of previously selected upper value, used for doubleclick function.\r\n */\n _this._prevEnd = 1;\n /**\r\n * Indicates if the Scrollbar is currently \"busy\" (animating and or\r\n * performing zoom by user interaction).\r\n */\n _this._isBusy = false;\n /**\r\n * [_skipRangeEvents description]\r\n *\r\n * @todo Description\r\n */\n _this._skipRangeEvents = false;\n /**\r\n * Update the selection when dragging the grips.\r\n *\r\n * If set to `false` selection will be updated only when the grip is\r\n * released.\r\n *\r\n * @default true\r\n */\n _this.updateWhileMoving = true;\n _this.className = \"Scrollbar\";\n _this.minHeight = 12;\n _this.minWidth = 12;\n _this.animationDuration = 0;\n _this.animationEasing = $ease.cubicOut;\n _this.margin(10, 10, 10, 10);\n var interfaceColors = new InterfaceColorSet();\n // background is also container as it might contain graphs, grid, etc\n var background = _this.background;\n background.cornerRadius(10, 10, 10, 10);\n background.fill = interfaceColors.getFor(\"fill\");\n background.fillOpacity = 0.5;\n // Make system tooltips appear by default\n _this.showSystemTooltip = true;\n _this.startGrip = new ResizeButton();\n _this.endGrip = new ResizeButton();\n // Default orientation...\n // ... is set in `applyInternalDefaults()` because it accesses `language`\n // and should only be started to access when parent is set\n // Set events\n _this.events.on(\"transformed\", _this.updateThumb, _this, false);\n // Initial positions\n _this.start = 0;\n _this.end = 1;\n // Set roles\n _this.role = \"scrollbar\";\n _this.thumb.role = \"slider\";\n _this.thumb.readerLive = \"polite\";\n _this.startGrip.role = \"slider\";\n _this.endGrip.role = \"slider\";\n // otherwise range changed wont' be registered\n _this.events.once(\"inited\", function () {\n _this._previousStart = undefined;\n _this.dispatchRangeChange();\n }, undefined, false);\n _this.hideGrips = false;\n _this.orientation = \"horizontal\";\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n Scrollbar.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n // Set screen reader tetxt accordingly\n if (this.orientation === \"horizontal\") {\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Use TAB to select grip buttons or left and right arrows to change selection\");\n }\n if (!$type.hasValue(this.thumb.readerDescription)) {\n this.thumb.readerDescription = this.language.translate(\"Use left and right arrows to move selection\");\n }\n if (!$type.hasValue(this.startGrip.readerDescription)) {\n this.startGrip.readerDescription = this.language.translate(\"Use left and right arrows to move left selection\");\n }\n if (!$type.hasValue(this.endGrip.readerDescription)) {\n this.endGrip.readerDescription = this.language.translate(\"Use left and right arrows to move right selection\");\n }\n } else {\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Use TAB select grip buttons or up and down arrows to change selection\");\n }\n if (!$type.hasValue(this.thumb.readerDescription)) {\n this.thumb.readerDescription = this.language.translate(\"Use up and down arrows to move selection\");\n }\n if (!$type.hasValue(this.startGrip.readerDescription)) {\n this.startGrip.readerDescription = this.language.translate(\"Use up and down arrows to move upper selection\");\n }\n if (!$type.hasValue(this.endGrip.readerDescription)) {\n this.endGrip.readerDescription = this.language.translate(\"Use up and down arrows to move lower selection\");\n }\n }\n };\n /**\r\n * Validates the layout of the scrollbar's elements.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Scrollbar.prototype.validateLayout = function () {\n this.updateSize();\n _super.prototype.validateLayout.call(this);\n // when size changes, need to update extremes\n this.updateExtremes();\n };\n /**\r\n * Update background for the scrollbar.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Scrollbar.prototype.processBackground = function () {\n _super.prototype.processBackground.call(this);\n var background = this.background;\n background.clickable = true;\n background.events.on(\"hit\", this.handleBgHit, this, undefined);\n };\n /**\r\n * Zooms to the particular place when clicked/tapped on the scrollbar\r\n * background.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\n Scrollbar.prototype.handleBgHit = function (event) {\n this.makeBusy();\n var point = event.spritePoint;\n point = $utils.spritePointToSprite(point, this.background, this);\n var thumb = this.thumb;\n if (this.orientation == \"horizontal\") {\n var thumbX = point.x - thumb.pixelWidth / 2;\n thumbX = $math.fitToRange(thumbX, 0, this.innerWidth - thumb.pixelWidth);\n this._thumbAnimation = thumb.animate({\n property: \"x\",\n to: thumbX\n }, this.animationDuration, this.animationEasing);\n } else {\n var thumbY = point.y - thumb.pixelHeight / 2;\n thumbY = $math.fitToRange(thumbY, 0, this.innerHeight - thumb.pixelHeight);\n this._thumbAnimation = thumb.animate({\n property: \"y\",\n to: thumbY\n }, this.animationDuration, this.animationEasing);\n }\n if (this.animationDuration > 0) {\n this._thumbAnimation.events.on(\"animationended\", this.makeUnbusy, this, false);\n } else {\n this._thumb.validate();\n this.makeUnbusy();\n }\n };\n /**\r\n * Set scrollbar as busy. (currently zooming)\r\n *\r\n * @ignore Exclude from docs\r\n */\n Scrollbar.prototype.makeBusy = function () {\n this._isBusy = true;\n this._skipRangeEvents = false;\n if (this._unbusyTimeout) {\n this.removeDispose(this._unbusyTimeout);\n }\n this._unbusyTimeout = undefined;\n this.stopAnimations();\n };\n /**\r\n * Stops all animations, currently playing for the scrollbar.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Scrollbar.prototype.stopAnimations = function () {\n if (this._thumbAnimation) {\n this._thumbAnimation.stop(true);\n }\n if (this._zoomAnimation) {\n this._zoomAnimation.stop(true);\n }\n };\n /**\r\n * Cancels \"busy\" status of the Scrollbar.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Scrollbar.prototype.makeUnbusy = function () {\n /**\r\n * We cannot make Scrollbar not busy right after release, because then axes\r\n * will take over controll and Scrollbar will start to animate.\r\n * Theorethically, it's not right to set timeout by `animationDuration`,\r\n * however we can not know all the durations of elements we scroll, so we\r\n * assume that animation duration will be the same as\r\n * `interpolationDuration` or `rangeChange` duration.\r\n */\n this._unbusyTimeout = this.setTimeout(this.makeUnbusyReal.bind(this), this.animationDuration * 1.1);\n };\n /**\r\n * [makeUnbusyReal description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\n Scrollbar.prototype.makeUnbusyReal = function () {\n this._usingGrip = undefined;\n this._isBusy = false;\n if (!this.updateWhileMoving) {\n this.dispatchRangeChange();\n }\n };\n /**\r\n * Disptatches rangechanged event if it really changed\r\n *\r\n * @ignore Exclude from docs\r\n */\n Scrollbar.prototype.dispatchRangeChange = function () {\n if (this._previousEnd != this.end || this._previousStart != this.start) {\n this._previousStart = this.start;\n this._previousEnd = this.end;\n this.dispatch(\"rangechanged\");\n }\n };\n /**\r\n * Updates the \"thumb\" element. A draggable element between the grips.\r\n */\n Scrollbar.prototype.updateThumb = function () {\n if (!this.parent) {\n return;\n }\n var thumb = this.thumb;\n var start = this.start;\n var end = this.end;\n var startGrip = this.startGrip;\n var endGrip = this.endGrip;\n if (this.orientation == \"horizontal\") {\n var innerWidth_1 = this.innerWidth;\n thumb.width = innerWidth_1 * (end - start);\n thumb.maxX = innerWidth_1 - thumb.pixelWidth;\n thumb.x = start * innerWidth_1;\n startGrip.moveTo({\n x: thumb.pixelX,\n y: 0\n }, undefined, undefined, true); // overrides dragging\n endGrip.moveTo({\n x: thumb.pixelX + thumb.pixelWidth,\n y: 0\n }, undefined, undefined, true);\n startGrip.readerTitle = this.language.translate(\"From %1\", undefined, this.adapter.apply(\"positionValue\", {\n value: Math.round(start * 100) + \"%\",\n position: start\n }).value);\n endGrip.readerTitle = this.language.translate(\"To %1\", undefined, this.adapter.apply(\"positionValue\", {\n value: Math.round(end * 100) + \"%\",\n position: end\n }).value);\n } else {\n var innerHeight_1 = this.innerHeight;\n thumb.height = innerHeight_1 * (end - start);\n thumb.maxY = innerHeight_1 - thumb.pixelHeight;\n thumb.y = (1 - end) * innerHeight_1;\n startGrip.moveTo({\n x: 0,\n y: thumb.pixelY + thumb.pixelHeight\n }, undefined, undefined, true);\n endGrip.moveTo({\n x: 0,\n y: thumb.pixelY\n }, undefined, undefined, true);\n startGrip.readerTitle = this.language.translate(\"To %1\", undefined, this.adapter.apply(\"positionValue\", {\n value: Math.round((1 - start) * 100) + \"%\",\n position: 1 - start\n }).value);\n endGrip.readerTitle = this.language.translate(\"From %1\", undefined, this.adapter.apply(\"positionValue\", {\n value: Math.round((1 - end) * 100) + \"%\",\n position: 1 - end\n }).value);\n }\n // Add accessibility\n thumb.readerTitle = this.language.translate(\"From %1 to %2\", undefined, this.adapter.apply(\"positionValue\", {\n value: Math.round(start * 100) + \"%\",\n position: start\n }).value, this.adapter.apply(\"positionValue\", {\n value: Math.round(end * 100) + \"%\",\n position: end\n }).value);\n if (!this._skipRangeEvents && this.updateWhileMoving) {\n this.dispatchRangeChange();\n }\n };\n /**\r\n * Updates extremes of the scrollbar.\r\n */\n Scrollbar.prototype.updateExtremes = function () {\n var orientation = this.orientation;\n var minX = 0;\n var minY = 0;\n var maxX = 0;\n var maxY = 0;\n if (orientation == \"horizontal\") {\n maxX = this.innerWidth;\n minY = maxY = this.innerHeight / 2;\n } else {\n maxY = this.innerHeight;\n minX = maxX = this.innerWidth / 2;\n }\n var startGrip = this.startGrip;\n startGrip.minX = minX;\n startGrip.maxX = maxX;\n startGrip.minY = minY;\n startGrip.maxY = maxY;\n var endGrip = this.endGrip;\n endGrip.minX = minX;\n endGrip.maxX = maxX;\n endGrip.minY = minY;\n endGrip.maxY = maxY;\n var thumb = this.thumb;\n thumb.minX = minX;\n thumb.maxX = maxX;\n thumb.minY = minY;\n thumb.maxY = maxY;\n };\n /**\r\n * Updates size of the scrollbar.\r\n */\n Scrollbar.prototype.updateSize = function () {\n var orientation = this.orientation;\n var startGrip = this.startGrip;\n if (startGrip) {\n startGrip.orientation = orientation;\n }\n if (this.endGrip) {\n this.endGrip.orientation = orientation;\n }\n var thumb = this.thumb;\n if (thumb) {\n if (orientation == \"horizontal\") {\n if (!$type.isNumber(this._pixelWidth)) {\n if (!(this.width instanceof Percent)) {\n this.width = percent(100);\n }\n }\n // this teorethically might be wrong, if user indeed sets height of a horizontal scrollbar in percent\n // however without this height might be equal to 100% if previous orientation was set to horizontal\n // so this is ok solution, in case user really wants to have scrollbar height set in percent,\n // he should do this after orientation.\n if ($type.hasValue(this.percentHeight)) {\n this.height = this.minHeight;\n }\n thumb.height = this.innerHeight;\n thumb.verticalCenter = \"middle\";\n thumb.horizontalCenter = \"left\";\n } else {\n if (!$type.isNumber(this._pixelHeight)) {\n if (!(this.height instanceof Percent)) {\n this.height = percent(100);\n }\n }\n // same as above with percentHeight\n if ($type.hasValue(this.percentWidth)) {\n this.width = this.minWidth;\n }\n thumb.width = this.innerWidth;\n thumb.verticalCenter = \"top\";\n thumb.horizontalCenter = \"middle\";\n }\n }\n };\n Object.defineProperty(Scrollbar.prototype, \"start\", {\n /**\r\n * @return Position (0-1)\r\n */\n get: function get() {\n return Math.min(this.getPosition(this._start), this.getPosition(this._end));\n },\n /**\r\n * ==========================================================================\r\n * POSITIONS\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Relative position (0-1) of the start grip.\r\n *\r\n * @param position Position (0-1)\r\n */\n set: function set(position) {\n if (!this._isBusy) {\n this.__start = position;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Scrollbar.prototype, \"__start\", {\n /**\r\n * @return [description]\r\n */\n get: function get() {\n return this._start;\n },\n /**\r\n * [__start description]\r\n *\r\n * @todo Description\r\n * @param position [description]\r\n */\n set: function set(position) {\n this._start = this.getPosition(position);\n this.updateThumb();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Scrollbar.prototype, \"end\", {\n /**\r\n * @return Position (0-1)\r\n */\n get: function get() {\n return Math.max(this.getPosition(this._start), this.getPosition(this._end));\n },\n /**\r\n * Relative position (0-1) of the end grip.\r\n *\r\n * @param position Position (0-1)\r\n */\n set: function set(position) {\n if (!this._isBusy) {\n this.__end = position;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Scrollbar.prototype, \"__end\", {\n /**\r\n * @return [description]\r\n */\n get: function get() {\n return this._end;\n },\n /**\r\n * [__end description]\r\n *\r\n * @todo Description\r\n * @param position [description]\r\n */\n set: function set(position) {\n this._end = this.getPosition(position);\n this.updateThumb();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Scrollbar.prototype, \"range\", {\n /**\r\n * Current selection range.\r\n *\r\n * @readonly\r\n * @return Range\r\n */\n get: function get() {\n return {\n start: this.start,\n end: this.end,\n priority: this._usingGrip\n };\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Disables range change events.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Scrollbar.prototype.skipRangeEvents = function () {\n if (!this._isBusy) {\n this._skipRangeEvents = true;\n }\n };\n /**\r\n * [fixRange description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n * @param range Range\r\n */\n Scrollbar.prototype.fixRange = function (range) {\n if (range.start != $math.round(this._start, 2) || range.end != $math.round(this._end, 2)) {\n this._start = range.start;\n this._end = range.end;\n this._skipRangeEvents = true;\n this.updateThumb();\n this._skipRangeEvents = false;\n this.thumb.validate();\n this.thumb.background.validate();\n }\n };\n /**\r\n * [getPosition description]\r\n *\r\n * @todo Description\r\n * @param position [description]\r\n * @return [description]\r\n */\n Scrollbar.prototype.getPosition = function (position) {\n return $math.fitToRange($math.round(position, 4), 0, 1);\n };\n Object.defineProperty(Scrollbar.prototype, \"orientation\", {\n /**\r\n * @return Orientation\r\n */\n get: function get() {\n return this.getPropertyValue(\"orientation\");\n },\n /**\r\n * ==========================================================================\r\n * MISC\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Orientation of the scrollbar.\r\n *\r\n * Available options: \"horizontal\" (default) and \"vertical\".\r\n *\r\n * @default \"horizontal\"\r\n * @param value Orientation\r\n */\n set: function set(value) {\n if (this.setPropertyValue(\"orientation\", value)) {\n // Set mouse cursors and screen reader tetxt accordingly\n if (value === \"horizontal\") {\n // Mouse styles\n this.startGrip.cursorOverStyle = MouseCursorStyle.horizontalResize;\n this.endGrip.cursorOverStyle = MouseCursorStyle.horizontalResize;\n // Reader text\n /*this.readerTitle = this.language.translate(\"Use TAB to select grip buttons or left and right arrows to change selection\");\r\n this.thumb.readerDescription = this.language.translate(\"Use left and right arrows to move selection\");\r\n this.startGrip.readerDescription = this.language.translate(\"Use left and right arrows to move left selection\");\r\n this.endGrip.readerDescription = this.language.translate(\"Use left and right arrows to move right selection\");*/\n } else {\n // Mouse styles\n this.startGrip.cursorOverStyle = MouseCursorStyle.verticalResize;\n this.endGrip.cursorOverStyle = MouseCursorStyle.verticalResize;\n // Reader text\n /*this.readerTitle = this.language.translate(\"Use TAB select grip buttons or up and down arrows to change selection\");\r\n this.thumb.readerDescription = this.language.translate(\"Use up and down arrows to move selection\");\r\n this.startGrip.readerDescription = this.language.translate(\"Use up and down arrows to move upper selection\");\r\n this.endGrip.readerDescription = this.language.translate(\"Use up and down arrows to move lower selection\");*/\n }\n this.updateByOrientation();\n this.invalidate();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @ignore\r\n */\n Scrollbar.prototype.updateByOrientation = function () {};\n Object.defineProperty(Scrollbar.prototype, \"startGrip\", {\n /**\r\n * @return Grip element\r\n */\n get: function get() {\n return this._startGrip;\n },\n /**\r\n * ==========================================================================\r\n * GRIPS\r\n * ==========================================================================\r\n * @hidden\r\n */\n /**\r\n * Start grip element. (button)\r\n *\r\n * @param button Grip element\r\n */\n set: function set(button) {\n if (this._startGrip) {\n this.removeDispose(this._startGrip);\n }\n this._startGrip = button;\n this.processGrip(button);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Scrollbar.prototype, \"endGrip\", {\n /**\r\n * @return Grip element\r\n */\n get: function get() {\n return this._endGrip;\n },\n /**\r\n * End grip element. (button)\r\n *\r\n * @param button Grip element\r\n */\n set: function set(button) {\n if (this._endGrip) {\n this.removeDispose(this._endGrip);\n }\n this._endGrip = button;\n this.processGrip(button);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Decorates the grip button with properties and events.\r\n *\r\n * @ignore Exclude from docs\r\n * @param button Grip button\r\n */\n Scrollbar.prototype.processGrip = function (button) {\n button.parent = this;\n button.isMeasured = false;\n button.focusable = true;\n button.shouldClone = false;\n // Set button defaults\n //button.showSystemTooltip = true; // setting this here is not right because we break inheritance\n button.zIndex = 100;\n button.events.on(\"drag\", this.handleGripDrag, this, false);\n button.events.on(\"dragstop\", this.makeUnbusy, this, false);\n button.events.on(\"down\", this.makeBusy, this, false);\n this._disposers.push(button);\n };\n /**\r\n * Updates positions of related elements after grip element is dragged.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event\r\n */\n Scrollbar.prototype.handleGripDrag = function (event) {\n this.makeBusy();\n if (event.target === this._startGrip) {\n this._usingGrip = \"start\";\n } else {\n this._usingGrip = \"end\";\n }\n if (this.orientation == \"horizontal\") {\n this._start = this.startGrip.pixelX / this.innerWidth;\n this._end = this.endGrip.pixelX / this.innerWidth;\n } else {\n this._start = 1 - this.startGrip.pixelY / this.innerHeight;\n this._end = 1 - this.endGrip.pixelY / this.innerHeight;\n }\n this.updateThumb();\n };\n Object.defineProperty(Scrollbar.prototype, \"thumb\", {\n /**\r\n * @return Thumb element\r\n */\n get: function get() {\n if (!this._thumb) {\n // Create scrollbar controls (setters will handle adding disposers)\n var thumb = new Button();\n thumb.background.cornerRadius(10, 10, 10, 10);\n thumb.padding(0, 0, 0, 0);\n this.thumb = thumb;\n }\n return this._thumb;\n },\n /**\r\n * A \"thumb\" element.\r\n *\r\n * It's a draggable square space between the grips, that can be used to\r\n * pan the selection.\r\n *\r\n * @param thumb Thumb element\r\n */\n set: function set(thumb) {\n var _this = this;\n if (thumb) {\n if (this._thumb) {\n this.removeDispose(this._thumb);\n }\n this._thumb = thumb;\n thumb.parent = this;\n thumb.isMeasured = false;\n thumb.inert = true;\n thumb.draggable = true;\n thumb.clickable = true;\n thumb.hoverable = true;\n thumb.focusable = true;\n thumb.shouldClone = false;\n thumb.zIndex = 0;\n // TODO remove closures ?\n // Add events\n // Add cursor styles to thumb\n thumb.cursorOverStyle = MouseCursorStyle.grab;\n thumb.cursorDownStyle = MouseCursorStyle.grabbing;\n thumb.events.on(\"dragstart\", this.makeBusy, this, false);\n thumb.events.on(\"dragstop\", this.makeUnbusy, this, false);\n thumb.events.on(\"positionchanged\", this.handleThumbPosition, this, false);\n thumb.events.on(\"sizechanged\", this.handleThumbPosition, this, false);\n thumb.events.on(\"doublehit\", this.handleDoubleClick, this, false);\n // Add event for space and ENTER to toggle full zoom out and back\n // (same as doubleclick)\n this._disposers.push(getInteraction().body.events.on(\"keyup\", function (ev) {\n if (keyboard.isKey(ev.event, [\"space\", \"enter\"]) && _this.thumb.isFocused) {\n ev.event.preventDefault();\n _this.handleDoubleClick();\n }\n }));\n this._disposers.push(this._thumb);\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Zooms-in and out the selection on double-click of the thumb.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Scrollbar.prototype.handleDoubleClick = function () {\n this.makeBusy();\n var newStart = 0;\n var newEnd = 1;\n if (this.start != 0 || this.end != 1) {\n this._prevStart = this.start;\n this._prevEnd = this.end;\n } else {\n newStart = this._prevStart;\n newEnd = this._prevEnd;\n }\n var zoomAnimation = this.animate([{\n property: \"__start\",\n to: newStart\n }, {\n property: \"__end\",\n to: newEnd\n }], this.animationDuration, this.animationEasing);\n if (zoomAnimation && !zoomAnimation.isFinished()) {\n zoomAnimation.events.on(\"animationended\", this.makeUnbusy, this, false);\n this._zoomAnimation = zoomAnimation;\n } else {\n this.makeUnbusy();\n }\n };\n /**\r\n * Updates positions of other elements when thumb is moved.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Scrollbar.prototype.handleThumbPosition = function () {\n var thumb = this.thumb;\n if (this.orientation == \"horizontal\") {\n var innerWidth_2 = this.innerWidth;\n var w = thumb.innerWidth;\n var x = thumb.pixelX;\n this._start = x / innerWidth_2;\n this._end = (x + w) / innerWidth_2;\n this.updateThumb();\n } else {\n var innerHeight_2 = this.innerHeight;\n var h = thumb.innerHeight;\n var y = thumb.pixelY;\n this._start = 1 - (y + h) / innerHeight_2;\n this._end = 1 - y / innerHeight_2;\n this.updateThumb();\n }\n };\n /**\r\n * Creates a background element for the scrollbar.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Background\r\n */\n Scrollbar.prototype.createBackground = function () {\n return new RoundedRectangle();\n };\n Object.defineProperty(Scrollbar.prototype, \"hideGrips\", {\n /**\r\n * @return Show only on hover?\r\n */\n get: function get() {\n return this._hideGrips;\n },\n /**\r\n * Use this property to set whether grips should be always visible (`false`),\r\n * or they should just appear on scrollbar hover (`true`).\r\n *\r\n * @param value Show only on hover?\r\n */\n set: function set(value) {\n var _this = this;\n this._hideGrips = value;\n if (this._overDisposer) {\n this.removeDispose(this._overDisposer);\n }\n if (this._outDisposer) {\n this.removeDispose(this._outDisposer);\n }\n if (value) {\n this._overDisposer = this.events.on(\"over\", function () {\n _this.startGrip.show();\n _this.endGrip.show();\n }, undefined, false);\n this._outDisposer = this.events.on(\"out\", function () {\n _this.startGrip.hide();\n _this.endGrip.hide();\n }, undefined, false);\n this.startGrip.hide();\n this.endGrip.hide();\n } else {\n this.startGrip.show();\n this.endGrip.show();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Scrollbar.prototype, \"animationDuration\", {\n /**\r\n * @return Orientation\r\n */\n get: function get() {\n return this.getPropertyValue(\"animationDuration\");\n },\n /**\r\n * Duration in milliseconds of scrollbar animation (happens when user clicks on a background of a scrollbar)\r\n * @default 0\r\n * @param value number\r\n */\n set: function set(value) {\n this.setPropertyValue(\"animationDuration\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Scrollbar.prototype, \"animationEasing\", {\n /**\r\n * @return {Function}\r\n */\n get: function get() {\n return this.getPropertyValue(\"animationEasing\");\n },\n /**\r\n * Animation easing function.\r\n * @todo: review description and default\r\n * @default $ease.cubicOut\r\n * @param value (value: number) => number\r\n */\n set: function set(value) {\n this.setPropertyValue(\"animationEasing\", value);\n },\n enumerable: true,\n configurable: true\n });\n return Scrollbar;\n}(Container);\nexport { Scrollbar };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Scrollbar\"] = Scrollbar;","/**\r\n * Functionality for drawing triangles.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Sprite } from \"../Sprite\";\nimport { registry } from \"../Registry\";\nimport * as $path from \"../rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Used to draw a triangle.\r\n *\r\n * @see {@link ITriangleEvents} for a list of available events\r\n * @see {@link ITriangleAdapters} for a list of available Adapters\r\n */\nvar Triangle = /** @class */function (_super) {\n tslib_1.__extends(Triangle, _super);\n /**\r\n * Constructor\r\n */\n function Triangle() {\n var _this = _super.call(this) || this;\n _this.className = \"Triangle\";\n _this.element = _this.paper.add(\"path\");\n _this.direction = \"top\";\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Triangle.prototype.draw = function () {\n _super.prototype.draw.call(this);\n var w = this.pixelWidth;\n var h = this.pixelHeight;\n var path;\n switch (this.direction) {\n case \"right\":\n path = $path.moveTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: w,\n y: h / 2\n }) + $path.lineTo({\n x: 0,\n y: h\n }) + $path.closePath();\n break;\n case \"left\":\n path = $path.moveTo({\n x: w,\n y: 0\n }) + $path.lineTo({\n x: 0,\n y: h / 2\n }) + $path.lineTo({\n x: w,\n y: h\n }) + $path.closePath();\n break;\n case \"bottom\":\n path = $path.moveTo({\n x: 0,\n y: 0\n }) + $path.lineTo({\n x: w,\n y: 0\n }) + $path.lineTo({\n x: w / 2,\n y: h\n }) + $path.closePath();\n break;\n case \"top\":\n path = $path.moveTo({\n x: w / 2,\n y: 0\n }) + $path.lineTo({\n x: w,\n y: h\n }) + $path.lineTo({\n x: 0,\n y: h\n }) + $path.closePath();\n break;\n }\n this.path = path;\n };\n Object.defineProperty(Triangle.prototype, \"direction\", {\n /**\r\n * Returns direction of a triangle\r\n *\r\n * @return value\r\n */\n get: function get() {\n return this.getPropertyValue(\"direction\");\n },\n /**\r\n * Sets direction of a triangle\r\n *\r\n * @param value\r\n */\n set: function set(value) {\n this.setPropertyValue(\"direction\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n return Triangle;\n}(Sprite);\nexport { Triangle };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Triangle\"] = Triangle;","/**\r\n * Functionality for drawing rectangles with waved edges.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Rectangle } from \"./Rectangle\";\nimport { wavedLine } from \"../rendering/Smoothing\";\nimport * as $path from \"../rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws a rectangle with waved edges.\r\n *\r\n * @see {@link IWavedRectangleEvents} for a list of available events\r\n * @see {@link IWavedRectangleAdapters} for a list of available Adapters\r\n */\nvar WavedRectangle = /** @class */function (_super) {\n tslib_1.__extends(WavedRectangle, _super);\n /**\r\n * Constructor\r\n */\n function WavedRectangle() {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * Top waved?\r\n */\n _this._twaved = true;\n /**\r\n * Right side waved?\r\n */\n _this._rwaved = true;\n /**\r\n * Bottom waved?\r\n */\n _this._bwaved = true;\n /**\r\n * Left side waved?\r\n */\n _this._lwaved = true;\n _this.className = \"WavedRectangle\";\n // Add path element\n _this.element = _this.paper.add(\"path\");\n // Set defaults\n _this.waveLength = 16;\n _this.waveHeight = 4;\n _this.tension = 0.8;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the waved rectangle.\r\n *\r\n * @ignore Exclude from docs\r\n */\n WavedRectangle.prototype.draw = function () {\n _super.prototype.draw.call(this);\n var w = this.pixelWidth;\n var h = this._pixelHeight;\n if (w > 0 && h > 0) {\n var p1 = {\n x: 0,\n y: 0\n };\n var p2 = {\n x: w,\n y: 0\n };\n var p3 = {\n x: w,\n y: h\n };\n var p4 = {\n x: 0,\n y: h\n };\n var waveLength = this.waveLength;\n var waveHeight = this.waveHeight;\n var td = \"\";\n var rd = \"\";\n var bd = \"\";\n var ld = \"\";\n if (this._twaved) {\n td = wavedLine(p1, p2, waveLength, waveHeight, this.tension, true);\n }\n if (this._rwaved) {\n ld = wavedLine(p2, p3, waveLength, waveHeight, this.tension, true);\n }\n if (this._bwaved) {\n bd = wavedLine(p3, p4, waveLength, waveHeight, this.tension, true);\n }\n if (this._rwaved) {\n rd = wavedLine(p4, p1, waveLength, waveHeight, this.tension, true);\n }\n this.path = $path.moveTo(p1) + td + $path.lineTo(p2) + ld + $path.lineTo(p3) + bd + $path.lineTo(p4) + rd + \"z\";\n }\n };\n Object.defineProperty(WavedRectangle.prototype, \"waveLength\", {\n /**\r\n * @return Wave length (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"waveLength\");\n },\n /**\r\n * Wave length in pixels.\r\n *\r\n * @default 16\r\n * @param value Wave length (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"waveLength\", value);\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(WavedRectangle.prototype, \"waveHeight\", {\n /**\r\n * @return Wave height (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"waveHeight\");\n },\n /**\r\n * Wave height in pixels.\r\n *\r\n * @default 4\r\n * @param value Wave height (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"waveHeight\", value);\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets which side should be waved or not. If particular side is set to\r\n * `false`, a straight line will be drawn on that side.\r\n *\r\n * @param top Top waved?\r\n * @param right Right side waved?\r\n * @param bottom Bottom Waved?\r\n * @param left Left side waved?\r\n */\n WavedRectangle.prototype.setWavedSides = function (top, right, bottom, left) {\n this._twaved = top;\n this._lwaved = right;\n this._bwaved = bottom;\n this._rwaved = left;\n };\n Object.defineProperty(WavedRectangle.prototype, \"tension\", {\n /**\r\n * @return Tension\r\n */\n get: function get() {\n return this.getPropertyValue(\"tension\");\n },\n /**\r\n * Tension of the wave.\r\n *\r\n * @default 0.8\r\n * @param value Tension\r\n */\n set: function set(value) {\n this.setPropertyValue(\"tension\", value);\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n return WavedRectangle;\n}(Rectangle);\nexport { WavedRectangle };","/**\r\n * Module for \"Lighten\" filter.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Filter } from \"./Filter\";\nimport { registry } from \"../../Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a \"Lighten\" filter.\r\n */\nvar LightenFilter = /** @class */function (_super) {\n tslib_1.__extends(LightenFilter, _super);\n /**\r\n * Constructor\r\n */\n function LightenFilter() {\n var _this = _super.call(this) || this;\n _this.className = \"LightenFilter\";\n // Create elements\n // NOTE: we do not need to add each individual element to `_disposers`\n // because `filterPrimitives` has an event handler which automatically adds\n // anything added to it to `_disposers`\n _this.feColorMatrix = _this.paper.add(\"feColorMatrix\");\n _this.feColorMatrix.attr({\n \"type\": \"matrix\"\n });\n _this.filterPrimitives.push(_this.feColorMatrix);\n // Set default properties\n _this.lightness = 0;\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(LightenFilter.prototype, \"lightness\", {\n /**\r\n * @return Lightness\r\n */\n get: function get() {\n return this.properties[\"lightness\"];\n },\n /**\r\n * Lightness of the target colors.\r\n *\r\n * If `lightness` is a positive number, the filter will make all colors\r\n * lighter.\r\n *\r\n * If `lightness` is negative, colors will be darkened.\r\n *\r\n * @param value Lightness\r\n */\n set: function set(value) {\n this.properties[\"lightness\"] = value;\n var v = value + 1;\n this.feColorMatrix.attr({\n \"values\": v + \" 0 0 0 0 0 \" + v + \" 0 0 0 0 0 \" + v + \" 0 0 0 0 0 1 0\"\n });\n },\n enumerable: true,\n configurable: true\n });\n return LightenFilter;\n}(Filter);\nexport { LightenFilter };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"LightenFilter\"] = LightenFilter;","import { StyleRule } from \"../utils/DOM\";\nimport { Dictionary } from \"../utils/Dictionary\";\nimport { MultiDisposer, CounterDisposer } from \"../utils/Disposer\";\nvar rules = new Dictionary();\n/**\r\n * Default CSS for Popup.\r\n *\r\n * @ignore Exclude from docs\r\n * @param prefix Prefix for CSS classes\r\n * @return Disposer for the CSS definition\r\n */\nexport default function (prefix) {\n if (!prefix) {\n prefix = \"ampopup\";\n }\n var counter = rules.insertKeyIfEmpty(prefix, function () {\n var disposer = new MultiDisposer([new StyleRule(\".\" + prefix, {\n //\"width\": \"100%\",\n //\"height\": \"100%\",\n \"overflow\": \"visible\",\n \"position\": \"absolute\",\n \"top\": \"0\",\n \"left\": \"0\",\n \"z-index\": \"2000\"\n }), new StyleRule(\".\" + prefix + \"-curtain\", {\n \"width\": \"100%\",\n \"height\": \"100%\",\n \"position\": \"absolute\",\n \"top\": \"0\",\n \"left\": \"0\",\n \"z-index\": \"2001\",\n \"background\": \"#fff\",\n \"opacity\": \"0.5\"\n }), new StyleRule(\".\" + prefix + \"-title\", {\n \"font-weight\": \"bold\",\n \"font-size\": \"120%\"\n }), new StyleRule(\".\" + prefix + \"-content\", {\n /*\"width\": \"100%\",\r\n \"height\": \"100%\",*/\n \"padding\": \"1em 2em\",\n \"background\": \"rgb(255, 255, 255);\",\n \"background-color\": \"rgba(255, 255, 255, 0.8)\",\n \"color\": \"#000\",\n \"display\": \"inline-block\",\n \"position\": \"absolute\",\n \"top\": \"0\",\n \"left\": \"0\",\n \"max-width\": \"90%\",\n \"max-height\": \"90%\",\n \"overflow\": \"auto\",\n \"z-index\": \"2002\"\n }), new StyleRule(\".\" + prefix + \"-close\", {\n \"display\": \"block\",\n \"position\": \"absolute\",\n \"top\": \"0.3em\",\n \"right\": \"0.3em\",\n \"background-color\": \"rgb(100, 100, 100)\",\n \"background\": \"rgba(100, 100, 100, 0.1) url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBoZWlnaHQ9IjUxMiIgdmVyc2lvbj0iMSIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHdpZHRoPSI1MTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQ0NS4yIDEwOS4ybC00Mi40LTQyLjRMMjU2IDIxMy42IDEwOS4yIDY2LjhsLTQyLjQgNDIuNEwyMTMuNiAyNTYgNjYuOCA0MDIuOGw0Mi40IDQyLjRMMjU2IDI5OC40bDE0Ni44IDE0Ni44IDQyLjQtNDIuNEwyOTguNCAyNTYiLz48L3N2Zz4=) no-repeat center\",\n \"background-size\": \"80%\",\n \"width\": \"1.2em\",\n \"height\": \"1.2em\",\n \"cursor\": \"pointer\"\n })]);\n return new CounterDisposer(function () {\n rules.removeKey(prefix);\n disposer.dispose();\n });\n });\n return counter.increment();\n}","/**\r\n * Popup class is used to display information over chart area.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport popupCSS from \"./PopupCSS\";\nimport { Adapter } from \"../utils/Adapter\";\nimport { BaseObjectEvents } from \"../Base\";\nimport { getInteraction } from \"../interaction/Interaction\";\nimport { keyboard } from \"../utils/Keyboard\";\nimport { MultiDisposer } from \"../utils/Disposer\";\nimport * as $type from \"../utils/Type\";\nimport * as $object from \"../utils/Object\";\n/**\r\n * Shows an HTML popup which covers window or a chart area.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/popups-and-modals/} For examples and docs on Popups and Modals.\r\n * @todo Positioning over whole window\r\n */\nvar Popup = /** @class */function (_super) {\n tslib_1.__extends(Popup, _super);\n /**\r\n * Constructor\r\n */\n function Popup() {\n var _this = _super.call(this) || this;\n /**\r\n * Adapter.\r\n */\n _this.adapter = new Adapter(_this);\n /**\r\n * Holds references to various HTML elements, Popup consists of.\r\n */\n _this._elements = {};\n /**\r\n * Holdes Interaction objects for various Popup's elements.\r\n */\n _this._IOs = {};\n /**\r\n * Contents of popup window.\r\n */\n _this._content = \"\";\n /**\r\n * Title of the popup window.\r\n */\n _this._title = \"\";\n /**\r\n * Prefix to apply to class names for popup elements.\r\n */\n _this._classPrefix = \"ampopup\";\n /**\r\n * If set to `true` [[Popup]] will use default styles.\r\n */\n _this._defaultStyles = true;\n /**\r\n * If set to `true` [[Popup]] will dim out all chart content behind it by\r\n * showing a semi-transparent fill. (curtain)\r\n */\n _this._showCurtain = false;\n /**\r\n * Indicates whether popup can be dragged.\r\n */\n _this._draggable = true;\n /**\r\n * Horizontal position of the content window.\r\n */\n _this._align = \"center\";\n /**\r\n * Vertical position of the content window.\r\n */\n _this._verticalAlign = \"middle\";\n /**\r\n * Shift in position of the element. (used for dragging)\r\n */\n _this._shift = {\n x: 0,\n y: 0\n };\n /**\r\n * Temporary shift in position of the element. (used for dragging)\r\n */\n _this._tempShift = {\n x: 0,\n y: 0\n };\n /**\r\n * A title for screen readers. It is very highly recommended to set that title\r\n * so that people using screen reader tools can get an immediate summary of\r\n * the information in the popup.\r\n */\n _this._readerTitle = \"\";\n /**\r\n * Is popup closable?\r\n */\n _this._closable = true;\n /**\r\n * Was CSS already loaded?\r\n */\n _this._cssLoaded = false;\n /**\r\n * If set to other than \"none\" will try to re-adjust the position of the\r\n * popop to fit within chart container or browser window.\r\n *\r\n * @ignore Feature not yet implemented\r\n * @todo Implement\r\n */\n _this._fitTo = \"window\";\n /**\r\n * Identifies if this object is a \"template\" and should not be treated as\r\n * real object that is drawn or actually used in the chart.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this.isTemplate = false;\n /**\r\n * Indicates if the element was already sized and should not be measured for\r\n * sized again, saving some precious resources.\r\n */\n _this._sized = false;\n _this.className = \"Popup\";\n return _this;\n }\n /**\r\n * Shows popup window.\r\n */\n Popup.prototype.open = function () {\n if (this.container) {\n if (this._elements.wrapper) {\n this.container.appendChild(this._elements.wrapper);\n }\n if (this._elements.curtain) {\n this.container.appendChild(this._elements.curtain);\n this.showCurtain = this.showCurtain;\n }\n this.positionElement();\n this.dispatchImmediately(\"opened\");\n }\n };\n /**\r\n * Hides popup window.\r\n */\n Popup.prototype.close = function () {\n if (this._elements.wrapper) {\n if (this._elements.wrapper.parentElement) {\n this._elements.wrapper.parentElement.removeChild(this._elements.wrapper);\n }\n }\n if (this._elements.curtain) {\n if (this._elements.curtain.parentElement) {\n this._elements.curtain.parentElement.removeChild(this._elements.curtain);\n }\n }\n this.dispatchImmediately(\"closed\");\n this.releasePointers();\n };\n /**\r\n * Destroy (dispose) popup.\r\n */\n Popup.prototype.dispose = function () {\n this.close();\n _super.prototype.dispose.call(this);\n };\n /**\r\n * Positions content element in the center of popup based on its actual size.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Popup.prototype.positionElement = function (forceResize) {\n var _this = this;\n if (forceResize === void 0) {\n forceResize = true;\n }\n if (!this._elements.wrapper) {\n return;\n }\n setTimeout(function () {\n if (!_this._elements.wrapper) {\n return;\n }\n if (forceResize || !_this._sized) {\n _this._elements.wrapper.style.opacity = \"0.01\";\n _this._elements.wrapper.style.left = \"0\";\n _this._elements.wrapper.style.top = \"0\";\n _this._elements.wrapper.style.margin = \"0 0 0 0\";\n // Size the element, but only for the first time\n if (!_this._elements.wrapper.style.width) {\n var bbox = _this._elements.wrapper.getBoundingClientRect();\n _this._elements.wrapper.style.width = bbox.width + \"px\";\n _this._elements.wrapper.style.height = bbox.height + \"px\";\n }\n _this._sized = true;\n }\n setTimeout(function () {\n if (!_this._elements.wrapper) {\n return;\n }\n var bbox;\n if ((forceResize || !_this._sized) && _this._bbox) {\n bbox = _this._bbox;\n } else {\n bbox = _this._elements.wrapper.getBoundingClientRect();\n _this._elements.wrapper.style.opacity = \"\";\n }\n // Set horizontal positioning\n switch (_this.align) {\n case \"left\":\n _this._elements.wrapper.style.left = \"0\";\n _this._elements.wrapper.style.right = \"auto\";\n _this._elements.wrapper.style.marginLeft = _this.toStyle(_this._shift.x + _this._tempShift.x);\n break;\n case \"center\":\n _this._elements.wrapper.style.left = \"50%\";\n _this._elements.wrapper.style.right = \"auto\";\n _this._elements.wrapper.style.marginLeft = _this.toStyle(Math.round(-bbox.width / 2) + (_this._shift.x + _this._tempShift.x));\n break;\n case \"right\":\n _this._elements.wrapper.style.left = \"auto\";\n _this._elements.wrapper.style.right = \"0\";\n _this._elements.wrapper.style.marginLeft = _this.toStyle(_this._shift.x + _this._tempShift.x);\n break;\n default:\n _this._elements.wrapper.style.left = _this.toStyle(_this.left) || \"auto\";\n _this._elements.wrapper.style.right = _this.toStyle(_this.right) || \"auto\";\n _this._elements.wrapper.style.marginLeft = _this.toStyle(_this._shift.x + _this._tempShift.x);\n break;\n }\n // Set vertical positioning\n switch (_this.verticalAlign) {\n case \"top\":\n _this._elements.wrapper.style.top = \"0\";\n _this._elements.wrapper.style.bottom = \"auto\";\n _this._elements.wrapper.style.marginTop = _this.toStyle(_this._shift.y + _this._tempShift.y);\n break;\n case \"middle\":\n _this._elements.wrapper.style.top = \"50%\";\n _this._elements.wrapper.style.bottom = \"auto\";\n _this._elements.wrapper.style.marginTop = _this.toStyle(Math.round(-bbox.height / 2) + (_this._shift.y + _this._tempShift.y));\n break;\n case \"bottom\":\n _this._elements.wrapper.style.top = \"auto\";\n _this._elements.wrapper.style.bottom = \"0\";\n _this._elements.wrapper.style.marginTop = _this.toStyle(_this._shift.y + _this._tempShift.y);\n break;\n default:\n _this._elements.wrapper.style.top = _this.toStyle(_this.top) || \"auto\";\n _this._elements.wrapper.style.bottom = _this.toStyle(_this.bottom) || \"auto\";\n _this._elements.wrapper.style.marginTop = _this.toStyle(_this._shift.y + _this._tempShift.y);\n break;\n }\n }, 1);\n }, 1);\n };\n Popup.prototype.setupDragging = function () {\n var _this = this;\n if (this.draggable) {\n if (!this._IOs.wrapper.events.has(\"drag\")) {\n this._IOs.wrapper.events.on(\"drag\", function (ev) {\n _this._tempShift.x = ev.shift.x;\n _this._tempShift.y = ev.shift.y;\n _this.positionElement(false);\n });\n }\n if (!this._IOs.wrapper.events.has(\"dragstop\")) {\n this._IOs.wrapper.events.on(\"dragstop\", function (ev) {\n _this._shift.x += _this._tempShift.x;\n _this._shift.y += _this._tempShift.y;\n _this._tempShift.x = 0;\n _this._tempShift.y = 0;\n _this.positionElement(false);\n });\n }\n } else {\n if (this._IOs.wrapper) {\n if (this._IOs.wrapper.events.has(\"drag\")) {\n this._IOs.wrapper.events.off(\"drag\");\n }\n if (this._IOs.wrapper.events.has(\"dragstop\")) {\n this._IOs.wrapper.events.off(\"dragstop\");\n }\n }\n }\n };\n Popup.prototype.toStyle = function (value) {\n if (!$type.hasValue(value)) {\n return null;\n } else if ($type.isNumber(value)) {\n return \"\" + value + \"px\";\n } else {\n return value.toString();\n }\n };\n Object.defineProperty(Popup.prototype, \"classPrefix\", {\n /**\r\n * A prefix that is applied to class names of various popup elements.\r\n *\r\n * @return Class name prefix\r\n */\n get: function get() {\n return this.adapter.apply(\"classPrefix\", this._classPrefix);\n },\n /**\r\n * @param value Class name prefix\r\n */\n set: function set(value) {\n this._classPrefix = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Popup.prototype, \"classPrefixRaw\", {\n /**\r\n * Returns raw prefix (without adapters applied).\r\n *\r\n * @ignore Exclude from docs\r\n * @return Class name prefix\r\n */\n get: function get() {\n return this._classPrefix;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Popup.prototype, \"content\", {\n /**\r\n * @return Popup content\r\n */\n get: function get() {\n return this.adapter.apply(\"content\", this._content);\n },\n /**\r\n * Popup content.\r\n *\r\n * Popup content can be any valid HTML, including CSS.\r\n *\r\n * @param value Popup content\r\n */\n set: function set(value) {\n if (this._content != value) {\n this._content = value;\n if (!this._elements.content) {\n this.createContentElement();\n }\n this._elements.content.innerHTML = value;\n this.positionElement();\n }\n },\n enumerable: true,\n configurable: true\n });\n Popup.prototype.getClassNames = function () {\n return this.adapter.apply(\"classNames\", {\n wrapperClass: this.classPrefix + \"\",\n titleClass: this.classPrefix + \"-title\",\n contentClass: this.classPrefix + \"-content\",\n curtainClass: this.classPrefix + \"-curtain\",\n closeClass: this.classPrefix + \"-close\"\n });\n };\n /**\r\n * Creates content element.\r\n */\n Popup.prototype.createContentElement = function () {\n // Check if it's created already\n if (this._elements.wrapper) {\n return;\n }\n // Get class names for popup elements\n var classNames = this.getClassNames();\n // Create content element\n var wrapper = document.createElement(\"div\");\n wrapper.className = classNames.contentClass;\n wrapper.style.opacity = \"0.01\";\n // Create close button\n var close = document.createElement(\"a\");\n close.className = classNames.closeClass;\n // Content title\n var title = document.createElement(\"div\");\n title.innerHTML = this.title;\n title.className = classNames.titleClass;\n if (!this.title) {\n title.style.display = \"none\";\n }\n // Content div\n var content = document.createElement(\"div\");\n content.innerHTML = this.content;\n // Set up events for content\n this._IOs.wrapper = getInteraction().getInteraction(wrapper);\n this._disposers.push(this._IOs.wrapper);\n // Set hover/out events\n this._IOs.wrapper.events.on(\"over\", this.disablePointers, this);\n this._IOs.wrapper.events.on(\"out\", this.releasePointers, this);\n // Create an InteractionObject for close\n this._IOs.close = getInteraction().getInteraction(close);\n this._disposers.push(this._IOs.close);\n // Hide close for now\n close.style.visibility = \"hidden\";\n // Add accessible stuff\n wrapper.setAttribute(\"role\", \"dialog\");\n // Add to wrapper\n wrapper.appendChild(close);\n wrapper.appendChild(title);\n wrapper.appendChild(content);\n this.container.appendChild(wrapper);\n // Save for later access\n this._elements.wrapper = wrapper;\n this._elements.content = content;\n this._elements.title = title;\n this._elements.close = close;\n // Load CSS\n if (this.defaultStyles) {\n this.loadDefaultCSS();\n }\n // Create curtain as well\n this.createCurtainElement();\n // Apply events\n this.applyEvents();\n this.applyReaderSettings();\n // Draggable?\n this.setupDragging();\n };\n Object.defineProperty(Popup.prototype, \"title\", {\n /**\r\n * @return Popup title\r\n */\n get: function get() {\n return this.adapter.apply(\"title\", this._title);\n },\n /**\r\n * Popup title.\r\n *\r\n * Popup title can be any valid HTML, including CSS.\r\n *\r\n * @param value Popup title\r\n */\n set: function set(value) {\n if (this._title != value) {\n this._title = value;\n if (!this._elements.content) {\n this.createContentElement();\n }\n this._elements.title.innerHTML = value;\n this.positionElement();\n this.applyReaderSettings();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Popup.prototype, \"readerTitle\", {\n /**\r\n * @return Popup content\r\n */\n get: function get() {\n return this.adapter.apply(\"readerTitle\", this._readerTitle != \"\" ? this._readerTitle : this.title);\n },\n /**\r\n * A title for screen readers. It is very highly recommended to set that title\r\n * so that people using screen reader tools can get an immediate summary of\r\n * the information in the popup.\r\n *\r\n * @param value Reader title\r\n */\n set: function set(value) {\n if (this._readerTitle != value) {\n this._readerTitle = value;\n this.applyReaderSettings();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Popup.prototype, \"closable\", {\n /**\r\n * @return Closable?\r\n */\n get: function get() {\n return this.adapter.apply(\"closable\", this._closable);\n },\n /**\r\n * Is popup closable?\r\n *\r\n * If it is, it can be closed in a number of ways, e.g. by hitting ESC key,\r\n * clicking curtain, or clicking the close button.\r\n *\r\n * If it is not closable, the only way to close it is via `close()` call.\r\n *\r\n * @param value Closable?\r\n */\n set: function set(value) {\n if (value !== this._closable) {\n this._closable = value;\n this.applyEvents();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Popup.prototype, \"fitTo\", {\n /**\r\n * @ignore\r\n * @todo Implement\r\n * @return Fit option\r\n */\n get: function get() {\n return this.adapter.apply(\"fitTo\", this._fitTo);\n },\n /**\r\n * If set to other than \"none\" will try to re-adjust the position of the\r\n * popop to fit within chart container or browser window.\r\n *\r\n * @ignore\r\n * @todo Implement\r\n * @default \"window\"\r\n * @param value Fit option\r\n */\n set: function set(value) {\n if (value != this._fitTo) {\n this._fitTo = value;\n this.positionElement();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Popup.prototype, \"defaultStyles\", {\n /**\r\n * @return Use default CSS?\r\n */\n get: function get() {\n return this.adapter.apply(\"defaultStyles\", this._defaultStyles);\n },\n /**\r\n * Should popup use default CSS?\r\n *\r\n * If default CSS is disabled, an external CSS should handle the look of the\r\n * popup, since it will look quite out of place otherwise.\r\n *\r\n * @default true\r\n * @param Use default CSS?\r\n */\n set: function set(value) {\n if (this._defaultStyles != value) {\n this._defaultStyles = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Popup.prototype, \"showCurtain\", {\n /**\r\n * @return Show curtain?\r\n */\n get: function get() {\n return this.adapter.apply(\"showCurtain\", this._showCurtain);\n },\n /**\r\n * Should popup use dim out all content behind it?\r\n *\r\n * @default false\r\n * @param Show curtain?\r\n */\n set: function set(value) {\n if (this._showCurtain != value) {\n this._showCurtain = value;\n if (this._elements.curtain) {\n this._elements.curtain.style.display = value ? \"block\" : \"none\";\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Creates curtain element.\r\n */\n Popup.prototype.createCurtainElement = function () {\n // Get class names for popup elements\n var classNames = this.getClassNames();\n // Create the curtain\n var curtain = document.createElement(\"div\");\n curtain.className = classNames.curtainClass;\n // Append curtain to wrapper\n this.container.appendChild(curtain);\n // Create an InteractionObject for curtain because we might need to\n // set interactions on it\n this._IOs.curtain = getInteraction().getInteraction(curtain);\n // Add Curtain IO to disposers\n this._disposers.push(this._IOs.curtain);\n // Set events to disable underlying interactivity\n this._IOs.curtain.events.on(\"over\", this.disablePointers, this);\n this._IOs.curtain.events.on(\"out\", this.releasePointers, this);\n // Hide it?\n curtain.style.display = this.showCurtain ? \"block\" : \"none\";\n // Save for later\n this._elements.curtain = curtain;\n };\n Object.defineProperty(Popup.prototype, \"draggable\", {\n /**\r\n * @return Show curtain?\r\n */\n get: function get() {\n return this.adapter.apply(\"draggable\", this._draggable);\n },\n /**\r\n * Can the popup be dragged with a pointer?\r\n *\r\n * @default false\r\n * @param Show curtain?\r\n */\n set: function set(value) {\n if (this._draggable != value) {\n this._draggable = value;\n this.setupDragging();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Popup.prototype, \"align\", {\n /**\r\n * @return Horizontal position\r\n */\n get: function get() {\n return this.adapter.apply(\"align\", this._align);\n },\n /**\r\n * Horizontal positioning of the content window.\r\n *\r\n * Available options: \"left\", \"center\" (default), \"right\", and \"none\".\r\n *\r\n * @default \"center\"\r\n * @param Horizontal position\r\n */\n set: function set(value) {\n if (this._align != value) {\n this._align = value;\n this.positionElement();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Popup.prototype, \"verticalAlign\", {\n /**\r\n * @return Vertical position\r\n */\n get: function get() {\n return this.adapter.apply(\"verticalAlign\", this._verticalAlign);\n },\n /**\r\n * Vertical positioning of the content window.\r\n *\r\n * Available options: \"top\", \"middle\" (default), \"bottom\", and \"none\".\r\n *\r\n * @default \"middle\"\r\n * @param Vertical position\r\n */\n set: function set(value) {\n if (this._verticalAlign != value) {\n this._verticalAlign = value;\n this.positionElement();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Popup.prototype, \"left\", {\n /**\r\n * @return Left\r\n */\n get: function get() {\n return this.adapter.apply(\"left\", this._left);\n },\n /**\r\n * \"left\" coordinate of a non-aligned (`align = \"none\"`) popup.\r\n *\r\n * Can be either absolute pixel value, or relative (`Percent`).\r\n *\r\n * Setting this property will automatically set `align` to \"none\".\r\n *\r\n * NOTE: The position is relative to the chart container.\r\n *\r\n * @param Left\r\n */\n set: function set(value) {\n if (this.left != value) {\n this._left = value;\n this._align = \"none\";\n this.positionElement();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Popup.prototype, \"right\", {\n /**\r\n * @return Right\r\n */\n get: function get() {\n return this.adapter.apply(\"right\", this._right);\n },\n /**\r\n * \"right\" coordinate of a non-aligned (`align = \"none\"`) popup.\r\n *\r\n * Can be either absolute pixel value, or relative (`Percent`).\r\n *\r\n * Setting this property will automatically set `align` to \"none\".\r\n *\r\n * NOTE: The position is relative to the chart container.\r\n *\r\n * @param Right\r\n */\n set: function set(value) {\n if (this.right != value) {\n this._right = value;\n this._align = \"none\";\n this.positionElement();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Popup.prototype, \"top\", {\n /**\r\n * @return Top\r\n */\n get: function get() {\n return this.adapter.apply(\"top\", this._top);\n },\n /**\r\n * \"top\" coordinate of a non-aligned (`verticalAlign = \"none\"`) popup.\r\n *\r\n * Can be either absolute pixel value, or relative (`Percent`).\r\n *\r\n * Setting this property will automatically set `verticalAlign` to \"none\".\r\n *\r\n * NOTE: The position is relative to the chart container.\r\n *\r\n * @param Top\r\n */\n set: function set(value) {\n if (this.top != value) {\n this._top = value;\n this._verticalAlign = \"none\";\n this.positionElement();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Popup.prototype, \"bottom\", {\n /**\r\n * @return Bottom\r\n */\n get: function get() {\n return this.adapter.apply(\"bottom\", this._bottom);\n },\n /**\r\n * \"bottom\" coordinate of a non-aligned (`verticalAlign = \"none\"`) popup.\r\n *\r\n * Can be either absolute pixel value, or relative (`Percent`).\r\n *\r\n * Setting this property will automatically set `verticalAlign` to \"none\".\r\n *\r\n * NOTE: The position is relative to the chart container.\r\n *\r\n * @param Bottom\r\n */\n set: function set(value) {\n if (this.bottom != value) {\n this._bottom = value;\n this._verticalAlign = \"none\";\n this.positionElement();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Popup.prototype, \"elements\", {\n /**\r\n * Returns an object with references to various elements of the Popup.\r\n *\r\n * * `wrapper`\r\n * * `title`\r\n * * `content`\r\n * * `close`\r\n * * `curtain`\r\n */\n get: function get() {\n return this._elements;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Loads popup CSS.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Popup.prototype.loadDefaultCSS = function () {\n if (!this._cssLoaded) {\n this._disposers.push(popupCSS(this.classPrefix));\n $object.each(this._elements, function (key, el) {\n el.style.display = \"\";\n });\n this._cssLoaded = true;\n }\n };\n /**\r\n * If popup is closable, this method adds various events to popup elements.\r\n */\n Popup.prototype.applyEvents = function () {\n var _this = this;\n if (this._IOs.close) {\n if (this.closable) {\n this._IOs.close.element.style.visibility = \"visible\";\n var disposers = [getInteraction().body.events.on(\"keyup\", function (ev) {\n if (keyboard.isKey(ev.event, \"esc\") && _this.closable) {\n _this.close();\n }\n }), this._IOs.close.events.on(\"hit\", function (ev) {\n _this.close();\n })];\n disposers.push(this._IOs.curtain.events.on(\"hit\", function (ev) {\n if (_this.showCurtain) {\n _this.close();\n }\n }));\n this._disposers.push(new MultiDisposer(disposers));\n } else {\n this._IOs.close.element.style.visibility = \"hidden\";\n }\n }\n };\n /**\r\n * Disables interactivity on parent chart.\r\n */\n Popup.prototype.disablePointers = function () {\n if (this.sprite) {\n this._spriteInteractionsEnabled = this.sprite.interactionsEnabled;\n this.sprite.interactionsEnabled = false;\n }\n };\n /**\r\n * Releases temporarily disabled pointers on parent chart.\r\n */\n Popup.prototype.releasePointers = function () {\n if ($type.hasValue(this._spriteInteractionsEnabled)) {\n this.sprite.interactionsEnabled = this._spriteInteractionsEnabled;\n this._spriteInteractionsEnabled = undefined;\n }\n };\n /**\r\n * Sets screen reader related settings.\r\n */\n Popup.prototype.applyReaderSettings = function () {\n this.elements.wrapper.setAttribute(\"aria-label\", this.readerTitle);\n };\n /**\r\n * Copies all properties and related data from different element.\r\n *\r\n * @param object Source element\r\n */\n Popup.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.container = source.container;\n this.sprite = source.sprite;\n this.classPrefix = source.classPrefixRaw;\n this.content = source.content;\n this.title = source.title;\n this.readerTitle = source.readerTitle;\n this.defaultStyles = source.defaultStyles;\n this.showCurtain = source.showCurtain;\n this.align = source.align;\n this.verticalAlign = source.verticalAlign;\n this.left = source.left;\n this.right = source.right;\n this.top = source.top;\n this.bottom = source.bottom;\n this.adapter.copyFrom(source.adapter);\n };\n return Popup;\n}(BaseObjectEvents);\nexport { Popup };","/**\r\n * Functionality for drawing waved circles.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Circle } from \"./Circle\";\nimport { registry } from \"../Registry\";\nimport * as $path from \"../rendering/Path\";\nimport * as $math from \"../utils/Math\";\nimport * as $utils from \"../utils/Utils\";\nimport * as $smoothing from \"../../core/rendering/Smoothing\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws a waved circle.\r\n *\r\n * @see {@link IWavedCircleEvents} for a list of available events\r\n * @see {@link IWavedCircleAdapters} for a list of available Adapters\r\n */\nvar WavedCircle = /** @class */function (_super) {\n tslib_1.__extends(WavedCircle, _super);\n /**\r\n * Constructor\r\n */\n function WavedCircle() {\n var _this = _super.call(this) || this;\n _this.className = \"WavedCircle\";\n _this.element = _this.paper.add(\"path\");\n _this.waveLength = 16;\n _this.waveHeight = 4;\n _this.fill = undefined;\n _this.fillOpacity = 0;\n _this.tension = 0.8;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the waved line.\r\n *\r\n * @ignore Exclude from docs\r\n */\n WavedCircle.prototype.draw = function () {\n var path = \"\";\n var radius = this.pixelRadius;\n if (radius > 0) {\n var points = this.getPoints(radius);\n path = $path.moveTo(points[0]) + new $smoothing.Tension(this.tension, this.tension).smooth(points);\n }\n var innerRadius = this.pixelInnerRadius;\n if (innerRadius > 0) {\n var points = this.getPoints(innerRadius);\n points.reverse();\n path += $path.moveTo(points[0]) + new $smoothing.Tension(this.tension, this.tension).smooth(points);\n }\n this.path = path;\n };\n /**\r\n * Returns points that circle consists of.\r\n *\r\n * @param radius Radius (px)\r\n * @return Points\r\n */\n WavedCircle.prototype.getPoints = function (radius) {\n var circleLength = radius * Math.PI * 2;\n var halfWaveHeight = this.waveHeight / 2;\n var waveLength = circleLength / Math.round(circleLength / this.waveLength);\n var halfWaveLength = waveLength / 2;\n var points = [];\n var count = circleLength / waveLength;\n for (var i = 0; i <= count; i++) {\n var angle1 = i * waveLength / circleLength * 360;\n var angle2 = (i * waveLength + halfWaveLength) / circleLength * 360;\n points.push({\n x: (radius - halfWaveHeight) * $math.cos(angle1),\n y: (radius - halfWaveHeight) * $math.sin(angle1)\n });\n points.push({\n x: (radius + halfWaveHeight) * $math.cos(angle2),\n y: (radius + halfWaveHeight) * $math.sin(angle2)\n });\n }\n points.pop();\n return points;\n };\n Object.defineProperty(WavedCircle.prototype, \"innerRadius\", {\n /**\r\n * @return Inner radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"innerRadius\");\n },\n /**\r\n * Inner radius of the circle in pixels (absolute) or [[Percent]] (relative).\r\n *\r\n * @param value Inner radius\r\n */\n set: function set(value) {\n this.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(WavedCircle.prototype, \"pixelInnerRadius\", {\n /**\r\n * Calculated inner radius of the circle in pixels.\r\n *\r\n * @readonly\r\n * @return Inner radius (px)\r\n */\n get: function get() {\n return $utils.relativeToValue(this.innerRadius, $math.min(this.innerWidth / 2, this.innerHeight / 2));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(WavedCircle.prototype, \"waveLength\", {\n /**\r\n * @return Wave length (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"waveLength\");\n },\n /**\r\n * Wave length in pixels.\r\n *\r\n * @default 16\r\n * @param value Wave length (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"waveLength\", value);\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(WavedCircle.prototype, \"waveHeight\", {\n /**\r\n * @return Wave height (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"waveHeight\");\n },\n /**\r\n * Wave height in pixels.\r\n *\r\n * @default 4\r\n * @param value Wave height (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"waveHeight\", value);\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(WavedCircle.prototype, \"tension\", {\n /**\r\n * @return Tension\r\n */\n get: function get() {\n return this.getPropertyValue(\"tension\");\n },\n /**\r\n * Tension of the wave.\r\n *\r\n * @default 0.8\r\n * @param value Tension\r\n */\n set: function set(value) {\n this.setPropertyValue(\"tension\", value);\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n return WavedCircle;\n}(Circle);\nexport { WavedCircle };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"WavedCircle\"] = WavedCircle;","/**\r\n * A collection of network-related functions\r\n */\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport * as $type from \"./Type\";\n/**\r\n * Loads an external file via its URL.\r\n *\r\n * Please note that this is an asynchronous function.\r\n *\r\n * It will not return the result, but rather a `Promise`.\r\n *\r\n * You can use the `await` notion, or `then()`.\r\n *\r\n * ```TypeScript\r\n * // Using await\r\n * let response = await Net.load( \"http://www.my.com/data.json\" );\r\n * console.log( response.response );\r\n *\r\n * // Using then()\r\n * Net.load( \"http://www.my.com/data.json\" ).then( ( response ) => {\r\n * console.log( response.response );\r\n * } );\r\n * ```\r\n * ```JavaScript\r\n * // Using then()\r\n * Net.load( \"http://www.my.com/data.json\" ).then( function( response ) {\r\n * console.log( response.response );\r\n * } );\r\n * ```\r\n *\r\n * @async\r\n * @param url URL for the file to load\r\n * @param target A target element that is requesting the net load\r\n * @param options Request options\r\n * @return Result (Promise)\r\n */\nexport function load(url, target, options) {\n return new Promise(function (success, error) {\n // Is return type Blob?\n var isBlob = $type.hasValue(options) && options.responseType == \"blob\";\n // Create request and set up handlers\n var xhr = new XMLHttpRequest();\n xhr.onload = function () {\n if (xhr.status === 200) {\n var response = void 0;\n var blob = void 0;\n if (isBlob) {\n blob = xhr.response;\n } else {\n response = xhr.responseText || xhr.response;\n }\n var output = {\n xhr: xhr,\n error: false,\n response: response,\n blob: blob,\n type: xhr.getResponseHeader(\"Content-Type\"),\n target: target\n };\n success(output);\n } else {\n error({\n xhr: xhr,\n error: true,\n type: xhr.getResponseHeader(\"Content-Type\"),\n target: target\n });\n }\n };\n xhr.onerror = function () {\n error({\n xhr: xhr,\n error: true,\n type: xhr.getResponseHeader(\"Content-Type\"),\n target: target\n });\n };\n // Open request\n xhr.open(\"GET\", url, true);\n if (options && options.withCredentials) {\n xhr.withCredentials = true;\n }\n // Process options\n if ($type.hasValue(options)) {\n if ($type.hasValue(options.requestHeaders)) {\n for (var i = 0; i < options.requestHeaders.length; i++) {\n var header = options.requestHeaders[i];\n xhr.setRequestHeader(header.key, header.value);\n }\n }\n if ($type.hasValue(options.responseType)) {\n xhr.responseType = options.responseType;\n }\n }\n // Send request\n xhr.send();\n });\n}","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","module.exports = {};\n","var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n","import * as tslib_1 from \"tslib\";\nimport { Dictionary } from \"./utils/Dictionary\";\nimport { TargetedEventDispatcher } from \"./utils/EventDispatcher\";\nimport { MultiDisposer, CounterDisposer } from \"./utils/Disposer\";\nimport * as $utils from \"./utils/Utils\";\nimport * as $object from \"./utils/Object\";\n/**\r\n * An [[EventDispatcher]] for [[Sprite]].\r\n *\r\n * @important\r\n */\nvar SpriteEventDispatcher = /** @class */function (_super) {\n tslib_1.__extends(SpriteEventDispatcher, _super);\n function SpriteEventDispatcher() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\r\n * [_interactionEvents description]\r\n *\r\n * @todo Description\r\n */\n _this._interactionEvents = new Dictionary();\n return _this;\n }\n /**\r\n * [_dispatchSpriteEvent description]\r\n *\r\n * @todo Description\r\n */\n SpriteEventDispatcher.prototype._dispatchSpriteEvent = function (ev) {\n if (this.target.disabled || this.target.isTemplate) {\n return;\n }\n // TODO remove this <any> later\n if (this.target.events.isEnabled(ev.type)) {\n var imev = $object.merge(ev, {\n target: this.target\n });\n this.target.events.dispatchImmediately(imev.type, imev);\n }\n };\n /**\r\n * [_dispatchSpritePointEvent description]\r\n *\r\n * @todo Description\r\n */\n SpriteEventDispatcher.prototype._dispatchSpritePointEvent = function (ev) {\n if (this.target.disabled || this.target.isTemplate) {\n return;\n }\n // TODO remove this <any> later\n if (this.target.events.isEnabled(ev.type)) {\n var imev = $object.merge(ev, {\n target: this.target,\n spritePoint: $utils.documentPointToSprite(ev.point, this.target),\n svgPoint: this.target.getSvgPoint(ev.point)\n });\n this.target.events.dispatchImmediately(imev.type, imev);\n }\n };\n /**\r\n * [_addInteractionObjectEvent description]\r\n *\r\n * @todo Description\r\n */\n SpriteEventDispatcher.prototype._addInteractionObjectEvent = function (type, callback, context, shouldClone) {\n var _this = this;\n var counter = this._interactionEvents.insertKeyIfEmpty(type, function () {\n var disposer = _this.target.interactions.events.on(type, callback, context, shouldClone);\n return new CounterDisposer(function () {\n _this._interactionEvents.removeKey(type);\n disposer.dispose();\n });\n });\n return counter.increment();\n };\n /**\r\n * [_on description]\r\n *\r\n * @todo Description\r\n */\n SpriteEventDispatcher.prototype._on = function (once, type, callback, context, shouldClone, dispatch) {\n var info = _super.prototype._on.call(this, once, type, callback, context, shouldClone, dispatch);\n var disposers = [info.disposer];\n /**\r\n * Catching Sprite-related events, converting them to [[SpriteEvent]] and\r\n * triggering them on sprite\r\n */\n switch (type) {\n case \"hit\":\n case \"track\":\n case \"doublehit\":\n case \"wheel\":\n case \"wheelup\":\n case \"wheeldown\":\n case \"wheelleft\":\n case \"wheelright\":\n disposers.push(this._addInteractionObjectEvent(type, this._dispatchSpritePointEvent, this, shouldClone));\n break;\n case \"rightclick\":\n case \"down\":\n //case \"hold\":\n case \"up\":\n case \"drag\":\n case \"dragged\":\n case \"dragstart\":\n case \"dragstop\":\n case \"over\":\n case \"out\":\n case \"swipe\":\n case \"swipeleft\":\n case \"swiperight\":\n case \"resize\":\n //case \"rotate\":\n case \"focus\":\n case \"blur\":\n case \"toggled\":\n disposers.push(this._addInteractionObjectEvent(type, this._dispatchSpriteEvent, this, shouldClone));\n break;\n }\n /**\r\n * Set functional properties based on events. For example if we add a\r\n * \"drag\" event handler, we want to make the Sprite draggable, even if we\r\n * don't explicitly set \"draggable\"\r\n */\n switch (type) {\n case \"hit\":\n case \"doublehit\":\n case \"rightclick\":\n case \"down\":\n case \"up\":\n this.target.clickable = true;\n break;\n case \"toggled\":\n this.target.togglable = true;\n break;\n case \"drag\":\n case \"dragstart\":\n case \"dragstop\":\n this.target.draggable = true;\n break;\n case \"track\":\n this.target.trackable = true;\n break;\n case \"resize\":\n this.target.resizable = true;\n break;\n case \"swipe\":\n case \"swipeleft\":\n case \"swiperight\":\n this.target.swipeable = true;\n break;\n case \"wheel\":\n case \"wheelup\":\n case \"wheeldown\":\n case \"wheelleft\":\n case \"wheelright\":\n this.target.wheelable = true;\n break;\n case \"over\":\n this.target.hoverable = true;\n case \"out\":\n this.target.hoverable = true;\n break;\n case \"focus\":\n case \"blur\":\n this.target.focusable = true;\n break;\n }\n info.disposer = new MultiDisposer(disposers);\n return info;\n };\n return SpriteEventDispatcher;\n}(TargetedEventDispatcher);\nexport { SpriteEventDispatcher };","import * as tslib_1 from \"tslib\";\nimport { TargetedEventDispatcher } from \"../utils/EventDispatcher\";\nimport { MultiDisposer, CounterDisposer } from \"../utils/Disposer\";\n/**\r\n * Represents an Event Dispatcher for [[InteractionObject]].\r\n *\r\n * Besides regular [[EventDispatcher]] functionality it adds new events with\r\n * direct application to DOM nodes. Primarily used to handle keyboard events,\r\n * but can turn into something else moving forward.\r\n */\nvar InteractionObjectEventDispatcher = /** @class */function (_super) {\n tslib_1.__extends(InteractionObjectEventDispatcher, _super);\n function InteractionObjectEventDispatcher() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\r\n * Holds a list of Disposers for DOM events added.\r\n */\n _this._domEvents = {};\n return _this;\n }\n /**\r\n * Adds a DOM event and returns Disposer.\r\n *\r\n * @return Disposer\r\n */\n InteractionObjectEventDispatcher.prototype._addDOMEvent = function (type, key, listener, context) {\n var _this = this;\n if (!this._domEvents[type]) {\n var callback_1 = function callback_1(e) {\n listener.call(context, key, e);\n };\n this.target.element.addEventListener(type, callback_1, false);\n this._domEvents[type] = new CounterDisposer(function () {\n delete _this._domEvents[type];\n _this.target.element.removeEventListener(type, callback_1, false);\n });\n }\n return this._domEvents[type].increment();\n };\n InteractionObjectEventDispatcher.prototype._dispatchKeyboardEvent = function (key, ev) {\n // TODO use this.dispatchImmediately ?\n if (this.target.events.isEnabled(key)) {\n this.target.events.dispatchImmediately(key, {\n type: key,\n target: this.target,\n event: ev\n });\n }\n };\n InteractionObjectEventDispatcher.prototype._on = function (once, type, callback, context, shouldClone, dispatch) {\n var info = _super.prototype._on.call(this, once, type, callback, context, shouldClone, dispatch);\n var disposers = [info.disposer];\n switch (type) {\n case \"hit\":\n case \"doublehit\":\n case \"rightclick\":\n case \"down\":\n case \"up\":\n this.target.clickable = true;\n break;\n case \"drag\":\n case \"dragstart\":\n case \"dragstop\":\n this.target.draggable = true;\n break;\n case \"track\":\n this.target.trackable = true;\n break;\n case \"resize\":\n this.target.resizable = true;\n break;\n case \"swipe\":\n case \"swipeleft\":\n case \"swiperight\":\n this.target.swipeable = true;\n break;\n case \"wheel\":\n case \"wheelup\":\n case \"wheeldown\":\n case \"wheelleft\":\n case \"wheelright\":\n this.target.wheelable = true;\n break;\n case \"over\":\n case \"out\":\n this.target.hoverable = true;\n break;\n case \"focus\":\n case \"blur\":\n case \"focusin\":\n case \"focusout\":\n this.target.focusable = true;\n break;\n case \"keydown\":\n disposers.push(this._addDOMEvent(type, type, this._dispatchKeyboardEvent, this));\n break;\n case \"keyup\":\n disposers.push(this._addDOMEvent(type, type, this._dispatchKeyboardEvent, this));\n break;\n case \"keypress\":\n disposers.push(this._addDOMEvent(type, type, this._dispatchKeyboardEvent, this));\n break;\n case \"input\":\n disposers.push(this._addDOMEvent(type, type, this._dispatchKeyboardEvent, this));\n break;\n }\n info.disposer = new MultiDisposer(disposers);\n return info;\n };\n return InteractionObjectEventDispatcher;\n}(TargetedEventDispatcher);\nexport { InteractionObjectEventDispatcher };","/**\r\n * Ellipse module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Circle } from \"./Circle\";\nimport { registry } from \"../Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws an ellipse\r\n * @see {@link IEllipseEvents} for a list of available events\r\n * @see {@link IEllipseAdapters} for a list of available Adapters\r\n */\nvar Ellipse = /** @class */function (_super) {\n tslib_1.__extends(Ellipse, _super);\n /**\r\n * Constructor\r\n */\n function Ellipse() {\n var _this = _super.call(this) || this;\n _this.className = \"Ellipse\";\n _this.element = _this.paper.add(\"ellipse\");\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the ellipsis.\r\n */\n Ellipse.prototype.draw = function () {\n _super.prototype.draw.call(this);\n this.element.attr({\n \"rx\": this.radius\n });\n this.element.attr({\n \"ry\": this.radiusY\n });\n };\n Object.defineProperty(Ellipse.prototype, \"radiusY\", {\n /**\r\n * @return Vertical radius\r\n */\n get: function get() {\n return this.innerHeight / 2;\n },\n /**\r\n * Vertical radius.\r\n *\r\n * It's a relative size to the `radius`.\r\n *\r\n * E.g. 0.8 will mean the height of the ellipsis will be 80% of it's\r\n * horizontal radius.\r\n *\r\n * @param value Vertical radius\r\n */\n set: function set(value) {\n this.height = value * 2;\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Ellipse.prototype, \"radius\", {\n /**\r\n * @return Horizontal radius\r\n */\n get: function get() {\n return this.innerWidth / 2;\n },\n /**\r\n * Horizontal radius.\r\n *\r\n * @param value Horizontal radius\r\n */\n set: function set(value) {\n this.width = value * 2;\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n return Ellipse;\n}(Circle);\nexport { Ellipse };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Ellipse\"] = Ellipse;","/**\r\n * Resize button module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Button } from \"./Button\";\nimport { Sprite } from \"../Sprite\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport { registry } from \"../Registry\";\nimport * as $path from \"../rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a draggable resize/grip button.\r\n *\r\n * @see {@link IResizeButtonEvents} for a list of available events\r\n * @see {@link IResizeButtonAdapters} for a list of available Adapters\r\n */\nvar ResizeButton = /** @class */function (_super) {\n tslib_1.__extends(ResizeButton, _super);\n /**\r\n * Constructor\r\n */\n function ResizeButton() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"ResizeButton\";\n // Set defaults\n _this.orientation = \"horizontal\";\n _this.layout = \"absolute\";\n _this.horizontalCenter = \"middle\";\n _this.verticalCenter = \"middle\";\n _this.draggable = true;\n _this.padding(8, 8, 8, 8);\n _this.background.cornerRadius(20, 20, 20, 20);\n // Create an icon\n var icon = new Sprite();\n icon.element = _this.paper.add(\"path\");\n var path = $path.moveTo({\n x: -2,\n y: -6\n });\n path += $path.lineTo({\n x: -2,\n y: 6\n });\n path += $path.moveTo({\n x: 2,\n y: -6\n });\n path += $path.lineTo({\n x: 2,\n y: 6\n });\n icon.path = path;\n icon.pixelPerfect = true;\n icon.padding(0, 4, 0, 4);\n icon.stroke = new InterfaceColorSet().getFor(\"alternativeText\");\n icon.strokeOpacity = 0.7;\n //icon.align = \"center\";\n //icon.valign = \"middle\";\n _this.icon = icon;\n _this.label.dispose();\n _this.label = undefined;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(ResizeButton.prototype, \"orientation\", {\n /**\r\n * Use for setting of direction (orientation) of the resize button.\r\n *\r\n * Available options: \"horizontal\", \"vertical\".\r\n *\r\n * @param value Orientation\r\n */\n set: function set(value) {\n var icon = this.icon;\n if (icon) {\n if (value == \"horizontal\") {\n icon.rotation = 0;\n } else {\n icon.rotation = -90;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n return ResizeButton;\n}(Button);\nexport { ResizeButton };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"ResizeButton\"] = ResizeButton;","/**\r\n * A module that defines Text element used to indicate links.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Label } from \"../../core/elements/Label\";\nimport { MouseCursorStyle } from \"../../core/interaction/Mouse\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport { registry } from \"../Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a text element with a link.\r\n *\r\n * @see {@link ITextLinkEvents} for a list of available events\r\n * @see {@link ITextLinkAdapters} for a list of available Adapters\r\n */\nvar TextLink = /** @class */function (_super) {\n tslib_1.__extends(TextLink, _super);\n /**\r\n * Constructor\r\n */\n function TextLink() {\n var _this = _super.call(this) || this;\n _this.className = \"TextLink\";\n _this.selectable = true;\n var interfaceColors = new InterfaceColorSet();\n _this.fill = interfaceColors.getFor(\"primaryButton\").brighten(0.3);\n var hoverState = _this.states.create(\"hover\");\n hoverState.properties.fill = interfaceColors.getFor(\"primaryButtonHover\").brighten(0.3);\n var downState = _this.states.create(\"down\");\n downState.properties.fill = interfaceColors.getFor(\"primaryButtonDown\").brighten(0.3);\n _this.cursorOverStyle = MouseCursorStyle.pointer;\n _this.applyTheme();\n return _this;\n }\n return TextLink;\n}(Label);\nexport { TextLink };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"TextLink\"] = TextLink;","import { SelectWithOtherInput, TextInput, YesNoInput } from \"auditComponents\";\nimport dotProp from \"dot-prop-immutable\";\n\nimport _ from \"lodashExtended\";\nimport { useReducer } from \"react\";\nimport { connect } from \"react-redux\";\nimport Section from \"../Section\";\nimport emailAddressCheck from \"email-addresses\";\nimport { useHistory, useRouteMatch } from \"react-router-dom\";\nimport { updateSectionData } from \"../../sections/operations\";\nimport { getSectionData } from \"../../sections/selectors\";\nimport SubmitSummarySection from \"../SubmitSummarySection\";\nimport { CustomSummaryRow } from \"./PAASummaryRow\";\n\nconst SECTION_ID = \"general_information\";\nconst TITLE = \"General Information\";\n\nconst d = dotProp;\n\nconst UK_PHONE_NUMBER_VALIDATION_REGEXP = /^0?\\s?\\(?\\d{4}\\)?[\\s.-]?\\d{6}$/;\n\nfunction getErrors(attrs) {\n const { email, phone } = attrs;\n var errors = {};\n if (_.isPresent(email)) {\n errors[\"email\"] = emailAddressCheck.parseOneAddress(email)\n ? null\n : [\"please enter a valid email address\"];\n }\n\n if (_.isPresent(phone)) {\n errors[\"phone\"] = UK_PHONE_NUMBER_VALIDATION_REGEXP.test(phone)\n ? null\n : [\"Please enter a valid phone number\"];\n }\n\n console.log({ errors });\n return errors;\n}\n\nfunction mergeErrors(allErrors, attr) {\n return {\n ...allErrors,\n ...getErrors(attr),\n };\n}\n\nconst incompleteMessage = (state) => {\n const {\n premisesName,\n collectionAddress,\n postcode,\n primaryContact,\n primaryContact: { fullName, phone } = {},\n email,\n sicCode,\n premisesType,\n doesProduceRadioactiveWaste,\n } = getSectionData(SECTION_ID, state);\n\n const toCheck = [\n premisesName,\n collectionAddress,\n postcode,\n fullName,\n phone,\n email,\n sicCode,\n premisesType,\n doesProduceRadioactiveWaste,\n ];\n\n const blankFields = _.filter(toCheck, _.isBlank).length;\n const result =\n blankFields > 0\n ? `There ${\n blankFields == 1 ? \"is\" : \"are\"\n } ${blankFields} unanswered question${\n blankFields == 1 ? \"\" : \"s\"\n } remaining`\n : null;\n\n return result;\n};\n\nconst isStarted = (state) => {\n const sectionData = getSectionData(SECTION_ID, state);\n return _(sectionData).pick([\"doesProduceRadioactiveWaste\"]).isPresent();\n};\n\nvar GeneralInformation = ({ onChange, number, sectionData, sicCodes }) => {\n const {\n premisesName,\n collectionAddress,\n postcode,\n primaryContact = {},\n primaryContact: { fullName, phone } = {},\n email,\n sicCode,\n isSicCodePreset,\n premisesType,\n doesProduceRadioactiveWaste,\n } = sectionData;\n\n\n const { url } = useRouteMatch();\n const history = useHistory();\n const locationUpdateModalPath = `${url}/locationDetailsUpdate`;\n const [errors, setErrors] = useReducer(mergeErrors, {});\n\n return (\n <Section sectionId={SECTION_ID} title={TITLE} subtext=\"\" number={number}>\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n {/* Starting with pre-populated data */}\n <TextInput\n name=\"premisesName\"\n value={premisesName}\n label={\"Premises Name\"}\n onChange={onChange}\n allErrors={errors}\n placeholder={\"Enter premises name\"}\n disabled\n />\n <TextInput\n name=\"collectionAddress\"\n value={collectionAddress}\n label={\"Collection Address\"}\n onChange={onChange}\n allErrors={errors}\n placeholder={\"Enter collection address\"}\n disabled\n />\n <TextInput\n name=\"postcode\"\n value={postcode}\n label={\"Postcode\"}\n onChange={onChange}\n allErrors={errors}\n placeholder={\"Enter postcode\"}\n disabled\n />\n\n <TextInput\n name=\"premisesType\"\n value={premisesType}\n label={\"Premises Type\"}\n allErrors={errors}\n onChange={onChange}\n placeholder={\"Enter premises type\"}\n disabled\n />\n\n <div className=\"form-group string\">\n <div>\n <label className=\"form-control-label text\">SIC Code</label>\n </div>\n <SelectWithOtherInput\n subtext={<span className='text-muted'>\n What is the nature of the premises activity?\n <a\n href='https://www.ons.gov.uk/methodology/classificationsandstandards/ukstandardindustrialclassificationofeconomicactivities/uksic2007'\n target='_blank'\n className=\"mr-2\"\n title=\"Nature of business: Standard Industrial Classification (SIC) codes\"\n > More info</a>\n\n\n </span>}\n name=\"sicCode\"\n value={sicCode}\n onChange={onChange}\n options={sicCodes}\n placeholder=\"List of SIC Codes You can choose from\"\n disabled={isSicCodePreset}\n />\n </div>\n\n {/* from here on user can enter these fields */}\n\n <TextInput\n name=\"fullName\"\n value={primaryContact.fullName}\n label={\"Primary contact\"}\n onValidate={setErrors}\n onChange={(value) => onChange(value, `primaryContact.fullName`)}\n allErrors={errors}\n placeholder={\"Enter your First and Last Name\"}\n />\n\n <TextInput\n name=\"phone\"\n value={primaryContact.phone}\n label={\"\"}\n onValidate={setErrors}\n onChange={(value) => onChange(value, `primaryContact.phone`)}\n allErrors={errors}\n placeholder={\"Enter your Phone\"}\n />\n\n <TextInput\n name=\"email\"\n value={email}\n label={\"Email Address\"}\n onChange={onChange}\n onValidate={setErrors}\n allErrors={errors}\n placeholder={\"Enter your email address\"}\n />\n\n <YesNoInput\n name=\"doesProduceRadioactiveWaste\"\n value={doesProduceRadioactiveWaste}\n label=\"Do you produce Radioactive waste?\"\n onChange={onChange}\n />\n </div>\n </div>\n </Section>\n );\n};\n\nGeneralInformation.propTypes = {};\n\nvar SummaryView = ({ wasteAudit: pawaAudit }) => {\n const {\n premisesName,\n collectionAddress,\n postcode,\n primaryContact: { fullName, phone } = {},\n email,\n sicCode,\n premisesType,\n doesProduceRadioactiveWaste,\n } = pawaAudit.sections[SECTION_ID] || {};\n\n return (\n <SubmitSummarySection sectionId={SECTION_ID} title={TITLE}>\n <div className=\"media\">\n <div className=\"media-body\">\n <h4 className=\"h5 summary__section--subtitle\">\n Person conducting the Waste Management Audit\n </h4>\n <CustomSummaryRow value={premisesName} label={\"Premises Name\"} />\n <CustomSummaryRow\n value={collectionAddress}\n label={\"Collection Address\"}\n />\n <CustomSummaryRow value={postcode} label={\"Postcode\"} />\n <CustomSummaryRow\n value={fullName}\n label={\"Primary Contact Full Name\"}\n />\n <CustomSummaryRow value={phone} label={\"Primary Contact Phone\"} />\n\n <CustomSummaryRow value={email} label={\"Email Address\"} />\n <CustomSummaryRow value={premisesType} label={\"Premises Type\"} />\n <CustomSummaryRow value={sicCode} label={\"SIC Code\"} />\n\n <CustomSummaryRow\n value={doesProduceRadioactiveWaste}\n label={\"Do you produce Radioactive waste?\"}\n />\n </div>\n </div>\n </SubmitSummarySection>\n );\n};\n\nconst mapStateToProps = (state) => {\n return {\n sectionData: getSectionData(SECTION_ID, state),\n sicCodes: state.app.sicCodes,\n };\n};\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onChange: (value, name) => {\n dispatch(updateSectionData(SECTION_ID, d.set({}, name, value)));\n },\n };\n};\n\nconst ConnectedGeneralInformation = connect(\n mapStateToProps,\n mapDispatchToProps\n)(GeneralInformation);\n\n//export default GeneralInformation;\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n incompleteMessage,\n isStarted,\n Component: ConnectedGeneralInformation,\n SummaryView,\n};\n","import { SummaryRow, TextAreaInput, YesNoInput } from \"auditComponents\";\nimport dotProp from \"dot-prop-immutable\";\nimport _ from \"lodashExtended\";\nimport { useReducer } from \"react\";\nimport { connect } from \"react-redux\";\nimport Section from \"../Section\";\n\nimport emailAddressCheck from \"email-addresses\";\nimport { useHistory, useRouteMatch } from \"react-router-dom\";\nimport { updateSectionData } from \"../../sections/operations\";\nimport { getSectionData } from \"../../sections/selectors\";\nimport SubmitSummarySection from \"../SubmitSummarySection\";\nimport { CustomSummaryRow } from \"./PAASummaryRow\";\n\nconst SECTION_ID = \"waste_storage_and_training\";\nconst TITLE = \"Waste Storage And Training\";\n\nconst d = dotProp;\n\nfunction getErrors({ email }) {\n var errors = {};\n if (_.isPresent(email)) {\n errors[\"email\"] = emailAddressCheck.parseOneAddress(email)\n ? null\n : [\"please enter a valid email address\"];\n }\n\n return errors;\n}\n\nfunction mergeErrors(allErrors, attr) {\n return {\n ...allErrors,\n ...getErrors(attr),\n };\n}\n\nconst incompleteMessage = (state) => {\n const {\n isInternalWasteBinsColorCodedPerSMHW,\n isWasteSegregatedAndSecure,\n isAnyAnatomicalWasteStoredUnderTemperatureControl, // yes / no / n/a\n\n // Staff Training and Information, done via meta\n hasWasteMgmtPolicy,\n canProvideCopyOfWasteMgmtPolicy,\n doesTrainStaffInWasteHandling,\n doesTrainStaffInWasteSegregation,\n doesKeepHazardousWasteConsignmentNotesOnFile,\n didAskStaffQuestionsDuringThisAudit,\n doesHavePosterOrTrainingMaterialOnDisplay,\n canProvideACopyOfEnvironmentalMgmtSystem,\n\n // Text input\n auditProcedureAndPracticeDescription,\n auditRegimesDescription,\n } = getSectionData(SECTION_ID, state);\n\n const toCheck = [\n isInternalWasteBinsColorCodedPerSMHW,\n isWasteSegregatedAndSecure,\n isAnyAnatomicalWasteStoredUnderTemperatureControl, // yes / no / n/a\n\n // Staff Training and Information, done via meta\n hasWasteMgmtPolicy,\n canProvideCopyOfWasteMgmtPolicy,\n doesTrainStaffInWasteHandling,\n doesTrainStaffInWasteSegregation,\n doesKeepHazardousWasteConsignmentNotesOnFile,\n didAskStaffQuestionsDuringThisAudit,\n doesHavePosterOrTrainingMaterialOnDisplay,\n canProvideACopyOfEnvironmentalMgmtSystem,\n\n // Text input\n auditProcedureAndPracticeDescription,\n auditRegimesDescription,\n ];\n\n const blankFields = _.filter(toCheck, _.isBlank).length;\n\n return blankFields > 0\n ? `There ${\n blankFields == 1 ? \"is\" : \"are\"\n } ${blankFields} unanswered question${\n blankFields == 1 ? \"\" : \"s\"\n } remaining`\n : null;\n};\n\nconst YES_NO_QUESTIONS = {\n isInternalWasteBinsColorCodedPerSMHW: {\n label:\n \"Are your internal waste bins, colour coded or labeled as per Safe management of Healthcare waste HTM 07-01\",\n },\n isWasteSegregatedAndSecure: {\n label: \"Is your Waste segregated and stored in a secure location?\",\n },\n isAnyAnatomicalWasteStoredUnderTemperatureControl: {\n label: \"Is any Anatomical Waste stored under temperature control?\",\n }, // can have N/A\n\n hasWasteMgmtPolicy: { label: \"Do you have a Waste Management Policy?\" },\n canProvideCopyOfWasteMgmtPolicy: {\n label:\n \"If you have a Waste Management Policy, can you provide a copy if requested?\",\n },\n doesTrainStaffInWasteHandling: {\n label: \"Do you train your staff in waste handling?\",\n },\n doesTrainStaffInWasteSegregation: {\n label: \"Do you train your staff in waste segregation?\",\n },\n doesKeepHazardousWasteConsignmentNotesOnFile: {\n label: \"Do you keep your Hazardous Waste Consignment Notes on file?\",\n },\n didAskStaffQuestionsDuringThisAudit: {\n label:\n \"Did you ask your staff any question on waste handling during this audit?\",\n },\n doesHavePosterOrTrainingMaterialOnDisplay: {\n label: \"Do you have posters or training material on display?\",\n },\n canProvideACopyOfEnvironmentalMgmtSystem: {\n label:\n \"Can you provide a copy of your Environmental Management System if requested?\",\n },\n};\n\nconst isStarted = (state) => {\n const sectionData = getSectionData(SECTION_ID, state);\n return _(sectionData).omit(\"location\").isPresent();\n};\n\nconst WasteStorageAndTraining = ({\n onChange,\n number,\n sectionData,\n docRequirementText,\n isDocInProgress,\n hasFinalisedDocAudit,\n finalizedWasteAudit,\n}) => {\n const {\n // Waste storage\n isInternalWasteBinsColorCodedPerSMHW,\n isWasteSegregatedAndSecure,\n isAnyAnatomicalWasteStoredUnderTemperatureControl, // yes / no / n/a\n\n // Staff Training and Information, done via meta\n hasWasteMgmtPolicy,\n canProvideCopyOfWasteMgmtPolicy,\n doesTrainStaffInWasteHandling,\n doesTrainStaffInWasteSegregation,\n doesKeepHazardousWasteConsignmentNotesOnFile,\n didAskStaffQuestionsDuringThisAudit,\n doesHavePosterOrTrainingMaterialOnDisplay,\n canProvideACopyOfEnvironmentalMgmtSystem,\n\n // Text input\n auditProcedureAndPracticeDescription,\n auditRegimesDescription,\n } = sectionData;\n\n const { url } = useRouteMatch();\n const history = useHistory();\n const locationUpdateModalPath = `${url}/locationDetailsUpdate`;\n const [errors, setErrors] = useReducer(mergeErrors, {});\n\n return (\n <Section sectionId={SECTION_ID} title={TITLE} subtext=\"\" number={number}>\n <h4 className=\"h5 mt-2 mb-3 strong\">Waste Storage</h4>\n\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n <YesNoInput\n name=\"isInternalWasteBinsColorCodedPerSMHW\"\n value={isInternalWasteBinsColorCodedPerSMHW}\n label={\n YES_NO_QUESTIONS[\"isInternalWasteBinsColorCodedPerSMHW\"].label\n }\n onChange={onChange}\n />\n\n <YesNoInput\n name=\"isWasteSegregatedAndSecure\"\n value={isWasteSegregatedAndSecure}\n label={YES_NO_QUESTIONS[\"isWasteSegregatedAndSecure\"].label}\n onChange={onChange}\n />\n\n <YesNoInput\n canSelectNA\n name=\"isAnyAnatomicalWasteStoredUnderTemperatureControl\"\n value={isAnyAnatomicalWasteStoredUnderTemperatureControl}\n label={\n YES_NO_QUESTIONS[\n \"isAnyAnatomicalWasteStoredUnderTemperatureControl\"\n ].label\n }\n onChange={onChange}\n />\n\n <h4 className=\"h5 mt-4 mb-3 strong\">\n Staff Training and Information\n </h4>\n\n {/* Meta Yes/No */}\n\n {[\n \"hasWasteMgmtPolicy\",\n \"canProvideCopyOfWasteMgmtPolicy\",\n \"doesTrainStaffInWasteHandling\",\n \"doesTrainStaffInWasteSegregation\",\n \"doesKeepHazardousWasteConsignmentNotesOnFile\",\n \"didAskStaffQuestionsDuringThisAudit\",\n \"doesHavePosterOrTrainingMaterialOnDisplay\",\n \"canProvideACopyOfEnvironmentalMgmtSystem\",\n ].map((yesNoQuestionKey) => {\n return (\n <YesNoInput\n key={yesNoQuestionKey}\n name={yesNoQuestionKey}\n value={sectionData[yesNoQuestionKey]}\n label={YES_NO_QUESTIONS[yesNoQuestionKey].label}\n onChange={onChange}\n />\n );\n })}\n\n <TextAreaInput\n name=\"auditProcedureAndPracticeDescription\"\n value={auditProcedureAndPracticeDescription}\n label={\n \"Please provide a description of the audit procedure and practices\"\n }\n onChange={onChange}\n onValidate={setErrors}\n allErrors={errors}\n placeholder={\n \"E.g. The audit was carried out by visually inspecting all relevant containers for the waste types produced on site and the details recorded to complete sections within this audit.\"\n }\n />\n\n <TextAreaInput\n name=\"auditRegimesDescription\"\n value={auditRegimesDescription}\n label={\"Please describe your audit regimes\"}\n allErrors={errors}\n onChange={onChange}\n placeholder={\n \"E.g. Audits conducted monthly/quarterly/annually in line with HTM guidance and with the support of Anenta Ltd\"\n }\n />\n\n <div className=\"panel-body mt-4\">\n {hasFinalisedDocAudit ? (\n <div\n className=\"bordered--blue\"\n style={{\n padding: \"15px 15px 10px 15px\",\n marginBottom: \"20px\",\n }}\n >\n <h4 className=\"h5 mb-3 strong\">\n The DoC audit completed on {finalizedWasteAudit.reportFinalizedOn} named {finalizedWasteAudit.reportFilename} provides evidence related compositional audit conducted of which there is currently no change\n </h4>\n </div>\n ): isDocInProgress && (\n <div\n className=\"bordered--red\"\n style={{\n padding: \"15px 15px 10px 15px\",\n marginBottom: \"20px\",\n }}\n > \n <strong className=\"text-danger\">\n Duty of Care Audit has not been completed yet\n </strong>\n\n <h4 className=\"h5 mt-4 mb-3 strong\">\n A Duty of Care audit is required to ensure full compliance with waste management requirements to generate detailed evidence to support the pre-acceptance audit. You can access this within your Anenta account on the dashboard.\n </h4>\n </div>\n )}\n </div>\n </div>\n </div>\n </Section>\n );\n};\n\nvar SummaryView = ({ wasteAudit }) => {\n const wasteStorageAndTrainingData = wasteAudit.sections[SECTION_ID] || {};\n const {\n isInternalWasteBinsColorCodedPerSMHW,\n isWasteSegregatedAndSecure,\n isAnyAnatomicalWasteStoredUnderTemperatureControl, // yes / no / n/a\n\n // Staff Training and Information, done via meta\n hasWasteMgmtPolicy,\n canProvideCopyOfWasteMgmtPolicy,\n doesTrainStaffInWasteHandling,\n doesTrainStaffInWasteSegregation,\n doesKeepHazardousWasteConsignmentNotesOnFile,\n didAskStaffQuestionsDuringThisAudit,\n doesHavePosterOrTrainingMaterialOnDisplay,\n canProvideACopyOfEnvironmentalMgmtSystem,\n\n // Text input\n auditProcedureAndPracticeDescription,\n auditRegimesDescription,\n } = wasteStorageAndTrainingData;\n\n const FOR_META_PROGRAMMING_SUMMARY = [\n \"hasWasteMgmtPolicy\",\n \"canProvideCopyOfWasteMgmtPolicy\",\n \"doesTrainStaffInWasteHandling\",\n \"doesTrainStaffInWasteSegregation\",\n \"doesKeepHazardousWasteConsignmentNotesOnFile\",\n \"didAskStaffQuestionsDuringThisAudit\",\n \"doesHavePosterOrTrainingMaterialOnDisplay\",\n \"canProvideACopyOfEnvironmentalMgmtSystem\",\n ];\n\n return (\n <SubmitSummarySection sectionId={SECTION_ID} title={TITLE}>\n <div className=\"media\">\n <div className=\"media-body\">\n <h4 className=\"h5 mt-2 mb-3 strong\">Waste Storage</h4>\n <CustomSummaryRow\n value={isInternalWasteBinsColorCodedPerSMHW}\n label={\n YES_NO_QUESTIONS[\"isInternalWasteBinsColorCodedPerSMHW\"].label\n }\n />\n <CustomSummaryRow\n value={isWasteSegregatedAndSecure}\n label={YES_NO_QUESTIONS[\"isWasteSegregatedAndSecure\"].label}\n />\n\n {/* Yes / No / NA */}\n <CustomSummaryRow\n value={isAnyAnatomicalWasteStoredUnderTemperatureControl}\n label={\n YES_NO_QUESTIONS[\n \"isAnyAnatomicalWasteStoredUnderTemperatureControl\"\n ].label\n }\n />\n\n <h4 className=\"h5 mt-4 mb-3 strong\">\n Staff Training and Information\n </h4>\n\n {/* Meta Yes/No */}\n {[\n \"hasWasteMgmtPolicy\",\n \"canProvideCopyOfWasteMgmtPolicy\",\n \"doesTrainStaffInWasteHandling\",\n \"doesTrainStaffInWasteSegregation\",\n \"doesKeepHazardousWasteConsignmentNotesOnFile\",\n \"didAskStaffQuestionsDuringThisAudit\",\n \"doesHavePosterOrTrainingMaterialOnDisplay\",\n \"canProvideACopyOfEnvironmentalMgmtSystem\",\n ].map((yesNoQuestionKey) => {\n return (\n <CustomSummaryRow\n key={yesNoQuestionKey}\n value={wasteStorageAndTrainingData[yesNoQuestionKey]}\n label={YES_NO_QUESTIONS[yesNoQuestionKey].label}\n />\n );\n })}\n\n <CustomSummaryRow\n value={auditProcedureAndPracticeDescription}\n label={\n \"Please provide a description of the audit procedure and practices\"\n }\n />\n <CustomSummaryRow\n value={auditRegimesDescription}\n label={\"Please describe your audit regimes\"}\n />\n </div>\n </div>\n </SubmitSummarySection>\n );\n};\n\nconst mapStateToProps = (state) => {\n return {\n sectionData: getSectionData(SECTION_ID, state),\n docRequirementText: state.app.docRequirementText,\n isDocInProgress: state.app.isDocInProgress,\n hasFinalisedDocAudit: state.app.hasFinalisedDocAudit,\n finalizedWasteAudit: state.app.finalizedWasteAudit,\n };\n};\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onChange: (value, name) => {\n dispatch(updateSectionData(SECTION_ID, d.set({}, name, value)));\n },\n };\n};\n\nconst ConnectedWasteStorageAndTraining = connect(\n mapStateToProps,\n mapDispatchToProps\n)(WasteStorageAndTraining);\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n incompleteMessage,\n isStarted,\n Component: ConnectedWasteStorageAndTraining,\n SummaryView,\n};\n","import { Typography, Chip } from \"@mui/material\";\nimport OverflowTooltip from \"service/forms/common/OverflowTooltip\";\nimport { formatDate } from \"sharedUtils\";\nimport { humanize } from \"./utils\";\nimport _ from 'lodashExtended'\n\nexport const StatusRow = ({ service }) => {\n const serviceStatus = service?.status;\n\n const date = service?.restartDate || service?.stopDate;\n\n const label = (serviceStatus !== \"running\" && _.isPresent(date))\n ? `${humanize(serviceStatus)} on ${formatDate(date)}`\n : humanize(serviceStatus);\n\n\n return (\n <Chip size=\"small\"\n sx={{ color: getColor(service?.status) }}\n label={label}\n />\n );\n};\n\nconst getColor = (status) => {\n const colors = {\n running: \"green\",\n terminated: \"red\",\n suspended: \"red\",\n suspending: \"orange\",\n terminating: \"orange\",\n resuming: \"orange\",\n reinstating: \"orange\"\n };\n return colors[status] || \"inherit\";\n};\n","export const humanize = (str) => {\n return (\n str &&\n str\n .replace(/^[\\s_]+|[\\s_]+$/g, \"\")\n .replace(/[_\\s]+/g, \" \")\n .replace(/^[a-z]/, function (m) {\n return m.toUpperCase();\n })\n );\n};\n","import { Box, Link } from \"@mui/material\";\nimport dayjs from \"dayjs\";\nimport VendorAccountLink from \"./VendorAccountLink\";\nimport { useGetLocationServiceVendorsQuery } from \"api/services\";\nimport { getLocationId } from \"ticket/selectors\";\nimport { first, keys, map } from \"lodash\";\n\n// Define interface for VendorLocationAccounts within the payload\nexport interface VendorLocationAccount {\n lastBilledOn: string;\n firstBilledOn: string;\n vendorLocationCode: string;\n}\n\n// Define interface for VendorAccount within the payload\nexport interface VendorAccount {\n name: string;\n id: number;\n wrongCommissioner: boolean;\n vendorServiceId: number;\n transitionOn: string;\n closed: boolean;\n nameWithoutClosed: string;\n}\n\n// Define the top-level interface that includes both vendorAccount and vendorLocationAccounts\nexport interface ServiceMappingInfoProps {\n firstDate: string; // Added to match the payload\n vendorAccount: VendorAccount;\n vendorLocationAccounts: VendorLocationAccount[];\n oldVLA: boolean;\n openVLC: boolean;\n vendorAccountClosedMonthName: string;\n}\n\nconst ServiceMappingInfo: React.FC<ServiceMappingInfoProps> = ({\n vendorAccount,\n vendorLocationAccounts,\n oldVLA,\n openVLC,\n vendorAccountClosedMonthName,\n}) => {\n\n const locationId = getLocationId();\n const { data: locationServiceVendors } = useGetLocationServiceVendorsQuery(locationId);\n const vendorId = first(keys(locationServiceVendors));\n\n return (\n <Box sx={{ py: '3px' }} >\n\n <VendorAccountLink\n vendorAccount={vendorAccount}\n vendorAccountClosedMonthName={vendorAccountClosedMonthName}\n />\n\n {vendorAccount?.transitionOn && (\n <span className=\"text-muted\">\n   from {dayjs(vendorAccount.transitionOn).format(\"MMMM YYYY\")}\n </span>\n )}\n {vendorAccount?.wrongCommissioner && (\n <div>\n <strong className={oldVLA ? \"text-muted\" : \"text-danger\"}>\n   Wrong Commissioner\n </strong>\n </div>\n )}\n\n {!openVLC && (\n <Box\n >\n {vendorLocationAccounts?.map((vla) => (\n <Link\n key={vla.vendorLocationCode}\n target=\"_blank\"\n href={`/admin/vendors/${vendorId}/location_mappings/${encodeURIComponent(\n vla?.vendorLocationCode,\n )}`}\n underline=\"none\"\n sx={{ color: \"#777\", fontSize: \"11px\" }}\n >\n {vla?.vendorLocationCode}\n </Link>\n ))}\n </Box>\n )}\n </Box>\n );\n};\n\nexport default ServiceMappingInfo;\n","import { IconButton, Link, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, } from \"@mui/material\";\nimport { StreamIcon } from \"service/utils/Icons\";\nimport { formatDate } from \"sharedUtils\";\n\nconst VlcTable = ({ vendorLocationAccounts }) => {\n return (\n\n <TableContainer >\n\n <Table size=\"small\">\n <TableHead sx={{ \"& .MuiTableCell-root\": { py: 'inherit', fontWeight: \"inherit\", color: \"inherit\", }, }}>\n <TableRow\n sx={{\n fontWeight: \"noraml\",\n color: \"#828B98\",\n border: \"1px solid transparent\",\n py: '1px'\n }}\n >\n <TableCell>VLC</TableCell>\n <TableCell>Last Data Received On</TableCell>\n <TableCell>First Billed</TableCell>\n <TableCell>Last Billed</TableCell>\n </TableRow>\n </TableHead>\n <TableBody\n sx={{\n \"& .MuiTableRow-root\": {\n borderTop: \"1px solid #F1F1F5\",\n },\n }}\n >\n {vendorLocationAccounts?.map((item) => (\n <TableRow key={item.vendorLocationCode}>\n <TableCell>\n <Link\n target=\"_blank\"\n href={`/admin/vendors/${\n item.vendorId\n }/location_mappings/${encodeURIComponent(\n item.vendorLocationCode\n )}`}\n underline=\"none\"\n sx={{ color: \"#3BAFDA !important\" }}\n >\n {item.vendorLocationCode}\n </Link>\n {item?.streamUrl && (\n <StreamIcon sx={{ fontSize:'1em', ml: 1}} onClick={() => window.open(item?.streamUrl, \"_blank\")}/>\n\n )}\n </TableCell>\n <TableCell>{formatDate(item.lastDataReceivedOn)}</TableCell>\n <TableCell>{formatDate(item.firstBilledOn)}</TableCell>\n <TableCell>{formatDate(item.lastBilledOn)}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </TableContainer>\n );\n};\n\nexport default VlcTable;\n","import { Box, Drawer } from \"@mui/material\";\n\nexport const FooterDrawer = ({\n isDrawerOpen,\n closeDrawer,\n children,\n openFormUrl,\n}) => {\n\n const sx = openFormUrl ? {\n position: \"sticky\",\n zIndex: 1,\n maxHeight: \"60vh\",\n marginBottom: '5px',\n background: 'none',\n } : {\n position: \"sticky\",\n zIndex: 1,\n borderRadius: '4px',\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n maxHeight: \"60vh\",\n background: 'none',\n };\n\n\n return (\n <Drawer\n variant=\"persistent\"\n anchor=\"bottom\"\n open={isDrawerOpen}\n onClose={closeDrawer}\n PaperProps={{\n sx: sx,\n }}\n >\n <Box sx={{ height: \"100%\" }}>{children}</Box>\n </Drawer>\n );\n};\n","import CloseIcon from \"@mui/icons-material/Close\";\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport {\n Box,\n Button,\n FormControl,\n Grid,\n IconButton,\n MenuItem,\n Paper,\n Select,\n TextField,\n Typography,\n} from \"@mui/material\";\nimport { TextMuted, TextSmall } from 'sharedComponents';\nimport { useCallback, useState } from \"react\";\nimport { useDropzone } from \"react-dropzone\";\nimport { Controller } from \"react-hook-form\";\nimport ResponseFormDatePicker from \"service/forms/common/ResponseFormDatePicker\";\nimport { styles } from \"./FormStyles\";\nimport { useTypedSelector } from \"ticket/app/store\";\nimport { useGetAppQuery } from \"api/tickets\";\n\nexport const MessageSection = ({\n control,\n defaultValueContactId,\n backgroundForm,\n stakeholderContacts,\n channel,\n handleSelectedResponse,\n textAreaRef,\n message,\n setMessage,\n}) => {\n const { data: appData } = useGetAppQuery();\n\n return (\n\n <Paper sx={{ ...styles.paper, backgroundColor: backgroundForm }}>\n <Grid container spacing={1}>\n <Grid item xs={6}>\n <Controller\n name=\"to_contact_id\"\n control={control}\n defaultValue={defaultValueContactId}\n render={({ field }) => {\n return (\n <FormControl sx={styles.formControl} size=\"small\">\n <Select\n labelId=\"to_contact_id\"\n fullWidth\n sx={styles.select}\n displayEmpty\n renderValue={(selected) => {\n const contact = stakeholderContacts?.[channel]?.find(\n (contact) => contact.id === selected\n );\n if (!selected || !contact) {\n return <em>To</em>;\n }\n return contact.name;\n }}\n {...field}\n >\n {stakeholderContacts?.[channel]?.map((contact) => (\n <MenuItem key={contact.id} value={contact.id}>\n {contact.name}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n );\n }}\n />\n </Grid>\n <Grid item xs={6}>\n <FormControl sx={styles.formControl} fullWidth size=\"small\">\n <Select\n variant=\"outlined\"\n sx={styles.select}\n onChange={handleSelectedResponse}\n displayEmpty\n renderValue={(selected) => {\n const response = appData?.cannedResponsesMap?.[channel]?.find(\n (contact) => contact.id === selected\n );\n if (!selected || !response) {\n return <>Canned Response</>;\n }\n return response.name;\n }}\n >\n {appData?.cannedResponsesMap?.[channel]?.map((response) => (\n <MenuItem key={response.id} value={response.id}>\n {response.name}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n </Grid>\n\n {/* Message */}\n <Grid item xs={12} sx={styles.gridItemMessage}>\n <TextField\n value={message}\n onChange={(e) => setMessage(e.target.value)}\n multiline\n maxRows={8}\n fullWidth\n InputProps={{ sx: styles.inputProps }}\n sx={styles.messageField}\n inputRef={textAreaRef}\n />\n </Grid>\n </Grid>\n </Paper>\n\n );\n};\nexport const ActionSection = ({ control, closeDrawer, handleFileUpload }) => {\n const [open, setOpen] = useState(false);\n const [files, setFiles] = useState([]);\n\n // Callback for handling file drops/uploads\n const onDrop = useCallback(\n (acceptedFiles) => {\n const newFiles = acceptedFiles.map((file) => ({\n file,\n name: file.name, // Store the file name\n }));\n setFiles((prevFiles) => [...prevFiles, ...newFiles]); // Update state with new files\n handleFileUpload(acceptedFiles);\n },\n [handleFileUpload]\n );\n\n const removeFile = (fileName) => {\n setFiles((currentFiles) =>\n currentFiles.filter((file) => file.name !== fileName)\n );\n };\n\n const { getRootProps, getInputProps } = useDropzone({ onDrop });\n\n return (\n <>\n <IconButton\n size=\"large\"\n sx={{\n position: \"absolute\",\n top: \"10px\",\n right: \"8px\",\n color: \"#fff\",\n p: 0,\n }}\n onClick={closeDrawer}\n >\n <CloseIcon sx={{ fontSize: \"20px\" }} />\n </IconButton>\n {/* Set Reminder */}\n <TextSmall sx={{ color: '#A9B2BD', }}>Set Reminder</TextSmall>\n <Controller\n name=\"new_reminder_on\"\n control={control}\n render={({ field }) => (\n <ResponseFormDatePicker\n open={open}\n setOpen={setOpen}\n control={control}\n field={field}\n />\n )}\n />\n\n {/* Dropzone for file uploads */}\n <Box {...getRootProps({ sx: styles.dropzone })}>\n <input {...getInputProps()} />\n <Button\n variant=\"contained\"\n component=\"span\"\n color=\"info\"\n fullWidth\n sx={{ maxHeight: '24px' }}\n >\n Attach File\n </Button>\n </Box>\n\n {/* File Names Display with Remove Option */}\n {files.length > 0 && (\n <Box\n sx={{\n marginTop: \"10px\",\n \"& *\": {\n cursor: \"pointer\",\n color: \"#fff\",\n fontSize: \"12px\",\n },\n }}\n >\n <Typography>Uploaded Files:</Typography>\n {files.map((file, index) => (\n <Box\n key={index}\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 1,\n }}\n >\n <Typography sx={{ color: \"#3BAFDA\" }}>{file.name}</Typography>\n <IconButton onClick={() => removeFile(file.name)} size=\"small\">\n <DeleteIcon />\n </IconButton>\n </Box>\n ))}\n </Box>\n )}\n </>\n );\n};\n","import CloseIcon from \"@mui/icons-material/Close\";\nimport { Box, Button, IconButton, Stack } from \"@mui/material\";\nimport { prepareCannedResponse } from \"hooks/useCannedResponses\";\nimport { useFetch } from \"hooks/useFetch\";\nimport getType from \"service/forms\";\nimport { useFormServiceActionMutation } from \"../../api/services\";\nimport FormSkeleton from \"./common/FormSkeleton\";\n\nexport const TaggingForm = ({ formUrl, onClose, reply }) => {\n const [formData, setFormData, formLoaded] = useFetch(formUrl, {\n credentials: \"same-origin\",\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n });\n\n const [submitForm, submitFormResult] = useFormServiceActionMutation();\n\n const { isError: isSubmitError, isLoading: isSubmittting } = submitFormResult;\n\n const FormType = formData ? getType(formData?.type) : null;\n let formSubmitText: any;\n if (formData) {\n formSubmitText = formData?.formSubmitText ? formData.formSubmitText : \"Submit\";\n } else {\n formSubmitText = \"Submit\";\n }\n const showForm = formLoaded && FormType;\n\n const updateForm = (newFormArgs) => {\n setFormData((prevData) => {\n return {\n ...prevData,\n form: {\n ...prevData.form,\n ...newFormArgs,\n },\n };\n });\n };\n\n const submitHandler = () => {\n let hasError = false;\n\n if (hasError) return;\n\n submitForm({\n url: formUrl,\n body: prepareCannedResponse({\n form: {\n ...formData.form,\n },\n }),\n })\n .unwrap()\n .then(({ data }) => setFormData(data))\n .then(() => onClose())\n .catch(({ data }) => setFormData(data));\n };\n\n return (\n <>\n <Box\n sx={{\n display: \"flex\",\n justifyContent: \"end\",\n position: \"absolute\",\n top: 0,\n right: 1,\n }}\n >\n <IconButton size=\"large\" onClick={onClose}>\n <CloseIcon sx={{ fontSize: \"30px\" }} />\n </IconButton>\n </Box>\n\n {showForm ? (\n <>\n <FormType\n {...formData}\n replyVisitFailure={reply}\n onSetForm={updateForm}\n />\n <Stack\n direction=\"row\"\n justifyContent=\"flex-end\"\n alignItems=\"center\"\n spacing={1}\n sx={{ width: \"100%\", pt: 1 }}\n >\n <Box sx={{ flex: 1 }} />\n <Button\n variant=\"outlined\"\n color=\"info\"\n onClick={() => onClose()}\n sx={{ fontSize: \"12px\", width: \"200px\" }}\n >\n Cancel\n </Button>\n <Box>\n <Button\n type=\"submit\"\n variant=\"contained\"\n disabled={isSubmittting}\n onClick={submitHandler}\n color={isSubmitError ? \"error\" : \"success\"}\n sx={{ fontSize: \"12px\", width: \"200px\" }}\n >\n {formSubmitText}\n </Button>\n </Box>\n </Stack>\n </>\n ) : (\n <FormSkeleton />\n )}\n </>\n );\n};\n","// FailedVisitReportLog.tsx\nimport { Chip, Box, Typography } from \"@mui/material\";\n// import { flatMap } from \"lodash\";\n// import { useTicket } from \"ticket/selectors\";\nimport ReportVisitFailureCardTable from \"service/report-request-box/ReportVisitFailureCardTable\";\nimport { formatDate } from \"sharedUtils\";\nimport ReportLogLayout from './ReportLogLayout';\n\nconst FailedVisitReportLog = ({ request: report }) => {\n // const { stakeholderContacts } = useTicket() || {};\n const { notes } = report?.data || {};\n\n // // Get all stakeholders\n // const allStakeholders = flatMap(stakeholderContacts || [], (x) => x);\n\n // // Find who inputted the request\n // const inputtedBy = allStakeholders?.find(\n // (x) => x.id === report?.metadata?.inputtedById\n // );\n\n const isVendorFeedback = report?.name.includes(\"VendorFeedback\");\n const isClientFeedback = report?.name.includes(\"ClientFeedback\");\n\n const logHeader = isVendorFeedback || isClientFeedback ? (\n <>\n Update for failed visit report  \n <Chip size=\"xsmall\" color=\"info\" label={formatDate(report?.data?.failureDate)} />\n </>\n ) : (\n <>\n Failed visit report sent  \n <Chip size=\"xsmall\" color=\"error\" label={formatDate(report?.data?.failureDate)} />\n </>\n\n );\n\n const logContent = (\n <>\n <ReportVisitFailureCardTable report={report.data} />\n </>\n );\n\n return (\n <ReportLogLayout logHeader={logHeader} logContent={logContent} notes={notes} object={report} createdAt={report?.createdAt }/>\n );\n};\n\nexport default FailedVisitReportLog;\n","import 'react-confirm-alert/src/react-confirm-alert.css';\n\nimport { ModalBox, RadioInput, SelectWithOtherInput, TextInput, YesNoInput } from 'auditComponents';\nimport dotProp from 'dot-prop-immutable';\nimport React, { useState } from 'react';\nimport { useReducer } from 'react';\nimport { connect } from 'react-redux';\nimport { Redirect, Route, Switch, useHistory } from 'react-router-dom';\n\nimport { selectWasteProductionAreasState } from '../Sec2WasteProductionAreas';\nimport { updateWasteProductionAreaData } from './operations';\n\nconst AREA_TYPES_LABEL_OPTIONS = [\n \"GP Consulting Room\",\n \"Nurses Consulting Room\",\n \"Multifunctional Treatment Room\",\n \"Pharmacy Dispensary\"\n].map((str) => ({ label: str, value: str }));\n\nconst PROCESS_DESCRIPTION_OPTIONS = _.map([\n 'Pharmacy Activity',\n 'Primary care Activity',\n 'Dental Activity',\n 'Acute Care Activity',\n 'Laboratory Activity',\n 'Veterinary Activity',\n], (x) => { return { value: x, label: x} } )\n\n\nconst isWPAComplete = (areaData) => {\n\n\n return _.every([\n 'isAreaIncludedInAudit',\n 'processDescription',\n 'areaName',\n 'areaType'\n ], (attr) => _.isPresent(areaData[attr]))\n\n}\n\n\nconst InternalEditWasteProductionAreaModal = (props) => {\n const history = useHistory();\n const goToPath = (path) => history.push(`${match.url}${path}`);\n\n const { match, onDelete, onClose } = props;\n\n // Setting up validations\n const {\n areaData,\n areaData: { isAreaIncludedInAudit, areaName, processDescription, areaType },\n } = props;\n\n // Build up props\n let modalProps = {\n ...props,\n areaData,\n onClose: () => {\n if (!isWPAComplete(areaData)) {\n onDelete();\n }\n onClose();\n },\n };\n\n return (\n <Switch>\n <Route exact path={`${match.url}`}>\n <Redirect to={`${match.url}/page1`} />\n </Route>\n <Route exact path={`${match.url}/`}>\n <Redirect to={`${match.url}/page1`} />\n </Route>\n\n <Route path={`${match.url}/page1`}>\n <EditWPAPage1\n onBack={props.onClose}\n onNext={() => goToPath(\"/page2\")}\n {...modalProps}\n />\n </Route>\n <Route path={`${match.url}/page2`}>\n <EditWPAPage2\n onBack={() => goToPath(\"/page1\")}\n onDone={props.onClose}\n {...modalProps}\n />\n </Route>\n </Switch>\n );\n};\n\nconst EditWPAPage1 = ({\n onChange,\n areaData,\n onClose,\n onNext,\n areaId,\n}) => {\n return (\n <ModalBox\n title=\"Provide details about the waste production area\"\n onClose={onClose}\n onNext={onNext}\n buttonsDisabled={!(areaData.areaType && areaData.areaName)}\n >\n <RadioInput\n onSelect={onChange}\n label=\"Select Area Type\"\n selectedValue={areaData.areaType}\n name=\"areaType\"\n options={AREA_TYPES_LABEL_OPTIONS}\n />\n\n <TextInput\n name=\"areaName\"\n value={areaData.areaName}\n label=\"What is the name of the area?\"\n onChange={onChange}\n placeholder=\"\"\n />\n </ModalBox>\n );\n};\n\nconst EditWPAPage2 = ({\n onChange,\n areaData,\n onClose,\n}) => {\n\n return (\n <ModalBox\n title=\"Provide details about the waste production area\"\n onClose={onClose}\n onDone={onClose}\n buttonsDisabled={!(_.isPresent(areaData.processDescription) && _.isPresent(areaData.isAreaIncludedInAudit))}\n >\n\n <SelectWithOtherInput\n name=\"processDescription\"\n value={areaData.processDescription}\n placeholder=\"Select the activity\"\n onChange={onChange}\n label='Select the waste producing clinical activity'\n blankValue={true}\n isSearchable={false}\n subtext='This relates to the general NHS activity that generates waste. You do NOT need to specify the waste type, storage type or waste disposal process.'\n otherPlaceholder=\"Please describe the clinical activty that produces waste\"\n options={PROCESS_DESCRIPTION_OPTIONS}\n />\n\n <YesNoInput\n name=\"isAreaIncludedInAudit\"\n value={areaData.isAreaIncludedInAudit}\n label={\"Area included in this Audit\"}\n onChange={onChange}\n />\n </ModalBox>\n );\n};\n\nconst mapStateToProps = (state, { id, sectionId, areaId }) => {\n return {\n areaData: selectWasteProductionAreasState(state)[areaId],\n };\n};\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {\n onChange: (value, name) => {\n dispatch(\n updateWasteProductionAreaData(\n ownProps.areaId,\n dotProp.set({}, name, value)\n )\n );\n },\n };\n};\n\nexport const EditWasteProductionAreaModal = connect(\n mapStateToProps,\n mapDispatchToProps\n)(InternalEditWasteProductionAreaModal);\n","import 'react-confirm-alert/src/react-confirm-alert.css';\n\nimport { faEdit, faEllipsisV, faTrash } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport dotProp from 'dot-prop-immutable';\nimport React, { useMemo, useState } from 'react';\nimport { useReducer } from 'react';\nimport Dropdown from 'react-bootstrap4/Dropdown';\nimport { connect } from 'react-redux';\nimport { Switch, useHistory } from 'react-router-dom';\nimport { ModalRoute } from 'react-router-modal';\n\nimport { EditWasteProductionAreaModal } from './EditWasteProductionAreaModal';\nimport { deleteWasteProductionArea, updateWasteProductionAreaData } from './operations';\n\n// The forwardRef is important!!\n// Dropdown needs access to the DOM node in order to position the Menu\nconst CustomToggle = React.forwardRef(({ children, onClick }, ref) => (\n <div\n style={{ cursor: \"pointer\" }}\n ref={ref}\n className=\"p-2\"\n onClick={(e) => {\n onClick(e);\n }}\n >\n {children}\n </div>\n));\n\nconst d = dotProp;\n\nconst WasteProductionArea = ({ match, ...areaData }) => {\n const {\n // we start with\n areaId,\n isAreaIncludedInAudit,\n areaName,\n areaType,\n processDescription,\n onChange,\n onDelete,\n } = areaData;\n\n const history = useHistory();\n const onCloseModal = () => history.push(match.url);\n\n return (\n <div\n style={{\n border: \"1px solid #D1D1D1\",\n marginBottom: \"0.7rem\",\n borderRadius: \"6px\",\n }}\n >\n <Switch>\n <ModalRoute\n path={`${match.url}/${areaId}/edit`}\n onBackdropClick={(e) => {\n // NOTE: prevent closing the modal and bypassing validations\n e.preventDefault();\n }}\n component={EditWasteProductionAreaModal}\n props={{ onDelete: onDelete, areaId: areaId, onClose: onCloseModal }}\n parentPath={match.url}\n className=\"an-modal-lg react-router-modal__modal\"\n ></ModalRoute>\n </Switch>\n\n <div\n className=\"p-3 d-flex justify-content-between align-items-center\"\n style={{ borderBottom: \"1px solid #d1d1d1\" }}\n >\n <h4 className=\"d-flex flex-grow-1\">\n <div className=\"px-2\" style={{ width: \"45%\" }}>\n {areaName} - {areaType}\n </div>\n <div className=\"px-2\" style={{ width: \"45%\" }}>\n {processDescription}\n </div>\n <div className=\"px-2\" style={{ width: \"10%\" }}>\n {isAreaIncludedInAudit}\n </div>\n </h4>\n\n <div>\n <Dropdown>\n <Dropdown.Toggle as={CustomToggle} id=\"dropdown-custom-components\">\n <FontAwesomeIcon size=\"2x\" icon={faEllipsisV} />\n </Dropdown.Toggle>\n\n <Dropdown.Menu>\n <Dropdown.Item\n onSelect={() => history.push(`${match.url}/${areaId}/edit`)}\n >\n <FontAwesomeIcon icon={faEdit} /> Edit Area\n </Dropdown.Item>\n <Dropdown.Item onSelect={onDelete} className=\"text-danger\">\n <FontAwesomeIcon icon={faTrash} /> Delete Area\n </Dropdown.Item>\n </Dropdown.Menu>\n </Dropdown>\n </div>\n </div>\n </div>\n );\n};\n\nconst mapStateToProps = (state, { id, sectionId }) => {\n return {};\n};\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {\n onDelete: () => dispatch(deleteWasteProductionArea(ownProps.areaId)),\n onChange: (value, name) => {\n dispatch(\n updateWasteProductionAreaData(ownProps.areaId, d.set({}, name, value))\n );\n },\n };\n};\n\nconst ConnectedWasteProductionArea = connect(\n mapStateToProps,\n mapDispatchToProps\n)(WasteProductionArea);\n\nexport default ConnectedWasteProductionArea;\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n","/**\r\n */\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { color } from \"../utils/Color\";\n/**\r\n * Defines a class that holds default properties for new SVG elements\r\n */\nvar SVGDefaults = /** @class */function () {\n function SVGDefaults() {}\n SVGDefaults.opacity = 1;\n SVGDefaults.strokeOpacity = 1;\n SVGDefaults.strokeWidth = 1;\n SVGDefaults.fillOpacity = 1;\n SVGDefaults.fill = color(\"#000000\");\n SVGDefaults.stroke = color(\"#000000\");\n SVGDefaults.focusable = undefined;\n SVGDefaults.tabindex = 0;\n return SVGDefaults;\n}();\nexport { SVGDefaults };","import * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { AMElement } from \"./AMElement\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates an SVG `<g>` element.\r\n *\r\n * SVG groups are used for elements that need more elements just one.\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Element/g} About `<g>` element\r\n */\nvar Group = /** @class */function (_super) {\n tslib_1.__extends(Group, _super);\n /**\r\n * Constructor.\r\n *\r\n * @param elementName Element type (should be \"g\")\r\n */\n function Group(elementName) {\n return _super.call(this, elementName) || this;\n }\n /**\r\n * Adds an element to group.\r\n *\r\n * This will manipulate DOM. `element` will be physically moved into group.\r\n *\r\n * @param element Element\r\n */\n Group.prototype.add = function (element) {\n if (element) {\n this.node.appendChild(element.node);\n }\n };\n /**\r\n * Adds an element to group.\r\n *\r\n * This will manipulate DOM. `element` will be physically moved into group.\r\n *\r\n * @param element Element\r\n */\n Group.prototype.addToBack = function (element) {\n if (element) {\n var first = this.node.childNodes[0];\n if (first) {\n if (first != element.node) {\n this.node.insertBefore(element.node, first);\n }\n } else {\n this.node.appendChild(element.node);\n }\n }\n };\n /**\r\n * Removes the `element` from group.\r\n *\r\n * Please note that this will not dispose the element itself, it will just\r\n * remove it from the group.\r\n *\r\n * @param element Element\r\n */\n Group.prototype.removeElement = function (element) {\n // todo: not sure about the speed, need to investigate, maybe it's faster to check if node is a child\n if (element) {\n try {\n if (element.node && element.node.parentNode == this.node) {\n this.node.removeChild(element.node);\n }\n } catch (err) {}\n }\n };\n /**\r\n * Checks if this group already has the child element added\r\n *\r\n * @param element\r\n * @return {boolean}\r\n */\n Group.prototype.hasChild = function (element) {\n for (var i = 0; i < this.node.childNodes.length; i++) {\n if (this.node.childNodes[i] == element.node) {\n return true;\n }\n }\n return false;\n };\n Object.defineProperty(Group.prototype, \"content\", {\n /**\r\n * @return SVG markup\r\n */\n get: function get() {\n return this.node.innerHTML;\n },\n /**\r\n * Content of the group element.\r\n *\r\n * Can be used to add a lot of proprietary SVG markup into group.\r\n *\r\n * @param value SVG markup\r\n */\n set: function set(value) {\n this.node.innerHTML = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Removes all children from the group.\r\n */\n Group.prototype.removeChildren = function () {\n if (this.node.childNodes) {\n while (this.node.childNodes.length > 0) {\n var childNode = this.node.firstChild;\n if (childNode && childNode.parentNode) {\n childNode.parentNode.removeChild(childNode);\n }\n }\n }\n };\n return Group;\n}(AMElement);\nexport { Group };","/**\r\n * Interaction Object module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { InteractionObjectEventDispatcher } from \"./InteractionObjectEvents\";\nimport { BaseObjectEvents } from \"../Base\";\nimport { List } from \"../utils/List\";\nimport { Dictionary, DictionaryDisposer } from \"../utils/Dictionary\";\nimport { getInteraction } from \"./Interaction\";\nimport * as $type from \"../utils/Type\";\n/**\r\n * Re-exports\r\n */\nexport { InteractionObjectEventDispatcher };\n/**\r\n * Interaction object represents an object that is subject for any kind of\r\n * interaction with it with any input devices: mouse, touch or keyboard.\r\n *\r\n * Any DOM element can be wrapped into an Internaction object which in turn\r\n * enables attaching various interaction events to it, such as: hit, drag,\r\n * swipe, etc.\r\n *\r\n * To create an [[InteractionObject]] out of a [[Sprite]], use:\r\n * `interaction.getInteractionFromSprite(sprite: Sprite)`\r\n *\r\n * To create an [[InteractionObject]] out of a a regular element:\r\n * `interaction.getInteraction(element: HTMLElement)`\r\n */\nvar InteractionObject = /** @class */function (_super) {\n tslib_1.__extends(InteractionObject, _super);\n /**\r\n * Constructor\r\n */\n function InteractionObject(element) {\n var _this = _super.call(this) || this;\n /**\r\n * An [[EventDispatcher]] instance which holds events for this object\r\n */\n _this.events = new InteractionObjectEventDispatcher(_this);\n /**\r\n * Collection of Disposers for various events. (so that those get disposed\r\n * when the whole InteractionObject is disposed)\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this.eventDisposers = new Dictionary();\n /**\r\n * A [[Dictionary]] that holds temporarily replaced original style values for\r\n * HTML element, so that they can be restored when the functionality that\r\n * replaced them is done.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this.replacedStyles = new Dictionary();\n _this._clickable = false;\n _this._contextMenuDisabled = false;\n _this._hoverable = false;\n _this._trackable = false;\n _this._draggable = false;\n _this._swipeable = false;\n _this._resizable = false;\n _this._wheelable = false;\n _this._inert = false;\n /**\r\n * Is element currently hovered?\r\n */\n _this._isHover = false;\n /**\r\n * Is the element hovered by touch pointer?\r\n */\n _this._isHoverByTouch = false;\n /**\r\n * Has element got any pointers currently pressing down on it?\r\n */\n _this._isDown = false;\n /**\r\n * Does element have focus?\r\n */\n _this._isFocused = false;\n /**\r\n * Is element currently protected from touch interactions?\r\n */\n _this._isTouchProtected = false;\n /**\r\n * Options used for inertia functionality.\r\n */\n _this._inertiaOptions = new Dictionary();\n /**\r\n * A collection of different inertia types, currently playing out.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this.inertias = new Dictionary();\n /**\r\n * Click/tap options.\r\n */\n _this._hitOptions = {};\n /**\r\n * Hover options.\r\n */\n _this._hoverOptions = {};\n /**\r\n * Swipe gesture options.\r\n */\n _this._swipeOptions = {};\n /**\r\n * Keyboard options.\r\n */\n _this._keyboardOptions = {};\n /**\r\n * Cursor options.\r\n */\n _this._cursorOptions = {\n \"defaultStyle\": [{\n \"property\": \"cursor\",\n \"value\": \"default\"\n }]\n };\n _this._element = element;\n _this.className = \"InteractionObject\";\n _this._disposers.push(new DictionaryDisposer(_this.inertias));\n _this._disposers.push(new DictionaryDisposer(_this.eventDisposers));\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(InteractionObject.prototype, \"isHover\", {\n /**\r\n * @return Hovered?\r\n */\n get: function get() {\n return this._isHover;\n },\n /**\r\n * Indicates if this element is currently hovered.\r\n *\r\n * @param value Hovered?\r\n */\n set: function set(value) {\n if (this.isHover != value) {\n this._isHover = value;\n if (value) {\n getInteraction().overObjects.moveValue(this);\n } else {\n getInteraction().overObjects.removeValue(this);\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"isHoverByTouch\", {\n /**\r\n * @return Hovered?\r\n */\n get: function get() {\n return this._isHoverByTouch;\n },\n /**\r\n * Indicates if this element is currently hovered.\r\n *\r\n * @param value Hovered?\r\n */\n set: function set(value) {\n if (this.isHoverByTouch != value) {\n this._isHoverByTouch = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"overPointers\", {\n /**\r\n * A list of pointers currently over the element.\r\n *\r\n * @see {@link Pointer}\r\n * @return List if pointers currently hovering the element\r\n */\n get: function get() {\n if (!this._overPointers) {\n this._overPointers = new List();\n }\n return this._overPointers;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"isDown\", {\n /**\r\n * @return Has down pointers?\r\n */\n get: function get() {\n return this._isDown;\n },\n /**\r\n * Indicates if this element has currently any pointers pressing on it.\r\n *\r\n * @param value Has down pointers?\r\n */\n set: function set(value) {\n if (this.isDown != value) {\n this._isDown = value;\n if (value) {\n getInteraction().downObjects.moveValue(this);\n } else {\n getInteraction().downObjects.removeValue(this);\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"downPointers\", {\n /**\r\n * A list of pointers currently pressing down on this element.\r\n *\r\n * @see {@link Pointer}\r\n * @return List of down pointers\r\n */\n get: function get() {\n if (!this._downPointers) {\n this._downPointers = new List();\n }\n return this._downPointers;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"isFocused\", {\n /**\r\n * @return Focused?\r\n */\n get: function get() {\n return this._isFocused;\n },\n /**\r\n * Indicates if this element is currently focused.\r\n *\r\n * @param value Focused?\r\n */\n set: function set(value) {\n if (this.isFocused != value) {\n this._isFocused = value;\n if (value) {\n getInteraction().focusedObject = this;\n } else {\n getInteraction().focusedObject = undefined;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"isTouchProtected\", {\n /**\r\n * @ignore\r\n * @return Touch protected?\r\n */\n get: function get() {\n return this._isTouchProtected;\n },\n /**\r\n * Indicates if this element is currently being protected from touch actions.\r\n *\r\n * @ignore\r\n * @param value Touch protected?\r\n */\n set: function set(value) {\n if (this._isTouchProtected != value) {\n this._isTouchProtected = value;\n if (value) {\n getInteraction().unprepElement(this);\n } else if (this.draggable || this.swipeable || this.trackable || this.resizable) {\n getInteraction().prepElement(this);\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"clickable\", {\n /**\r\n * @return Clickable?\r\n */\n get: function get() {\n return this._clickable;\n },\n /**\r\n * Is element clickable? Clickable elements will generate \"hit\" events when\r\n * clicked or tapped.\r\n *\r\n * @param value Clickable?\r\n */\n set: function set(value) {\n if (this._clickable !== value) {\n this._clickable = value;\n getInteraction().processClickable(this);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"contextMenuDisabled\", {\n /**\r\n * @return Context menu disabled?\r\n */\n get: function get() {\n return this._contextMenuDisabled;\n },\n /**\r\n * Should element prevent context menu to be displayed, e.g. when\r\n * right-clicked?\r\n *\r\n * @default false\r\n * @param value Context menu disabled?\r\n */\n set: function set(value) {\n if (this._contextMenuDisabled !== value) {\n this._contextMenuDisabled = value;\n getInteraction().processContextMenu(this);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"hoverable\", {\n /**\r\n * @return Hoverable?\r\n */\n get: function get() {\n return this._hoverable;\n },\n /**\r\n * Indicates if element should generate hover events.\r\n *\r\n * @param value Hoverable?\r\n */\n set: function set(value) {\n if (this._hoverable !== value) {\n this._hoverable = value;\n getInteraction().processHoverable(this);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"trackable\", {\n /**\r\n * @return Track pointer?\r\n */\n get: function get() {\n return this._trackable;\n },\n /**\r\n * Indicates if pointer movement over element should be tracked.\r\n *\r\n * @param value Track pointer?\r\n */\n set: function set(value) {\n if (this._trackable !== value) {\n this._trackable = value;\n getInteraction().processTrackable(this);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"draggable\", {\n /**\r\n * @return Draggable?\r\n */\n get: function get() {\n return this._draggable;\n },\n /**\r\n * Indicates if element can be dragged. (moved)\r\n *\r\n * @param value Draggable?\r\n */\n set: function set(value) {\n if (this._draggable !== value) {\n this._draggable = value;\n getInteraction().processDraggable(this);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"swipeable\", {\n /**\r\n * @return Track swipe?\r\n */\n get: function get() {\n return this._swipeable;\n },\n /**\r\n * Indicates whether element should react to swipe gesture.\r\n *\r\n * @param value Track swipe?\r\n */\n set: function set(value) {\n if (this._swipeable !== value) {\n this._swipeable = value;\n getInteraction().processSwipeable(this);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"resizable\", {\n /**\r\n * @return Resizeble?\r\n */\n get: function get() {\n return this._resizable;\n },\n /**\r\n * Indicates if element can be resized.\r\n *\r\n * @param value Resizeable?\r\n */\n set: function set(value) {\n if (this._resizable !== value) {\n this._resizable = value;\n getInteraction().processResizable(this);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"wheelable\", {\n /**\r\n * @return Track wheel?\r\n */\n get: function get() {\n return this._wheelable;\n },\n /**\r\n * Indicates whether track moouse wheel rotation over element.\r\n *\r\n * @param value Track wheel?\r\n */\n set: function set(value) {\n if (this._wheelable !== value) {\n this._wheelable = value;\n getInteraction().processWheelable(this);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"inert\", {\n /**\r\n * @return Inert?\r\n */\n get: function get() {\n return this._inert;\n },\n /**\r\n * Indicates if element is inert, i.e. if it should carry movement momentum\r\n * after it is dragged and released.\r\n *\r\n * @param value Inert?\r\n */\n set: function set(value) {\n if (this._inert !== value) {\n this._inert = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"focusable\", {\n /**\r\n * @return Focusable?\r\n */\n get: function get() {\n return this._focusable;\n },\n /**\r\n * Indicates if element can gain focus.\r\n *\r\n * @param value Focusable?\r\n */\n set: function set(value) {\n if (this._focusable !== value) {\n this._focusable = value;\n if (this._focusable && this.tabindex == -1) {\n this._tabindex = 1;\n }\n getInteraction().processFocusable(this);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"tabindex\", {\n /**\r\n * @return Tab index\r\n */\n get: function get() {\n return $type.getValueDefault(this._tabindex, -1);\n },\n /**\r\n * Element's tab index.\r\n *\r\n * @param value Tab index\r\n */\n set: function set(value) {\n if (this._tabindex !== value) {\n this._tabindex = value;\n if (value > -1) {\n this.focusable = true;\n }\n getInteraction().processFocusable(this);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"element\", {\n /**\r\n * @return Element\r\n */\n get: function get() {\n return this._element;\n },\n /**\r\n * A DOM element associated with this element.\r\n *\r\n * @param element Element\r\n */\n set: function set(element) {\n this._element = element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"originalPosition\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Position.\r\n */\n get: function get() {\n return this._originalPosition || {\n x: 0,\n y: 0\n };\n },\n /**\r\n * Element's original position.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Position\r\n */\n set: function set(value) {\n this._originalPosition = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"originalScale\", {\n /**\r\n * @return Scale\r\n */\n get: function get() {\n return $type.getValueDefault(this._originalScale, 1);\n },\n /**\r\n * Element's original scale.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Scale\r\n */\n set: function set(value) {\n if (this._originalScale !== value) {\n this._originalScale = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"originalAngle\", {\n /**\r\n * @return Angle\r\n */\n get: function get() {\n return $type.getValueDefault(this._originalAngle, 0);\n },\n /**\r\n * Element's original angle.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Angle\r\n */\n set: function set(value) {\n if (this._originalAngle !== value) {\n this._originalAngle = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"inertiaOptions\", {\n /**\r\n * @return Options\r\n */\n get: function get() {\n if (this.sprite) {\n return this.sprite.adapter.apply(\"inertiaOptions\", this._inertiaOptions);\n } else {\n return this._inertiaOptions;\n }\n },\n /**\r\n * Inertia options.\r\n *\r\n * @param value Options\r\n */\n set: function set(value) {\n this._inertiaOptions = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"hitOptions\", {\n /**\r\n * @return Options\r\n */\n get: function get() {\n if (this.sprite) {\n return this.sprite.adapter.apply(\"hitOptions\", this._hitOptions);\n } else {\n return this._hitOptions;\n }\n },\n /**\r\n * Hit options.\r\n *\r\n * @param value Options\r\n */\n set: function set(value) {\n this._hitOptions = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"hoverOptions\", {\n /**\r\n * @return Options\r\n */\n get: function get() {\n if (this.sprite) {\n return this.sprite.adapter.apply(\"hoverOptions\", this._hoverOptions);\n } else {\n return this._hoverOptions;\n }\n },\n /**\r\n * Hover options.\r\n *\r\n * @param value Options\r\n */\n set: function set(value) {\n this._hoverOptions = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"swipeOptions\", {\n /**\r\n * @return Options\r\n */\n get: function get() {\n if (this.sprite) {\n return this.sprite.adapter.apply(\"swipeOptions\", this._swipeOptions);\n } else {\n return this._swipeOptions;\n }\n },\n /**\r\n * Swipe options.\r\n *\r\n * @param value Options\r\n */\n set: function set(value) {\n this._swipeOptions = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"keyboardOptions\", {\n /**\r\n * @return Options\r\n */\n get: function get() {\n if (this.sprite) {\n return this.sprite.adapter.apply(\"keyboardOptions\", this._keyboardOptions);\n } else {\n return this._keyboardOptions;\n }\n },\n /**\r\n * Keyboard options.\r\n *\r\n * @param value Options\r\n */\n set: function set(value) {\n this._keyboardOptions = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InteractionObject.prototype, \"cursorOptions\", {\n /**\r\n * @return Options\r\n */\n get: function get() {\n if (this.sprite) {\n return this.sprite.adapter.apply(\"cursorOptions\", this._cursorOptions);\n } else {\n return this._cursorOptions;\n }\n },\n /**\r\n * Cursor options.\r\n *\r\n * @param value Options\r\n */\n set: function set(value) {\n this._cursorOptions = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies all properties and related assets from another object of the same\r\n * type.\r\n *\r\n * @param source Source object\r\n */\n InteractionObject.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.inertiaOptions = source.inertiaOptions;\n this.hitOptions = source.hitOptions;\n this.hoverOptions = source.hoverOptions;\n this.swipeOptions = source.swipeOptions;\n this.keyboardOptions = source.keyboardOptions;\n this.cursorOptions = source.cursorOptions;\n this.contextMenuDisabled = source.contextMenuDisabled;\n getInteraction().applyCursorOverStyle(this);\n };\n /**\r\n * @ignore Exclude from docs\r\n */\n InteractionObject.prototype.setEventDisposer = function (key, value, f) {\n var disposer = this.eventDisposers.getKey(key);\n if (value) {\n if (disposer == null) {\n this.eventDisposers.setKey(key, f());\n }\n } else {\n if (disposer != null) {\n disposer.dispose();\n this.eventDisposers.removeKey(key);\n }\n }\n };\n /**\r\n * Disposes object.\r\n */\n InteractionObject.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n // Remove from all interaction registries\n var interaction = getInteraction();\n interaction.overObjects.removeValue(this);\n interaction.downObjects.removeValue(this);\n interaction.trackedObjects.removeValue(this);\n interaction.transformedObjects.removeValue(this);\n // Unlock document wheel\n if (this.isHover && this.wheelable) {\n interaction.unlockWheel();\n }\n if (interaction.focusedObject === this) {\n interaction.focusedObject = undefined;\n }\n };\n return InteractionObject;\n}(BaseObjectEvents);\nexport { InteractionObject };","/**\r\n * Functionality related simulating of dragging of elements using keyboard.\r\n */\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { getInteraction } from \"./Interaction\";\nimport { system } from \"../System\";\nimport * as $array from \"../utils/Array\";\n/**\r\n * [[InteractionKeyboardObject]] is used to simulate dragging of the `draggable`\r\n * element using keyboard arrows.\r\n *\r\n * @ignore Exclude from docs\r\n */\nvar InteractionKeyboardObject = /** @class */function () {\n /**\r\n * Constructor.\r\n *\r\n * @param io An InteractionObject\r\n */\n function InteractionKeyboardObject(io, ev) {\n /**\r\n * Indicates if this object has already been deleted. Any\r\n * destruction/disposal code should take this into account when deciding\r\n * wheter to run potentially costly disposal operations if they already have\r\n * been run.\r\n */\n this._disposed = false;\n /**\r\n * Indicates direction of current horizontal movement.\r\n *\r\n * 0 - not moving horizontally\r\n * 1 - moving right\r\n * -1 - moving left\r\n */\n this.directionX = 0;\n /**\r\n * Indicates direction of current vertical movement.\r\n *\r\n * 0 - not moving vertically\r\n * 1 - moving down\r\n * -1 - moving up\r\n */\n this.directionY = 0;\n this.interaction = io;\n this.keyboardEvent = ev;\n this._startedOn = new Date().getTime();\n getInteraction().processDragStart(io);\n system.animations.push(this);\n this.update();\n }\n /**\r\n * It's an update method which is called by the system if\r\n * [[InteractionObject]] is used as animation.\r\n *\r\n * This will update coordinates of the element based on the movement\r\n * directions.\r\n */\n InteractionKeyboardObject.prototype.update = function () {\n // Init and get settings\n var io = this.interaction;\n var speed = getInteraction().getKeyboardOption(io, \"speed\"),\n accelleration = getInteraction().getKeyboardOption(io, \"accelleration\"),\n accellerationDelay = getInteraction().getKeyboardOption(io, \"accellerationDelay\"),\n shift = {\n x: 0,\n y: 0\n };\n // If SHIFT key is pressed we slash speed by half and disable accelleration\n if (this.keyboardEvent.shiftKey) {\n speed *= 0.5;\n accelleration = 1;\n }\n // If CTRL is pressed we increase speed by x2\n else if (this.keyboardEvent.ctrlKey) {\n speed *= 2;\n }\n // Get elapsed time\n var ms = new Date().getTime() - this._startedOn;\n var accelleratedMs = ms - accellerationDelay;\n // Add accellerated movement\n if (accelleration > 0 && accelleratedMs > 0) {\n var accellerationFactor = ms / accellerationDelay;\n ms = accellerationDelay;\n shift.x += this.directionX * (speed * accelleration * accellerationFactor * accelleratedMs);\n shift.y += this.directionY * (speed * accelleration * accellerationFactor * accelleratedMs);\n }\n // Calculate position\n shift.x += this.directionX * (speed * ms);\n shift.y += this.directionY * (speed * ms);\n // Simulate move on Interaction\n getInteraction().handleTransformMove(io, shift, {\n x: 0,\n y: 0\n }, this.keyboardEvent, true, false);\n };\n /**\r\n * Returns if this object has been already been disposed.\r\n *\r\n * @return Is disposed?\r\n */\n InteractionKeyboardObject.prototype.isDisposed = function () {\n return this._disposed;\n };\n /**\r\n * Disposes this object. Removes from system animations.\r\n */\n InteractionKeyboardObject.prototype.dispose = function () {\n if (!this._disposed) {\n getInteraction().processDragStop(this.interaction);\n $array.remove(system.animations, this);\n }\n };\n return InteractionKeyboardObject;\n}();\nexport { InteractionKeyboardObject };","/**\r\n * Functionality related to inertia\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObject } from \"../Base\";\nimport { getInteraction } from \"./Interaction\";\nimport { AnimationDisposer } from \"../utils/Animation\";\nimport * as $type from \"../utils/Type\";\n/**\r\n * A point of inertia is to simulate gradually drecreasing motion even after\r\n * actual interaction by user, that caused it, has already ended.\r\n *\r\n * [[Inertia]] object will continue triggering the same [[Sprite]] handlers\r\n * as if the interaction was still happening, gradually reducing\r\n * shift/angle/scale values until full stop.\r\n *\r\n * Basically, from the target element's point of view, while inertia is\r\n * playing, it is still being interacted with by user, albeit with a\r\n * decreasing speed.\r\n */\nvar Inertia = /** @class */function (_super) {\n tslib_1.__extends(Inertia, _super);\n /**\r\n * Constructor\r\n */\n function Inertia(interaction, type, point, startPoint) {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * List of animations currently playing.\r\n */\n _this.animations = [];\n _this.className = \"Inertia\";\n _this.interaction = interaction;\n _this.type = type;\n _this.point = point;\n _this.startPoint = startPoint;\n // Make animations disposable\n _this._disposers.push(new AnimationDisposer(_this.animations));\n return _this;\n }\n Object.defineProperty(Inertia.prototype, \"x\", {\n /**\r\n * Returns current X coordinate.\r\n *\r\n * @return X\r\n */\n get: function get() {\n return this.point.x;\n },\n /**\r\n * Sets current X coordinate.\r\n *\r\n * Will trigger \"drag\" event for the target element.\r\n *\r\n * @param value X\r\n */\n set: function set(value) {\n if ($type.isNumber(value)) {\n this.point.x = value;\n this.handleMove();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Inertia.prototype, \"y\", {\n /**\r\n * Returns current Y coordinate.\r\n *\r\n * @return Y\r\n */\n get: function get() {\n return this.point.y;\n },\n /**\r\n * Sets current Y coordinate.\r\n *\r\n * Will trigger \"drag\" event for the target element.\r\n *\r\n * @param value Y\r\n */\n set: function set(value) {\n if ($type.isNumber(value)) {\n this.point.y = value;\n this.handleMove();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Simulates dragging of element.\r\n */\n Inertia.prototype.handleMove = function () {\n // Prepare {InteractionEvent} object\n if (this.interaction.events.isEnabled(\"drag\")) {\n var imev = {\n type: \"drag\",\n target: this.interaction,\n shift: {\n x: this.x - this.startPoint.x,\n y: this.y - this.startPoint.y\n },\n startPoint: this.startPoint,\n point: {\n x: this.x,\n y: this.y\n },\n touch: false\n };\n // Call handler\n this.interaction.events.dispatchImmediately(\"drag\", imev);\n }\n };\n /**\r\n * Finishes up the inertia animation. (removes reference to this animation\r\n * object)\r\n */\n Inertia.prototype.done = function () {\n // Remove inertia animation from the object\n this.interaction.inertias.removeKey(this.type);\n // Move ended\n if (this.type === \"move\") {\n getInteraction().processDragStop(this.interaction);\n }\n // Destroy\n this.dispose();\n };\n return Inertia;\n}(BaseObject);\nexport { Inertia };","/**\r\n * Number formatting-related functionality.\r\n */\nimport * as tslib_1 from \"tslib\";\nimport { Language } from \"../utils/Language\";\nimport { BaseObject } from \"../Base\";\nimport { getTextFormatter } from \"../formatters/TextFormatter\";\nimport { registry } from \"../Registry\";\nimport * as $strings from \"../utils/Strings\";\nimport * as $object from \"../utils/Object\";\nimport * as $utils from \"../utils/Utils\";\nimport * as $type from \"../utils/Type\";\n/**\r\n * NumberFormatter class. Formats numbers according to specified formats.\r\n *\r\n * @todo Apply translations to suffixes/prefixes\r\n */\nvar NumberFormatter = /** @class */function (_super) {\n tslib_1.__extends(NumberFormatter, _super);\n /**\r\n * Constructor\r\n */\n function NumberFormatter() {\n var _this = _super.call(this) || this;\n /**\r\n * A base value for negative numbers. Will treat all numbers below this value\r\n * as negative numbers.\r\n */\n _this._negativeBase = 0;\n /**\r\n * Holds number format.\r\n *\r\n * @default #,###.#####\r\n */\n _this._numberFormat = \"#,###.#####\";\n /**\r\n * Output format to produce. If the format calls for applying color to the\r\n * formatted value, this setting will determine what markup to use: SVG or\r\n * HTML.\r\n *\r\n * Available options: svg, html.\r\n *\r\n * @default \"svg\"\r\n */\n _this._outputFormat = \"svg\";\n _this.className = \"NumberFormatter\";\n _this.applyTheme();\n return _this;\n }\n NumberFormatter.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n if (this.language) {\n this.language.dispose();\n }\n };\n Object.defineProperty(NumberFormatter.prototype, \"language\", {\n /**\r\n * @return Language\r\n */\n get: function get() {\n if (!this._language) {\n if (this.sprite) {\n this._language = this.sprite.language;\n } else {\n this._language = new Language();\n }\n }\n return this._language;\n },\n /**\r\n * A reference to [[Language]] instance.\r\n *\r\n * Formatter will use language to translate various items, like number\r\n * suffixes, etc.\r\n *\r\n * @param value Language\r\n */\n set: function set(value) {\n this._language = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Formats the number according to specific format.\r\n *\r\n * @param value Value to format\r\n * @param format Format to apply\r\n * @return Formatted number\r\n */\n NumberFormatter.prototype.format = function (value, format) {\n // no format passed in or \"Number\"\n if (typeof format === \"undefined\" || format.toLowerCase() === \"number\") {\n format = this._numberFormat;\n }\n // Clean format\n format = $utils.cleanFormat(format);\n // Get format info (it will also deal with parser caching)\n var info = this.parseFormat(format, this.language);\n // cast to number just in case\n // TODO: maybe use better casting\n var source = Number(value);\n // format and replace the number\n var details;\n if (source > this._negativeBase) {\n details = info.positive;\n } else if (source < this._negativeBase) {\n details = info.negative;\n } else {\n details = info.zero;\n }\n // Format\n var formatted = details.template.split($strings.PLACEHOLDER).join(this.applyFormat(source, details));\n return formatted;\n };\n /**\r\n * Parses supplied format into structured object which can be used to format\r\n * the number.\r\n *\r\n * @param format Format string, i.e. \"#,###.00\"\r\n * @param language Language\r\n */\n NumberFormatter.prototype.parseFormat = function (format, language) {\n var _this = this;\n // Check cache\n var cached = this.getCache(format);\n if ($type.hasValue(cached)) {\n return cached;\n }\n // init format parse info holder\n var info = {\n \"positive\": {\n \"thousands\": {\n \"active\": -1,\n \"passive\": -1,\n \"interval\": -1,\n \"separator\": language.translateEmpty(\"_thousandSeparator\")\n },\n \"decimals\": {\n \"active\": -1,\n \"passive\": -1,\n \"separator\": language.translateEmpty(\"_decimalSeparator\")\n },\n \"template\": \"\",\n \"source\": \"\",\n \"parsed\": false\n },\n \"negative\": {\n \"thousands\": {\n \"active\": -1,\n \"passive\": -1,\n \"interval\": -1,\n \"separator\": language.translateEmpty(\"_thousandSeparator\")\n },\n \"decimals\": {\n \"active\": -1,\n \"passive\": -1,\n \"separator\": language.translateEmpty(\"_decimalSeparator\")\n },\n \"template\": \"\",\n \"source\": \"\",\n \"parsed\": false\n },\n \"zero\": {\n \"thousands\": {\n \"active\": -1,\n \"passive\": -1,\n \"interval\": -1,\n \"separator\": language.translateEmpty(\"_thousandSeparator\")\n },\n \"decimals\": {\n \"active\": -1,\n \"passive\": -1,\n \"separator\": language.translateEmpty(\"_decimalSeparator\")\n },\n \"template\": \"\",\n \"source\": \"\",\n \"parsed\": false\n }\n };\n // Escape double vertical bars (that mean display one vertical bar)\n format = format.replace(\"||\", $strings.PLACEHOLDER2);\n // Split it up and deal with different formats\n var parts = format.split(\"|\");\n info.positive.source = parts[0];\n if (typeof parts[2] === \"undefined\") {\n info.zero = info.positive;\n } else {\n info.zero.source = parts[2];\n }\n if (typeof parts[1] === \"undefined\") {\n info.negative = info.positive;\n } else {\n info.negative.source = parts[1];\n }\n // Parse each\n $object.each(info, function (part, item) {\n // Already parsed\n if (item.parsed) {\n return;\n }\n // Check cached\n if (typeof _this.getCache(item.source) !== \"undefined\") {\n info[part] = _this.getCache(item.source);\n return;\n }\n // Begin parsing\n var partFormat = item.source;\n // Just \"Number\"?\n if (partFormat.toLowerCase() === \"number\") {\n partFormat = _this._numberFormat;\n }\n // Let TextFormatter split into chunks\n var chunks = getTextFormatter().chunk(partFormat, true);\n for (var i = 0; i < chunks.length; i++) {\n var chunk = chunks[i];\n // replace back double vertical bar\n chunk.text = chunk.text.replace($strings.PLACEHOLDER2, \"|\");\n if (chunk.type === \"value\") {\n // Parse format\n // Look for codes\n var matches = chunk.text.match(/[#0.,]+[ ]?[abesABES%]?[abesABES‰]?/);\n if (matches) {\n if (matches === null || matches[0] === \"\") {\n // no codes here - assume string\n // nothing to do here\n item.template += chunk.text;\n } else {\n // look for the format modifiers at the end\n var mods = matches[0].match(/[abesABES%‰]{2}|[abesABES%‰]{1}$/);\n if (mods) {\n item.mod = mods[0].toLowerCase();\n item.modSpacing = matches[0].match(/[ ]{1}[abesABES%‰]{1}$/) ? true : false;\n }\n // break the format up\n var a = matches[0].split(\".\");\n // Deal with thousands\n if (a[0] === \"\") {\n // No directives for thousands\n // Leave default settings (no formatting)\n } else {\n // Counts\n item.thousands.active = (a[0].match(/0/g) || []).length;\n item.thousands.passive = (a[0].match(/\\#/g) || []).length + item.thousands.active;\n // Separator interval\n var b = a[0].split(\",\");\n if (b.length === 1) {\n // No thousands separators\n // Do nothing\n } else {\n // Use length fo the last chunk as thousands length\n item.thousands.interval = $type.getValue(b.pop()).length;\n if (item.thousands.interval === 0) {\n item.thousands.interval = -1;\n }\n }\n }\n // Deal with decimals\n if (typeof a[1] === \"undefined\") {\n // No directives for decimals\n // Leave at defaults (no formatting)\n } else {\n // Counts\n item.decimals.active = (a[1].match(/0/g) || []).length;\n item.decimals.passive = (a[1].match(/\\#/g) || []).length + item.decimals.active;\n }\n // Add special code to template\n item.template += chunk.text.split(matches[0]).join($strings.PLACEHOLDER);\n }\n }\n } else {\n // Quoted string - take it as it is\n item.template += chunk.text;\n }\n }\n // Apply style formatting\n //item.template = getTextFormatter().format(item.template, this.outputFormat);\n // Save cache\n _this.setCache(item.source, item);\n // Mark this as parsed\n item.parsed = true;\n });\n // Save cache (the whole thing)\n this.setCache(format, info);\n return info;\n };\n /**\r\n * Applies parsed format to a numeric value.\r\n *\r\n * @param value Value\r\n * @param details Parsed format as returned by {parseFormat}\r\n * @return Formatted number\r\n */\n NumberFormatter.prototype.applyFormat = function (value, details) {\n // Use absolute values\n var negative = value < 0;\n value = Math.abs(value);\n // Recalculate according to modifier\n var prefix = \"\",\n suffix = \"\";\n var mods = details.mod ? details.mod.split(\"\") : [];\n if (mods.indexOf(\"b\") !== -1) {\n var a_1 = this.applyPrefix(value, this.bytePrefixes);\n value = a_1[0];\n prefix = a_1[1];\n suffix = a_1[2];\n if (details.modSpacing) {\n suffix = \" \" + suffix;\n }\n } else if (mods.indexOf(\"a\") !== -1) {\n var a_2 = this.applyPrefix(value, value < 1.00 ? this.smallNumberPrefixes : this.bigNumberPrefixes);\n value = a_2[0];\n prefix = a_2[1];\n suffix = a_2[2];\n if (details.modSpacing) {\n suffix = \" \" + suffix;\n }\n } else if (mods.indexOf(\"%\") !== -1) {\n value *= 100;\n suffix = \"%\";\n } else if (mods.indexOf(\"‰\") !== -1) {\n value *= 1000;\n suffix = \"‰\";\n }\n // Round to passive\n if (mods.indexOf(\"e\") !== -1) {\n // convert the value to exponential\n var exp = void 0;\n if (details.decimals.passive >= 0) {\n exp = value.toExponential(details.decimals.passive).split(\"e\");\n } else {\n exp = value.toExponential().split(\"e\");\n }\n value = Number(exp[0]);\n suffix = \"e\" + exp[1];\n if (details.modSpacing) {\n suffix = \" \" + suffix;\n }\n } else if (details.decimals.passive === 0) {\n value = Math.round(value);\n } else if (details.decimals.passive > 0) {\n var d = Math.pow(10, details.decimals.passive);\n value = Math.round(value * d) / d;\n }\n // Init return value\n var res = \"\";\n // Calc integer and decimal parts\n var a = $utils.numberToString(value).split(\".\");\n // Format integers\n var ints = a[0];\n // Pad integers to active length\n if (ints.length < details.thousands.active) {\n ints = Array(details.thousands.active - ints.length + 1).join(\"0\") + ints;\n }\n // Insert thousands separators\n if (details.thousands.interval > 0) {\n var ip = [];\n var intsr = ints.split(\"\").reverse().join(\"\");\n for (var i = 0, len = ints.length; i <= len; i += details.thousands.interval) {\n var c = intsr.substr(i, details.thousands.interval).split(\"\").reverse().join(\"\");\n if (c !== \"\") {\n ip.unshift(c);\n }\n }\n ints = ip.join(details.thousands.separator);\n }\n // Add integers\n res += ints;\n // Add decimals\n if (a.length === 1) {\n a.push(\"\");\n }\n var decs = a[1];\n // Fill zeros?\n if (decs.length < details.decimals.active) {\n decs += Array(details.decimals.active - decs.length + 1).join(\"0\");\n }\n if (decs !== \"\") {\n res += details.decimals.separator + decs;\n }\n // Can't have empty return value\n if (res === \"\") {\n res = \"0\";\n }\n // Add minus sign back\n if (value !== 0 && negative && mods.indexOf(\"s\") === -1) {\n res = \"-\" + res;\n }\n // Add suffixes/prefixes\n if (prefix) {\n res = prefix + res;\n }\n if (suffix) {\n res += suffix;\n }\n return res;\n };\n /**\r\n * Chooses appropriate prefix and suffix based on the passed in rules.\r\n *\r\n * @param value Value\r\n * @param prefixes Prefix array\r\n * @return Result\r\n */\n NumberFormatter.prototype.applyPrefix = function (value, prefixes) {\n var newvalue = value,\n prefix = \"\",\n suffix = \"\";\n for (var i = 0, len = prefixes.length; i < len; i++) {\n if (prefixes[i].number <= value) {\n if (prefixes[i].number === 0) {\n newvalue = 0;\n } else {\n newvalue = value / prefixes[i].number;\n }\n prefix = prefixes[i].prefix;\n suffix = prefixes[i].suffix;\n }\n }\n return [newvalue, prefix, suffix];\n };\n /**\r\n * Invalidates the parent [[Sprite]] object.\r\n */\n NumberFormatter.prototype.invalidateSprite = function () {\n if (this.sprite) {\n this.sprite.invalidate();\n }\n };\n Object.defineProperty(NumberFormatter.prototype, \"numberFormat\", {\n /**\r\n * @return A format to use for number formatting\r\n */\n get: function get() {\n return this._numberFormat;\n },\n /**\r\n * Number format.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/} Tutorial on number formatting\r\n * @param format A format to use for number formatting\r\n */\n set: function set(format) {\n this._numberFormat = format;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NumberFormatter.prototype, \"negativeBase\", {\n /**\r\n * @return A format to use for number formatting\r\n */\n get: function get() {\n return this._negativeBase;\n },\n /**\r\n * Negative base for negative numbers.\r\n *\r\n * @default 0\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/} Tutorial on number formatting\r\n * @param format A format to use for number formatting\r\n */\n set: function set(value) {\n this._negativeBase = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NumberFormatter.prototype, \"bigNumberPrefixes\", {\n /**\r\n * @return Prefixes for big numbers\r\n */\n get: function get() {\n if (!$type.hasValue(this._bigNumberPrefixes)) {\n this._bigNumberPrefixes = [{\n \"number\": 1e+3,\n \"suffix\": this.language.translate(\"_big_number_suffix_3\")\n }, {\n \"number\": 1e+6,\n \"suffix\": this.language.translate(\"_big_number_suffix_6\")\n }, {\n \"number\": 1e+9,\n \"suffix\": this.language.translate(\"_big_number_suffix_9\")\n }, {\n \"number\": 1e+12,\n \"suffix\": this.language.translate(\"_big_number_suffix_12\")\n }, {\n \"number\": 1e+15,\n \"suffix\": this.language.translate(\"_big_number_suffix_15\")\n }, {\n \"number\": 1e+18,\n \"suffix\": this.language.translate(\"_big_number_suffix_18\")\n }, {\n \"number\": 1e+21,\n \"suffix\": this.language.translate(\"_big_number_suffix_21\")\n }, {\n \"number\": 1e+24,\n \"suffix\": this.language.translate(\"_big_number_suffix_24\")\n }];\n }\n return this._bigNumberPrefixes;\n },\n /**\r\n * Prefixes for big numbers.\r\n *\r\n * It's an array of objects of number/prefix pairs.\r\n *\r\n * ```JSON\r\n * [\r\n * { \"number\": 1e+3, \"suffix\": \"K\" },\r\n * { \"number\": 1e+6, \"suffix\": \"M\" },\r\n * { \"number\": 1e+9, \"suffix\": \"G\" },\r\n * { \"number\": 1e+12, \"suffix\": \"T\" },\r\n * { \"number\": 1e+15, \"suffix\": \"P\" },\r\n * { \"number\": 1e+18, \"suffix\": \"E\" },\r\n * { \"number\": 1e+21, \"suffix\": \"Z\" },\r\n * { \"number\": 1e+24, \"suffix\": \"Y\" }\r\n * ]\r\n * ```\r\n *\r\n * If the number is bigger than the `number` ir will be converted to the\r\n * appropriate bigger number with prefix.\r\n *\r\n * E.g. as per above `1500` will be converted to `1.5K`.\r\n *\r\n * Please note that for this transformation to be enabled, you need to\r\n * enable it specific modifier in your format setting.\r\n *\r\n * The modifier for big/small number modification is \"a\":\r\n *\r\n * ```Text\r\n * {myfield.formatNumber(\"#,###.00a\")}\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/} Tutorial on number formatting\r\n * @param prefixes Prefixes for big numbers\r\n */\n set: function set(prefixes) {\n this._bigNumberPrefixes = prefixes;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NumberFormatter.prototype, \"smallNumberPrefixes\", {\n /**\r\n * @return Prefixes for small numbers\r\n */\n get: function get() {\n if (!$type.hasValue(this._smallNumberPrefixes)) {\n this._smallNumberPrefixes = [{\n \"number\": 1e-24,\n \"suffix\": this.language.translate(\"_small_number_suffix_24\")\n }, {\n \"number\": 1e-21,\n \"suffix\": this.language.translate(\"_small_number_suffix_21\")\n }, {\n \"number\": 1e-18,\n \"suffix\": this.language.translate(\"_small_number_suffix_18\")\n }, {\n \"number\": 1e-15,\n \"suffix\": this.language.translate(\"_small_number_suffix_15\")\n }, {\n \"number\": 1e-12,\n \"suffix\": this.language.translate(\"_small_number_suffix_12\")\n }, {\n \"number\": 1e-9,\n \"suffix\": this.language.translate(\"_small_number_suffix_9\")\n }, {\n \"number\": 1e-6,\n \"suffix\": this.language.translate(\"_small_number_suffix_6\")\n }, {\n \"number\": 1e-3,\n \"suffix\": this.language.translate(\"_small_number_suffix_3\")\n }];\n }\n return this._smallNumberPrefixes;\n },\n /**\r\n * Prefixes for big numbers.\r\n *\r\n * It's an array of objects of number/prefix pairs.\r\n *\r\n * ```JSON\r\n * [\r\n * { \"number\": 1e-24, \"suffix\": \"y\" },\r\n * { \"number\": 1e-21, \"suffix\": \"z\" },\r\n * { \"number\": 1e-18, \"suffix\": \"a\" },\r\n * { \"number\": 1e-15, \"suffix\": \"f\" },\r\n * { \"number\": 1e-12, \"suffix\": \"p\" },\r\n * { \"number\": 1e-9, \"suffix\": \"n\" },\r\n * { \"number\": 1e-6, \"suffix\": \"μ\" },\r\n * { \"number\": 1e-3, \"suffix\": \"m\" }\r\n * ]\r\n * ```\r\n *\r\n * If the number is smaller than the `number` ir will be converted to the\r\n * appropriate smaller number with prefix.\r\n *\r\n * E.g. as per above `0.0015` will be converted to `1.5m`.\r\n *\r\n * Please note that for this transformation to be enabled, you need to\r\n * enable it specific modifier in your format setting.\r\n *\r\n * The modifier for big/small number modification is \"a\":\r\n *\r\n * ```Text\r\n * {myfield.formatNumber(\"#,###.00a\")}\r\n * ```\r\n *\r\n * IMPORTANT: The order of the suffixes is important. The list must start\r\n * from the smallest number and work towards bigger ones.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/} Tutorial on number formatting\r\n * @param prefixes Prefixes for small numbers\r\n */\n set: function set(prefixes) {\n this._smallNumberPrefixes = prefixes;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NumberFormatter.prototype, \"bytePrefixes\", {\n /**\r\n * @return Prefixes for byte-size formatting\r\n */\n get: function get() {\n if (!$type.hasValue(this._bytePrefixes)) {\n this._bytePrefixes = [{\n \"number\": 0,\n suffix: this.language.translate(\"_byte_suffix_B\")\n }, {\n \"number\": 1024,\n suffix: this.language.translate(\"_byte_suffix_KB\")\n }, {\n \"number\": 1048576,\n suffix: this.language.translate(\"_byte_suffix_MB\")\n }, {\n \"number\": 1073741824,\n suffix: this.language.translate(\"_byte_suffix_GB\")\n }, {\n \"number\": 1099511627776,\n suffix: this.language.translate(\"_byte_suffix_TB\")\n }, {\n \"number\": 1125899906842624,\n suffix: this.language.translate(\"_byte_suffix_PB\")\n }];\n }\n return this._bytePrefixes;\n },\n /**\r\n * Basically the same as `bigNumberPrefixes`, except base for calculation\r\n * is not thousand but byte (1024).\r\n *\r\n * The modifier is \"b\".\r\n *\r\n * ```Text\r\n * {myfield.formatNumber(\"#,###.00b\")}\r\n * ```\r\n *\r\n * The above `2048` will change to `2K`.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/} Tutorial on number formatting\r\n * @param prefixes Prefixes for byte-size formatting\r\n */\n set: function set(prefixes) {\n this._bytePrefixes = prefixes;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NumberFormatter.prototype, \"outputFormat\", {\n /**\r\n * @ignore Exclude from docs\r\n * @return Output format\r\n */\n get: function get() {\n return this._outputFormat;\n },\n /**\r\n * Ooutput format: \"svg\" or \"html\".\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Output format\r\n */\n set: function set(outputFormat) {\n this._outputFormat = outputFormat.toLowerCase();\n this.invalidateSprite();\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Replaces brackets with temporary placeholders.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Input text\r\n * @return Escaped text\r\n */\n NumberFormatter.prototype.escape = function (text) {\n return text.replace(\"||\", $strings.PLACEHOLDER2);\n };\n /**\r\n * Replaces placeholders back to brackets.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Escaped text\r\n * @return Unescaped text\r\n */\n NumberFormatter.prototype.unescape = function (text) {\n return text.replace($strings.PLACEHOLDER2, \"|\");\n };\n return NumberFormatter;\n}(BaseObject);\nexport { NumberFormatter };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"NumberFormatter\"] = NumberFormatter;","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/**\r\n * Export module.\r\n *\r\n * Parts of Export functionality rely on the following third party libraries:\r\n *\r\n * [canvg.js](https://github.com/canvg/canvg)\r\n * Copyright (c) Gabe Lerner\r\n * Licensed under [MIT](https://github.com/canvg/canvg/blob/master/LICENSE)\r\n *\r\n * [pdfmake](http://pdfmake.org/)\r\n * Copyright (c) 2014 bpampuch\r\n * Licensed under [MIT](https://github.com/bpampuch/pdfmake/blob/master/LICENSE)\r\n *\r\n * [SheetJS Community Edition](https://github.com/sheetjs/js-xlsx)\r\n * Licensed under [Apache License 2.0](https://github.com/SheetJS/js-xlsx/blob/master/LICENSE)\r\n *\r\n * [JSZip](http://stuartk.com/jszip)\r\n * Copyright (c) Stuart Knightley\r\n * Dual licenced under the [MIT license or GPLv3](https://raw.githubusercontent.com/Stuk/jszip/master/LICENSE.markdown).\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { ExportMenu } from \"./ExportMenu\";\nimport { Adapter } from \"../utils/Adapter\";\nimport { Sprite } from \"../Sprite\";\nimport { Modal } from \"../elements/Modal\";\nimport { List } from \"../utils/List\";\nimport { Dictionary } from \"../utils/Dictionary\";\nimport { DateFormatter } from \"../formatters/DateFormatter\";\nimport { DurationFormatter } from \"../formatters/DurationFormatter\";\nimport { Language } from \"../utils/Language\";\nimport { Validatable } from \"../utils/Validatable\";\nimport { color } from \"../utils/Color\";\nimport { registry } from \"../Registry\";\nimport { options } from \"../Options\";\nimport { StyleRule, getComputedStyle } from \"../utils/DOM\";\nimport * as $browser from \"../utils/Browser\";\nimport * as $object from \"../utils/Object\";\nimport * as $net from \"../utils/Net\";\nimport * as $dom from \"../utils/DOM\";\nimport * as $type from \"../utils/Type\";\nimport * as $utils from \"../utils/Utils\";\nimport * as $array from \"../utils/Array\";\nimport * as $math from \"../utils/Math\";\n// This is used to cache the pdfmake loading\nvar pdfmakePromise;\n/**\r\n * Loads pdfmake dynamic module\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Instance of pdfmake\r\n * @async\r\n */\nfunction _pdfmake() {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var a, pdfmake, vfs_fonts, global;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, Promise.all([import( /* webpackChunkName: \"pdfmake\" */\"pdfmake/build/pdfmake.js\"), import( /* webpackChunkName: \"pdfmake\" */\"../../pdfmake/vfs_fonts\")])];\n case 1:\n a = _a.sent();\n pdfmake = a[0];\n vfs_fonts = a[1];\n global = window;\n global.pdfMake = global.pdfMake || {};\n global.pdfMake.vfs = vfs_fonts[\"default\"];\n pdfmake.vfs = vfs_fonts[\"default\"];\n return [2 /*return*/, pdfmake];\n }\n });\n });\n}\n// TODO better parsing\nvar fontFamilySrcRegexp = /src: ([^;]+);/;\n// TODO better checks\nfunction supportsBlobUri() {\n return window.navigator.msSaveOrOpenBlob != null;\n}\n// TODO move into utils or something ?\nfunction blobToDataUri(blob) {\n return new Promise(function (resolve, reject) {\n // TODO handle abort ?\n var f = new FileReader();\n f.onload = function (e) {\n resolve(f.result);\n };\n f.onerror = function (e) {\n reject(e);\n };\n f.readAsDataURL(blob);\n });\n}\n// This loads a stylesheet by URL and then calls the function with it\n// TODO this should be moved into utils or something\nfunction loadStylesheet(url, f) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, s;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, $net.load(url)];\n case 1:\n response = _a.sent();\n s = document.createElement(\"style\");\n s.textContent = response.response;\n document.head.appendChild(s);\n _a.label = 2;\n case 2:\n _a.trys.push([2,, 4, 5]);\n return [4 /*yield*/, f(s.sheet)];\n case 3:\n return [2 /*return*/, _a.sent()];\n case 4:\n document.head.removeChild(s);\n return [7 /*endfinally*/];\n case 5:\n return [2 /*return*/];\n }\n });\n });\n}\n// This calls a function for each CSSRule inside of a CSSStyleSheet.\n// If the CSSStyleSheet has any @import, then it will recursively call the function for those CSSRules too.\n// TODO this should be moved into utils or something\nfunction eachStylesheet(topUrl, sheet, f) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var promises, _loop_1, i;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n promises = [];\n _loop_1 = function _loop_1(i) {\n var rule = sheet.cssRules[i];\n if (rule.type === CSSRule.IMPORT_RULE) {\n var url_1 = rule.href;\n if (url_1) {\n url_1 = $utils.joinUrl(topUrl, url_1);\n promises.push(loadStylesheet(url_1, function (sheet) {\n return eachStylesheet(url_1, sheet, f);\n }));\n }\n } else {\n f(topUrl, rule);\n }\n };\n for (i = 0; i < sheet.cssRules.length; i++) {\n _loop_1(i);\n }\n if (!promises.length) return [3 /*break*/, 2];\n return [4 /*yield*/, Promise.all(promises)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n return [2 /*return*/];\n }\n });\n });\n}\n// This calls a function for each CSSRule for all of the stylesheets in the page.\n// If the CSSStyleSheet has any @import, then it will recursively call the function for those CSSRules too.\n// TODO this should be moved into utils or something\nfunction eachStylesheets(f) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, Promise.all($array.map(document.styleSheets, function (sheet) {\n var url = sheet.href;\n if (url == null) {\n return eachStylesheet(location.href, sheet, f);\n } else {\n url = $utils.joinUrl(location.href, url);\n return loadStylesheet(url, function (sheet) {\n return eachStylesheet(url, sheet, f);\n });\n }\n }))];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n}\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * [[Export]] allows downloading of current snapshot of the chart as an\r\n * image, PDF, or its data in various formats.\r\n *\r\n * The export functionality is enabled by default in charts and is accessible\r\n * via API or optional export menu.\r\n *\r\n * To enable menu, simply access export's `menu` property. E.g.:\r\n *\r\n * ```TypeScript\r\n * chart.exporting.menu = new am4core.ExportMenu();\r\n * ```\r\n * ```JavaScript\r\n * chart.exporting.menu = new am4core.ExportMenu();\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"exporting\": {\r\n * \"menu\": {}\r\n * }\r\n * }\r\n * ```\r\n *\r\n * To export via API, use `export()` method:\r\n *\r\n * ```TypeScript\r\n * chart.exporting.export(type, [options]);\r\n * ```\r\n * ```JavaScript\r\n * chart.exporting.export(type, [options]);\r\n * ```\r\n *\r\n * E.g.:\r\n *\r\n * ```TypeScript\r\n * chart.exporting.export(\"png\");\r\n * ```\r\n * ```JavaScript\r\n * chart.exporting.export(\"png\");\r\n * ```\r\n *\r\n * @todo Better loading indicator?\r\n * @todo Implement multiplier option\r\n * @todo Handling of hanged exports\r\n * @important\r\n */\nvar Export = /** @class */function (_super) {\n tslib_1.__extends(Export, _super);\n /**\r\n * Constructor\r\n */\n function Export(container) {\n var _this = _super.call(this) || this;\n /**\r\n * Adapter.\r\n */\n _this.adapter = new Adapter(_this);\n /**\r\n * Holds options for each format.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._formatOptions = new Dictionary();\n /**\r\n * Extra [[Sprite]] elements to include in exports.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._extraSprites = [];\n /**\r\n * Indicates whether data fields were generated dynamically (`true`) or\r\n * if they were pre-set by the user (`false`).\r\n */\n _this._dynamicDataFields = true;\n /**\r\n * Holds a list of objects that were temporarily removed from the DOM while\r\n * exporting. Those most probably are tainted images, or foreign objects that\r\n * would otherwise prevent SVG to be converted to canvas.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._removedObjects = new List();\n /**\r\n * Holds references to the objects that were temporarily hidden when export\r\n * started, so that we can reveal them back when export ends.\r\n */\n _this._hiddenObjects = [];\n /**\r\n * Indicates if non-exportable objects are now hidden;\r\n */\n _this._objectsAlreadyHidden = false;\n /**\r\n * Exported files will be prefixed with whatever it is set here.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._filePrefix = \"amCharts\";\n /**\r\n * If you are using web fonts (such as Google Fonts), your chart might be\r\n * using them as well.\r\n *\r\n * Normally, exporting to image will require to download these fonts so the\r\n * are carried over to exported image.\r\n *\r\n * This setting can be used to disable or enable this functionality.\r\n *\r\n * @default true\r\n */\n _this.useWebFonts = true;\n /**\r\n * Many modern displays have use more actual pixels per displayed pixel. This\r\n * results in sharper images on screen. Unfortunately, when exported to a\r\n * bitmap image of the sam width/height size it will lose those extra pixels,\r\n * resulting in somewhat blurry image.\r\n *\r\n * This is why we are going to export images larger than they are, so that we\r\n * don't lose any details.\r\n *\r\n * If you'd rather export images without change in size, set this to `false`.\r\n *\r\n * @default true\r\n */\n _this.useRetina = true;\n /**\r\n * By default Export will try to use built-in method for transforming chart\r\n * into an image for download, then fallback to external library (canvg) for\r\n * conversion if failed.\r\n *\r\n * Setting this to `false` will force use of external library for all export\r\n * operations.\r\n *\r\n * It might be useful to turn off simplified export if you are using strict\r\n * content security policies, that disallow images with blobs as their\r\n * source.\r\n *\r\n * @default true\r\n * @since 4.2.5\r\n */\n _this.useSimplifiedExport = true;\n /**\r\n * If export operation takes longer than milliseconds in this second, we will\r\n * show a modal saying export operation took longer than expected.\r\n */\n _this.timeoutDelay = 2000;\n _this._container = container;\n _this.className = \"Export\";\n // Set default options\n _this._formatOptions.setKey(\"png\", {});\n _this._formatOptions.setKey(\"jpg\", {\n quality: 0.8\n });\n _this._formatOptions.setKey(\"gif\", {});\n _this._formatOptions.setKey(\"svg\", {});\n _this._formatOptions.setKey(\"pdf\", {\n fontSize: 14,\n imageFormat: \"png\",\n addURL: true\n });\n _this._formatOptions.setKey(\"json\", {\n indent: 2,\n useLocale: true\n });\n _this._formatOptions.setKey(\"csv\", {\n addColumnNames: true,\n emptyAs: \"\"\n });\n _this._formatOptions.setKey(\"xlsx\", {\n addColumnNames: true,\n useLocale: true,\n emptyAs: \"\"\n });\n _this._formatOptions.setKey(\"print\", {\n delay: 500,\n printMethod: \"iframe\"\n });\n // Add options adapter\n _this.adapter.add(\"options\", function (arg) {\n var formatOptions = _this._formatOptions.getKey(arg.type);\n if (arg.options) {\n arg.options = $object.merge(arg.options, formatOptions);\n } else {\n arg.options = formatOptions;\n }\n return arg;\n });\n _this.applyTheme();\n _this.dispatchImmediately(\"inited\");\n return _this;\n }\n Object.defineProperty(Export.prototype, \"menu\", {\n /**\r\n * @return ExportMenu instance\r\n */\n get: function get() {\n return this._menu;\n },\n /**\r\n * An instance of [[ExportMenu]].\r\n *\r\n * To add an export menu to a chart, set this to a new instance of\r\n * [[ExportMenu]].\r\n *\r\n * ```TypeScript\r\n * chart.exporting.menu = new am4core.ExportMenu();\r\n * ```\r\n * ```JavaScript\r\n * chart.exporting.menu = new am4core.ExportMenu();\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"exporting\": {\r\n * \"menu\": {}\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @param menu ExportMenu instance\r\n */\n set: function set(menu) {\n var _this = this;\n if (this._menu) {\n this.removeDispose(this._menu);\n }\n this._menu = menu;\n // Set container and language\n this._menu.container = this.container;\n this._menu.language = this._language;\n // Add adapter to check for browser support\n this._menu.adapter.add(\"branch\", function (arg) {\n arg.branch.unsupported = !_this.typeSupported(arg.branch.type);\n return arg;\n });\n // Add click events\n this._menu.events.on(\"hit\", function (ev) {\n _this[\"export\"](ev.branch.type, ev.branch.options);\n _this.menu.close();\n });\n this._menu.events.on(\"enter\", function (ev) {\n _this[\"export\"](ev.branch.type, ev.branch.options);\n _this.menu.close();\n });\n this._menu.events.on(\"over\", function (ev) {\n _this._disablePointers();\n });\n this._menu.events.on(\"out\", function (ev) {\n _this._releasePointers();\n });\n // Dispatch event\n this.dispatchImmediately(\"menucreated\");\n // Prefix with Sprite's class name\n this._menu.adapter.add(\"classPrefix\", function (obj) {\n obj.classPrefix = options.classNamePrefix + obj.classPrefix;\n return obj;\n });\n // Add menu to disposers so that it's destroyed when Export is disposed\n this._disposers.push(this._menu);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Checks if this specific menu item type is supported by current system.\r\n *\r\n * @param type Menu item type\r\n * @return `false` if not supported\r\n */\n Export.prototype.typeSupported = function (type) {\n var supported = true;\n if (type === \"pdf\") {\n //supported = this.downloadSupport();\n } else if (type === \"xlsx\") {\n //supported = (this.downloadSupport() && this._hasData()) ? true : false;\n supported = this._hasData() ? true : false;\n } else if (type == \"print\" && !window.print) {\n supported = false;\n } else if ([\"json\", \"csv\"].indexOf(type) !== -1 && !this._hasData()) {\n supported = false;\n }\n return this.adapter.apply(\"supported\", {\n supported: supported,\n type: type\n }).supported;\n };\n /**\r\n * Checks if data is available.\r\n *\r\n * @return Has data?\r\n */\n Export.prototype._hasData = function () {\n return this.data && this.data.length;\n };\n /**\r\n * Get function to handle export for particular format.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Export.prototype._getFunction = function (type) {\n switch (type) {\n case \"png\":\n case \"gif\":\n case \"jpg\":\n return this.getImage;\n case \"svg\":\n return this.getSVG;\n case \"pdf\":\n return this.getPDF;\n case \"xlsx\":\n return this.getExcel;\n case \"csv\":\n return this.getCSV;\n case \"json\":\n return this.getJSON;\n case \"print\":\n return this.getPrint;\n default:\n return this.unsupported;\n }\n };\n /**\r\n * Initiates export procedure.\r\n *\r\n * @param type Export type\r\n * @param options Options\r\n * @return `true` if export was successful\r\n * @async\r\n */\n Export.prototype[\"export\"] = function (type, options) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var _this = this;\n var event_1, func, data, event_2, event_3;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n // Dispatch event\n if (this.events.isEnabled(\"exportstarted\")) {\n event_1 = {\n \"type\": \"exportstarted\",\n \"target\": this,\n \"format\": type,\n \"options\": options\n };\n this.events.dispatchImmediately(\"exportstarted\", event_1);\n }\n // Check if it's a custom item, and do nothing or execute custom callback\n if (type == \"custom\") {\n this.handleCustom(options);\n return [2 /*return*/, true];\n }\n // Schedule a preloader\n this.showPreloader();\n // Schedule a timeout\n if (this.timeoutDelay) {\n this.hideTimeout();\n this._timeoutTimeout = this.setTimeout(function () {\n // Dispatch event\n if (_this.events.isEnabled(\"exporttimedout\")) {\n var event_4 = {\n \"type\": \"exporttimedout\",\n \"target\": _this,\n \"format\": type,\n \"options\": options\n };\n _this.events.dispatchImmediately(\"exporttimedout\", event_4);\n }\n // Show modal\n _this.showTimeout();\n }, this.timeoutDelay);\n }\n // Hide items that should not be exported\n this.hideNonExportableSprites();\n func = this._getFunction(type);\n // Give chance for plugins to override both function and options\n options = this.adapter.apply(\"options\", {\n options: options,\n type: type\n }).options;\n func = this.adapter.apply(\"exportFunction\", {\n func: func,\n type: type,\n options: options\n }).func;\n return [4 /*yield*/, func.call(this, type, options)];\n case 1:\n data = _a.sent();\n // Restore temporarily hidden elements\n this.restoreNonExportableSprites();\n if (data) {\n // Dispatch event\n if (this.events.isEnabled(\"exportfinished\")) {\n event_2 = {\n \"type\": \"exportfinished\",\n \"target\": this,\n \"format\": type,\n \"options\": options\n };\n this.events.dispatchImmediately(\"exportfinished\", event_2);\n }\n // Hide preloader and timeout modals\n this.hidePreloader();\n this.hideTimeout();\n if (this.menu) {\n this.menu.close();\n }\n // Download or print\n if (type === \"print\") {\n return [2 /*return*/, this.print(data, options, this.adapter.apply(\"title\", {\n title: this.title,\n options: options\n }).title)];\n } else {\n return [2 /*return*/, this.download(data, this.filePrefix + \".\" + type)];\n }\n } else {\n // Throw exception?\n // @todo\n // Dispatch event\n if (this.events.isEnabled(\"error\")) {\n event_3 = {\n \"type\": \"error\",\n \"target\": this,\n \"format\": type,\n \"options\": options\n };\n this.events.dispatchImmediately(\"error\", event_3);\n }\n return [2 /*return*/, false];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n /**\r\n * A function that should handle unsupported export types.\r\n *\r\n * @ignore Exclude from docs\r\n * @param type Export type\r\n * @param options Options\r\n * @return Promise\r\n * @async\r\n */\n Export.prototype.unsupported = function (type, options) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n // TODO should this return `undefined`?\n return [2 /*return*/, \"\"];\n });\n });\n };\n /**\r\n * Handles click on a \"custom\" menu item.\r\n *\r\n * Basically, if it has \"callback\" enabled, it will be called. Nothing else.\r\n *\r\n * @ignore Exclude from docs\r\n * @param options Options\r\n */\n Export.prototype.handleCustom = function (options) {\n if ($type.hasValue(options.callback)) {\n options.callback.call(this, options);\n }\n };\n /**\r\n * Requests a Print of the chart.\r\n *\r\n * @param type Export type\r\n * @param options Options\r\n * @return Promise\r\n * @async\r\n */\n Export.prototype.getPrint = function (type, options) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.getImage(\"png\", options)];\n });\n });\n };\n /**\r\n * A function that returns data: URI encoded @font-family, so that way it can be embedded into SVG.\r\n *\r\n * @ignore Exclude from docs\r\n * @return String which can be embedded directly into a <style> element.\r\n * @async\r\n */\n Export.prototype.getFontFamilies = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var _this = this;\n var DOMURL, blobs, promises, a;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n DOMURL = this.getDOMURL();\n blobs = [];\n promises = [];\n return [4 /*yield*/, eachStylesheets(function (topUrl, rule) {\n if (rule.type === CSSRule.FONT_FACE_RULE) {\n var cssText_1 = rule.cssText;\n // TODO this is necessary because Edge doesn't let you access the src using getPropertyValue\n var src = fontFamilySrcRegexp.exec(cssText_1);\n if (src !== null) {\n // TODO make this faster (don't create Promises for non-url stuff)\n var urls = src[1].split(/ *, */).map(function (url) {\n return tslib_1.__awaiter(_this, void 0, void 0, function () {\n var a, after, fullUrl, response, url_2, e_1;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n a = /^url\\([\"']?([^\"'\\)]+)[\"']?\\)([^,]*)$/.exec(url);\n if (!(a === null)) return [3 /*break*/, 1];\n return [2 /*return*/, url];\n case 1:\n after = a[2];\n fullUrl = $utils.joinUrl(topUrl, a[1]);\n _a.label = 2;\n case 2:\n _a.trys.push([2, 7,, 8]);\n return [4 /*yield*/, $net.load(fullUrl, undefined, {\n responseType: \"blob\"\n })];\n case 3:\n response = _a.sent();\n if (!supportsBlobUri()) return [3 /*break*/, 4];\n url_2 = DOMURL.createObjectURL(response.blob);\n blobs.push(url_2);\n return [3 /*break*/, 6];\n case 4:\n return [4 /*yield*/, blobToDataUri(response.blob)];\n case 5:\n url_2 = _a.sent();\n _a.label = 6;\n case 6:\n // TODO should it should escape the URI ?\n return [2 /*return*/, \"url(\\\"\" + url_2 + \"\\\")\" + after];\n case 7:\n e_1 = _a.sent();\n console.error(\"Failed to load font\", fullUrl, e_1);\n return [2 /*return*/, null];\n case 8:\n return [2 /*return*/];\n }\n });\n });\n });\n promises.push(Promise.all(urls).then(function (a) {\n a = a.filter(function (x) {\n return x != null;\n });\n if (a.length === 0) {\n return \"\";\n } else {\n return cssText_1.replace(fontFamilySrcRegexp, \"src: \" + a.join(\", \") + \";\");\n }\n }));\n }\n }\n })];\n case 1:\n _a.sent();\n return [4 /*yield*/, Promise.all(promises)];\n case 2:\n a = _a.sent();\n return [2 /*return*/, {\n blobs: blobs,\n cssText: a.filter(function (x) {\n return !!x;\n }).join(\"\\n\")\n }];\n }\n });\n });\n };\n /**\r\n * Produces image output from the element.\r\n *\r\n * Converts to a `Canvas` first, then produces an image to download.\r\n *\r\n * This is an asynchronous function. Rather than returning a result, it\r\n * returns a Promise.\r\n *\r\n * You can use `await` notion from other async functions, or `then()`\r\n * anywhere else.\r\n *\r\n * ```TypeScript\r\n * let img;\r\n *\r\n * // Async\r\n * img = await chart.exporting.getImage( \"png\" );\r\n *\r\n * // Sync\r\n * chart.exporting.getImage( \"png\" ).then( ( data ) => {\r\n * img = data;\r\n * } );\r\n * ```\r\n * ```JavaScript\r\n * var img;\r\n * chart.exporting.getImage( \"png\" ).then( ( data ) => {\r\n * img = data;\r\n * } );\r\n * ```\r\n *\r\n * @param type Image format\r\n * @param options Options\r\n * @param includeExtras Should extra sprites be included if set?\r\n * @return Promise\r\n */\n Export.prototype.getImage = function (type, options, includeExtras) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var prehidden, canvas, uri, e_2, data, data;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n prehidden = this._objectsAlreadyHidden;\n if (!prehidden) {\n this.hideNonExportableSprites();\n }\n if (!$type.hasValue(options)) {\n options = this.getFormatOptions(type);\n }\n return [4 /*yield*/, this.simplifiedImageExport()];\n case 1:\n if (!_a.sent()) return [3 /*break*/, 9];\n _a.label = 2;\n case 2:\n _a.trys.push([2, 6,, 8]);\n return [4 /*yield*/, this.getCanvas(options)];\n case 3:\n canvas = _a.sent();\n if (!(includeExtras !== false)) return [3 /*break*/, 5];\n return [4 /*yield*/, this.addExtras(canvas, options)];\n case 4:\n canvas = _a.sent();\n _a.label = 5;\n case 5:\n uri = canvas.toDataURL(this.getContentType(type), options.quality);\n // Get rid of the canvas\n this.disposeCanvas(canvas);\n if (!prehidden) {\n this.restoreNonExportableSprites();\n }\n return [2 /*return*/, uri];\n case 6:\n e_2 = _a.sent();\n return [4 /*yield*/, this.getImageAdvanced(type, options, includeExtras)];\n case 7:\n data = _a.sent();\n if (!prehidden) {\n this.restoreNonExportableSprites();\n }\n return [2 /*return*/, data];\n case 8:\n return [3 /*break*/, 11];\n case 9:\n return [4 /*yield*/, this.getImageAdvanced(type, options, includeExtras)];\n case 10:\n data = _a.sent();\n if (!prehidden) {\n this.restoreNonExportableSprites();\n }\n return [2 /*return*/, data];\n case 11:\n return [2 /*return*/];\n }\n });\n });\n };\n /**\r\n * Adds extra elements to the canvas.\r\n *\r\n * @param canvas Original canvas\r\n * @param options Options\r\n */\n Export.prototype.addExtras = function (canvas, options, advanced) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var _this = this;\n var middleLeft_1, middleTop_1, middleRight_1, middleBottom_1, totalWidth_1, totalHeight_1, extras, newCanvas, ctx_1, background, left_1, top_1, right_1, bottom_1;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this.extraSprites.length) return [3 /*break*/, 2];\n middleLeft_1 = 0;\n middleTop_1 = 0;\n middleRight_1 = canvas.width;\n middleBottom_1 = canvas.height;\n totalWidth_1 = canvas.width;\n totalHeight_1 = canvas.height;\n return [4 /*yield*/, Promise.all($array.map(this.extraSprites, function (extraSprite) {\n return tslib_1.__awaiter(_this, void 0, void 0, function () {\n var extra, extraCanvas, extraWidth, extraHeight;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (extraSprite instanceof Sprite) {\n extra = {\n sprite: extraSprite,\n position: \"bottom\"\n };\n } else {\n extra = extraSprite;\n }\n // Set defaults\n extra.position = extra.position || \"bottom\";\n extra.marginTop = extra.marginTop || 0;\n extra.marginRight = extra.marginRight || 0;\n extra.marginBottom = extra.marginBottom || 0;\n extra.marginLeft = extra.marginLeft || 0;\n if (!advanced) return [3 /*break*/, 2];\n return [4 /*yield*/, extra.sprite.exporting.getCanvasAdvanced(options)];\n case 1:\n extraCanvas = _a.sent();\n return [3 /*break*/, 4];\n case 2:\n return [4 /*yield*/, extra.sprite.exporting.getCanvas(options)];\n case 3:\n extraCanvas = _a.sent();\n _a.label = 4;\n case 4:\n extraWidth = extraCanvas.width + extra.marginLeft + extra.marginRight;\n extraHeight = extraCanvas.height + extra.marginTop + extra.marginBottom;\n if (extra.position == \"top\") {\n middleRight_1 = $math.max(middleRight_1, extraWidth);\n totalHeight_1 += extraHeight;\n middleTop_1 += extraHeight;\n } else if (extra.position == \"right\") {\n middleBottom_1 = $math.max(middleBottom_1, extraHeight);\n totalWidth_1 += extraWidth;\n } else if (extra.position == \"left\") {\n middleBottom_1 = $math.max(middleBottom_1, extraHeight);\n totalWidth_1 += extraWidth;\n middleLeft_1 += extraWidth;\n } else if (extra.position === \"bottom\") {\n middleRight_1 = $math.max(middleRight_1, extraWidth);\n totalHeight_1 += extraHeight;\n }\n return [2 /*return*/, {\n canvas: extraCanvas,\n position: extra.position,\n left: extra.marginLeft,\n top: extra.marginTop,\n width: extraWidth,\n height: extraHeight\n }];\n }\n });\n });\n }))];\n case 1:\n extras = _a.sent();\n newCanvas = this.getDisposableCanvas();\n newCanvas.width = totalWidth_1;\n newCanvas.height = totalHeight_1;\n ctx_1 = newCanvas.getContext(\"2d\");\n background = this.backgroundColor || this.findBackgroundColor(this.sprite.dom);\n if (background) {\n ctx_1.fillStyle = background.toString();\n ctx_1.fillRect(0, 0, newCanvas.width, newCanvas.height);\n }\n left_1 = middleLeft_1;\n top_1 = middleTop_1;\n right_1 = middleRight_1;\n bottom_1 = middleBottom_1;\n // Radiates outwards from center\n $array.each(extras, function (extra) {\n if (extra.position == \"top\") {\n top_1 -= extra.height;\n ctx_1.drawImage(extra.canvas, middleLeft_1 + extra.left, top_1 + extra.top);\n } else if (extra.position == \"right\") {\n ctx_1.drawImage(extra.canvas, right_1 + extra.left, middleTop_1 + extra.top);\n right_1 += extra.width;\n } else if (extra.position == \"left\") {\n left_1 -= extra.width;\n ctx_1.drawImage(extra.canvas, left_1 + extra.left, middleTop_1 + extra.top);\n } else if (extra.position === \"bottom\") {\n ctx_1.drawImage(extra.canvas, middleLeft_1 + extra.left, bottom_1 + extra.top);\n bottom_1 += extra.height;\n }\n _this.disposeCanvas(extra.canvas);\n });\n ctx_1.drawImage(canvas, middleLeft_1, middleTop_1);\n return [2 /*return*/, newCanvas];\n case 2:\n return [2 /*return*/, canvas];\n }\n });\n });\n };\n /**\r\n * Returns canvas representation of the [[Sprite]].\r\n *\r\n * @param options Options\r\n * @return Canvas\r\n */\n Export.prototype.getCanvas = function (options) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var background, DOMURL, url, blobs, canvas, width, height, font, fontSize, pixelRatio, ctx, promises, a, data, svg, img;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n // Options are set?\n if (!$type.hasValue(options)) {\n options = {};\n }\n background = this.backgroundColor || this.findBackgroundColor(this.sprite.dom);\n DOMURL = this.getDOMURL();\n url = null;\n blobs = null;\n _a.label = 1;\n case 1:\n _a.trys.push([1,, 4, 5]);\n width = this.sprite.pixelWidth, height = this.sprite.pixelHeight, font = $dom.findFont(this.sprite.dom), fontSize = $dom.findFontSize(this.sprite.dom);\n // Create canvas and its 2D context\n canvas = this.getDisposableCanvas();\n pixelRatio = this.getPixelRatio(options);\n canvas.style.width = width + 'px';\n canvas.style.height = height + 'px';\n canvas.width = width * pixelRatio;\n canvas.height = height * pixelRatio;\n ctx = canvas.getContext(\"2d\");\n if (pixelRatio != 1) {\n ctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n }\n // Add background if necessary\n if (background) {\n ctx.fillStyle = background.toString();\n ctx.fillRect(0, 0, width, height);\n }\n promises = [];\n if (this.useWebFonts) {\n // TODO what if one of the other things errors before it's been able to set `blobs` ?\n promises.push(this.getFontFamilies().then(function (fonts) {\n blobs = fonts.blobs;\n return fonts.cssText;\n }));\n }\n promises.push(this.imagesToDataURI(this.sprite.dom, options));\n promises.push(this.prepForeignObjects(this.sprite.dom, options));\n return [4 /*yield*/, Promise.all(promises)];\n case 2:\n a = _a.sent();\n data = this.normalizeSVG(\"<style>\" + a[0] + \"</style>\" + this.serializeElement(this.sprite.paper.defs) + this.serializeElement(this.sprite.dom), options, width, height, font, fontSize);\n svg = new Blob([data], {\n type: \"image/svg+xml\"\n });\n url = DOMURL.createObjectURL(svg);\n return [4 /*yield*/, this.loadNewImage(url, width, height, \"anonymous\")];\n case 3:\n img = _a.sent();\n // Draw image on canvas\n ctx.drawImage(img, 0, 0);\n return [3 /*break*/, 5];\n case 4:\n if (url !== null) {\n DOMURL.revokeObjectURL(url);\n }\n if (blobs !== null) {\n $array.each(blobs, function (url) {\n DOMURL.revokeObjectURL(url);\n });\n }\n // Restore replaced tainted images in DOM\n this.restoreRemovedObjects();\n return [7 /*endfinally*/];\n case 5:\n return [2 /*return*/, canvas];\n }\n });\n });\n };\n /**\r\n * Returns canvas representation of the [[Sprite]] using canvg.\r\n *\r\n * @param options Options\r\n * @return Canvas\r\n */\n Export.prototype.getCanvasAdvanced = function (options) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var background, canvg, width, height, font, fontSize, data, canvas, pixelRatio, config;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n // Options are set?\n if (!$type.hasValue(options)) {\n options = {};\n }\n // Convert external images to data uris\n return [4 /*yield*/, this.imagesToDataURI(this.sprite.dom, options)];\n case 1:\n // Convert external images to data uris\n _a.sent();\n background = this.backgroundColor || this.findBackgroundColor(this.sprite.dom);\n return [4 /*yield*/, this.canvg];\n case 2:\n canvg = _a.sent();\n width = this.sprite.pixelWidth, height = this.sprite.pixelHeight, font = $dom.findFont(this.sprite.dom), fontSize = $dom.findFontSize(this.sprite.dom);\n data = this.normalizeSVG(this.serializeElement(this.sprite.paper.defs) + this.serializeElement(this.sprite.dom), options, width, height, font, fontSize, background);\n canvas = this.getDisposableCanvas();\n pixelRatio = this.getPixelRatio(options);\n canvas.style.width = width * pixelRatio + 'px';\n canvas.style.height = height * pixelRatio + 'px';\n canvas.width = width * pixelRatio;\n canvas.height = height * pixelRatio;\n config = {\n //ignoreDimensions: true,\n useCORS: true\n };\n if (pixelRatio != 1) {\n config.ignoreDimensions = true;\n config.scaleWidth = width * pixelRatio;\n config.scaleHeight = height * pixelRatio;\n }\n canvg(canvas, data, config);\n return [2 /*return*/, canvas];\n }\n });\n });\n };\n /**\r\n * Tries to dynamically load [canvg.js](https://github.com/canvg/canvg) and\r\n * export an image using its functions.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @param type Image format\r\n * @param options Options\r\n * @return Data uri\r\n */\n Export.prototype.getImageAdvanced = function (type, options, includeExtras) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var prehidden, canvas, uri;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n prehidden = this._objectsAlreadyHidden;\n if (!prehidden) {\n this.hideNonExportableSprites();\n }\n if (!$type.hasValue(options)) {\n options = this.getFormatOptions(type);\n }\n return [4 /*yield*/, this.getCanvasAdvanced(options)];\n case 1:\n canvas = _a.sent();\n if (!(includeExtras !== false)) return [3 /*break*/, 3];\n return [4 /*yield*/, this.addExtras(canvas, options, true)];\n case 2:\n canvas = _a.sent();\n _a.label = 3;\n case 3:\n uri = canvas.toDataURL(this.getContentType(type), options.quality);\n // Get rid of the canvas\n this.disposeCanvas(canvas);\n if (!prehidden) {\n this.restoreNonExportableSprites();\n }\n return [2 /*return*/, uri];\n }\n });\n });\n };\n /**\r\n * Creates a `<canvas>` element and returns it.\r\n *\r\n * @return Canvas element\r\n */\n Export.prototype.getDisposableCanvas = function () {\n var canvas = document.createElement(\"canvas\");\n canvas.style.position = \"fixed\";\n canvas.style.top = \"-10000px\";\n document.body.appendChild(canvas);\n return canvas;\n };\n /**\r\n * Removes canvas.\r\n *\r\n * @param canvas Canvas element\r\n */\n Export.prototype.disposeCanvas = function (canvas) {\n document.body.removeChild(canvas);\n };\n /**\r\n * Returns pixel ratio for retina displays.\r\n *\r\n * @return Pixel ratio\r\n */\n Export.prototype.getPixelRatio = function (options) {\n var scale = options && options.scale ? options.scale : 1;\n return (this.useRetina ? $utils.getPixelRatio() : 1) * scale;\n };\n /**\r\n * Converts all `<image>` tags in SVG to use data uris instead of external\r\n * URLs\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @param el SVG node\r\n * @param options Options\r\n * @return Promise\r\n */\n Export.prototype.imagesToDataURI = function (el, options) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var images, promises, count, i, image, href;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n images = el.querySelectorAll(\"image\");\n if (!images.length) return [3 /*break*/, 2];\n promises = [];\n // There are images, process each of them\n for (count = images.length, i = 0; i < count; i++) {\n image = images[i];\n href = image.getAttributeNS(Export.XLINK, \"href\");\n // no href?\n if (!href) {\n continue;\n }\n if (href.indexOf(\"data:image\") !== -1) {\n // Ignore image if it's already in Data URI format\n } else {\n // SVG or bitmap image?\n if (href.indexOf(\".svg\") !== -1) {\n promises.push(this.svgToDataURI(image, options));\n } else {\n promises.push(this.imageToDataURI(image, options));\n }\n }\n }\n return [4 /*yield*/, Promise.all(promises)];\n case 1:\n _a.sent();\n return [2 /*return*/];\n case 2:\n return [2 /*return*/];\n }\n });\n });\n };\n /**\r\n * `foreignObject` elements cannot be exported. This function hides them\r\n * temprarily. In the future it might try to convert them to SVG to make them\r\n * exportable.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @param el SVG node\r\n * @param options Options\r\n * @return Promise\r\n */\n Export.prototype.prepForeignObjects = function (el, options) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var objects, count, i;\n return tslib_1.__generator(this, function (_a) {\n objects = el.querySelectorAll(\"foreignObject\");\n if (objects.length) {\n // There are foreign objects, process each of them\n for (count = objects.length, i = 0; i < count; i++) {\n this.temporarilyRemoveObject(objects[i]);\n }\n }\n return [2 /*return*/];\n });\n });\n };\n /**\r\n * Converts an SVG `<image>` to use its data uri for `href` instead of\r\n * external file.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @param el SVG element\r\n * @param options Options\r\n */\n Export.prototype.imageToDataURI = function (el, options) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var img, canvas, uri, e_3;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2,, 3]);\n return [4 /*yield*/, this.loadNewImage(el.getAttributeNS(Export.XLINK, \"href\"), null, null, \"anonymous\")];\n case 1:\n // Create image\n img = _a.sent();\n canvas = document.createElement(\"canvas\");\n canvas.width = img.width;\n canvas.height = img.height;\n // Draw new image on it via `toDataURL`\n canvas.getContext(\"2d\").drawImage(img, 0, 0);\n // Replace image `href` with data uri\n // If we got to this point it means image has loaded, however we might\n // still get an error with `toDataURL()`\n try {\n uri = canvas.toDataURL();\n el.setAttribute(\"href\", uri);\n return [2 /*return*/, uri];\n } catch (e) {\n // Give up and temporarily remove the element href temporarily\n if (options.keepTainted !== false) {\n /*this._removedObjects.push({\r\n \"element\": el,\r\n \"originalHref\": el.getAttributeNS(Export.XLINK, \"href\")\r\n });\r\n el.setAttributeNS(Export.XLINK, \"href\", \"\");*/\n this.temporarilyRemoveObject(el);\n }\n return [2 /*return*/, undefined];\n }\n return [3 /*break*/, 3];\n case 2:\n e_3 = _a.sent();\n // Give up and temporarily remove the element's href\n if (!options || options.keepTainted !== false) {\n /*this._removedObjects.push({\r\n \"element\": el,\r\n \"originalHref\": el.getAttributeNS(Export.XLINK, \"href\")\r\n });\r\n el.setAttributeNS(Export.XLINK, \"href\", \"\");*/\n this.temporarilyRemoveObject(el);\n }\n return [2 /*return*/, undefined];\n case 3:\n return [2 /*return*/];\n }\n });\n });\n };\n /**\r\n * Converts `<image>` with external SVG source to data uri. Loads external SVG\r\n * file, then converts it to data uri and replaces the `xlink:href` parameter.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @param el An SVG element\r\n * @param options Options\r\n */\n Export.prototype.svgToDataURI = function (el, options) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var href, data, charset, uri, e_4;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n href = el.getAttributeNS(Export.XLINK, \"href\");\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3,, 4]);\n return [4 /*yield*/, $net.load(href)];\n case 2:\n data = _a.sent();\n charset = this.adapter.apply(\"charset\", {\n charset: \"base64\",\n type: \"svg\",\n options: options\n }).charset;\n uri = this.adapter.apply(\"svgToDataURI\", {\n data: \"data:\" + this.getContentType(\"svg\") + \";\" + charset + \",\" + btoa(data.response),\n options: options\n }).data;\n el.setAttributeNS(Export.XLINK, \"href\", uri);\n return [2 /*return*/, uri];\n case 3:\n e_4 = _a.sent();\n // Disable temporarily\n if (!options || options.keepTainted !== false) {\n /*this._removedObjects.push({\r\n \"element\": el,\r\n \"originalHref\": href\r\n });\r\n el.setAttributeNS(Export.XLINK, \"href\", \"\");*/\n this.temporarilyRemoveObject(el);\n }\n return [2 /*return*/, undefined];\n case 4:\n return [2 /*return*/];\n }\n });\n });\n };\n /**\r\n * Temporarily removes element from DOM, and replaces it with a dummy\r\n * placeholder, as well as stores it for later restoration.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @param el Node\r\n */\n Export.prototype.temporarilyRemoveObject = function (el, placeholder) {\n // Get parent\n var parent = el.parentElement || el.parentNode;\n // Create a placeholder group element if it has not been passed in\n if (!placeholder) {\n placeholder = this.sprite.paper.add(\"g\").node;\n }\n parent.insertBefore(placeholder, el);\n // Check if we have a textContents we can replace with\n // @todo Perhaps we should explore alternatives to creating text nodes\n // i.e. creating a text version of the HTML-based Text, just for export\n // purposes. Converting HTML into SVG is very complicated\n if (el.textContent) {\n /*let text = this.sprite.paper.add(\"text\").node;\r\n text.textContent = el.textContent;\r\n placeholder.appendChild(text);\r\n // Copy properties from the removing element to the placeholder\r\n $dom.copyAttributes(el, placeholder);*/\n }\n // Remove the old element\n parent.removeChild(el);\n // Log removed item\n this._removedObjects.push({\n \"element\": el,\n \"placeholder\": placeholder\n });\n };\n /**\r\n * Restores all (possibly tainted or unsupported) objects that were\r\n * temporarily removed when exporting.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Export.prototype.restoreRemovedObjects = function () {\n var obj;\n while (true) {\n obj = this._removedObjects.pop();\n if (!obj) {\n break;\n }\n //obj.element.setAttribute(\"href\", obj.originalHref);\n var parent_1 = obj.placeholder.parentElement || obj.placeholder.parentNode;\n parent_1.insertBefore(obj.element, obj.placeholder);\n //parent.removeChild(obj.placeholder);\n }\n };\n /**\r\n * Checkes if simplified export can be used using `createObjectURL` and SVG\r\n * document does not contain any external images.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @return `true` if simplified export can be used\r\n */\n Export.prototype.simplifiedImageExport = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var cache, canvas, ctx, DOMURL, svg, url, img, e_5, e_6;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (this.useSimplifiedExport === false) {\n return [2 /*return*/, false];\n }\n cache = registry.getCache(\"simplifiedImageExport\");\n if (cache === false || cache === true) {\n return [2 /*return*/, cache];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 6,, 7]);\n canvas = document.createElement(\"canvas\");\n canvas.width = 1;\n canvas.height = 1;\n ctx = canvas.getContext(\"2d\");\n DOMURL = this.getDOMURL();\n svg = new Blob([this.normalizeSVG(\"<g></g>\", {}, 1, 1)], {\n type: \"image/svg+xml\"\n });\n url = DOMURL.createObjectURL(svg);\n img = void 0;\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4,, 5]);\n return [4 /*yield*/, this.loadNewImage(url, 1, 1)];\n case 3:\n img = _a.sent();\n return [3 /*break*/, 5];\n case 4:\n e_5 = _a.sent();\n return [2 /*return*/, false];\n case 5:\n ctx.drawImage(img, 0, 0);\n DOMURL.revokeObjectURL(url);\n try {\n //let uri = canvas.toDataURL(\"image/png\");\n registry.setCache(\"simplifiedImageExport\", true);\n return [2 /*return*/, true];\n } catch (e) {\n registry.setCache(\"simplifiedImageExport\", false);\n return [2 /*return*/, false];\n }\n return [3 /*break*/, 7];\n case 6:\n e_6 = _a.sent();\n registry.setCache(\"simplifiedImageExport\", false);\n return [2 /*return*/, false];\n case 7:\n return [2 /*return*/];\n }\n });\n });\n };\n /**\r\n * Returns a new `<image>` element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param url URL of the image\r\n * @param width Width (px)\r\n * @param height Height (px)\r\n * @param crossOrigin Cross-Origin setting\r\n * @return Promise\r\n */\n Export.prototype.loadNewImage = function (url, width, height, crossOrigin) {\n return new Promise(function (success, error) {\n // New image\n var image;\n if (width && height) {\n image = new Image(width, height);\n } else {\n image = new Image();\n }\n // Set crossorigin\n if (crossOrigin) {\n image.setAttribute(\"crossOrigin\", crossOrigin);\n }\n // Report success on load\n image.onload = function () {\n success(image);\n };\n function onerror() {\n // Error occurred. Just in case it's the crossOrigin issue, let's try\n // stripping off this attribute and trying again\n if (crossOrigin) {\n // Retain old uri\n var currentHref = image.src;\n // Set up another `onerror` to handle situations where image is not\n // loadable at all (i.e. protected by CORS)\n image.onerror = function () {\n // Nope, no luck\n error(new Error(\"Loading image \\\"\" + url + \"\\\" failed\"));\n };\n // remove the `crossOrigin` attribute\n image.removeAttribute(\"crossorigin\");\n // retry\n image.src = \"\";\n image.src = currentHref;\n } else {\n error(new Error(\"Loading image \\\"\" + url + \"\\\" failed\"));\n }\n }\n // Set image error handlers\n image.onabort = onerror;\n image.onerror = onerror;\n // Trigger load\n image.src = url;\n });\n };\n /**\r\n * Returns current DOM URL.\r\n *\r\n * @ignore Exclude from docs\r\n * @return URL\r\n */\n Export.prototype.getDOMURL = function () {\n return self.URL || self.webkitURL || self;\n };\n /**\r\n * Returns an SVG representation of the chart.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @param type Type of the export\r\n * @param options Options\r\n * @return Promise\r\n */\n Export.prototype.getSVG = function (type, options) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var prehidden, width, height, font, fontSize, svg, charset, uri;\n return tslib_1.__generator(this, function (_a) {\n prehidden = this._objectsAlreadyHidden;\n if (!prehidden) {\n this.hideNonExportableSprites();\n }\n width = this.sprite.pixelWidth, height = this.sprite.pixelHeight, font = $dom.findFont(this.sprite.dom), fontSize = $dom.findFontSize(this.sprite.dom);\n svg = this.normalizeSVG(this.serializeElement(this.sprite.paper.defs) + this.serializeElement(this.sprite.dom), options, width, height, font, fontSize);\n charset = this.adapter.apply(\"charset\", {\n charset: \"charset=utf-8\",\n type: \"svg\",\n options: options\n }).charset;\n uri = this.adapter.apply(\"getSVG\", {\n data: \"data:\" + this.getContentType(type) + \";\" + charset + \",\" + encodeURIComponent(svg),\n options: options\n }).data;\n if (!prehidden) {\n this.restoreNonExportableSprites();\n }\n return [2 /*return*/, uri];\n });\n });\n };\n /**\r\n * Checks if SVG is fully formatted. Encloses in `<svg>...</svg>` if\r\n * necessary.\r\n *\r\n * @ignore Exclude from docs\r\n * @param svg Input SVG\r\n * @param options Options\r\n * @param width Width of the SVG viewport\r\n * @param height Height of the SVG viewport\r\n * @param font Font family to use as a base\r\n * @param fontSize Font size to use as a base\r\n * @return Output SVG\r\n * @todo Add style params to existing <svg>\r\n */\n Export.prototype.normalizeSVG = function (svg, options, width, height, font, fontSize, background) {\n // Construct width/height params\n var dimParams = \"\";\n if (width) {\n dimParams += \"width=\\\"\" + width + \"px\\\" \";\n }\n if (height) {\n dimParams += \"height=\\\"\" + height + \"px\\\" \";\n }\n // Apply font settings\n var styleParams = \"\";\n if (font) {\n styleParams += \"font-family: \" + font.replace(/\"/g, \"\") + \";\";\n }\n if (fontSize) {\n styleParams += \"font-size: \" + fontSize + \";\";\n }\n // Add missing <svg> enclosure\n if (!svg.match(/<svg/)) {\n svg = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?><svg \" + dimParams + \" style=\\\"\" + styleParams + \"\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\">\" + svg + \"</svg>\";\n } else {\n if (dimParams !== \"\") {\n // Clear current params\n svg = svg.replace(/(<svg[^>]*)width=\"[^\"]*\"/, \"$1\");\n svg = svg.replace(/(<svg[^>]*)height=\"[^\"]*\"/, \"$1\");\n // Add new params\n svg = svg.replace(/(<svg)/, \"$1\" + dimParams);\n }\n /*if (styleParams !== \"\") {\r\n // Clear current params\r\n svg = svg.replace(/(<svg[^>]*)stylewidth=\"[^\"]*\"/, \"$1\");\r\n svg = svg.replace(/(<svg[^>]*)height=\"[^\"]*\"/, \"$1\");\r\n // Add new params\r\n svg = svg.replace(/(<svg)/, \"$1\" + dimParams);\r\n }*/\n }\n if (background) {\n svg = svg.replace(/(<svg[^>]*>)/, \"$1<rect width=\\\"100%\\\" height=\\\"100%\\\" fill=\\\"\" + background.rgba + \"\\\"/>\");\n //svg = svg.replace(/<\\/svg>/, \"<rect width=\\\"100%\\\" height=\\\"100%\\\" fill=\\\"\" + background.rgba + \"\\\"/></svg>\");\n }\n if ($browser.isInternetExplorer()) {\n // IE can't handle exporting <feColorMatrix> for some reason\n svg = svg.replace(/<feColorMatrix [^\\/>]*\\/>/gi, \"\");\n }\n // Remove base uri-related stuff\n var reg = new RegExp(\"url\\\\(\" + $utils.escapeForRgex($utils.getBaseURI()), \"g\");\n svg = svg.replace(reg, \"url(#\");\n svg = this.adapter.apply(\"normalizeSVG\", {\n data: svg,\n options: options\n }).data;\n return svg;\n };\n /**\r\n * Serializes an element and returns its contents.\r\n *\r\n * @ignore Exclude from docs\r\n * @param element An element to serialize\r\n * @return A serialized XML\r\n */\n Export.prototype.serializeElement = function (element) {\n return new XMLSerializer().serializeToString(element);\n };\n /**\r\n * Returns a PDF containing chart image.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @param type Type of the export\r\n * @param options Options\r\n * @return Promise\r\n * @async\r\n * @todo Account for header when calculating vertical fit\r\n */\n Export.prototype.getPDF = function (type, options) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var image, pdfmake, defaultMargins, doc, title;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, this.getImage(options.imageFormat || \"png\", options)];\n case 1:\n image = _a.sent();\n return [4 /*yield*/, this.pdfmake];\n case 2:\n pdfmake = _a.sent();\n defaultMargins = [30, 30, 30, 30];\n doc = {\n pageSize: options.pageSize || \"A4\",\n pageOrientation: options.pageOrientation || \"portrait\",\n pageMargins: options.pageMargins || defaultMargins,\n //header: <any>[],\n content: []\n };\n title = this.adapter.apply(\"title\", {\n title: this.title,\n options: options\n }).title;\n if (title) {\n doc.content.push({\n text: title,\n fontSize: options.fontSize,\n bold: true,\n margin: [0, 0, 0, 15]\n });\n }\n // Add page URL?\n if (options.addURL) {\n doc.content.push({\n text: this.language.translate(\"Saved from\") + \": \" + document.location.href,\n fontSize: options.fontSize,\n margin: [0, 0, 0, 15]\n });\n }\n // Add image\n doc.content.push({\n image: image,\n fit: this.getPageSizeFit(doc.pageSize, doc.pageMargins)\n });\n // Apply adapters\n doc = this.adapter.apply(\"pdfmakeDocument\", {\n doc: doc,\n options: options\n }).doc;\n return [4 /*yield*/, new Promise(function (success, error) {\n pdfmake.createPdf(doc).getDataUrl(function (uri) {\n success(uri);\n });\n })];\n case 3:\n // Create PDF\n return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n /**\r\n * Returns fit dimensions for available page sizes.\r\n *\r\n * @ignore Exclude from docs\r\n * @param pageSize Page size\r\n * @return `[width, height]` in pixels\r\n */\n Export.prototype.getPageSizeFit = function (pageSize, margins) {\n // Check margins\n var newMargins = [0, 0, 0, 0];\n if (typeof margins == \"number\") {\n newMargins = [margins, margins, margins, margins];\n } else if (margins.length == 2) {\n newMargins = [margins[0], margins[1], margins[0], margins[1]];\n } else if (margins.length == 4) {\n newMargins = margins;\n }\n // Define available page sizes\n var sizes = {\n \"4A0\": [4767.87, 6740.79],\n \"2A0\": [3370.39, 4767.87],\n A0: [2383.94, 3370.39],\n A1: [1683.78, 2383.94],\n A2: [1190.55, 1683.78],\n A3: [841.89, 1190.55],\n A4: [595.28, 841.89],\n A5: [419.53, 595.28],\n A6: [297.64, 419.53],\n A7: [209.76, 297.64],\n A8: [147.40, 209.76],\n A9: [104.88, 147.40],\n A10: [73.70, 104.88],\n B0: [2834.65, 4008.19],\n B1: [2004.09, 2834.65],\n B2: [1417.32, 2004.09],\n B3: [1000.63, 1417.32],\n B4: [708.66, 1000.63],\n B5: [498.90, 708.66],\n B6: [354.33, 498.90],\n B7: [249.45, 354.33],\n B8: [175.75, 249.45],\n B9: [124.72, 175.75],\n B10: [87.87, 124.72],\n C0: [2599.37, 3676.54],\n C1: [1836.85, 2599.37],\n C2: [1298.27, 1836.85],\n C3: [918.43, 1298.27],\n C4: [649.13, 918.43],\n C5: [459.21, 649.13],\n C6: [323.15, 459.21],\n C7: [229.61, 323.15],\n C8: [161.57, 229.61],\n C9: [113.39, 161.57],\n C10: [79.37, 113.39],\n RA0: [2437.80, 3458.27],\n RA1: [1729.13, 2437.80],\n RA2: [1218.90, 1729.13],\n RA3: [864.57, 1218.90],\n RA4: [609.45, 864.57],\n SRA0: [2551.18, 3628.35],\n SRA1: [1814.17, 2551.18],\n SRA2: [1275.59, 1814.17],\n SRA3: [907.09, 1275.59],\n SRA4: [637.80, 907.09],\n EXECUTIVE: [521.86, 756.00],\n FOLIO: [612.00, 936.00],\n LEGAL: [612.00, 1008.00],\n LETTER: [612.00, 792.00],\n TABLOID: [792.00, 1224.00]\n };\n // Calculate size\n var fitSize = sizes[pageSize];\n fitSize[0] -= newMargins[0] + newMargins[2];\n fitSize[1] -= newMargins[1] + newMargins[3];\n return fitSize;\n };\n /**\r\n * Returns an Excel file of chart's data.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @param type Type of the export\r\n * @param options Options\r\n * @return Promise\r\n * @async\r\n * @todo Handle dates\r\n * @todo Support for multi-sheet\r\n */\n Export.prototype.getExcel = function (type, options) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var XLSX, wbOptions, sheetName, wb, data, dataFields, len, i, uri;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, this.xlsx];\n case 1:\n XLSX = _a.sent();\n wbOptions = this.adapter.apply(\"xlsxWorkbookOptions\", {\n options: {\n bookType: \"xlsx\",\n bookSST: false,\n type: \"base64\"\n }\n }).options;\n sheetName = this.normalizeExcelSheetName(this.adapter.apply(\"xlsxSheetName\", {\n name: this.title || this.language.translate(\"Data\")\n }).name);\n wb = {\n SheetNames: [sheetName],\n Sheets: {}\n };\n data = [];\n dataFields = this.adapter.apply(\"formatDataFields\", {\n dataFields: this.dataFields,\n format: \"xslx\"\n }).dataFields;\n // Add column names?\n if (options.addColumnNames) {\n data.push(this.getExcelRow(dataFields, options));\n }\n // Add lines\n for (len = this.data.length, i = 0; i < len; i++) {\n data.push(this.getExcelRow(this.data[i], options, dataFields));\n }\n // Create sheet and add data\n wb.Sheets[sheetName] = XLSX.utils.aoa_to_sheet(data);\n uri = this.adapter.apply(\"getExcel\", {\n data: \"data:\" + this.getContentType(type) + \";base64,\" + XLSX.write(wb, wbOptions),\n options: options\n }).data;\n return [2 /*return*/, uri];\n }\n });\n });\n };\n /**\r\n * This is needed to work around Excel limitations.\r\n *\r\n * @param name Source name\r\n * @return Normalized name\r\n */\n Export.prototype.normalizeExcelSheetName = function (name) {\n name = name.replace(/([:\\\\\\/?*\\[\\]]+)/g, \" \");\n return $utils.truncateWithEllipsis(name, 31, \"...\", true);\n };\n /**\r\n * Rertuns an array of values to be used as Excel row.\r\n *\r\n * @ignore Exclude from docs\r\n * @param row Row data\r\n * @param options Options\r\n * @param dataFields Data fields\r\n * @return Array of values\r\n */\n Export.prototype.getExcelRow = function (row, options, dataFields) {\n var _this = this;\n // Init\n var items = [];\n // Data fields\n if (!dataFields) {\n dataFields = row;\n }\n // Process each row item\n $object.each(dataFields, function (key, name) {\n // Get value\n var value = _this.convertEmptyValue(key, row[key], options);\n // Check if we need to skip\n /*if ($type.hasValue(this.dataFields) && !$type.hasValue(this.dataFields[key])) {\r\n return;\r\n }*/\n items.push(_this.convertToDateOrDuration(key, value, options, true));\n });\n return items;\n };\n /**\r\n * Returns chart's data formatted as CSV.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @param type Type of the export\r\n * @param options Options\r\n * @return Promise\r\n * @async\r\n */\n Export.prototype.getCSV = function (type, options) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var csv, dataFields, br, data, len, i, row, charset, uri;\n return tslib_1.__generator(this, function (_a) {\n csv = \"\";\n dataFields = this.adapter.apply(\"formatDataFields\", {\n dataFields: this.dataFields,\n format: \"csv\"\n }).dataFields;\n br = \"\";\n data = this.data;\n for (len = data.length, i = 0; i < len; i++) {\n row = this.getCSVRow(data[i], options, dataFields);\n if (options.reverse) {\n csv = row + br + csv;\n } else {\n csv += br + row;\n }\n br = \"\\n\";\n }\n // Add column names?\n if (options.addColumnNames) {\n csv = this.getCSVRow(dataFields, options) + br + csv;\n }\n charset = this.adapter.apply(\"charset\", {\n charset: \"charset=utf-8\",\n type: type,\n options: options\n }).charset;\n uri = this.adapter.apply(\"getCSV\", {\n data: \"data:\" + this.getContentType(type) + \";\" + charset + \",\" + encodeURIComponent(csv),\n options: options\n }).data;\n return [2 /*return*/, uri];\n });\n });\n };\n /**\r\n * Formats a row of CSV data.\r\n *\r\n * @ignore Exclude from docs\r\n * @param row An object holding data for the row\r\n * @param options Options\r\n * @param dataFields Data fields\r\n * @return Formated CSV line\r\n */\n Export.prototype.getCSVRow = function (row, options, dataFields) {\n var _this = this;\n // Init\n var separator = options.separator || \",\";\n var items = [];\n // Data fields\n if (!dataFields) {\n dataFields = row;\n }\n // Process each row item\n $object.each(dataFields, function (key, name) {\n // Get value\n var value = _this.convertEmptyValue(key, row[key], options);\n // Check if we need to skip\n // This is no longer required because we are iterating via dataFields anyway\n /*if ($type.hasValue(this.dataFields) && !$type.hasValue(this.dataFields[key])) {\r\n return;\r\n }*/\n // Convert dates\n var item = _this.convertToDateOrDuration(key, value, options);\n // Cast and escape doublequotes\n item = \"\" + item;\n item = item.replace(/\"/g, '\"\"');\n // Enclose into double quotes\n if (options.forceQuotes || item.search(new RegExp(\"\\\"|\\n|\" + separator, \"g\")) >= 0) {\n item = \"\\\"\" + item + \"\\\"\";\n }\n // Add to item\n items.push(item);\n });\n return items.join(separator);\n };\n /**\r\n * Returns chart's data in JSON format.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @param type Type of the export\r\n * @param options Options\r\n * @return Promise\r\n * @async\r\n */\n Export.prototype.getJSON = function (type, options) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var _this = this;\n var data, dataFields, sourceData, _loop_2, len, i, json, charset, uri;\n return tslib_1.__generator(this, function (_a) {\n dataFields = this.adapter.apply(\"formatDataFields\", {\n dataFields: this.dataFields,\n format: \"csv\"\n }).dataFields;\n if (!this._dynamicDataFields) {\n data = [];\n sourceData = this.data;\n _loop_2 = function _loop_2(len, i) {\n var value = sourceData[i];\n if (_typeof(value) == \"object\") {\n var newValue_1 = {};\n $object.each(value, function (field, item) {\n if ($type.hasValue(dataFields[field])) {\n newValue_1[dataFields[field]] = _this.convertToDateOrDuration(field, item, options);\n }\n });\n data.push(newValue_1);\n }\n };\n for (len = sourceData.length, i = 0; i < len; i++) {\n _loop_2(len, i);\n }\n } else {\n data = this.data;\n }\n json = JSON.stringify(data, function (key, value) {\n if (_typeof(value) == \"object\") {\n $object.each(value, function (field, item) {\n value[field] = _this.convertToDateOrDuration(field, item, options);\n });\n }\n return value;\n }, options.indent);\n charset = this.adapter.apply(\"charset\", {\n charset: \"charset=utf-8\",\n type: type,\n options: options\n }).charset;\n uri = this.adapter.apply(\"getJSON\", {\n data: \"data:\" + this.getContentType(type) + \";\" + charset + \",\" + encodeURIComponent(json),\n options: options\n }).data;\n return [2 /*return*/, uri];\n });\n });\n };\n /**\r\n * Converts the value to proper date format.\r\n *\r\n * @ignore Exclude from docs\r\n * @param field Field name\r\n * @param value Value\r\n * @param options Options\r\n * @param keepAsDate Will ignore formatting and will keep as Date object if set\r\n * @return Formatted date value or unmodified value\r\n */\n Export.prototype.convertToDateOrDuration = function (field, value, options, keepAsDate) {\n // Is this a timestamp or duration?\n if (typeof value == \"number\") {\n if (this.isDateField(field)) {\n value = new Date(value);\n } else if (this.isDurationField(field)) {\n return this.durationFormatter.format(value, this.durationFormat);\n }\n }\n if (value instanceof Date) {\n if (options.useTimestamps) {\n value = value.getTime();\n } else if (options.useLocale) {\n if (!keepAsDate) {\n value = value.toLocaleString();\n }\n } else {\n value = this.dateFormatter.format(value, this.dateFormat);\n }\n }\n return value;\n };\n /**\r\n * Converts empty value based on `emptyAs` option.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Export.prototype.convertEmptyValue = function (field, value, options) {\n return $type.hasValue(value) ? value : options.emptyAs;\n };\n /**\r\n * Triggers download of the file.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @param uri Data URI with file content\r\n * @param fileName File name\r\n * @return Promise\r\n * @async\r\n */\n Export.prototype.download = function (uri, fileName) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var parts, contentType, decoded, blob_1, chars, i, charCode, blob, link_1, parts, contentType, decoded, blob_2, url_3, chars, i, charCode, blob, url_4, link, parts, contentType, iframe, idoc;\n return tslib_1.__generator(this, function (_a) {\n if (this.msBlobDownloadSupport()) {\n parts = uri.split(\";\");\n contentType = parts.shift().replace(/data:/, \"\");\n uri = decodeURIComponent(parts.join(\";\").replace(/^[^,]*,/, \"\"));\n // Check if we need to Base64-decode\n if ([\"image/svg+xml\", \"application/json\", \"text/csv\"].indexOf(contentType) == -1) {\n try {\n decoded = atob(uri);\n uri = decoded;\n } catch (e) {\n // Error occurred, meaning string was not Base64-encoded. Do nothing.\n return [2 /*return*/, false];\n }\n } else {\n blob_1 = new Blob([uri], {\n type: contentType\n });\n window.navigator.msSaveBlob(blob_1, fileName);\n return [2 /*return*/, true];\n }\n chars = new Array(uri.length);\n for (i = 0; i < uri.length; ++i) {\n charCode = uri.charCodeAt(i);\n chars[i] = charCode;\n }\n blob = new Blob([new Uint8Array(chars)], {\n type: contentType\n });\n window.navigator.msSaveBlob(blob, fileName);\n } else if (this.blobDownloadSupport()) {\n link_1 = document.createElement(\"a\");\n link_1.download = fileName;\n document.body.appendChild(link_1);\n parts = uri.split(\";\");\n contentType = parts.shift().replace(/data:/, \"\");\n uri = decodeURIComponent(parts.join(\";\").replace(/^[^,]*,/, \"\"));\n if ([\"image/svg+xml\", \"application/json\", \"text/csv\"].indexOf(contentType) == -1) {\n try {\n decoded = atob(uri);\n uri = decoded;\n } catch (e) {\n // Error occurred, meaning string was not Base64-encoded. Do nothing.\n return [2 /*return*/, false];\n }\n } else {\n blob_2 = new Blob([uri], {\n type: contentType\n });\n url_3 = window.URL.createObjectURL(blob_2);\n link_1.href = url_3;\n link_1.download = fileName;\n link_1.click();\n setTimeout(function () {\n document.body.removeChild(link_1);\n window.URL.revokeObjectURL(url_3);\n }, 100);\n return [2 /*return*/, true];\n }\n chars = new Array(uri.length);\n for (i = 0; i < uri.length; ++i) {\n charCode = uri.charCodeAt(i);\n chars[i] = charCode;\n }\n blob = new Blob([new Uint8Array(chars)], {\n type: contentType\n });\n url_4 = window.URL.createObjectURL(blob);\n link_1.href = url_4;\n link_1.download = fileName;\n document.body.appendChild(link_1);\n link_1.click();\n document.body.removeChild(link_1);\n setTimeout(function () {\n window.URL.revokeObjectURL(url_4);\n }, 100);\n } else if (this.linkDownloadSupport()) {\n link = document.createElement(\"a\");\n link.download = fileName;\n link.href = uri;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n } else if (this.legacyIE()) {\n parts = uri.match(/^data:(.*);[ ]*([^,]*),(.*)$/);\n if (parts.length === 4) {\n // Base64-encoded or text-based stuff?\n if (parts[2] == \"base64\") {\n // Base64-encoded - probably an image\n if (parts[1].match(/^image\\//)) {\n // Yep, an image. Let's create a temporary image placeholder,\n // so that user can use do Save As.\n this.showModal(\"<img src=\\\"\" + uri + \"\\\" style=\\\"float: left; max-width: 50%; max-height: 80%; margin: 0 1em 0.5em 0; border: 1px solid #eee;\\\" />\" + \"<p>\" + this.language.translate(\"To save the image, right-click thumbnail on the left and choose \\\"Save picture as...\\\"\") + \"</p>\" + \"<p style=\\\"text-align: center;\\\"><small>\" + this.language.translate(\"(Press ESC to close this message)\") + \"</small></p>\", this.language.translate(\"Image Export Complete\"));\n }\n } else {\n contentType = void 0;\n if (fileName.match(/\\.svg$/)) {\n contentType = \"image/svg+xml\";\n } else {\n contentType = \"text/plain\";\n fileName += \".txt\";\n }\n iframe = document.createElement(\"iframe\");\n iframe.width = \"1px\";\n iframe.height = \"1px\";\n iframe.style.display = \"none\";\n document.body.appendChild(iframe);\n idoc = iframe.contentDocument;\n idoc.open(contentType, \"replace\");\n // TODO test this with various encodings (e.g. UTF)\n //idoc.charset = parts[2].replace(/charset=/, \"\");\n idoc.write(decodeURIComponent(parts[3]));\n idoc.close();\n idoc.execCommand(\"SaveAs\", true, fileName);\n // Destroy the iframe\n document.body.removeChild(iframe);\n }\n }\n } else {\n /**\r\n * Something else - perhaps a mobile.\r\n * Let's just display it in the same page.\r\n * (hey we don't like it either)\r\n */\n window.location.href = uri;\n }\n return [2 /*return*/, true];\n });\n });\n };\n /**\r\n * Returns `true` if browser has any supported methods to trigger download\r\n * of a binary file.\r\n *\r\n * @return Supports downloads?\r\n */\n Export.prototype.downloadSupport = function () {\n //return !this.legacyIE();\n return this.linkDownloadSupport() || this.msBlobDownloadSupport();\n };\n /**\r\n * Checks if the browser supports \"download\" attribute on links.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Browser supports triggering downloads?\r\n */\n Export.prototype.linkDownloadSupport = function () {\n // Do we have this cached?\n var cache = registry.getCache(\"linkDownloadSupport\");\n if (cache === false || cache === true) {\n return cache;\n }\n var a = document.createElement(\"a\");\n var res = typeof a.download !== \"undefined\";\n registry.setCache(\"linkDownloadSupport\", res);\n return res;\n };\n /**\r\n * Checks if the browser supports download via `msBlob`.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Browser supports triggering downloads?\r\n */\n Export.prototype.blobDownloadSupport = function () {\n return $type.hasValue(window.Blob);\n };\n /**\r\n * Checks if the browser supports download via `msBlob`.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Browser supports triggering downloads?\r\n */\n Export.prototype.msBlobDownloadSupport = function () {\n return $type.hasValue(window.navigator.msSaveOrOpenBlob);\n };\n /**\r\n * Checks if this is a legacy version of IE.\r\n *\r\n * @ignore Exclude from docs\r\n * @return IE9 or less?\r\n */\n Export.prototype.legacyIE = function () {\n // Create a temporary <div> with conditional tags in it an an <i> tag.\n // Count <i>s. If there are some, we have IE9 or late on our hands.\n var div = document.createElement(\"div\");\n div.innerHTML = \"<!--[if lt IE 10]><i></i><![endif]-->\";\n return div.getElementsByTagName(\"i\").length == 1;\n };\n /**\r\n * Initiates print of the chart.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @param data Data URI for the image\r\n * @param options Options\r\n * @param title Optional title to use (uses window's title by default)\r\n * @return Promise\r\n * @async\r\n */\n Export.prototype.print = function (data, options, title) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n if (options.printMethod == \"css\") {\n return [2 /*return*/, this.printViaCSS(data, options, title)];\n } else {\n return [2 /*return*/, this.printViaIframe(data, options, title)];\n }\n return [2 /*return*/];\n });\n });\n };\n Export.prototype.printViaCSS = function (data, options, title) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var scroll, rule, originalTitle, img, isIOS;\n return tslib_1.__generator(this, function (_a) {\n scroll = document.documentElement.scrollTop || document.body.scrollTop;\n rule = new StyleRule(\"body > *\", {\n \"display\": \"none\",\n \"position\": \"fixed\",\n \"visibility\": \"hidden\",\n \"opacity\": \"0\",\n \"clipPath\": \"polygon(0px 0px,0px 0px,0px 0px,0px 0px);\"\n });\n if (title && document && document.title) {\n originalTitle = document.title;\n document.title = title;\n }\n img = new Image();\n img.src = data;\n img.style.maxWidth = \"100%\";\n img.style.display = \"block\";\n img.style.position = \"relative\";\n img.style.visibility = \"visible\";\n img.style.opacity = \"1\";\n img.style.clipPath = \"none\";\n document.body.appendChild(img);\n // Print\n this.setTimeout(function () {\n window.print();\n }, 50);\n isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\n if (isIOS && options.delay < 1000) {\n options.delay = 1000;\n } else if (options.delay < 100) {\n options.delay = 100;\n }\n // Delay function that resets back the document the way ot was before\n this.setTimeout(function () {\n // Remove image\n document.body.removeChild(img);\n // Reset back all elements\n /*for (let len = items.length, i = 0; i < len; i++) {\r\n let item = <HTMLElement>items[i];\r\n if ($dom.isElement(item)) {\r\n item.style.display = states[i];\r\n }\r\n }*/\n rule.dispose();\n // Restore title\n if (originalTitle) {\n document.title = document.title;\n }\n // Scroll back the document the way it was before\n document.documentElement.scrollTop = document.body.scrollTop = scroll;\n }, options.delay || 500);\n return [2 /*return*/, true];\n });\n });\n };\n Export.prototype.printViaIframe = function (data, options, title) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var iframe, img, isIOS;\n return tslib_1.__generator(this, function (_a) {\n iframe = document.createElement(\"iframe\");\n iframe.style.visibility = \"hidden\";\n document.body.appendChild(iframe);\n // This is needed for FireFox\n iframe.contentWindow.document.open();\n iframe.contentWindow.document.close();\n img = new Image();\n img.src = data;\n img.style.maxWidth = \"100%\";\n if (title) {\n iframe.contentWindow.document.title = title;\n }\n iframe.contentWindow.document.body.appendChild(img);\n iframe.load = function () {\n iframe.contentWindow.document.body.appendChild(img);\n };\n // Print\n this.setTimeout(function () {\n try {\n if (!iframe.contentWindow.document.execCommand(\"print\", false, null)) {\n iframe.contentWindow.print();\n }\n } catch (e) {\n iframe.contentWindow.print();\n }\n }, options.delay || 50);\n isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\n if (isIOS && options.delay < 1000) {\n options.delay = 1000;\n } else if (options.delay < 100) {\n options.delay = 100;\n }\n // Delay function that resets back the document the way ot was before\n this.setTimeout(function () {\n // Remove image\n document.body.removeChild(iframe);\n }, options.delay + 50 || 100);\n return [2 /*return*/, true];\n });\n });\n };\n /**\r\n * Finds a background color for the element. If element is transparent it goes\r\n * up the DOM hierarchy to find a parent element that does.\r\n *\r\n * @ignore Exclude from docs\r\n * @param element Element\r\n * @return Color code\r\n */\n Export.prototype.findBackgroundColor = function (element) {\n // Check if element has styles set\n var opacity = 1,\n currentColor = getComputedStyle(element, \"background-color\");\n // Check opacity\n if (currentColor.match(/[^,]*,[^,]*,[^,]*,[ ]?0/) || currentColor == \"transparent\") {\n opacity = 0;\n }\n if (opacity == 0) {\n var parent_2 = element.parentElement; // || <Element>element.parentNode;\n // Completely transparent. Look for a parent\n if (parent_2) {\n return this.findBackgroundColor(parent_2);\n } else {\n return color(\"#fff\");\n }\n } else {\n return color(currentColor, opacity);\n }\n };\n Object.defineProperty(Export.prototype, \"container\", {\n /**\r\n * @return Reference\r\n */\n get: function get() {\n return this.adapter.apply(\"container\", {\n container: this._container\n }).container;\n },\n /**\r\n * A reference to a container to be used to place [[ExportMenu]] in.\r\n *\r\n * @param value Reference\r\n */\n set: function set(value) {\n this._container = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Export.prototype, \"sprite\", {\n /**\r\n * @return Sprite\r\n */\n get: function get() {\n return this.adapter.apply(\"sprite\", {\n sprite: this._sprite\n }).sprite;\n },\n /**\r\n * A reference to [[Sprite]] to export. Can be any Sprite, including some\r\n * internal elements.\r\n *\r\n * @param value Sprite\r\n */\n set: function set(value) {\n this._sprite = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Export.prototype, \"extraSprites\", {\n /**\r\n * @return Sprite\r\n */\n get: function get() {\n return this.adapter.apply(\"extraSprites\", {\n extraSprites: this._extraSprites\n }).extraSprites;\n },\n /**\r\n * An array of extra [[Sprite] elements to include in export.\r\n *\r\n * It can be used to export any external elements, or even other charts.\r\n *\r\n * E.g.:\r\n *\r\n * ```TypeScript\r\n * chart.exporting.extraSprites.push(chart2);\r\n * ```\r\n * ```JavaScript\r\n * chart.exporting.extraSprites.push(chart2);\r\n * ```\r\n *\r\n * @since 4.2.0\r\n * @param value Sprite\r\n */\n set: function set(value) {\n this._extraSprites = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Export.prototype, \"data\", {\n /**\r\n * @return Data\r\n */\n get: function get() {\n return this.adapter.apply(\"data\", {\n data: this._data\n }).data;\n },\n /**\r\n * Data to export.\r\n *\r\n * @param value Data\r\n */\n set: function set(value) {\n this._data = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Export.prototype, \"dataFields\", {\n /**\r\n * @return Field names `{ field: fieldName }`\r\n */\n get: function get() {\n if (!this._dataFields) {\n this.generateDataFields();\n }\n return this.adapter.apply(\"dataFields\", {\n dataFields: this._dataFields\n }).dataFields;\n },\n /**\r\n * Data fields in `{ field: fieldName }` format. Those are used for\r\n * exporting in data formats to name the columns.\r\n *\r\n * @param value Field names\r\n */\n set: function set(value) {\n this._dataFields = value;\n this._dynamicDataFields = false;\n },\n enumerable: true,\n configurable: true\n });\n Export.prototype.handleDataUpdated = function () {\n if (this._dynamicDataFields) {\n this._dataFields = undefined;\n }\n };\n Object.defineProperty(Export.prototype, \"dateFormatter\", {\n /**\r\n * @return A DateFormatter instance\r\n */\n get: function get() {\n if (!this._dateFormatter) {\n this._dateFormatter = new DateFormatter();\n }\n return this.adapter.apply(\"dateFormatter\", {\n dateFormatter: this._dateFormatter\n }).dateFormatter;\n },\n /**\r\n * A [[DateFormatter]] to use when formatting dates when exporting data.\r\n *\r\n * @param value DateFormatter instance\r\n */\n set: function set(value) {\n this._dateFormatter = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Export.prototype, \"dateFormat\", {\n /**\r\n * @return Date format\r\n */\n get: function get() {\n return this.adapter.apply(\"dateFormat\", {\n dateFormat: this._dateFormat\n }).dateFormat;\n },\n /**\r\n * A date format to use for exporting dates. Will use [[DateFormatter]]\r\n * format if not set.\r\n *\r\n * @param value Date format\r\n */\n set: function set(value) {\n this._dateFormat = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Export.prototype, \"dateFields\", {\n /**\r\n * @return Date field list\r\n */\n get: function get() {\n if (!this._dateFields) {\n this._dateFields = new List();\n }\n return this.adapter.apply(\"dateFields\", {\n dateFields: this._dateFields\n }).dateFields;\n },\n /**\r\n * A list of fields that hold date values.\r\n *\r\n * @param value Date field list\r\n */\n set: function set(value) {\n this._dateFields = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Export.prototype, \"durationFormatter\", {\n /**\r\n * @return A DurationFormatter instance\r\n */\n get: function get() {\n if (!this._durationFormatter) {\n this._durationFormatter = new DurationFormatter();\n }\n return this.adapter.apply(\"durationFormatter\", {\n durationFormatter: this._durationFormatter\n }).durationFormatter;\n },\n /**\r\n * A [[DurationFormatter]] to use when formatting duration values when\r\n * exporting data.\r\n *\r\n * @param value DurationFormatter instance\r\n */\n set: function set(value) {\n this._durationFormatter = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Export.prototype, \"durationFormat\", {\n /**\r\n * @return Duration format\r\n */\n get: function get() {\n return this.adapter.apply(\"durationFormat\", {\n durationFormat: this._durationFormat\n }).durationFormat;\n },\n /**\r\n * A format to use when formatting values from `durationFields`.\r\n * Will use [[DurationFormatter]] format if not set.\r\n *\r\n * @param value Duration format\r\n */\n set: function set(value) {\n this._durationFormat = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Export.prototype, \"durationFields\", {\n /**\r\n * @return Duration field list\r\n */\n get: function get() {\n if (!this._durationFields) {\n this._durationFields = new List();\n }\n return this.adapter.apply(\"durationFields\", {\n durationFields: this._durationFields\n }).durationFields;\n },\n /**\r\n * A list of fields that hold duration values.\r\n *\r\n * @param value Duration field list\r\n */\n set: function set(value) {\n this._durationFields = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Generates data fields out of the first row of data.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Export.prototype.generateDataFields = function () {\n var _this = this;\n this._dataFields = {};\n if (this.data.length) {\n $array.each(this.data, function (row) {\n $object.each(row, function (key, value) {\n if (!$type.hasValue(_this._dataFields[key])) {\n _this._dataFields[key] = _this.adapter.apply(\"dataFieldName\", {\n name: key,\n field: key\n }).name;\n }\n });\n });\n }\n };\n /**\r\n * Cheks against `dateFields` property to determine if this field holds\r\n * dates.\r\n *\r\n * @ignore Exclude from docs\r\n * @param field Field name\r\n * @param options Options\r\n * @return `true` if it's a date field\r\n */\n Export.prototype.isDateField = function (field) {\n return this.adapter.apply(\"isDateField\", {\n isDateField: this.dateFields.contains(field),\n field: field\n }).isDateField;\n };\n /**\r\n * Cheks against `dateFields` property to determine if this field holds\r\n * dates.\r\n *\r\n * @ignore Exclude from docs\r\n * @param field Field name\r\n * @param options Options\r\n * @return `true` if it's a date field\r\n */\n Export.prototype.isDurationField = function (field) {\n return this.adapter.apply(\"isDurationField\", {\n isDurationField: this.durationFields.contains(field),\n field: field\n }).isDurationField;\n };\n /**\r\n * Returns proper content type for the export type.\r\n *\r\n * @param type Export format/type\r\n * @return Proper content type, i.e. \"image/jpeg\"\r\n */\n Export.prototype.getContentType = function (type) {\n var contentType = \"\";\n switch (type) {\n case \"png\":\n case \"gif\":\n contentType = \"image/\" + type;\n break;\n case \"jpg\":\n contentType = \"image/jpeg\";\n break;\n case \"svg\":\n contentType = \"image/svg+xml\";\n break;\n case \"csv\":\n contentType = \"text/csv\";\n break;\n case \"json\":\n contentType = \"application/json\";\n break;\n case \"pdf\":\n contentType = \"application/pdf\";\n break;\n case \"xlsx\":\n contentType = \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n break;\n }\n return this.adapter.apply(\"contentType\", {\n contentType: contentType,\n type: type\n }).contentType;\n };\n Object.defineProperty(Export.prototype, \"filePrefix\", {\n /**\r\n * @return File prefix\r\n */\n get: function get() {\n return this.adapter.apply(\"filePrefix\", {\n filePrefix: this._filePrefix\n }).filePrefix;\n },\n /**\r\n * A file prefix to be used for all exported formats.\r\n *\r\n * Export will apply format-related extension to it. E.g. if this is set to\r\n * \"myExport\", the file name of the PNG exported image will be \"myExport.png\".\r\n *\r\n * @param value File prefix\r\n */\n set: function set(value) {\n this._filePrefix = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Export.prototype, \"backgroundColor\", {\n /**\r\n * @return Background color\r\n */\n get: function get() {\n return this.adapter.apply(\"backgroundColor\", {\n backgroundColor: this._backgroundColor\n }).backgroundColor;\n },\n /**\r\n * A background color to be used for exported images. If set, this will\r\n * override the automatically acquired background color.\r\n *\r\n * @param value Color\r\n */\n set: function set(value) {\n this._backgroundColor = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Export.prototype, \"title\", {\n /**\r\n * @return Title\r\n */\n get: function get() {\n return this.adapter.apply(\"title\", {\n title: this._title\n }).title;\n },\n /**\r\n * A title to be used when printing.\r\n *\r\n * @param value Title\r\n */\n set: function set(value) {\n this._title = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Displays a preloader/exporting indicator.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Add ability to change text\r\n */\n Export.prototype.showPreloader = function () {\n var preloader = this.preloader;\n if (preloader) {\n preloader.progress = 0.5;\n preloader.label.text = \"...\";\n }\n };\n /**\r\n * Hides preloader/exporting indicator\r\n *\r\n * @ignore Exclude from docs\r\n */\n Export.prototype.hidePreloader = function () {\n var preloader = this.preloader;\n if (preloader) {\n preloader.progress = 1;\n }\n };\n Object.defineProperty(Export.prototype, \"preloader\", {\n /**\r\n * Returns a an instance of [[Preloader]] associated with the Sprite being\r\n * exported.\r\n *\r\n * @return Preloader\r\n */\n get: function get() {\n return this._sprite && this._sprite.parent && this._sprite.parent.preloader ? this._sprite.parent.preloader : undefined;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Displays a modal saying export is taking longer than expected.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Export.prototype.showTimeout = function () {\n this.showModal(this.adapter.apply(\"timeoutMessage\", {\n message: this.language.translate(\"Export operation took longer than expected. Something might have gone wrong.\")\n }).message);\n };\n /**\r\n * Hides preloader/exporting indicator.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Export.prototype.hideTimeout = function () {\n if (this._timeoutTimeout) {\n this.removeDispose(this._timeoutTimeout);\n this._timeoutTimeout = null;\n }\n this.hideModal();\n };\n Object.defineProperty(Export.prototype, \"language\", {\n /**\r\n * @return A [[Language]] instance to be used\r\n */\n get: function get() {\n if (!this._language) {\n this._language = new Language();\n }\n return this._language;\n },\n /**\r\n * A [[Language]] instance to be used for translations.\r\n *\r\n * @param value An instance of [[Language]]\r\n */\n set: function set(value) {\n this._language = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Export.prototype, \"modal\", {\n /**\r\n * Returns (and creates) [[Modal]].\r\n *\r\n * @ignore Exclude from docs\r\n * @return Modal instance\r\n */\n get: function get() {\n if (!this._modal) {\n this._modal = new Modal();\n // Prefix with Sprite's class name\n this._modal.adapter.add(\"classPrefix\", function (value) {\n value = options.classNamePrefix + value;\n return value;\n });\n }\n return this._modal;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Shows [[Modal]] with specific text.\r\n *\r\n * @ignore Exclude from docs\r\n * @param text Modal contents\r\n */\n Export.prototype.showModal = function (text, title) {\n // Hide previous modal and preloader\n this.hideModal();\n this.hidePreloader();\n // Create modal\n var modal = this.modal;\n modal.container = this.sprite.svgContainer.SVGContainer;\n modal.content = text;\n modal.readerTitle = title;\n modal.open();\n };\n /**\r\n * Hides modal window if one's currently open.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Export.prototype.hideModal = function () {\n if (this._modal) {\n this.modal.close();\n }\n };\n /**\r\n * Loads canvg dynamic module.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Instance of canvg\r\n * @async\r\n */\n Export.prototype._canvg = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var canvg;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, import( /* webpackChunkName: \"canvg\" */\"canvg\")];\n case 1:\n canvg = _a.sent();\n if (canvg[\"default\"] != null) {\n return [2 /*return*/, canvg[\"default\"]];\n } else {\n return [2 /*return*/, canvg];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n Object.defineProperty(Export.prototype, \"canvg\", {\n /**\r\n * Returns canvg instance.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Instance of canvg\r\n */\n get: function get() {\n return this._canvg();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Export.prototype, \"pdfmake\", {\n /**\r\n * Returns pdfmake instance.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Instance of pdfmake\r\n */\n get: function get() {\n if (pdfmakePromise == null) {\n pdfmakePromise = _pdfmake();\n }\n return pdfmakePromise;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Loads xlsx dynamic module.\r\n *\r\n * This is an asynchronous function. Check the description of `getImage()`\r\n * for description and example usage.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Instance of pdfmake\r\n * @async\r\n */\n Export.prototype._xlsx = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, import( /* webpackChunkName: \"xlsx\" */\"xlsx\")];\n case 1:\n return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n Object.defineProperty(Export.prototype, \"xlsx\", {\n /**\r\n * Returns xlsx instance.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Instance of pdfmake\r\n */\n get: function get() {\n return this._xlsx();\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets options for a format.\r\n */\n Export.prototype.setFormatOptions = function (type, options) {\n this._formatOptions.setKey(type, options);\n };\n /**\r\n * Returns current options for a format.\r\n */\n Export.prototype.getFormatOptions = function (type) {\n return this._formatOptions.getKey(type);\n };\n /**\r\n * Disables interactivity on parent chart.\r\n */\n Export.prototype._disablePointers = function () {\n if (!$type.hasValue(this._spriteInteractionsEnabled)) {\n this._spriteInteractionsEnabled = this.sprite.interactionsEnabled;\n }\n this.sprite.interactionsEnabled = false;\n };\n /**\r\n * Releases temporarily disabled pointers on parent chart.\r\n */\n Export.prototype._releasePointers = function () {\n if ($type.hasValue(this._spriteInteractionsEnabled)) {\n this.sprite.interactionsEnabled = this._spriteInteractionsEnabled;\n }\n };\n /**\r\n * Hides all elements that should not be included in the exported image.\r\n */\n Export.prototype.hideNonExportableSprites = function () {\n var _this = this;\n if (this._objectsAlreadyHidden) {\n return;\n }\n var svgContainer = this.sprite.svgContainer;\n if (svgContainer) {\n $array.each(svgContainer.nonExportableSprites, function (item) {\n if (!item.isHidden && !item.isHiding) {\n _this._hiddenObjects.push(item);\n }\n item.hide(0);\n });\n }\n this._objectsAlreadyHidden = true;\n };\n /**\r\n * Respores elements that were hidden before export.\r\n */\n Export.prototype.restoreNonExportableSprites = function () {\n if (!this._objectsAlreadyHidden) {\n return;\n }\n $array.each(this._hiddenObjects, function (item) {\n item.show(0);\n });\n this._hiddenObjects = [];\n this._objectsAlreadyHidden = false;\n };\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n Export.prototype.processConfig = function (config) {\n registry.registeredClasses[\"ExportMenu\"] = ExportMenu;\n if (config) {\n // Set up menu\n if ($type.hasValue(config.menu) && !$type.hasValue(config.menu.type)) {\n config.menu.type = \"ExportMenu\";\n }\n }\n _super.prototype.processConfig.call(this, config);\n };\n /**\r\n * XLINK namespace definition.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Export.XLINK = \"http://www.w3.org/1999/xlink\";\n return Export;\n}(Validatable);\nexport { Export };","import * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { dataLoader } from \"./DataLoader\";\nimport { JSONParser } from \"./JSONParser\";\nimport { CSVParser } from \"./CSVParser\";\nimport { BaseObjectEvents } from \"../Base\";\nimport { Adapter } from \"../utils/Adapter\";\nimport { Language } from \"../utils/Language\";\nimport { DateFormatter } from \"../formatters/DateFormatter\";\nimport { registry } from \"../Registry\";\nimport * as $type from \"../utils/Type\";\nimport * as $object from \"../utils/Object\";\n;\n;\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Represents a single data source - external file with all of its settings,\r\n * such as format, data parsing, etc.\r\n *\r\n * ```TypeScript\r\n * chart.dataSource.url = \"http://www.myweb.com/data.json\";\r\n * chart.dataSource.parser = am4core.JSONParser;\r\n * ```\r\n * ```JavaScript\r\n * chart.dataSource.url = \"http://www.myweb.com/data.json\";\r\n * chart.dataSource.parser = am4core.JSONParser;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"dataSource\": {\r\n * \"url\": \"http://www.myweb.com/data.json\",\r\n * \"parser\": \"JSONParser\"\r\n * },\r\n * // ...\r\n * }\r\n * ```\r\n *\r\n * @see {@link IDataSourceEvents} for a list of available events\r\n * @see {@link IDataSourceAdapters} for a list of available Adapters\r\n */\nvar DataSource = /** @class */function (_super) {\n tslib_1.__extends(DataSource, _super);\n /**\r\n * Constructor\r\n */\n function DataSource(url, parser) {\n var _this =\n // Init\n _super.call(this) || this;\n /**\r\n * Adapter.\r\n */\n _this.adapter = new Adapter(_this);\n /**\r\n * Custom options for HTTP(S) request.\r\n */\n _this._requestOptions = {};\n /**\r\n * If set to `true`, any subsequent data loads will be considered incremental\r\n * (containing only new data points that are supposed to be added to existing\r\n * data).\r\n *\r\n * NOTE: this setting works only with element's `data` property. It won't\r\n * work with any other externally-loadable data property.\r\n *\r\n * @default false\r\n */\n _this._incremental = false;\n /**\r\n * A collection of key/value pairs to attach to a data source URL when making\r\n * an incremental request.\r\n */\n _this._incrementalParams = {};\n /**\r\n * This setting is used only when `incremental = true`. If set to `true`,\r\n * it will try to retain the same number of data items across each load.\r\n *\r\n * E.g. if incremental load yeilded 5 new records, then 5 items from the\r\n * beginning of data will be removed so that we end up with the same number\r\n * of data items.\r\n *\r\n * @default false\r\n */\n _this._keepCount = false;\n /**\r\n * Will show loading indicator when loading files.\r\n */\n _this.showPreloader = true;\n _this.className = \"DataSource\";\n // Set defaults\n if (url) {\n _this.url = url;\n }\n // Set parser\n if (parser) {\n if (typeof parser == \"string\") {\n _this.parser = dataLoader.getParserByType(parser);\n } else {\n _this.parser = parser;\n }\n }\n return _this;\n }\n /**\r\n * Processes the loaded data.\r\n *\r\n * @ignore Exclude from docs\r\n * @param data Raw (unparsed) data\r\n * @param contentType Content type of the loaded data (optional)\r\n */\n DataSource.prototype.processData = function (data, contentType) {\n // Parsing started\n this.dispatchImmediately(\"parsestarted\");\n // Check if parser is set\n if (!this.parser) {\n // Try to resolve from data\n this.parser = dataLoader.getParserByData(data, contentType);\n if (!this.parser) {\n // We have a problem - nobody knows what to do with the data\n // Raise error\n if (this.events.isEnabled(\"parseerror\")) {\n var event_1 = {\n type: \"parseerror\",\n message: this.language.translate(\"No parser available for file: %1\", null, this.url),\n target: this\n };\n this.events.dispatchImmediately(\"parseerror\", event_1);\n }\n this.dispatchImmediately(\"parseended\");\n return;\n }\n }\n // Apply options adapters\n this.parser.options = this.adapter.apply(\"parserOptions\", this.parser.options);\n this.parser.options.dateFields = this.adapter.apply(\"dateFields\", this.parser.options.dateFields || []);\n this.parser.options.numberFields = this.adapter.apply(\"numberFields\", this.parser.options.numberFields || []);\n // Check if we need to pass in date formatter\n if (this.parser.options.dateFields && !this.parser.options.dateFormatter) {\n this.parser.options.dateFormatter = this.dateFormatter;\n }\n // Parse\n this.data = this.adapter.apply(\"parsedData\", this.parser.parse(this.adapter.apply(\"unparsedData\", data)));\n // Check for parsing errors\n if (!$type.hasValue(this.data) && this.events.isEnabled(\"parseerror\")) {\n var event_2 = {\n type: \"parseerror\",\n message: this.language.translate(\"Error parsing file: %1\", null, this.url),\n target: this\n };\n this.events.dispatchImmediately(\"parseerror\", event_2);\n }\n // Wrap up\n this.dispatchImmediately(\"parseended\");\n if ($type.hasValue(this.data)) {\n this.dispatchImmediately(\"done\", {\n \"data\": this.data\n });\n }\n // The component is responsible for updating its own data vtriggered via\n // events.\n // Update last data load\n this.lastLoad = new Date();\n };\n Object.defineProperty(DataSource.prototype, \"url\", {\n /**\r\n * @return URL\r\n */\n get: function get() {\n // Get URL\n var url = this.disableCache ? this.timestampUrl(this._url) : this._url;\n // Add incremental params\n if (this.incremental && this.component.data.length) {\n url = this.addUrlParams(url, this.incrementalParams);\n }\n return this.adapter.apply(\"url\", url);\n },\n /**\r\n * URL of the data source.\r\n *\r\n * @param value URL\r\n */\n set: function set(value) {\n this._url = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataSource.prototype, \"requestOptions\", {\n /**\r\n * @return Options\r\n */\n get: function get() {\n return this.adapter.apply(\"requestOptions\", this._requestOptions);\n },\n /**\r\n * Custom options for HTTP(S) request.\r\n *\r\n * At this moment the only option supported is: `requestHeaders`, which holds\r\n * an array of objects for custom request headers, e.g.:\r\n *\r\n * ```TypeScript\r\n * chart.dataSource.requestOptions.requestHeaders = [{\r\n * \"key\": \"x-access-token\",\r\n * \"value\": \"123456789\"\r\n * }];\r\n * ``````JavaScript\r\n * chart.dataSource.requestOptions.requestHeaders = [{\r\n * \"key\": \"x-access-token\",\r\n * \"value\": \"123456789\"\r\n * }];\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"dataSource\": {\r\n * // ...\r\n * \"requestOptions\": {\r\n * \"requestHeaders\": [{\r\n * \"key\": \"x-access-token\",\r\n * \"value\": \"123456789\"\r\n * }]\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * NOTE: setting this options on an-already loaded DataSource will not\r\n * trigger a reload.\r\n *\r\n * @param value Options\r\n */\n set: function set(value) {\n this._requestOptions = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataSource.prototype, \"parser\", {\n /**\r\n * @return Data parser\r\n */\n get: function get() {\n if (!this._parser) {\n this._parser = new JSONParser();\n }\n return this.adapter.apply(\"parser\", this._parser);\n },\n /**\r\n * A parser to be used to parse data.\r\n *\r\n * ```TypeScript\r\n * chart.dataSource.url = \"http://www.myweb.com/data.json\";\r\n * chart.dataSource.parser = am4core.JSONParser;\r\n * ```\r\n * ```JavaScript\r\n * chart.dataSource.url = \"http://www.myweb.com/data.json\";\r\n * chart.dataSource.parser = am4core.JSONParser;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"dataSource\": {\r\n * \"url\": \"http://www.myweb.com/data.json\",\r\n * \"parser\": \"JSONParser\"\r\n * },\r\n * // ...\r\n * }\r\n * ```\r\n *\r\n * @default JSONParser\r\n * @param value Data parser\r\n */\n set: function set(value) {\n this._parser = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataSource.prototype, \"reloadFrequency\", {\n /**\r\n * @return Reload frequency (ms)\r\n */\n get: function get() {\n return this.adapter.apply(\"reloadTimeout\", this._reloadFrequency);\n },\n /**\r\n * Data source reload frequency.\r\n *\r\n * If set, it will reload the same URL every X milliseconds.\r\n *\r\n * @param value Reload frequency (ms)\r\n */\n set: function set(value) {\n var _this = this;\n if (this._reloadFrequency != value) {\n this._reloadFrequency = value;\n // Should we schedule a reload?\n if (value) {\n if (!$type.hasValue(this._reloadDisposer)) {\n this._reloadDisposer = this.events.on(\"ended\", function (ev) {\n _this._reloadTimeout = setTimeout(function () {\n _this.load();\n }, _this.reloadFrequency);\n });\n }\n } else if ($type.hasValue(this._reloadDisposer)) {\n this._reloadDisposer.dispose();\n this._reloadDisposer = undefined;\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataSource.prototype, \"incremental\", {\n /**\r\n * @return Incremental load?\r\n */\n get: function get() {\n return this.adapter.apply(\"incremental\", this._incremental);\n },\n /**\r\n * Should subsequent reloads be treated as incremental?\r\n *\r\n * Incremental loads will assume that they contain only new data items\r\n * since the last load.\r\n *\r\n * If `incremental = false` the loader will replace all of the target's\r\n * data with each load.\r\n *\r\n * This setting does not have any effect trhe first time data is loaded.\r\n *\r\n * NOTE: this setting works only with element's `data` property. It won't\r\n * work with any other externally-loadable data property.\r\n *\r\n * @default false\r\n * @param Incremental load?\r\n */\n set: function set(value) {\n this._incremental = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataSource.prototype, \"incrementalParams\", {\n /**\r\n * @return Incremental request parameters\r\n */\n get: function get() {\n return this.adapter.apply(\"incrementalParams\", this._incrementalParams);\n },\n /**\r\n * An object consisting of key/value pairs to apply to an URL when data\r\n * source is making an incremental request.\r\n *\r\n * @param value Incremental request parameters\r\n */\n set: function set(value) {\n this._incrementalParams = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataSource.prototype, \"keepCount\", {\n /**\r\n * @return keepCount load?\r\n */\n get: function get() {\n return this.adapter.apply(\"keepCount\", this._keepCount);\n },\n /**\r\n * This setting is used only when `incremental = true`. If set to `true`,\r\n * it will try to retain the same number of data items across each load.\r\n *\r\n * E.g. if incremental load yeilded 5 new records, then 5 items from the\r\n * beginning of data will be removed so that we end up with the same number\r\n * of data items.\r\n *\r\n * @default false\r\n * @param Keep record count?\r\n */\n set: function set(value) {\n this._keepCount = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataSource.prototype, \"language\", {\n /**\r\n * @return A [[Language]] instance to be used\r\n */\n get: function get() {\n if (this._language) {\n return this._language;\n } else if (this.component) {\n this._language = this.component.language;\n return this._language;\n }\n this.language = new Language();\n return this.language;\n },\n /**\r\n * Language instance to use.\r\n *\r\n * Will inherit and use chart's language, if not set.\r\n *\r\n * @param value An instance of Language\r\n */\n set: function set(value) {\n this._language = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataSource.prototype, \"dateFormatter\", {\n /**\r\n * @return A [[DateFormatter]] instance to be used\r\n */\n get: function get() {\n if (this._dateFormatter) {\n return this._dateFormatter;\n } else if (this.component) {\n this._dateFormatter = this.component.dateFormatter;\n return this._dateFormatter;\n }\n this.dateFormatter = new DateFormatter();\n return this.dateFormatter;\n },\n /**\r\n * A [[DateFormatter]] to use when parsing dates from string formats.\r\n *\r\n * Will inherit and use chart's DateFormatter if not ser.\r\n *\r\n * @param value An instance of [[DateFormatter]]\r\n */\n set: function set(value) {\n this._dateFormatter = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Adds current timestamp to the URL.\r\n *\r\n * @param url Source URL\r\n * @return Timestamped URL\r\n */\n DataSource.prototype.timestampUrl = function (url) {\n var tstamp = new Date().getTime().toString();\n var params = {};\n params[tstamp] = \"\";\n return this.addUrlParams(url, params);\n };\n /**\r\n * Disposes of this object.\r\n */\n DataSource.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n if (this._reloadTimeout) {\n clearTimeout(this._reloadTimeout);\n }\n };\n /**\r\n * Initiate the load.\r\n *\r\n * All loading in JavaScript is asynchronous. This function will trigger the\r\n * load and will exit immediately.\r\n *\r\n * Use DataSource's events to watch for loaded data and errors.\r\n */\n DataSource.prototype.load = function () {\n if (this._reloadTimeout) {\n clearTimeout(this._reloadTimeout);\n }\n dataLoader.load(this);\n };\n /**\r\n * Adds parameters to `url` as query strings. Will take care of proper\r\n * separators.\r\n *\r\n * @param url Source URL\r\n * @param params Parameters\r\n * @return New URL\r\n */\n DataSource.prototype.addUrlParams = function (url, params) {\n var join = url.match(/\\?/) ? \"&\" : \"?\";\n var add = [];\n $object.each(params, function (key, value) {\n if (value != \"\") {\n add.push(key + \"=\" + encodeURIComponent(value));\n } else {\n add.push(key);\n }\n });\n if (add.length) {\n return url + join + add.join(\"&\");\n }\n return url;\n };\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\n DataSource.prototype.processConfig = function (config) {\n registry.registeredClasses[\"json\"] = JSONParser;\n registry.registeredClasses[\"JSONParser\"] = JSONParser;\n registry.registeredClasses[\"csv\"] = CSVParser;\n registry.registeredClasses[\"CSVParser\"] = CSVParser;\n _super.prototype.processConfig.call(this, config);\n };\n return DataSource;\n}(BaseObjectEvents);\nexport { DataSource };","/**\r\n * Pointed rectangle module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { PointedShape } from \"./PointedShape\";\nimport * as $math from \"../utils/Math\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws a rectangle with a pointer.\r\n *\r\n * @see {@link IPointedRectangleEvents} for a list of available events\r\n * @see {@link IPointedRectangleAdapters} for a list of available Adapters\r\n */\nvar PointedRectangle = /** @class */function (_super) {\n tslib_1.__extends(PointedRectangle, _super);\n /**\r\n * Constructor\r\n */\n function PointedRectangle() {\n var _this = _super.call(this) || this;\n _this.className = \"PointedRectangle\";\n _this.element = _this.paper.add(\"path\");\n _this.cornerRadius = 0;\n _this.cornerRadius = 6;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n PointedRectangle.prototype.draw = function () {\n _super.prototype.draw.call(this);\n var cr = this.cornerRadius;\n var w = this.innerWidth;\n var h = this.innerHeight;\n if (w > 0 && h > 0) {\n var x = this.pointerX;\n var y = this.pointerY;\n var bwh = this.pointerBaseWidth / 2;\n var maxcr = $math.min(w / 2, h / 2);\n var crtl = $math.fitToRange(cr, 0, maxcr);\n var crtr = $math.fitToRange(cr, 0, maxcr);\n var crbr = $math.fitToRange(cr, 0, maxcr);\n var crbl = $math.fitToRange(cr, 0, maxcr);\n // corner coordinates\n // top left\n var xtl = 0;\n var ytl = 0;\n // top right\n var xtr = w;\n var ytr = 0;\n // bottom right\n var xbr = w;\n var ybr = h;\n // bottom left\n var xbl = 0;\n var ybl = h;\n var lineT = void 0;\n var lineR = void 0;\n var lineB = void 0;\n var lineL = void 0;\n // find stem base side: http://$math.stackexchange.com/questions/274712/calculate-on-which-side-of-straign-line-is-dot-located\n // d=(x−x1)(y2−y1)−(y−y1)(x2−x1)\n var d1 = (x - xtl) * (ybr - ytl) - (y - ytl) * (xbr - xtl);\n var d2 = (x - xbl) * (ytr - ybl) - (y - ybl) * (xtr - xbl);\n // top\n if (d1 > 0 && d2 > 0) {\n var stemX = $math.fitToRange(x, crtl + bwh, w - bwh - crtr);\n y = $math.fitToRange(y, -Infinity, 0);\n lineT = \"M\" + crtl + \",0 L\" + (stemX - bwh) + \",0 L\" + x + \",\" + y + \" L\" + (stemX + bwh) + \",0 L\" + (w - crtr) + \",0\";\n } else {\n lineT = \"M\" + crtl + \",0 L\" + (w - crtr) + \",0\";\n }\n // bottom\n if (d1 < 0 && d2 < 0) {\n var stemX = $math.fitToRange(x, crbl + bwh, w - bwh - crbr);\n y = $math.fitToRange(y, h, Infinity);\n lineB = \" L\" + (w - crbr) + \",\" + h + \" L\" + (stemX + bwh) + \",\" + h + \" L\" + x + \",\" + y + \" L\" + (stemX - bwh) + \",\" + h + \" L\" + crbl + \",\" + h;\n } else {\n lineB = \" L\" + crbl + \",\" + h;\n }\n // left\n if (d1 < 0 && d2 > 0) {\n var stemY = $math.fitToRange(y, crtl + bwh, h - crbl - bwh);\n x = $math.fitToRange(x, -Infinity, 0);\n lineL = \" L0,\" + (h - crbl) + \" L0,\" + (stemY + bwh) + \" L\" + x + \",\" + y + \" L0,\" + (stemY - bwh) + \" L0,\" + crtl;\n } else {\n lineL = \" L0,\" + crtl;\n }\n // right\n if (d1 > 0 && d2 < 0) {\n var stemY = $math.fitToRange(y, crtr + bwh, h - bwh - crbr);\n x = $math.fitToRange(x, w, Infinity);\n lineR = \" L\" + w + \",\" + crtr + \" L\" + w + \",\" + (stemY - bwh) + \" L\" + x + \",\" + y + \" L\" + w + \",\" + (stemY + bwh) + \" L\" + w + \",\" + (h - crbr);\n } else {\n lineR = \" L\" + w + \",\" + (h - crbr);\n }\n var arcTR = \" a\" + crtr + \",\" + crtr + \" 0 0 1 \" + crtr + \",\" + crtr;\n var arcBR = \" a\" + crbr + \",\" + crbr + \" 0 0 1 -\" + crbr + \",\" + crbr;\n var arcBL = \" a\" + crbl + \",\" + crbl + \" 0 0 1 -\" + crbl + \",-\" + crbl;\n var arcTL = \" a\" + crtl + \",\" + crtl + \" 0 0 1 \" + crtl + \",-\" + crtl;\n this.path = lineT + arcTR + lineR + arcBR + lineB + arcBL + lineL + arcTL;\n }\n };\n Object.defineProperty(PointedRectangle.prototype, \"cornerRadius\", {\n /**\r\n * @return Corner radius (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"cornerRadius\");\n },\n /**\r\n * Radius of rectangle's border in pixels.\r\n *\r\n * @default 0\r\n * @param value Corner radius (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"cornerRadius\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n return PointedRectangle;\n}(PointedShape);\nexport { PointedRectangle };","/**\r\n * Pointed shape module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Sprite } from \"../Sprite\";\nimport * as $type from \"../utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Draws a shape with a pointer.\r\n *\r\n * @see {@link IPointedShapeEvents} for a list of available events\r\n * @see {@link IPointedShapeAdapters} for a list of available Adapters\r\n */\nvar PointedShape = /** @class */function (_super) {\n tslib_1.__extends(PointedShape, _super);\n /**\r\n * Constructor\r\n */\n function PointedShape() {\n var _this = _super.call(this) || this;\n _this.className = \"PointedShape\";\n _this.pointerBaseWidth = 15;\n _this.pointerLength = 10;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n PointedShape.prototype.draw = function () {\n _super.prototype.draw.call(this);\n if (!$type.isNumber(this.pointerX)) {\n this.pointerX = this.pixelWidth / 2;\n }\n if (!$type.isNumber(this.pointerY)) {\n this.pointerY = this.pixelHeight + 10;\n }\n };\n Object.defineProperty(PointedShape.prototype, \"pointerBaseWidth\", {\n /**\r\n * @return Width (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"pointerBaseWidth\");\n },\n /**\r\n * A width of the pinter's (stem's) thick end (base) in pixels.\r\n *\r\n * @default 15\r\n * @param value Width (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"pointerBaseWidth\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PointedShape.prototype, \"pointerLength\", {\n /**\r\n * @return Length (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"pointerLength\");\n },\n /**\r\n * A length of the pinter (stem) in pixels.\r\n *\r\n * @default 10\r\n * @param value Length (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"pointerLength\", value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PointedShape.prototype, \"pointerX\", {\n /**\r\n * @return X\r\n */\n get: function get() {\n return this.getPropertyValue(\"pointerX\");\n },\n /**\r\n * X coordinate the shape is pointing to.\r\n *\r\n * @param value X\r\n */\n set: function set(value) {\n this.setPropertyValue(\"pointerX\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PointedShape.prototype, \"pointerY\", {\n /**\r\n * @return Y\r\n */\n get: function get() {\n return this.getPropertyValue(\"pointerY\");\n },\n /**\r\n * Y coordinate the shape is pointing to.\r\n *\r\n * @param value Y\r\n */\n set: function set(value) {\n this.setPropertyValue(\"pointerY\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n return PointedShape;\n}(Sprite);\nexport { PointedShape };","/**\r\n * Module for \"Drop Shadow\" filter.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Filter } from \"./Filter\";\nimport { color } from \"../../utils/Color\";\nimport { registry } from \"../../Registry\";\n;\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creats a \"Drop Shadow\" filter.\r\n */\nvar DropShadowFilter = /** @class */function (_super) {\n tslib_1.__extends(DropShadowFilter, _super);\n /**\r\n * Constructor\r\n */\n function DropShadowFilter() {\n var _this = _super.call(this) || this;\n _this.className = \"DropShadowFilter\";\n // Create elements\n // NOTE: we do not need to add each individual element to `_disposers`\n // because `filterPrimitives` has an event handler which automatically adds\n // anything added to it to `_disposers`\n _this.color = color(\"#000\");\n _this.feGaussianBlur = _this.paper.add(\"feGaussianBlur\");\n _this.feGaussianBlur.attr({\n \"result\": \"blurOut\",\n \"in\": \"SourceGraphic\"\n });\n _this.filterPrimitives.push(_this.feGaussianBlur);\n _this.feOffset = _this.paper.add(\"feOffset\");\n _this.feOffset.attr({\n \"result\": \"offsetBlur\"\n });\n _this.filterPrimitives.push(_this.feOffset);\n _this.feFlood = _this.paper.add(\"feFlood\");\n _this.feFlood.attr({\n \"flood-color\": _this.color\n });\n _this.filterPrimitives.push(_this.feFlood);\n _this.feComposite = _this.paper.add(\"feComposite\");\n _this.feComposite.attr({\n \"in2\": \"offsetBlur\",\n operator: \"in\"\n });\n _this.filterPrimitives.push(_this.feComposite);\n _this.feMerge = _this.paper.addGroup(\"feMerge\");\n _this.feMerge.add(_this.paper.add(\"feMergeNode\"));\n _this.feMerge.add(_this.paper.add(\"feMergeNode\").attr({\n \"in\": \"SourceGraphic\"\n }));\n _this.filterPrimitives.push(_this.feMerge);\n // Set default properties\n _this.width = 200;\n _this.height = 200;\n _this.blur = 1.5;\n _this.dx = 3;\n _this.dy = 3;\n _this.opacity = 0.5;\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(DropShadowFilter.prototype, \"color\", {\n /**\r\n * @return Color\r\n */\n get: function get() {\n return this.properties.color;\n },\n /**\r\n * Shadow color.\r\n *\r\n * @param value Color\r\n */\n set: function set(value) {\n this.properties.color = value;\n if (this.feFlood) {\n this.feFlood.attr({\n \"flood-color\": value\n });\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DropShadowFilter.prototype, \"opacity\", {\n /**\r\n * @return Opacity (0-1)\r\n */\n get: function get() {\n return this.properties.opacity;\n },\n /**\r\n * Opacity of the shadow. (0-1)\r\n *\r\n * @param value Opacity (0-1)\r\n */\n set: function set(value) {\n this.properties.opacity = value;\n this.feFlood.attr({\n \"flood-opacity\": value\n });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DropShadowFilter.prototype, \"dx\", {\n /**\r\n * @return Horizontal offset (px)\r\n */\n get: function get() {\n return this.properties.dx;\n },\n /**\r\n * Horizontal offset in pixels.\r\n *\r\n * @param value Horizontal offset (px)\r\n */\n set: function set(value) {\n this.properties.dx = value;\n this.feOffset.attr({\n \"dx\": value / this.scale\n });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DropShadowFilter.prototype, \"dy\", {\n /**\r\n * @return Vertical offset (px)\r\n */\n get: function get() {\n return this.properties.dy;\n },\n /**\r\n * Vertical offset in pixels.\r\n *\r\n * @param value Vertical offset (px)\r\n */\n set: function set(value) {\n this.properties.dy = value;\n this.feOffset.attr({\n \"dy\": value / this.scale\n });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DropShadowFilter.prototype, \"blur\", {\n /**\r\n * @return Blur\r\n */\n get: function get() {\n return this.properties.blur;\n },\n /**\r\n * Blur.\r\n *\r\n * @param value Blur\r\n */\n set: function set(value) {\n this.properties.blur = value;\n this.feGaussianBlur.attr({\n \"stdDeviation\": value / this.scale\n });\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * [updateScale description]\r\n *\r\n * @todo Description\r\n */\n DropShadowFilter.prototype.updateScale = function () {\n this.dx = this.dx;\n this.dy = this.dy;\n this.blur = this.blur;\n };\n return DropShadowFilter;\n}(Filter);\nexport { DropShadowFilter };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"DropShadowFilter\"] = DropShadowFilter;","/**\r\n * Functionality for drawing a trapezoid.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Sprite } from \"../Sprite\";\nimport { percent } from \"../../core/utils/Percent\";\nimport { registry } from \"../Registry\";\nimport * as $utils from \"../utils/Utils\";\nimport * as $type from \"../utils/Type\";\nimport * as $path from \"../rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Used to draw a Trapezoid.\r\n *\r\n * @see {@link ITrapezoidEvents} for a list of available events\r\n * @see {@link ITrapezoidAdapters} for a list of available Adapters\r\n */\nvar Trapezoid = /** @class */function (_super) {\n tslib_1.__extends(Trapezoid, _super);\n /**\r\n * Constructor\r\n */\n function Trapezoid() {\n var _this = _super.call(this) || this;\n _this.className = \"Trapezoid\";\n _this.element = _this.paper.add(\"path\");\n _this.topSide = percent(100);\n _this.bottomSide = percent(100);\n _this.leftSide = percent(100);\n _this.rightSide = percent(100);\n _this.isMeasured = false; // todo: add measureElement\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Trapezoid.prototype.draw = function () {\n _super.prototype.draw.call(this);\n var w = this.pixelWidth;\n var h = this.pixelHeight;\n var ts = $utils.relativeToValue(this.topSide, w);\n var bs = $utils.relativeToValue(this.bottomSide, w);\n var ls = $utils.relativeToValue(this.leftSide, h);\n var rs = $utils.relativeToValue(this.rightSide, h);\n // 1----2\n // | |\n // 4----3\n var x0 = (w - ts) / 2;\n var y0 = (h - ls) / 2;\n var x1 = w - (w - ts) / 2;\n var y1 = (h - rs) / 2;\n var x2 = w - (w - bs) / 2;\n var y2 = h - (h - rs) / 2;\n var x3 = (w - bs) / 2;\n var y3 = h - (h - ls) / 2;\n var mt = \"\";\n var mr = \"\";\n var mb = \"\";\n var ml = \"\";\n if ($type.hasValue(this.horizontalNeck)) {\n var hn = this.horizontalNeck.value;\n mt = $path.lineTo({\n x: w * hn,\n y: Math.max(y0, y1)\n });\n mb = $path.lineTo({\n x: w * hn,\n y: Math.min(y2, y3)\n });\n }\n if ($type.hasValue(this.verticalNeck)) {\n var vn = this.verticalNeck.value;\n mr = $path.lineTo({\n x: Math.min(x1, x2),\n y: h * vn\n });\n ml = $path.lineTo({\n x: Math.max(x0, x3),\n y: h * vn\n });\n }\n var path = $path.moveTo({\n x: x0,\n y: y0\n }) + mt + $path.lineTo({\n x: x1,\n y: y1\n }) + mr + $path.lineTo({\n x: x2,\n y: y2\n }) + mb + $path.lineTo({\n x: x3,\n y: y3\n }) + ml;\n this.path = path;\n };\n Object.defineProperty(Trapezoid.prototype, \"topSide\", {\n /**\r\n * @return Width\r\n */\n get: function get() {\n return this.getPropertyValue(\"topSide\");\n },\n /**\r\n * Wdith of the top side. Absolute (px) or relative ([[Percent]]).\r\n *\r\n * @default Percent(100)\r\n * @param value Width\r\n */\n set: function set(value) {\n this.setPercentProperty(\"topSide\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Trapezoid.prototype, \"bottomSide\", {\n /**\r\n * @return Width\r\n */\n get: function get() {\n return this.getPropertyValue(\"bottomSide\");\n },\n /**\r\n * Wdith of the bottom side. Absolute (px) or relative ([[Percent]]).\r\n *\r\n * @default Percent(100)\r\n * @param value Width\r\n */\n set: function set(value) {\n this.setPercentProperty(\"bottomSide\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Trapezoid.prototype, \"leftSide\", {\n /**\r\n * @return Height\r\n */\n get: function get() {\n return this.getPropertyValue(\"leftSide\");\n },\n /**\r\n * Height of the left side. Absolute (px) or relative ([[Percent]]).\r\n *\r\n * @default Percent(100)\r\n * @param value Height\r\n */\n set: function set(value) {\n this.setPercentProperty(\"leftSide\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Trapezoid.prototype, \"rightSide\", {\n /**\r\n * @return Height\r\n */\n get: function get() {\n return this.getPropertyValue(\"rightSide\");\n },\n /**\r\n * Height of the right side. Absolute (px) or relative ([[Percent]]).\r\n *\r\n * @default Percent(100)\r\n * @param value Height\r\n */\n set: function set(value) {\n this.setPercentProperty(\"rightSide\", value, true, false, 10, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Trapezoid.prototype, \"horizontalNeck\", {\n /**\r\n * @return Horizontal neck position\r\n */\n get: function get() {\n return this.getPropertyValue(\"horizontalNeck\");\n },\n /**\r\n * A relative vertical position of the \"neck\". If the top and bottom sides\r\n * are of different width, and `horizontalNeck` is set, a choke point\r\n * will be created at that position, creating a funnel shape.\r\n *\r\n * @param value Horizontal neck position\r\n */\n set: function set(value) {\n this.setPropertyValue(\"horizontalNeck\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Trapezoid.prototype, \"verticalNeck\", {\n /**\r\n * @return Vertical neck position\r\n */\n get: function get() {\n return this.getPropertyValue(\"verticalNeck\");\n },\n /**\r\n * A relative horizontal position of the \"neck\". If the left and right sides\r\n * are of different height, and `verticalNeck` is set, a choke point\r\n * will be created at that position, creating a funnel shape.\r\n *\r\n * @param value Vertical neck position\r\n */\n set: function set(value) {\n this.setPropertyValue(\"verticalNeck\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n return Trapezoid;\n}(Sprite);\nexport { Trapezoid };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"Trapezoid\"] = Trapezoid;","/**\r\n * Zoom out button functionality.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Button } from \"./Button\";\nimport { Sprite } from \"../Sprite\";\nimport { registry } from \"../Registry\";\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\nimport * as $path from \"../rendering/Path\";\nimport * as $type from \"../../core/utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a zoom out button.\r\n *\r\n * @see {@link IZoomOutButtonEvents} for a list of available events\r\n * @see {@link IZoomOutButtonAdapters} for a list of available Adapters\r\n */\nvar ZoomOutButton = /** @class */function (_super) {\n tslib_1.__extends(ZoomOutButton, _super);\n /**\r\n * Constructor\r\n */\n function ZoomOutButton() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"ZoomOutButton\";\n _this.padding(9, 9, 9, 9);\n //this.dx = - 5;\n //this.dy = 5;\n _this.showSystemTooltip = true;\n var interfaceColors = new InterfaceColorSet();\n var background = _this.background;\n background.cornerRadius(20, 20, 20, 20);\n background.fill = interfaceColors.getFor(\"primaryButton\");\n background.stroke = interfaceColors.getFor(\"primaryButtonStroke\");\n background.strokeOpacity = 0;\n background.states.getKey(\"hover\").properties.fill = interfaceColors.getFor(\"primaryButtonHover\");\n background.states.getKey(\"down\").properties.fill = interfaceColors.getFor(\"primaryButtonActive\");\n // Create an icon\n var icon = new Sprite();\n icon.element = _this.paper.add(\"path\");\n var path = $path.moveTo({\n x: 0,\n y: 0\n });\n path += $path.lineTo({\n x: 11,\n y: 0\n });\n icon.path = path;\n icon.pixelPerfect = true;\n icon.padding(8, 3, 8, 3);\n icon.stroke = interfaceColors.getFor(\"primaryButtonText\");\n _this.icon = icon;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Sets defaults that instantiate some objects that rely on parent, so they\r\n * cannot be set in constructor.\r\n */\n ZoomOutButton.prototype.applyInternalDefaults = function () {\n _super.prototype.applyInternalDefaults.call(this);\n if (!$type.hasValue(this.readerTitle)) {\n this.readerTitle = this.language.translate(\"Zoom Out\");\n }\n };\n return ZoomOutButton;\n}(Button);\nexport { ZoomOutButton };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"ZoomOutButton\"] = ZoomOutButton;","/**\r\n * Cone module.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../../Container\";\nimport { Sprite, visualProperties } from \"../../Sprite\";\nimport { Ellipse } from \"../../elements/Ellipse\";\nimport { LinearGradientModifier } from \"../../rendering/fills/LinearGradientModifier\";\nimport { percent } from \"../../utils/Percent\";\nimport * as $object from \"../../utils/Object\";\nimport * as $path from \"../../rendering/Path\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Builds a round cone/cylinder.\r\n *\r\n * @see {@link IConeEvents} for a list of available events\r\n * @see {@link IConeAdapters} for a list of available Adapters\r\n */\nvar Cone = /** @class */function (_super) {\n tslib_1.__extends(Cone, _super);\n /**\r\n * Constructor\r\n */\n function Cone() {\n var _this = _super.call(this) || this;\n _this.className = \"Cone\";\n _this.angle = 30;\n _this.radius = percent(100);\n _this.topRadius = percent(100);\n _this.top = _this.createChild(Ellipse);\n _this.top.shouldClone = false;\n _this.bottom = _this.createChild(Ellipse);\n _this.bottom.shouldClone = false;\n _this.body = _this.createChild(Sprite);\n _this.body.shouldClone = false;\n _this.body.setElement(_this.paper.add(\"path\"));\n _this.layout = \"none\";\n _this.bodyFillModifier = new LinearGradientModifier();\n _this.bodyFillModifier.lightnesses = [0, -0.25, 0];\n _this.body.fillModifier = _this.bodyFillModifier;\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Cone.prototype.draw = function () {\n _super.prototype.draw.call(this);\n $object.copyProperties(this, this.top, visualProperties);\n $object.copyProperties(this, this.bottom, visualProperties);\n $object.copyProperties(this, this.body, visualProperties);\n var w = this.innerWidth;\n var h = this.innerHeight;\n var bottom = this.bottom;\n var top = this.top;\n var angle = this.angle;\n var radiusBase;\n var dx;\n var dy;\n if (this.orientation == \"horizontal\") {\n radiusBase = h / 2;\n bottom.y = h / 2;\n top.y = h / 2;\n top.x = w;\n dx = (90 - angle) / 90;\n dy = 0;\n this.bodyFillModifier.gradient.rotation = 90;\n } else {\n dx = 0;\n dy = (90 - angle) / 90;\n radiusBase = w / 2;\n bottom.y = h;\n bottom.x = w / 2;\n top.x = w / 2;\n this.bodyFillModifier.gradient.rotation = 0;\n }\n var radius = this.radius.value * radiusBase;\n var topRadius = this.topRadius.value * radiusBase;\n bottom.radius = radius - radius * dx;\n bottom.radiusY = radius - radius * dy;\n top.radius = topRadius - topRadius * dx;\n top.radiusY = topRadius - topRadius * dy;\n var path;\n if (this.orientation == \"horizontal\") {\n path = $path.moveTo({\n x: 0,\n y: h / 2 - bottom.radiusY\n }) + $path.arcTo(-90, -180, bottom.radius, bottom.radiusY) + $path.lineTo({\n x: w,\n y: h / 2 + top.radiusY\n }) + $path.arcTo(90, 180, top.radius, top.radiusY) + $path.closePath();\n } else {\n path = $path.moveTo({\n x: w / 2 - top.radius,\n y: 0\n }) + $path.arcTo(180, -180, top.radius, top.radiusY) + $path.lineTo({\n x: w / 2 + bottom.radius,\n y: h\n }) + $path.arcTo(0, 180, bottom.radius, bottom.radiusY) + $path.closePath();\n }\n this.body.path = path;\n };\n Object.defineProperty(Cone.prototype, \"angle\", {\n /**\r\n * @return Angle\r\n */\n get: function get() {\n return this.getPropertyValue(\"angle\");\n },\n /**\r\n * Angle of the point of view to the 3D element. (0-360)\r\n *\r\n * @default 30\r\n * @param value Angle\r\n */\n set: function set(value) {\n this.setPropertyValue(\"angle\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Cone.prototype, \"radius\", {\n /**\r\n * @return Bottom radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"radius\");\n },\n /**\r\n * A relative radius of the cone's bottom (base).\r\n *\r\n * It is relevant to the inner width or height of the element.\r\n *\r\n * @default Percent(100)\r\n * @param value Bottom radius\r\n */\n set: function set(value) {\n this.setPropertyValue(\"radius\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Cone.prototype, \"topRadius\", {\n /**\r\n * @return Top radius\r\n */\n get: function get() {\n return this.getPropertyValue(\"topRadius\");\n },\n /**\r\n * A relative radius of the cone's top (tip).\r\n *\r\n * It is relevant to the inner width or height of the element.\r\n *\r\n * @default Percent(0)\r\n * @param value Top radius\r\n */\n set: function set(value) {\n this.setPropertyValue(\"topRadius\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Cone.prototype, \"orientation\", {\n /**\r\n * Orientation\r\n */\n get: function get() {\n return this.getPropertyValue(\"orientation\");\n },\n /**\r\n * Orientation of the cone\r\n *\r\n * @default \"vertical\"\r\n * @param value Orientation\r\n */\n set: function set(value) {\n this.setPropertyValue(\"orientation\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n return Cone;\n}(Container);\nexport { Cone };","import * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { BaseObject } from \"../../Base\";\nimport { registry } from \"../../Registry\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * A base class for color modifiers.\r\n *\r\n * @ignore Exclude from docs\r\n */\nvar ColorModifier = /** @class */function (_super) {\n tslib_1.__extends(ColorModifier, _super);\n /**\r\n * Constructor\r\n */\n function ColorModifier() {\n var _this = _super.call(this) || this;\n _this.className = \"ColorModifier\";\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Modifies color value.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Original color\r\n * @return Modified\r\n */\n ColorModifier.prototype.modify = function (value) {\n return value;\n };\n return ColorModifier;\n}(BaseObject);\nexport { ColorModifier };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"ColorModifier\"] = ColorModifier;","/**\r\n * Creates a 3D rectangle.\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Container } from \"../../Container\";\nimport { Sprite } from \"../../Sprite\";\nimport * as $math from \"../../utils/Math\";\nimport * as $path from \"../../rendering/Path\";\nimport { Color, color } from \"../../utils/Color\";\nimport { RadialGradient } from \"../../rendering/fills/RadialGradient\";\nimport { LinearGradient } from \"../../rendering/fills/LinearGradient\";\nimport { LightenFilter } from \"../../rendering/filters/LightenFilter\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Builds a 3D rectangle\r\n * @see {@link IRectangle3DEvents} for a list of available events\r\n * @see {@link IRectangle3DAdapters} for a list of available Adapters\r\n */\nvar Rectangle3D = /** @class */function (_super) {\n tslib_1.__extends(Rectangle3D, _super);\n /**\r\n * Constructor\r\n */\n function Rectangle3D() {\n var _this = _super.call(this) || this;\n _this.angle = 30;\n _this.depth = 30;\n _this.className = \"Rectangle3D\";\n _this.layout = \"none\";\n var sideBack = _this.createChild(Sprite);\n sideBack.shouldClone = false;\n sideBack.setElement(_this.paper.add(\"path\"));\n sideBack.isMeasured = false;\n _this.sideBack = sideBack;\n _this._disposers.push(_this.sideBack);\n var sideBottom = _this.createChild(Sprite);\n sideBottom.shouldClone = false;\n sideBottom.setElement(_this.paper.add(\"path\"));\n sideBottom.isMeasured = false;\n _this.sideBottom = sideBottom;\n _this._disposers.push(_this.sideBottom);\n var sideLeft = _this.createChild(Sprite);\n sideLeft.shouldClone = false;\n sideLeft.setElement(_this.paper.add(\"path\"));\n sideLeft.isMeasured = false;\n _this.sideLeft = sideLeft;\n _this._disposers.push(_this.sideLeft);\n var sideRight = _this.createChild(Sprite);\n sideRight.shouldClone = false;\n sideRight.setElement(_this.paper.add(\"path\"));\n sideRight.isMeasured = false;\n _this.sideRight = sideRight;\n _this._disposers.push(_this.sideRight);\n var sideTop = _this.createChild(Sprite);\n sideTop.shouldClone = false;\n sideTop.setElement(_this.paper.add(\"path\"));\n sideTop.isMeasured = false;\n _this.sideTop = sideTop;\n _this._disposers.push(_this.sideTop);\n var sideFront = _this.createChild(Sprite);\n sideFront.shouldClone = false;\n sideFront.setElement(_this.paper.add(\"path\"));\n sideFront.isMeasured = false;\n _this.sideFront = sideFront;\n _this._disposers.push(_this.sideFront);\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Rectangle3D.prototype.draw = function () {\n _super.prototype.draw.call(this);\n var w = this.innerWidth;\n var h = this.innerHeight;\n var depth = this.depth;\n var angle = this.angle;\n var sin = $math.sin(angle);\n var cos = $math.cos(angle);\n var a = {\n x: 0,\n y: 0\n };\n var b = {\n x: w,\n y: 0\n };\n var c = {\n x: w,\n y: h\n };\n var d = {\n x: 0,\n y: h\n };\n var ah = {\n x: depth * cos,\n y: -depth * sin\n };\n var bh = {\n x: depth * cos + w,\n y: -depth * sin\n };\n var ch = {\n x: depth * cos + w,\n y: -depth * sin + h\n };\n var dh = {\n x: depth * cos,\n y: -depth * sin + h\n };\n this.sideFront.path = $path.moveTo(a) + $path.lineTo(b) + $path.lineTo(c) + $path.lineTo(d) + $path.closePath();\n this.sideBack.path = $path.moveTo(ah) + $path.lineTo(bh) + $path.lineTo(ch) + $path.lineTo(dh) + $path.closePath();\n this.sideLeft.path = $path.moveTo(a) + $path.lineTo(ah) + $path.lineTo(dh) + $path.lineTo(d) + $path.closePath();\n this.sideRight.path = $path.moveTo(b) + $path.lineTo(bh) + $path.lineTo(ch) + $path.lineTo(c) + $path.closePath();\n this.sideBottom.path = $path.moveTo(d) + $path.lineTo(dh) + $path.lineTo(ch) + $path.lineTo(c) + $path.closePath();\n this.sideTop.path = $path.moveTo(a) + $path.lineTo(ah) + $path.lineTo(bh) + $path.lineTo(b) + $path.closePath();\n };\n Object.defineProperty(Rectangle3D.prototype, \"depth\", {\n /**\r\n * @return Depth (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"depth\");\n },\n /**\r\n * Depth (Z dimension) of the 3D rectangle in pixels.\r\n *\r\n * @default 30\r\n * @param value Depth (px)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"depth\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Rectangle3D.prototype, \"angle\", {\n /**\r\n * @return Angle\r\n */\n get: function get() {\n return this.getPropertyValue(\"angle\");\n },\n /**\r\n * Angle of the point of view to the 3D element. (0-360)\r\n *\r\n * @default 30\r\n * @param value Angle\r\n */\n set: function set(value) {\n this.setPropertyValue(\"angle\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Sets actual `fill` property on the SVG element, including applicable color\r\n * modifiers.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Fill\r\n */\n Rectangle3D.prototype.setFill = function (value) {\n _super.prototype.setFill.call(this, value);\n var colorStr;\n if (value instanceof Color) {\n colorStr = value.hex;\n } else if (value instanceof LinearGradient || value instanceof RadialGradient) {\n colorStr = value.stops.getIndex(0).color.hex;\n } else {\n var filter = new LightenFilter();\n filter.lightness = -0.2;\n this.sideBack.filters.push(filter);\n var filter2 = filter.clone();\n filter2.lightness = -0.4;\n this.sideLeft.filters.push(filter2);\n var filter3 = filter.clone();\n filter3.lightness = -0.2;\n this.sideRight.filters.push(filter3);\n var filter4 = filter.clone();\n filter4.lightness = -0.1;\n this.sideTop.filters.push(filter4);\n var filter5 = filter.clone();\n filter5.lightness = -0.5;\n this.sideBottom.filters.push(filter5);\n }\n if (colorStr) {\n this.sideBack.fill = color(colorStr).lighten(-0.2);\n this.sideLeft.fill = color(colorStr).lighten(-0.4);\n this.sideRight.fill = color(colorStr).lighten(-0.2);\n this.sideTop.fill = color(colorStr).lighten(-0.1);\n this.sideBottom.fill = color(colorStr).lighten(-0.5);\n }\n };\n /**\r\n * Copies all properties and related data from a different instance of Rectangle3D.\r\n *\r\n * @param source Source Rectangle3D\r\n */\n Rectangle3D.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.sideBack.copyFrom(source.sideBack);\n this.sideLeft.copyFrom(source.sideLeft);\n this.sideRight.copyFrom(source.sideRight);\n this.sideTop.copyFrom(source.sideTop);\n this.sideBottom.copyFrom(source.sideBottom);\n };\n return Rectangle3D;\n}(Container);\nexport { Rectangle3D };","/**\r\n * 3D slice module\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { Slice } from \"../Slice\";\nimport { Sprite } from \"../../Sprite\";\nimport * as $math from \"../../utils/Math\";\nimport * as $path from \"../../rendering/Path\";\nimport * as $type from \"../../utils/Type\";\nimport { Color, color } from \"../../utils/Color\";\nimport { RadialGradient } from \"../../rendering/fills/RadialGradient\";\nimport { LinearGradient } from \"../../rendering/fills/LinearGradient\";\nimport { LightenFilter } from \"../../rendering/filters/LightenFilter\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Used to draw a 3D slice of a Pie chart.\r\n *\r\n * @see {@link ISlice3DEvents} for a list of available events\r\n * @see {@link ISlice3DAdapters} for a list of available Adapters\r\n */\nvar Slice3D = /** @class */function (_super) {\n tslib_1.__extends(Slice3D, _super);\n /**\r\n * Constructor\r\n */\n function Slice3D() {\n var _this =\n // Init\n _super.call(this) || this;\n _this.className = \"Slice3D\";\n _this.layout = \"none\";\n // Create edge container\n var edge = _this.createChild(Sprite);\n _this.edge = edge;\n edge.shouldClone = false;\n edge.isMeasured = false;\n edge.toBack();\n // Set defaults\n _this.angle = 30;\n _this.depth = 20;\n // Create side A element\n var sideA = _this.createChild(Sprite);\n _this.sideA = sideA;\n sideA.shouldClone = false;\n sideA.isMeasured = false;\n //sideA.setElement(this.paper.add(\"path\"));\n //sideA.strokeOpacity = 0;\n // Crate side B element\n var sideB = _this.createChild(Sprite);\n _this.sideB = sideB;\n sideB.shouldClone = false;\n sideB.isMeasured = false;\n //sideB.setElement(this.paper.add(\"path\"));\n //sideB.strokeOpacity = 0;\n // Apply theme\n _this.applyTheme();\n return _this;\n }\n /**\r\n * Sets actual `fill` property on the SVG element, including applicable color\r\n * modifiers.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Fill\r\n */\n Slice3D.prototype.setFill = function (value) {\n _super.prototype.setFill.call(this, value);\n var colorStr;\n if (value instanceof Color) {\n colorStr = value.hex;\n } else if (value instanceof LinearGradient || value instanceof RadialGradient) {\n colorStr = value.stops.getIndex(0).color.hex;\n } else {\n var filter = new LightenFilter();\n filter.lightness = -0.25;\n this.edge.filters.push(filter);\n this.sideA.filters.push(filter.clone());\n this.sideB.filters.push(filter.clone());\n }\n if (colorStr) {\n var edgeFill = color(colorStr).lighten(-0.25);\n this.edge.fill = edgeFill;\n this.sideA.fill = edgeFill;\n this.sideB.fill = edgeFill;\n this.edge.stroke = edgeFill;\n this.sideA.stroke = edgeFill;\n this.sideB.stroke = edgeFill;\n }\n };\n /**\r\n * Draws the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\n Slice3D.prototype.draw = function () {\n this.cornerRadius = 0;\n this.innerCornerRadius = 0;\n _super.prototype.draw.call(this);\n if (this.arc !== 0 && this.radius > 0 && this.depth > 0) {\n this.sideB.show(0);\n this.sideA.show(0);\n this.edge.show(0);\n var startAngle = this.startAngle;\n var arc = this.arc;\n var innerRadius = this.pixelInnerRadius || 0;\n var radiusY = this.radiusY || 0;\n //let cornerRadius = this.cornerRadius || 0;\n //let innerCornerRadius = this.innerCornerRadius;\n var radius = this.radius;\n // this is code duplicate with $path.arc. @todo to think how to avoid it\n var endAngle = startAngle + arc;\n //let crSin = $math.sin($math.min(arc, 45) / 2);\n //innerCornerRadius = innerCornerRadius || cornerRadius;\n var innerRadiusY = radiusY / radius * innerRadius;\n //let cornerRadiusY = (radiusY / radius) * cornerRadius;\n //let innerCornerRadiusY = (radiusY / radius) * innerCornerRadius;\n //cornerRadius = $math.fitToRange(cornerRadius, 0, (radius - innerRadius) / 2);\n //cornerRadiusY = $math.fitToRange(cornerRadiusY, 0, (radiusY - innerRadiusY) / 2);\n //innerCornerRadius = $math.fitToRange(innerCornerRadius, 0, (radius - innerRadius) / 2);\n //innerCornerRadiusY = $math.fitToRange(innerCornerRadiusY, 0, (radiusY - innerRadiusY) / 2);\n //cornerRadius = $math.fitToRange(cornerRadius, 0, radius * crSin);\n //cornerRadiusY = $math.fitToRange(cornerRadiusY, 0, radiusY * crSin);\n //innerCornerRadius = $math.fitToRange(innerCornerRadius, 0, innerRadius * crSin);\n //innerCornerRadiusY = $math.fitToRange(innerCornerRadiusY, 0, innerRadiusY * crSin);\n //let crAngle: number = Math.asin(cornerRadius / radius / 2) * $math.DEGREES * 2;\n //let crAngleY: number = Math.asin(cornerRadiusY / radiusY / 2) * $math.DEGREES * 2;\n //if (innerRadius < innerCornerRadius) {\n //\tinnerRadius = innerCornerRadius;\n //}\n //if (innerRadiusY < innerCornerRadiusY) {\n //\tinnerRadiusY = innerCornerRadiusY;\n //}\n //let crInnerAngle: number = Math.asin(innerCornerRadius / innerRadius / 2) * $math.DEGREES * 2;\n //let crInnerAngleY: number = Math.asin(innerCornerRadiusY / innerRadiusY / 2) * $math.DEGREES * 2;\n //if (!$type.isNumber(crInnerAngle)) {\n //\tcrInnerAngle = 0;\n //}\n //if (!$type.isNumber(crInnerAngleY)) {\n //\tcrInnerAngleY = 0;\n //}\n //let middleAngle = startAngle + arc / 2;\n //let mPoint = { x: $math.round($math.cos(middleAngle) * innerRadius, 4), y: $math.round($math.sin(middleAngle) * innerRadiusY, 4) };\n var a0 = {\n x: $math.cos(startAngle) * innerRadius,\n y: $math.sin(startAngle) * innerRadiusY\n };\n var b0 = {\n x: $math.cos(startAngle) * radius,\n y: $math.sin(startAngle) * radiusY\n };\n var c0 = {\n x: $math.cos(endAngle) * radius,\n y: $math.sin(endAngle) * radiusY\n };\n var d0 = {\n x: $math.cos(endAngle) * innerRadius,\n y: $math.sin(endAngle) * innerRadiusY\n };\n // end of duplicate\n var h = this.depth;\n var ah = {\n x: a0.x,\n y: a0.y - h\n };\n var bh = {\n x: b0.x,\n y: b0.y - h\n };\n var ch = {\n x: c0.x,\n y: c0.y - h\n };\n var dh = {\n x: d0.x,\n y: d0.y - h\n };\n var edgePath = \"\";\n var count = Math.ceil(arc / 5);\n var step = arc / count;\n var mangle = startAngle;\n var prevPoint = bh;\n for (var i = 0; i < count; i++) {\n mangle += step;\n if (mangle > 0 && mangle < 180) {\n edgePath += $path.moveTo(prevPoint);\n var pp = {\n x: $math.cos(mangle) * radius,\n y: $math.sin(mangle) * radiusY - h\n };\n edgePath += $path.lineTo({\n x: prevPoint.x,\n y: prevPoint.y + h\n });\n edgePath += $path.arcToPoint({\n x: pp.x,\n y: pp.y + h\n }, radius, radiusY, true);\n edgePath += $path.lineTo(pp);\n edgePath += $path.arcToPoint(prevPoint, radius, radiusY);\n edgePath += \"z\";\n prevPoint = pp;\n } else {\n edgePath += $path.moveTo(prevPoint);\n var pp = {\n x: $math.cos(mangle) * radius,\n y: $math.sin(mangle) * radiusY - h\n };\n edgePath += $path.arcToPoint(pp, radius, radiusY, true);\n edgePath += $path.lineTo({\n x: pp.x,\n y: pp.y + h\n });\n edgePath += $path.arcToPoint({\n x: prevPoint.x,\n y: prevPoint.y + h\n }, radius, radiusY);\n edgePath += $path.lineTo(prevPoint);\n edgePath += \"z\";\n prevPoint = pp;\n }\n }\n prevPoint = ah;\n mangle = startAngle;\n for (var i = 0; i < count; i++) {\n mangle += step;\n if (mangle > 0 && mangle < 180) {\n edgePath += $path.moveTo(prevPoint);\n var pp = {\n x: $math.cos(mangle) * innerRadius,\n y: $math.sin(mangle) * innerRadiusY - h\n };\n edgePath += $path.lineTo({\n x: prevPoint.x,\n y: prevPoint.y + h\n });\n edgePath += $path.arcToPoint({\n x: pp.x,\n y: pp.y + h\n }, innerRadius, innerRadiusY, true);\n edgePath += $path.lineTo(pp);\n edgePath += $path.arcToPoint(prevPoint, innerRadius, innerRadiusY);\n edgePath += \"z\";\n prevPoint = pp;\n } else {\n edgePath += $path.moveTo(prevPoint);\n var pp = {\n x: $math.cos(mangle) * innerRadius,\n y: $math.sin(mangle) * innerRadiusY - h\n };\n edgePath += $path.arcToPoint(pp, innerRadius, innerRadiusY, true);\n edgePath += $path.lineTo({\n x: pp.x,\n y: pp.y + h\n });\n edgePath += $path.arcToPoint({\n x: prevPoint.x,\n y: prevPoint.y + h\n }, innerRadius, innerRadiusY);\n edgePath += $path.lineTo(prevPoint);\n edgePath += \"z\";\n prevPoint = pp;\n }\n }\n this.edge.path = edgePath;\n /*\r\n a0 = { x: $math.cos(startAngle) * (innerRadius + innerCornerRadius), y: $math.sin(startAngle) * (innerRadiusY + innerCornerRadiusY) };\r\n b0 = { x: $math.cos(startAngle) * (radius - cornerRadius), y: $math.sin(startAngle) * (radiusY - cornerRadiusY) };\r\n c0 = { x: $math.cos(endAngle) * (radius - cornerRadius), y: $math.sin(endAngle) * (radiusY - cornerRadiusY) };\r\n d0 = { x: $math.cos(endAngle) * (innerRadius + innerCornerRadius), y: $math.sin(endAngle) * (innerRadiusY + innerCornerRadiusY) };\r\n // end of duplicate\r\n \r\n ah = { x: a0.x, y: a0.y - h };\r\n bh = { x: b0.x, y: b0.y - h };\r\n ch = { x: c0.x, y: c0.y - h };\r\n dh = { x: d0.x, y: d0.y - h };\r\n */\n this.sideA.path = $path.moveTo(a0) + $path.lineTo(b0) + $path.lineTo(bh) + $path.lineTo(ah) + $path.closePath();\n this.sideB.path = $path.moveTo(c0) + $path.lineTo(d0) + $path.lineTo(dh) + $path.lineTo(ch) + $path.closePath();\n if (this.startAngle < 90) {\n this.sideA.toBack();\n } else {\n this.sideA.toFront();\n }\n if (this.startAngle + this.arc > 90) {\n this.sideB.toBack();\n } else {\n this.sideB.toFront();\n }\n this.slice.dy = -h;\n } else {\n this.sideA.hide(0);\n this.sideB.hide(0);\n this.edge.hide(0);\n }\n };\n Object.defineProperty(Slice3D.prototype, \"depth\", {\n /**\r\n * @return Depth (px)\r\n */\n get: function get() {\n return this.getPropertyValue(\"depth\");\n },\n /**\r\n * Depth (height) of the 3D slice in pixels.\r\n *\r\n * @default 20\r\n * @param depth Depth (px)\r\n */\n set: function set(depth) {\n this.setPropertyValue(\"depth\", depth, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Slice3D.prototype, \"angle\", {\n /**\r\n * @return Angle\r\n */\n get: function get() {\n var angle = this.getPropertyValue(\"angle\");\n if (!$type.isNumber(angle)) {\n angle = 0;\n }\n return angle;\n },\n /**\r\n * Angle of the point of view to the 3D element. (0-360)\r\n *\r\n * @default 30\r\n * @param value Angle\r\n */\n set: function set(value) {\n this.setPropertyValue(\"angle\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Slice3D.prototype, \"radiusY\", {\n /**\r\n * @return Vertical radius (0-1)\r\n */\n get: function get() {\n var radiusY = this.getPropertyValue(\"radiusY\");\n if (!$type.isNumber(radiusY)) {\n radiusY = this.radius - this.radius * this.angle / 90;\n }\n return radiusY;\n },\n /**\r\n * Vertical radius for creating skewed slices.\r\n *\r\n * This is relevant to `radius`, e.g. 0.5 will set vertical radius to half\r\n * the `radius`.\r\n *\r\n * @param value Vertical radius (0-1)\r\n */\n set: function set(value) {\n this.setPropertyValue(\"radiusY\", value, true);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Copies all properties and related data from a different instance of Axis.\r\n *\r\n * @param source Source Axis\r\n */\n Slice3D.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this.edge.copyFrom(source.edge);\n this.sideA.copyFrom(source.sideA);\n this.sideB.copyFrom(source.sideB);\n };\n return Slice3D;\n}(Slice);\nexport { Slice3D };","import { StyleRule } from \"../utils/DOM\";\nimport { InterfaceColorSet } from \"../utils/InterfaceColorSet\";\nimport { Dictionary } from \"../utils/Dictionary\";\nimport { MultiDisposer, CounterDisposer } from \"../utils/Disposer\";\nvar rules = new Dictionary();\n/**\r\n * A dynamically-loadable CSS module for Export menu.\r\n *\r\n * @ignore Exclude from docs\r\n * @param prefix Prefix to addtach to class names\r\n * @return A MultiDisposer with style rules\r\n */\nexport default function (prefix) {\n var newPrefix = prefix ? prefix : \"amexport\";\n var colorSet = new InterfaceColorSet();\n var counter = rules.insertKeyIfEmpty(newPrefix, function () {\n var disposer = new MultiDisposer([\n /*new StyleRule(`.${newPrefix}-menu`, {\r\n \"opacity\": \"0.3\",\r\n \"transition\": \"all 100ms ease-in-out\",\r\n }),\r\n new StyleRule(`div:hover .${newPrefix}-menu, .${newPrefix}-menu.active`, {\r\n \"opacity\": \"0.9\",\r\n }),*/\n new StyleRule(\".\" + newPrefix + \"-menu-level-0\", {\n \"position\": \"absolute\",\n \"top\": \"5px\",\n \"right\": \"5px\"\n }), new StyleRule(\".\" + newPrefix + \"-menu-level-0.\" + newPrefix + \"-left\", {\n \"right\": \"auto\",\n \"left\": \"5px\"\n }), new StyleRule(\".\" + newPrefix + \"-menu-level-0.\" + newPrefix + \"-right\", {\n \"right\": \"5px\",\n \"left\": \"auto\"\n }), new StyleRule(\".\" + newPrefix + \"-menu-level-0.\" + newPrefix + \"-top\", {\n \"top\": \"5px\",\n \"bottom\": \"auto\"\n }), new StyleRule(\".\" + newPrefix + \"-menu-level-0.\" + newPrefix + \"-bottom\", {\n \"top\": \"auto\",\n \"bottom\": \"5px\"\n }), new StyleRule(\".\" + newPrefix + \"-item.\" + newPrefix + \"-item-level-0\", {\n \"opacity\": \"0.3\",\n \"width\": \"30px\",\n \"height\": \"30px\",\n \"transition\": \"all 100ms ease-in-out\"\n }), new StyleRule(\"div:hover .\" + newPrefix + \"-item.\" + newPrefix + \"-item-level-0, .\" + newPrefix + \"-item.\" + newPrefix + \"-item-level-0.active\", {\n \"opacity\": \"0.9\"\n }), new StyleRule(\".\" + newPrefix + \"-item.\" + newPrefix + \"-item-level-0 > a\", {\n \"padding\": \"0\",\n \"text-align\": \"center\"\n }), new StyleRule(\".\" + newPrefix + \"-item.\" + newPrefix + \"-item-level-0:before\", {\n \"display\": \"block\"\n }), new StyleRule(\".\" + newPrefix + \"-item\", {\n \"position\": \"relative\",\n \"display\": \"block\",\n \"opacity\": \"0\",\n \"z-index\": \"1\",\n \"border-radius\": \"3px\",\n \"background-color\": colorSet.getFor(\"secondaryButton\").hex,\n \"padding\": \"0\",\n \"margin\": \"1px 1px 0 0\",\n \"color\": colorSet.getFor(\"secondaryButton\").alternative.hex,\n \"transition\": \"all 100ms ease-in-out, opacity 0.5s ease 0.5s\"\n }), new StyleRule(\".\" + newPrefix + \"-left .\" + newPrefix + \"-item\", {\n \"margin\": \"1px 0 0 1px\"\n }), new StyleRule(\".\" + newPrefix + \"-item:hover, .\" + newPrefix + \"-item.active\", {\n \"background\": colorSet.getFor(\"secondaryButtonHover\").hex,\n \"color\": colorSet.getFor(\"secondaryButtonText\").hex\n }), new StyleRule(\".\" + newPrefix + \"-item > .\" + newPrefix + \"-menu\", {\n \"position\": \"absolute\",\n \"top\": \"-1px\",\n \"right\": \"0\",\n \"margin-right\": \"100%\"\n }), new StyleRule(\".\" + newPrefix + \"-left .\" + newPrefix + \"-item > .\" + newPrefix + \"-menu\", {\n \"left\": \"0\",\n \"right\": \"auto\",\n \"margin-left\": \"100%\",\n \"margin-right\": \"auto\"\n }), new StyleRule(\".\" + newPrefix + \"-right .\" + newPrefix + \"-item > .\" + newPrefix + \"-menu\", {\n \"left\": \"auto\",\n \"right\": \"0\",\n \"margin-left\": \"auto\",\n \"margin-right\": \"100%\"\n }), new StyleRule(\".\" + newPrefix + \"-top .\" + newPrefix + \"-item > .\" + newPrefix + \"-menu\", {\n \"top\": \"-1px\",\n \"bottom\": \"auto\"\n }), new StyleRule(\".\" + newPrefix + \"-bottom .\" + newPrefix + \"-item > .\" + newPrefix + \"-menu\", {\n \"top\": \"auto\",\n \"bottom\": \"0\"\n }), new StyleRule(\".\" + newPrefix + \"-item > .\" + newPrefix + \"-menu\", {\n \"display\": \"none\"\n }), new StyleRule(\".\" + newPrefix + \"-item:hover > .\" + newPrefix + \"-menu, .\" + newPrefix + \"-item.active > .\" + newPrefix + \"-menu\", {\n \"display\": \"block\"\n }), new StyleRule(\".\" + newPrefix + \"-item:hover > .\" + newPrefix + \"-menu > .\" + newPrefix + \"-item, .\" + newPrefix + \"-item.active > .\" + newPrefix + \"-menu > .\" + newPrefix + \"-item\", {\n \"opacity\": \"1\"\n }), new StyleRule(\".\" + newPrefix + \"-menu\", {\n \"display\": \"block\",\n \"list-style\": \"none\",\n \"margin\": \"0\",\n \"padding\": \"0\"\n }), new StyleRule(\".\" + newPrefix + \"-label\", {\n \"display\": \"block\",\n \"cursor\": \"default\",\n \"padding\": \"0.5em 1em\"\n }), new StyleRule(\".\" + newPrefix + \"-clickable\", {\n \"cursor\": \"pointer\"\n })]);\n return new CounterDisposer(function () {\n rules.removeKey(newPrefix);\n disposer.dispose();\n });\n });\n return counter.increment();\n}","/**\r\n * ExportMenu provides functionality for building Export menu\r\n */\nimport * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport exportCSS from \"./ExportCSS\";\nimport { Adapter } from \"../utils/Adapter\";\nimport { List } from \"../utils/List\";\nimport { getInteraction } from \"../interaction/Interaction\";\nimport { MutableValueDisposer } from \"../utils/Disposer\";\nimport { Language } from \"../utils/Language\";\nimport { Validatable } from \"../utils/Validatable\";\nimport { keyboard } from \"../utils/Keyboard\";\nimport * as $utils from \"../utils/Utils\";\nimport * as $iter from \"../utils/Iterator\";\nimport * as $dom from \"../utils/DOM\";\nimport * as $type from \"../utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * Creates a menu for Export operations.\r\n *\r\n * To add an export menu to a chart, set this to a new instance of\r\n * [[ExportMenu]].\r\n *\r\n * ```TypeScript\r\n * chart.exporting.menu = new am4core.ExportMenu();\r\n * ```\r\n * ```JavaScript\r\n * chart.exporting.menu = new am4core.ExportMenu();\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"exporting\": {\r\n * \"menu\": {}\r\n * }\r\n * }\r\n * ```\r\n * @important\r\n */\nvar ExportMenu = /** @class */function (_super) {\n tslib_1.__extends(ExportMenu, _super);\n /**\r\n * Constructor\r\n */\n function ExportMenu() {\n var _this = _super.call(this) || this;\n /**\r\n * An [[Adapter]].\r\n */\n _this.adapter = new Adapter(_this);\n /**\r\n * How many milliseconds to hold menu/sub-menu open after it loses focus or\r\n * hover, before auto-closing it.\r\n *\r\n * @default 1000\r\n */\n _this.closeDelay = 1000;\n /**\r\n * Close the menu automatically when some export operation is triggered.\r\n *\r\n * @default true\r\n * @since 4.2.2\r\n */\n _this.closeOnClick = true;\n /**\r\n * An instance of [[Language]].\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._language = new MutableValueDisposer();\n /**\r\n * What HTML tags to use to build menu.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._menuTag = \"ul\";\n /**\r\n * Which tag to use to enclose individual menu items.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._itemTag = \"li\";\n /**\r\n * Tag to wrap menu item labels in.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._labelTag = \"a\";\n /**\r\n * Prefix for class names applied to menu elements.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._classPrefix = \"amexport\";\n /**\r\n * If set to `true` [[ExportMenu]] will load it's own external CSS when\r\n * instantiated.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._defaultStyles = true;\n /**\r\n * Horizontal positioning.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._align = \"right\";\n /**\r\n * Vertical positioning.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._verticalAlign = \"top\";\n /**\r\n * A tabindex to apply to Export Menu.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._tabindex = 0;\n /**\r\n * Whether next menu close event should be ignored.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._ignoreNextClose = false;\n /**\r\n * Default menu items.\r\n *\r\n * @ignore Exclude from docs\r\n */\n _this._items = [{\n \"label\": \"...\",\n \"menu\": [{\n \"label\": \"Image\",\n \"menu\": [{\n \"type\": \"png\",\n \"label\": \"PNG\"\n }, {\n \"type\": \"jpg\",\n \"label\": \"JPG\"\n }, {\n \"type\": \"gif\",\n \"label\": \"GIF\"\n }, {\n \"type\": \"svg\",\n \"label\": \"SVG\"\n }, {\n \"type\": \"pdf\",\n \"label\": \"PDF\"\n }]\n }, {\n \"label\": \"Data\",\n \"menu\": [{\n \"type\": \"json\",\n \"label\": \"JSON\"\n }, {\n \"type\": \"csv\",\n \"label\": \"CSV\"\n }, {\n \"type\": \"xlsx\",\n \"label\": \"XLSX\"\n }]\n }, {\n \"label\": \"Print\",\n \"type\": \"print\"\n }]\n }];\n _this.className = \"ExportMenu\";\n _this._disposers.push(_this._language);\n _this.invalidate();\n _this.applyTheme();\n return _this;\n }\n /**\r\n * (Re)draws the Export menu.\r\n *\r\n * @ignore Exclude from docs\r\n */\n ExportMenu.prototype.validate = function () {\n this.draw();\n _super.prototype.validate.call(this);\n };\n /**\r\n * Draws the menu based on current items.\r\n *\r\n * Normally, there's no need to call this explicitly. The chart, if it has\r\n * export menu enabled, will automatically draw the menu.\r\n */\n ExportMenu.prototype.draw = function () {\n var _this = this;\n // Create top-level menu item, or clear it\n if (!this._element) {\n this._element = this.createMenuElement(0);\n } else {\n this._element.innerHTML = \"\";\n this._element.className = this.getMenuItemClass(0);\n }\n // See if we're loading external CSS\n // Hide it until CSS is loaded\n if (this.defaultStyles) {\n this._element.style.display = \"none\";\n }\n // Append to container\n $type.getValue(this._container).appendChild(this._element);\n // Apply adapter to menu items before processing\n this._items = this.adapter.apply(\"items\", {\n items: this._items\n }).items;\n for (var len = this._items.length, i = 0; i < len; i++) {\n this.drawBranch(this._element, this._items[i], 0);\n }\n // Apply adapter to finalized menu element\n this._element = this.adapter.apply(\"menuElement\", {\n menuElement: this._element\n }).menuElement;\n // Set up global \"down\" event\n this._disposers.push(getInteraction().body.events.on(\"down\", function (ev) {\n if (!ev.pointer.touch) {\n _this._ignoreNextClose = false;\n }\n _this.close();\n }));\n // Set up global event on ESC press to close the menu\n this._disposers.push(getInteraction().body.events.on(\"keyup\", function (ev) {\n var key = keyboard.getEventKey(ev.event);\n switch (key) {\n case \"esc\":\n _this.close();\n break;\n case \"up\":\n case \"down\":\n case \"left\":\n case \"right\":\n _this.moveSelection(key);\n break;\n }\n }));\n if (this.defaultStyles) {\n this.loadDefaultCSS();\n }\n };\n /**\r\n * Creates a new branch in export menu. This function is recursive for\r\n * building multi-level menus.\r\n *\r\n * @ignore Exclude from docs\r\n * @param container Container to put branch elements in\r\n * @param branch Menu item\r\n * @param level Current nesting level\r\n */\n ExportMenu.prototype.drawBranch = function (container, branch, level) {\n var _this = this;\n // Apply adapter\n branch = this.adapter.apply(\"branch\", {\n branch: branch,\n level: level\n }).branch;\n // Unsupported?\n // ExportMenu does not check or know for specific browser/system\n // capabilities. It must happen in some other code and applied via Adapter.\n // Export itself will check compatibility, but there might be other plugins\n // that influence it or even add any specific export functionality.\n if (branch.unsupported === true) {\n return;\n }\n // Init ascendants\n if (!branch.ascendants) {\n branch.ascendants = new List();\n }\n // Get type\n var type = branch.type;\n // Create an item\n var element = this.createItemElement(level, type);\n // Create label\n var label = this.createLabelElement(level, type);\n label.innerHTML = branch.label ? this.language.translate(branch.label) : \"\";\n // Apply reader text to label\n var readerLabel = this.getReaderLabel(branch, label.innerHTML);\n label.setAttribute(\"aria-label\", readerLabel);\n // Add Label\n element.appendChild(label);\n // Create interaction object\n // TODO clean this up when it's disposed\n branch.interactions = getInteraction().getInteraction(label);\n // Create interaction manager we can set event listeners to\n if (this.typeClickable(type)) {\n //branch.interactions.clickable = true;\n // TODO clean this up when it's disposed\n branch.interactions.events.on(\"hit\", function (ev) {\n if (_this.events.isEnabled(\"hit\")) {\n var event_1 = {\n \"type\": \"hit\",\n \"event\": ev.event,\n \"target\": _this,\n \"branch\": branch\n };\n _this.events.dispatchImmediately(\"hit\", event_1);\n }\n });\n // TODO clean this up when it's disposed\n branch.interactions.events.on(\"keyup\", function (ev) {\n if (keyboard.isKey(ev.event, \"enter\")) {\n if (_this.events.isEnabled(\"enter\")) {\n var event_2 = {\n \"type\": \"enter\",\n \"event\": ev.event,\n \"target\": _this,\n \"branch\": branch\n };\n _this.events.dispatchImmediately(\"enter\", event_2);\n }\n }\n });\n }\n {\n var submenu_1 = this.getSubMenu(branch);\n // Add ENTER event to open sub-menus\n if (submenu_1 != null) {\n // TODO clean this up when it's disposed\n branch.interactions.events.on(\"keyup\", function (ev) {\n if (keyboard.isKey(ev.event, \"enter\")) {\n // This is item has sub-menu, activate the first child on ENTER\n _this.selectBranch(submenu_1[0]);\n // Attempt to set focus\n _this.setFocus(submenu_1[0]);\n }\n });\n branch.interactions.events.on(\"hit\", function (ev) {\n _this.selectBranch(branch);\n });\n }\n }\n // Add events\n // TODO clean this up when it's disposed\n branch.interactions.events.on(\"over\", function (ev) {\n if (ev.pointer.touch) {\n // Cancel pending menu closure\n _this._ignoreNextClose = true;\n }\n _this.selectBranch(branch);\n if (_this.events.isEnabled(\"over\")) {\n var event_3 = {\n \"type\": \"over\",\n \"event\": ev.event,\n \"target\": _this,\n \"branch\": branch\n };\n _this.events.dispatchImmediately(\"over\", event_3);\n }\n });\n // TODO clean this up when it's disposed\n branch.interactions.events.on(\"out\", function (ev) {\n if (!ev.pointer.touch) {\n _this.delayUnselectBranch(branch);\n }\n if (_this.events.isEnabled(\"out\")) {\n var event_4 = {\n \"type\": \"out\",\n \"event\": ev.event,\n \"target\": _this,\n \"branch\": branch\n };\n _this.events.dispatchImmediately(\"out\", event_4);\n }\n });\n // TODO clean this up when it's disposed\n branch.interactions.events.on(\"focus\", function (ev) {\n _this.selectBranch(branch);\n });\n // TODO clean this up when it's disposed\n branch.interactions.events.on(\"blur\", function (ev) {\n _this.delayUnselectBranch(branch);\n });\n // Increment level\n var local_level = level + 1;\n // Has sub-menu?\n if (branch.menu) {\n var submenu = this.createMenuElement(local_level);\n for (var len = branch.menu.length, i = 0; i < len; i++) {\n var ascendants = new List();\n branch.menu[i].ascendants = ascendants;\n if (branch.ascendants.length) {\n ascendants.copyFrom(branch.ascendants);\n }\n ascendants.push(branch);\n this.drawBranch(submenu, branch.menu[i], local_level);\n }\n // Sub-menu is empty (all items are not supported)\n // Do not draw this menu item at all\n if (submenu.innerHTML == \"\") {\n return;\n }\n element.appendChild(submenu);\n }\n // Append to container\n container.appendChild(element);\n };\n /**\r\n * Creates a menu element to hold its elements in. Usually it's an `<ul>`\r\n * tag.\r\n *\r\n * @ignore Exclude from docs\r\n * @param level Current nesting level\r\n * @return HTML element reference\r\n */\n ExportMenu.prototype.createMenuElement = function (level) {\n var element = document.createElement(this.menuTag);\n element.className = this.getMenuItemClass(level);\n // Accessibility\n if (level === 0) {\n element.setAttribute(\"role\", \"menu\");\n }\n return element;\n };\n /**\r\n * Generates a class name for the menu element based on its nesting level.\r\n *\r\n * @ignore Exclude from docs\r\n * @param level Current nesting level\r\n * @return Class name(s)\r\n */\n ExportMenu.prototype.getMenuItemClass = function (level) {\n var className = this.classPrefix + \"-menu \" + this.classPrefix + \"-menu-level-\" + level;\n if (level === 0) {\n className += \" \" + this.classPrefix + \"-menu-root \" + this.classPrefix + \"-\" + this.align + \" \" + this.classPrefix + \"-\" + this.verticalAlign;\n }\n return this.adapter.apply(\"menuClass\", {\n className: className,\n level: level\n }).className;\n };\n /**\r\n * Creates menu item. Usually `<li>` tag. Its label and sub-elements will go\r\n * into this element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param level Current nesting level\r\n * @param type Type of the menu item\r\n * @return HTML element reference\r\n */\n ExportMenu.prototype.createItemElement = function (level, type) {\n var element = document.createElement(this.itemTag);\n var className = this.classPrefix + \"-item \" + this.classPrefix + \"-item-level-\" + level + \" \" + this.classPrefix + \"-item-\" + (type || \"blank\");\n element.className = this.adapter.apply(\"itemClass\", {\n className: className,\n level: level,\n type: type\n }).className;\n return element;\n };\n /**\r\n * Creates a \"label\" part of the menu item. It could be text or any HTML\r\n * content.\r\n *\r\n * @ignore Exclude from docs\r\n * @param level Current nesting level\r\n * @param type Type of the menu item\r\n * @return An HTML Element\r\n */\n ExportMenu.prototype.createLabelElement = function (level, type) {\n var element = document.createElement(this.labelTag);\n var className = this.classPrefix + \"-label \" + this.classPrefix + \"-label-level-\" + level + \" \" + this.classPrefix + \"-item-\" + (type || \"blank\");\n if (this.typeClickable(type)) {\n className += \" \" + this.classPrefix + \"-clickable\";\n }\n element.className = this.adapter.apply(\"labelClass\", {\n className: className,\n level: level,\n type: type\n }).className;\n // Accessible navigation\n element.setAttribute(\"tabindex\", this.tabindex.toString());\n element.setAttribute(\"role\", \"menuitem\");\n return element;\n };\n /**\r\n * Destroys the menu and all its elements.\r\n */\n ExportMenu.prototype.dispose = function () {\n if (!this._disposed) {\n _super.prototype.dispose.call(this);\n if (this._element && this._element.parentNode) {\n this._element.parentNode.removeChild(this._element);\n }\n }\n };\n /**\r\n * Checks whether menu item type is supposed to be clickable.\r\n *\r\n * @ignore Exclude from docs\r\n * @param type Menu item type\r\n * @return Is clickable?\r\n */\n ExportMenu.prototype.typeClickable = function (type) {\n return $type.hasValue(type);\n };\n /**\r\n * Checks whether menu item has any sub-items.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch A menu item\r\n * @return Has sub-items?\r\n */\n ExportMenu.prototype.hasSubMenu = function (branch) {\n return branch.menu && branch.menu.length ? true : false;\n };\n /**\r\n * Returns sub-items (if they exist).\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch A menu item\r\n * @return Submenus\r\n */\n ExportMenu.prototype.getSubMenu = function (branch) {\n if (branch.menu && branch.menu.length) {\n return branch.menu;\n }\n };\n /**\r\n * Generates and returns an applicable label to be used for screen readers.\r\n *\r\n * @ignore Exclude from docs\r\n * @param item A menu item instance\r\n * @param label Current label\r\n * @return Reader text\r\n */\n ExportMenu.prototype.getReaderLabel = function (branch, label) {\n // Strip any HTML from the label\n label = $utils.stripTags(label);\n // Add textual note if the branch is clickable\n if (this.hasSubMenu(branch)) {\n label += \" [\" + this.language.translate(\"Click, tap or press ENTER to open\") + \"]\";\n } else if (branch.type == \"print\") {\n label = this.language.translate(\"Click, tap or press ENTER to print.\");\n } else if (this.typeClickable(branch.type)) {\n label = this.language.translate(\"Click, tap or press ENTER to export as %1.\", undefined, label);\n }\n return this.adapter.apply(\"rederLabel\", {\n label: label,\n branch: branch\n }).label;\n };\n Object.defineProperty(ExportMenu.prototype, \"container\", {\n /**\r\n * @return Container\r\n */\n get: function get() {\n return this._container;\n },\n /**\r\n * Getters and setters\r\n */\n /**\r\n * An HTML container to place the Menu in.\r\n *\r\n * A container must be an HTML element, because menu itself is HTML, and\r\n * cannot be placed into SVG.\r\n *\r\n * @param container Reference to container element\r\n * @todo Check if menu is already build. If it is, just move it to a new container\r\n */\n set: function set(container) {\n this._container = container;\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ExportMenu.prototype, \"items\", {\n /**\r\n * @return Menu items\r\n */\n get: function get() {\n return this._items;\n },\n /**\r\n * A list of menu items. Can be nested.\r\n *\r\n * @param items Menu items\r\n */\n set: function set(items) {\n this._items = items;\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ExportMenu.prototype, \"tag\", {\n /**\r\n * Sets main menu tag to place menu in.\r\n *\r\n * This also sets up how menu items are built.\r\n *\r\n * If you set this to \"ul\", menu items will be wrapped into `<li>` tags.\r\n *\r\n * If set to \"div\", menu items will be wrapped in `<div>` tags.\r\n *\r\n * @default \"ul\"\r\n * @param tag Tag to use for menu\r\n */\n set: function set(tag) {\n this._menuTag = tag;\n this._itemTag = tag == \"ul\" ? \"li\" : \"div\";\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ExportMenu.prototype, \"menuTag\", {\n /**\r\n * Returns current menu tag.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Menu tag (item that contains sub-items)\r\n */\n get: function get() {\n return this.adapter.apply(\"menuTag\", {\n tag: this._menuTag\n }).tag;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ExportMenu.prototype, \"itemTag\", {\n /**\r\n * Returns tag to wrap items into.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Item tag\r\n */\n get: function get() {\n return this.adapter.apply(\"itemTag\", {\n tag: this._itemTag\n }).tag;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ExportMenu.prototype, \"labelTag\", {\n /**\r\n * Returns menu label tag.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Label tag\r\n */\n get: function get() {\n return this.adapter.apply(\"labelTag\", {\n tag: this._labelTag\n }).tag;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ExportMenu.prototype, \"align\", {\n /**\r\n * @return Horizontal alignment\r\n */\n get: function get() {\n return this.adapter.apply(\"align\", {\n align: this._align\n }).align;\n },\n /**\r\n * A horizontal alignment for the menu placement.\r\n *\r\n * @param value Horizontal alignment\r\n */\n set: function set(value) {\n this._align = value;\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ExportMenu.prototype, \"verticalAlign\", {\n /**\r\n * @return Vertical alignment\r\n */\n get: function get() {\n return this.adapter.apply(\"verticalAlign\", {\n verticalAlign: this._verticalAlign\n }).verticalAlign;\n },\n /**\r\n * A vertical alignment for the menu placement.\r\n *\r\n * @param value Vertical alignment\r\n */\n set: function set(value) {\n this._verticalAlign = value;\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ExportMenu.prototype, \"classPrefix\", {\n /**\r\n * @return Class name prefix\r\n */\n get: function get() {\n return this.adapter.apply(\"classPrefix\", {\n classPrefix: this._classPrefix\n }).classPrefix;\n },\n /**\r\n * Class name prefix.\r\n *\r\n * @default \"amexport\"\r\n * @param value Class name prefix\r\n */\n set: function set(value) {\n this._classPrefix = value;\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ExportMenu.prototype, \"defaultStyles\", {\n /**\r\n * @return Should ExportMenu load its own CSS?\r\n */\n get: function get() {\n return this.adapter.apply(\"defaultStyles\", {\n defaultStyles: this._defaultStyles\n }).defaultStyles;\n },\n /**\r\n * Indicates whether [[ExportMenu]] should load external CSS to style itself.\r\n *\r\n * If set to `false`, the menu will not be styled, and will rely on some\r\n * external CSS.\r\n *\r\n * @default true\r\n * @param Should ExportMenu load its own CSS?\r\n */\n set: function set(value) {\n if (this._defaultStyles != value) {\n this._defaultStyles = value;\n if (value) {\n this.loadDefaultCSS();\n }\n }\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Loads the default CSS.\r\n *\r\n * @ignore Exclude from docs\r\n */\n ExportMenu.prototype.loadDefaultCSS = function () {\n this._disposers.push(exportCSS(this.classPrefix));\n if (this._element) {\n this._element.style.display = \"\";\n }\n };\n Object.defineProperty(ExportMenu.prototype, \"tabindex\", {\n /**\r\n * @return Tab index\r\n */\n get: function get() {\n return this.adapter.apply(\"tabindex\", {\n tabindex: this._tabindex\n }).tabindex;\n },\n /**\r\n * A tab index for the menu.\r\n *\r\n * Tab index will influence the order in which elements on the chart and\r\n * the whole page are selected when pressing TAB key.\r\n *\r\n * @param value Tab index\r\n */\n set: function set(value) {\n this._tabindex = value;\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ExportMenu.prototype, \"language\", {\n /**\r\n * @return A [[Language]] instance to be used\r\n */\n get: function get() {\n var _this = this;\n var language = this._language.get();\n if (language == null) {\n language = new Language();\n // TODO code duplication with `set language()`\n this._language.set(language, language.events.on(\"localechanged\", function (ev) {\n _this.invalidate();\n }));\n }\n return language;\n },\n /**\r\n * A [[Language]] instance.\r\n *\r\n * @param value An instance of [[Language]]\r\n */\n set: function set(value) {\n var _this = this;\n this._language.set(value, value.events.on(\"localechanged\", function (ev) {\n _this.invalidate();\n }));\n this.invalidate();\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Controlling the menu\r\n */\n /**\r\n * Removes all active classes from menu items. Useful on touch devices and\r\n * keyboard navigation where open menu can be closed instantly by clicking or\r\n * tapping outside it.\r\n *\r\n * @ignore Exclude from docs\r\n */\n ExportMenu.prototype.close = function () {\n var _this = this;\n if (this._ignoreNextClose) {\n this._ignoreNextClose = false;\n return;\n }\n if (this.closeOnClick) {\n this._element.style.pointerEvents = \"none\";\n setTimeout(function () {\n _this._element.style.pointerEvents = \"auto\";\n }, 100);\n }\n if (this._currentSelection) {\n this.setBlur(this._currentSelection);\n this._currentSelection = undefined;\n }\n if (this._element) {\n var items = this._element.getElementsByClassName(\"active\");\n for (var len = items.length, i = len - 1; i >= 0; i--) {\n if (items[i]) {\n $dom.removeClass(items[i], \"active\");\n }\n }\n }\n this.events.dispatchImmediately(\"closed\", {\n type: \"closed\",\n target: this\n });\n };\n /**\r\n * Selects a branch in the menu.\r\n *\r\n * Handles closing of currently open branch.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Branch to select\r\n */\n ExportMenu.prototype.selectBranch = function (branch) {\n var _this = this;\n // Cancel previous closure\n if (branch.closeTimeout) {\n this.removeDispose(branch.closeTimeout);\n branch.closeTimeout = undefined;\n }\n // Add active class\n $dom.addClass(branch.interactions.element.parentElement, \"active\");\n // Remove current selection\n if (this._currentSelection && this._currentSelection !== branch && this._currentSelection.ascendants) {\n $iter.each($iter.concat($iter.fromArray([this._currentSelection]), this._currentSelection.ascendants.iterator()), function (ascendant) {\n if (!branch.ascendants.contains(ascendant) && branch !== ascendant) {\n _this.unselectBranch(ascendant, true);\n }\n });\n }\n // Select and/or cancel timeout for current ascendants\n $iter.each(branch.ascendants.iterator(), function (ascendant) {\n if (ascendant.closeTimeout) {\n _this.removeDispose(ascendant.closeTimeout);\n ascendant.closeTimeout = undefined;\n }\n $dom.addClass(ascendant.interactions.element.parentElement, \"active\");\n });\n // Log current selection\n this._currentSelection = branch;\n // Invoke event\n if (this.events.isEnabled(\"branchselected\")) {\n var event_5 = {\n type: \"branchselected\",\n target: this,\n branch: branch\n };\n this.events.dispatchImmediately(\"branchselected\", event_5);\n }\n };\n /**\r\n * Unselects a branch. Also selects a branch one level up if necessary.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Branch to unselect\r\n * @param simple If `true`, only the branch will be unselected without selecting parent branch\r\n */\n ExportMenu.prototype.unselectBranch = function (branch, simple) {\n // Remove active class\n $dom.removeClass(branch.interactions.element.parentElement, \"active\");\n // Remove current selection\n if (this._currentSelection == branch) {\n this._currentSelection = undefined;\n }\n // Invoke event\n if (this.events.isEnabled(\"branchunselected\")) {\n var event_6 = {\n type: \"branchunselected\",\n target: this,\n branch: branch\n };\n this.events.dispatchImmediately(\"branchunselected\", event_6);\n }\n };\n /**\r\n * Delay unselection of a branch. This can still be cancelled in some other\r\n * place if the branch or its children regain focus.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Branch to unselect\r\n * @param simple If `true`, only the branch will be unselected without selecting parent branch\r\n */\n ExportMenu.prototype.delayUnselectBranch = function (branch, simple) {\n var _this = this;\n // Schedule branch unselection\n if (branch.closeTimeout) {\n this.removeDispose(branch.closeTimeout);\n branch.closeTimeout = undefined;\n }\n branch.closeTimeout = this.setTimeout(function () {\n _this.unselectBranch(branch, simple);\n }, this.closeDelay);\n // Schedule unselection of all ascendants\n // In case focus went away from the export menu altogether, this will ensure\n // that all items will be closed.\n // In case we're jumping to other menu item, those delayed unselections will\n // be cancelled by `selectBranch`\n if (simple !== true && branch.ascendants) {\n $iter.each(branch.ascendants.iterator(), function (ascendant) {\n _this.delayUnselectBranch(ascendant, true);\n });\n }\n };\n /**\r\n * Navigates the menu based on which direction kayboard key was pressed.\r\n *\r\n * @ignore Exclude from docs\r\n * @param key A key that was pressed\r\n */\n ExportMenu.prototype.moveSelection = function (key) {\n // Check if there's a current selection\n if (!this._currentSelection) {\n return;\n }\n var newSelection;\n if (key == \"up\") {\n // Try moving up in current menu list, or to the last item if already\n // at the top\n newSelection = this.getPrevSibling(this._currentSelection);\n } else if (key == \"down\") {\n // Try moving down in current menu list, or to the top item if already\n // at the bottom\n newSelection = this.getNextSibling(this._currentSelection);\n } else if (key == \"left\" && this.align == \"right\" || key == \"right\" && this.align == \"left\") {\n var menu = this.getSubMenu(this._currentSelection);\n // Go one level-deeper\n if (menu != null) {\n newSelection = menu[0];\n }\n } else if (key == \"right\" && this.align == \"right\" || key == \"left\" && this.align == \"left\") {\n // Go one level-deeper\n newSelection = this.getParentItem(this._currentSelection);\n }\n if (newSelection && newSelection !== this._currentSelection) {\n this.selectBranch(newSelection);\n this.setFocus(newSelection);\n this._currentSelection = newSelection;\n }\n };\n /**\r\n * Returns all siblings of a menu item, including this same menu item.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Menu item\r\n * @return List of sibling menu items\r\n */\n ExportMenu.prototype.getSiblings = function (branch) {\n var parent = this.getParentItem(branch);\n if (parent && parent.menu) {\n return parent.menu;\n } else {\n return [];\n }\n };\n /**\r\n * Returns menu items parent item.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Menu item\r\n * @return Parent menu item\r\n */\n ExportMenu.prototype.getParentItem = function (branch) {\n if (branch.ascendants && branch.ascendants.length) {\n return branch.ascendants.getIndex(branch.ascendants.length - 1);\n } else {\n return undefined;\n }\n };\n /**\r\n * Returns next sibling in the same menu branch. If there is no next sibling,\r\n * the first one is returned. If there is just one item, that item is\r\n * returned. Unsupported menu items are skipped.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Menu item to search siblings for\r\n * @return Menu item\r\n */\n ExportMenu.prototype.getNextSibling = function (branch) {\n var siblings = this.getSiblings(branch);\n if (siblings.length > 1) {\n var next = siblings.indexOf(branch) + 1;\n next = siblings.length == next ? 0 : next;\n return siblings[next].unsupported ? this.getNextSibling(siblings[next]) : siblings[next];\n } else {\n return branch;\n }\n };\n /**\r\n * Returns previous sibling in the same menu branch. If there is no next\r\n * sibling, the first one is returned. If there is just one item, that item is\r\n * returned. Unsupported menu items are skipped.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Menu item to search siblings for\r\n * @return Menu item\r\n */\n ExportMenu.prototype.getPrevSibling = function (branch) {\n var siblings = this.getSiblings(branch);\n if (siblings.length > 1) {\n var prev = siblings.indexOf(branch) - 1;\n prev = prev == -1 ? siblings.length - 1 : prev;\n return siblings[prev].unsupported ? this.getPrevSibling(siblings[prev]) : siblings[prev];\n } else {\n return branch;\n }\n };\n /**\r\n * Attempts to set focus on particular menu element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Menu item\r\n */\n ExportMenu.prototype.setFocus = function (branch) {\n if (branch.interactions) {\n branch.interactions.element.focus();\n }\n };\n /**\r\n * Attempts to remove focus from the menu element.\r\n *\r\n * @ignore Exclude from docs\r\n * @param branch Menu item\r\n */\n ExportMenu.prototype.setBlur = function (branch) {\n if (branch.interactions) {\n branch.interactions.element.blur();\n }\n };\n return ExportMenu;\n}(Validatable);\nexport { ExportMenu };","// Also detects iOS\nexport function isSafari() {\n return /apple/i.test(navigator.vendor);\n}\nexport function isInternetExplorer() {\n return /MSIE |Trident\\//.test(navigator.userAgent);\n}","import * as tslib_1 from \"tslib\";\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\nimport { ColorModifier } from \"./ColorModifier\";\nimport { registry } from \"../../Registry\";\nimport * as $math from \"../../utils/Math\";\nimport * as $type from \"../../utils/Type\";\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\n/**\r\n * This class can be used to modify linear gradient steps, changing visual\r\n * properties like lightness, brightness, opacity of each set.\r\n *\r\n * It can also set offsets for each gradient step.\r\n *\r\n * E.g. if I want to fill a columns in a column series to be a solid fill from\r\n * top to 80% of height, then gradually fades out, I can use the following\r\n * gradient modifier as a `fillModifier`:\r\n *\r\n * ```TypeScript\r\n * let fillModifier = new am4core.GradientModifier();\r\n * fillModifier.opacities = [1, 1, 0];\r\n * fillModifier.offsets = [0, 0.8, 1];\r\n * columnSeries.columns.template.fillModifier = fillModifier;\r\n * ```\r\n * ```JavaScript\r\n * var fillModifier = new am4core.GradientModifier();\r\n * fillModifier.opacities = [1, 1, 0];\r\n * fillModifier.offsets = [0, 0.8, 1];\r\n * columnSeries.columns.template.fillModifier = fillModifier;\r\n * ```\r\n * ```JSON\r\n * \"series\": [{\r\n * \"type\": \"ColumnSeries\",\r\n * \"columns\": {\r\n * \"fillModifier\": {\r\n * \"type\": \"GradientModifier\",\r\n * \"opacities\": [1, 1, 0],\r\n * \"offsets\": [0, 0.8, 1]\r\n * }\r\n * }\r\n * }]\r\n * ```\r\n */\nvar GradientModifier = /** @class */function (_super) {\n tslib_1.__extends(GradientModifier, _super);\n /**\r\n * Constructor.\r\n */\n function GradientModifier() {\n var _this = _super.call(this) || this;\n _this.lightnesses = [];\n _this.brightnesses = [];\n _this.opacities = [];\n _this.offsets = [];\n _this.className = \"GradientModifier\";\n _this.applyTheme();\n return _this;\n }\n Object.defineProperty(GradientModifier.prototype, \"lightnesses\", {\n /**\r\n * @return Lightness values\r\n */\n get: function get() {\n return this._lightnesses;\n },\n /**\r\n * An array of lightness values for each step.\r\n *\r\n * @param value Lightness values\r\n */\n set: function set(value) {\n this._lightnesses = value;\n this._brightnesses = [];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(GradientModifier.prototype, \"brightnesses\", {\n /**\r\n * @return Brightness values\r\n */\n get: function get() {\n return this._brightnesses;\n },\n /**\r\n * An array of brightness values for each step.\r\n *\r\n * @param value Brightness values\r\n */\n set: function set(value) {\n this._brightnesses = value;\n this._lightnesses = [];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(GradientModifier.prototype, \"opacities\", {\n /**\r\n * @return Opacity values\r\n */\n get: function get() {\n return this._opacities;\n },\n /**\r\n * An array of opacity values for each step.\r\n *\r\n * @param value Opacity values\r\n */\n set: function set(value) {\n this._opacities = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(GradientModifier.prototype, \"offsets\", {\n /**\r\n * @return Offsets\r\n */\n get: function get() {\n return this._offsets;\n },\n /**\r\n * An array of relative position (0-1) for each step.\r\n *\r\n * If not set, all steps will be of equal relative length.\r\n *\r\n * @param value Offsets\r\n */\n set: function set(value) {\n this._offsets = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Modifies the color based on step setting.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Source color\r\n * @return A gradient that matches set modification rules\r\n */\n GradientModifier.prototype.modify = function (value) {\n // Clear current gradient\n this.gradient.clear();\n // Get step count\n var count = 0;\n if (this.opacities) {\n count = $math.max(count, this.opacities.length);\n }\n if (this.lightnesses) {\n count = $math.max(count, this.lightnesses.length);\n }\n if (this.brightnesses) {\n count = $math.max(count, this.brightnesses.length);\n }\n // Init step values\n var opacity = 1,\n lightness,\n brightness;\n // Apply steps\n for (var i = 0; i < count; i++) {\n // Take base color\n var color = value;\n // Check if there are any parameters for this step\n if (this.opacities && $type.isNumber(this.opacities[i])) {\n opacity = this.opacities[i];\n }\n if (this.lightnesses && $type.isNumber(this.lightnesses[i])) {\n lightness = this.lightnesses[i];\n brightness = undefined;\n }\n if (this.brightnesses && $type.isNumber(this.brightnesses[i])) {\n brightness = this.brightnesses[i];\n lightness = undefined;\n }\n // Check if we need to brighten/lighten color\n if ($type.isNumber(brightness)) {\n color = value.brighten(this.brightnesses[i]);\n } else if ($type.isNumber(lightness)) {\n color = value.lighten(this.lightnesses[i]);\n }\n // Get offset (it's OK if it's undefined)\n var offset = this.offsets[i];\n // Apply step\n this.gradient.addColor(color, opacity, offset);\n }\n return this.gradient;\n };\n GradientModifier.prototype.copyFrom = function (source) {\n _super.prototype.copyFrom.call(this, source);\n this._offsets = source.offsets;\n this._brightnesses = source.brightnesses;\n this._lightnesses = source.lightnesses;\n this._opacities = source.opacities;\n };\n return GradientModifier;\n}(ColorModifier);\nexport { GradientModifier };\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\nregistry.registeredClasses[\"GradientModifier\"] = GradientModifier;","import React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport _ from 'lodashExtended'\nimport createReactClass from 'create-react-class'\nimport PropTypes from 'prop-types'\n\nvar MapAndStreetview = createReactClass({\n\n getInitialState: function() {\n return {\n map : null,\n panorama: null,\n center : null,\n settings: null,\n changed: false\n };\n },\n\n getDefaultProps: function() {\n\n return {\n layout: 'vertical',\n latitude: 0,\n longitude: 0,\n mapZoom: 14,\n panoramaLatitude: null,\n panoramaLongitude: null,\n panoramaZoom: 0,\n panoramaHeading: 0,\n panoramaPitch: 0,\n width: '99.9%',\n height: '400px',\n gmapsApiKey: '',\n }\n },\n\n render : function() {\n\n var style = {\n width: this.props.width,\n height: this.props.height\n }\n\n var changedButton = this.state.changed ? (\n <div className=\"btn btn-sx btn-block btn-success\" style={{ marginTop: '10px' }} onClick={this.updateNewSettings}>Save Position</div>\n ) : null\n\n var panorama = this.props.panoramaVisible ? (\n <div className=\"map-panorama\" style={style}></div>\n ) : null\n\n var panoramaNotStored = _.isNull(this.props.panoramaLongitude) && this.props.editable ? (\n <div className=\"alert alert-danger alert-in-panel\" style={{ marginTop: '10px' }} role=\"alert\"><strong>Panorama not saved!</strong> Adjust the view and click update.</div>\n ) : null\n\n\n if(this.props.layout == 'horizontal') {\n\n\n return (\n <div style={{ 'width': this.props.width }}>\n <div style={{ 'width': '50%', height: this.props.height, display: 'inline-block'}}>\n <div className=\"map-canvas\" style={style}></div>\n </div>\n <div style={{ 'width': '50%', height: this.props.height, display: 'inline-block'}}>\n {panorama}\n </div>\n {panoramaNotStored}\n {changedButton}\n </div>\n )\n } else {\n return (\n <div>\n <div className=\"map-canvas\" style={style}></div>\n {panoramaNotStored}\n {panorama}\n {changedButton}\n </div>\n )\n }\n\n },\n\n\n componentDidMount : function() {\n var self = this\n\n window.mapLoaded = (function() {\n\n // ADD MAP\n\n var mapCenter = new google.maps.LatLng( this.props.latitude, this.props.longitude )\n\n var map = new google.maps.Map($(ReactDOM.findDOMNode(this)).find('.map-canvas')[0], {\n center: mapCenter,\n zoom: this.props.mapZoom,\n mapTypeControl: false\n })\n\n var marker = new google.maps.Marker({\n position: mapCenter,\n icon: this.props.markerIcon || Vector.maps.markers.default_set.green,\n map: map,\n draggable: this.props.editable\n });\n\n\n // ADD PANORAMA\n\n var panorama = null\n var panoramaCenter = null\n\n var validPanorama = !_.isNull(this.props.panoramaLatitude) && !_.isNull(this.props.panoramaLongitude)\n\n if(this.props.panoramaVisible) {\n\n if(validPanorama) {\n panoramaCenter = new google.maps.LatLng( this.props.panoramaLatitude, this.props.panoramaLongitude )\n } else {\n panoramaCenter = mapCenter\n }\n\n panorama = new google.maps.StreetViewPanorama( $(ReactDOM.findDOMNode(this)).find('.map-panorama')[0], {\n addressControl: false,\n linksControl: false,\n imageDateControl: true,\n panControl: false,\n enableCloseButton: false,\n zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL }\n })\n\n\n\n if(validPanorama) {\n panorama.setOptions({\n position: panoramaCenter,\n pov: {\n heading: parseFloat(this.props.panoramaHeading),\n pitch: parseFloat(this.props.panoramaPitch),\n zoom: parseFloat(this.props.panoramaZoom)\n }\n })\n\n } else {\n var streetView = new google.maps.StreetViewService();\n streetView.getPanoramaByLocation(panoramaCenter, 200, function(data, status) {\n if(status == google.maps.StreetViewStatus.OK) {\n panorama.setPosition(data.location.latLng)\n panorama.setPov({\n heading: data.tiles.originHeading,\n pitch: data.tiles.originPitch\n });\n }\n });\n }\n\n\n map.setStreetView(panorama);\n\n }\n\n if(this.props.editable) {\n\n google.maps.event.addListener(map, 'zoom_changed', function(e) { self.setNewSettings() })\n\n google.maps.event.addListener(marker,'dragend',function(event){\n var newLatLng = event.latLng\n map.setCenter(newLatLng)\n self.setNewSettings()\n });\n\n if(this.props.panoramaVisible) {\n _.each(['pov_changed', 'position_changed', 'zoom_changed'], function(event) {\n google.maps.event.addListener(panorama, event, function(e) { self.setNewSettings() })\n })\n }\n\n }\n\n this.setState({ map: map, panorama: panorama, marker: marker })\n\n self.setNewSettings()\n\n self.state.changed = false\n\n }).bind(this)\n\n\n if(typeof google !== 'object' || typeof google.maps !== 'object') {\n var s = document.createElement('script')\n s.src = 'https://maps.googleapis.com/maps/api/js?key=' + this.props.gmapsApiKey + '&callback=mapLoaded'\n document.getElementsByTagName('head')[0].appendChild(s)\n }\n\n },\n\n\n setNewSettings: function() {\n\n var map = this.state.map\n var marker = this.state.marker\n var newSettings = {\n longitude: marker.getPosition().lng(),\n latitude: marker.getPosition().lat(),\n mapZoom: map.getZoom(),\n }\n\n if(this.props.panoramaVisible) {\n var pos = this.state.panorama.getPosition()\n var pov = this.state.panorama.getPov()\n\n if(pos) {\n newSettings = _.extend(newSettings, {\n panoramaLongitude: pos.lng(),\n panoramaLatitude: pos.lat(),\n panoramaHeading: pov.heading,\n panoramaPitch: pov.pitch,\n panoramaZoom: pov.zoom\n })\n }\n }\n\n if(this.props.editable && !_.isNull(this.state.settings) && !_.isEqual(newSettings, this.state.settings)) {\n this.state.changed = true\n }\n\n this.setState({ settings: newSettings\t})\n\n },\n\n updateNewSettings: function(e) {\n if(this.state.changed) {\n this.props.updateHandler(this.state.settings)\n this.state.changed = false\n }\n }\n\n});\n\n\n\n\nclass MapAndStreetviewApp extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = props;\n this.handleUpdateLocation = this.handleUpdateLocation.bind(this)\n }\n\n\n handleUpdateLocation(newSettings) {\n\n var self = this\n\n if(!self.state.options.panoramaVisible) {\n newSettings = _.omit(newSettings, 'panoramaZoom', 'panoramaHeading', 'panoramaPitch', 'panoramaLatitude', 'panoramaLongitude')\n }\n\n $.ajax({\n type: \"PUT\",\n url: self.state.updatePath,\n data: JSON.stringify({\n location: newSettings\n }),\n success: function(data) {\n self.setState(_.extend(self.state.options, data))\n },\n dataType: 'json',\n contentType:\"application/json; charset=utf-8\"\n })\n }\n\n render() {\n const { options } = this.state\n return(<MapAndStreetview {...options} updateHandler={this.handleUpdateLocation}/>)\n }\n\n}\n\n\nexport default MapAndStreetviewApp\n\n\n","import React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport _ from 'lodashExtended'\nimport createReactClass from 'create-react-class'\nimport PropTypes from 'prop-types'\n\nvar MultiMapApp = createReactClass({\n\n getInitialState: function() {\n return {\n map: null,\n markers: [],\n points: [],\n markerCluster: null\n };\n },\n\n // set some default values\n getDefaultProps: function() {\n return {\n width: '100%',\n height: '400px',\n points: [],\n gmaps_api_key: '',\n gmaps_sensor: false,\n cluster: true\n }\n },\n\n\n render : function() {\n var style = {\n width: this.props.width,\n height: this.props.height\n }\n return (\n <div style={style}></div>\n );\n },\n\n componentDidMount : function() {\n\n if(_.isEmpty(this.state.points)) this.state.points = _.cloneDeep(this.props.points)\n\n window.mapLoaded = (function() {\n var self = this\n var firstPoint = _.first(this.props.points)\n \n var mapOptions = {\n center: new google.maps.LatLng( firstPoint.map.latitude , firstPoint.map.longitude ),\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n mapTypeControl: false\n };\n var map = new google.maps.Map( ReactDOM.findDOMNode(this), mapOptions)\n\n this.setState( { map : map } )\n this.addMarkers(this.props.points)\n google.maps.event.addListener(this.state.map, 'click', function() {\n self.closeInfoWindows()\n });\n\n }).bind(this)\n\n if(typeof google !== 'object' || typeof google.maps !== 'object') {\n var s = document.createElement('script')\n s.src = 'https://maps.googleapis.com/maps/api/js?key=' + this.props.gmapsApiKey + '&callback=mapLoaded'\n document.getElementsByTagName('head')[0].appendChild(s)\n }\n\n },\n\n // update geo-encoded markers\n addMarkers : function(points) {\n var self = this\n\n this.detachCluster()\n\n this.state.markers.forEach( function(marker) {\n this.state.marker.setMap(null);\n })\n\n this.state.markers = [];\n\n _.each(points, function(point) { self.addMarker(point) })\n\n if(points.length == 1) {\n this.state.map.setZoom(_.first(points).map.zoom)\n } else {\n this.fitToBounds(this.props.points)\n }\n\n this.attachCluster()\n },\n\n addMarker: function(point) {\n var self = this\n var point = point\n var map = this.state.map;\n var markers = this.state.markers;\n\n var marker = new google.maps.Marker({\n position: new google.maps.LatLng( point.map.latitude , point.map.longitude ),\n icon: point.map.marker,\n map: map,\n vector: {\n id: point.id,\n details: point.details,\n panorama: point.panorama\n }\n });\n\n google.maps.event.addListener(marker, 'click', function() {\n self.handelMarkerClick(marker)\n })\n\n markers.push(marker)\n\n this.setState( { markers : markers })\n\n },\n\n attachCluster: function() {\n\n if(this.props.cluster) {\n\n var clusterColor = this.props.clusterMarkerColor ? this.props.clusterMarkerColor : 'green'\n\n this.state.markerCluster = new MarkerClusterer(this.state.map, this.state.markers, {\n // maxZoom: zoom,\n gridSize: 25,\n\n styles: [{\n url: Vector.maps.clusters[clusterColor], height: 32, width: 32, textColor: '#ffffff', textSize: 15\n }, {\n url: Vector.maps.clusters[clusterColor], height: 32, width: 32, textColor: '#ffffff', textSize: 12\n }, {\n url: Vector.maps.clusters[clusterColor], height: 32, width: 32, textColor: '#ffffff', textSize: 11\n }]\n });\n }\n },\n\n detachCluster: function() {\n if(!_.isNull(this.state.markerCluster)) {\n this.state.markerCluster.setMap(null)\n }\n },\n\n fitToBounds: function(points) {\n var latLngs = _.map(points, function(p) { return new google.maps.LatLng( p.map.latitude , p.map.longitude ) })\n var bounds = new google.maps.LatLngBounds()\n _.each(latLngs, function(l) { bounds.extend(l) } )\n this.state.map.fitBounds(bounds)\n },\n\n handelMarkerClick: function(marker) {\n\n this.closeInfoWindows()\n\n var infoWindow = new google.maps.InfoWindow()\n\n var details = marker.vector.details\n\n var panoramaImage = marker.vector.panorama.image\n\n var telephone = details.telephone ? ('<p>' + details.telephone + '</p>') : ''\n\n var web = details.web ? ('<p><a href=\"' + details.web + '\" target=\"_blank\">Website</a></p>') : ''\n\n var panorama = !_.isEmpty(panoramaImage) ? '<img src=\"' + panoramaImage + '\" width=170 height=90>' : ''\n\n var links = _.map(details.links, function(link) {\n return '<a href=\"'+link[1]+'\" class=\"btn btn-xs btn-flat btn-block btn-'+link[2]+'\">'+link[0]+'</a>'\n } )\n\n infoWindow.setOptions({\n disableAutoPan: false,\n maxWidth: 170,\n\n })\n\n var address = details.town + ', ' + details.postcode.raw\n\n infoWindow.setContent(\n '<div class=\"info-window\">' +\n '<h6>' + details.name + '</h6>' +\n '<p>' + address + '</p>' +\n telephone +\n web +\n panorama +\n (_.isEmpty(links) ? '' : links.join('')) +\n '</div>'\n )\n\n infoWindow.open(this.state.map, marker)\n marker.infoWindow = infoWindow\n },\n\n closeInfoWindows: function() {\n _.each(this.state.markers, function(marker) {\n if(marker.infoWindow) {\n marker.infoWindow.setMap(null)\n marker.infoWindow = null\n }\n })\n }\n\n});\n\n\nexport default MultiMapApp\n\n\n","import React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport _ from 'lodashExtended'\nimport createReactClass from 'create-react-class'\nimport PropTypes from 'prop-types'\n\nvar PolygonsMapApp = createReactClass({\n\n // initialize local variables\n getInitialState: function() {\n return {\n map: null,\n polygons: [],\n markerCluster: null,\n bounds: null,\n zoom: 6\n // infoWindows: []\n };\n },\n\n // set some default values\n getDefaultProps: function() {\n return {\n width: '100%',\n height: '400px',\n polygons: [],\n gmapsApiKey: '',\n }\n },\n\n\n render : function() {\n\n var style = {\n width: this.props.width,\n height: this.props.height\n }\n return (\n <div style={style}></div>\n );\n },\n\n componentDidMount : function() {\n\n // if(_.isEmpty(this.state.polygons)) this.state.polygons = _.cloneDeep(this.props.polygons)\n\n window.mapLoaded = (function() {\n\n var self = this\n\n self.state.bounds = new google.maps.LatLngBounds(null)\n self.state.center = new google.maps.LatLng(52.4831, -1.8936)\n\n var mapOptions = {\n zoom: this.state.zoom,\n center: this.state.center,\n mapTypeId: google.maps.MapTypeId.ROADMAP\n };\n\n this.setState( { map : new google.maps.Map( ReactDOM.findDOMNode(this), mapOptions) } )\n\n // google.maps.event.addListenerOnce(self.state.map, 'bounds_changed', function() {\n // // if (self.state.zoom != self.state.map.getZoom()) {\n // // self.state.zoom = (self.state.map.getZoom() + 1)\n // // self.state.map.setZoom(self.state.zoom)\n // // }\n // });\n\n this.addPolygons(this.props.polygons)\n\n this.state.map.fitBounds(this.state.bounds)\n this.state.map.setZoom(20)\n\n if(_.isUndefined(window.polyMap)) {\n window.polyMap = this.state.map\n }\n\n }).bind(this)\n\n var s = document.createElement('script')\n s.src = 'https://maps.googleapis.com/maps/api/js?key=' + this.props.gmapsApiKey + '&callback=mapLoaded'\n document.getElementsByTagName('head')[0].appendChild(s)\n\n },\n\n addPolygons: function() {\n var self = this\n _.each(this.props.polygons, function(p) {\n self.addPolygon(p)\n })\n },\n\n addPolygon: function(polygonData) {\n var self = this\n\n var paths = _.map(polygonData.paths, function(paths) {\n return _.map(paths, function(point) {\n var latLng = new google.maps.LatLng(point[1], point[0])\n self.state.bounds.extend(latLng)\n return latLng\n })\n })\n\n var polygon = new google.maps.Polygon({\n paths: paths,\n fillColor: polygonData.color,\n hoverFillColor: polygonData.hoverColor,\n fillOpacity: 0.5,\n strokeColor: polygonData.strokeColor,\n strokeOpacity: 1,\n strokeWeight: 1,\n vectorID: polygonData.id,\n vectorName: polygonData.name\n })\n\n google.maps.event.addListener(polygon, 'click', function (event) {\n\n $('[data-map-id]').removeClass('active')\n\n var toHighlight = $('[data-map-id=' + this.vectorID + ']')\n\n $('[data-map-id]').removeClass('success')\n if(toHighlight.length > 0 ) {\n toHighlight.addClass('success')\n }\n });\n\n if(_.isUndefined(window.polygonsHash)) {\n window.polygonsHash = {}\n }\n window.polygonsHash[polygonData.id] = polygon\n\n polygon.setMap(this.state.map)\n\n }\n\n});\n\n\nexport default PolygonsMapApp\n\n","import dayjs from \"dayjs\";\nimport { FC, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport { useHistory, useLocation } from \"react-router-dom\";\nimport Error from \"service-calendar/components/Error\";\nimport SideBarAndy from \"service-calendar/components/SideBarAndy\";\nimport { fetchAtDate } from \"service-calendar/operations\";\nimport { useNavigation, useQuery } from \"ticket/app/hooks\";\nimport Loader from \"../../components/shared/Loader\";\n\ninterface AppProps {\n locationId: string;\n calendarApi: any;\n fetchSpecific: any;\n}\n\nconst App: FC<AppProps> = ({ locationId, calendarApi, fetchSpecific }) => {\n const history = useHistory();\n const location = useLocation();\n const query = useQuery();\n const { onSelectDate, onSelectSideTab } = useNavigation();\n const { availableData, fetchingCurrent, errorCurrent } = calendarApi;\n\n const detailsDate = query?.get(\"detailsDate\");\n const sideTab = query?.get(\"sideTab\") || \"services\";\n\n useEffect(() => {\n const currentSearch = location.search;\n if (detailsDate) {\n history.replace({\n pathname: \"/visit_activity/\",\n search: currentSearch,\n });\n }\n }, [history]);\n\n // // Fetch specific day data only once\n useEffect(() => {\n if (availableData.startDate === null) {\n fetchSpecific(dayjs().format(\"YYYY-MM-DD\"));\n }\n }, []);\n\n if (errorCurrent) {\n return <Error />;\n }\n\n if (availableData.startDate === null || fetchingCurrent) {\n // fetchingCurrent\n return <Loader message=\"Loading...\" />;\n }\n\n return (\n <>\n <SideBarAndy\n detailsDate={detailsDate}\n sideTab={sideTab}\n onSelectSideTab={onSelectSideTab}\n locationId={locationId}\n onSelectDate={onSelectDate}\n />\n </>\n );\n};\n\nconst mapStateToProps = (state) => {\n return {\n locationId: state.locationId,\n calendarApi: state.calendarApi,\n };\n};\n\nconst mapDispatchToProps = (dispatch) => {\n return {\n fetchSpecific: (date) => {\n dispatch(fetchAtDate(date));\n },\n };\n};\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport default connector(App);\n","import dayjs from \"dayjs\";\nimport { FC, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport { useHistory, useLocation } from \"react-router-dom\";\nimport { StyledTab, StyledTabs } from \"service/report-request-box/MainTabs\";\nimport VisitActivityTab from \"service/ticket/VisitActivityTab\";\nimport { useNavigation, useQuery } from \"ticket/app/hooks\";\nimport Loader from \"../../../components/shared/Loader\";\nimport { fetchAtDate } from \"../operations\";\nimport Error from \"./Error\";\nimport SideBar from \"./SideBar\";\n\ninterface AppProps {\n locationId: string;\n calendarApi: any;\n fetchSpecific: any;\n}\n\nconst App: FC<AppProps> = ({ locationId, calendarApi, fetchSpecific }) => {\n const history = useHistory();\n const location = useLocation();\n const query = useQuery();\n const { onSelectDate, onSelectSideTab } = useNavigation();\n const { availableData, fetchingCurrent, errorCurrent } = calendarApi;\n\n const detailsDate = query?.get(\"detailsDate\");\n const sideTab = query?.get(\"sideTab\") || \"services\";\n\n useEffect(() => {\n const currentSearch = location.search;\n if (detailsDate) {\n history.replace({\n pathname: \"/visit_activity/\",\n search: currentSearch,\n });\n }\n }, [history]);\n\n // // Fetch specific day data only once\n useEffect(() => {\n if (availableData.startDate === null) {\n fetchSpecific(dayjs().format(\"YYYY-MM-DD\"));\n }\n }, []);\n\n if (errorCurrent) {\n return <Error />;\n }\n\n if (availableData.startDate === null || fetchingCurrent) {\n // fetchingCurrent\n return <Loader message=\"Loading...\" />;\n }\n\n return (\n <>\n <div className=\"anenta-calendar\">\n <div id=\"calendar-layout-holder\">\n <div id=\"calendar-holder\">\n <StyledTabs value={0}>\n <StyledTab label=\"Visit Activity\" />\n </StyledTabs>\n\n <VisitActivityTab\n appTab={1}\n onSelectDate={onSelectDate}\n onSelectSideTab={onSelectSideTab}\n selectedDate={detailsDate}\n />\n </div>\n <div id=\"sidebar-holder\">\n <SideBar\n detailsDate={detailsDate}\n sideTab={sideTab}\n onSelectSideTab={onSelectSideTab}\n locationId={locationId}\n onSelectDate={onSelectDate}\n />\n </div>\n </div>\n </div>\n </>\n );\n};\n\nconst mapStateToProps = (state) => {\n return {\n locationId: state.locationId,\n calendarApi: state.calendarApi,\n };\n};\n\nconst mapDispatchToProps = (dispatch) => {\n return {\n fetchSpecific: (date) => {\n dispatch(fetchAtDate(date));\n },\n };\n};\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport default connector(App);\n","import { Button, ButtonGroup, Box, Grid, Skeleton, Typography } from \"@mui/material\";\nimport { useGetLocationServiceVendorsQuery } from \"api/services\";\nimport { map, sortBy, toPairs } from \"lodash\";\nimport { Fragment, useEffect, useMemo, useState } from \"react\";\nimport { Route, Switch, useHistory, useLocation, Link } from \"react-router-dom\";\nimport { RouterDebugger } from \"service/GlobalDebugger\";\nimport LocationServicesVendorBox from \"service/LocationServicesVendorBox\";\nimport {\n StyledTab,\n StyledTabs,\n TabPanel,\n} from \"service/report-request-box/MainTabs\";\nimport { TextMuted } from 'sharedComponents';\nimport { useDrawer } from \"service/ticket/channel-footer/useDrawer\";\nimport TicketsList from \"service/ticket/TicketsList\";\nimport TicketTab from \"service/ticket/TicketTab\";\nimport VisitActivityTab from \"service/ticket/VisitActivityTab\";\nimport VisitDetails from \"service/VisitDetails\";\nimport { formatDate, updateQueryStringParameter } from \"sharedUtils\";\nimport { useNavigation, useQuery } from \"./app/hooks\";\nimport { useTypedSelector } from \"./app/store\";\nimport AppContext from \"./AppContext\";\nimport {\n getLocationId,\n getTicketById,\n useGlobalLoadingState,\n} from \"./selectors\";\n\nconst App = () => {\n const defaultTicket = useTypedSelector((state) => state.ticketId);\n const [currentTicketId, setCurrentTicketId] = useState(defaultTicket);\n\n const query = useQuery();\n const ticket = getTicketById(currentTicketId);\n const locationId = getLocationId();\n const history = useHistory();\n const location = useLocation();\n const { onSelectDate, onSelectSideTab } = useNavigation();\n\n const vendorFromTicket = useMemo(() => ticket?.vendor?.id, [ticket]);\n\n const detailsDate = query?.get(\"detailsDate\");\n const sideTab = query?.get(\"sideTab\") || \"services\";\n\n // Load initial data!!!\n // `/admin/locations/${locationId}/services`\n const { data: locationServiceVendors } =\n useGetLocationServiceVendorsQuery(locationId);\n\n const {\n isDrawerOpen,\n closeDrawer,\n activeChannel,\n setIsDrawerOpen,\n setActiveChannel,\n toggleDrawerAndSetChannel,\n } = useDrawer();\n\n const tabMap = {\n services: 0,\n otherTickets: 1,\n visitDetails: 2,\n };\n\n const [openFormUrl, setOpenFormUrl] = useState<string>(\"\");\n const [showFooterButtons, setShowFooterButtons] = useState(true);\n const [appTab, setAppTab] = useState(0);\n const [selectedContainer, setSelectedContainer] = useState(new Set());\n const [showOverview, setShowOverview] = useState(false);\n const [formType, setFormType] = useState(\"all\");\n const [cardTab, setCardTab] = useState(\"request\");\n const [showTaggingForm, setShowTaggingForm] = useState(false);\n const [highlightedIds, setHighlightedIds] = useState([]);\n const [openRemediation, setOpenRemediation] = useState(false);\n const [requestedAtDate, setRequestedAtDate] = useState(\"\");\n const [eventId, setEventId] = useState(\"\");\n const [serviceUuid, setServiceUuid] = useState(\"\");\n const [requestType, setRequestType] = useState(\"\");\n const [shouldScroll, setShouldScroll] = useState(false);\n\n const globalLoadingState = useGlobalLoadingState();\n const isGloballyLoading = globalLoadingState;\n\n const sortedLocationServiceVendors = sortBy(\n toPairs(locationServiceVendors),\n ([vendorId]) => vendorId !== vendorFromTicket?.toString()\n );\n\n const onOpenRemediation = () => {\n setShowFooterButtons(false);\n setOpenRemediation(true);\n };\n const onCloseRemediation = () => {\n setShowFooterButtons(true);\n setOpenRemediation(false);\n };\n\n const onSelectAction = (_x, { path }) => {\n setIsDrawerOpen(true);\n setActiveChannel(null);\n setShowFooterButtons(false);\n setOpenFormUrl(updateQueryStringParameter(path, \"ticket_id\", ticket.id));\n };\n\n const handlePrimaryTab = (_event, newValue) => {\n setAppTab(newValue);\n const currentSearch = location.search;\n\n if (newValue === 0) {\n history.replace({\n pathname: `/tickets/${currentTicketId}`,\n search: currentSearch,\n });\n } else if (newValue === 1) {\n history.replace({\n pathname: `/visit_activity/`,\n search: currentSearch,\n });\n }\n };\n\n const handleButtonChange = (newValue) => {\n setAppTab(newValue);\n const currentSearch = location.search;\n\n if (newValue === 0) {\n history.replace({\n pathname: `/tickets/${currentTicketId}`,\n search: currentSearch,\n });\n } else if (newValue === 1) {\n history.replace({\n pathname: `/visit_activity/`,\n search: currentSearch,\n });\n }\n };\n\n\n const [infoAreaHTML, setInfoAreaHTML] = React.useState('');\n\n useEffect(() => {\n const { pathname, search } = location;\n const ticketMatch = pathname.match(/\\/tickets\\/(\\d+)/);\n let newPathname = pathname;\n\n if (ticketMatch) {\n const newTicketId = ticketMatch[1];\n setCurrentTicketId(newTicketId);\n newPathname = `/tickets/${newTicketId}`;\n } else if (pathname === \"/\" && defaultTicket) {\n newPathname = `/tickets/${defaultTicket}`;\n } else if (detailsDate || sideTab) {\n if (pathname.includes(\"/visit_activity/\")) {\n setAppTab(1);\n }\n }\n\n if (newPathname !== pathname || search !== location.search) {\n history.replace({ pathname: newPathname, search });\n }\n\n fetch('/admin/locations/'+locationId+'/info_area')\n .then((response) => response.text())\n .then((htmlString) => {\n setInfoAreaHTML(htmlString);\n });\n\n }, [history, defaultTicket, location, detailsDate, sideTab]);\n\n return (\n <AppContext.Provider\n value={{\n onSelectAction,\n selectedContainer,\n setSelectedContainer,\n formType,\n setFormType,\n cardTab,\n setCardTab,\n showTaggingForm,\n setShowTaggingForm,\n highlightedIds,\n setHighlightedIds,\n currentTicketId,\n isDrawerOpen,\n closeDrawer,\n activeChannel,\n setIsDrawerOpen,\n setActiveChannel,\n toggleDrawerAndSetChannel,\n onSelectDate: onSelectDate,\n // TODO: Remove when we have remediation model\n openRemediation,\n onOpenRemediation,\n onCloseRemediation,\n requestedAtDate,\n setRequestedAtDate,\n eventId,\n setEventId,\n requestType,\n serviceUuid,\n setServiceUuid,\n setRequestType,\n shouldScroll,\n setShouldScroll,\n }}\n >\n\n <Grid container spacing={2}>\n <Grid item xs={4}>\n\n {isGloballyLoading && (\n <Box width=\"100%\">\n <Skeleton variant=\"rectangular\" height={150} />\n </Box>\n )}\n\n { ticket && (\n <>\n <div class=\"content-header no-dial\">\n <h1 class=\"with-pull-right\">\n Ticket #{ticket.id}\n </h1>\n\n <span class=\"text-muted\">Location</span>  \n <a href={`/admin/locations/${locationId}`}>{ticket.location.name} - {ticket.location.externalCode}</a>\n\n\n <h4 id=\"subject-is-editing-false\">\n <span class=\"text-muted\">Subject</span>  \n <TextMuted sx={{ lineHeight: '1.6em'}}>{ticket.subject}</TextMuted>\n </h4>\n </div>\n\n\n\n { false && (\n <StyledTabs\n value={appTab}\n onChange={handlePrimaryTab}\n sx={{\n height: \"fit-content\",\n position: \"sticky\",\n top: showOverview ? 0 : 80,\n paddingTop: \"0 !important\",\n zIndex: 1,\n minHeight: '20px'\n }}\n >\n <StyledTab label=\"Ticket\" />\n <StyledTab label=\"Visit Activity\" />\n </StyledTabs>\n )}\n\n </>\n )}\n </Grid>\n <Grid item xs={8}>\n <div dangerouslySetInnerHTML={{ __html: infoAreaHTML }} />\n </Grid>\n </Grid>\n\n\n\n\n\n\n <Grid container spacing={2} sx={{ pb: '20px', mb: '20px', }}>\n <Grid\n item\n xs={8}\n sx={{\n pt: 0,\n position: \"relative\",\n }}\n >\n\n\n\n <RouterDebugger />\n\n <Switch>\n <Route path=\"/tickets/:ticketId?\">\n <TicketTab\n isGloballyLoading={isGloballyLoading}\n appTab={appTab}\n showOverview={showOverview}\n setShowOverview={setShowOverview}\n openFormUrl={openFormUrl}\n setOpenFormUrl={setOpenFormUrl}\n setShowFooterButtons={setShowFooterButtons}\n onSelectAction={onSelectAction}\n showFooterButtons={showFooterButtons}\n />\n </Route>\n\n <Route path=\"/visit_activity/\">\n <VisitActivityTab\n appTab={appTab}\n onSelectDate={onSelectDate}\n onSelectSideTab={onSelectSideTab}\n selectedDate={detailsDate}\n />\n </Route>\n </Switch>\n </Grid>\n\n\n <Grid\n item\n xs={4}\n id=\"service-box\"\n sx={{\n height: \"fit-content\",\n position: \"sticky\",\n top: 80,\n marginTop: 2,\n paddingTop: \"0 !important\",\n }}\n >\n\n <>\n\n\n <ButtonGroup variant=\"contained\" sx={{ mr: 2, mb: 2, shadow: 0 }}>\n <Button\n onClick={() => handleButtonChange(0)}\n color={appTab === 0 ? 'primary' : 'info'}\n >\n Ticket\n </Button>\n <Button\n onClick={() => handleButtonChange(1)}\n color={appTab === 1 ? 'primary' : 'info'}\n >\n Visit Activity\n </Button>\n </ButtonGroup>\n\n\n\n <ButtonGroup variant=\"contained\">\n <Button\n onClick={() => onSelectSideTab('services')}\n color={tabMap[sideTab] === 0 ? 'primary' : 'info'}\n >\n Services\n </Button>\n <Button\n onClick={() => onSelectSideTab('otherTickets')}\n color={tabMap[sideTab] === 1 ? 'primary' : 'info'}\n >\n Tickets\n </Button>\n\n { detailsDate && (\n\n <Button\n onClick={() => onSelectSideTab('visitDetails')}\n color={tabMap[sideTab] === 2 ? 'primary' : 'info'}\n sx={{ display: detailsDate ? \"block\" : \"none\" }}\n >\n Visit: {formatDate(detailsDate)}\n </Button>\n\n )}\n\n </ButtonGroup>\n\n { false && (\n <StyledTabs\n value={tabMap[sideTab]}\n onChange={(_e, newValue) => {\n const selectedTab = Object.keys(tabMap).find(\n (key) => tabMap[key] === newValue\n );\n onSelectSideTab(selectedTab);\n }}\n >\n <StyledTab label=\"Services\" />\n\n <StyledTab\n label=\"Other Tickets\"\n />\n\n <StyledTab\n label={formatDate(detailsDate)}\n sx={{ display: detailsDate ? \"block\" : \"none\" }}\n />\n </StyledTabs>\n )}\n\n <TabPanel value={tabMap[sideTab]} index={tabMap.services}>\n {isGloballyLoading && (\n <Box width=\"100%\">\n <Skeleton variant=\"rectangular\" height={500} />\n </Box>\n )}\n <Box sx={{ visibility: isGloballyLoading ? \"hidden\" : \"visible\" }} >\n\n {sortedLocationServiceVendors &&\n map(\n sortedLocationServiceVendors,\n ([vendorId, locationServiceVendorData], key) => (\n <Fragment key={key}>\n <LocationServicesVendorBox\n key={vendorId}\n {...locationServiceVendorData}\n onSelectAction={onSelectAction}\n initialOpenState={vendorId == ticket?.vendor?.id}\n />\n </Fragment>\n )\n )}\n </Box>\n </TabPanel>\n <TabPanel value={tabMap[sideTab]} index={tabMap.otherTickets}>\n <TicketsList />\n </TabPanel>\n <TabPanel value={tabMap[sideTab]} index={tabMap.visitDetails}>\n <VisitDetails\n onBack={() => undefined}\n locationServiceVendors={locationServiceVendors}\n date={detailsDate}\n />\n </TabPanel>\n </>\n </Grid>\n </Grid>\n\n\n </AppContext.Provider>\n );\n};\n\nexport default App;\n","import { createAction } from 'redux-act';\nconst markProcessed = createAction(\"mark the service as processed\", (serviceId, processed) => { return( { serviceId, processed } ) });\nconst setCurrentSpecificationVersion = createAction(\"mark the service as processed\", (serviceId, specificationVersionUuid) => { return( { serviceId, specificationVersionUuid } ) });\nconst setCurrentProductSubscriptionVersion = createAction(\"mark the service as processed\", (serviceId, productSubscriptionUuid) => { return( { serviceId, productSubscriptionUuid } ) });\n\nexport default {\n markProcessed,\n setCurrentSpecificationVersion,\n setCurrentProductSubscriptionVersion\n}\n\n\n\n\n\n","import { createAction } from 'redux-act';\n\n//nextRoutineCollection\nconst selectCollectionDate = createAction(\"select the next routine collection date\", (collectionGroupUuid, collectionPlanSlug, date) => { return({ collectionGroupUuid, date, collectionPlanSlug } ) });\nconst selectCollectionDayIds = createAction(\"select the next routine collection day of week Ids\", (collectionGroupUuid, collectionPlanSlug, collectionDayIds) => { return({ collectionGroupUuid, collectionDayIds, collectionPlanSlug } ) });\nconst cloneNextRoutineCollection = createAction(\"clone the next routine collection\", (collectionGroupUuid, collectionPlanSlug, newCollectionGroupUuid) => { return({ collectionGroupUuid, collectionPlanSlug, newCollectionGroupUuid } ) });\n//const editNextRoutineCollection = createAction(\"edit the next routine collection date\", (collectionGroupUuid, collectionPlanSlug, date, collectionDayIds) => { return({ collectionGroupUuid, collectionPlanSlug, date, collectionDayIds } ) });\nconst markProcessed = createAction(\"mark the next routine collection as processed\", (collectionGroupUuid, collectionPlanSlug, processed) => { return({ collectionGroupUuid, collectionPlanSlug, processed } ) });\nconst editDateForCollectionGroup = createAction(\"edit the routine dates for the collection group\", (collectionGroupUuid, collectionPlanSlug) => { return({ collectionGroupUuid, collectionPlanSlug, requestedNewCollectionDateAt: moment().toISOString() } ) });\n\nexport default {\n selectCollectionDate,\n selectCollectionDayIds,\n markProcessed,\n editDateForCollectionGroup,\n cloneNextRoutineCollection\n}\n\n","import { createAction } from 'redux-act';\n\n const selectCollectionGroup = createAction(\"select a collection plan\",\n (collectionGroupUuid, collectionPlan) => { return ({ collectionGroupUuid, collectionPlan }) });\nconst selectSpecQuantity = createAction(\"select control quantity for bin spec\",\n (collectionGroupUuid, binTypeId, quantity) => { return ({ collectionGroupUuid, binTypeId, quantity }) });\nconst removeSpecBin = createAction(\"remove a control bin spec\",\n (collectionGroupUuid, binTypeId) => { return ({ collectionGroupUuid, binTypeId }) });\nconst addBinToCollectionGroup = createAction(\"add a new bin to collection group\",\n (specificationUuid, collectionGroupUuid, binTypeId) => { return ({ specificationUuid, collectionGroupUuid, binTypeId }) });\nconst markProcessed = createAction(\"mark the specification as processed\",\n (specificationUuid, processed) => { return ({ specificationUuid, processed }) });\nconst addSpecification = createAction(\"clone the specification\",\n (newSpecification) => { return ({ newSpecification }) });\nconst initializeSpecification = createAction(\"initialize the specification\",\n (serviceId, newSpecificationUuid) => { return ({ serviceId, newSpecificationUuid }) });\nconst setConfirmedByVendorOn = createAction(\"set confirmed by vendor on\",\n (specificationUuid, confirmedByVendorOn) => { return ({ specificationUuid, confirmedByVendorOn }) });\nconst destroySpecification = createAction(\"destroy spec\",\n (specificationUuid) => { return { specificationUuid } });\n\nexport default {\n initializeSpecification,\n selectCollectionGroup,\n selectSpecQuantity,\n removeSpecBin,\n addBinToCollectionGroup,\n markProcessed,\n addSpecification,\n setConfirmedByVendorOn,\n destroySpecification\n}\n","import { createAction } from 'redux-act';\n\nconst markProcessed = createAction(\"mark the supply product subscription as processed\", (uuid, processed) => { return( { uuid, processed } ) });\nconst selectProductQuantity = createAction(\"select quantity for product spec\", (uuid, productTypeId, quantity) => { return({ uuid, productTypeId, quantity } ) });\nconst addProduct = createAction(\"add a new product to the product subscription\", (uuid, productTypeId) => { return({ uuid, productTypeId } ) });\nconst removeProduct = createAction(\"remove the product to the product subscription\", (uuid, productTypeId) => { return({ uuid, productTypeId } ) });\nconst cloneSubscription = createAction(\"clone the specification\", (cloneSubscriptionUuid, newSubscriptionUuid) => { return( { cloneSubscriptionUuid, newSubscriptionUuid } ) });\nconst setConfirmedByVendorOn = createAction(\"set confirmed by vendor on\", (uuid, confirmedByVendorOn) => { return({ uuid, confirmedByVendorOn } ) });\n\nexport default {\n markProcessed,\n selectProductQuantity,\n addProduct,\n removeProduct,\n cloneSubscription,\n setConfirmedByVendorOn\n}\n\n","import { createAction } from 'redux-act';\n\nconst setDeliveryDate = createAction(\"set the delivery date for the new service\", (serviceId, deliveryDate) => { return({ serviceId, deliveryDate } ) });\nconst setStartDate = createAction(\"set the start date for the new service\", (serviceId, confirmedToStartDate) => { return({ serviceId, confirmedToStartDate } ) });\nconst setNoDeliveryOption = createAction(\"set the noDelivery option new service\", (serviceId, noDelivery) => { return({ serviceId, noDelivery } ) });\nconst markProcessed = createAction(\"mark the new service issue as processed\", (serviceId, processed) => { return( { serviceId, processed } ) });\n\nexport default {\n setDeliveryDate,\n setNoDeliveryOption,\n markProcessed,\n setStartDate\n}\n\n","import { createAction } from 'redux-act';\n\nconst markProcessed = createAction(\"mark the terminate service issue as processed\",\n (serviceId, processed) => { return { serviceId, processed } });\nconst terminateService = createAction(\"create a terminate service issue\",\n (serviceId) => { return { serviceId } });\nconst setFinalCollectionDate = createAction(\"set no final collection date\",\n (serviceId, finalCollectionDate) => { return { serviceId, finalCollectionDate } });\nconst setNoFinalCollection = createAction(\"set no final collection option\",\n (serviceId, noFinalCollection) => { return { serviceId, noFinalCollection } });\nconst markForDestroy = createAction(\"mark for destroy terminate service issue\", (serviceId) => { return { serviceId } });\nconst cancelTerminateService = createAction(\"cancel a terminate service issue\", (serviceId) => { return { serviceId } });\n\nexport default {\n markProcessed,\n terminateService,\n setFinalCollectionDate,\n setNoFinalCollection,\n markForDestroy,\n cancelTerminateService,\n};\n\n","import { createAction } from 'redux-act';\n\nconst markProcessed = createAction(\"mark the supply product instruction as processed\", (id, processed) => { return( { id, processed } ) });\nconst generateInvoice = createAction(\"ask server to generate the invoice\", (id, processed) => { return( { id, processed } ) });\nconst selectProductQuantity = createAction(\"select quantity for product spec\", (id, productTypeId, quantity) => { return({ id, productTypeId, quantity } ) });\nconst addProduct = createAction(\"add a new product to the supply agreeement\", (id, productTypeId) => { return({ id, productTypeId } ) });\nconst removeProduct = createAction(\"remove the product to the supply agreeement\", (id, productTypeId) => { return({ id, productTypeId } ) });\nconst setConfirmedByVendorOn = createAction(\"set confirmed by vendor on\", (id, confirmedByVendorOn) => { return({ id, confirmedByVendorOn } ) });\nconst newInstruction = createAction(\"create a new instruction\")\n\nexport default {\n markProcessed,\n generateInvoice,\n selectProductQuantity,\n addProduct,\n removeProduct,\n setConfirmedByVendorOn,\n newInstruction,\n}\n\n","import { createAction } from 'redux-act';\n\nconst markProcessed = createAction(\"mark the fixed collection time as processed\", (serviceId, processed) => { return( { serviceId, processed } ) });\nconst update = createAction(\"update the fixed collection time\", (serviceId, update) => { return( { serviceId, ...update } ) });\n\nexport default {\n markProcessed,\n update\n}\n\n","import _ from 'lodashExtended'\n\nconst getNextRoutineCollection = ({uuid, collectionPlanSlug}, state) => {\n return (state.issues.nextRoutineCollections || {})[`${uuid}-${collectionPlanSlug}`]\n}\n\nconst getNextRoutineCollections = (collectionGroups, state) => {\n return _(collectionGroups).map((cg) => getNextRoutineCollection(cg, state)).compact().value()\n}\n\n\nexport {\n getNextRoutineCollection,\n getNextRoutineCollections\n}\n","import _ from 'lodashExtended'\nimport { getService } from '../services/selectors'\n\nconst getSpecificationByCollectionGroupUuid = (collectionGroupUuid, specifications) => {\n\n const specificationUuid = _.findKey(specifications, (specification) =>\n _.findKey(specification.collectionGroups, (collectionGroup) =>\n collectionGroupUuid == collectionGroup.uuid))\n\n return specifications[specificationUuid]\n}\n\nconst getSpecification = (specificationUuid, state) => {\n return state.issues.specifications[specificationUuid]\n}\n\nconst getSpecifications = (state) => {\n return state.issues.specifications\n}\n\nconst getCurrentSpecification = (serviceId, state) => {\n return getSpecification(getService(serviceId, state).currentSpecificationVersionUuid, state)\n}\n\nconst getUnitSpecifications = (specification) => {\n var flatUnitSpecifications = {}\n if(specification) {\n _.each(specification.collectionGroups, ({unitSpecifications}) => {\n _.each(unitSpecifications, ({binTypeId, quantity}) => {\n flatUnitSpecifications[binTypeId] = { binTypeId, quantity }\n })\n })\n }\n return flatUnitSpecifications\n}\n\nconst getCurrentUnitSpecifications = (serviceId, state) => {\n return getUnitSpecifications(getSpecification(getService(serviceId, state).currentSpecificationVersionUuid, state), state)\n}\n\nexport {\n getSpecificationByCollectionGroupUuid,\n getSpecification,\n getSpecifications,\n getCurrentSpecification,\n getUnitSpecifications,\n getCurrentUnitSpecifications\n}\n","import { getService } from '../services/selectors'\n\nconst getProductSubscription = (uuid, state) => {\n return state.issues.productSubscriptions[uuid]\n}\n\nconst getCurrentProductSubscription = (serviceId, state) => {\n return state.issues.productSubscriptions[getService(serviceId, state).currentProductSubscriptionVersionUuid]\n}\n\nexport {\n getProductSubscription,\n getCurrentProductSubscription,\n}\n","const getNewServiceIssue = (serviceId, state) => state.issues.newServiceIssues[serviceId]\n\nexport {\n getNewServiceIssue\n}\n","import _ from 'lodashExtended'\n\nconst getTerminateServiceIssue = (serviceId, state) => { \n var terminateServiceIssue = state.issues.terminateServiceIssues[serviceId]\n return (terminateServiceIssue && terminateServiceIssue._destroy == '1' ? null : terminateServiceIssue )\n}\n\nexport {\n getTerminateServiceIssue,\n}\n","import _ from 'lodashExtended'\nimport { getService } from '../services/selectors'\nimport { getNewServiceIssue } from '../newServiceIssues/selectors'\n\nconst getInstructionsForServiceId = (serviceId, state) => {\n const { vendorServiceId, locationId } = getService(serviceId, state)\n return _(state.issues.supplyProductInstructions).pickBy({ vendorServiceId, locationId }).value()\n}\n\nconst getSupplyProductInstruction = (id, state) => {\n return state.issues.supplyProductInstructions[id]\n}\n\nconst getNewServiceSupplyInstruction = (serviceId, state) => {\n const newServiceIssue = getNewServiceIssue(serviceId, state)\n if(newServiceIssue && newServiceIssue.order) {\n const { number } = newServiceIssue.order\n const supplyProductInstructions = getInstructionsForServiceId(serviceId, state)\n return _.find(supplyProductInstructions, { order: { number } })\n } else {\n return null\n }\n}\n\nconst getNotNewServiceSupplyInstructions = (serviceId, state) => {\n const supplyProductInstructions = getInstructionsForServiceId(serviceId, state)\n return _.omitBy(supplyProductInstructions, getNewServiceSupplyInstruction(serviceId, state) )\n}\n\n\nexport {\n getInstructionsForServiceId,\n getSupplyProductInstruction,\n getNewServiceSupplyInstruction,\n getNotNewServiceSupplyInstructions\n}\n","import _ from 'lodashExtended'\n\nconst getFixedCollectionTime = (serviceId, state) => {\n return state.issues.fixedCollectionTimes[serviceId]\n}\n\n\nexport {\n getFixedCollectionTime\n}\n","import _ from 'lodashExtended'\nimport { getNextRoutineCollection } from '../nextRoutineCollections/selectors'\nimport { getCurrentSpecification } from '../specifications/selectors'\nimport { getCurrentProductSubscription } from '../productSubscriptions/selectors'\nimport { getNewServiceIssue } from '../newServiceIssues/selectors'\nimport { getTerminateServiceIssue } from '../terminateServiceIssues/selectors'\nimport { getNewServiceSupplyInstruction } from '../supplyProductInstructions/selectors'\nimport { getFixedCollectionTime } from '../fixedCollectionTimes/selectors'\n\nconst getServiceIds = (state) => {\n return _.map(state.issues.services, 'id')\n}\n\nconst isServiceProcessed = (serviceId, state) => {\n return isServiceX(serviceId, 'processed', state)\n}\n\nconst isServiceResolved= (serviceId, state) => {\n return _(getServiceIssueComponents(serviceId, state)).map('resolved').every()\n}\nconst isServiceClosed= (serviceId, state) => {\n return _(getServiceIssueComponents(serviceId, state)).map('closed').every()\n}\n\nconst isServiceX= (serviceId, x, state) => {\n return _(getServiceIssueComponents(serviceId, state)).map(x).every()\n}\n\nconst getServiceIssueComponents = (serviceId, state) => {\n const service = getService(serviceId, state)\n var serviceIssues = []\n serviceIssues = serviceIssues.concat(getNewServiceIssue(serviceId, state))\n serviceIssues = serviceIssues.concat(getTerminateServiceIssue(serviceId, state))\n serviceIssues = serviceIssues.concat(getNewServiceSupplyInstruction(serviceId, state))\n const specification = getCurrentSpecification(service.id, state)\n if(specification) {\n serviceIssues = serviceIssues.concat(specification)\n _.each(specification.collectionGroups, (collectionGroup) => {\n serviceIssues = serviceIssues.concat(getNextRoutineCollection(collectionGroup, state))\n })\n }\n\n serviceIssues = serviceIssues.concat(getCurrentProductSubscription(serviceId, state))\n serviceIssues = serviceIssues.concat(getFixedCollectionTime(serviceId, state))\n\n //console.log({[x]:_(serviceIssues).compact().map(x).every(), issues: serviceIssues } )\n return _(serviceIssues).compact().value()\n}\n\nconst getService = (serviceId, state) => state.issues.services[serviceId]\nconst getSalesUnitPricesByServiceCode = (serviceId, state) => state.issues.services[serviceId].salesPricesByServiceCode\n\nexport {\n isServiceProcessed,\n isServiceResolved,\n isServiceClosed,\n getService,\n getServiceIds,\n getSalesUnitPricesByServiceCode\n}\n","import serviceActions from './actions'\nimport nextRoutineCollectionsActions from '../nextRoutineCollections/actions'\nimport specificationsActions from '../specifications/actions'\nimport productSubscriptionsActions from '../productSubscriptions/actions'\nimport newServiceIssuesActions from '../newServiceIssues/actions'\nimport terminateServiceIssuesActions from '../terminateServiceIssues/actions'\nimport supplyProductInstructionsActions from '../supplyProductInstructions/actions'\nimport fixedCollectionTimesActions from '../fixedCollectionTimes/actions'\nimport { getService } from '../services/selectors'\nimport { getCurrentSpecification } from '../specifications/selectors'\nimport { getCurrentProductSubscription } from '../productSubscriptions/selectors'\nimport { getFixedCollectionTime } from '../fixedCollectionTimes/selectors'\nimport { getNewServiceIssue } from '../newServiceIssues/selectors'\nimport { getTerminateServiceIssue } from '../terminateServiceIssues/selectors'\nimport { getNewServiceSupplyInstruction } from '../supplyProductInstructions/selectors'\nimport { cloneSpecification } from '../specifications/operations'\nimport _ from 'lodashExtended'\nimport createGuid from 'createGuid'\n\nconst markServiceProcessed = (serviceId, processed) => (dispatch, getState) => {\n const state = getState()\n\n const service = getService(serviceId, state)\n\n dispatch(serviceActions.markProcessed(serviceId, processed))\n\n if(getNewServiceIssue(serviceId, state)) {\n dispatch(newServiceIssuesActions.markProcessed(serviceId, processed))\n\n const newServiceSupplyInstruction = getNewServiceSupplyInstruction(serviceId, state)\n if(newServiceSupplyInstruction) {\n dispatch(supplyProductInstructionsActions.markProcessed(newServiceSupplyInstruction.id, processed))\n }\n }\n\n if(getTerminateServiceIssue(serviceId, state)) {\n dispatch(terminateServiceIssuesActions.markProcessed(serviceId, processed))\n }\n\n\n if(getFixedCollectionTime(serviceId, state)) {\n dispatch(fixedCollectionTimesActions.markProcessed(serviceId, processed))\n }\n\n const specification = getCurrentSpecification(service.id, state)\n\n if(specification) {\n dispatch(specificationsActions.markProcessed(specification.uuid, processed))\n\n _.each(specification.collectionGroups, ({uuid, collectionPlanSlug}) => {\n dispatch(nextRoutineCollectionsActions.markProcessed(uuid, collectionPlanSlug, processed))\n })\n }\n\n const productSubscription = getCurrentProductSubscription(service.id, state)\n\n if(productSubscription) {\n dispatch(productSubscriptionsActions.markProcessed(productSubscription.uuid, processed))\n }\n\n}\n\nconst changeSpecification = (serviceId) => (dispatch, getState) => {\n const state = getState()\n const currentSpecification = getCurrentSpecification(serviceId, state)\n const newUuid = createGuid()\n\n if(currentSpecification) {\n dispatch(cloneSpecification(currentSpecification.uuid, newUuid))\n dispatch(serviceActions.setCurrentSpecificationVersion(serviceId, newUuid))\n } else {\n dispatch(specificationsActions.initializeSpecification(serviceId, newUuid))\n dispatch(serviceActions.setCurrentSpecificationVersion(serviceId, newUuid))\n }\n\n}\n\nconst cancelChangeSpecification = (serviceId) => (dispatch, getState) => {\n const state = getState();\n const { cloneSpecificationUuid, uuid, id } = getCurrentSpecification(serviceId, state);\n\n dispatch(\n serviceActions.setCurrentSpecificationVersion(\n serviceId,\n cloneSpecificationUuid\n )\n );\n\n if (_.isPresent(uuid) && _.isBlank(id)) {\n dispatch(specificationsActions.destroySpecification(uuid));\n }\n};\n\nconst changeProductSubscription = (serviceId) => (dispatch, getState) => {\n const state = getState()\n\n const currentProductSubscription = getCurrentProductSubscription(serviceId, state)\n\n if(currentProductSubscription) {\n var newUuid = createGuid()\n dispatch(productSubscriptionsActions.cloneSubscription(currentProductSubscription.uuid, newUuid))\n dispatch(serviceActions.setCurrentProductSubscriptionVersion(serviceId, newUuid))\n }\n\n}\n\nexport {\n markServiceProcessed,\n changeSpecification,\n changeProductSubscription,\n cancelChangeSpecification,\n};\n","import actions from './actions'\nimport _ from 'lodashExtended'\nimport { getSpecifications } from '../specifications/selectors'\n//import { getNextRoutineCollection } from '../nextRoutineCollections/selectors'\nimport nextRoutineCollectionsActions from '../nextRoutineCollections/actions'\n\nconst addSpecBin = (specificationUuid, binTypeId) => (dispatch, getState) => {\n const state = getState()\n\n const specification = state.issues.specifications[specificationUuid]\n const service = state.issues.services[specification.serviceId]\n var collectionGroupUuid\n\n const collectionGroups = _.values(specification.collectionGroups)\n\n if( collectionGroups.length == 1 && _.isEmpty(collectionGroups[0].unitSpecifications)) {\n //if the collection group is the only on, and it is empty, then use that one.\n collectionGroupUuid = collectionGroups[0].uuid\n } else {\n\n const binTypes = state.form.binTypes.byId\n\n var binTypeIdToDefaultGroup = {}\n\n\n _.each(service.defaultBinTypeIdsByGroup, (groupedBinTypeIds, defaultGroup) => {\n _.each(groupedBinTypeIds, (binTypeId) => binTypeIdToDefaultGroup[binTypeId] = defaultGroup )\n })\n\n var defaultGroupToCollectionGroupUuid = {}\n\n _.each(collectionGroups, (collectionGroup) => {\n _.each(collectionGroup.unitSpecifications, (unitSpec) => {\n var defaultGroup = binTypeIdToDefaultGroup[unitSpec.binTypeId]\n if(defaultGroup) {\n defaultGroupToCollectionGroupUuid[defaultGroup] = collectionGroup.uuid\n }\n })\n })\n\n collectionGroupUuid = defaultGroupToCollectionGroupUuid[binTypeIdToDefaultGroup[binTypeId]]\n }\n dispatch(actions.addBinToCollectionGroup(specificationUuid, collectionGroupUuid, binTypeId))\n}\n\nconst selectCollectionGroupSlug = (collectionGroupUuid, collectionPlanSlug) => (dispatch, getState) => {\n const state = getState()\n const collectionPlan = state.form.collectionPlans.bySlug[collectionPlanSlug] || {}\n dispatch(actions.selectCollectionGroup(collectionGroupUuid, collectionPlan))\n}\n\n\nconst cloneSpecification = (cloneSpecificationUuid, newSpecificationUuid) => (dispatch, getState) => {\n\n const state = getState()\n const specifications = getSpecifications(state)\n\n const { serviceId, collectionGroups } = specifications[cloneSpecificationUuid]\n\n var newCollectionGroups = {}\n\n _.each(collectionGroups, (\n {\n uuid, timesPerWeek,\n interval, collectionPlanSlugRequired,\n hasRoutineCollections, collectionPlanSlug, name, unitSpecifications\n }) => {\n var newUnitSpecifications = {}\n\n _.each(unitSpecifications, ({binTypeId, quantity}) => {\n newUnitSpecifications[binTypeId] = { binTypeId, quantity, currentQuantity: quantity }\n })\n\n var newUuid = createGuid()\n newCollectionGroups[newUuid] = {\n uuid: newUuid,\n collectionPlanSlug,\n name,\n timesPerWeek,\n interval,\n hasRoutineCollections,\n collectionPlanSlugRequired,\n currentCollectionPlanSlug: collectionPlanSlug,\n unitSpecifications: newUnitSpecifications,\n errors: {}\n }\n\n\n if(hasRoutineCollections) {\n dispatch(nextRoutineCollectionsActions.cloneNextRoutineCollection(uuid, collectionPlanSlug, newUuid))\n }\n })\n\n const newSpecification = {\n uuid: newSpecificationUuid,\n cloneSpecificationUuid,\n collectionGroups: newCollectionGroups,\n processed: false,\n resolved: false,\n closed: false,\n serviceId,\n errors: {}\n }\n\n dispatch(actions.addSpecification(newSpecification))\n}\n\nexport {\n addSpecBin,\n selectCollectionGroupSlug,\n cloneSpecification\n}\n","import { createAction } from 'redux-act';\n\nconst markProcessed = createAction(\"mark the adhoc booking as processed\", (id, processed) => { return( { id, processed } ) });\nconst newBooking = createAction(\"create a new adhoc booking\", (serviceId, unitSpecifications = {}) => { return( { serviceId, unitSpecifications } ) });\nconst setClearAllPolicy = createAction(\"set the clear all policy\", (id, clearAll) => { return( { id, clearAll } ) });\nconst selectBinQuantity = createAction(\"select quantity for bin spec\", (id, binTypeId, quantity) => { return({ id, binTypeId, quantity } ) });\nconst addBin = createAction(\"add a new bin to the adhoc booking\", (id, binTypeId) => { return({ id, binTypeId } ) });\nconst removeBin = createAction(\"remove the bin to the adhoc booking\", (id, binTypeId) => { return({ id, binTypeId } ) });\nconst setDate = createAction(\"set the date for the adhoc booking\", (id, date) => { return({ id, date } ) });\nconst setRequestDate = createAction(\"set the requested on date for the adhoc booking\", (id, requestedOn) => { return({ id, requestedOn } ) });\nconst markForDestroy = createAction(\"mark for destroy adhoc booking\", (id) => { return( { id } ) });\n\nexport default {\n markProcessed,\n newBooking,\n setClearAllPolicy,\n selectBinQuantity,\n addBin,\n removeBin,\n setDate,\n setRequestDate,\n markForDestroy\n}\n\n","import { createAction } from 'redux-act';\n\nconst markProcessed = createAction(\"mark the bin delivery as processed\", (id, processed) => { return( { id, processed } ) });\nconst newDelivery = createAction(\"create a new bin delivery\", (serviceId, unitSpecifications = {}) => { return( { serviceId, unitSpecifications } ) });\nconst selectBinQuantity = createAction(\"select quantity for bin spec\", (id, binTypeId, quantity) => { return({ id, binTypeId, quantity } ) });\nconst addBin = createAction(\"add a new bin to the bin delivery\", (id, binTypeId) => { return({ id, binTypeId } ) });\nconst removeBin = createAction(\"remove the bin to the bin delivery\", (id, binTypeId) => { return({ id, binTypeId } ) });\nconst setDate = createAction(\"set the date for the bin delivery\", (id, date) => { return({ id, date } ) });\nconst setRequestDate = createAction(\"set the requested on date for the bin delivery\", (id, requestedOn) => { return({ id, requestedOn } ) });\nconst markForDestroy = createAction(\"mark for destroy bin delivery\", (id) => { return( { id } ) });\nconst setMissed = createAction(\"set the missed flag on delivery\", (id, missed) => { return( { id, missed } ) });\n\n\nexport default {\n markProcessed,\n newDelivery,\n selectBinQuantity,\n addBin,\n removeBin,\n setDate,\n setMissed,\n setRequestDate,\n markForDestroy\n}\n\n","import { createAction } from 'redux-act';\n\nconst newReport = createAction(\"create a new missed collection report\", (serviceId) => { return({ serviceId } ) });\nconst updateReport = createAction(\"update the missed collection report\", (reportId, newAttribs) => { return({...newAttribs, reportId})} )\nconst markForDestruction = createAction(\"mark missed collection report for destroy\", (reportId) => { return({ reportId } ) });\nconst markProcessed = createAction(\"mark the missed report as processed\", (reportId, processed) => { return( { reportId, processed } ) });\n\nexport default {\n newReport,\n updateReport,\n markForDestruction,\n markProcessed\n //selectCollectionDate,\n //selectCollectionDayIds,\n //markProcessed,\n //editDateForCollectionGroup\n}\n\n","import React from 'react'\nimport { DropdownSelect } from 'sharedComponents'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended'\nimport { changeSpecification, changeProductSubscription } from '../services/operations'\nimport { newBookingForService } from '../adhocCollectionBookings/operations'\nimport { newDeliveryForService } from '../binDeliveries/operations'\nimport { getService } from '../services/selectors'\nimport { getCurrentSpecification } from '../specifications/selectors'\nimport { editCollectionDatesForService } from '../nextRoutineCollections/operations'\nimport { newInstructionForService } from '../supplyProductInstructions/operations'\nimport terminateServiceIssuesActions from '../terminateServiceIssues/actions'\nimport missedCollectionReportsActions from '../missedCollectionReports/actions'\n\nlet ServiceActionMenu = ({items, onSelect}) => {\n\n if(_.isEmpty(items)) {\n return null\n } else {\n\n const options = _.filter([\n { value: 'reportMissedCollection', label: \"Report a missed collection\"},\n { value: 'changeSpecification', label: \"Change the spec\"},\n { value: 'updateCollectionDate', label: \"Update Collection Date\"},\n { value: 'supplyProducts', label: \"Request product delivery\"},\n { value: 'bookAdhocCollection', label: \"Book an Adhoc Collection\"},\n { value: 'newBinDelivery', label: \"Request Bin Delivery\"},\n { value: 'changeProductSubscription', label: \"Change the product subscription\"},\n { value: 'terminateService', label: \"Terminate Service\"},\n ], ({value}) => _.includes(items, value) )\n\n return <span className='pull-right'>\n <DropdownSelect title=\"What do you need to do?\"\n onChange={onSelect}\n options={options}>\n <span className='btn btn-flat btn-xs btn-primary'><i className=\"fa fa-plus\"></i>  Actions</span>\n </DropdownSelect>\n </span>\n\n }\n}\n\nServiceActionMenu.propTypes = {\n serviceId: PropTypes.number.isRequired,\n onSelect: PropTypes.func.isRequired,\n items: PropTypes.arrayOf(\n PropTypes.oneOf(\n [\n 'reportMissedCollection',\n 'supplyProducts',\n 'changeSpecification',\n 'updateCollectionDate',\n 'bookAdhocCollection',\n 'newBinDelivery',\n 'changeProductSubscription',\n 'terminateService'\n ]\n )\n ).isRequired,\n};\n\nconst mapStateToProps = (state, {serviceId}) => {\n return {\n }\n}\n\nconst mapDispatchToProps = (dispatch, {serviceId} ) => {\n return {\n onSelect: (x) => {\n const actions = {\n changeSpecification: () => dispatch(changeSpecification(serviceId)),\n updateCollectionDate: () => dispatch(editCollectionDatesForService(serviceId)),\n reportMissedCollection: () => dispatch(missedCollectionReportsActions.newReport(serviceId)),\n bookAdhocCollection: () => dispatch(newBookingForService(serviceId)),\n supplyProducts: () => dispatch(newInstructionForService(serviceId)),\n newBinDelivery: () => dispatch(newDeliveryForService(serviceId)),\n changeProductSubscription: () => dispatch(changeProductSubscription(serviceId)),\n terminateService: () => dispatch(terminateServiceIssuesActions.terminateService(serviceId))\n }\n actions[x]()\n }\n }\n}\n\nServiceActionMenu = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ServiceActionMenu)\n\nexport default ServiceActionMenu\n\n","import actions from './actions'\nimport { getCurrentSpecification } from '../specifications/selectors'\nimport _ from 'lodashExtended';\n\nconst editCollectionDatesForService = (serviceId) => (dispatch, getState) => {\n const state = getState()\n const currentSpecification = getCurrentSpecification(serviceId, state)\n\n if(currentSpecification) {\n _.each(currentSpecification.collectionGroups, ({uuid, collectionPlanSlug}) => {\n dispatch(actions.editDateForCollectionGroup(uuid, collectionPlanSlug))\n })\n }\n\n}\n\n\nexport {\n editCollectionDatesForService\n}\n\n","import actions from './actions'\nimport { getCurrentSpecification, getUnitSpecifications } from '../specifications/selectors'\nimport { getService } from '../services/selectors'\n\nconst newBookingForService = (serviceId) => (dispatch, getState) => {\n\n const state = getState()\n\n\n const specification = getCurrentSpecification(serviceId, state)\n\n var flatUnitSpecifications = getUnitSpecifications(specification)\n\n dispatch(actions.newBooking(serviceId, flatUnitSpecifications))\n}\n\n\nexport {\n newBookingForService\n}\n\n","import actions from './actions'\nimport { getService } from '../services/selectors'\n\nconst newInstructionForService = (serviceId) => (dispatch, getState) => {\n\n const state = getState()\n\n dispatch(actions.newInstruction(getService(serviceId, state)))\n}\n\nexport {\n newInstructionForService\n}\n\n","import actions from './actions'\nimport { getCurrentSpecification } from '../specifications/selectors'\nimport { getService } from '../services/selectors'\n//import _ from 'lodashExtended'\n//\n//\nconst newDeliveryForService = (serviceId) => (dispatch, getState) => {\n\n const state = getState()\n\n var flatUnitSpecifications = {}\n\n //const specification = getCurrentSpecification(serviceId, state)\n\n //if(specification) {\n //_.each(specification.collectionGroups, ({unitSpecifications}) => {\n //_.each(unitSpecifications, ({binTypeId, quantity}) => {\n //flatUnitSpecifications[binTypeId] = { binTypeId, quantity }\n //})\n //})\n //}\n\n dispatch(actions.newDelivery(serviceId, flatUnitSpecifications))\n}\n\n\nexport {\n newDeliveryForService\n}\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport ServiceActionMenu from '../ServiceActionMenu'\nimport { Link, Btn } from 'sharedComponents'\nimport { confirmAlert } from \"react-confirm-alert\"; // Import\nimport 'react-confirm-alert/src/react-confirm-alert.css'; // Import css\n\nconst ServiceHolder = ({\n id,\n title,\n hasWrongCommissioner,\n children,\n menuItems,\n serviceActionMenuProps = {},\n vendorService,\n onEmergencyCollection\n}) => {\n serviceActionMenuProps = { serviceId: id, items: menuItems, ...serviceActionMenuProps }\n let emergencyCollectionBtn\n\n if(vendorService.requestEmergencyCollectionPath) {\n\n let requestConfirm = () => {\n confirmAlert({\n title: `Request Emergency Collection`,\n message: 'Are you sure you want to request and emergency collection',\n buttons: [\n {\n label: \"Make request\",\n onClick: () => { \n onEmergencyCollection(id) },\n },\n {\n label: \"Cancel\",\n },\n ],\n });\n };\n\n emergencyCollectionBtn = <Btn onClick={requestConfirm} className='mb-2'styles='danger xs flat'>Request Emergency Collection</Btn>\n }\n\n return(<div className=\"issue-list\">\n <div className='pull-right' ><ServiceActionMenu {...serviceActionMenuProps}/></div>\n <h4 style={{color: 'white', fontSize: 15}} className=\"mt0\">{title}</h4>\n <h6 style={{color: 'white', fontSize: 13}}><Link href={vendorService.path} target='_blank'>{vendorService.name} / {vendorService.authorityName} / {vendorService.vendorName}</Link></h6>\n {emergencyCollectionBtn}\n { hasWrongCommissioner ? <div className='text-danger'>Wrong Commissioner</div> : null } \n <div>\n {children}\n </div>\n </div>)\n\n}\n\nServiceHolder.propTypes = {\n title: PropTypes.string.isRequired,\n children: PropTypes.node.isRequired,\n hasWrongCommissioner: PropTypes.bool.isRequired\n}\n\nexport default ServiceHolder\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { Link } from 'sharedComponents'\n\nconst OrderLink = ({ path, number}) => {\n if(path) {\n return <div className=\"mb5\">Order: <Link href={path} target='_blank'>{number}</Link></div>\n } else {\n return null\n }\n}\n\nOrderLink.propTypes = {\n path: PropTypes.string,\n number: PropTypes.string\n};\n\nexport default OrderLink\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport classNames from 'classnames'\nimport _ from 'lodashExtended'\n\nconst IssueBox = ({ children, title, resolved, heading, minimized = false, historical = false, handleDelete, handleEdit, handleToggleMinimized }) => {\n const remove = _.isFunction(handleDelete) ? (<div style={{cursor: 'pointer'}} className='pull-right' onClick={handleDelete}>\n <i className=\"fa fa-times text-muted\" style={{ cursor: 'pointer', marginRight: -5, marginLeft: 15 }}></i>\n </div>) : null\n\n const edit = _.isFunction(handleEdit) ? (<div style={{cursor: 'pointer'}} className='pull-right' onClick={handleEdit}>\n <i className=\"fa fa-pencil text-muted\" style={{ cursor: 'pointer', marginRight: -5, marginLeft: 15 }}></i>\n </div>) : null\n\n const toggleMinimized = _.isFunction(handleToggleMinimized) ? (<div style={{cursor: 'pointer'}} className='pull-right' onClick={handleToggleMinimized}>\n\n <small className=\"text-muted\" style={{ cursor: 'pointer', marginRight: -5, marginLeft: 15 }}>{ minimized ? 'More' : 'Less' } Detail</small>\n </div>) : null\n\n var classes = classNames({\n 'bg-success': !!resolved,\n 'well': true,\n 'issue-wrapper': true,\n 'historical': historical\n })\n\n var titleClasses = classNames({\n 'clearfix': true,\n 'mb7': true,\n 'text-muted': true,\n })\n\n return (\n <div className={classes}>\n <div style={{ minHeight: 25 }}>\n {remove}\n {edit}\n {toggleMinimized}\n <div className={titleClasses}><strong>{ _.isPresent(title) ? title : _.isPresent(heading) ? heading : null }</strong></div>\n </div>\n {children}\n </div>\n )\n}\n\nIssueBox.propTypes = {\n children: PropTypes.node,\n title: PropTypes.node,\n minimized: PropTypes.bool,\n historical: PropTypes.bool,\n heading: PropTypes.node,\n handleDelete: PropTypes.func,\n handleEdit: PropTypes.func,\n toggleMinimized: PropTypes.func,\n};\n\n\nexport default IssueBox\n\n\n","import React from 'react'\nimport PropTypes from 'prop-types'\n\nconst IssueBoxSection = ({ children }) => {\n return (\n <div className=\"issue-box-section clearfix\">\n {children}\n </div>\n )\n}\n\nIssueBoxSection.propTypes = {\n children: PropTypes.node.isRequired,\n};\n\nexport default IssueBoxSection\n\n\n// style={{ borderTop: '1px solid #e6e9ed', padding: '10px 10px 5px 10px', marginLeft: -10, marginRight: -10 }}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport actions from '../newServiceIssues/actions'\nimport { Link } from 'sharedComponents'\n\nlet NewServiceDeliveryOption = ({ newServiceIssue, onChange }) => {\n\n if(!!newServiceIssue.noDelivery) {\n return(<div className=\"mb5\">\n <i className=\"link fa fa-exchange\" onClick={ () => { onChange(false) } }></i>  \n Delivery <strong>not</strong> required\n </div>)\n } else {\n return(<div className=\"mb5\">\n <i className=\"link fa fa-exchange\" onClick={ () => { onChange(true) } }></i>  \n Delivery required\n </div>)\n }\n}\n\nNewServiceDeliveryOption.propTypes = {\n newServiceIssue: PropTypes.shape({\n serviceId: PropTypes.number.isRequired,\n noDelivery: PropTypes.bool,\n }).isRequired,\n onChange: PropTypes.func.isRequired\n}\n\nconst mapStateToProps = (state, ownProps) => {\n return {\n }\n}\n\nconst mapDispatchToProps = (dispatch, {newServiceIssue}) => {\n return {\n onChange: (noDelivery) => { dispatch(actions.setNoDeliveryOption(newServiceIssue.serviceId, noDelivery)) },\n }\n}\n\nNewServiceDeliveryOption = connect(\n mapStateToProps,\n mapDispatchToProps\n)(NewServiceDeliveryOption)\n\n\nexport default NewServiceDeliveryOption\n\n","import React from 'react'\nimport { DropdownSelect } from 'sharedComponents'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended'\n\nlet PlanSelect = ({allowedCollectionPlanSlugs, disableCurrentValue = true, strongTarget, allCollectionPlansBySlug, selectedSlug, currentSlug, onSelectPlan}) => {\n\n var selectableCollectionPlans = _([allowedCollectionPlanSlugs, currentSlug, selectedSlug]).flatten().compact().uniq().\n map((slug) => allCollectionPlansBySlug[slug] ).value()\n\n\n const options = _.map(selectableCollectionPlans, (plan) => {\n return { value: plan.slug, label: plan.name }\n })\n\n var handleChangeCollectionPlan\n\n return <span>\n <DropdownSelect title=\"Select a Routine Collection Type\"\n blankText=\"select\"\n onChange={onSelectPlan}\n selectedValue={selectedSlug}\n currentValue={currentSlug}\n required={true}\n allowNull={true}\n strongTarget={strongTarget}\n disableCurrentValue={disableCurrentValue}\n\n options={options} />\n </span>\n\n}\n\nPlanSelect.propTypes = {\n allCollectionPlansBySlug: PropTypes.objectOf(\n PropTypes.shape({\n slug: PropTypes.string.isRequire,\n name: PropTypes.string.isRequire,\n })),\n selectedSlug: PropTypes.string,\n currentSlug: PropTypes.string,\n onSelectPlan: PropTypes.func.isRequired,\n disableCurrentValue: PropTypes.bool,\n strongTarget: PropTypes.bool\n};\n\nconst mapStateToProps = (state, {}) => {\n return {\n allCollectionPlansBySlug: state.form.collectionPlans.bySlug\n }\n}\n\nPlanSelect = connect(\n mapStateToProps,\n null\n)(PlanSelect)\n\n\n\nexport default PlanSelect\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux';\nimport { getSpecificationByCollectionGroupUuid } from '../specifications/selectors'\nimport PlanSelect from './PlanSelect'\nimport { selectCollectionGroupSlug } from '../specifications/operations'\nimport { getService } from '../services/selectors'\n\nlet CollectionPlanSelect = ({collectionGroup, allowedCollectionPlanSlugs, onSelectPlan}) => {\n var { currentCollectionPlanSlug, collectionPlanSlug } = collectionGroup\n return <PlanSelect\n allowedCollectionPlanSlugs={allowedCollectionPlanSlugs}\n currentSlug={currentCollectionPlanSlug}\n disableCurrentValue={false}\n onSelectPlan={onSelectPlan}\n strongTarget={true}\n selectedSlug={collectionPlanSlug}/>\n}\n\nCollectionPlanSelect.propTypes = {\n collectionGroup: PropTypes.shape({\n uuid: PropTypes.string.isRequired,\n collectionPlanSlug: PropTypes.string,\n currentCollectionPlanSlug: PropTypes.string\n }).isRequired,\n};\n\nconst mapStateToProps = (state, ownProps) => {\n const specification = getSpecificationByCollectionGroupUuid(ownProps.collectionGroup.uuid, state.issues.specifications)\n return {\n allowedCollectionPlanSlugs: getService(specification.serviceId, state).allowedCollectionPlanSlugs\n }\n}\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {\n onSelectPlan: (slug) => dispatch(selectCollectionGroupSlug(ownProps.collectionGroup.uuid, slug)),\n }\n}\n\nCollectionPlanSelect = connect(\n mapStateToProps,\n mapDispatchToProps\n)(CollectionPlanSelect)\n\nexport default CollectionPlanSelect\n","import _ from 'lodashExtended'\n\nconst getCollectionPlan = (slug, state) => {\n\n var plan = state.form.collectionPlans.bySlug[slug]\n\n if(plan) {\n return plan\n } else if(!slug) {\n return null\n } else {\n throw `collection plan is unknow for ${slug}`\n }\n}\n\nconst getBinType = (binTypeId, state) => _.get(state, ['form', 'binTypes', 'byId', binTypeId])\nconst getBinTypes = (state) => _.get(state, ['form', 'binTypes', 'byId'] )\n\nconst getBinTypeIdsThatCanBeContainedByIds = (binTypeIds, state) => {\n const canContainBinGroupIds = _(binTypeIds).map((binTypeId) => getBinType(binTypeId,state)).filter('canContainBins').map('binGroupId').value()\n const canBeContainedIds = _(getBinTypes(state)).filter(({binGroupId,canContainBins}) => !canContainBins && _.includes(canContainBinGroupIds, binGroupId)).map('id').value()\n return canBeContainedIds\n}\n\nexport {\n getCollectionPlan,\n getBinTypeIdsThatCanBeContainedByIds\n}\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux';\nimport { getCollectionPlan } from '../form/selectors'\n\n\nlet CollectionPlan = ({collectionPlan}) => {\n return <strong>{collectionPlan.name}</strong>\n}\n\n\nCollectionPlan.propTypes = {\n collectionGroup: PropTypes.shape({\n collectionPlanSlug: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nconst mapStateToProps = (state, {collectionGroup}) => {\n return {\n collectionPlan: getCollectionPlan(collectionGroup.collectionPlanSlug, state)\n }\n}\n\n\nCollectionPlan = connect(\n mapStateToProps,\n null\n)(CollectionPlan)\n\n\n\nexport default CollectionPlan\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\n\nlet UnitSpecification = ({quantity, binType}) => {\n return <div>{quantity} x {binType.fullname}</div>\n}\n\nUnitSpecification.propTypes = {\n binType: PropTypes.shape({\n name: PropTypes.string,\n fullname: PropTypes.string,\n id: PropTypes.number,\n }).isRequired,\n quantity: PropTypes.number.isRequired,\n binTypeId: PropTypes.number.isRequired,\n}\n\nconst mapStateToProps = (state, ownProps) => {\n return {\n binType: state.form.binTypes.byId[ownProps.binTypeId],\n }\n}\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return { }\n}\n\nUnitSpecification = connect(\n mapStateToProps,\n mapDispatchToProps\n)(UnitSpecification)\n\n\nexport default UnitSpecification\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport UnitSpecification from './UnitSpecification'\n\nlet UnitSpecificationList = ({ unitSpecifications }) => {\n\n if(_.isPresent(unitSpecifications)) {\n return(\n <div>\n {_.map(unitSpecifications, (unitSpec) => <UnitSpecification key={unitSpec.binTypeId} {...unitSpec}/> ) }\n </div>\n )\n } else {\n return <strong style={{ cursor: 'pointer' }} className='text-danger'>\n {\"select\"}\n </strong>\n }\n\n}\n\nUnitSpecificationList.propTypes = {\n unitSpecifications: PropTypes.objectOf(\n PropTypes.shape({\n binTypeId: PropTypes.number.isRequired,\n quantity: PropTypes.number.isRequired,\n })\n ).isRequired\n};\n\n\n\nexport default UnitSpecificationList\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux';\nimport { ListGroupItem } from 'sharedComponents'\n\nclass BinQuantitySelector extends React.Component {\n\n constructor(props) {\n super(props);\n this.handleChange = this.handleChange.bind(this)\n this.handleDestroy = this.handleDestroy.bind(this)\n }\n\n handleChange(e) {\n this.props.onChange(this.props.binTypeId, e.target.value)\n }\n\n handleDestroy(e) {\n this.props.onDestroy(this.props.binTypeId)\n }\n\n render() {\n var { binType, helpText, quantity, onChange, onDestroy } = this.props\n\n return(\n <ListGroupItem handleDelete={this.handleDestroy}>\n <div className=\"row\" style={{ minHeight: 40, paddingLeft: 20, marginLeft: -45}}>\n\n\n <div className=\"col-sm-2\"><img src={binType.smallUrl} style={{ height: 40, width: 40, marginRight: 7 }}/></div>\n\n <div className=\"col-sm-3 no-wrap\">\n <input style={ { width: 40, marginTop: 7, display: 'inline-block', textAlign: 'center' } } type=\"number\" step=\"1\" value={quantity} onChange={this.handleChange}/>\n   <small> <span className=\"text-muted\">x</span> </small>\n </div>\n\n <div className=\"col-sm-5\">\n <small>\n { binType.name }<br/>\n <span className=\"text-muted\">{binType.binGroupName}</span>\n <span className=\"text-muted\">{helpText}</span>\n </small>\n </div>\n\n </div>\n </ListGroupItem>\n )\n }\n}\n\n\nBinQuantitySelector.propTypes = {\n onChange: PropTypes.func.isRequired,\n onDestroy: PropTypes.func.isRequired,\n helpText: PropTypes.node,\n quantity: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]).isRequired,\n binTypeId: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]).isRequired,\n binType: PropTypes.shape({\n name: PropTypes.string.isRequired,\n smallUrl: PropTypes.string.isRequired,\n binGroupName: PropTypes.string.isRequired,\n }).isRequired\n};\n\n\nconst mapStateToProps = (state, {binTypeId}) => {\n return {\n binType: state.form.binTypes.byId[binTypeId]\n }\n}\n\nBinQuantitySelector = connect(\n mapStateToProps,\n null,\n)(BinQuantitySelector)\n\n\nexport default BinQuantitySelector\n\n\n","import React from 'react'\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types'\nimport BinQuantitySelector from './BinQuantitySelector'\nimport { ListGroup } from 'sharedComponents'\nimport _ from 'lodashExtended';\n\nlet EditUnitSpecifications = ({ unitSpecifications, onChangeQuantity, binTypes, onRemove}) => {\n\nconst sortedUnitSpecifications = _.sortBy(unitSpecifications, (unitSpec) => {\n var binType = binTypes[unitSpec.binTypeId]\n return [ binType['binGroupName'], binType['capacity_ml'] ]\n })\n\n return <ListGroup>\n {_(sortedUnitSpecifications).reject({quantity: 0}).map( (unitSpec) => <BinQuantitySelector\n key={unitSpec.binTypeId}\n onChange={onChangeQuantity}\n onDestroy={onRemove}\n {...unitSpec} /> ).value() }\n </ListGroup>\n\n}\n\nEditUnitSpecifications.propTypes = {\n unitSpecifications: PropTypes.objectOf(\n PropTypes.shape({\n binTypeId: PropTypes.number.isRequired,\n quantity: PropTypes.number.isRequired,\n })\n ),\n binTypes: PropTypes.objectOf(\n PropTypes.shape({\n name: PropTypes.string,\n fullname: PropTypes.string,\n id: PropTypes.number,\n }).isRequired,\n ).isRequired,\n onChangeQuantity: PropTypes.func.isRequired,\n onRemove: PropTypes.func.isRequired,\n};\n\nconst mapStateToProps = (state, {specificationUuid}) => {\n return {\n binTypes: state.form.binTypes.byId,\n }\n}\n\nconst mapDispatchToProps = (dispatch, {specificationUuid}) => {\n return {}\n}\n\nEditUnitSpecifications = connect(\n mapStateToProps,\n mapDispatchToProps\n)(EditUnitSpecifications)\n\n\nexport default EditUnitSpecifications\n\n\n\n\n","import React from 'react'\nimport { ListGroupItem, ListGroup, Btn } from 'sharedComponents'\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types'\nimport _ from 'lodashExtended';\n\nlet BinSelector = ({availableBinTypeIds, selectedBinTypeIds, binTypes, onAddBinType, salesUnitPricesByServiceCode}) => {\n\n const sortedAvailableBinTypeIds = _.sortBy(availableBinTypeIds, (availableBinTypeId) => {\n var binType = binTypes[availableBinTypeId]\n return [ binType['binGroupName'], binType['capacity_ml'] ]\n })\n\n const binSelectors = _.map(sortedAvailableBinTypeIds, (availableBinTypeId) => {\n var selected = _.includes(selectedBinTypeIds || [], availableBinTypeId)\n var binType = binTypes[availableBinTypeId]\n\n var salesPrice = salesUnitPricesByServiceCode ?\n <div><small><span className=\"text-muted\">£{ salesUnitPricesByServiceCode[binType.serviceCode]}</span></small></div>\n : null\n\n\n return <ListGroupItem key={availableBinTypeId}>\n <div className=\"row\">\n <div className=\"col-sm-2\" >\n\n <img src={selected ? binType.largeGrayUrl : binType.largeUrl} className=\"media-object\" style={{ width: 40, height: 40}}/>\n\n </div>\n <div className=\"col-sm-10 pt5\">\n\n <div className=\"pull-right\" style={{ paddingRight: 10 }}>{ selected ? null : <span className=\"link\" onClick={() => { onAddBinType(availableBinTypeId) }}><i className=\"fa fa-plus\"></i></span>}</div>\n <small>{ binType.name } <span className=\"text-muted\">{binType.binGroupName}</span></small>\n { salesPrice }\n </div>\n </div>\n </ListGroupItem>\n } )\n\n\n return <div style={{ height: 400, overflow: 'scroll'}}>\n <ListGroup>\n {binSelectors}\n </ListGroup>\n </div>\n\n}\n\nBinSelector.propTypes = {\n binTypes: PropTypes.objectOf(\n PropTypes.shape({\n name: PropTypes.string,\n fullname: PropTypes.string,\n id: PropTypes.number,\n }).isRequired,\n ).isRequired,\n salesUnitPricesByServiceCode: PropTypes.object,\n availableBinTypeIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n selectedBinTypeIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n onAddBinType: PropTypes.func.isRequired,\n};\n\nconst mapStateToProps = (state, props) => {\n return {\n binTypes: state.form.binTypes.byId,\n service: state.issues.services\n }\n}\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {}\n}\n\nBinSelector = connect(\n mapStateToProps,\n mapDispatchToProps\n)(BinSelector)\n\n\nexport default BinSelector\n\n","import React from 'react'\nimport { StatelessModal, Btn } from 'sharedComponents'\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types'\nimport CollectionPlanSelect from './CollectionPlanSelect'\nimport EditUnitSpecifications from './EditUnitSpecifications'\nimport BinQuantitySelector from './BinQuantitySelector'\nimport BinSelector from './BinSelector'\nimport actions from '../specifications/actions'\nimport _ from 'lodashExtended';\nimport { getService } from '../services/selectors'\nimport { getSalesUnitPricesByServiceCode } from '../services/selectors'\nimport { getSpecification } from '../specifications/selectors'\nimport { addSpecBin } from '../specifications/operations'\n//var { OutcomeWrapper, OutcomeList, OutcomeListItem, OutcomeSection, OutcomeSectionLinks} = require('../outcomes/OutcomeWrapper')\n\nclass EditSpecificationModal extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpen: false,\n };\n this.handleOpen = this.handleOpen.bind(this)\n this.handleClose = this.handleClose.bind(this)\n }\n\n handleOpen () { this.setState({ isOpen: true }) }\n handleClose () { this.setState({ isOpen: false }) }\n\n render() {\n var { collectionGroups, children, target, title, availableBinTypeIds, selectedBinTypeIds, salesUnitPricesByServiceCode,\n onAddBinType, onRemoveBinType, onChangeQuantity } = this.props\n\n collectionGroups = _.reject(collectionGroups, { _destroy: '1' })\n\n const collectionGroupEdits = _.map(collectionGroups, (collectionGroup) => {\n const { unitSpecifications, uuid } = collectionGroup\n return(\n <div key={uuid}>\n <div style={{ marginTop: 10, paddingBottom: 10, borderBottom: '1px solid #e6e9ed'}}>\n Collected <CollectionPlanSelect collectionGroup={collectionGroup}/>\n </div>\n <EditUnitSpecifications unitSpecifications={collectionGroup.unitSpecifications}\n onRemove={(binTypeId) => onRemoveBinType(collectionGroup.uuid, binTypeId)}\n onChangeQuantity={(binTypeId, quantity) => onChangeQuantity(collectionGroup.uuid, binTypeId, quantity) } />\n </div>\n )\n })\n\n return (\n <StatelessModal title={title || \"Add bins\"}\n target={<span className=\"link\">{children || target || \"Add Bins\"}</span>}\n isOpen={this.state.isOpen}\n onCloseModal={this.handleClose}\n onOpenModal={this.handleOpen} >\n\n <div className=\"row\">\n <div className=\"col-sm-6\" style={{ height: 362, overflow: 'scroll'}}>\n {collectionGroupEdits}\n </div>\n <div className=\"col-sm-6\">\n <BinSelector salesUnitPricesByServiceCode={salesUnitPricesByServiceCode} onAddBinType={onAddBinType} availableBinTypeIds={availableBinTypeIds} selectedBinTypeIds={selectedBinTypeIds}/>\n </div>\n </div>\n\n <div style={{ borderTop: '1px solid #e6e9ed', padding: '10px 10px 5px 10px', marginLeft: -10, marginRight: -10 }}>\n <div style={{ textAlign: 'right', paddingBottom: 5 }}>\n <Btn onClick={this.handleClose}>close</Btn>\n </div>\n </div>\n </StatelessModal>\n )\n }\n\n}\n\nEditSpecificationModal.propTypes = {\n target: PropTypes.node,\n title: PropTypes.node,\n specificationUuid: PropTypes.string.isRequired,\n availableBinTypeIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n selectedBinTypeIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n salesUnitPricesByServiceCode: PropTypes.object.isRequired,\n\n onAddBinType: PropTypes.func.isRequired,\n onChangeQuantity: PropTypes.func.isRequired,\n onRemoveBinType: PropTypes.func.isRequired,\n};\n\nconst mapStateToProps = (state, {specificationUuid}) => {\n\n var specification = getSpecification(specificationUuid, state)\n var service = getService(specification.serviceId, state)\n\n var salesUnitPricesByServiceCode = getSalesUnitPricesByServiceCode(specification.serviceId, state)\n\n return {\n collectionGroups: specification.collectionGroups,\n availableBinTypeIds: service.availableBinTypeIds,\n selectedBinTypeIds: _(specification.collectionGroups).map('unitSpecifications').map((unitSpecs) => _(unitSpecs).reject({_destroy: '1'}).reject({quantity: 0}).map('binTypeId').value() ).flatten().value(),\n salesUnitPricesByServiceCode: salesUnitPricesByServiceCode\n }\n\n}\n\nconst mapDispatchToProps = (dispatch, {specificationUuid}) => {\n return {\n onAddBinType: (binTypeId) => { dispatch(addSpecBin(specificationUuid, binTypeId))},\n onChangeQuantity: (collectionGroupUuid, binTypeId, quantity) => { dispatch(actions.selectSpecQuantity(collectionGroupUuid, binTypeId, quantity)) },\n onRemoveBinType: (collectionGroupUuid, binTypeId) => { dispatch(actions.removeSpecBin(collectionGroupUuid, binTypeId)) },\n }\n}\n\nEditSpecificationModal = connect(\n mapStateToProps,\n mapDispatchToProps\n)(EditSpecificationModal)\n\n\nexport default EditSpecificationModal\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport actions from '../newServiceIssues/actions'\n\nimport { DateSelect, NoWrap } from 'sharedComponents'\n\nlet NewServiceDeliveryDate = ({ newServiceIssue, onChange, children }) => {\n\n var dateFormat = \"ddd, Do MMM YYYY\"\n var selectedDate = newServiceIssue.deliveryDate\n\n var dateSelectSubtitle = <span>The initial delivery is scheduled for <strong><NoWrap>{selectedDate ? moment(selectedDate).format(dateFormat) : '<select date>'}</NoWrap></strong></span>\n\n return <DateSelect title=\"Initial Delivery Date\"\n subtitle={dateSelectSubtitle}\n required={true}\n selectedDate={selectedDate}\n closeOnSelect={true}\n blankText=\"select\"\n strongTarget={true}\n onClearDate={() => onChange(null) }\n onSelectDate={onChange}>{children}</DateSelect>\n}\n\nconst mapStateToProps = (state, {collectionGroup}) => {\n return {}\n}\n\nconst mapDispatchToProps = (dispatch, {newServiceIssue}) => {\n return {\n onChange: (date) => { dispatch(actions.setDeliveryDate(newServiceIssue.serviceId, date)) },\n }\n}\n\nNewServiceDeliveryDate.propTypes = {\n newServiceIssue: PropTypes.shape({\n serviceId: PropTypes.number.isRequired,\n deliveryDate: PropTypes.string,\n }).isRequired,\n onChange: PropTypes.func.isRequired\n}\n\nNewServiceDeliveryDate = connect(\n mapStateToProps,\n mapDispatchToProps\n)(NewServiceDeliveryDate)\n\nexport default NewServiceDeliveryDate\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport { getSpecification } from '../specifications/selectors'\nimport actions from '../specifications/actions'\n\nimport { DateSelect, NoWrap } from 'sharedComponents'\n\nlet SpecificationConfirmDate = ({ confirmedByVendorOn, onChange, children }) => {\n\n var dateFormat = \"ddd, Do MMM YYYY\"\n var selectedDate = confirmedByVendorOn\n\n var dateSelectSubtitle = <span>The vendor confirmed the specification on <strong><NoWrap>{selectedDate ? moment(selectedDate).format(dateFormat) : 'not set'}</NoWrap></strong></span>\n\n\n var linkText = selectedDate ? moment(selectedDate).format(dateFormat) : <span className=\"text-danger\">select date</span>\n\n return <span>\n Confirmed by vendor on <DateSelect title=\"Specification Change Confirmed by vendor on \"\n subtitle={dateSelectSubtitle}\n required={true}\n selectedDate={selectedDate}\n maxDate={new Date()}\n closeOnSelect={true}\n blankText={\"select\"}\n onClearDate={() => onChange(null) }\n strongTarget={true}\n onSelectDate={onChange}>{linkText}</DateSelect>\n </span>\n}\n\nconst mapStateToProps = (state, {specificationUuid}) => {\n return {\n ...getSpecification(specificationUuid, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {specificationUuid}) => {\n return {\n onChange: (date) => { dispatch(actions.setConfirmedByVendorOn(specificationUuid, date)) },\n }\n}\n\nSpecificationConfirmDate.propTypes = {\n specificationUuid: PropTypes.string.isRequired,\n confirmedByVendorOn: PropTypes.string,\n onChange: PropTypes.func.isRequired\n}\n\nSpecificationConfirmDate = connect(\n mapStateToProps,\n mapDispatchToProps\n)(SpecificationConfirmDate)\n\nexport default SpecificationConfirmDate\n\n\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux';\nimport { changeSpecification } from '../services/operations'\n\nlet UnknownSpecification = ({onClick, children}) => {\n\n return <div className=\"mb5\">\n Specification Unknown \n <strong style={{ cursor: 'pointer' }} className='text-danger' onClick={onClick} >\n {children || \"select\"}\n </strong>\n\n </div>\n}\n\nUnknownSpecification.propTypes = {\n serviceId: PropTypes.number.isRequired\n};\n\nconst mapStateToProps = (state, {serviceId}) => {\n return {}\n}\n\nconst mapDispatchToProps = (dispatch, {serviceId}) => {\n return {\n onClick: () => { dispatch(changeSpecification(serviceId))}\n }\n}\n\nUnknownSpecification = connect(\n mapStateToProps,\n mapDispatchToProps\n)(UnknownSpecification)\n\nexport default UnknownSpecification\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\n\nimport actions from '../nextRoutineCollections/actions'\nimport { getNextRoutineCollection } from '../nextRoutineCollections/selectors'\nimport { getCollectionPlan } from '../form/selectors'\n\nimport { DaysOfWeekSelect, NoWrap } from 'sharedComponents'\n\nlet CollectionDaysSelect = (\n {\n collectionGroup, nextRoutineCollection, collectionPlan, onChange\n }\n) => {\n\n if(collectionPlan && collectionPlan.timesPerWeek > 1) {\n\n var selectedDayIds = []\n var selectedDateDayOfWeekId = null\n\n if(nextRoutineCollection) {\n selectedDayIds = nextRoutineCollection.collectionDayIds\n selectedDateDayOfWeekId = moment(nextRoutineCollection.date).day()\n }\n\n return <span><strong>\n <NoWrap>(\n <DaysOfWeekSelect blankText=\"<select days>\"\n requiredDayId={selectedDateDayOfWeekId}\n onSelectDayIds={onChange}\n selectedDayIds={selectedDayIds}\n timesPerWeek={collectionPlan.timesPerWeek} />\n )\n </NoWrap>\n </strong></span>\n\n } else {\n return null\n }\n}\n\n\nconst mapStateToProps = (state, {collectionGroup}) => {\n return {\n nextRoutineCollection: getNextRoutineCollection(collectionGroup, state),\n collectionPlan: getCollectionPlan(collectionGroup.collectionPlanSlug, state)\n\n }\n}\n\nconst mapDispatchToProps = (dispatch, {collectionGroup}) => {\n return {\n onChange: (dayOfWeekIds) => { dispatch(actions.selectCollectionDayIds(collectionGroup.uuid, collectionGroup.collectionPlanSlug, dayOfWeekIds)) },\n }\n}\n\nCollectionDaysSelect.propTypes = {\n //nextRoutineCollection: PropTypes.shape({\n //date: PropTypes.string,\n //collectionDayIds: PropTypes.arrayOf(PropTypes.number).isRequired\n //}),\n collectionGroup: PropTypes.shape({\n uuid: PropTypes.string.isRequired,\n collectionPlanSlug: PropTypes.string,\n }).isRequired,\n //collectionPlan: PropTypes.shape({\n //slug: PropTypes.string.isRequired,\n //timesPerWeek: PropTypes.number.isRequired,\n //}),\n //onChange: PropTypes.func.isRequired,\n}\n\nCollectionDaysSelect = connect(\n mapStateToProps,\n mapDispatchToProps\n)(CollectionDaysSelect)\n\nexport default CollectionDaysSelect\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\n\nimport actions from '../nextRoutineCollections/actions'\nimport { getNextRoutineCollection } from '../nextRoutineCollections/selectors'\nimport { getCollectionPlan } from '../form/selectors'\n\nimport { dayHelpers, NoWrap } from 'sharedComponents'\n\nlet CollectionDays = (\n {\n collectionGroup, nextRoutineCollection, collectionPlan\n }\n) => {\n\n if(collectionPlan && collectionPlan.timesPerWeek > 1) {\n if(_.isPresent(nextRoutineCollection.collectionDayIds) ) {\n return <NoWrap>(<strong>{dayHelpers.getDaysOfWeekText(nextRoutineCollection.collectionDayIds)}</strong>)</NoWrap>\n } else {\n return <NoWrap>(<strong>{'<collection days unknown>'}</strong>)</NoWrap>\n }\n\n } else {\n return null\n }\n}\n\n\nconst mapStateToProps = (state, {collectionGroup}) => {\n return {\n nextRoutineCollection: getNextRoutineCollection(collectionGroup, state),\n collectionPlan: getCollectionPlan(collectionGroup.collectionPlanSlug, state)\n }\n}\n\nCollectionDays.propTypes = {\n collectionGroup: PropTypes.shape({\n uuid: PropTypes.string.isRequired,\n collectionPlanSlug: PropTypes.string,\n }).isRequired,\n}\n\nCollectionDays = connect(\n mapStateToProps,\n null\n)(CollectionDays)\n\nexport default CollectionDays\n\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { getService } from '../services/selectors'\n\nimport actions from '../terminateServiceIssues/actions'\n\nimport { DateSelect, NoWrap } from 'sharedComponents'\n\nlet FinalCollectionDate = ({ terminateServiceIssue, lastCollectionDate, onChange, children }) => {\n\n var dateFormat = \"ddd, Do MMM YYYY\"\n var selectedDate = terminateServiceIssue.finalCollectionDate\n\n var dateAfterLastCollection = null\n if(_.isPresent(lastCollectionDate)) {\n lastCollectionDate = new Date(lastCollectionDate)\n dateAfterLastCollection = lastCollectionDate.setDate(lastCollectionDate.getDate() + 1)\n }\n\n var minSelectDate = _.isPresent(dateAfterLastCollection) ? dateAfterLastCollection : null\n var dateSelectSubtitle = <span>The final collection is scheduled for <strong><NoWrap>{selectedDate ? moment(selectedDate).format(dateFormat) : '<select date>'}</NoWrap></strong></span>\n\n return <DateSelect title=\"Final Collection Date\"\n subtitle={dateSelectSubtitle}\n required={true}\n selectedDate={selectedDate}\n minDate={minSelectDate}\n closeOnSelect={true}\n blankText={'select'}\n strongTarget={true}\n onClearDate={() => onChange(null) }\n onSelectDate={onChange}>{children}</DateSelect>\n}\n\nconst mapStateToProps = (state, {terminateServiceIssue}) => {\n var service = getService(terminateServiceIssue.serviceId, state)\n var lastCollectionDate = service.lastCollectionDate\n return {\n lastCollectionDate\n }\n}\n\nconst mapDispatchToProps = (dispatch, {terminateServiceIssue}) => {\n return {\n onChange: (date) => { dispatch(actions.setFinalCollectionDate(terminateServiceIssue.serviceId, date)) },\n }\n}\n\nFinalCollectionDate.propTypes = {\n terminateServiceIssue: PropTypes.shape({\n serviceId: PropTypes.number.isRequired,\n finalCollectionDate: PropTypes.string,\n }).isRequired,\n onChange: PropTypes.func.isRequired\n}\n\nFinalCollectionDate = connect(\n mapStateToProps,\n mapDispatchToProps\n)(FinalCollectionDate)\n\nexport default FinalCollectionDate\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport actions from '../terminateServiceIssues/actions'\nimport { Link } from 'sharedComponents'\n\nlet FinalCollectionOption = ({ terminateServiceIssue, onChange }) => {\n\n // if(!!terminateServiceIssue.noFinalCollection) {\n // return(<div>Final Collection Not Required:  <Link onClick={() => { onChange(false) } }>(set required)</Link></div>)\n // } else {\n // return(<div>Final Collection Required:  <Link onClick={() => onChange(true) }>(set not required)</Link></div>)\n // }\n\n return <span><i className=\"link fa fa-exchange\" onClick={ () => { onChange(!terminateServiceIssue.noFinalCollection) } }></i>  </span>\n}\n\nFinalCollectionOption.propTypes = {\n terminateServiceIssue: PropTypes.shape({\n serviceId: PropTypes.number.isRequired,\n noFinalCollection: PropTypes.bool,\n }).isRequired,\n onChange: PropTypes.func.isRequired\n}\n\nconst mapStateToProps = (state, ownProps) => {\n return {\n }\n}\n\nconst mapDispatchToProps = (dispatch, {terminateServiceIssue}) => {\n return {\n onChange: (noFinalCollection) => { dispatch(actions.setNoFinalCollection(terminateServiceIssue.serviceId, noFinalCollection)) },\n }\n}\n\nFinalCollectionOption = connect(\n mapStateToProps,\n mapDispatchToProps\n)(FinalCollectionOption)\n\n\nexport default FinalCollectionOption\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport actions from '../nextRoutineCollections/actions'\nimport { getNextRoutineCollection } from '../nextRoutineCollections/selectors'\nimport { DateSelect, NoWrap } from 'sharedComponents'\n\nlet NextCollectionDateSelect = (\n {\n collectionGroup, nextRoutineCollection, collectionPlan, strongTarget = true,\n onChange\n}\n) => {\n\n if(collectionPlan) {\n var dateFormat = \"ddd, Do MMM YYYY\"\n var selectedDate = null\n var selectedDateDayOfWeekId = null\n var selectedDayIds = []\n if(nextRoutineCollection) {\n selectedDate = nextRoutineCollection.date\n selectedDateDayOfWeekId = moment(selectedDate).day()\n selectedDayIds = nextRoutineCollection.collectionDayIds\n }\n\n var dateSelectSubtitle = <span>Next routine collection is on <strong><NoWrap>{selectedDate ? moment(selectedDate).format(dateFormat) : 'select date'}</NoWrap></strong></span>\n var allowDelete = _.isPresent(selectedDate) || _.isPresent(selectedDayIds)\n\n return <DateSelect title=\"Next Routine Collection\"\n subtitle={dateSelectSubtitle}\n required={true}\n selectedDate={selectedDate}\n minDate={new Date()}\n closeOnSelect={true}\n blankText={'select'}\n strongTarget={strongTarget}\n onClearDate={allowDelete ? ()=>onChange(null) : null}\n onSelectDate={ onChange } />\n } else {\n return <strong><NoWrap><select collection date></NoWrap></strong>\n }\n}\n\n\nconst mapStateToProps = (state, {collectionGroup}) => {\n return {\n nextRoutineCollection: getNextRoutineCollection(collectionGroup, state),\n collectionPlan: state.form.collectionPlans.bySlug[collectionGroup.collectionPlanSlug]\n }\n}\n\nconst mapDispatchToProps = (dispatch, {collectionGroup}) => {\n return {\n onChange: (date) => { dispatch(actions.selectCollectionDate(collectionGroup.uuid, collectionGroup.collectionPlanSlug, date)) },\n }\n}\n\nNextCollectionDateSelect.propTypes = {\n collectionGroup: PropTypes.shape({\n uuid: PropTypes.string.isRequired,\n collectionPlanSlug: PropTypes.string,\n }).isRequired,\n onChange: PropTypes.func.isRequired,\n strongTarget: PropTypes.bool,\n}\n\nNextCollectionDateSelect = connect(\n mapStateToProps,\n mapDispatchToProps\n)(NextCollectionDateSelect)\n\nexport default NextCollectionDateSelect\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport actions from '../nextRoutineCollections/actions'\nimport { getNextRoutineCollection } from '../nextRoutineCollections/selectors'\nimport ReactTooltip from 'react-tooltip'\nimport TimeAgo from 'react-timeago'\nimport { NoWrap } from 'sharedComponents'\n\nlet NextCollectionDate = (\n {\n collectionGroup, nextRoutineCollection\n}\n) => {\n\n if(nextRoutineCollection && _.isPresent(nextRoutineCollection.date)) {\n var dateFormat = \"ddd, Do MMM YYYY\"\n\n var warningIcon =collectionGroup.nextCollectionOutOfSync ? <i className=\"fa fa-warning\"> </i> : null\n var tootipId = `nextCollectionTooltip-${nextRoutineCollection.id}`\n return <strong className={collectionGroup.nextCollectionOutOfSync ? \"text-warning\" : null} data-tip=\"\" data-for={tootipId}>{warningIcon}<NoWrap>{moment(nextRoutineCollection.date).format(dateFormat)}</NoWrap>\n {\n _.isPresent(nextRoutineCollection.inputtedAt) ?\n <ReactTooltip id={tootipId} type={collectionGroup.nextCollectionOutOfSync ? \"warning\" : \"dark\"}>\n <p>Inputted <TimeAgo date={nextRoutineCollection.inputtedAt} /> via {nextRoutineCollection.inputtedVia}</p>\n { collectionGroup.nextCollectionOutOfSync ? <p>{warningIcon}Marked out of sync <TimeAgo date={collectionGroup.markedOutOfSyncAt} /></p> : null}\n </ReactTooltip>\n : null }\n </strong>\n } else {\n return <strong><NoWrap><collection date unknown></NoWrap></strong>\n }\n\n}\n\nconst mapStateToProps = (state, {collectionGroup}) => {\n return {\n nextRoutineCollection: getNextRoutineCollection(collectionGroup, state),\n }\n}\n\nNextCollectionDate.propTypes = {\n collectionGroup: PropTypes.shape({\n uuid: PropTypes.string.isRequired,\n collectionPlanSlug: PropTypes.string,\n nextCollectionOutOfSync: PropTypes.bool.isRequired\n }).isRequired,\n}\n\nNextCollectionDate = connect(\n mapStateToProps,\n null\n)(NextCollectionDate)\n\nexport default NextCollectionDate\n\n\n\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { Btn } from 'sharedComponents'\n\n// let MarkProcessedBtn = ({processed, resolved, onClick}) => {\n// if(processed) {\n// if(resolved) {\n// return <Btn icon='check' styles='info sm' onClick={() => onClick(false) } >Resolved</Btn>\n// } else {\n// return <Btn icon='check' styles='success sm' onClick={() => onClick(false) } >Processed</Btn>\n// }\n// } else {\n// return <Btn icon='times' styles='warning sm' onClick={() => onClick(true) } >Unprocessed</Btn>\n// }\n// }\n\nlet MarkProcessedBtn = ({processed, resolved, onClick}) => {\n if(processed) {\n if(resolved) {\n return <div className=\"pull-left mb7\">\n <div className=\"mt0\"><Btn styles=\"xs\" onClick={() => onClick(false) } ><span style={{ color: '#000' }}>Unprocess</span></Btn>   <strong className=\"text-success\">Resolved</strong></div>\n </div>\n } else {\n return <div className=\"pull-left mb7\">\n <div className=\"mt0\"><Btn styles=\"xs\" onClick={() => onClick(false) } ><span style={{ color: '#000' }}>Unprocess</span></Btn>   <strong className=\"text-warning\">Processed</strong></div>\n </div>\n }\n } else {\n return <div className=\"pull-left mb7\">\n <div className=\"mt0\"><Btn styles=\"xs\" onClick={() => onClick(true) } ><span style={{ color: '#000' }}>Process</span></Btn>   <strong className=\"text-danger\">Unprocessed</strong></div>\n </div>\n }\n}\n\n\nMarkProcessedBtn.propTypes = {\n processed: PropTypes.bool.isRequired,\n resolved: PropTypes.bool.isRequired,\n onClick: PropTypes.func.isRequired,\n};\n\n\nexport default MarkProcessedBtn\n","import _ from 'lodashExtended'\nimport { getService } from '../services/selectors'\n\nconst getReportsForServiceId = (serviceId, state) => {\n return _(state.issues.missedCollectionReports).filter({ serviceId }).reject({_destroy: '1'}).value()\n}\n\nexport {\n getReportsForServiceId\n}\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { Link } from 'sharedComponents'\n\nvar Timestamps = ( { inputtedAt, inputtedBy, createdBy, createdAt, createdViaTicketId, ticketId } ) => {\n\n\n var createdText = null\n\n if(createdViaTicketId || createdAt) {\n var viaText = null\n if(_.isPresent(createdViaTicketId)) {\n\n if(createdViaTicketId == ticketId) {\n viaText = <span>via <strong>this ticket</strong></span>\n } else {\n viaText = <span>via <Link target='_blank' href={`/admin/tickets/${createdViaTicketId}`}>#{createdViaTicketId}</Link></span>\n }\n }\n createdText = <span>Created {createdBy ? `by ${createdBy}` : null} {createdAt ? `on ${moment(createdAt).format(\"Do MMM YYYY\")}` : null} {viaText}</span>\n }\n\n return(<div className='pull-right'>\n { inputtedBy ?\n <div key='updated'> Updated by {inputtedBy} on {moment(inputtedAt).format(\"Do MMM YYYY\")}</div> : null\n }\n { createdText ? \n <div key='created'>{createdText}</div> : null\n }\n </div>\n )\n}\n\n\nTimestamps.propTypes = {\n inputtedAt: PropTypes.string,\n inputtedBy: PropTypes.string,\n createdBy: PropTypes.string,\n createdAt: PropTypes.string,\n createdViaTicketId: PropTypes.number,\n ticketId: PropTypes.number.isRequired,\n ticketSubject: PropTypes.string.isRequired,\n};\n\n\n\n\n\nlet CreatedViaTicketLink = ({createdViaTicketId, ticketId, ticketSubject}) => {\n\n if(_.isPresent(createdViaTicketId)) {\n if(createdViaTicketId == ticketId) {\n return <div>Created via <strong>this ticket</strong></div>\n\n } else {\n return <div >Created via <Link target='_blank' href={`/admin/tickets/${createdViaTicketId}`}>#{createdViaTicketId}</Link></div>\n }\n } else {\n return null\n }\n}\n\n\nconst mapStateToProps = (state, ownProps) => {\n\n return {\n ticketId: state.api.ticketId,\n ticketSubject: state.api.ticketSubject\n }\n}\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {\n }\n}\n\nTimestamps = connect(\n mapStateToProps,\n mapDispatchToProps\n)(Timestamps)\n\nexport default Timestamps\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport IssueBox from './IssueBox'\nimport IssueBoxSection from './IssueBoxSection'\nimport MarkProcessedBtn from './MarkProcessedBtn'\nimport Timestamps from './Timestamps'\nimport actions from '../missedCollectionReports/actions'\nimport { getCurrentSpecification } from '../specifications/selectors'\nimport { DateSelect, Popover, Link, DropdownSelect, NoWrap, ModelErrors } from 'sharedComponents'\n\nvar {\n newReport,\n updateReport,\n markForDestruction,\n markProcessed\n} = actions\n\nvar Open = ( {id, missedDate, reasonId, disputeCharge, retryCollection, retryDate, reportedOn,\n onSelectMissedReasonId, onSelectMissedDate, onSelectRetryDate, processed, resolved, reportedByStakeholderId,\n onDelete, onChangeDisputeCharge, onSelectStakeholderId, onChangeRetryCollection, minCollectionInterval,\n onMarkProcessed, onSelectReportedOn, onChangeCreditClient,\n allReasons, allStakeholders, errors, ...restProps} ) => {\n\n var fourMonthsAgo = new Date();\n fourMonthsAgo.setMonth(fourMonthsAgo.getMonth() - 4);\n\n var sevenDaysFromMissedOrToday = _.isPresent(missedDate) ? (new Date(missedDate)) : (new Date())\n minCollectionInterval = minCollectionInterval == 0 ? 2 : minCollectionInterval\n sevenDaysFromMissedOrToday.setDate(sevenDaysFromMissedOrToday.getDate() + (minCollectionInterval * 7) );\n\n var missedDateSelect = <DateSelect title=\"Missed collection date\"\n subtitle={ _.isPresent(missedDate) ? (\"Currently set to \" + moment(missedDate).format(\"ddd, DD MMM YYYY\")) : \"Missed collection on\" }\n required={true}\n blankText=\"select\"\n mindate={fourMonthsAgo}\n maxDate={new Date()}\n selectedDate={missedDate}\n closeOnSelect={true}\n strongTarget={true}\n onSelectDate={ onSelectMissedDate } />\n\n\n var retryDateSelect = <DateSelect title=\"Reattempt collection date\"\n subtitle={ _.isPresent(retryDate) ? (\"Currently set to \" + moment(retryDate).format(\"ddd, DD MMM YYYY\")) : \"Reattempt collection on\" }\n selectedDate={retryDate}\n blankText=\"select\"\n required={true}\n minDate={new Date(_.isPresent(missedDate) ? missedDate : null)}\n maxDate={sevenDaysFromMissedOrToday}\n closeOnSelect={true}\n onClearDate={ (date) => { onSelectRetryDate(null) } }\n strongTarget={true}\n onSelectDate={ onSelectRetryDate } />\n\n\n var reasonOptions = _.map(allReasons, ({id, name}) => { return { value: id, label: name} })\n\n var resonSelector = <DropdownSelect title=\"Select a reason for missed collection\"\n blankText=\"select\"\n allowNull={true}\n required={true}\n onChange={onSelectMissedReasonId}\n selectedValue={reasonId}\n options={reasonOptions}\n noWrapTarget={false} />\n\n var stakeholderOptions = _.map(allStakeholders, ({id, name}) => { return { value: id, label: name} })\n\n var stakeholderSelect = <DropdownSelect title=\"Select the stakeholder that reported the missed collection\"\n blankText=\"select\"\n allowNull={true}\n required={true}\n onChange={onSelectStakeholderId}\n selectedValue={reportedByStakeholderId}\n options={stakeholderOptions}\n noWrapTarget={false} />\n var reportedOnSelect = <DateSelect title=\"The issue was reported on\"\n subtitle={ _.isPresent(reportedOn) ? moment(reportedOn).format(\"ddd, DD MMM YYYY\") : \"select\" }\n selectedDate={reportedOn}\n blankText=\"select\"\n required={true}\n maxDate={new Date()}\n closeOnSelect={true}\n onClearDate={ (date) => { onSelectReportedOn(null) } }\n onSelectDate={ onSelectReportedOn } />\n\n\n var disputeOptions = [\n { value: true, label: <span>should <strong>not</strong></span> },\n { value: false, label: <span>should</span> }\n ]\n\n\n var disputeChargeSelect = <DropdownSelect title=\"Choose: Should pay the vendor or not?\"\n blankText=\"not set\"\n allowNull={true}\n required={true}\n onChange={onChangeDisputeCharge}\n selectedValue={disputeCharge}\n options={disputeOptions}\n noWrapTarget={false} />\n\n\n return (\n <IssueBox title='Missed Collection Report' handleDelete={onDelete}>\n <IssueBoxSection>\n <ModelErrors errors={errors} />\n <div className=\"mb5\">\n Missed on {missedDateSelect}\n </div>\n <div className=\"mb5\">\n Reason {resonSelector}\n </div>\n <div className=\"mb5\">\n Reported by {stakeholderSelect} on {reportedOnSelect}\n </div>\n <div className=\"mb5\">\n We {disputeChargeSelect} pay the vendor\n </div>\n <div className=\"mb5\">\n <i className=\"link fa fa-exchange\" onClick={ () => { onChangeRetryCollection(!retryCollection) } }></i>  \n { retryCollection ? <span>The collection will be reattempted on {retryDateSelect}</span> : 'Do not reattempt this collection, next visit on schedule' }\n </div>\n </IssueBoxSection>\n\n\n <IssueBoxSection>\n <div className=\"clearfix\">\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n <Timestamps {...restProps}/>\n </div>\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nclass Closed extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = { minimized: props.closed }\n this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n }\n\n handleToggleMinimized() {\n this.setState({minimized: !this.state.minimized})\n }\n\n render() {\n const { id, missedDate, reasonId, disputeCharge, retryCollection, retryDate, reportedOn,\n processed, resolved, reportedByStakeholderId,\n allReasons, allStakeholders, onMarkProcessed} = this.props\n const { minimized } = this.state\n\n var missedDateFormatted = moment(missedDate).format(\"ddd, DD MMM YYYY\")\n var reportedOnFormatted = moment(reportedOn).format(\"ddd, DD MMM YYYY\")\n var retryDateFormatted = retryDate ? moment(retryDate).format(\"ddd, DD MMM YYYY\") : null\n var reasonText = allReasons[reasonId].name\n var stakeholderText = allStakeholders[reportedByStakeholderId].name\n\n // const heading = minimized ? <div><strong>Missed collection on </strong> - {missedDateFormatted} - {reasonText}</div> :\n // <strong>Missed Collection Report</strong>\n\n return (\n <IssueBox heading={'Missed Collection Report'} historical={true} minimized={minimized} handleToggleMinimized={this.handleToggleMinimized}>\n\n <div className=\"mb5\">\n Missed on <strong className=\"text-danger\">{missedDateFormatted}</strong>\n </div>\n\n { minimized ? null :\n <div className=\"mb5\">\n <div className=\"mb5\">\n Reason {reasonText}\n </div>\n <div className=\"mb5\">\n Reported by {stakeholderText} on {reportedOnFormatted}\n </div>\n <div>\n {disputeCharge ?\n <span>Should <strong className=\"text-danger\">not pay</strong> the vendor</span>\n :\n <span>Should <strong className=\"text-success\">pay</strong> the vendor</span>\n }\n </div>\n </div>\n }\n\n <div className=\"mb10 clearfix\">\n { retryDateFormatted ? <span>Reattempted on <strong className=\"text-primary\">{retryDateFormatted}</strong></span> : 'Collection not requested to be reattempted' }\n </div>\n\n { minimized ? null :\n <IssueBoxSection>\n <div className=\"clearfix\">\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n <Timestamps {...this.props}/>\n </div>\n </IssueBoxSection>\n }\n </IssueBox>\n )\n }\n}\n\n\nvar MissedCollectionReport = (props) => {\n if(props.closed) {\n return <Closed {...props}/>\n } else {\n return <Open {...props}/>\n }\n}\n\nMissedCollectionReport.propTypes = {\n};\n\n\nconst mapStateToProps = (state, {serviceId}) => {\n var specification = getCurrentSpecification(serviceId, state)\n var minCollectionInterval = specification ? _(specification.collectionGroups).map('interval').min() : 12\n return {\n allReasons: state.form.missedCollectionReasons,\n allStakeholders: state.form.stakeholders,\n minCollectionInterval\n\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onSelectMissedDate: (missedDate) => { dispatch(updateReport(id, { missedDate } )) },\n onSelectMissedReasonId: (reasonId) => { dispatch(updateReport(id, { reasonId } )) },\n onSelectStakeholderId: (reportedByStakeholderId) => { dispatch(updateReport(id, { reportedByStakeholderId } )) },\n onChangeDisputeCharge: (disputeCharge) => { dispatch(updateReport(id, { disputeCharge } )) },\n onChangeRetryCollection: (retryCollection) => { dispatch(updateReport(id, { retryCollection } )) },\n onSelectRetryDate: (retryDate) => { dispatch(updateReport(id, { retryDate } )) },\n onSelectReportedOn: (reportedOn) => { dispatch(updateReport(id, { reportedOn } )) },\n onDelete: () => { dispatch(markForDestruction(id)) },\n onMarkProcessed: (processed) => dispatch(markProcessed(id, processed))\n\n }\n}\n\nMissedCollectionReport = connect(\n mapStateToProps,\n mapDispatchToProps\n)(MissedCollectionReport)\n\n\nexport default MissedCollectionReport;\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\n\nclass History extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = { minimized: true }\n this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n }\n\n handleToggleMinimized() {\n this.setState({minimized: !this.state.minimized})\n }\n\n render() {\n const { children, title } = this.props\n const { minimized } = this.state\n\n const toggleMinimized = <div className='pull-right'>\n <i className={`fa fa-${ minimized ? 'chevron-down' : 'chevron-up' } text-muted`} style={{ cursor: 'pointer', marginRight: -5, marginLeft: 15 }}></i>\n </div>\n\n const heading = <div className=\"mb10 mt10 text-muted\">\n <span className=\"badge badge-primary\">{children.length}</span>   {title}\n </div>\n\n const childrenDivClass = minimized ? 'hidden' : ''\n\n return children.length == 0 ? null : (\n <div style={{ marginBottom: minimized ? 20 : 40 }}>\n <div style={{cursor: 'pointer'}} onClick={this.handleToggleMinimized}>\n {toggleMinimized}\n {heading}\n </div>\n <div className=\"ml10 mb10\">\n <div className={childrenDivClass}>{children}</div>\n </div>\n </div>\n )\n }\n}\n\n\nHistory.propTypes = {\n children: PropTypes.arrayOf(PropTypes.node).isRequired,\n title: PropTypes.node.isRequired\n}\n\n\nexport default History\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { getReportsForServiceId } from '../missedCollectionReports/selectors'\nimport MissedCollectionReport from './MissedCollectionReport'\nimport HistoryList from './HistoryList'\n\n\nvar MissedCollectionReportList = ( { missedCollectionReports } ) => {\n const getReport = (report) => <MissedCollectionReport key={report.id} {...report}/>\n const sortedList = _.orderBy(missedCollectionReports, 'id', 'desc')\n\n return (\n <div>\n <div>\n {_(sortedList).filter({closed: false}).map(getReport).value() }\n </div>\n <HistoryList title={'Historical Missed Collections'}>\n {_(sortedList).filter({closed: true}).map(getReport).value() }\n </HistoryList>\n </div>\n )\n\n}\n\nMissedCollectionReportList.propTypes = {\n serviceId: PropTypes.number.isRequired\n};\n\n\nconst mapStateToProps = (state, {serviceId}) => {\n return {\n missedCollectionReports: getReportsForServiceId(serviceId, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {}\n}\n\nMissedCollectionReportList = connect(\n mapStateToProps,\n mapDispatchToProps\n)(MissedCollectionReportList)\n\n\nexport default MissedCollectionReportList;\n","import _ from 'lodashExtended'\n\nconst getAdhocCollectionBooking = (id, state) => {\n return state.issues.adhocCollectionBookings[id]\n}\n\nconst getAdhocCollectionBookingsForServiceId = (serviceId, state) => {\n return _(state.issues.adhocCollectionBookings).filter({ serviceId }).reject({_destroy: '1'}).value()\n}\n\nexport {\n getAdhocCollectionBooking,\n getAdhocCollectionBookingsForServiceId\n}\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport actions from '../adhocCollectionBookings/actions'\nimport { getAdhocCollectionBooking } from '../adhocCollectionBookings/selectors'\nimport { getService } from '../services/selectors'\nimport { getSalesUnitPricesByServiceCode } from '../services/selectors'\nimport { StatelessModal, Btn } from 'sharedComponents'\nimport EditUnitSpecifications from './EditUnitSpecifications'\nimport BinQuantitySelector from './BinQuantitySelector'\nimport BinSelector from './BinSelector'\n\nvar {\n selectBinQuantity,\n addBin,\n removeBin,\n} = actions\n\nclass EditAdhocCollectionBookingModal extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpen: false,\n };\n this.handleOpen = this.handleOpen.bind(this)\n this.handleClose = this.handleClose.bind(this)\n }\n\n handleOpen () { this.setState({ isOpen: true }) }\n handleClose () { this.setState({ isOpen: false }) }\n\n render() {\n var { unitSpecifications, children, target, title, availableBinTypeIds, selectedBinTypeIds, salesUnitPricesByServiceCode,\n onAdd, onRemove, onChangeQuantity } = this.props\n\n\n return (\n <StatelessModal title={title || \"Add Bins\"}\n target={<span className=\"link\">{children || target || \"Add Bins\"}</span>}\n isOpen={this.state.isOpen}\n onCloseModal={this.handleClose}\n onOpenModal={this.handleOpen} >\n\n <div className=\"row\">\n <div className=\"col-sm-6\">\n <EditUnitSpecifications unitSpecifications={unitSpecifications} onRemove={onRemove} onChangeQuantity={onChangeQuantity} />\n  \n </div>\n <div className=\"col-sm-6\">\n <BinSelector salesUnitPricesByServiceCode={salesUnitPricesByServiceCode} onAddBinType={onAdd} availableBinTypeIds={availableBinTypeIds} selectedBinTypeIds={selectedBinTypeIds}/>\n </div>\n </div>\n\n <div style={{ borderTop: '1px solid #e6e9ed', padding: '10px 10px 5px 10px', marginLeft: -10, marginRight: -10 }}>\n <div style={{ textAlign: 'right', paddingBottom: 5 }}>\n <Btn onClick={this.handleClose}>close</Btn>\n </div>\n </div>\n </StatelessModal>\n )\n }\n\n}\n\nEditAdhocCollectionBookingModal.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n target: PropTypes.node,\n title: PropTypes.node,\n availableBinTypeIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n selectedBinTypeIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n salesUnitPricesByServiceCode: PropTypes.object.isRequired,\n onChangeQuantity: PropTypes.func.isRequired,\n onRemove: PropTypes.func.isRequired,\n onAdd: PropTypes.func.isRequired,\n};\n\n\nconst mapStateToProps = (state, {id}) => {\n const booking = getAdhocCollectionBooking(id, state)\n const { unitSpecifications, serviceId } = booking\n const service = getService(serviceId, state)\n var salesUnitPricesByServiceCode = getSalesUnitPricesByServiceCode(serviceId, state)\n\n return {\n unitSpecifications,\n availableBinTypeIds: service.availableBinTypeIds,\n selectedBinTypeIds: _.map(unitSpecifications, 'binTypeId'),\n salesUnitPricesByServiceCode: salesUnitPricesByServiceCode\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onChangeQuantity: (productTypeId, quantity) => { dispatch(selectBinQuantity(id, productTypeId, quantity)) },\n onRemove: (productTypeId) => { dispatch(removeBin(id, productTypeId)) },\n onAdd: (productTypeId) => { dispatch(addBin(id, productTypeId)) },\n }\n}\n\nEditAdhocCollectionBookingModal = connect(\n mapStateToProps,\n mapDispatchToProps\n)(EditAdhocCollectionBookingModal)\n\n\nexport default EditAdhocCollectionBookingModal;\n\n\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport { getAdhocCollectionBooking } from '../adhocCollectionBookings/selectors'\nimport actions from '../adhocCollectionBookings/actions'\n\nimport { DateSelect, NoWrap } from 'sharedComponents'\n\nlet AdhocCollectionBookingDate = ({ date, onChange, children }) => {\n\n var dateFormat = \"ddd, Do MMM YYYY\"\n\n var dateSelectSubtitle = <span>The collection will be performed on<strong><NoWrap>{date ? moment(date).format(dateFormat) : 'select'}</NoWrap></strong></span>\n\n return <DateSelect title=\"\"\n subtitle={dateSelectSubtitle}\n required={true}\n selectedDate={date}\n closeOnSelect={true}\n blankText={'select'}\n onClearDate={() => onChange(null) }\n strongTarget={true}\n onSelectDate={onChange}>{children}</DateSelect>\n}\n\nconst mapStateToProps = (state, {id}) => {\n const adhocCollectionBooking = getAdhocCollectionBooking(id, state)\n return {\n date: adhocCollectionBooking.date\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onChange: (date) => { dispatch(actions.setDate(id, date)) },\n }\n}\n\nAdhocCollectionBookingDate.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n //onChange: PropTypes.func.isRequired\n}\n\nAdhocCollectionBookingDate = connect(\n mapStateToProps,\n mapDispatchToProps\n)(AdhocCollectionBookingDate)\n\nexport default AdhocCollectionBookingDate\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport { getAdhocCollectionBooking } from '../adhocCollectionBookings/selectors'\nimport actions from '../adhocCollectionBookings/actions'\n\nimport { DateSelect, NoWrap } from 'sharedComponents'\n\nlet AdhocCollectionBookingRequestDate = ({ date, onChange, children }) => {\n\n var dateFormat = \"ddd, Do MMM YYYY\"\n\n var dateSelectSubtitle = <span>The client requested this collection on <strong><NoWrap>{date ? moment(date).format(dateFormat) : '<select date>'}</NoWrap></strong></span>\n\n return <DateSelect title=\"Client made request on\"\n subtitle={dateSelectSubtitle}\n required={true}\n selectedDate={date}\n maxDate={new Date()}\n closeOnSelect={true}\n blankText={<strong><NoWrap><select date></NoWrap></strong>}\n onSelectDate={onChange}>{children}</DateSelect>\n}\n\nconst mapStateToProps = (state, {id}) => {\n const adhocCollectionBooking = getAdhocCollectionBooking(id, state)\n return {\n date: adhocCollectionBooking.requestedOn\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onChange: (date) => { dispatch(actions.setRequestDate(id, date)) },\n }\n}\n\nAdhocCollectionBookingRequestDate.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n onChange: PropTypes.func.isRequired\n}\n\nAdhocCollectionBookingRequestDate = connect(\n mapStateToProps,\n mapDispatchToProps\n)(AdhocCollectionBookingRequestDate)\n\nexport default AdhocCollectionBookingRequestDate\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { DropdownSelect, DateSelect, Link } from 'sharedComponents'\nimport MarkProcessedBtn from './MarkProcessedBtn'\nimport IssueBox from './IssueBox'\nimport IssueBoxSection from './IssueBoxSection'\nimport EditAdhocCollectionBookingModal from './EditAdhocCollectionBookingModal'\nimport UnitSpecificationList from './UnitSpecificationList'\nimport AdhocCollectionBookingDate from './AdhocCollectionBookingDate'\nimport AdhocCollectionBookingRequestDate from './AdhocCollectionBookingRequestDate'\nimport Timestamps from './Timestamps'\n\nimport actions from '../adhocCollectionBookings/actions'\nvar {\n markProcessed,\n setClearAllPolicy,\n markForDestroy\n} = actions\n\nvar Open = ( { id, date, resolved, processed, unitSpecifications, clearAll, onMarkForDestroy, onSetClearAllPolicy, onMarkProcessed, ...restProps } ) => {\n\n var clearAllPolicySelector = <DropdownSelect title=\"Select a clear all policy\"\n blankText=\"select\"\n onChange={onSetClearAllPolicy}\n selectedValue={clearAll}\n strongTarget={true}\n options={\n [\n { value: true, label: 'all bins presented'},\n { value: false, label: 'only the following:'}\n ]\n } />\n\n var editModalTarget = _.isEmpty(unitSpecifications) ?\n <strong className='text-danger'>select</strong> :\n <UnitSpecificationList unitSpecifications={unitSpecifications}/>\n\n\n return (\n <IssueBox title=\"Adhoc Collection\" handleDelete={onMarkForDestroy}>\n <IssueBoxSection>\n\n <div className=\"mb5\">Requested on <AdhocCollectionBookingRequestDate id={id}/></div>\n\n {\n clearAll || _.isEmpty(unitSpecifications) ?\n <div className=\"mb5\">Collect {clearAllPolicySelector}</div>\n :\n\n <div className=\"mb5\">\n <div className=\"mb3\">Collect {clearAllPolicySelector}</div>\n <div className=\"mb5 ml10\">\n <EditAdhocCollectionBookingModal id={id}>\n {editModalTarget}\n </EditAdhocCollectionBookingModal>\n </div>\n </div>\n }\n\n\n <div className=\"mb5\">Collection confirmed for <AdhocCollectionBookingDate id={id}/></div>\n\n </IssueBoxSection>\n\n <IssueBoxSection>\n <div className=\"clearfix\">\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n <Timestamps {...restProps}/>\n </div>\n </IssueBoxSection>\n\n </IssueBox>\n )\n\n}\n\nclass Closed extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = { minimized: props.closed }\n this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n }\n\n handleToggleMinimized() {\n this.setState({minimized: !this.state.minimized})\n }\n\n render() {\n const { id, processed, closed, resolved, date, clearAll, unitSpecifications, onMarkProcessed, ...restProps } = this.props\n const { minimized } = this.state\n\n // const heading = minimized ? <div><strong></strong> - {moment(date).format(\"Do MMM YYYY\") }</div> :\n // <h4>Adhoc Collection</h4>\n\n return (\n <IssueBox heading=\"Adhoc Collection\" historical={true} minimized={minimized} handleToggleMinimized={this.handleToggleMinimized}>\n\n\n\n <div className={ minimized ? 'mb10' : 'mb5' }>\n Scheduled for <strong className=\"text-primary\">{moment(date).format(\"Do MMM YYYY\")}</strong>\n </div>\n\n\n { minimized ?\n null : <div>\n\n {\n clearAll || _.isEmpty(unitSpecifications) ?\n <div className=\"mb5\">Collect {clearAllPolicySelector}</div>\n :\n\n <div className=\"mb10\">\n <div className=\"mb3\">Collect {clearAll ? 'all bins presented' : 'only the following:'}</div>\n <div className=\"mb5 ml10\">\n <UnitSpecificationList unitSpecifications={unitSpecifications}/>\n </div>\n </div>\n }\n\n <IssueBoxSection>\n <div className=\"clearfix\">\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n <Timestamps {...restProps}/>\n </div>\n </IssueBoxSection>\n\n\n </div>\n }\n </IssueBox>\n )\n }\n}\n\n\n\nvar AdhocCollectionBooking = (props) => {\n if(props.closed) {\n return <Closed {...props}/>\n } else {\n return <Open {...props}/>\n }\n}\n\n\n\nAdhocCollectionBooking.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n //processed: PropTypes.bool.isRequired,\n //resolved: PropTypes.bool.isRequired,\n onMarkProcessed: PropTypes.func.isRequired,\n onSetClearAllPolicy: PropTypes.func.isRequired,\n onMarkForDestroy: PropTypes.func\n};\n\n\nconst mapStateToProps = (state, {}) => {\n return {\n //adhocCollectionBooking: getAdhocCollectionBookingsForServiceId(serviceId, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id, closed}) => {\n return {\n onMarkProcessed: (processed) => dispatch(markProcessed(id, processed)),\n onSetClearAllPolicy: (clearAll) => { dispatch(setClearAllPolicy(id, clearAll)) },\n onMarkForDestroy: !closed ? () => { dispatch(markForDestroy(id)) } : null\n }\n}\n\nAdhocCollectionBooking = connect(\n mapStateToProps,\n mapDispatchToProps\n)(AdhocCollectionBooking)\n\n\nexport default AdhocCollectionBooking\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\n\n\nimport { getAdhocCollectionBookingsForServiceId } from '../adhocCollectionBookings/selectors'\nimport AdhocCollectionBooking from './AdhocCollectionBooking'\nimport HistoryList from './HistoryList'\n\n\n\nvar AdhocCollectionBookingList = ( { adhocCollectionBookings } ) => {\n const getBooking = (booking) => <AdhocCollectionBooking key={booking.id} {...booking} />\n const sortedList = _.orderBy(adhocCollectionBookings, 'date', 'desc')\n\n return (\n <div>\n <div>\n {_(sortedList).filter({closed: false}).map(getBooking).value() }\n </div>\n <HistoryList title={'Adhoc Collection History'}>\n {_(sortedList).filter({closed: true}).map(getBooking).value() }\n </HistoryList>\n </div>\n )\n\n}\n\nAdhocCollectionBookingList.propTypes = {\n serviceId: PropTypes.number.isRequired\n};\n\n\nconst mapStateToProps = (state, {serviceId}) => {\n return {\n adhocCollectionBookings: getAdhocCollectionBookingsForServiceId(serviceId, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {}\n}\n\nAdhocCollectionBookingList = connect(\n mapStateToProps,\n mapDispatchToProps\n)(AdhocCollectionBookingList)\n\n\nexport default AdhocCollectionBookingList;\n","import _ from 'lodashExtended'\nimport { getServiceIds } from '../services/selectors'\n\nconst getEmergencyCollectionBooking = (id, state) => {\n return state.issues.emergencyCollectionBookings[id]\n}\n\nconst getEmergencyCollectionBookings = (state) => {\n var serviceIds = getServiceIds(state)\n return _.reject(state.issues.emergencyCollectionBookings, ({_destroy, failedServiceId}) => _destroy == '1' || _.includes(serviceIds, failedServiceId) )\n}\n\nconst getEmergencyCollectionRequests = (failedServiceId, state) => {\n return _(state.issues.emergencyCollectionBookings).filter({ failedServiceId }).reject({_destroy: '1'}).value()\n}\n\n\nexport {\n getEmergencyCollectionBooking,\n getEmergencyCollectionBookings,\n getEmergencyCollectionRequests,\n}\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { DropdownSelect, DateSelect, Link, NoWrap } from 'sharedComponents'\nimport MarkProcessedBtn from './MarkProcessedBtn'\nimport IssueBox from './IssueBox'\nimport IssueBoxSection from './IssueBoxSection'\nimport UnitSpecificationList from './UnitSpecificationList'\nimport Timestamps from './Timestamps'\n\n\nclass EmergencyCollectionRequest extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = { minimized: props.closed }\n this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n }\n\n handleToggleMinimized() {\n this.setState({minimized: !this.state.minimized})\n }\n\n render() {\n const { id, date, clearAll, unitSpecifications, vendorService, ...restProps } = this.props\n const { minimized } = this.state\n\n return (\n <IssueBox heading=\"Emergency Collection\" historical={true} minimized={minimized} handleToggleMinimized={this.handleToggleMinimized}>\n\n <div className='mb5'>\n Scheduled for <strong className=\"text-primary\">{date ? moment(date).format(\"Do MMM YYYY\") : 'date unknown'}</strong>\n </div>\n\n <div className={ minimized ? 'mb10' : 'mb5' }>\n Scheduled with <strong className=\"text-primary\">{vendorService.vendorName}</strong>\n </div>\n\n\n { minimized ?\n null :\n <div>\n <div className=\"mb10\">\n <div className=\"mb3\">Collect {clearAll ? 'all bins presented' : 'only the following:'}</div>\n {\n _.some(unitSpecifications) ?\n <div className=\"mb5 ml10\">\n <UnitSpecificationList unitSpecifications={unitSpecifications}/>\n </div>\n : null }\n </div>\n\n <IssueBoxSection>\n <div className=\"clearfix\">\n <Timestamps {...restProps}/>\n </div>\n </IssueBoxSection>\n </div>\n }\n </IssueBox>\n )\n }\n}\n\n\n\n\n\nEmergencyCollectionRequest.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n date: PropTypes.string,\n clearAll: PropTypes.bool,\n};\n\n\n//const mapStateToProps = (state, {}) => {\n //return {\n //}\n//}\n\n//const mapDispatchToProps = (dispatch, {id, closed}) => {\n //return {\n //onMarkProcessed: (processed) => dispatch(markProcessed(id, processed)),\n //onSetClearAllPolicy: (clearAll) => { dispatch(setClearAllPolicy(id, clearAll)) },\n //onMarkForDestroy: !closed ? () => { dispatch(markForDestroy(id)) } : null,\n //onChangeDate: (date) => { dispatch(setDate(id, date)) },\n //onChangeRequestDate: (date) => { dispatch(setRequestDate(id, date)) },\n\n //}\n//}\n\n//EmergencyCollectionRequest = connect(\n //mapStateToProps,\n //mapDispatchToProps\n//)(EmergencyCollectionRequest)\n\n\nexport default EmergencyCollectionRequest\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\n\nimport { getEmergencyCollectionRequests } from '../emergencyCollectionBookings/selectors'\nimport EmergencyCollectionRequest from './EmergencyCollectionRequest'\nimport HistoryList from './HistoryList'\n\nvar EmergencyCollectionRequestList = ( { emergencyCollectionRequests } ) => {\n const getRequest = (request) => <EmergencyCollectionRequest key={request.id} {...request} />\n const sortedList = _.orderBy(emergencyCollectionRequests, 'date', 'desc')\n\n return (\n <div>\n <div>\n {_(sortedList).filter({closed: false}).map(getRequest).value() }\n </div>\n <HistoryList title={'Emergency Collection Requests'}>\n {_(sortedList).filter({closed: true}).map(getRequest).value() }\n </HistoryList>\n </div>\n )\n\n}\n\nEmergencyCollectionRequestList.propTypes = {\n\n};\n\nconst mapStateToProps = (state, {serviceId}) => {\n return {\n emergencyCollectionRequests: getEmergencyCollectionRequests(serviceId, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {}\n}\n\nEmergencyCollectionRequestList = connect(\n mapStateToProps,\n mapDispatchToProps\n)(EmergencyCollectionRequestList)\n\n\nexport default EmergencyCollectionRequestList;\n","import _ from 'lodashExtended'\n\nconst getBinDelivery = (id, state) => {\n return state.issues.binDeliveries[id]\n}\n\nconst getBinDeliveriesForServiceId = (serviceId, state) => {\n return _(state.issues.binDeliveries).filter({ serviceId }).reject({_destroy: '1'}).value()\n}\n\nexport {\n getBinDelivery,\n getBinDeliveriesForServiceId\n}\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport actions from '../binDeliveries/actions'\nimport { getBinDelivery } from '../binDeliveries/selectors'\nimport { getService } from '../services/selectors'\nimport { getSalesUnitPricesByServiceCode } from '../services/selectors'\nimport { getBinTypeIdsThatCanBeContainedByIds } from '../form/selectors'\nimport { getCurrentSpecification, getUnitSpecifications } from '../specifications/selectors'\nimport { StatelessModal, Btn } from 'sharedComponents'\nimport EditUnitSpecifications from './EditUnitSpecifications'\nimport BinQuantitySelector from './BinQuantitySelector'\nimport BinSelector from './BinSelector'\n\nvar {\n selectBinQuantity,\n addBin,\n removeBin,\n} = actions\n\nclass EditBinDeliveryModal extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpen: false,\n };\n this.handleOpen = this.handleOpen.bind(this)\n this.handleClose = this.handleClose.bind(this)\n }\n\n handleOpen () { this.setState({ isOpen: true }) }\n handleClose () { this.setState({ isOpen: false }) }\n\n render() {\n var { unitSpecifications, children, target, title, availableBinTypeIds, selectedBinTypeIds, salesUnitPricesByServiceCode,\n onAdd, onRemove, onChangeQuantity } = this.props\n\n\n return (\n <StatelessModal title={title || \"Add Bins\"}\n target={<span className=\"link\">{children || target || \"Add Bins\"}</span>}\n isOpen={this.state.isOpen}\n onCloseModal={this.handleClose}\n onOpenModal={this.handleOpen} >\n\n <div className=\"row\">\n <div className=\"col-sm-6\">\n <EditUnitSpecifications unitSpecifications={unitSpecifications} onRemove={onRemove} onChangeQuantity={onChangeQuantity} />\n  \n </div>\n <div className=\"col-sm-6\">\n <BinSelector salesUnitPricesByServiceCode={salesUnitPricesByServiceCode} onAddBinType={onAdd} availableBinTypeIds={availableBinTypeIds} selectedBinTypeIds={selectedBinTypeIds}/>\n </div>\n </div>\n\n\n\n <div style={{ borderTop: '1px solid #e6e9ed', padding: '10px 10px 5px 10px', marginLeft: -10, marginRight: -10 }}>\n <div style={{ textAlign: 'right', paddingBottom: 5 }}>\n <Btn onClick={this.handleClose}>close</Btn>\n </div>\n </div>\n </StatelessModal>\n )\n }\n\n}\n\nEditBinDeliveryModal.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n target: PropTypes.node,\n title: PropTypes.node,\n availableBinTypeIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n selectedBinTypeIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n salesUnitPricesByServiceCode: PropTypes.object.isRequired,\n onChangeQuantity: PropTypes.func.isRequired,\n onRemove: PropTypes.func.isRequired,\n onAdd: PropTypes.func.isRequired,\n};\n\n\nconst mapStateToProps = (state, {id}) => {\n const delivery = getBinDelivery(id, state)\n const { unitSpecifications, serviceId } = delivery\n const specification = getCurrentSpecification(serviceId, state)\n const service = getService(serviceId, state)\n var availableBinTypeIds = specification ? _.map(getUnitSpecifications(specification), 'binTypeId') : service.availableBinTypeIds\n\n var canBeContainedBinTypeIds = getBinTypeIdsThatCanBeContainedByIds(availableBinTypeIds, state)\n\n //add those bins that can be contained by those that can also be ordered\n availableBinTypeIds = _.uniq(availableBinTypeIds.concat(_.intersection(canBeContainedBinTypeIds, service.availableBinTypeIds)))\n\n var salesUnitPricesByServiceCode = getSalesUnitPricesByServiceCode(specification.serviceId, state)\n\n return {\n unitSpecifications,\n availableBinTypeIds,\n selectedBinTypeIds: _.map(unitSpecifications, 'binTypeId'),\n salesUnitPricesByServiceCode: salesUnitPricesByServiceCode\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onChangeQuantity: (productTypeId, quantity) => { dispatch(selectBinQuantity(id, productTypeId, quantity)) },\n onRemove: (productTypeId) => { dispatch(removeBin(id, productTypeId)) },\n onAdd: (productTypeId) => { dispatch(addBin(id, productTypeId)) },\n }\n}\n\n EditBinDeliveryModal = connect(\n mapStateToProps,\n mapDispatchToProps\n)(EditBinDeliveryModal)\n\n\nexport default EditBinDeliveryModal;\n\n\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport { getBinDelivery } from '../binDeliveries/selectors'\nimport actions from '../binDeliveries/actions'\n\nimport { DateSelect, NoWrap } from 'sharedComponents'\n\nlet BinDeliveryDate = ({ date, onChange, children }) => {\n\n var dateFormat = \"ddd, Do MMM YYYY\"\n\n var dateSelectSubtitle = <span>The delivery will be performed on<strong><NoWrap>{date ? moment(date).format(dateFormat) : '<select date>'}</NoWrap></strong></span>\n\n return <DateSelect title=\"\"\n subtitle={dateSelectSubtitle}\n required={true}\n selectedDate={date}\n closeOnSelect={true}\n blankText={'select'}\n strongTarget={true}\n onClearDate={() => onChange(null) }\n onSelectDate={onChange}>{children}</DateSelect>\n}\n\nconst mapStateToProps = (state, {id}) => {\n const binDelivery = getBinDelivery(id, state)\n return {\n date: binDelivery.date\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onChange: (date) => { dispatch(actions.setDate(id, date)) },\n }\n}\n\nBinDeliveryDate.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n //onChange: PropTypes.func.isRequired\n}\n\nBinDeliveryDate = connect(\n mapStateToProps,\n mapDispatchToProps\n)(BinDeliveryDate)\n\nexport default BinDeliveryDate\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport { getBinDelivery } from '../binDeliveries/selectors'\nimport actions from '../binDeliveries/actions'\n\nimport { DateSelect, NoWrap } from 'sharedComponents'\n\nlet BinDeliveryRequestDate = ({ date, onChange, children }) => {\n\n var dateFormat = \"ddd, Do MMM YYYY\"\n\n var dateSelectSubtitle = <span>The client requested this delivery on <strong><NoWrap>{date ? moment(date).format(dateFormat) : '<select date>'}</NoWrap></strong></span>\n\n return <DateSelect title=\"Client made request on\"\n subtitle={dateSelectSubtitle}\n required={true}\n selectedDate={date}\n maxDate={new Date()}\n closeOnSelect={true}\n blankText={'select'}\n onSelectDate={onChange}>{children}</DateSelect>\n}\n\nconst mapStateToProps = (state, {id}) => {\n const binDelivery = getBinDelivery(id, state)\n return {\n date: binDelivery.requestedOn\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onChange: (date) => { dispatch(actions.setRequestDate(id, date)) },\n }\n}\n\nBinDeliveryRequestDate.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n onChange: PropTypes.func.isRequired\n}\n\nBinDeliveryRequestDate = connect(\n mapStateToProps,\n mapDispatchToProps\n)(BinDeliveryRequestDate)\n\nexport default BinDeliveryRequestDate\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport { getBinDelivery } from '../binDeliveries/selectors'\nimport actions from '../binDeliveries/actions'\n\n\nlet BinDeliveryMissed = ({ missed, editable = true, date, onChange }) => {\n if(missed !== null || (date && moment().diff(moment(date), 'days') >= 0)) {\n\n var editButton = editable ? <span><i className=\"link fa fa-exchange\" onClick={ () => { onChange(!missed) } }></i>  </span> : null\n return(\n <div className=\"mt5\">\n { editButton }\n { missed ?\n <span>The delivery was reported <strong className=\"text-warning\">missed</strong></span>\n :\n <span>The delivery was assumed to be <strong className=\"text-success\">successful</strong></span>\n }\n </div>\n )\n } else {\n return null\n }\n}\n\nconst mapStateToProps = (state, {id}) => {\n const binDelivery = getBinDelivery(id, state)\n return {\n missed: binDelivery.missed,\n date: binDelivery.date\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onChange: (missed) => { dispatch(actions.setMissed(id, missed)) },\n }\n}\n\nBinDeliveryMissed.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n editable: PropTypes.bool\n //onChange: PropTypes.func.isRequired\n}\n\nBinDeliveryMissed = connect(\n mapStateToProps,\n mapDispatchToProps\n)(BinDeliveryMissed)\n\nexport default BinDeliveryMissed\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\n\nimport { DropdownSelect, DateSelect, ModelErrors, Link } from 'sharedComponents'\nimport MarkProcessedBtn from './MarkProcessedBtn'\nimport IssueBox from './IssueBox'\nimport IssueBoxSection from './IssueBoxSection'\nimport EditBinDeliveryModal from './EditBinDeliveryModal'\nimport UnitSpecificationList from './UnitSpecificationList'\nimport BinDeliveryDate from './BinDeliveryDate'\nimport BinDeliveryRequestDate from './BinDeliveryRequestDate'\nimport BinDeliveryMissed from './BinDeliveryMissed'\nimport Timestamps from './Timestamps'\n\nimport actions from '../binDeliveries/actions'\nvar {\n markProcessed,\n setClearAllPolicy,\n markForDestroy\n} = actions\n\nvar Open = ( { id, date, resolved, errors, processed, unitSpecifications, onMarkForDestroy, onMarkProcessed, ...restProps } ) => {\n\n var editModalTarget = _.isEmpty(unitSpecifications) ?\n <strong className='text-danger'>select</strong> :\n <UnitSpecificationList unitSpecifications={unitSpecifications}/>\n\n return (\n <IssueBox title=\"Bin Delivery\" handleDelete={onMarkForDestroy}>\n <ModelErrors errors={errors} />\n <IssueBoxSection>\n\n <div className=\"mb5\">Requested on <BinDeliveryRequestDate id={id}/></div>\n\n <div className=\"mb5\">\n <div className=\"mb3\">Deliver the following</div>\n <div className=\"ml10\">\n <EditBinDeliveryModal id={id} >{editModalTarget}</EditBinDeliveryModal>\n </div>\n </div>\n\n\n <div>A delivery has been confirmed for <BinDeliveryDate id={id}/></div>\n\n <BinDeliveryMissed id={id} />\n\n </IssueBoxSection>\n <IssueBoxSection>\n <div className=\"clearfix\">\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n <Timestamps {...restProps}/>\n </div>\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nclass Closed extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = { minimized: props.closed }\n this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n }\n\n handleToggleMinimized() {\n this.setState({minimized: !this.state.minimized})\n }\n\n render() {\n const { id, processed, closed, missed, date, resolved, unitSpecifications, onMarkProcessed, ...restProps } = this.props\n const { minimized } = this.state\n\n const missedHeading = missed ? <strong>- reported missed</strong> : null\n\n\n return (\n <IssueBox heading=\"Delivery\" historical={true} minimized={minimized} handleToggleMinimized={this.handleToggleMinimized}>\n\n <div className=\"mb5\">\n Scheduled for {moment(date).format(\"Do MMM YYYY\")}\n </div>\n\n { minimized ? null :\n <div className=\"mb5\">\n <div className=\"mb3\">Deliver the following</div>\n <div className=\"ml10\">\n <UnitSpecificationList unitSpecifications={unitSpecifications}/>\n </div>\n </div>\n }\n\n <div className=\"mb10\">\n <BinDeliveryMissed id={id} editable={!minimized} />\n </div>\n\n\n { minimized ? null :\n <IssueBoxSection>\n <div className=\"clearfix\">\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n <Timestamps {...restProps}/>\n </div>\n </IssueBoxSection>\n }\n\n\n </IssueBox>\n )\n }\n}\n\n\n\nvar BinDelivery = (props) => {\n if(props.closed && props.processed) {\n return <Closed {...props}/>\n } else {\n return <Open {...props}/>\n }\n}\n\nBinDelivery.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n //processed: PropTypes.bool.isRequired,\n //resolved: PropTypes.bool.isRequired,\n onMarkProcessed: PropTypes.func.isRequired,\n onMarkForDestroy: PropTypes.func\n};\n\n\nconst mapStateToProps = (state, {}) => {\n return {\n //binDelivery: getBinDeliveriesForServiceId(serviceId, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id, closed}) => {\n return {\n onMarkProcessed: (processed) => dispatch(markProcessed(id, processed)),\n onMarkForDestroy: !closed ? () => { dispatch(markForDestroy(id)) } : null\n }\n}\n\nBinDelivery = connect(\n mapStateToProps,\n mapDispatchToProps\n)(BinDelivery)\n\n\nexport default BinDelivery;\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\n\nimport { getBinDeliveriesForServiceId } from '../binDeliveries/selectors'\nimport BinDelivery from './BinDelivery'\nimport HistoryList from './HistoryList'\n\n\nvar BinDeliveryList = ( { binDeliveries } ) => {\n const getDelivery = (booking) => <BinDelivery key={booking.id} {...booking}/>\n const sortedList = _.orderBy(binDeliveries, 'date', 'desc')\n\n return (\n <div>\n <div>\n {_(sortedList).filter({closed: false}).map(getDelivery).value() }\n </div>\n <HistoryList title={'Historical Bin Deliveries'}>\n {_(sortedList).filter({closed: true}).map(getDelivery).value() }\n </HistoryList>\n </div>\n )\n}\n\nBinDeliveryList.propTypes = {\n serviceId: PropTypes.number.isRequired\n};\n\n\nconst mapStateToProps = (state, {serviceId}) => {\n return {\n binDeliveries: getBinDeliveriesForServiceId(serviceId, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {}\n}\n\nBinDeliveryList = connect(\n mapStateToProps,\n mapDispatchToProps\n)(BinDeliveryList)\n\n\nexport default BinDeliveryList;\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { Link, TickCross } from 'sharedComponents'\n\nconst InvoiceLink = ({ url, referenceNumber, grossTotal, paid } ) => {\n if(referenceNumber) {\n if(url) {\n return <div>\n <div className=\"pull-right\">\n <TickCross test={paid} trueLabel={'Paid'} falseLabel={'Not Paid'}/>\n </div>\n <Link href={url} target='_blank'>{referenceNumber}</Link>  -  <strong>{grossTotal}</strong>\n </div>\n } else {\n return <div>\n <div className=\"pull-right\">\n   <TickCross test={paid} trueLabel={'Paid'} falseLabel={'Not Paid'}/>\n </div>\n {referenceNumber}   -   <strong>{grossTotal}</strong>\n </div>\n }\n } else {\n return null\n }\n\n}\n\nInvoiceLink.propTypes = {\n path: PropTypes.string,\n number: PropTypes.string,\n grossTotal: PropTypes.string,\n //generate: PropTypes.bool,\n //onGenerateInvoice: PropTypes.func\n};\n\nexport default InvoiceLink\n","import React from 'react'\nimport _ from 'lodashExtended';\nimport PropTypes from 'prop-types'\nimport InvoiceLink from './InvoiceLink'\nimport actions from '../supplyProductInstructions/actions'\nimport { getSupplyProductInstruction } from '../supplyProductInstructions/selectors'\nimport { connect } from 'react-redux';\nimport { Btn } from 'sharedComponents'\n\nvar { generateInvoice } = actions\n\nvar SupplyProductInvoiceLink = ( {invoices, generateInvoice, prepaid, onGenerateInvoice } ) => {\n //onGenerateInvoice={prepaid ? onGenerateInvoice : null}\n //\n if(_.isPresent(invoices)) {\n return <div>\n {_.map(invoices, (invoice,id) => <InvoiceLink key={id} {...invoice}/> )}\n </div>\n } else {\n if(generateInvoice) {\n return <div>Invoice: <strong className=\"text-danger\">click save</strong></div>\n } else if(prepaid) {\n return <div><Btn styles='xs flat' onClick={onGenerateInvoice}>Generate Invoice</Btn></div>\n } else {\n return null\n }\n }\n}\n\nSupplyProductInvoiceLink.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n invoice: PropTypes.object,\n prepaid: PropTypes.bool.isRequired,\n generateInvoice: PropTypes.bool,\n onGenerateInvoice: PropTypes.func.isRequired,\n};\n\n\nconst mapStateToProps = (state, {id}) => {\n return { ...getSupplyProductInstruction(id, state) }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onGenerateInvoice: () => dispatch(generateInvoice(id))\n }\n}\n\nSupplyProductInvoiceLink = connect(\n mapStateToProps,\n mapDispatchToProps\n)(SupplyProductInvoiceLink)\n\n\nexport default SupplyProductInvoiceLink;\n\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\n\nlet ProductSpecification = ({quantity, productType}) => {\n return <div>{quantity} x {productType.fullname}</div>\n}\n\nProductSpecification.propTypes = {\n productType: PropTypes.shape({\n name: PropTypes.string,\n fullname: PropTypes.string,\n id: PropTypes.number,\n }).isRequired,\n quantity: PropTypes.number.isRequired,\n productTypeId: PropTypes.number.isRequired,\n}\n\nconst mapStateToProps = (state, ownProps) => {\n return {\n productType: state.form.productTypes.byId[ownProps.productTypeId],\n }\n}\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return { }\n}\n\nProductSpecification = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ProductSpecification)\n\n\nexport default ProductSpecification\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport ProductSpecification from './ProductSpecification'\n\nlet ProductSpecificationList = ({ productSpecifications }) => {\n\n if(_.isPresent(productSpecifications)) {\n return(\n <div>\n {_.map(productSpecifications, (productSpec) => <ProductSpecification key={productSpec.productTypeId} {...productSpec}/> ) }\n </div>\n )\n } else {\n return <strong style={{ cursor: 'pointer' }} className='text-danger'>\n {\"select\"}\n </strong>\n }\n\n}\n\nProductSpecificationList.propTypes = {\n productSpecifications: PropTypes.objectOf(\n PropTypes.shape({\n productTypeId: PropTypes.number.isRequired,\n quantity: PropTypes.number.isRequired,\n })\n ).isRequired\n};\n\n\n\nexport default ProductSpecificationList\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux';\nimport { ListGroupItem } from 'sharedComponents'\n\nclass ProductQuantitySelector extends React.Component {\n\n constructor(props) {\n super(props);\n this.handleChange = this.handleChange.bind(this)\n this.handleDestroy = this.handleDestroy.bind(this)\n }\n\n handleChange(e) {\n this.props.onChange(this.props.productTypeId, e.target.value)\n }\n\n handleDestroy(e) {\n this.props.onDestroy(this.props.productTypeId)\n }\n\n render() {\n var { productType, helpText, quantity, onChange, onDestroy } = this.props\n\n return(\n <ListGroupItem handleDelete={this.handleDestroy}>\n\n <div className=\"row\" style={{ minHeight: 40, paddingLeft: 20, marginLeft: -45}}>\n\n\n <div className=\"col-sm-2\"><img src={productType.smallUrl} style={{ height: 40, width: 40, marginRight: 7 }}/></div>\n\n <div className=\"col-sm-3 no-wrap\">\n <input style={ { width: 40, marginTop: 7, display: 'inline-block', textAlign: 'center' } } type=\"number\" step=\"1\" value={quantity} onChange={this.handleChange}/>\n   <small> <span className=\"text-muted\">x</span> </small>\n </div>\n\n <div className=\"col-sm-5\">\n <small>\n { productType.name }<br/>\n <span className=\"text-muted\">{productType.productGroupName}</span>\n <span className=\"text-muted\">{helpText}</span>\n </small>\n </div>\n\n </div>\n\n </ListGroupItem>\n )\n }\n}\n\n\nProductQuantitySelector.propTypes = {\n onChange: PropTypes.func.isRequired,\n onDestroy: PropTypes.func.isRequired,\n helpText: PropTypes.node,\n quantity: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]).isRequired,\n productTypeId: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]).isRequired,\n productType: PropTypes.shape({\n name: PropTypes.string.isRequired,\n smallUrl: PropTypes.string.isRequired,\n }).isRequired\n};\n\n\nconst mapStateToProps = (state, {productTypeId}) => {\n return {\n productType: state.form.productTypes.byId[productTypeId]\n }\n}\n\nProductQuantitySelector = connect(\n mapStateToProps,\n null,\n)(ProductQuantitySelector)\n\n\nexport default ProductQuantitySelector\n\n\n","import React from 'react'\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types'\nimport ProductQuantitySelector from './ProductQuantitySelector'\nimport { ListGroup } from 'sharedComponents'\nimport actions from '../specifications/actions'\nimport _ from 'lodashExtended';\n\nlet EditProductSpecifications = ({ productSpecifications, onChangeQuantity, onRemove}) => {\n\n return <ListGroup>\n {_(productSpecifications).reject({quantity: 0}).map( (productSpec) => <ProductQuantitySelector \n key={productSpec.productTypeId}\n onChange={onChangeQuantity}\n onDestroy={onRemove}\n {...productSpec} /> ).value() }\n </ListGroup>\n\n}\n\nEditProductSpecifications.propTypes = {\n productSpecifications: PropTypes.objectOf(\n PropTypes.shape({\n productTypeId: PropTypes.number.isRequired,\n quantity: PropTypes.number.isRequired,\n })\n ).isRequired,\n onChangeQuantity: PropTypes.func.isRequired,\n onRemove: PropTypes.func.isRequired,\n};\n\n\nexport default EditProductSpecifications\n\n","import React from 'react'\nimport { ListGroupItem, ListGroup, Btn } from 'sharedComponents'\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types'\nimport _ from 'lodashExtended';\n\nlet ProductSelector = ({availableProductTypeIds, selectedProductTypeIds, productTypes, onAddProductType}) => {\n\n const productSelectors = _.map(availableProductTypeIds, (availableProductTypeId) => {\n var selected = _.includes(selectedProductTypeIds || [], availableProductTypeId)\n var productType = productTypes[availableProductTypeId]\n\n return <ListGroupItem key={availableProductTypeId}>\n\n\n\n <div className=\"row\">\n <div className=\"col-sm-2\" >\n\n <img src={selected ? productType.largeGrayUrl : productType.largeUrl} className=\"media-object\" style={{ width: 40, height: 40}}/>\n\n </div>\n <div className=\"col-sm-10 pt5\">\n\n <div className=\"pull-right\" style={{ paddingRight: 10 }}>{ selected ? null : <span className=\"link\" onClick={() => { onAddProductType(availableProductTypeId) }}><i className=\"fa fa-plus\"></i></span>}</div>\n <small>{ productType.name } <span className=\"text-muted\">{productType.productGroupName}</span></small>\n salesPrice\n </div>\n </div>\n\n </ListGroupItem>\n } )\n\n\n return <ListGroup>\n {productSelectors}\n </ListGroup>\n\n}\n\nProductSelector.propTypes = {\n productTypes: PropTypes.objectOf(\n PropTypes.shape({\n name: PropTypes.string,\n fullname: PropTypes.string,\n id: PropTypes.number,\n }).isRequired,\n ).isRequired,\n availableProductTypeIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n selectedProductTypeIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n onAddProductType: PropTypes.func.isRequired,\n};\n\nconst mapStateToProps = (state, {specificationUuid}) => {\n return {\n productTypes: state.form.productTypes.byId,\n }\n}\n\nconst mapDispatchToProps = (dispatch, {specificationUuid}) => {\n return {}\n}\n\nProductSelector = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ProductSelector)\n\n\nexport default ProductSelector\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport actions from '../supplyProductInstructions/actions'\nimport { getSupplyProductInstruction } from '../supplyProductInstructions/selectors'\nimport { StatelessModal, Btn } from 'sharedComponents'\nimport EditProductSpecifications from './EditProductSpecifications'\nimport ProductQuantitySelector from './ProductQuantitySelector'\nimport ProductSelector from './ProductSelector'\n\nvar {\n selectProductQuantity,\n addProduct,\n removeProduct,\n} = actions\n\nclass EditSupplyProductInstructionModal extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpen: _.isBlank(props.productSpecifications),\n };\n this.handleOpen = this.handleOpen.bind(this)\n this.handleClose = this.handleClose.bind(this)\n }\n\n handleOpen () { this.setState({ isOpen: true }) }\n handleClose () { this.setState({ isOpen: false }) }\n\n render() {\n var { productSpecifications, children, target, title, availableProductTypeIds, selectedProductTypeIds,\n onAdd, onRemove, onChangeQuantity } = this.props\n\n\n return (\n <StatelessModal title={title || \"Add products\"}\n target={<span className=\"link\">{children || target || \"Add Products\"}</span>}\n isOpen={this.state.isOpen}\n onCloseModal={this.handleClose}\n onOpenModal={this.handleOpen} >\n\n <div className=\"row\">\n <div className=\"col-sm-6\">\n <EditProductSpecifications productSpecifications={productSpecifications} onRemove={onRemove} onChangeQuantity={onChangeQuantity} />\n  \n </div>\n <div className=\"col-sm-6\">\n <ProductSelector onAddProductType={onAdd} availableProductTypeIds={availableProductTypeIds} selectedProductTypeIds={selectedProductTypeIds}/>\n </div>\n </div>\n\n\n\n <div style={{ borderTop: '1px solid #e6e9ed', padding: '10px 10px 5px 10px', marginLeft: -10, marginRight: -10 }}>\n <div style={{ textAlign: 'right', paddingBottom: 5 }}>\n <Btn onClick={this.handleClose}>close</Btn>\n </div>\n </div>\n </StatelessModal>\n )\n }\n\n}\n\nEditSupplyProductInstructionModal.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n target: PropTypes.node,\n title: PropTypes.node,\n availableProductTypeIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n selectedProductTypeIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n onChangeQuantity: PropTypes.func.isRequired,\n onRemove: PropTypes.func.isRequired,\n onAdd: PropTypes.func.isRequired,\n};\n\n\nconst mapStateToProps = (state, {id}) => {\n const instruction = getSupplyProductInstruction(id, state)\n const { productSpecifications } = instruction\n return {\n productSpecifications,\n availableProductTypeIds: instruction.availableProductTypeIds,\n selectedProductTypeIds: _.map(productSpecifications, 'productTypeId'),\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onChangeQuantity: (productTypeId, quantity) => { dispatch(selectProductQuantity(id, productTypeId, quantity)) },\n onRemove: (productTypeId) => { dispatch(removeProduct(id, productTypeId)) },\n onAdd: (productTypeId) => { dispatch(addProduct(id, productTypeId)) },\n }\n}\n\n EditSupplyProductInstructionModal = connect(\n mapStateToProps,\n mapDispatchToProps\n)(EditSupplyProductInstructionModal)\n\n\nexport default EditSupplyProductInstructionModal;\n\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport actions from '../supplyProductInstructions/actions'\nimport { getSupplyProductInstruction } from '../supplyProductInstructions/selectors'\n\nimport { DateSelect, NoWrap } from 'sharedComponents'\n\nlet SupplyProductConfirmDate = ({ id, confirmedByVendorOn, onChange, children }) => {\n\n var dateFormat = \"ddd, Do MMM YYYY\"\n var selectedDate = confirmedByVendorOn\n\n var dateSelectSubtitle = <span>The vendor hs confirmed delivery will be 5 business days from<strong><NoWrap>{selectedDate ? moment(selectedDate).format(dateFormat) : '<select date>'}</NoWrap></strong></span>\n\n return <DateSelect title=\"Delivery Confirmed by vendor on\"\n subtitle={dateSelectSubtitle}\n required={true}\n selectedDate={selectedDate}\n maxDate={new Date()}\n closeOnSelect={true}\n blankText={'select'}\n onClearDate={() => onChange(null) }\n strongTarget={true}\n onSelectDate={onChange}>{children}</DateSelect>\n}\n\nconst mapStateToProps = (state, {id}) => {\n return {\n ...getSupplyProductInstruction(id, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onChange: (date) => { dispatch(actions.setConfirmedByVendorOn(id, date)) },\n }\n}\n\nSupplyProductConfirmDate.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n confirmedByVendorOn: PropTypes.string,\n onChange: PropTypes.func.isRequired\n}\n\nSupplyProductConfirmDate = connect(\n mapStateToProps,\n mapDispatchToProps\n)(SupplyProductConfirmDate)\n\nexport default SupplyProductConfirmDate\n\n\n","import React from 'react'\nimport { DropdownSelect } from 'sharedComponents'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended'\nimport { getFixedCollectionTime } from '../fixedCollectionTimes/selectors'\nimport { Popover, Link, InlineVariable } from 'sharedComponents'\nimport { Btn } from 'sharedComponents'\n\nimport actions from '../fixedCollectionTimes/actions'\n\nvar { update } = actions\n\nclass EditFixedCollectionTime extends React.Component {\n\n constructor(props){\n\n super(props);\n\n\n var { fixedCollectionTime } = props\n\n\n if(fixedCollectionTime) {\n var currentlyEditing = _.find(['website','freeText'], (key) => _.isPresent(fixedCollectionTime[key])) || 'website'\n\n var { website = '', freeText = '' } = _.pickBy(fixedCollectionTime, _.isPresent )\n\n this.state = { currentlyEditing, website, freeText }\n this.toggleEditing = this.toggleEditing.bind(this)\n this.handleChange = this.handleChange.bind(this)\n\n }\n }\n\n toggleEditing() {\n var currentlyEditing = this.state.currentlyEditing == 'website' ? 'freeText' : 'website'\n this.setState({ currentlyEditing })\n }\n\n handleChange(e) {\n var newState = {}\n newState[this.state.currentlyEditing] = e.target.value\n\n this.setState(newState, () => {\n if(this.state.currentlyEditing == 'website') {\n this.props.onUpdate({website: this.state.website, freeText: '' })\n } else {\n this.props.onUpdate({website: '', freeText: this.state.freeText })\n }\n })\n }\n\n render() {\n\n const { fixedCollectionTime, children } = this.props\n\n if(fixedCollectionTime) {\n const { currentlyEditing } = this.state\n const currentValue = this.state[currentlyEditing]\n\n let targetPresent, inputText, toggleText\n\n if(currentlyEditing == 'website') {\n targetPresent = 'Website: ' + currentValue\n inputText = <div>Website URL <small className=\"text-muted\">starting with http:// or https://</small></div>\n toggleText = 'Toggle to Free Text'\n\n } else {\n targetPresent = '' + currentValue\n inputText = 'Enter days and times'\n toggleText = 'Toggle to use Website URL'\n }\n\n\n const target = <InlineVariable present={targetPresent}\n blank={\"enter details\"}\n isBlank={_.isBlank(currentValue)}\n strong={true}\n color={_.isBlank(currentValue) ? \"#E9573F\" : \"#3BAFDA\"}>\n {children}\n </InlineVariable>\n\n return <Popover target={target} title={'Collection days and times'}>\n <div style={{ width: 250 }}>\n { inputText }\n <div className=\"mt10 mb10\">\n <input type=\"text\" value={currentValue} onChange={this.handleChange} className=\"form-control\" style={{ width: '100%'}}/>\n </div>\n <Btn styles=\"xs flat\" onClick={this.toggleEditing}>\n { toggleText }\n </Btn>\n </div>\n </Popover>\n } else {\n return null\n }\n\n }\n}\n\nEditFixedCollectionTime.propTypes = {\n fixedCollectionTime: PropTypes.shape({\n website: PropTypes.string,\n freeText: PropTypes.string,\n }),\n onUpdate: PropTypes.func.isRequired\n};\n\nconst mapStateToProps = (state, {serviceId}) => {\n return {\n fixedCollectionTime: getFixedCollectionTime(serviceId, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {serviceId}) => {\n return {\n onUpdate: (newAttrib) => { dispatch(update(serviceId, newAttrib ))}\n }\n}\n\nEditFixedCollectionTime = connect(\n mapStateToProps,\n mapDispatchToProps\n)(EditFixedCollectionTime)\n\n\n\nexport default EditFixedCollectionTime\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended'\nimport { getFixedCollectionTime } from '../fixedCollectionTimes/selectors'\n\nimport { InlineVariable } from 'sharedComponents'\n\nlet FixedCollectionTime = ({ fixedCollectionTime }) => {\n if(fixedCollectionTime) {\n var currentlyViewing = _.find(['website','freeText'], (key) => _.isPresent(fixedCollectionTime[key])) || 'website'\n var currentValue = fixedCollectionTime[currentlyViewing]\n return <InlineVariable present={currentlyViewing == 'website' ? 'according to the website: ' + currentValue : currentValue}\n blank={\"<not set>\"}\n isBlank={_.isBlank(currentValue)}\n color={_.isBlank(currentValue) ? \"#E9573F\" : null}/>\n } else {\n return null\n }\n}\n\nFixedCollectionTime.propTypes = {\n fixedCollectionTime: PropTypes.shape({\n website: PropTypes.string,\n freeText: PropTypes.string,\n }).isRequired,\n serviceId: PropTypes.number.isRequired\n};\n\nconst mapStateToProps = (state, {serviceId}) => {\n return {\n fixedCollectionTime: getFixedCollectionTime(serviceId, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {serviceId}) => {\n return {\n }\n}\n\nFixedCollectionTime = connect(\n mapStateToProps,\n mapDispatchToProps\n)(FixedCollectionTime)\n\nexport default FixedCollectionTime\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport IssueBox from './IssueBox'\nimport IssueBoxSection from './IssueBoxSection'\nimport MarkProcessedBtn from './MarkProcessedBtn'\nimport { DateSelect, ModelErrors, Link } from 'sharedComponents'\nimport OrderLink from './OrderLink'\nimport SupplyProductInvoiceLink from './SupplyProductInvoiceLink'\nimport ProductSpecificationList from './ProductSpecificationList'\nimport EditSupplyProductInstructionModal from './EditSupplyProductInstructionModal'\nimport SupplyProductConfirmDate from './SupplyProductConfirmDate'\nimport EditFixedCollectionTime from './EditFixedCollectionTime'\nimport FixedCollectionTime from './FixedCollectionTime'\nimport Timestamps from './Timestamps'\n\n\nimport actions from '../supplyProductInstructions/actions'\n\nvar {\n markProcessed,\n} = actions\n\nvar Open = (\n {id, processed, resolved, errors, order, productSpecifications, onMarkProcessed, ...restProps }\n) => {\n return (\n <IssueBox title='Product Order'>\n\n\n <IssueBoxSection>\n\n <ModelErrors errors={errors} />\n\n <div className=\"mb5\">\n <div className=\"pull-right\"><SupplyProductInvoiceLink id={id}/></div>\n <OrderLink {...order}/>\n </div>\n\n\n <div className=\"mb5\">\n <div className=\"mb3\">Products:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSupplyProductInstructionModal id={id}>\n <ProductSpecificationList productSpecifications={productSpecifications}/>\n </EditSupplyProductInstructionModal>\n </div>\n </div>\n\n <div className=\"mb5\">\n Confirmed by vendor on <SupplyProductConfirmDate id={id}/>\n </div>\n\n </IssueBoxSection>\n <IssueBoxSection>\n <div className=\"clearfix\">\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n <Timestamps {...restProps}/>\n </div>\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nclass Closed extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = { minimized: props.closed }\n this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n }\n\n handleToggleMinimized() {\n this.setState({minimized: !this.state.minimized})\n }\n\n render() {\n const { id, processed, resolved, confirmedByVendorOn, order, productSpecifications, onMarkProcessed } = this.props\n const { minimized } = this.state\n\n const heading = resolved ? <div><strong>Product Order</strong> - {moment(confirmedByVendorOn).format(\"Do MMM YYYY\") }</div> :\n <h4>Product Order</h4>\n\n return (\n <IssueBox heading={heading} historical={true} minimized={minimized} handleToggleMinimized={this.handleToggleMinimized}>\n { minimized ?\n <div className=\"mb10\"><SupplyProductInvoiceLink id={id}/></div>\n :\n <div>\n <div className=\"mb5\">\n <SupplyProductInvoiceLink id={id}/>\n </div>\n <div className=\"mb5\">\n <OrderLink {...order}/>\n </div>\n <div className=\"mb5\">\n <ProductSpecificationList productSpecifications={productSpecifications}/>\n </div>\n <div className=\"mb5\">\n <Timestamps {...this.props}/>\n </div>\n </div>\n }\n </IssueBox>\n )\n }\n}\n\nvar SupplyProductInstruction = (props) => {\n if(props.closed) {\n return <Closed {...props}/>\n } else {\n return <Open {...props}/>\n }\n}\n\n\nSupplyProductInstruction.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n processed: PropTypes.bool.isRequired,\n resolved: PropTypes.bool.isRequired,\n errors: PropTypes.object,\n order: PropTypes.object,\n onMarkProcessed: PropTypes.func.isRequired,\n};\n\n\nconst mapStateToProps = (state, {serviceId}) => {\n return {\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onMarkProcessed: (processed) => dispatch(markProcessed(id, processed)),\n }\n}\n\nSupplyProductInstruction = connect(\n mapStateToProps,\n mapDispatchToProps\n)(SupplyProductInstruction)\n\n\nexport default SupplyProductInstruction;\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport SupplyProductInstruction from './SupplyProductInstruction'\nimport HistoryList from './HistoryList'\n\nvar SupplyProductInstructionList = ( { supplyProductInstructions } ) => {\n\n if(_.isPresent(supplyProductInstructions)) {\n\n const sortedList = _(supplyProductInstructions).orderBy(({confirmedByVendorOn}) => _.isNull(confirmedByVendorOn) ? confirmedByVendorOn : \"z\", ['desc'] )\n\n return (\n <div style={{marginBottom: 10}}>\n <div>\n { sortedList.filter({closed: false}).map((instruction) => <SupplyProductInstruction key={instruction.id} {...instruction}/>).value() }\n </div>\n <HistoryList title={'Historical Orders'}>\n { sortedList.filter({closed: true}).map((instruction) => <SupplyProductInstruction key={instruction.id} {...instruction}/>).value() }\n </HistoryList>\n\n </div>\n )\n } else {\n return null\n }\n\n}\n\nSupplyProductInstructionList.propTypes = {\n //serviceId: PropTypes.number.isRequired\n supplyProductInstructions: PropTypes.objectOf(\n PropTypes.shape({\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n })\n )\n};\n\n\n//const mapStateToProps = (state, {serviceId}) => {\n //return {\n ////supplyProductInstructions: getInstructionsForServiceId(serviceId, state)\n //}\n//}\n\n//const mapDispatchToProps = (dispatch, ownProps) => {\n //return {}\n//}\n\n//SupplyProductInstructionList = connect(\n //mapStateToProps,\n //mapDispatchToProps\n//)(SupplyProductInstructionList)\n\n\nexport default SupplyProductInstructionList;\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\n//\nimport ServiceHolder from './ServiceHolder'\nimport OrderLink from '../OrderLink'\nimport IssueBox from '../IssueBox'\nimport IssueBoxSection from '../IssueBoxSection'\nimport NewServiceDeliveryOption from '../NewServiceDeliveryOption'\n\nimport CollectionPlanSelect from '../CollectionPlanSelect'\nimport CollectionPlan from '../CollectionPlan'\n\nimport UnitSpecificationList from '../UnitSpecificationList'\nimport EditSpecificationModal from '../EditSpecificationModal'\nimport NewServiceDeliveryDate from '../NewServiceDeliveryDate'\nimport SpecificationConfirmDate from '../SpecificationConfirmDate'\n\nimport UnknownSpecification from '../UnknownSpecification'\n\nimport CollectionDaysSelect from '../CollectionDaysSelect'\nimport CollectionDays from '../CollectionDays'\n\nimport FinalCollectionDate from '../FinalCollectionDate'\nimport FinalCollectionOption from '../FinalCollectionOption'\n\nimport NextCollectionDateSelect from '../NextCollectionDateSelect'\nimport NextCollectionDate from '../NextCollectionDate'\n\nimport MarkProcessedBtn from '../MarkProcessedBtn'\nimport ServiceActionMenu from '../ServiceActionMenu'\nimport MissedCollectionReportList from '../MissedCollectionReportList'\nimport AdhocCollectionBookingList from '../AdhocCollectionBookingList'\nimport EmergencyCollectionRequestList from '../EmergencyCollectionRequestList'\nimport BinDeliveryList from '../BinDeliveryList'\nimport SupplyProductInstructionList from '../SupplyProductInstructionList'\n\nimport { markServiceProcessed, cancelChangeSpecification } from '../../services/operations'\nimport { isServiceProcessed, isServiceResolved, isServiceClosed } from '../../services/selectors'\nimport { getCurrentSpecification } from '../../specifications/selectors'\nimport { getTerminateServiceIssue } from '../../terminateServiceIssues/selectors'\nimport { getNewServiceIssue } from '../../newServiceIssues/selectors'\nimport { getNextRoutineCollections } from '../../nextRoutineCollections/selectors'\nimport { getInstructionsForServiceId } from '../../supplyProductInstructions/selectors'\nimport terminateServiceIssuesActions from '../../terminateServiceIssues/actions'\nimport _ from 'lodashExtended';\n\n\nconst NewServiceIssue = ({title, id, processed, resolved, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n\n return(\n <IssueBox title='New Service Request'>\n\n <IssueBoxSection>\n\n <OrderLink {...newServiceIssue.order}/>\n\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <IssueBoxSection><div key={collectionGroup.uuid} className=\"mb5\">\n\n <div className=\"mb5\">\n Collected <CollectionPlanSelect collectionGroup={collectionGroup}/> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n\n { collectionGroup.hasRoutineCollections ?\n <div className=\"mb5\">\n <span>with the first collection on <NextCollectionDateSelect collectionGroup={collectionGroup}/></span>\n </div>\n : null }\n\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n\n </div></IssueBoxSection>\n\n }) :\n <UnknownSpecification serviceId={id}/>\n }\n\n <IssueBoxSection>\n <div className=\"mb5\">\n <NewServiceDeliveryOption newServiceIssue={newServiceIssue}/>\n </div>\n\n {!!newServiceIssue.noDelivery ? null :\n <div className=\"mb5\">Bin delivery confirmed for <NewServiceDeliveryDate newServiceIssue={newServiceIssue}/></div>\n }\n\n\n <div className=\"mb5 text-muted\">Vendor Account: {vendorAccount.name}</div>\n\n { specification ?\n <div className=\"mb5\">\n <SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate>\n </div> : null }\n\n </IssueBoxSection>\n\n </IssueBoxSection>\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst UpdateCollectionDate = ({title, id, processed, resolved, specification, onMarkProcessed}) => {\n return(\n <IssueBox title=\"Update Collection Date\">\n\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid} ><IssueBoxSection>\n\n <div className=\"mb5\">\n Collected <CollectionPlan collectionGroup={collectionGroup} /> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n <div style={{ marginLeft: 10 }}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n { collectionGroup.hasRoutineCollections ?\n <div className=\"mb5\">\n Next collection is <NextCollectionDateSelect collectionGroup={collectionGroup}/>\n </div>\n : null }\n\n </IssueBoxSection></div>\n })}\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst SpecificationChange = ({ title, id, processed, resolved, specification, onCancelChangeSpec, onMarkProcessed }) => {\n return(\n <IssueBox title=\"Change unit and or frequency specification issue\"\n handleDelete={ specification.id ? null : onCancelChangeSpec }>\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return (<div key={collectionGroup.uuid}><IssueBoxSection>\n <div className=\"mb5\">Collected<CollectionPlanSelect collectionGroup={collectionGroup}/>\n <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n <div className=\"mb5\"><SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate></div>\n\n { collectionGroup.hasRoutineCollections ? (\n <div className=\"mt10 text-muted\">\n Next collection on<NextCollectionDateSelect strongTarget={false} collectionGroup={collectionGroup}/>\n </div>\n ) : null }\n\n </IssueBoxSection></div>)\n })}\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst TerminateServiceIssue = ({title, id, processed, resolved, terminateServiceIssue, onCancelTermination, onMarkProcessed}) => {\n\n return(\n <IssueBox title='Terminate Service' handleDelete={ terminateServiceIssue.id ? null : onCancelTermination }>\n <div className=\"mb5\">\n <FinalCollectionOption terminateServiceIssue={terminateServiceIssue}/>\n {!!terminateServiceIssue.noFinalCollection ?\n <span>Service terminated, no final collection required</span>\n :\n <span>Final collection scheduled on <FinalCollectionDate terminateServiceIssue={terminateServiceIssue}></FinalCollectionDate></span>\n }\n </div>\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst Closed = ({title, id, processed, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n return(\n <IssueBox heading=\"Current Specification\" historical={true}>\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid}>\n <div className=\"mb5\">\n Collected <strong className=\"text-primary\"><CollectionPlan collectionGroup={collectionGroup} /></strong>\n <CollectionDays collectionGroup={collectionGroup}/>\n </div>\n\n\n <div className=\"mb5\">{ collectionGroup.hasRoutineCollections ? <span>Next collection on <span className=\"text-success\"><NextCollectionDate collectionGroup={collectionGroup}/></span></span> : \"Adhoc Collections - Non Booked\" }</div>\n\n <div className=\"mb10\">\n <div className=\"mb5 text-muted\">Unit Specification</div>\n <div className=\"mb5 ml10\">\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n </div>\n\n\n </div>\n }) : <UnknownSpecification serviceId={id}/>}\n </IssueBox>\n )\n}\n\nlet NhsCommissionedService = (props) => {\n let serviceNode, menuItems\n if(props.terminateServiceIssue) {\n serviceNode = <TerminateServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'bookAdhocCollection',\n 'supplyProducts',\n ]\n } else if(props.newServiceIssue) {\n serviceNode = <NewServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'bookAdhocCollection',\n 'supplyProducts',\n 'terminateService'\n ]\n } else if(props.specification && !props.specification.closed){\n serviceNode = <SpecificationChange {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'bookAdhocCollection',\n 'supplyProducts',\n 'terminateService'\n ]\n\n } else if(!_.every(props.nextRoutineCollections, 'closed') ){\n serviceNode = <UpdateCollectionDate {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'changeSpecification',\n 'bookAdhocCollection',\n 'supplyProducts',\n 'terminateService'\n ]\n } else {\n serviceNode = <Closed {...props} />\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'changeSpecification',\n 'updateCollectionDate',\n 'bookAdhocCollection',\n 'supplyProducts',\n 'terminateService',\n ]\n\n }\n\n if(_.isEmpty(props.nextRoutineCollections)) {\n menuItems = _.pull(menuItems, 'updateCollectionDate')\n }\n\n return(<ServiceHolder {...props} menuItems={menuItems}>\n {serviceNode}\n <MissedCollectionReportList serviceId={props.id}/>\n <EmergencyCollectionRequestList serviceId={props.id}/>\n <AdhocCollectionBookingList serviceId={props.id}/>\n <BinDeliveryList serviceId={props.id}/>\n <SupplyProductInstructionList supplyProductInstructions={props.supplyProductInstructions}/>\n </ServiceHolder>)\n}\n\n\nNhsCommissionedService.propTypes = {\n specification: PropTypes.shape({\n uuid: PropTypes.string,\n id: PropTypes.number,\n collectionGroups: PropTypes.object.isRequired\n }),\n currentSpecificationVersionUuid: PropTypes.string,\n id: PropTypes.number.isRequired,\n vendorAccount: PropTypes.shape({\n name: PropTypes.string.isRequired,\n }).isRequired,\n onMarkProcessed: PropTypes.func.isRequired\n}\n\nconst mapStateToProps = (state, {id}) => {\n const specification = getCurrentSpecification(id, state)\n\n return {\n processed: isServiceProcessed(id, state),\n resolved: isServiceResolved(id, state),\n closed: isServiceClosed(id, state),\n specification: specification,\n newServiceIssue: getNewServiceIssue(id, state),\n terminateServiceIssue: getTerminateServiceIssue(id, state),\n supplyProductInstructions: getInstructionsForServiceId(id, state),\n nextRoutineCollections: specification ? getNextRoutineCollections(specification.collectionGroups, state) : [],\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onMarkProcessed: (processed) => dispatch(markServiceProcessed(id, processed)),\n onCancelTermination: () => dispatch(terminateServiceIssuesActions.cancelTerminateService(id)),\n onCancelChangeSpec: () => dispatch(cancelChangeSpecification(id))\n }\n}\n\nNhsCommissionedService = connect(\n mapStateToProps,\n mapDispatchToProps\n)(NhsCommissionedService)\n\nexport default NhsCommissionedService\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\n//\nimport ServiceHolder from './ServiceHolder'\nimport OrderLink from '../OrderLink'\nimport IssueBox from '../IssueBox'\nimport IssueBoxSection from '../IssueBoxSection'\nimport NewServiceDeliveryOption from '../NewServiceDeliveryOption'\n\nimport CollectionPlanSelect from '../CollectionPlanSelect'\nimport CollectionPlan from '../CollectionPlan'\n\nimport UnitSpecificationList from '../UnitSpecificationList'\nimport EditSpecificationModal from '../EditSpecificationModal'\nimport NewServiceDeliveryDate from '../NewServiceDeliveryDate'\nimport SpecificationConfirmDate from '../SpecificationConfirmDate'\n\nimport UnknownSpecification from '../UnknownSpecification'\n\nimport CollectionDaysSelect from '../CollectionDaysSelect'\nimport CollectionDays from '../CollectionDays'\n\nimport FinalCollectionDate from '../FinalCollectionDate'\nimport FinalCollectionOption from '../FinalCollectionOption'\n\nimport NextCollectionDateSelect from '../NextCollectionDateSelect'\nimport NextCollectionDate from '../NextCollectionDate'\n\nimport MarkProcessedBtn from '../MarkProcessedBtn'\nimport ServiceActionMenu from '../ServiceActionMenu'\nimport MissedCollectionReportList from '../MissedCollectionReportList'\nimport AdhocCollectionBookingList from '../AdhocCollectionBookingList'\nimport EmergencyCollectionRequestList from '../EmergencyCollectionRequestList'\nimport BinDeliveryList from '../BinDeliveryList'\nimport SupplyProductInstructionList from '../SupplyProductInstructionList'\n\nimport { markServiceProcessed, cancelChangeSpecification } from '../../services/operations'\nimport { isServiceProcessed, isServiceResolved, isServiceClosed } from '../../services/selectors'\nimport { getCurrentSpecification } from '../../specifications/selectors'\nimport { getTerminateServiceIssue } from '../../terminateServiceIssues/selectors'\nimport { getNewServiceIssue } from '../../newServiceIssues/selectors'\nimport { getNextRoutineCollections } from '../../nextRoutineCollections/selectors'\nimport { getInstructionsForServiceId } from '../../supplyProductInstructions/selectors'\nimport terminateServiceIssuesActions from '../../terminateServiceIssues/actions'\nimport _ from 'lodashExtended';\n\n\nconst NewServiceIssue = ({title, id, processed, resolved, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n\n return(\n <IssueBox title='New Service Request'>\n\n <IssueBoxSection>\n\n <OrderLink {...newServiceIssue.order}/>\n\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <IssueBoxSection><div key={collectionGroup.uuid} className=\"mb5\">\n\n <div className=\"mb5\">\n Collected <CollectionPlanSelect collectionGroup={collectionGroup}/> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n\n { collectionGroup.hasRoutineCollections ?\n <div className=\"mb5\">\n <span>with the first collection on <NextCollectionDateSelect collectionGroup={collectionGroup}/></span>\n </div>\n : null }\n\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n\n </div></IssueBoxSection>\n\n }) :\n <UnknownSpecification serviceId={id}/>\n }\n\n <IssueBoxSection>\n <div className=\"mb5\">\n <NewServiceDeliveryOption newServiceIssue={newServiceIssue}/>\n </div>\n\n {!!newServiceIssue.noDelivery ? null :\n <div className=\"mb5\">Bin delivery confirmed for <NewServiceDeliveryDate newServiceIssue={newServiceIssue}/></div>\n }\n\n\n <div className=\"mb5 text-muted\">Vendor Account: {vendorAccount.name}</div>\n\n { specification ?\n <div className=\"mb5\">\n <SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate>\n </div> : null }\n\n </IssueBoxSection>\n\n </IssueBoxSection>\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst UpdateCollectionDate = ({title, id, processed, resolved, specification, onMarkProcessed}) => {\n return(\n <IssueBox title=\"Update Collection Date\">\n\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid} ><IssueBoxSection>\n\n <div className=\"mb5\">\n Collected <CollectionPlan collectionGroup={collectionGroup} /> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n <div style={{ marginLeft: 10 }}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n { collectionGroup.hasRoutineCollections ?\n <div className=\"mb5\">\n Next collection is <NextCollectionDateSelect collectionGroup={collectionGroup}/>\n </div>\n : null }\n\n </IssueBoxSection></div>\n })}\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst SpecificationChange = ({ title, id, processed, resolved, specification, onMarkProcessed, onCancelChangeSpec }) => {\n return(\n <IssueBox title=\"Change unit and or frequency specification issue\"\n handleDelete={ specification.id ? null : onCancelChangeSpec }>\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return (<div key={collectionGroup.uuid}><IssueBoxSection>\n <div className=\"mb5\">Collected<CollectionPlanSelect collectionGroup={collectionGroup}/>\n <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n <div className=\"mb5\"><SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate></div>\n\n { collectionGroup.hasRoutineCollections ? (\n <div className=\"mt10 text-muted\">\n Next collection on<NextCollectionDateSelect strongTarget={false} collectionGroup={collectionGroup}/>\n </div>\n ) : null }\n\n </IssueBoxSection></div>)\n })}\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst TerminateServiceIssue = ({title, id, processed, resolved, terminateServiceIssue, onCancelTermination, onMarkProcessed}) => {\n\n return(\n <IssueBox title='Terminate Service' handleDelete={ terminateServiceIssue.id ? null : onCancelTermination }>\n <div className=\"mb5\">\n <FinalCollectionOption terminateServiceIssue={terminateServiceIssue}/>\n {!!terminateServiceIssue.noFinalCollection ?\n <span>Service terminated, no final collection required</span>\n :\n <span>Final collection scheduled on <FinalCollectionDate terminateServiceIssue={terminateServiceIssue}></FinalCollectionDate></span>\n }\n </div>\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst Closed = ({title, id, processed, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n return(\n <IssueBox heading=\"Current Specification\" historical={true}>\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid}>\n <div className=\"mb5\">\n Collected <strong className=\"text-primary\"><CollectionPlan collectionGroup={collectionGroup} /></strong>\n <CollectionDays collectionGroup={collectionGroup}/>\n </div>\n\n\n <div className=\"mb5\">{ collectionGroup.hasRoutineCollections ? <span>Next collection on <span className=\"text-success\"><NextCollectionDate collectionGroup={collectionGroup}/></span></span> : \"Adhoc Collections - Non Booked\" }</div>\n\n <div className=\"mb10\">\n <div className=\"mb5 text-muted\">Unit Specification</div>\n <div className=\"mb5 ml10\">\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n </div>\n\n\n </div>\n }) : <UnknownSpecification serviceId={id}/>}\n </IssueBox>\n )\n}\n\nlet NhsEmergencyService = (props) => {\n let serviceNode, menuItems\n if(props.terminateServiceIssue) {\n serviceNode = <TerminateServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'bookAdhocCollection',\n 'supplyProducts',\n ]\n } else if(props.newServiceIssue) {\n serviceNode = <NewServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'bookAdhocCollection',\n 'supplyProducts',\n 'terminateService'\n ]\n } else if(props.specification && !props.specification.closed){\n serviceNode = <SpecificationChange {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'bookAdhocCollection',\n 'supplyProducts',\n 'terminateService'\n ]\n\n } else if(!_.every(props.nextRoutineCollections, 'closed') ){\n serviceNode = <UpdateCollectionDate {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'changeSpecification',\n 'bookAdhocCollection',\n 'supplyProducts',\n 'terminateService'\n ]\n } else {\n serviceNode = <Closed {...props} />\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'changeSpecification',\n 'updateCollectionDate',\n 'bookAdhocCollection',\n 'supplyProducts',\n 'terminateService',\n ]\n\n }\n\n if(_.isEmpty(props.nextRoutineCollections)) {\n menuItems = _.pull(menuItems, 'updateCollectionDate')\n }\n\n return(<ServiceHolder {...props} menuItems={menuItems}>\n {serviceNode}\n <MissedCollectionReportList serviceId={props.id}/>\n <EmergencyCollectionRequestList serviceId={props.id}/>\n <AdhocCollectionBookingList serviceId={props.id}/>\n <BinDeliveryList serviceId={props.id}/>\n <SupplyProductInstructionList supplyProductInstructions={props.supplyProductInstructions}/>\n </ServiceHolder>)\n}\n\n\nNhsEmergencyService.propTypes = {\n specification: PropTypes.shape({\n uuid: PropTypes.string,\n id: PropTypes.number,\n collectionGroups: PropTypes.object.isRequired\n }),\n currentSpecificationVersionUuid: PropTypes.string,\n id: PropTypes.number.isRequired,\n vendorAccount: PropTypes.shape({\n name: PropTypes.string.isRequired,\n }).isRequired,\n onMarkProcessed: PropTypes.func.isRequired\n}\n\nconst mapStateToProps = (state, {id}) => {\n const specification = getCurrentSpecification(id, state)\n\n return {\n processed: isServiceProcessed(id, state),\n resolved: isServiceResolved(id, state),\n closed: isServiceClosed(id, state),\n specification: specification,\n newServiceIssue: getNewServiceIssue(id, state),\n terminateServiceIssue: getTerminateServiceIssue(id, state),\n supplyProductInstructions: getInstructionsForServiceId(id, state),\n nextRoutineCollections: specification ? getNextRoutineCollections(specification.collectionGroups, state) : [],\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onMarkProcessed: (processed) => dispatch(markServiceProcessed(id, processed)),\n onCancelTermination: () => dispatch(terminateServiceIssuesActions.cancelTerminateService(id)),\n onCancelChangeSpec: () => dispatch(cancelChangeSpecification(id))\n }\n}\n\nNhsEmergencyService = connect(\n mapStateToProps,\n mapDispatchToProps\n)(NhsEmergencyService)\n\nexport default NhsEmergencyService\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\n//\nimport ServiceHolder from './ServiceHolder'\nimport OrderLink from '../OrderLink'\nimport IssueBox from '../IssueBox'\nimport IssueBoxSection from '../IssueBoxSection'\nimport NewServiceDeliveryOption from '../NewServiceDeliveryOption'\n\nimport CollectionPlanSelect from '../CollectionPlanSelect'\nimport CollectionPlan from '../CollectionPlan'\n\nimport UnitSpecificationList from '../UnitSpecificationList'\nimport EditSpecificationModal from '../EditSpecificationModal'\nimport NewServiceDeliveryDate from '../NewServiceDeliveryDate'\nimport SpecificationConfirmDate from '../SpecificationConfirmDate'\n\nimport UnknownSpecification from '../UnknownSpecification'\n\nimport CollectionDaysSelect from '../CollectionDaysSelect'\nimport CollectionDays from '../CollectionDays'\n\nimport FinalCollectionDate from '../FinalCollectionDate'\nimport FinalCollectionOption from '../FinalCollectionOption'\n\nimport NextCollectionDateSelect from '../NextCollectionDateSelect'\nimport NextCollectionDate from '../NextCollectionDate'\n\nimport MarkProcessedBtn from '../MarkProcessedBtn'\nimport ServiceActionMenu from '../ServiceActionMenu'\nimport MissedCollectionReportList from '../MissedCollectionReportList'\nimport AdhocCollectionBookingList from '../AdhocCollectionBookingList'\nimport BinDeliveryList from '../BinDeliveryList'\nimport SupplyProductInstructionList from '../SupplyProductInstructionList'\n\nimport { markServiceProcessed, cancelChangeSpecification } from '../../services/operations'\nimport { isServiceProcessed, isServiceResolved, isServiceClosed } from '../../services/selectors'\nimport { getCurrentSpecification } from '../../specifications/selectors'\nimport { getTerminateServiceIssue } from '../../terminateServiceIssues/selectors'\nimport { getNewServiceIssue } from '../../newServiceIssues/selectors'\nimport { getNextRoutineCollections } from '../../nextRoutineCollections/selectors'\nimport { getInstructionsForServiceId } from '../../supplyProductInstructions/selectors'\nimport terminateServiceIssuesActions from '../../terminateServiceIssues/actions'\nimport _ from 'lodashExtended';\n\n\nconst NewServiceIssue = ({title, id, processed, resolved, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n\n return(\n <IssueBox title='New Service Request'>\n\n <IssueBoxSection>\n\n <OrderLink {...newServiceIssue.order}/>\n\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <IssueBoxSection><div key={collectionGroup.uuid} className=\"mb5\">\n\n <div className=\"mb5\">\n Collected <CollectionPlanSelect collectionGroup={collectionGroup}/> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n\n { collectionGroup.hasRoutineCollections ?\n <div className=\"mb5\">\n <span>with the first collection on <NextCollectionDateSelect collectionGroup={collectionGroup}/></span>\n </div>\n : null }\n\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n\n </div></IssueBoxSection>\n\n }) :\n <UnknownSpecification serviceId={id}/>\n }\n\n <IssueBoxSection>\n <div className=\"mb5\">\n <NewServiceDeliveryOption newServiceIssue={newServiceIssue}/>\n </div>\n\n {!!newServiceIssue.noDelivery ? null :\n <div className=\"mb5\">Bin delivery confirmed for <NewServiceDeliveryDate newServiceIssue={newServiceIssue}/></div>\n }\n\n\n <div className=\"mb5 text-muted\">Vendor Account: {vendorAccount.name}</div>\n\n { specification ?\n <div className=\"mb5\">\n <SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate>\n </div> : null }\n\n </IssueBoxSection>\n\n </IssueBoxSection>\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst UpdateCollectionDate = ({title, id, processed, resolved, specification, onMarkProcessed}) => {\n return(\n <IssueBox title=\"Update Collection Date\">\n\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid} ><IssueBoxSection>\n\n <div className=\"mb5\">\n Collected <CollectionPlan collectionGroup={collectionGroup} /> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n <div style={{ marginLeft: 10 }}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n { collectionGroup.hasRoutineCollections ?\n <div className=\"mb5\">\n Next collection is <NextCollectionDateSelect collectionGroup={collectionGroup}/>\n </div>\n : null }\n\n </IssueBoxSection></div>\n })}\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst SpecificationChange = ({ title, id, processed, resolved, specification, onMarkProcessed, onCancelChangeSpec }) => {\n return(\n <IssueBox title=\"Change unit and or frequency specification issue\"\n handleDelete={ specification.id ? null : onCancelChangeSpec }>\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return (<div key={collectionGroup.uuid}><IssueBoxSection>\n <div className=\"mb5\">Collected<CollectionPlanSelect collectionGroup={collectionGroup}/>\n <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n <div className=\"mb5\"><SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate></div>\n\n { collectionGroup.hasRoutineCollections ? (\n <div className=\"mt10 text-muted\">\n Next collection on<NextCollectionDateSelect strongTarget={false} collectionGroup={collectionGroup}/>\n </div>\n ) : null }\n\n </IssueBoxSection></div>)\n })}\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst TerminateServiceIssue = ({title, id, processed, resolved, terminateServiceIssue, onCancelTermination, onMarkProcessed}) => {\n\n return(\n <IssueBox title='Terminate Service' handleDelete={ terminateServiceIssue.id ? null : onCancelTermination }>\n <div className=\"mb5\">\n <FinalCollectionOption terminateServiceIssue={terminateServiceIssue}/>\n {!!terminateServiceIssue.noFinalCollection ?\n <span>Service terminated, no final collection required</span>\n :\n <span>Final collection scheduled on <FinalCollectionDate terminateServiceIssue={terminateServiceIssue}></FinalCollectionDate></span>\n }\n </div>\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst Closed = ({title, id, processed, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n return(\n <IssueBox heading=\"Current Specification\" historical={true}>\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid}>\n <div className=\"mb5\">\n Collected <strong className=\"text-primary\"><CollectionPlan collectionGroup={collectionGroup} /></strong>\n <CollectionDays collectionGroup={collectionGroup}/>\n </div>\n\n\n <div className=\"mb5\">{ collectionGroup.hasRoutineCollections ? <span>Next collection on <span className=\"text-success\"><NextCollectionDate collectionGroup={collectionGroup}/></span></span> : \"Adhoc Collections - Non Booked\" }</div>\n\n <div className=\"mb10\">\n <div className=\"mb5 text-muted\">Unit Specification</div>\n <div className=\"mb5 ml10\">\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n </div>\n\n\n </div>\n }) : <UnknownSpecification serviceId={id}/>}\n </IssueBox>\n )\n}\n\nlet Covid19VaccinationService = (props) => {\n let serviceNode, menuItems\n if(props.terminateServiceIssue) {\n serviceNode = <TerminateServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'bookAdhocCollection',\n 'supplyProducts',\n ]\n } else if(props.newServiceIssue) {\n serviceNode = <NewServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'bookAdhocCollection',\n 'supplyProducts',\n 'terminateService'\n ]\n } else if(props.specification && !props.specification.closed){\n serviceNode = <SpecificationChange {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'bookAdhocCollection',\n 'supplyProducts',\n 'terminateService'\n ]\n\n } else if(!_.every(props.nextRoutineCollections, 'closed') ){\n serviceNode = <UpdateCollectionDate {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'changeSpecification',\n 'bookAdhocCollection',\n 'supplyProducts',\n 'terminateService'\n ]\n } else {\n serviceNode = <Closed {...props} />\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'changeSpecification',\n 'updateCollectionDate',\n 'bookAdhocCollection',\n 'supplyProducts',\n 'terminateService',\n ]\n\n }\n\n if(_.isEmpty(props.nextRoutineCollections)) {\n menuItems = _.pull(menuItems, 'updateCollectionDate')\n }\n\n return(<ServiceHolder {...props} menuItems={menuItems}>\n {serviceNode}\n <MissedCollectionReportList serviceId={props.id}/>\n <AdhocCollectionBookingList serviceId={props.id}/>\n <BinDeliveryList serviceId={props.id}/>\n <SupplyProductInstructionList supplyProductInstructions={props.supplyProductInstructions}/>\n </ServiceHolder>)\n}\n\n\nCovid19VaccinationService.propTypes = {\n specification: PropTypes.shape({\n uuid: PropTypes.string,\n id: PropTypes.number,\n collectionGroups: PropTypes.object.isRequired\n }),\n currentSpecificationVersionUuid: PropTypes.string,\n id: PropTypes.number.isRequired,\n vendorAccount: PropTypes.shape({\n name: PropTypes.string.isRequired,\n }).isRequired,\n onMarkProcessed: PropTypes.func.isRequired\n}\n\nconst mapStateToProps = (state, {id}) => {\n const specification = getCurrentSpecification(id, state)\n\n return {\n processed: isServiceProcessed(id, state),\n resolved: isServiceResolved(id, state),\n closed: isServiceClosed(id, state),\n specification: specification,\n newServiceIssue: getNewServiceIssue(id, state),\n terminateServiceIssue: getTerminateServiceIssue(id, state),\n supplyProductInstructions: getInstructionsForServiceId(id, state),\n nextRoutineCollections: specification ? getNextRoutineCollections(specification.collectionGroups, state) : [],\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onMarkProcessed: (processed) => dispatch(markServiceProcessed(id, processed)),\n onCancelTermination: () => dispatch(terminateServiceIssuesActions.cancelTerminateService(id)),\n onCancelChangeSpec: () => dispatch(cancelChangeSpecification(id))\n }\n}\n\nCovid19VaccinationService = connect(\n mapStateToProps,\n mapDispatchToProps\n)(Covid19VaccinationService)\n\nexport default Covid19VaccinationService\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\n//\nimport ServiceHolder from './ServiceHolder'\nimport OrderLink from '../OrderLink'\nimport IssueBox from '../IssueBox'\nimport IssueBoxSection from '../IssueBoxSection'\nimport NewServiceDeliveryOption from '../NewServiceDeliveryOption'\n\nimport CollectionPlanSelect from '../CollectionPlanSelect'\nimport CollectionPlan from '../CollectionPlan'\n\nimport UnitSpecificationList from '../UnitSpecificationList'\nimport EditSpecificationModal from '../EditSpecificationModal'\nimport NewServiceDeliveryDate from '../NewServiceDeliveryDate'\nimport SpecificationConfirmDate from '../SpecificationConfirmDate'\n\nimport UnknownSpecification from '../UnknownSpecification'\n\nimport CollectionDaysSelect from '../CollectionDaysSelect'\nimport CollectionDays from '../CollectionDays'\n\nimport FinalCollectionDate from '../FinalCollectionDate'\nimport FinalCollectionOption from '../FinalCollectionOption'\n\nimport NextCollectionDateSelect from '../NextCollectionDateSelect'\nimport NextCollectionDate from '../NextCollectionDate'\n\nimport MarkProcessedBtn from '../MarkProcessedBtn'\nimport ServiceActionMenu from '../ServiceActionMenu'\nimport MissedCollectionReportList from '../MissedCollectionReportList'\nimport AdhocCollectionBookingList from '../AdhocCollectionBookingList'\nimport BinDeliveryList from '../BinDeliveryList'\n\nimport { markServiceProcessed, cancelChangeSpecification } from '../../services/operations'\nimport terminateServiceIssuesActions from '../../terminateServiceIssues/actions'\nimport { isServiceProcessed, isServiceResolved, isServiceClosed } from '../../services/selectors'\nimport { getCurrentSpecification } from '../../specifications/selectors'\nimport { getTerminateServiceIssue } from '../../terminateServiceIssues/selectors'\nimport { getNewServiceIssue } from '../../newServiceIssues/selectors'\nimport { getNextRoutineCollections } from '../../nextRoutineCollections/selectors'\nimport _ from 'lodashExtended';\n\n\nconst NewServiceIssue = ({title, id, processed, resolved, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n\n return(\n <IssueBox title='New Service Request'>\n\n <IssueBoxSection>\n\n <OrderLink {...newServiceIssue.order}/>\n\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <IssueBoxSection><div key={collectionGroup.uuid} className=\"mb5\">\n\n <div className=\"mb5\">\n Collected <CollectionPlanSelect collectionGroup={collectionGroup}/> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n\n { collectionGroup.hasRoutineCollections ?\n <div className=\"mb5\">\n <span>with the first collection on <NextCollectionDateSelect collectionGroup={collectionGroup}/></span>\n </div>\n : null }\n\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n\n </div></IssueBoxSection>\n\n }) :\n <UnknownSpecification serviceId={id}/>\n }\n\n <IssueBoxSection>\n <div className=\"mb5\">\n <NewServiceDeliveryOption newServiceIssue={newServiceIssue}/>\n </div>\n\n {!!newServiceIssue.noDelivery ? null :\n <div className=\"mb5\">Bin delivery confirmed for <NewServiceDeliveryDate newServiceIssue={newServiceIssue}/></div>\n }\n\n\n <div className=\"mb5 text-muted\">Vendor Account: {vendorAccount.name}</div>\n\n { specification ?\n <div className=\"mb5\"><SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate></div> : null }\n\n </IssueBoxSection>\n\n </IssueBoxSection>\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst UpdateCollectionDate = ({title, id, processed, resolved, specification, onMarkProcessed}) => {\n return(\n <IssueBox title=\"Update Collection Date\">\n\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid} ><IssueBoxSection>\n\n <div className=\"mb5\">\n Collected <CollectionPlan collectionGroup={collectionGroup} /> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n\n { collectionGroup.hasRoutineCollections ?\n <div className=\"mb5\">\n Next collection is <NextCollectionDateSelect collectionGroup={collectionGroup}/>\n </div>\n : null }\n\n </IssueBoxSection></div>\n })}\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst SpecificationChange = ({ title, id, processed, resolved, specification, onMarkProcessed, onCancelChangeSpec }) => {\n return(\n <IssueBox title=\"Change unit and or frequency specification issue\"\n handleDelete={ specification.id ? null : onCancelChangeSpec }>\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return (<div key={collectionGroup.uuid}><IssueBoxSection>\n <div className=\"mb5\">Collected<CollectionPlanSelect collectionGroup={collectionGroup}/>\n <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n <div className=\"mb5\"><SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate></div>\n\n { collectionGroup.hasRoutineCollections ? (\n <div className=\"mt10 text-muted\">\n Next collection on<NextCollectionDateSelect strongTarget={false} collectionGroup={collectionGroup}/>\n </div>\n ) : null }\n\n </IssueBoxSection></div>)\n })}\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst TerminateServiceIssue = ({title, id, processed, resolved, terminateServiceIssue, onCancelTermination, onMarkProcessed}) => {\n\n return(\n <IssueBox title='Terminate Service' handleDelete={ terminateServiceIssue.id ? null : onCancelTermination }>\n <div className=\"mb5\">\n <FinalCollectionOption terminateServiceIssue={terminateServiceIssue}/>\n {!!terminateServiceIssue.noFinalCollection ?\n <span>Service terminated, no final collection required</span>\n :\n <span>Final collection scheduled on <FinalCollectionDate terminateServiceIssue={terminateServiceIssue}></FinalCollectionDate></span>\n }\n </div>\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst Closed = ({title, id, processed, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n return(\n <IssueBox heading=\"Current Specification\" historical={true}>\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid}>\n <div className=\"mb5\">\n Collected <strong className=\"text-primary\"><CollectionPlan collectionGroup={collectionGroup} /></strong>\n <CollectionDays collectionGroup={collectionGroup}/>\n </div>\n\n\n <div className=\"mb5\">{ collectionGroup.hasRoutineCollections ? <span>Next collection on <span className=\"text-success\"><NextCollectionDate collectionGroup={collectionGroup}/></span></span> : \"Adhoc Collections - Non Booked\" }</div>\n\n <div className=\"mb10\">\n <div className=\"mb5 text-muted\">Unit Specification</div>\n <div className=\"mb5 ml10\">\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n </div>\n\n\n </div>\n }) : <UnknownSpecification serviceId={id}/>}\n </IssueBox>\n )\n}\n\nlet NeedleExchangeService = (props) => {\n let serviceNode, menuItems\n if(props.terminateServiceIssue) {\n serviceNode = <TerminateServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'bookAdhocCollection'\n ]\n } else if(props.newServiceIssue) {\n serviceNode = <NewServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'terminateService'\n ]\n } else if(props.specification && !props.specification.closed){\n serviceNode = <SpecificationChange {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'bookAdhocCollection',\n 'terminateService'\n ]\n\n } else if(!_.every(props.nextRoutineCollections, 'closed') ){\n serviceNode = <UpdateCollectionDate {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'changeSpecification',\n 'bookAdhocCollection',\n 'terminateService'\n ]\n } else {\n serviceNode = <Closed {...props} />\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'changeSpecification',\n 'updateCollectionDate',\n 'bookAdhocCollection',\n 'terminateService',\n ]\n\n }\n\n if(_.isEmpty(props.nextRoutineCollections)) {\n menuItems = _.pull(menuItems, 'updateCollectionDate')\n }\n\n return(<ServiceHolder {...props} menuItems={menuItems}>\n {serviceNode}\n <MissedCollectionReportList serviceId={props.id}/>\n <AdhocCollectionBookingList serviceId={props.id}/>\n <BinDeliveryList serviceId={props.id}/>\n </ServiceHolder>)\n}\n\n\nNeedleExchangeService.propTypes = {\n specification: PropTypes.shape({\n uuid: PropTypes.string,\n id: PropTypes.number,\n collectionGroups: PropTypes.object.isRequired\n }),\n currentSpecificationVersionUuid: PropTypes.string,\n id: PropTypes.number.isRequired,\n vendorAccount: PropTypes.shape({\n name: PropTypes.string.isRequired,\n }).isRequired,\n onMarkProcessed: PropTypes.func.isRequired\n}\n\nconst mapStateToProps = (state, {id}) => {\n const specification = getCurrentSpecification(id, state)\n\n return {\n processed: isServiceProcessed(id, state),\n resolved: isServiceResolved(id, state),\n closed: isServiceClosed(id, state),\n specification: specification,\n newServiceIssue: getNewServiceIssue(id, state),\n terminateServiceIssue: getTerminateServiceIssue(id, state),\n nextRoutineCollections: specification ? getNextRoutineCollections(specification.collectionGroups, state) : [],\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onMarkProcessed: (processed) => dispatch(markServiceProcessed(id, processed)),\n onCancelTermination: () => dispatch(terminateServiceIssuesActions.cancelTerminateService(id)),\n onCancelChangeSpec: () => dispatch(cancelChangeSpecification(id))\n }\n}\n\nNeedleExchangeService = connect(\n mapStateToProps,\n mapDispatchToProps\n)(NeedleExchangeService)\n\nexport default NeedleExchangeService\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\n//\nimport ServiceHolder from './ServiceHolder'\nimport OrderLink from '../OrderLink'\nimport IssueBox from '../IssueBox'\nimport IssueBoxSection from '../IssueBoxSection'\nimport NewServiceDeliveryOption from '../NewServiceDeliveryOption'\n\nimport CollectionPlanSelect from '../CollectionPlanSelect'\nimport CollectionPlan from '../CollectionPlan'\n\nimport UnitSpecificationList from '../UnitSpecificationList'\nimport EditSpecificationModal from '../EditSpecificationModal'\nimport NewServiceDeliveryDate from '../NewServiceDeliveryDate'\nimport SpecificationConfirmDate from '../SpecificationConfirmDate'\n\nimport FinalCollectionDate from '../FinalCollectionDate'\nimport FinalCollectionOption from '../FinalCollectionOption'\n\nimport CollectionDaysSelect from '../CollectionDaysSelect'\nimport CollectionDays from '../CollectionDays'\n\nimport NextCollectionDateSelect from '../NextCollectionDateSelect'\nimport NextCollectionDate from '../NextCollectionDate'\n\nimport MarkProcessedBtn from '../MarkProcessedBtn'\nimport ServiceActionMenu from '../ServiceActionMenu'\nimport MissedCollectionReportList from '../MissedCollectionReportList'\nimport AdhocCollectionBookingList from '../AdhocCollectionBookingList'\nimport BinDeliveryList from '../BinDeliveryList'\nimport SupplyProductInstructionList from '../SupplyProductInstructionList'\n\nimport { getInstructionsForServiceId } from '../../supplyProductInstructions/selectors'\nimport { markServiceProcessed, cancelChangeSpecification } from '../../services/operations'\nimport terminateServiceIssuesActions from '../../terminateServiceIssues/actions'\nimport { isServiceProcessed, isServiceResolved, isServiceClosed } from '../../services/selectors'\nimport { getCurrentSpecification } from '../../specifications/selectors'\nimport { getTerminateServiceIssue } from '../../terminateServiceIssues/selectors'\nimport { getNewServiceIssue } from '../../newServiceIssues/selectors'\nimport { getNextRoutineCollection } from '../../nextRoutineCollections/selectors'\nimport _ from 'lodashExtended';\n\n\nconst NewServiceIssue = ({title, id, processed, resolved, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n\n return(\n <IssueBox title='New Service Request'>\n\n <IssueBoxSection>\n\n <OrderLink {...newServiceIssue.order}/>\n\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid} className=\"mb5\">\n\n <div className=\"mb5\">\n Collected <CollectionPlanSelect collectionGroup={collectionGroup}/> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n\n { collectionGroup.hasRoutineCollections ?\n <div className=\"mb5\">\n <span>with the first collection on <NextCollectionDateSelect collectionGroup={collectionGroup}/></span>\n </div>\n : null }\n\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n\n </div>\n\n }) :\n <UnknownSpecification serviceId={id}/>\n }\n\n\n <div className=\"mb5\">\n <NewServiceDeliveryOption newServiceIssue={newServiceIssue}/>\n </div>\n\n {!!newServiceIssue.noDelivery ? null :\n <div className=\"mb5\">Bin delivery confirmed for <NewServiceDeliveryDate newServiceIssue={newServiceIssue}/></div>\n }\n\n\n <div className=\"mb5 text-muted\">Vendor Account: {vendorAccount.name}</div>\n\n { specification ?\n <div className=\"mb5\">\n <SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate>\n </div> : null }\n\n </IssueBoxSection>\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst UpdateCollectionDate = ({title, id, processed, resolved, specification, onMarkProcessed}) => {\n return(\n <IssueBox title=\"Update Collection Date\">\n\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid} ><IssueBoxSection>\n\n <div className=\"mb5\">\n Collected <CollectionPlan collectionGroup={collectionGroup} /> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n <div style={{ marginLeft: 10 }}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n { collectionGroup.hasRoutineCollections ?\n <div className=\"mb5\">\n Next collection is <NextCollectionDateSelect collectionGroup={collectionGroup}/>\n </div>\n : null }\n\n </IssueBoxSection></div>\n })}\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst SpecificationChange = ({ title, id, processed, resolved, specification, onMarkProcessed, onCancelChangeSpec }) => {\n return(\n <IssueBox title=\"Change unit and or frequency specification issue\"\n handleDelete={ specification.id ? null : onCancelChangeSpec }>\n <IssueBoxSection>\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return (<div key={collectionGroup.uuid}><IssueBoxSection>\n <div className=\"mb5\">Collected<CollectionPlanSelect collectionGroup={collectionGroup}/>\n <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n <div className=\"mb5\"><SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate></div>\n\n { collectionGroup.hasRoutineCollections ? (\n <div className=\"mt10 text-muted\">\n Next collection on<NextCollectionDateSelect strongTarget={false} collectionGroup={collectionGroup}/>\n </div>\n ) : null }\n\n </IssueBoxSection></div>)\n })}\n </IssueBoxSection>\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst TerminateServiceIssue = ({title, id, processed, resolved, terminateServiceIssue, onCancelTermination, onMarkProcessed}) => {\n\n return(\n <IssueBox title='Terminate Service' handleDelete={ terminateServiceIssue.id ? null : onCancelTermination }>\n <div className=\"mb5\">\n <FinalCollectionOption terminateServiceIssue={terminateServiceIssue}/>\n {!!terminateServiceIssue.noFinalCollection ?\n <span>Service terminated, no final collection required</span>\n :\n <span>Final collection scheduled on <FinalCollectionDate terminateServiceIssue={terminateServiceIssue}></FinalCollectionDate></span>\n }\n </div>\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst Closed = ({title, id, processed, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n return(\n <IssueBox heading=\"Current Specification\" historical={true}>\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid}>\n <div className=\"mb5\">\n Collected <strong className=\"text-primary\"><CollectionPlan collectionGroup={collectionGroup} /></strong>\n <CollectionDays collectionGroup={collectionGroup}/>\n </div>\n\n\n <div className=\"mb5\">{ collectionGroup.hasRoutineCollections ? <span>Next collection on <span className=\"text-success\"><NextCollectionDate collectionGroup={collectionGroup}/></span></span> : \"Adhoc Collections - Non Booked\" }</div>\n\n <div className=\"mb10\">\n <div className=\"mb5 text-muted\">Unit Specification</div>\n <div className=\"mb5 ml10\">\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n </div>\n\n\n </div>\n }) : <UnknownSpecification serviceId={id}/>}\n </IssueBox>\n )\n}\n\n\n\nlet RegularGeneralAndRecyclingService = (props) => {\n let serviceNode, menuItems\n if(props.terminateServiceIssue) {\n serviceNode = <TerminateServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n ]\n } else if(props.newServiceIssue) {\n serviceNode = <NewServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'terminateService'\n ]\n } else if(!props.specification.closed){\n serviceNode = <SpecificationChange {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'bookAdhocCollection',\n 'terminateService'\n ]\n\n } else if(!_.every(props.nextRoutineCollections, 'closed') ){\n serviceNode = <UpdateCollectionDate {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'changeSpecification',\n 'bookAdhocCollection',\n 'terminateService'\n ]\n } else {\n serviceNode = <Closed {...props} />\n menuItems = [\n 'reportMissedCollection',\n 'changeSpecification',\n 'updateCollectionDate',\n 'bookAdhocCollection',\n 'terminateService',\n ]\n\n }\n\n return(<ServiceHolder {...props} menuItems={menuItems}>\n {serviceNode}\n <MissedCollectionReportList serviceId={props.id}/>\n <AdhocCollectionBookingList serviceId={props.id}/>\n <SupplyProductInstructionList supplyProductInstructions={props.supplyProductInstructions}/>\n </ServiceHolder>)\n}\n\nRegularGeneralAndRecyclingService.propTypes = {\n specification: PropTypes.shape({\n uuid: PropTypes.string,\n id: PropTypes.number,\n collectionGroups: PropTypes.object.isRequired\n }).isRequired,\n currentSpecificationVersionUuid: PropTypes.string,\n id: PropTypes.number.isRequired,\n vendorAccount: PropTypes.shape({\n name: PropTypes.string.isRequired,\n }).isRequired,\n onMarkProcessed: PropTypes.func.isRequired\n}\n\nconst mapStateToProps = (state, {id}) => {\n const specification = getCurrentSpecification(id, state)\n\n return {\n processed: isServiceProcessed(id, state),\n resolved: isServiceResolved(id, state),\n closed: isServiceClosed(id, state),\n specification: specification,\n supplyProductInstructions: getInstructionsForServiceId(id, state),\n newServiceIssue: getNewServiceIssue(id, state),\n terminateServiceIssue: getTerminateServiceIssue(id, state),\n nextRoutineCollections: _.map(specification.collectionGroups, (cg) => getNextRoutineCollection(cg, state)),\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onMarkProcessed: (processed) => dispatch(markServiceProcessed(id, processed)),\n onCancelTermination: () => dispatch(terminateServiceIssuesActions.cancelTerminateService(id)),\n onCancelChangeSpec: () => dispatch(cancelChangeSpecification(id))\n }\n}\n\nRegularGeneralAndRecyclingService = connect(\n mapStateToProps,\n mapDispatchToProps\n)(RegularGeneralAndRecyclingService)\n\nexport default RegularGeneralAndRecyclingService\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport actions from '../productSubscriptions/actions'\nimport { getProductSubscription } from '../productSubscriptions/selectors'\nimport { getService } from '../services/selectors'\nimport { StatelessModal, Btn } from 'sharedComponents'\nimport EditProductSpecifications from './EditProductSpecifications'\nimport ProductQuantitySelector from './ProductQuantitySelector'\nimport ProductSelector from './ProductSelector'\n\nvar {\n selectProductQuantity,\n addProduct,\n removeProduct,\n} = actions\n\nclass EditProductSubscriptionModal extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpen: false,\n };\n this.handleOpen = this.handleOpen.bind(this)\n this.handleClose = this.handleClose.bind(this)\n }\n\n handleOpen () { this.setState({ isOpen: true }) }\n handleClose () { this.setState({ isOpen: false }) }\n\n render() {\n var { productSpecifications, children, target, title, availableProductTypeIds, selectedProductTypeIds,\n onAdd, onRemove, onChangeQuantity } = this.props\n\n\n return (\n <StatelessModal title={title || \"Add products\"}\n target={<span className=\"link\">{children || target || \"Add Products\"}</span>}\n isOpen={this.state.isOpen}\n onCloseModal={this.handleClose}\n onOpenModal={this.handleOpen} >\n\n <div className=\"row\">\n <div className=\"col-sm-6\">\n <EditProductSpecifications productSpecifications={productSpecifications} onRemove={onRemove} onChangeQuantity={onChangeQuantity} />\n </div>\n <div className=\"col-sm-6\">\n <ProductSelector onAddProductType={onAdd} availableProductTypeIds={availableProductTypeIds} selectedProductTypeIds={selectedProductTypeIds}/>\n </div>\n </div>\n\n <div style={{ borderTop: '1px solid #e6e9ed', padding: '10px 10px 5px 10px', marginLeft: -10, marginRight: -10 }}>\n <div style={{ textAlign: 'right', paddingBottom: 5 }}>\n <Btn onClick={this.handleClose}>close</Btn>\n </div>\n </div>\n </StatelessModal>\n )\n }\n\n}\n\nEditProductSubscriptionModal.propTypes = {\n uuid: PropTypes.string.isRequired,\n target: PropTypes.node,\n title: PropTypes.node,\n availableProductTypeIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n selectedProductTypeIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n onChangeQuantity: PropTypes.func.isRequired,\n onRemove: PropTypes.func.isRequired,\n onAdd: PropTypes.func.isRequired,\n};\n\n\nconst mapStateToProps = (state, {uuid}) => {\n const { productSpecifications, serviceId } = getProductSubscription(uuid, state)\n const { availableProductTypeIds } = getService(serviceId, state)\n return {\n productSpecifications,\n availableProductTypeIds,\n selectedProductTypeIds: _.map(productSpecifications, 'productTypeId'),\n }\n}\n\nconst mapDispatchToProps = (dispatch, {uuid}) => {\n return {\n onChangeQuantity: (productTypeId, quantity) => { dispatch(selectProductQuantity(uuid, productTypeId, quantity)) },\n onRemove: (productTypeId) => { dispatch(removeProduct(uuid, productTypeId)) },\n onAdd: (productTypeId) => { dispatch(addProduct(uuid, productTypeId)) },\n }\n}\n\nEditProductSubscriptionModal = connect(\n mapStateToProps,\n mapDispatchToProps\n)(EditProductSubscriptionModal)\n\n\nexport default EditProductSubscriptionModal;\n\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport actions from '../productSubscriptions/actions'\nimport { DateSelect, NoWrap } from 'sharedComponents'\n\nlet ProductSubscriptionConfirmDate = ({ productSubscription, onChange, children }) => {\n\n var dateFormat = \"ddd, Do MMM YYYY\"\n var selectedDate = productSubscription.confirmedByVendorOn\n\n var dateSelectSubtitle = <span>The vendor has confirmed the subscription on <strong><NoWrap>{selectedDate ? moment(selectedDate).format(dateFormat) : '<select date>'}</NoWrap></strong></span>\n\n return <DateSelect title=\"Subscription Confirmed by vendor on\"\n subtitle={dateSelectSubtitle}\n required={true}\n selectedDate={selectedDate}\n minDate={new Date()}\n closeOnSelect={true}\n blankText={<strong><NoWrap><select date></NoWrap></strong>}\n onClearDate={() => onChange(null) }\n onSelectDate={onChange}>{children}</DateSelect>\n}\n\nconst mapStateToProps = (state, {productSubscription}) => {\n return {}\n}\n\nconst mapDispatchToProps = (dispatch, {productSubscription}) => {\n return {\n onChange: (date) => { dispatch(actions.setConfirmedByVendorOn(productSubscription.uuid, date)) },\n }\n}\n\nProductSubscriptionConfirmDate.propTypes = {\n productSubscription: PropTypes.shape({\n uuid: PropTypes.string.isRequired,\n confirmedByVendorOn: PropTypes.string,\n }).isRequired,\n onChange: PropTypes.func.isRequired\n}\n\nProductSubscriptionConfirmDate = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ProductSubscriptionConfirmDate)\n\nexport default ProductSubscriptionConfirmDate\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { getSpecification } from '../specifications/selectors'\nimport { getProductSubscription } from '../productSubscriptions/selectors'\nimport specificationsActions from '../specifications/actions'\nimport productSubscriptionsActions from '../productSubscriptions/actions'\nimport { DateSelect, NoWrap } from 'sharedComponents'\n\nlet VendorConfirmedOnDate = ({ confirmedByVendorOn, onChange, children }) => {\n\n var dateFormat = \"ddd, Do MMM YYYY\"\n var selectedDate = confirmedByVendorOn\n\n var dateSelectSubtitle = <span>The vendor has confirmed the specification on <strong><NoWrap>{selectedDate ? moment(selectedDate).format(dateFormat) : '<select date>'}</NoWrap></strong></span>\n\n return <DateSelect title=\"Specification Confirmed by vendor on\"\n subtitle={dateSelectSubtitle}\n required={true}\n selectedDate={selectedDate}\n maxDate={new Date()}\n closeOnSelect={true}\n blankText={<strong><NoWrap><select date></NoWrap></strong>}\n onClearDate={() => onChange(null) }\n onSelectDate={onChange}>{children}</DateSelect>\n}\n\n\n\nconst allEqual = arr => arr.every( v => v === arr[0] )\n\n\nconst mapStateToProps = (state, {specificationUuid, productSubscriptionUuid}) => {\n const specification = getSpecification(specificationUuid, state)\n const productSubscription = getProductSubscription(productSubscriptionUuid, state)\n const allConfirmedByVendorOn = _([specification, productSubscription]).compact().map('confirmedByVendorOn').value()\n const confirmedByVendorOn = allEqual(allConfirmedByVendorOn) ? allConfirmedByVendorOn[0] : null\n\n return {\n confirmedByVendorOn\n }\n\n}\n\nconst handleDateChange = (date, specificationUuid, productSubscriptionUuid) => (dispatch, getState) => {\n if(specificationUuid) { dispatch(specificationsActions.setConfirmedByVendorOn(specificationUuid, date)) }\n if(productSubscriptionUuid) { dispatch(productSubscriptionsActions.setConfirmedByVendorOn(productSubscriptionUuid, date)) }\n}\n\n\nconst mapDispatchToProps = (dispatch, {specificationUuid, productSubscriptionUuid}) => {\n return {\n onChange: (date) => { dispatch(handleDateChange(date, specificationUuid, productSubscriptionUuid)) },\n }\n}\n\nVendorConfirmedOnDate.propTypes = {\n specificationUuid: PropTypes.string,\n productSubscriptionUuid: PropTypes.string,\n confirmedByVendorOn: PropTypes.string,\n onChange: PropTypes.func.isRequired\n}\n\nVendorConfirmedOnDate = connect(\n mapStateToProps,\n mapDispatchToProps\n)(VendorConfirmedOnDate)\n\nexport default VendorConfirmedOnDate\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\n//\nimport ServiceHolder from './ServiceHolder'\nimport OrderLink from '../OrderLink'\nimport IssueBox from '../IssueBox'\nimport IssueBoxSection from '../IssueBoxSection'\nimport NewServiceDeliveryOption from '../NewServiceDeliveryOption'\n\nimport CollectionPlanSelect from '../CollectionPlanSelect'\nimport CollectionPlan from '../CollectionPlan'\n\nimport UnitSpecificationList from '../UnitSpecificationList'\nimport EditSpecificationModal from '../EditSpecificationModal'\nimport EditProductSubscriptionModal from '../EditProductSubscriptionModal'\nimport ProductSpecificationList from '../ProductSpecificationList'\nimport ProductSubscriptionConfirmDate from '../ProductSubscriptionConfirmDate'\nimport NewServiceDeliveryDate from '../NewServiceDeliveryDate'\nimport SpecificationConfirmDate from '../SpecificationConfirmDate'\nimport VendorConfirmedOnDate from '../VendorConfirmedOnDate'\n\nimport FinalCollectionDate from '../FinalCollectionDate'\nimport FinalCollectionOption from '../FinalCollectionOption'\n\nimport CollectionDaysSelect from '../CollectionDaysSelect'\nimport CollectionDays from '../CollectionDays'\n\nimport NextCollectionDateSelect from '../NextCollectionDateSelect'\nimport NextCollectionDate from '../NextCollectionDate'\n\nimport MarkProcessedBtn from '../MarkProcessedBtn'\nimport ServiceActionMenu from '../ServiceActionMenu'\nimport MissedCollectionReportList from '../MissedCollectionReportList'\n\nimport { markServiceProcessed, cancelChangeSpecification } from '../../services/operations'\nimport terminateServiceIssuesActions from '../../terminateServiceIssues/actions'\nimport { isServiceProcessed, isServiceResolved, isServiceClosed } from '../../services/selectors'\nimport { getCurrentSpecification } from '../../specifications/selectors'\nimport { getCurrentProductSubscription } from '../../productSubscriptions/selectors'\nimport { getTerminateServiceIssue } from '../../terminateServiceIssues/selectors'\nimport { getNewServiceIssue } from '../../newServiceIssues/selectors'\nimport { getNextRoutineCollection } from '../../nextRoutineCollections/selectors'\nimport _ from 'lodashExtended';\n\n\nconst NewServiceIssue = ({title, id, processed, resolved, vendorAccount, specification, productSubscription, newServiceIssue, onMarkProcessed}) => {\n\n var productSubscriptionUuid, productSpecifications\n if(productSubscription) {\n var { uuid: productSubscriptionUuid, productSpecifications } = productSubscription\n }\n\n return(\n <IssueBox title='New Service Request'>\n\n <IssueBoxSection>\n\n <OrderLink {...newServiceIssue.order}/>\n\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <IssueBoxSection><div key={collectionGroup.uuid} className=\"mb5\">\n\n <div className=\"mb5\">\n Collected <CollectionPlanSelect collectionGroup={collectionGroup}/> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n\n { collectionGroup.hasRoutineCollections ?\n <div className=\"mb5\">\n <span>with the first collection on <NextCollectionDateSelect collectionGroup={collectionGroup}/></span>\n </div>\n : null }\n\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n\n </div></IssueBoxSection>\n\n }) :\n <UnknownSpecification serviceId={id}/>\n }\n\n <IssueBoxSection>\n <div className=\"mb5\">\n <NewServiceDeliveryOption newServiceIssue={newServiceIssue}/>\n </div>\n\n {!!newServiceIssue.noDelivery ? null :\n <div className=\"mb5\">Bin delivery confirmed for <NewServiceDeliveryDate newServiceIssue={newServiceIssue}/></div>\n }\n\n\n <div className=\"mb5 text-muted\">Vendor Account: {vendorAccount.name}</div>\n\n { specification ?\n <div className=\"mb5\">\n <SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate>\n </div> : null }\n\n </IssueBoxSection>\n\n </IssueBoxSection>\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n\n\n </IssueBox>\n )\n\n}\n\nconst UpdateCollectionDate = ({title, id, processed, resolved, specification, onMarkProcessed}) => {\n return(\n <IssueBox title=\"Update Collection Date\">\n\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid} ><IssueBoxSection>\n\n <div className=\"mb5\">\n Collected <CollectionPlan collectionGroup={collectionGroup} /> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n <div style={{ marginLeft: 10 }}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n { collectionGroup.hasRoutineCollections ?\n <div className=\"mb5\">\n Next collection is <NextCollectionDateSelect collectionGroup={collectionGroup}/>\n </div>\n : null }\n\n </IssueBoxSection></div>\n })}\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst SpecificationChange = ({ title, id, processed, resolved, specification, onMarkProcessed, onCancelChangeSpec }) => {\n return(\n <IssueBox title=\"Change unit and or frequency specification issue\"\n handleDelete={ specification.id ? null : onCancelChangeSpec }>\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return (<div key={collectionGroup.uuid}><IssueBoxSection>\n <div className=\"mb5\">Collected<CollectionPlanSelect collectionGroup={collectionGroup}/>\n <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n <div className=\"mb5\"><SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate></div>\n\n { collectionGroup.hasRoutineCollections ? (\n <div className=\"mt10 text-muted\">\n Next collection on<NextCollectionDateSelect strongTarget={false} collectionGroup={collectionGroup}/>\n </div>\n ) : null }\n\n </IssueBoxSection></div>)\n })}\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst TerminateServiceIssue = ({title, id, processed, resolved, terminateServiceIssue, onCancelTermination, onMarkProcessed}) => {\n\n return(\n <IssueBox title='Terminate Service' handleDelete={ terminateServiceIssue.id ? null : onCancelTermination }>\n <div className=\"mb5\">\n <FinalCollectionOption terminateServiceIssue={terminateServiceIssue}/>\n {!!terminateServiceIssue.noFinalCollection ?\n <span>Service terminated, no final collection required</span>\n :\n <span>Final collection scheduled on <FinalCollectionDate terminateServiceIssue={terminateServiceIssue}></FinalCollectionDate></span>\n }\n </div>\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst Closed = ({title, id, processed, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n return(\n <IssueBox heading=\"Current Specification\" historical={true}>\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid}>\n <div className=\"mb5\">\n Collected <strong className=\"text-primary\"><CollectionPlan collectionGroup={collectionGroup} /></strong>\n <CollectionDays collectionGroup={collectionGroup}/>\n </div>\n\n\n <div className=\"mb5\">{ collectionGroup.hasRoutineCollections ? <span>Next collection on <span className=\"text-success\"><NextCollectionDate collectionGroup={collectionGroup}/></span></span> : \"Adhoc Collections - Non Booked\" }</div>\n\n <div className=\"mb10\">\n <div className=\"mb5 text-muted\">Unit Specification</div>\n <div className=\"mb5 ml10\">\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n </div>\n\n\n </div>\n }) : <UnknownSpecification serviceId={id}/>}\n </IssueBox>\n )\n}\n\nconst SpecificationAndSubscriptionChange = ({title, id, processed, resolved, productSubscription, specification, onMarkProcessed}) => {\n return(\n <IssueBox title='Change Specification and Subscription'>\n <IssueBoxSection>\n <div>Dear Vendor</div>\n <div>Please change the specification to the following:</div>\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid} >\n Collect <CollectionPlanSelect collectionGroup={collectionGroup}/>\n <EditSpecificationModal specificationUuid={specification.uuid} >\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n })}\n {\n productSubscription ?\n <div>\n <div>Service monthly the following</div>\n <div>\n <EditProductSubscriptionModal uuid={productSubscription.uuid}>\n <ProductSpecificationList productSpecifications={productSubscription.productSpecifications}/>\n </EditProductSubscriptionModal>\n </div>\n </div> : null\n }\n <div>Please <VendorConfirmedOnDate productSubscriptionUuid={productSubscription.uuid} specificationUuid={specification.uuid}>confirm this has been processed</VendorConfirmedOnDate> as well as the next collection date{_.keys(specification.collectionGroups).length > 1 ? 's' : ''}</div>\n </IssueBoxSection>\n <IssueBoxSection>\n <div>Dear Client</div>\n <div>Your service specification has been amended: </div>\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid} >\n Collected <CollectionPlanSelect collectionGroup={collectionGroup}/> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n with the next collection on <NextCollectionDateSelect collectionGroup={collectionGroup}/>\n <EditSpecificationModal specificationUuid={specification.uuid} >\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n })}\n {\n productSubscription ?\n <div>\n <div>You will also now have the following serviced monthly:</div>\n <div>\n <EditProductSubscriptionModal uuid={productSubscription.uuid}>\n <ProductSpecificationList productSpecifications={productSubscription.productSpecifications}/>\n </EditProductSubscriptionModal>\n </div>\n\n </div> : null\n }\n </IssueBoxSection>\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst SubscriptionChange = ({title, id, processed, resolved, productSubscription, specification, onMarkProcessed}) => {\n return(\n <IssueBox title='Change Subsription'>\n <IssueBoxSection>\n <div>Dear Vendor</div>\n <div>\n <div>Please change this locations service to be</div>\n <div>\n <EditProductSubscriptionModal uuid={productSubscription.uuid}>\n <ProductSpecificationList productSpecifications={productSubscription.productSpecifications}/>\n </EditProductSubscriptionModal>\n </div>\n </div>\n <div>and continue to service of:</div>\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid} >\n Collect <CollectionPlan collectionGroup={collectionGroup}/>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n })}\n <div>Please <ProductSubscriptionConfirmDate productSubscription={productSubscription}>confirm this has been processed</ProductSubscriptionConfirmDate></div>\n </IssueBoxSection>\n <IssueBoxSection>\n <div>Dear Client</div>\n\n <div>\n <div>Your new monthly service will be:</div>\n <div>\n <EditProductSubscriptionModal uuid={productSubscription.uuid}>\n <ProductSpecificationList productSpecifications={productSubscription.productSpecifications}/>\n </EditProductSubscriptionModal>\n </div>\n\n </div>\n <div>Your other collections will continue as: </div>\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid} >\n Collected <CollectionPlan collectionGroup={collectionGroup}/> <CollectionDays collectionGroup={collectionGroup}/>\n with the next collection on <NextCollectionDate collectionGroup={collectionGroup}/>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n })}\n </IssueBoxSection>\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\n\n\nlet WashroomService = (props) => {\n let serviceNode, menuItems\n\n if(props.terminateServiceIssue) {\n serviceNode = <TerminateServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n ]\n } else if(props.newServiceIssue) {\n serviceNode = <NewServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'terminateService'\n ]\n } else if(!props.specification.closed && (props.productSubscription && !props.productSubscription.closed)){\n serviceNode = <SpecificationAndSubscriptionChange {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'updateCollectionDate',\n 'terminateService'\n ]\n } else if(!props.specification.closed){\n serviceNode = <SpecificationChange {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'changeProductSubscription',\n 'terminateService'\n ]\n } else if(props.productSubscription && !props.productSubscription.closed){\n serviceNode = <SubscriptionChange {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'changeSpecification',\n 'terminateService'\n ]\n } else if(!_.every(props.nextRoutineCollections, 'closed') ){\n serviceNode = <UpdateCollectionDate {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'changeSpecification',\n 'changeProductSubscription',\n 'terminateService'\n ]\n } else {\n serviceNode = <Closed {...props} />\n menuItems = [\n 'reportMissedCollection',\n 'changeSpecification',\n 'changeProductSubscription',\n 'updateCollectionDate',\n 'terminateService'\n ]\n }\n\n\n return(<ServiceHolder {...props} menuItems={menuItems}>\n {serviceNode}\n <MissedCollectionReportList serviceId={props.id}/>\n </ServiceHolder>)\n\n}\n\nWashroomService.propTypes = {\n specification: PropTypes.shape({\n uuid: PropTypes.string,\n id: PropTypes.number,\n collectionGroups: PropTypes.object.isRequired\n }).isRequired,\n productSubscription: PropTypes.shape({\n uuid: PropTypes.string,\n productSpecifications: PropTypes.object.isRequired\n }),\n currentSpecificationVersionUuid: PropTypes.string,\n id: PropTypes.number.isRequired,\n vendorAccount: PropTypes.shape({\n name: PropTypes.string.isRequired,\n }).isRequired,\n onMarkProcessed: PropTypes.func.isRequired\n}\n\nconst mapStateToProps = (state, {id}) => {\n const specification = getCurrentSpecification(id, state)\n const productSubscription = getCurrentProductSubscription(id, state)\n\n return {\n processed: isServiceProcessed(id, state),\n resolved: isServiceResolved(id, state),\n closed: isServiceClosed(id, state),\n specification,\n productSubscription,\n newServiceIssue: getNewServiceIssue(id, state),\n terminateServiceIssue: getTerminateServiceIssue(id, state),\n nextRoutineCollections: _.map(specification.collectionGroups, (cg) => getNextRoutineCollection(cg, state)),\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onMarkProcessed: (processed) => dispatch(markServiceProcessed(id, processed)),\n onCancelTermination: () => dispatch(terminateServiceIssuesActions.cancelTerminateService(id)),\n onCancelChangeSpec: () => dispatch(cancelChangeSpecification(id))\n }\n}\n\nWashroomService = connect(\n mapStateToProps,\n mapDispatchToProps\n)(WashroomService)\n\nexport default WashroomService\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport actions from '../newServiceIssues/actions'\nimport { DateSelect, NoWrap } from 'sharedComponents'\n\nlet NewServiceStartDate = ({ newServiceIssue, onChange, children }) => {\n\n var dateFormat = \"ddd, Do MMM YYYY\"\n var selectedDate = newServiceIssue.confirmedToStartDate\n\n var dateSelectSubtitle = <span>The service will commence on <strong><NoWrap>{selectedDate ? moment(selectedDate).format(dateFormat) : '<select date>'}</NoWrap></strong></span>\n\n return <DateSelect title=\"Service Start Date\"\n subtitle={dateSelectSubtitle}\n required={true}\n selectedDate={selectedDate}\n minDate={new Date()}\n closeOnSelect={true}\n blankText={'select'}\n strongTarget={true}\n onClearDate={() => onChange(null) }\n onSelectDate={onChange}>{children}</DateSelect>\n}\n\nconst mapStateToProps = (state, {collectionGroup}) => {\n return {}\n}\n\nconst mapDispatchToProps = (dispatch, {newServiceIssue}) => {\n return {\n onChange: (date) => { dispatch(actions.setStartDate(newServiceIssue.serviceId, date)) },\n }\n}\n\nNewServiceStartDate.propTypes = {\n newServiceIssue: PropTypes.shape({\n serviceId: PropTypes.number.isRequired,\n confirmedToStartDate: PropTypes.string,\n }).isRequired,\n onChange: PropTypes.func.isRequired\n}\n\nNewServiceStartDate = connect(\n mapStateToProps,\n mapDispatchToProps\n)(NewServiceStartDate)\n\nexport default NewServiceStartDate\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport ServiceHolder from './ServiceHolder'\nimport IssueBox from '../IssueBox'\nimport IssueBoxSection from '../IssueBoxSection'\nimport { markServiceProcessed } from '../../services/operations'\nimport { isServiceProcessed, isServiceResolved, isServiceClosed } from '../../services/selectors'\nimport { getNewServiceIssue } from '../../newServiceIssues/selectors'\nimport { getFixedCollectionTime } from '../../fixedCollectionTimes/selectors'\nimport { getTerminateServiceIssue } from '../../terminateServiceIssues/selectors'\n\nimport {\n getInstructionsForServiceId,\n getNewServiceSupplyInstruction,\n getNotNewServiceSupplyInstructions\n} from '../../supplyProductInstructions/selectors'\n\nimport FinalCollectionDate from '../FinalCollectionDate'\nimport FinalCollectionOption from '../FinalCollectionOption'\n\nimport MissedCollectionReportList from '../MissedCollectionReportList'\nimport SupplyProductInstructionList from '../SupplyProductInstructionList'\nimport SupplyProductInvoiceLink from '../SupplyProductInvoiceLink'\nimport MarkProcessedBtn from '../MarkProcessedBtn'\nimport NewServiceStartDate from '../NewServiceStartDate'\nimport SupplyProductConfirmDate from '../SupplyProductConfirmDate'\nimport OrderLink from '../OrderLink'\nimport ServiceActionMenu from '../ServiceActionMenu'\nimport ProductSpecificationList from '../ProductSpecificationList'\nimport EditSupplyProductInstructionModal from '../EditSupplyProductInstructionModal'\nimport EditFixedCollectionTime from '../EditFixedCollectionTime'\nimport FixedCollectionTime from '../FixedCollectionTime'\n\nconst NewServiceIssue = ({title, id, newServiceSupplyInstruction, fixedCollectionTime,\n restOfSupplyProductInstructions, processed, resolved,\n supplyProductInstructions, vendorAccount,\n newServiceIssue, onMarkProcessed}) => {\n return(\n <div>\n\n\n <IssueBox title=\"New Service Request\">\n\n <IssueBoxSection>\n\n <div className=\"mb5\">\n <div className=\"pull-right\">\n <SupplyProductInvoiceLink {...newServiceSupplyInstruction}/>\n </div>\n <OrderLink {...newServiceIssue.order}/>\n </div>\n\n\n <div className=\"mb5\">\n <div className=\"mb3\">Products:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSupplyProductInstructionModal id={newServiceSupplyInstruction.id}>\n <ProductSpecificationList productSpecifications={newServiceSupplyInstruction.productSpecifications}/>\n </EditSupplyProductInstructionModal>\n </div>\n </div>\n\n\n <div className=\"mb5\">\n <div className=\"mb3\">Collection days and times: </div>\n <EditFixedCollectionTime serviceId={id}/>\n </div>\n <div className=\"mb5\">\n First collection <NewServiceStartDate newServiceIssue={newServiceIssue}/>\n </div>\n\n <div className=\"mb5 text-muted\">Vendor Account: {vendorAccount.name}</div>\n\n <div className=\"mb5\">\n Confirmed by vendor on <SupplyProductConfirmDate id={newServiceSupplyInstruction.id}/>\n </div>\n\n </IssueBoxSection>\n\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n </IssueBoxSection>\n\n </IssueBox>\n <SupplyProductInstructionList supplyProductInstructions={restOfSupplyProductInstructions}/>\n\n </div>\n )\n\n}\n\nconst TerminateServiceIssue = ({title, id, processed, resolved, terminateServiceIssue, onCancelTermination, onMarkProcessed}) => {\n\n return(\n <IssueBox title='Terminate Service' handleDelete={onCancelTermination}>\n\n <div className=\"mb5\">\n <FinalCollectionOption terminateServiceIssue={terminateServiceIssue}/>\n\n {!!terminateServiceIssue.noFinalCollection ?\n <span>Service terminated, no final collection required</span>\n :\n <span>Final collection scheduled on <FinalCollectionDate terminateServiceIssue={terminateServiceIssue}></FinalCollectionDate></span>\n }\n </div>\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst Open = ({title, id, processed, resolved, supplyProductInstructions, onMarkProcessed}) => {\n return(<div>\n <IssueBox>\n <IssueBoxSection>\n Waste will be collected <EditFixedCollectionTime serviceId={id}/>\n </IssueBoxSection>\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n <SupplyProductInstructionList supplyProductInstructions={supplyProductInstructions}/>\n </div>)\n}\n\n\nconst Closed = ({title, id, processed, supplyProductInstructions, onMarkProcessed}) => {\n return(<div>\n <IssueBox heading=\"Current Specification\" historical={true}>\n <div className=\"mb10\">\n Waste collected <EditFixedCollectionTime serviceId={id}/>\n </div>\n </IssueBox>\n <SupplyProductInstructionList supplyProductInstructions={supplyProductInstructions}/>\n </div>)\n}\n\n\n\nlet PrePaidGeneralAndRecyclingService = (props) => {\n let serviceNode, menuItems\n\n menuItems = [\n 'reportMissedCollection',\n 'terminateService'\n ]\n if(props.terminateServiceIssue) {\n serviceNode = <TerminateServiceIssue {...props}/>\n } else if(props.newServiceIssue) {\n serviceNode = <NewServiceIssue {...props}/>\n } else if(!props.closed){\n serviceNode = <Open {...props} />\n } else {\n serviceNode = <Closed {...props} />\n }\n\n return(<ServiceHolder {...props} menuItems={menuItems}>\n {serviceNode}\n <MissedCollectionReportList serviceId={props.id}/>\n </ServiceHolder>)\n}\n\nPrePaidGeneralAndRecyclingService.propTypes = {\n\n}\n\nconst mapStateToProps = (state, {id}) => {\n return {\n processed: isServiceProcessed(id, state),\n resolved: isServiceResolved(id, state),\n closed: isServiceClosed(id, state),\n newServiceIssue: getNewServiceIssue(id, state),\n terminateServiceIssue: getTerminateServiceIssue(id, state),\n supplyProductInstructions: getInstructionsForServiceId(id, state),\n restOfSupplyProductInstructions: getNotNewServiceSupplyInstructions(id, state),\n newServiceSupplyInstruction: getNewServiceSupplyInstruction(id, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onMarkProcessed: (processed) => dispatch(markServiceProcessed(id, processed)),\n }\n}\n\nPrePaidGeneralAndRecyclingService = connect(\n mapStateToProps,\n mapDispatchToProps\n)(PrePaidGeneralAndRecyclingService)\n\nexport default PrePaidGeneralAndRecyclingService\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\n//\nimport ServiceHolder from './ServiceHolder'\nimport OrderLink from '../OrderLink'\nimport IssueBox from '../IssueBox'\nimport IssueBoxSection from '../IssueBoxSection'\nimport NewServiceDeliveryOption from '../NewServiceDeliveryOption'\n\nimport CollectionPlanSelect from '../CollectionPlanSelect'\nimport CollectionPlan from '../CollectionPlan'\n\nimport UnitSpecificationList from '../UnitSpecificationList'\nimport EditSpecificationModal from '../EditSpecificationModal'\nimport NewServiceDeliveryDate from '../NewServiceDeliveryDate'\nimport SpecificationConfirmDate from '../SpecificationConfirmDate'\n\nimport FinalCollectionDate from '../FinalCollectionDate'\nimport FinalCollectionOption from '../FinalCollectionOption'\n\nimport CollectionDaysSelect from '../CollectionDaysSelect'\nimport CollectionDays from '../CollectionDays'\n\nimport NextCollectionDateSelect from '../NextCollectionDateSelect'\nimport NextCollectionDate from '../NextCollectionDate'\n\nimport MarkProcessedBtn from '../MarkProcessedBtn'\nimport ServiceActionMenu from '../ServiceActionMenu'\nimport MissedCollectionReportList from '../MissedCollectionReportList'\nimport AdhocCollectionBookingList from '../AdhocCollectionBookingList'\nimport BinDeliveryList from '../BinDeliveryList'\nimport SupplyProductInstructionList from '../SupplyProductInstructionList'\n\nimport { getInstructionsForServiceId } from '../../supplyProductInstructions/selectors'\nimport { markServiceProcessed, cancelChangeSpecification } from '../../services/operations'\nimport terminateServiceIssuesActions from '../../terminateServiceIssues/actions'\nimport { isServiceProcessed, isServiceResolved, isServiceClosed } from '../../services/selectors'\nimport { getCurrentSpecification } from '../../specifications/selectors'\nimport { getTerminateServiceIssue } from '../../terminateServiceIssues/selectors'\nimport { getNewServiceIssue } from '../../newServiceIssues/selectors'\nimport { getNextRoutineCollection } from '../../nextRoutineCollections/selectors'\nimport _ from 'lodashExtended';\n\n\nconst NewServiceIssue = ({title, id, processed, resolved, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n\n return(\n <IssueBox title='New Service Request'>\n\n <IssueBoxSection>\n\n <OrderLink {...newServiceIssue.order}/>\n\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <IssueBoxSection><div key={collectionGroup.uuid} className=\"mb5\">\n\n <div className=\"mb5\">\n Collected <CollectionPlanSelect collectionGroup={collectionGroup}/> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n\n { collectionGroup.hasRoutineCollections ?\n <div className=\"mb5\">\n <span>with the first collection on <NextCollectionDateSelect collectionGroup={collectionGroup}/></span>\n </div>\n : null }\n\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n\n </div></IssueBoxSection>\n\n }) :\n <UnknownSpecification serviceId={id}/>\n }\n\n <IssueBoxSection>\n <div className=\"mb5\">\n <NewServiceDeliveryOption newServiceIssue={newServiceIssue}/>\n </div>\n\n {!!newServiceIssue.noDelivery ? null :\n <div className=\"mb5\">Bin delivery confirmed for <NewServiceDeliveryDate newServiceIssue={newServiceIssue}/></div>\n }\n\n\n <div className=\"mb5 text-muted\">Vendor Account: {vendorAccount.name}</div>\n\n { specification ?\n <div className=\"mb5\">\n <SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate>\n </div> : null }\n\n </IssueBoxSection>\n\n </IssueBoxSection>\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst UpdateCollectionDate = ({title, id, processed, resolved, specification, onMarkProcessed}) => {\n return(\n <IssueBox title=\"Update Collection Date\">\n\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid} ><IssueBoxSection>\n\n <div className=\"mb5\">\n Collected <CollectionPlan collectionGroup={collectionGroup} /> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n <div style={{ marginLeft: 10 }}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n { collectionGroup.hasRoutineCollections ?\n <div className=\"mb5\">\n Next collection is <NextCollectionDateSelect collectionGroup={collectionGroup}/>\n </div>\n : null }\n\n </IssueBoxSection></div>\n })}\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst SpecificationChange = ({ title, id, processed, resolved, specification, onMarkProcessed, onCancelChangeSpec }) => {\n return(\n <IssueBox title=\"Change unit and or frequency specification issue\"\n handleDelete={ specification.id ? null : onCancelChangeSpec }>\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return (<div key={collectionGroup.uuid}><IssueBoxSection>\n <div className=\"mb5\">Collected<CollectionPlanSelect collectionGroup={collectionGroup}/>\n <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n <div className=\"mb5\"><SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate></div>\n\n { collectionGroup.hasRoutineCollections ? (\n <div className=\"mt10 text-muted\">\n Next collection on<NextCollectionDateSelect strongTarget={false} collectionGroup={collectionGroup}/>\n </div>\n ) : null }\n\n </IssueBoxSection></div>)\n })}\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst TerminateServiceIssue = ({title, id, processed, resolved, terminateServiceIssue, onCancelTermination, onMarkProcessed}) => {\n\n return(\n <IssueBox title='Terminate Service' handleDelete={ terminateServiceIssue.id ? null : onCancelTermination }>\n <div className=\"mb5\">\n <FinalCollectionOption terminateServiceIssue={terminateServiceIssue}/>\n\n {!!terminateServiceIssue.noFinalCollection ?\n <span>Service terminated, no final collection required</span>\n :\n <span>Final collection scheduled on <FinalCollectionDate terminateServiceIssue={terminateServiceIssue}></FinalCollectionDate></span>\n }\n </div>\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst Closed = ({title, id, processed, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n return(\n <IssueBox heading=\"Current Specification\" historical={true}>\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid}>\n <div className=\"mb5\">\n Collected <strong className=\"text-primary\"><CollectionPlan collectionGroup={collectionGroup} /></strong>\n <CollectionDays collectionGroup={collectionGroup}/>\n </div>\n\n\n <div className=\"mb5\">{ collectionGroup.hasRoutineCollections ? <span>Next collection on <span className=\"text-success\"><NextCollectionDate collectionGroup={collectionGroup}/></span></span> : \"Adhoc Collections - Non Booked\" }</div>\n\n <div className=\"mb10\">\n <div className=\"mb5 text-muted\">Unit Specification</div>\n <div className=\"mb5 ml10\">\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n </div>\n\n\n </div>\n }) : <UnknownSpecification serviceId={id}/>}\n </IssueBox>\n )\n}\n\n\nlet RegularClinicalService = (props) => {\n let serviceNode, menuItems\n if(props.terminateServiceIssue) {\n serviceNode = <TerminateServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'bookAdhocCollection'\n ]\n } else if(props.newServiceIssue) {\n serviceNode = <NewServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'terminateService'\n ]\n } else if(!props.specification.closed){\n serviceNode = <SpecificationChange {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'bookAdhocCollection',\n 'terminateService'\n ]\n\n } else if(!_.every(props.nextRoutineCollections, 'closed') ){\n serviceNode = <UpdateCollectionDate {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'changeSpecification',\n 'bookAdhocCollection',\n 'terminateService'\n ]\n } else {\n serviceNode = <Closed {...props} />\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'changeSpecification',\n 'updateCollectionDate',\n 'bookAdhocCollection',\n 'terminateService'\n ]\n\n }\n\n return(<ServiceHolder {...props} menuItems={menuItems}>\n {serviceNode}\n <MissedCollectionReportList serviceId={props.id}/>\n <AdhocCollectionBookingList serviceId={props.id}/>\n <BinDeliveryList serviceId={props.id}/>\n <SupplyProductInstructionList supplyProductInstructions={props.supplyProductInstructions}/>\n\n </ServiceHolder>)\n}\n\nRegularClinicalService.propTypes = {\n specification: PropTypes.shape({\n uuid: PropTypes.string,\n id: PropTypes.number,\n collectionGroups: PropTypes.object.isRequired\n }).isRequired,\n currentSpecificationVersionUuid: PropTypes.string,\n id: PropTypes.number.isRequired,\n vendorAccount: PropTypes.shape({\n name: PropTypes.string.isRequired,\n }).isRequired,\n onMarkProcessed: PropTypes.func.isRequired\n}\n\nconst mapStateToProps = (state, {id}) => {\n const specification = getCurrentSpecification(id, state)\n\n return {\n processed: isServiceProcessed(id, state),\n resolved: isServiceResolved(id, state),\n closed: isServiceClosed(id, state),\n specification: specification,\n supplyProductInstructions: getInstructionsForServiceId(id, state),\n newServiceIssue: getNewServiceIssue(id, state),\n terminateServiceIssue: getTerminateServiceIssue(id, state),\n nextRoutineCollections: _.map(specification.collectionGroups, (cg) => getNextRoutineCollection(cg, state)),\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onMarkProcessed: (processed) => dispatch(markServiceProcessed(id, processed)),\n onCancelTermination: () => dispatch(terminateServiceIssuesActions.cancelTerminateService(id)),\n onCancelChangeSpec: () => dispatch(cancelChangeSpecification(id))\n }\n}\n\nRegularClinicalService = connect(\n mapStateToProps,\n mapDispatchToProps\n)(RegularClinicalService)\n\nexport default RegularClinicalService\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\n//\nimport ServiceHolder from './ServiceHolder'\nimport OrderLink from '../OrderLink'\nimport IssueBox from '../IssueBox'\nimport IssueBoxSection from '../IssueBoxSection'\nimport NewServiceDeliveryOption from '../NewServiceDeliveryOption'\n\nimport UnitSpecificationList from '../UnitSpecificationList'\nimport EditSpecificationModal from '../EditSpecificationModal'\nimport NewServiceDeliveryDate from '../NewServiceDeliveryDate'\nimport SpecificationConfirmDate from '../SpecificationConfirmDate'\n\nimport FinalCollectionDate from '../FinalCollectionDate'\nimport FinalCollectionOption from '../FinalCollectionOption'\n\nimport MarkProcessedBtn from '../MarkProcessedBtn'\nimport ServiceActionMenu from '../ServiceActionMenu'\nimport MissedCollectionReportList from '../MissedCollectionReportList'\nimport AdhocCollectionBookingList from '../AdhocCollectionBookingList'\nimport BinDeliveryList from '../BinDeliveryList'\n\nimport { markServiceProcessed, cancelChangeSpecification } from '../../services/operations'\nimport terminateServiceIssuesActions from '../../terminateServiceIssues/actions'\nimport { isServiceProcessed, isServiceResolved, isServiceClosed } from '../../services/selectors'\n\nimport { getCurrentSpecification } from '../../specifications/selectors'\nimport { getTerminateServiceIssue } from '../../terminateServiceIssues/selectors'\nimport { getNewServiceIssue } from '../../newServiceIssues/selectors'\nimport _ from 'lodashExtended';\n\n\nconst NewServiceIssue = ({title, id, processed, resolved, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n\n return(\n <IssueBox title='New Service Request'>\n\n <IssueBoxSection>\n\n <OrderLink {...newServiceIssue.order}/>\n\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <IssueBoxSection><div key={collectionGroup.uuid} className=\"mb5\">\n\n <div className=\"mb5\">\n Collected On-Demand\n </div>\n\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n\n </div></IssueBoxSection>\n\n }) :\n <UnknownSpecification serviceId={id}/>\n }\n\n <IssueBoxSection>\n <div className=\"mb5\">\n <NewServiceDeliveryOption newServiceIssue={newServiceIssue}/>\n </div>\n\n {!!newServiceIssue.noDelivery ? null :\n <div className=\"mb5\">Bin delivery confirmed for <NewServiceDeliveryDate newServiceIssue={newServiceIssue}/></div>\n }\n\n\n <div className=\"mb5 text-muted\">Vendor Account: {vendorAccount.name}</div>\n { specification ?\n <div className=\"mb5\">\n <SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate>\n </div> : null }\n </IssueBoxSection>\n\n </IssueBoxSection>\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst SpecificationChange = ({ title, id, processed, resolved, specification, onMarkProcessed, onCancelChangeSpec }) => {\n return(\n <IssueBox title=\"Change unit and or frequency specification issue\"\n handleDelete={ specification.id ? null : onCancelChangeSpec }>\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return (<div key={collectionGroup.uuid}><IssueBoxSection>\n <div className=\"mb5\">Collected On-Demand</div>\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n <div className=\"mb5\"><SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate></div>\n\n { collectionGroup.hasRoutineCollections ? (\n <div className=\"mt10 text-muted\">\n Next collection on<NextCollectionDateSelect strongTarget={false} collectionGroup={collectionGroup}/>\n </div>\n ) : null }\n\n </IssueBoxSection></div>)\n })}\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst TerminateServiceIssue = ({title, id, processed, resolved, terminateServiceIssue, onCancelTermination, onMarkProcessed}) => {\n\n return(\n <IssueBox title='Terminate Service' handleDelete={ terminateServiceIssue.id ? null : onCancelTermination }>\n\n <div className=\"mb5\">\n <FinalCollectionOption terminateServiceIssue={terminateServiceIssue}/>\n\n {!!terminateServiceIssue.noFinalCollection ?\n <span>Service terminated, no final collection required</span>\n :\n <span>Final collection scheduled on <FinalCollectionDate terminateServiceIssue={terminateServiceIssue}></FinalCollectionDate></span>\n }\n </div>\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst Closed = ({title, id, processed, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n return(\n <IssueBox heading=\"Current Specification\" historical={true}>\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid}>\n <div className=\"mb5\">\n Collected On-Demand\n </div>\n\n <div className=\"mb10\">\n <div className=\"mb5 text-muted\">Unit Specification</div>\n <div className=\"mb5 ml10\">\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n </div>\n\n\n </div>\n }) : <UnknownSpecification serviceId={id}/>}\n </IssueBox>\n )\n}\n\n\n\nlet OnDemandClinicalService = (props) => {\n let serviceNode, menuItems\n if(props.terminateServiceIssue) {\n serviceNode = <TerminateServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'bookAdhocCollection',\n ]\n } else if(props.newServiceIssue) {\n serviceNode = <NewServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'bookAdhocCollection',\n 'terminateService'\n ]\n } else if(!props.specification.closed){\n serviceNode = <SpecificationChange {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'bookAdhocCollection',\n 'terminateService'\n ]\n } else {\n serviceNode = <Closed {...props} />\n menuItems = [\n 'reportMissedCollection',\n 'newBinDelivery',\n 'changeSpecification',\n 'bookAdhocCollection',\n 'terminateService'\n ]\n }\n\n return(<ServiceHolder {...props} menuItems={menuItems}>\n {serviceNode}\n <MissedCollectionReportList serviceId={props.id}/>\n <AdhocCollectionBookingList serviceId={props.id}/>\n <BinDeliveryList serviceId={props.id}/>\n </ServiceHolder>)\n\n\n}\n\nOnDemandClinicalService.propTypes = {\n specification: PropTypes.shape({\n uuid: PropTypes.string,\n id: PropTypes.number,\n collectionGroups: PropTypes.object.isRequired\n }).isRequired,\n currentSpecificationVersionUuid: PropTypes.string,\n id: PropTypes.number.isRequired,\n vendorAccount: PropTypes.shape({\n name: PropTypes.string.isRequired,\n }).isRequired,\n onMarkProcessed: PropTypes.func.isRequired\n}\n\nconst mapStateToProps = (state, {id}) => {\n const specification = getCurrentSpecification(id, state)\n\n return {\n processed: isServiceProcessed(id, state),\n resolved: isServiceResolved(id, state),\n closed: isServiceClosed(id, state),\n specification: specification,\n newServiceIssue: getNewServiceIssue(id, state),\n terminateServiceIssue: getTerminateServiceIssue(id, state),\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onMarkProcessed: (processed) => dispatch(markServiceProcessed(id, processed)),\n onCancelTermination: () => dispatch(terminateServiceIssuesActions.cancelTerminateService(id)),\n onCancelChangeSpec: () => dispatch(cancelChangeSpecification(id))\n }\n}\n\nOnDemandClinicalService = connect(\n mapStateToProps,\n mapDispatchToProps\n)(OnDemandClinicalService)\n\nexport default OnDemandClinicalService\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\n//\nimport ServiceHolder from './ServiceHolder'\nimport OrderLink from '../OrderLink'\nimport IssueBox from '../IssueBox'\nimport IssueBoxSection from '../IssueBoxSection'\n\nimport CollectionPlanSelect from '../CollectionPlanSelect'\nimport CollectionPlan from '../CollectionPlan'\n\nimport UnitSpecificationList from '../UnitSpecificationList'\nimport EditSpecificationModal from '../EditSpecificationModal'\nimport NewServiceDeliveryDate from '../NewServiceDeliveryDate'\nimport NewServiceDeliveryOption from '../NewServiceDeliveryOption'\nimport SpecificationConfirmDate from '../SpecificationConfirmDate'\n\nimport FinalCollectionDate from '../FinalCollectionDate'\nimport FinalCollectionOption from '../FinalCollectionOption'\n\nimport CollectionDaysSelect from '../CollectionDaysSelect'\nimport CollectionDays from '../CollectionDays'\n\nimport NextCollectionDateSelect from '../NextCollectionDateSelect'\nimport NextCollectionDate from '../NextCollectionDate'\n\nimport MarkProcessedBtn from '../MarkProcessedBtn'\nimport ServiceActionMenu from '../ServiceActionMenu'\nimport MissedCollectionReportList from '../MissedCollectionReportList'\nimport AdhocCollectionBookingList from '../AdhocCollectionBookingList'\n\nimport { markServiceProcessed, cancelChangeSpecification } from '../../services/operations'\nimport terminateServiceIssuesActions from '../../terminateServiceIssues/actions'\nimport { isServiceProcessed, isServiceResolved, isServiceClosed } from '../../services/selectors'\nimport { getTerminateServiceIssue } from '../../terminateServiceIssues/selectors'\nimport { getCurrentSpecification } from '../../specifications/selectors'\nimport { getNewServiceIssue } from '../../newServiceIssues/selectors'\nimport { getNextRoutineCollection } from '../../nextRoutineCollections/selectors'\nimport _ from 'lodashExtended';\n\n\nconst NewServiceIssue = ({title, id, processed, resolved, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n\n return(\n <IssueBox title='New Service Request'>\n\n <IssueBoxSection>\n\n <OrderLink {...newServiceIssue.order}/>\n\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <IssueBoxSection><div key={collectionGroup.uuid} className=\"mb5\">\n\n <div className=\"mb5\">\n Collected <CollectionPlanSelect collectionGroup={collectionGroup}/> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n\n { collectionGroup.hasRoutineCollections ?\n <div className=\"mb5\">\n <span>with the first collection on <NextCollectionDateSelect collectionGroup={collectionGroup}/></span>\n </div>\n : null }\n\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n\n </div></IssueBoxSection>\n\n }) :\n <UnknownSpecification serviceId={id}/>\n }\n\n <IssueBoxSection>\n <div className=\"mb5\">\n <NewServiceDeliveryOption newServiceIssue={newServiceIssue}/>\n </div>\n\n {!!newServiceIssue.noDelivery ? null :\n <div className=\"mb5\">Bin delivery confirmed for <NewServiceDeliveryDate newServiceIssue={newServiceIssue}/></div>\n }\n\n\n <div className=\"mb5 text-muted\">Vendor Account: {vendorAccount.name}</div>\n\n { specification ?\n <div className=\"mb5\">\n <SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate>\n </div> : null }\n\n </IssueBoxSection>\n\n </IssueBoxSection>\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst UpdateCollectionDate = ({title, id, processed, resolved, specification, onMarkProcessed}) => {\n return(\n <IssueBox title=\"Update Collection Date\">\n\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid} ><IssueBoxSection>\n\n <div className=\"mb5\">\n Collected <CollectionPlan collectionGroup={collectionGroup} /> <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n <div style={{ marginLeft: 10 }}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n { collectionGroup.hasRoutineCollections ?\n <div className=\"mb5\">\n Next collection is <NextCollectionDateSelect collectionGroup={collectionGroup}/>\n </div>\n : null }\n\n </IssueBoxSection></div>\n })}\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst SpecificationChange = ({ title, id, processed, resolved, specification, onMarkProcessed, onCancelChangeSpec }) => {\n return(\n <IssueBox title=\"Change unit and or frequency specification issue\"\n handleDelete={ specification.id ? null : onCancelChangeSpec }>\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return (<div key={collectionGroup.uuid}><IssueBoxSection>\n <div className=\"mb5\">Collected<CollectionPlanSelect collectionGroup={collectionGroup}/>\n <CollectionDaysSelect collectionGroup={collectionGroup}/>\n </div>\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n <div className=\"mb5\"><SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate></div>\n\n { collectionGroup.hasRoutineCollections ? (\n <div className=\"mt10 text-muted\">\n Next collection on<NextCollectionDateSelect strongTarget={false} collectionGroup={collectionGroup}/>\n </div>\n ) : null }\n\n </IssueBoxSection></div>)\n })}\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst TerminateServiceIssue = ({title, id, processed, resolved, terminateServiceIssue, onCancelTermination, onMarkProcessed}) => {\n\n return(\n <IssueBox title='Terminate Service' handleDelete={ terminateServiceIssue.id ? null : onCancelTermination }>\n <div className=\"mb5\">\n <FinalCollectionOption terminateServiceIssue={terminateServiceIssue}/>\n {!!terminateServiceIssue.noFinalCollection ?\n <span>Service terminated, no final collection required</span>\n :\n <span>Final collection scheduled on <FinalCollectionDate terminateServiceIssue={terminateServiceIssue}></FinalCollectionDate></span>\n }\n </div>\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst Closed = ({title, id, processed, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n return(\n <IssueBox heading=\"Current Specification\" historical={true}>\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid}>\n <div className=\"mb5\">\n Collected <strong className=\"text-primary\"><CollectionPlan collectionGroup={collectionGroup} /></strong>\n <CollectionDays collectionGroup={collectionGroup}/>\n </div>\n\n\n <div className=\"mb5\">{ collectionGroup.hasRoutineCollections ? <span>Next collection on <span className=\"text-success\"><NextCollectionDate collectionGroup={collectionGroup}/></span></span> : \"Adhoc Collections - Non Booked\" }</div>\n\n <div className=\"mb10\">\n <div className=\"mb5 text-muted\">Unit Specification</div>\n <div className=\"mb5 ml10\">\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n </div>\n\n\n </div>\n }) : <UnknownSpecification serviceId={id}/>}\n </IssueBox>\n )\n}\n\n\n\nlet RegularConfidentialService = (props) => {\n let serviceNode, menuItems\n if(props.terminateServiceIssue) {\n serviceNode = <TerminateServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'bookAdhocCollection'\n ]\n } else if(props.newServiceIssue) {\n serviceNode = <NewServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'terminateService'\n ]\n } else if(!props.specification.closed){\n serviceNode = <SpecificationChange {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'bookAdhocCollection',\n 'terminateService'\n ]\n } else if(!_.every(props.nextRoutineCollections, 'closed') ){\n serviceNode = <UpdateCollectionDate {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'changeSpecification',\n 'bookAdhocCollection',\n 'terminateService'\n ]\n } else {\n serviceNode = <Closed {...props} />\n menuItems = [\n 'reportMissedCollection',\n 'changeSpecification',\n 'updateCollectionDate',\n 'bookAdhocCollection',\n 'terminateService'\n ]\n\n }\n\n return(<ServiceHolder {...props} menuItems={menuItems}>\n {serviceNode}\n <MissedCollectionReportList serviceId={props.id}/>\n <AdhocCollectionBookingList serviceId={props.id}/>\n </ServiceHolder>)\n}\n\nRegularConfidentialService.propTypes = {\n specification: PropTypes.shape({\n uuid: PropTypes.string,\n id: PropTypes.number,\n collectionGroups: PropTypes.object.isRequired\n }).isRequired,\n currentSpecificationVersionUuid: PropTypes.string,\n id: PropTypes.number.isRequired,\n vendorAccount: PropTypes.shape({\n name: PropTypes.string.isRequired,\n }).isRequired,\n onMarkProcessed: PropTypes.func.isRequired\n}\n\nconst mapStateToProps = (state, {id}) => {\n const specification = getCurrentSpecification(id, state)\n\n return {\n processed: isServiceProcessed(id, state),\n resolved: isServiceResolved(id, state),\n closed: isServiceClosed(id, state),\n specification: specification,\n newServiceIssue: getNewServiceIssue(id, state),\n terminateServiceIssue: getTerminateServiceIssue(id, state),\n nextRoutineCollections: _.map(specification.collectionGroups, (cg) => getNextRoutineCollection(cg, state)),\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onMarkProcessed: (processed) => dispatch(markServiceProcessed(id, processed)),\n onCancelTermination: () => dispatch(terminateServiceIssuesActions.cancelTerminateService(id)),\n onCancelChangeSpec: () => dispatch(cancelChangeSpecification(id))\n }\n}\n\nRegularConfidentialService = connect(\n mapStateToProps,\n mapDispatchToProps\n)(RegularConfidentialService)\n\nexport default RegularConfidentialService\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\n//\nimport ServiceHolder from './ServiceHolder'\nimport OrderLink from '../OrderLink'\nimport IssueBox from '../IssueBox'\nimport IssueBoxSection from '../IssueBoxSection'\nimport NewServiceDeliveryOption from '../NewServiceDeliveryOption'\nimport SpecificationConfirmDate from '../SpecificationConfirmDate'\n\nimport FinalCollectionDate from '../FinalCollectionDate'\nimport FinalCollectionOption from '../FinalCollectionOption'\n\nimport UnitSpecificationList from '../UnitSpecificationList'\nimport EditSpecificationModal from '../EditSpecificationModal'\nimport NewServiceDeliveryDate from '../NewServiceDeliveryDate'\n\nimport MarkProcessedBtn from '../MarkProcessedBtn'\nimport MissedCollectionReportList from '../MissedCollectionReportList'\nimport AdhocCollectionBookingList from '../AdhocCollectionBookingList'\n\nimport { markServiceProcessed, cancelChangeSpecification } from '../../services/operations'\nimport { isServiceProcessed, isServiceResolved, isServiceClosed } from '../../services/selectors'\n\nimport { getCurrentSpecification } from '../../specifications/selectors'\nimport { getTerminateServiceIssue } from '../../terminateServiceIssues/selectors'\nimport { getNewServiceIssue } from '../../newServiceIssues/selectors'\nimport terminateServiceIssuesActions from '../../terminateServiceIssues/actions'\n\nimport _ from 'lodashExtended';\n\n\nconst NewServiceIssue = ({title, id, processed, resolved, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n\n return(\n <IssueBox title='New Service Request'>\n\n <IssueBoxSection>\n\n <OrderLink {...newServiceIssue.order}/>\n\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <IssueBoxSection><div key={collectionGroup.uuid} className=\"mb5\">\n\n <div className=\"mb5\">\n Collected On-Demand\n </div>\n\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n\n </div></IssueBoxSection>\n\n }) :\n <UnknownSpecification serviceId={id}/>\n }\n\n <IssueBoxSection>\n <div className=\"mb5\">\n <NewServiceDeliveryOption newServiceIssue={newServiceIssue}/>\n </div>\n\n {!!newServiceIssue.noDelivery ? null :\n <div className=\"mb5\">Bin delivery confirmed for <NewServiceDeliveryDate newServiceIssue={newServiceIssue}/></div>\n }\n\n\n <div className=\"mb5 text-muted\">Vendor Account: {vendorAccount.name}</div>\n\n { specification ?\n <div className=\"mb5\">\n <SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate>\n </div> : null }\n\n </IssueBoxSection>\n\n </IssueBoxSection>\n\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst SpecificationChange = ({ title, id, processed, resolved, specification, onMarkProcessed, onCancelChangeSpec }) => {\n return(\n <IssueBox title=\"Change unit and or frequency specification issue\"\n handleDelete={ specification.id ? null : onCancelChangeSpec }>\n {_.map(specification.collectionGroups, (collectionGroup) => {\n return (<div key={collectionGroup.uuid}><IssueBoxSection>\n <div className=\"mb5\">Collected On-Demand</div>\n <div className=\"mb5\">\n <div className=\"mb3\">Unit Specification:</div>\n <div style={{ marginLeft: 10 }}>\n <EditSpecificationModal specificationUuid={specification.uuid}>\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </EditSpecificationModal>\n </div>\n </div>\n <div className=\"mb5\"><SpecificationConfirmDate specificationUuid={specification.uuid}></SpecificationConfirmDate></div>\n\n { collectionGroup.hasRoutineCollections ? (\n <div className=\"mt10 text-muted\">\n Next collection on<NextCollectionDateSelect strongTarget={false} collectionGroup={collectionGroup}/>\n </div>\n ) : null }\n\n </IssueBoxSection></div>)\n })}\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n </IssueBoxSection>\n </IssueBox>\n )\n}\n\nconst TerminateServiceIssue = ({title, id, processed, resolved, terminateServiceIssue, onCancelTermination, onMarkProcessed}) => {\n\n return(\n <IssueBox title='Terminate Service' handleDelete={ terminateServiceIssue.id ? null : onCancelTermination }>\n <div className=\"mb5\">\n <FinalCollectionOption terminateServiceIssue={terminateServiceIssue}/>\n\n {!!terminateServiceIssue.noFinalCollection ?\n <span>Service terminated, no final collection required</span>\n :\n <span>Final collection scheduled on <FinalCollectionDate terminateServiceIssue={terminateServiceIssue}></FinalCollectionDate></span>\n }\n </div>\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed} />\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nconst Closed = ({title, id, processed, vendorAccount, specification, newServiceIssue, onMarkProcessed}) => {\n return(\n <IssueBox heading=\"Current Specification\" historical={true}>\n {specification ? _.map(specification.collectionGroups, (collectionGroup) => {\n return <div key={collectionGroup.uuid}>\n <div className=\"mb5\">\n Collected On-Demand\n </div>\n\n <div className=\"mb10\">\n <div className=\"mb5 text-muted\">Unit Specification</div>\n <div className=\"mb5 ml10\">\n <UnitSpecificationList unitSpecifications={collectionGroup.unitSpecifications}/>\n </div>\n </div>\n\n\n </div>\n }) : <UnknownSpecification serviceId={id}/>}\n </IssueBox>\n )\n}\n\n\nlet OnDemandConfidentialService = (props) => {\n let serviceNode, menuItems\n if(props.terminateServiceIssue) {\n serviceNode = <TerminateServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'bookAdhocCollection',\n ]\n } else if(props.newServiceIssue) {\n serviceNode = <NewServiceIssue {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'bookAdhocCollection',\n 'terminateService'\n ]\n } else if(!props.specification.closed){\n serviceNode = <SpecificationChange {...props}/>\n menuItems = [\n 'reportMissedCollection',\n 'bookAdhocCollection',\n 'terminateService'\n ]\n } else {\n serviceNode = <Closed {...props} />\n menuItems = [\n 'reportMissedCollection',\n 'changeSpecification',\n 'bookAdhocCollection',\n 'terminateService'\n ]\n }\n\n return(<ServiceHolder {...props} menuItems={menuItems}>\n {serviceNode}\n <MissedCollectionReportList serviceId={props.id}/>\n <AdhocCollectionBookingList serviceId={props.id}/>\n </ServiceHolder>)\n\n\n}\n\nOnDemandConfidentialService.propTypes = {\n specification: PropTypes.shape({\n uuid: PropTypes.string,\n id: PropTypes.number,\n collectionGroups: PropTypes.object.isRequired\n }).isRequired,\n currentSpecificationVersionUuid: PropTypes.string,\n id: PropTypes.number.isRequired,\n vendorAccount: PropTypes.shape({\n name: PropTypes.string.isRequired,\n }).isRequired,\n onMarkProcessed: PropTypes.func.isRequired\n}\n\nconst mapStateToProps = (state, {id}) => {\n const specification = getCurrentSpecification(id, state)\n\n return {\n processed: isServiceProcessed(id, state),\n resolved: isServiceResolved(id, state),\n closed: isServiceClosed(id, state),\n specification: specification,\n newServiceIssue: getNewServiceIssue(id, state),\n terminateServiceIssue: getTerminateServiceIssue(id, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onMarkProcessed: (processed) => dispatch(markServiceProcessed(id, processed)),\n onCancelTermination: () => dispatch(terminateServiceIssuesActions.markForDestroy(id)),\n onCancelChangeSpec: () => dispatch(cancelChangeSpecification(id))\n }\n}\n\nOnDemandConfidentialService = connect(\n mapStateToProps,\n mapDispatchToProps\n)(OnDemandConfidentialService)\n\nexport default OnDemandConfidentialService\n\n","import NhsCommissionedService from './NhsCommissionedService';\nimport NhsEmergencyService from './NhsEmergencyService';\nimport Covid19VaccinationService from './Covid19VaccinationService';\nimport NeedleExchangeService from './NeedleExchangeService';\nimport RegularGeneralAndRecyclingService from './RegularGeneralAndRecyclingService';\nimport WashroomService from './WashroomService';\nimport PrePaidGeneralAndRecyclingService from './PrePaidGeneralAndRecyclingService';\nimport RegularClinicalService from './RegularClinicalService';\nimport OnDemandClinicalService from './OnDemandClinicalService';\nimport RegularConfidentialService from './RegularConfidentialService';\nimport OnDemandConfidentialService from './OnDemandConfidentialService';\n\nconst types = {\n NhsCommissionedService,\n NhsEmergencyService,\n Covid19VaccinationService,\n NeedleExchangeService,\n RegularGeneralAndRecyclingService,\n WashroomService,\n PrePaidGeneralAndRecyclingService,\n RegularClinicalService,\n OnDemandClinicalService,\n RegularConfidentialService,\n OnDemandConfidentialService\n}\n\nexport default (type) => {\n\n const component = types[type]\n\n if(component) {\n return component\n } else {\n throw 'missing service component for ' + type\n }\n\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport getType from './serviceTypes'\n\nconst Service = ({ type, ...rest }) => {\n\n var ServiceType = getType(type)\n\n return <ServiceType {...rest}/>\n\n}\n\nService.propTypes = {\n type: PropTypes.string.isRequired,\n}\n\nexport default Service\n\n","import _ from 'lodashExtended'\n\nconst getGeneralIssues = (state) => {\n return _.reject(state.issues.generalIssues, { _destroy: '1'} )\n}\n\nconst getGeneralIssue = (id, state) => {\n return state.issues.generalIssues[id]\n}\n\nexport {\n getGeneralIssues,\n getGeneralIssue,\n}\n","import { createAction } from 'redux-act';\n\nconst markProcessed = createAction(\"mark the ageneral issue as processed\", (id, processed) => { return( { id, processed } ) });\nconst markResolved = createAction(\"mark the ageneral issue as resolved\", (id, resolved) => { return( { id, resolved } ) });\nconst newIssue = createAction(\"create a new general issue\")\nconst updateIssue = createAction(\"update general issue\", (id, newAttr) => { return( { id, newAttr } ) });\nconst markForDestroy = createAction(\"mark for destroy general issue\", (id) => { return( { id } ) });\n\nexport default {\n markProcessed,\n markResolved,\n newIssue,\n updateIssue,\n markForDestroy\n}\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport IssueBox from './IssueBox'\nimport IssueBoxSection from './IssueBoxSection'\nimport MarkProcessedBtn from './MarkProcessedBtn'\nimport Timestamps from './Timestamps'\nimport parse from 'html-react-parser'\n\nimport { ModelErrors, StatelessModal, Btn, Link } from 'sharedComponents'\n\nimport actions from '../generalIssues/actions'\n\nvar {\n markProcessed,\n markResolved,\n updateIssue,\n markForDestroy\n} = actions\n\n\nclass Open extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isModalOpen: this.props.isNew,\n };\n this.handleOpenModal = this.handleOpenModal.bind(this)\n this.handleCloseModal = this.handleCloseModal.bind(this)\n this.handleInputChange = this.handleInputChange.bind(this);\n }\n\n handleOpenModal () { this.setState({ isModalOpen: true }) }\n handleCloseModal () { this.setState({ isModalOpen: false }) }\n handleInputChange(event) {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n\n this.props.onUpdate({\n [name]: value\n });\n }\n\n render() {\n let { id, processed, resolved, errors, problemDetails, solutionDetails, headline, onMarkProcessed, onMarkResolved, onMarkForDestroy, onUpdate } = this.props\n const { isModalOpen } = this.state\n const displayTitle = _.isBlank(headline) ? \"Headline Missing\" : headline\n\n let problemDetailsDisplay = _.isNull(problemDetails) ? \"\" : problemDetails.split('\\n').map ((item, i) => <div key={i}>{parse(item)}</div>)\n let solutionDetailsDisplay = _.isNull(solutionDetails) ? \"\" : solutionDetails.split('\\n').map ((item, i) => <div key={i}>{item}</div>)\n\n return (\n <IssueBox title={displayTitle} handleEdit={this.handleOpenModal}>\n <ModelErrors errors={errors} />\n <StatelessModal title='Edit the General Issue' isOpen={isModalOpen} onCloseModal={this.handleCloseModal}>\n <form className=\"simple_form form-vertical\">\n <div className=\"form-group\">\n <label className=\"control-label\">Headline</label>\n <input type=\"text\" className=\"form-control\" name=\"headline\" value={headline || ''} onChange={this.handleInputChange} />\n <small>Sum up the problem, in one line. </small>\n </div>\n <div className=\"form-group\">\n <label className=\"control-label\">Describe what the problem is</label>\n <textarea className=\"form-control\" name=\"problemDetails\" value={problemDetails || ''} onChange={this.handleInputChange} />\n <small>Dont leave things out just because they are in the ticket. This should make sense without having to look at the ticket. Copy paste information if you have to.</small>\n </div>\n <div className=\"form-group\">\n <label className=\"control-label\">How have you solved the problem? (fill this in only when resolved) </label>\n <textarea className=\"form-control\" name=\"solutionDetails\" value={solutionDetails || ''} onChange={this.handleInputChange} />\n <small>Dont leave things out just because they are in the ticket. This should make sense without having to look at the ticket. Filling this out will mark it resolved</small>\n </div>\n <div style={{ borderTop: '1px solid #e6e9ed', padding: '10px 10px 5px 10px', marginLeft: -10, marginRight: -10 }}>\n <Btn styles='success block' onClick={this.handleCloseModal}>   Save   </Btn><br/>\n <div className=\"text-right\"><div><Btn styles='danger xs' onClick={onMarkForDestroy}><i className=\"fa fa-trash\"></i></Btn></div></div>\n </div>\n </form>\n </StatelessModal>\n <IssueBoxSection>\n <strong>Problem:</strong> {problemDetails ? problemDetailsDisplay : <span style={{cursor: 'pointer'}} className='text-danger' onClick={this.handleOpenModal}>{'<click here to edit>'}</span>}\n </IssueBoxSection>\n <IssueBoxSection>\n <strong>Solution:</strong> {solutionDetails ? solutionDetailsDisplay : <span style={{cursor: 'pointer'}} className='text-danger' onClick={this.handleOpenModal}>{'<click here to edit>'}</span>}\n </IssueBoxSection>\n <IssueBoxSection>\n <div className=\"clearfix\">\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n <Timestamps {...this.props}/>\n </div>\n </IssueBoxSection>\n </IssueBox>\n )\n }\n}\n\n\nclass Closed extends React.Component {\n\n constructor(props) {\n super(props);\n const minimized = _.isBlank(props.resolvedAt) ? false : props.closed\n this.state = { minimized }\n this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n }\n\n handleToggleMinimized() {\n this.setState({minimized: !this.state.minimized})\n }\n\n render() {\n let { id, processed, resolved, errors, problemDetails, headline, solutionDetails, resolvedAt, onMarkProcessed, onUpdate} = this.props\n const { minimized } = this.state\n\n const heading = resolvedAt ? <div><strong>{headline}</strong> - resolved on {moment(resolvedAt).format(\"Do MMM YYYY\") }</div> :\n <h4>{headline}</h4>\n\n return (\n <IssueBox heading={heading} minimized={minimized} handleToggleMinimized={this.handleToggleMinimized} >\n { minimized ? null :\n <div>\n <IssueBoxSection>\n <strong>Problem: </strong>\n {problemDetails}\n </IssueBoxSection>\n <IssueBoxSection>\n <strong>Solution:</strong>\n {_.isPresent(solutionDetails) ? solutionDetails : 'None' }\n </IssueBoxSection>\n <IssueBoxSection>\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n <div className='pull-right'>\n <Timestamps {...this.props}/>\n </div>\n </IssueBoxSection>\n </div>\n }\n </IssueBox>\n )\n }\n}\n\nvar GeneralIssue = (props) => {\n if(props.closed) {\n return <Closed {...props}/>\n } else {\n return <Open {...props}/>\n }\n}\n\n\nGeneralIssue.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n processed: PropTypes.bool.isRequired,\n resolved: PropTypes.bool.isRequired,\n errors: PropTypes.object,\n onMarkProcessed: PropTypes.func.isRequired,\n onMarkForDestroy: PropTypes.func.isRequired,\n onUpdate: PropTypes.func.isRequired,\n problemDetails: PropTypes.string,\n solutionDetails: PropTypes.string,\n headline: PropTypes.string,\n};\n\n\nconst mapStateToProps = (state, props) => {\n return {\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onMarkResolved: (resolved) => dispatch(markResolved(id, resolved)),\n onMarkProcessed: (processed) => dispatch(markProcessed(id, processed)),\n onUpdate: (newAttr) => dispatch(updateIssue(id, newAttr)),\n onMarkForDestroy: () => dispatch(markForDestroy(id)),\n }\n}\n\nGeneralIssue = connect(\n mapStateToProps,\n mapDispatchToProps\n)(GeneralIssue)\n\n\nexport default GeneralIssue;\n\n\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended'\nimport { Btn } from 'sharedComponents'\nimport { getGeneralIssues } from '../generalIssues/selectors'\nimport actions from '../generalIssues/actions'\nimport GeneralIssue from './GeneralIssue'\nimport HistoryList from './HistoryList'\n\nlet GeneralIssueList = ({generalIssues, onNew}) => {\n\n const getGeneralIssue = (generalIssue) => <GeneralIssue key={generalIssue.id} {...generalIssue}/>\n const sortedList = _.orderBy(generalIssues, ({resolvedAt}) => _.isBlank(resolvedAt) ? resolvedAt : \"z\", ['desc'] )\n\n const openList = _.filter(sortedList, {closed: false } )\n const closedList = _.filter(sortedList, {closed: true})\n\n return(<div className=\"issues-list\">\n <div className='pull-right' >\n <Btn onClick={onNew} icon='plus' styles=\"primary xs\">Add</Btn>\n </div>\n <h4 style={{color: 'white', fontSize: 15}} className=\"mt0\">\n <span className=\"badge badge-primary\">{_.size(openList)}</span>  \n General Issues\n </h4>\n { openList.length > 0 ? <div>\n { _.map(openList, getGeneralIssue) }\n </div> : null }\n { closedList.length > 0 ? <HistoryList title={'Closed'}>\n { _.map(closedList, getGeneralIssue) }\n </HistoryList> : null }\n </div>)\n\n}\n\nGeneralIssueList.propTypes = {\n onNew: PropTypes.func.isRequired\n}\n\nconst mapStateToProps = (state, {}) => {\n\n return {\n generalIssues: getGeneralIssues(state)\n }\n\n}\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onNew: () => dispatch(actions.newIssue())\n }\n}\n\nGeneralIssueList = connect(\n mapStateToProps,\n mapDispatchToProps\n)(GeneralIssueList)\n\n\n\n\nexport default GeneralIssueList\n","import { createAction } from 'redux-act';\n\nconst markProcessed = createAction(\"mark the emergency booking as processed\", (id, processed) => { return( { id, processed } ) });\nconst setClearAllPolicy = createAction(\"set the clear all policy\", (id, clearAll) => { return( { id, clearAll } ) });\nconst setStatus = createAction(\"set the confirmed success\", (id, status) => { return( { id, status } ) });\nconst selectBinQuantity = createAction(\"select quantity for bin spec\", (id, binTypeId, quantity) => { return({ id, binTypeId, quantity } ) });\nconst addBin = createAction(\"add a new bin to the emergency booking\", (id, binTypeId) => { return({ id, binTypeId } ) });\nconst removeBin = createAction(\"remove the bin to the emergency booking\", (id, binTypeId) => { return({ id, binTypeId } ) });\nconst setDate = createAction(\"set the date for the emergency booking\", (id, date) => { return({ id, date } ) });\nconst setRequestDate = createAction(\"set the requested on date for the emergency booking\", (id, requestedOn) => { return({ id, requestedOn } ) });\nconst markForDestroy = createAction(\"mark for destroy emergency booking\", (id) => { return( { id } ) });\n\nexport default {\n markProcessed,\n setClearAllPolicy,\n selectBinQuantity,\n addBin,\n removeBin,\n setDate,\n setRequestDate,\n markForDestroy,\n setStatus\n}\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport actions from '../emergencyCollectionBookings/actions'\nimport { getEmergencyCollectionBooking } from '../emergencyCollectionBookings/selectors'\nimport { getSalesUnitPricesByServiceCode } from '../services/selectors'\nimport { StatelessModal, Btn } from 'sharedComponents'\nimport EditUnitSpecifications from './EditUnitSpecifications'\nimport BinQuantitySelector from './BinQuantitySelector'\nimport BinSelector from './BinSelector'\n\nvar {\n selectBinQuantity,\n addBin,\n removeBin,\n} = actions\n\nclass EditEmergencyCollectionBookingModal extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isOpen: false,\n };\n this.handleOpen = this.handleOpen.bind(this)\n this.handleClose = this.handleClose.bind(this)\n }\n\n handleOpen () { this.setState({ isOpen: true }) }\n handleClose () { this.setState({ isOpen: false }) }\n\n render() {\n var { unitSpecifications, children, target, title, availableBinTypeIds, selectedBinTypeIds, salesUnitPricesByServiceCode,\n onAdd, onRemove, onChangeQuantity } = this.props\n\n return (\n <StatelessModal title={title || \"Add Bins\"}\n target={<span className=\"link\">{children || target || \"Add Bins\"}</span>}\n isOpen={this.state.isOpen}\n onCloseModal={this.handleClose}\n onOpenModal={this.handleOpen} >\n\n <div className=\"row\">\n <div className=\"col-sm-6\">\n <EditUnitSpecifications unitSpecifications={unitSpecifications} onRemove={onRemove} onChangeQuantity={onChangeQuantity} />\n  \n </div>\n <div className=\"col-sm-6\">\n <BinSelector onAddBinType={onAdd} availableBinTypeIds={availableBinTypeIds} selectedBinTypeIds={selectedBinTypeIds}/>\n </div>\n </div>\n\n <div style={{ borderTop: '1px solid #e6e9ed', padding: '10px 10px 5px 10px', marginLeft: -10, marginRight: -10 }}>\n <div style={{ textAlign: 'right', paddingBottom: 5 }}>\n <Btn onClick={this.handleClose}>close</Btn>\n </div>\n </div>\n </StatelessModal>\n )\n }\n\n}\n\nEditEmergencyCollectionBookingModal.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n target: PropTypes.node,\n title: PropTypes.node,\n availableBinTypeIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n selectedBinTypeIds: PropTypes.arrayOf(PropTypes.number).isRequired,\n onChangeQuantity: PropTypes.func.isRequired,\n onRemove: PropTypes.func.isRequired,\n onAdd: PropTypes.func.isRequired,\n};\n\n\nconst mapStateToProps = (state, {id,}) => {\n const booking = getEmergencyCollectionBooking(id, state)\n const { unitSpecifications, vendorService } = booking\n\n return {\n unitSpecifications,\n availableBinTypeIds: vendorService.availableBinTypeIds,\n selectedBinTypeIds: _.map(unitSpecifications, 'binTypeId'),\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onChangeQuantity: (productTypeId, quantity) => { dispatch(selectBinQuantity(id, productTypeId, quantity)) },\n onRemove: (productTypeId) => { dispatch(removeBin(id, productTypeId)) },\n onAdd: (productTypeId) => { dispatch(addBin(id, productTypeId)) },\n }\n}\n\nEditEmergencyCollectionBookingModal = connect(\n mapStateToProps,\n mapDispatchToProps\n)(EditEmergencyCollectionBookingModal)\n\n\nexport default EditEmergencyCollectionBookingModal;\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { DropdownSelect, DateSelect, Link, NoWrap } from 'sharedComponents'\nimport MarkProcessedBtn from './MarkProcessedBtn'\nimport IssueBox from './IssueBox'\nimport moment from 'moment'\nimport IssueBoxSection from './IssueBoxSection'\nimport EditEmergencyCollectionBookingModal from './EditEmergencyCollectionBookingModal'\nimport UnitSpecificationList from './UnitSpecificationList'\nimport Timestamps from './Timestamps'\n\nimport actions from '../emergencyCollectionBookings/actions'\nvar {\n markProcessed,\n setClearAllPolicy,\n markForDestroy,\n setDate,\n setRequestDate,\n setStatus,\n} = actions\n\n\nconst statusOptions = [\n { value: 'success', label: 'Collection confirmed successful'},\n { value: 'failed', label: 'Collection confirmed failed'},\n { value: 'unknown', label: 'Collection status unknown'},\n { value: 'not_required', label: 'Collection is not required'},\n]\n\n\nvar Open = ( {\n id,\n date,\n requestedOn,\n resolved,\n processed,\n status,\n unitSpecifications,\n clearAll,\n onMarkForDestroy,\n onSetClearAllPolicy,\n onChangeRequestDate,\n onChangeStatus,\n onChangeDate,\n onMarkProcessed,\n ...restProps\n}) => {\n\n var dateFormat = \"ddd, Do MMM YYYY\"\n\n var clearAllPolicySelector = <DropdownSelect title=\"Select a clear all policy\"\n blankText=\"select\"\n onChange={onSetClearAllPolicy}\n selectedValue={clearAll}\n strongTarget={true}\n options={\n [\n { value: true, label: 'all bins presented'},\n { value: false, label: 'only the following:'}\n ]\n } />\n\n var statusSelector = <DropdownSelect title=\"What is the status of the booking\"\n blankText=\"select\"\n onChange={onChangeStatus}\n selectedValue={status}\n strongTarget={true}\n options={statusOptions} />\n\n\n var bookingDateSelect = <DateSelect title=\"\"\n subtitle={<span>The collection will be performed on<strong><NoWrap>{date ? moment(date).format(dateFormat) : 'select'}</NoWrap></strong></span>}\n required={true}\n selectedDate={date}\n closeOnSelect={true}\n blankText={'select'}\n onClearDate={() => onChangeDate(null) }\n strongTarget={true}\n onSelectDate={onChangeDate}></DateSelect>\n\n\n\n var requestDateSelect = <DateSelect title=\"Request made on\"\n subtitle={<span>The client requested this collection on <strong><NoWrap>{date ? moment(requestedOn).format(dateFormat) : '<select date>'}</NoWrap></strong></span>}\n required={true}\n selectedDate={requestedOn}\n maxDate={new Date()}\n closeOnSelect={true}\n blankText={<strong><NoWrap><select date></NoWrap></strong>}\n onSelectDate={onChangeRequestDate}></DateSelect>\n\n var editModalTarget = _.isEmpty(unitSpecifications) ?\n <strong className='text-danger'>select</strong> :\n <UnitSpecificationList unitSpecifications={unitSpecifications}/>\n\n return (\n <IssueBox title=\"Emergency Collection\" handleDelete={onMarkForDestroy}>\n <IssueBoxSection>\n <div className=\"mb5\">Requested on {requestDateSelect}</div>\n {\n clearAll ?\n <div className=\"mb5\">Collect {clearAllPolicySelector}</div>\n :\n\n <div className=\"mb5\">\n <div className=\"mb3\">Collect {clearAllPolicySelector}</div>\n <div className=\"mb5 ml10\">\n <EditEmergencyCollectionBookingModal id={id}>\n {editModalTarget}\n </EditEmergencyCollectionBookingModal>\n </div>\n </div>\n }\n <div className=\"mb5\">Collection confirmed for {bookingDateSelect}</div>\n { _.isPresent(date) && moment(date).isSameOrBefore(moment()) ? <div className=\"mb5\">{statusSelector}</div> : null }\n </IssueBoxSection>\n\n <IssueBoxSection>\n <div className=\"clearfix\">\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n <Timestamps {...restProps}/>\n </div>\n </IssueBoxSection>\n </IssueBox>\n )\n\n}\n\nclass Closed extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = { minimized: props.closed }\n this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n }\n\n handleToggleMinimized() {\n this.setState({minimized: !this.state.minimized})\n }\n\n render() {\n const { id, processed, closed, status, resolved, date, clearAll, unitSpecifications, onMarkProcessed, onChangeStatus, ...restProps } = this.props\n const { minimized } = this.state\n\n // const heading = minimized ? <div><strong></strong> - {moment(date).format(\"Do MMM YYYY\") }</div> :\n // <h4>Emergency Collection</h4>\n \n var statusSelector = <DropdownSelect title=\"What is the status of the booking\"\n blankText=\"select\"\n onChange={onChangeStatus}\n selectedValue={status}\n strongTarget={true}\n options={statusOptions} />\n\n return (\n <IssueBox heading=\"Emergency Collection\" historical={true} minimized={minimized} handleToggleMinimized={this.handleToggleMinimized}>\n\n <div className='mb5'>\n Collection date was <strong className=\"text-primary\">{moment(date).format(\"Do MMM YYYY\")}</strong>\n </div>\n <div className={ minimized ? 'mb10' : 'mb5' }>{statusSelector}</div>\n { minimized ?\n null :\n <div>\n <div className=\"mb10\">\n <div className=\"mb3\">Collect {clearAll ? 'all bins presented' : 'only the following:'}</div>\n <div className=\"mb5 ml10\">\n <UnitSpecificationList unitSpecifications={unitSpecifications}/>\n </div>\n </div>\n\n <IssueBoxSection>\n <div className=\"clearfix\">\n <MarkProcessedBtn processed={processed} resolved={resolved} onClick={onMarkProcessed}/>\n <Timestamps {...restProps}/>\n </div>\n </IssueBoxSection>\n\n\n </div>\n }\n </IssueBox>\n )\n }\n}\n\n\n\nvar EmergencyCollectionBooking = (props) => {\n if(props.closed) {\n return <Closed {...props}/>\n } else {\n return <Open {...props}/>\n }\n}\n\n\n\nEmergencyCollectionBooking.propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).isRequired,\n //processed: PropTypes.bool.isRequired,\n //resolved: PropTypes.bool.isRequired,\n onMarkProcessed: PropTypes.func.isRequired,\n onSetClearAllPolicy: PropTypes.func.isRequired,\n onChangeStatus: PropTypes.func.isRequired,\n onMarkForDestroy: PropTypes.func\n};\n\n\nconst mapStateToProps = (state, {}) => {\n return {\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id, closed}) => {\n return {\n onMarkProcessed: (processed) => dispatch(markProcessed(id, processed)),\n onSetClearAllPolicy: (clearAll) => { dispatch(setClearAllPolicy(id, clearAll)) },\n onMarkForDestroy: !closed ? () => { dispatch(markForDestroy(id)) } : null,\n onChangeDate: (date) => { dispatch(setDate(id, date)) },\n onChangeRequestDate: (date) => { dispatch(setRequestDate(id, date)) },\n onChangeStatus: (value) => { dispatch(setStatus(id, value)) },\n }\n}\n\nEmergencyCollectionBooking = connect(\n mapStateToProps,\n mapDispatchToProps\n)(EmergencyCollectionBooking)\n\n\nexport default EmergencyCollectionBooking\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\n\n\nimport { getEmergencyCollectionBookings } from '../emergencyCollectionBookings/selectors'\nimport EmergencyCollectionBooking from './EmergencyCollectionBooking'\nimport HistoryList from './HistoryList'\n\n\n\nvar EmergencyCollectionBookingList = ( { emergencyCollectionBookings } ) => {\n const getBooking = (booking) => <EmergencyCollectionBooking key={booking.id} {...booking} />\n const sortedList = _.orderBy(emergencyCollectionBookings, 'date', 'desc')\n\n return (\n <div>\n <div>\n {_(sortedList).filter({closed: false}).map(getBooking).value() }\n </div>\n <HistoryList title={'Emergency Collection History'}>\n {_(sortedList).filter({closed: true}).map(getBooking).value() }\n </HistoryList>\n </div>\n )\n\n}\n\nEmergencyCollectionBookingList.propTypes = {\n};\n\nconst mapStateToProps = (state, {}) => {\n return {\n emergencyCollectionBookings: getEmergencyCollectionBookings(state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {}\n}\n\nEmergencyCollectionBookingList = connect(\n mapStateToProps,\n mapDispatchToProps\n)(EmergencyCollectionBookingList)\n\n\nexport default EmergencyCollectionBookingList;\n","import { createAction } from 'redux-act';\n\nconst submitStart = createAction(\"start submit\");\nconst submitSuccess = createAction(\"submit success\");\nconst submitError = createAction(\"submit error\");\nconst serverError = createAction(\"server error\");\n\nconst updateApiFromServer = createAction(\"the api data has been updated from the server\");\nconst updateIssuesFromServer = createAction(\"the issues have been updated from the server\");\n\nexport default {\n submitStart,\n submitSuccess,\n submitError,\n serverError,\n updateApiFromServer,\n updateIssuesFromServer\n}\n","import actions from './actions'\nimport { prepareSubmitData } from 'sharedUtils';\nimport submitToServer from 'submitToServer'\nimport { getService } from '../services/selectors'\nimport { getCurrentUnitSpecifications } from '../specifications/selectors'\n\nconst attributeKeyNames = [\n 'specifications',\n 'collectionGroups',\n 'nextRoutineCollections',\n 'services',\n 'unitSpecifications',\n 'productSpecifications',\n 'newServiceIssues',\n 'missedCollectionReports',\n 'supplyProductInstructions',\n 'fixedCollectionTimes',\n 'adhocCollectionBookings',\n 'emergencyCollectionBookings',\n 'binDeliveries',\n 'generalIssues',\n 'productSubscriptions',\n 'terminateServiceIssues',\n]\n\n\nconst updateStateFromServerData = (dispatch, data) => {\n if(data.api) { dispatch(actions.updateApiFromServer(data.api))}\n if(data.issues) { dispatch(actions.updateIssuesFromServer(data.issues))}\n}\n\nconst submit = () => (dispatch, getState) => {\n\n dispatch(actions.submitStart())\n\n const state = getState()\n const submitPath = state.api.submitPath\n\n submitToServer(submitPath, { location_issues: prepareSubmitData(state.issues, attributeKeyNames) },\n\n (data,v) => {\n updateStateFromServerData(dispatch, data)\n dispatch(actions.submitSuccess(data))\n },\n\n (data, status) => {\n if(status == 422) {\n updateStateFromServerData(dispatch, data)\n dispatch(actions.submitError(data))\n } else {\n dispatch(actions.serverError())\n alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`)\n }\n }, { method: 'PUT' })\n\n}\n\n\nconst requestEmergencyCollection = (serviceId) => (dispatch, getState) => {\n\n const state = getState()\n const service = getService(serviceId, state)\n const submitPath = service.vendorService.requestEmergencyCollectionPath\n\n if(submitPath) {\n const unitSpecificationsAttributes = getCurrentUnitSpecifications(service.id, state)\n submitToServer(submitPath, { emergencyCollectionBooking: { unitSpecificationsAttributes, failedServiceId: serviceId }, ticketId: state.api.ticketId },\n (data,v) => {\n window.location = data.redirect_to\n },\n\n (data, status) => {\n if(status == 422) {\n } else {\n alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`)\n }\n }, { method: 'POST' })\n\n }\n\n}\n\n\n\nexport {\n submit,\n requestEmergencyCollection\n}\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { Btn, Scroller } from 'sharedComponents'\nimport Service from './Service'\nimport GeneralIssueList from './GeneralIssueList'\nimport EmergencyCollectionBookingList from './EmergencyCollectionBookingList'\nimport { submit, requestEmergencyCollection } from '../api/operations'\n\nclass IssueList extends React.Component {\n constructor(props) {\n super(props);\n this.promptUnsavedChange = this.promptUnsavedChange.bind(this)\n }\n render() {\n\n const { unsaved, onClickSave, onEmergencyCollection, submitting, errors, scrollerHeight, services } = this.props\n var icon = errors ? \"warning\" : \"check\"\n var buttonColor = errors ? \"danger\" : \"success\"\n\n var vendorServicesList = _.size(services) > 1 ? <div className=\"mb20\"><div className=\"mb5 text-muted\">There are multiple services from this vendor at this location:</div>{_.map(services, (service) => {\n return <span><span className=\"badge badge-primary\">{service.title}</span>  </span>\n } )}</div> : null\n\n return (\n <div>\n <div className=\"mb15 mt15\">\n { unsaved ? (\n <div name=\"button\" disabled={submitting} onClick={onClickSave} className={`btn btn-block btn-sm btn-${buttonColor} btn-flat`}>\n <i className={`fa fa-${icon}`}></i>  Save Changes\n </div>\n ) : (\n <div name=\"button\" disabled={true} className={`btn btn-block btn-sm btn-${buttonColor} btn-flat`}>\n Saved\n </div>\n ) }\n </div>\n\n <div>\n {vendorServicesList}\n <GeneralIssueList/>\n <EmergencyCollectionBookingList/>\n {_.map(services, (service) => <Service key={service.id} onEmergencyCollection={onEmergencyCollection} {...service}/> )}\n </div>\n </div>\n )\n\n }\n\n promptUnsavedChange(isUnsaved = false, leaveMessage = 'Leave with unsaved changes?') {\n // Detecting page transition (prevent leaving by setting true)\n // for React Router version > 2.4\n //this.props.router.setRouteLeaveHook(this.props.route, () => isUnsaved && confirm(leaveMessage));\n\n // Detecting browser close\n window.onbeforeunload = isUnsaved && (() => leaveMessage);\n }\n\n componentDidUpdate() {\n this.promptUnsavedChange(this.props.unsaved);\n }\n\n componentWillUnmount() {\n window.onbeforeunload = null;\n }\n\n}\n\nIssueList.propTypes = {\n onClickSave: PropTypes.func.isRequired,\n services: PropTypes.object.isRequired,\n submitting: PropTypes.bool,\n errors: PropTypes.bool,\n unsaved: PropTypes.bool,\n scrollerHeight: PropTypes.number\n};\n\n\nconst mapStateToProps = (state, ownProps) => {\n return {\n services: state.issues.services,\n unsaved: !state.api.saved,\n submitting: !!state.api.submitting,\n errors: !!state.api.errors,\n scrollerHeight: null //not certain how this works\n }\n}\n\nconst mapDispatchToProps = (dispatch, {submitting}) => {\n return {\n onClickSave: () => {\n if(!submitting) { dispatch(submit()) }\n\n },\n onEmergencyCollection: (serviceId) => {\n dispatch(requestEmergencyCollection(serviceId))\n }\n }\n}\n\nIssueList = connect(\n mapStateToProps,\n mapDispatchToProps\n)(IssueList)\n\n\nexport default IssueList;\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\n\nconst {\n markProcessed,\n setCurrentSpecificationVersion,\n setCurrentProductSubscriptionVersion\n} = actions\n\nconst reducer = createReducer({\n [markProcessed]: (services, {serviceId, processed}) => {\n return dotProp.merge(services, serviceId, { processed } )\n },\n [setCurrentSpecificationVersion]: (services, {serviceId, specificationVersionUuid}) => {\n return dotProp.set(services, `${serviceId}.currentSpecificationVersionUuid`, specificationVersionUuid )\n },\n [setCurrentProductSubscriptionVersion]: (services, {serviceId, productSubscriptionUuid}) => {\n return dotProp.set(services, `${serviceId}.currentProductSubscriptionVersionUuid`, productSubscriptionUuid )\n }\n},\n{})\n\n\nexport default reducer\n\n\n","import reducer from './reducer'\n\nexport { default as servicesActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport moment from 'moment'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\n\nconst {\n selectCollectionDate,\n selectCollectionDayIds,\n editDateForCollectionGroup,\n cloneNextRoutineCollection,\n markProcessed\n} = actions\n\nconst reducer = createReducer({\n [markProcessed]: (nextRoutineCollections, { collectionGroupUuid, collectionPlanSlug, processed } ) => {\n const key = `${collectionGroupUuid}-${collectionPlanSlug}`\n if(dotProp.get(nextRoutineCollections, key)) {\n return dotProp.merge(nextRoutineCollections, key, { processed } )\n } else {\n return nextRoutineCollections\n }\n },\n [selectCollectionDate]: (nextRoutineCollections, { collectionGroupUuid, collectionPlanSlug, date } ) => {\n if(date && moment(date).isBefore(moment(), 'day')) { return nextRoutineCollections }\n\n var key = `${collectionGroupUuid}-${collectionPlanSlug}`\n var nextRoutineCollection = nextRoutineCollections && nextRoutineCollections[key]\n var dayId = moment(date).day()\n var collectionDayIds = []\n\n if(nextRoutineCollection) {\n if(_.find(nextRoutineCollection.collectionDayIds, (collectionDayId) => collectionDayId == dayId)) {\n collectionDayIds = nextRoutineCollection.collectionDayIds\n }\n }\n\n const _destroy = _.isPresent(date) ? '0' : dotProp.get(nextRoutineCollections, `${key}._destroy`)\n\n return dotProp.merge(nextRoutineCollections, key, { _destroy, processed: false, resolved: false, date, collectionGroupUuid, collectionPlanSlug, collectionDayIds } )\n },\n [selectCollectionDayIds]: (nextRoutineCollections, { collectionGroupUuid, collectionPlanSlug, collectionDayIds } ) => {\n return dotProp.merge(nextRoutineCollections, `${collectionGroupUuid}-${collectionPlanSlug}`, { _destroy: '0', processed: false, resolved: false, collectionDayIds, collectionPlanSlug, collectionGroupUuid } )\n },\n [editDateForCollectionGroup]: (nextRoutineCollections, { collectionGroupUuid, collectionPlanSlug } ) => {\n return dotProp.set(nextRoutineCollections, `${collectionGroupUuid}-${collectionPlanSlug}`, { processed: false, resolved: false, collectionDayIds: [], collectionPlanSlug, collectionGroupUuid, date: null } )\n },\n [cloneNextRoutineCollection]: (nextRoutineCollections, { collectionGroupUuid, collectionPlanSlug, newCollectionGroupUuid }) => {\n const toClone = _.pick(dotProp.get(nextRoutineCollections, `${collectionGroupUuid}-${collectionPlanSlug}`), ['date', 'collectionPlanSlug', 'collectionDayIds'])\n return dotProp.set(nextRoutineCollections, `${newCollectionGroupUuid}-${collectionPlanSlug}`, { ...toClone, errors: {}, closed: false, processed: false, resolved: false, collectionGroupUuid: newCollectionGroupUuid } )\n },\n //[editNextRoutineCollection]: (outcomes, { collectionGroupUuid, collectionPlanSlug, date, collectionDayIds }) => {\n //return dotProp.merge(markEdited(outcomes), `nextRoutineCollections.${collectionGroupUuid}-${collectionPlanSlug}`, { _destroy: '0', date, collectionDayIds, collectionPlanSlug, collectionGroupUuid } )\n //},\n },\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as nextRoutineCollectionsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport moment from 'moment'\nimport dotProp from 'dot-prop-immutable'\n\nconst {\n setNoDeliveryOption,\n setDeliveryDate,\n markProcessed,\n setStartDate\n} = actions\n\nconst reducer = createReducer({\n [markProcessed]: (newServiceIssues, { serviceId, processed }) => {\n return dotProp.merge(newServiceIssues, serviceId, { processed } )\n },\n [setDeliveryDate]: (newServiceIssues, { serviceId, deliveryDate }) => {\n return dotProp.merge(newServiceIssues, serviceId, { deliveryDate, processed: false, resolved: false } )\n },\n [setStartDate]: (newServiceIssues, { serviceId, confirmedToStartDate }) => {\n return dotProp.merge(newServiceIssues, serviceId, { confirmedToStartDate, processed: false, resolved: false } )\n },\n [setNoDeliveryOption]: (newServiceIssues, { serviceId, noDelivery }) => {\n return dotProp.merge(newServiceIssues, serviceId, { noDelivery, processed: false, resolved: false } )\n },\n },\n{})\n\nexport default reducer\n","import reducer from './reducer'\n\nexport { default as newServiceIssuesActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport nextRoutineCollectionsActions from '../nextRoutineCollections/actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\nimport { getSpecificationByCollectionGroupUuid } from './selectors'\nimport createGuid from 'createGuid'\nimport moment from 'moment'\nimport _ from 'lodashExtended'\n//var uuid = require('uuid4');\n//var { getTempId } = require('../actions/api')\n\n//var markEdited = (outcomes) => dotProp.set(outcomes, `saved`, false )\n\n\nvar d = dotProp\n\nconst {\n selectCollectionGroup,\n removeSpecBin,\n selectSpecQuantity,\n addBinToCollectionGroup,\n markProcessed,\n addSpecification,\n initializeSpecification,\n setConfirmedByVendorOn,\n destroySpecification,\n} = actions\n\nconst reducer = createReducer({\n [markProcessed]: (specifications, { specificationUuid, processed }) => {\n if (!dotProp.get(specifications, `${specificationUuid}.closed`)) {\n return dotProp.merge(specifications, specificationUuid, { processed } )\n } else {\n return specifications\n }\n },\n [setConfirmedByVendorOn]: (specifications, { specificationUuid, confirmedByVendorOn }) => {\n return dotProp.merge(specifications, specificationUuid, { confirmedByVendorOn, processed: false, resolved: false } )\n },\n [addSpecification]: (specifications, { newSpecification }) => {\n return dotProp.set(specifications, newSpecification.uuid, newSpecification)\n },\n [destroySpecification]: (specifications, { specificationUuid }) => {\n return dotProp.merge(specifications, specificationUuid, { '_destroy': '1' })\n },\n [initializeSpecification]: (specifications, { serviceId, newSpecificationUuid }) => {\n var collectionGroups = {}\n var newCollectionGroupUuid = createGuid()\n\n collectionGroups[newCollectionGroupUuid] = {\n uuid: newCollectionGroupUuid,\n collectionPlanSlug: null,\n collectionPlanSlugRequired: false,\n unitSpecifications: {}\n }\n\n return dotProp.set(specifications, newSpecificationUuid, {\n uuid: newSpecificationUuid,\n collectionGroups,\n processed: false,\n resolved: false,\n closed: false,\n serviceId,\n errors: {}\n })\n },\n\n [selectCollectionGroup]: (specifications, { collectionGroupUuid, collectionPlan }) => {\n const specification = getSpecificationByCollectionGroupUuid(collectionGroupUuid, specifications)\n const modifiedSpecifications = dotProp.merge(specifications,\n `${specification.uuid}.collectionGroups.${collectionGroupUuid}`, { collectionPlanSlug: collectionPlan.slug, ...\n _.pick(collectionPlan, ['timesPerWeek', 'interval', 'hasRoutineCollections']) })\n return dotProp.merge(modifiedSpecifications, specification.uuid, { processed: false, resolved: false })\n },\n [selectSpecQuantity]: (specifications, { collectionGroupUuid, binTypeId, quantity }) => {\n quantity = parseInt(quantity)\n if (quantity <= 0) { return specifications }\n const specification = getSpecificationByCollectionGroupUuid(collectionGroupUuid, specifications)\n var groupKey = `${specification.uuid}.collectionGroups.${collectionGroupUuid}`\n\n const modifiedSpecifications = dotProp.merge(specifications, `${groupKey}.unitSpecifications.${binTypeId}`, { quantity } )\n return dotProp.merge(modifiedSpecifications, specification.uuid, { processed: false, resolved: false })\n },\n [addBinToCollectionGroup]: (specifications, { specificationUuid, collectionGroupUuid = createGuid(), binTypeId }) => {\n var groupKey = `${specificationUuid}.collectionGroups.${collectionGroupUuid}`\n\n var newSpecifications = specifications\n if (_.isBlank(dotProp.get(specifications, groupKey))) {\n //add the collection group if doesnt exist\n newSpecifications = dotProp.set(newSpecifications, groupKey, { uuid: collectionGroupUuid,\n currentCollectionPlanSlug: null, collectionPlanSlug: null, unitSpecifications: {}})\n }\n\n if (!_.isEmpty(dotProp.get(newSpecifications, `${groupKey}.unitSpecifications`))) {\n //bring the collection group back to life (if it was previously marked for destroy)\n newSpecifications = dotProp.merge(newSpecifications, groupKey, { _destroy: '0' })\n }\n\n var binKey = `${groupKey}.unitSpecifications.${binTypeId}`\n if (_.isPresent(dotProp.get(newSpecifications, binKey))) {\n //bin is already there\n if (dotProp.get(newSpecifications, `${binKey}.quantity`) === 0) {\n return dotProp.merge(newSpecifications, binKey, { binTypeId, quantity: 1 })\n } else {\n return newSpecifications\n }\n } else {\n //add the bin\n newSpecifications = dotProp.set(newSpecifications, binKey, { binTypeId, quantity: 1, currentQuantity: 0 })\n }\n return dotProp.merge(newSpecifications, specificationUuid, { processed: false, resolved: false })\n },\n [removeSpecBin]: (specifications, { collectionGroupUuid, binTypeId }) => {\n const specification = getSpecificationByCollectionGroupUuid(collectionGroupUuid, specifications)\n const groupKey = `${specification.uuid}.collectionGroups.${collectionGroupUuid}`\n const binSpecKey = `${groupKey}.unitSpecifications.${binTypeId}`\n if (_.isPresent(dotProp.get(specifications, binSpecKey))) {\n var newSpecifications = dotProp.delete(specifications, binSpecKey)\n if (_.isEmpty(dotProp.get(newSpecifications, `${groupKey}.unitSpecifications`))) {\n //destroy collection group if there are no bins left\n newSpecifications = dotProp.merge(newSpecifications, groupKey, { _destroy: '1' })\n }\n if (_(dotProp.get(newSpecifications, `${specification.uuid}.collectionGroups`)).reject({ _destroy: '1' }).isEmpty()) {\n //dont allow the removal of all bins in a spec\n return specifications\n //newSpecifications = dotProp.merge(newSpecifications, specification.uuid, { _destroy: '1' })\n }\n return dotProp.merge(newSpecifications, specification.uuid, { processed: false, resolved: false })\n } else {\n return specifications\n }\n },\n //[nextRoutineCollectionsActions.editDateForCollectionGroup]: (specifications, {collectionGroupUuid, requestedNewCollectionDateAt}) => {\n //const specification = getSpecificationByCollectionGroupUuid(collectionGroupUuid, specifications)\n //const modifiedSpecifications = dotProp.merge(specifications, `${specification.uuid}.collectionGroups.${collectionGroupUuid}`, { requestedNewCollectionDateAt } )\n //return dotProp.merge(modifiedSpecifications, specification.uuid, { processed: false, resolved: false })\n //}\n}, {})\n\nexport default reducer\n\n\n\n","import reducer from './reducer'\n\nexport { default as specificationsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport moment from 'moment'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\nimport { getTempId } from 'sharedUtils'\n\nconst {\n newReport,\n updateReport,\n markForDestruction,\n markProcessed\n\n} = actions\n\nconst reducer = createReducer({\n [markProcessed]: (missedCollectionReports, { reportId, processed } ) => {\n return dotProp.merge(missedCollectionReports, reportId, { processed } )\n },\n[newReport]: (missedCollectionReports, { serviceId } ) => {\n const id = getTempId()\n\n const newAttr = {\n id,\n serviceId,\n processed: false,\n resolved: false,\n closed: false,\n missedDate: null,\n reasonId: null,\n reportedByStakeholderId: null,\n retryDate: null,\n retryCollection: true,\n reportedOn: moment().format(),\n disputeCharge: null,\n }\n\n return dotProp.set(missedCollectionReports, id, newAttr )\n },\n\n [updateReport]: (missedCollectionReports, { reportId, ...newAttribs}) => {\n return dotProp.merge(missedCollectionReports, reportId, { ...newAttribs, processed: false, resolved: false } )\n },\n [markForDestruction]: (missedCollectionReports, { reportId }) => {\n return dotProp.merge(missedCollectionReports, reportId, { _destroy: '1', processed: false, resolved: false } )\n }\n },\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as missedCollectionReportsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport moment from 'moment'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\nimport { getTempId } from 'sharedUtils'\n\n\n\nconst {\n markProcessed,\n generateInvoice,\n selectProductQuantity,\n addProduct,\n removeProduct,\n setConfirmedByVendorOn,\n newInstruction\n} = actions\n\nconst reducer = createReducer({\n [markProcessed]: (supplyProductInstructions, { id, processed } ) => {\n return dotProp.merge(supplyProductInstructions, id, { processed } )\n },\n [setConfirmedByVendorOn]: (supplyProductInstructions, { id, confirmedByVendorOn } ) => {\n return dotProp.merge(supplyProductInstructions, id, { processed: false, resolved: false, confirmedByVendorOn } )\n },\n [generateInvoice]: (supplyProductInstructions, { id } ) => {\n return dotProp.merge(supplyProductInstructions, id, { processed: false, resolved: false, generateInvoice: true } )\n },\n [selectProductQuantity]: (supplyProductInstructions, { id, productTypeId, quantity } ) => {\n quantity = parseInt(quantity)\n if(quantity <= 0) { return supplyProductInstructions }\n supplyProductInstructions = dotProp.merge(supplyProductInstructions, `${id}.productSpecifications.${productTypeId}`, { quantity, productTypeId })\n return dotProp.merge(supplyProductInstructions, id, { processed: false, resolved: false } )\n },\n [addProduct]: (supplyProductInstructions, { id, productTypeId } ) => {\n if(_.isPresent(dotProp.get(supplyProductInstructions, `${id}.productSpecifications.${productTypeId}`))) {\n //already added, do nothing\n return supplyProductInstructions\n } else {\n supplyProductInstructions = dotProp.set(supplyProductInstructions, `${id}.productSpecifications.${productTypeId}`, { quantity: 1, productTypeId })\n return dotProp.merge(supplyProductInstructions, id, { processed: false, resolved: false } )\n }\n },\n [removeProduct]: (supplyProductInstructions, { id, productTypeId } ) => {\n supplyProductInstructions = dotProp.delete(supplyProductInstructions, `${id}.productSpecifications.${productTypeId}`)\n return dotProp.merge(supplyProductInstructions, id, { processed: false, resolved: false } )\n },\n [newInstruction]: (supplyProductInstructions, { vendorServiceId, vendorAccountId, locationId, availableProductTypeIds } ) => {\n const id = getTempId()\n\n const newAttr = {\n id,\n vendorServiceId,\n locationId,\n vendorAccountId,\n processed: false,\n resolved: false,\n closed: false,\n prepaid: false,\n confirmedByVendorOn: null,\n availableProductTypeIds,\n productSpecifications: {}\n }\n\n return dotProp.set(supplyProductInstructions, id, newAttr )\n }\n },\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as supplyProductInstructionsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport moment from 'moment'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\n\n\nconst {\n markProcessed,\n selectProductQuantity,\n addProduct,\n removeProduct,\n cloneSubscription,\n setConfirmedByVendorOn\n} = actions\n\nconst reducer = createReducer({\n [markProcessed]: (productSubscriptions, { uuid, processed } ) => {\n return dotProp.merge(productSubscriptions, uuid, { processed } )\n },\n [setConfirmedByVendorOn]: (productSubscriptions, { uuid, confirmedByVendorOn } ) => {\n return dotProp.merge(productSubscriptions, uuid, { processed: false, resolved: false, confirmedByVendorOn } )\n },\n [selectProductQuantity]: (productSubscriptions, { uuid, productTypeId, quantity } ) => {\n quantity = parseInt(quantity)\n if(quantity <= 0) { return productSubscriptions }\n productSubscriptions = dotProp.merge(productSubscriptions, `${uuid}.productSpecifications.${productTypeId}`, { quantity, productTypeId })\n return dotProp.merge(productSubscriptions, uuid, { processed: false, resolved: false } )\n },\n [addProduct]: (productSubscriptions, { uuid, productTypeId } ) => {\n if(_.isPresent(dotProp.get(productSubscriptions, `${uuid}.productSpecifications.${productTypeId}`))) {\n //already added, do nothing\n return productSubscriptions\n } else {\n productSubscriptions = dotProp.set(productSubscriptions, `${uuid}.productSpecifications.${productTypeId}`, { quantity: 1, productTypeId })\n return dotProp.merge(productSubscriptions, uuid, { processed: false, resolved: false } )\n }\n },\n [removeProduct]: (productSubscriptions, { uuid, productTypeId } ) => {\n productSubscriptions = dotProp.delete(productSubscriptions, `${uuid}.productSpecifications.${productTypeId}`)\n return dotProp.merge(productSubscriptions, uuid, { processed: false, resolved: false } )\n },\n [cloneSubscription]: (productSubscriptions, { cloneSubscriptionUuid, newSubscriptionUuid } ) => {\n\n var { productSpecifications, serviceId } = productSubscriptions[cloneSubscriptionUuid]\n\n return dotProp.set(productSubscriptions, newSubscriptionUuid, {\n uuid: newSubscriptionUuid ,\n productSpecifications,\n processed: false,\n resolved: false,\n closed: false,\n serviceId,\n errors: {}\n } )\n\n return dotProp.merge(productSubscriptions, uuid, { processed: false, resolved: false } )\n },\n\n },\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as productSubscriptionsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport moment from 'moment'\nimport dotProp from 'dot-prop-immutable'\n\nconst {\n markProcessed,\n update,\n} = actions\n\nconst reducer = createReducer({\n [markProcessed]: (fixedCollectionTimes, { serviceId, processed } ) => {\n return dotProp.merge(fixedCollectionTimes, serviceId, { processed } )\n },\n [update]: (fixedCollectionTimes, { serviceId, ...update } ) => {\n return dotProp.merge(fixedCollectionTimes, serviceId, { ...update, processed: false, resolved: false } )\n }\n},\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as fixedCollectionTimesActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport moment from 'moment'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\nimport { getTempId } from 'sharedUtils'\n\n\nconst {\n markProcessed,\n newBooking,\n setClearAllPolicy,\n selectBinQuantity,\n addBin,\n removeBin,\n setDate,\n setRequestDate,\n markForDestroy\n} = actions\n\nconst reducer = createReducer({\n [markProcessed]: (adhocCollectionBookings, { id, processed } ) => {\n return dotProp.merge(adhocCollectionBookings, id, { processed } )\n },\n [setDate]: (adhocCollectionBookings, { id, date } ) => {\n return dotProp.merge(adhocCollectionBookings, id, { date, processed: false, resolved: false } )\n },\n [setRequestDate]: (adhocCollectionBookings, { id, requestedOn } ) => {\n return dotProp.merge(adhocCollectionBookings, id, { requestedOn, processed: false, resolved: false } )\n },\n [markForDestroy]: (adhocCollectionBookings, { id } ) => {\n return dotProp.merge(adhocCollectionBookings, id, { '_destroy': '1' } )\n },\n [newBooking]: (adhocCollectionBookings, { serviceId, unitSpecifications } ) => {\n const id = getTempId()\n\n unitSpecifications = unitSpecifications || {}\n\n const newAttr = {\n id,\n serviceId,\n date: null,\n requestedOn: moment().format(),\n clearAll: _.isEmpty(unitSpecifications),\n processed: false,\n resolved: false,\n closed: false,\n unitSpecifications\n }\n\n return dotProp.set(adhocCollectionBookings, id, newAttr )\n },\n [setClearAllPolicy]: (adhocCollectionBookings, { id, clearAll } ) => {\n return dotProp.merge(adhocCollectionBookings, id, { clearAll } )\n },\n [selectBinQuantity]: (adhocCollectionBookings, { id, binTypeId, quantity } ) => {\n quantity = parseInt(quantity)\n if(quantity <= 0) { return adhocCollectionBookings }\n adhocCollectionBookings = dotProp.merge(adhocCollectionBookings, `${id}.unitSpecifications.${binTypeId}`, { quantity, binTypeId })\n return dotProp.merge(adhocCollectionBookings, id, { processed: false, resolved: false } )\n },\n [addBin]: (adhocCollectionBookings, { id, binTypeId } ) => {\n if(_.isPresent(dotProp.get(adhocCollectionBookings, `${id}.unitSpecifications.${binTypeId}`))) {\n //already added, do nothing\n return adhocCollectionBookings\n } else {\n adhocCollectionBookings = dotProp.set(adhocCollectionBookings, `${id}.unitSpecifications.${binTypeId}`, { quantity: 1, binTypeId })\n return dotProp.merge(adhocCollectionBookings, id, { processed: false, resolved: false } )\n }\n },\n [removeBin]: (adhocCollectionBookings, { id, binTypeId } ) => {\n adhocCollectionBookings = dotProp.delete(adhocCollectionBookings, `${id}.unitSpecifications.${binTypeId}`)\n return dotProp.merge(adhocCollectionBookings, id, { processed: false, resolved: false } )\n },\n},\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as adhocCollectionBookingsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport moment from 'moment'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\nimport { getTempId } from 'sharedUtils'\n\n\nconst {\n markProcessed,\n newBooking,\n setClearAllPolicy,\n setStatus,\n selectBinQuantity,\n addBin,\n removeBin,\n setDate,\n setRequestDate,\n markForDestroy\n} = actions\n\nconst reducer = createReducer({\n [markProcessed]: (emergencyCollectionBookings, { id, processed } ) => {\n return dotProp.merge(emergencyCollectionBookings, id, { processed } )\n },\n [setDate]: (emergencyCollectionBookings, { id, date } ) => {\n return dotProp.merge(emergencyCollectionBookings, id, { date, processed: false, resolved: false } )\n },\n [setRequestDate]: (emergencyCollectionBookings, { id, requestedOn } ) => {\n return dotProp.merge(emergencyCollectionBookings, id, { requestedOn, processed: false, resolved: false } )\n },\n [markForDestroy]: (emergencyCollectionBookings, { id } ) => {\n return dotProp.merge(emergencyCollectionBookings, id, { '_destroy': '1' } )\n },\n [setClearAllPolicy]: (emergencyCollectionBookings, { id, clearAll } ) => {\n return dotProp.merge(emergencyCollectionBookings, id, { clearAll } )\n },\n [setStatus]: (emergencyCollectionBookings, { id, status } ) => {\n return dotProp.merge(emergencyCollectionBookings, id, { status } )\n },\n [selectBinQuantity]: (emergencyCollectionBookings, { id, binTypeId, quantity } ) => {\n quantity = parseInt(quantity)\n if(quantity <= 0) { return emergencyCollectionBookings }\n emergencyCollectionBookings = dotProp.merge(emergencyCollectionBookings, `${id}.unitSpecifications.${binTypeId}`, { quantity, binTypeId })\n return dotProp.merge(emergencyCollectionBookings, id, { processed: false, resolved: false } )\n },\n [addBin]: (emergencyCollectionBookings, { id, binTypeId } ) => {\n if(_.isPresent(dotProp.get(emergencyCollectionBookings, `${id}.unitSpecifications.${binTypeId}`))) {\n //already added, do nothing\n return emergencyCollectionBookings\n } else {\n emergencyCollectionBookings = dotProp.set(emergencyCollectionBookings, `${id}.unitSpecifications.${binTypeId}`, { quantity: 1, binTypeId })\n return dotProp.merge(emergencyCollectionBookings, id, { processed: false, resolved: false } )\n }\n },\n [removeBin]: (emergencyCollectionBookings, { id, binTypeId } ) => {\n emergencyCollectionBookings = dotProp.delete(emergencyCollectionBookings, `${id}.unitSpecifications.${binTypeId}`)\n return dotProp.merge(emergencyCollectionBookings, id, { processed: false, resolved: false } )\n },\n},\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as emergencyCollectionBookingsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport moment from 'moment'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\nimport { getTempId } from 'sharedUtils'\n\n\nconst {\n markProcessed,\n markResolved,\n newIssue,\n updateIssue,\n markForDestroy\n} = actions\n\nconst reducer = createReducer({\n [markProcessed]: (generalIssues, { id, processed } ) => {\n return dotProp.merge(generalIssues, id, { processed, resolved: false, closed: false } )\n },\n [markResolved]: (generalIssues, { id, resolved } ) => {\n return dotProp.merge(generalIssues, id, { resolved } )\n },\n [markForDestroy]: (generalIssues, { id } ) => {\n return dotProp.merge(generalIssues, id, { '_destroy': '1' } )\n },\n [newIssue]: (generalIssues) => {\n const id = getTempId()\n const newAttr = {\n id,\n headline: null,\n solutionDetails: null,\n problemDetails: null,\n processed: false,\n resolved: false,\n closed: false,\n isNew: true\n }\n return dotProp.set(generalIssues, id, newAttr )\n },\n [updateIssue]: (generalIssues, { id, newAttr } ) => {\n return dotProp.merge(generalIssues, id, { ...newAttr, id, processed: false, resolved: false } )\n }\n},\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as generalIssuesActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport moment from 'moment'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\n\nconst {\n markProcessed,\n terminateService,\n cancelTerminateService,\n setFinalCollectionDate,\n setNoFinalCollection,\n markForDestroy\n} = actions\n\nconst reducer = createReducer({\n [markProcessed]: (terminateServiceIssues, { serviceId, processed }) => {\n return dotProp.merge(terminateServiceIssues, serviceId, { processed })\n },\n [markForDestroy]: (terminateServiceIssues, { serviceId }) => {\n return dotProp.merge(terminateServiceIssues, serviceId, { '_destroy': '1' })\n },\n [terminateService]: (terminateServiceIssues, { serviceId }) => {\n const newAttr = { serviceId, noFinalCollection: false, finalCollectionDate: null, processed: false, closed: false,\n resolved: false }\n\n return dotProp.set(terminateServiceIssues, serviceId, newAttr)\n },\n [cancelTerminateService]: (terminateServiceIssues, { serviceId }) => { if (dotProp.get(terminateServiceIssues,\n `${serviceId}.id`)) { return terminateServiceIssues } else { return dotProp.delete(terminateServiceIssues, serviceId) }\n },\n [setNoFinalCollection]: (terminateServiceIssues, { serviceId, noFinalCollection }) => {\n return dotProp.merge(terminateServiceIssues, serviceId, { noFinalCollection, processed: false, resolved: false })\n },\n [setFinalCollectionDate]: (terminateServiceIssues, { serviceId, finalCollectionDate }) => {\n return dotProp.merge(terminateServiceIssues, serviceId, { finalCollectionDate, processed: false, resolved: false})\n }\n}, {})\n\nexport default reducer\n","import reducer from './reducer'\n\nexport { default as terminateServiceIssuesActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport moment from 'moment'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\nimport { getTempId } from 'sharedUtils'\n\n\nconst {\n markProcessed,\n newDelivery,\n setClearAllPolicy,\n selectBinQuantity,\n addBin,\n removeBin,\n setDate,\n setMissed,\n setRequestDate,\n markForDestroy\n} = actions\n\nconst reducer = createReducer({\n [markProcessed]: (binDeliveries, { id, processed } ) => {\n return dotProp.merge(binDeliveries, id, { processed } )\n },\n [setDate]: (binDeliveries, { id, date } ) => {\n let newArgs = { date, processed: false, resolved: false }\n if((date && moment().diff(moment(date), 'days') < 0)) {\n //cant be missed if the date is set to future\n newArgs['missed'] = null\n }\n return dotProp.merge(binDeliveries, id, newArgs )\n },\n [setMissed]: (binDeliveries, { id, missed } ) => {\n return dotProp.merge(binDeliveries, id, { missed } )\n },\n [setRequestDate]: (binDeliveries, { id, requestedOn } ) => {\n return dotProp.merge(binDeliveries, id, { requestedOn, processed: false, resolved: false } )\n },\n [markForDestroy]: (binDeliveries, { id } ) => {\n return dotProp.merge(binDeliveries, id, { '_destroy': '1' } )\n },\n [newDelivery]: (binDeliveries, { serviceId, unitSpecifications } ) => {\n const id = getTempId()\n\n unitSpecifications = unitSpecifications || {}\n\n const newAttr = {\n id,\n serviceId,\n date: null,\n requestedOn: moment().format(),\n processed: false,\n resolved: false,\n closed: false,\n missed: null,\n unitSpecifications\n }\n\n return dotProp.set(binDeliveries, id, newAttr )\n },\n [setClearAllPolicy]: (binDeliveries, { id, clearAll } ) => {\n return dotProp.merge(binDeliveries, id, { clearAll } )\n },\n [selectBinQuantity]: (binDeliveries, { id, binTypeId, quantity } ) => {\n quantity = parseInt(quantity)\n if(quantity <= 0) { return binDeliveries }\n binDeliveries = dotProp.merge(binDeliveries, `${id}.unitSpecifications.${binTypeId}`, { quantity, binTypeId })\n return dotProp.merge(binDeliveries, id, { processed: false, resolved: false } )\n },\n [addBin]: (binDeliveries, { id, binTypeId } ) => {\n if(_.isPresent(dotProp.get(binDeliveries, `${id}.unitSpecifications.${binTypeId}`))) {\n //already added, do nothing\n return binDeliveries\n } else {\n binDeliveries = dotProp.set(binDeliveries, `${id}.unitSpecifications.${binTypeId}`, { quantity: 1, binTypeId })\n return dotProp.merge(binDeliveries, id, { processed: false, resolved: false } )\n }\n },\n [removeBin]: (binDeliveries, { id, binTypeId } ) => {\n binDeliveries = dotProp.delete(binDeliveries, `${id}.unitSpecifications.${binTypeId}`)\n return dotProp.merge(binDeliveries, id, { processed: false, resolved: false } )\n },\n},\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as binDeliveriesActions } from \"./actions\";\n\nexport default reducer\n","import { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable';\nimport _ from 'lodashExtended'\nimport actions from './actions'\nimport { servicesActions } from '../services';\nimport { nextRoutineCollectionsActions} from '../nextRoutineCollections';\nimport { specificationsActions } from '../specifications';\nimport { newServiceIssuesActions } from '../newServiceIssues';\nimport { missedCollectionReportsActions } from '../missedCollectionReports';\nimport { supplyProductInstructionsActions } from '../supplyProductInstructions';\nimport { productSubscriptionsActions } from '../productSubscriptions';\nimport { fixedCollectionTimesActions } from '../fixedCollectionTimes';\nimport { adhocCollectionBookingsActions } from '../adhocCollectionBookings';\nimport { generalIssuesActions } from '../generalIssues';\nimport { terminateServiceIssuesActions } from '../terminateServiceIssues';\nimport { binDeliveriesActions } from '../binDeliveries';\nimport { emergencyCollectionBookingsActions } from '../emergencyCollectionBookings';\n\nconst {\n submitStart,\n submitSuccess,\n submitError,\n updateApiFromServer,\n serverError\n} = actions\n\nlet reducerArgs = {\n [submitStart]: (apiState) => {\n return dotProp.set(apiState, `submitting`, true )\n },\n [submitSuccess]: (apiState) => {\n return dotProp.set(apiState, `submitting`, false )\n },\n [serverError]: (apiState) => {\n return dotProp.set(apiState, `submitting`, false )\n },\n [submitError]: (apiState) => {\n return {...apiState, submitting: false, errors: true }\n },\n [updateApiFromServer]: (apiState, newApiState) => {\n return newApiState\n }\n}\n\nconst setUnsaved = (apiState, _) => dotProp.set(apiState, `saved`, false)\n\n_([\n _.values(servicesActions),\n _.values(nextRoutineCollectionsActions),\n _.values(specificationsActions),\n _.values(newServiceIssuesActions),\n _.values(missedCollectionReportsActions),\n _.values(supplyProductInstructionsActions),\n _.values(productSubscriptionsActions),\n _.values(fixedCollectionTimesActions),\n _.values(adhocCollectionBookingsActions),\n _.values(generalIssuesActions),\n _.values(terminateServiceIssuesActions),\n _.values(binDeliveriesActions),\n _.values(emergencyCollectionBookingsActions),\n]).flatten().each((action) => reducerArgs[action] = setUnsaved)\n\nconst reducer = createReducer(reducerArgs, {})\n\nexport default reducer\n","import reducer from './reducer'\n\nexport { default as apiActions } from \"./actions\";\n\nexport default reducer\n","import { createReducer } from 'redux-act';\nimport { combineReducers } from 'redux';\nimport servicesReducer from './services';\nimport nextRoutineCollectionsReducer from './nextRoutineCollections';\nimport newServiceIssuesReducer from './newServiceIssues';\nimport specificationsReducer from './specifications';\nimport missedCollectionReportsReducer from './missedCollectionReports';\nimport supplyProductInstructionsReducer from './supplyProductInstructions';\nimport productSubscriptionsReducer from './productSubscriptions';\nimport fixedCollectionTimesReducer from './fixedCollectionTimes';\nimport adhocCollectionBookingsReducer from './adhocCollectionBookings';\nimport emergencyCollectionBookingsReducer from './emergencyCollectionBookings';\nimport generalIssuesReducer from './generalIssues';\nimport terminateServiceIssuesReducer from './terminateServiceIssues';\nimport binDeliveriesReducer from './binDeliveries';\nimport apiReducer from './api';\nimport apiActions from './api/actions';\nimport reduceReducers from 'reduce-reducers'\n\n\nconst issuesUpdateReducer = createReducer({\n [apiActions.updateIssuesFromServer]: (issues, newIssues) => {\n return newIssues\n }\n},\n{})\n\nconst issuesReducer = reduceReducers(\n issuesUpdateReducer,\n combineReducers({\n services: servicesReducer,\n nextRoutineCollections: nextRoutineCollectionsReducer,\n specifications: specificationsReducer,\n newServiceIssues: newServiceIssuesReducer,\n missedCollectionReports: missedCollectionReportsReducer,\n supplyProductInstructions: supplyProductInstructionsReducer,\n productSubscriptions: productSubscriptionsReducer,\n fixedCollectionTimes: fixedCollectionTimesReducer,\n adhocCollectionBookings: adhocCollectionBookingsReducer,\n emergencyCollectionBookings: emergencyCollectionBookingsReducer,\n generalIssues: generalIssuesReducer,\n terminateServiceIssues: terminateServiceIssuesReducer,\n binDeliveries: binDeliveriesReducer,\n })\n)\n\nconst rootReducer = (state = {}, action) => {\n\n return {\n ...state,\n api: apiReducer(state.api, action),\n issues: issuesReducer(state.issues, action)\n }\n\n}\n\nexport default rootReducer\n","import React from \"react\"\nimport { Provider } from 'react-redux';\nimport { RootNode, configureStore } from '../apps/issues'\n\nexport default (props) => {\n return (\n <Provider store={configureStore(props)}>\n <RootNode/>\n </Provider>\n );\n}\n\n","import { createStore, applyMiddleware } from 'redux';\nimport rootReducer from './reducer'\nimport thunk from 'redux-thunk'\nimport { composeWithDevTools } from 'redux-devtools-extension';\n\nexport default function configureStore(initialState) {\n\n const store = createStore(rootReducer,\n initialState,\n composeWithDevTools(applyMiddleware(thunk)));\n\n if (module.hot) {\n module.hot.accept('./reducer', () => {\n const nextRootReducer = require('./reducer').default;\n store.replaceReducer(nextRootReducer);\n });\n }\n\n return store;\n}\n","import _ from 'lodashExtended'\nimport { createSelector } from 'reselect'\n\nconst getLineItem = (id, state) => {\n return state.lineItems.byId[id]\n}\n\nconst getLineItems = (state) => {\n return Object.values(state.lineItems.byId)\n}\n\nconst getLineItemsForLocation = (locationId, state) => {\n return _.filter(getLineItems(state), {locationId })\n}\n\n//const getLineItemsByLocationDate = createSelector(\n //[ getLineItems ],\n //( lineItems ) => _.groupByRecursive(lineItems, ['locationId', 'date'])\n//)\n\nconst getUnmatchedLineItemsByLocationDate = createSelector(\n [ getLineItems ],\n ( lineItems ) => _.groupByRecursive(_.reject(lineItems, 'agreementId'), ['locationId', 'date'])\n)\n\n\nconst getLineItemsByAgreement = createSelector(\n [ getLineItems ],\n ( lineItems ) => _.groupBy(lineItems, (item) => item.agreementId || 'unmatched' )\n)\n\nconst getLineItemsPendingSubmit = (state) => {\n return _(getLineItems(state)).filter({saved: false}).reject({submitting: true}).value()\n}\n\nconst getMatchCount = (locationIds, state) => {\n var lineItems = _.filter(getLineItems(state), ({locationId, validatedManually}) => _.includes(locationIds, locationId) && !validatedManually )\n var lineItemsByLocationId = _.groupBy(lineItems, 'locationId')\n var matchedCount = _.countBy(lineItemsByLocationId, (items, location) => _.every(items, 'agreementId'))\n return {\n totalCount: _.keys(lineItemsByLocationId).length,\n matchedCount: (matchedCount[true] || 0),\n unMatchedCount: (matchedCount[false] || 0)\n }\n}\n\n//const getUnmatchedLineItems = () => createSelector(\n //[ getLineItems ],\n //( lineItems ) => _.reject(lineItems, 'agreementId')\n//)\nconst getUnmatchedLineItems = (state) => _.reject(getLineItems(state), 'agreementId') \n\nexport {\n getLineItem,\n getLineItems,\n getLineItemsForLocation,\n //getLineItemsByLocationDate,\n getLineItemsByAgreement,\n getUnmatchedLineItemsByLocationDate,\n getLineItemsPendingSubmit,\n getMatchCount,\n getUnmatchedLineItems,\n}\n","import _ from 'lodashExtended'\nimport { createSelector } from 'reselect'\nimport { getLineItems } from '../lineItems/selectors'\n\nconst getAgreement = (id, state) => {\n return state.agreements.byId[id]\n}\n\nconst getAgreements = (state) => {\n return _.values(state.agreements.byId)\n}\n\nconst getAgreementsById = (state) => {\n return state.agreements.byId\n}\n\nconst getAgreementsForLocation = (locationId, state) => {\n return _.filter(getAgreements(state), { locationId } )\n}\n\nconst getAgreementsByLocationDate = createSelector(\n [ getAgreements ],\n ( agreements ) => _.groupByRecursive(_.reject(agreements, {_destroy: '1'}), ['locationId', 'date'])\n)\n\nconst getValidationCount = (ids, state) => {\n var agreements = _.map(ids, (id) => getAgreement(id, state))\n var validatedCount = _.countBy(agreements, 'validated')\n return {\n totalCount: agreements.length,\n validatedCount: (validatedCount[true] || 0),\n unValidatedCount: (validatedCount[false] || 0)\n }\n}\n\nconst getAgreementsPendingSubmit = (state) => {\n return _(getAgreements(state)).filter({saved: false}).reject({submitting: true}).value()\n}\n\nconst getAgreementIdsForFailureReport = (failureReportId, state) => {\n return _(getAgreements(state)).filter({failureReportId}).map('id').value()\n}\n\nconst getMatchedAgreementIds = (state) => {\n return _(getLineItems(state)).map('agreementId').compact().uniq().value()\n}\n\nconst getNewAgreementForm = (locationId, date, state) => {\n return _.get(state.agreements, ['forms', 'agreement', locationId, date])\n}\n\nexport {\n getAgreement,\n getAgreements,\n getAgreementsForLocation,\n getAgreementsByLocationDate,\n getValidationCount,\n getAgreementsPendingSubmit,\n getMatchedAgreementIds,\n getNewAgreementForm,\n getAgreementIdsForFailureReport,\n}\n\n\n\n","import { createAction } from 'redux-act';\n\nconst listenKeyDown = createAction(\"capture the key down event\");\nconst unListenKeyDown = createAction(\"capture the key down event\");\nconst keyDownEvent = createAction(\"key down event has happend\", (payload, key) => { return { payload, key } });\nconst selectLocationFilter = createAction(\"select location filter\", (filter) => { return { filter } });\nconst toggleLocationOpen = createAction(\"toggle the open close location section\", (locationId, open) => { return { locationId, open } });\nconst setDisputeFilter = createAction(\"set the dispute location filter\")\nconst setManualFilter = createAction(\"set the manual location filter\")\nconst setUnmatchedFilter = createAction(\"set the unmatched location filter\")\nconst setMatchMode = createAction(\"set the match mode\")\nconst setMatchModeLocationId = createAction(\"set match mode location id\")\n\n\nexport default {\n listenKeyDown,\n unListenKeyDown,\n keyDownEvent,\n selectLocationFilter,\n toggleLocationOpen,\n setDisputeFilter,\n setManualFilter,\n setUnmatchedFilter,\n setMatchMode,\n setMatchModeLocationId\n}\n\n","import _ from 'lodashExtended'\nimport { createSelector } from 'reselect'\n\nconst getSalesLedgerItem = (id, state) => {\n return state.salesLedgerItems.byId[id]\n}\n\nconst getSalesLedgerItems = (state) => {\n return Object.values(state.salesLedgerItems.byId)\n}\n\nconst getSalesLedgerItemsById = (state) => {\n return state.salesLedgerItems.byId\n}\n\nconst getSalesLedgerItemsByAgreement = createSelector(\n [ getSalesLedgerItems ],\n ( lineItems ) => _.groupBy(lineItems, 'agreementId' )\n)\n\nconst getSalesItemsPendingSubmit = (state) => {\n return _(getSalesLedgerItems(state)).filter({saved: false}).reject({submitting: true}).value()\n}\n\nexport {\n getSalesLedgerItem,\n getSalesLedgerItems,\n getSalesLedgerItemsById,\n getSalesLedgerItemsByAgreement,\n getSalesItemsPendingSubmit\n}\n","import _ from 'lodashExtended'\nimport { createSelector } from 'reselect'\nimport { getAgreements } from '../agreements/selectors'\n\nconst getFailureReport = (id, state) => {\n return state.failureReports.byId[id]\n}\n\nconst getFailureReports = (state) => {\n return Object.values(state.failureReports.byId)\n}\nconst getFailureReportsById = (state) => {\n return state.failureReports.byId\n}\n\nconst getFailureReportsByLocationDate = createSelector(\n [ getFailureReports ],\n ( failureReports ) => _.groupByRecursive(failureReports, ['locationId', 'missedDate'])\n)\n\nconst getUnmatchedFailureReportIds = createSelector(\n [ getAgreements, getFailureReports ],\n ( agreements, failureReports ) => {\n const matchedIds = _(agreements).map('failureReportId').compact().value()\n const allIds = _(failureReports).map('id').compact().value()\n return _.difference(allIds, matchedIds)\n }\n)\n\nconst getFailureReportsPendingSubmit = (state) => {\n return _(getFailureReports(state)).filter({saved: false}).reject({submitting: true}).value()\n}\n\nexport {\n getFailureReport,\n getFailureReports,\n getFailureReportsById,\n getFailureReportsByLocationDate,\n getUnmatchedFailureReportIds,\n getFailureReportsPendingSubmit\n}\n","import _ from 'lodashExtended'\nimport { createSelector } from 'reselect'\n\n//const getHwcn = (id, state) => {\n //return state.hwcns.byId[id]\n//}\n\nconst getHwcns = (state) => {\n return Object.values(state.hwcns.byId)\n}\n\n//const getHwcnsById = (state) => {\n //return state.hwcns.byId\n//}\n\nconst getHwcnsByLocationDate = createSelector(\n [ getHwcns ],\n ( hwcns ) => _.groupByRecursive(hwcns, ['locationId', 'date'])\n)\n\n\nexport {\n getHwcnsByLocationDate,\n getHwcns,\n //getHwcnsById\n}\n","import _ from 'lodashExtended'\nimport { createSelector } from 'reselect'\n\nconst getService = (id, state) => {\n return state.services.byId[id]\n}\n\nconst getServices = (state) => {\n return Object.values(state.services.byId)\n}\n\nconst getServicesById = (state) => {\n return state.services.byId\n}\n\nconst getServicesForLocation = (locationId, state) => {\n return getServicesByLocationId(state)[locationId]\n}\n\nconst getServicesByLocationId = createSelector(\n [ getServicesById ],\n (\n servicesById,\n ) => {\n return _.groupBy(servicesById, 'locationId')\n})\n\nexport {\n getService,\n getServices,\n getServicesById,\n getServicesForLocation,\n getServicesByLocationId\n}\n","import _ from 'lodashExtended'\n\nconst getSpecification = (id, state) => {\n return state.specifications.byId[id]\n}\n\nconst getUnitSpecifications = (id, state) => {\n let specification = getSpecification(id, state) || {}\n\n return _(specification.collectionGroups || []).map(\n (cg) => {\n return _(cg.unitSpecifications).values().map((spec) => {\n return({\n collectionPlanName: cg.collectionPlanName,\n ...spec\n })\n }).value()\n }\n ).flatten().keyBy('serviceCode').value()\n}\n\nconst getSpecifications = (state) => {\n return Object.values(state.specifications.byId)\n}\nconst getSpecificationsById = (state) => {\n return state.specifications.byId\n}\n\n\nconst getSpecificationForm = (serviceId, state) => {\n return _.get(state.specifications, ['forms', 'specifications', serviceId])\n}\n\nexport {\n getSpecification,\n getSpecifications,\n getUnitSpecifications,\n getSpecificationsById,\n getSpecificationForm\n}\n","import _ from 'lodashExtended'\nimport { createSelector } from 'reselect'\nimport dotProp from 'dot-prop-immutable'\n\nconst d = dotProp\n\nconst getDisputeLedgerItem = (id, state) => {\n return getDisputeLedgerItemsById(state)[id]\n}\n\nconst getDisputeLedgerItems = (state) => {\n return Object.values(state.disputeLedgerItems.byId)\n}\n\nconst getDisputeLedgerItemsById = (state) => {\n return state.disputeLedgerItems.byId\n}\n\nconst getDisputeLedgerItemsByLineItem = createSelector(\n [ getDisputeLedgerItems ],\n ( disputeLedgerItems ) => _.groupBy(disputeLedgerItems, 'lineItemId') \n)\n\nconst getDisputeLedgerItemsForLineItem = ( state, lineItemId ) => (getDisputeLedgerItemsByLineItem(state) || {})[lineItemId] || []\n\nexport {\n getDisputeLedgerItem,\n getDisputeLedgerItems,\n getDisputeLedgerItemsById,\n getDisputeLedgerItemsByLineItem,\n getDisputeLedgerItemsForLineItem\n}\n","\nconst getVendorInvoice = (state) => {\n return state.vendorInvoice\n}\n\nconst getReconcilePolicyName = (state) => {\n return state.vendorInvoice.reconcilePolicyName\n}\n\nconst getMatchPolicyName = (state) => {\n return state.vendorInvoice.matchPolicyName\n}\n\nconst getVendorId = (state) => {\n return state.vendorInvoice.vendorId\n}\n\nconst isBilledAccount = (state) => {\n return state.vendorInvoice.billedAccount\n}\n\n\nexport {\n getVendorInvoice,\n getVendorId,\n getReconcilePolicyName,\n getMatchPolicyName,\n isBilledAccount\n}\n","import _ from 'lodashExtended'\nimport dotProp from 'dot-prop-immutable'\nimport { createSelector } from 'reselect'\nimport { getLineItemsForLocation, getUnmatchedLineItemsByLocationDate, getLineItemsByAgreement } from '../lineItems/selectors'\nimport { getSalesLedgerItemsByAgreement } from '../salesLedgerItems/selectors'\nimport { getAgreementsForLocation, getAgreementsByLocationDate, getAgreement } from '../agreements/selectors'\nimport { getUnmatchedFailureReportIds, getFailureReportsById, getFailureReportsByLocationDate } from '../failureReports/selectors'\nimport { getHwcnsByLocationDate } from '../hwcns/selectors'\nimport { getServicesById } from '../services/selectors'\nimport { getSpecificationsById } from '../specifications/selectors'\nimport { getDisputeLedgerItemsByLineItem } from '../disputeLedgerItems/selectors'\nimport { getVendorInvoice } from '../vendorInvoice/selectors'\n\nconst getLocation = (id, state) => {\n return state.locations.byId[id]\n}\n\nconst getLocations = (state) => {\n return Object.values(state.locations.byId)\n}\n\nconst getLocationIds = (state) => {\n return Object.keys(state.locations.byId)\n}\n\nconst getActivityDataForLocation = (id, state) => {\n return getActivityDataByLocationDate(state)[id]\n}\n\nconst getActivityDatesForLocation = (id, state) => {\n return _.keys(getActivityDataForLocation(id, state).dateData)\n}\n\nconst getActivityDataByLocationDate = createSelector(\n [ getAgreementsByLocationDate,\n getUnmatchedLineItemsByLocationDate,\n getFailureReportsByLocationDate,\n getHwcnsByLocationDate,\n getUnmatchedFailureReportIds,\n getLineItemsByAgreement,\n getFailureReportsById,\n getServicesById,\n //getSpecificationsById,\n getDisputeLedgerItemsByLineItem,\n getSalesLedgerItemsByAgreement,\n getVendorInvoice,\n getLocationIds\n ],\n ( agreementsByLocationDate,\n unmatchedLineItemsByLocationDate,\n failureReportsByLocationDate,\n hwcnsByLocationDate,\n unmatchedFailureReportIds,\n lineItemsByAgreement,\n failureReportsById,\n servicesById,\n //specificationsById,\n disputeLedgerItemsByLineItem,\n salesLedgerItemsByAgreement,\n vendorInvoice,\n locationIds\n ) => {\n\n var activityData = {}\n\n\n //const locationIds = _([agreementsByLocationDate, unmatchedLineItemsByLocationDate, failureReportsByLocationDate]).\n //map((x) => Object.keys(x)).flatten().without('null').compact().map(Number).value()\n\n\n _(locationIds).each((locationId) => {\n var locationData = {}\n const locationHasHwcns = _.isPresent(hwcnsByLocationDate[locationId])\n\n const dates = _([agreementsByLocationDate, unmatchedLineItemsByLocationDate, hwcnsByLocationDate, failureReportsByLocationDate]).\n map((x)=> x[locationId] ).compact().map((x) => _.keys(x)).without('null').flatten().value()\n\n _(dates).each((date) => {\n\n var dateData = {}\n let agreements = _.get(agreementsByLocationDate, [locationId, date])\n const allUnmatchedLineItems = _.get(unmatchedLineItemsByLocationDate, [locationId, date])\n const failureReports = _.get(failureReportsByLocationDate, [locationId, date])\n const hwcns = _.get(hwcnsByLocationDate, [locationId, date])\n\n const unmatchedFailureReports = _.filter(failureReports, ({id}) => _.includes(unmatchedFailureReportIds, id))\n\n const [ validatedManuallyLineItems, unmatchedLineItems] = _.partition(allUnmatchedLineItems, 'validatedManually')\n\n\n agreements = _.map(agreements, (agreement) => {\n\n //const { currentSpecificationId } = (servicesById[agreement.serviceId] || {})\n //const { specificationId: agreementSpecificationId } = agreement\n const lineItems = (lineItemsByAgreement[agreement.id] || [])\n\n const invoiceLineItems = _.filter(lineItems, {vendorInvoiceId: vendorInvoice.id } )\n\n const disputesByItem = _.pick(disputeLedgerItemsByLineItem, _.map(lineItems, 'id'))\n\n const disputeTotalCents = _(invoiceLineItems).sumBy('disputedNetTotalCents')\n const lineTotalCents = _(invoiceLineItems).sumBy('totalPriceCents')\n const inDisputeNetTotalCents = _(invoiceLineItems).sumBy('inDisputeNetTotalCents')\n const creditedNetTotalCents = _(invoiceLineItems).sumBy('creditedNetTotalCents')\n const ignoredDisputeTotalCents = _(invoiceLineItems).sumBy('ignoredDisputeTotalCents')\n\n //const specification = specificationsById[(agreementSpecificationId || currentSpecificationId)]\n\n //if(specification) {\n //specification.current = agreementSpecificationId == currentSpecificationId\n //}\n\n return {\n ...agreement,\n //specification,\n //specificationId: agreementSpecificationId || currentSpecificationId,\n //currentSpecificationId,\n lineItems,\n hasCoverageIssue: !agreement.inDataCoverage && lineItems.length > 0,\n disputeLedgerItemsByLineItem: disputesByItem,\n lineTotalCents,\n disputeTotalCents,\n creditedNetTotalCents,\n inDisputeNetTotalCents,\n ignoredDisputeTotalCents,\n salesLedgerItems: salesLedgerItemsByAgreement[agreement.id],\n failureReport: failureReportsById[agreement.failureReportId]\n }\n })\n\n const allValidated = _.isEmpty(unmatchedLineItems) && _.every(agreements, 'validated')\n const disputeTotalCents = _(agreements).sumBy('disputeTotalCents') + _(validatedManuallyLineItems).sumBy('disputedNetTotalCents')\n const inDisputeNetTotalCents = _(agreements).sumBy('inDisputeNetTotalCents') + _(validatedManuallyLineItems).sumBy('inDisputeNetTotalCents')\n const creditedNetTotalCents = _(agreements).sumBy('creditedNetTotalCents') + _(validatedManuallyLineItems).sumBy('creditedNetTotalCents')\n const ignoredDisputeTotalCents = _(agreements).sumBy('ignoredDisputeTotalCents') + _(validatedManuallyLineItems).sumBy('ignoredDisputeTotalCents')\n const lineTotalCents = _(agreements).sumBy('lineTotalCents') + _(unmatchedLineItems).sumBy('totalPriceCents') + _(validatedManuallyLineItems).sumBy('totalPriceCents')\n const hasCoverageIssue = _(agreements).some('hasCoverageIssue')\n\n\n\n let validatedManuallyLineItemsWithDisputes = _.map(\n validatedManuallyLineItems,\n (item) => {\n disputeLedgerItemsByLineItem\n return {\n ...item,\n disputeLedgerItems: disputeLedgerItemsByLineItem[item.id] || []\n }\n })\n\n\n locationData[date] = {\n date,\n locationId,\n allValidated,\n agreements,\n hwcns,\n locationHasHwcns,\n disputeTotalCents,\n inDisputeNetTotalCents,\n creditedNetTotalCents,\n ignoredDisputeTotalCents,\n lineTotalCents,\n unmatchedLineItems,\n unmatchedFailureReports,\n hasCoverageIssue,\n validatedManuallyLineItems: validatedManuallyLineItemsWithDisputes\n\n }\n })\n\n const disputeTotalCents = _(locationData).map('disputeTotalCents').sum()\n const lineTotalCents = _(locationData).map('lineTotalCents').sum()\n const inDisputeNetTotalCents = _(locationData).map('inDisputeNetTotalCents').sum()\n const creditedNetTotalCents = _(locationData).map('creditedNetTotalCents').sum()\n const ignoredDisputeTotalCents = _(locationData).map('ignoredDisputeTotalCents').sum()\n const hasCoverageIssue = _(locationData).some('hasCoverageIssue')\n\n activityData[locationId] = {\n dateData: locationData,\n disputeTotalCents,\n inDisputeNetTotalCents,\n creditedNetTotalCents,\n ignoredDisputeTotalCents,\n hasCoverageIssue,\n lineTotalCents\n }\n })\n\n return activityData\n }\n)\n\nconst getActivityDataForAgreement = (agreementId, state) => {\n const { locationId, date } = getAgreement(agreementId, state)\n return _.first(getActivityDataByLocationDate(state)[locationId].dateData[date].agreements, {id: agreementId})\n}\n\nexport {\n getLocation,\n getLocations,\n getActivityDataForLocation,\n getActivityDatesForLocation,\n getActivityDataByLocationDate,\n getActivityDataForAgreement\n}\n","import _ from 'lodashExtended'\nimport dotProp from 'dot-prop-immutable'\nimport { createSelector } from 'reselect'\nimport { getActivityDataByLocationDate } from '../locations/selectors'\n\nvar x = dotProp\nconst getKeyDownListener = (state) => dotProp.get(state, 'app.keyboard.listenKeyDown')\nconst getLocationFilter = (state) => dotProp.get(state, 'app.filters.location')\n\n\nconst getMatchModeList = (state) => state.app.matchModeList\nconst getMatchModeLocationId = (state) => state.app.matchModeLocationId\nconst inMatchMode = (state) => state.app.matchMode\n\nconst getMatchModeNavLocationIds = (state) => {\n let currentLocationId = getMatchModeLocationId(state)\n\n let unmatchedLocationIds = getUnmatchedLocationIds(state) || []\n let matchModeList = getMatchModeList(state)\n let currentIndex = _.indexOf(matchModeList, currentLocationId)\n\n let allLocationIds = _.uniq(matchModeList.concat(unmatchedLocationIds))\n let matchedLocationIds = _.difference(allLocationIds, unmatchedLocationIds)\n\n let nextLocationId = matchModeList[currentIndex+1] || _.difference(unmatchedLocationIds, matchModeList)[0]\n let backLocationId = matchModeList[currentIndex -1 ]\n\n return {\n nextLocationId,\n backLocationId,\n currentLocationId,\n matchedCount: matchedLocationIds.length,\n totalCount: allLocationIds.length,\n }\n\n}\n\nconst agreementInMoveDateMode = (agreementId, state) => {\n const { type, payload } = getKeyDownListener(state) || {}\n const { agreementId: agreementIdBeingMoved } = payload || {}\n return type == 'moveAgreementDate' && agreementId == agreementIdBeingMoved\n}\n\n//const specInEditQuantityMode = (serviceCode, agreementId, state) => {\n //const { type, payload } = getKeyDownListener(state) || {}\n //const { agreementId: payloadAgreementId, serviceCode: payloadServiceCode } = payload || {}\n //return type == 'editSpecQuantity' && agreementId == payloadAgreementId && serviceCode == payloadServiceCode\n//}\n\nconst serviceCodeInSpecEditQuantityMode = (agreementId, state) => {\n const { type, payload } = getKeyDownListener(state) || {}\n const { agreementId: payloadAgreementId, serviceCode: payloadServiceCode } = payload || {}\n return(type == 'editSpecQuantity' && agreementId == payloadAgreementId ? payloadServiceCode : null)\n}\n\nconst serviceCodeInCurrentSpecEditQuantityMode = (agreementId, state) => {\n const { type, payload } = getKeyDownListener(state) || {}\n const { agreementId: payloadAgreementId, serviceCode: payloadServiceCode } = payload || {}\n return(type == 'editCurrentSpecQuantity' && agreementId == payloadAgreementId ? payloadServiceCode : null)\n}\n\nconst lineItemInMoveDateMode = (lineItemId, state) => {\n const { type, payload } = getKeyDownListener(state) || {}\n const { lineItemId: lineItemIdBeingMoved } = payload || {}\n return type == 'moveLineItemDate' && lineItemId == lineItemIdBeingMoved\n}\n\nconst salesItemInMoveDateMode = (salesLedgerItemId, state) => {\n const { type, payload } = getKeyDownListener(state) || {}\n const { salesLedgerItemId: salesLedgerItemIdBeingMoved } = payload || {}\n return type == 'moveSalesItemAgreement' && salesLedgerItemId == salesLedgerItemIdBeingMoved\n}\n\nconst locationSectionOpen = (locationId, state) => {\n return dotProp.get(state, `app.locationSectionOpen.${locationId}`)\n}\n\nconst getDisputeLedgerItemsFilterAttr = (state) => {\n return x.get(state, `app.filters.disputeLedgerItemAttrs`)\n}\n\nconst getManualItemsFilterAttr = (state) => {\n return x.get(state, `app.filters.manualItemFilterAttrs`)\n}\n\nconst unmatchedFilterName = \"Unmatched Lines\"\n\nconst getUnmatchedLocationIds = (state) => {\n let filters = getFilteredLocations(state)\n return _.find(filters, (x) => x[0] == unmatchedFilterName)[1].locationIds\n}\n\nconst getFilteredLocations = createSelector([\n getActivityDataByLocationDate,\n getDisputeLedgerItemsFilterAttr,\n getManualItemsFilterAttr\n],\n (\n activityDataByLocationDate,\n disputeLedgerItemFilterAttrs,\n manualItemFilterAttrs\n ) => {\n\n var filters = []\n\n var filterFuncs = [\n [\"All\", () => true],\n [\"Validated\" , ({dateData}) => {\n return _(dateData).every(({ allValidated }) => allValidated )\n } ],\n [\"Unvalidated\" , ({dateData}) => {\n return _(dateData).some(({ allValidated }) => !allValidated )\n } ],\n [\"Disputed\" , ({disputeTotalCents}) => {\n return disputeTotalCents > 0\n } ],\n [\"In Dispute\" , ({inDisputeNetTotalCents}) => {\n return inDisputeNetTotalCents > 0\n } ],\n [\"Ignored Dispute\" , ({ignoredDisputeTotalCents}) => {\n return ignoredDisputeTotalCents > 0\n } ],\n [\"Credited\" , ({creditedNetTotalCents}) => {\n return creditedNetTotalCents > 0\n } ],\n [unmatchedFilterName , ({dateData}) => {\n return _(dateData).some(({unmatchedLineItems}) => unmatchedLineItems.length > 0 )\n } ],\n [\"Duplicate Agreements\" , ({dateData}) => {\n //http://localhost:3000/admin/locations/3148\n return _(dateData).some(({agreements}) => {\n return _.some(Object.values(_(agreements).groupBy(({serviceId, type}) => [serviceId, type]).value()), (x) => x.length > 1)\n })\n }],\n [\"Manual\" , ({dateData}) => {\n return _(dateData).some(({ validatedManuallyLineItems }) => validatedManuallyLineItems.length > 0 )\n } ],\n ]\n\n if(disputeLedgerItemFilterAttrs) {\n filterFuncs[filterFuncs.length] = [\"Selected Disputes\", ({dateData}) => {\n return _(dateData).some(({agreements, validatedManuallyLineItems}) => {\n let hasAgreements = _.some(agreements, ({disputeLedgerItemsByLineItem}) => {\n return _(Object.values(disputeLedgerItemsByLineItem)).flatten().some(disputeLedgerItemFilterAttrs)\n })\n\n let hasManual = _.some(validatedManuallyLineItems, ({disputeLedgerItems}) => {\n return _(disputeLedgerItems).flatten().some(disputeLedgerItemFilterAttrs)\n })\n\n return hasAgreements || hasManual\n })\n }\n ]\n }\n\n\n if(manualItemFilterAttrs) {\n\n let lineItemFilter = _.pick(manualItemFilterAttrs, ['acceptReason', 'serviceCode', 'unitPriceCents', 'vendorServiceCode'])\n lineItemFilter[\"unitPriceCents\"] = _.toNumber(lineItemFilter[\"unitPriceCents\"])\n\n let lineItemMatcher = _.matches(lineItemFilter)\n\n let disputeItemReason = _.isPresent(manualItemFilterAttrs['disputeReason']) ? manualItemFilterAttrs['disputeReason'] : null\n\n filterFuncs[filterFuncs.length] = [\"Selected Manual\", ({dateData, ...other}) => {\n\n let result = _(dateData).some(({validatedManuallyLineItems, unmatchedLineItems, ...rest}) => {\n\n //if(rest.locationId != 8897) { debugger }\n\n return _(validatedManuallyLineItems).concat(unmatchedLineItems).some((item) => {\n let matchesLineItem = lineItemMatcher(item)\n\n if(disputeItemReason) {\n\n let matchesDisputes = _.some(validatedManuallyLineItems, ({disputeLedgerItems}) => {\n return _(disputeLedgerItems).flatten().some({reason: disputeItemReason})\n })\n return matchesDisputes && matchesLineItem\n\n } else {\n return matchesLineItem\n }\n })\n\n\n })\n\n //if(result && Object.values(dateData)[0].locationId != 13207) { debugger }\n\n return result\n }\n ]\n }\n\n _.each(filterFuncs, ([filter, func]) => {\n var locationIds = []\n var agreementIds = []\n var count = 0\n _(activityDataByLocationDate).each((locationData, locationId) => {\n if(func(locationData)) {\n agreementIds = agreementIds.concat(_(locationData.dateData).map('agreements').flatten().map('id').value())\n locationIds = locationIds.concat(Number(locationId))\n count++\n }\n })\n\n filters = filters.concat([[filter, {\n locationIds,\n agreementIds,\n count\n }]])\n } )\n\n //console.log('filters', filters)\n return filters\n})\n\n\nconst getLocationFilterCounts = (state) => {\n return _.map(getFilteredLocations(state), ([filter, {count}]) => [ filter, count ] )\n}\n\nconst getCurrentFilterResults = (state) => {\n return _.fromPairs(getFilteredLocations(state))[getLocationFilter(state)]\n}\n\nexport {\n getKeyDownListener,\n getLocationFilter,\n agreementInMoveDateMode,\n getFilteredLocations,\n locationSectionOpen,\n getLocationFilterCounts,\n getCurrentFilterResults,\n serviceCodeInSpecEditQuantityMode,\n serviceCodeInCurrentSpecEditQuantityMode,\n lineItemInMoveDateMode,\n salesItemInMoveDateMode,\n inMatchMode,\n getMatchModeNavLocationIds,\n getUnmatchedLocationIds,\n}\n","const getTime = (state) => {\n return state.stats.timestamp\n}\n\nconst getStats = (state) => {\n return state.stats\n}\n\n\nexport {\n getTime,\n getStats\n}\n","import { createAction } from 'redux-act';\n\nconst submitStart = createAction(\"line item has been sent to server\", (ids) => { return( { ids } ) });\nconst submitSuccess = createAction(\"line item update success from server\", (updatedLineItems) => { return( { updatedLineItems } ) });\nconst submitError = createAction(\"line item update error from server\", (updatedLineItems) => { return( { updatedLineItems } ) });\nconst setDate = createAction(\"line item set date\", (id, date) => { return( { id, date } ) });\nconst updateFromServer = createAction(\"update the items from the server\", (updatedItems) => { return( { updatedItems } ) });\nconst loadSuccess = createAction(\"location line items have been loaded success from server\", (loadedLineItems) => { return( { loadedLineItems } ) });\n\nexport default {\n submitSuccess,\n submitError,\n submitStart,\n setDate,\n updateFromServer,\n loadSuccess\n}\n\n","import { createAction } from 'redux-act';\n\nconst submitStart = createAction(\"agreement has been sent to server\", (ids) => { return( { ids } ) });\nconst submitSuccess = createAction(\"agreement update success from server\", (updatedAgreements) => { return( { updatedAgreements } ) });\nconst submitError = createAction(\"agreement update error from server\", (updatedAgreements) => { return( { updatedAgreements } ) });\nconst setDate = createAction(\"agreement set date\", (id, date) => { return( { id, date } ) });\nconst setSpecQuantity = createAction(\"spec set quantity\", (id, serviceCode, quantity) => { return( { id, serviceCode, quantity } ) });\nconst setReconcilePolicy = createAction(\"set Reconcile Policy\", (id, reconcilePolicyName) => { return( { id, reconcilePolicyName } ) });\nconst destroy = createAction(\"agreement destroy\", (ids) => { return( { ids } ) });\nconst loadSuccess = createAction(\"agreement has been loaded success from server\", (loadedAgreements) => { return( { loadedAgreements } ) });\n\nconst setAgreementForm = createAction(\"set the form data for new collection agreement\", (locationId, date, otherArgs) => { return { otherArgs, locationId, date } } );\nconst closeAgreementForm = createAction(\"close the form for new collection agreement\", (locationId, date) => { return { locationId, date } } );\nconst setSpecAgreementForm = createAction(\"update spec for the new collection form\", (locationId, date, newSpecs) => { return { locationId, date, newSpecs } } );\nconst submitStartAgreementForm = createAction(\"start to submit the form for new collection agreement\", (locationId, date) => { return { locationId, date } } );\n\nexport default {\n submitSuccess,\n submitError,\n submitStart,\n setDate,\n setSpecQuantity,\n closeAgreementForm,\n setSpecAgreementForm,\n submitStartAgreementForm,\n setAgreementForm,\n destroy,\n setReconcilePolicy,\n loadSuccess\n}\n\n","import { createAction } from 'redux-act';\n\nconst stateLoaded = createAction(\"the state is loaded\");\n//const locationsLoaded = createAction(\"the location has been loaded\", (locationIds) => { return { locationIds } } );\n\nexport default {\n stateLoaded,\n //locationsLoaded\n}\n\n\n\n","import { createAction } from 'redux-act';\n\nconst updateFromServer = createAction(\"update the items from the server\", (updatedItems) => { return( { updatedItems } ) });\n//const deleteFromServer = createAction(\"delete the items from the server\", (deletedId) => { return( { deletedId } ) });\n\nexport default {\n updateFromServer,\n //deleteFromServer\n}\n\n","\n\n\nconst getPathAndMethod = (basePath, object) => {\n if(object._destroy == '1') {\n if(object.id) {\n return [basePath + '/' + object.id, 'DELETE']\n } else {\n return [null, null]\n }\n } else {\n if(object.id) {\n return [basePath + '/' + object.id, 'PUT']\n } else {\n return [basePath, 'POST']\n }\n }\n}\n\n\nexport {\n getPathAndMethod\n}\n","import actions from './actions'\nimport apiActions from '../api/actions'\nimport disputeActions from '../disputeLedgerItems/actions'\nimport lineItemActions from '../lineItems/actions'\nimport { getAgreementsPendingSubmit, getNewAgreementForm } from './selectors'\nimport { getService } from '../services/selectors'\nimport { matchLineItems } from '../lineItems/operations'\nimport submitToServer from 'submitToServer'\nimport { getPathAndMethod } from '../api/utils'\nimport _ from 'lodashExtended'\n\n\n// request every 1000 milliseconds. Rate limit the api request to Vector so it doesnt DoS Attack itself\nvar throttle = require('promise-ratelimit')(1000); /* rateInMilliseconds */\nvar fasterThrottle = require('promise-ratelimit')(400); /* rateInMilliseconds */\n\nconst validateAgreements = (agreementIds) => (dispatch, getState) => {\n\n const state = getState()\n const submitPath = state.api.validatePath\n _(agreementIds).chunk(8).each((ids) => {\n\n (state.api.isLondonBusinessHours ? throttle : fasterThrottle)().then( () => {\n\n dispatch(actions.submitStart(ids))\n\n submitToServer(submitPath, { agreement_ids: ids },\n (data,v) => {\n //console.log('validiate agreements', data)\n if(data.agreements) {\n dispatch(actions.submitSuccess(data.agreements.byId))\n }\n if(data.disputeLedgerItems) {\n dispatch(disputeActions.updateFromServer(data.disputeLedgerItems.byId))\n }\n if(data.lineItems) {\n dispatch(lineItemActions.updateFromServer(data.lineItems.byId))\n }\n },\n (data, status) => {\n //dispatch(actions.serverError())\n data\n alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`)\n }, { method: 'POST' })\n })\n })\n}\n\n\nconst debounceAlert = _.debounce((status) => alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`), 5000)\n\n\n\nconst toSpecificationAttributes = (specifications) => {\n var specificationsAttributes = {}\n _(specifications).toPairs().each((pair, i) => {\n specificationsAttributes[i] = _.pick(pair[1], ['serviceCode', 'quantity'])\n } )\n return specificationsAttributes\n}\n\n\nconst submitAgreements = () => (dispatch, getState) => {\n\n const state = getState()\n if(state.api) {\n const basePath = state.api.agreementsPath\n _.each(getAgreementsPendingSubmit(state), (agreement) => {\n\n const [submitPath, method] = getPathAndMethod(basePath, agreement)\n if(method) {\n dispatch(actions.submitStart([agreement.id]))\n //console.log([method, submitPath])\n //\n var specificationsAttributes = toSpecificationAttributes(agreement.specifications)\n\n var agreementToPost = {\n ..._.pick(agreement, ['date', 'reconcilePolicyName']),\n specificationsAttributes,\n }\n\n submitToServer(submitPath, { agreement: agreementToPost },\n (data,v) => {\n if(data.agreement) {\n dispatch(actions.submitSuccess({agreement: data.agreement}))\n dispatch(matchLineItems([data.agreement.locationId]))\n }\n if(data.lineItems) {\n dispatch(lineItemActions.updateFromServer(data.lineItems.byId))\n }\n },\n (data, status, e) => {\n //dispatch(actions.serverError())\n data\n debounceAlert(status)\n }, { method })\n }\n })\n }\n}\n\nconst selectServiceAgreementForm = (locationId, date, serviceId) => (dispatch, getState) => {\n var service = getService(serviceId, getState())\n dispatch(actions.setAgreementForm(locationId, date, { serviceId, ..._.pick(service, ['orderId', 'vendorServiceId', 'vendorAccountId'] ) } ))\n}\n\nconst openCollectionAgreementForm = (locationId, date, serviceId) => (dispatch, getState) => {\n\n dispatch(actions.setAgreementForm(locationId, date, { type: 'CollectionAgreement', agreedSpecifications: {} } ))\n\n if(serviceId) {\n dispatch(selectServiceAgreementForm(locationId, date, serviceId))\n }\n\n}\n\n\nconst createBlankCollectionAgreement = (locationId, date, serviceId) => (dispatch, getState) => {\n\n if(serviceId) {\n var service = getService(serviceId, getState())\n\n const formData = {\n serviceId,\n locationId,\n date,\n type: 'CollectionAgreement',\n agreedSpecifications: {},\n ..._.pick(service, ['orderId', 'vendorServiceId', 'vendorAccountId'] )\n }\n\n dispatch(submitAgreement(formData))\n }\n\n}\n\n\nconst openSupplyProductAgreementForm = (locationId, date, serviceId) => (dispatch, getState) => {\n\n dispatch(actions.setAgreementForm(locationId, date, { type: 'SupplyProductAgreement', agreedSpecifications: {} } ))\n\n if(serviceId) {\n dispatch(selectServiceAgreementForm(locationId, date, serviceId))\n }\n\n}\n\nconst submitAgreementForm = (locationId, date) => (dispatch, getState) => {\n\n const state = getState()\n const submitPath = state.api.agreementsPath\n\n const formData = getNewAgreementForm(locationId, date, state)\n\n dispatch(actions.submitStartAgreementForm(locationId, date))\n\n dispatch(submitAgreement(formData))\n\n}\n\nconst submitAgreement = (formData) => (dispatch, getState) => {\n\n const state = getState()\n const submitPath = state.api.agreementsPath\n\n var specificationsAttributes = {}\n _(formData.agreedSpecifications).toPairs().each((pair, i) => {\n const [serviceCode, quantity] = pair\n specificationsAttributes[i] = { serviceCode, quantity }\n } )\n\n var agreement = {\n ..._.pick(formData, ['serviceId', 'orderId', 'type', 'vendorAccountId', 'vendorServiceId', 'locationId', 'date']), \n specificationsAttributes,\n }\n\n submitToServer(submitPath, { agreement },\n (data,v) => {\n if(data.agreement) {\n dispatch(actions.submitSuccess({agreement: data.agreement}))\n dispatch(actions.closeAgreementForm(data.agreement.locationId, data.agreement.date))\n dispatch(matchLineItems([data.agreement.locationId]))\n }\n },\n (data, status, e) => {\n //dispatch(actions.serverError())\n data\n debounceAlert(status)\n }, { method: 'POST' })\n}\n\n\n\nexport {\n validateAgreements,\n submitAgreements,\n submitAgreementForm,\n selectServiceAgreementForm,\n openCollectionAgreementForm,\n openSupplyProductAgreementForm,\n createBlankCollectionAgreement,\n //loadAgreements\n}\n\n","import actions from './actions'\nimport lineItemActions from '../lineItems/actions'\nimport agreementActions from '../agreements/actions'\nimport submitToServer from 'submitToServer'\nimport _ from 'lodashExtended'\n\nconst debounceAlert = _.debounce((status) => alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`), 5000)\n\nconst submitNewDisputes = (newDisputes) => (dispatch, getState) => {\n\n const state = getState()\n const submitPath = state.api.disputeLedgerItemsPath\n\n _.each(newDisputes, (disputeLedgerItem) => {\n\n submitToServer(submitPath, { disputeLedgerItem },\n (data,v) => {\n if(data.agreement) {\n dispatch(agreementActions.submitSuccess({agreement: data.agreement}))\n }\n\n if(data.lineItems) {\n dispatch(lineItemActions.submitSuccess(data.lineItems.byId))\n }\n if(data.disputeLedgerItems) {\n dispatch(actions.updateFromServer(data.disputeLedgerItems.byId))\n }\n },\n (data, status, e) => {\n //dispatch(actions.serverError())\n data\n debounceAlert(status)\n }, { method: 'POST' })\n\n })\n}\n\nconst submitIgnoreDisputes = (ignoreReason, ids) => (dispatch, getState) => {\n\n const state = getState()\n const submitPath = state.api.disputeLedgerItemsPath\n\n _.each(ids, (id) => {\n\n submitToServer(submitPath + `/${id}`, { disputeLedgerItem: { ignoreReason, ignore: _.isPresent(ignoreReason) } },\n (data,v) => {\n //if(data.agreement) {\n //dispatch(agreementActions.submitSuccess({agreement: data.agreement}))\n //}\n\n //if(data.lineItems) {\n //dispatch(lineItemActions.submitSuccess(data.lineItems.byId))\n //}\n if(data.disputeLedgerItems) {\n dispatch(actions.updateFromServer(data.disputeLedgerItems.byId))\n }\n },\n (data, status, e) => {\n //dispatch(actions.serverError())\n data\n debounceAlert(status)\n }, { method: 'PATCH' })\n\n })\n}\n\nconst deleteDisputes = (ids) => (dispatch, getState) => {\n\n const state = getState()\n const submitPath = state.api.disputeLedgerItemsPath\n\n _.each(ids, (id) => {\n\n submitToServer(submitPath + `/${id}`, {},\n (data,v) => {\n if(data.lineItems) {\n dispatch(lineItemActions.submitSuccess(data.lineItems.byId))\n }\n if(data.disputeLedgerItems) {\n dispatch(actions.updateFromServer(data.disputeLedgerItems.byId))\n }\n },\n (data, status, e) => {\n //dispatch(actions.serverError())\n data\n debounceAlert(status)\n }, { method: 'DELETE' })\n\n })\n}\n\nexport {\n submitNewDisputes,\n submitIgnoreDisputes,\n deleteDisputes\n}\n\n","import { createAction } from 'redux-act';\n\nconst locationsMatchStart = createAction(\"start matching the locations\", (locationIds) => { return( { locationIds} ) });\nconst locationsMatchEnd = createAction(\"start matching the locations\", (locationIds) => { return( { locationIds } ) });\nconst loadSuccess = createAction(\"location has been loaded success from server\", (loadedLocations) => { return( { loadedLocations } ) });\n\nexport default {\n locationsMatchStart,\n locationsMatchEnd,\n loadSuccess\n}\n\n","import actions from './actions'\nimport { getLineItemsForLocation } from './selectors'\nimport { validateAgreements } from '../agreements/operations'\nimport { deleteDisputes } from '../disputeLedgerItems/operations'\nimport { getDisputeLedgerItemsForLineItem } from '../disputeLedgerItems/selectors'\nimport agreementActions from '../agreements/actions'\nimport submitToServer from 'submitToServer'\nimport { getLineItemsPendingSubmit } from './selectors'\nimport { getPathAndMethod } from '../api/utils'\nimport locationActions from '../locations/actions'\nimport _ from 'lodashExtended'\n\n\n// request every 1000 milliseconds. Rate limit the api request to Vector so it doesnt DoS Attack itself\nvar throttle = require('promise-ratelimit')(1000); /* rateInMilliseconds */\nvar fasterThrottle = require('promise-ratelimit')(500); /* rateInMilliseconds */\n\nconst matchLineItems = (locationIds) => (dispatch, getState) => {\n\n const state = getState()\n const submitPath = state.api.matchPath\n dispatch(locationActions.locationsMatchStart(locationIds))\n\n\n _(locationIds).each((locationId) => {\n\n (state.api.isLondonBusinessHours ? throttle : fasterThrottle)().then( () => {\n\n const lineItems = getLineItemsForLocation(locationId, state)\n dispatch(actions.submitStart(_.map(lineItems, 'id')))\n\n submitToServer(submitPath, { location_id: locationId },\n (data,v) => {\n if(data.lineItems) {\n dispatch(actions.submitSuccess(data.lineItems.byId))\n }\n if(data.agreements) {\n dispatch(agreementActions.submitSuccess(data.agreements.byId))\n dispatch(validateAgreements(_.keys(data.agreements.byId)))\n }\n dispatch(locationActions.locationsMatchEnd([locationId]))\n },\n (data, status) => {\n //dispatch(actions.serverError())\n dispatch(locationActions.locationsMatchEnd([locationId]))\n data\n alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`)\n }, { method: 'POST' })\n\n })\n\n })\n}\n\n\n\nconst debounceAlert = _.debounce((status) => alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`), 5000)\n\nconst submitLineItems = () => (dispatch, getState) => {\n\n const state = getState()\n if(state.api) {\n const basePath = state.api.lineItemsPath\n _.each(getLineItemsPendingSubmit(state), (lineItem) => {\n\n const [submitPath, method] = getPathAndMethod(basePath, lineItem)\n if(method) {\n dispatch(actions.submitStart([lineItem.id]))\n //console.log([method, submitPath])\n submitToServer(submitPath, { vendor_invoice_line_item: lineItem },\n (data,v) => {\n if(data.lineItem) {\n dispatch(actions.submitSuccess({lineItem: data.lineItem}))\n dispatch(matchLineItems([data.lineItem.locationId]))\n }\n },\n (data, status, e) => {\n //dispatch(actions.serverError())\n data\n debounceAlert(status)\n }, { method })\n }\n })\n }\n}\n\n\nconst submitAcceptReason = (acceptReason, ids) => (dispatch, getState) => {\n\n const state = getState()\n const submitPath = state.api.lineItemsPath\n\n _.each(ids, (id) => {\n submitToServer(submitPath + `/${id}`, { vendorInvoiceLineItem: { validatedManually: true, acceptReason } },\n (data,v) => {\n if(data.lineItem) {\n dispatch(actions.submitSuccess({lineItem: data.lineItem}))\n }\n },\n (data, status, e) => {\n //dispatch(actions.serverError())\n data\n debounceAlert(status)\n }, { method: 'PATCH' })\n\n })\n}\n\n\nconst resetLineItems = (ids) => (dispatch, getState) => {\n\n const state = getState()\n const submitPath = state.api.lineItemsPath\n\n const disputeLedgerItemIds = _(ids).map((id)=> getDisputeLedgerItemsForLineItem(state,id)).flatten().compact().map('id').value()\n\n dispatch(deleteDisputes(disputeLedgerItemIds))\n\n _.each(ids, (id) => {\n submitToServer(submitPath + `/${id}`, { vendorInvoiceLineItem: { validatedManually: false, acceptReason: null } },\n (data,v) => {\n if(data.lineItem) {\n dispatch(actions.submitSuccess({lineItem: data.lineItem}))\n }\n },\n (data, status, e) => {\n //dispatch(actions.serverError())\n data\n debounceAlert(status)\n }, { method: 'PATCH' })\n\n }) \n\n}\n\n\nexport {\n matchLineItems,\n submitLineItems,\n resetLineItems,\n submitAcceptReason\n}\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\n\nimport { Btn } from 'sharedComponents'\nimport { matchLineItems } from '../lineItems/operations'\nimport { getMatchCount } from '../lineItems/selectors'\n\nvar MatchBtn = ( { totalCount, matchedCount, unMatchdCount, onMatch, disabled, showTotal } ) => {\n if(totalCount == 0) {\n return null\n } else {\n var showTotal = showTotal === undefined ? totalCount > 1 : showTotal\n\n if(totalCount == matchedCount) {\n return <Btn onClick={onMatch} disabled={disabled} styles={`${showTotal ? '' : 'xs'} success `} icon='check'>Match {showTotal ? `(${matchedCount} / ${totalCount})` : null}</Btn>\n } else {\n return <Btn onClick={onMatch} disabled={disabled} styles={`${showTotal ? '' : 'xs'} danger `} icon='times'>Match {showTotal ? `(${matchedCount} / ${totalCount})` : null}</Btn>\n }\n }\n}\n\nMatchBtn.propTypes = {\n locationIds: PropTypes.array.isRequired,\n disabled: PropTypes.bool,\n};\n\nconst mapStateToProps = (state, {locationIds}) => {\n return {\n ...getMatchCount(locationIds, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {locationIds}) => {\n return {\n onMatch: () => { dispatch(matchLineItems(locationIds)) }\n }\n}\n\nMatchBtn = connect(\n mapStateToProps,\n mapDispatchToProps\n)(MatchBtn)\n\n\nexport default MatchBtn;\n\n\n\n\n\n\n\n\n\n","import _ from 'lodashExtended'\nimport dotProp from 'dot-prop-immutable'\n\nconst getVendorService = (id, state) => {\n return state.vendorServices.byId[id]\n}\n\nconst getVendorServices = (state) => {\n return Object.values(state.vendorServices.byId)\n}\n\nconst getUnitPricesForDate = (id, date, state) => {\n const { purchasePriceSchedules } = getVendorService(id, state)\n const pricingSchedule = _.find(purchasePriceSchedules, ({ validFrom, validUntil }) =>\n validFrom <= date && (_.isNull(validUntil) || validUntil >= date) )\n return (dotProp.get(pricingSchedule || {}, 'unitPrice.byServiceCode') || {})\n}\n\nexport {\n getVendorService,\n getVendorServices,\n getUnitPricesForDate\n}\n","import moment from 'moment'\nimport _ from 'lodashExtended' \n\nfunction keyToDate(key, date, stepDates) {\n if(key == 'ArrowUp') {\n return getStepDate(-1, date, stepDates)\n } else if(key == 'ArrowDown') {\n return getStepDate(1, date, stepDates)\n } else {\n return date\n }\n}\n\nfunction keyToNumber(key, number) {\n if(_.includes(['ArrowRight', 'ArrowUp'], key)) {\n return number + 1\n } else if(_.includes(['ArrowLeft', 'ArrowDown'], key)) {\n return number - 1\n } else {\n return number\n }\n}\n\n\nfunction getNextStep(numSteps, current, steps) {\n var nextStep\n const index = _.indexOf(steps, current)\n if(index != -1 ) {\n nextStep = steps[index + numSteps]\n }\n return(nextStep)\n}\n\nfunction getStepDate(numSteps, date, stepDates) {\n var gotDate\n const sortedDates = _.sortBy(stepDates)\n const dateIndex = _.indexOf(sortedDates, date)\n if(dateIndex != -1 ) {\n gotDate = sortedDates[dateIndex + numSteps]\n }\n return(gotDate || moment(date).add(numSteps, 'days').format(\"YYYY-MM-DD\"))\n}\n\n\nexport {\n keyToDate,\n keyToNumber,\n getNextStep\n}\n","import { createAction } from 'redux-act';\n\nconst submitStart = createAction(\"sales line item has been sent to server\", (ids) => { return( { ids } ) });\nconst submitSuccess = createAction(\"sales line item update success from server\", (updatedLineItems) => { return( { updatedLineItems } ) });\nconst submitError = createAction(\"sales line item update error from server\", (updatedLineItems) => { return( { updatedLineItems } ) });\nconst setAgreementId = createAction(\"set the agreement Id\", (id, agreementId) => { return( { id, agreementId } ) });\nconst updateFromServer = createAction(\"update the sales items from the server\", (updatedItems) => { return( { updatedItems } ) });\n\nexport default {\n submitSuccess,\n submitError,\n submitStart,\n setAgreementId,\n updateFromServer\n}\n\n","import { createAction } from 'redux-act';\n\nconst setSpecificationForm = createAction(\"set the form data for new specification \", (serviceId, newSpecifications) => { return { serviceId, newSpecifications } } );\nconst closeSpecificationForm = createAction(\"close the form for new SpecificationForm\", (serviceId) => { return { serviceId } } );\n\nconst setCurrentSpecQuantity = createAction(\"current spec set quantity\", (serviceId, serviceCode, quantity) => { return( { serviceId, serviceCode, quantity } ) });\nconst setCurrentSpecFrequency = createAction(\"current spec set frequency\", (serviceId, serviceCode, collectionPlanName) => { return( { serviceId, serviceCode, collectionPlanName } ) });\n\nconst submitStart = createAction(\"spec has been sent to server\", (serviceId) => { return( { serviceId } ) });\nconst submitSuccess = createAction(\"spec update success from server\", (updatedSpecifications) => { return( { updatedSpecifications } ) });\nconst submitError = createAction(\"spec update error from server\", (serviceId) => { return( { serviceId } ) });\n\n\nexport default {\n setSpecificationForm,\n closeSpecificationForm,\n setCurrentSpecQuantity,\n setCurrentSpecFrequency,\n submitSuccess,\n submitError,\n submitStart,\n}\n","import actions from './actions'\nimport { inMatchMode, getMatchModeNavLocationIds } from './selectors'\nimport { getAgreement, getAgreementsForLocation } from '../agreements/selectors'\nimport { getLineItem, getLineItemsForLocation, getLineItemsByAgreement } from '../lineItems/selectors'\nimport { getSalesLedgerItem } from '../salesLedgerItems/selectors'\nimport { getActivityDatesForLocation, getActivityDataForAgreement } from '../locations/selectors'\nimport { keyToDate, keyToNumber, getNextStep} from '../app/utils'\nimport { getActivityDataForLocation, getActivityDataByLocationDate, getLocation } from '../locations/selectors'\nimport { getCurrentFilterResults, getUnmatchedLocationIds } from '../app/selectors'\nimport { getService } from '../services/selectors'\nimport { getSpecificationForm, getUnitSpecifications } from '../specifications/selectors'\nimport _ from 'lodashExtended'\nimport dotProp from 'dot-prop-immutable'\n\nimport agreementActions from '../agreements/actions'\nimport lineItemActions from '../lineItems/actions'\nimport salesLedgerItemActions from '../salesLedgerItems/actions'\nimport specificationActions from '../specifications/actions'\n//import { handleMoveAgreementDate } from \"../agreements/operations\"\n\nconst selectUnMatchedAgreements = (agreements, state) => {\n return _.filter(agreements, ({id}) => _.isBlank(getLineItemsByAgreement(state)[id]))\n}\n\n\nconst handleMoveAgreementDateModeEvent = (payload, key) => (dispatch, getState) => {\n const state = getState()\n const matchMode = inMatchMode(state)\n const { agreementId } = payload\n const { locationId, date } = getAgreement(agreementId, state)\n\n if(!matchMode) {\n\n if(_.includes(['ArrowDown', 'ArrowUp'], key)) {\n let allDates = _.map(getAgreementsForLocation(locationId, state), 'initialDate').concat(getActivityDatesForLocation(locationId, state) || [])\n const stepDates = _(allDates).uniq().sort().value()\n\n const newDate = keyToDate(key, date, stepDates)\n dispatch(agreementActions.setDate(agreementId, newDate))\n } else if(_.includes(['ArrowLeft', 'ArrowRight'], key)) {\n const locationData = getActivityDataForLocation(locationId, state)\n const locationAgreements = _.sortBy(getAgreementsForLocation(locationId, state), 'date')\n const currentAgreementIndex = _.findIndex(locationAgreements, { id: agreementId } )\n if(currentAgreementIndex == -1) {\n throw('unexpected - should be able to find the agreement under the location')\n } else {\n var nextAgreement = locationAgreements[keyToNumber(key,currentAgreementIndex)]\n if(nextAgreement) {\n dispatch(enterMoveAgreementDateMode(nextAgreement.id))\n } else {\n const locationIds = getCurrentFilterResults(state).locationIds\n const currentLocationIndex = _.indexOf(locationIds, locationId )\n if(currentLocationIndex == -1) {\n dispatch(actions.unListenKeyDown())\n throw('unexpected - should be able to find the agreement under the location')\n } else {\n const nextLocationId = locationIds[keyToNumber(key,currentLocationIndex)]\n\n if(nextLocationId) {\n const nextLocationAgreements = _.sortBy(getAgreementsForLocation(nextLocationId, state), 'date')\n const startAgreement = keyToNumber(key,0) > 0 ? nextLocationAgreements[0] : nextLocationAgreements[nextLocationAgreements.length - 1]\n dispatch(actions.toggleLocationOpen(locationId, false))\n dispatch(actions.toggleLocationOpen(nextLocationId, true))\n if(startAgreement) {\n dispatch(enterMoveAgreementDateMode(startAgreement.id))\n } else {\n dispatch(actions.unListenKeyDown())\n }\n\n } else {\n dispatch(actions.unListenKeyDown())\n }\n }\n }\n }\n }\n } else {\n\n if(_.includes(['ArrowDown', 'ArrowUp'], key)) {\n let allDates = _.map(getAgreementsForLocation(locationId, state), 'initialDate').concat(getActivityDatesForLocation(locationId, state) || [])\n const stepDates = _(allDates).uniq().sort().value()\n const newDate = keyToDate(key, date, stepDates)\n dispatch(agreementActions.setDate(agreementId, newDate))\n } else if(_.includes(['ArrowLeft', 'ArrowRight'], key)) {\n const locationData = getActivityDataForLocation(locationId, state)\n\n let locationAgreements = _.sortBy(getAgreementsForLocation(locationId, state), 'date')\n locationAgreements = key == 'ArrowRight' ? locationAgreements : _.reverse(locationAgreements)\n\n const currentAgreementIndex = _.findIndex(locationAgreements, { id: agreementId } )\n\n if(currentAgreementIndex == -1) {\n throw('unexpected - should be able to find the agreement under the location')\n } else {\n\n //Only look for unmatched\n var nextAgreement = _.find(locationAgreements, ({id}) => _.isBlank(getLineItemsByAgreement(state)[id]), currentAgreementIndex + 1)\n\n if(nextAgreement) {\n dispatch(enterMoveAgreementDateMode(nextAgreement.id))\n } else {\n const {\n nextLocationId,\n backLocationId,\n currentLocationId,\n matchedCount,\n totalCount,\n } = getMatchModeNavLocationIds(state)\n\n let goToLocationId = key == 'ArrowRight' ? nextLocationId : backLocationId\n\n if(goToLocationId) {\n dispatch(actions.setMatchModeLocationId(goToLocationId))\n\n const startAgreement = _.sortBy(selectUnMatchedAgreements(getAgreementsForLocation(goToLocationId, state),state), 'date')[0]\n if(startAgreement) {\n dispatch(enterMoveAgreementDateMode(startAgreement.id))\n } else {\n dispatch(actions.unListenKeyDown())\n }\n\n } else {\n dispatch(actions.unListenKeyDown())\n }\n }\n }\n }\n }\n}\n\n\n\nconst handleMoveLineItemDateModeEvent = (payload, key) => (dispatch, getState) => {\n const state = getState()\n\n const { lineItemId } = payload\n const { locationId, date } = getLineItem(lineItemId, state)\n if(_.includes(['ArrowDown', 'ArrowUp'], key)) {\n let allDates = _.map(getLineItemsForLocation(locationId, state), 'initialDate').concat(getActivityDatesForLocation(locationId, state) || [])\n const stepDates = _(allDates).uniq().sort().value()\n const newDate = keyToDate(key, date, stepDates)\n dispatch(lineItemActions.setDate(lineItemId, newDate))\n } else if(_.includes(['ArrowLeft', 'ArrowRight'], key)) {\n //const locationData = getActivityDataForLocation(locationId, state)\n //const locationLineItems = _.sortBy(getLineItemsForLocation(locationId, state), 'date')\n //const currentLineItemIndex = _.findIndex(locationLineItems, { id: lineItemId } )\n //if(currentLineItemIndex == -1) {\n //throw('unexpected - should be able to find the agreement under the location')\n //} else {\n //var nextLineItem = locationLineItems[keyToNumber(key,currentAgreementIndex)]\n //if(nextLineItem) {\n //dispatch(enterMoveAgreementDateMode(nextAgreement.id))\n //} else {\n //const locationIds = getCurrentFilterResults(state).locationIds\n //const currentLocationIndex = _.indexOf(locationIds, locationId )\n //if(currentLocationIndex == -1) {\n //dispatch(actions.unListenKeyDown())\n //throw('unexpected - should be able to find the agreement under the location')\n //} else {\n //const nextLocationId = locationIds[keyToNumber(key,currentLocationIndex)]\n\n //if(nextLocationId) {\n //const nextLocationAgreements = _.sortBy(getAgreementsForLocation(nextLocationId, state), 'date')\n //const startAgreement = keyToNumber(key,0) > 0 ? nextLocationAgreements[0] : nextLocationAgreements[nextLocationAgreements.length - 1]\n //dispatch(actions.toggleLocationOpen(locationId, false))\n //dispatch(actions.toggleLocationOpen(nextLocationId, true))\n //if(startAgreement) {\n //dispatch(enterMoveAgreementDateMode(startAgreement.id))\n //} else {\n //dispatch(actions.unListenKeyDown())\n //}\n\n //} else {\n //dispatch(actions.unListenKeyDown())\n //}\n //}\n //}\n //}\n }\n}\n\n\nconst handleMoveSalesItemAgreementModeEvent = (payload, key) => (dispatch, getState) => {\n const state = getState()\n\n const { salesLedgerItemId } = payload\n const { agreementId } = getSalesLedgerItem(salesLedgerItemId, state)\n const { locationId } = getAgreement(agreementId, state)\n\n if(_.includes(['ArrowDown', 'ArrowUp'], key)) {\n\n const activityData = getActivityDataForLocation(locationId, state) || []\n const stepAgreementIds = _(activityData.dateData).map('agreements').flatten().map('id').reverse().value()\n const newAgreementId = getNextStep(keyToNumber(key, 0), agreementId, stepAgreementIds)\n\n if(newAgreementId) { dispatch(salesLedgerItemActions.setAgreementId(salesLedgerItemId, newAgreementId)) }\n } else if(_.includes(['ArrowLeft', 'ArrowRight'], key)) {\n\n }\n}\n\nconst handleSpecEditModeEvent = (payload, key) => (dispatch, getState) => {\n const state = getState()\n const { agreementId, serviceCode } = payload\n const { specifications } = getAgreement(agreementId, state)\n if(_.includes(['ArrowDown', 'ArrowUp'], key)) {\n const quantity = dotProp.get(specifications, [serviceCode, 'quantity']) || 0\n const newQuantity = keyToNumber(key, quantity)\n dispatch(agreementActions.setSpecQuantity(agreementId, serviceCode, newQuantity))\n } else if(_.includes(['ArrowLeft', 'ArrowRight'], key)) {\n const { initialSpecifications, lineItems } = getActivityDataForAgreement(agreementId, state)\n const lineItemsByCode = _.groupBy(lineItems, 'serviceCode')\n const serviceCodes = _([specifications, lineItemsByCode, initialSpecifications]).\n map((x, y)=> Object.keys(x) ).flatten().uniq().\n sort().value()\n\n const currentServiceCodeIndex = _.indexOf(serviceCodes, serviceCode )\n if(currentServiceCodeIndex == -1) {\n throw('unexpected - should be able to find the spec that is being edited under the agreement')\n } else {\n const nextServiceCode = serviceCodes[keyToNumber(key,currentServiceCodeIndex)]\n if(nextServiceCode) {\n dispatch(enterEditSpecQuantityMode(nextServiceCode, agreementId))\n } else {\n dispatch(actions.unListenKeyDown())\n }\n }\n //dispatch(agreementActions.setDate(agreementId, newDate))\n } else if(_.includes(['='], key)) {\n const x = getActivityDataForAgreement(agreementId, state)\n const newQuantity = _(x.lineItems).filter({serviceCode}).map('quantity').sum()\n dispatch(agreementActions.setSpecQuantity(agreementId, serviceCode, newQuantity))\n }\n}\n\n\nconst handleEditCurrentSpecQuantityEvent = (payload, key) => (dispatch, getState) => {\n const state = getState()\n const { agreementId, serviceCode } = payload\n\n let { specificationId, serviceId, ...restAgreement } = getAgreement(agreementId, state)\n let { currentSpecificationId, ...restService } = getService(serviceId, state)\n\n const unitSpecifications = getUnitSpecifications(specificationId, state)\n const currentUnitSpecifications = getUnitSpecifications(currentSpecificationId, state)\n\n let form = getSpecificationForm(serviceId, state)\n const { lineItems} = getActivityDataForAgreement(agreementId, state)\n const lineItemsByCode = _(lineItems).filter(({serviceCode}) => /^ABC-/.test(serviceCode) ).groupBy('serviceCode').value()\n\n const formUnitSpecifications = _.get(form, 'unitSpecifications') || {}\n\n const serviceCodes = _([formUnitSpecifications, unitSpecifications, currentUnitSpecifications, lineItemsByCode]).\n map((x, y)=> Object.keys(x) ).flatten().uniq().sort().value()\n\n if(_.includes(['ArrowDown', 'ArrowUp'], key)) {\n const quantity = dotProp.get(form, ['unitSpecifications', serviceCode, 'quantity']) || 0\n const newQuantity = keyToNumber(key, quantity)\n dispatch(specificationActions.setCurrentSpecQuantity(serviceId, serviceCode, newQuantity))\n } else if(_.includes(['ArrowLeft', 'ArrowRight'], key)) {\n const currentServiceCodeIndex = _.indexOf(serviceCodes, serviceCode )\n if(currentServiceCodeIndex == -1) {\n throw('unexpected - should be able to find the spec that is being edited under the agreement')\n } else {\n const nextServiceCode = serviceCodes[keyToNumber(key,currentServiceCodeIndex)]\n if(nextServiceCode) {\n dispatch(enterEditCurrentSpecQuantityMode(nextServiceCode, agreementId))\n } else {\n dispatch(actions.unListenKeyDown())\n }\n }\n } else if(_.includes(['='], key)) {\n let newQuantity = _(lineItemsByCode[serviceCode] || []).map('quantity').sum()\n dispatch(specificationActions.setCurrentSpecQuantity(serviceId, serviceCode, newQuantity))\n }\n}\n\n\nconst enterEditCurrentSpecQuantityMode = (serviceCode, agreementId) => (dispatch, getState) => {\n\n const state = getState()\n\n dispatch(actions.listenKeyDown({\n type: 'editCurrentSpecQuantity',\n payload: {\n serviceCode,\n agreementId\n },\n preventDefaultKeys: ['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight']\n }))\n\n}\n\n\n\nconst enterMoveAgreementDateMode = (agreementId) => (dispatch, getState) => {\n\n const state = getState()\n\n dispatch(actions.listenKeyDown({\n type: 'moveAgreementDate',\n payload: {\n agreementId,\n //stepDates,\n },\n preventDefaultKeys: ['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight']\n }))\n\n}\n\nconst enterMoveLineItemDateMode = (lineItemId) => (dispatch, getState) => {\n\n const state = getState()\n\n dispatch(actions.listenKeyDown({\n type: 'moveLineItemDate',\n payload: {\n lineItemId,\n },\n preventDefaultKeys: ['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight']\n }))\n\n}\n\n\nconst enterSalesItemAgreementMode = (salesLedgerItemId) => (dispatch, getState) => {\n\n const state = getState()\n\n dispatch(actions.listenKeyDown({\n type: 'moveSalesItemAgreement',\n payload: {\n salesLedgerItemId,\n },\n preventDefaultKeys: ['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight']\n }))\n}\n\n\nconst enterEditSpecQuantityMode = (serviceCode, agreementId) => (dispatch, getState) => {\n\n const state = getState()\n\n dispatch(actions.listenKeyDown({\n type: 'editSpecQuantity',\n payload: {\n serviceCode,\n agreementId\n },\n preventDefaultKeys: ['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight']\n }))\n}\n\nconst modeKeyDownHandlers = {\n 'moveAgreementDate': handleMoveAgreementDateModeEvent,\n 'editSpecQuantity': handleSpecEditModeEvent,\n 'moveLineItemDate': handleMoveLineItemDateModeEvent,\n 'moveSalesItemAgreement': handleMoveSalesItemAgreementModeEvent,\n 'editCurrentSpecQuantity': handleEditCurrentSpecQuantityEvent\n}\n\nconst handleKeyDownEvent = ({listener: { payload, type }, key}) => (dispatch, getState) => {\n //console.log('key event handled', { payload, type, key })\n const handler = modeKeyDownHandlers[type]\n if(handler) {\n dispatch(handler(payload, key))\n }\n dispatch(actions.keyDownEvent(payload, key))\n}\n\n\nconst enterMatchMode = () => (dispatch, getState) => {\n const state = getState()\n\n let locationId = (getUnmatchedLocationIds(state) || [])[0]\n\n dispatch(actions.setMatchModeLocationId(locationId))\n dispatch(actions.setMatchMode(true))\n}\n\nconst exitMatchMode = () => (dispatch, getState) => {\n const state = getState()\n dispatch(actions.unListenKeyDown())\n dispatch(actions.setMatchMode(false))\n}\n\nconst matchModeNext = () => (dispatch, getState) => {\n const state = getState()\n dispatch(actions.setMatchMode(false))\n}\n\n\nexport {\n handleKeyDownEvent,\n enterMoveAgreementDateMode,\n enterEditSpecQuantityMode,\n enterEditCurrentSpecQuantityMode,\n enterMoveLineItemDateMode,\n enterSalesItemAgreementMode,\n enterMatchMode,\n exitMatchMode,\n}\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport appActions from '../app/actions'\nimport { getKeyDownListener } from '../app/selectors'\nimport { getLineItem } from '../lineItems/selectors'\nimport { getActivityDatesForLocation } from '../locations/selectors'\nimport { Btn } from 'sharedComponents'\nimport { enterMoveLineItemDateMode } from '../app/operations'\nimport { lineItemInMoveDateMode } from '../app/selectors'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar MoveLineItemBtn = ( { active, date, stepDates, initialDate, handleMakeActive } ) => {\n\n const isoDateFormat = \"ddd, Do MMM YYYY\"\n const formattedDate = moment(date).format(isoDateFormat)\n\n const initialDateRender = initialDate != date ? <span className='text-muted text-small'>{moment(initialDate).format(isoDateFormat)} => </span> : null\n const renderedformattedDate = initialDate != date ? <strong>{formattedDate}</strong> : <span className='text-muted'>{formattedDate}</span>\n\n if(active){\n return (<span>{initialDateRender} {renderedformattedDate}<i className='fa fa-chevron-down'></i><i className='fa fa-chevron-up'></i></span>)\n } else {\n return <span onClick={() => handleMakeActive(stepDates)} >{initialDateRender} {renderedformattedDate}</span>\n }\n\n}\n\nMoveLineItemBtn.propTypes = {\n locationId: PropTypes.number,\n id: PropTypes.number.isRequired,\n};\n\nconst mapStateToProps = (state, {id, date, initialDate}) => {\n return {\n date,\n initialDate,\n active: lineItemInMoveDateMode(id, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id, stepDates}) => {\n return {\n handleMakeActive: () => { dispatch(enterMoveLineItemDateMode(id)) } \n }\n}\n\nMoveLineItemBtn = connect(\n mapStateToProps,\n mapDispatchToProps\n)(MoveLineItemBtn)\n\n\nexport default MoveLineItemBtn;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\n//import { specInEditQuantityMode } from '../app/selectors'\n//import { enterEditSpecQuantityMode } from '../app/operations'\nimport appActions from '../app/actions'\n\n\nvar SpecQuantity = ( { children, inEditMode, onClick } ) => {\n\n if(inEditMode) {\n return(<div>{children} <i className='fa fa-chevron-down'></i><i className='fa fa-chevron-up'></i> = </div>)\n } else {\n if(onClick) {\n return(<div style={{cursor: 'pointer'}} onClick={onClick}>{children}</div>)\n } else {\n return(<div>{children}</div>)\n }\n\n }\n}\n\nSpecQuantity.propTypes = {\n children: PropTypes.node.isRequired,\n inEditMode: PropTypes.bool.isRequired,\n onClick: PropTypes.func\n};\n\n\nexport default SpecQuantity;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\n\nconst Td = ({children, highlight, highlightClass = 'info', ...props}) => <td {...props} className={(_.isBlank(children) || highlight) ? highlightClass : ''}>{children}</td>\n\nTd.propTypes = {\n};\n\n\nexport default Td;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { getLineItem } from '../lineItems/selectors'\nimport { submitNewDisputes } from '../disputeLedgerItems/operations'\nimport { Btn, StatelessModal } from 'sharedComponents'\n\nclass DisputeBtn extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isModalOpen: false,\n form: {}\n };\n this.handleOpenModal = this.handleOpenModal.bind(this)\n this.handleCloseModal = this.handleCloseModal.bind(this)\n this.handleInputChange = this.handleInputChange.bind(this)\n this.handleSave = this.handleSave.bind(this);\n }\n\n handleSave () {\n var { reason } = this.state.form\n\n var newDisputes = _(this.props.lineItems).map(({id, quantity, totalPriceCents, unitPriceCents}) => {\n\n var returnItems = []\n const calculatedTotal = quantity * unitPriceCents\n const leftOverTotal = totalPriceCents - calculatedTotal\n\n if(leftOverTotal > 0) {\n returnItems = returnItems.concat({\n vendorInvoiceLineItemId: id,\n netTotalCents: leftOverTotal,\n unitPriceCents: leftOverTotal,\n quantity: 1,\n reason: `${reason} / total price calculation error`\n })\n }\n\n\n returnItems = returnItems.concat({\n vendorInvoiceLineItemId: id,\n netTotalCents: calculatedTotal,\n unitPriceCents,\n quantity,\n reason\n })\n return returnItems\n }).flatten().value()\n\n this.props.onSave(newDisputes)\n this.setState({ isModalOpen: false, form: {} })\n }\n\n handleOpenModal () { this.setState({ isModalOpen: true }) }\n handleCloseModal () { this.setState({ isModalOpen: false }) }\n handleInputChange(event) {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n\n this.setState(\n {\n form: {\n [name]: value\n }\n }\n );\n }\n\n render() {\n let { lineItems, target } = this.props\n const { form, isModalOpen} = this.state\n\n const saveEnabled = _.isPresent(form.reason) && form.reason.length > 3\n\n return (\n <StatelessModal title='Dispute' target={target || <span className={`btn btn-flat btn-xs btn-danger`}>Dispute {lineItems.length > 1 ? \"All\" : ''}</span>} \n isOpen={isModalOpen} onCloseModal={this.handleCloseModal} onOpenModal={this.handleOpenModal}>\n <form className=\"simple_form form-vertical\">\n <div className=\"form-group\">\n <label className=\"control-label\">Why are you disputing this?</label>\n <textarea className=\"form-control\" name=\"reason\" value={form.reason} onChange={this.handleInputChange} />\n </div>\n <div style={{ borderTop: '1px solid #e6e9ed', padding: '10px 10px 5px 10px', marginLeft: -10, marginRight: -10 }}>\n <Btn styles='success block' disabled={!saveEnabled} onClick={this.handleSave}>   Save   </Btn><br/>\n <div className=\"text-right\"><div><Btn styles='danger xs' onClick={this.handleCloseModal}>Cancel</Btn></div></div>\n </div>\n </form>\n </StatelessModal>\n )\n }\n}\n\n\nDisputeBtn.propTypes = {\n lineItemIds: PropTypes.array.isRequired\n};\n\n\nconst mapStateToProps = (state, { lineItemIds }) => {\n return {\n lineItems: _.map(lineItemIds, (id) => getLineItem(id, state))\n }\n}\n\nconst mapDispatchToProps = (dispatch, {lineItemIds}) => {\n return {\n onSave: (newDisputes) => { dispatch(submitNewDisputes(newDisputes))},\n }\n}\n\nDisputeBtn = connect(\n mapStateToProps,\n mapDispatchToProps\n)(DisputeBtn)\n\n\nexport default DisputeBtn;\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { getUnitPricesForDate } from '../vendorServices/selectors'\nimport { getVendorId } from '../vendorInvoice/selectors'\nimport { getAgreement } from '../agreements/selectors'\n\nimport { serviceCodeInSpecEditQuantityMode } from '../app/selectors'\nimport { enterEditSpecQuantityMode } from '../app/operations'\n\nimport { Table, OverlayTrigger, Tooltip } from 'react-bootstrap';\nimport { hMoney } from 'sharedFormatters'\nimport { Link } from 'sharedComponents'\nimport MoveLineItemBtn from './MoveLineItemBtn'\nimport SpecQuantity from './SpecQuantity'\nimport Td from './Td'\nimport DisputeBtn from './DisputeBtn'\n\nconst Frg = React.Fragment\n\nvar AgreementSpec = ( {\n id: agreementId,\n purchaseUnitPrices,\n vendorInvoiceId,\n initialSpecifications = {},\n specifications,\n lineItems,\n vendorId,\n serviceCodeInEditMode,\n enterSpecEditMode,\n ...props\n} ) => {\n\n const lineItemsByCode = _.groupBy(lineItems, 'serviceCode')\n const serviceCodes = _([specifications, lineItemsByCode, initialSpecifications]).\n map((x, y)=> Object.keys(x) ).flatten().uniq().\n sort().value()\n\n const rows = _.flatten(_.map(serviceCodes, (code)=> {\n let spec = specifications[code] || {}\n let initialSpec = initialSpecifications[code] || {}\n let lineItems = (lineItemsByCode[code] || [{}])\n let { quantity: specQuantityLeft = 0, unitPriceCents: specUnitPriceCents } = (spec || {})\n let { quantity: initialQuantityLeft = 0 } = (initialSpec || {})\n\n let purchaseUnitPriceCents = specUnitPriceCents || purchaseUnitPrices[code]\n\n const itemsCount = lineItems.length\n\n return _(lineItems).orderBy(['quantity', ({agreedCreditCents}) => (agreedCreditCents || 0)], ['desc', 'asc']).map((lineItem, i) => {\n\n const { quantity: lineQuantity, unitPriceCents: lineUnitPriceCents, calculatedTotalCents: lineCalculatedTotalCents, totalPriceCents: lineTotalPriceCents, vendorInvoiceId: lineVendorInvoiceId } = lineItem\n\n let [specQuantity, initialQuantity] = (itemsCount === i + 1) ?\n [ specQuantityLeft, initialQuantityLeft ] :\n [ _.min([lineQuantity, specQuantityLeft]), _.min([lineQuantity, initialQuantityLeft]) ]\n\n specQuantityLeft = _.max([specQuantityLeft - lineQuantity, 0])\n initialQuantityLeft = _.max([initialQuantityLeft - lineQuantity, 0])\n\n _(lineItems).orderBy(['quantity', ({agreedCreditCents}) => (agreedCreditCents || 0)], ['desc', 'asc']).value()\n\n const specDiff = specQuantity - initialQuantity\n const renderedSpecDiff = specDiff != 0 ? <span className={`text-${specDiff > 0 ? 'success' : 'danger' } `}>{specDiff > 0 ? '+' : '-' }{Math.abs(specDiff)}</span> : null\n const unitDiffCents = _.isPresent(lineUnitPriceCents) && _.isPresent(purchaseUnitPriceCents) ? lineUnitPriceCents - purchaseUnitPriceCents : null\n const totalDiffCents = _.isPresent(lineTotalPriceCents) && _.isPresent(lineCalculatedTotalCents) ? lineTotalPriceCents - lineCalculatedTotalCents : null\n\n const renderedUnitDiff = _.isPresent(unitDiffCents) ? unitDiffCents != 0 ? <span className={`text-${unitDiffCents < 0 ? 'success' : 'danger' } `}>{unitDiffCents > 0 ? '+' : '-' }{hMoney(Math.abs(unitDiffCents))}</span> :\n <i className={`fa fa-check text-success`}></i> : <i className={`fa fa-question text-danger`}></i>\n const renderedTotalDiff = _.isPresent(totalDiffCents) ? totalDiffCents != 0 ? <span className={`text-${totalDiffCents < 0 ? 'success' : 'danger' } `}>{totalDiffCents > 0 ? '+' : '-' }{hMoney(Math.abs(totalDiffCents))}</span> :\n <i className={`fa fa-check text-success`}></i> : <i className={`fa fa-question text-danger`}></i>\n\n const row = (\n <tr key={`${code}-${lineItem.id || 'no-line'}`}>\n <Td style={{width: '25%'}}>\n { _.isPresent(lineItem.id) ? <OverlayTrigger placement='top' overlay={\n <Tooltip id={`${lineItem.id}`}>\n <div>Vendor Code: {lineItem.vendorServiceCode || \"Not Specified\"}</div>\n <div>Vendor Descriptor: {lineItem.vendorServiceDescriptor || \"Not Specified\"}</div>\n </Tooltip>}>\n <span>{code}</span>\n </OverlayTrigger> : code }\n </Td>\n <Td style={{width: '10%'}} highlight={specQuantity == 0}>\n <SpecQuantity onClick={() => enterSpecEditMode(code, agreementId)} inEditMode={code == serviceCodeInEditMode}>{specQuantity} {renderedSpecDiff}</SpecQuantity>\n </Td>\n <Td>{lineQuantity}</Td>\n <Td>{_.isPresent(lineUnitPriceCents) ? <Frg>{hMoney(lineUnitPriceCents)} {renderedUnitDiff}</Frg> : null }</Td>\n <Td>{_.isPresent(lineTotalPriceCents) ? <Frg>{ hMoney(lineTotalPriceCents) } {renderedTotalDiff }</Frg> : null}</Td>\n <Td>{_.isPresent(lineItem.validationStatus) ? <span className={`text-${lineItem.inDispute ? 'danger' : 'success' }`}>{lineItem.validationStatus}</span> : null }</Td>\n <Td> { _.isPresent(lineItem.id) ? <Link target=\"_blank\" href={`/admin/vendor_invoice_line_items/${lineItem.id}`}>{lineItem.id}</Link> : null } </Td>\n <Td>{ _.isPresent(lineItem.vendorLocationCode) ? <Link target=\"_blank\" href={`/admin/vendors/${vendorId}/location_mappings/${encodeURIComponent(lineItem.vendorLocationCode)}`}>{lineItem.vendorLocationCode}</Link> : null}</Td>\n <Td style={{width: '15%'}}>{_.isPresent(lineItem) ? <MoveLineItemBtn {...lineItem}/> : null} {lineVendorInvoiceId && vendorInvoiceId != lineVendorInvoiceId ? <Link href={`/admin/vendor_invoices/${lineVendorInvoiceId}`}>{lineVendorInvoiceId}</Link> : null}</Td>\n <Td>\n { _. isPresent(lineItem.id) ? <DisputeBtn lineItemIds={[lineItem.id]} target={<span className={`btn btn-flat btn-xs btn-default`}>Manual Dispute</span>}/> : null }\n </Td>\n </tr>\n )\n\n\n return row\n }).value()\n } ))\n\n return(\n <Table bordered condensed hover>\n <thead>\n <tr>\n <th style={{width: '25%'}}>Service Code</th>\n <th style={{width: '10%'}}>Spec</th>\n <th>Charge</th>\n <th>Unit</th>\n <th>Total</th>\n <th>Status</th>\n <th>Item Id</th>\n <th>Vendor Location Code</th>\n <th style={{width: '15%'}}></th>\n <th>\n { _.isPresent(lineItems) ? <DisputeBtn \n lineItemIds={_.map(lineItems, 'id')}\n target={<span className={`btn btn-flat btn-xs btn-default`}>Manual Dispute All</span>}/> : null\n }\n </th>\n </tr>\n </thead>\n <tbody>\n {rows}\n </tbody>\n </Table>\n )\n}\n\n\nAgreementSpec.propTypes = {\n initialSpecifications: PropTypes.object,\n specifications: PropTypes.object.isRequired,\n lineItems: PropTypes.array.isRequired\n};\n\nconst mapStateToProps = (state, {id}) => {\n const { vendorServiceId, date } = getAgreement(id, state)\n const serviceCodeInEditMode = serviceCodeInSpecEditQuantityMode(id,state)\n return {\n serviceCodeInEditMode,\n purchaseUnitPrices: getUnitPricesForDate(vendorServiceId, date, state),\n vendorInvoiceId: state.vendorInvoice.id,\n vendorId: getVendorId(state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n enterSpecEditMode: (serviceCode, agreementId) => { dispatch(enterEditSpecQuantityMode(serviceCode, agreementId)) }\n }\n}\n\nAgreementSpec = connect(\n mapStateToProps,\n mapDispatchToProps\n)(AgreementSpec)\n\n\nexport default AgreementSpec;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport { Table } from 'react-bootstrap';\nimport { Link } from 'sharedComponents'\n\nvar HwcnTable = ( { hwcns } ) => {\n\n if(_.isPresent(hwcns)) {\n return(\n <Table striped bordered condensed hover>\n <thead>\n <tr>\n <th>Code</th>\n <th>Time</th>\n <th>Location Code</th>\n <th>Action</th>\n </tr>\n </thead>\n <tbody>\n {\n _.map(hwcns, ({id, code, vendorLocationCode, url, datetime}) => {\n return(\n <tr key={`hwcn-${id}`} >\n <td>{code}</td>\n <td>{datetime ? Intl.DateTimeFormat('en', { hour: \"numeric\", minute: \"numeric\", timeZone: 'utc' }).format(new Date(datetime)) : null}</td>\n <td>{vendorLocationCode}</td>\n <td><Link href={url} target=\"_blank\">View</Link></td>\n </tr>)\n })\n\n }\n </tbody>\n </Table>\n )\n\n } else {\n return null\n }\n\n}\n\n\nHwcnTable.propTypes = {\n hwcns: PropTypes.array\n};\n\n\n\n\n\nexport default HwcnTable;\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\n\nimport { Btn } from 'sharedComponents'\nimport { validateAgreements } from '../agreements/operations'\nimport { getValidationCount } from '../agreements/selectors'\n\nvar ValidationBtn = ( { totalCount, validatedCount, unValidatedCount, onValidate, disabled } ) => {\n\n if(totalCount == 0) {\n return null\n } else {\n var multiple = totalCount > 1\n\n if(totalCount == validatedCount) {\n return <Btn onClick={onValidate} disabled={disabled} styles={`${multiple ? '' : 'xs'} success `} icon='check'>Validate {multiple ? `(${validatedCount} / ${totalCount})` : null}</Btn>\n } else {\n return <Btn onClick={onValidate} disabled={disabled} styles={`${multiple ? '' : 'xs'} danger `} icon='times'>Validate {multiple ? `(${validatedCount} / ${totalCount})` : null}</Btn>\n }\n }\n}\n\nValidationBtn.propTypes = {\n ids: PropTypes.array.isRequired,\n disabled: PropTypes.bool,\n};\n\nconst mapStateToProps = (state, {ids}) => {\n return {\n ...getValidationCount(ids, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {ids}) => {\n return {\n onValidate: () => { dispatch(validateAgreements(ids)) }\n }\n}\n\nValidationBtn = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ValidationBtn)\n\n\nexport default ValidationBtn;\n\n\n\n\n\n\n","import { createAction } from 'redux-act';\n\nconst submitStart = createAction(\"failure report has been sent to server\", (ids) => { return( { ids } ) });\nconst submitSuccess = createAction(\"failure report update success from server\", (updatedFailureReports) => { return( { updatedFailureReports } ) });\nconst submitError = createAction(\"failure report update error from server\", (updatedFailureReports) => { return( { updatedFailureReports } ) });\nconst updateReport = createAction(\"failure report update on client side\", (id, newArgs) => { return( { id, newArgs } ) });\nconst loadSuccess = createAction(\"failure report has been loaded success from server\", (loadedFailureReports) => { return( { loadedFailureReports } ) });\n\n\nexport default {\n submitSuccess,\n submitError,\n submitStart,\n updateReport,\n loadSuccess\n}\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport { DropdownSelect } from 'sharedComponents'\nimport { Link, Btn } from 'sharedComponents'\nimport actions from '../failureReports/actions'\nvar {\n updateReport\n} = actions\n\nvar FailureReport = ( { id, reason, fault, retryDate, submitting, disputeCharge, createdViaTicketId, onDeleteRetry, onChangeDisputeCharge } ) => {\n\n var disputeOptions = [\n { value: true, label: <span>Yes</span> },\n { value: false, label: <span>No</span> }\n ]\n\n return(\n <div>\n {\n submitting ? <div className=\"text-center\" style={{\n position: 'absolute',\n zIndex: '100000',\n width: '200px',\n paddingTop: '20px'}}>\n <i className=\"fa fa-spin fa-spinner fa-3x\"></i>\n <h2>Saving</h2>\n </div> : null }\n\n <table style={{ visibility: submitting ? 'hidden' : 'visible' }} className=\"show_for table table-hover show-for-table\">\n <tbody>\n <tr className=\"show-for-wrapper\">\n <td className=\"show-for-label text-muted\">ID</td>\n <td className=\"content\">{id}</td>\n </tr>\n <tr className=\"show-for-wrapper\">\n <td className=\"show-for-label text-muted\">Reason</td>\n <td className=\"content\">{reason}</td>\n </tr>\n <tr className=\"show-for-wrapper\">\n <td className=\"show-for-label text-muted\">Fault</td>\n <td className=\"content\">{fault}</td>\n </tr>\n <tr className=\"show-for-wrapper\">\n <td className=\"show-for-label text-muted\">Dispute Charge</td>\n <td className=\"content\">\n <DropdownSelect title=\"Dispute Charge?\"\n blankText=\"Should we dispute the charge?\"\n allowNull={false}\n required={true}\n onChange={onChangeDisputeCharge}\n selectedValue={disputeCharge}\n options={disputeOptions}\n noWrapTarget={false} />\n </td>\n </tr>\n <tr className=\"show-for-wrapper\">\n <td className=\"show-for-label text-muted\">Retry?</td>\n <td className=\"content\">\n {retryDate ? moment(retryDate).format(\"ddd, Do MMM YYYY\") : 'Nope' }\n   {retryDate ? <Btn styles='danger xs' icon='times' onClick={onDeleteRetry}>Delete Retried Collection</Btn> : null }\n\n </td>\n </tr>\n { createdViaTicketId ?\n <tr className=\"show-for-wrapper\">\n <td className=\"show-for-label text-muted\">Created via Ticket</td>\n <td className=\"content\"><Link href={`/admin/tickets/${createdViaTicketId}`}>#{createdViaTicketId}</Link></td>\n </tr> : null\n }\n </tbody>\n </table>\n </div>\n )\n}\n\n//class FailureReport extends React.Component {\n\n //constructor(props) {\n //super(props);\n //this.state = { minimized: true }\n //this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n //}\n\n //handleToggleMinimized() {\n //this.setState({minimized: !this.state.minimized})\n //}\n\n //render() {\n //const { } = this.props\n //const { minimized } = this.state\n\n //const content = minimized ? null : <div>{\"FailureReport\"}</div>\n\n //return (\n //<div>\n //<span style={{cursor: 'pointer'}} className='pull-right' onClick={this.handleToggleMinimized}>\n //<i className={`fa fa-${ minimized ? 'chevron-down' : 'chevron-up' } text-muted`} style={{ cursor: 'pointer', marginRight: -5, marginLeft: 15 }}></i>\n //</span>\n //{ content }\n //</div>\n //)\n //}\n//}\n\n\nFailureReport.propTypes = {\n id: PropTypes.number.isRequired,\n reason: PropTypes.string.isRequired,\n fault: PropTypes.string.isRequired,\n retryDate: PropTypes.string,\n createdViaTicketId: PropTypes.number\n};\n\nconst mapStateToProps = (state, {}) => {\n return {\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onChangeDisputeCharge: (disputeCharge) => { dispatch(updateReport(id, { disputeCharge } )) },\n onDeleteRetry: () => { dispatch(updateReport(id, { retryCollection: false } )) },\n }\n}\n\nFailureReport = connect(\n mapStateToProps,\n mapDispatchToProps\n)(FailureReport)\n\n\nexport default FailureReport;\n\n\n\n\n\n\n","import { createAction } from 'redux-act';\n\nconst updateCurrentSpecificationId = createAction(\"update the services current specification id\", (serviceId, currentSpecificationId) => { return( { serviceId, currentSpecificationId } ) });\n\nexport default {\n updateCurrentSpecificationId,\n}\n\n","import actions from './actions'\nimport serviceActions from '../services/actions'\nimport { getUnitSpecifications, getSpecificationForm } from './selectors'\nimport { getService } from '../services/selectors'\nimport submitToServer from 'submitToServer'\n\nconst addBinToSpec = (serviceId, serviceCode) => (dispatch, getState) => {\n\n const state = getState()\n\n let { currentSpecificationId, ...restService } = getService(serviceId, state)\n let currentUnitSpecifications = getUnitSpecifications(currentSpecificationId, state)\n\n dispatch(actions.setCurrentSpecQuantity(serviceId, serviceCode, 1))\n\n const allCollectionPlanNames = _(currentUnitSpecifications).map('collectionPlanName').uniq().filter(_.isPresent).value()\n\n if(allCollectionPlanNames.length == 1) {\n dispatch(actions.setCurrentSpecFrequency(serviceId, serviceCode, allCollectionPlanNames[0]))\n }\n\n}\n\n\nconst debounceAlert = _.debounce((status) => alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`), 5000)\n\nconst submitSpecificationForm = (serviceId) => (dispatch, getState) => {\n\n const state = getState()\n const submitPath = state.api.specificationsPath\n\n const formData = getSpecificationForm(serviceId, state)\n dispatch(actions.submitStart(serviceId))\n\n submitToServer(submitPath, { specificationVersion: { serviceId, combinedUnitSpecifications: formData.unitSpecifications } },\n (data,v) => {\n if(data.specifications) {\n dispatch(actions.submitSuccess(data.specifications.byId))\n dispatch(actions.closeSpecificationForm(serviceId))\n _.each(data.specifications.byId, ({serviceId, id}) => {\n dispatch(serviceActions.updateCurrentSpecificationId(serviceId, id))\n })\n }\n },\n (data, status, e) => {\n //dispatch(actions.serverError())\n debounceAlert(status)\n }, { method: 'POST' })\n}\n\n\nexport {\n addBinToSpec,\n submitSpecificationForm\n}\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport SpecQuantity from './SpecQuantity';\nimport { getService } from '../services/selectors'\nimport { getAgreement } from '../agreements/selectors'\nimport { getActivityDataForAgreement } from '../locations/selectors'\nimport { getUnitSpecifications, getSpecificationForm, getSpecification } from '../specifications/selectors'\nimport { addBinToSpec, submitSpecificationForm } from '../specifications/operations'\nimport { serviceCodeInCurrentSpecEditQuantityMode } from '../app/selectors'\nimport { enterEditCurrentSpecQuantityMode } from '../app/operations'\n\nimport { ListGroup, ListGroupItem, Table } from 'react-bootstrap'\n\nimport { Btn, DropdownSelect } from 'sharedComponents'\nimport actions from '../specifications/actions'\nvar {\n setSpecificationForm,\n closeSpecificationForm,\n setCurrentSpecFrequency\n} = actions\n//\n//\n\n//var CollectionGroup = ( { collectionPlanName, unitSpecifications } ) => {\n //return(<ListGroupItem>\n //{collectionPlanName}\n //<ListGroup style={{paddingLeft: '15px'}}>\n //{_.map(unitSpecifications,(unitSpec) => <ListGroupItem key={unitSpec.serviceCode} ><UnitSpecification {...unitSpec}/></ListGroupItem>) }\n //</ListGroup>\n //</ListGroupItem>)\n//}\nlet Specification = ({\n currentUnitSpecifications,\n unitSpecifications = {},\n lineItems,\n form,\n serviceId,\n serviceCodeInEditMode,\n onEdit,\n agreementId,\n onCancelEdit,\n enterSpecEditMode,\n onAddBin,\n onChangeCollectionPlan,\n onSubmit\n}) => {\n const lineItemsByCode = _(lineItems).filter(({serviceCode}) => /^ABC-/.test(serviceCode) ).groupBy('serviceCode').value()\n\n const formUnitSpecifications = _.get(form, 'unitSpecifications') || {}\n\n const serviceCodes = _([formUnitSpecifications, unitSpecifications, currentUnitSpecifications, lineItemsByCode]).\n map((x, y)=> Object.keys(x) ).flatten().uniq().sort().value()\n\n let rows = _(serviceCodes).map((serviceCode) => {\n\n let agreementSpec = unitSpecifications[serviceCode] || {}\n let formSpec = formUnitSpecifications[serviceCode] || {}\n let currentSpec = currentUnitSpecifications[serviceCode] || {}\n let chargeQuantity = _(lineItemsByCode[serviceCode] || []).map('quantity').sum()\n\n const specDiff = (formSpec.quantity || 0) - (currentSpec.quantity || 0)\n const renderedSpecDiff = specDiff != 0 ? <span className={`text-${specDiff > 0 ? 'success' : 'danger' } `}>{specDiff > 0 ? '+' : '-' }{Math.abs(specDiff)}</span> : null\n\n return(\n <tr key={serviceCode}>\n <td style={{widtd: '25%'}}>{serviceCode}</td>\n <td>{chargeQuantity}</td>\n <td>\n {\n form ? (\n _.isPresent(formSpec.quantity) ?\n <SpecQuantity\n onClick={() => enterSpecEditMode(serviceCode, agreementId) }\n inEditMode={serviceCode == serviceCodeInEditMode}\n >\n <span><span style={{color: 'rgb(59, 175, 218)'}}>{formSpec.quantity}</span>{renderedSpecDiff}</span>\n </SpecQuantity>\n : <Btn icon='plus' styles='xs info flat' onClick={ () => { onAddBin(serviceId, serviceCode); enterSpecEditMode(serviceCode, agreementId) } }>Add</Btn>\n )\n : currentSpec.quantity\n }\n </td>\n <td>\n {\n form && _.isPresent(formSpec.quantity) ?\n <DropdownSelect blankText={\"select collection plan\"}\n title={`Select collection plan for ${serviceCode}`}\n allowNull={true}\n onChange={(name) => onChangeCollectionPlan(serviceId, serviceCode, name) } selectedValue={formSpec.collectionPlanName}\n options={_.map([\"on demand\", \"Weekly\", \"Fortnightly\", \"Every 4 Weeks\", \"Every 8 Weeks\", \"Quarterly\", \"Half Yearly\", \"Annually\"], (x) => { return { value: x, label: x } } )}\n />\n : currentSpec.collectionPlanName\n }\n </td>\n {\n _.isPresent(unitSpecifications) ?\n <React.Fragment>\n <td>{agreementSpec.quantity}</td>\n <td>{agreementSpec.collectionPlanName}</td>\n </React.Fragment>\n : null\n }\n </tr>\n )\n\n }\n ).value()\n\n\n\n return(\n <div>\n <Table bordered condensed hover>\n <thead>\n <tr>\n <td style={{widtd: '25%'}}>Service Code</td>\n <td>Charge</td>\n <td>Current Spec</td>\n <td>Current Frequency</td>\n {\n _.isPresent(unitSpecifications) ?\n <React.Fragment>\n <td>Spec on Date</td>\n <td>Frequency on Date</td>\n </React.Fragment>\n : null\n }\n </tr>\n </thead>\n <tbody>\n {rows}\n </tbody>\n </Table>\n\n {\n _.isBlank(form) ? <Btn\n className='pull-right'\n styles='xs primary flat'\n onClick={ () => { onEdit(serviceId, currentUnitSpecifications) } }\n >Edit Spec</Btn> :\n <span className='pull-right'>\n <Btn icon='trash' disabled={form.submitting} className='mr-2' styles='xs danger flat' onClick={ () => { onCancelEdit(serviceId) } }>Cancel</Btn>\n <Btn icon='save' disabled={form.submitting} styles='xs success flat' onClick={ () => onSubmit(serviceId) }>Save</Btn>\n </span>\n }\n </div>\n )\n}\n\n\nSpecification.propTypes = {\n};\n\n\nconst mapStateToProps = (state, { agreementId }) => {\n\n let { specificationId, serviceId, ...restAgreement } = getAgreement(agreementId, state)\n let { currentSpecificationId, ...restService } = getService(serviceId, state)\n let form = getSpecificationForm(serviceId, state)\n\n const serviceCodeInEditMode = serviceCodeInCurrentSpecEditQuantityMode(agreementId, state)\n const { lineItems } = getActivityDataForAgreement(agreementId, state)\n\n if(currentSpecificationId == specificationId) {\n\n return {\n serviceCodeInEditMode,\n form,\n lineItems,\n serviceId,\n agreementId,\n currentUnitSpecifications: getUnitSpecifications(currentSpecificationId, state)\n }\n\n } else {\n\n return {\n serviceCodeInEditMode,\n form,\n agreementId,\n lineItems,\n serviceId,\n currentUnitSpecifications: getUnitSpecifications(currentSpecificationId, state),\n unitSpecifications: getUnitSpecifications(specificationId, state)\n }\n\n }\n}\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onEdit: (serviceId, unitSpecifications) => { dispatch(setSpecificationForm(serviceId, unitSpecifications) ) },\n onCancelEdit: (serviceId) => { dispatch(closeSpecificationForm(serviceId) ) },\n onAddBin: (serviceId, serviceCode) => { dispatch(addBinToSpec(serviceId, serviceCode) ) },\n onChangeCollectionPlan: (serviceId, serviceCode, collectionPlanName) => { dispatch(setCurrentSpecFrequency(serviceId, serviceCode, collectionPlanName) ) },\n onSubmit: (serviceId) => dispatch(submitSpecificationForm(serviceId)),\n enterSpecEditMode: (serviceCode, agreementId) => { dispatch(enterEditCurrentSpecQuantityMode(serviceCode,agreementId))\n }\n\n }\n}\n\nSpecification = connect(\n mapStateToProps,\n mapDispatchToProps\n)(Specification)\n\n\nexport default Specification;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\n//import { getLineItem } from '../lineItems/selectors'\nimport { submitIgnoreDisputes } from '../disputeLedgerItems/operations'\nimport { getDisputeLedgerItem } from '../disputeLedgerItems/selectors'\nimport { Btn, StatelessModal } from 'sharedComponents'\n\nclass IgnoreBtn extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isModalOpen: false,\n form: {}\n };\n this.handleOpenModal = this.handleOpenModal.bind(this)\n this.handleCloseModal = this.handleCloseModal.bind(this)\n this.handleInputChange = this.handleInputChange.bind(this)\n this.handleSave = this.handleSave.bind(this);\n }\n\n handleSave () {\n var { reason } = this.state.form\n\n this.props.onSave(reason, this.props.disputeLedgerItemIds )\n this.setState({ isModalOpen: false, form: {} })\n }\n\n handleOpenModal () { this.setState({ isModalOpen: true }) }\n handleCloseModal () { this.setState({ isModalOpen: false }) }\n handleInputChange(event) {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n\n this.setState(\n {\n form: {\n [name]: value\n }\n }\n );\n }\n\n render() {\n let { disputeLedgerItemIds, disputeLedgerItems, target, onSave } = this.props\n const { form, isModalOpen} = this.state\n\n const anyIgnored = _.some(disputeLedgerItems, 'ignored')\n const anyNotIgnored = _.some(disputeLedgerItems, ({ignored}) => !ignored )\n \n const saveEnabled = _.isPresent(form.reason) && form.reason.length > 3\n\n return (\n <React.Fragment>\n { anyNotIgnored ? <StatelessModal title='Ignore' target={target || <span className={`btn btn-flat btn-xs btn-info`}>Ignore {disputeLedgerItemIds.length > 1 ? \"All\" : ''}</span>} \n isOpen={isModalOpen} onCloseModal={this.handleCloseModal} onOpenModal={this.handleOpenModal}>\n <form className=\"simple_form form-vertical\">\n <div className=\"form-group\">\n <label className=\"control-label\">Why are you ignoring this?</label>\n <textarea className=\"form-control\" name=\"reason\" value={form.reason} onChange={this.handleInputChange} />\n </div>\n <div style={{ borderTop: '1px solid #e6e9ed', padding: '10px 10px 5px 10px', marginLeft: -10, marginRight: -10 }}>\n <Btn styles='success block' disabled={!saveEnabled} onClick={this.handleSave}>   Save   </Btn><br/>\n <div className=\"text-right\"><div><Btn styles='danger xs' onClick={this.handleCloseModal}>Cancel</Btn></div></div>\n </div>\n </form>\n </StatelessModal> : null }\n { anyIgnored ? <span onClick={() => onSave(null, disputeLedgerItemIds)} className={`btn btn-flat btn-xs btn-default`}>Don't Ignore {disputeLedgerItemIds.length > 1 ? \"All\" : ''}</span> : null }\n </React.Fragment>\n\n )\n }\n}\n\n\nIgnoreBtn.propTypes = {\n disputeLedgerItemIds: PropTypes.array.isRequired\n};\n\n\nconst mapStateToProps = (state, { disputeLedgerItemIds }) => {\n return {\n disputeLedgerItems: _.map(disputeLedgerItemIds, (id) => getDisputeLedgerItem(id, state))\n }\n}\n\nconst mapDispatchToProps = (dispatch, {lineItemIds}) => {\n return {\n onSave: (ignoreReason, ids) => dispatch(submitIgnoreDisputes(ignoreReason, ids)),\n }\n}\n\nIgnoreBtn = connect(\n mapStateToProps,\n mapDispatchToProps\n)(IgnoreBtn)\n\n\nexport default IgnoreBtn;\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { Table } from 'react-bootstrap';\nimport { hMoney } from 'sharedFormatters'\nimport IgnoreBtn from './IgnoreBtn'\nimport { Link } from 'sharedComponents'\nimport { Tooltip, OverlayTrigger } from 'react-bootstrap'\n\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar DisputeLedgerItems = ( { disputeLedgerItems } ) => {\n\n if(_.isBlank(disputeLedgerItems)) {\n return <div>No Disputes</div>\n } else {\n return(\n <Table bordered condensed hover>\n <thead>\n <tr>\n <th style={{width: '15%'}}>Service Code</th>\n <th style={{width: '5%'}}>Quantity</th>\n <th>£ Unit</th>\n <th>£ Total</th>\n <th>Reason</th>\n <th>Result</th>\n <th>Id</th>\n <th>Item Id</th>\n <th className='actions'>\n { disputeLedgerItems.length > 1 ? <OverlayTrigger placement='top' overlay={<Tooltip id={disputeLedgerItems[0].id}>\n <strong className='text-danger'>If you are trying to remove the dispute, update the agreement to accept it rather than ignoring. Only ignore disputes that are legitimate but will not be pursued in this invoice.</strong>\n </Tooltip>}>\n <i className='fa fa-warning text-danger mr-2' style={{'fontSize': '150%'}}></i>\n </OverlayTrigger> : null}\n { disputeLedgerItems.length > 1 ? <IgnoreBtn disputeLedgerItemIds={_.map(disputeLedgerItems,'id')} /> : null}\n </th>\n </tr>\n </thead>\n <tbody>\n {\n _.map(disputeLedgerItems, ({\n id,\n lineItemId,\n serviceCode,\n credited,\n ignored,\n quantity,\n reason,\n netTotalCents,\n unitPriceCents,\n creditNote,\n ignoreReason,\n ...rest\n }) => {\n\n const result = creditNote ? <span><Link href={`/admin/vendor_credits/${creditNote.id}`}>{creditNote.number}</Link></span> :\n ignored ? <span>Ignored: {ignoreReason}</span> : null\n\n const resolved = creditNote ? \"Credit\" : ignored ? 'Ignored' : null\n return(\n <tr key={id} className={`${credited ? 'success' : ignored ? 'info' : 'danger' }`}>\n <td style={{width: '15%'}}>{serviceCode}</td>\n <td style={{width: '5%'}}>{quantity}</td>\n <td>{hMoney(unitPriceCents)}</td>\n <td>{hMoney(netTotalCents)}</td>\n <td>{reason}</td>\n <td>{result}</td>\n <td>{id}</td>\n <td><Link href={`/admin/vendor_invoice_line_items/${lineItemId}`}>{lineItemId}</Link></td>\n <td className='actions'><IgnoreBtn disputeLedgerItemIds={[id]}/></td>\n </tr>\n )\n })\n }\n </tbody>\n </Table>\n )\n }\n}\n\nDisputeLedgerItems.propTypes = {\n disputeLedgerItems: PropTypes.array\n};\n\n\nconst mapStateToProps = (state, {}) => {\n return {\n }\n}\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n }\n}\n\nDisputeLedgerItems = connect(\n mapStateToProps,\n mapDispatchToProps\n)(DisputeLedgerItems)\n\n\nexport default DisputeLedgerItems;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport appActions from '../app/actions'\nimport { getKeyDownListener } from '../app/selectors'\nimport { Btn } from 'sharedComponents'\nimport { enterSalesItemAgreementMode } from '../app/operations'\nimport { salesItemInMoveDateMode } from '../app/selectors'\nimport { getAgreement } from '../agreements/selectors'\nimport { getSalesLedgerItem } from '../salesLedgerItems/selectors'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar MoveSalesItemBtn = ( { active, date, agreementDate, handleMakeActive } ) => {\n\n const isoDateFormat = \"ddd, Do MMM YYYY\"\n const formattedDate = moment(date).format(isoDateFormat)\n const initialDateRender = agreementDate != date ? <span className='text-muted text-small'>Initially on {moment(date).format(isoDateFormat)}</span> : null\n\n if(active){\n return (<span>{initialDateRender}<i className='fa fa-chevron-down'></i><i className='fa fa-chevron-up'></i></span>)\n } else {\n return <span>{initialDateRender}<Btn onClick={handleMakeActive} styles='xs primary'>Move</Btn></span>\n }\n\n}\n\nMoveSalesItemBtn.propTypes = {\n id: PropTypes.number.isRequired,\n};\n\nconst mapStateToProps = (state, {id, ...props}) => {\n const { agreementId, date } = getSalesLedgerItem(id, state)\n const { date: agreementDate } = getAgreement(agreementId, state)\n\n return {\n agreementDate,\n date,\n active: salesItemInMoveDateMode(id, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id, stepDates}) => {\n return {\n handleMakeActive: () => { dispatch(enterSalesItemAgreementMode(id)) }\n }\n}\n\nMoveSalesItemBtn = connect(\n mapStateToProps,\n mapDispatchToProps\n)(MoveSalesItemBtn)\n\n\nexport default MoveSalesItemBtn;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { Table } from 'react-bootstrap';\nimport { hMoney } from 'sharedFormatters'\nimport MoveSalesItemBtn from './MoveSalesItemBtn'\nimport { Link } from 'sharedComponents'\n\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar SalesLedgerItems = ( {\n salesLedgerItems,\n specifications,\n postedToSalesLedger\n} ) => {\n\n if(_.isBlank(salesLedgerItems)) {\n return <div>\n <p className='mt-5 text-strong'>Sales Items Have not been generated for this agreement yet. They will be calculated based on this agreement specification seen below, plus relevant Min Visit and HWCN charges.</p>\n <p className='mt-5 text-strong'>If there are no items below, there will be no charge to the client</p>\n\n <Table bordered condensed hover>\n <thead>\n <tr>\n <th style={{width: '15%'}}>Service Code</th>\n <th style={{width: '5%'}}>Quantity</th>\n </tr>\n </thead>\n <tbody>\n {\n _.map(specifications, ({\n serviceCode,\n quantity,\n }) => {\n return(\n <tr key={serviceCode}>\n <td style={{width: '15%'}}>{serviceCode}</td>\n <td style={{width: '5%'}}>{quantity}</td>\n </tr>\n )\n })\n }\n </tbody>\n </Table>\n\n\n </div>\n } else {\n return(\n <div>\n { !postedToSalesLedger ? <p className='mt-5 text-danger'>The specification for this agreement has changed. To reflect the updated charges the agreement will need to be reposted</p> : null }\n <Table bordered condensed hover>\n <thead>\n <tr>\n <th style={{width: '15%'}}>Service Code</th>\n <th style={{width: '5%'}}>Quantity</th>\n <th>£ Unit</th>\n <th>£ Total</th>\n <th>Result</th>\n <th>Id</th>\n <th className='actions' >Actions</th>\n </tr>\n </thead>\n <tbody>\n {\n _.map(salesLedgerItems, ({\n id,\n serviceCode,\n ignored,\n quantity,\n netTotalCents,\n unitPriceCents,\n vectorXeroDocument,\n ignoreReason\n }) => {\n\n const result = vectorXeroDocument ? <span><Link href={`/admin/accounts/${vectorXeroDocument.accountNumber}`}>{vectorXeroDocument.number}</Link></span> :\n ignored ? <span>Ignored: {ignoreReason}</span> : null\n\n return(\n <tr key={id} className={`${vectorXeroDocument ? 'success' : ignored ? 'info' : '' }`}>\n <td style={{width: '15%'}}>{serviceCode}</td>\n <td style={{width: '5%'}}>{quantity}</td>\n <td>{hMoney(unitPriceCents)}</td>\n <td>{hMoney(netTotalCents)}</td>\n <td>{result}</td>\n <td>{id}</td>\n <td className='actions' ><MoveSalesItemBtn id={id}/></td>\n </tr>\n )\n })\n }\n </tbody>\n </Table>\n </div>\n\n )\n }\n}\n\nSalesLedgerItems.propTypes = {\n salesLedgerItems: PropTypes.array\n};\n\n\nconst mapStateToProps = (state, {}) => {\n return {\n }\n}\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n }\n}\n\nSalesLedgerItems = connect(\n mapStateToProps,\n mapDispatchToProps\n)(SalesLedgerItems)\n\n\nexport default SalesLedgerItems;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport appActions from '../app/actions'\nimport { agreementInMoveDateMode } from '../app/selectors'\nimport { enterMoveAgreementDateMode } from '../app/operations'\nimport { getAgreement } from '../agreements/selectors'\nimport { Btn } from 'sharedComponents'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar MoveAgreementBtn = ( { active, date, initialDate, handleMakeActive } ) => {\n\n const isoDateFormat = \"ddd, Do MMM YYYY\"\n const formattedDate = moment(date).format(isoDateFormat)\n\n const initialDateRender = initialDate != date ? <span className='text-muted text-small'>Initially on {moment(initialDate).format(isoDateFormat)}</span> : null\n\n if(active){\n return (<span>{initialDateRender} <strong>{formattedDate}</strong></span>)\n } else {\n return <span>{initialDateRender} <Btn onClick={handleMakeActive} styles='xs primary'>Move Date</Btn></span>\n }\n\n}\n\nMoveAgreementBtn.propTypes = {\n};\n\n\nconst mapStateToProps = (state, {id}) => {\n const { date, initialDate } = getAgreement(id, state)\n return {\n date,\n initialDate,\n active: agreementInMoveDateMode(id, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n handleMakeActive: () => { dispatch(enterMoveAgreementDateMode(id)) }\n }\n}\n\nMoveAgreementBtn = connect(\n mapStateToProps,\n mapDispatchToProps\n)(MoveAgreementBtn)\n\n\nexport default MoveAgreementBtn;\n\n\n\n\n\n\n","const getVendorAccount = (id, state) => {\n return state.vendorAccounts.byId[id]\n}\n\nconst getVendorAccounts = (state) => {\n return Object.values(state.vendorAccounts.byId)\n}\n\nconst getVendorAccountsById = (state) => {\n return state.vendorAccounts.byId\n}\n\n\nexport {\n getVendorAccount,\n getVendorAccounts,\n getVendorAccountsById\n}\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { Tabs, Tab, Badge, Panel, Label } from 'react-bootstrap';\nimport { Btn, Link } from 'sharedComponents'\nimport AgreementSpec from './AgreementSpec'\nimport HwcnTable from './HwcnTable'\nimport ValidationBtn from './ValidationBtn'\nimport MatchBtn from './MatchBtn'\nimport FailureReport from './FailureReport'\nimport Specification from './Specification'\nimport DisputeLedgerItems from './DisputeLedgerItems'\nimport SalesLedgerItems from './SalesLedgerItems'\nimport MoveAgreementBtn from './MoveAgreementBtn'\nimport { getVendorService } from '../vendorServices/selectors'\nimport { getVendorAccount } from '../vendorAccounts/selectors'\nimport { getActivityDatesForLocation } from '../locations/selectors'\nimport { agreementInMoveDateMode, inMatchMode } from '../app/selectors'\nimport appActions from '../app/actions'\nimport { DropdownSelect } from 'sharedComponents'\nimport { Tooltip, OverlayTrigger } from 'react-bootstrap'\n\nconst Frg = React.Fragment\n\nimport actions from '../agreements/actions'\nvar {\n destroy,\n setReconcilePolicy,\n} = actions\n\nclass Agreement extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = { minimized: props.matchMode }\n this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n }\n\n handleToggleMinimized() {\n this.setState({minimized: !this.state.minimized})\n }\n\n render () {\n let {\n serviceName,\n hwcns,\n locationHasHwcns,\n title,\n //specificationId,\n vendorInvoiceAccount,\n locationId,\n id,\n disputeLedgerItemsByLineItem,\n serviceId,\n date,\n salesLedgerItems,\n vendorService,\n vendorAccount,\n failureReport,\n source,\n reconcilePolicies,\n reconcilePolicyName,\n agreementInMoveDateMode,\n onDestroy,\n onChangeReconcilePolicy,\n matchedAt,\n reconciledAt,\n validatedAt,\n inDataCoverage,\n submitting,\n lineItems,\n isSalesAgreement,\n specifications,\n postedToSalesLedger,\n matchMode,\n isCollection\n } = this.props\n\n let { minimized } = this.state\n\n const disputeLedgerItems = _(disputeLedgerItemsByLineItem).values().flatten().value()\n const disputeLedgerItemsByState = _(disputeLedgerItems).groupBy(({ credited, ignored }) => credited ? 'credited' : ignored ? 'ignored' : 'in-dispute' ).value()\n\n const disputeBadges = _.compact([\n disputeLedgerItemsByState['in-dispute'] ? <span key='in-dispute' className='badge badge-danger'>{disputeLedgerItemsByState['in-dispute'].length}</span> : null,\n disputeLedgerItemsByState['credited'] ? <span key='credited' className='badge badge-success'>{disputeLedgerItemsByState['credited'].length}</span> : null,\n disputeLedgerItemsByState['ignored'] ? <span key='ignored' className='badge badge-info'>{disputeLedgerItemsByState['ignored'].length}</span> : null,\n ])\n\n let alwaysOpen = matchMode && lineItems.length == 0 || !matchMode\n\n let defaultHeadingColor = matchMode && lineItems.length > 0 ? 'success' : 'default'\n const accountDifferent = vendorAccount != vendorInvoiceAccount\n\n let body = !alwaysOpen && minimized ? null : (\n <Panel.Body>\n {\n submitting ?\n <div className=\"text-center\" style={{\n position: 'absolute',\n zIndex: '100000',\n width: '200px',\n paddingTop: '20px'}}>\n <i className=\"fa fa-spin fa-spinner fa-3x\"></i>\n <h2>Saving</h2>\n </div> : null }\n <div style={{ visibility: submitting ? 'hidden' : 'visible' }}>\n <Tabs mountOnEnter={true} defaultActiveKey=\"compare\" animation={false} id={`agreement-${id}-tabs`}>\n <Tab eventKey=\"compare\" title=\"Compare\">\n <AgreementSpec {...this.props}/>\n </Tab>\n <Tab eventKey=\"disputes\" title={<Frg>Disputes {disputeBadges}</Frg>}>\n <DisputeLedgerItems disputeLedgerItems={disputeLedgerItems}/>\n </Tab>\n <Tab eventKey=\"details\" title=\"Agreement Details\">\n <table className=\"show_for table table-hover show-for-table\">\n <tbody>\n <tr className=\"show-for-wrapper\">\n <td className=\"show-for-label text-muted\">ID</td>\n <td className=\"content\">{id} { onDestroy ? <Btn styles='danger xs' icon='times' onClick={onDestroy}>Destroy</Btn> : null} </td>\n </tr>\n <tr className=\"show-for-wrapper\">\n <td className=\"show-for-label text-muted\">Service ID</td>\n <td className=\"content\">{serviceId}</td>\n </tr>\n <tr className=\"show-for-wrapper\">\n <td className=\"show-for-label text-muted\">Vendor Service</td>\n <td className=\"content\"><Link target='_blank' href={vendorService.url}>{vendorService.name}</Link></td>\n </tr>\n <tr className=\"show-for-wrapper\">\n <td className=\"show-for-label text-muted\">Vendor Account</td>\n <td className=\"content\"><Link target='_blank' href={vendorAccount.url}>{vendorAccount.name}</Link> {accountDifferent ? <strong className='text-danger'>Different From Invoice</strong> : '' }</td>\n </tr>\n <tr className=\"show-for-wrapper\">\n <td className=\"show-for-label text-muted\">Source</td>\n <td className=\"content\">{source.type} : { source.id } : { source.createdViaTicketId ? <Link target='_blank' href={`/admin/tickets/${source.createdViaTicketId}`}>#{source.createdViaTicketId}</Link> : null } </td>\n </tr>\n <tr className=\"show-for-wrapper\">\n <td className=\"show-for-label text-muted\">Process</td>\n <td className=\"content\">\n Match: {matchedAt || 'not run'} => ({inDataCoverage ? \"In Data\" : \"Not in Data\"}) Reconcile: {reconciledAt || 'no run'} => Validated: {validatedAt || 'not run'}\n </td>\n </tr>\n <tr className=\"show-for-wrapper\">\n <td className=\"show-for-label text-muted\">Reconcile Policy</td>\n <td className=\"content\">\n <DropdownSelect blankText={\"Defaults to Account's Policy\"}\n title={'Select a policy for this agreement'}\n allowNull={true}\n onChange={onChangeReconcilePolicy} selectedValue={reconcilePolicyName}\n options={_.map(reconcilePolicies, (x) => { return { value: x, label: x } } )}\n />\n </td>\n </tr>\n </tbody>\n </table>\n </Tab>\n {\n failureReport ?\n <Tab eventKey=\"failure_report\" unmountOnExit title={<React.Fragment><i className={`fa fa-warning`}></i> Failure Report</React.Fragment>}>\n <FailureReport {...failureReport}/>\n </Tab> : null\n }\n {\n isCollection && serviceId ?\n <Tab eventKey=\"spec\" unmountOnExit title=\"Service Spec\">\n <Specification agreementId={id} />\n </Tab> : null\n }\n { isCollection && _.isPresent(hwcns) ?\n <Tab eventKey=\"hwcns\" unmountOnExit title={<Frg>Proof of Collection <span className='badge badge-sucess'>{hwcns.length}</span></Frg>}>\n <HwcnTable hwcns={hwcns}/>\n </Tab> : null\n }\n { isSalesAgreement ?\n <Tab eventKey=\"sales\" unmountOnExit\n title={\n <Frg>\n Sales { salesLedgerItems ? <span className='badge badge-sucess'>{salesLedgerItems.length}</span> : null}\n { !postedToSalesLedger && _.isPresent(salesLedgerItems) ?\n <OverlayTrigger placement='top' overlay={\n <Tooltip id={id}>\n <strong className='text-danger'>The specification for this agreement has changed. To reflect the updated charges the agreement will need to be reposted</strong>\n </Tooltip>}>\n <i className='fa fa-warning text-danger mr-2' style={{'fontSize': '150%'}}></i>\n </OverlayTrigger> : null\n }\n </Frg>}\n >\n <SalesLedgerItems\n postedToSalesLedger={postedToSalesLedger}\n specifications={specifications}\n salesLedgerItems={salesLedgerItems}/>\n </Tab> : null }\n </Tabs>\n </div>\n </Panel.Body>\n )\n\n return(\n <Panel id={`agreement-${id}`} className={agreementInMoveDateMode ? 'selected' : '' } bsStyle={defaultHeadingColor}>\n <Panel.Heading>\n <Panel.Title componentClass=\"h3\">\n\n <div className='pull-right'>\n { isCollection && locationHasHwcns && _.isEmpty(hwcns) ? <Label className='mr-2' bsStyle=\"danger\" title=\"HWCN\">HWCN MISSING</Label> : null }\n\n { submitting ? null : <MoveAgreementBtn id={id}/>} <ValidationBtn ids={[id]} disabled={submitting}/>\n { alwaysOpen ? null :\n <i\n className={`fa fa-2x fa-${ minimized ? 'chevron-down' : 'chevron-up' } panel-headingtext-muted`}\n style={{ cursor: 'pointer', marginRight: -5, marginLeft: 15 }}\n onClick={this.handleToggleMinimized}\n >\n </i> }\n </div>\n {failureReport ? <span className='text-danger'><i className={`fa fa-warning`}></i> Reported Missed </span> : null } {title}     {accountDifferent ? <strong>*Account different from invoice*</strong> : '' }\n </Panel.Title>\n </Panel.Heading>\n {body}\n </Panel>\n )\n }\n\n}\n\nAgreement.propTypes = {\n disputeLedgerItemsByLineItem: PropTypes.object.isRequired,\n salesLedgerItems: PropTypes.array,\n serviceName: PropTypes.string,\n specification: PropTypes.object,\n id: PropTypes.number.isRequired,\n locationId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n serviceId: PropTypes.number,\n date: PropTypes.string.isRequired,\n vendorService: PropTypes.object.isRequired,\n vendorAccount: PropTypes.object.isRequired,\n source: PropTypes.object.isRequired,\n locationActivityDates: PropTypes.array.isRequired,\n submitting: PropTypes.bool,\n destroyable: PropTypes.bool.isRequired,\n matchMode: PropTypes.bool\n};\n\nconst mapStateToProps = (state, {locationId, id, vendorAccountId, vendorServiceId}) => {\n return {\n matchMode: inMatchMode(state),\n locationActivityDates: getActivityDatesForLocation(locationId, state),\n vendorService: getVendorService(vendorServiceId, state),\n vendorAccount: getVendorAccount(vendorAccountId, state),\n agreementInMoveDateMode: agreementInMoveDateMode(id, state),\n reconcilePolicies: state.reconcilePolicies,\n vendorInvoiceAccount: getVendorAccount(state.vendorInvoice.vendorAccountId, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id, destroyable}) => {\n return {\n onDestroy: () => destroyable ? dispatch(destroy([id])) : null,\n onChangeReconcilePolicy: (policy) => dispatch(setReconcilePolicy(id, policy))\n }\n}\n\nAgreement = connect(\n mapStateToProps,\n mapDispatchToProps\n)(Agreement)\n\n\nexport default Agreement;\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { getService, getServicesForLocation } from '../services/selectors'\nimport { getUnitSpecifications } from '../specifications/selectors'\nimport { getVendorInvoice } from '../vendorInvoice/selectors'\nimport { Btn } from 'sharedComponents'\nimport actions from '../agreements/actions'\nimport { selectServiceAgreementForm, submitAgreementForm, createBlankCollectionAgreement } from '../agreements/operations'\n\nimport { Table, Panel, ListGroupItem, ListGroup } from 'react-bootstrap';\nimport { hMoney } from 'sharedFormatters'\nimport Td from './Td'\n\nvar {\n setSpecAgreementForm,\n closeAgreementForm,\n} = actions\n\nvar CollectionAgreementForm = ( {\n locationServices,\n specifications,\n agreedSpecifications,\n lineItems,\n service,\n submitting,\n vendorAccountId,\n onSelectService,\n onSetAgreedSpec,\n onSetAgreedSpecs,\n onSubmit,\n onCancel\n} ) => {\n var title, content, footer\n\n specifications = specifications || {}\n\n const specQuantities = {}\n const lineQuantities = {}\n _(lineItems).each(({serviceCode, quantity}) => lineQuantities[serviceCode] = ( quantity + (lineQuantities[serviceCode] || 0) ) )\n _(specifications).each(({serviceCode, quantity}) => specQuantities[serviceCode] = quantity )\n\n if(service) {\n title = `New Collection Agreement - ${service.title}`\n\n content = (\n <Table bordered condensed hover >\n <thead>\n <tr>\n <th style={{width: '25%'}}>Service Code</th>\n <th style={{width: '10%'}}>Agreed</th>\n <th style={{width: '10%'}}>Spec</th>\n <th style={{width: '10%'}}>Charge</th>\n <th>Unit</th>\n <th>Total</th>\n <th style={{width: '5%'}} className='actions'>Agree?</th>\n </tr>\n </thead>\n <tbody>\n {\n _(lineItems).groupBy('serviceCode').map((lineItems, serviceCode) => {\n\n const { quantity: totalSpecQuantity = 0 } = specifications[serviceCode] || {}\n let specQuantityLeft = totalSpecQuantity\n let agreedQuantityLeft = agreedSpecifications[serviceCode] || 0\n const totalLineQuantity = _.sumBy(lineItems, 'quantity')\n const itemsCount = lineItems.length\n\n return _(lineItems).sortBy('quantity').map((lineItem, i) => {\n const { quantity: lineQuantity, unitPriceCents, totalPriceCents} = lineItem\n let [specQuantity, agreedQuantity] = (itemsCount === i + 1) ? \n [ specQuantityLeft, agreedQuantityLeft ] :\n [ _.min([lineQuantity, specQuantityLeft]), _.min([lineQuantity, agreedQuantityLeft]) ]\n\n specQuantityLeft = _.max([specQuantityLeft - lineQuantity, 0])\n agreedQuantityLeft = _.max([agreedQuantityLeft - lineQuantity, 0])\n const agreedDiff = agreedQuantity - lineQuantity\n const renderedAgreedDiff = agreedDiff != 0 ? <span className={`text-${agreedDiff > 0 ? 'success' : 'danger' } `}>{agreedDiff > 0 ? '+' : '-' }{Math.abs(agreedDiff)}</span> : null\n\n const mainHighlightClass = { [specQuantity]: 'success', [lineQuantity]: 'info', 0: 'danger' }[agreedQuantity] || 'default'\n\n return(\n <tr key={`${serviceCode}-${lineItem.id}`}>\n <Td highlight={true} highlightClass={mainHighlightClass} style={{width: '25%'}}>{serviceCode}</Td>\n <Td highlight={true} highlightClass={mainHighlightClass} style={{width: '10%'}}>{agreedQuantity} {renderedAgreedDiff}</Td>\n <Td highlight={specQuantity == agreedQuantity} highlightClass='success' onClick={() => onSetAgreedSpec(serviceCode, totalSpecQuantity)} style={{width: '10%', cursor: 'pointer'}}>\n {specQuantity}\n </Td>\n <Td highlight={lineQuantity == agreedQuantity} highlightClass={mainHighlightClass} onClick={() => onSetAgreedSpec(serviceCode, totalLineQuantity)} style={{width: '10%', cursor: 'pointer'}}>\n {lineQuantity}\n </Td>\n <Td>{hMoney(unitPriceCents)}</Td>\n <Td>{hMoney(totalPriceCents)}</Td>\n <Td style={{width: '5%'}} className='actions'>\n <Btn styles='xs danger' onClick={() => onSetAgreedSpec(serviceCode, 0)}>Reject</Btn>\n </Td>\n </tr>\n )\n }).reverse().value()\n }).flatten().value()\n }\n </tbody>\n </Table>\n )\n\n footer = (\n <div className='pull-right'>\n <Btn styles='xs danger' onClick={() => onSetAgreedSpecs({})}>Reject All</Btn>    \n <Btn styles='xs success' onClick={() => onSetAgreedSpecs(specQuantities)}>Agree All Spec</Btn>    \n <Btn styles='xs info' onClick={() => onSetAgreedSpecs(lineQuantities)}>Agree All Charge</Btn>    \n <Btn icon='check' styles='xs primary' disabled={submitting} onClick={onSubmit}>Save</Btn>\n </div>\n )\n } else {\n\n title = \"Add New Collection Agreement\"\n content = (\n <div className='row'>\n <div><strong style={{marginLeft: '15px', paddingBottom: '5px'}}> Select Service</strong></div>\n <div className='col-sm-3'>\n <ListGroup>\n { _.map(locationServices, (s) => {\n return <ListGroupItem key={s.id} onClick={() => onSelectService(s.id) } >\n {\n s.vendorAccountId == vendorAccountId ?\n <strong>{s.title} - {s.vendorAccountNumber}</strong> : <span>{s.title} - {s.vendorAccountNumber}</span>\n }\n </ListGroupItem>\n })\n }\n </ListGroup>\n </div>\n <div className='col-sm-9'>\n <Table bordered condensed hover >\n <thead>\n <tr>\n <th style={{width: '25%'}}>Service Code</th>\n <th>Quantity</th>\n <th>Unit</th>\n <th>Total</th>\n </tr>\n </thead>\n <tbody>\n {_.map(lineItems, ({id, serviceCode, quantity, unitPriceCents, totalPriceCents}) => {\n return(<tr key={id}>\n <Td style={{width: '25%'}}>{serviceCode}</Td>\n <Td style={{width: '10%'}}>{quantity}</Td>\n <Td>{unitPriceCents ? hMoney(unitPriceCents) : null }</Td>\n <Td>{totalPriceCents ? hMoney(totalPriceCents) : null}</Td>\n </tr>)\n })}\n </tbody>\n </Table>\n </div>\n </div>\n )\n }\n\n return(\n <Panel bsStyle=\"info\">\n <Panel.Heading>\n <Panel.Title componentClass=\"h3\">\n <span className='pull-right'><Btn styles='xs danger' icon='times' onClick={onCancel}>Cancel</Btn></span>\n {title}\n </Panel.Title>\n </Panel.Heading>\n <Panel.Body>\n {content}\n </Panel.Body>\n <Panel.Footer>\n     \n {footer}\n </Panel.Footer>\n </Panel>\n )\n\n }\n\nCollectionAgreementForm.propTypes = {\n lineItems: PropTypes.arrayOf(\n PropTypes.shape({\n serviceCode: PropTypes.string.isRequired,\n })).isRequired,\n serviceId: PropTypes.number,\n locationId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n date: PropTypes.string.isRequired,\n agreedSpecifications: PropTypes.object.isRequired\n};\n\nconst mapStateToProps = (state, {serviceId, locationId, lineItems}) => {\n var service = getService(serviceId, state)\n lineItems = service ? _.filter(lineItems, ({serviceCode}) => _.includes(service.availableServiceCodes, serviceCode)) : lineItems\n var specifications = service ? getUnitSpecifications(service.currentSpecificationId, state) : null\n\n debugger\n\n const { vendorAccountId } = getVendorInvoice(state)\n\n return {\n lineItems: lineItems,\n service,\n specifications,\n vendorAccountId,\n locationServices: getServicesForLocation(locationId, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {agreedSpecifications, locationId, date}) => {\n agreedSpecifications\n\n return {\n onSetAgreedSpec: (serviceCode, quantity) => dispatch(setSpecAgreementForm(locationId, date, { ...agreedSpecifications, [serviceCode]: quantity} )),\n onSetAgreedSpecs: (newSpecs) => dispatch(setSpecAgreementForm(locationId, date, newSpecs)),\n onSelectService: (serviceId) => dispatch(selectServiceAgreementForm(locationId, date, serviceId)),\n onCancel: () => dispatch(closeAgreementForm(locationId, date)),\n onSubmit: () => dispatch(submitAgreementForm(locationId, date))\n }\n}\n\nCollectionAgreementForm = connect(\n mapStateToProps,\n mapDispatchToProps\n)(CollectionAgreementForm)\n\n\nexport default CollectionAgreementForm;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { getService, getServicesForLocation } from '../services/selectors'\nimport { getUnitSpecifications } from '../specifications/selectors'\nimport { Btn } from 'sharedComponents'\nimport actions from '../agreements/actions'\nimport { selectServiceAgreementForm, submitAgreementForm } from '../agreements/operations'\n\nimport { Table, Panel, ListGroupItem, ListGroup } from 'react-bootstrap';\nimport { hMoney } from 'sharedFormatters'\nimport Td from './Td'\n\nvar {\n setSpecAgreementForm,\n closeAgreementForm,\n} = actions\n\nvar SupplyProductAgreementForm = ( { locationServices, agreedSpecifications, lineItems, service, submitting, \n onSelectService, onSetAgreedSpec, onSetAgreedSpecs, onSubmit, onCancel} ) => {\n var title, content, footer\n\n const lineQuantities = {}\n _(lineItems).each(({serviceCode, quantity}) => lineQuantities[serviceCode] = ( quantity + (lineQuantities[serviceCode] || 0) ) )\n\n if(service) {\n title = `New Collection Agreement - ${service.title}`\n\n content = (\n <Table bordered condensed hover >\n <thead>\n <tr>\n <th style={{width: '25%'}}>Service Code</th>\n <th style={{width: '10%'}}>Agreed</th>\n <th style={{width: '10%'}}>Charge</th>\n <th>Unit</th>\n <th>Total</th>\n <th style={{width: '5%'}} className='actions'>Agree?</th>\n </tr>\n </thead>\n <tbody>\n {\n _(lineItems).groupBy('serviceCode').map((lineItems, serviceCode) => {\n\n let specQuantityLeft = 0\n let agreedQuantityLeft = agreedSpecifications[serviceCode] || 0\n const totalLineQuantity = _.sumBy(lineItems, 'quantity')\n const itemsCount = lineItems.length\n\n return _(lineItems).sortBy('quantity').map((lineItem, i) => {\n const { quantity: lineQuantity, unitPriceCents, totalPriceCents} = lineItem\n let [specQuantity, agreedQuantity] = (itemsCount === i + 1) ? \n [ specQuantityLeft, agreedQuantityLeft ] :\n [ _.min([lineQuantity, specQuantityLeft]), _.min([lineQuantity, agreedQuantityLeft]) ]\n\n specQuantityLeft = _.max([specQuantityLeft - lineQuantity, 0])\n agreedQuantityLeft = _.max([agreedQuantityLeft - lineQuantity, 0])\n const agreedDiff = agreedQuantity - lineQuantity\n const renderedAgreedDiff = agreedDiff != 0 ? <span className={`text-${agreedDiff > 0 ? 'success' : 'danger' } `}>{agreedDiff > 0 ? '+' : '-' }{Math.abs(agreedDiff)}</span> : null\n\n const mainHighlightClass = { [specQuantity]: 'success', [lineQuantity]: 'info', 0: 'danger' }[agreedQuantity] || 'default'\n\n return(\n <tr key={`${serviceCode}-${lineItem.id}`}>\n <Td highlight={true} highlightClass={mainHighlightClass} style={{width: '25%'}}>{serviceCode}</Td>\n <Td highlight={true} highlightClass={mainHighlightClass} style={{width: '10%'}}>{agreedQuantity} {renderedAgreedDiff}</Td>\n <Td highlight={lineQuantity == agreedQuantity} highlightClass={mainHighlightClass} onClick={() => onSetAgreedSpec(serviceCode, totalLineQuantity)} style={{width: '10%', cursor: 'pointer'}}>\n {lineQuantity}\n </Td>\n <Td>{hMoney(unitPriceCents)}</Td>\n <Td>{hMoney(totalPriceCents)}</Td>\n <Td style={{width: '5%'}} className='actions'>\n <Btn styles='xs danger' onClick={() => onSetAgreedSpec(serviceCode, 0)}>Reject</Btn>\n </Td>\n </tr>\n )\n }).reverse().value()\n }).flatten().value()\n }\n </tbody>\n </Table>\n )\n\n footer = (\n <div className='pull-right'>\n <Btn styles='xs danger' onClick={() => onSetAgreedSpecs({})}>Reject All</Btn>    \n <Btn styles='xs info' onClick={() => onSetAgreedSpecs(lineQuantities)}>Agree All Charge</Btn>    \n <Btn icon='check' styles='xs primary' disabled={submitting} onClick={onSubmit}>Save</Btn>\n </div>\n )\n } else {\n\n title = \"Add New Collection Agreement\"\n content = (\n <div className='row'>\n <div><strong style={{marginLeft: '15px', paddingBottom: '5px'}}> Select Service</strong></div>\n <div className='col-sm-3'>\n <ListGroup>\n { _.map(locationServices, (s) => {\n return <ListGroupItem key={s.id} onClick={() => onSelectService(s.id) } >{s.title}</ListGroupItem>\n })\n }\n </ListGroup>\n </div>\n <div className='col-sm-9'>\n <Table bordered condensed hover >\n <thead>\n <tr>\n <th style={{width: '25%'}}>Service Code</th>\n <th>Quantity</th>\n <th>Unit</th>\n <th>Total</th>\n </tr>\n </thead>\n <tbody>\n {_.map(lineItems, ({id, serviceCode, quantity, unitPriceCents, totalPriceCents}) => {\n return(<tr key={id}>\n <Td style={{width: '25%'}}>{serviceCode}</Td>\n <Td style={{width: '10%'}}>{quantity}</Td>\n <Td>{unitPriceCents ? hMoney(unitPriceCents) : null }</Td>\n <Td>{totalPriceCents ? hMoney(totalPriceCents) : null}</Td>\n </tr>)\n })}\n </tbody>\n </Table>\n </div>\n </div>\n )\n }\n\n return(\n <Panel bsStyle=\"info\">\n <Panel.Heading>\n <Panel.Title componentClass=\"h3\">\n <span className='pull-right'><Btn styles='xs danger' icon='times' onClick={onCancel}>Cancel</Btn></span>\n {title}\n </Panel.Title>\n </Panel.Heading>\n <Panel.Body>\n {content}\n </Panel.Body>\n <Panel.Footer>\n     \n {footer}\n </Panel.Footer>\n </Panel>\n )\n\n }\n\nSupplyProductAgreementForm.propTypes = {\n lineItems: PropTypes.arrayOf(\n PropTypes.shape({\n serviceCode: PropTypes.string.isRequired,\n })).isRequired,\n serviceId: PropTypes.number,\n locationId: PropTypes.number.isRequired,\n date: PropTypes.string.isRequired,\n agreedSpecifications: PropTypes.object.isRequired\n};\n\nconst mapStateToProps = (state, {serviceId, locationId, lineItems}) => {\n var service = getService(serviceId, state)\n lineItems = service ? _.filter(lineItems, ({serviceCode}) => _.includes(service.availableServiceCodes, serviceCode)) : lineItems\n\n return {\n lineItems: lineItems,\n service,\n locationServices: getServicesForLocation(locationId, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {agreedSpecifications, locationId, date}) => {\n return {\n onSetAgreedSpec: (serviceCode, quantity) => dispatch(setSpecAgreementForm(locationId, date, { ...agreedSpecifications, [serviceCode]: quantity} )),\n onSetAgreedSpecs: (newSpecs) => dispatch(setSpecAgreementForm(locationId, date, newSpecs)),\n onSelectService: (serviceId) => dispatch(selectServiceAgreementForm(locationId, date, serviceId)),\n onCancel: () => dispatch(closeAgreementForm(locationId, date)),\n onSubmit: () => dispatch(submitAgreementForm(locationId, date))\n }\n}\n\nSupplyProductAgreementForm = connect(\n mapStateToProps,\n mapDispatchToProps\n)(SupplyProductAgreementForm)\n\n\nexport default SupplyProductAgreementForm;\n\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport CollectionAgreementForm from './CollectionAgreementForm'\nimport SupplyProductAgreementForm from './SupplyProductAgreementForm'\n\nvar AgreementForm = (props) => {\n if(props.type == 'CollectionAgreement') {\n return <CollectionAgreementForm {...props}/>\n } else if(props.type == 'SupplyProductAgreement') {\n return <SupplyProductAgreementForm {...props}/>\n } else {\n throw `Agreement type '${props.type}' doesnt have a form`\n }\n}\n\nexport default AgreementForm;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { openCollectionAgreementForm, createBlankCollectionAgreement } from '../agreements/operations'\nimport { Btn } from 'sharedComponents'\nimport { getServicesForLocation } from '../services/selectors'\n\n\nvar AddCollectionBtn = ( { compatibleServices, onClick} ) => {\n const serviceId = compatibleServices.length == 1 ? compatibleServices[0].id : null\n return _.isEmpty(compatibleServices) ? null : <Btn styles='xs' onClick={() => onClick(serviceId) }>Add Collection</Btn>\n}\n\nAddCollectionBtn.propTypes = {\n lineItems: PropTypes.arrayOf(\n PropTypes.shape({\n serviceCode: PropTypes.string.isRequired,\n })).isRequired,\n locationId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n date: PropTypes.string.isRequired,\n};\n\nconst mapStateToProps = (state, {locationId, lineItems}) => {\n const services = getServicesForLocation(locationId, state)\n const lineItemServiceCodes = _(lineItems).map('serviceCode').flatten().uniq().value()\n const compatibleServices = _.reject(services, ({availableServiceCodes, availableProductCodes}) => _.isEmpty(_.intersection(_.difference(availableServiceCodes, availableProductCodes),lineItemServiceCodes)) )\n return {\n compatibleServices\n }\n}\n\nconst mapDispatchToProps = (dispatch, {locationId, date, skipQuantityEdit}) => {\n return {\n onClick: (serviceId) => {\n if(_.isPresent(serviceId) && skipQuantityEdit) {\n dispatch(createBlankCollectionAgreement(locationId, date, serviceId))\n } else {\n dispatch(openCollectionAgreementForm(locationId, date, serviceId))\n }\n }\n }\n}\n\nAddCollectionBtn = connect(\n mapStateToProps,\n mapDispatchToProps\n)(AddCollectionBtn)\n\n\nexport default AddCollectionBtn;\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { openSupplyProductAgreementForm } from '../agreements/operations'\nimport { Btn } from 'sharedComponents'\nimport { getServicesForLocation } from '../services/selectors'\n\n\nvar AddSupplyProductBtn = ( { compatibleServices, onClick} ) => {\n const serviceId = compatibleServices.length == 1 ? compatibleServices[0].id : null\n return _.isEmpty(compatibleServices) ? null : <Btn styles='xs' onClick={() => onClick(serviceId) }>Add Product Supply</Btn>\n}\n\nAddSupplyProductBtn.propTypes = {\n lineItems: PropTypes.arrayOf(\n PropTypes.shape({\n serviceCode: PropTypes.string.isRequired,\n })).isRequired,\n locationId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n date: PropTypes.string.isRequired,\n};\n\nconst mapStateToProps = (state, {locationId, lineItems}) => {\n const services = getServicesForLocation(locationId, state)\n const lineItemServiceCodes = _(lineItems).map('serviceCode').flatten().uniq().value()\n const compatibleServices = _.reject(services, ({availableProductCodes}) => _.isEmpty(_.intersection(availableProductCodes,lineItemServiceCodes)) )\n return {\n compatibleServices\n }\n}\n\nconst mapDispatchToProps = (dispatch, {locationId, date}) => {\n return {\n onClick: (serviceId) => dispatch(openSupplyProductAgreementForm(locationId, date, serviceId))\n }\n}\n\nAddSupplyProductBtn = connect(\n mapStateToProps,\n mapDispatchToProps\n)(AddSupplyProductBtn)\n\n\nexport default AddSupplyProductBtn;\n\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { getLineItem } from '../lineItems/selectors'\nimport { isBilledAccount } from '../vendorInvoice/selectors'\nimport { submitAcceptReason } from '../lineItems/operations'\nimport { Btn, StatelessModal } from 'sharedComponents'\n\nclass AcceptBtn extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n isModalOpen: false,\n form: {}\n };\n this.handleOpenModal = this.handleOpenModal.bind(this)\n this.handleCloseModal = this.handleCloseModal.bind(this)\n this.handleInputChange = this.handleInputChange.bind(this)\n this.handleSave = this.handleSave.bind(this);\n }\n\n handleSave () {\n var { reason } = this.state.form\n\n this.props.onSave(reason, _.map(this.props.lineItems, 'id'))\n this.setState({ isModalOpen: false, form: {} })\n }\n\n handleOpenModal () { this.setState({ isModalOpen: true }) }\n handleCloseModal () { this.setState({ isModalOpen: false }) }\n handleInputChange(event) {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n\n this.setState(\n {\n form: {\n [name]: value\n }\n }\n );\n }\n\n render() {\n let { lineItems, isBilledAccount } = this.props\n const { form, isModalOpen} = this.state\n\n const saveEnabled = _.isPresent(form.reason) && form.reason.length > 3\n\n return (\n <StatelessModal title='Accept All Items' target={<span className={`btn btn-flat btn-xs btn-success`}>Accept {lineItems.length > 1 ? \"All\" : ''}</span>}\n isOpen={isModalOpen} onCloseModal={this.handleCloseModal} onOpenModal={this.handleOpenModal}>\n <form className=\"simple_form form-vertical\">\n <div className=\"form-group\">\n <label className=\"control-label\">Why are you accepting this?</label>\n <textarea className=\"form-control\" name=\"reason\" value={form.reason} onChange={this.handleInputChange} />\n </div>\n { isBilledAccount &&\n <div className=\"alert alert-danger\" role=\"alert\">\n <strong>Warning! This will NOT be billed to the client.</strong> <br/> Add Agreement if you want to charge client\n </div>\n }\n <div style={{ borderTop: '1px solid #e6e9ed', padding: '10px 10px 5px 10px', marginLeft: -10, marginRight: -10 }}>\n <Btn styles='success block' disabled={!saveEnabled} onClick={this.handleSave}>   Save   </Btn><br/>\n <div className=\"text-right\"><div><Btn styles='danger xs' onClick={this.handleCloseModal}>Cancel</Btn></div></div>\n </div>\n </form>\n </StatelessModal>\n )\n }\n}\n\n\nAcceptBtn.propTypes = {\n lineItemIds: PropTypes.array.isRequired\n};\n\n\nconst mapStateToProps = (state, { lineItemIds }) => {\n return {\n lineItems: _.map(lineItemIds, (id) => getLineItem(id, state)),\n isBilledAccount: isBilledAccount(state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {lineItemIds}) => {\n return {\n onSave: (acceptReason) => { dispatch(submitAcceptReason(acceptReason, lineItemIds)) },\n }\n}\n\nAcceptBtn = connect(\n mapStateToProps,\n mapDispatchToProps\n)(AcceptBtn)\n\n\nexport default AcceptBtn;\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { Table, Panel } from 'react-bootstrap';\nimport AgreementForm from './AgreementForm'\nimport AddCollectionBtn from './AddCollectionBtn'\nimport AddSupplyProductBtn from './AddSupplyProductBtn'\nimport MoveLineItemBtn from './MoveLineItemBtn'\nimport DisputeBtn from './DisputeBtn'\nimport AcceptBtn from './AcceptBtn'\nimport { Btn, Link } from 'sharedComponents'\nimport { hMoney } from 'sharedFormatters'\nimport { getVendorId } from '../vendorInvoice/selectors'\n\nimport { getNewAgreementForm } from '../agreements/selectors'\nimport { getReconcilePolicyName } from '../vendorInvoice/selectors'\n\nvar UnmatchedLineItems = ( {\n locationId,\n date,\n vendorId,\n lineItems,\n newCollectionForm,\n allowCreateBlankAgreements,\n onDisputeAll\n} ) => {\n if(_.isBlank(lineItems)) {\n return null\n } else {\n if(newCollectionForm) {\n return <AgreementForm {...newCollectionForm} lineItems={lineItems}/ >\n } else {\n return(\n <Panel bsStyle=\"warning\">\n <Panel.Heading>\n <Panel.Title componentClass=\"h3\">\n <span className='pull-right'>\n <AddSupplyProductBtn lineItems={lineItems} locationId={locationId} date={date}/>\n  \n <AddCollectionBtn lineItems={lineItems} locationId={locationId} date={date} skipQuantityEdit={allowCreateBlankAgreements}/>\n  \n <DisputeBtn lineItemIds={_.map(lineItems, 'id')}/>\n <AcceptBtn lineItemIds={_.map(lineItems, 'id')}/>\n </span>\n Unmatched Line Items\n </Panel.Title>\n </Panel.Heading>\n <Panel.Body>\n <Table striped bordered condensed hover>\n <thead>\n <tr>\n <th style={{width: '25%'}}>Service Code</th>\n <th style={{width: '10%'}}>Quantity</th>\n <th>£ Unit</th>\n <th>£ Total</th>\n <th style={{width: '25%'}}>Vendor Service Code</th>\n <th style={{width: '10%'}}>Vendor Location Code</th>\n <th style={{width: '20%'}}></th>\n <th>ID</th>\n <th>Actions</th>\n </tr>\n </thead>\n <tbody>\n {\n _.map(lineItems, (lineItem) => {\n const {id, serviceCode, vendorLocationCode, quantity, vendorServiceCode, totalPriceCents, unitPriceCents} = lineItem\n return(\n <tr key={id} >\n <td style={{width: '25%'}}>{serviceCode}</td>\n <td style={{width: '10%'}}>{quantity}</td>\n <td>{hMoney(unitPriceCents)}</td>\n <td>{hMoney(totalPriceCents)}</td>\n <td style={{width: '25%'}}>{vendorServiceCode}</td>\n <td style={{width: '10%'}}>{ _.isPresent(vendorLocationCode) ? <Link target=\"_blank\" href={`/admin/vendors/${vendorId}/location_mappings/${encodeURIComponent(vendorLocationCode)}`}>{vendorLocationCode}</Link> : null}</td>\n <td style={{width: '20%'}}><MoveLineItemBtn {...lineItem}/></td>\n <td><Link href={`/admin/vendor_invoice_line_items/${id}`} target=\"_blank\">{id}</Link></td>\n <td>\n <DisputeBtn lineItemIds={[lineItem.id]}/>\n <AcceptBtn lineItemIds={[lineItem.id]}/>\n </td>\n </tr>\n )\n })\n }\n </tbody>\n </Table>\n </Panel.Body>\n </Panel>\n )\n }\n }\n}\n\n\n\n\nUnmatchedLineItems.propTypes = {\n};\n\n\nconst mapStateToProps = (state, {locationId, date}) => {\n const allowCreateBlankAgreements = getReconcilePolicyName(state) == 'contract_down'\n return {\n allowCreateBlankAgreements,\n newCollectionForm: getNewAgreementForm(locationId, date, state),\n vendorId: getVendorId(state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {locationId, lineItems, date}) => {\n return {\n }\n}\n\nUnmatchedLineItems = connect(\n mapStateToProps,\n mapDispatchToProps\n)(UnmatchedLineItems)\n\n\nexport default UnmatchedLineItems;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport FailureReport from './FailureReport'\nimport { Panel } from 'react-bootstrap';\n\n//import { DropdownSelect, DateSelect, ModelErrors, Link } from 'sharedComponents'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar UnmatchedFailureReports = ( {unmatchedFailureReports} ) => {\n return(\n <div>\n {_.map(unmatchedFailureReports, (failureReport) => {\n return(\n <Panel key={failureReport.id}>\n <Panel.Heading>\n <Panel.Title componentClass=\"h3\">\n Unmatched Failure Report\n </Panel.Title>\n </Panel.Heading>\n <Panel.Body>\n <FailureReport {...failureReport}/>\n </Panel.Body>\n </Panel>\n )\n })}\n </div>\n )\n}\n\n//class UnmatchedFailureReports extends React.Component {\n\n //constructor(props) {\n //super(props);\n //this.state = { minimized: true }\n //this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n //}\n\n //handleToggleMinimized() {\n //this.setState({minimized: !this.state.minimized})\n //}\n\n //render() {\n //const { } = this.props\n //const { minimized } = this.state\n\n //const content = minimized ? null : <div>{\"UnmatchedFailureReports\"}</div>\n\n //return (\n //<div>\n //<span style={{cursor: 'pointer'}} className='pull-right' onClick={this.handleToggleMinimized}>\n //<i className={`fa fa-${ minimized ? 'chevron-down' : 'chevron-up' } text-muted`} style={{ cursor: 'pointer', marginRight: -5, marginLeft: 15 }}></i>\n //</span>\n //{ content }\n //</div>\n //)\n //}\n//}\n\n\nUnmatchedFailureReports.propTypes = {\n};\n\n\nconst mapStateToProps = (state, {}) => {\n return {\n }\n}\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n }\n}\n\nUnmatchedFailureReports = connect(\n mapStateToProps,\n mapDispatchToProps\n)(UnmatchedFailureReports)\n\n\nexport default UnmatchedFailureReports;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { Table, Panel } from 'react-bootstrap';\nimport { getDisputeLedgerItemsByLineItem } from '../disputeLedgerItems/selectors'\nimport { resetLineItems } from '../lineItems/operations'\nimport { Btn, Link } from 'sharedComponents'\nimport { hMoney } from 'sharedFormatters'\n\n\nvar ManualLineItems = ( {\n lineItems,\n disputeLedgerItemsByLineItemId,\n onResetAll\n} ) => {\n if(_.isBlank(lineItems)) {\n return null\n } else {\n\n const lineItemIds = _.map(lineItems, 'id')\n\n return(\n <Panel>\n <Panel.Heading>\n <Panel.Title componentClass=\"h3\">\n Manually Validated Line Items\n <span className='pull-right'>\n { _.isPresent(lineItemIds) ? <Btn styles='xs' icon='times' onClick={()=> onResetAll(lineItemIds)}>Reset All</Btn> : null }\n </span>\n </Panel.Title>\n </Panel.Heading>\n <Panel.Body>\n <Table striped bordered condensed hover>\n <thead>\n <tr>\n <th style={{width: '25%'}}>Service Code</th>\n <th style={{width: '10%'}}>Quantity</th>\n <th>£ Unit</th>\n <th>£ Total</th>\n <th>£ In Dispute / Credited</th>\n <th>Status</th>\n <th>Reason</th>\n <th>ID</th>\n <th>Action</th>\n </tr>\n </thead>\n <tbody>\n {\n _(lineItems).map( ({id, serviceCode, vendorServiceCode, quantity, inDispute, acceptReason, totalPriceCents, validationStatus, unitPriceCents}) => {\n const disputes = disputeLedgerItemsByLineItemId[id] || []\n var { id: disputeId, inDisputeNetTotalCents, netTotalCents: disputeNetTotalCents, credited, reason, ...rest } = disputes[0] || {}\n var restDisputes = _.slice(disputes, 1)\n\n var lines = []\n\n lines = lines.concat(\n <tr key={`line-item-${id}`} >\n <td style={{width: '25%'}}>{serviceCode || vendorServiceCode}</td>\n <td style={{width: '10%'}}>{quantity}</td>\n <td>{hMoney(unitPriceCents)}</td>\n <td>{hMoney(totalPriceCents)}</td>\n <td><span className={`${credited ? 'text-success' : inDisputeNetTotalCents > 0 ? 'text-danger' : ''}`}>{credited || inDisputeNetTotalCents > 0 ? hMoney(disputeNetTotalCents) : '-'}</span></td>\n <td>{_.isPresent(validationStatus) ? <span className={`text-${inDispute ? 'danger' : 'success' }`}>{validationStatus}</span> : null }</td>\n <td>{reason || acceptReason}</td>\n <td><Link href={`/admin/vendor_invoice_line_items/${id}`} target=\"_blank\">{id}</Link></td>\n <td>{disputeId ? <Btn styles='xs' icon='times' onClick={()=>onResetAll([id])}>Reset</Btn> : null}</td>\n </tr>)\n\n _.each(restDisputes, ({id: disputeId, netTotalCents: disputeNetTotalCents, inDisputeNetTotalCents, credited, reason }) => {\n lines = lines.concat(\n <tr key={`dispute-${id}`} >\n <td style={{width: '25%'}}></td>\n <td style={{width: '10%'}}></td>\n <td></td>\n <td></td>\n <td><span className={`${credited ? 'text-success' : inDisputeNetTotalCents > 0 ? 'text-danger' : ''}`}>{credited || inDisputeNetTotalCents > 0 ? hMoney(disputeNetTotalCents) : '-'}</span></td>\n <td></td>\n <td>{reason || acceptReason}</td>\n <td><Link href={`/admin/vendor_invoice_line_items/${id}`} target=\"_blank\">{id}</Link></td>\n <td></td>\n </tr>)\n })\n\n return lines\n\n }).flatten().value()\n }\n </tbody>\n </Table>\n </Panel.Body>\n </Panel>\n )\n }\n}\n\n\n\n\nManualLineItems.propTypes = {\n};\n\n\nconst mapStateToProps = (state, {}) => {\n return {\n disputeLedgerItemsByLineItemId: getDisputeLedgerItemsByLineItem(state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onResetAll: (ids) => { dispatch(resetLineItems(ids)) }\n }\n}\n\nManualLineItems = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ManualLineItems)\n\n\nexport default ManualLineItems;\n\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport { Panel } from 'react-bootstrap';\nimport HwcnTable from './HwcnTable'\n\nvar HwcnList = ( { hwcns } ) => {\n\n if(_.isPresent(hwcns)) {\n\n return(\n <Panel>\n <Panel.Heading>\n <Panel.Title componentClass=\"h3\">\n HWCN\n </Panel.Title>\n </Panel.Heading>\n <Panel.Body>\n <HwcnTable hwcns={hwcns}/>\n </Panel.Body>\n </Panel>)\n\n } else {\n return null\n }\n\n}\n\n\nHwcnList.propTypes = {\n};\n\n\n\n\n\nexport default HwcnList;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport { hMoney } from 'sharedFormatters';\nimport { Label, Tooltip, OverlayTrigger } from 'react-bootstrap'\n\n//import { DropdownSelect, DateSelect, ModelErrors, Link } from 'sharedComponents'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n//\n//\nvar getToolTip = (text) => {\n return <Tooltip>{text}</Tooltip>\n}\n\nvar TotalBadges = ( { lineTotalCents, disputeTotalCents, inDisputeNetTotalCents, creditedNetTotalCents, ignoredDisputeTotalCents } ) => {\n return(\n <span>\n { ignoredDisputeTotalCents ? <OverlayTrigger placement='top' overlay={<Tooltip id={'1'}>Ignored Dispute Total</Tooltip>}>\n <Label bsStyle=\"info\" title=\"Ignored Dispute Total\">{hMoney(ignoredDisputeTotalCents)}</Label>\n </OverlayTrigger> : null }  \n { creditedNetTotalCents ? <OverlayTrigger placement='top' overlay={<Tooltip id={'2'}>Credited Total</Tooltip>}>\n <Label bsStyle=\"success\" title=\"Credited Total\">{hMoney(creditedNetTotalCents)}</Label>\n </OverlayTrigger> : null }  \n { inDisputeNetTotalCents ? <OverlayTrigger placement='top' overlay={<Tooltip id={'3'}>Still In Dispute Total</Tooltip>}>\n <Label bsStyle=\"danger\" title=\"Still In Dispute Total\">{hMoney(inDisputeNetTotalCents)}</Label>\n </OverlayTrigger> : null }  \n { disputeTotalCents && disputeTotalCents != inDisputeNetTotalCents ? <OverlayTrigger placement='top' overlay={<Tooltip id={'4'}>Dispute Total</Tooltip>}>\n <Label bsStyle=\"default\" title=\"Dispute Total\" className='text-danger'>{hMoney(disputeTotalCents)}</Label>\n </OverlayTrigger> : null }  \n { lineTotalCents ? <OverlayTrigger placement='top' overlay={<Tooltip id={'5'}>Invoice Line Total</Tooltip>}>\n <Label bsStyle=\"primary\" title=\"Invoice Total\">{hMoney(lineTotalCents)}</Label>\n </OverlayTrigger> : null }  \n </span>\n )\n}\n\n\n\n//class TotalBadges extends React.Component {\n\n //constructor(props) {\n //super(props);\n //this.state = { minimized: true }\n //this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n //}\n\n //handleToggleMinimized() {\n //this.setState({minimized: !this.state.minimized})\n //}\n\n //render() {\n //const { } = this.props\n //const { minimized } = this.state\n\n //const content = minimized ? null : <div>{\"TotalBadges\"}</div>\n\n //return (\n //<div>\n //<span style={{cursor: 'pointer'}} className='pull-right' onClick={this.handleToggleMinimized}>\n //<i className={`fa fa-${ minimized ? 'chevron-down' : 'chevron-up' } text-muted`} style={{ cursor: 'pointer', marginRight: -5, marginLeft: 15 }}></i>\n //</span>\n //{ content }\n //</div>\n //)\n //}\n//}\n\n\nTotalBadges.propTypes = {\n disputeTotalCents: PropTypes.number,\n lineTotalCents: PropTypes.number\n};\n\n\nconst mapStateToProps = (state, {}) => {\n return {\n }\n}\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n }\n}\n\nTotalBadges = connect(\n mapStateToProps,\n mapDispatchToProps\n)(TotalBadges)\n\n\nexport default TotalBadges;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport Agreement from './Agreement'\nimport UnmatchedLineItems from './UnmatchedLineItems'\nimport UnmatchedFailureReports from './UnmatchedFailureReports'\nimport ManualLineItems from './ManualLineItems'\nimport HwcnList from './HwcnList'\nimport TotalBadges from './TotalBadges'\nimport appActions from '../app/actions'\n//import { DropdownSelect, DateSelect, ModelErrors, Link } from 'sharedComponents'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n//\n\n\n\nclass LocationDate extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = { minimized: false }\n this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n }\n\n handleToggleMinimized() {\n this.setState({minimized: !this.state.minimized})\n }\n\n render() {\n\n const { allValidated, date, dateDiff, locationId, agreements, unmatchedFailureReports,\n validatedManuallyLineItems, unmatchedLineItems, hwcns, locationHasHwcns, ...rest} = this.props\n const { minimized } = this.state\n const formattedDate = moment(date).format(\"ddd, Do MMM YYYY\")\n\n\n const content = minimized ? null :(\n <div className='row'>\n <div className='col-sm-2'>\n {dateDiff}\n </div>\n <div className='col-sm-10' style={{ marginBottom: 20, paddingLeft: 20 }}>\n {_.map(agreements, (agreement) => <Agreement key={agreement.id} hwcns={hwcns} locationHasHwcns={locationHasHwcns} {...agreement}/>) }\n { _.isBlank(agreements) ? <HwcnList hwcns={hwcns} /> : null }\n <UnmatchedLineItems locationId={locationId} date={date} lineItems={unmatchedLineItems}/>\n <ManualLineItems locationId={locationId} date={date} lineItems={validatedManuallyLineItems}/>\n <UnmatchedFailureReports unmatchedFailureReports={unmatchedFailureReports}/>\n </div>\n </div>\n )\n\n //disable minimize, do we really need it?\n //<div>\n //<div style={{cursor: 'pointer', borderTop: '1px solid #ccc', margin: '10px -15px', padding: '10px 15px'}} onClick={this.handleToggleMinimized}>\n //<i className={`fa fa-${ allValidated ? 'check text-success' : 'times text-danger' }`} style={{marginRight: 10, marginLeft: 10 }}></i>\n //<span className='pull-right' >\n //<TotalBadges {...rest}/>\n //<i className={`fa fa-${ minimized ? 'chevron-down' : 'chevron-up' } text-muted`} style={{ cursor: 'pointer', marginRight: -5, marginLeft: 15 }}></i>\n //</span>\n //<span style={{fontSize: '20px'}}>{formattedDate}</span>\n //</div>\n //{ content }\n //</div>\n\n return (\n <div>\n <div style={{borderTop: '1px solid #ccc', margin: '10px -15px', padding: '10px 15px'}}>\n <i className={`fa fa-${ allValidated ? 'check text-success' : 'times text-danger' }`} style={{marginRight: 10, marginLeft: 10 }}></i>\n <span className='pull-right' >\n <TotalBadges {...rest}/>\n </span>\n <span style={{fontSize: '20px'}}>{formattedDate}</span>\n </div>\n { content }\n </div>\n )\n }\n}\n\n\nLocationDate.propTypes = {\n locationId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n date: PropTypes.string.isRequired,\n};\n\n\nconst mapStateToProps = (state, props) => {\n return {\n }\n}\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n }\n}\n\nLocationDate = connect(\n mapStateToProps,\n mapDispatchToProps\n)(LocationDate)\n\n\nexport default LocationDate;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { getActivityDataForLocation, getActivityDataByLocationDate, getLocation } from '../locations/selectors'\nimport MatchBtn from './MatchBtn'\nimport LocationDate from './LocationDate'\nimport TotalBadges from './TotalBadges'\nimport { Link } from 'sharedComponents'\nimport { Panel, OverlayTrigger, Tooltip } from 'react-bootstrap';\nimport eachCons from 'each-cons'\nimport appActions from '../app/actions'\nimport { locationSectionOpen } from '../app/selectors'\n//var {\n//} = actions\n\nvar Location = ({\n postcodeIdName,\n matching,\n id,\n url,\n siteClosedOn,\n dateData,\n hasCoverageIssue,\n otherManagingAgent,\n minimized,\n onToggleMinimize,\n loading,\n alwaysOpen = false,\n covid19VaccinationSite,\n ...rest }) => {\n\n\n if(loading) {\n return(null)\n } else {\n const completedDateCount = _.filter(dateData, 'allValidated').length\n const activityDateCount = _.keys(dateData).length\n const sortedDates = _(dateData).keys().sortBy().value()\n const anyUnmatchedLineItems = !_.every(dateData, (v) => _.isBlank(v.unmatchedLineItems) )\n\n const dateDiffs = _.map(eachCons(sortedDates, 2), (dates) => {\n var [firstDate, secondDate] = dates\n if(_.isBlank(secondDate)) { return null } else {\n firstDate = new Date(firstDate);\n secondDate = new Date(secondDate);\n return Math.round((secondDate - firstDate)/ 604800000)\n }\n })\n\n\n minimized = alwaysOpen ? false : minimized\n\n return (\n <Panel bsStyle={completedDateCount == activityDateCount ? 'success' : 'danger' }>\n <Panel.Heading style={{cursor: 'pointer'}} onClick={onToggleMinimize} >\n <span className='pull-right'>\n { alwaysOpen ? null : <i className={`fa fa-2x fa-${ minimized ? 'chevron-down' : 'chevron-up' } panel-headingtext-muted`} style={{ cursor: 'pointer', marginRight: -5, marginLeft: 15 }}></i> }\n </span>\n <Panel.Title componentClass=\"h2\">\n { matching ? <i className=\"fa fa-spin fa-spinner\"></i> : null } \n <strong>{completedDateCount}/{activityDateCount}</strong>  \n { hasCoverageIssue ?\n <OverlayTrigger placement='top' overlay={<Tooltip id={'1'}>Coverage missing, run script</Tooltip>}>\n <i className={`fa fa-exclamation`}></i>\n </OverlayTrigger>\n : null }\n { anyUnmatchedLineItems ? <i className={`fa fa-warning`}></i> : null }\n   \n <Link href={url} target='_blank'>{postcodeIdName}</Link> { otherManagingAgent ? `- ${otherManagingAgent}` : null } { siteClosedOn ? `- Site closed on ${moment(siteClosedOn).format(\"ddd, Do MMM YYYY\")}` : null }\n { covid19VaccinationSite ? `*C-19 Vax*` : null }\n <span className='pull-right'>\n <TotalBadges {...rest}/>\n </span>\n </Panel.Title>\n </Panel.Heading>\n {\n minimized ? null : <Panel.Body>\n <div style={{ marginBottom: '30px' }}><span className='pull-right'>\n <MatchBtn locationIds={[id]}/>\n </span></div>\n {_.map(sortedDates, (date, i) => <LocationDate dateDiff={dateDiffs[i]} key={date} {...dateData[date]}/> )}\n </Panel.Body>\n }\n </Panel>\n )\n }\n}\n\n\nLocation.propTypes = {\n //url: PropTypes.string.isRequired,\n //postcodeIdName: PropTypes.string.isRequired,\n id: PropTypes.number.isRequired,\n //dateData: PropTypes.object.isRequired,\n //otherManagingAgent: PropTypes.string,\n //lineTotalCents: PropTypes.number.isRequired,\n //disputeTotalCents: PropTypes.number.isRequired,\n};\n\n\nconst mapStateToProps = (state, {id}) => {\n var location = getLocation(id, state)\n if(location) {\n return {\n ...getLocation(id, state),\n ...getActivityDataForLocation(id, state),\n minimized: !locationSectionOpen(id, state)\n }\n } else {\n return { loading: true }\n }\n}\n\nconst mapDispatchToProps = (dispatch, {id}) => {\n return {\n onToggleMinimize: () => { dispatch(appActions.toggleLocationOpen(id) ) }\n }\n}\n\nLocation = connect(\n mapStateToProps,\n mapDispatchToProps\n)(Location)\n\n\nexport default Location;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { Panel } from 'react-bootstrap';\nimport { Table } from 'react-bootstrap';\nimport { getVendorInvoice } from '../vendorInvoice/selectors';\nimport { getDisputeLedgerItemsForLineItem } from '../disputeLedgerItems/selectors';\nimport { getLineItem, getUnmatchedLineItems } from '../lineItems/selectors';\nimport { resetLineItems } from '../lineItems/operations'\nimport { hMoney } from 'sharedFormatters'\nimport { Btn } from 'sharedComponents'\nimport DisputeBtn from './DisputeBtn'\nimport AcceptBtn from './AcceptBtn'\nimport appActions from '../app/actions'\n//import actions from '../slice/actions'\n//var {\n//} = actions\nclass UnmatchedSummaryRow extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n form: {},\n //submitting: false\n }\n this.handleInputChange = this.handleInputChange.bind(this)\n this.handleIgnoreAll = this.handleIgnoreAll.bind(this)\n this.handleDontIgnoreAll = this.handleDontIgnoreAll.bind(this)\n }\n\n handleInputChange(event) {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n this.setState(\n {\n form: {\n [name]: value\n }\n }\n );\n }\n\n handleIgnoreAll() {\n //this.setState({submitting: true})\n this.props.onIgnoreAll(this.state.form.disputeReason, _.map(this.props.unmatchedItems, 'id'))\n }\n\n handleDontIgnoreAll() {\n //this.setState({submitting: true})\n this.props.onIgnoreAll(null, _.map(this.props.unmatchedItems, 'id'))\n }\n\n render() {\n const {\n unmatchedItems,\n acceptReason,\n vendorServiceCode,\n serviceCode,\n unitPriceCents,\n disputeReason,\n onFilter,\n filterSelected,\n onResetAll,\n } = this.props\n\n const { form, submitting } = this.state\n let actions, state, reason, filterAction, stateColor\n\n //[\"Credited\" , ({creditedNetTotalCents}) => {\n //return creditedNetTotalCents > 0\n //} ],\n\n\n const unmatchedItemIds = _.map(unmatchedItems,'id')\n\n\n filterAction = filterSelected ? null : <Btn styles='success xs' onClick={onFilter}>Filter</Btn>\n\n const totalPriceCents = _(unmatchedItems).map('totalPriceCents').sum()\n const totalQuantity = _(unmatchedItems).map('quantity').sum()\n\n //if(_.isPresent(disputeReason)) {\n //actions = <span>\n //<Btn styles='default xs' onClick={ this.handleDontIgnoreAll}>Dont Ignore All</Btn>\n //</span>\n //renderedIgnoreReason = disputeReason\n //} else {\n //const ignoreEnabled = _.isPresent(form.disputeReason) && form.disputeReason.length > 3\n //actions = <span>\n //<Btn styles='info xs' disabled={!ignoreEnabled} onClick={this.handleIgnoreAll}>Ignore All</Btn>\n //</span>\n //renderedIgnoreReason = <input type=\"text\" className=\"form-control\" name=\"disputeReason\" defaultValue={form.disputeReason} onChange={this.handleInputChange} />\n //}\n //\n //\n\n const ignoreEnabled = _.isPresent(form.disputeReason) && form.disputeReason.length > 3 && !submitting\n\n if(_.isPresent(disputeReason)) {\n state = 'Dispute'\n stateColor = 'text-danger'\n reason = disputeReason\n actions = <Btn styles='xs' icon='times' onClick={()=> { onResetAll(unmatchedItemIds) }}>Reset</Btn>\n } else if(_.isPresent(acceptReason)) {\n state = 'Accepted'\n stateColor = 'text-success'\n reason = acceptReason\n actions = <Btn styles='xs' icon='times' onClick={()=> onResetAll(unmatchedItemIds) }>Reset</Btn>\n } else {\n state = 'Unvalidated'\n actions = <div>\n <DisputeBtn lineItemIds={unmatchedItemIds}/>\n <AcceptBtn lineItemIds={unmatchedItemIds}/>\n </div>\n }\n\n return(\n <tr>\n <td style={{width: '5%'}}>{unmatchedItems.length}{filterAction}</td>\n <td style={{width: '10%'}}>{serviceCode}</td>\n <td >{vendorServiceCode}</td>\n <td>{totalQuantity}</td>\n <td>{hMoney(unitPriceCents)}</td>\n <td>{hMoney(totalPriceCents)}</td>\n <td className={stateColor}>{state}</td>\n <td style={{width: '25%'}}>{reason}</td>\n <td style={{width: '5%'}}>\n {actions}\n </td>\n </tr>\n )\n }\n}\n\nclass UnmatchedSummary extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = { minimized: true }\n this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n this.handleSelectFilter = this.handleSelectFilter.bind(this)\n }\n\n handleToggleMinimized() {\n this.setState({minimized: !this.state.minimized})\n }\n\n handleSelectFilter(rowKey, filterAttrs) {\n this.setState( { filterRowKey: rowKey } )\n this.props.onFilter(filterAttrs)\n }\n\n render() {\n const {\n unmatchedItems,\n onIgnoreAll,\n onFilter,\n onResetAll\n } = this.props\n const { minimized, filterRowKey } = this.state\n let content\n\n\n\n if(minimized) {\n content = null\n } else {\n\n\n const rows = _(_.groupByRecursive(unmatchedItems, ['serviceCode', 'vendorServiceCode', 'unitPriceCents', 'acceptReason', 'disputeReason'])).map((itemsByVendorServiceCode, serviceCode) => {\n return _.map(itemsByVendorServiceCode, (itemsByUnitPriceCents, vendorServiceCode) => {\n return _.map(itemsByUnitPriceCents, (itemsByAcceptReason, unitPriceCents) => {\n return _.map(itemsByAcceptReason, (itemsByDisputeReason, acceptReason) => {\n return _.map(itemsByDisputeReason, (unmatchedItems, disputeReason) => {\n disputeReason = disputeReason === 'null' ? null : disputeReason\n acceptReason = acceptReason === 'null' ? null : acceptReason\n serviceCode = serviceCode === 'null' ? null : serviceCode\n var filterAttrs = { acceptReason, serviceCode, disputeReason, unitPriceCents, vendorServiceCode }\n const rowKey = `${disputeReason}${acceptReason}${serviceCode}${disputeReason}${unitPriceCents}${vendorServiceCode}`\n return <UnmatchedSummaryRow \n filterSelected={rowKey == filterRowKey}\n onFilter={() => this.handleSelectFilter(rowKey, filterAttrs) } key={rowKey} onIgnoreAll={onIgnoreAll}\n unmatchedItems={unmatchedItems}\n acceptReason={acceptReason}\n unitPriceCents={unitPriceCents}\n vendorServiceCode={vendorServiceCode}\n onResetAll={onResetAll}\n disputeReason={disputeReason}\n serviceCode={serviceCode} / >\n })\n })\n })\n })\n }).flatten().value()\n\n content = (\n <Table bordered condensed hover>\n <thead>\n <tr>\n <th style={{width: '5%'}}>Count</th>\n <th style={{width: '10%'}}>Service Code</th>\n <th style={{width: '25%'}}>Vendor Code</th>\n <th>Total Quantity</th>\n <th>Unit Price</th>\n <th>Total</th>\n <th>State</th>\n <th>Reason</th>\n <th style={{width: '5%'}}>Actions</th>\n </tr>\n </thead>\n <tbody>\n {rows}\n </tbody>\n </Table>\n )\n\n }\n\n return (\n\n <Panel bsStyle={'info'}>\n <Panel.Heading style={{cursor: 'pointer'}} onClick={this.handleToggleMinimized} >\n <span className='pull-right'>\n <i className={`fa fa-2x fa-${ minimized ? 'chevron-down' : 'chevron-up' } panel-headingtext-muted`} style={{ cursor: 'pointer', marginRight: -5, marginLeft: 15 }}></i>\n </span>\n <Panel.Title componentClass=\"h2\">\n Summary of Items Not Matched to Agreements\n </Panel.Title>\n </Panel.Heading>\n {\n minimized ? null : <Panel.Body>\n { content }\n </Panel.Body>\n }\n </Panel>\n )\n }\n}\n\n\nUnmatchedSummary.propTypes = {\n};\n\n\nconst mapStateToProps = (state, { } ) => {\n\n var vendorInvoice = getVendorInvoice(state)\n\n var unmatchedItems = _(getUnmatchedLineItems(state)).filter((item) => {\n return item && item.vendorInvoiceId == vendorInvoice.id }\n ).map((item) => {\n var disputes = getDisputeLedgerItemsForLineItem(state, item.id)\n var disputeReason = _(disputes).map('reason').filter(_.isPresent).join(', ')\n return { ...item, disputeReason }\n }).value()\n return {\n unmatchedItems\n }\n}\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onFilter: (filterAttrs) => {\n dispatch(appActions.setManualFilter(filterAttrs))\n dispatch(appActions.selectLocationFilter('Selected Manual'))\n },\n onResetAll: (ids) => { dispatch(resetLineItems(ids)) }\n }\n}\n\nUnmatchedSummary = connect(\n mapStateToProps,\n mapDispatchToProps\n)(UnmatchedSummary)\n\n\nexport default UnmatchedSummary;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { Panel } from 'react-bootstrap';\nimport { Table } from 'react-bootstrap';\nimport { getDisputeLedgerItems } from '../disputeLedgerItems/selectors';\nimport { getVendorInvoice } from '../vendorInvoice/selectors';\nimport { getLineItem } from '../lineItems/selectors';\nimport { submitIgnoreDisputes } from '../disputeLedgerItems/operations'\n\nimport { Btn } from 'sharedComponents'\nimport appActions from '../app/actions'\n//import actions from '../slice/actions'\n//var {\n//} = actions\nclass DisputeSummaryRow extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n form: {},\n //submitting: false\n }\n this.handleInputChange = this.handleInputChange.bind(this)\n this.handleIgnoreAll = this.handleIgnoreAll.bind(this)\n this.handleDontIgnoreAll = this.handleDontIgnoreAll.bind(this)\n }\n\n handleInputChange(event) {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n this.setState(\n {\n form: {\n [name]: value\n }\n }\n );\n }\n\n handleIgnoreAll() {\n //this.setState({submitting: true})\n this.props.onIgnoreAll(this.state.form.ignoreReason, _.map(this.props.disputeLedgerItems, 'id'))\n }\n\n handleDontIgnoreAll() {\n //this.setState({submitting: true})\n this.props.onIgnoreAll(null, _.map(this.props.disputeLedgerItems, 'id'))\n }\n\n render() {\n const { disputeLedgerItems, reason, serviceCode, ignoreReason, onFilter, filterSelected } = this.props\n const { form, submitting } = this.state\n let actions, renderedIgnoreReason\n\n //[\"Credited\" , ({creditedNetTotalCents}) => {\n //return creditedNetTotalCents > 0\n //} ],\n\n\n const filterAction = filterSelected ? null : <Btn styles='success xs' onClick={onFilter}>Filter</Btn>\n\n if(_.isPresent(ignoreReason)) {\n actions = <span>\n <Btn styles='default xs' onClick={ this.handleDontIgnoreAll}>Dont Ignore All</Btn>\n </span>\n renderedIgnoreReason = ignoreReason\n } else {\n const ignoreEnabled = _.isPresent(form.ignoreReason) && form.ignoreReason.length > 3\n actions = <span>\n <Btn styles='info xs' disabled={!ignoreEnabled} onClick={this.handleIgnoreAll}>Ignore All</Btn>\n </span>\n renderedIgnoreReason = <input type=\"text\" className=\"form-control\" name=\"ignoreReason\" defaultValue={form.ignoreReason} onChange={this.handleInputChange} />\n }\n\n const ignoreEnabled = _.isPresent(form.ignoreReason) && form.ignoreReason.length > 3 && !submitting\n\n return(\n <tr>\n <td style={{width: '5%'}}>{disputeLedgerItems.length}{filterAction}</td>\n <td style={{width: '10%'}}>{serviceCode}</td>\n <td style={{width: '25%'}}>{reason}</td>\n <td>\n {renderedIgnoreReason}\n </td>\n <td style={{width: '5%'}}>\n {actions}\n </td>\n </tr>\n )\n }\n}\n\nclass DisputeSummary extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = { minimized: true }\n this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n this.handleSelectFilter = this.handleSelectFilter.bind(this)\n }\n\n handleToggleMinimized() {\n this.setState({minimized: !this.state.minimized})\n }\n\n handleSelectFilter(rowKey, filterAttrs) {\n this.setState( { filterRowKey: rowKey } )\n this.props.onFilter(filterAttrs)\n }\n\n render() {\n const { disputeLedgerItems, onIgnoreAll, onFilter } = this.props\n const { minimized, filterRowKey } = this.state\n let content\n\n\n\n if(minimized) {\n content = null\n } else {\n const rows = _(_.groupByRecursive(disputeLedgerItems, ['serviceCode', 'reason', 'ignoreReason'])).map((itemsByReason, serviceCode) => {\n return _.map(itemsByReason, (itemsByIgnoreReason, reason) => {\n return _.map(itemsByIgnoreReason, (disputeLedgerItems, ignoreReason) => {\n ignoreReason = ignoreReason === 'null' ? null : ignoreReason\n serviceCode = serviceCode === 'null' ? null : serviceCode\n var filterAttrs = { reason, serviceCode, ignoreReason }\n const rowKey = `${reason}${serviceCode}${ignoreReason}`\n return <DisputeSummaryRow filterSelected={rowKey == filterRowKey} onFilter={() => this.handleSelectFilter(rowKey, filterAttrs) } key={rowKey} onIgnoreAll={onIgnoreAll}\n disputeLedgerItems={disputeLedgerItems}\n ignoreReason={ignoreReason}\n serviceCode={serviceCode} reason={reason}/ >\n })\n })\n }).flatten().value()\n\n content = (\n <Table bordered condensed hover>\n <thead>\n <tr>\n <th style={{width: '5%'}}>Count</th>\n <th style={{width: '10%'}}>Service Code</th>\n <th style={{width: '25%'}}>Reason</th>\n <th>Ignore Reason</th>\n <th style={{width: '5%'}}>Actions</th>\n </tr>\n </thead>\n <tbody>\n {rows}\n </tbody>\n </Table>\n )\n\n }\n\n return (\n\n <Panel bsStyle={'info'}>\n <Panel.Heading style={{cursor: 'pointer'}} onClick={this.handleToggleMinimized} >\n <span className='pull-right'>\n <i className={`fa fa-2x fa-${ minimized ? 'chevron-down' : 'chevron-up' } panel-headingtext-muted`} style={{ cursor: 'pointer', marginRight: -5, marginLeft: 15 }}></i>\n </span>\n <Panel.Title componentClass=\"h2\">\n Dispute Summary\n </Panel.Title>\n </Panel.Heading>\n {\n minimized ? null : <Panel.Body>\n { content }\n </Panel.Body>\n }\n </Panel>\n )\n }\n}\n\n\nDisputeSummary.propTypes = {\n};\n\n\nconst mapStateToProps = (state, { } ) => {\n\n var vendorInvoice = getVendorInvoice(state)\n var disputeLedgerItems = _.filter(getDisputeLedgerItems(state), ({lineItemId}) => {\n var item = getLineItem(lineItemId, state)\n return item && item.vendorInvoiceId == vendorInvoice.id }\n )\n\n return {\n disputeLedgerItems\n }\n}\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onIgnoreAll: (ignoreReason, ids) => dispatch(submitIgnoreDisputes(ignoreReason, ids)),\n onFilter: (filterAttrs) => {\n dispatch(appActions.setDisputeFilter(filterAttrs))\n dispatch(appActions.selectLocationFilter('Selected Disputes'))\n }\n\n }\n}\n\nDisputeSummary = connect(\n mapStateToProps,\n mapDispatchToProps\n)(DisputeSummary)\n\n\nexport default DisputeSummary;\n\n\n\n\n\n\n","import _ from 'lodashExtended'\nimport { createSelector } from 'reselect'\n\nconst isStateNotLoaded = (state) => {\n return !_.isPresent(state.api)\n}\n\n//const isStateNotLoaded = (state) => {\n //return !_.isPresent(state.api)\n//}\n\n\nconst getDataLoadPaths = (state) => {\n return state.api.dataLoadPaths\n}\n\n\nconst getLoadProgress = createSelector(\n [\n getDataLoadPaths\n ],\n (\n dataLoadPaths\n ) => {\n\n if(dataLoadPaths) {\n\n let totalCount = _.size(Object.keys(dataLoadPaths))\n let loadedCount = _(dataLoadPaths).filter((v,k) => v == 'loaded').size()\n return {totalCount, loadedCount}\n }\n }\n)\n\nconst allLocationsLoaded = (state) => {\n let {totalCount, loadedCount} = getLoadProgress(state)\n return totalCount == loadedCount\n}\n\nexport {\n getLoadProgress,\n isStateNotLoaded,\n allLocationsLoaded\n}\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux';\n\nimport _ from 'lodashExtended'\nimport { getAgreements } from '../agreements/selectors'\nimport appActions from '../app/actions'\nimport { getLocationFilter, getCurrentFilterResults, getLocationFilterCounts } from '../app/selectors'\nimport { getStats } from '../stats/selectors'\nimport Location from './Location'\nimport ValidationBtn from './ValidationBtn'\nimport MatchBtn from './MatchBtn'\nimport UnmatchedSummary from './UnmatchedSummary'\nimport DisputeSummary from './DisputeSummary'\nimport { isStateNotLoaded } from '../api/selectors'\nimport { getReconcilePolicyName, getMatchPolicyName } from '../vendorInvoice/selectors'\nimport { Badge, Label, NavItem, Nav, Button } from 'react-bootstrap'\n\n\nlet DefaultMode = ({\n locationIds,\n stats,\n selectedFilter,\n agreementIds,\n filterCounts,\n onSelectFilter,\n matchPolicyName,\n reconcilePolicyName\n}) => {\n\n return(\n <div>\n <div style={{marginTop: '20px', marginBottom: '20px' }}>\n <UnmatchedSummary />\n <DisputeSummary />\n </div>\n\n <Nav bsStyle=\"pills\" activeKey={selectedFilter} onSelect={onSelectFilter}>\n {_.map(filterCounts,([filter, count]) => {\n\n return <NavItem key={filter} eventKey={filter}>\n {filter} <Badge>{count}</Badge>\n </NavItem>\n }) }\n\n </Nav>\n <div style={{marginTop: '20px', marginBottom: '20px'}}>\n <ValidationBtn ids={agreementIds}/> <MatchBtn locationIds={locationIds} showTotal={true}/> <Label>{reconcilePolicyName}</Label> <Label>{matchPolicyName}</Label>\n <span style={{fontSize: '200%'}} className={`text-${stats.validation.percentageColor}`}>{\" \" || stats.validation.percentage}</span>\n </div>\n\n <div>\n {\n _.map(locationIds, (id) => {\n return(<Location key={id} id={id} />)\n })\n }\n </div>\n </div>\n )\n}\n\nDefaultMode.propTypes = {\n stats: PropTypes.exact({\n validation: PropTypes.exact({\n percentage: PropTypes.string,\n percentageColor: PropTypes.string\n }),\n timestamp: PropTypes.number\n })\n}\n\nconst mapStateToProps = (state, props) => {\n return {\n stats: getStats(state),\n selectedFilter: getLocationFilter(state),\n filterCounts: getLocationFilterCounts(state),\n ...getCurrentFilterResults(state),\n reconcilePolicyName: getReconcilePolicyName(state),\n matchPolicyName: getMatchPolicyName(state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {\n onSelectFilter: (filter) => { dispatch(appActions.selectLocationFilter(filter))}\n }\n}\n\nDefaultMode = connect(\n mapStateToProps,\n mapDispatchToProps\n)(DefaultMode)\n\nexport default DefaultMode\n\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux';\nimport { getMatchModeNavLocationIds } from '../app/selectors'\nimport appActions from '../app/actions'\nimport _ from 'lodashExtended'\nimport { getLocation } from '../locations/selectors'\nimport Location from './Location'\nimport ValidationBtn from './ValidationBtn'\nimport MatchBtn from './MatchBtn'\nimport UnmatchedSummary from './UnmatchedSummary'\nimport DisputeSummary from './DisputeSummary'\nimport { allLocationsLoaded } from '../api/selectors'\nimport { Btn } from 'sharedComponents'\n\n\nlet MatchMode = ({\n location,\n nextLocation,\n backLocation,\n matchPolicyName,\n reconcilePolicyName,\n matchedCount,\n totalCount,\n onChangeLocationId,\n allLocationsLoaded\n}) => {\n\n\n\n let blankLocationNotice = (\n <div style={{fontSize: '18px'}} className='text-center well well-lg'>\n { nextLocation ?\n <Btn\n styles='block primary'\n onClick={()=> onChangeLocationId(nextLocation.id)}>\n Click here to start matching!\n </Btn>\n : allLocationsLoaded ? <span>All Done. Nothing to Match</span> : <span>No Locations to Match yet. Waiting for loading to finish...</span>\n }\n </div>\n )\n\n\n return(\n <div>\n <div className='row my-3'>\n { backLocation ?\n <div\n style={{fontSize: '18px', cursor: 'pointer'}}\n className='col-md-4 text-left text-white'\n onClick={()=> onChangeLocationId(backLocation.id)}>\n <i className='fa fa-chevron-left'></i> {backLocation.postcodeIdName}\n </div> : <div className='col-md-4'> </div> }\n <div\n style={{fontSize: '18px'}}\n className=\"col-md-4 text-center text-white\">\n Matching Progress: { matchedCount } / { totalCount }\n </div>\n { nextLocation ?\n <div\n style={{fontSize: '18px', cursor: 'pointer'}}\n className='col-md-4 text-right text-white'\n onClick={()=> onChangeLocationId(nextLocation.id)}>\n {nextLocation.postcodeIdName} <i className='fa fa-chevron-right'></i>\n </div> : <div className='col-md-4'> </div> }\n </div>\n <div className='mt-1'>\n {location ? <Location alwaysOpen={true} id={location.id} /> : blankLocationNotice }\n </div>\n </div>\n )\n}\n\nMatchMode.propTypes = {\n\n}\n\nconst mapStateToProps = (state, props) => {\n\n const {\n nextLocationId,\n backLocationId,\n currentLocationId,\n matchedCount,\n totalCount,\n } = getMatchModeNavLocationIds(state)\n\n return {\n location: getLocation(currentLocationId, state),\n nextLocation: getLocation(nextLocationId, state),\n backLocation: getLocation(backLocationId, state),\n reconcilePolicyName: state.vendorInvoice.reconcilePolicyName,\n matchPolicyName: state.vendorInvoice.matchPolicyName,\n matchedCount,\n totalCount,\n allLocationsLoaded: allLocationsLoaded(state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {\n onChangeLocationId: (locationId) => {\n dispatch(appActions.setMatchModeLocationId(locationId))\n },\n }\n}\n\nMatchMode = connect(\n mapStateToProps,\n mapDispatchToProps\n)(MatchMode)\n\nexport default MatchMode\n\n","import { createAction } from 'redux-act';\n\nconst loadSuccess = createAction(\"report has been loaded success from server\", (loadedHwcns) => { return( { loadedHwcns } ) });\n\nexport default {\n loadSuccess,\n}\n\n","import actions from './actions'\nimport agreementActions from '../agreements/actions'\nimport failureReportActions from '../failureReports/actions'\nimport locationActions from '../locations/actions'\nimport lineItemActions from '../lineItems/actions'\nimport hwcnActions from '../hwcns/actions'\nimport submitToServer from 'submitToServer'\nimport _ from 'lodashExtended'\n\n\n\n// request every 1000 milliseconds. Rate limit the api request to Vector so it doesnt DoS Attack itself\nvar throttle = require('promise-ratelimit')(1000); /* rateInMilliseconds */\nvar fasterThrottle = require('promise-ratelimit')(333); /* rateInMilliseconds */\n\nconst loadState = () => (dispatch, getState) => {\n\n const state = getState()\n const submitPath = state.loadStatePath\n\n submitToServer(submitPath, '',\n (data,v) => {\n\n dispatch(actions.stateLoaded(data))\n _.each(Object.values(data.api.dataLoadPaths), (path) => {\n (data.api.isLondonBusinessHours ? throttle : fasterThrottle)().then( () => {\n dispatch(loadLocationData(path))\n })\n }\n )\n },\n (data, status) => {\n data\n alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`)\n }, { method: 'GET' }\n )\n\n}\n\nconst loadLocationData = (path) => (dispatch, getState) => {\n\n submitToServer(path, '',\n (data,v) => {\n\n if(data.failureReports) {\n dispatch(failureReportActions.loadSuccess(data.failureReports.byId))\n }\n if(data.agreements) {\n dispatch(agreementActions.loadSuccess(data.agreements.byId))\n }\n if(data.locations) {\n dispatch(locationActions.loadSuccess(data.locations.byId))\n }\n if(data.lineItems) {\n dispatch(lineItemActions.loadSuccess(data.lineItems.byId))\n }\n if(data.hwcns) {\n dispatch(hwcnActions.loadSuccess(data.hwcns.byId))\n }\n },\n (data, status) => {\n data\n alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`)\n }, { method: 'GET' }\n )\n\n}\n\n\n\nexport {\n loadState\n}\n\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux';\n\nimport _ from 'lodashExtended'\nimport DefaultMode from './DefaultMode'\nimport MatchMode from './MatchMode'\nimport { enterMatchMode, exitMatchMode } from '../app/operations'\nimport { loadState } from '../api/operations'\nimport { isStateNotLoaded, getLoadProgress } from '../api/selectors'\nimport { inMatchMode } from '../app/selectors'\nimport { Button } from 'react-bootstrap'\n\nclass App extends React.Component {\n\n //componentDidMount() {\n //if(this.props.stateNotLoaded) { this.props.loadState() }\n //}\n\n constructor(props) {\n super(props);\n this.state = {appNotBooted: true};\n }\n\n\n render() {\n\n const {loadState, stateNotLoaded, loadProgress, matchingMode, onChangeMode} = this.props\n const {appNotBooted} = this.state\n\n\n if(appNotBooted) {\n return(\n <div className=\"text-center\">\n <Button variant=\"primary\" onClick={\n () => {\n this.setState({appNotBooted: false})\n loadState()\n }\n }>CLICK TO LOAD</Button>\n </div>\n )\n } else if(stateNotLoaded) {\n return(\n <div className=\"text-center\">\n <i className=\"fa fa-spin fa-spinner fa-3x\"></i>\n <h2>Loading App...</h2>\n </div>\n )\n } else {\n\n let loadProgressNode\n if(loadProgress && loadProgress.loadedCount != loadProgress.totalCount) {\n loadProgressNode = (<div className=\"text-center\">\n <i className=\"fa fa-spin fa-spinner fa-3x\"></i>\n <h2>Loading Locations {loadProgress.loadedCount}/{loadProgress.totalCount}</h2>\n </div>)\n }\n\n if(matchingMode) {\n return(\n <div>\n {loadProgressNode}\n <Button variant=\"primary\" onClick={() => { onChangeMode(false) }}>Exit MATCH MODE</Button>\n <MatchMode onToggleMode={() => { onChangeMode(false) }}/>\n </div>\n )\n } else {\n return(\n <div>\n {loadProgressNode}\n <Button variant=\"primary\" onClick={() => { onChangeMode(true) }}>Go To MATCH MODE</Button>\n <DefaultMode onToggleMode={() => { onChangeMode(true) }}/>\n </div>\n )\n }\n }\n }\n}\n\nApp.propTypes = {\n\n}\n\nconst mapStateToProps = (state, props) => {\n return {\n stateNotLoaded: isStateNotLoaded(state),\n loadProgress: getLoadProgress(state),\n matchingMode: inMatchMode(state),\n ...state,\n }\n}\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {\n loadState: () => dispatch(loadState()),\n onChangeMode: (bool) => {\n dispatch(bool ? enterMatchMode() : exitMatchMode() )\n }\n }\n}\n\nApp = connect(\n mapStateToProps,\n mapDispatchToProps\n)(App)\n\nexport default App\n","import locationActions from '../locations/actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\n\n\nvar d = dotProp\n\nconst reducer = createReducer({\n [locationActions.loadSuccess]: (api, { loadedLocations } ) => {\n return _.reduce(Object.keys(loadedLocations), (result, locationId) => {\n return d.set(result, `dataLoadPaths.${locationId}`, 'loaded')\n }, api)\n },\n},\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as apiActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport appActions from '../app/actions'\nimport { createReducer } from 'redux-act'\nimport moment from 'moment'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\nimport { keyToDate, keyToNumber } from '../app/utils'\n\nvar d = dotProp\n\nconst {\n submitSuccess,\n submitError,\n submitStart,\n setDate,\n setSpecQuantity,\n setReconcilePolicy,\n closeAgreementForm,\n setSpecAgreementForm,\n submitStartAgreementForm,\n setAgreementForm,\n destroy,\n loadSuccess\n} = actions\n\nconst reducer = createReducer({\n [loadSuccess]: (agreements, { loadedAgreements } ) => {\n return _.reduce(loadedAgreements, (result, agreement) => {\n return d.set(result, `byId.${agreement.id}`, agreement)\n }, agreements)\n },\n [submitSuccess]: (agreements, { updatedAgreements } ) => {\n return _.reduce(updatedAgreements, (result, updatedAgreement) => {\n if(updatedAgreement._destroy == '1') {\n return d.delete(result, `byId.${updatedAgreement.id}`)\n } else {\n return d.set(result, `byId.${updatedAgreement.id}`, updatedAgreement)\n }\n }, agreements)\n },\n [submitError]: (agreements, { updatedAgreements } ) => {\n return _.reduce(updatedAgreements, (result, {id}) => {\n return d.merge(result, `byId.${id}`, { submitting: false })\n }, agreements)\n },\n [submitStart]: (agreements, { ids } ) => {\n return _.reduce(ids, (result, id) => {\n return d.merge(result, `byId.${id}`, { submitting: true })\n }, agreements)\n },\n [destroy]: (agreements, { ids } ) => {\n return _.reduce(ids, (result, id) => {\n return d.merge(result, `byId.${id}`, { saved: false, _destroy: '1' })\n }, agreements)\n },\n [setSpecQuantity]: (agreements, { id, serviceCode, quantity } ) => {\n if(quantity >= 0) {\n const updatedAgreements = d.merge(agreements, ['byId', id, 'specifications', serviceCode], { serviceCode, quantity })\n return d.merge(updatedAgreements, `byId.${id}`, { saved: false, reconcilePolicyName: 'nothing' })\n } else {\n return agreements\n }\n },\n [setDate]: (agreements, { id, date }) => {\n var oldDate = dotProp.get(agreements, `byId.${id}.date`)\n if(date != oldDate) {\n return dotProp.merge(agreements, `byId.${id}`, { saved: false, date })\n } else {\n return agreements\n }\n },\n [setReconcilePolicy]: (agreements, { id, reconcilePolicyName }) => {\n return dotProp.merge(agreements, `byId.${id}`, { saved: false, reconcilePolicyName })\n },\n [setAgreementForm]: (agreements, { locationId, date, otherArgs }) => {\n return dotProp.merge(agreements, `forms.agreement.${locationId}.${date}`, { ...otherArgs, locationId, date } )\n },\n [closeAgreementForm]: (agreements, { locationId, date, serviceId }) => {\n return dotProp.delete(agreements, `forms.agreement.${locationId}.${date}`)\n },\n [setSpecAgreementForm]: (agreements, { locationId, date, newSpecs }) => {\n return dotProp.merge(agreements, `forms.agreement.${locationId}.${date}`, { agreedSpecifications: newSpecs } )\n },\n [submitStartAgreementForm]: (agreements, { locationId, date }) => {\n return dotProp.merge(agreements, `forms.agreement.${locationId}.${date}`, { submitting: true } )\n },\n},\n{ byId: {} } )\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as agreementsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport appActions from '../app/actions'\nimport agreementActions from '../agreements/actions'\n\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\nimport { keyToDate } from '../app/utils'\n\nconst {\n submitSuccess,\n submitError,\n submitStart,\n setDate,\n updateFromServer,\n loadSuccess\n} = actions\n\nvar d = dotProp\n\nconst reducer = createReducer({\n [loadSuccess]: (lineItems, { loadedLineItems } ) => {\n return _.reduce(loadedLineItems, (result, lineItem) => {\n return d.set(result, `byId.${lineItem.id}`, lineItem)\n }, lineItems)\n },\n [submitSuccess]: (lineItems, { updatedLineItems } ) => {\n return _.reduce(updatedLineItems, (result, updatedLineItem) => {\n return d.set(result, `byId.${updatedLineItem.id}`, updatedLineItem)\n }, lineItems)\n },\n [submitError]: (lineItems, { updatedLineItems } ) => {\n return _.reduce(updatedLineItems, (result, {id}) => {\n return d.merge(result, `byId.${id}`, { submitting: false })\n }, lineItems)\n },\n [submitStart]: (lineItems, { ids } ) => {\n return _.reduce(ids, (result, id) => {\n return d.merge(result, `byId.${id}`, { submitting: true })\n }, lineItems)\n },\n [setDate]: (lineItems, { id, date }) => {\n var oldDate = dotProp.get(lineItems, `byId.${id}.date`)\n if(date != oldDate) {\n return dotProp.merge(lineItems, `byId.${id}`, { saved: false, date, agreementId: null })\n } else {\n return lineItems\n }\n },\n [updateFromServer]: (lineItems, { updatedItems } ) => {\n return _.reduce(updatedItems, (result, updatedItem) => {\n if(updatedItem._destroy == '1') {\n return d.delete(result, `byId.${updatedItem.id}`)\n } else {\n return d.set(result, `byId.${updatedItem.id}`, updatedItem)\n }\n }, lineItems)\n },\n [agreementActions.destroy]: (lineItems, { ids } ) => {\n const lineItemIds = _(lineItems.byId).map(({agreementId, id}) => _.includes(ids, agreementId) ? id : null).compact().value()\n return _.reduce(lineItemIds, (result, id) => {\n return d.merge(result, `byId.${id}`, { agreementId: null })\n }, lineItems)\n },\n},\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as lineItemsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\n\nconst {\n locationsMatchStart,\n locationsMatchEnd,\n loadSuccess\n} = actions\n\nvar d = dotProp\n\nconst reducer = createReducer({\n [loadSuccess]: (locations, { loadedLocations } ) => {\n return _.reduce(loadedLocations, (result, location) => {\n return d.set(result, `byId.${location.id}`, location)\n }, locations)\n },\n [locationsMatchEnd]: (locations, { locationIds } ) => {\n return _.reduce(locationIds, (result, id) => {\n return d.merge(result, `byId.${id}`, { matching: false })\n }, locations)\n },\n [locationsMatchStart]: (locations, { locationIds } ) => {\n return _.reduce(locationIds, (result, id) => {\n return d.merge(result, `byId.${id}`, { matching: true })\n }, locations)\n },\n},\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as locationsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\n\nconst d = dotProp\n\nconst {\n updateFromServer,\n newDisputeForm,\n //deleteFromServer\n} = actions\n\nconst reducer = createReducer({\n [updateFromServer]: (disputeLedgerItems, { updatedItems } ) => {\n return _.reduce(updatedItems, (result, updatedItem) => {\n if(updatedItem._destroy == '1') {\n return d.delete(result, `byId.${updatedItem.id}`)\n } else {\n return d.set(result, `byId.${updatedItem.id}`, updatedItem)\n }\n }, disputeLedgerItems)\n },\n [newDisputeForm]: (app, { lineItemIds }) => {\n return dotProp.set(app, 'forms.newDispute', { lineItemIds } )\n },\n},\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as disputeLedgerItemsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\n\nconst {\n submitSuccess,\n submitError,\n submitStart,\n updateReport,\n loadSuccess\n} = actions\n\nvar d = dotProp\n\nconst reducer = createReducer({\n [loadSuccess]: (failureReports, { loadedFailureReports } ) => {\n return _.reduce(loadedFailureReports, (result, failureReport) => {\n return d.set(result, `byId.${failureReport.id}`, failureReport)\n }, failureReports)\n },\n [submitSuccess]: (failureReports, { updatedFailureReports } ) => {\n return _.reduce(updatedFailureReports, (result, updatedFailureReport) => {\n return d.set(result, `byId.${updatedFailureReport.id}`, updatedFailureReport)\n }, failureReports)\n },\n [submitError]: (failureReports, { updatedFailureReports } ) => {\n return _.reduce(updatedFailureReports, (result, {id}) => {\n return d.merge(result, `byId.${id}`, { submitting: false })\n }, failureReports)\n },\n [submitStart]: (failureReports, { ids } ) => {\n return _.reduce(ids, (result, id) => {\n return d.merge(result, `byId.${id}`, { submitting: true })\n }, failureReports)\n },\n [updateReport]: (failureReports, { id, newArgs } ) => {\n return d.merge(failureReports, `byId.${id}`, { ...newArgs, saved: false })\n }\n},\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as failureReportsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\n\n\nconst {\n\n loadSuccess\n} = actions\n\nvar d = dotProp\n\nconst reducer = createReducer({\n [loadSuccess]: (hwcns, { loadedHwcns } ) => {\n return _.reduce(loadedHwcns, (result, hwcn) => {\n return d.set(result, `byId.${hwcn.id}`, hwcn)\n }, hwcns)\n },\n},\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as hwcnsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\n\nconst {\n listenKeyDown,\n unListenKeyDown,\n keyDownEvent,\n selectLocationFilter,\n toggleLocationOpen,\n setDisputeFilter,\n setManualFilter,\n setUnmatchedFilter,\n setMatchMode,\n setMatchModeLocationId\n} = actions\n\nconst reducer = createReducer({\n [setMatchMode]: (app, bool) => {\n\n let result = dotProp.set(app, 'matchMode', bool)\n if(!bool) {\n result = dotProp.set(result, `matchModeList`, [])\n result = dotProp.delete(result, `matchModeLocationId`)\n }\n return result\n },\n [listenKeyDown]: (app, keyDownActionAgrs ) => {\n return dotProp.set(app, 'keyboard.listenKeyDown', keyDownActionAgrs )\n },\n [unListenKeyDown]: (app) => {\n return dotProp.delete(app, 'keyboard.listenKeyDown')\n },\n [selectLocationFilter]: (app, { filter }) => {\n return dotProp.set(app, 'filters.location', filter)\n },\n [keyDownEvent]: (app, { key }) => {\n if(key == 'Escape') {\n return dotProp.delete(app, 'keyboard.listenKeyDown')\n } else {\n return app\n }\n },\n [toggleLocationOpen]: (app, { locationId, open }) => {\n if(open == undefined) {\n return dotProp.toggle(app, `locationSectionOpen.${locationId}`)\n } else {\n return dotProp.set(app, `locationSectionOpen.${locationId}`, open)\n }\n },\n [setDisputeFilter]: (app, attrs) => {\n if(attrs) {\n return dotProp.set(app, `filters.disputeLedgerItemAttrs`, attrs)\n } else {\n return dotProp.delete(app, `filters.disputeLedgerItemAttrs`)\n }\n },\n [setManualFilter]: (app, attrs) => {\n if(attrs) {\n return dotProp.set(app, `filters.manualItemFilterAttrs`, attrs)\n } else {\n return dotProp.delete(app, `filters.manualItemFilterAttrs`)\n }\n },\n [setUnmatchedFilter]: (app, attrs) => {\n if(attrs) {\n return dotProp.set(app, `filters.unmatchedItemAttrs`, attrs)\n } else {\n return dotProp.delete(app, `filters.unmatchedItemAttrs`)\n }\n },\n [setMatchModeLocationId]: (app, locationId) => {\n let matchModeList = dotProp.get(app, `matchModeList`)\n let result = app\n if(!_.includes(matchModeList, locationId)) {\n result = dotProp.set(result, `matchModeList`, _.compact([...matchModeList, locationId]))\n }\n result = dotProp.set(result, `matchModeLocationId`, locationId)\n return result\n },\n\n\n},\n {\n matchMode: false,\n matchModeList: [],\n filters: { location: 'All' }\n })\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as appActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\n\nconst {\n submitSuccess,\n submitError,\n submitStart,\n setAgreementId,\n updateFromServer\n} = actions\n\nvar d = dotProp\n\nconst reducer = createReducer({\n [submitSuccess]: (salesLedgerItems, { updatedLineItems } ) => {\n return _.reduce(updatedLineItems, (result, updatedLineItem) => {\n return d.set(result, `byId.${updatedLineItem.id}`, updatedLineItem)\n }, salesLedgerItems)\n },\n [submitError]: (salesLedgerItems, { updatedLineItems } ) => {\n return _.reduce(updatedLineItems, (result, {id}) => {\n return d.merge(result, `byId.${id}`, { submitting: false })\n }, salesLedgerItems)\n },\n [submitStart]: (salesLedgerItems, { ids } ) => {\n return _.reduce(ids, (result, id) => {\n return d.merge(result, `byId.${id}`, { submitting: true })\n }, salesLedgerItems)\n },\n [setAgreementId]: (salesLedgerItems, { id, agreementId } ) => {\n var oldAgreementId = dotProp.get(salesLedgerItems, `byId.${id}.agreementId`)\n if(agreementId != oldAgreementId) {\n return dotProp.merge(salesLedgerItems, `byId.${id}`, { saved: false, agreementId })\n } else {\n return salesLedgerItems\n }\n },\n [updateFromServer]: (salesLedgerItems, { updatedItems } ) => {\n return _.reduce(updatedItems, (result, updatedItem) => {\n if(updatedItem._destroy == '1') {\n return d.delete(result, `byId.${updatedItem.id}`)\n } else {\n return d.set(result, `byId.${updatedItem.id}`, updatedItem)\n }\n }, salesLedgerItems)\n }\n},\n{})\n\nexport default reducer\n","import reducer from './reducer'\n\nexport { default as salesLedgerItemsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\n\nconst {\n setSpecificationForm,\n closeSpecificationForm,\n submitStart,\n submitSuccess,\n submitError,\n setCurrentSpecQuantity,\n setCurrentSpecFrequency\n} = actions\n\n\nvar d = dotProp\n\n\nconst reducer = createReducer({\n [setSpecificationForm]: (specifications, { serviceId, newSpecifications }) => {\n return dotProp.merge(specifications, `forms.specifications.${serviceId}`, { unitSpecifications: newSpecifications } )\n },\n [closeSpecificationForm]: (specifications, { serviceId }) => {\n return dotProp.delete(specifications, `forms.specifications.${serviceId}`)\n },\n [submitSuccess]: (specifications, { updatedSpecifications } ) => {\n return _.reduce(updatedSpecifications, (result, updatedSpecification) => {\n if(updatedSpecification._destroy == '1') {\n return d.delete(result, `byId.${updatedSpecification.id}`)\n } else {\n return d.set(result, `byId.${updatedSpecification.id}`, updatedSpecification)\n }\n }, specifications)\n },\n [submitStart]: (specifications, { serviceId }) => {\n return dotProp.merge(specifications, `forms.specifications.${serviceId}`, { submitting: true } )\n },\n [setCurrentSpecQuantity]: (specifications, { serviceId, serviceCode, quantity }) => {\n if(quantity >= 0) {\n return dotProp.merge(specifications, ['forms','specifications',serviceId,'unitSpecifications',serviceCode], { quantity, serviceCode } )\n } else {\n return specifications\n }\n },\n [setCurrentSpecFrequency]: (specifications, { serviceId, serviceCode, collectionPlanName }) => {\n return dotProp.merge(specifications, ['forms','specifications',serviceId,'unitSpecifications',serviceCode], { collectionPlanName, serviceCode } )\n },\n\n},\n {})\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as specificationsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\n\nconst {\n updateFromServer,\n}\n = actions\n\nconst reducer = createReducer({\n [updateFromServer]: (stats, newStats ) => {\n return newStats\n },\n},\n{})\n\n\nexport default reducer\n\n","import { createAction } from 'redux-act';\n\nconst updateFromServer = createAction(\"stats updated\");\n\nexport default {\n updateFromServer,\n}\n\n","import reducer from './reducer'\n\nexport { default as statsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\n\nconst {\n updateCurrentSpecificationId,\n} = actions\n\nconst reducer = createReducer({\n [updateCurrentSpecificationId]: (services, { serviceId, currentSpecificationId } ) => {\n return dotProp.merge(services, `byId.${serviceId}`, { currentSpecificationId })\n },\n},\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as servicesActions } from \"./actions\";\n\nexport default reducer\n","import { createReducer, createAction } from 'redux-act';\nimport dotProp from 'dot-prop-immutable'\nimport apiReducer from './api'\nimport agreementsReducer from './agreements'\nimport lineItemsReducer from './lineItems'\nimport locationsReducer from './locations'\nimport disputeLedgerItemsReducer from './disputeLedgerItems'\nimport failureReportsReducer from './failureReports'\nimport hwcnsReducer from './hwcns'\nimport appReducer from './app'\nimport salesLedgerItemsReducer from './salesLedgerItems'\nimport specificationsReducer from './specifications'\nimport statsReducer from './stats'\nimport servicesReducer from './services'\nimport reduceReducers from 'reduce-reducers'\nimport apiActions from './api/actions'\n\nconst updateStateReducer = createReducer({\n [apiActions.stateLoaded]: (state, loadedState) => {\n return loadedState\n }\n},\n{})\n\nconst rootReducer = (state = {}, action) => {\n return {\n ...state,\n api: apiReducer(state.api, action),\n agreements: agreementsReducer(state.agreements, action),\n specifications: specificationsReducer(state.specifications, action),\n services: servicesReducer(state.services, action),\n lineItems: lineItemsReducer(state.lineItems, action),\n locations: locationsReducer(state.locations, action),\n failureReports: failureReportsReducer(state.failureReports, action),\n hwcns: hwcnsReducer(state.hwcns, action),\n disputeLedgerItems: disputeLedgerItemsReducer(state.disputeLedgerItems, action),\n app: appReducer(state.app, action),\n salesLedgerItems: salesLedgerItemsReducer(state.salesLedgerItems, action),\n stats: statsReducer(state.stats, action)\n }\n\n}\n\nexport default reduceReducers(updateStateReducer, rootReducer)\n\n","import actions from './actions'\nimport submitToServer from 'submitToServer'\nimport { getSalesItemsPendingSubmit } from './selectors'\nimport { getPathAndMethod } from '../api/utils'\nimport _ from 'lodashExtended';\n\nconst debounceAlert = _.debounce((status) => alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`), 5000)\n\nconst submitSalesLedgerItems = () => (dispatch, getState) => {\n\n const state = getState()\n if(state.api) {\n const basePath = state.api.salesLedgerItemsPath\n _.each(getSalesItemsPendingSubmit(state), (salesLedgerItem) => {\n\n const [submitPath, method] = getPathAndMethod(basePath, salesLedgerItem)\n if(method) {\n dispatch(actions.submitStart([salesLedgerItem.id]))\n //console.log([method, submitPath])\n submitToServer(submitPath, { sales_ledger_item: salesLedgerItem },\n (data,v) => {\n if(data.salesLedgerItem) {\n dispatch(actions.submitSuccess({salesLedgerItem: data.salesLedgerItem}))\n }\n },\n (data, status, e) => {\n //dispatch(actions.serverError())\n data\n debounceAlert(status)\n }, { method })\n }\n })\n }\n}\n\nexport {\n submitSalesLedgerItems\n}\n","import actions from './actions'\nimport agreementActions from '../agreements/actions'\nimport submitToServer from 'submitToServer'\nimport { getFailureReportsPendingSubmit } from './selectors'\nimport { getAgreementIdsForFailureReport} from '../agreements/selectors'\nimport { validateAgreements } from '../agreements/operations'\nimport { getPathAndMethod } from '../api/utils'\nimport _ from 'lodashExtended'\n\n\nconst debounceAlert = _.debounce((status) => alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`), 5000)\n\nconst submitFailureReports = () => (dispatch, getState) => {\n\n const state = getState()\n if(state.api) {\n const basePath = state.api.failureReportsPath\n\n _.each(getFailureReportsPendingSubmit(state), (failureReport) => {\n\n const [submitPath, method] = getPathAndMethod(basePath, failureReport)\n if(method) {\n dispatch(actions.submitStart([failureReport.id]))\n //console.log([method, submitPath])\n submitToServer(submitPath, { missed_collection_report: failureReport },\n (data,v) => {\n if(data.agreement) {\n dispatch(agreementActions.submitSuccess({agreement: data.agreement}))\n }\n if(data.failureReport) {\n dispatch(actions.submitSuccess({failureReport: data.failureReport}))\n dispatch(validateAgreements(getAgreementIdsForFailureReport(data.failureReport.id, getState())))\n }\n },\n (data, status, e) => {\n //dispatch(actions.serverError())\n data\n debounceAlert(status)\n }, { method })\n }\n })\n }\n}\n\n\nexport {\n submitFailureReports\n}\n","import { createStore, applyMiddleware } from 'redux';\nimport rootReducer from './reducer'\nimport thunk from 'redux-thunk'\nimport { composeWithDevTools } from 'redux-devtools-extension/developmentOnly';\nimport { handleKeyDownEvent } from './app/operations'\nimport { getKeyDownListener } from './app/selectors'\nimport _ from 'lodashExtended'\nimport { getAgreements } from './agreements/selectors'\nimport { getLineItems } from './lineItems/selectors'\nimport { getSalesLedgerItems } from './salesLedgerItems/selectors'\nimport { getFailureReports } from './failureReports/selectors'\nimport { submitAgreements } from './agreements/operations'\nimport { submitLineItems } from './lineItems/operations'\nimport { submitSalesLedgerItems } from './salesLedgerItems/operations'\nimport { submitFailureReports } from './failureReports/operations'\nimport { loadStats } from './stats/operations'\n\n\nconst agreementObserver = _.debounce((selectedState, dispatch) => {\n dispatch(submitAgreements())\n}, 4000)\n\nconst lineItemObserver = _.debounce((selectedState, dispatch) => {\n dispatch(submitLineItems())\n}, 4000)\n\nconst salesLedgerItemObserver = _.debounce((selectedState, dispatch) => {\n dispatch(submitSalesLedgerItems())\n}, 4000)\n\nconst failureReportObserver = _.debounce((selectedState, dispatch) => {\n dispatch(submitFailureReports())\n}, 1000)\n\n//const stateObserver = _.throttle((selectedState, dispatch) => {\n //dispatch(loadStats())\n//}, 8000)\n\nfunction observeStore(store, select, onChange) {\n let currentState;\n\n function handleChange() {\n const state = store.getState()\n if(!state.loadStatePath) {\n let nextState = select === true ? null : select(state);\n if (select === true || nextState !== currentState) {\n currentState = nextState;\n onChange(currentState, store.dispatch);\n }\n }\n }\n\n let unsubscribe = store.subscribe(handleChange);\n handleChange();\n return unsubscribe;\n}\n\nconst listenToWindowEvent = (name, getListener, action) => (dispatch, getState) => {\n const handleEvent = (e) => {\n var { key } = e\n var listener = getListener(getState())\n if (listener) {\n if(_.includes(listener.preventDefaultKeys, key)) { e.preventDefault() }\n dispatch(action({listener, key}))\n }\n }\n window.addEventListener(name, handleEvent);\n // note: returns a function to unsubscribe\n return () => window.removeEventListener(name, handleEvent);\n}\n\nexport default function configureStore(initialState) {\n\n const store = createStore(rootReducer,\n initialState,\n composeWithDevTools(applyMiddleware(thunk)));\n\n if (module.hot) {\n module.hot.accept('./reducer', () => {\n //console.log('reload')\n const nextRootReducer = require('./reducer').default;\n store.replaceReducer(nextRootReducer);\n });\n }\n\n observeStore(store, getAgreements, agreementObserver)\n observeStore(store, getLineItems, lineItemObserver)\n observeStore(store, getSalesLedgerItems, salesLedgerItemObserver)\n observeStore(store, getFailureReports, failureReportObserver)\n //observeStore(store, true, stateObserver)\n\n store.dispatch(listenToWindowEvent('keydown', getKeyDownListener, handleKeyDownEvent));\n\n return store;\n\n}\n","import { hot } from 'react-hot-loader'\nimport App from './components/App'\nimport configureStore from './store'\n\nconst RootNode = hot(module)(App)\n\nexport {\n RootNode,\n configureStore\n}\n","import React from \"react\"\nimport { Provider } from 'react-redux';\nimport { RootNode, configureStore } from '../apps/validation'\n\nexport default (props) => {\n return (\n <Provider store={configureStore(props)}>\n <RootNode/>\n </Provider>\n );\n}\n\n","import _ from \"lodashExtended\";\nimport {\n getAuditType,\n getSubmissionDate,\n getObservationResult\n} from \"../app/selectors\";\nimport emailAddressCheck from \"email-addresses\";\n\nconst isOnSite = state => {\n return getAuditType(state) == \"on_site\";\n};\n\nconst isOnSiteAndPresent = (value, state) => {\n return isOnSite(state) && isPresent(value, state);\n};\n\nconst isOnSiteAndYes = (value, state) => {\n return isOnSite(state) && isYes(value, state);\n};\n\nconst isOnSiteAndNo = (value, state) => {\n return isOnSite(state) && isNo(value, state);\n};\n\nconst isYes = (value, state) => {\n return value === \"yes\";\n};\n\nconst isNo = (value, state) => {\n return value === \"no\";\n};\n\nconst isBlank = (value, state) => {\n return _.isBlank(value);\n};\n\nconst isPresent = (value, state) => {\n return _.isPresent(value);\n};\n\nconst yearsFromSubmit = (date, state) => {\n const submissionDate = getSubmissionDate(state);\n return moment(submissionDate).diff(moment(date), \"year\");\n};\n\nconst monthsFromSubmit = (date, state) => {\n const submissionDate = getSubmissionDate(state);\n return moment(submissionDate).diff(moment(date), \"month\");\n};\n\nconst matchText = (value, regex, state) => {\n return _.isString(value) && _.isPresent(value.match(regex));\n};\n\nconst isEmail = (value, state) => {\n return _.isString(value) && emailAddressCheck.parseOneAddress(value);\n};\n\nconst wasteStreamDecisions = {\n hasStorage: [\n {\n score: 0,\n response: \"Site has bulk waste storage\",\n autoSelect: ({ hasStorage, ...x }, s) => {\n return isPresent(_.get(hasStorage, \"clearlyIdentified\"));\n }\n },\n {\n score: 3,\n response: \"Bulk storage of has not been reported\",\n action:\n \"Ensure that you have appropriate storage and disposal of general Waste in place for your practice. It is therefore not possible to assess how you dispose general waste and if the waste is correctly segregated. Refer to HTM 07-01 issued by the Department of Health and the EPR 5.07 issued by the Environment Agency and other guidelines to setup the appropriate waste disposal for your practice\",\n autoSelect: ({ hasStorage, ...x }, s) => {\n return hasStorage && isBlank(_.get(hasStorage, \"clearlyIdentified\"));\n }\n }\n ],\n storedSecurely: [\n {\n score: 0,\n response: \"The waste is stored securely\",\n autoSelect: ({ storedSecurely, ...x }, s) => {\n return (\n storedSecurely &&\n storedSecurely.containmentWithSecurityRequired.length > 0 &&\n isBlank(storedSecurely.notSecureContainment, s)\n );\n }\n },\n {\n score: 3,\n response: \"The waste is not stored securely\",\n action:\n \"Clinical waste has to be stored securely and not accessible to the public. Please ensure that the relevant requirements for Clinical waste storage are met for your practice. Please refer to HTM 07-01 issued by the Department of Health for guidance\",\n autoSelect: ({ storedSecurely, ...x }, s) => {\n return (\n storedSecurely &&\n storedSecurely.containmentWithSecurityRequired.length > 0 &&\n isPresent(storedSecurely.notSecureContainment, s)\n );\n }\n },\n {\n score: 3,\n response:\n \"No storage reported for clinical waste, storage security cannot be assessed\",\n action:\n \"Ensure that the relevant requirements for Clinical waste storage are met for your practice. Please refer to HTM 07-01 issued by the Department of Health for guidance\",\n autoSelect: ({ storedSecurely, ...x }, s) => {\n return (\n storedSecurely &&\n isBlank(storedSecurely.containmentWithSecurityRequired, s)\n );\n }\n }\n ],\n packagedCorrectly: [\n {\n score: 0,\n response: \"Waste is packaged in approved containers\",\n autoSelect: ({ packagedCorrectly, ...x }, s) => {\n return (\n packagedCorrectly &&\n packagedCorrectly.withPackagingRequired.length > 0 &&\n isBlank(packagedCorrectly.withoutCorrectPackaging, s)\n );\n }\n },\n {\n score: 3,\n response: \"Waste is not packaged in approved containers\",\n action:\n \"Ensure that your waste is correctly packaged. Refer to HTM 07-01 issued by the Department of Health and the EPR 5.07 issued by the Environment Agency and other guidelines to setup the appropriate waste disposal for your practice\",\n autoSelect: ({ packagedCorrectly, ...x }, s) => {\n return (\n packagedCorrectly &&\n packagedCorrectly.withPackagingRequired.length > 0 &&\n isPresent(packagedCorrectly.withoutCorrectPackaging, s)\n );\n }\n },\n {\n score: 3,\n response: \"No bulk storage reported, packaging cannot be assessed\",\n action:\n \"Ensure that your waste is correctly packaged. It is therefore not possible to assess how you dispose waste and if the waste is correctly packaged. Refer to HTM 07-01 issued by the Department of Health and the EPR 5.07 issued by the Environment Agency and other guidelines to setup the appropriate waste disposal for your practice\",\n autoSelect: ({ packagedCorrectly, ...x }, s) => {\n return (\n packagedCorrectly &&\n isBlank(packagedCorrectly.withPackagingRequired, s)\n );\n }\n }\n ],\n contaminationFound: [\n {\n score: 0,\n response: \"No Contamination found\",\n autoSelect: ({ contaminationFound }, s) => {\n return (\n contaminationFound &&\n isBlank(contaminationFound.withContamination, s) &&\n isPresent(contaminationFound.noContamination, s)\n );\n }\n },\n {\n score: 3,\n response:\n \"The identified contamination presents a severe risk. See Appendix B for details\",\n action:\n \"Ensure that the appropriate waste segregation is in place and that bins are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin outlining segregation requirement by waste type (What waste type should go in what bin type and what waste types not)\",\n autoSelect: ({ contaminationFound }, s) => {\n return contaminationFound && contaminationFound.highestRiskLevel == 3;\n }\n },\n {\n score: 2,\n response:\n \"The contamination cannot be fully assesed and therefore presents a potential high risk. See Appendix A for details\",\n action:\n \"Ensure that the appropriate waste segregation is in place and that bins are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin outlining segregation requirement by waste type (What waste type should go in what bin type and what waste types not)\",\n autoSelect: ({ contaminationFound }, s) => {\n return (\n contaminationFound &&\n isPresent(contaminationFound.cannotAssesContamination) &&\n contaminationFound.highestRiskLevel < 2\n );\n }\n },\n {\n score: 2,\n response:\n \"The identified contamination presents a high risk. See Appendix B for details\",\n action:\n \"Ensure that the appropriate waste segregation is in place and that bins are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin outlining segregation requirement by waste type (What waste type should go in what bin type and what waste types not)\",\n autoSelect: ({ contaminationFound }, s) => {\n return contaminationFound && contaminationFound.highestRiskLevel == 2;\n }\n },\n {\n score: 1,\n response:\n \"The identified contamination presents a medium risk. See Appendix B for details\",\n action:\n \"Ensure that the appropriate waste segregation is in place and that bins are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin outlining segregation requirement by waste type (What waste type should go in what bin type and what waste types not)\",\n autoSelect: ({ contaminationFound }, s) => {\n return contaminationFound && contaminationFound.highestRiskLevel == 1;\n }\n },\n {\n score: 0,\n response:\n \"The identified contamination presents a low risk. See Appendix B for details\",\n action:\n \"Ensure that the appropriate waste segregation is in place and that bins are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin outlining segregation requirement by waste type (What waste type should go in what bin type and what waste types not)\",\n autoSelect: ({ contaminationFound }, s) => {\n return contaminationFound && contaminationFound.highestRiskLevel == 0;\n }\n },\n {\n score: 3,\n response:\n \"Insufficient information provided. The contamination cannot be assesed for this waste stream. See Appendix B for details\",\n action:\n \"Ensure that the appropriate waste segregation is in place and that bins are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin outlining segregation requirement by waste type (What waste type should go in what bin type and what waste types not)\",\n autoSelect: ({ contaminationFound }, s) => {\n return (\n contaminationFound &&\n isBlank(contaminationFound.contaminationAssessed)\n );\n }\n },\n {\n score: 3,\n response: \"The waste stream has not been audited\",\n autoSelect: ({ id }, s) => isBlank(id, s)\n }\n ]\n};\n\nconst roomDecisions = {\n hasClinicalBins: [\n {\n score: 3,\n response: \"Room has not been audited\",\n autoSelect: ({ notAudited }, s) => notAudited\n },\n {\n score: 0,\n response: \"The room has at least one clinical waste bin identified\",\n autoSelect: ({ hasClinicalBins, ...x }, s) => {\n return isPresent(_.get(hasClinicalBins, \"clearlyIdentified\"));\n }\n },\n {\n score: 3,\n response:\n \"No clinical bins have been identified in this room. It is therefore not possible to assess how you dispose any clinical waste and if the waste is correctly segregated. \",\n action:\n \"Ensure that the appropriate waste segregation is in place and that bins are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin outlining segregation requirement by waste type (What waste type should go in what bin type and what waste types not)\",\n autoSelect: ({ hasClinicalBins, ...x }, s) => {\n return (\n hasClinicalBins &&\n isBlank(_.get(hasClinicalBins, \"clearlyIdentified\"))\n );\n }\n }\n ],\n hasNonClinicalBins: [\n {\n score: 2,\n response: \"The room has not been audited\",\n autoSelect: ({ notAudited }, s) => notAudited\n },\n {\n score: 0,\n response: \"The room has sufficient non clinical waste bins\",\n autoSelect: ({ hasNonClinicalBins, ...x }, s) => {\n return isPresent(_.get(hasNonClinicalBins, \"clearlyIdentified\"));\n }\n },\n {\n score: 2,\n response:\n \"No non-clinical waste bins have been identified in this room. It is therefore not possible to assess how you dispose any non clinical waste and if the waste is correctly segregated.\",\n action:\n \"Ensure that the appropriate waste segregation is in place and that bins are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin outlining segregation requirement by waste type (What waste type should go in what bin type and what waste types not)\",\n autoSelect: ({ hasNonClinicalBins, ...x }, s) => {\n return (\n hasNonClinicalBins &&\n isBlank(_.get(hasNonClinicalBins, \"clearlyIdentified\"))\n );\n }\n }\n ],\n allRequiredContainersLabeled: [\n {\n score: 3,\n response: \"The room has not been audited\",\n autoSelect: ({ notAudited }, s) => notAudited\n },\n {\n score: 0,\n response: \"All clinical continers are labelled\",\n autoSelect: ({ allRequiredContainersLabeled }, s) => {\n return (\n allRequiredContainersLabeled &&\n allRequiredContainersLabeled.withLabelingRequired.length > 0 &&\n allRequiredContainersLabeled.withClearLabels.length ==\n allRequiredContainersLabeled.withLabelingRequired.length\n );\n }\n },\n {\n score: 3,\n response: \"All clinical containers are not labeled\",\n action:\n \"Ensure that your Clinical Waste Containers are labelled in accordance with the relevant regulatory requirements. Please refer to relevant guidelines such as the HTM 07-01 issued by the Department of Health\",\n autoSelect: ({ allRequiredContainersLabeled }, s) => {\n return (\n allRequiredContainersLabeled &&\n allRequiredContainersLabeled.withLabelingRequired.length > 0 &&\n isBlank(allRequiredContainersLabeled.withClearLabels, s)\n );\n }\n },\n {\n score: 2,\n response: \"Not all clinical containers are labeled\",\n action:\n \"Ensure that your Clinical Waste Containers are labelled in accordance with the relevant regulatory requirements. Please refer to relevant guidelines such as the HTM 07-01 issued by the Department of Health\",\n autoSelect: ({ allRequiredContainersLabeled }, s) => {\n return (\n allRequiredContainersLabeled &&\n allRequiredContainersLabeled.withLabelingRequired.length > 0 &&\n allRequiredContainersLabeled.withClearLabels.length !=\n allRequiredContainersLabeled.withLabelingRequired.length\n );\n }\n },\n {\n score: 3,\n response: \"No clinical containers were audited\",\n action:\n \"Ensure that your Clinical Waste Containers are labelled in accordance with the relevant regulatory requirements. Please refer to relevant guidelines such as the HTM 07-01 issued by the Department of Health\",\n autoSelect: ({ allRequiredContainersLabeled }, s) => {\n return (\n allRequiredContainersLabeled &&\n isBlank(allRequiredContainersLabeled.withLabelingRequired, s)\n );\n }\n }\n ],\n contaminationFound: [\n {\n score: 3,\n response: \"The room has not been audited\",\n autoSelect: ({ notAudited }, s) => notAudited\n },\n {\n score: 0,\n response: \"No Contamination found\",\n autoSelect: ({ contaminationFound }, s) => {\n return (\n contaminationFound &&\n isBlank(contaminationFound.withContamination, s) &&\n isPresent(contaminationFound.noContamination, s)\n );\n }\n },\n {\n score: 3,\n response:\n \"The identified contamination presents a severe risk. See Appendix A for details\",\n action:\n \"Ensure that the appropriate waste segregation is in place and that bins are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin outlining segregation requirement by waste type (What waste type should go in what bin type and what waste types not)\",\n autoSelect: ({ contaminationFound }, s) => {\n return contaminationFound && contaminationFound.highestRiskLevel == 3;\n }\n },\n {\n score: 2,\n response:\n \"The contamination cannot be fully assesed and therefore presents a potential high risk. See Appendix A for details\",\n action:\n \"Ensure that the appropriate waste segregation is in place and that bins are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin outlining segregation requirement by waste type (What waste type should go in what bin type and what waste types not)\",\n autoSelect: ({ contaminationFound }, s) => {\n return (\n contaminationFound &&\n isPresent(contaminationFound.cannotAssesContamination) &&\n contaminationFound.highestRiskLevel < 2\n );\n }\n },\n {\n score: 2,\n response:\n \"The identified contamination presents a high risk. See Appendix A for details\",\n action:\n \"Ensure that the appropriate waste segregation is in place and that bins are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin outlining segregation requirement by waste type (What waste type should go in what bin type and what waste types not)\",\n autoSelect: ({ contaminationFound }, s) => {\n return contaminationFound && contaminationFound.highestRiskLevel == 2;\n }\n },\n {\n score: 1,\n response:\n \"The identified contamination presents a medium risk. See Appendix A for details\",\n action:\n \"Ensure that the appropriate waste segregation is in place and that bins are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin outlining segregation requirement by waste type (What waste type should go in what bin type and what waste types not)\",\n autoSelect: ({ contaminationFound }, s) => {\n return contaminationFound && contaminationFound.highestRiskLevel == 1;\n }\n },\n {\n score: 0,\n response:\n \"The identified contamination presents a low risk. See Appendix A for details\",\n action:\n \"Ensure that the appropriate waste segregation is in place and that bins are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin outlining segregation requirement by waste type (What waste type should go in what bin type and what waste types not)\",\n autoSelect: ({ contaminationFound }, s) => {\n return contaminationFound && contaminationFound.highestRiskLevel == 0;\n }\n },\n {\n score: 2,\n response:\n \"Insufficient information provided. The contamination cannot be assesed in this room and therefore presents a potential high risk. See Appendix A for details\",\n action:\n \"Ensure that the appropriate waste segregation is in place and that bins are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin outlining segregation requirement by waste type (What waste type should go in what bin type and what waste types not)\",\n autoSelect: ({ contaminationFound }, s) => {\n return (\n contaminationFound &&\n isBlank(contaminationFound.contaminationAssessed)\n );\n }\n }\n ]\n};\n\nconst externalBinDecisions = {\n clearlyIdentified: [\n {\n result: true,\n response: \"Clear image of the external container provided\",\n autoSelect: ({ exteriorPhoto }, s) => isOnSiteAndPresent(exteriorPhoto, s)\n },\n {\n result: false,\n response:\n \"No image provided. It is therefore not possible to assess whether the requirement has been met\",\n autoSelect: ({ exteriorPhoto }, s) => isBlank(exteriorPhoto, s)\n },\n {\n result: false,\n response:\n \"The image does not clearly show the external container. It is therefore not possible to assess whether the requirement has been met\"\n }\n ],\n contentsClearlyShown: [\n {\n result: true,\n response: \"Clear image of the contents provided\",\n autoSelect: ({ interiorPhoto }, s) => isOnSiteAndPresent(interiorPhoto, s)\n },\n {\n result: false,\n response:\n \"No image provided. It is therefore not possible to assess whether the requirement has been met\",\n autoSelect: ({ interiorPhoto }, s) => isBlank(interiorPhoto, s)\n },\n {\n result: false,\n response:\n \"The image does not clearly show the external container. It is therefore not possible to assess whether the requirement has been met\"\n }\n ],\n packagedCorrectly: [\n {\n result: true,\n response: \"Waste is packaged in approved containers\",\n autoSelect: ({ contaminants }, s) => {\n return isOnSite(s) && !_.get(contaminants, \"unpackagedWaste\");\n }\n },\n {\n result: false,\n response: \"Waste not packaged in approved containers\",\n autoSelect: ({ contaminants }, s) => {\n return !!_.get(contaminants, \"unpackagedWaste\");\n }\n },\n {\n result: false,\n response: \"No image provided. It is not possible to assess the packaging\",\n autoSelect: ({ interiorPhoto }, s) => isBlank(interiorPhoto, s)\n }\n ],\n isBinLocked: [\n {\n result: true,\n response: \"The containers are locked\",\n autoSelect: ({ isBinLocked }, s) => isOnSiteAndYes(isBinLocked, s)\n },\n {\n result: false,\n response: \"The containers are not locked\",\n autoSelect: ({ isBinLocked }, s) => isNo(isBinLocked, s)\n },\n {\n result: false,\n response:\n \"No Response, it is not possible to assess if the container is secure\",\n autoSelect: ({ isBinLocked }, s) => isBlank(isBinLocked, s)\n }\n ],\n isAreaLocked: [\n {\n result: true,\n response: \"The area is secure\",\n autoSelect: ({ isAreaLocked }, s) => isOnSiteAndYes(isAreaLocked, s)\n },\n {\n result: false,\n response: \"The area is not secure\",\n autoSelect: ({ isAreaLocked }, s) => isNo(isAreaLocked, s)\n },\n {\n result: false,\n response:\n \"No response, it is not possible to assess if the area is secure\",\n autoSelect: ({ isAreaLocked }, s) => isBlank(isAreaLocked, s)\n }\n ],\n contaminationFound: [\n {\n result: \"none\",\n response: \"No Contamination found\"\n },\n {\n result: 3,\n response: \"The identified contamination presents a severe risk\"\n },\n {\n result: 2,\n response: \"The identified contamination presents a high risk\"\n },\n {\n result: 1,\n response: \"The identified contamination presents a medium risk\"\n },\n {\n result: 0,\n response: \"The identified contamination presents a low risk\"\n },\n {\n result: \"cannot_assess\",\n response:\n \"No or insufficient information, contamination cannot be assesed.\"\n }\n ]\n};\n\nconst bulkContainmentDecisions = {\n clearlyIdentified: [\n {\n result: true,\n response: \"Clear image of area provided\",\n autoSelect: ({ bulkStorageAreaPhoto }, s) =>\n isOnSiteAndPresent(bulkStorageAreaPhoto, s)\n },\n {\n result: false,\n response:\n \"No image provided. It is therefore not possible to assess whether the requirement has been met\",\n autoSelect: ({ bulkStorageAreaPhoto }, s) =>\n isBlank(bulkStorageAreaPhoto, s)\n },\n {\n result: false,\n response:\n \"The image does not clearly show the area. It is therefore not possible to assess whether the requirement has been met\"\n }\n ],\n isPubliclyAccessible: [\n {\n result: true,\n response: \"The area is not accessible to the public\",\n autoSelect: ({ isPubliclyAccessible }, s) =>\n isOnSiteAndNo(isPubliclyAccessible, s)\n },\n {\n result: false,\n response: \"The area is accessible to the public\",\n autoSelect: ({ isPubliclyAccessible }, s) =>\n isYes(isPubliclyAccessible, s)\n },\n {\n result: false,\n response: \"No Response, The area may be accessible to the public\",\n autoSelect: ({ isPubliclyAccessible }, s) =>\n isBlank(isPubliclyAccessible, s)\n }\n ],\n isAreaLocked: [\n {\n result: true,\n response: \"The area is secure\",\n autoSelect: ({ isAreaLocked }, s) => isOnSiteAndYes(isAreaLocked, s)\n },\n {\n result: false,\n response: \"The area is not secure\",\n autoSelect: ({ isAreaLocked }, s) => isNo(isAreaLocked, s)\n },\n {\n result: false,\n response: \"No response. The area may not be secure\",\n autoSelect: ({ isAreaLocked }, s) => isBlank(isAreaLocked, s)\n }\n ],\n packagedCorrectly: [\n {\n result: true,\n response: \"Waste is packaged in approved containers\",\n autoSelect: ({ contaminants }, s) => {\n return isOnSite(s) && !_.get(contaminants, \"unpackagedWaste\");\n }\n },\n {\n result: false,\n response: \"Waste not packaged in approved containers\",\n autoSelect: ({ contaminants }, s) => {\n return !!_.get(contaminants, \"unpackagedWaste\");\n }\n },\n {\n result: false,\n response: \"No image provided. It is not possible to assess the packaging\",\n autoSelect: ({ bulkStorageAreaPhoto }, s) =>\n isBlank(bulkStorageAreaPhoto, s)\n }\n ],\n contaminationFound: [\n {\n result: \"none\",\n response: \"No Contamination found\"\n },\n {\n result: 3,\n response: \"The identified contamination presents a severe risk\"\n },\n {\n result: 2,\n response: \"The identified contamination presents a high risk\"\n },\n {\n result: 1,\n response: \"The identified contamination presents a medium risk\"\n },\n {\n result: 0,\n response: \"The identified contamination presents a low risk\"\n },\n {\n result: \"cannot_assess\",\n response:\n \"No or insufficient description, contamination cannot be assesed.\",\n autoSelect: ({ bulkStorageAreaPhoto }, s) =>\n isBlank(bulkStorageAreaPhoto, s)\n }\n ]\n};\n\nconst internalBinDecisions = {\n clearlyIdentified: [\n {\n result: true,\n response: \"Clear image of the container provided\",\n autoSelect: ({ exteriorPhoto }, s) => isOnSiteAndPresent(exteriorPhoto, s)\n },\n {\n result: false,\n response:\n \"No image provided. It is therefore not possible to assess whether the requirement has been met\",\n autoSelect: ({ exteriorPhoto }, s) => isBlank(exteriorPhoto, s)\n },\n {\n result: false,\n response:\n \"The image does not clearly show the container. It is therefore not possible to assess whether the requirement has been met\"\n }\n ],\n clearlyLabelled: [\n {\n result: true,\n response: \"Container is clearly labelled\",\n autoSelect: ({ hasCorrectLabel }, s) => isOnSiteAndYes(hasCorrectLabel, s)\n },\n {\n result: false,\n response: \"Container has not been labelled correctly or clearly\",\n autoSelect: ({ hasCorrectLabel }, s) => isNo(hasCorrectLabel, s)\n },\n {\n result: false,\n response: \"No image provided, label cannot be verified\",\n autoSelect: ({ exteriorPhoto }, s) => isBlank(exteriorPhoto, s)\n },\n {\n result: false,\n response: \"Image is not clear enough to verify label\"\n }\n ],\n contentsClearlyShown: [\n {\n result: true,\n response: \"Clear image of the contents provided\",\n autoSelect: ({ interiorPhoto }, s) => isOnSiteAndPresent(interiorPhoto, s)\n },\n {\n result: false,\n response:\n \"No image provided. It is therefore not possible to assess whether the requirement has been met\",\n autoSelect: ({ interiorPhoto }, s) => isBlank(interiorPhoto, s)\n },\n {\n result: false,\n response:\n \"The image does not clearly show the contents of the container. It is therefore not possible to assess whether the requirement has been met\"\n }\n ],\n contaminationFound: [\n {\n result: \"none\",\n response: \"No Contamination found\"\n },\n {\n result: 3,\n response: \"The identified contamination presents a severe risk\"\n },\n {\n result: 2,\n response: \"The identified contamination presents a high risk\"\n },\n {\n result: 1,\n response: \"The identified contamination presents a medium risk\"\n },\n {\n result: 0,\n response: \"The identified contamination presents a low risk\"\n },\n {\n result: \"cannot_assess\",\n response:\n \"No or insufficient information, contamination cannot be assesed.\",\n autoSelect: ({ interiorPhoto }, s) => isBlank(interiorPhoto, s)\n }\n ]\n};\n\nvar decisionData = {\n sections: {\n general_information: {\n email: [\n {\n score: 0,\n response: \"Information provided\",\n autoSelect: ({ email }, s) => isEmail(email, s)\n },\n {\n score: 0,\n response:\n \"Insufficient details provided, please ensure that the information is provided in full as part of your next audit\",\n autoSelect: ({ email }, s) => !isEmail(email, s)\n },\n {\n score: 0,\n response:\n \"Details not provided, please ensure that the information is provided in full as part of your next audit\",\n autoSelect: ({ email }, s) => isBlank(email, s)\n }\n ],\n clinicalEmployeeCount: [\n {\n score: 0,\n response: \"Information provided\",\n autoSelect: ({ clinicalEmployeeCount }, s) =>\n isPresent(clinicalEmployeeCount, s)\n },\n {\n score: 0,\n response:\n \"Details not provided, please ensure that the information is provided in full as part of your next audit\",\n autoSelect: ({ clinicalEmployeeCount }, s) =>\n isBlank(clinicalEmployeeCount, s)\n }\n ],\n clinicallyActiveRoomsCount: [\n {\n score: 0,\n response: \"Information provided\",\n autoSelect: ({ clinicallyActiveRoomsCount }, s) =>\n isPresent(clinicallyActiveRoomsCount, s)\n },\n {\n score: 0,\n response:\n \"Details not provided, please ensure that the information is provided in full as part of your next audit\",\n autoSelect: ({ clinicallyActiveRoomsCount }, s) =>\n isBlank(clinicallyActiveRoomsCount, s)\n }\n ],\n jobTitle: [\n {\n score: 0,\n response: \"Information provided\",\n autoSelect: ({ jobTitle }, s) => isOnSiteAndPresent(jobTitle, s)\n },\n {\n score: 0,\n response:\n \"Insufficient details provided, please ensure that the information is provided in full as part of your next audit\"\n },\n {\n score: 0,\n response:\n \"Details not provided, please ensure that the information is provided in full as part of your next audit\",\n autoSelect: ({ jobTitle }, s) => isBlank(jobTitle, s)\n }\n ],\n hasKnowledgeOfHtm0701: [\n {\n score: 0,\n response:\n \"The person conducting the audit has working knowledge of HTM 07-01\",\n autoSelect: ({ hasKnowledgeOfHtm0701 }, s) =>\n isYes(hasKnowledgeOfHtm0701, s)\n },\n {\n score: 3,\n response:\n \"The person conducting the audit does not have a working knowledge of HTM 07-01\",\n action:\n \"Familiarise yourself with the Health Technical Memorandum 07-01: Safe management of healthcare waste (HTM 07-01) issued by the Department of Health\",\n autoSelect: ({ hasKnowledgeOfHtm0701 }, s) =>\n isNo(hasKnowledgeOfHtm0701, s)\n },\n {\n score: 3,\n response: \"Details not provided\",\n action:\n \"Familiarise yourself with the Health Technical Memorandum 07-01: Safe management of healthcare waste (HTM 07-01) issued by the Department of Health\",\n autoSelect: ({ hasKnowledgeOfHtm0701 }, s) =>\n isBlank(hasKnowledgeOfHtm0701, s)\n }\n ],\n hasKnowledgeOfEpr507: [\n {\n score: 0,\n response:\n \"The person conducting the audit has working knowledge of EPR 5.07\",\n autoSelect: ({ hasKnowledgeOfEpr507 }, s) =>\n isYes(hasKnowledgeOfEpr507, s)\n },\n {\n score: 3,\n response:\n \"The person conducting the audit does not have a working knowledge of EPR 5.07\",\n action:\n \"Familiarise yourself with the additional guidance for Clinical Waste (EPR 5.07) on how to comply with the environmental permit requirements of your waste disposal company.\",\n autoSelect: ({ hasKnowledgeOfEpr507 }, s) =>\n isNo(hasKnowledgeOfEpr507, s)\n },\n {\n score: 3,\n response: \"Details not provided\",\n action:\n \"Familiarise yourself with the additional guidance for Clinical Waste (EPR 5.07) on how to comply with the environmental permit requirements of your waste disposal company.\",\n autoSelect: ({ hasKnowledgeOfEpr507 }, s) =>\n isBlank(hasKnowledgeOfEpr507, s)\n }\n ],\n fullName: [\n {\n score: 0,\n response: \"Information provided\",\n autoSelect: ({ fullName }, s) => isOnSiteAndPresent(fullName, s)\n },\n {\n score: 0,\n response:\n \"Details not provided, please ensure that the information is provided in full as part of your next audit\",\n autoSelect: ({ fullName }, s) => isBlank(fullName, s)\n },\n {\n score: 0,\n response:\n \"Insufficient details provided, please ensure that the information is provided in full as part of your next audit\"\n }\n ]\n },\n waste_management_policy: {\n policyOwnerName: [\n {\n score: 0,\n response: \"Information provided\",\n autoSelect: ({ policyOwnerName }, s) =>\n isOnSiteAndPresent(policyOwnerName, s)\n },\n {\n score: 0,\n response:\n \"Details not provided, please ensure that the information is provided in full as part of your next audit\",\n autoSelect: ({ policyOwnerName }, s) => isBlank(policyOwnerName, s)\n },\n {\n score: 0,\n response:\n \"Insufficient details provided, please ensure that the information is provided in full as part of your next audit\"\n }\n ],\n policyDocument: [\n {\n score: 0,\n response: \"Policy attached\",\n autoSelect: ({ policyDocument }, s) =>\n isOnSiteAndPresent(policyDocument, s)\n },\n {\n score: 2,\n response:\n \"The attachment is not clearly visible to verify the question, it is therefore not possible to assess whether the requirement has been met. \",\n action:\n \"Refer to the HTM 07-01 issued by the Department of Health and other relevant guidance to set a Waste Management Policy for your practice\"\n },\n {\n score: 2,\n response:\n \"The attachment provided does not correspond to the requirement for this question, It is therefore not possible to assess whether the requirement has been met\",\n action:\n \"Refer to the HTM 07-01 issued by the Department of Health and other relevant guidance to set a Waste Management Policy for your practice\"\n },\n {\n score: 2,\n response:\n \"An attachment has not been provided, it is therefore not possible to assess whether the requirement has been met\",\n action:\n \"Refer to the HTM 07-01 issued by the Department of Health and other relevant guidance to set a Waste Management Policy for your practice\",\n autoSelect: ({ policyDocument }, s) => isBlank(policyDocument, s)\n }\n ],\n hasWasteManagementPolicy: [\n {\n score: 0,\n response: \"Practice has a policy\",\n autoSelect: ({ hasWasteManagementPolicy }, s) =>\n isYes(hasWasteManagementPolicy, s)\n },\n {\n score: 2,\n response:\n \"Practice has no policy, a Waste Management Policy need to be in place for your practice.\",\n action:\n \"Refer to the HTM 07-01 issued by the Department of Health and other relevant guidance to set a Waste Management Policy for your practice\",\n autoSelect: ({ hasWasteManagementPolicy }, s) =>\n isNo(hasWasteManagementPolicy, s)\n },\n {\n score: 2,\n response:\n \"Not Answered, A Waste Management Policy need to be in place for your practice.\",\n action:\n \"Refer to the HTM 07-01 issued by the Department of Health and other relevant guidance to set a Waste Management Policy for your practice\",\n autoSelect: ({ hasWasteManagementPolicy }, s) =>\n isBlank(hasWasteManagementPolicy, s)\n }\n ],\n policyLastReviewDate: [\n {\n score: 0,\n response: \"Date provided less than 1 year old\",\n autoSelect: ({ policyLastReviewDate }, state) =>\n isOnSite(state) && yearsFromSubmit(policyLastReviewDate, state) < 1\n },\n {\n score: 1,\n response: \"Policy is older than 1 Year, your policy is out of date\",\n action:\n \"Review and update your policy. the policy needs to be reviewed and updated every year\",\n autoSelect: ({ policyLastReviewDate }, state) =>\n isOnSite(state) && yearsFromSubmit(policyLastReviewDate, state) >= 1\n },\n {\n score: 0,\n response:\n \"Date provided does not match attachment but is within 1 year\"\n },\n {\n score: 1,\n response:\n \"Date does not match attachment and date on attachment is older than 1 year, your policy is out of date\",\n action:\n \"Review and update your policy. the policy needs to be reviewed and updated every year\"\n },\n {\n score: 1,\n response:\n \"Details not provided, it is therefore not possible to assess whether the requirement has been met\",\n action:\n \"Review and update your policy. The policy needs to be reviewed and updated every year\",\n autoSelect: ({ policyLastReviewDate }, s) =>\n isBlank(policyLastReviewDate, s)\n },\n {\n score: 1,\n response:\n \"No attachment provided. It is therefore not possible to assess whether the date provided matches the relevant policy\",\n action:\n \"Review and update your policy. The policy needs to be reviewed and updated every year\",\n autoSelect: ({ policyDocument }, s) => isBlank(policyDocument, s)\n }\n ]\n },\n waste_management_training: {\n trainingMethod: [\n {\n score: 2,\n response: \"Training is not provided\",\n action:\n \"Ensure that you have suitable training methods in place at your practice\",\n autoSelect: ({ doesWasteManagementTraining }, s) =>\n isNo(doesWasteManagementTraining, s)\n },\n {\n score: 0,\n response: \"Training is provided using suitable methods\",\n autoSelect: ({ trainingMethod }, s) =>\n isPresent(_.compact(Object.values(trainingMethod || {})), s)\n },\n {\n score: 2,\n response: \"No information on your training methods provided\",\n action:\n \"Ensure that you have suitable training methods in place at your practice\",\n autoSelect: ({ trainingMethod }, s) =>\n isBlank(_.compact(Object.values(trainingMethod || {})), s)\n }\n ],\n doesWasteManagementTraining: [\n {\n score: 0,\n response: \"Training provided\",\n autoSelect: ({ doesWasteManagementTraining }, s) =>\n isYes(doesWasteManagementTraining, s)\n },\n {\n score: 2,\n response:\n \"Training is not provided. Your practice is required to deliver Waste Management training to all staff\",\n action:\n \"Setup training material and a training schedule for all your staff. Please refer to the HTM 07-01 issued by the Department of Health for guidance\",\n autoSelect: ({ doesWasteManagementTraining }, s) =>\n isNo(doesWasteManagementTraining, s)\n },\n {\n score: 2,\n response:\n \"No Response. Your practice is required to deliver Waste Management training to all staff\",\n action:\n \"Setup training material and a training schedule for all your staff. Please refer to the HTM 07-01 issued by the Department of Health for guidance\",\n autoSelect: ({ doesWasteManagementTraining }, s) =>\n isBlank(doesWasteManagementTraining, s)\n }\n ],\n hasWasteManagementTrainingRecords: [\n {\n score: 2,\n response: \"Training is not provided\",\n action: \"Ensure that you setup and maintain training records\",\n autoSelect: ({ doesWasteManagementTraining }, s) =>\n isNo(doesWasteManagementTraining, s)\n },\n {\n score: 0,\n response: \"Practice keeps training records\",\n autoSelect: ({ hasWasteManagementTrainingRecords }, s) =>\n isYes(hasWasteManagementTrainingRecords, s)\n },\n {\n score: 2,\n response:\n \"No training records kept. You are required to keep training records of all staff\",\n action: \"Ensure that you setup and maintain training records\",\n autoSelect: ({ hasWasteManagementTrainingRecords }, s) =>\n isNo(hasWasteManagementTrainingRecords, s)\n },\n {\n score: 2,\n response:\n \"No response. You are required to keep training records of all staff\",\n action: \"Ensure that you setup and maintain training records\",\n autoSelect: ({ hasWasteManagementTrainingRecords }, s) =>\n isBlank(hasWasteManagementTrainingRecords, s)\n }\n ],\n whenIsTrainingDone: [\n {\n score: 0,\n response: \"Staff receive induction, ad-hoc and regular training\",\n autoSelect: ({ whenIsTrainingDone }, s) => {\n return (\n whenIsTrainingDone &&\n isPresent(whenIsTrainingDone.regularly, s) &&\n whenIsTrainingDone.atInduction &&\n whenIsTrainingDone.adHoc\n );\n }\n },\n {\n score: 2,\n response: \"Training is not provided\",\n action:\n \"Ensure that training is provided at induction, on a regular basis and ad-hoc if required to all staff\",\n autoSelect: ({ doesWasteManagementTraining }, s) => {\n return isNo(doesWasteManagementTraining, s);\n }\n },\n {\n score: 2,\n response: \"No response provided\",\n action:\n \"Ensure that training is provided at induction, on a regular basis and ad-hoc if required to all staff\",\n autoSelect: ({ whenIsTrainingDone }, s) => {\n return (\n isBlank(whenIsTrainingDone, s) ||\n (!whenIsTrainingDone.atInduction &&\n isBlank(whenIsTrainingDone.regularly, s) &&\n !whenIsTrainingDone.adHoc)\n );\n }\n },\n {\n score: 2,\n response: \"Only induction training provided\",\n action:\n \"Ensure that training is also provided on a regular basis and ad-hoc if required to all staff\",\n autoSelect: ({ whenIsTrainingDone }, s) => {\n return (\n whenIsTrainingDone &&\n whenIsTrainingDone.atInduction &&\n isBlank(whenIsTrainingDone.regularly, s) &&\n !whenIsTrainingDone.adHoc\n );\n }\n },\n {\n score: 0,\n response: \"Staff receive only induction and ad-hoc training\",\n autoSelect: ({ whenIsTrainingDone }, s) => {\n return (\n whenIsTrainingDone &&\n whenIsTrainingDone.atInduction &&\n isBlank(whenIsTrainingDone.regularly, s) &&\n whenIsTrainingDone.adHoc\n );\n }\n },\n {\n score: 0,\n response: \"Staff receive only induction and regular training\",\n autoSelect: ({ whenIsTrainingDone }, s) => {\n return (\n whenIsTrainingDone &&\n isPresent(whenIsTrainingDone.regularly, s) &&\n whenIsTrainingDone.atInduction &&\n !whenIsTrainingDone.adHoc\n );\n }\n },\n {\n score: 2,\n response: \"Induction training not provided\",\n action:\n \"Ensure that induction training is also provided to every new staff member\",\n autoSelect: ({ whenIsTrainingDone }, s) => {\n return whenIsTrainingDone && !whenIsTrainingDone.atInduction;\n }\n }\n ],\n trainingProvidedTo: [\n {\n score: 2,\n response: \"Training is not provided\",\n action:\n \"Setup training material and a training schedule for all your staff\",\n autoSelect: ({ doesWasteManagementTraining }, s) =>\n isNo(doesWasteManagementTraining, s)\n },\n {\n score: 0,\n response: \"Training provided to all staff\",\n autoSelect: ({ trainingProvidedTo }, s) =>\n matchText(trainingProvidedTo, /all staff/i, s)\n },\n {\n score: 1,\n response:\n \"Training is provided to clinical staff only. Your practice is required to deliver Waste Management training to all staff.\",\n action:\n \"Setup training material and a training schedule for all your staff\",\n autoSelect: ({ trainingProvidedTo }, s) =>\n matchText(trainingProvidedTo, /clinical staff only/i, s)\n },\n {\n score: 2,\n response:\n \"No Response. Your practice is required to deliver Waste Management training to all staff.\",\n action:\n \"Setup training material and a training schedule for all your staff\",\n autoSelect: ({ trainingProvidedTo }, s) =>\n isBlank(trainingProvidedTo, s)\n }\n ],\n trainingRecordSample: [\n {\n score: 2,\n response: \"Training is not provided\",\n action:\n \"Ensure that you setup and maintain training records for all staff\",\n autoSelect: ({ doesWasteManagementTraining }, s) =>\n isNo(doesWasteManagementTraining, s)\n },\n {\n score: 0,\n response: \"Sample of training record provided\",\n autoSelect: ({ trainingRecordSample }, s) =>\n isOnSiteAndPresent(trainingRecordSample, s)\n },\n {\n score: 2,\n response:\n \"The attachment is not clearly visible to verify the question. It is therefore not possible to assess whether the requirement has been met\",\n action:\n \"Ensure that you setup and maintain training records for all staff\"\n },\n {\n score: 2,\n response:\n \"The attachment provided does not correspond to the requirement for this question. It is therefore not possible to assess whether the requirement has been met\",\n action:\n \"Ensure that you setup and maintain training records for all staff\"\n },\n {\n score: 2,\n response:\n \"An attachment has not been provided. It is therefore not possible to assess whether the requirement has been met.\",\n action:\n \"Ensure that you setup and maintain training records for all staff\",\n autoSelect: ({ trainingRecordSample }, s) =>\n isBlank(trainingRecordSample, s)\n }\n ],\n hasSegregationSignage: [\n {\n score: 0,\n response: \"Signs are used to outline waste segregation\",\n autoSelect: ({ hasSegregationSignage }, s) =>\n isYes(hasSegregationSignage, s)\n },\n {\n score: 2,\n response: \"Signs are not used to outline waste segregation\",\n action:\n \"To ensure that each staff member understands what bins should be used for which waste type, signs should be placed on or next to each bin providing an overview of what waste types should and should not be placed in that specific bin\",\n autoSelect: ({ hasSegregationSignage }, s) =>\n isNo(hasSegregationSignage, s)\n },\n {\n score: 2,\n response: \"No Response\",\n action:\n \"To ensure that each staff member understands what bins should be used for which waste type, signs should be placed on or next to each bin providing an overview of what waste types should and should not be placed in that specific bin\",\n autoSelect: ({ hasSegregationSignage }, s) =>\n isBlank(hasSegregationSignage, s)\n }\n ]\n },\n hwcn_records: {\n hasHwcnRecords: [\n {\n score: 0,\n response: \"Records of HCWNs are kept\",\n autoSelect: ({ hasHwcnRecords }, s) => isYes(hasHwcnRecords, s)\n },\n {\n score: 2,\n response: \"Records of HWCNs are not kept\",\n action:\n \"Contact your Waste Contractor to provide you with the relevant documentation or access Anenta's Vector system to see if your HWCNs are stored online. Ensure that your practice receives HWCNs with each clinical waste collection\",\n autoSelect: ({ hasHwcnRecords }, s) => isNo(hasHwcnRecords, s)\n },\n {\n score: 2,\n response: \"No Response\",\n action:\n \"Contact your Waste Contractor to provide you with the relevant documentation or access Anenta's Vector system to see if your HWCNs are stored online. Ensure that your practice receives HWCNs with each clinical waste collection\",\n autoSelect: ({ hasHwcnRecords }, s) => isBlank(hasHwcnRecords, s)\n }\n ],\n providedByFormat: [\n {\n score: 0,\n response: \"HWCNs provided in electronic format\",\n autoSelect: ({ providedByFormat }, s) =>\n providedByFormat &&\n (providedByFormat.anenta === true ||\n isEmail(providedByFormat.electronic, s))\n },\n {\n score: 0,\n response:\n \"HWCNs provided by e-mail but e-mail address cannot be verified\",\n autoSelect: ({ providedByFormat }, s) =>\n providedByFormat &&\n isPresent(providedByFormat.electronic, s) &&\n !isEmail(providedByFormat.electronic, s)\n },\n {\n score: 0,\n response: \"HWCNs provided in paper format\",\n autoSelect: ({ providedByFormat }, s) =>\n providedByFormat && providedByFormat.paper === true\n },\n {\n score: 2,\n response:\n \"Format of HWCN not provided. HWCNs need to be provided in either paper or electronic format by the waste contractor\",\n action:\n \"Ensure that your practice receives HWCNs with each hazardous waste collection\",\n autoSelect: ({ providedByFormat }, s) =>\n isBlank(_.compact(Object.values(providedByFormat || {})), s)\n }\n ],\n recentHwcnDocumentDate: [\n {\n score: 0,\n response: \"Recent HWCN provided\",\n autoSelect: ({ recentHwcnDocumentDate }, state) =>\n isOnSite(state) &&\n monthsFromSubmit(recentHwcnDocumentDate, state) < 1\n },\n {\n score: 2,\n response:\n \"The date provided is older than 1 month. Your practice should have more recent HWCNs on file\",\n action:\n \"Ensure that your practice stores HWCNs with each hazardous waste collection.\",\n autoSelect: ({ recentHwcnDocumentDate }, state) =>\n isOnSite(state) &&\n monthsFromSubmit(recentHwcnDocumentDate, state) >= 1\n },\n {\n score: 0,\n response:\n \"Date does not match attachment but is less than 1 month old\"\n },\n {\n score: 2,\n response:\n \"The date provided does not match the attached document, the attached document is older than 1 month. Your practice should have more recent HWCNs on file\",\n action:\n \"Ensure that your practice stores HWCNs with each hazardous waste collection.\"\n },\n {\n score: 2,\n response: \"A date has not been provided\",\n action:\n \"Ensure that your practice stores HWCNs with each hazardous waste collection.\",\n autoSelect: ({ recentHwcnDocumentDate }, s) =>\n isBlank(recentHwcnDocumentDate, s)\n },\n {\n score: 2,\n response:\n \"No attachment provided. It is therefore not possible to assess whether the date provided matches the relevant HWCN \",\n action:\n \"Ensure that your practice stores HWCNs with each hazardous waste collection.\",\n autoSelect: ({ recentHwcnDocument }, s) =>\n isBlank(recentHwcnDocument, s)\n }\n ],\n recentHwcnDocument: [\n {\n score: 0,\n response: \"Correct Information attached or clear Image provided\",\n autoSelect: ({ recentHwcnDocument }, s) =>\n isOnSiteAndPresent(recentHwcnDocument, s)\n },\n {\n score: 2,\n response:\n \"No Attachment. An attachment has not been provided. It is therefore not possible to assess whether the requirement has been met\",\n action:\n \"Ensure that your practice receives HWCNs with each hazardous waste collection. Contact your Waste Contractor to provide you with the relevant documentation or access Anenta's Vector system to see if your HWCNs are stored online\",\n autoSelect: ({ recentHwcnDocument }, s) =>\n isBlank(recentHwcnDocument, s)\n },\n {\n score: 2,\n response:\n \"The attachment is not clearly visible to verify the question. It is therefore not possible to assess whether the requirement has been met\",\n action:\n \"Ensure that your practice receives HWCNs with each hazardous waste collection. Contact your Waste Contractor to provide you with the relevant documentation or access Anenta's Vector system to see if your HWCNs are stored online\"\n },\n {\n score: 2,\n response:\n \"Attachment does not match question. The attachment provided does not correspond to the requirement for this question. It is therefore not possible to assess whether the requirement has been met\",\n action:\n \"Ensure that your practice receives HWCNs with each hazardous waste collection. Contact your Waste Contractor to provide you with the relevant documentation or access Anenta's Vector system to see if your HWCNs are stored online\"\n }\n ],\n historicHwcnDocumentDate: [\n {\n score: 0,\n response: \"Date provided 3 years or older\",\n autoSelect: ({ historicHwcnDocumentDate }, state) =>\n isOnSite(state) &&\n yearsFromSubmit(historicHwcnDocumentDate, state) >= 3\n },\n {\n score: 2,\n response: \"Date is less than 3 years old\",\n action:\n \"Ensure that your practice stores HWCNs with each hazardous waste collection\"\n },\n {\n score: 0,\n response:\n \"Date is less than 3 years old but is within a month of practice opening\"\n },\n {\n score: 0,\n response:\n \"Date does not match attachment but is older than 3 years or is within 1 month of practice opening\"\n },\n {\n score: 2,\n response:\n \"The date provided does not match the attached document, the attached document is less than 3 years old, your practice should have more recent HWCNs on file\",\n action:\n \"Ensure that your practice stores HWCNs with each hazardous waste collection\"\n },\n {\n score: 2,\n response:\n \"The date provided does not match the attached document, the attached document is not within 1 month of practice opening, your practice should have more recent HWCNs on file\",\n action:\n \" Ensure that your practice stores HWCNs with each hazardous waste collection.\"\n },\n {\n score: 2,\n response:\n \"No attachment provided. It is therefore not possible to assess whether the date provided matches the relevant HWCN\",\n action:\n \"Ensure that your practice stores HWCNs with each hazardous waste collection\",\n autoSelect: ({ historicHwcnDocument }, s) =>\n isBlank(historicHwcnDocument, s)\n }\n ],\n historicHwcnDocument: [\n {\n score: 0,\n response: \"Correct Information attached or clear Image provided\",\n autoSelect: ({ historicHwcnDocument }, s) =>\n isOnSiteAndPresent(historicHwcnDocument, s)\n },\n {\n score: 2,\n response:\n \"The attachment is not clearly visible to verify the question. It is therefore not possible to assess whether the requirement has been met\",\n action:\n \"Ensure that your practice receives HWCNs with each hazardous waste collection. Contact your Waste Contractor to provide you with the relevant documentation or access Anenta's Vector system to see if your HWCNs are stored online\"\n },\n {\n score: 2,\n response:\n \"Attachment does not match question. The attachment provided does not correspond to the requirement for this question. It is therefore not possible to assess whether the requirement has been met\",\n action:\n \"Ensure that your practice receives HWCNs with each hazardous waste collection. Contact your Waste Contractor to provide you with the relevant documentation or access Anenta's Vector system to see if your HWCNs are stored online\"\n },\n {\n score: 2,\n response:\n \"No Attachment. An attachment has not been provided. It is therefore not possible to assess whether the requirement has been met\",\n action:\n \"Ensure that your practice receives HWCNs with each hazardous waste collection. Contact your Waste Contractor to provide you with the relevant documentation or access Anenta's Vector system to see if your HWCNs are stored online\",\n autoSelect: ({ historicHwcnDocument }, s) =>\n isBlank(historicHwcnDocument, s)\n }\n ]\n },\n internal_waste_containment: {\n bins: internalBinDecisions,\n rooms: roomDecisions\n },\n bulk_waste_storage_containment: {\n bins: externalBinDecisions,\n bulkContainments: bulkContainmentDecisions,\n wasteStreams: wasteStreamDecisions\n }\n }\n};\n\nexport default decisionData;\n\n// export {\n// autoDecide\n// }\n\n//\"clinical\": {\n//\"hasStorage\": [\n//{\n//\"score\": 0,\n//\"response\": \"Site has bulk waste storage for clinical\"\n//},\n//{\n//\"score\": 3,\n//\"response\": \"Bulk storage of clinical waste has not been reported\",\n//\"action\": \"Ensure that you have appropriate storage and disposal of Clinical Waste in place for your practice. It is therefore not possible to assess how you dispose clinical waste and if the waste is correctly segregated. Refer to HTM 07-01 issued by the Department of Health and the EPR 5.07 issued by the Environment Agency and other guidelines to setup the appropriate waste disposal for your practice\"\n//}\n//],\n//\"storedSecurely\": [\n//{\n//\"score\": 0,\n//\"response\": \"The clinical waste is stored securely\"\n//},\n//{\n//\"score\": 3,\n//\"response\": \"The clinical waste is not stored securely\",\n//\"action\": \"Action\"\n//},\n//{\n//\"score\": 3,\n//\"response\": \"No storage reported for clinical waste, storage security cannot be assessed\",\n//\"action\": \"Action\"\n//}\n//],\n//\"packagedCorrectly\": [\n//{\n//\"score\": 0,\n//\"response\": \"Waste is packaged in approved containers\"\n//},\n//{\n//\"score\": 3,\n//\"response\": \"Waste not packaged in approved containers\",\n//\"action\": \"Ensure that your clinical waste is correctly packaged. Refer to HTM 07-01 issued by the Department of Health and the EPR 5.07 issued by the Environment Agency and other guidelines to setup the appropriate waste disposal for your practice\"\n//},\n//{\n//\"score\": 3,\n//\"response\": \"No storage reported for clinical waste, packaging cannot be assessed\",\n//\"action\": \"Ensure that your clinical waste is correctly packaged. It is therefore not possible to assess how you dispose clinical waste and if the waste is correctly packaged. Refer to HTM 07-01 issued by the Department of Health and the EPR 5.07 issued by the Environment Agency and other guidelines to setup the appropriate waste disposal for your practice\"\n//}\n//],\n//\"contaminationFound\": [\n//{\n//\"score\": 0,\n//\"response\": \"No contamination\"\n//},\n//{\n//\"score\": 2,\n//\"response\": \"Contaminated with non clinical waste\",\n//\"action\": \"Ensure that the appropriate waste segregation is in place and that bins / areas are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin / area outlining segregation requirement by waste type (What waste type should go in what bin type / area and what waste type not)\"\n//},\n//{\n//\"score\": 3,\n//\"response\": \"There is no storage reported for clinical waste, Contamination cannot be assessed\",\n//\"action\": \"Ensure that the appropriate waste segregation is in place and that bins / areas are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin / area outlining segregation requirement by waste type (What waste type should go in what bin type / area and what waste type not)\"\n//},\n//{\n//\"score\": 3,\n//\"response\": \"There is insufficient information provided and contamination cannot be assessed\",\n//\"action\": \"Ensure that the appropriate waste segregation is in place and that bins / areas are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin / area outlining segregation requirement by waste type (What waste type should go in what bin type / area and what waste type not)\"\n//},\n//]\n//},\n//\"general\": {\n//\"hasStorage\": [\n//{\n//\"score\": 0,\n//\"response\": \"Site has bulk waste storage for general\",\n//\"autoSelect\": ({hasStorage, ...x}, s) => {\n//return isPresent(_.get(hasStorage, 'clearlyIdentified'), )\n//}\n//},\n//{\n//\"score\": 3,\n//\"response\": \"Bulk storage of general waste has not been reported\",\n//\"action\": \"Ensure that you have appropriate storage and disposal of general Waste in place for your practice. It is therefore not possible to assess how you dispose general waste and if the waste is correctly segregated. Refer to HTM 07-01 issued by the Department of Health and the EPR 5.07 issued by the Environment Agency and other guidelines to setup the appropriate waste disposal for your practice\",\n//\"autoSelect\": ({hasClinicalBins, ...x}, s) => {\n//return hasStorage && isBlank(_.get(hasStorage, 'clearlyIdentified'))\n//}\n//}\n//],\n//\"packagedCorrectly\": [\n//{\n//\"score\": 0,\n//\"response\": \"Waste is packaged in approved containers\"\n//},\n//{\n//\"score\": 3,\n//\"response\": \"Waste not packaged in approved containers\",\n//\"action\": \"Ensure that your general waste is correctly packaged. Refer to HTM 07-01 issued by the Department of Health and the EPR 5.07 issued by the Environment Agency and other guidelines to setup the appropriate waste disposal for your practice\"\n//},\n//{\n//\"score\": 3,\n//\"response\": \"No storage reported for general waste, packaging cannot be assessed\",\n//\"action\": \"Ensure that your general waste is correctly packaged. It is therefore not possible to assess how you dispose general waste and if the waste is correctly packaged. Refer to HTM 07-01 issued by the Department of Health and the EPR 5.07 issued by the Environment Agency and other guidelines to setup the appropriate waste disposal for your practice\"\n//}\n//],\n//\"contaminationFound\": [\n//{\n//\"score\": 0,\n//\"response\": \"No contamination\"\n//},\n//{\n//\"score\": 3,\n//\"response\": \"Contaminated with clinical waste\",\n//\"action\": \"Ensure that the appropriate waste segregation is in place and that bins / areas are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin / area outlining segregation requirement by waste type (What waste type should go in what bin type / area and what waste type not)\"\n//},\n//{\n//\"score\": 2,\n//\"response\": \"There is no storage reported for general waste, Contamination cannot be assessed\",\n//\"action\": \"Ensure that the appropriate waste segregation is in place and that bins / areas are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin / area outlining segregation requirement by waste type (What waste type should go in what bin type / area and what waste type not)\"\n//},\n//{\n//\"score\": 3,\n//\"response\": \"There is insufficient information provided contamination cannot be assessed\",\n//\"action\": \"Ensure that the appropriate waste segregation is in place and that bins / areas are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin / area outlining segregation requirement by waste type (What waste type should go in what bin type / area and what waste type not)\"\n//},\n//]\n//},\n//\"recycling\": {\n//\"hasStorage\": [\n//{\n//\"score\": 0,\n//\"response\": \"Site has bulk waste storage for recycling\"\n//},\n//{\n//\"score\": 3,\n//\"response\": \"Bulk storage of recycling waste has not been reported\",\n//\"action\": \"Ensure that you have appropriate storage and disposal of recycling Waste in place for your practice. It is therefore not possible to assess how you dispose recycling waste and if the waste is correctly segregated. Refer to HTM 07-01 issued by the Department of Health and the EPR 5.07 issued by the Environment Agency and other guidelines to setup the appropriate waste disposal for your practice\"\n//}\n//],\n//\"contaminationFound\": [\n//{\n//\"score\": 0,\n//\"response\": \"No contamination\"\n//},\n//{\n//\"score\": 3,\n//\"response\": \"Contaminated with clinical waste\",\n//\"action\": \"Ensure that the appropriate waste segregation is in place and that bins / areas are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin / area outlining segregation requirement by waste type (What waste type should go in what bin type / area and what waste type not)\"\n//},\n//{\n//\"score\": 2,\n//\"response\": \"There is no storage reported for recycling waste, Contamination cannot be assessed\",\n//\"action\": \"Ensure that the appropriate waste segregation is in place and that bins / areas are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin / area outlining segregation requirement by waste type (What waste type should go in what bin type / area and what waste type not)\"\n//},\n//{\n//\"score\": 3,\n//\"response\": \"There is insufficient information provided contamination cannot be assessed\",\n//\"action\": \"Ensure that the appropriate waste segregation is in place and that bins / areas are available and used for each waste stream. Reiterate training on waste handling and segregation. Add, change or re-position posters at each bin / area outlining segregation requirement by waste type (What waste type should go in what bin type / area and what waste type not)\"\n//},\n//]\n//},\n","import _ from 'lodashExtended'\nimport decisionData from './decisionData'\nimport { getRequiredRoomCount, getBulkStorageTypes } from \"../../auditor/app/selectors\";\n\n\nconst getCurrentUser = (state) => {\n return state.app.currentUser\n}\n\nconst getAuditType = (state) => {\n return state.app.auditType\n}\n\nconst sumReviewResults = (reviewResults) => {\n const maxScore = _(reviewResults).map('maxScore').compact().sum()\n const score = _(reviewResults).map('score').compact().sum()\n const actionItems = _(reviewResults).map('actionItems').flatten().value()\n\n return {\n maxScore,\n score,\n actionItems\n }\n}\n\nconst scoreToTimeline = {\n 3: 'immediate',\n 2: '2_weeks',\n 1: '1_month',\n 0: '3_months',\n}\n\nconst mapReviewResult = (requiredFields, reviewData, actionSection) => {\n const requiredFieldNames = Object.keys(_.pickBy(requiredFields))\n\n const maxScore = _(requiredFieldNames).map((fieldName) => _.get(reviewData, `${fieldName}.maxScore`) ).compact().sum()\n const score = _(requiredFieldNames).map((fieldName) => _.get(reviewData, `${fieldName}.score`) ).compact().sum()\n const actionItems = _(requiredFieldNames).map((fieldName) => { \n const suggestedAction = _.get(reviewData, `${fieldName}.action`)\n if(_.isPresent(suggestedAction)) {\n const timeline = scoreToTimeline[_.get(reviewData, `${fieldName}.score`)]\n const observation = _.get(reviewData, `${fieldName}.response`)\n\n return {\n timeline,\n observation,\n suggestedAction,\n actionSection\n }\n }\n }).compact().value()\n\n return {\n maxScore,\n score,\n actionItems\n }\n\n}\n\nconst getSubmissionDate = (state) => {\n return _.get(state, 'app.submittedOn')\n}\n\n\nconst checkAllDataLoaded = (state) => {\n return _.difference([\n 'waste_audits',\n 'sections',\n 'sectionReviews',\n 'bins',\n 'binReviews',\n 'rooms',\n 'roomReviews',\n 'bulkContainments',\n 'bulkContainmentReviews',\n 'wasteStreamReviews'\n ], Object.keys(state.firestore.data)).length === 0\n}\n\nconst getDecisionData = (state) => decisionData\n\nconst makeObservation = (decision, allOptions, state) => {\n return {\n action: null,\n ..._.pick(decision, ['action', 'score', 'response']),\n maxScore: _(allOptions).map('score').max()\n }\n}\n\nconst hasObservation = (object, fieldName) => {\n return !_.isNil(_.get(object, `reviewData.${fieldName}.score`)) && !_.isNil(_.get(object, `reviewData.${fieldName}.response`))\n}\n\nconst makeNoScoreObservation = (decision, allOptions, state) => {\n return {\n ..._.pick(decision, ['result', 'response'])\n }\n}\n\nconst getObservationResult = (object, fieldName) => {\n return _.get(object, `reviewData.${fieldName}.result`)\n}\n\nconst hasNoScoreObservation = (object, fieldName) => {\n return !_.isNil(getObservationResult(object, fieldName)) && !_.isNil(_.get(object, `reviewData.${fieldName}.response`))\n}\n\nconst autoReviewData = (inputData, requiredFields, savedReviewData, decisionData, getObservation, state) => {\n var reviewData = {}\n var autoReviewData = {}\n const requiredFieldNames = _(requiredFields).pickBy((required,field) => required ).keys().value()\n\n _.each(requiredFieldNames, (field) => {\n var allOptions = decisionData[field]\n\n var autoDecision = _.find(allOptions, ({response, autoSelect}) => {\n return autoSelect && autoSelect(inputData, state) }\n )\n\n if(autoDecision) {\n autoReviewData[field] = getObservation(autoDecision, allOptions, state)\n }\n\n reviewData[field] = {\n ...(autoReviewData[field] || {}),\n ...(savedReviewData[field] || {})\n }\n })\n\n return {\n ..._.omit(savedReviewData, requiredFieldNames),\n ...reviewData,\n }\n}\n\nconst getRequiredWasteStreamIds = (state) => {\n return _(getBulkStorageTypes(state)).filter('auditRequired').map('id').value()\n}\n\n\nexport {\n getCurrentUser,\n getAuditType,\n checkAllDataLoaded,\n getDecisionData,\n makeNoScoreObservation,\n hasNoScoreObservation,\n getObservationResult,\n makeObservation,\n hasObservation,\n autoReviewData,\n mapReviewResult,\n sumReviewResults,\n getSubmissionDate,\n getRequiredRoomCount,\n getRequiredWasteStreamIds\n}\n","import React, { useEffect } from \"react\";\nimport PropTypes from \"prop-types\";\n//import { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { useLocation } from \"react-router-dom\";\n\nvar SectionReview = ({\n title,\n sectionId,\n children,\n}) => {\n\n const { pathname } = useLocation();\n\n useEffect(() => {\n window.scrollTo(0, 0);\n }, [pathname]);\n\n\n return (\n <div\n className=\"mb-4\"\n >\n <div className=\"mb-5\">\n <div className=\"h3 text-white\" style={{ fontWeight: \"bold\" }}>\n <div className=\"m-0\">{title}</div>\n </div>\n </div>\n {children}\n </div>\n );\n};\n\nSectionReview.propTypes = {\n title: PropTypes.node.isRequired,\n children: PropTypes.node.isRequired,\n sectionId: PropTypes.string.isRequired,\n};\n\n//const mapStateToProps = (state, { sectionId }) => {\n //return {\n //sectionStatus: getSectionStatus(sectionId, state),\n //incompleteMessage: getIncompleteMessage(sectionId, state)\n //};\n//};\n\n//const mapDispatchToProps = (dispatch, { sectionId, ...rest }) => {\n //return {\n //onSubmit: () => { dispatch(submitSection(sectionId)) },\n //onNavigateFrom: (navigateFromSectionId) => { dispatch(navigateFromSection(navigateFromSectionId))},\n //};\n//};\n\n//Section = connect(mapStateToProps, mapDispatchToProps)(Section);\n\nexport default SectionReview;\n\n","import React, { useState } from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport { TextAreaInput, Btn } from 'sharedComponents'\nimport { faTrash, faEdit, faTrashAlt } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n//import { connect } from 'react-redux';\n//import classNames from \"classnames\";\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar Comment = ( {\n text,\n onChange\n} ) => {\n\n const [editMode, setEditMode ] = useState(false)\n\n if(editMode) {\n return(\n <div className='pb-3'>\n <TextAreaInput\n name='comment'\n value={text}\n onChange={(value) => onChange(value) }\n />\n <Btn\n className='pull-right'\n onClick={() => setEditMode(false) }>Done</Btn>\n </div>\n )\n } else {\n if(_.isBlank(text)) {\n return(\n <div className='p-3' \n style={{ \n cursor: \"pointer\",\n color: '#5DADD6',\n textDecorationLine: 'underline'\n }}\n onClick={()=> setEditMode(true) }\n >\n <span>+ Add Comment</span>\n </div>\n )\n } else {\n return(\n <div\n className='p-3'\n style={{\n backgroundColor: '#EBEBEB',\n overflowWrap: 'break-word',\n borderRadius: '4px'\n\n }}>\n <span className='pull-right'>\n <span className='px-2'>\n <FontAwesomeIcon\n size='lg'\n style={{ cursor: \"pointer\"}}\n icon={faEdit}\n onClick={() => setEditMode(true)}\n />\n </span>\n <span className='px-2'>\n <FontAwesomeIcon\n size='lg'\n style={{ cursor: \"pointer\"}}\n icon={faTrashAlt}\n onClick={() => onChange(null)}\n />\n </span>\n </span>\n {text}\n </div>\n )\n }\n }\n}\n\nComment.propTypes = {\n text: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n};\n\nexport default Comment;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport { Alert } from 'react-bootstrap'\nimport ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';\n\n//import classNames from \"classnames\";\n//import { DropdownSelect, DateSelect, ModelErrors, Link } from 'sharedComponents'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar Action = ( { text } ) => {\n\n if(_.isPresent(text)) {\n return(\n <div className=\"audit-action\">\n <div className=\"action-title\"><ErrorOutlineIcon fontSize=\"large\" className='mr-2'/> Action Item </div>\n <p className='audit-text'>{text}</p>\n </div>\n )\n } else {\n return null\n }\n\n}\n\n//class Action extends React.Component {\n\n //constructor(props) {\n //super(props);\n //this.state = { minimized: true }\n //this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n //}\n\n //handleToggleMinimized() {\n //this.setState({minimized: !this.state.minimized})\n //}\n\n //render() {\n //const { } = this.props\n //const { minimized } = this.state\n\n //const content = minimized ? null : <div>{\"Action\"}</div>\n\n //return (\n //<div>\n //<span style={{cursor: 'pointer'}} className='pull-right' onClick={this.handleToggleMinimized}>\n //<i className={`fa fa-${ minimized ? 'chevron-down' : 'chevron-up' } text-muted`} style={{ cursor: 'pointer', marginRight: -5, marginLeft: 15 }}></i>\n //</span>\n //{ content }\n //</div>\n //)\n //}\n//}\n\n\n//Action.propTypes = {\n//};\n\n\n//const mapStateToProps = (state, {}) => {\n //return {\n //}\n//}\n\n//const mapDispatchToProps = (dispatch, {}) => {\n //return {\n //}\n//}\n\n//Action = connect(\n //mapStateToProps,\n //mapDispatchToProps\n//)(Action)\n\n\nexport default Action;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport DoneIcon from '@material-ui/icons/Done';\nimport ErrorIcon from '@material-ui/icons/Error';\n\nvar CompleteStatusIcon = ( { isComplete, className = '' } ) => {\n\n var statusIcon = isComplete ?\n <DoneIcon className={`audit-review-is-complete ${className}`} style={{ fontSize: 25 }}/>\n : <ErrorIcon className={`audit-review-is-not-complete ${className}`} style={{ fontSize: 25 }} />\n\n return(statusIcon)\n}\n\nexport default CompleteStatusIcon;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport { Badge, Panel } from 'react-bootstrap';\nimport { RadioInput } from \"sharedComponents\";\nimport Comment from \"./Comment\";\nimport Action from \"./Action\";\nimport CompleteStatusIcon from \"./CompleteStatusIcon\";\nimport { Alert } from 'react-bootstrap'\nimport { faExclamationCircle } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { scoreToClass, scoreToRiskLevel } from '../wasteAudit/selectors'\n\nvar QuestionReview = ({\n fieldName,\n value,\n children,\n label,\n reviewData,\n decisionData,\n onDecision,\n onCommentChange,\n}) => {\n\n var {\n score,\n response,\n comment,\n action,\n maxScore\n } = reviewData[fieldName] || {}\n\n const decisionOptions = decisionData[fieldName]\n const radioOptions = _.map(decisionOptions, (decision) => ({ value: decision.response, label: decision.response, decision }) )\n\n var defaultValue = value || children || (\n <span>\n <FontAwesomeIcon className=\"text-warning\" icon={faExclamationCircle} />{\" \"}\n Not Answered\n </span>\n );\n\n var isComplete = _.isPresent(response) && _.isPresent(score)\n\n return(\n <div className='question-review'>\n <div className='question-title'>\n <CompleteStatusIcon isComplete={isComplete} />\n <div className='question-text'><strong>{label}</strong></div>\n <div className={`question-score ${scoreToClass(score, maxScore)}`}>\n { _.isPresent(score) ? `${score} / ${maxScore}` : null }\n </div>\n </div>\n <div\n className='p-2 mb-1'\n >\n <div className=\"row\">\n <div className=\"col-lg-4\">\n <div className='ml-5 mt-3'>{defaultValue}</div>\n </div>\n <div className=\"col-lg-8\">\n <div className='p-3'>\n <RadioInput\n name={`${fieldName}Decision`}\n radioClassName='mb-1 p-2'\n selectedValue={response}\n options={radioOptions}\n onSelect={(response) => { onDecision(_.find(decisionOptions,{response}), fieldName, decisionOptions) }}\n />\n </div>\n <div className='p-3'>\n <Action text={action}/>\n </div>\n <div className='p-3'>\n <Comment\n text={comment}\n onChange={(comment) => {\n onCommentChange(comment, fieldName)\n }}\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n\n )\n}\n\n\nQuestionReview.propTypes = {\n fieldName: PropTypes.string.isRequired,\n decisionData: PropTypes.object.isRequired,\n reviewData: PropTypes.object.isRequired,\n onDecision: PropTypes.func.isRequired,\n onCommentChange: PropTypes.func.isRequired,\n};\n\n\n//const mapStateToProps = (state, {}) => {\n //return {\n //}\n//}\n\n//const mapDispatchToProps = (dispatch, {}) => {\n //return {\n //}\n//}\n\n//QuestionReview = connect(\n //mapStateToProps,\n //mapDispatchToProps\n//)(QuestionReview)\n\n\nexport default QuestionReview;\n\n\n\n\n\n\n","import { makeObservation } from '../app/selectors'\n\nconst makeQuestionObservation = (sectionId, fieldName, decision, allOptions) => (dispatch, getState) => {\n\n var args = {\n [fieldName]: makeObservation(decision, allOptions, getState())\n }\n\n dispatch(updateSectionReviewData(sectionId, args))\n\n}\n\nconst makeQuestionComment = (sectionId, fieldName, comment) => (dispatch, getState) => {\n\n var args = {\n [fieldName]: {\n comment\n }\n }\n\n dispatch(updateSectionReviewData(sectionId, args))\n\n}\n\nconst updateSectionReviewData = (sectionId, args) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const firestore = getFirestore()\n\n firestore.set(\n {\n collection: 'waste_audits',\n doc: state.app.wasteAuditDocumentId,\n subcollections: [{ collection: 'sectionReviews', doc: sectionId }],\n },\n args,\n { merge: true }\n ).then(() => {\n dispatch({ type: 'UPDATE SUCCESS' });\n }).catch(err => {\n dispatch({ type: 'UPDATE ERROR' }, err);\n });\n\n}\n\nexport {\n makeQuestionObservation,\n makeQuestionComment\n}\n\n","import React, { useReducer } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport dotProp from \"dot-prop-immutable\";\nimport SectionReview from \"../SectionReview\";\nimport QuestionReview from \"../QuestionReview\";\nimport { mapReviewResult } from '../../app/selectors'\nimport { makeQuestionObservation, makeQuestionComment } from '../../sectionReviews/operations'\n\nconst SECTION_ID = \"general_information\";\nconst TITLE = \"General Information\";\n\nconst d = dotProp;\n\nconst getRequiredFields = () => {\n\n var requiredFields = {\n fullName: true,\n jobTitle: true,\n email: true,\n hasKnowledgeOfEpr507: true,\n hasKnowledgeOfHtm0701: true\n }\n\n return requiredFields\n}\n\n\nconst getReviewResult = (sectionData) => {\n const { title, reviewData, number } = sectionData\n return mapReviewResult(getRequiredFields(sectionData), reviewData, `${number} - ${title}`)\n}\n\nconst ViewOnlyField = ( {\n label,\n value,\n} ) => {\n return(\n <div\n className='mb-1 p-3'\n style={{backgroundColor: 'white'}}\n >\n <div className=\"row\">\n <div className=\"col-xs-4\">\n <div className='mb-4'>{label}</div>\n </div>\n <div className=\"col-xs-8\">\n {value}\n </div>\n </div>\n </div>\n )\n}\n\n\nvar GeneralInformation = ({\n onDecision,\n onCommentChange,\n decisionData,\n sectionData,\n ...rest\n} ) => {\n\n const {\n fullName,\n jobTitle,\n email,\n hasKnowledgeOfHtm0701,\n hasKnowledgeOfEpr507,\n clinicalEmployeeCount,\n clinicallyActiveRoomsCount,\n location,\n reviewData\n } = sectionData;\n\n const questionReviewProps = {\n onDecision,\n reviewData,\n decisionData,\n onCommentChange\n }\n\n return (\n <SectionReview\n sectionId={SECTION_ID}\n title={TITLE}\n >\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n <div className=\"h5 mt-4 mb-3 strong text-white\">\n Practice general information\n </div>\n <ViewOnlyField\n label='Site Name'\n value={location.name}\n />\n <ViewOnlyField\n label='Address'\n value={_(location).pick([\n \"addressLine1\",\n \"addressLine2\",\n \"addressLine3\",\n \"postTown\",\n \"postcode\",\n ])\n .omitBy(_.isBlank).values().join(', ')\n }\n />\n <ViewOnlyField\n label='Clinical Employees'\n value={clinicalEmployeeCount}\n />\n <ViewOnlyField\n label='Clinically active rooms'\n value={clinicallyActiveRoomsCount}\n />\n <div className=\"h5 mt-4 mb-3 strong text-white\">\n Person conducting the Waste Management Audit\n </div>\n <QuestionReview\n fieldName={'fullName'}\n value={fullName}\n label='Full Name'\n {...questionReviewProps}\n />\n <QuestionReview\n fieldName={'jobTitle'}\n value={jobTitle}\n label='Job Title'\n {...questionReviewProps}\n />\n <QuestionReview\n fieldName={'email'}\n value={email}\n label='Email'\n {...questionReviewProps}\n />\n <QuestionReview\n fieldName={'hasKnowledgeOfEpr507'}\n value={hasKnowledgeOfEpr507}\n label='Has working knowledge of Environmental Permitting Regulations 5.07'\n {...questionReviewProps}\n />\n <QuestionReview\n fieldName={'hasKnowledgeOfHtm0701'}\n value={hasKnowledgeOfHtm0701}\n label='Has working knowledge of Health Technical Memorandum 07-01'\n {...questionReviewProps}\n />\n </div>\n\n </div>\n </SectionReview>\n );\n};\n\nGeneralInformation.propTypes = {};\n\nconst mapStateToProps = (state, { wasteAudit }) => {\n return state\n};\n\nconst mapDispatchToProps = (dispatch, { }) => {\n return {\n onDecision: (decision, fieldName, decisionOptions) => {\n dispatch(makeQuestionObservation(SECTION_ID, fieldName, decision, decisionOptions ));\n },\n onCommentChange: (comment, fieldName) => {\n dispatch(makeQuestionComment(SECTION_ID, fieldName, comment ));\n },\n };\n};\n\nGeneralInformation = connect(\n mapStateToProps,\n mapDispatchToProps\n)(GeneralInformation);\n\n//export default GeneralInformation;\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n getReviewResult,\n getRequiredFields,\n Component: GeneralInformation,\n}\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\n//import { connect } from 'react-redux';\n//import classNames from \"classnames\";\nimport { Link } from 'sharedComponents'\n//var {\n//} = actions\n\nfunction truncateFilename(n, len) {\n var ext = n.substring(n.lastIndexOf(\".\") + 1, n.length).toLowerCase();\n var filename = n.replace(\".\" + ext, \"\");\n if (filename.length <= len) {\n return n;\n }\n filename = filename.substr(0, len) + (n.length > len ? \"[...]\" : \"\");\n return filename + \".\" + ext;\n}\n\nvar DocumentView = ( { fieldName, document } ) => {\n\n return(\n <div>\n <Link target=\"_blank\" href={document.url}>\n {truncateFilename(document.metadata.name, 25)}\n </Link>\n </div>\n )\n\n}\n\n//class DocumentView extends React.Component {\n\n //constructor(props) {\n //super(props);\n //this.state = { minimized: true }\n //this.handleToggleMinimized = this.handleToggleMinimized.bind(this)\n //}\n\n //handleToggleMinimized() {\n //this.setState({minimized: !this.state.minimized})\n //}\n\n //render() {\n //const { } = this.props\n //const { minimized } = this.state\n\n //const content = minimized ? null : <div>{\"DocumentView\"}</div>\n\n //return (\n //<div>\n //<span style={{cursor: 'pointer'}} className='pull-right' onClick={this.handleToggleMinimized}>\n //<i className={`fa fa-${ minimized ? 'chevron-down' : 'chevron-up' } text-muted`} style={{ cursor: 'pointer', marginRight: -5, marginLeft: 15 }}></i>\n //</span>\n //{ content }\n //</div>\n //)\n //}\n//}\n\n\nDocumentView.propTypes = {\nfieldName: PropTypes.string.isRequired\n};\n\n\n//const mapStateToProps = (state, {}) => {\n //return {\n //}\n//}\n\n//const mapDispatchToProps = (dispatch, {}) => {\n //return {\n //}\n//}\n\n//DocumentView = connect(\n //mapStateToProps,\n //mapDispatchToProps\n//)(DocumentView)\n\n\nexport default DocumentView;\n\n\n\n\n\n\n","import React, { useReducer } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport dotProp from \"dot-prop-immutable\";\nimport SectionReview from \"../SectionReview\";\nimport QuestionReview from \"../QuestionReview\";\nimport DocumentView from \"../DocumentView\";\nimport { mapReviewResult, getSubmissionDate } from '../../app/selectors'\nimport moment from 'moment.distance'\n\n\nimport {\n makeQuestionObservation,\n makeQuestionComment\n} from '../../sectionReviews/operations'\n\nconst SECTION_ID = \"waste_management_policy\";\nconst TITLE = \"Waste Management Policy\";\n\nconst d = dotProp;\n\nconst getRequiredFields = () => {\n\n var requiredFields = {\n hasWasteManagementPolicy: true,\n policyDocument: true,\n policyOwnerName: true,\n policyLastReviewDate: true,\n }\n\n return requiredFields\n}\n\nconst getReviewResult = (sectionData) => {\n const { title, reviewData, number } = sectionData\n return mapReviewResult(getRequiredFields(sectionData), reviewData, `${number} - ${title}`)\n}\n\nvar WasteManagementPolicy = ({\n onDecision,\n onCommentChange,\n decisionData,\n submittedOn,\n sectionData,\n ...rest\n} ) => {\n\n const {\n hasWasteManagementPolicy,\n policyDocument,\n policyOwnerName,\n policyLastReviewDate,\n reviewData,\n } = sectionData;\n\n const questionReviewProps = {\n onDecision,\n reviewData,\n decisionData,\n onCommentChange\n }\n\n return (\n <SectionReview\n sectionId={SECTION_ID}\n title={TITLE}\n >\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n <QuestionReview\n fieldName={'hasWasteManagementPolicy'}\n value={hasWasteManagementPolicy}\n label='Does your Practice have a Waste Management Policy?'\n {...questionReviewProps}\n />\n <QuestionReview\n fieldName={'policyDocument'}\n label='Please attach a copy'\n {...questionReviewProps}\n >\n { policyDocument && <DocumentView\n fieldName={'policyDocument'}\n document={policyDocument} /> }\n </QuestionReview>\n <QuestionReview\n fieldName={'policyOwnerName'}\n value={policyOwnerName}\n label='Name of the owner'\n {...questionReviewProps}\n />\n <QuestionReview\n fieldName={'policyLastReviewDate'}\n label='Last Review Date'\n {...questionReviewProps}\n >\n {\n policyLastReviewDate ? <React.Fragment>\n <p>{ moment(policyLastReviewDate).format(\"DD/MM/YYYY\")}</p>\n <p>\n {moment.duration(moment(submittedOn).diff(moment(policyLastReviewDate))).distance({includeSeconds: false})} prior to submission\n </p>\n </React.Fragment> : null\n }\n </QuestionReview>\n </div>\n </div>\n </SectionReview>\n );\n};\n\nWasteManagementPolicy.propTypes = {};\n\nconst mapStateToProps = (state, { wasteAudit }) => {\n return {\n submittedOn: getSubmissionDate(state)\n }\n};\n\nconst mapDispatchToProps = (dispatch, { }) => {\n return {\n onDecision: (decision, fieldName, decisionOptions) => {\n dispatch(makeQuestionObservation(SECTION_ID, fieldName, decision, decisionOptions ));\n },\n onCommentChange: (comment, fieldName) => {\n dispatch(makeQuestionComment(SECTION_ID, fieldName, comment ));\n },\n };\n};\n\nWasteManagementPolicy = connect(\n mapStateToProps,\n mapDispatchToProps\n)(WasteManagementPolicy);\n\n//export default GeneralInformation;\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n getReviewResult,\n getRequiredFields,\n Component: WasteManagementPolicy,\n}\n\n\n\n","import React, { useReducer } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport dotProp from \"dot-prop-immutable\";\nimport SectionReview from \"../SectionReview\";\nimport QuestionReview from \"../QuestionReview\";\nimport { Link } from \"sharedComponents\";\nimport DocumentView from \"../DocumentView\";\nimport { mapReviewResult } from '../../app/selectors'\n\nimport {\n makeQuestionObservation,\n makeQuestionComment\n} from '../../sectionReviews/operations'\n\nconst SECTION_ID = \"waste_management_training\";\nconst TITLE = \"Waste Management Training\";\n\nconst d = dotProp;\n\nconst getRequiredFields = () => {\n\n var requiredFields = {\n doesWasteManagementTraining: true,\n hasWasteManagementTrainingRecords: true,\n trainingProvidedTo: true,\n trainingRecordSample: true,\n whenIsTrainingDone: true,\n hasSegregationSignage: true,\n trainingMethod: true,\n }\n\n return requiredFields\n}\n\nconst getReviewResult = (sectionData) => {\n const { title, reviewData, number } = sectionData\n return mapReviewResult(getRequiredFields(sectionData), reviewData, `${number} - ${title}`)\n}\n\nconst getDisplayText = (value, trueText) => {\n return value ? `${trueText}${value !== true ? `, ${value}` : \"\"}` : null;\n};\n\nvar WasteManagementTraining = ({\n onDecision,\n onCommentChange,\n decisionData,\n sectionData,\n ...rest\n} ) => {\n\n const {\n doesWasteManagementTraining,\n hasWasteManagementTrainingRecords,\n trainingProvidedTo,\n trainingRecordSample,\n whenIsTrainingDone,\n hasSegregationSignage,\n trainingMethod,\n reviewData,\n } = sectionData;\n\n const { atInduction, adHoc, regularly } = whenIsTrainingDone || {};\n const { online, group, onToOne } = trainingMethod || {};\n\n const questionReviewProps = {\n onDecision,\n reviewData,\n decisionData,\n onCommentChange\n }\n\n return (\n <SectionReview\n sectionId={SECTION_ID}\n title={TITLE}\n >\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n <QuestionReview\n fieldName={'doesWasteManagementTraining'}\n value={doesWasteManagementTraining}\n label='Does your Practice provide Waste Management Training?'\n {...questionReviewProps}\n />\n <QuestionReview\n fieldName={'trainingProvidedTo'}\n value={trainingProvidedTo}\n label='Who is training provided to?'\n {...questionReviewProps}\n />\n <QuestionReview\n fieldName={'whenIsTrainingDone'}\n label='How often is the training?'\n {...questionReviewProps}\n >\n {\n atInduction || adHoc || regularly ? \n [\n [atInduction, \"At Induction\"],\n [adHoc, \"Ad Hoc\"],\n [regularly, \"Regularly\"],\n ].map((x, index) => (\n <div key={index}>{getDisplayText(...x)}</div>\n )) : null\n }\n </QuestionReview>\n <QuestionReview\n fieldName={'trainingMethod'}\n label='Training format'\n {...questionReviewProps}\n >\n {\n online || group || onToOne ? [\n [online, \"Online\"],\n [group, \"Group\"],\n [onToOne, \"One to one\"],\n ].map((x, index) => (\n <div key={index}>{getDisplayText(...x)}</div>\n )) : null }\n </QuestionReview>\n <QuestionReview\n fieldName={'hasWasteManagementTrainingRecords'}\n value={hasWasteManagementTrainingRecords}\n label='Does the practice keep training records?'\n {...questionReviewProps}\n />\n <QuestionReview\n fieldName={'trainingRecordSample'}\n label='Sample of a Training Record'\n {...questionReviewProps}\n >\n { trainingRecordSample && <DocumentView\n fieldName={'trainingRecordSample'}\n document={trainingRecordSample} /> }\n\n </QuestionReview>\n <QuestionReview\n fieldName={'hasSegregationSignage'}\n value={hasSegregationSignage}\n label='Has segregation signage?'\n {...questionReviewProps}\n />\n </div>\n </div>\n </SectionReview>\n );\n};\n\nWasteManagementTraining.propTypes = {};\n\nconst mapStateToProps = (state, { wasteAudit }) => {\n return state\n};\n\nconst mapDispatchToProps = (dispatch, { }) => {\n return {\n onDecision: (decision, fieldName, decisionOptions) => {\n dispatch(makeQuestionObservation(SECTION_ID, fieldName, decision, decisionOptions ));\n },\n onCommentChange: (comment, fieldName) => {\n dispatch(makeQuestionComment(SECTION_ID, fieldName, comment ));\n },\n };\n};\n\nWasteManagementTraining = connect(\n mapStateToProps,\n mapDispatchToProps\n)(WasteManagementTraining);\n\n//export default GeneralInformation;\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n getReviewResult,\n getRequiredFields,\n Component: WasteManagementTraining,\n}\n\n\n\n","import React, { useReducer } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport dotProp from \"dot-prop-immutable\";\nimport moment from 'moment.distance'\nimport SectionReview from \"../SectionReview\";\nimport QuestionReview from \"../QuestionReview\";\nimport DocumentView from \"../DocumentView\";\nimport { mapReviewResult, getSubmissionDate } from '../../app/selectors'\n\nimport {\n makeQuestionObservation,\n makeQuestionComment\n} from '../../sectionReviews/operations'\n\nconst SECTION_ID = \"hwcn_records\";\nconst TITLE = \"Hazardous Waste Consignment Notes\";\n\nconst d = dotProp;\n\nconst getRequiredFields = () => {\n\n var requiredFields = {\n hasHwcnRecords: true,\n providedByFormat: true,\n recentHwcnDocument: true,\n recentHwcnDocumentDate: true,\n historicHwcnDocument: true,\n historicHwcnDocumentDate: true\n }\n\n return requiredFields\n}\n\nconst getReviewResult = (sectionData) => {\n const { title, reviewData, number } = sectionData\n return mapReviewResult(getRequiredFields(sectionData), reviewData, `${number} - ${title}`)\n}\n\nconst getDisplayText = (value, trueText) => {\n return value ? `${trueText}${value !== true ? `, ${value}` : \"\"}` : null;\n};\n\nvar HazardousWasteConsignmentNotes = ({\n onDecision,\n onCommentChange,\n decisionData,\n sectionData,\n submittedOn,\n ...rest\n} ) => {\n\n const {\n hasHwcnRecords,\n has3YearsHwcnRecords,\n recentHwcnDocument,\n historicHwcnDocument,\n recentHwcnDocumentDate,\n historicHwcnDocumentDate,\n reviewData,\n providedByFormat = {},\n } = sectionData;\n\n const { paper, electronic, anenta } = providedByFormat;\n\n\n const questionReviewProps = {\n onDecision,\n reviewData,\n decisionData,\n onCommentChange\n }\n\n\n\n var m = moment\n\n return (\n <SectionReview\n sectionId={SECTION_ID}\n title={TITLE}\n >\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n\n <QuestionReview\n fieldName={'hasHwcnRecords'}\n value={hasHwcnRecords}\n label=\"Does the site keep records of Hazardous Waste Consignment Notes?\"\n {...questionReviewProps}\n />\n\n <QuestionReview\n fieldName={'providedByFormat'}\n label='Which format are HWCNs provided to you by the waste contractor?'\n {...questionReviewProps}\n >\n {[\n [paper, \"Paper\"],\n [electronic, \"Electronic\", \"sent to \"],\n [anenta, \"Online via Anenta\"],\n ].map((x, index) => (\n <div key={index}>{getDisplayText(...x)}</div>\n ))}\n </QuestionReview>\n\n <QuestionReview\n fieldName={'recentHwcnDocument'}\n label=\"Provide a sample of a recent HWCN\"\n {...questionReviewProps}\n >\n { recentHwcnDocument && <DocumentView\n fieldName={'recentHwcnDocument'}\n document={recentHwcnDocument}\n /> }\n </QuestionReview>\n\n <QuestionReview\n fieldName={'recentHwcnDocumentDate'}\n label=\"Date of the recent HWCN\"\n {...questionReviewProps}\n >\n {\n recentHwcnDocumentDate ? <React.Fragment>\n <p>{ moment(recentHwcnDocumentDate).format(\"DD/MM/YYYY\")}</p>\n <p>\n {moment.duration(moment(submittedOn).diff(moment(recentHwcnDocumentDate))).distance({includeSeconds: false})} prior to submission\n </p>\n </React.Fragment> : null\n }\n </QuestionReview>\n\n <QuestionReview\n fieldName={'historicHwcnDocument'}\n label=\"Sample of HWCN older than 3 years\"\n {...questionReviewProps}\n >\n { historicHwcnDocument && <DocumentView\n fieldName={'historicHwcnDocument'}\n document={historicHwcnDocument}\n /> }\n </QuestionReview>\n\n <QuestionReview\n fieldName={'historicHwcnDocumentDate'}\n label=\"Date of the HWCN older than 3 years\"\n {...questionReviewProps}\n >\n {\n historicHwcnDocumentDate ? <React.Fragment>\n <p>{ moment(historicHwcnDocumentDate).format(\"DD/MM/YYYY\")}</p>\n <p>\n {moment.duration(moment(submittedOn).diff(moment(historicHwcnDocumentDate))).distance({includeSeconds: false})} prior to submission\n </p>\n </React.Fragment> : null\n }\n </QuestionReview>\n </div>\n </div>\n </SectionReview>\n );\n};\n\nHazardousWasteConsignmentNotes.propTypes = {};\n\nconst mapStateToProps = (state, { wasteAudit }) => {\n return {\n submittedOn: getSubmissionDate(state)\n }\n};\n\nconst mapDispatchToProps = (dispatch, { }) => {\n return {\n onDecision: (decision, fieldName, decisionOptions) => {\n dispatch(makeQuestionObservation(SECTION_ID, fieldName, decision, decisionOptions ));\n },\n onCommentChange: (comment, fieldName) => {\n dispatch(makeQuestionComment(SECTION_ID, fieldName, comment ));\n },\n };\n};\n\nHazardousWasteConsignmentNotes = connect(\n mapStateToProps,\n mapDispatchToProps\n)(HazardousWasteConsignmentNotes);\n\n//export default GeneralInformation;\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n getReviewResult,\n getRequiredFields,\n Component: HazardousWasteConsignmentNotes,\n}\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\n//import { connect } from 'react-redux';\n//import classNames from \"classnames\";\n//import { DropdownSelect, DateSelect, ModelErrors, Link } from 'sharedComponents'\n//import actions from '../slice/actions'\n//var {\n//} = actions\nconst MISSING_BIN_IMAGE_URL = \"https://res.cloudinary.com/anenta-ltd/image/upload/v1598996270/waste_audit_examples/200x200_bin_placeholder.png\"\n\nvar ImageView = ( {\n version,\n image,\n className,\n link,\n blankSrc = MISSING_BIN_IMAGE_URL\n} ) => {\n\n var imageUrl = version ? _.get(image, `otherVersions.${version}.url`) : _.get(image, `url`)\n\n\n return(\n <div className={`${className || ''}`}>\n {\n imageUrl ?\n <a\n href={image.url}\n target='_blank'\n >\n <img className='img-responsive' src={imageUrl} />\n </a> :\n <img className='img-responsive' src={blankSrc} />\n }\n </div>\n )\n}\n\n\nImageView.propTypes = {\n version: PropTypes.string,\n image: PropTypes.object,\n};\n\n\n\nexport default ImageView;\n\n\n\n\n\n\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _ from \"lodashExtended\";\nimport { faBan } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nconst BinField = ({\n label,\n value\n}) => {\n\n var renderValue = _.isPresent(value) ? (\n value\n ) : (\n <span>\n <FontAwesomeIcon icon={faBan} /> Not Answered\n </span>\n )\n\n return (\n <div className='mb-2'>\n <strong>{label}</strong>: {renderValue}\n </div>\n );\n};\n\n\nBinField.propTypes = {\n label: PropTypes.node.isRequired,\n value: PropTypes.node,\n};\n\nexport default BinField;\n","import { makeNoScoreObservation } from '../app/selectors'\n\nconst makeQuestionObservation = (binId, fieldName, decision, allOptions) => (dispatch, getState) => {\n var args = {\n [fieldName]: makeNoScoreObservation(decision, allOptions, getState())\n }\n\n dispatch(updateBinReviewData(binId, args))\n}\n\nconst makeBinComment = (binId, comment) => (dispatch, getState) => {\n dispatch(updateBinReviewData(binId, {comment}))\n}\n\nconst makeQuestionComment = (binId, fieldName, comment) => (dispatch, getState) => {\n\n var args = {\n [fieldName]: {\n comment\n }\n }\n dispatch(updateBinReviewData(binId, args))\n\n}\n\n\nconst updateBinReviewData = (binId, args) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const firestore = getFirestore()\n\n firestore.set(\n {\n collection: 'waste_audits',\n doc: state.app.wasteAuditDocumentId,\n subcollections: [{ collection: 'binReviews', doc: binId }],\n },\n args,\n { merge: true }\n ).then(() => {\n dispatch({ type: 'UPDATE SUCCESS' });\n }).catch(err => {\n dispatch({ type: 'UPDATE ERROR' }, err);\n });\n\n}\n\nexport {\n makeQuestionObservation,\n makeQuestionComment,\n makeBinComment\n}\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport { RadioInput } from \"sharedComponents\";\nimport Comment from \"./Comment\";\nimport CompleteStatusIcon from \"./CompleteStatusIcon\";\nimport { Alert } from 'react-bootstrap'\nimport { faExclamationCircle } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { scoreToClass, scoreToRiskLevel } from '../wasteAudit/selectors'\n\nvar NoScoreQuestionReview = ({\n fieldName,\n value,\n children,\n label,\n reviewData,\n decisionData,\n onDecision,\n onCommentChange,\n}) => {\n\n var {\n result,\n response,\n comment,\n } = reviewData[fieldName] || {}\n\n const decisionOptions = decisionData[fieldName]\n const radioOptions = _.map(decisionOptions, (decision) => ({ value: decision.response, label: decision.response, decision }) )\n\n var defaultValue = value || children || (\n <span>\n <FontAwesomeIcon className=\"text-warning\" icon={faExclamationCircle} />{\" \"}\n Not Answered\n </span>\n );\n\n var isComplete = _.isPresent(response) && !_.isNull(result)\n\n return(\n <div className='question-review'>\n <div className='question-title'>\n <CompleteStatusIcon isComplete={isComplete} />\n <div className='question-text'><strong>{label}</strong></div>\n </div>\n <div\n className='p-2 mb-1'\n >\n <div className=\"row\">\n <div className=\"col-lg-4\">\n <div className='ml-5 mt-3'>{defaultValue}</div>\n </div>\n <div className=\"col-lg-8\">\n <div className='p-3'>\n <RadioInput\n radioClassName='mb-1 p-2'\n name={`${fieldName}Decision`}\n selectedValue={response}\n options={radioOptions}\n onSelect={(response) => { onDecision(_.find(decisionOptions,{response}), fieldName, decisionOptions) }}\n />\n </div>\n <div className='p-3'>\n <Comment\n text={comment}\n onChange={(comment) => {\n onCommentChange(comment, fieldName)\n }}\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n\n )\n}\n\n\nNoScoreQuestionReview.propTypes = {\n fieldName: PropTypes.string.isRequired,\n decisionData: PropTypes.object.isRequired,\n reviewData: PropTypes.object.isRequired,\n onDecision: PropTypes.func.isRequired,\n onCommentChange: PropTypes.func.isRequired,\n};\n\n\n//const mapStateToProps = (state, {}) => {\n //return {\n //}\n//}\n\n//const mapDispatchToProps = (dispatch, {}) => {\n //return {\n //}\n//}\n\n//QuestionReview = connect(\n //mapStateToProps,\n //mapDispatchToProps\n//)(QuestionReview)\n\n\nexport default NoScoreQuestionReview;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport { connect } from 'react-redux';\nimport NoScoreQuestionReview from \"./NoScoreQuestionReview\";\nimport ImageView from \"./ImageView\";\nimport { makeQuestionComment, makeQuestionObservation } from '../binReviews/operations'\nimport { useRouteMatch } from \"react-router-dom\";\nimport { hasNoScoreObservation } from '../app/selectors'\n\n//import classNames from \"classnames\";\n//import { DropdownSelect, DateSelect, ModelErrors, Link } from 'sharedComponents'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nconst isComplete = (binData) => {\n return _.every(Object.keys(_.pickBy(getRequiredFields(binData))), (attr) => {\n return hasNoScoreObservation(binData, attr)\n })\n}\nconst getRequiredFields = ({storageType}) => {\n const { labelingRequired, packagingRequired, checkSecurity } = storageType;\n\n var requiredFields = {\n clearlyIdentified: true,\n contentsClearlyShown: true,\n contaminationFound: true,\n clearlyLabelled: !!labelingRequired,\n packagedCorrectly: !!packagingRequired,\n isBinLocked: !!checkSecurity,\n isAreaLocked: !!checkSecurity\n }\n\n return requiredFields\n}\n\nvar BinReview = ( {\n binId,\n decisionData,\n bins,\n onDecision,\n onCommentChange,\n binData\n} ) => {\n\n //let x = useRouteMatch();\n //\n if(binData) {\n\n const {\n name,\n title,\n containerType,\n isBinLocked,\n isAreaLocked,\n storageType,\n exteriorPhoto,\n interiorPhoto,\n contaminantNames,\n hasCorrectLabel,\n reviewData,\n } = binData\n\n const questionReviewProps = {\n onDecision,\n reviewData,\n decisionData,\n onCommentChange\n }\n\n const requiredFields = getRequiredFields(binData)\n\n return(\n <div className=\"mb-3\">\n <div className=\"mb-5\">\n <div className=\"h2 text-white\">\n <div className=\"m-0\">{title}</div>\n </div>\n </div>\n <NoScoreQuestionReview\n fieldName={'clearlyIdentified'}\n label={`Does this photo clearly show a ${name} container?`}\n {...questionReviewProps}\n >\n <ImageView image={exteriorPhoto} />\n </NoScoreQuestionReview>\n { requiredFields['clearlyLabelled'] ? <NoScoreQuestionReview\n fieldName={'clearlyLabelled'}\n label={`Is the ${name} container clearly labeled?`}\n {...questionReviewProps}\n >\n <ImageView image={exteriorPhoto} />\n </NoScoreQuestionReview> : null }\n <NoScoreQuestionReview\n fieldName={'contentsClearlyShown'}\n label={`Does this photo clearly show the contents of the ${name} container?`}\n {...questionReviewProps}\n >\n <ImageView image={interiorPhoto} />\n </NoScoreQuestionReview>\n { requiredFields['isBinLocked'] ? <NoScoreQuestionReview\n fieldName={'isBinLocked'}\n value={isBinLocked}\n label=\"Is the container locked?\"\n {...questionReviewProps}\n /> : null }\n\n { requiredFields['isAreaLocked'] ? <NoScoreQuestionReview\n fieldName={'isAreaLocked'}\n value={isAreaLocked}\n label=\"Is the area locked?\"\n {...questionReviewProps}\n /> : null }\n\n { requiredFields['packagedCorrectly'] ? <NoScoreQuestionReview\n fieldName={'packagedCorrectly'}\n label=\"Does the photo show the waste is packaged correctly?\"\n {...questionReviewProps}\n >\n <ImageView image={interiorPhoto} />\n </NoScoreQuestionReview> : null }\n\n <NoScoreQuestionReview\n fieldName={'contaminationFound'}\n label={`Does the photo show any contamination?`}\n {...questionReviewProps}\n >\n <div className='mb-2'>\n <strong>Contamination identified in Audit:</strong>\n  \n {_.join(contaminantNames, ', ') }\n </div>\n <ImageView image={interiorPhoto} />\n </NoScoreQuestionReview>\n </div>\n )\n\n } else {\n return null\n }\n}\n\n\nBinReview.propTypes = {\n binData: PropTypes.shape({\n id: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n }).isRequired\n};\n\nconst mapStateToProps = (state, { binData }) => {\n return state\n};\n\nconst mapDispatchToProps = (dispatch, { binData }) => {\n return {\n onDecision: (decision, fieldName, decisionOptions) => {\n dispatch(makeQuestionObservation(binData.id, fieldName, decision, decisionOptions ));\n },\n onCommentChange: (comment, fieldName) => dispatch(makeQuestionComment(binData.id, fieldName, comment))\n };\n};\n\nBinReview = connect(\n mapStateToProps,\n mapDispatchToProps\n)(BinReview);\n\n\nexport default BinReview;\n\nexport {\n isComplete,\n getRequiredFields\n}\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport { connect } from 'react-redux';\nimport ImageView from './ImageView'\nimport SummaryField from './SummaryField'\nimport Comment from \"./Comment\";\nimport CompleteStatusIcon from \"./CompleteStatusIcon\";\nimport { makeBinComment } from '../binReviews/operations'\nimport { getRequiredFields } from './BinReview'\n//import classNames from \"classnames\";\n//import { DropdownSelect, DateSelect, ModelErrors, Link } from 'sharedComponents'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar BinSummary = ({\n onReview,\n onCommentChange,\n decisionData,\n binData\n}) => {\n\n const requiredReviewFields = getRequiredFields(binData)\n\n const {\n id,\n name,\n title,\n isComplete,\n isAreaLocked,\n isBinLocked,\n containerType,\n storageType,\n exteriorPhoto,\n interiorPhoto,\n storageAreaDescription,\n contaminantNames,\n hasCorrectLabel,\n reviewData,\n } = binData\n\n\n const { comment } = reviewData\n const { labelingRequired, checkSecurity } = storageType;\n\n return(\n <div className='bin-summary'>\n <div className='bin-summary-heading'>\n <CompleteStatusIcon isComplete={isComplete} />\n <div className='bin-summary-title'><strong>{title}</strong></div>\n <div style={{marginLeft: 'auto'}} onClick={onReview} >Review</div>\n </div>\n <div className=\"row\">\n <div className=\"col-sm-7\">\n <div className='ml-5 mt-3'>\n <div className='mb-5'>\n <div className='bin-summary-subtitle mb-2'>Audit Answers</div>\n { storageAreaDescription ? <SummaryField\n label={\"Description\"}\n value={storageAreaDescription}\n /> : null }\n { labelingRequired ? <SummaryField\n label={\"Has correct label?\"}\n value={hasCorrectLabel}\n /> : null }\n { checkSecurity ? <SummaryField\n label={\"Is area locked?\"}\n value={isAreaLocked}\n /> : null }\n { checkSecurity ? <SummaryField\n label={\"Is container locked?\"}\n value={isBinLocked}\n /> : null }\n <SummaryField\n label={\"Contaminants\"}\n value={_.join(contaminantNames, \", \")}\n />\n </div>\n <div>\n <div className='bin-summary-subtitle mb-2'>Review Response</div>\n { requiredReviewFields['clearlyIdentified'] ? <SummaryField\n label={\"Clearly Identified\"}\n value={_.get(reviewData, 'clearlyIdentified.response')}\n /> : null }\n { requiredReviewFields['contentsClearlyShown'] ? <SummaryField\n label={\"Contents Show\"}\n value={_.get(reviewData, 'contentsClearlyShown.response')}\n /> : null }\n { requiredReviewFields['clearlyLabelled'] ? <SummaryField\n label={\"Labelled Clearly\"}\n value={_.get(reviewData, 'clearlyLabelled.response')}\n /> : null }\n { requiredReviewFields['packagedCorrectly'] ? <SummaryField\n label={\"Packaging\"}\n value={_.get(reviewData, 'packagedCorrectly.response')}\n /> : null }\n { requiredReviewFields['isBinLocked'] ? <SummaryField\n label={\"Bin Locked\"}\n value={_.get(reviewData, 'isBinLocked.response')}\n /> : null }\n { requiredReviewFields['isAreaLocked'] ? <SummaryField\n label={\"Area Locked\"}\n value={_.get(reviewData, 'isAreaLocked.response')}\n /> : null }\n { requiredReviewFields['contaminationFound'] ? <SummaryField\n label={\"Contamination Found\"}\n value={_.get(reviewData, 'contaminationFound.response')}\n /> : null }\n <Comment\n text={comment}\n onChange={onCommentChange}\n />\n </div>\n </div>\n </div>\n <div className=\"col-sm-5\">\n <div className='p-4' style={{display: 'flex', flexWrap: 'wrap'}}>\n <ImageView image={exteriorPhoto} version='thumb' className='mr-2'/>\n <ImageView image={interiorPhoto} version='thumb' />\n </div>\n </div>\n </div>\n </div>\n )\n}\n\n\n\nBinSummary.propTypes = {\n binData: PropTypes.shape({\n name: PropTypes.string.isRequired,\n id: PropTypes.string.isRequired,\n }).isRequired,\n};\n\n\nconst mapStateToProps = (state, props) => {\n return state\n}\n\nconst mapDispatchToProps = (dispatch, { binData }) => {\n return {\n onCommentChange: (comment) => dispatch(makeBinComment(binData.id, comment))\n };\n};\n\nBinSummary = connect(\n mapStateToProps,\n mapDispatchToProps\n)(BinSummary);\n\nexport default BinSummary;\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport { Badge, Panel } from 'react-bootstrap';\nimport Comment from \"./Comment\";\nimport Action from \"./Action\";\nimport CompleteStatusIcon from \"./CompleteStatusIcon\";\nimport { Alert } from 'react-bootstrap'\nimport { faExclamationCircle } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { scoreToClass, scoreToRiskLevel } from '../wasteAudit/selectors'\n\nvar AutoQuestionReview = ({\n fieldName,\n value,\n children,\n label,\n reviewData,\n decisionData,\n onCommentChange,\n}) => {\n\n var {\n score,\n response,\n comment,\n action,\n maxScore\n } = reviewData[fieldName] || {}\n\n const decisionOptions = decisionData[fieldName]\n const radioOptions = _.map(decisionOptions, (decision) => ({ value: decision.response, label: decision.response, decision }) )\n\n var defaultValue = value || children || (\n <span>\n <FontAwesomeIcon className=\"text-warning\" icon={faExclamationCircle} />{\" \"}\n Not Answered\n </span>\n );\n\n var isComplete = _.isPresent(response) && _.isPresent(score)\n\n return(\n <div className='question-review'>\n <div className='question-title'>\n <CompleteStatusIcon isComplete={isComplete} />\n <div className='question-text'><strong>{label}</strong></div>\n <div className={`question-score ${scoreToClass(score, maxScore)}`}>\n { _.isPresent(score) ? `${score} / ${maxScore}` : null }\n </div>\n </div>\n <div\n className='p-2 mb-1'\n >\n <div className=\"row\">\n <div className=\"col-lg-4\">\n <div className='ml-5 mt-3'>{defaultValue}</div>\n </div>\n <div className=\"col-lg-8\">\n <div className='p-3'>\n {response || 'complete above review'}\n </div>\n <div className='p-3'>\n <Action text={action}/>\n </div>\n <div className='p-3'>\n <Comment\n text={comment}\n onChange={(comment) => {\n onCommentChange(comment, fieldName)\n }}\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n\n )\n}\n\n\nAutoQuestionReview.propTypes = {\n fieldName: PropTypes.string.isRequired,\n decisionData: PropTypes.object.isRequired,\n reviewData: PropTypes.object.isRequired,\n onCommentChange: PropTypes.func.isRequired,\n};\n\n\n//const mapStateToProps = (state, {}) => {\n //return {\n //}\n//}\n\n//const mapDispatchToProps = (dispatch, {}) => {\n //return {\n //}\n//}\n\n//QuestionReview = connect(\n //mapStateToProps,\n //mapDispatchToProps\n//)(QuestionReview)\n\n\nexport default AutoQuestionReview;\n\n\n\n\n\n\n","import { makeObservation } from '../app/selectors'\n\nconst makeQuestionObservation = (roomId, fieldName, decision, allOptions) => (dispatch, getState) => {\n\n var args = {\n [fieldName]: makeObservation(decision, allOptions, getState())\n }\n\n dispatch(updateRoomReviewData(roomId, args))\n\n}\n\nconst makeQuestionComment = (roomId, fieldName, comment) => (dispatch, getState) => {\n\n var args = {\n [fieldName]: {\n comment\n }\n }\n\n dispatch(updateRoomReviewData(roomId, args))\n\n}\n\nconst updateRoomReviewData = (roomId, args) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const firestore = getFirestore()\n\n firestore.set(\n {\n collection: 'waste_audits',\n doc: state.app.wasteAuditDocumentId,\n subcollections: [{ collection: 'roomReviews', doc: roomId }],\n },\n args,\n { merge: true }\n ).then(() => {\n dispatch({ type: 'UPDATE SUCCESS' });\n }).catch(err => {\n dispatch({ type: 'UPDATE ERROR' }, err);\n });\n\n}\n\nexport {\n makeQuestionObservation,\n makeQuestionComment\n //makeRoomComment,\n}\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport { connect } from 'react-redux';\nimport BinSummary from './BinSummary'\nimport BinReview from './BinReview'\nimport ImageView from './ImageView'\nimport AutoQuestionReview from './AutoQuestionReview'\nimport { makeQuestionComment, makeQuestionObservation } from '../roomReviews/operations'\nimport { hasNoScoreObservation, hasObservation, getObservationResult } from '../app/selectors'\nimport { ModalRoute } from \"react-router-modal\";\nimport { useHistory, useRouteMatch, Route, Switch, Redirect } from \"react-router-dom\";\nimport { mapReviewResult } from '../app/selectors'\nimport {\n getSectionTitle,\n getSectionNumber,\n} from '../components/sectionReviews'\n\nconst isComplete = (roomData) => {\n return _.every(Object.keys(_.pickBy(getRequiredFields(roomData))), (attr) => {\n return hasObservation(roomData, attr)\n })\n}\n\nconst getRequiredFields = () => {\n\n var requiredFields = {\n hasClinicalBins: true,\n hasNonClinicalBins: true,\n allRequiredContainersLabeled: true,\n contaminationFound: true\n }\n\n return requiredFields\n}\n\n\nconst getReviewResult = (roomData) => {\n const { reviewData, title, sectionId } = roomData\n return mapReviewResult(getRequiredFields(roomData), reviewData, `${getSectionNumber(sectionId)} - ${getSectionTitle(sectionId)} | ${title}`)\n}\n\nconst getCalculatedFields = (roomData, state) => {\n\n var x = {\n hasClinicalBins: ({bins}) => {\n const clinicalBins = _.filter(bins, (bin) => _.get(bin, 'containerType.wasteStreamId') == 'clinical')\n const allBinsWithResult = _.every(clinicalBins, (bin) => hasNoScoreObservation(bin, 'clearlyIdentified') )\n\n if(allBinsWithResult) {\n const clearlyIdentified = _.filter(clinicalBins, (bin) => getObservationResult(bin, 'clearlyIdentified') )\n return { clinicalBins, clearlyIdentified }\n }\n\n },\n hasNonClinicalBins: ({bins}) => {\n const nonClinicalBins = _.filter(bins, (bin) => _.get(bin, 'containerType.wasteStreamId') != 'clinical')\n const allBinsWithResult = _.every(nonClinicalBins, (bin) => hasNoScoreObservation(bin, 'clearlyIdentified') )\n\n if(allBinsWithResult) {\n const clearlyIdentified = _.filter(nonClinicalBins, (bin) => getObservationResult(bin, 'clearlyIdentified') )\n return { nonClinicalBins, clearlyIdentified }\n }\n },\n allRequiredContainersLabeled: ({bins}) => {\n const withLabelingRequired = _.filter(bins, (bin) => _.get(bin, 'storageType.labelingRequired'))\n const allBinsWithResult = _.every(withLabelingRequired, (bin) => hasNoScoreObservation(bin, 'clearlyLabelled') )\n if(allBinsWithResult) {\n const withClearLabels = _.filter(withLabelingRequired, (bin) => getObservationResult(bin, 'clearlyLabelled'))\n return { withLabelingRequired, withClearLabels }\n }\n },\n contaminationFound: ({bins}) => {\n const allBinsWithResult = _.every(bins, (bin) => hasNoScoreObservation(bin, 'contaminationFound') && hasNoScoreObservation(bin, 'contentsClearlyShown') )\n if(allBinsWithResult) {\n const withContamination = _.filter(bins, (bin) => _.isInteger(getObservationResult(bin, 'contaminationFound')) )\n const highestRiskLevel = _(withContamination).map((bin) => getObservationResult(bin, 'contaminationFound')).max()\n const cannotAssesContamination = _.filter(bins, (bin) => getObservationResult(bin, 'contaminationFound') === 'cannot_assess' )\n const contaminationAssessed = _.filter(bins, (bin) => getObservationResult(bin, 'contaminationFound') != 'cannot_assess' )\n const noContamination = _.filter(bins, (bin) => getObservationResult(bin, 'contaminationFound') === 'none' )\n return { withContamination, highestRiskLevel, noContamination, cannotAssesContamination, contaminationAssessed }\n }\n\n }\n }\n\n if(roomData.notAudited) {\n return _.mapValues(x, (f) => ({roomNotAudited: true}));\n } else {\n return _.mapValues(x, (f) => f(roomData, state) );\n }\n\n}\n\n\nvar RoomReview = ({\n roomData,\n decisionData,\n number,\n onDecision,\n onCommentChange\n}) => {\n\n const {\n name,\n notAudited,\n type,\n reviewData,\n bins,\n title,\n numberedTitle,\n hasClinicalBins,\n hasNonClinicalBins,\n contaminationFound,\n allRequiredContainersLabeled,\n } = roomData\n\n var history = useHistory()\n let { url } = useRouteMatch();\n\n\n const questionReviewProps = {\n onDecision,\n reviewData,\n decisionData: decisionData.rooms,\n onCommentChange\n }\n\n return (\n <Switch>\n <Route\n path={`${url}/bins/:binId`}\n render={ ({match}) => {\n const binData = _.find(bins, {id: match.params.binId})\n return(binData ?\n <BinReview\n decisionData={decisionData.bins}\n binData={binData}\n /> : <Redirect to={url}/>)\n }}\n />\n <Route path={url} exact>\n <div className=\"mb-3\">\n <div className=\"mb-5\">\n <div className=\"h2 text-white\">\n <div className=\"m-0\">{numberedTitle}</div>\n </div>\n {\n _.map(bins, (bin) => {\n return <BinSummary\n key={bin.id}\n decisionData={decisionData.bins}\n onReview={() => history.push(`${url}/bins/${bin.id}`) }\n binData={bin}\n />\n })\n }\n\n <AutoQuestionReview\n fieldName={'hasClinicalBins'}\n label={`Does the room contain enough clinical containers?`}\n {...questionReviewProps}\n >\n {\n _.isPresent(_.get(hasClinicalBins, 'clearlyIdentified')) ?\n <div style={{display: 'flex', flexWrap: 'wrap'}}>\n { _.map(_.get(hasClinicalBins, 'clearlyIdentified'), ({exteriorPhoto, id}) => <ImageView key={id} image={exteriorPhoto} version='thumb' className='mr-1'/> ) }\n </div> : notAudited ? null : 'None'\n }\n </AutoQuestionReview>\n <AutoQuestionReview\n fieldName={'hasNonClinicalBins'}\n label={`Does the room contain enough non clinical containers?`}\n {...questionReviewProps}\n >\n {\n _.isPresent(_.get(hasNonClinicalBins, 'clearlyIdentified')) ?\n <div style={{display: 'flex', flexWrap: 'wrap'}}>\n { _.map(_.get(hasNonClinicalBins, 'clearlyIdentified'), ({exteriorPhoto, id}) => <ImageView key={id} image={exteriorPhoto} version='thumb' className='mr-1'/> ) }\n </div> : notAudited ? null : 'None'\n }\n </AutoQuestionReview>\n <AutoQuestionReview\n fieldName={'allRequiredContainersLabeled'}\n label={`Are all clinical bins labeled?`}\n {...questionReviewProps}\n >\n { allRequiredContainersLabeled && !notAudited?\n (_.isPresent(allRequiredContainersLabeled.withLabelingRequired) ?\n <div>\n {allRequiredContainersLabeled.withClearLabels.length} / {allRequiredContainersLabeled.withLabelingRequired.length} clearly labeled\n </div>\n : 'No containment with requirement to audit' ) : null\n }\n </AutoQuestionReview>\n <AutoQuestionReview\n fieldName={'contaminationFound'}\n label={`Has any contamination been found?`}\n {...questionReviewProps}\n >\n {\n contaminationFound && !notAudited ? <ContaminationAnswer contaminationFound={contaminationFound}/> : null\n }\n\n </AutoQuestionReview>\n </div>\n </div>\n </Route>\n </Switch>\n );\n}\n\n\nvar ContaminationAnswer = ({contaminationFound}) => {\n if(contaminationFound) {\n const {\n withContamination,\n highestRiskLevel,\n noContamination,\n cannotAssesContamination,\n contaminationAssessed\n } = contaminationFound\n\n\n var assesedBins = _.isPresent(contaminationAssessed) ?\n <div>\n {noContamination.length} / {contaminationAssessed.length} container{noContamination.length > 1 ? 's' : ''} without contamination\n </div> : null\n\n var notAssesedBins = _.isPresent(contaminationFound.cannotAssesContamination) ?\n <div>\n {cannotAssesContamination.length} container{cannotAssesContamination.length > 1 ? 's' : ''} with insufficient information\n </div> : null\n\n var noBins = !(notAssesedBins || assesedBins) ?\n <div>\n No containment was audited\n </div> : null\n\n return(\n <div>\n {assesedBins}\n {notAssesedBins}\n {noBins}\n </div>\n )\n\n } else {\n return null\n }\n\n}\n\n\nconst mapStateToProps = (state, {}) => {\n return {\n }\n}\n\nconst mapDispatchToProps = (dispatch, {roomData}) => {\n return {\n onCommentChange: (comment, fieldName) => {\n dispatch(makeQuestionComment(roomData.id, fieldName, comment ));\n },\n onDecision: (decision, fieldName, decisionOptions) => {\n dispatch(makeQuestionObservation(roomData.id, fieldName, decision, decisionOptions ));\n },\n }\n}\n\nRoomReview = connect(\n mapStateToProps,\n mapDispatchToProps\n)(RoomReview)\n\nexport default RoomReview;\n\nexport {\n isComplete,\n getRequiredFields,\n getCalculatedFields,\n getReviewResult\n}\n\n\n\n\n\n","import React, { useReducer } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport dotProp from \"dot-prop-immutable\";\nimport SectionReview from \"../SectionReview\";\nimport QuestionReview from \"../QuestionReview\";\nimport DocumentView from \"../DocumentView\";\nimport CompleteStatusIcon from \"../CompleteStatusIcon\";\nimport RoomReview, {\n isComplete as isRoomComplete,\n} from \"../RoomReview\";\nimport { ModalRoute } from \"react-router-modal\";\nimport { useRouteMatch, Redirect, Switch, Route, useHistory } from \"react-router-dom\";\nimport { sumReviewResults } from '../../app/selectors'\nimport {\n makeQuestionObservation,\n makeQuestionComment\n} from '../../sectionReviews/operations'\nimport Chip from '@material-ui/core/Chip';\n\nconst SECTION_ID = \"internal_waste_containment\";\nconst TITLE = \"Internal Waste Containment\";\n\nconst d = dotProp;\n\nconst isComplete = (sectionData) => {\n return _.every(sectionData.rooms, (roomData) => isRoomComplete(roomData) )\n}\n\nconst getReviewResult = ({rooms}) => {\n return sumReviewResults(_.map(rooms, 'reviewResult'))\n}\n\nconst getRequiredFields = () => {\n\n var requiredFields = {\n }\n\n return requiredFields\n}\n\n\nvar InternalWasteContainment = ({\n onDecision,\n onCommentChange,\n decisionData,\n sectionData,\n ...rest\n} ) => {\n\n let { url } = useRouteMatch();\n\n const {\n rooms,\n reviewData,\n } = sectionData;\n\n const questionReviewProps = {\n onDecision,\n reviewData,\n decisionData,\n onCommentChange\n }\n\n let roomRoutePath = `${url}/rooms/:roomId`\n\n let match = useRouteMatch(roomRoutePath)\n let selectedRoomId = _.get(match, 'params.roomId')\n let history = useHistory();\n\n let selectedRoom = _.find(rooms, {id: selectedRoomId})\n\n return (\n <SectionReview\n sectionId={SECTION_ID}\n title={TITLE}\n >\n <ul className='room-nav'>\n {\n _.map(rooms, (room, index) => {\n\n const roomSelected = selectedRoomId == room.id\n\n return(\n <li key={room.id}>\n <Chip\n variant={ roomSelected ? 'default' : 'outlined' }\n label={room.numberedTitle}\n style={\n {\n fontSize: '1.1em',\n color: 'white',\n }\n }\n onClick={ () => history.push(`${url}/rooms/${room.id}`) }\n icon={<CompleteStatusIcon isComplete={room.isComplete}/>}\n color=\"primary\"\n />\n </li>\n )\n })}\n </ul>\n\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n <Switch>\n {\n selectedRoom ? <Route path={roomRoutePath}>\n <RoomReview\n roomData={selectedRoom}\n decisionData={decisionData}\n />\n </Route> : null\n }\n <Redirect to={`${url}/rooms/${rooms[0].id}`} />\n </Switch>\n </div>\n </div>\n </SectionReview>\n );\n};\n\nInternalWasteContainment.propTypes = {};\n\nconst mapStateToProps = (state, { }) => {\n return state\n};\n\nconst mapDispatchToProps = (dispatch, { }) => {\n return {\n onDecision: (decision, fieldName, decisionOptions) => {\n dispatch(makeQuestionObservation(SECTION_ID, fieldName, decision, decisionOptions ));\n },\n onCommentChange: (comment, fieldName) => {\n dispatch(makeQuestionComment(SECTION_ID, fieldName, comment ));\n },\n };\n};\n\nInternalWasteContainment = connect(\n mapStateToProps,\n mapDispatchToProps\n)(InternalWasteContainment);\n\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n isComplete,\n getReviewResult,\n getRequiredFields,\n Component: InternalWasteContainment,\n}\n\n\n\n","import { makeNoScoreObservation } from '../app/selectors'\n\nconst makeQuestionObservation = (bulkContainmentId, fieldName, decision, allOptions) => (dispatch, getState) => {\n\n var args = {\n [fieldName]: makeNoScoreObservation(decision, allOptions, getState())\n }\n\n dispatch(updateBulkContainmentReviewData(bulkContainmentId, args))\n\n}\n\nconst makeQuestionComment = (bulkContainmentId, fieldName, comment) => (dispatch, getState) => {\n\n var args = {\n [fieldName]: {\n comment\n }\n }\n dispatch(updateBulkContainmentReviewData(bulkContainmentId, args))\n\n}\n\nconst makeBulkContainmentComment = (bulkContainmentId, comment) => (dispatch, getState) => {\n\n dispatch(updateBulkContainmentReviewData(bulkContainmentId, {comment}))\n\n}\n\n\nconst updateBulkContainmentReviewData = (bulkContainmentId, args) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const firestore = getFirestore()\n\n firestore.set(\n {\n collection: 'waste_audits',\n doc: state.app.wasteAuditDocumentId,\n subcollections: [{ collection: 'bulkContainmentReviews', doc: bulkContainmentId }],\n },\n args,\n { merge: true }\n ).then((x) => {\n dispatch({ type: 'UPDATE SUCCESS' });\n }).catch(err => {\n dispatch({ type: 'UPDATE ERROR' }, err);\n });\n\n}\n\nexport {\n makeQuestionObservation,\n makeQuestionComment,\n makeBulkContainmentComment\n}\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport { connect } from 'react-redux';\nimport NoScoreQuestionReview from \"./NoScoreQuestionReview\";\nimport ImageView from \"./ImageView\";\nimport { hasNoScoreObservation } from '../app/selectors'\nimport { makeQuestionComment, makeQuestionObservation } from '../bulkContainmentReviews/operations'\nimport { useRouteMatch } from \"react-router-dom\";\n\nconst isComplete = (bulkContainmentData) => {\n return _.every(Object.keys(_.pickBy(getRequiredFields(bulkContainmentData))), (attr) => {\n return hasNoScoreObservation(bulkContainmentData, attr)\n })\n}\n\nconst getRequiredFields = ({id, reviewData, storageType}) => {\n const { checkSecurity, packagingRequired } = storageType;\n\n var requiredFields = {\n clearlyIdentified: true,\n contaminationFound: true,\n isPubliclyAccessible: !!checkSecurity,\n isAreaLocked: !!checkSecurity,\n packagedCorrectly: !!packagingRequired\n }\n\n return requiredFields\n}\n\nvar BulkContainmentReview = ( {\n bulkContainmentId,\n decisionData,\n bulkContainments,\n onDecision,\n onCommentChange,\n bulkContainmentData\n} ) => {\n\n //let x = useRouteMatch();\n\n const {\n name,\n title,\n storageType,\n bulkStorageAreaPhoto,\n isPubliclyAccessible,\n isAreaLocked,\n contaminantNames,\n reviewData,\n } = bulkContainmentData\n\n const questionReviewProps = {\n onDecision,\n reviewData,\n decisionData,\n onCommentChange\n }\n\n const requiredFields = getRequiredFields(bulkContainmentData)\n\n return(\n <div className=\"mb-3\">\n <div className=\"mb-5\">\n <div className=\"h2 text-white\">\n <div className=\"m-0\">{title}</div>\n </div>\n </div>\n <NoScoreQuestionReview\n fieldName={'clearlyIdentified'}\n label=\"Does the photo show the storage area clearly?\"\n {...questionReviewProps}\n >\n <ImageView image={bulkStorageAreaPhoto} />\n </NoScoreQuestionReview>\n\n { requiredFields['isPubliclyAccessible'] ? <NoScoreQuestionReview\n fieldName={'isPubliclyAccessible'}\n value={isPubliclyAccessible}\n label=\"Is the area accessible to the public?\"\n {...questionReviewProps}\n /> : null }\n\n { requiredFields['isAreaLocked'] ? <NoScoreQuestionReview\n fieldName={'isAreaLocked'}\n value={isAreaLocked}\n label=\"Is the area locked?\"\n {...questionReviewProps}\n /> : null }\n\n { requiredFields['packagedCorrectly'] ? <NoScoreQuestionReview\n fieldName={'packagedCorrectly'}\n label=\"Does the photo show the waste is packaged correctly?\"\n {...questionReviewProps}\n >\n <ImageView image={bulkStorageAreaPhoto} />\n </NoScoreQuestionReview> : null }\n\n <NoScoreQuestionReview\n fieldName={'contaminationFound'}\n label=\"Does the photo show any contamination?\"\n {...questionReviewProps}\n >\n <div className='mb-2'>\n <strong>Contamination identified in Audit:</strong>\n  \n {_.join(contaminantNames, ', ') }\n </div>\n <ImageView image={bulkStorageAreaPhoto} />\n </NoScoreQuestionReview>\n </div>\n )\n}\n\n\nBulkContainmentReview.propTypes = {\n bulkContainmentData: PropTypes.shape({\n id: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n }).isRequired\n};\n\nconst mapStateToProps = (state, { }) => {\n return state\n};\n\nconst mapDispatchToProps = (dispatch, { bulkContainmentData }) => {\n return {\n onDecision: (decision, fieldName, decisionOptions) => {\n dispatch(makeQuestionObservation(bulkContainmentData.id, fieldName, decision, decisionOptions ));\n },\n onCommentChange: (comment, fieldName) => dispatch(makeQuestionComment(bulkContainmentData.id, fieldName, comment))\n };\n};\n\nBulkContainmentReview = connect(\n mapStateToProps,\n mapDispatchToProps\n)(BulkContainmentReview);\n\n\nexport default BulkContainmentReview;\n\nexport {\n isComplete,\n getRequiredFields\n}\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport { connect } from 'react-redux';\nimport ImageView from './ImageView'\nimport SummaryField from './SummaryField'\nimport Comment from \"./Comment\";\nimport CompleteStatusIcon from \"./CompleteStatusIcon\";\nimport { makeBulkContainmentComment } from '../bulkContainmentReviews/operations'\nimport { getRequiredFields } from './BulkContainmentReview'\n\n//import classNames from \"classnames\";\n//import { DropdownSelect, DateSelect, ModelErrors, Link } from 'sharedComponents'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\n\nvar BulkContainmentSummary = ({\n onReview,\n onCommentChange,\n decisionData,\n bulkContainmentData\n}) => {\n\n const requiredReviewFields = getRequiredFields(bulkContainmentData)\n\n const {\n name,\n title,\n isComplete,\n storageType,\n storageAreaDescription,\n isPubliclyAccessible,\n isAreaLocked,\n bulkStorageAreaPhoto,\n contaminantNames,\n reviewData,\n } = bulkContainmentData\n\n const { checkSecurity } = storageType;\n\n\n const { comment } = reviewData\n\n return(\n <div\n className='mb-1 p-4'\n style={{\n backgroundColor: 'white',\n borderRadius: '4px'\n }}>\n <div className='mb-3'>\n <span className='pull-right' onClick={onReview}>Review</span>\n <CompleteStatusIcon isComplete={isComplete} />\n <span className='h4 ml-2'>{title}</span>\n </div>\n <div className=\"row\">\n <div className=\"col-sm-7\">\n <div className='ml-5 mt-3'>\n <div className='mb-5'>\n <div className='bin-summary-subtitle mb-2'>Audit Answers</div>\n <SummaryField\n label={\"Description\"}\n value={storageAreaDescription}\n />\n { checkSecurity ? <SummaryField\n label={\"Is area locked?\"}\n value={isAreaLocked}\n /> : null }\n { checkSecurity ? <SummaryField\n label={\"Accessible to Public\"}\n value={isPubliclyAccessible}\n /> : null }\n </div>\n <div>\n <div className='bin-summary-subtitle mb-2'>Review Response</div>\n { requiredReviewFields['clearlyIdentified'] ? <SummaryField\n label={\"Clearly Identified\"}\n value={_.get(reviewData, 'clearlyIdentified.response')}\n /> : null }\n { requiredReviewFields['packagedCorrectly'] ? <SummaryField\n label={\"Packaging\"}\n value={_.get(reviewData, 'packagedCorrectly.response')}\n /> : null }\n { requiredReviewFields['isPubliclyAccessible'] ? <SummaryField\n label={\"Is Public Locked\"}\n value={_.get(reviewData, 'isPubliclyAccessible.response')}\n /> : null }\n { requiredReviewFields['isAreaLocked'] ? <SummaryField\n label={\"Area Locked\"}\n value={_.get(reviewData, 'isAreaLocked.response')}\n /> : null }\n { requiredReviewFields['contaminationFound'] ? <SummaryField\n label={\"Contamination Found\"}\n value={_.get(reviewData, 'contaminationFound.response')}\n /> : null }\n </div>\n <Comment\n text={comment}\n onChange={onCommentChange}\n />\n </div>\n </div>\n <div className=\"col-sm-5\">\n <div style={{display: 'flex', flexWrap: 'wrap'}}>\n <ImageView image={bulkStorageAreaPhoto} version='thumb' className='mr-2'/>\n </div>\n </div>\n </div>\n </div>\n )\n}\n\n\n\nBulkContainmentSummary.propTypes = {\n bulkContainmentData: PropTypes.shape({\n name: PropTypes.string.isRequired,\n id: PropTypes.string.isRequired,\n }).isRequired,\n};\n\n\nconst mapStateToProps = (state, props) => {\n return state\n}\n\nconst mapDispatchToProps = (dispatch, { bulkContainmentData }) => {\n return {\n onCommentChange: (comment) => dispatch(makeBulkContainmentComment(bulkContainmentData.id, comment))\n };\n};\n\nBulkContainmentSummary = connect(\n mapStateToProps,\n mapDispatchToProps\n)(BulkContainmentSummary);\n\nexport default BulkContainmentSummary;\n\n","import { makeObservation } from '../app/selectors'\n\nconst makeQuestionObservation = (wasteStreamId, fieldName, decision, allOptions) => (dispatch, getState) => {\n\n var args = {\n [fieldName]: makeObservation(decision, allOptions, getState())\n }\n\n dispatch(updateWasteStreamReviewData(wasteStreamId, args))\n\n}\n\nconst makeQuestionComment = (wasteStreamId, fieldName, comment) => (dispatch, getState) => {\n\n var args = {\n [fieldName]: {\n comment\n }\n }\n\n dispatch(updateWasteStreamReviewData(wasteStreamId, args))\n\n}\n\nconst updateWasteStreamReviewData = (wasteStreamId, args) => (dispatch, getState, { getFirebase, getFirestore}) => {\n const state = getState()\n const firestore = getFirestore()\n\n firestore.set(\n {\n collection: 'waste_audits',\n doc: state.app.wasteAuditDocumentId,\n subcollections: [{ collection: 'wasteStreamReviews', doc: wasteStreamId }],\n },\n args,\n { merge: true }\n ).then(() => {\n dispatch({ type: 'UPDATE SUCCESS' });\n }).catch(err => {\n dispatch({ type: 'UPDATE ERROR' }, err);\n });\n\n}\n\nexport {\n makeQuestionObservation,\n makeQuestionComment\n //makeWasteStreamComment,\n}\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport { connect } from 'react-redux';\nimport BinReview from './BinReview'\nimport BulkContainmentReview from './BulkContainmentReview'\nimport BinSummary from './BinSummary'\nimport ImageView from './ImageView'\nimport BulkContainmentSummary from './BulkContainmentSummary'\nimport AutoQuestionReview from './AutoQuestionReview'\nimport { makeQuestionComment } from '../wasteStreamReviews/operations'\nimport { ModalRoute } from \"react-router-modal\";\nimport { useHistory, useRouteMatch, Switch, Route, Redirect } from \"react-router-dom\";\nimport { hasNoScoreObservation, hasObservation, getObservationResult } from '../app/selectors'\nimport { mapReviewResult } from '../app/selectors'\nimport {\n getSectionTitle,\n getSectionNumber,\n} from '../components/sectionReviews'\n\nconst isComplete = (wasteStreamData) => {\n return _.every(Object.keys(_.pickBy(getRequiredFields(wasteStreamData))), (attr) => {\n return hasObservation(wasteStreamData, attr)\n })\n}\n\nconst getRequiredFields = ({storageType}) => {\n const { checkSecurity, packagingRequired } = storageType;\n\n var requiredFields = {\n hasStorage: true,\n contaminationFound: true,\n storedSecurely: !!checkSecurity,\n packagedCorrectly: !!packagingRequired\n }\n\n return requiredFields\n}\n\nconst getReviewResult = (wasteStreamData) => {\n const { reviewData, title, sectionId } = wasteStreamData\n return mapReviewResult(getRequiredFields(wasteStreamData), reviewData, `${getSectionNumber(sectionId)} - ${getSectionTitle(sectionId)} | ${title}`)\n}\n\nconst combineContainment = (bins,bulkContainments ) => _([bins,bulkContainments]).flatten().value()\n\nconst getCalculatedFields = (wasteStreamData, state) => {\n\n var x = {\n hasStorage: ({bins, bulkContainments}) => {\n var allContainments = combineContainment(bins, bulkContainments)\n const allWithResult = _.every(allContainments, (containment) => hasNoScoreObservation(containment, 'clearlyIdentified') )\n\n if(allWithResult) {\n const clearlyIdentified = _.filter(allContainments, (containment) => getObservationResult(containment, 'clearlyIdentified') )\n return { allContainments, clearlyIdentified }\n }\n\n },\n storedSecurely: ({bins, bulkContainments}) => {\n const binsWithSecurityRequired = _.filter(bins, (bin) => _.get(bin, 'storageType.checkSecurity'))\n const bulkContainmentsWithSecurityRequired = _.filter(bulkContainments, (bulkContainment) => _.get(bulkContainment, 'storageType.checkSecurity'))\n\n const allBinsWithResult = _.every(binsWithSecurityRequired, (bin) => hasNoScoreObservation(bin, 'isBinLocked') && hasNoScoreObservation(bin, 'isAreaLocked') )\n const allBulkContainmentsWithResult = _.every(bulkContainmentsWithSecurityRequired, (bin) => hasNoScoreObservation(bin, 'isPubliclyAccessible') && hasNoScoreObservation(bin, 'isAreaLocked') )\n\n if(allBinsWithResult && allBulkContainmentsWithResult) {\n const secureBins = _.filter(binsWithSecurityRequired, (bin) => getObservationResult(bin, 'isBinLocked') && getObservationResult(bin, 'isAreaLocked') )\n const notSecureBins = _.reject(binsWithSecurityRequired, (bin) => getObservationResult(bin, 'isBinLocked') && getObservationResult(bin, 'isAreaLocked') )\n\n const secureBulkContainments = _.filter(bulkContainmentsWithSecurityRequired, (bulkContainment) => getObservationResult(bulkContainment, 'isPubliclyAccessible') && getObservationResult(bulkContainment, 'isAreaLocked') )\n const notSecureBulkContainments = _.reject(bulkContainmentsWithSecurityRequired, (bulkContainment) => getObservationResult(bulkContainment, 'isPubliclyAccessible') && getObservationResult(bulkContainment, 'isAreaLocked') )\n\n return {\n secureContainment: [...secureBins, ...secureBulkContainments],\n notSecureContainment: [...notSecureBins, ...notSecureBulkContainments],\n containmentWithSecurityRequired: [...binsWithSecurityRequired, ...bulkContainmentsWithSecurityRequired]\n }\n }\n },\n packagedCorrectly: ({bins, bulkContainments}) => {\n var allContainments = combineContainment(bins, bulkContainments)\n const withPackagingRequired = _.filter(allContainments, (containment) => _.get(containment, 'storageType.packagingRequired'))\n const allWithResult = _.every(withPackagingRequired, (containment) => hasNoScoreObservation(containment, 'packagedCorrectly') )\n if(allWithResult) {\n const withCorrectPackaging = _.filter(withPackagingRequired, (containment) => getObservationResult(containment, 'packagedCorrectly'))\n const withoutCorrectPackaging = _.reject(withPackagingRequired, (containment) => getObservationResult(containment, 'packagedCorrectly'))\n return { withPackagingRequired, withCorrectPackaging, withoutCorrectPackaging }\n }\n },\n contaminationFound: ({bins, bulkContainments}) => {\n var allContainments = combineContainment(bins, bulkContainments)\n\n const allContainmentWithResult = _.every(allContainments, (containment) => hasNoScoreObservation(containment, 'contaminationFound') )\n if(allContainmentWithResult) {\n const withContamination = _.filter(allContainments, (containment) => _.isInteger(getObservationResult(containment, 'contaminationFound')) )\n const highestRiskLevel = _(withContamination).map((containment) => getObservationResult(containment, 'contaminationFound')).max()\n const cannotAssesContamination = _.filter(allContainments, (containment) => getObservationResult(containment, 'contaminationFound') === 'cannot_assess' )\n const contaminationAssessed = _.filter(allContainments, (containment) => getObservationResult(containment, 'contaminationFound') != 'cannot_assess' )\n const noContamination = _.filter(allContainments, (containment) => getObservationResult(containment, 'contaminationFound') === 'none' )\n return { withContamination, highestRiskLevel, noContamination, cannotAssesContamination, contaminationAssessed }\n }\n }\n }\n\n return _.mapValues(x, (f) => f(wasteStreamData, state) );\n}\n\n\n\nvar WasteStreamReview = ({\n wasteStreamData,\n decisionData,\n onBinCommentChange,\n onDecision,\n onCommentChange\n}) => {\n\n const {\n name,\n title,\n type,\n reviewData,\n bins,\n hasStorage,\n storedSecurely,\n packagedCorrectly,\n contaminationFound,\n bulkContainments,\n } = wasteStreamData\n\n var history = useHistory()\n let { url } = useRouteMatch();\n\n const questionReviewProps = {\n onDecision,\n reviewData,\n decisionData: decisionData.wasteStreams,\n onCommentChange\n }\n\n const requiredFields = getRequiredFields(wasteStreamData)\n\n return (\n <Switch>\n <Route\n path={`${url}/bins/:binId`}\n render={ ({match}) => {\n const binData = _.find(bins, {id: match.params.binId})\n return(binData ?\n <BinReview\n decisionData={decisionData.bins}\n binData={binData}\n /> : <Redirect to={url}/>)\n }}\n />\n <Route\n path={`${url}/bulkContainments/:bulkContainmentId`}\n render={ ({match}) => {\n const bulkContainmentData = _.find(bulkContainments, {id: match.params.bulkContainmentId})\n return(bulkContainmentData ?\n <BulkContainmentReview\n decisionData={decisionData.bulkContainments}\n bulkContainmentData={bulkContainmentData}\n /> : <Redirect to={url}/>)\n }}\n />\n <Route path={url} exact>\n <div className=\"mb-3\">\n <div className=\"mb-5\">\n <div className=\"h2 text-white\">\n <div className=\"m-0\">{name} Storage</div>\n </div>\n {\n _.map(bins, (bin) => {\n return <BinSummary\n key={bin.id}\n decisionData={decisionData.bins}\n onReview={() => history.push(`${url}/bins/${bin.id}/review`) }\n binData={bin}\n />\n })\n }\n {\n _.map(bulkContainments, (bulkContainment) => {\n return <BulkContainmentSummary\n key={bulkContainment.id}\n decisionData={decisionData.bulkContainments}\n onReview={() => history.push(`${url}/bulkContainments/${bulkContainment.id}/review`) }\n bulkContainmentData={bulkContainment}\n />\n })\n }\n <div className=\"h2 text-white\">\n <div className=\"m-0\">{title}</div>\n </div>\n {\n requiredFields['hasStorage'] ?\n <AutoQuestionReview\n fieldName={'hasStorage'}\n label={`Does the location have bulk storage for ${name}?`}\n {...questionReviewProps}\n >\n {\n _.isPresent(_.get(hasStorage, 'clearlyIdentified')) ?\n <div style={{display: 'flex', flexWrap: 'wrap'}}>\n { _.map(_.get(hasStorage, 'clearlyIdentified'), ({exteriorPhoto, bulkStorageAreaPhoto, id}) =>\n <ImageView key={id} image={exteriorPhoto || bulkStorageAreaPhoto} version='thumb' className='mr-1'/>) }\n </div> : 'None Reported'\n }\n </AutoQuestionReview> : null\n }\n {\n requiredFields['storedSecurely'] ?\n <AutoQuestionReview\n fieldName={'storedSecurely'}\n label={`Is the ${name} stored securely?`}\n {...questionReviewProps}\n >\n { storedSecurely ? <StoredSecurely {...storedSecurely} /> : null }\n </AutoQuestionReview> : null\n }\n {\n requiredFields['packagedCorrectly'] ?\n <AutoQuestionReview\n fieldName={'packagedCorrectly'}\n label={`Is the ${name} packaged in approved containers?`}\n {...questionReviewProps}\n >\n { packagedCorrectly ? <PackagedCorrectly {...packagedCorrectly} /> : null }\n </AutoQuestionReview> : null\n }\n {\n requiredFields['contaminationFound'] ?\n <AutoQuestionReview\n fieldName={'contaminationFound'}\n label={`Has any contamination been found?`}\n {...questionReviewProps}\n >\n { contaminationFound ? <ContaminationFound {...contaminationFound} /> : null }\n </AutoQuestionReview> : null\n }\n\n </div>\n </div>\n </Route>\n </Switch>\n\n );\n}\n\nconst PackagedCorrectly = ({withoutCorrectPackaging, withPackagingRequired}) => {\n\n if(withPackagingRequired.length == 0) {\n return <div>No containment audited</div>\n } else {\n return <div style={{display: 'flex', flexWrap: 'wrap'}}>\n { _.map(withoutCorrectPackaging, ({exteriorPhoto, bulkStorageAreaPhoto, id}) =>\n <ImageView key={id} image={exteriorPhoto || bulkStorageAreaPhoto} version='thumb' className='mr-1'/> ) }\n </div>\n }\n}\n\nconst StoredSecurely = ({\n secureContainment,\n notSecureContainment,\n containmentWithSecurityRequired\n}) => {\n\n if(containmentWithSecurityRequired.length == 0) {\n return <div>No containment audited</div>\n } else {\n return <div style={{display: 'flex', flexWrap: 'wrap'}}>\n\n <div className='mb-1'>\n { secureContainment.length } / {containmentWithSecurityRequired.length} stored securely\n </div>\n { _.map(notSecureContainment, ({exteriorPhoto, bulkStorageAreaPhoto, id}) =>\n <ImageView key={id} image={exteriorPhoto || bulkStorageAreaPhoto} version='thumb' className='mr-1'/> ) }\n </div>\n }\n}\n\nconst ContaminationFound = ({\n withContamination,\n highestRiskLevel,\n noContamination,\n cannotAssesContamination,\n contaminationAssessed\n\n}) => {\n\n var assesedBins = _.isPresent(contaminationAssessed) ?\n <div>\n {noContamination.length} / {contaminationAssessed.length} bulk containment without contamination\n </div> : null\n\n var notAssesedBins = _.isPresent(cannotAssesContamination) ?\n <div>\n {cannotAssesContamination.length} bulk containment with insufficient information\n </div> : null\n\n var noBins = !(notAssesedBins || assesedBins) ?\n <div>\n No bulk containment was audited\n </div> : null\n\n return(\n <div>\n {assesedBins}\n {notAssesedBins}\n {noBins}\n </div>\n )\n}\n\n\n\nconst mapStateToProps = (state, {}) => {\n return {\n }\n}\n\nWasteStreamReview.propTypes = {\n}\n\nconst mapDispatchToProps = (dispatch, {wasteStreamData}) => {\n return {\n onCommentChange: (comment, fieldName) => {\n dispatch(makeQuestionComment(wasteStreamData.id, fieldName, comment ));\n }\n }\n}\n\nWasteStreamReview = connect(\n mapStateToProps,\n mapDispatchToProps\n)(WasteStreamReview)\n\nexport default WasteStreamReview;\n\nexport {\n isComplete,\n getRequiredFields,\n getCalculatedFields,\n getReviewResult\n}\n\n\n\n\n\n","import React, { useReducer } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport dotProp from \"dot-prop-immutable\";\nimport SectionReview from \"../SectionReview\";\nimport QuestionReview from \"../QuestionReview\";\nimport CompleteStatusIcon from \"../CompleteStatusIcon\";\nimport WasteStreamReview, { isComplete as isWasteStreamComplete } from \"../WasteStreamReview\";\nimport { useRouteMatch, Switch, Redirect, Route, useHistory } from \"react-router-dom\";\nimport { sumReviewResults } from '../../app/selectors'\nimport {\n makeQuestionObservation,\n makeQuestionComment\n} from '../../sectionReviews/operations'\nimport Chip from '@material-ui/core/Chip';\n\nconst SECTION_ID = \"bulk_waste_storage_containment\";\nconst TITLE = \"Bulk Waste Storage Containment\";\n\nconst d = dotProp;\n\nconst isComplete = (sectionData) => {\n return( _.every(sectionData.wasteStreams, (wasteStreamData) => isWasteStreamComplete(wasteStreamData) ) )\n}\n\nconst getReviewResult = ({wasteStreams}) => { \n return sumReviewResults(_.map(wasteStreams, 'reviewResult'))\n}\n\nconst getRequiredFields = () => {\n\n var requiredFields = {\n }\n\n return requiredFields\n}\n\nvar BulkWasteStorageContainment = ({\n onDecision,\n onCommentChange,\n decisionData,\n sectionData,\n ...rest\n} ) => {\n\n const {\n wasteStreams,\n reviewData,\n } = sectionData;\n\n\n const questionReviewProps = {\n onDecision,\n reviewData,\n decisionData,\n onCommentChange\n }\n\n\n let { url } = useRouteMatch();\n let wasteStreamRoutePath = `${url}/wasteStreams/:wasteStreamId`\n let match = useRouteMatch(wasteStreamRoutePath)\n let selectedWasteStreamId = _.get(match, 'params.wasteStreamId')\n let history = useHistory();\n\n let selectedWasteStream = _.find(wasteStreams, {id: selectedWasteStreamId})\n\n return (\n <SectionReview\n sectionId={SECTION_ID}\n title={TITLE}\n >\n <ul className='waste-stream-nav'>\n {\n _.map(wasteStreams, (wasteStream, index) => {\n\n const wasteStreamSelected = selectedWasteStreamId == wasteStream.id\n\n return(\n <li key={wasteStream.id}>\n <Chip\n variant={ wasteStreamSelected ? 'default' : 'outlined' }\n label={wasteStream.title}\n style={\n {\n fontSize: '1.1em',\n color: 'white',\n }\n }\n onClick={ !wasteStreamSelected ? () => history.push(`${url}/wasteStreams/${wasteStream.id}`) : null }\n icon={<CompleteStatusIcon isComplete={wasteStream.isComplete}/>}\n color=\"primary\"\n />\n </li>\n )\n })}\n </ul>\n\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n <Switch>\n {\n selectedWasteStream ? <Route path={wasteStreamRoutePath}>\n <WasteStreamReview\n wasteStreamData={selectedWasteStream}\n decisionData={decisionData}\n />\n </Route> : null\n }\n <Redirect to={`${url}/wasteStreams/${wasteStreams[0].id}`} />\n </Switch>\n </div>\n </div>\n </SectionReview>\n );\n};\n\nBulkWasteStorageContainment.propTypes = {};\n\nconst mapStateToProps = (state, { wasteAudit }) => {\n return state\n};\n\nconst mapDispatchToProps = (dispatch, { }) => {\n return {\n onDecision: (decision, fieldName, decisionOptions) => {\n dispatch(makeQuestionObservation(SECTION_ID, fieldName, decision, decisionOptions ));\n },\n onCommentChange: (comment, fieldName) => {\n dispatch(makeQuestionComment(SECTION_ID, fieldName, comment ));\n },\n };\n};\n\nBulkWasteStorageContainment = connect(\n mapStateToProps,\n mapDispatchToProps\n)(BulkWasteStorageContainment);\n\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n isComplete,\n getReviewResult,\n getRequiredFields,\n Component: BulkWasteStorageContainment,\n}\n\n\n\n","import generalInformationSection from './GeneralInformation'\nimport wasteManagementPolicySection from './WasteManagementPolicy'\nimport wasteManagementTrainingSection from './WasteManagementTraining'\nimport hazardousWasteConsignmentNotesSection from './HazardousWasteConsignmentNotes'\nimport internalWasteContainmentSection from './InternalWasteContainment'\nimport bulkWasteStorageContainmentSection from './BulkWasteStorageContainment'\nimport _ from 'lodashExtended'\nimport { hasObservation } from '../../app/selectors'\n\n\nconst orderedSections = [\n generalInformationSection,\n wasteManagementPolicySection,\n wasteManagementTrainingSection,\n hazardousWasteConsignmentNotesSection,\n internalWasteContainmentSection,\n bulkWasteStorageContainmentSection,\n]\n\n\nconst sectionWeights = {\n [generalInformationSection.sectionId]: 0.08,\n [wasteManagementPolicySection.sectionId]: 0.16,\n [wasteManagementTrainingSection.sectionId]: 0.20,\n [hazardousWasteConsignmentNotesSection.sectionId]: 0.16,\n [bulkWasteStorageContainmentSection.sectionId]: 0.2,\n [internalWasteContainmentSection.sectionId]: 0.2\n}\n\n\nconst orderedSectionReviewComponents = _.map(orderedSections, 'Component')\n//const orderedSectionSummaryViews = _.map(orderedSections, 'SummaryView')\n\n\nvar titleBySectionId = {}\n_.each(orderedSections, ({sectionId, title}) => titleBySectionId[sectionId] = title )\nconst getSectionTitle = (sectionId) => titleBySectionId[sectionId]\n\nvar requiredFieldsBySectionId = {}\n_.each(orderedSections, ({sectionId, getRequiredFields}) => requiredFieldsBySectionId[sectionId] = getRequiredFields )\nconst getSectionRequiredFields = (sectionData) => requiredFieldsBySectionId[sectionData.id](sectionData)\n\n\n\n\n\nconst defaultIsComplete = (sectionData) => {\n return _.every(Object.keys(_.pickBy(getSectionRequiredFields(sectionData))), (attr) => {\n return hasObservation(sectionData, attr)\n })\n}\nconst isCompleteBySectionId = {}\n_.each(orderedSections, ({sectionId, isComplete}) => isCompleteBySectionId[sectionId] = isComplete || defaultIsComplete )\nconst isSectionReviewComplete = (sectionData) => {\n return isCompleteBySectionId[sectionData.id](sectionData)\n}\n\n\n\nvar getReviewResultBySectionId = {}\n_.each(orderedSections, ({sectionId, getReviewResult}) => getReviewResultBySectionId[sectionId] = getReviewResult )\nconst getSectionReviewResult = (sectionData) => { \n\n const sectionWeight = sectionWeights[sectionData.id]\n var reviewResult = getReviewResultBySectionId[sectionData.id](sectionData)\n\n const percentScore = (reviewResult.score / reviewResult.maxScore) * 100.0\n const weightedPercentScore = percentScore * sectionWeight\n const weightedPercent = sectionWeight * 100.0\n\n return {\n percentScore,\n weightedPercentScore,\n weightedPercent,\n ...reviewResult\n }\n\n}\n\nconst orderedSectionIds = _.map(orderedSections, 'sectionId')\n\nconst getSectionNumber = (sectionId) => _.indexOf(orderedSectionIds, sectionId) + 1\n\nvar reviewComponentsById = {}\n_.each(orderedSections, ({sectionId, Component}) => reviewComponentsById[sectionId] = Component )\n\nexport default orderedSectionReviewComponents\n\nexport {\n orderedSectionReviewComponents,\n reviewComponentsById,\n getSectionTitle,\n orderedSectionIds,\n isSectionReviewComplete,\n getSectionReviewResult,\n getSectionNumber,\n sectionWeights,\n getSectionRequiredFields\n //sectionIncompleteMessage,\n //isSectionComplete,\n //orderedSections,\n //orderedSectionSummaryViews\n}\n\n\n\n\n\n\n\n\n","import _ from \"lodashExtended\";\nimport dotProp from \"dot-prop-immutable\";\nimport {\n getDecisionData,\n makeObservation,\n autoReviewData,\n getRequiredRoomCount\n} from \"../app/selectors\";\nimport {\n getRoomData as getAuditRoomData,\n getRoomsForSection as getAuditRoomsForSection\n} from \"../../auditor/rooms/selectors\";\nimport { getBinDataForRoom } from \"../binReviews/selectors\";\nimport {\n isComplete,\n getCalculatedFields,\n getReviewResult,\n getRequiredFields\n} from \"../components/RoomReview\";\nimport internalWasteContainment from \"../components/sectionReviews/InternalWasteContainment\";\n\nconst getRoomsWithReview = state => {\n const auditedRooms = getRoomsForSection(\n internalWasteContainment.sectionId,\n state\n );\n var requiredRoomCount = getRequiredRoomCount(state);\n\n const auditedCount = auditedRooms.length;\n\n const missingRooms =\n auditedCount < requiredRoomCount\n ? _(_.range(auditedCount + 1, requiredRoomCount + 1))\n .map(number => {\n return {\n id: `missing_room_${number}`,\n title: `Not Audited`,\n notAudited: true,\n sectionId: internalWasteContainment.sectionId\n };\n })\n .value()\n : [];\n\n const roomsToReview = auditedRooms.concat(missingRooms);\n\n return _(roomsToReview)\n .map((room, index) => {\n let roomData = getRoomWithReview(room, state);\n\n let number = index + 1;\n let numberedTitle = `Room ${number}: ${roomData.title}`;\n\n return {\n number,\n numberedTitle,\n ...roomData\n };\n })\n .value();\n};\n\nconst getRoomsForSection = (sectionId, state) => {\n return _(getAuditRoomsForSection(sectionId, state))\n .filter(({ type }) => _.isPresent(type))\n .value();\n};\n\nconst getRoomWithReview = (room, state) => {\n //const room = getAuditRoomData(roomId, state)\n\n var bins = getBinDataForRoom(room.id, state);\n\n var roomWithoutCalculatedFields = {\n ...room,\n bins\n };\n\n const roomWithoutReview = {\n ...roomWithoutCalculatedFields,\n ...getCalculatedFields(roomWithoutCalculatedFields, state)\n };\n\n const roomWithoutComplete = {\n ...roomWithoutReview,\n reviewData: getRoomReviewData(roomWithoutReview, state)\n };\n\n const roomWithoutResult = {\n ...roomWithoutComplete,\n isComplete: isComplete(roomWithoutComplete, state)\n };\n\n return {\n ...roomWithoutResult,\n reviewResult: getReviewResult(roomWithoutResult)\n };\n};\n\nconst getRoomReviewData = (room, state) => {\n var savedReviewData = dotProp.get(\n state.firestore,\n `data.roomReviews.${room.id}`,\n {}\n );\n\n const decisionData = getDecisionData(state).sections[room.sectionId].rooms;\n const requiredFields = getRequiredFields(room);\n\n return autoReviewData(\n room,\n requiredFields,\n savedReviewData,\n decisionData,\n makeObservation,\n state\n );\n};\n\nexport { getRoomsWithReview, getRoomsForSection };\n","import _ from 'lodashExtended'\nimport {\n getSectionTitle,\n getSectionNumber,\n getSectionRequiredFields\n} from '../components/sectionReviews'\nimport dotProp from 'dot-prop-immutable'\nimport { getDecisionData, makeObservation, autoReviewData } from '../app/selectors'\nimport {\n getSectionData as getAuditSectionData,\n} from '../../auditor/sections/selectors'\n\n//const autoReviewData = (inputData, requiredFields, savedReviewData, decisionData, getObservation, state) => {\n\nconst getSectionData = (sectionId, state) => {\n\n const sectionData = getAuditSectionData(sectionId, state)\n\n return {\n id: sectionId,\n title: getSectionTitle(sectionId),\n number: getSectionNumber(sectionId),\n ...sectionData\n }\n\n}\n\nconst getSectionReviewData = (sectionData, state) => {\n const { id: sectionId } = sectionData\n var savedReviewData = _.omit(dotProp.get(state.firestore, `data.sectionReviews.${sectionId}`) || {}, 'state')\n\n const decisionData = getDecisionData(state).sections[sectionId]\n const requiredFields = getSectionRequiredFields(sectionData)\n\n return autoReviewData(sectionData, requiredFields, savedReviewData, decisionData, makeObservation, state)\n}\n\n\nconst getSectionDataWithReview = (sectionId, state) => {\n var sectionData = getSectionData(sectionId, state)\n\n return {\n ...sectionData,\n reviewData: getSectionReviewData(sectionData, state)\n }\n\n}\n\n\nexport {\n getSectionReviewData,\n getSectionDataWithReview\n}\n\n","import _ from 'lodashExtended'\nimport dotProp from \"dot-prop-immutable\";\nimport { getDecisionData, makeNoScoreObservation, autoReviewData } from '../app/selectors'\nimport {\n getBinData as getAuditBinData,\n getBinsForRoom as getAuditBinsForRoom,\n getBinsForSection as getAuditBinsForSection\n} from '../../auditor/bins/selectors'\n\nimport { getContaminantNames } from '../../auditor/wasteAudit/selectors'\nimport { getRequiredFields } from '../components/BinReview'\nimport { isComplete } from '../components/BinReview'\nimport {\n getStorageType,\n getInternalContainerType,\n} from '../../auditor/app/selectors'\nimport { getAllContaminants } from '../../auditor/app/selectors'\nimport internalWasteContainment from '../components/sectionReviews/InternalWasteContainment'\nimport bulkWasteStorageContainment from '../components/sectionReviews/BulkWasteStorageContainment'\nimport { getRoomsForSection } from '../roomReviews/selectors'\nimport { getSectionDataWithReview } from '../sectionReviews/selectors';\n\nconst getStorageTypeData = (storageTypeId, state) => _.omit(getStorageType(storageTypeId, state), ['exampleInteriorPhotoUrl', 'exampleExteriorPhotoUrl', 'exampleBulkInternalPhotoUrl'])\nconst getContainerTypeData = (containerTypeId, state) => _.omit(getInternalContainerType(containerTypeId, state), ['exampleInteriorPhotoUrl', 'exampleExteriorPhotoUrl'])\n\n\nconst getBinData = (binId, state) => {\n\n const bin = getAuditBinData(binId, state)\n const name = _.get(bin, 'containerType.name') || _.get(bin, 'storageType.name')\n\n return {\n ...bin,\n id: binId,\n name,\n contaminantNames: getContaminantNames(bin.contaminants, getAllContaminants(state)),\n containerType: getContainerTypeData(bin.containerTypeId, state),\n storageType: getStorageTypeData(bin.storageTypeId, state)\n }\n}\n\n\nconst getBinReviewData = (binId, state) => {\n const binData = getBinData(binId, state)\n\n var reviewData = {}\n\n var savedReviewData = dotProp.get(state.firestore, `data.binReviews.${binId}`, {})\n const decisionData = getDecisionData(state).sections[binData.sectionId].bins\n const requiredFields = getRequiredFields(binData)\n\n return autoReviewData(binData, requiredFields, savedReviewData, decisionData, makeNoScoreObservation, state)\n}\n\nconst getBinsForRoom = (roomId, state) => {\n return _(getAuditBinsForRoom(roomId, state)).\n filter(({storageType, containerType, exteriorPhoto, interiorPhoto}) => {\n return(\n _.isPresent(containerType) &&\n _.isPresent(storageType) && (\n _.isPresent(exteriorPhoto) || _.isPresent(interiorPhoto)\n )\n )\n }).map(({id}) => getBinData(id, state)).value()\n}\n\nconst getBinsForWasteStream = (wasteStreamId, state) => {\n return _.filter(getBinsForSection(bulkWasteStorageContainment.sectionId, state), ({id}) => getWasteStreamIdForBin(id, state) == wasteStreamId)\n}\n\nconst getBinsForSection = (sectionId, state) => {\n\n var sectionBins\n if(sectionId == internalWasteContainment.sectionId) {\n sectionBins = _(getRoomsForSection(internalWasteContainment.sectionId, state)).map(({id}) => getBinsForRoom(id, state) ).flatten()\n } else if(sectionId == bulkWasteStorageContainment.sectionId) {\n var sectionData = getSectionDataWithReview(sectionId,state)\n sectionBins = sectionData['hasExternalContainment'] === 'yes' ?\n getAuditBinsForSection(sectionId, state) : []\n } else {\n sectionBins = []\n }\n\n return _(sectionBins).filter(({storageType, containerType, exteriorPhoto, interiorPhoto}) => {\n return(\n _.isPresent(storageType) && (\n _.isPresent(exteriorPhoto) || _.isPresent(interiorPhoto)\n )\n )\n }).map(({id}) => getBinData(id, state)).value()\n}\n\nconst getWasteStreamIdForBin = (binId, state) => {\n var bin = getBinData(binId, state)\n return _([getInternalContainerType(bin.containerTypeId, state), getStorageType(bin.storageTypeId, state)]).map('wasteStreamId').find(_.isPresent)\n}\n\nconst getBinDataForRoom = (roomId, state) => {\n\n return _.map(getBinsForRoom(roomId, state), (bin)=> {\n const binWithoutComplete = {\n ...bin,\n title: bin.name,\n reviewData: getBinReviewData(bin.id, state)\n }\n\n return {\n ...binWithoutComplete,\n isComplete: isComplete(binWithoutComplete, state)\n }\n\n })\n\n}\n\nconst getBinDataForWasteStream = (wasteStreamId, state) => {\n\n return _.map(getBinsForWasteStream(wasteStreamId, state), (bin)=> {\n\n const title = `${bin.name} - External Container`\n\n const binWithoutComplete = {\n ...bin,\n title,\n reviewData: getBinReviewData(bin.id, state)\n }\n\n return {\n ...binWithoutComplete,\n isComplete: isComplete(binWithoutComplete, state)\n }\n\n })\n\n}\n\nexport {\n getBinReviewData,\n getBinDataForRoom,\n getBinDataForWasteStream,\n getBinsForSection,\n getWasteStreamIdForBin,\n getBinData,\n}\n","import _ from 'lodashExtended'\nimport dotProp from \"dot-prop-immutable\";\nimport {\n getStorageType,\n} from '../../auditor/app/selectors'\nimport { getDecisionData, makeNoScoreObservation, autoReviewData } from '../app/selectors'\nimport {\n getBulkContainmentData as getAuditBulkContainmentData,\n getBulkContainmentsForRoom as getAuditBulkContainmentsForRoom,\n getBulkContainmentsForSection as getAuditBulkContainmentsForSection\n} from '../../auditor/bulkContainments/selectors'\nimport { getContaminantNames } from '../../auditor/wasteAudit/selectors'\nimport { getRequiredFields } from '../components/BulkContainmentReview'\nimport { isComplete } from '../components/BulkContainmentReview'\nimport bulkWasteStorageContainment from '../components/sectionReviews/BulkWasteStorageContainment'\nimport { getAllExternalContainerContaminants } from '../../auditor/app/selectors'\nimport { getSectionDataWithReview } from '../sectionReviews/selectors';\n\n\nconst getStorageTypeData = (storageTypeId, state) => _.omit(getStorageType(storageTypeId, state), ['exampleInteriorPhotoUrl', 'exampleExteriorPhotoUrl', 'exampleBulkInternalPhotoUrl'])\n\nconst getBulkContainmentData = (bulkContainmentId, state) => {\n\n const bulkContainment = getAuditBulkContainmentData(bulkContainmentId, state)\n const name = _.get(bulkContainment, 'storageType.name')\n\n return {\n id: bulkContainmentId,\n ...bulkContainment,\n name,\n contaminantNames: getContaminantNames(bulkContainment.contaminants, getAllExternalContainerContaminants(state)),\n storageType: getStorageTypeData(bulkContainment.storageTypeId, state)\n }\n\n}\n\nconst getBulkContainmentReviewData = (bulkContainmentId, state) => {\n const bulkContainmentData = getBulkContainmentData(bulkContainmentId, state)\n\n var reviewData = {}\n\n var savedReviewData = dotProp.get(state.firestore, `data.bulkContainmentReviews.${bulkContainmentId}`, {})\n const decisionData = getDecisionData(state).sections[bulkContainmentData.sectionId].bulkContainments\n const requiredFields = getRequiredFields(bulkContainmentData)\n\n return autoReviewData(bulkContainmentData, requiredFields, savedReviewData, decisionData, makeNoScoreObservation, state)\n}\n\n\nconst getWasteStreamIdForBulkContainment = (bulkContainmentId, state) => {\n\n var bulkContainment = getBulkContainmentData(bulkContainmentId, state)\n return _.get(getStorageType(bulkContainment.storageTypeId, state), 'wasteStreamId' )\n}\n\nconst getBulkContainmentsForSection = (sectionId, state) => {\n var sectionData = getSectionDataWithReview(sectionId,state)\n var sectionBulkContainments = sectionData['hasBulkInternalWasteContainment'] === 'yes' ? getAuditBulkContainmentsForSection(sectionId, state) : []\n \n return _(sectionBulkContainments).filter(({storageType, bulkStorageAreaPhoto}) => _.isPresent(storageType) && _.isPresent(bulkStorageAreaPhoto)).map(({id}) => getBulkContainmentData(id, state)).value()\n}\n\nconst getBulkContainmentsForWasteStream = (wasteStreamId, state) => {\n return _.filter(getBulkContainmentsForSection(bulkWasteStorageContainment.sectionId, state), ({id}) => getWasteStreamIdForBulkContainment(id, state) == wasteStreamId)\n}\n\n\nconst getBulkContainmentDataForWasteStream = (wasteStreamId, state) => {\n\n return _.map(getBulkContainmentsForWasteStream(wasteStreamId, state), (bulkContainment)=> {\n\n const title = `${bulkContainment.name} - Storage Area`\n\n const bulkContainmentWithoutComplete = {\n ...bulkContainment,\n title,\n reviewData: getBulkContainmentReviewData(bulkContainment.id, state)\n }\n\n return {\n ...bulkContainmentWithoutComplete,\n isComplete: isComplete(bulkContainmentWithoutComplete, state)\n }\n\n })\n\n}\n\nexport {\n getBulkContainmentReviewData,\n getWasteStreamIdForBulkContainment,\n getBulkContainmentsForSection,\n getBulkContainmentDataForWasteStream\n}\n\n\n","import _ from 'lodashExtended'\nimport dotProp from \"dot-prop-immutable\";\nimport internalWasteContainment from '../components/sectionReviews/InternalWasteContainment'\nimport bulkWasteStorageContainment from '../components/sectionReviews/BulkWasteStorageContainment'\nimport {\n getBulkContainmentsForSection,\n getWasteStreamIdForBulkContainment,\n getBulkContainmentDataForWasteStream\n} from '../bulkContainmentReviews/selectors'\nimport {\n getDecisionData,\n makeObservation,\n autoReviewData,\n getRequiredWasteStreamIds\n} from '../app/selectors'\nimport { getBinsForSection, getBinDataForWasteStream, getWasteStreamIdForBin } from '../binReviews/selectors'\nimport {\n getBulkStorageTypes,\n getStorageType\n} from '../../auditor/app/selectors'\nimport {\n isComplete,\n getCalculatedFields,\n getRequiredFields,\n getReviewResult\n} from '../components/WasteStreamReview'\n\nconst getWasteStreamReviewData = (wasteStream, state) => {\n const savedReviewData = dotProp.get(state.firestore, `data.wasteStreamReviews.${wasteStream.id}`, {})\n const decisionData = getDecisionData(state).sections[wasteStream.sectionId].wasteStreams\n const requiredFields = getRequiredFields(wasteStream)\n\n return autoReviewData(wasteStream, requiredFields, savedReviewData, decisionData, makeObservation, state)\n\n}\n\nconst getWasteStreamsWithReview = (state) => {\n const wasteStreamIds = _([getIdentifiedWasteStreamIds(state), getRequiredWasteStreamIds(state)]).flatten().uniq().value()\n\n return _.map(wasteStreamIds, (wasteStreamId) => {\n const bins = getBinDataForWasteStream(wasteStreamId, state)\n const bulkContainments = getBulkContainmentDataForWasteStream(wasteStreamId, state)\n const storageType = getStorageType(wasteStreamId, state)\n\n\n const wasteStreamWithoutCalculatedFields = {\n id: wasteStreamId,\n name: storageType.name,\n title: `${storageType.name} Stream`,\n sectionId: bulkWasteStorageContainment.sectionId,\n storageType,\n bins,\n bulkContainments\n }\n\n const wasteStreamWithoutReview = {\n ...wasteStreamWithoutCalculatedFields,\n ...getCalculatedFields(wasteStreamWithoutCalculatedFields, state)\n }\n\n\n const wasteStreamWithoutComplete = {\n ...wasteStreamWithoutReview,\n reviewData: getWasteStreamReviewData(wasteStreamWithoutReview, state)\n }\n\n const wasteStreamWithoutResult = {\n isComplete: isComplete(wasteStreamWithoutComplete),\n ...wasteStreamWithoutComplete\n }\n\n return {\n ...wasteStreamWithoutResult,\n reviewResult: getReviewResult(wasteStreamWithoutResult)\n }\n\n })\n\n\n}\n\nconst getWasteStreamIds = (state) => {\n return _.map(getBulkStorageTypes(state), 'id')\n}\n\nconst getIdentifiedWasteStreamIds = (state) => {\n var internalBins = getBinsForSection(internalWasteContainment.sectionId, state)\n var externalBins = getBinsForSection(bulkWasteStorageContainment.sectionId, state)\n\n var bulkContainments = getBulkContainmentsForSection(bulkWasteStorageContainment.sectionId, state)\n\n var foundStorageTypeIds = _([\n _([internalBins, externalBins]).flatten().map(({id}) => getWasteStreamIdForBin(id, state)).value(),\n _(bulkContainments).map(({id}) => getWasteStreamIdForBulkContainment(id, state) ).value(),\n ]).flatten().compact().uniq().value()\n\n //preserve order\n return _(getWasteStreamIds(state)).\n filter((id) => _.includes(foundStorageTypeIds, id)).value()\n\n}\n\n\nexport {\n getWasteStreamReviewData,\n getWasteStreamsWithReview\n}\n","import _ from 'lodashExtended'\nimport dotProp from 'dot-prop-immutable'\nimport {\n getBulkStorageTypes,\n getStorageType,\n getInternalContainerType,\n getBulkStorageType,\n} from '../../auditor/app/selectors'\nimport {\n checkAllDataLoaded,\n sumReviewResults\n} from '../app/selectors'\nimport {\n orderedSectionIds,\n isSectionReviewComplete,\n getSectionReviewResult,\n sectionWeights\n} from '../components/sectionReviews'\nimport { getBinReviewData } from '../binReviews/selectors';\nimport { getBulkContainmentReviewData } from '../bulkContainmentReviews/selectors';\nimport { getSectionDataWithReview } from '../sectionReviews/selectors';\nimport { getWasteStreamsWithReview } from '../wasteStreamReviews/selectors';\nimport { getRoomsWithReview } from '../roomReviews/selectors';\nimport internalWasteContainment from '../components/sectionReviews/InternalWasteContainment'\nimport bulkWasteStorageContainment from '../components/sectionReviews/BulkWasteStorageContainment'\n\nconst getWeightedReviewResult = (sections, state) => {\n\n const reviewResults = _.map(sections, 'reviewResult')\n\n const totalWeightedPercentScore = _(reviewResults).map('weightedPercentScore').compact().sum()\n const score = _(reviewResults).map('score').compact().sum()\n const actionItems = _(reviewResults).map('actionItems').flatten().value()\n\n return {\n totalWeightedPercentScore,\n sectionWeights,\n actionItems,\n }\n\n}\n\nconst getStorageTypeData = (storageTypeId, state) => _.omit(getStorageType(storageTypeId, state), ['exampleInteriorPhotoUrl', 'exampleExteriorPhotoUrl', 'exampleBulkInternalPhotoUrl'])\nconst getContainerTypeData = (containerTypeId, state) => _.omit(getInternalContainerType(containerTypeId, state), ['exampleInteriorPhotoUrl', 'exampleExteriorPhotoUrl'])\n\nconst getAuditReview = (wasteAuditDocumentId, state) => {\n\n if(checkAllDataLoaded(state)) {\n\n var sections = {}\n\n _.each(orderedSectionIds, (sectionId, index) => {\n\n var sectionData = getSectionDataWithReview(sectionId, state)\n\n if(sectionId == internalWasteContainment.sectionId) {\n sectionData.rooms = getRoomsWithReview(state)\n } else if(sectionId == bulkWasteStorageContainment.sectionId) {\n sectionData.wasteStreams = getWasteStreamsWithReview(state)\n }\n\n sections[sectionId] = {\n isComplete: isSectionReviewComplete(sectionData),\n reviewResult: getSectionReviewResult(sectionData),\n ...sectionData\n }\n\n })\n\n const isComplete = _.every(sections, 'isComplete')\n const reviewResult = getWeightedReviewResult(sections, state)\n\n\n const result = {\n sections,\n reviewResult,\n isComplete\n }\n\n console.log(result)\n\n return result\n \n } else {\n\n return null\n }\n}\n\n\nconst scoreToRiskLevel = (score, maxScore) => {\n\n if(score >= 0 && maxScore >= 0) {\n\n var percentScore = maxScore > 0 ? Math.round(score / maxScore * 100.0) : 0\n\n return(percentScore <= 10.0 ? [\"Low\", 'low-risk', percentScore] :\n percentScore <= 40.0 ? [\"Meduim\", 'medium-risk', percentScore] :\n percentScore <= 80.0 ? [\"High\", 'high-risk', percentScore] :\n [\"Severe\", 'severe-risk', percentScore]\n )\n\n } else {\n return [null, 'unknown-risk', null]\n }\n\n}\n\nconst scoreToClass = (score, maxScore) => {\n return(scoreToRiskLevel(score, maxScore)[1])\n}\n\n\nexport {\n getAuditReview,\n scoreToRiskLevel,\n scoreToClass,\n}\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport { orderedSectionIds, getSectionTitle } from \"./sectionReviews\";\nimport { useHistory, useParams } from \"react-router-dom\";\nimport classNames from \"classnames\";\nimport CompleteStatusIcon from \"./CompleteStatusIcon\";\nimport { scoreToClass, scoreToRiskLevel } from '../wasteAudit/selectors'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar SectionReviewNav = ( {\n wasteAudit\n} ) => {\n\n let { sectionId: selectedSectionId } = useParams();\n let history = useHistory();\n\n return(\n <div className='panel panel-primary audit-nav'>\n <div className=\"panel-heading panel-heading-small\">\n Audit Navigation\n </div>\n <ul className=\"list-group \">\n { _.map(orderedSectionIds, (sectionId) => {\n var { score, maxScore} = _.get(wasteAudit, `sections.${sectionId}.reviewResult`, {})\n return(\n <li\n key={sectionId}\n style={{\n cursor: \"pointer\",\n display: 'flex',\n alignItems: 'center',\n }}\n onClick={() => history.push(`/section/${sectionId}`)}\n className={classNames({active: sectionId == selectedSectionId }, \"list-group-item \")}>\n\n <CompleteStatusIcon isComplete={wasteAudit.sections[sectionId].isComplete}/>  \n <div>{getSectionTitle(sectionId)}</div>\n <div\n style={{\n marginLeft: 'auto',\n whiteSpace: 'nowrap'\n }}\n className={` ${scoreToClass(score, maxScore)}`}>\n { _.isPresent(score) ? `${score} / ${maxScore}` : null }\n </div>\n </li>)\n })\n }\n </ul>\n </div>\n )\n}\n\n\n\n\nSectionReviewNav.propTypes = {\n};\n\n\n//const mapStateToProps = (state, {}) => {\n//return {\n//}\n//}\n\n//const mapDispatchToProps = (dispatch, {}) => {\n//return {\n//}\n//}\n\n//SectionReviewSummary = connect(\n//mapStateToProps,\n//mapDispatchToProps\n//)(SectionReviewSummary)\n\n\nexport default SectionReviewNav;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport { Btn } from 'sharedComponents'\n\nvar ScoreSummary = ({\n wasteAudit,\n onSubmitReview\n}) => {\n const {\n reviewResult\n } = wasteAudit\n\n const {\n totalWeightedPercentScore,\n actionItems\n } = reviewResult\n\n return(\n <div className='panel panel-default'>\n <div className=\"panel-heading panel-heading-small\">\n Audit Summary\n </div>\n <div className=\"p-2\">\n <div className='m-2'>\n <span className='pull-right'>{Math.round(totalWeightedPercentScore)}%</span>\n Audit Score\n </div>\n <div className='m-2'>\n <span className='pull-right'>{actionItems.length}</span>\n Actions Identified\n </div>\n { wasteAudit.isComplete ? <Btn\n onClick={onSubmitReview}\n styles='block primary'>Submit</Btn> : null }\n </div>\n </div>\n )\n}\n\n\nScoreSummary.propTypes = {\n onSubmitReview: PropTypes.func.isRequired\n};\n\n\nexport default ScoreSummary;\n\n\n\n\n\n\n","import React, { useEffect, useState, useLayoutEffect } from \"react\";\nimport { compose } from \"redux\";\nimport { identify } from \"react-fullstory\";\nimport dotProp from \"dot-prop-immutable\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { firestoreConnect } from \"react-redux-firebase\";\nimport { Route, Redirect, Switch, useLocation } from \"react-router-dom\";\n//import { Link } from \"sharedComponents\";\nimport { getAuditReview } from \"../wasteAudit/selectors\";\nimport { getDecisionData } from \"../app/selectors\";\nimport { reviewComponentsById } from \"./sectionReviews\";\nimport SectionReviewNav from \"./SectionReviewNav\";\nimport ScoreSummary from \"./ScoreSummary\";\nimport { submitAuditReview } from \"../app/operations\";\nimport StickyBox from \"react-sticky-box\";\n\nfunction mapIt(sections) {\n var sectionTemp = {}\n\n _.each(sections, (x, sectionId) => {\n sectionTemp[sectionId] = {}\n _.each(x, (value, fieldName) => {\n sectionTemp[sectionId][fieldName] = [\n { score: 0, response: 'thisIsAResponse', action: 'thisIsAnAction' },\n ]})\n })\n return sectionTemp\n}\n\nvar App = (props) => {\n const {\n wasteAudit,\n decisionData,\n onSubmitReview,\n } = props\n\n if (wasteAudit) {\n return (\n <main role=\"main\" className=\"main audit-review\" id=\"main\">\n <div className=\"row\">\n <div className=\"col-sm-9\">\n <Switch>\n {\n _.map(reviewComponentsById, (SectionReview, id) => {\n return(\n <Route key={id} path={`/section/${id}`}>\n <SectionReview\n sectionId={id}\n wasteAudit={wasteAudit}\n sectionData={wasteAudit.sections[id]}\n decisionData={decisionData.sections[id]}/>\n </Route>)\n }\n )\n }\n <Redirect from={'/'} to={`/section/general_information`} />\n </Switch>\n </div>\n <StickyBox\n offsetTop={50}\n offsetBottom={20}\n >\n <div className=\"col-sm-3\">\n <Route path={[\"/section/:sectionId\", \"/\"]}>\n <SectionReviewNav wasteAudit={wasteAudit}/>\n </Route>\n <ScoreSummary\n onSubmitReview={onSubmitReview}\n wasteAudit={wasteAudit}\n />\n </div>\n </StickyBox>\n </div>\n </main>\n );\n } else {\n return (\n <div className=\"loader-container\">\n <div className=\"loader\"></div>\n <div className=\"loader-text\">Loading</div>\n </div>\n );\n }\n};\n\nApp.propTypes = {\n wasteAuditDocumentId: PropTypes.string.isRequired,\n};\n\nconst mapStateToProps = (state, props) => {\n const {\n wasteAuditDocumentId,\n } = state.app;\n\n return {\n wasteAuditDocumentId,\n wasteAudit: getAuditReview(wasteAuditDocumentId, state),\n decisionData: getDecisionData(state),\n };\n};\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {\n onSubmitReview: () => dispatch(submitAuditReview())\n };\n};\n\nApp = compose(\n connect(mapStateToProps, mapDispatchToProps),\n firestoreConnect(({ wasteAuditDocumentId }) => {\n return [\n {\n collection: \"waste_audits\",\n doc: wasteAuditDocumentId,\n },\n {\n collection: \"waste_audits\",\n doc: wasteAuditDocumentId,\n subcollections: [{ collection: \"sections\" }],\n storeAs: \"sections\", // make sure to include this\n },\n {\n collection: \"waste_audits\",\n doc: wasteAuditDocumentId,\n subcollections: [{ collection: \"sectionReviews\" }],\n storeAs: \"sectionReviews\", // make sure to include this\n },\n {\n collection: \"waste_audits\",\n doc: wasteAuditDocumentId,\n subcollections: [{ collection: \"rooms\" }],\n storeAs: \"rooms\", // make sure to include this\n orderBy: [\"createdAt\"],\n },\n {\n collection: \"waste_audits\",\n doc: wasteAuditDocumentId,\n subcollections: [{ collection: \"roomReviews\" }],\n storeAs: \"roomReviews\", // make sure to include this\n },\n {\n collection: \"waste_audits\",\n doc: wasteAuditDocumentId,\n subcollections: [{ collection: \"bins\" }],\n storeAs: \"bins\", // make sure to include this\n orderBy: [\"createdAt\"],\n },\n {\n collection: \"waste_audits\",\n doc: wasteAuditDocumentId,\n subcollections: [{ collection: \"binReviews\" }],\n storeAs: \"binReviews\", // make sure to include this\n },\n {\n collection: \"waste_audits\",\n doc: wasteAuditDocumentId,\n subcollections: [{ collection: \"bulkContainments\" }],\n storeAs: \"bulkContainments\", // make sure to include this\n orderBy: [\"createdAt\"],\n },\n {\n collection: \"waste_audits\",\n doc: wasteAuditDocumentId,\n subcollections: [{ collection: \"bulkContainmentReviews\" }],\n storeAs: \"bulkContainmentReviews\", // make sure to include this\n },\n {\n collection: \"waste_audits\",\n doc: wasteAuditDocumentId,\n subcollections: [{ collection: \"wasteStreamReviews\" }],\n storeAs: \"wasteStreamReviews\", // make sure to include this\n }\n ];\n })\n)(App);\n\nexport default App;\n\n","import actions from './actions'\n//import { push } from 'connected-react-router'\n//import _ from 'lodashExtended'\nimport submitToServer from 'submitToServer'\nimport { getAuditReview } from \"../wasteAudit/selectors\";\n\n\nconst submitAuditReview = () => (dispatch, getState, { getFirebase, getFirestore}) => {\n\n const state = getState()\n const submitPath = state.app.submitPath\n const {\n wasteAuditDocumentId,\n } = state.app;\n\n const reviewedAudit = getAuditReview(wasteAuditDocumentId, state)\n\n submitToServer(submitPath, { waste_audit: { reviewedAudit } } ,\n (data,v) => {\n window.location = data.redirect_to\n },\n (data, status) => {\n }, { method: 'PUT' })\n\n console.log('submit')\n}\n\nexport {\n submitAuditReview\n}\n\n\n\n\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\n\nconst {\n} = actions\n\nconst reducer = createReducer({\n},\n{})\n\nexport default reducer\n\n","import { createAction } from 'redux-act';\n\n\nexport default {\n}\n\n","import reducer from './reducer'\n\nexport { default as appActions } from \"./actions\";\n\nexport default reducer\n","import dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\nimport { firebaseReducer } from 'react-redux-firebase'\nimport appReducer from './app'\nimport { connectRouter } from 'connected-react-router'\nimport { firestoreReducer } from 'redux-firestore';\n\nconst createRootReducer = (history) => {\n\n\n const routerReducer = connectRouter(history)\n\n const reducer = (state = {}, action) => {\n return {\n ...state,\n app: appReducer(state.app, action),\n firestore: firestoreReducer(state.firestore, action),\n firebase: firebaseReducer(state.firebase, action),\n router: routerReducer(state.router, action)\n }\n\n }\n\n\n return reducer\n\n}\n\nexport default createRootReducer\n\n","import { createStore, applyMiddleware } from 'redux';\nimport createRootReducer from './reducer'\nimport thunk from 'redux-thunk'\nimport { routerMiddleware } from 'connected-react-router'\nimport { composeWithDevTools } from 'redux-devtools-extension';\nimport { reduxFirestore, getFirestore } from 'redux-firestore';\nimport { getFirebase } from 'react-redux-firebase'\nimport { createHashHistory } from 'history'\nimport appActions from './app/actions'\n\nexport const history = createHashHistory()\n\nexport default function configureStore(initialState, firebase) {\n\n const rootReducer = createRootReducer(history)\n\n\n const store = createStore(rootReducer,\n initialState,\n composeWithDevTools(\n applyMiddleware(\n routerMiddleware(history),\n thunk.withExtraArgument({getFirestore, getFirebase})\n ),\n reduxFirestore(firebase)\n ));\n\n\n var connectedRef = firebase.database().ref(\".info/connected\");\n\n firebase.firestore().enablePersistence()\n .catch((error) => {\n if (error === \"failed-precondition\") {\n alert(\"Multiple tabs open, offline data only works in one tab at a a time.\")\n } else if (error === \"unimplemented\") {\n alert(\"Cannot save offline on this browser.\")\n }\n });\n\n if (module.hot) {\n module.hot.accept('./reducer', () => {\n const nextRootReducer = createRootReducer(history)\n store.replaceReducer(nextRootReducer);\n });\n }\n\n return store;\n\n}\n","import React from \"react\"\nimport { Provider } from 'react-redux';\nimport { RootNode, configureStore, history } from '../apps/audit-review'\nimport firebase from 'firebase/app'\nimport 'firebase/auth';\nimport 'firebase/database';\nimport 'firebase/firestore';\nimport 'firebase/storage';\nimport { ReactReduxFirebaseProvider } from 'react-redux-firebase';\nimport { createFirestoreInstance } from 'redux-firestore'\nimport { ConnectedRouter } from 'connected-react-router'\nimport 'react-router-modal/css/react-router-modal.css'\nimport { ModalContainer } from 'react-router-modal';\n\nconst rrfConfig = { useFirestoreForStorageMeta: true } \n\nexport default ({initialState, fbConfig}) => {\n firebase.initializeApp(fbConfig)\n\n\n const store = configureStore(initialState, firebase)\n\n return (\n <Provider store={store}>\n <ConnectedRouter history={history}>\n <ReactReduxFirebaseProvider\n firebase={firebase}\n config={rrfConfig}\n dispatch={store.dispatch}\n createFirestoreInstance={createFirestoreInstance}>\n <div id='audit-review-app'>\n <RootNode />\n <ModalContainer />\n </div>\n </ReactReduxFirebaseProvider>\n </ConnectedRouter>\n </Provider>\n );\n}\n\n\n\n","import _ from 'lodashExtended'\n\nconst getDisputeLedgerItem = (id, state) => {\n return state.disputeLedgerItems.byId[id]\n}\n\nconst getDisputeLedgerItems = (state) => {\n return Object.values(state.disputeLedgerItems.byId)\n}\n\nconst getDisputeLedgerItemsById = (state) => {\n return state.disputeLedgerItems.byId\n}\n\nconst getDisputeLedgerItemsForVendorCredit = (vendorCreditId, state) => {\n return _.filter(getDisputeLedgerItems(state), { vendorCreditId })\n}\nconst getDisputeLedgerItemsForVendorInvoice = (vendorInvoiceId, state) => {\n return _.filter(getDisputeLedgerItems(state), { vendorInvoiceId })\n}\n\nconst getDisputeLedgerItemsByInvoiceId = (state) => {\n return _.groupBy(getDisputeLedgerItems(state), 'vendorInvoiceId')\n}\n\n\nexport {\n getDisputeLedgerItem,\n getDisputeLedgerItems,\n getDisputeLedgerItemsById,\n getDisputeLedgerItemsForVendorCredit,\n getDisputeLedgerItemsForVendorInvoice,\n getDisputeLedgerItemsByInvoiceId\n}\n","import _ from \"lodashExtended\";\n\nconst getVendorCreditAllocations = state => {\n return Object.values(state.vendorCreditAllocations.byId);\n};\n\nconst getVendorCreditAllocationsByInvoiceId = state => {\n return _.groupBy(state.vendorCreditAllocations.byId, \"vendorInvoiceId\");\n};\n\nconst getVendorCreditAllocationsForInvoiceId = (vendorInvoiceId, state) => {\n return _.filter(state.vendorCreditAllocations.byId, { vendorInvoiceId });\n};\n\nconst getVendorCreditAllocationsForCreditId = (vendorCreditId, state) => {\n return _(state.vendorCreditAllocations.byId)\n .reject({ _destroy: \"1\" })\n .filter({ vendorCreditId })\n .value();\n};\n\nconst getVendorCreditAllocationByInvoiceAndCreditId = (\n vendorInvoiceId,\n vendorCreditId,\n state\n) => {\n return _(state.vendorCreditAllocations.byId)\n .reject({ _destroy: \"1\" })\n .find({ vendorInvoiceId, vendorCreditId });\n};\n\nconst getAllVendorCreditAllocationsForCreditId = (vendorCreditId, state) => {\n return _(state.vendorCreditAllocations.byId)\n .filter({ vendorCreditId })\n .value();\n};\n\nexport {\n getVendorCreditAllocations,\n getVendorCreditAllocationsByInvoiceId,\n getVendorCreditAllocationsForInvoiceId,\n getVendorCreditAllocationByInvoiceAndCreditId,\n getVendorCreditAllocationsForCreditId,\n getAllVendorCreditAllocationsForCreditId\n};\n","const getVendorInvoice = (id, state) => {\n return state.vendorInvoices.byId[id]\n}\n\nconst getVendorInvoices = (state) => {\n return Object.values(state.vendorInvoices.byId)\n}\n\nconst getVendorInvoicesById = (state) => {\n return state.vendorInvoices.byId\n}\n\n\nexport {\n getVendorInvoice,\n getVendorInvoices,\n getVendorInvoicesById\n}\n","import _ from 'lodashExtended'\nimport { getAllocationSummary, getGrossCreditBalanceCents } from '../vendorCredit/selectors'\nimport { getVendorInvoice } from '../vendorInvoices/selectors'\n\nconst getShowAllInvoices = (state) => {\n return state.app.showAllInvoices\n}\n\nconst getMode = (state) => {\n return state.app.mode\n}\n\nconst getSelectedInvoiceId = (state) => {\n return state.app.selectedInvoiceId\n}\n\nconst canSubmit = (state) => {\n return(getGrossCreditBalanceCents(state) >= 0 &&\n _.every(getAllocationSummary(state), ({grossBalanceCents}, vendorInvoiceId) => grossBalanceCents >= 0 ))\n}\n\nconst getSelectedInvoiceAllocationSummary = (state) => {\n return getAllocationSummary(state)[getSelectedInvoiceId(state)]\n}\n\nconst getSelectedInvoice = (state) => {\n return getVendorInvoice(getSelectedInvoiceId(state), state)\n}\n\nexport {\n getShowAllInvoices,\n getMode,\n getSelectedInvoiceId,\n canSubmit,\n getSelectedInvoiceAllocationSummary,\n getSelectedInvoice\n}\n","import _ from 'lodashExtended'\nimport { getDisputeLedgerItemsForVendorCredit, getDisputeLedgerItemsByInvoiceId } from '../disputeLedgerItems/selectors'\nimport { getVendorCreditAllocationsForCreditId, getVendorCreditAllocationsByInvoiceId } from '../vendorCreditAllocations/selectors'\nimport { getSelectedInvoiceId } from '../app/selectors'\nimport { getVendorInvoice } from '../vendorInvoices/selectors'\n\nconst getVendorCredit = (state) => {\n return state.vendorCredit\n}\n\nconst getAllocationSummary = (state) => {\n const { id: vendorCreditId } = getVendorCredit(state)\n const disputeLedgerItemsByInvoiceId = getDisputeLedgerItemsByInvoiceId(state)\n const creditAllocationsByInvoiceId = getVendorCreditAllocationsByInvoiceId(state)\n const vendorInvoiceIds = _([\n _.map(getDisputeLedgerItemsForVendorCredit(vendorCreditId, state), 'vendorInvoiceId'),\n _.map(getVendorCreditAllocationsForCreditId(vendorCreditId, state), 'vendorInvoiceId'),\n getSelectedInvoiceId(state) ]).flatten().compact().uniq().value()\n\n var summary = {}\n\n _.each(vendorInvoiceIds, (id) => {\n var x = getVendorInvoice\n const { grossTotalCents } = x(id, state)\n\n\n const thisNoteCreditAllocations = _(creditAllocationsByInvoiceId[id] || []).filter({vendorCreditId}).reject({_destroy: '1'}).value()\n const thisNoteResolvedDisputes = _(disputeLedgerItemsByInvoiceId[id] || []).filter({vendorCreditId}).value()\n\n\n const thisNoteGrossResolvedDisputeCents = _(thisNoteResolvedDisputes).map('grossTotalCents').sum()\n const thisNoteGrossCreditAllocationCents = _(thisNoteCreditAllocations).map('grossTotalCents').sum()\n const thisNoteGrossTotalCreditCents = thisNoteGrossResolvedDisputeCents + thisNoteGrossCreditAllocationCents\n const thisNoteNetTotalCreditCents = Math.round(thisNoteGrossTotalCreditCents / 1.20)\n\n const otherNoteGrossResolvedDisputeCents = _(disputeLedgerItemsByInvoiceId[id] || []).filter(({vendorCreditId: itemVendorCreditId}) => _.isPresent(itemVendorCreditId) && itemVendorCreditId != vendorCreditId).map('grossTotalCents').sum()\n const otherNoteGrossCreditAllocationCents = _(creditAllocationsByInvoiceId[id] || []).filter(({vendorCreditId: itemVendorCreditId}) => _.isPresent(itemVendorCreditId) && itemVendorCreditId != vendorCreditId).map('grossTotalCents').sum()\n const otherNoteGrossTotalCreditCents = otherNoteGrossResolvedDisputeCents + otherNoteGrossCreditAllocationCents\n\n const grossDisputeTotal = _(disputeLedgerItemsByInvoiceId[id] || []).map('grossTotalCents').sum()\n\n const grossTotalCreditCents = otherNoteGrossTotalCreditCents + thisNoteGrossTotalCreditCents\n const grossBalanceCents = grossTotalCents - grossTotalCreditCents\n\n const openToAllocateGrossBalanceCents = grossTotalCents - otherNoteGrossTotalCreditCents - thisNoteGrossResolvedDisputeCents\n const openToResolveDisputeGrossBalanceCents = grossDisputeTotal - otherNoteGrossResolvedDisputeCents\n\n const hasCreditAllocationError = _.some(thisNoteCreditAllocations, ({errors}) => _.isPresent(errors))\n const hasResolvedDisputeError = _.some(thisNoteResolvedDisputes, ({errors}) => _.isPresent(errors))\n\n summary[id] = {\n vendorInvoiceId: id,\n grossTotalCents,\n thisNoteGrossResolvedDisputeCents,\n thisNoteGrossCreditAllocationCents,\n grossTotalCreditCents,\n grossBalanceCents,\n grossDisputeTotal,\n otherNoteGrossTotalCreditCents,\n thisNoteGrossTotalCreditCents,\n thisNoteNetTotalCreditCents,\n openToAllocateGrossBalanceCents,\n openToResolveDisputeGrossBalanceCents,\n hasCreditAllocationError,\n hasResolvedDisputeError,\n hasValidationError: hasCreditAllocationError || hasResolvedDisputeError,\n thisNoteCreditAllocations,\n thisNoteResolvedDisputes\n }\n })\n\n //console.log(summary)\n return summary\n\n}\n\nconst getGrossCreditBalanceCents = (state) => {\n const vendorCredit = getVendorCredit(state)\n const creditAllocations = getVendorCreditAllocationsForCreditId(vendorCredit.id, state)\n const allocatedGrossTotalCents = _(creditAllocations).map('grossTotalCents').sum()\n const resolvedGrossTotalCents = _(getDisputeLedgerItemsForVendorCredit(vendorCredit.id, state)).map('grossTotalCents').sum()\n const grossCreditBalanceCents = vendorCredit.grossTotalCents - (allocatedGrossTotalCents + resolvedGrossTotalCents)\n\n return grossCreditBalanceCents\n}\n\nexport {\n getVendorCredit,\n getAllocationSummary,\n getGrossCreditBalanceCents\n}\n","import { createAction } from 'redux-act';\n\nconst disputesLoaded = createAction(\"disputes loaded for invoice\", (vendorInvoiceId) => { return({ vendorInvoiceId }) });\n\nexport default {\n disputesLoaded,\n}\n\n","import { createAction } from 'redux-act';\n\nconst updateCreditAllocation = createAction(\"set allocated credit args\", (vendorInvoiceId, vendorCreditId, args) => { return( { vendorInvoiceId, vendorCreditId, args } ) });\nconst markForDestroy = createAction(\"mark for destroy the allocated credit\", (id) => { return( { id } ) });\nconst updateFromServer = createAction(\"update allocations from server\");\n\nexport default {\n updateCreditAllocation,\n markForDestroy,\n updateFromServer\n}\n\n","import { createAction } from 'redux-act';\n\nconst setVendorCreditId = createAction(\"set dispute credit note\", (ids, vendorCreditId) => { return( { ids, vendorCreditId } ) });\nconst loadSuccess = createAction(\"dispute item has been loaded success from server\", (loadedDisputeLedgerItems) => { return( { loadedDisputeLedgerItems } ) });\n\nexport default {\n setVendorCreditId,\n loadSuccess\n}\n\n","import actions from './actions'\nimport {checkDisputesLoaded} from './selectors'\nimport vendorCreditAllocationActions from '../vendorCreditAllocations/actions'\nimport submitToServer from 'submitToServer'\nimport { getDisputeLedgerItemsForVendorCredit } from '../disputeLedgerItems/selectors'\nimport disputeLedgerItemsActions from '../disputeLedgerItems/actions'\nimport { getVendorCredit } from '../vendorCredit/selectors'\nimport { getAllVendorCreditAllocationsForCreditId } from '../vendorCreditAllocations/selectors'\nimport { prepareSubmitData } from 'sharedUtils'\nimport _ from 'lodashExtended'\n\nconst submitVendorCredit = () => (dispatch, getState) => {\n const state = getState()\n const vendorCreditPath = state.api.vendorCreditPath\n const vendorCredit = getVendorCredit(state)\n\n var submitData = {\n disputeLedgerItemIds: _.map(getDisputeLedgerItemsForVendorCredit(vendorCredit.id, state), 'id'),\n vendorCreditAllocations: getAllVendorCreditAllocationsForCreditId(vendorCredit.id, state)\n }\n\n submitToServer(vendorCreditPath, { vendorCredit: prepareSubmitData(submitData, ['vendorCreditAllocations']) },\n (data,v) => {\n location.href = vendorCreditPath\n },\n (data, status) => {\n if(status == 422) {\n dispatch(vendorCreditAllocationActions.updateFromServer(_.values(data.vendorCreditAllocations.byId)))\n } else {\n alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`)\n }\n }, { method: 'PUT' })\n}\n\nconst loadDisputeLedgerItems = (vendorInvoiceId) => (dispatch, getState) => {\n const state = getState()\n\n if(!checkDisputesLoaded(vendorInvoiceId, state)) {\n\n const path = state.api.disputeLedgerItemsPath + \"?\" + $.param({vendor_invoice_ids: [vendorInvoiceId]})\n\n submitToServer(path, '',\n (data,v) => {\n dispatch(actions.disputesLoaded(vendorInvoiceId))\n\n if(data.disputeLedgerItems) {\n dispatch(disputeLedgerItemsActions.loadSuccess(data.disputeLedgerItems.byId))\n }\n },\n (data, status) => {\n data\n alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`)\n }, { method: 'GET' }\n )\n }\n}\n\nexport {\n submitVendorCredit,\n loadDisputeLedgerItems\n}\n","import _ from 'lodashExtended'\n\nconst checkDisputesLoaded = (vendorInvoiceId, state) => {\n return _.includes(state.api.loadedDisputeInvoiceIds, vendorInvoiceId)\n}\n\nexport {\n checkDisputesLoaded\n}\n","import { createAction } from 'redux-act';\n\nconst setShowAllInvoices = createAction(\"set showAllInvoices filter\");\nconst setMode = createAction(\"set mode\");\nconst setSelectedInvoice = createAction(\"set selected invoice\");\n\nexport default {\n setShowAllInvoices,\n setMode,\n setSelectedInvoice,\n}\n\n","import actions from './actions'\nimport { loadDisputeLedgerItems } from '../api/operations'\nimport submitToServer from 'submitToServer'\n\nconst selectInvoice = (vendorInvoiceId) => (dispatch, getState) => {\n const state = getState()\n\n dispatch(loadDisputeLedgerItems(vendorInvoiceId))\n dispatch(actions.setSelectedInvoice(vendorInvoiceId))\n\n}\n\nexport {\n selectInvoice\n}\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { getAllocationSummary } from '../vendorCredit/selectors'\nimport { getSelectedInvoiceId } from '../app/selectors'\nimport { getVendorInvoicesById } from '../vendorInvoices/selectors'\nimport { Table } from 'react-bootstrap';\nimport { hMoney } from 'sharedFormatters'\nimport { Link, Btn } from 'sharedComponents'\nimport { selectInvoice} from '../app/operations'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar Summary = ( { summaryData, vendorInvoicesById, selectedInvoiceId, onSelectInvoice } ) => {\n\n const otherNoteCreditCents = _(summaryData).map('otherNoteGrossTotalCreditCents').sum()\n\n var rows = _(summaryData).sortBy(({vendorInvoiceId}) => vendorInvoicesById[vendorInvoiceId].number).map(({\n grossTotalCents,\n hasValidationError,\n thisNoteGrossTotalCreditCents,\n thisNoteNetTotalCreditCents,\n otherNoteGrossTotalCreditCents,\n grossBalanceCents,\n vendorInvoiceId}) => {\n var { number } = vendorInvoicesById[vendorInvoiceId]\n return(\n <tr key={vendorInvoiceId}>\n <td><Link href={`/admin/vendor_invoices/${vendorInvoiceId}`}>{number}</Link></td>\n <td>{hMoney(grossTotalCents)}</td>\n <td>{hMoney(thisNoteGrossTotalCreditCents)}</td>\n { otherNoteCreditCents > 0 ? <td>{hMoney(otherNoteCreditCents)}</td> : null }\n <td>{hMoney(thisNoteNetTotalCreditCents)}</td>\n <td><span className={`${ grossBalanceCents < 0 ? 'text-danger' : null }`}>{hMoney(grossBalanceCents)}</span></td>\n <td className='actions'>\n { hasValidationError ? <i className={`text-danger fa fa-warning`} aria-hidden=\"true\"></i> : null }\n { selectedInvoiceId != vendorInvoiceId ? <Btn styles={`xs ${ hasValidationError ? 'danger' : null}`} onClick={() => onSelectInvoice(vendorInvoiceId)}>{ hasValidationError ? 'Error' : 'View'} </Btn> : \"Selected\"}\n </td>\n </tr>\n )}).value()\n\n return(\n <div className='well'>\n <Table bordered condensed hover >\n <thead>\n <tr>\n <th>Inv #</th>\n <th>Gross Total</th>\n <th>Allocated (G)</th>\n { otherNoteCreditCents > 0 ? <th>Other Credits (G)</th> : null }\n <th>Allocated (N)</th>\n <th>Gross Balance</th>\n <th className='actions'>Actions</th>\n </tr>\n </thead>\n <tbody>\n {rows}\n </tbody>\n </Table>\n </div>\n )\n}\n\n\nSummary.propTypes = {\n};\n\n\nconst mapStateToProps = (state, {}) => {\n return {\n summaryData: getAllocationSummary(state),\n vendorInvoicesById: getVendorInvoicesById(state),\n selectedInvoiceId: getSelectedInvoiceId(state),\n }\n}\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onSelectInvoice: (invoiceId) => { dispatch(selectInvoice(invoiceId))},\n }\n}\n\nSummary = connect(\n mapStateToProps,\n mapDispatchToProps\n)(Summary)\n\n\nexport default Summary;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport classNames from 'classnames';\nimport { getVendorCreditAllocationByInvoiceAndCreditId } from '../vendorCreditAllocations/selectors'\nimport { Btn, ModelErrors } from 'sharedComponents'\nimport { hMoney } from 'sharedFormatters'\nimport actions from '../vendorCreditAllocations/actions'\nimport { getVendorCredit, getGrossCreditBalanceCents } from '../vendorCredit/selectors'\nimport { getSelectedInvoiceAllocationSummary } from '../app/selectors'\n\nvar {\n updateCreditAllocation\n} = actions\n\n\nconst eventToArgs = (event) => {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n return({\n [name]: value\n })\n}\n\nvar TextAreaInput = ({allErrors = {}, value, onChange, label, name, optional = false, placeholder }) => {\n let errors = _.uniq(allErrors[name] || [])\n let hasError = _.isPresent(errors)\n return (\n <div className={classNames('form-group', 'text', { optional: optional, 'form-group-invalid': hasError } )}>\n <label className={classNames('form-control-label', 'text', { optional: optional } )} >{label}</label>\n <textarea className={classNames('form-control', 'string', { optional: optional, 'is-invalid': hasError})} rows=\"5\" placeholder={placeholder}\n value={value} onChange={(e) => onChange(eventToArgs(e)) }\n name={name}></textarea>\n {_.map(errors, (error) => <div key={error} style={{ display: 'block' }} className=\"text-danger invalid-feedback\"><strong>{error}</strong></div> ) }\n </div>\n )\n\n}\n\nvar TextInput = ({allErrors = {}, value, onChange, label, name, optional = false }) => {\n let errors = _.uniq(allErrors[name] || [])\n let hasError = _.isPresent(errors)\n return (\n <div className={classNames('form-group', 'string', { optional: optional, 'form-group-invalid': hasError } )}>\n <label className={classNames('form-control-label', 'string', { optional: optional} )}>{label}</label>\n <input className={classNames('form-control', 'string', { optional: optional, 'is-invalid': hasError })} type=\"text\" value={value} onChange={(e) => onChange(eventToArgs(e))} name={name}/>\n {_.map(errors, (error) => <div key={error} style={{ display: 'block' }} className=\"text-danger invalid-feedback\"><strong>{error}</strong></div> ) }\n </div>\n )\n}\n\n\nclass CreditAllocationForm extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n getToNetGrossCents: null,\n getToNetTotalCents: null,\n }\n this.handleInputChange = this.handleInputChange.bind(this);\n this.handleGetToNetChange = this.handleGetToNetChange.bind(this);\n }\n\n handleInputChange(args) {\n this.props.onUpdate(_.pick(args, ['grossTotal', 'creditReason']))\n //this.setState(args, (x) => {\n //this.props.onUpdate(_.pick(this.state, ['grossTotal', 'creditReason']))\n //});\n }\n\n handleGetToNetChange({getToNetTotal}) {\n var getToNetTotalFloat = parseFloat(getToNetTotal)\n var getToNetGrossFloat = isNaN(getToNetTotalFloat) ? null : (getToNetTotalFloat * 1.2)\n var getToNetTotalCents = isNaN(getToNetTotalFloat) ? null : Math.round(getToNetTotalFloat * 100)\n var getToNetGrossCents = getToNetGrossFloat ? Math.round(getToNetGrossFloat * 100) : null\n\n this.setState({getToNetGrossCents, getToNetTotalCents})\n //this.setState(args, (x) => {\n //this.props.onUpdate(_.pick(this.state, ['grossTotal', 'creditReason']))\n //});\n }\n\n //static getDerivedStateFromProps(nextProps, prevState) {\n //if(nextProps.id != prevState.recordId) {\n //return {\n //recordId: nextProps.id,\n //grossTotal: nextProps.grossTotal,\n //creditReason: nextProps.creditReason\n //}\n //} else {\n //return null\n //}\n //}\n\n render() {\n var { id, grossTotal = '', creditReason = '', grossTotalCents = 0, getToNetTotal, grossResolvedDisputeCents, errors, grossInvoiceBalanceCents, grossCreditBalanceCents, onUpdate, onDelete } = this.props\n const { getToNetGrossCents, getToNetTotalCents } = this.state\n var applyGetToNetGrossCents\n\n if(getToNetGrossCents) {\n applyGetToNetGrossCents = getToNetGrossCents - grossResolvedDisputeCents\n }\n\n const [ maxApplyCents, maxApplyText ] = _([\n [grossInvoiceBalanceCents + grossTotalCents, 'Apply Invoice Balance'],\n [grossCreditBalanceCents + grossTotalCents, 'Apply Credit Balance']\n ]).minBy(([x,y]) => x)\n\n return(\n <div className='row' style={{marginTop: '10px'}}>\n <div className='col-sm-2'>\n  \n </div>\n <div className='col-sm-8'>\n <div className='well'>\n <div className='mb10'>\n <div className='pull-right'>\n { id ? <Btn styles='danger' icon='times' onClick={() => onDelete(id)}>Remove</Btn> : null }\n </div>\n { maxApplyCents != 0 ? <Btn styles='success' onClick={() => this.handleInputChange({grossTotal: maxApplyCents / 100.0}) }>{maxApplyText} {hMoney(maxApplyCents)}</Btn> : null }  \n { applyGetToNetGrossCents && applyGetToNetGrossCents != 0 ? <Btn styles='info' onClick={() => this.handleInputChange({grossTotal: applyGetToNetGrossCents / 100.0}) }>Apply to get to Net {hMoney(getToNetTotalCents)}</Btn> : null }\n </div>\n <br/>\n <TextInput name='grossTotal' value={grossTotal} label='Gross Total £' onChange={this.handleInputChange} allErrors={errors}/>\n <TextInput name='creditReason' value={creditReason} label='Reason For Credit' onChange={this.handleInputChange} allErrors={errors}/>\n <TextInput name='getToNetTotal' value={getToNetTotal} label='Get To Net Total £' onChange={this.handleGetToNetChange} allErrors={errors}/>\n </div>\n </div>\n <div className='col-sm-2'>\n  \n </div>\n </div>\n )\n }\n}\n\n\nCreditAllocationForm.propTypes = {\n vendorInvoiceId: PropTypes.number.isRequired,\n vendorCreditId: PropTypes.number.isRequired\n};\n\n\nconst mapStateToProps = (state, { vendorInvoiceId, vendorCreditId }) => {\n const { grossBalanceCents: grossInvoiceBalanceCents, thisNoteGrossResolvedDisputeCents: grossResolvedDisputeCents} = getSelectedInvoiceAllocationSummary(state)\n const grossCreditBalanceCents = getGrossCreditBalanceCents(state)\n\n return {\n grossInvoiceBalanceCents,\n grossCreditBalanceCents,\n grossResolvedDisputeCents,\n ...getVendorCreditAllocationByInvoiceAndCreditId(vendorInvoiceId, vendorCreditId, state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, { vendorInvoiceId, vendorCreditId }) => {\n return {\n onUpdate: (args) => dispatch(actions.updateCreditAllocation(vendorInvoiceId, vendorCreditId, args )),\n onDelete: (id) => dispatch(actions.markForDestroy(id)),\n }\n}\n\n\nCreditAllocationForm = connect(\n mapStateToProps,\n mapDispatchToProps\n)(CreditAllocationForm)\n\n\nexport default CreditAllocationForm;\n\n\n\n\n\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { Table } from 'react-bootstrap';\nimport { getVendorCredit } from '../vendorCredit/selectors'\nimport { hMoney } from 'sharedFormatters'\nimport { getDisputeLedgerItemsForVendorInvoice } from '../disputeLedgerItems/selectors'\nimport { resolveDispute } from '../disputeLedgerItems/operations'\nimport { getSelectedInvoiceId } from '../app/selectors'\nimport { CheckBoxWithLabel, Link, Btn } from 'sharedComponents'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar DisputeResolveForm = ( { disputeLedgerItems, vendorCreditId, onResolveDispute} ) => {\n\n\n const selectableItemIds = _(disputeLedgerItems).filter(({vendorCreditId: disputeItemVendorCreditId}) => vendorCreditId == disputeItemVendorCreditId || _.isBlank(disputeItemVendorCreditId)).map('id').value()\n\n var rows = _(disputeLedgerItems).orderBy('vendorLocationCode', 'date').map(({id, date, serviceCode,\n vendorServiceCode, vendorLocationCode, grossTotalCents, quantity, unitPriceCents,\n reason, netTotalCents, locationName, vendorCreditId: disputeItemVendorCreditId }) => {\n return(\n <tr key={id}>\n <td>{moment(date).format(\"ddd, DD MMM YYYY\")}</td>\n <td>{locationName}</td>\n <td>{serviceCode}</td>\n <td>{vendorServiceCode}</td>\n <td>{vendorLocationCode}</td>\n <td>{quantity}</td>\n <td>{hMoney(unitPriceCents)}</td>\n <td>{hMoney(netTotalCents)}</td>\n <td>{hMoney(grossTotalCents)}</td>\n <td>{reason}</td>\n <td className='actions'>\n { _.includes(selectableItemIds, id) ?\n <CheckBoxWithLabel checked={vendorCreditId == disputeItemVendorCreditId} onClick={ (isResolved) => onResolveDispute(id, isResolved) }></CheckBoxWithLabel>\n : <Link href={`/admin/vendor_credits/${disputeItemVendorCreditId}`}>Credited Via {disputeItemVendorCreditId}</Link> }\n </td>\n </tr>\n )}).value()\n\n return(\n <div className='row' style={{marginTop: '10px'}}>\n <div className='well'>\n <div className='pull-right mb10'>\n <Btn styles='danger sm' icon='square-o' onClick={() => onResolveDispute(selectableItemIds, false)}>De-Select All</Btn> \n <Btn styles='success sm' icon='check-square-o' onClick={() => onResolveDispute(selectableItemIds, true)}>Select All</Btn>\n </div>\n <Table bordered condensed hover >\n <thead>\n <tr>\n <th>Date</th>\n <th>Location</th>\n <th>VLC</th>\n <th>Anenta Service</th>\n <th>Vendor Service</th>\n <th>Quantity</th>\n <th>Unit</th>\n <th>Net Total</th>\n <th>Gross Total</th>\n <th>Reason</th>\n <th className='actions'>Select</th>\n </tr>\n </thead>\n <tbody>\n {rows}\n </tbody>\n </Table>\n </div>\n </div>\n )\n}\n\nDisputeResolveForm.propTypes = {\n vendorInvoiceId: PropTypes.number.isRequired,\n vendorCreditId: PropTypes.number.isRequired\n};\n\n\nconst mapStateToProps = (state, { vendorInvoiceId } ) => {\n return {\n disputeLedgerItems: getDisputeLedgerItemsForVendorInvoice(vendorInvoiceId, state),\n }\n}\n\nconst mapDispatchToProps = (dispatch, { vendorCreditId }) => {\n return {\n onResolveDispute: (disputeLedgerItemId, isResolved) => dispatch(resolveDispute(disputeLedgerItemId, vendorCreditId, isResolved))\n }\n}\n\nDisputeResolveForm = connect(\n mapStateToProps,\n mapDispatchToProps\n)(DisputeResolveForm)\n\n\nexport default DisputeResolveForm;\n\n\n\n\n\n\n","import actions from './actions'\nimport { getVendorCreditAllocations } from '../vendorCreditAllocations/selectors'\nimport { getDisputeLedgerItemsForVendorCredit, getDisputeLedgerItems, getDisputeLedgerItem } from './selectors'\nimport { getVendorCredit } from '../vendorCredit/selectors'\n\nconst resolveDispute = (disputeLedgerItemIds, vendorCreditId, isResolved) => (dispatch, getState) => {\n const state = getState()\n dispatch(actions.setVendorCreditId(disputeLedgerItemIds, isResolved ? vendorCreditId : null))\n}\n\nexport {\n resolveDispute\n}\n\n","import React from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport { Alert } from 'react-bootstrap'\nimport { hMoney } from 'sharedFormatters'\nimport { getVendorCredit, getGrossCreditBalanceCents } from '../vendorCredit/selectors'\n\n\n//import { DropdownSelect, DateSelect, ModelErrors, Link } from 'sharedComponents'\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar CreditBalanceAlert = ( { grossCreditBalanceCents, vendorCredit } ) => {\n\n if(grossCreditBalanceCents < 0) {\n return(\n <Alert bsStyle='danger'>\n <h4 style={{color: '#434a54'}}>You have gone over the available credit! {hMoney(vendorCredit.grossTotalCents)}</h4>\n <p style={{color: '#434a54'}}>The current balance is <strong>{hMoney(grossCreditBalanceCents)}</strong></p>\n </Alert>\n )\n } else if(grossCreditBalanceCents == 0) {\n return(<Alert bsStyle='success'>\n <h4 style={{color: '#434a54'}}> All credit used! {hMoney(vendorCredit.grossTotalCents)}</h4>\n <p style={{color: '#434a54'}}>There is no credit left to allocate on this note</p>\n </Alert>\n )\n } else if (grossCreditBalanceCents > 0){\n return(\n <Alert bsStyle='info'>\n <h4 style={{color: '#434a54'}}>Credit remaining {hMoney(grossCreditBalanceCents)}</h4>\n </Alert>\n )\n }\n}\n\n\n\nCreditBalanceAlert.propTypes = {\n};\n\n\nconst mapStateToProps = (state, {}) => {\n return {\n vendorCredit: getVendorCredit(state),\n grossCreditBalanceCents: getGrossCreditBalanceCents(state)\n }\n}\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n }\n}\n\nCreditBalanceAlert = connect(\n mapStateToProps,\n mapDispatchToProps\n)(CreditBalanceAlert)\n\n\nexport default CreditBalanceAlert;\n\n\n\n\n\n\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport Select from 'react-select'\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended'\nimport { PDFObject } from 'react-pdfobject'\nimport { getVendorCredit, getAllocationSummary } from '../vendorCredit/selectors'\nimport { getVendorInvoices } from '../vendorInvoices/selectors'\nimport { submitVendorCredit } from '../api/operations'\nimport { getShowAllInvoices, getMode, getSelectedInvoiceId, getSelectedInvoice, canSubmit, getSelectedInvoiceAllocationSummary } from '../app/selectors'\nimport { hMoney } from 'sharedFormatters'\nimport { Link, CheckBoxWithLabel, Btn } from 'sharedComponents'\nimport appActions from '../app/actions'\nimport { selectInvoice } from '../app/operations'\nimport Summary from './Summary'\nimport CreditAllocationForm from './CreditAllocationForm'\nimport DisputeResolveForm from './DisputeResolveForm'\nimport CreditBalanceAlert from './CreditBalanceAlert'\n\nconst filterOptions = (candidate, input) => {\n input = _.lowerCase(_.trim(input))\n candidate\n input\n if(_.isBlank(input)) {\n return true\n } else {\n return _.lowerCase(candidate.data.searchLabel).indexOf(input) > -1;\n }\n};\n\n\nconst getOption = ({id, number, billingPeriodMonth, grossTotalCents, inDisputeGrossTotalCents}) => {\n const searchLabel = `${number} - ${billingPeriodMonth} ${inDisputeGrossTotalCents > 0 ? `dispute ${hMoney(inDisputeGrossTotalCents)}` : ''}`\n return { searchLabel, label: <span>{number} - {billingPeriodMonth} {hMoney(grossTotalCents)} {inDisputeGrossTotalCents > 0 ? <strong>(in dispute {hMoney(inDisputeGrossTotalCents)})</strong> : ''}</span>, value: id }\n}\n\n\nvar App = ({vendorCredit, canSubmit, vendorInvoices, selectedInvoice, showAllInvoices, hasAnyValidationError,\n mode, selectedInvoiceAllocationSummary, onSelectInvoice, onSetShowAllInvoices, onSave, onSetMode, ...restProps}) => {\n var invoiceSelectOptions, invoiceSelectPlaceholder, form, allSelectOptions\n var selectedInvoiceOption = null\n\n const { hasValidationError, hasCreditAllocationError, thisNoteGrossCreditAllocationCents, thisNoteGrossResolvedDisputeCents, openToAllocateGrossBalanceCents, openToResolveDisputeGrossBalanceCents } = selectedInvoiceAllocationSummary || {}\n\n if(showAllInvoices) {\n allSelectOptions = []\n invoiceSelectOptions = _(vendorInvoices).groupBy('vendorAccountName').map((invoices, vendorAccountName) => {\n const options = _(invoices).sortBy('billingPeriodMonthId').map((item) => {\n return getOption(item)\n }).value()\n\n allSelectOptions = allSelectOptions.concat(options)\n\n return {\n label: vendorAccountName,\n options\n }\n }).value()\n\n invoiceSelectPlaceholder = 'Select from all Invoices'\n } else {\n invoiceSelectOptions = _(vendorInvoices).filter(({vendorAccountId}) => vendorAccountId == vendorCredit.vendorAccountId ).sortBy('billingPeriodMonthId').map((item) => {\n return getOption(item)\n }).value()\n invoiceSelectPlaceholder = `Select Invoice from ${vendorCredit.vendorAccountName}`\n allSelectOptions = invoiceSelectOptions\n }\n\n if(selectedInvoice) {\n selectedInvoiceOption = _.find(allSelectOptions, {value: selectedInvoice.id})\n\n if(mode == 'credit-allocation') {\n form = <CreditAllocationForm vendorInvoiceId={selectedInvoice.id} vendorCreditId={vendorCredit.id}/>\n } else if(mode == 'dispute-resolution') {\n form = <DisputeResolveForm vendorInvoiceId={selectedInvoice.id} vendorCreditId={vendorCredit.id}/>\n }\n }\n\n return(\n <div>\n <div className='row'>\n <div className='col-sm-4'>\n <div className=\"info-area\">\n <p>\n <label>Vendor Account</label><span className=\"info\"><Link href={`/admin/vendor_accounts/${vendorCredit.vendorAccountId}`}>{vendorCredit.vendorAccountName}</Link></span>\n </p>\n <p>\n <label>Gross Total</label><span className=\"info\">{hMoney(vendorCredit.grossTotalCents)}</span>\n </p>\n </div>\n <Summary/>\n <CreditBalanceAlert/>\n <Btn styles={`block ${canSubmit && !hasAnyValidationError ? 'success' : 'danger'}`} disabled={!canSubmit} icon={canSubmit && !hasAnyValidationError ? 'check' : 'warning'} onClick={onSave}>{hasAnyValidationError ? 'Error' : 'Save'}</Btn>\n </div>\n <div className='col-sm-8'>i\n { vendorCredit.scanUrl ? <PDFObject url={vendorCredit.scanUrl} height='500px'/> : null }\n </div>\n </div>\n <div className='row' style={{marginTop: '30px'}}>\n <div className='col-sm-2'>\n  \n </div>\n <div className='col-sm-8'>\n <div style={{marginBottom: '10px'}} >\n <CheckBoxWithLabel checked={showAllInvoices} color='white' onClick={onSetShowAllInvoices}>Credit applies to other accounts</CheckBoxWithLabel>\n </div>\n <Select options={invoiceSelectOptions} filterOption={filterOptions} value={selectedInvoiceOption} onChange={({value}) => onSelectInvoice(value) } name=\"invoice\" placeholder={invoiceSelectPlaceholder} />\n </div>\n <div className='col-sm-2'>\n  \n </div>\n </div>\n { selectedInvoiceAllocationSummary ?\n <div className='row' style={{marginTop: '30px', padding: '10px'}}>\n <div className='col-sm-6' style={{paddingRight: '10px'}}>\n <Btn styles={`block ${ hasCreditAllocationError ? 'danger' : (mode == 'credit-allocation' ? 'primary' : null) }`} icon={hasCreditAllocationError ? 'warning' : null }onClick={()=> onSetMode('credit-allocation')}>Apply to the remaining balance ({hMoney(thisNoteGrossCreditAllocationCents)} / {hMoney(openToAllocateGrossBalanceCents)})</Btn>\n </div>\n <div className='col-sm-6' style={{paddingLeft: '10px'}}>\n <Btn styles={`block ${ mode == 'dispute-resolution' ? 'primary' : null }`} onClick={()=> onSetMode('dispute-resolution')}>Apply against disputes ({hMoney(thisNoteGrossResolvedDisputeCents)} / {hMoney(openToResolveDisputeGrossBalanceCents)})</Btn>\n </div>\n </div> : null }\n {form}\n </div>\n )\n}\n\nApp.propTypes = {\n\n}\n\nconst mapStateToProps = (state, props) => {\n\n\n const selectedInvoiceId = getSelectedInvoiceId(state)\n const allocationSummary = getAllocationSummary(state)\n const selectedInvoiceAllocationSummary = allocationSummary[selectedInvoiceId]\n const vendorInvoices = getVendorInvoices(state)\n\n const hasAnyValidationError = _.some(allocationSummary, 'hasValidationError')\n\n return {\n vendorCredit: getVendorCredit(state),\n vendorInvoices,\n showAllInvoices: getShowAllInvoices(state),\n mode: getMode(state),\n selectedInvoiceAllocationSummary,\n canSubmit: canSubmit(state),\n selectedInvoice: getSelectedInvoice(state),\n hasAnyValidationError\n }\n}\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {\n onSetShowAllInvoices: (value) => { dispatch(appActions.setShowAllInvoices(value))},\n onSetMode: (mode) => { dispatch(appActions.setMode(mode))},\n onSave: () => { dispatch(submitVendorCredit())},\n onSelectInvoice: (invoiceId) => { dispatch(selectInvoice(invoiceId))},\n }\n}\n\nApp = connect(\n mapStateToProps,\n mapDispatchToProps\n)(App)\n\nexport default App\n\n\n\n\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\n\nconst {\n setShowAllInvoices,\n setMode,\n setSelectedInvoice,\n setCreditBalanceCents\n} = actions\n\nconst reducer = createReducer({\n [setShowAllInvoices]: (app, showAllInvoices ) => {\n return { ...app, showAllInvoices, selectedInvoiceId: null }\n },\n [setMode]: (app, mode) => {\n return dotProp.set(app, 'mode', mode)\n },\n [setSelectedInvoice]: (app, invoiceId) => {\n return dotProp.set(app, 'selectedInvoiceId', invoiceId)\n },\n [setCreditBalanceCents]: (app, grossCreditBalanceCents) => {\n return dotProp.set(app, 'grossCreditBalanceCents', grossCreditBalanceCents)\n },\n},\n{\n})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as appActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\n\nconst d = dotProp\nconst {\n disputesLoaded,\n} = actions\n\nconst reducer = createReducer({\n [disputesLoaded]: (api, {vendorInvoiceId} ) => {\n return d.set(api, 'loadedDisputeInvoiceIds.$end', vendorInvoiceId)\n },\n},\n{})\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as apiActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\n\nconst {\n} = actions\n\nconst reducer = createReducer({\n //[setGrossCreditBalanceCents]: (vendorCredit, grossCreditBalanceCents) => {\n //return dotProp.set(vendorCredit, 'grossCreditBalanceCents', grossCreditBalanceCents)\n //},\n},\n{})\n\n\nexport default reducer\n\n","import { createAction } from 'redux-act';\n\n//const setGrossCreditBalanceCents = createAction(\"set current gross balance total cents\");\n\nexport default {\n //setGrossCreditBalanceCents,\n}\n\n","import reducer from './reducer'\n\nexport { default as vendorCreditActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\n\nconst d = dotProp\n\nconst {\n setVendorCreditId,\n loadSuccess\n} = actions\n\nconst reducer = createReducer({\n [setVendorCreditId]: (disputeLedgerItems, { ids, vendorCreditId } ) => {\n return _.reduce(_.flatten([ids]), (result, id) => {\n return dotProp.merge(result, `byId.${id}`, { vendorCreditId })\n }, disputeLedgerItems)\n },\n [loadSuccess]: (disputeLedgerItems, { loadedDisputeLedgerItems } ) => {\n return _.reduce(loadedDisputeLedgerItems, (result, disputeLedgerItem) => {\n return d.set(result, `byId.${disputeLedgerItem.id}`, disputeLedgerItem)\n }, disputeLedgerItems)\n },\n\n\n},\n{})\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as disputeLedgerItemsActions } from \"./actions\";\n\nexport default reducer\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\nimport { getTempId } from 'sharedUtils'\nvar d = dotProp\n\nconst {\n updateCreditAllocation,\n markForDestroy,\n updateFromServer\n} = actions\n\nconst reducer = createReducer({\n [updateCreditAllocation]: (vendorCreditAllocations, { vendorInvoiceId, vendorCreditId, args } ) => {\n const { id = getTempId() } = (_.find(vendorCreditAllocations.byId, { vendorInvoiceId, vendorCreditId }) || {})\n\n var newArgs = { ...args }\n\n if(_.has(newArgs, 'grossTotal')) {\n var grossTotalFloat = parseFloat(newArgs.grossTotal)\n newArgs.grossTotalCents = isNaN(grossTotalFloat) ? 0 : Math.round(grossTotalFloat * 100)\n }\n\n return dotProp.merge(vendorCreditAllocations, `byId.${id}`, { ...newArgs, id, vendorCreditId, vendorInvoiceId })\n },\n [updateFromServer]: (vendorCreditAllocations, allocationsFromServer ) => {\n return _.reduce(allocationsFromServer, (result, allocation) => {\n return d.set(result, `byId.${allocation.id}`, allocation)\n }, vendorCreditAllocations)\n },\n [markForDestroy]: (vendorCreditAllocations, { id } ) => {\n return dotProp.merge(vendorCreditAllocations, `byId.${id}`, { '_destroy': '1' } )\n },\n},\n{})\n\nexport default reducer\n\n\n","import reducer from './reducer'\n\nexport { default as vendorCreditAllocationsActions } from \"./actions\";\n\nexport default reducer\n","import { createReducer } from 'redux-act';\nimport dotProp from 'dot-prop-immutable'\nimport appReducer from './app'\nimport apiReducer from './api'\nimport vendorCreditReducer from './vendorCredit'\nimport disputeLedgerItemsReducer from './disputeLedgerItems'\nimport vendorCreditAllocationsReducer from './vendorCreditAllocations'\n\nconst rootReducer = (state = {}, action) => {\n\n return {\n ...state,\n app: appReducer(state.app, action),\n api: apiReducer(state.api, action),\n vendorCredit: vendorCreditReducer(state.vendorCredit, action),\n disputeLedgerItems: disputeLedgerItemsReducer(state.disputeLedgerItems, action),\n vendorCreditAllocations: vendorCreditAllocationsReducer(state.vendorCreditAllocations, action)\n }\n\n}\n\nexport default rootReducer\n\n","import React from \"react\"\nimport { Provider } from 'react-redux';\nimport { RootNode, configureStore } from '../apps/allocate-credit'\n\nexport default (props) => {\n return (\n <Provider store={configureStore(props)}>\n <RootNode/>\n </Provider>\n );\n}\n\n","import { createStore, applyMiddleware } from 'redux';\nimport rootReducer from './reducer'\nimport thunk from 'redux-thunk'\nimport { composeWithDevTools } from 'redux-devtools-extension';\n\nexport default function configureStore(initialState) {\n\n const store = createStore(rootReducer,\n initialState,\n composeWithDevTools(applyMiddleware(thunk)));\n\n if (module.hot) {\n module.hot.accept('./reducer', () => {\n const nextRootReducer = require('./reducer').default;\n store.replaceReducer(nextRootReducer);\n });\n }\n\n return store;\n\n}\n","import { createAction } from 'redux-act';\n\nconst setSubmitting = createAction(\"I set the form submitting bool\")\nconst updateForm = createAction(\"I set the form data\")\nconst formLoaded = createAction(\"form is loaded\")\nconst clearForm = createAction(\"I cleared the form\")\n\n\nexport default {\n setSubmitting,\n updateForm,\n formLoaded,\n clearForm\n}\n\n","import { createAction } from \"redux-act\";\n\nconst reloadServices = createAction(\"Reload Services\");\n\nexport default {\n reloadServices,\n};\n","import { createAction } from \"redux-act\";\n\nconst loadServiceTimeline = createAction(\"TIMELINE_LOAD_START\");\nconst loadServiceTimelineSuccess = createAction(\"TIMELINE_LOAD_SUCCESS\");\nconst loadServiceTimelineError = createAction(\"TIMELINE_LOAD_ERROR\");\n\nexport default {\n loadServiceTimeline,\n loadServiceTimelineSuccess,\n loadServiceTimelineError,\n};\n","import _ from 'lodashExtended'\n\nconst getCurrentForm = (state) => state.app.currentForm\n\n\nexport {\n getCurrentForm\n}\n","import actions from \"./actions\";\nimport serviceActions from \"../services/actions\";\nimport serviceTimelineActions from \"../serviceTimeline/actions\";\nimport { push } from \"redux-first-history\";\nimport { getCurrentForm } from \"./selectors\";\nimport { prepareSubmitData } from \"sharedUtils\";\n\nconst selectMonth = (monthId) => (dispatch, getState) => {\n const state = getState();\n\n const currentForm = getCurrentForm(state);\n\n if (_.isPresent(_.get(currentForm, \"form.transitionOn\"))) {\n monthId = parseInt(monthId);\n const year = Math.floor(monthId / 12) + 1970;\n const month = (monthId % 12) + 1;\n\n const date = new Date(`${year}-${month}-01`).toISOString().split(\"T\")[0];\n\n dispatch(actions.updateForm({ transitionOn: date }));\n }\n\n dispatch(push(`/month/${monthId}`));\n};\n\nconst loadForm = (name, url) => (dispatch, getState) => {\n fetch(url, {\n credentials: \"same-origin\",\n headers: {\n Accept: \"application/json\",\n },\n })\n .then((res) => res.json())\n .then((data) => {\n dispatch(actions.formLoaded({ ...data, name, url }));\n })\n .catch((e) => {\n alert(e);\n });\n};\n\nconst submitForm = () => async (dispatch, getState) => {\n const currentForm = getCurrentForm(getState());\n const { form, url } = currentForm;\n const attributeKeyNames = [];\n\n dispatch(actions.setSubmitting(true));\n\n try {\n const response = await fetch(url, {\n method: \"POST\",\n credentials: \"same-origin\",\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(\n prepareSubmitData(\n { service_mapping: _.omit(form, [\"submitting\"]) },\n attributeKeyNames,\n ),\n ),\n });\n const data = await response.json();\n\n dispatch(actions.setSubmitting(false));\n\n if (response.status === 422) {\n dispatch(actions.formLoaded(data));\n } else if (response.status === 201) {\n dispatch(refreshData());\n dispatch(actions.clearForm());\n } else {\n console.error(\"Unexpected response:\", response);\n }\n } catch (error) {\n console.error(\"Error submitting the form:\", error);\n dispatch(actions.setSubmitting(false));\n }\n};\n\nconst refreshData = () => async (dispatch, getState) => {\n const { serviceMappingPath: url } = getState();\n try {\n dispatch(serviceTimelineActions.loadServiceTimeline());\n\n const response = await fetch(url, {\n method: \"GET\",\n credentials: \"same-origin\",\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n });\n\n if (response) {\n const data = await response.json();\n dispatch(serviceTimelineActions.loadServiceTimelineSuccess(data));\n dispatch(serviceActions.reloadServices(data));\n } else {\n throw new Error(\"Failed to fetch data\");\n }\n } catch (error) {\n dispatch(serviceTimelineActions.loadServiceTimelineError(error));\n }\n};\n\nexport { selectMonth, loadForm, submitForm, refreshData };\n","import React, { useEffect, useMemo, useRef } from 'react'\nimport PropTypes from 'prop-types'\nimport classNames from 'classnames'\nimport createGuid from 'createGuid'\nimport ReactTooltip from 'react-tooltip'\nimport { Link } from 'sharedComponents'\nimport { faQuestionCircle } from '@fortawesome/free-regular-svg-icons'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { averageHex, colorShade } from '../utils'\nimport { chain, isEmpty, map } from 'lodash'\nimport { BillingDot, BillingDotHole, BillingInfo } from './BillingInfo'\n\nfunction isTerminationMonth (terminationDate, currentMonth) {\n const termination = new Date(terminationDate)\n return (\n termination.getFullYear() === currentMonth.year &&\n termination.getMonth() === new Date(currentMonth.name + ' 1').getMonth()\n )\n}\n\nconst unexpectedAccountColor = '#D8D8D8'\n\nconst baseStyles = ({ isTerminatedThisMonth }) => ({\n height: '50px',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n borderBottom: '1px solid #AAB2BD',\n borderLeft: isTerminatedThisMonth\n ? '1px dashed rgba(252, 90, 90, 1)'\n : ''\n})\n\nconst ServiceTimeline = ({\n serviceTimeline,\n onSelectMonth,\n selectMonthId,\n services,\n ...rest\n}) => {\n const legendColor = useMemo(\n () => averageHex(map(services, 'color')),\n [services]\n )\n const { vendorAccounts, months } = serviceTimeline\n\n const legendItems = [\n {\n text: 'No Billing In Desired Account',\n color: 'transparent',\n background: legendColor,\n isDotHole: true\n },\n {\n text: 'Vendor billed Location in Desired Account',\n color: colorShade(legendColor, -70),\n background: legendColor\n },\n {\n text: 'Vendor did not bill location but did bill into Desired account',\n color: colorShade(legendColor, -70),\n background: legendColor,\n isDotHole: true\n },\n {\n text: 'Vendor billed Location in an unexpected account',\n color: colorShade(unexpectedAccountColor, -70),\n background: unexpectedAccountColor\n },\n {\n text: 'Vendor did not bill location but it was not expected',\n color: 'transparent',\n background: unexpectedAccountColor,\n isDotHole: true\n }\n ]\n\n const flexContainer = {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n width: '100%'\n }\n\n // Adjust scrollbar to show selected month\n const scrollContainerRef = useRef(null)\n\n useEffect(() => {\n const scrollingContainer = scrollContainerRef.current\n if (scrollingContainer) {\n const selectedElement = scrollingContainer.querySelector('.selected')\n if (selectedElement) {\n const position =\n selectedElement.offsetLeft -\n scrollingContainer.offsetWidth / 2 +\n selectedElement.offsetWidth / 2\n scrollingContainer.scrollLeft = position\n }\n }\n }, [])\n\n return (\n <div className='billing-history well' style={{ position: 'relative' }}>\n <div\n style={{\n display: 'flex'\n }}\n >\n <div>\n <div\n style={{\n height: '70px',\n borderBottom: '1px solid #AAB2BD',\n borderRight: '1px solid #AAB2BD',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n padding: '5px'\n }}\n >\n Account Number\n </div>\n\n {map(vendorAccounts, ({ number, uuid, name, id }) => {\n const dataTooltipId = createGuid()\n return (\n <div\n key={`${uuid}-key`}\n style={{\n height: '50px',\n borderBottom: '1px solid #AAB2BD',\n borderRight: '1px solid #AAB2BD',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center'\n }}\n >\n <ReactTooltip id={dataTooltipId} type='dark' effect='solid'>\n {name}\n </ReactTooltip>\n <Link\n href={`/admin/vendor_accounts/${id}`}\n target='_blank'\n data-tip\n data-for={dataTooltipId} rel='noreferrer'\n >\n {number}\n </Link>\n </div>\n )\n })}\n </div>\n <div>\n <div className='scrolling-wrapper-flexbox' ref={scrollContainerRef}>\n {chain(months)\n .groupBy('year')\n .map((months, year) => {\n return (\n <div className='billing-year' key={year}>\n <div\n style={{\n borderBottom: '1px solid #AAB2BD',\n fontSize: '1.875em',\n paddingLeft: '5px',\n height: '50px'\n }}\n >\n {year}\n </div>\n <div>\n {map(months, (month) => {\n const {\n vendorAccountServiceMappings,\n locationVendorAccountUuids\n } = month\n\n return (\n <div\n key={month.id}\n className={classNames('billing-month', {\n selected: selectMonthId === month.id\n })}\n onClick={() => onSelectMonth(month.id)}\n >\n <div\n className='billing-month-cell'\n style={{\n borderBottom: '1px solid #AAB2BD',\n height: '20px'\n }}\n >\n {month.name[0]}\n </div>\n {map(vendorAccounts, ({ uuid, closedMonth, closedOn }) => {\n const serviceUuids = vendorAccountServiceMappings[uuid]\n const color = isEmpty(serviceUuids)\n ? '#D8D8D8'\n : averageHex(map(serviceUuids, (serviceUuid) => services[serviceUuid].color))\n\n const isTerminatedThisMonth = serviceUuids?.length > 0 &&\n isTerminationMonth(services[serviceUuids[0]].terminationDate, month)\n\n const monthClosed = closedMonth && closedMonth === month.id\n const closedAccount = closedMonth && closedMonth <= month.id\n\n if (\n uuid === 'a82c891c-1238-463a-8d62-49f989ed532f'\n ) {\n debugger // eslint-disable-line no-debugger\n }\n return (\n <div\n key={`${uuid}-${month.id}`}\n style={{\n ...baseStyles({ isTerminatedThisMonth })\n }}\n className={`billing-month-cell ${isTerminatedThisMonth ? 'terminated' : ''}`}\n data-tip\n id={isTerminatedThisMonth ? 'isTerminated' : ''}\n data-for={isTerminatedThisMonth ? 'isTerminated' : ''}\n >\n <BillingInfo\n uuid={uuid}\n closedAccount={closedAccount}\n locationVendorAccountUuids={locationVendorAccountUuids}\n color={color}\n isTerminatedThisMonth={isTerminatedThisMonth}\n serviceUuids={serviceUuids}\n monthClosed={monthClosed}\n month={month}\n closedOn={closedOn}\n />\n </div>\n )\n })}\n </div>\n )\n })}\n </div>\n </div>\n )\n })\n .reverse()\n .value()}\n </div>\n </div>\n </div>\n\n <div className='info-icon well'>\n <ReactTooltip id='legend-tooltip' type='dark' effect='solid'>\n <div style={{ ...flexContainer, flexDirection: 'column' }}>\n {legendItems.map((item) => (\n <div style={{ ...flexContainer, gap: '1em' }} key={item.text}>\n <span\n className='service-account-bar'\n style={{\n backgroundColor: item.background,\n width: '45px',\n display: 'flex'\n }}\n >\n {item.isDotHole\n ? (\n <BillingDotHole color={item.color} />\n )\n : (\n <BillingDot color={item.color} />\n )}\n </span>\n <h6 style={{ flex: 1 }}>{item.text}</h6>\n </div>\n ))}\n </div>\n </ReactTooltip>\n <FontAwesomeIcon\n className='text-info'\n style={{ color: '#979797' }}\n icon={faQuestionCircle}\n size='2x'\n data-tip\n data-for='legend-tooltip'\n />\n </div>\n </div>\n )\n}\n\nServiceTimeline.propTypes = {\n onSelectMonth: PropTypes.func.isRequired,\n selectMonthId: PropTypes.number.isRequired\n}\n\nexport default ServiceTimeline\n","import React, { useState, useEffect } from 'react'\nimport PropTypes from 'prop-types'\nimport _ from 'lodashExtended'\nimport classNames from 'classnames'\nimport ReactTooltip from 'react-tooltip'\nimport createGuid from 'createGuid'\nimport { useSortBy, useTable } from \"react-table\";\nimport { DropdownSelect } from 'sharedComponents'\nimport { Link } from 'sharedComponents';\n\n\nfunction useFetch(url, opts, defaultData = null, extraDep) {\n const [data, setData] = useState(defaultData);\n useEffect(() => {\n fetch(url, opts)\n .then((res) => res.json())\n .then((data) => {\n setData(data);\n })\n .catch((e) => {\n alert(e);\n });\n }, [url, extraDep]);\n return [data, setData];\n}\n\n\nconst useRowSpan = (instance) => {\n const { allColumns } = instance;\n let rowSpanHeaders = [];\n\n allColumns.forEach((column) => {\n const { id, enableRowSpan } = column;\n\n if (enableRowSpan) {\n rowSpanHeaders = [\n ...rowSpanHeaders,\n { id, topCellValue: null, topCellIndex: 0 }\n ];\n }\n\n Object.assign(instance, { rowSpanHeaders });\n });\n};\n\n\nconst ACCOUNT_HEADER = \"ACCOUNT\"\n\nvar MonthDetails = ({\n url,\n services,\n onSelectMonth\n}) => {\n\n //const [data, setData, loading, hasError] = useFetch(url, {\n const [data, setData] = useFetch(\n url,\n {\n credentials: \"same-origin\",\n headers: {\n Accept: \"application/json\",\n },\n },\n { lines: [], vendorAccounts: [], vendorAccountServiceMappings: {} },\n services\n );\n\n const columns = React.useMemo(() => {\n return [\n {\n Header: \"DATE\",\n cellClassName: 'billing-details-date',\n accessor: \"date\",\n enableRowSpan: true,\n Cell: ({ value }) => moment(value).format(\"dddd DD\")\n },\n {\n Header: ACCOUNT_HEADER,\n cellClassName: 'billing-details-account',\n //combine the date and uuid in order to avoid the rowspan on accounts across dates\n accessor: (row) => row.date + row.vendorAccountUuid,\n enableRowSpan: true,\n Cell: ({row }) => {\n var { vendorAccountUuid: uuid } = row.original\n if(_.isBlank(uuid)) { return null } else {\n const dataTooltipId = createGuid()\n const vendorAccount = _.find(data.vendorAccounts, {uuid})\n return(<>\n <ReactTooltip id={dataTooltipId} type='dark' effect='solid'>\n {vendorAccount.name}\n </ReactTooltip>\n <Link href={`/admin/vendor_accounts/${vendorAccount.id}`} target='_blank' data-tip data-for={dataTooltipId}>\n { vendorAccount.number }\n </Link>\n </>)\n\n }\n }\n },\n {\n Header: \"INVOICE\",\n accessor: \"vendorInvoiceId\",\n cellClassName: 'billing-details-invoice',\n enableRowSpan: true,\n\n Cell: ({value, row}) => {\n if(_.isBlank(value)) { return null } else {\n var dataTooltipId = createGuid()\n return(<>\n <ReactTooltip id={dataTooltipId} type='dark' effect='solid'>\n {row.original.vendorInvoiceNumber}\n </ReactTooltip>\n <Link href={`/admin/vendor_invoices/${value}`} target='_blank'>\n <i\n className={`text-info fa fa-lg fa-file-text`}\n data-tip data-for={dataTooltipId}\n />\n </Link>\n\n </>)\n\n }\n }\n\n\n },\n {\n Header: \"VLC\",\n accessor: \"vendorLocationCode\",\n cellClassName: 'billing-details-vlc',\n enableRowSpan: true,\n Cell: ({value, row}) => _.isBlank(value) ? null : <Link target='_blank' href={`/admin/vendors/${row.original.vendorId}/location_mappings/${encodeURIComponent(value)}`}>{value}</Link>\n },\n {\n Header: \"VENDOR DESCRIPTOR\",\n accessor: \"vendorLocationDescriptor\",\n cellClassName: 'billing-details-vl-descriptor',\n Cell: ({ value: vendorLocationDescriptor, row }) => _.isPresent(row.original.vendorInvoiceId) ? vendorLocationDescriptor || \"Not Specified\" : null\n },\n {\n Header: \"Data\",\n accessor: \"chargeData\",\n cellClassName: 'billing-details-vl-data',\n Cell: ({ value: chargeData }) => {\n\n if(_.isBlank(chargeData)) { return null } else {\n var dataTooltipId = createGuid()\n\n return(<>\n <ReactTooltip id={dataTooltipId} type='dark' effect='solid'>\n {_.map(chargeData, (data, i) => <div key={i}>{data}</div>)}\n </ReactTooltip>\n <i\n className={`text-info fa fa-lg fa-sticky-note`}\n data-tip data-for={dataTooltipId}\n />\n </>)\n\n }\n }\n }\n ];\n }, [data]);\n\n const {\n getTableProps,\n getTableBodyProps,\n headerGroups,\n rows,\n prepareRow,\n rowSpanHeaders\n } = useTable(\n { columns, data: data.lines },\n (hooks) => hooks.useInstance.push(useRowSpan),\n useSortBy\n );\n\n const getRowProps = (row) => {\n return {\n className: classNames(\"billing-month-details-date-row\", _.isBlank(row.original.chargeData) ? 'blank' : 'present' )\n }\n }\n\n const getCellProps = (cell) => {\n var style = {}\n if (cell.column.Header == ACCOUNT_HEADER) {\n const { date } = cell.row.original\n\n const { vendorAccountServiceMappings = {} } = data\n const serviceId = _.get(vendorAccountServiceMappings, `${date}.${cell.row.original.vendorAccountUuid}`)\n\n if(_.isPresent(serviceId)) {\n //if(_.isPresent(vendorAccountServiceMappings)) { debugger }\n style['borderLeft'] = `9px solid ${services[serviceId].color}`\n }\n\n }\n return {\n style: style,\n className: classNames(cell.column.cellClassName, {'multi-entry': cell.rowSpan > 1})\n }\n }\n\n if(_.isBlank(data.lines)) {\n return(<div className='well'>Loading...</div>)\n } else {\n\n let {\n month,\n vendorAccounts,\n dates\n } = data\n\n console.log(data)\n\n return (\n <div className=\"billing-month-details\">\n <div style={{ textAlign: \"center\" }}>\n <i\n className={`text-info fa fa-chevron-left`}\n onClick={() => onSelectMonth(month.lastMonth.id)}\n style={{ cursor: \"pointer\" }}\n />{\" \"}\n  \n {month.monthName}  \n <i\n className={`text-info fa fa-chevron-right`}\n onClick={() => onSelectMonth(month.nextMonth.id)}\n style={{ cursor: \"pointer\" }}\n />{\" \"}\n  \n <DropdownSelect\n title=\"Select Year\"\n target={month.year}\n onChange={onSelectMonth}\n currentValue={month.id}\n options={_.map(month.monthYears, ({ year, id }) => {\n return { value: id, label: year };\n })}\n />\n </div>\n <table {...getTableProps()}>\n <thead>\n {headerGroups.map((headerGroup) => (\n <tr {...headerGroup.getHeaderGroupProps()}>\n {headerGroup.headers.map((column) => (\n <th\n {...column.getHeaderProps()}\n style={{ textAlign: \"center\" }}\n >\n {column.render(\"Header\")}\n </th>\n ))}\n </tr>\n ))}\n </thead>\n <tbody {...getTableBodyProps()}>\n {rows.map((row, i) => {\n prepareRow(row);\n\n for (let j = 0; j < row.allCells.length; j++) {\n let cell = row.allCells[j];\n let rowSpanHeader = rowSpanHeaders.find(\n (x) => x.id === cell.column.id\n );\n\n if (rowSpanHeader) {\n if (\n rowSpanHeader.topCellValue === null ||\n rowSpanHeader.topCellValue !== cell.value\n ) {\n cell.isRowSpanned = false;\n rowSpanHeader.topCellValue = cell.value;\n rowSpanHeader.topCellIndex = i;\n cell.rowSpan = 1;\n } else {\n rows[rowSpanHeader.topCellIndex].allCells[j].rowSpan++;\n cell.isRowSpanned = true;\n }\n }\n }\n return null;\n })}\n\n {rows.map((row) => {\n return (\n <tr {...row.getRowProps(getRowProps(row))}>\n {row.cells.map((cell) => {\n if (cell.isRowSpanned) return null;\n else\n return (\n <td\n rowSpan={cell.rowSpan}\n {...cell.getCellProps(getCellProps(cell))}\n >\n {cell.render(\"Cell\")}\n </td>\n );\n })}\n </tr>\n );\n })}\n </tbody>\n </table>\n </div>\n );\n }\n\n\n\n\n}\n\n\nMonthDetails.propTypes = {\n url: PropTypes.string.isRequired,\n onSelectMonth: PropTypes.func.isRequired,\n}\n\n\nexport default MonthDetails\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { IconButton, Tooltip, Typography } from \"@mui/material\";\nimport { includes } from \"lodash\";\nimport {\n FilterCenterFocus as SetIcon,\n Undo as ResetIcon,\n East as TransitionIcon,\n} from \"@mui/icons-material\";\n\nconst ICON_MAPPING = {\n setAccount: SetIcon,\n resetAccount: ResetIcon,\n transitionAccount: TransitionIcon,\n};\n\nconst ActionMenu = ({\n actions,\n monthId,\n selectedAction = {},\n onSelectAction,\n}) => {\n return (\n <>\n {Object.entries(actions).map(([name, basicUrl]) => {\n const parsedUrl = new URL(basicUrl);\n const urlParams = new URLSearchParams(parsedUrl.search);\n urlParams.set(\"month_id\", monthId);\n parsedUrl.search = urlParams.toString();\n const url = parsedUrl.toString();\n const active = includes(selectedAction.url, parsedUrl.pathname);\n const IconComponent = ICON_MAPPING[name];\n\n return (\n <Tooltip\n key={name}\n title={<Typography variant=\"h5\">{formatName(name)}</Typography>}\n placement=\"top\"\n arrow\n >\n <IconButton onClick={() => onSelectAction(name, url)}>\n <IconComponent\n color={active ? \"primary\" : \"inherit\"}\n sx={{ fontSize: \"24px\" }}\n />\n </IconButton>\n </Tooltip>\n );\n })}\n </>\n );\n};\n\nconst formatName = (name) => {\n const words = name\n .split(/(?=[A-Z])/)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1));\n return words.join(\" \");\n};\n\nActionMenu.propTypes = {\n selectedAction: PropTypes.shape({\n url: PropTypes.string,\n name: PropTypes.string,\n }),\n onSelectAction: PropTypes.func.isRequired,\n};\n\nexport default ActionMenu;\n","import React, { useEffect } from \"react\";\nimport { useTable } from \"react-table\";\n\nconst TableForGroup = ({ groupOptions, columns, onRowSelect }) => {\n const [selectedRow, setSelectedRow] = React.useState(null);\n\n const { getTableProps, getTableBodyProps, headerGroups, rows, prepareRow } =\n useTable({ columns, data: groupOptions });\n\n useEffect(() => {\n if (selectedRow) {\n onRowSelect(selectedRow);\n }\n }, [selectedRow]);\n\n return (\n <table {...getTableProps()} className=\"table\" style={{ textAlign: \"left\" }}>\n <thead>\n {headerGroups.map((headerGroup) => (\n <tr {...headerGroup.getHeaderGroupProps()}>\n {headerGroup.headers.map((column) => (\n <th\n {...column.getHeaderProps()}\n style={{\n color: \"#979797\",\n fontWeight: \"bolder\",\n }}\n >\n {column.render(\"Header\")}\n </th>\n ))}\n </tr>\n ))}\n </thead>\n <tbody {...getTableBodyProps()}>\n {rows.map((row) => {\n prepareRow(row);\n return (\n <tr\n {...row.getRowProps()}\n onClick={() => setSelectedRow(row.original)}\n className={`hoverable-row ${\n row.original.uuid === selectedRow?.uuid ? \"selected\" : \"\"\n }`}\n style={{\n cursor: \"pointer\",\n color: \"#555656\",\n fontWeight: \"bolder\",\n }}\n >\n {row.cells.map((cell) => (\n <td {...cell.getCellProps()}>{cell.render(\"Cell\")}</td>\n ))}\n </tr>\n );\n })}\n </tbody>\n </table>\n );\n};\n\nexport default TableForGroup;\n","import { flow, groupBy, intersection, map, orderBy } from 'lodash'\n\nconst GROUP_LABEL_ORDER = ['Same Commissioner', 'Other Comissioners']\n\nexport const getVendorAccountOptions = (vendorAccounts, location, service) => {\n let options\n\n if (location.nhsCommissionerAuthorityId && service.isNhsCommissioned) {\n const processOptions = flow(\n // 1. Group by authorityId condition\n vendorAccounts =>\n groupBy(vendorAccounts, vendorAccount => {\n const matchAuthority =\n vendorAccount.authorityId === location.nhsCommissionerAuthorityId\n return matchAuthority ? GROUP_LABEL_ORDER[0] : GROUP_LABEL_ORDER[1]\n }),\n\n // 2. Transform each group\n groupedAccounts =>\n map(groupedAccounts, (vendorAccounts, groupLabel) => {\n const initialOrder = orderBy(vendorAccounts, [\n 'premTypeNames',\n 'vendorAccountNumber'\n ])\n\n const sortCurrentVendorAccount = orderBy(initialOrder, [\n option =>\n option.vendorAccountNumber ===\n service.vendorAccount.vendorAccountNumber\n ? -1\n : 1\n ])\n\n const sortedOptions = orderBy(sortCurrentVendorAccount, [\n option => {\n const matchPremTypeNames = intersection(\n option.premTypeNames,\n service.vendorAccount.premTypeNames\n )\n return matchPremTypeNames.length === 0 ? 1 : 0\n }\n ])\n\n const noFilter = service?.actions?.setAccount\n const filteredOptions = noFilter\n ? sortedOptions\n : sortedOptions.filter(\n option =>\n option.vendorAccountNumber !==\n service.vendorAccount.vendorAccountNumber\n )\n\n return {\n label: groupLabel,\n options: filteredOptions\n }\n }),\n\n // 3. Order by label\n transformedGroups =>\n orderBy(transformedGroups, [\n ({ label }) => (GROUP_LABEL_ORDER[0] === label ? 0 : 1)\n ])\n )\n\n options = processOptions(vendorAccounts)\n } else {\n options = [\n {\n label: '', // empty label for non-grouped options\n options: vendorAccounts\n }\n ]\n }\n console.log(options)\n return options\n}","import _ from \"lodashExtended\";\nimport PropTypes from \"prop-types\";\nimport React, { useState } from \"react\";\nimport { Link } from \"sharedComponents\";\nimport TableForGroup from \"../TableForGroup\"; // Import the TableForGroup\nimport Button from \"@mui/material/Button\";\nimport { Divider, Typography } from \"@mui/material\";\nimport { getVendorAccountOptions } from \"../../app/utils\";\nimport VisibilityIcon from \"@mui/icons-material/Visibility\";\n\nconst TransitionAccount = ({\n currentForm,\n onChange,\n onSubmit,\n onClose,\n disabled,\n}) => {\n const { vendorAccounts, service, location } = currentForm?.context;\n const isSet = service?.actions?.setAccount;\n const options = getVendorAccountOptions(vendorAccounts, location, service);\n\n const [selectedRow, setSelectedRow] = useState(null);\n\n const columns = React.useMemo(\n () => [\n {\n Header: \"ACCOUNT #\",\n accessor: \"vendorAccountNumber\", // accessor is the \"key\" in the data\n },\n {\n Header: \"PREM TYPE\",\n accessor: (option) => option?.premTypeNames?.join(\" \") || \"\",\n },\n {\n Header: \"DESCRIPTOR\",\n accessor: \"authorityName\",\n },\n {\n Header: \"LAST BILLED\",\n accessor: \"lastBilledOn\",\n Cell: ({ value, row }) => {\n const { closedMonthName } = row.original;\n return _.isPresent(closedMonthName)\n ? `Closed ${closedMonthName}`\n : value;\n },\n },\n {\n Header: \"View\",\n accessor: \"id\",\n Cell: ({ value }) => {\n return (\n <Link href={`/admin/vendor_invoices/${value}`} target=\"_blank\">\n <VisibilityIcon\n fontSize=\"large\"\n sx={{ color: \"rgba(50, 159, 209, 1)\" }}\n />\n </Link>\n );\n },\n },\n ],\n [],\n );\n\n const rowSelectHandler = (row) => {\n setSelectedRow(row);\n onChange({ vendorAccountUuid: row.uuid });\n };\n\n return (\n <>\n <div\n className=\"custom-scrollbar\"\n style={{\n maxHeight: \"400px\",\n overflowY: \"auto\",\n }}\n >\n {options.map((group) => (\n <React.Fragment key={group.label}>\n {group.label === \"Other Comissioners\" && (\n <Divider textAlign=\"left\">\n <Typography\n sx={{\n color: \"#555656\",\n fontSize: \"16px\",\n fontStyle: \"normal\",\n fontWeight: \"bold\",\n textTransform: \"uppercase\",\n }}\n >\n {group.label}\n </Typography>\n </Divider>\n )}\n\n <TableForGroup\n groupOptions={group.options}\n columns={columns}\n onRowSelect={rowSelectHandler}\n />\n </React.Fragment>\n ))}\n </div>\n <div\n style={{\n display: \"flex\",\n justifyContent: \"space-between\",\n gap: 10,\n paddingTop: 5,\n background: \"white\",\n height: \"fit-content\",\n }}\n >\n <Button\n variant=\"outlined\"\n color=\"outlined\"\n onClick={onClose}\n sx={{ height: \"auto\", flex: \"none\" }}\n >\n Cancel\n </Button>\n <Button\n variant=\"contained\"\n disabled={disabled}\n color={!currentForm?.errors?.length ? \"success\" : \"error\"}\n onClick={onSubmit}\n sx={{ height: \"auto\", flex: 1 }}\n >\n {isSet ? \"Set\" : \"Transition\"}\n {selectedRow &&\n ` to ${selectedRow.authorityName}-${selectedRow.vendorAccountNumber}`}\n </Button>\n </div>\n </>\n );\n};\n\nTransitionAccount.propTypes = {\n currentForm: PropTypes.object.isRequired,\n onClose: PropTypes.func.isRequired,\n onChange: PropTypes.func.isRequired,\n onSubmit: PropTypes.func.isRequired,\n};\n\nexport default TransitionAccount;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport Select from \"react-select\";\nimport { getVendorAccountOptions } from \"../../app/utils\";\nimport { Button, Divider, Typography } from \"@mui/material\";\n\nconst SetAccount = ({ currentForm, onChange, onClose, onSubmit }) => {\n const { vendorAccounts, service, location } = currentForm?.context;\n\n var options = getVendorAccountOptions(vendorAccounts, location, service);\n\n return (\n <div>\n <Divider>\n <Typography\n sx={{\n color: \"#555656\",\n fontSize: \"14px\",\n fontStyle: \"normal\",\n fontWeight: \"bold\",\n }}\n >\n Set Account\n </Typography>\n </Divider>\n <Select\n options={options}\n onChange={({ value }) => onChange({ vendorAccountUuid: value })}\n />\n <div style={{ display: \"flex\", paddingTop: 20, gap: 20 }}>\n <Button variant=\"outlined\" onClick={onClose} color=\"outlined\">\n Cancel\n </Button>\n <Button variant=\"contained\" color=\"success\" onClick={onSubmit}>\n Set Account\n </Button>\n </div>\n </div>\n );\n};\n\nSetAccount.propTypes = {\n currentForm: PropTypes.object.isRequired,\n onClose: PropTypes.func.isRequired,\n onChange: PropTypes.func.isRequired,\n onSubmit: PropTypes.func.isRequired,\n};\n\nexport default SetAccount;\n","import React, { useState } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { last } from \"lodash\";\nimport { StyledDialog } from \"sharedComponents\";\nimport DialogContent from \"@mui/material/DialogContent\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\n\nvar ResetAccount = ({ currentForm, onChange, onClose, onSubmit }) => {\n const { previousStates } = currentForm?.context;\n const [open, setOpen] = useState(false);\n const [startOver, setStartOver] = useState(false);\n\n const lastEvent = last(previousStates);\n console.log(lastEvent, previousStates);\n\n const displayText = startOver ? \"Start Over\" : \"Undo\";\n\n const handleCloseModal = () => setOpen(false);\n\n const handleStartOver = () => {\n setOpen(true);\n setStartOver(true);\n };\n\n const submitStartOver = () => {\n onChange({ resetToEventId: null });\n onSubmit();\n };\n\n const submitUndo = () => {\n onChange({ resetToEventId: lastEvent.eventId });\n onSubmit();\n };\n\n return (\n <>\n <div\n style={{\n display: \"flex\",\n justifyContent: \"space-between\",\n gap: 10,\n paddingTop: 5,\n }}\n >\n <Button\n variant=\"outlined\"\n color=\"outlined\"\n onClick={onClose}\n sx={{ flex: 1 }}\n >\n Cancel\n </Button>\n\n <Button\n variant=\"contained\"\n color=\"success\"\n onClick={handleStartOver}\n sx={{ flex: 1 }}\n >\n Start Over\n </Button>\n\n {lastEvent?.eventId && (\n <Button\n variant=\"contained\"\n color=\"success\"\n onClick={() => setOpen(true)}\n >\n Undo\n </Button>\n )}\n </div>\n\n <StyledDialog\n open={open}\n onClose={handleCloseModal}\n fullWidth={true}\n maxWidth=\"xs\"\n sx={{ padding: 10 }}\n >\n <DialogContent>\n <IconButton\n aria-label=\"close\"\n onClick={handleCloseModal}\n sx={{\n position: \"absolute\",\n right: 8,\n top: 8,\n color: (theme) => theme.palette.grey[500],\n }}\n >\n <i className={\"fa fa-times\"} style={{ fontSize: \"24px\" }} />\n </IconButton>\n <Typography\n variant=\"h4\"\n sx={{\n paddingTop: 2,\n color: (theme) => theme.palette.common.white,\n }}\n >\n {`Are you sure you want to ${displayText}`}\n </Typography>\n <div style={{ display: \"flex\", paddingTop: 20, gap: 20 }}>\n <Button\n variant=\"outlined\"\n onClick={handleCloseModal}\n color=\"white\"\n sx={{ flex: 1 }}\n >\n Cancel\n </Button>\n <Button\n variant=\"contained\"\n color=\"success\"\n onClick={startOver ? submitStartOver : submitUndo}\n sx={{ flex: 1 }}\n >\n {`Yes, ${displayText}`}\n </Button>\n </div>\n </DialogContent>\n </StyledDialog>\n </>\n );\n};\n\nResetAccount.propTypes = {\n currentForm: PropTypes.object.isRequired,\n onClose: PropTypes.func.isRequired,\n onChange: PropTypes.func.isRequired,\n onSubmit: PropTypes.func.isRequired,\n};\n\nexport default ResetAccount;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport getType from \"./forms\";\nimport TransitionAccount from \"./forms/TransitionAccount\";\nimport SetAccount from \"./forms/SetAccount\";\nimport ResetAccount from \"./forms/ResetAccount\";\n\nconst FORM_MAPPING = {\n TransitionAccount: TransitionAccount,\n SetAccount: TransitionAccount,\n ResetAccount: ResetAccount,\n};\n\nconst Form = ({ currentForm, onClose, onChange, onSubmit }) => {\n const { type, form } = currentForm;\n const FormType = FORM_MAPPING[type];\n\n if (!currentForm) return;\n\n if (!FormType) {\n throw (\n 'missing form component for \"' +\n type +\n '\", perhaps you forgot to add it to forms/index.js?'\n );\n }\n\n const disabled = form?.submitting;\n\n return (\n <FormType\n currentForm={currentForm}\n onChange={onChange}\n onSubmit={onSubmit}\n onClose={onClose}\n disabled={disabled}\n />\n );\n};\n\nForm.propTypes = {\n currentForm: PropTypes.object.isRequired,\n onClose: PropTypes.func.isRequired,\n onChange: PropTypes.func.isRequired,\n onSubmit: PropTypes.func.isRequired,\n};\n\nexport default Form;\n","import React from 'react'\nimport ActionMenu from './ActionMenu'\nimport Form from './Form'\nimport { useTable } from 'react-table'\nimport { Divider, Typography } from '@mui/material'\nimport KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'\n\nfunction formatDate (input, day = true) {\n const parts = input.split('-')\n const date = new Date(parts[0], parts[1] - 1, parts[2]) // parsed in local timezone\n const month = date.toLocaleString('en', { month: 'short' })\n const year = date.getFullYear()\n\n if (!day) return `${month} ${year}`\n\n return `${date.getDate()} ${month} ${year}`\n}\n\nconst errorStyles = {\n backgroundColor: '#f8d7da',\n color: '#721c24',\n padding: '8px 12px',\n margin: '8px 0',\n borderRadius: '4px',\n border: '1px solid #f5c6cb'\n}\n\nconst ServiceBox = ({\n service,\n monthId,\n onSelectAction,\n currentForm,\n isDeveloper,\n onClearForm,\n onFormChange,\n onSubmitForm\n}) => {\n const {\n vendorAccount: { vendorLocationAccounts }\n } = service\n\n const columns = React.useMemo(\n () => [\n {\n Header: 'VLC',\n accessor: 'vendorLocationCode'\n },\n {\n Header: 'First Billed',\n accessor: 'firstBilledOn'\n },\n {\n Header: 'Last Billed',\n accessor: 'lastBilledOn'\n }\n ],\n []\n )\n\n const { getTableProps, getTableBodyProps, headerGroups, rows, prepareRow } =\n useTable({ columns, data: vendorLocationAccounts })\n\n const showForm = currentForm?.context?.service?.uuid === service?.uuid\n\n if (!service) return <>Loading</>\n\n return (\n <div\n className='service-box'\n key={service.uuid}\n style={{\n padding: '1em',\n borderLeft: `20px solid ${service.color}`\n }}\n >\n <div>\n <span className='pull-right'>\n <ActionMenu\n {...service}\n monthId={monthId}\n onSelectAction={onSelectAction}\n selectedAction={currentForm}\n />\n </span>\n <span\n style={{\n color: '#454F5E',\n fontSize: '1.3em',\n fontStyle: 'normal',\n fontWeight: 700,\n lineHeight: '185.023%'\n }}\n >\n {service.title}\n </span>\n\n {service.terminationDate && (\n <span\n style={{\n color: 'red',\n fontWeight: 'bold',\n marginLeft: '0.5em'\n }}\n >\n {moment(service.terminationDate) < moment() ? 'Terminated' : 'Terminating' } on {formatDate(service.terminationDate)}\n </span>\n )}\n </div>\n {service.commissionerStatus === 'ods_not_set'\n ? (\n <div>\n <strong className='text-danger'>ODS Authority Not Set</strong>\n </div>\n )\n : null}\n {service.commissionerStatus === 'wrong_commissioner'\n ? (\n <div>\n <strong className='text-danger'>Wrong Commissioner</strong>\n </div>\n )\n : null}\n <div\n style={{\n display: 'flex',\n color: '#555656',\n fontStyle: 'normal',\n fontWeight: 600,\n lineHeight: '20px'\n }}\n >\n <div>\n {service.vendorAccount.name} {service.vendorAccount.number}\n </div>\n {service?.vendorAccount?.closedOn && (\n <Typography\n variant='h5'\n color='error'\n sx={{ fontWeight: '700', marginLeft: 2 }}\n >\n Account Closed from {service.vendorAccount.closedOn}\n </Typography>\n )}\n </div>\n <div>{service.vendorAccount.number}</div>\n <div\n style={{\n color: '#828B98',\n fontStyle: 'normal',\n fontWeight: 600,\n lineHeight: '20px',\n paddingBottom: '0.5em'\n }}\n >\n Visits Frequency{' '}\n {service?.visitPlanName || 'Unknown' }\n </div>\n {vendorLocationAccounts?.length > 0 && (\n <table\n className='table'\n {...getTableProps()}\n style={{ textAlign: 'left' }}\n >\n <thead>\n {headerGroups.map((headerGroup, i) => (\n <tr key={i} {...headerGroup.getHeaderGroupProps()}>\n {headerGroup.headers.map((column, iTh) => (\n <th\n key={iTh}\n {...column.getHeaderProps()}\n style={{\n color: '#979797',\n fontWeight: 'bolder'\n }}\n >\n {column.render('Header')}\n </th>\n ))}\n </tr>\n ))}\n </thead>\n <tbody {...getTableBodyProps()}>\n {rows.map((row, i) => {\n prepareRow(row)\n return (\n <tr\n key={i}\n {...row.getRowProps()}\n style={{\n color: '#555656',\n fontWeight: 'bolder'\n }}\n >\n {row.cells.map((cell, iTd) => (\n <td key={iTd} {...cell.getCellProps()}>{cell.render('Cell')}</td>\n ))}\n </tr>\n )\n })}\n </tbody>\n </table>\n )}\n\n {showForm && currentForm?.errors && currentForm?.errors.length > 0 && (\n <div className='error-container'>\n {currentForm.errors.map((error, index) => (\n <div key={index} style={errorStyles}>\n {error}\n </div>\n ))}\n </div>\n )}\n\n <div>{isDeveloper ? `Service Id: ${service.id}` : null}</div>\n\n <div style={{ background: '#F4F7FB' }}>\n {currentForm?.form?.transitionOn && showForm && (\n <Divider\n sx={{\n '&.MuiDivider-root::before': {\n borderTop: '3px solid rgba(0, 0, 0, 0.12)'\n },\n '&.MuiDivider-root::after': {\n borderTop: '3px solid rgba(0, 0, 0, 0.12)'\n }\n }}\n >\n <Typography\n sx={{\n color: '#555656',\n textTransform: 'uppercase',\n fontSize: '16px',\n fontStyle: 'normal',\n fontWeight: 'bold',\n display: 'flex',\n justifyContent: 'space-evenly',\n alignItems: 'center',\n gap: '10px',\n paddingTop: '5px'\n }}\n >\n Transition From {formatDate(currentForm.form.transitionOn, false)}\n <KeyboardArrowDownIcon fontSize='large' />\n To Account\n </Typography>\n </Divider>\n )}\n\n {showForm && currentForm?.type === 'SetAccount' && (\n <Divider\n sx={{\n '&.MuiDivider-root::before': {\n borderTop: '3px solid rgba(0, 0, 0, 0.12)'\n },\n '&.MuiDivider-root::after': {\n borderTop: '3px solid rgba(0, 0, 0, 0.12)'\n }\n }}\n >\n <Typography\n sx={{\n color: '#555656',\n textTransform: 'uppercase',\n fontSize: '16px',\n fontStyle: 'normal',\n fontWeight: 'bold',\n display: 'flex',\n justifyContent: 'space-evenly',\n alignItems: 'center',\n gap: '10px',\n paddingTop: '5px'\n }}\n >\n Set Account\n </Typography>\n </Divider>\n )}\n\n {currentForm && showForm && (\n <Form\n id={service.uuid}\n currentForm={currentForm}\n onClose={onClearForm}\n onChange={onFormChange}\n onSubmit={onSubmitForm}\n />\n )}\n </div>\n </div>\n )\n}\n\nexport default ServiceBox\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { loadForm, selectMonth, submitForm } from \"../app/operations\";\nimport { getCurrentForm } from \"../app/selectors\";\n\nimport ServiceTimeline from \"./ServiceTimeline\";\nimport MonthDetails from \"./MonthDetails\";\nimport ServiceBox from \"./ServiceBox\";\nimport appActions from \"../app/actions\";\nimport { Redirect, Route, Switch } from \"react-router-dom\";\n\n\nvar App = (props) => {\n let {\n services,\n initialMonthId,\n billingMonthDetailsBasePath,\n onSelectAction,\n onFormChange,\n onClearForm,\n onSubmitForm,\n currentForm,\n isDeveloper,\n serviceTimeline,\n } = props;\n\n return (\n <div id=\"service-mappings\">\n {serviceTimeline.isLoading && (\n <div className=\"loading-overlay\">\n <i\n className=\"fa fa-spin fa-spinner fa-5x\"\n style={{ color: \"#fff\" }}\n ></i>\n <div style={{ marginTop: \"20px\", color: \"#fff\" }}>Updating</div>\n </div>\n )}\n <Switch>\n <Redirect exact from=\"/\" to={`/month/${initialMonthId}`} />\n <Route\n path=\"/month/:monthId\"\n render={({ match }) => {\n const monthId = _.toInteger(match.params.monthId);\n\n return (\n <>\n <div className=\"row\">\n <div className=\"col-sm-7\">\n <ServiceTimeline {...props} selectMonthId={monthId} />\n <MonthDetails\n {...props}\n url={`${billingMonthDetailsBasePath}/${monthId}`}\n />\n </div>\n <div className=\"col-sm-5\">\n {_.map(services, (service) => (\n <ServiceBox\n key={service.uuid}\n service={service}\n monthId={monthId}\n onSelectAction={onSelectAction}\n currentForm={currentForm}\n isDeveloper={isDeveloper}\n onClearForm={onClearForm}\n onFormChange={onFormChange}\n onSubmitForm={onSubmitForm}\n />\n ))}\n </div>\n </div>\n </>\n );\n }}\n />\n </Switch>\n </div>\n );\n};\n\nApp.propTypes = {\n initialMonthId: PropTypes.number.isRequired,\n billingMonthDetailsBasePath: PropTypes.string.isRequired,\n};\n\nconst mapStateToProps = (state, props) => {\n return {\n ...state,\n currentForm: getCurrentForm(state),\n };\n};\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {\n onSelectMonth: (monthId) => dispatch(selectMonth(monthId)),\n onSelectAction: (name, url) => dispatch(loadForm(name, url)),\n onClearForm: () => dispatch(appActions.clearForm()),\n onFormChange: (newAttr) => dispatch(appActions.updateForm(newAttr)),\n onSubmitForm: () => dispatch(submitForm()),\n };\n};\n\nApp = connect(mapStateToProps, mapDispatchToProps)(App);\n\nexport default App;\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\n\n\nvar d = dotProp\nconst {\n setSubmitting,\n updateForm,\n formLoaded,\n clearForm\n} = actions\n\nconst reducer = createReducer({\n [setSubmitting]: (app, submitting ) => {\n return dotProp.merge(app, 'currentForm.form', { submitting } )\n },\n [clearForm]: (app) => {\n return d.delete(app, 'currentForm')\n },\n [formLoaded]: (app, form ) => {\n return d.merge(app, 'currentForm', form)\n },\n [updateForm]: (app, newAttr ) => {\n return d.merge(app, 'currentForm.form', newAttr)\n },\n},\n {} )\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as appActions } from \"./actions\";\n\nexport default reducer\n","import actions from \"./actions\";\nimport { createReducer } from \"redux-act\";\nimport dotProp from \"dot-prop-immutable\";\nimport _ from \"lodashExtended\";\n\nconst d = dotProp;\n\nconst {reloadServices } = actions;\n\nconst reducer = createReducer(\n {\n [reloadServices]: (_state, payload) => {\n return { ...payload.services };\n },\n },\n {}\n);\n\nexport default reducer;\n","import reducer from './reducer'\n\nexport { default as servicesActions } from \"./actions\";\n\nexport default reducer\n","import actions from \"./actions\";\nimport { createReducer } from \"redux-act\";\nimport dotProp from \"dot-prop-immutable\";\n\nconst d = dotProp;\n\nconst {\n loadServiceTimeline,\n loadServiceTimelineSuccess,\n loadServiceTimelineError,\n} = actions;\n\nconst reducer = createReducer(\n {\n [loadServiceTimeline]: (state) => {\n return d.set(state, \"isLoading\", true);\n },\n\n [loadServiceTimelineSuccess]: (_state, payload) => {\n return { ...payload.serviceTimeline, isLoading: false };\n },\n\n [loadServiceTimelineError]: (state, error) => {\n let newState = d.set(state, \"isLoading\", false);\n newState = d.set(newState, \"error\", error);\n return newState;\n },\n },\n {}\n);\n\nexport default reducer;\n","import reducer from \"./reducer\";\n\nexport { default as serviceTimelineActions } from \"./actions\";\n\nexport default reducer;\n","import { createReducer } from \"redux-act\";\nimport dotProp from \"dot-prop-immutable\";\nimport _ from \"lodashExtended\";\nimport appReducer from \"./app\";\nimport servicesReducer from \"./services\";\nimport serviceTimlelineReducer from \"./serviceTimeline\";\n\nconst createRootReducer = (routerReducer) => {\n const reducer = (state = {}, action) => {\n return {\n ...state,\n app: appReducer(state.app, action),\n services: servicesReducer(state.services, action),\n serviceTimeline: serviceTimlelineReducer(state.serviceTimeline, action),\n router: routerReducer(state.router, action),\n };\n };\n\n return reducer;\n};\n\nexport default createRootReducer;\n","import { createStore, applyMiddleware } from \"redux\";\nimport createRootReducer from \"./reducer\";\nimport thunk from \"redux-thunk\";\nimport { createReduxHistoryContext } from \"redux-first-history\";\nimport { composeWithDevTools } from \"redux-devtools-extension\";\nimport { createHashHistory } from \"history\";\n\nconst { createReduxHistory, routerMiddleware, routerReducer } =\n createReduxHistoryContext({\n history: createHashHistory(),\n });\n\nexport default function configureStore(initialState) {\n const rootReducer = createRootReducer(routerReducer);\n\n const store = createStore(\n rootReducer,\n initialState,\n composeWithDevTools(applyMiddleware(routerMiddleware, thunk)),\n );\n\n if (module.hot) {\n module.hot.accept(\"./reducer\", () => {\n const nextCreateRootReducer = require(\"./reducer\").default;\n store.replaceReducer(createRootReducer(routerReducer));\n });\n }\n\n const history = createReduxHistory(store);\n\n return { store, history };\n}\n\n//export const history = createReduxHistory(store);\n","import React from \"react\";\nimport { Provider } from \"react-redux\";\nimport { Router } from \"react-router-dom\";\n\nimport { RootNode, configureStore } from \"../apps/service-mappings\";\nimport { ThemeProvider } from \"@mui/material/styles\";\nimport { theme } from \"../theme\";\n\nexport default (props) => {\n const { store, history } = configureStore(props);\n\n return (\n <Provider store={store}>\n <ThemeProvider theme={theme}>\n <Router history={history}>\n <RootNode />\n </Router>\n </ThemeProvider>\n </Provider>\n );\n};\n","const addEventListener = (el, eventName, handler) => {\n if (el.addEventListener) {\n el.addEventListener(eventName, handler);\n } else {\n el.attachEvent(\"on\" + eventName, function () {\n handler.call(el);\n });\n }\n};\n\nexport const addEventListeners = (selector, type, handler) => {\n const elements = document.querySelectorAll(selector);\n for (let i = 0; i < elements.length; i++) {\n addEventListener(elements[i], type, handler);\n }\n};\n\nconst removeEventListener = (el, eventName, handler) => {\n if (el.removeEventListener) {\n el.removeEventListener(eventName, handler);\n } else {\n el.detachEvent(\"on\" + eventName, function () {\n handler.call(el);\n });\n }\n};\n\nexport const removeEventListeners = (selector, type, handler) => {\n const elements = document.querySelectorAll(selector);\n for (let i = 0; i < elements.length; i++) {\n removeEventListener(elements[i], type, handler);\n }\n};\n\n//export const debounce = (func, wait, immediate) => {\n //let timeout;\n\n //return function executedFunction() {\n //const context = this;\n //const args = arguments;\n\n //const later = function () {\n //timeout = null;\n //if (!immediate) func.apply(context, args);\n //};\n\n //const callNow = immediate && !timeout;\n\n //clearTimeout(timeout);\n\n //timeout = setTimeout(later, wait);\n\n //if (callNow) func.apply(context, args);\n //};\n//};\n","import dotProp from 'dot-prop-immutable';\n\nimport { COLLECTION_ID } from './ConfirmatoryStatementsPage';\n\nexport const selectConfirmatoryStatementsState = (state) => {\n return (\n dotProp.get(\n state.firestore,\n `data.${COLLECTION_ID}.${state.app?.currentUser?.id}`\n ) || {}\n ) as IConfirmatoryStatement\n};\n\nexport const checkAreConfirmatoryStatementsCompleted = (state) => {\n const confirmatoryStatementsState = selectConfirmatoryStatementsState(state);\n const {\n fullName,\n jobTitle,\n competenceEvidences,\n willPawaBeCompletedWithPhysicalPresence,\n hasKnowledgeOfHealthcareWaste,\n } = confirmatoryStatementsState;\n const result =\n !!fullName &&\n !!jobTitle &&\n (competenceEvidences?.length ?? 0) > 0 &&\n [\"yes\", \"no\"].includes(willPawaBeCompletedWithPhysicalPresence || '') &&\n [\"yes\", \"no\"].includes(hasKnowledgeOfHealthcareWaste || '');\n\n return result;\n};\n","import { faExclamationCircle } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { CheckboxInput, ModalBox, TextInput, YesNoInput } from 'auditComponents';\nimport { push } from 'connected-react-router';\nimport dotProp from 'dot-prop-immutable';\nimport _ from 'lodashExtended';\nimport * as React from 'react';\nimport { useReducer } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useRouteMatch } from 'react-router-dom';\nimport { ModalRoute } from 'react-router-modal';\nimport { Btn } from 'sharedComponents';\n\nimport { areAnySectionStarted } from '../sections';\nimport { updateConfirmatoryStatementsState } from './operations';\nimport { checkAreConfirmatoryStatementsCompleted, selectConfirmatoryStatementsState } from './selectors';\n\n// NOTE: not sure how to type this\nconst Checkbox = (CheckboxInput as any).Checkbox as typeof React.Component;\n\nexport const COLLECTION_ID = \"confirmatoryStatements\";\n\nconst d = dotProp;\n\nconst NoCompetenceModal = ({ onSubmit, closeModal }) => {\n return (\n <ModalBox\n title=\"Get Help\"\n onAck={() => {\n onSubmit();\n closeModal();\n }}\n className=\"location-update-modal\"\n >\n <p>\n Since none of the Competence Evidence has been selected, please ask\n Anenta, or another qualified third-party auditor, to carry it out for\n you. Those audits come at a fee. Alternatively please ask your colleague\n that has the relevant working knowledge to conduct this audit.\n </p>\n </ModalBox>\n );\n};\n\n// NOTE: haven't decided if we need this yet\nconst getIncompleteMessage = (data) => {\n const {\n willPawaBeCompletedWithPhysicalPresence,\n hasKnowledgeOfHealthcareWaste,\n fullName,\n jobTitle,\n competenceEvidences = [],\n } = data;\n\n const toCheck = [\n willPawaBeCompletedWithPhysicalPresence,\n hasKnowledgeOfHealthcareWaste,\n fullName,\n jobTitle,\n ];\n\n const blankFields = _.filter(toCheck, _.isBlank).length;\n\n return blankFields > 0\n ? `There ${\n blankFields == 1 ? \"is\" : \"are\"\n } ${blankFields} unanswered question${\n blankFields == 1 ? \"\" : \"s\"\n } remaining`\n : null;\n};\n\nconst FULL_COMPETENCE_EVIDENCES_QUESTIONS = {\n // TODO: add this back when we have `Waste Management Training` link\n // hasCompletedWasteManagementTraining: {\n // label: \"I completed the Waste Management training provided in this report\",\n // },\n isLongStandingClinicalPro: {\n label: \"I am a long-standing clinical professional\",\n },\n isLongStandingHealthcareMgmtPro: {\n label: \"I am a long-standing healthcare management professional\",\n },\n hasKnowledgeOfWasteMgmtPractices: {\n label:\n \"I have a working knowledge of waste management practices and guidance\",\n },\n isQualifiedAuditingPro: { label: \"I am a qualified auditing professional\" },\n hasRecentTrainingOnWasteMgmtPracticesAndRequirements: {\n label:\n \"I have had recent training on waste management practices and requirements\",\n },\n};\nconst YES_NO_QUESTIONS = {\n willPawaBeCompletedWithPhysicalPresence: {\n label:\n \"This pre-acceptance waste audit (PAWA) will be completed with a physical presence at the named premises using visual inspection and the assistance of an online tool.\",\n },\n hasKnowledgeOfHealthcareWaste: {\n label:\n \"Does the person undertaking the audit have a working knowledge of healthcare waste and its composition, classification, and packaging for road transport and an understanding of Waste Transfer Notes and Hazardous Waste Consignment Notes?\",\n },\n};\nconst ConfirmatoryStatementPageLayout = ({ children }) => {\n return (\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-main\">\n <div className=\"page-header\">Confirmatory Statements</div>\n\n <div className=\"card\">\n <div className=\"card-body\">{children}</div>\n </div>\n </div>\n <div className=\"col-sidebar\">\n <div className=\"position-sticky py-4\">\n <ConfirmatorySidenav />\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nconst validateFields = (updatedAttrs) => {\n let errors = {};\n if (\"jobTitle\" in updatedAttrs) {\n errors[\"jobTitle\"] = !!updatedAttrs.jobTitle\n ? null\n : [\"Please enter a Job Title\"];\n }\n return errors;\n};\n\nexport const ConfirmatorySidenav = () => {\n return (\n <div className=\"card shadow-sm shadow-bg\">\n <div className=\"card-body\">\n <p>\n <strong>\n Additional information to waste management is available at:\n </strong>\n </p>\n\n <ul className=\"ml-4\">\n <li className=\"mb-2\">\n <a\n href=\"https://www.england.nhs.uk/publication/management-and-disposal-of-healthcare-waste-htm-07-01/\"\n className=\"text-primary\"\n target=\"_blank\"\n >\n Health Technical Memorandum 07-01: Safe management of healthcare\n waste (SMHW)\n </a>\n </li>\n\n <li>\n <a\n href=\"https://www.gov.uk/government/publications/clinical-waste-additional-guidance\"\n className=\"text-primary\"\n target=\"_blank\"\n >\n Additional guidance for clinical waste EPR 5.07\n </a>\n </li>\n\n <li>\n <a\n href=\"https://www.england.nhs.uk/estates/nhs-clinical-waste-strategy\"\n className=\"text-primary\"\n target=\"_blank\"\n >\n NHS Clinical Waste Strategy\n </a>\n </li>\n </ul>\n </div>\n </div>\n );\n};\n\n\nconst ConfirmatoryStatementsPage = ({\n onChange,\n onNavigate,\n confirmatoryStatementsData,\n hadStartedPAA,\n hasCompletedConfirmatoryStatements\n}: ConfirmatoryStatementsPageProps) => {\n// }) => {\n // if (hasCompletedConfirmatoryStatements) return onNavigate(\"/\");\n\n const {\n willPawaBeCompletedWithPhysicalPresence,\n hasKnowledgeOfHealthcareWaste,\n fullName,\n jobTitle,\n competenceEvidences = [],\n } = confirmatoryStatementsData;\n\n const incompleteMessage = getIncompleteMessage(confirmatoryStatementsData);\n\n // NOTE: looks like we are probably not gonna be doing any validations\n const [errors, setErrors] = useReducer(\n (errorStates, updatedAttr) => ({\n ...errorStates,\n ...validateFields(updatedAttr),\n }),\n {}\n );\n\n const { url } = useRouteMatch();\n const history = useHistory();\n const noCompetenceModalPath = `${url}/noCompetence`;\n const gotoNoCompetenceModal = () => history.push(noCompetenceModalPath);\n const handleCheckCompetence = () => {\n const hasAnyCompetence = competenceEvidences.length > 0;\n if (!hasAnyCompetence) return gotoNoCompetenceModal();\n\n // push route to go back\n onNavigate(\"/\");\n };\n\n return (\n <ConfirmatoryStatementPageLayout>\n {/* used for testing typescript */}\n {/* <TestingSection /> */}\n\n {incompleteMessage ? (\n <div className=\"md-width-100 my-2\">\n <FontAwesomeIcon\n icon={faExclamationCircle}\n className=\"text-warning\"\n />{\" \"}\n {incompleteMessage}\n </div>\n ) : null}\n\n <ModalRoute\n path={noCompetenceModalPath}\n parentPath={url}\n props={{ onSubmit: () => {} }}\n component={NoCompetenceModal}\n className=\"an-modal-lg react-router-modal__modal\"\n />\n\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n <YesNoInput\n name=\"willPawaBeCompletedWithPhysicalPresence\"\n value={willPawaBeCompletedWithPhysicalPresence}\n label={\n YES_NO_QUESTIONS[\"willPawaBeCompletedWithPhysicalPresence\"].label\n }\n onChange={onChange}\n />\n\n <YesNoInput\n name=\"hasKnowledgeOfHealthcareWaste\"\n value={hasKnowledgeOfHealthcareWaste}\n label={YES_NO_QUESTIONS[\"hasKnowledgeOfHealthcareWaste\"].label}\n onChange={onChange}\n />\n\n {/* TODO: add this back when we have `Waste Management Training` link */}\n {false && hasKnowledgeOfHealthcareWaste === \"no\" && (\n <div className=\"panel-body\">\n <div\n style={{\n border: \"1px solid #E9573F\",\n padding: \"15px 15px 10px 15px\",\n marginBottom: \"20px\",\n }}\n >\n <p>\n <strong className=\"text-danger\">\n Please conduct the following Waste Management Training -{\" \"}\n <a href=\"fake.url\">link</a>\n </strong>\n </p>\n </div>\n </div>\n )}\n\n <div className=\"panel-body bordered d-flex mb-2 py-2 pr-2\">\n <div className=\"d-flex justify-content-center align-items-center\">\n <i className=\"fa fa-info-circle mx-3 fa-lg\"></i>\n </div>\n\n <div className=\"\">\n <p>\n Anenta have worked in conjunction with HEE to develop a\n standardised training package that encompasses all areas of\n waste from NHS strategy to correct waste segregation. Use the\n link below to access e-learning for health and search Healthcare\n Waste Management and Disposal. If you do not have an account\n feel free to register for this free service.\n </p>\n\n <p className=\"pt-2\">\n <a href=\"http://portal.e-lfh.org.uk/Component/Details/763177\">\n http://portal.e-lfh.org.uk/Component/Details/763177\n </a>\n </p>\n </div>\n </div>\n\n <TextInput\n name=\"fullName\"\n value={fullName}\n label={\"Auditor Full Name\"}\n onChange={onChange}\n allErrors={errors}\n onValidate={setErrors}\n placeholder={\"Enter your full name\"}\n />\n\n <TextInput\n name=\"jobTitle\"\n value={jobTitle}\n label={\"Job Title\"}\n onChange={onChange}\n onValidate={setErrors}\n allErrors={errors}\n placeholder={\"Enter your Position\"}\n />\n\n <CheckboxInput errors={errors} label=\"Competence Evidence\">\n {Object.keys(FULL_COMPETENCE_EVIDENCES_QUESTIONS).map(\n (competenceKey, idx) => {\n const actualString =\n FULL_COMPETENCE_EVIDENCES_QUESTIONS[competenceKey].label;\n\n return (\n <Checkbox\n key={idx}\n value={\n competenceEvidences.includes(actualString)\n ? \"checked\"\n : \"\"\n }\n name={competenceKey}\n label={actualString}\n onSelect={(bool, competenceKey) => {\n // TODO: create a Set datastructure to refactor this.\n let result;\n if (bool) {\n if (!competenceEvidences.includes(actualString)) {\n result = [...competenceEvidences, actualString];\n }\n } else {\n result = competenceEvidences.filter(\n (value) => value !== actualString\n );\n }\n\n onChange(result, \"competenceEvidences\");\n }}\n />\n );\n }\n )}\n </CheckboxInput>\n\n <div className=\"mt-4 d-flex justify-content-center\">\n <Btn\n className=\"w-phone-100\"\n styles=\"primary\"\n onClick={handleCheckCompetence}\n disabled={incompleteMessage !== null}\n >\n {hadStartedPAA ? \"Continue with your audit\" : \"Start Your Audit\"}\n </Btn>\n </div>\n </div>\n </div>\n </ConfirmatoryStatementPageLayout>\n );\n};\n\nconst mapStateToProps = (state) => {\n return {\n confirmatoryStatementsData: selectConfirmatoryStatementsState(state),\n hasCompletedConfirmatoryStatements:\n checkAreConfirmatoryStatementsCompleted(state),\n hadStartedPAA: areAnySectionStarted(state),\n };\n};\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onChange: (value, name) => {\n dispatch(updateConfirmatoryStatementsState(d.set({}, name, value)));\n },\n onNavigate: (nextPath) => dispatch(push(nextPath)),\n };\n};\n\nconst ConnectedConfirmatoryStatementsPage = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ConfirmatoryStatementsPage);\n\nexport default ConnectedConfirmatoryStatementsPage;\n","import { COLLECTION_ID } from \"./ConfirmatoryStatementsPage\";\n\nexport const updateConfirmatoryStatementsState = (args) => (dispatch, getState, { getFirebase, getFirestore }) => {\n const state = getState();\n const firestore = getFirestore();\n\n firestore\n .set(\n {\n collection: \"pre_acceptance_waste_audits\",\n doc: state.app.auditDocumentId,\n subcollections: [\n {\n collection: COLLECTION_ID,\n doc: state.app.currentUser.id.toString(),\n },\n ],\n },\n args,\n { merge: true }\n )\n .then(() => {\n dispatch({ type: \"UPDATE SUCCESS\" });\n })\n .catch((err) => {\n dispatch({ type: \"UPDATE ERROR\" }, err);\n });\n};\n","import PropTypes from 'prop-types';\nimport React from 'react';\nimport { Btn } from 'sharedComponents';\n\nvar SubmittedModal = ({ afterSubmitPath }) => {\n return (\n <div className=\"an-modal\">\n <div className=\"an-modal__nav\"></div>\n <div className=\"an-modal__header\">\n <div className=\"an-modal__header--title\">Audit Submitted</div>\n </div>\n <div className=\"an-modal__body\">\n <p>Thank you for submitting your Pre-Acceptance Waste Audit.</p>\n <p>\n A copy will be sent to your waste contractor and it will be available\n for you to access in Vector under 'Documents'\n </p>\n </div>\n <div className=\"an-modal__footer text-center\">\n <Btn\n onClick={() => (window.location = afterSubmitPath)}\n className=\"w-phone-100 m-0\"\n styles=\"primary\"\n >\n Hit the Dashboard\n </Btn>\n </div>\n </div>\n );\n};\n\nSubmittedModal.propTypes = {\n afterSubmitPath: PropTypes.string.isRequired,\n};\n\nexport default SubmittedModal;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _ from \"lodashExtended\";\nimport { Btn } from \"sharedComponents\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faPaperPlane } from \"@fortawesome/free-solid-svg-icons\";\n\nvar SubmitWarningModal = ({\n onSubmit,\n closeModal\n}) => {\n return (\n <div className=\"an-modal\">\n <div className=\"an-modal__nav\"></div>\n <div className=\"an-modal__header\">\n <div className=\"an-modal__header--title\">Are you sure you want to Submit the Audit?</div>\n </div>\n <div className=\"an-modal__body\">\n <p>\n Before you submit this audit please ensure that you provide all required information\n and that all attachments are related to the question and are clearly visible.\n Missing information or unclear images may affect your audit score\n </p>\n </div>\n <div className=\"an-modal__footer text-center\">\n <Btn\n onClick={closeModal}\n className=\"m-1\"\n styles=\"outline-primary\"\n >\n Back to Overview\n </Btn>\n <Btn\n onClick={onSubmit}\n className=\"m-1\"\n styles=\"primary\"\n >\n <FontAwesomeIcon icon={faPaperPlane} /> Submit Audit\n </Btn>\n </div>\n </div>\n );\n};\n\nexport default SubmitWarningModal;\n","import React, { useEffect } from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { orderedSectionSummaryViews } from './sections'\nimport SubmittedModal from './SubmittedModal'\nimport SubmitWarningModal from './SubmitWarningModal'\n\nimport {\n SubmitSummary\n} from 'auditComponents'\n\n\nexport default (props) => {\n return <SubmitSummary\n {...props}\n orderedSectionSummaryViews={orderedSectionSummaryViews}\n submittedModal={SubmittedModal}\n submitWarningModal={SubmitWarningModal}\n title=\"Waste Management Audit Overview\"\n allFieldsRequired\n />\n}\n","import { StatusSummary } from 'auditComponents';\nimport { push } from 'connected-react-router';\nimport _ from 'lodashExtended';\nimport PropTypes from 'prop-types';\nimport React, { useEffect, useLayoutEffect, useState } from 'react';\nimport { isMobile } from 'react-device-detect';\nimport { identify } from 'react-fullstory';\nimport { connect } from 'react-redux';\nimport { firestoreConnect } from 'react-redux-firebase';\nimport { useMediaQuery } from 'react-responsive';\nimport { Redirect, Route, Switch, useLocation } from 'react-router-dom';\nimport StickyBox from 'react-sticky-box';\nimport { compose } from 'redux';\nimport { Link } from 'sharedComponents';\n\nimport { addEventListeners, removeEventListeners } from '../app/helper';\nimport { goToSummaryPage, submitAudit } from '../app/operations';\nimport { areAllSectionsComplete, getSectionStatusById } from '../sections/selectors';\nimport { getAuditDocument, selectRequiredBinGroupsForSectionId } from '../wasteAudit/selectors';\nimport ConfirmatoryStatementsPage, { ConfirmatorySidenav } from './ConfirmatoryStatements/ConfirmatoryStatementsPage';\nimport { checkAreConfirmatoryStatementsCompleted } from './ConfirmatoryStatements/selectors';\nimport sectionComponents, { orderedSectionIds } from './sections';\nimport SubmitSummary from './SubmitSummary';\nimport TestSection from './sections/TestSection';\n\nvar App = (props) => {\n const {\n allDataLoaded,\n wasteAudit,\n fullStoryOrgId,\n currentUser,\n hasCompletedConfirmatoryStatements,\n onNavigate,\n locationPath,\n } = props;\n\n const isMobileMode = useMediaQuery({ maxWidth: 992 });\n const location = useLocation();\n\n const [showSubmit, setShowSubmit] = useState(false);\n const [showSummaryBox, setShowSummaryBox] = useState(true);\n\n useLayoutEffect(() => {\n if (fullStoryOrgId) {\n identify(currentUser.id, {\n displayName: currentUser.name,\n email: currentUser.email,\n });\n console.log(\"fullstory\");\n }\n }, [fullStoryOrgId, currentUser]);\n\n useEffect(() => {\n if (isMobile) {\n document.getElementById(\n \"dropdownMenuButtonNav\"\n ).innerHTML = `<i class=\"fas fa-user\"></i>`;\n }\n window.addEventListener(\"keyup\", function (event) {\n if (event.key === \"Enter\") {\n if (event.target.localName === \"textarea\") {\n return;\n }\n event.target.blur();\n }\n });\n\n return () => {\n window.removeEventListener(\"keyup\", () => {});\n };\n }, [isMobile]);\n\n const isBottom = (el) => {\n const height = window.innerHeight + 100;\n return el.getBoundingClientRect().bottom <= height;\n };\n\n const trackScrolling = _.debounce(\n () => {\n const wrappedElement = document.getElementById(\"main\");\n wrappedElement && isBottom(wrappedElement)\n ? setShowSubmit(true)\n : setShowSubmit(false);\n },\n 50,\n { maxWait: 200 }\n );\n\n useLayoutEffect(() => {\n if (isMobile) {\n addEventListeners(\"input\", \"focus\", (e) => {\n setShowSummaryBox(false);\n });\n\n addEventListeners(\"input\", \"blur\", (e) => {\n setShowSummaryBox(true);\n });\n\n return () => {\n removeEventListeners(\"input\", \"focus\");\n removeEventListeners(\"input\", \"blur\");\n };\n }\n }, [isMobile, wasteAudit]);\n\n useLayoutEffect(() => {\n if (isMobileMode) {\n setShowSummaryBox(location.pathname !== \"/submitSummary\");\n document.addEventListener(\"scroll\", trackScrolling);\n return () => {\n document.removeEventListener(\"scroll\", trackScrolling);\n };\n }\n }, [isMobileMode, wasteAudit]);\n\n const handleChangeConfirmatoryStatement = () => {\n onNavigate(\"/confirmatory-statement?mode=edit\");\n };\n\n // NOTE: use this to test typescript\n // return <TestSection />\n\n if (wasteAudit) {\n return (\n <main role=\"main\" className=\"main\" id=\"main\">\n <Switch>\n <Route path=\"/submitSummary\">\n <SubmitSummary {...props} />\n </Route>\n\n <Route path=\"/confirmatory-statement\">\n <ConfirmatoryStatementsPage {...props} />\n </Route>\n\n <Route path=\"/\">\n {!hasCompletedConfirmatoryStatements && (\n <Redirect to={{ pathname: \"/confirmatory-statement\" }} />\n )}\n\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-main\">\n <div className=\"page-header\">\n <a\n href={locationPath}\n className=\"mr-2\"\n title=\"Back to Location\"\n >\n <i className=\"fa fa-chevron-left\"></i>\n </a>\n Pre Acceptance Waste Audit\n </div>\n <div className=\"py-2\">\n <Link\n onClick={handleChangeConfirmatoryStatement}\n >\n <div className=\"text-muted\">Change Confirmatory Statements</div>\n </Link>\n </div>\n\n <Route path={[\"/section/:sectionId\", \"/\"]}>\n {_.map(sectionComponents, (Section, i) => (\n <Section key={i} number={i + 1} wasteAudit={wasteAudit} />\n ))}\n </Route>\n </div>\n\n {!isMobileMode ? (\n <div className=\"col-sidebar\">\n <StickyBox\n offsetTop={100}\n offsetBottom={20}\n className=\"position-sticky\"\n >\n <Route path={[\"/section/:sectionId\", \"/\"]}>\n <StatusSummary\n {...props}\n orderedSectionIds={orderedSectionIds}\n />\n </Route>\n\n <div className=\"py-4\">\n <ConfirmatorySidenav />\n </div>\n </StickyBox>\n </div>\n ) : null}\n </div>\n </div>\n </Route>\n </Switch>\n\n {isMobileMode && showSummaryBox ? (\n <React.Fragment>\n {/* TODO: revive this for the correct behavior in PAWA Need for Help */}\n {/* <NeedHelp /> */}\n <StickyBox\n bottom={true}\n style={{ zIndex: 1 }}\n className=\"summary-box\"\n >\n <Route path={[\"/section/:sectionId\", \"/\"]}>\n <StatusSummary {...props} showSubmit={showSubmit} />\n </Route>\n </StickyBox>\n </React.Fragment>\n ) : null}\n </main>\n );\n } else {\n return (\n <div className=\"loader-container\">\n <div className=\"loader\"></div>\n <div className=\"loader-text\">Loading</div>\n </div>\n );\n }\n};\n\nApp.propTypes = {\n auditDocumentId: PropTypes.string.isRequired,\n};\n\nconst mapStateToProps = (state, props) => {\n const { auditDocumentId, afterSubmitPath, currentUser, locationPath } =\n state.app;\n\n return {\n locationPath,\n auditDocumentId,\n wasteAudit: getAuditDocument(auditDocumentId, state),\n afterSubmitPath,\n currentUser,\n sectionStatusById: getSectionStatusById(state),\n allSectionsComplete: areAllSectionsComplete(state),\n hasCompletedConfirmatoryStatements:\n checkAreConfirmatoryStatementsCompleted(state),\n\n // For separate Summary View data\n binGroupSurveysForWasteProducedAndSegregation:\n selectRequiredBinGroupsForSectionId(\n \"waste_produced_and_segregation_at_this_premises\"\n )(state),\n binGroupSurveysForOtherWasteProduced: selectRequiredBinGroupsForSectionId(\n \"other_waste_produced_at_this_premises\"\n )(state),\n };\n};\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {\n onSubmitAudit: (successPath) => dispatch(submitAudit(successPath)),\n goToSummaryPage: () => dispatch(goToSummaryPage()),\n onNavigate: (nextPath) => dispatch(push(nextPath)),\n };\n};\n\nApp = compose(\n connect(mapStateToProps, mapDispatchToProps),\n firestoreConnect((initialProp) => {\n const { auditDocumentId } = initialProp;\n window.global = initialProp;\n\n return [\n {\n collection: \"pre_acceptance_waste_audits\",\n doc: auditDocumentId,\n },\n {\n collection: \"pre_acceptance_waste_audits\",\n doc: auditDocumentId,\n subcollections: [{ collection: \"sections\" }],\n storeAs: \"sections\", // make sure to include this\n },\n {\n collection: \"pre_acceptance_waste_audits\",\n doc: auditDocumentId,\n subcollections: [{ collection: \"wasteProductionAreas\" }],\n storeAs: \"wasteProductionAreas\", // make sure to include this\n },\n {\n collection: \"pre_acceptance_waste_audits\",\n doc: auditDocumentId,\n subcollections: [{ collection: \"binGroupSurveys\" }],\n storeAs: \"binGroupSurveys\",\n },\n {\n collection: \"pre_acceptance_waste_audits\",\n doc: auditDocumentId,\n subcollections: [{ collection: \"confirmatoryStatements\" }],\n storeAs: \"confirmatoryStatements\", // make sure to include this\n },\n ];\n })\n)(App);\n\nexport default App;\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\n\nconst {\n //setOnlineStatus,\n} = actions\n\nconst reducer = createReducer({\n //[setOnlineStatus]: (app, { payload }) => {\n //return dotProp.set(app, 'online', payload)\n //}\n},\n{ })\n\nreducer.options({\n payload: false\n});\n\n\nexport default reducer\n\n","import { createAction } from 'redux-act';\n\n//const updateRequest = createAction('update requested');\n//const updateSuccess = createAction('update success');\n//const setOnlineStatus = createAction('set online status')\n\nexport default {\n //updateRequest,\n //updateSuccess,\n //setOnlineStatus\n}\n\n","import reducer from './reducer'\n\nexport { default as appActions } from \"./actions\";\n\nexport default reducer\n","import { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\nimport { compose } from 'redux'\nimport { firestoreReducer } from 'redux-firestore';\n\nvar d = dotProp\n\nconst reducer = createReducer({\n ['@@reactReduxFirebase/FILE_UPLOAD_PROGRESS']: (firestore, action) => {\n return d.merge(\n firestore,\n `data.${_.replace(action.meta.options.storeProgressAt, /\\//g, '.')}`, \n { percentUploaded: action.payload.percent }\n )\n },\n ['@@reactReduxFirebase/FILE_UPLOAD_START']: (firestore, action) => {\n return d.merge(\n firestore,\n `data.${_.replace(action.payload.options.storeProgressAt, /\\//g, '.')}`, \n { percentUploaded: 0 }\n )\n },\n},\n {})\n\n\nreducer.options({\n payload: false\n});\n\n\n\n\nconst combinedReducer = (state, action) => {\n var nextState = reducer(state, action)\n return firestoreReducer(nextState,action)\n}\n\n\nexport default combinedReducer\n\n","import reducer from './reducer'\n\nexport default reducer\n","import dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\nimport { firebaseReducer } from 'react-redux-firebase'\nimport appReducer from './app'\nimport { connectRouter } from 'connected-react-router'\nimport firestoreReducer from './firestore'\n\n\nconst createRootReducer = (history) => {\n\n\n const routerReducer = connectRouter(history)\n\n const reducer = (state = {}, action) => {\n return {\n ...state,\n app: appReducer(state.app, action),\n firestore: firestoreReducer(state.firestore, action),\n firebase: firebaseReducer(state.firebase, action),\n router: routerReducer(state.router, action)\n }\n\n }\n\n\n return reducer\n\n}\n\nexport default createRootReducer\n\n","import { createStore, applyMiddleware } from 'redux';\nimport createRootReducer from './reducer'\nimport thunk from 'redux-thunk'\nimport { routerMiddleware } from 'connected-react-router'\nimport { composeWithDevTools } from 'redux-devtools-extension';\nimport { reduxFirestore, getFirestore } from 'redux-firestore';\nimport { getFirebase } from 'react-redux-firebase'\nimport { createHashHistory } from 'history'\nimport appActions from './app/actions'\n\nexport const history = createHashHistory()\n\nexport default function configureStore(initialState, firebase) {\n\n const rootReducer = createRootReducer(history)\n\n\n const store = createStore(rootReducer,\n initialState,\n composeWithDevTools(\n applyMiddleware(\n routerMiddleware(history),\n thunk.withExtraArgument({getFirestore, getFirebase})\n ),\n reduxFirestore(firebase)\n ));\n\n\n\n //var connectedRef = firebase.database().ref(\".info/connected\");\n\n //connectedRef.on(\"value\", function(snap) {\n //if (snap.val() === true) {\n //store.dispatch(appActions.setOnlineStatus(true))\n //} else {\n //store.dispatch(appActions.setOnlineStatus(false))\n //}\n //});\n\n firebase.firestore().enablePersistence()\n .catch((error) => {\n if (error === \"failed-precondition\") {\n alert(\"Multiple tabs open, offline data only works in one tab at a a time.\")\n } else if (error === \"unimplemented\") {\n alert(\"Cannot save offline on this browser.\")\n }\n });\n\n if (module.hot) {\n module.hot.accept('./reducer', () => {\n const nextRootReducer = createRootReducer(history)\n store.replaceReducer(nextRootReducer);\n });\n }\n\n return store;\n\n}\n","import React from \"react\"\nimport { Provider } from 'react-redux';\nimport { RootNode, configureStore, history } from '../apps/pawa_auditor'\nimport firebase from 'firebase/app'\nimport 'firebase/auth';\nimport 'firebase/database';\nimport 'firebase/firestore';\nimport 'firebase/storage';\nimport { ReactReduxFirebaseProvider } from 'react-redux-firebase';\nimport { createFirestoreInstance } from 'redux-firestore'\nimport { ConnectedRouter } from 'connected-react-router'\nimport 'react-router-modal/css/react-router-modal.css'\nimport { ModalContainer } from 'react-router-modal';\nimport FullStory from 'react-fullstory';\n\nconst rrfConfig = { useFirestoreForStorageMeta: true }\n\nexport default ({initialState, fbConfig}) => {\n firebase.initializeApp(fbConfig)\n firebase.firestore().settings({ experimentalForceLongPolling: true });\n\n const fullStoryOrgId = initialState.app.fullStoryOrgId\n\n const store = configureStore(initialState, firebase)\n\n return (\n <Provider store={store}>\n <ConnectedRouter history={history}>\n <ReactReduxFirebaseProvider\n firebase={firebase}\n config={rrfConfig}\n dispatch={store.dispatch}\n createFirestoreInstance={createFirestoreInstance}>\n { fullStoryOrgId ? <FullStory org={fullStoryOrgId}/> : null }\n <div id='auditor-app'>\n <RootNode fullStoryOrgId={fullStoryOrgId}/>\n <ModalContainer />\n </div>\n </ReactReduxFirebaseProvider>\n </ConnectedRouter>\n </Provider>\n );\n}\n\n","const addEventListener = (el, eventName, handler) => {\n if (el.addEventListener) {\n el.addEventListener(eventName, handler);\n } else {\n el.attachEvent(\"on\" + eventName, function () {\n handler.call(el);\n });\n }\n};\n\nexport const addEventListeners = (selector, type, handler) => {\n const elements = document.querySelectorAll(selector);\n for (let i = 0; i < elements.length; i++) {\n addEventListener(elements[i], type, handler);\n }\n};\n\nconst removeEventListener = (el, eventName, handler) => {\n if (el.removeEventListener) {\n el.removeEventListener(eventName, handler);\n } else {\n el.detachEvent(\"on\" + eventName, function () {\n handler.call(el);\n });\n }\n};\n\nexport const removeEventListeners = (selector, type, handler) => {\n const elements = document.querySelectorAll(selector);\n for (let i = 0; i < elements.length; i++) {\n removeEventListener(elements[i], type, handler);\n }\n};\n\n//export const debounce = (func, wait, immediate) => {\n //let timeout;\n\n //return function executedFunction() {\n //const context = this;\n //const args = arguments;\n\n //const later = function () {\n //timeout = null;\n //if (!immediate) func.apply(context, args);\n //};\n\n //const callNow = immediate && !timeout;\n\n //clearTimeout(timeout);\n\n //timeout = setTimeout(later, wait);\n\n //if (callNow) func.apply(context, args);\n //};\n//};\n","import React, { useRef } from 'react';\nimport PropTypes from \"prop-types\"\nimport _ from 'lodashExtended';\nimport classNames from \"classnames\";\nimport CreatableSelect from 'react-select/creatable';\n\nvar CreateSelectInput = ({\n allErrors = {},\n value,\n onChange,\n subtext,\n placeholder,\n disabled = false,\n editable = false,\n label,\n name,\n optional = false,\n ...selectProps\n}) => {\n let errors = _.uniq(allErrors[name] || []);\n let hasError = _.isPresent(errors);\n const creatable = useRef(null);\n const handleBlur = () => {\n\n const select = creatable.current.select.select;\n if (select.state.focusedOption && select.props.inputValue.length > 1) {\n select.selectOption(select.state.focusedOption);\n }\n }\n\n var selectedOption = selectProps.options.filter((option) => option.value === value )\n if(_.isPresent(value) && _.isBlank(selectedOption)) {\n selectedOption = { value, label: value, __isNew__: true }\n }\n\n return (\n <div\n className={classNames(\"form-group\", \"string\", {\n optional: optional,\n \"form-group-invalid\": hasError,\n })}\n >\n {label ? (\n <div className=\"row\">\n <label\n className={classNames(\"form-control-label\", \"text\", \"col-md-4\", {\n optional: optional,\n })}\n >\n {label}\n </label>\n </div>\n ) : null}\n {subtext ? <p>{subtext}</p> : null}\n <CreatableSelect\n {...selectProps}\n name={name}\n value={selectedOption}\n ref={creatable}\n onBlur={handleBlur}\n placeholder={placeholder}\n onChange={({value},{name}) => onChange(value,name)}\n />\n {_.map(errors, (error) => (\n <div\n key={error}\n isClearable={isClearable}\n style={{ display: \"block\" }}\n className=\"invalid-feedback\"\n >\n <strong>{error}</strong>\n </div>\n ))}\n </div>\n );\n};\n\nCreateSelectInput.propTypes = {\n name: PropTypes.string.isRequired,\n label: PropTypes.node,\n subtext: PropTypes.node,\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]),\n options: PropTypes.arrayOf(PropTypes.shape({\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]),\n label: PropTypes.node\n }))\n};\n\n\nCreateSelectInput.propTypes = {\n};\n\n\nexport default CreateSelectInput;\n\n\n\n\n\n\n","import React, { useState, useReducer } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport {\n TextAreaInput,\n CheckboxInput\n} from 'auditComponents'\nconst Checkbox = CheckboxInput.Checkbox\n\n\nimport CreateSelectInput from \"./CreateSelectInput\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faPaperPlane, faCheck } from \"@fortawesome/free-solid-svg-icons\";\nimport { Btn } from \"sharedComponents\";\nimport { getCoworkerContacts } from \"../app/selectors\";\n//import { CheckboxInput, Checkbox } from \"./CheckboxInput\";\nimport { orderedSections } from \"./sections\";\nimport dotProp from \"dot-prop-immutable\";\nimport emailAddressCheck from \"email-addresses\";\nimport {\n ModalBox\n} from \"auditComponents\";\nimport { getHelp } from '../app/operations'\n\nconst d = dotProp;\n\nconst sectionIdsReducer = (sectionIds, { value, sectionId }) => {\n if (value) {\n return _(sectionIds).concat(sectionId).uniq().value();\n } else {\n return _.without(sectionIds, sectionId);\n }\n};\n\nvar GetHelpModal = ({ onSubmit, closeModal, coworkerContacts }) => {\n const [submited, setSubmit] = useState(false);\n const [comment, setComment] = useState();\n const [coworkerEmail, setCoworkerEmail] = useState();\n const [sectionIds, setSectionId] = useReducer(sectionIdsReducer, []);\n\n if (!submited) {\n\n const buttonsDisabled = _.isBlank(coworkerEmail) || _.isBlank(sectionIds);\n return (\n <ModalBox\n title=\"Help Request\"\n subtext=\"To send a request, enter your coworker's name and select any sections which require help\"\n buttonsDisabled={buttonsDisabled}\n onClose={closeModal}\n onSend={() => {\n onSubmit(coworkerEmail, sectionIds, comment);\n setSubmit(true);\n }}\n className=\"get-help-modal\"\n >\n <CreateSelectInput\n name=\"coworkerEmail\"\n value={coworkerEmail}\n label=\"Coworker Email\"\n isValidNewOption={emailAddressCheck.parseOneAddress}\n options={_.map(\n coworkerContacts,\n ({ displayName: label, email: value }) => ({ value, label })\n )}\n formatCreateLabel={(input) => `Send to '${input}'`}\n createOptionPosition=\"first\"\n onChange={(v) => setCoworkerEmail(v.replace(/\\s/g,''))}\n placeholder=\"Select or input a coworkers email\"\n />\n <CheckboxInput label=\"Select the sections you need help with\">\n {_.map(orderedSections, ({ sectionId, title }) =>{ \n return(\n <Checkbox\n key={sectionId}\n value={_.includes(sectionIds, sectionId)}\n name={sectionId}\n label={title}\n onSelect={(value) => setSectionId({ value, sectionId })}\n />\n ) } \n )}\n </CheckboxInput>\n <TextAreaInput\n name=\"comment\"\n value={comment}\n label=\"Comment\"\n onChange={(v) => setComment(v)}\n placeholder=\"Add your comment\"\n />\n </ModalBox>\n );\n } else {\n return (\n <React.Fragment>\n <div className=\"an-modal__body text-center\">\n <div className=\"an-modal__header--title\">Help is on the way</div>\n <FontAwesomeIcon\n className=\"text-success\"\n icon={faCheck}\n size=\"4x\"\n />\n <p style={{ marginBottom: \"0\" }}>\n A email has been sent to to {coworkerEmail} to ask for help. \n </p>\n </div>\n <div className=\"an-switch-modal__footer\">\n <Btn\n onClick={closeModal}\n className=\"w-phone-100 m-0\"\n styles=\"outline-primary\"\n >\n Close\n </Btn>\n </div>\n </React.Fragment>\n );\n }\n};\n\nGetHelpModal.propTypes = {};\n\nconst mapStateToProps = (state, {}) => {\n return {\n coworkerContacts: getCoworkerContacts(state),\n };\n};\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onSubmit: (coworkerEmail, sectionIds, comment) => { dispatch(getHelp(coworkerEmail, sectionIds, comment))},\n };\n};\n\nGetHelpModal = connect(mapStateToProps, mapDispatchToProps)(GetHelpModal);\n\nexport default GetHelpModal;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodashExtended\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faQuestionCircle } from \"@fortawesome/free-regular-svg-icons\";\nimport { Btn } from \"sharedComponents\";\nimport { useHistory, useRouteMatch } from \"react-router-dom\";\nimport GetHelpModal from \"./GetHelpModal\";\nimport { ModalRoute } from \"react-router-modal\";\n//import { isMobile } from \"react-device-detect\";\nimport { Portal } from \"react-portal\";\nimport { useMediaQuery } from \"react-responsive\";\n\n//import actions from '../slice/actions'\n//var {\n//} = actions\n\nvar NeedHelp = ({}) => {\n let history = useHistory();\n const isMobileMode = useMediaQuery({ maxWidth: 992 });\n\n var component;\n\n if (isMobileMode) {\n component = (\n <Portal node={document && document.getElementById(\"react-menu-portal\")}>\n <Btn onClick={() => history.push(`/getHelp`)} styles=\"btn nav\">\n Ask for help\n </Btn>\n </Portal>\n );\n } else {\n component = (\n <div className=\"my-4 card shadow-sm\">\n <div className=\"card-body\">\n <h4 className=\"text-primary font-weight-bold\">\n <FontAwesomeIcon size=\"lg\" icon={faQuestionCircle} /> Need help from\n a colleague?\n </h4>\n <p className=\"m-0\">\n Ask a colleague to complete a specific part(s) of the audit. This will send an e-mail link to your colleague to access this audit.\n </p>\n <div className=\"mt-4\">\n <Btn\n onClick={() => history.push(`/getHelp`)}\n styles=\"outline-primary w-100\"\n className=\"w-100\"\n >\n Ask a colleague for help\n </Btn>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <React.Fragment>\n <ModalRoute path=\"/getHelp\" parentPath=\"/\" component={GetHelpModal} />\n {component}\n </React.Fragment>\n );\n};\n\nNeedHelp.propTypes = {};\n\n//const mapStateToProps = (state, {}) => {\n//return {\n//}\n//}\n\n//const mapDispatchToProps = (dispatch, {}) => {\n//return {\n//}\n//}\n\n//NeedHelp = connect(\n//mapStateToProps,\n//mapDispatchToProps\n//)(NeedHelp)\n\nexport default NeedHelp;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _ from \"lodashExtended\";\nimport { Btn } from \"sharedComponents\";\n\nvar SubmittedModal = ({afterSubmitPath}) => {\n\n return (\n <div className=\"an-modal\">\n <div className=\"an-modal__nav\"></div>\n <div className=\"an-modal__header\">\n <div className=\"an-modal__header--title\">Audit Submitted</div>\n </div>\n <div className=\"an-modal__body\">\n <p>Thank you for submitting your site audit.</p>\n <p>\n This report will be reviewed by Anenta and you'll have the ability to\n develop action items on any failed audit items that will be shown on\n your audit report\n </p>\n </div>\n <div className=\"an-modal__footer text-center\">\n <Btn\n onClick={() => (window.location = afterSubmitPath)}\n className=\"w-phone-100 m-0\"\n styles=\"primary\"\n >\n Go to your Home Page\n </Btn>\n </div>\n </div>\n );\n};\n\n\n\nSubmittedModal.propTypes = {\n afterSubmitPath: PropTypes.string.isRequired,\n}\n\nexport default SubmittedModal;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport _ from \"lodashExtended\";\nimport { Btn } from \"sharedComponents\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faPaperPlane } from \"@fortawesome/free-solid-svg-icons\";\n\nvar SubmitWarningModal = ({\n onSubmit,\n closeModal\n}) => {\n return (\n <div className=\"an-modal\">\n <div className=\"an-modal__nav\"></div>\n <div className=\"an-modal__header\">\n <div className=\"an-modal__header--title\">Are you sure you want to Submit the Audit?</div>\n </div>\n <div className=\"an-modal__body\">\n <p>\n Before you submit this audit please ensure that you provide all required information\n and that all attachments are related to the question and are clearly visible.\n Missing information or unclear images may affect your audit score\n </p>\n </div>\n <div className=\"an-modal__footer text-center\">\n <Btn\n onClick={closeModal}\n className=\"m-1\"\n styles=\"outline-primary\"\n >\n Back to Overview\n </Btn>\n <Btn\n onClick={onSubmit}\n className=\"m-1\"\n styles=\"primary\"\n >\n <FontAwesomeIcon icon={faPaperPlane} /> Submit Audit\n </Btn>\n </div>\n </div>\n );\n};\n\nexport default SubmitWarningModal;\n","import React, { useEffect } from 'react';\nimport PropTypes from \"prop-types\"\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended';\nimport { orderedSectionSummaryViews } from './sections'\nimport SubmittedModal from './SubmittedModal'\nimport SubmitWarningModal from './SubmitWarningModal'\n\nimport {\n SubmitSummary\n} from 'auditComponents'\n\n\nexport default (props) => {\n return <SubmitSummary\n {...props}\n orderedSectionSummaryViews={orderedSectionSummaryViews}\n submittedModal={SubmittedModal}\n submitWarningModal={SubmitWarningModal}\n title=\"Waste Management Audit Overview\"\n />\n}\n","import { StatusSummary } from 'auditComponents';\nimport _ from 'lodashExtended';\nimport PropTypes from 'prop-types';\nimport React, { useEffect, useLayoutEffect, useState } from 'react';\nimport { isMobile } from 'react-device-detect';\nimport { identify } from 'react-fullstory';\nimport { connect } from 'react-redux';\nimport { firestoreConnect } from 'react-redux-firebase';\nimport { useMediaQuery } from 'react-responsive';\nimport { Route, Switch, useLocation } from 'react-router-dom';\nimport StickyBox from 'react-sticky-box';\nimport { compose } from 'redux';\nimport { Link } from 'sharedComponents';\n\nimport { addEventListeners, removeEventListeners } from '../app/helper';\nimport { goToSummaryPage, submitAudit } from '../app/operations';\nimport { areAllSectionsComplete, getSectionStatusById } from '../sections/selectors';\nimport { getAuditDocument } from '../wasteAudit/selectors';\nimport NeedHelp from './NeedHelp';\nimport sectionComponents, { orderedSectionIds } from './sections';\nimport SubmitSummary from './SubmitSummary';\n\nvar App = (props) => {\n const {\n allDataLoaded,\n wasteAudit,\n fullStoryOrgId,\n currentUser,\n guidebookUrl,\n } = props;\n\n const isMobileMode = useMediaQuery({ maxWidth: 992 });\n const location = useLocation();\n\n const [showSubmit, setShowSubmit] = useState(false);\n const [showSummaryBox, setShowSummaryBox] = useState(true);\n\n useLayoutEffect(() => {\n if (fullStoryOrgId) {\n identify(currentUser.id, {\n displayName: currentUser.name,\n email: currentUser.email,\n });\n console.log(\"fullstory\");\n }\n }, [fullStoryOrgId, currentUser]);\n\n useEffect(() => {\n if (isMobile) {\n document.getElementById(\n \"dropdownMenuButtonNav\"\n ).innerHTML = `<i class=\"fas fa-user\"></i>`;\n }\n window.addEventListener(\"keyup\", function (event) {\n if (event.key === \"Enter\") {\n if (event.target.localName === \"textarea\") {\n return;\n }\n event.target.blur();\n }\n });\n\n return () => {\n window.removeEventListener(\"keyup\", () => {});\n };\n }, [isMobile]);\n\n const isBottom = (el) => {\n const height = window.innerHeight + 100;\n return el.getBoundingClientRect().bottom <= height;\n };\n\n const trackScrolling = _.debounce(\n () => {\n const wrappedElement = document.getElementById(\"main\");\n wrappedElement && isBottom(wrappedElement)\n ? setShowSubmit(true)\n : setShowSubmit(false);\n },\n 50,\n { maxWait: 200 }\n );\n\n useLayoutEffect(() => {\n if (isMobile) {\n addEventListeners(\"input\", \"focus\", (e) => {\n setShowSummaryBox(false);\n });\n\n addEventListeners(\"input\", \"blur\", (e) => {\n setShowSummaryBox(true);\n });\n\n return () => {\n removeEventListeners(\"input\", \"focus\");\n removeEventListeners(\"input\", \"blur\");\n };\n }\n }, [isMobile, wasteAudit]);\n\n useLayoutEffect(() => {\n if (isMobileMode) {\n setShowSummaryBox(location.pathname !== \"/submitSummary\");\n document.addEventListener(\"scroll\", trackScrolling);\n return () => {\n document.removeEventListener(\"scroll\", trackScrolling);\n };\n }\n }, [isMobileMode, wasteAudit]);\n\n if (wasteAudit) {\n return (\n <main role=\"main\" className=\"main\" id=\"main\">\n <Switch>\n <Route path=\"/submitSummary\">\n <SubmitSummary {...props} />\n </Route>\n <Route path=\"/\">\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-main\">\n <div className=\"page-header\">\n Duty of Care Waste Management Audit\n </div>\n <p>\n Welcome to your Waste Management Audit. This audit forms\n part of statutory requirements which you are required to\n hold evidence for. This online self audit has been developed\n in light of Covid 19 and the restrictions placed upon us for\n social distancing and to prevent unnecessary interactions\n through having a physical presence on sight.\n </p>\n <p>\n This audit complies with all aspects of a waste audit that\n should be conducted on an annual basis. Each section should\n be completed to the best of your abilities and by an\n individual competent in knowledge of waste management at\n your practice.\n </p>\n\n <div className=\"panel-body bordered d-flex mb-2 py-2 pr-1\">\n <div className=\"d-flex justify-content-center align-items-center\">\n <i className=\"fa fa-info-circle mx-3 fa-lg\"></i>\n </div>\n\n <div className=\"\">\n <p>\n Anenta have worked in conjunction with HEE to develop a\n standardised training package that encompasses all areas\n of waste from NHS strategy to correct waste segregation.\n Use the link below to access e-learning for health and\n search Healthcare Waste Management and Disposal. If you\n do not have an account feel free to register for this\n free service.\n </p>\n\n <p className=\"pt-2\">\n <a href=\"http://portal.e-lfh.org.uk/Component/Details/763177\">\n http://portal.e-lfh.org.uk/Component/Details/763177\n </a>\n </p>\n </div>\n </div>\n\n {guidebookUrl ? (\n <React.Fragment>\n <p>\n Please read the downloadable document below to get more\n information about what documents, images and other\n information that will be required to complete this\n audit. You may wish to gather some of this information\n prior to starting each section.\n </p>\n <p>\n <Link target=\"_blank\" href={guidebookUrl}>\n <i\n className=\"fa fa-file-text-o fa-6\"\n aria-hidden=\"true\"\n ></i>\n   Self-Audit Guidebook.pdf\n </Link>\n </p>\n </React.Fragment>\n ) : null}\n <Route path={[\"/section/:sectionId\", \"/\"]}>\n {_.map(sectionComponents, (Section, i) => (\n <Section key={i} wasteAudit={wasteAudit} />\n ))}\n </Route>\n </div>\n\n {!isMobileMode ? (\n <div className=\"col-sidebar\">\n <StickyBox\n offsetTop={100}\n offsetBottom={20}\n className=\"position-sticky\"\n >\n <Route path={[\"/section/:sectionId\", \"/\"]}>\n <StatusSummary\n {...props}\n orderedSectionIds={orderedSectionIds}\n />\n <NeedHelp />\n </Route>\n </StickyBox>\n </div>\n ) : null}\n </div>\n </div>\n </Route>\n </Switch>\n\n {isMobileMode && showSummaryBox ? (\n <React.Fragment>\n <NeedHelp />\n <StickyBox\n bottom={true}\n style={{ zIndex: 1 }}\n className=\"summary-box\"\n >\n <Route path={[\"/section/:sectionId\", \"/\"]}>\n <StatusSummary {...props} showSubmit={showSubmit} />\n </Route>\n </StickyBox>\n </React.Fragment>\n ) : null}\n </main>\n );\n } else {\n return (\n <div className=\"loader-container\">\n <div className=\"loader\"></div>\n <div className=\"loader-text\">Loading</div>\n </div>\n );\n }\n};\n\nApp.propTypes = {\n auditDocumentId: PropTypes.string.isRequired,\n};\n\nconst mapStateToProps = (state, props) => {\n const { auditDocumentId, afterSubmitPath, currentUser, guidebookUrl } =\n state.app;\n\n return {\n auditDocumentId,\n wasteAudit: getAuditDocument(auditDocumentId, state),\n afterSubmitPath,\n currentUser,\n guidebookUrl,\n sectionStatusById: getSectionStatusById(state),\n allSectionsComplete: areAllSectionsComplete(state),\n };\n};\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {\n onSubmitAudit: (successPath) => dispatch(submitAudit(successPath)),\n goToSummaryPage: () => dispatch(goToSummaryPage()),\n };\n};\n\nApp = compose(\n connect(mapStateToProps, mapDispatchToProps),\n firestoreConnect(({ auditDocumentId }) => {\n return [\n {\n collection: \"waste_audits\",\n doc: auditDocumentId,\n },\n {\n collection: \"waste_audits\",\n doc: auditDocumentId,\n subcollections: [{ collection: \"sections\" }],\n storeAs: \"sections\", // make sure to include this\n },\n {\n collection: \"waste_audits\",\n doc: auditDocumentId,\n subcollections: [{ collection: \"rooms\" }],\n storeAs: \"rooms\", // make sure to include this\n orderBy: [\"createdAt\"],\n },\n {\n collection: \"waste_audits\",\n doc: auditDocumentId,\n subcollections: [{ collection: \"bins\" }],\n storeAs: \"bins\", // make sure to include this\n orderBy: [\"createdAt\"],\n },\n {\n collection: \"waste_audits\",\n doc: auditDocumentId,\n subcollections: [{ collection: \"bulkContainments\" }],\n storeAs: \"bulkContainments\", // make sure to include this\n orderBy: [\"createdAt\"],\n },\n ];\n })\n)(App);\n\nexport default App;\n","import actions from './actions'\nimport { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\n\nconst {\n //setOnlineStatus,\n} = actions\n\nconst reducer = createReducer({\n //[setOnlineStatus]: (app, { payload }) => {\n //return dotProp.set(app, 'online', payload)\n //}\n},\n{ })\n\nreducer.options({\n payload: false\n});\n\n\nexport default reducer\n\n","import reducer from './reducer'\n\nexport { default as appActions } from \"./actions\";\n\nexport default reducer\n","import { createReducer } from 'redux-act'\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\nimport { compose } from 'redux'\nimport { firestoreReducer } from 'redux-firestore';\n\nvar d = dotProp\n\nconst reducer = createReducer({\n ['@@reactReduxFirebase/FILE_UPLOAD_PROGRESS']: (firestore, action) => {\n return d.merge(\n firestore,\n `data.${_.replace(action.meta.options.storeProgressAt, /\\//g, '.')}`, \n { percentUploaded: action.payload.percent }\n )\n },\n ['@@reactReduxFirebase/FILE_UPLOAD_START']: (firestore, action) => {\n return d.merge(\n firestore,\n `data.${_.replace(action.payload.options.storeProgressAt, /\\//g, '.')}`, \n { percentUploaded: 0 }\n )\n },\n},\n {})\n\n\nreducer.options({\n payload: false\n});\n\n\n\n\nconst combinedReducer = (state, action) => {\n var nextState = reducer(state, action)\n return firestoreReducer(nextState,action)\n}\n\n\nexport default combinedReducer\n\n","import reducer from './reducer'\n\nexport default reducer\n","import dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\nimport { firebaseReducer } from 'react-redux-firebase'\nimport appReducer from './app'\nimport { connectRouter } from 'connected-react-router'\nimport firestoreReducer from './firestore'\n\n\nconst createRootReducer = (history) => {\n\n\n const routerReducer = connectRouter(history)\n\n const reducer = (state = {}, action) => {\n return {\n ...state,\n app: appReducer(state.app, action),\n firestore: firestoreReducer(state.firestore, action),\n firebase: firebaseReducer(state.firebase, action),\n router: routerReducer(state.router, action)\n }\n\n }\n\n\n return reducer\n\n}\n\nexport default createRootReducer\n\n","import { createStore, applyMiddleware } from 'redux';\nimport createRootReducer from './reducer'\nimport thunk from 'redux-thunk'\nimport { routerMiddleware } from 'connected-react-router'\nimport { composeWithDevTools } from 'redux-devtools-extension';\nimport { reduxFirestore, getFirestore } from 'redux-firestore';\nimport { getFirebase } from 'react-redux-firebase'\nimport { createHashHistory } from 'history'\nimport appActions from './app/actions'\n\nexport const history = createHashHistory()\n\nexport default function configureStore(initialState, firebase) {\n\n const rootReducer = createRootReducer(history)\n\n\n const store = createStore(rootReducer,\n initialState,\n composeWithDevTools(\n applyMiddleware(\n routerMiddleware(history),\n thunk.withExtraArgument({getFirestore, getFirebase})\n ),\n reduxFirestore(firebase)\n ));\n\n\n\n //var connectedRef = firebase.database().ref(\".info/connected\");\n\n //connectedRef.on(\"value\", function(snap) {\n //if (snap.val() === true) {\n //store.dispatch(appActions.setOnlineStatus(true))\n //} else {\n //store.dispatch(appActions.setOnlineStatus(false))\n //}\n //});\n\n firebase.firestore().enablePersistence()\n .catch((error) => {\n if (error === \"failed-precondition\") {\n alert(\"Multiple tabs open, offline data only works in one tab at a a time.\")\n } else if (error === \"unimplemented\") {\n alert(\"Cannot save offline on this browser.\")\n }\n });\n\n if (module.hot) {\n module.hot.accept('./reducer', () => {\n const nextRootReducer = createRootReducer(history)\n store.replaceReducer(nextRootReducer);\n });\n }\n\n return store;\n\n}\n","import React from \"react\"\nimport { Provider } from 'react-redux';\nimport { RootNode, configureStore, history } from '../apps/auditor'\nimport firebase from 'firebase/app'\nimport 'firebase/auth';\nimport 'firebase/database';\nimport 'firebase/firestore';\nimport 'firebase/storage';\nimport { ReactReduxFirebaseProvider } from 'react-redux-firebase';\nimport { createFirestoreInstance } from 'redux-firestore'\nimport { ConnectedRouter } from 'connected-react-router'\nimport 'react-router-modal/css/react-router-modal.css'\nimport { ModalContainer } from 'react-router-modal';\nimport FullStory from 'react-fullstory';\n\nconst rrfConfig = { useFirestoreForStorageMeta: true } \n\nexport default ({initialState, fbConfig}) => {\n firebase.initializeApp(fbConfig)\n firebase.firestore().settings({ experimentalForceLongPolling: true });\n\n const fullStoryOrgId = initialState.app.fullStoryOrgId\n\n const store = configureStore(initialState, firebase)\n\n return (\n <Provider store={store}>\n <ConnectedRouter history={history}>\n <ReactReduxFirebaseProvider\n firebase={firebase}\n config={rrfConfig}\n dispatch={store.dispatch}\n createFirestoreInstance={createFirestoreInstance}>\n { fullStoryOrgId ? <FullStory org={fullStoryOrgId}/> : null }\n <div id='auditor-app'>\n <RootNode fullStoryOrgId={fullStoryOrgId}/>\n <ModalContainer />\n </div>\n </ReactReduxFirebaseProvider>\n </ConnectedRouter>\n </Provider>\n );\n}\n\n","import React from 'react'\nimport createReactClass from 'create-react-class'\nimport classNames from 'classnames'\n\nvar CheckList = createReactClass({\n render: function() {\n var self = this\n var options = _.map(this.props.children, function(child, i) {\n\n return React.cloneElement(child, {\n key: i,\n onClick: self.handleSelect,\n selected: _.isEqual(child.props.value, self.props.selectedValue)\n }, child.props.children);\n\n\n })\n return (\n <div className=\"list-group\">\n {options}\n </div>\n );\n },\n handleSelect: function(value) {\n this.props.onChange(value)\n }\n});\n\nvar CheckListOption = createReactClass({\n render: function() {\n var classes = classNames({\n 'list-group-item': true,\n 'active': this.props.selected\n });\n\n var style = this.props.selected ? {fontWeight: '600'} : {}\n\n var tick = this.props.selected ? (\n <i className=\"fa fa-check pull-right\" style={{fontSize: '120%', top: 3, position: 'relative' }}></i>\n ) : null\n\n return (\n <a href=\"#\" onClick={this.handleClick} className={classes} style={style}>\n {tick}\n {this.props.children}\n </a>\n );\n },\n handleClick: function(e) {\n e.preventDefault()\n this.props.onClick(this.props.value)\n }\n});\n\n\nexport default {\n List: CheckList,\n ListOption: CheckListOption\n}\n","import React from 'react'\nimport ReactDOM from 'react-dom'\nimport createReactClass from 'create-react-class'\nimport PropTypes from 'prop-types'\n\nvar Counter = createReactClass({\n propTypes: {\n displayAbsoluteNumber: PropTypes.bool\n },\n\tgetDefaultProps: function() {\n\t\treturn {\n\t\t\tmax: 1000,\n\t\t\tmin: -1000\n\t\t}\n\t},\n\trender: function() {\n\n\t\tvar moreClass = 'more badge ' + (this.maxReached() ? 'disabled' : '')\n\t\tvar lessClass = 'less badge ' + (this.minReached() ? 'disabled' : '')\n\n\t\treturn <span className=\"counter unselectable\">\n\t\t\t<span className=\"badge badge-success\">{ this.props.displayAbsoluteNumber ? Math.abs(this.props.count) : this.props.count }</span>\n\t\t\t<span className={moreClass} onClick={this.maxReached() ? null : this.moreHandler}><i className=\"fa fa-plus\"></i></span>\n\t\t\t<span className={lessClass} onClick={this.minReached() ? null : this.lessHandler}><i className=\"fa fa-minus\"></i></span>\n\t\t</span>\n\n\t},\n\tmoreHandler: function() {\n var oldCount = this.props.count\n var newCount = this.props.count + 1\n\t\tthis.props.changeHandler(1, newCount, oldCount)\n\t},\n\tlessHandler: function() {\n var oldCount = this.props.count\n var newCount = this.props.count - 1\n\t\tthis.props.changeHandler(-1, newCount, oldCount)\n\t},\n\tmaxReached: function() {\n\t\treturn this.props.count >= this.props.max\n\t},\n\tminReached: function() {\n\t\treturn this.props.count <= this.props.min\n\t}\n})\n\n\nvar InputCounter = createReactClass({\n propTypes: {\n displayAbsoluteNumber: PropTypes.bool\n },\n\tgetDefaultProps: function() {\n\t\treturn {\n\t\t\tdescription: null,\n\t\t\tmax: 1000,\n\t\t\tmin: -1000,\n\t\t\twidth: 200\n\t\t}\n\t},\n\trender: function() {\n\n\t\tvar moreClass = 'more badge ' + (this.maxReached() ? 'disabled' : '')\n\t\tvar lessClass = 'less badge ' + (this.minReached() ? 'disabled' : '')\n\n\t\t// class for disabled more less button: non-active\n\n\t\tvar inputClass = 'zero'\n\t\tif(this.props.count > 0) {\n\t\t\tinputClass = 'greater-than-zero'\n\t\t} else if(this.props.count < 0) {\n\t\t\tinputClass = 'less-than-zero'\n\t\t}\n\n\t\treturn <div className=\"input-counter input-group input-group-sm unselectable\" style={{width: this.props.width}} data-toogle=\"popover\" data-trigger=\"hover\" data-content={this.props.description}>\n \t \t<span className=\"input-group-btn\">\n\t \t<span className=\"btn flat btn-text-only\" style={{width: this.props.width - 100}}>{this.props.name}</span>\n\t \t</span>\n \t \t<input type=\"text\" value={ this.props.displayAbsoluteNumber ? Math.abs(this.props.count) : this.props.count } readOnly className={\"form-control \" + inputClass} />\n\n \t \t<span className=\"input-group-btn\">\n \t \t\t<span className=\"btn flat btn-default control\" onClick={this.maxReached() ? null : this.moreHandler}><i className=\"fa fa-plus\"></i></span>\n \t \t\t<span className=\"btn flat btn-default control\" onClick={this.minReached() ? null : this.lessHandler}><i className=\"fa fa-minus\"></i></span>\n \t \t\t<span className=\"btn flat btn-default toggle\"><i className=\"fa fa-sort\"></i></span>\n\t \t</span>\n\t </div>\n\n\t},\n\tmoreHandler: function() {\n var oldCount = this.props.count\n var newCount = this.props.count + 1\n\t\tthis.props.changeHandler(1, newCount, oldCount)\n\t},\n\tlessHandler: function() {\n var oldCount = this.props.count\n var newCount = this.props.count - 1\n\t\tthis.props.changeHandler(-1, newCount, oldCount)\n\t},\n\tmaxReached: function() {\n\t\treturn this.props.count >= this.props.max\n\t},\n\tminReached: function() {\n\t\treturn this.props.count <= this.props.min\n\t},\n componentDidMount: function() {\n if(!_.isNull(this.props.description)) {\n \t$(ReactDOM.findDOMNode(this)).popover()\n }\n },\n componentWillUnmount: function() {\n if(!_.isNull(this.props.description)) {\n \t$(ReactDOM.findDOMNode(this)).popover('destroy')\n }\n }\n})\n\n\n\nexport default {\n Counter: Counter,\n InputCounter: InputCounter\n}\n","import React from 'react'\nimport ReactDOM from 'react-dom'\nimport createReactClass from 'create-react-class'\nimport PropTypes from 'prop-types'\n\nvar DatePicker = createReactClass({\n getDefaultProps: function() {\n return {\n width: 3,\n label: null,\n displayFormat: 'dddd, Do MMMM YYYY'\n };\n },\n render: function() {\n\n var label = _.isString(this.props.label) ? <label className=\"control-label\">{this.props.label}</label> : null\n var successIcon = moment.isMoment(this.props.date) ? <span className=\"fa fa-check form-control-feedback\"></span> : null\n var placeholder = this.props.placeholder ? this.props.placeholder : \"select date...\"\n\n return (<div className={\"form-group has-feedback\" + (this.props.date ? ' has-success' : '')}>\n <div className=\"row\">\n <div className={\"col-xs-\"+this.props.width}>\n {label}\n <input onChange={this.inputChange} defaultValue={this.props.date ? moment(this.props.date).format(this.props.displayFormat) : null} type=\"text\" data-date-format=\"dddd, Do MMMM YYYY\" placeholder={placeholder} className=\"form-control\" readOnly/>\n {successIcon}\n </div>\n </div>\n </div>)\n },\n\n componentDidMount: function() {\n\n this.setState({\n picker: $(ReactDOM.findDOMNode(this)).find('input').datetimepicker({\n useCurrent: false,\n minDate: this.props.minDate,\n maxDate: this.props.maxDate\n })\n }, function() {\n\n var input = $($(ReactDOM.findDOMNode(this)).find('input'), this)\n\n input.on('dp.change', $.proxy(function(ev) {\n var date = this.state.picker.data(\"DateTimePicker\").date()\n if(_.isObject(date)) {\n input.closest('.form-group').addClass('has-success')\n this.props.onChange(date)\n }\n }, this ))\n\n if(_.isNull(this.props.date)) {\n input.val('')\n }\n\n })\n },\n componentWillReceiveProps: function(nextProps) {\n var self = this\n var input = $($(ReactDOM.findDOMNode(self)).find('input'), self)\n var newDate = nextProps.date ? moment(nextProps.date).format(nextProps.displayFormat) : ''\n input.val(newDate)\n }\n})\n\n\nexport default DatePicker\n","import React from 'react'\nimport ReactDOM from 'react-dom'\nimport createReactClass from 'create-react-class'\nimport PropTypes from 'prop-types'\n\nvar ReactSelect2 = createReactClass({\n\n propTypes: {\n // Array of <option /> components to be placed into the select\n children: PropTypes.array,\n name: PropTypes.string,\n multiple: PropTypes.bool,\n // The initial selected value; one of the option children should have a\n // matching value=\"...\"\n // defaultValue: PropTypes.string,\n // Callback executed when the selected value changes; receives a single\n // jQuery event object `e` from select2; `e.target` refers to the real\n // <select> element and `e.val` refers to the new selected value\n onChange: PropTypes.func\n },\n\n getDefaultProps: function() {\n \treturn {\n \t\tplaceholder: null,\n \t\textraClass: 'input-sm'\n \t}\n },\n\n render: function() {\n\n \tvar blankOption = this.props.placeholder ? (\n \t\t<option></option>\n \t) : null\n\n \tvar width = this.props.width || 'auto'\n\n return <select\n defaultValue={this.props.defaultValue}\n name={this.props.name}\n id={this.props.id}\n className={\"standard-input form-control \" + this.props.extraClass}\n multiple={this.props.multiple}\n style={{ width: width }}\n >\n \t{blankOption}\n \t{this.props.children}\n \t\t </select>\n },\n\n componentDidMount: function() {\n\t\tvar rootNode = $(ReactDOM.findDOMNode(this))\n\n rootNode.select2({minimumResultsForSearch: 15, allowClear: true, placeholder: this.props.placeholder})\n rootNode.on(\"change\", this._handleChange)\n\n if (this.props.defaultValue != null) { rootNode.select2(\"val\", this.props.defaultValue) }\n },\n\n\tcomponentDidUpdate: function() {\n\t\tvar rootNode = $(ReactDOM.findDOMNode(this))\n\t\trootNode.select2(\"val\", this.props.defaultValue)\n\t\trootNode.select2({placeholder: this.props.placeholder, minimumResultsForSearch: 15, allowClear: true })\n\t},\n\n componentWillUnmount: function() {\n $(ReactDOM.findDOMNode(this)).select2(\"destroy\")\n },\n\n _handleChange: function(e) {\n this.props.onChange && this.props.onChange(e)\n }\n});\n\n\nexport default ReactSelect2\n","import React from 'react'\nimport ReactLinkedStateMixin from 'react-addons-linked-state-mixin'\nimport ReactSelect2 from './select2'\nimport createReactClass from 'create-react-class'\nimport PropTypes from 'prop-types'\n\nvar FormGroup = createReactClass({\n getDefaultProps: function() {\n return {\n name: null,\n required: false,\n label: null,\n hint: null,\n hintPosition: 'bottom',\n errorMessage: null,\n visible: true\n };\n },\n render: function() {\n var errorMessage = null\n\n if(_.isString(this.props.errorMessage)){\n errorMessage = this.props.errorMessage\n } else if(_.isArray(this.props.errorMessage)){\n errorMessage = _(this.props.errorMessage).join(', ')\n }\n\n var labelEl = _.isString(this.props.label) ? (\n <label className=\"control-label\" htmlFor={this.props.name}><strong>{this.props.label}</strong> {this.props.required ? <i className=\"fa fa-asterisk text-muted\"></i> : null}</label>\n ) : null\n\n var error = errorMessage ? (\n <div className=\"error-block\">{errorMessage}</div>\n ) : null\n\n var hint = this.props.hint && !errorMessage ? (\n <div className={\"hint-block hint-\" + this.props.hintPosition}>{this.props.hint}</div>\n ) : null\n\n var hintTop = null\n var hintBottom = null\n\n if(this.props.hintPosition == 'top') { hintTop = hint } else { hintBottom = hint }\n\n return(\n <div className={\"form-group \" + (errorMessage ? 'has-error' : '')} style={{ display: this.props.visible ? 'block' : 'none' }}>\n {labelEl}\n {hintTop}\n <div className=\"input-wrapper\">\n {this.props.children}\n </div>\n {error}\n {hintBottom}\n </div>\n );\n }\n});\n\n\n\nvar TextField = createReactClass({\n mixins: [ReactLinkedStateMixin],\n getDefaultProps: function() {\n return {\n disabled: false\n };\n },\n getInitialState: function() {\n return { value: this.props.value }\n },\n componentWillReceiveProps(nextProps) {\n var valueLink = this.linkState('value')\n if(nextProps.value != valueLink.value) {\n valueLink.requestChange(nextProps.value)\n }\n },\n render: function() {\n var self = this\n var valueLink = self.linkState('value')\n\n var handleChange = function(e) {\n valueLink.requestChange(e.target.value)\n self.props.onChange(e)\n };\n\n return(\n <input type=\"text\" value={valueLink.value} onChange={handleChange} className=\"form-control\" disabled={this.props.disabled} id={this.props.id}/>\n );\n }\n});\n\n\nvar PasswordField = createReactClass({\n getDefaultProps: function() {\n return {\n disabled: false\n };\n },\n render: function() {\n return(\n <input type=\"password\" defaultValue={''} onChange={this.handleChange} className=\"form-control\" disabled={this.props.disabled} id={this.props.id}/>\n );\n },\n handleChange: function(event) {\n this.props.onChange(event)\n }\n});\n\n\nvar TextArea = createReactClass({\n mixins: [ReactLinkedStateMixin],\n getDefaultProps: function() {\n return {\n disabled: false\n };\n },\n getInitialState: function() {\n return { value: this.props.value }\n },\n componentWillReceiveProps(nextProps) {\n var valueLink = this.linkState('value')\n if(nextProps.value != valueLink.value) {\n valueLink.requestChange(nextProps.value)\n }\n },\n render: function() {\n var self = this\n var valueLink = self.linkState('value')\n\n var handleChange = function(e) {\n valueLink.requestChange(e.target.value)\n self.props.onChange(e)\n };\n\n return(\n <textarea value={valueLink.value} onChange={handleChange} className=\"form-control\" disabled={this.props.disabled} id={this.props.id}/>\n );\n }\n});\n\n\nvar SelectField = createReactClass({\n getDefaultProps: function() {\n return {\n id: null,\n width: '100%'\n };\n },\n render: function() {\n return(\n <ReactSelect2 onChange={this.props.onChange} defaultValue={this.props.value} id={this.props.id} width=\"100%\" extraClass=''>\n {this.props.children}\n </ReactSelect2>\n );\n }\n});\n\n\n\n\nexport default {\n SelectField: SelectField,\n TextField: TextField,\n TextArea: TextArea,\n PasswordField: PasswordField,\n FormGroup: FormGroup\n}\n","import React from 'react'\nimport createReactClass from 'create-react-class'\nimport PropTypes from 'prop-types'\n\nvar FormGroupHolder = createReactClass({\n getDefaultProps: function() {\n return {\n controlClass: '',\n onClick: null,\n className: '',\n required: false\n }\n },\n render: function() {\n return (\n <div className=\"form-group\">\n <label className=\"col-sm-4 control-label\">{this.props.label}{this.props.required ? ' *' : ''}</label>\n <div className=\"col-sm-8\">\n <div onClick={this.props.onClick} className={this.props.controlClass}>{this.props.children}</div>\n </div>\n </div>\n )\n }\n})\n\n\nexport default FormGroupHolder\n","import React from 'react'\nimport ReactDOM from 'react-dom'\nimport createReactClass from 'create-react-class'\nimport PropTypes from 'prop-types'\n\nvar TagsInput = createReactClass({\n render: function() {\n return (\n <input type=\"text\" defaultValue={this.props.tags} className=\"form-control\"/>\n );\n },\n componentDidMount: function() {\n var self = this\n\n var $tagsInput = $(ReactDOM.findDOMNode(this))\n $tagsInput.tagsinput({\n confirmKeys: [13, 44, 9, 188],\n trimValue: true,\n tagClass: 'label label-primary',\n typeaheadjs: {\n name: 'tags',\n source: this.substringMatcher(self.props.suggestedTags.split(',')),\n hint: true,\n highlight: true,\n minLength: 1\n }\n })\n $tagsInput.on('itemAdded itemRemoved', function(event) {\n self.props.onChange(event.currentTarget.value)\n })\n },\n componentWillUnmount: function() {\n $(ReactDOM.findDOMNode(this)).tagsinput('destroy')\n },\n\n substringMatcher: function(strs) {\n return function findMatches(q, cb) {\n var matches, substringRegex;\n matches = [];\n var substrRegex = new RegExp(q, 'i');\n $.each(strs, function(i, str) {\n if (substrRegex.test(str)) {\n matches.push(str);\n }\n });\n cb(matches);\n };\n }\n});\n\n\nexport default TagsInput\n","import React from 'react';\nimport classNames from 'classnames'\nimport createReactClass from 'create-react-class'\nimport PropTypes from 'prop-types'\n\n\nvar Btn = createReactClass({\n\n getDefaultProps: function() {\n return {\n size: null,\n style: 'success',\n isLoading: false,\n cssStyle: {}\n }\n },\n\n render: function() {\n\n var size = {}\n if(this.props.size) { size['btn-'+this.props.size] = true }\n\n var style = {}\n if(this.props.style) { size['btn-'+this.props.style] = true }\n\n var clx = classNames({\n 'btn': true,\n 'btn-flat': true,\n 'btn-block': this.props.block,\n 'disabled': this.props.disabled\n }, size, style)\n\n var icon = this.props.icon ? (<i className={\"fa fa-\"+this.props.icon}></i>) : null\n var text = this.props.text ? <span>{this.props.text}  </span> : null\n\n var contents = this.props.isLoading ? (\n <span>Please Wait  <i className=\"fa fa-spinner fa-spin\"></i></span>\n ) : (\n <span>{_.isArray(this.props.children) || _.isString(this.props.children) ? this.props.children : <span>{text}{icon}</span>}</span>\n )\n\n return (\n <span onClick={this.handleClick} className={clx} style={this.props.cssStyle}>{contents}</span>\n );\n },\n\n handleClick: function(e) {\n if(!this.props.isLoading) {\n this.props.onClick(e)\n }\n }\n});\n\n\n\n\n\n\nvar ShowForHolder = createReactClass({\n render: function() {\n return (\n <table className=\"table table-hover show-for-table\">\n <tbody>\n {this.props.children}\n </tbody>\n </table>\n );\n }\n});\n\nvar ShowForItem = createReactClass({\n render: function() {\n return (\n <tr>\n <td className=\"small col-sm-3 text-muted\">{this.props.label}</td>\n <td className=\"content\">{this.props.value || this.props.children}</td>\n </tr>\n );\n }\n });\n\n\n\n\n\nexport default {\n Btn: Btn,\n ShowFor: {\n Holder: ShowForHolder,\n Item: ShowForItem\n }\n}\n","import SharedComponents from './lib/components'\n\nimport React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport _ from 'lodashExtended'\nimport createReactClass from 'create-react-class'\nimport PropTypes from 'prop-types'\n\nvar TagsInput = SharedComponents.Forms.TagsInput\n\nvar Note = createReactClass({\n getInitialState: function() {\n return {\n newText: '',\n newAssignedAgentId: this.props.assignedAgentId,\n newTags: this.props.tags,\n newReminderDate: this.props.reminderDate\n };\n },\n render: function() {\n\n if(this.props.editing) {\n return <div className=\"list-group-item note\" style={{backgroundColor: '#E6E9ED' }}>\n <p><strong>Update Note:</strong></p>\n\n <div className=\"form-group\">\n <textarea defaultValue={this.props.text} className=\"form-control\" onChange={this.updateText}/>\n </div>\n\n <div className=\"form-group\">\n <div style={{marginBottom: 8}}>Tags  <span className=\"text-muted small\">(do not make up new tags unless absolutely necessary)</span></div>\n <TagsInput tags={this.props.tags} onChange={this.updateTags} suggestedTags={this.props.suggestedTags} />\n </div>\n\n { !this.props.completed ? (\n <div className=\"form-group\">\n {_.isNull(this.state.newReminderDate) ? null : (\n <div className=\"pull-right\"><span onClick={this.clearReminderDate} className=\"btn btn-xs btn-flat\">Clear</span></div>\n )}\n <ReminderDatePicker date={this.state.newReminderDate} minDate={moment().add(-10, 'days')} maxDate={moment().add(1000, 'days')} onChange={this.updateReminderDate} />\n </div>\n ) : (\n <p>Reminder Completed</p>\n )}\n\n <div className=\"form-group\">\n <div style={{marginBottom: 8}}>Assigned to  <span className=\"text-muted small\">(only if this agent is absolutely responsible for this)</span></div>\n <select value={this.state.newAssignedAgentId} onChange={this.updateAssignedAgent}>\n <option value={''}></option>\n {_.map(this.props.agents, function(agent, i) {\n return <option value={agent.id} key={i}>{agent.name}</option>\n })}\n </select>\n </div>\n\n <div className=\"pull-right\">\n { this.props.reminderDate && !this.props.completed ? (\n <span className=\"btn btn-xs btn-flat btn-warning\" onClick={this.complete}>Complete</span>\n ) : null }\n { !this.props.reminderDate || (this.props.reminderDate && this.props.completed) ? (\n <span>  <span className=\"btn btn-xs btn-flat btn-danger\" onClick={this.destroy}>Archive</span></span>\n ) : null }\n </div>\n <span className=\"btn btn-xs btn-flat btn-success\" onClick={this.submit}>Update</span>  \n <span className=\"btn btn-xs btn-flat btn-default\" onClick={this.cancel}>Cancel</span>\n\n </div>\n\n } else {\n var reminder = null\n if(this.props.reminderDate && !this.props.completed) {\n var today = moment()\n var date = moment(this.props.reminderDate)\n var isToday = date.isSame(today, \"day\")\n var color = date.isAfter(today) ? 'primary' : (isToday ? 'warning' : 'danger' )\n reminder = <div><span className={'text-'+color} style={{ fontWeight: 600 }}>Reminder set for {isToday ? 'TODAY' : date.format(\"dddd, Do MMMM YYYY\")}</span></div>\n }\n var completed = null\n if(this.props.completed) {\n completed = <div><span className=\"text-success\" style={{ fontWeight: 600 }}>Completed by {this.props.completed.name} at {this.props.completed.at}</span></div>\n }\n var tags = null\n if(this.props.tags) {\n tags = _.map(this.props.tags.split(','), function(tag, i) {\n return <span key={i}><span className=\"label label-primary\">{tag}</span> </span>\n } )\n }\n var assignedTo = null\n if(this.props.assignedAgentId && !this.props.completed) {\n var agent = _.find(this.props.agents, { id: this.props.assignedAgentId} )\n if(typeof agent == 'undefined'){\n assignedTo = <div>Assigned to N/A</div>\n } else {\n assignedTo = <div>Assigned to {agent.name}</div>\n }\n\n }\n\n return (\n <div className=\"list-group-item note\">\n <div className=\"pull-right\">\n { !this.props.archived && !this.props.completed ? (\n <i className=\"fa fa-pencil text-muted\" style={{ cursor: 'pointer' }} onClick={this.edit}></i>\n ) : null}\n { (!this.props.completed && !this.props.archived) || this.props.showArchived ? null : (\n <i className=\"fa fa-archive text-muted\" style={{ cursor: 'pointer' }} onClick={this.destroy}></i>\n ) }\n </div>\n <div className=\"small\" style={{ marginBottom: 10 }}>\n <div className=\"text-muted\">Created {this.props.created.at} by {this.props.created.name}</div>\n { this.props.updated ? (\n <div className=\"text-muted\">Updated {this.props.updated.at} by {this.props.updated.name}</div>\n ) : null }\n {reminder}\n {completed}\n {assignedTo}\n </div>\n <span dangerouslySetInnerHTML={{__html: this.props.display}} />\n {tags}\n </div>\n );\n }\n },\n\n edit: function() {\n var self = this\n this.props.onEditNote(this.props.id)\n },\n updateText: function(e) { this.setState({ newText: e.target.value }) },\n updateReminderDate: function(moment) { this.setState({ newReminderDate: moment }) },\n clearReminderDate: function() { this.setState({ newReminderDate: null }) },\n updateTags: function(tags) { this.setState({ newTags: tags }) },\n updateAssignedAgent: function(e) { this.setState({ newAssignedAgentId: e.target.value }) },\n\n\n submit: function() {\n var text = _.isEmpty(this.state.newText) ? this.props.text : this.state.newText\n var reminderDate = _.isObject(this.state.newReminderDate) ? this.state.newReminderDate.format() : this.props.reminderDate\n this.props.onUpdateNote(this.props.id, text, reminderDate, this.state.newTags, this.state.newAssignedAgentId)\n },\n cancel: function() {\n this.props.onCancelEditNote()\n },\n complete: function() {\n var self = this\n swal({\n title: \"Are you sure\",\n text: \"you want to complete this reminder\",\n type: \"warning\",\n showCancelButton: true,\n confirmButtonColor: \"#DD6B55\",\n confirmButtonText: \"Yes, complete it!\",\n closeOnConfirm: false\n },\n function(){\n self.props.onCompleteNote(self.props.id)\n swal(\"Completed!\", \"\", \"success\");\n });\n },\n destroy: function() {\n var self = this\n swal({\n title: \"Are you sure?\",\n text: \"The note will be permanently archived!\",\n type: \"warning\",\n showCancelButton: true,\n confirmButtonColor: \"#DD6B55\",\n confirmButtonText: \"Yes, archive it!\",\n closeOnConfirm: false\n },\n function(){\n self.props.onDestroyNote(self.props.id)\n swal(\"Archived\", \"The note has been archived\", \"success\");\n });\n },\n componentDidUpdate: function() {\n var self = this\n $(ReactDOM.findDOMNode(this)).find('textarea').autosize()\n },\n componentWillReceiveProps: function(nextProps) {\n this.setState({ newReminderDate: nextProps.reminderDate });\n }\n});\n\n\nvar App = createReactClass({\n getInitialState: function() {\n return {\n newNoteText: '',\n newTags: '',\n newAssignedAgentId: null,\n newReminderDate: null,\n showArchived: false\n };\n },\n render: function() {\n var self = this\n\n var { \n onEditNote,\n onUpdateNote,\n onCancelEditNote,\n onCompleteNote,\n onDestroyNote\n } = self.props\n\n var notesToShow = _.filter(this.props.notes, { archived: this.state.showArchived })\n\n var notes = _.some(notesToShow) ? (<div className=\"list-group\" style={{ borderBottom: '1px solid #E6E9ED'}}>{_.map(notesToShow, function(note, key) {\n return <Note\n {...note}\n key={note.id}\n suggestedTags={self.props.suggestedTags}\n agents={self.props.agents}\n showArchived={self.state.showArchived}\n onEditNote={onEditNote}\n onUpdateNote={onUpdateNote}\n onCancelEditNote={onCancelEditNote}\n onCompleteNote={onCompleteNote}\n onDestroyNote={onDestroyNote}\n \n />\n })}</div>) : (\n <div className=\"panel-body\"><small>No active notes</small></div>\n )\n\n var addNote = this.props.showAdd ? (<div className=\"panel-body\" style={{backgroundColor: '#E6E9ED' }}>\n\n <p><strong>New Note:</strong></p>\n\n <div className=\"form-group\">\n <textarea value={this.state.newNoteText} className=\"form-control\" onChange={this.updateNewNote}/>\n </div>\n\n <div className=\"form-group\">\n <div style={{marginBottom: 8}}>Tags  <span className=\"text-muted small\">(do not make up new tags unless absolutely necessary)</span></div>\n <TagsInput tags={this.state.newTags} onChange={this.updateNewTags} suggestedTags={this.props.suggestedTags} />\n </div>\n\n <div className=\"form-group\">\n {_.isNull(this.state.newReminderDate) ? null : (\n <div className=\"pull-right\"><span onClick={this.clearNewReminderDate} className=\"btn btn-xs btn-flat\">Clear</span></div>\n )}\n\n <ReminderDatePicker date={this.state.newReminderDate} minDate={moment()} maxDate={moment().add(1000, 'days')} onChange={this.updateNewReminderDate} />\n </div>\n\n <div className=\"form-group\">\n <div style={{marginBottom: 8}}>Assigned to  <span className=\"text-muted small\">(only if this agent is absolutely responsible for this)</span></div>\n <select value={this.props.assignedAgentId} onChange={this.updateNewAssignedAgent}>\n <option value={null}></option>\n {_.map(this.props.agents, function(agent, i) {\n return <option value={agent.id} key={i}>{agent.name}</option>\n })}\n </select>\n </div>\n\n <span className={\"btn btn-default btn-block btn-flat \" + (this.state.newNoteText.length > 0 ? '' : 'disabled')} onClick={this.postNote}>Add Note</span>\n </div>) : null\n\n return (\n <div className=\"notes\">\n {addNote}\n {notes}\n { _.some(this.props.notes, { archived: true }) ? (\n <div onClick={this.toggleArchived} className=\"btn btn-sm btn-flat btn-block\">{this.state.showArchived ? 'Hide' : 'Show'} Archived</div>\n ) : null }\n </div>\n );\n },\n updateNewNote: function(e) { this.setState({ newNoteText: e.target.value }) },\n updateNewReminderDate: function(moment) { this.setState({ newReminderDate: moment }) },\n clearNewReminderDate: function() { this.setState({ newReminderDate: null }) },\n updateNewTags: function(tags) { this.setState({ newTags: tags }) },\n updateNewAssignedAgent: function(e) { this.setState({ newAssignedAgentId: e.target.value }) },\n postNote: function() {\n var self = this\n var reminderDate = _.isObject(this.state.newReminderDate) ? this.state.newReminderDate.format() : null\n self.props.onPostNote(this.state.newNoteText, reminderDate, this.state.newTags, this.state.newAssignedAgentId, function() {\n self.setState({ newNoteText: '', newReminderDate: null, newTags: '', newAssignedAgentId: null })\n })\n },\n toggleArchived: function() {\n this.setState({\n showArchived: !this.state.showArchived\n });\n }\n});\n\n\n\nvar ReminderDatePicker = createReactClass({\n render: function() {\n return (<div>\n <div style={{marginBottom: 8}}>Set reminder for:</div>\n <input onChange={this.inputChange} defaultValue={this.props.date ? moment(this.props.date).format('dddd, Do MMMM YYYY') : null} type=\"text\" data-date-format=\"dddd, Do MMMM YYYY\" placeholder=\"select date...\" className=\"form-control \" readOnly/>\n </div>)\n },\n\n componentDidMount: function() {\n\n this.setState({\n picker: $(ReactDOM.findDOMNode(this)).find('input').datetimepicker({\n useCurrent: false,\n minDate: this.props.minDate,\n maxDate: this.props.maxDate\n })\n }, function() {\n\n var input = $($(ReactDOM.findDOMNode(this)).find('input'), this)\n\n input.on('dp.change', $.proxy(function(ev) {\n var date = this.state.picker.data(\"DateTimePicker\").date()\n if(_.isObject(date)) {\n input.closest('.form-group').addClass('has-success')\n this.props.onChange(date)\n }\n }, this ))\n\n if(_.isNull(this.props.date)) {\n input.val('')\n }\n\n })\n },\n componentDidUpdate: function(prevProps, prevState) {\n if(_.isNull(this.props.date)) {\n $($(ReactDOM.findDOMNode(this)).find('input'), this).val('')\n }\n },\n\n})\n\n\nexport default App;\n","import CheckList from './forms/checklist'\nimport Counter from './forms/counter'\nimport DatePicker from './forms/date-picker'\nimport FormElements from './forms/form-elements'\nimport FormGroupHolder from './forms/form-group-holder'\nimport Select2 from './forms/select2'\nimport TagsInput from './forms/tags'\nimport Bootstrap from './bootstrap'\n\nvar Forms = {\n Select2: Select2,\n FormGroupHolder: FormGroupHolder,\n SelectField: FormElements.SelectField,\n TextField: FormElements.TextField,\n TextArea: FormElements.TextArea,\n PasswordField: FormElements.PasswordField,\n FormGroup: FormElements.FormGroup,\n DatePicker: DatePicker,\n Counter: Counter.Counter,\n InputCounter: Counter.InputCounter,\n CheckList: CheckList,\n TagsInput: TagsInput\n}\n\n\nexport default {\n\tForms: Forms,\n Bootstrap: Bootstrap\n}\n","import React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport _ from 'lodashExtended'\n\nimport App from './Components'\n\n\nclass Notes extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.state = {\n notes: [],\n agents: [],\n suggestedTags: '',\n showAdd: false\n }\n\n this.getNotes = this.getNotes.bind(this)\n this.addNote = this.addNote.bind(this)\n this.postNote = this.postNote.bind(this)\n this.editNote = this.editNote.bind(this)\n this.destroyNote = this.destroyNote.bind(this)\n this.cancelEditNote = this.cancelEditNote.bind(this)\n this.completeNote = this.completeNote.bind(this)\n this.updateNote = this.updateNote.bind(this)\n this.sendNoteUpdate = this.sendNoteUpdate.bind(this)\n }\n\n\n componentDidMount() {\n\n this.getNotes()\n\n }\n\n\n getNotes() {\n var self = this\n $.ajax({\n type: \"GET\",\n url: self.props.path,\n success: function(data) {\n self.setState({\n notes: data.notes,\n agents: data.agents,\n suggestedTags: data.suggestedTags,\n currentUserId: data.currentUserId\n })\n },\n dataType: 'json'\n });\n }\n\n addNote() {\n this.setState({showAdd: true})\n this.cancelEditNote()\n }\n\n postNote(text, reminderDate, tags, assignedAgentId, callback) {\n var self = this\n var callback = callback\n $.ajax({\n type: \"POST\",\n url: self.props.path,\n data: { note: { text: text, reminder_date: reminderDate, tags: tags, assigned_agent_id: assignedAgentId} },\n success: function(data) {\n callback()\n self.setState({\n showAdd: false,\n notes: [data, ...self.state.notes]\n })\n },\n dataType: 'json'\n });\n\n }\n\n editNote(noteId) {\n var newNotes = _.map(this.state.notes, (n) => { return({...n, editing: noteId == n.id }) })\n this.setState({notes: newNotes, showAdd: false})\n\n }\n\n cancelEditNote() {\n var newNotes = _.map(this.state.notes, (n) => { return({...n, editing: false}) })\n this.setState({notes: newNotes})\n }\n\n\n destroyNote(noteId) {\n var self = this\n var note = _.find(this.state.notes, { id: noteId })\n $.ajax({\n type: \"POST\",\n url: note.path,\n data: { \"_method\": \"delete\" },\n success: function(data) {\n var newNotes = _.map(self.state.notes, function(n) {\n if(data.id == n.id) {\n return {\n ...n,\n archived: true,\n editing: false\n }\n } else {\n return n\n }\n })\n\n self.setState({\n notes: newNotes\n })\n },\n dataType: 'json'\n });\n }\n\n completeNote(noteId) {\n this.sendNoteUpdate(noteId, {\n completed_by_id: this.state.currentUserId,\n completed_at: moment().format()\n })\n }\n\n updateNote(noteId, text, reminderDate, tags, assignedAgentId) {\n this.sendNoteUpdate(noteId, {\n text,\n reminder_date: reminderDate,\n tags: tags,\n assigned_agent_id: assignedAgentId\n })\n }\n\n\n sendNoteUpdate(noteId, data) {\n var self = this\n var note = _.find(self.state.notes, { id: noteId })\n\n $.ajax({\n type: \"PUT\",\n url: note.path,\n data: { note: data },\n success: function(data) {\n var newNotes = _.map(self.state.notes, function(n) {\n if(data.id == n.id) {\n return data\n } else {\n return n\n }\n })\n self.setState({notes: newNotes})\n },\n dataType: 'json'\n });\n }\n\n\n\n render() {\n\n var { notes, suggestedTags, agents, showAdd } = this.state\n\n return(<div className=\"panel panel-success \" data-panel-color=\"success\">\n <div className=\"panel-heading panel-heading-small\">\n Notes\n <div className=\"panel-heading-actions\">\n <a data-tooltip-top=\"Add New\" onClick={this.addNote} href=\"#\" className=\"btn btn-flat btn-xs btn-success \" data-original-title=\"\" title=\"\"><i className=\"fa fa-plus\"></i></a>\n </div>\n </div>\n <App\n notes={notes}\n suggestedTags={suggestedTags}\n agents={agents}\n showAdd={showAdd}\n onPostNote={this.postNote}\n onEditNote={this.editNote}\n onUpdateNote={this.updateNote}\n onCancelEditNote={this.cancelEditNote}\n onCompleteNote={this.completeNote}\n onDestroyNote={this.destroyNote}\n />\n </div>\n )\n }\n}\n\nexport default Notes\n\n\n","import React from \"react\"\nimport { RootNode } from '../apps/notes'\n\nexport default (props) => {\n return (\n <RootNode {...props}/>\n );\n}\n\n","import { createAction } from 'redux-act';\n\nconst updateInvoiceAttributes = createAction(\"update invoice attributes\")\nconst submitStart = createAction(\"start submit\");\nconst submitSuccess = createAction(\"submit success\");\nconst submitError = createAction(\"submit error\");\nconst serverError = createAction(\"server error\");\n\nconst updateApiFromServer = createAction(\"the api data has been updated from the server\");\nconst updateInvoiceFromServer = createAction(\"the vendor invoice have been updated from the server\");\n\nexport default {\n submitStart,\n submitSuccess,\n submitError,\n serverError,\n updateApiFromServer,\n updateInvoiceFromServer,\n updateInvoiceAttributes\n}\n","import actions from './actions'\nimport submitToServer from 'submitToServer'\n\n\nconst updateStateFromServerData = (dispatch, data) => {\n if(data.api) { dispatch(actions.updateApiFromServer(data.api))}\n if(data.vendorInvoice) { dispatch(actions.updateInvoiceFromServer(data.vendorInvoice))}\n}\n\nconst submit = () => (dispatch, getState) => {\n\n dispatch(actions.submitStart())\n\n const state = getState()\n const submitPath = state.api.submitPath\n\n submitToServer(submitPath, { vendorInvoice: state.vendorInvoice },\n\n (data,v) => {\n updateStateFromServerData(dispatch, data)\n dispatch(actions.submitSuccess(data))\n window.location.reload()\n },\n\n (data, status) => {\n if(status == 422) {\n updateStateFromServerData(dispatch, data)\n dispatch(actions.submitError(data))\n } else {\n dispatch(actions.serverError())\n alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`)\n }\n }, { method: 'PUT' })\n\n}\n\n\nexport {\n submit,\n}\n\n\n\n\n\n\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended'\nimport actions from '../actions'\nimport classNames from 'classnames';\nimport Select from 'react-select'\n\n\nconst MANUAL_MODE_VALUE = '**!_manual_mode_!**'\n\nclass PurchaseOrderSelect extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = { manualMode: false }\n this.handleSelectInput = this.handleSelectInput.bind(this)\n this.handleManualInput = this.handleManualInput.bind(this)\n }\n\n handleSelectInput({value: newValue}) {\n var inManualMode = newValue === MANUAL_MODE_VALUE\n if(inManualMode) {\n newValue = null\n }\n this.setState({manualMode: inManualMode}, () => this.props.onChange(newValue) )\n }\n\n handleManualInput(e) {\n this.props.onChange(e.target.value)\n }\n\n render() {\n const { allErrors = {}, value, onChange, options, label = <span>PO Number <span className='text-muted'>(if required)</span></span>, name = 'po_number', optional = false, placeholder } = this.props\n const { manualMode } = this.state\n let errors = _.uniq(allErrors[name] || [])\n let hasError = _.isPresent(errors)\n\n var sortedOptions = _.sortBy(options, 'sort')\n\n var amendedOptions = sortedOptions.concat( { value: MANUAL_MODE_VALUE, label: \"The PO number is not in the list\" } )\n amendedOptions = amendedOptions.concat({value: null, label: \"There is no PO Number\" } )\n\n const defaultValueOption = _.find(options, { value } )\n\n return (\n <div className={classNames('form-group', 'select', { optional: optional, 'form-group-invalid': hasError } )}>\n <label className={classNames('form-control-label', 'text', { optional: optional } )} >{label}</label>\n <Select options={amendedOptions} onChange={this.handleSelectInput} defaultValue={defaultValueOption} />\n { manualMode ? <input className={classNames('form-control', 'string', { optional: optional, 'is-invalid': hasError })} type=\"text\" onChange={this.handleManualInput} placeholder='Please enter the new PO Number...' name={name}/> : null }\n {_.map(errors, (error) => <div key={error} style={{ display: 'block' }} className=\"invalid-feedback\"><strong>{error}</strong></div> ) }\n </div>\n )\n }\n}\n\n\nPurchaseOrderSelect.propTypes = {\n};\n\n\n\nconst mapStateToProps = (state, props) => {\n return {\n options: _(state.form.purchaseOrders).filter((po) => po.number == props.number || !po.archived ).map(({number, name, numberName}, id) => { return {value: number, sort: name, label: numberName} } ).value()\n }\n}\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {\n }\n}\n\nPurchaseOrderSelect = connect(\n mapStateToProps,\n mapDispatchToProps\n)(PurchaseOrderSelect)\n\n\n\nPurchaseOrderSelect = connect(\n mapStateToProps,\n mapDispatchToProps\n)(PurchaseOrderSelect)\n\n\nexport default PurchaseOrderSelect;\n\n\n\n\n\n\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended'\nimport actions from '../actions'\nimport { submit } from '../operations'\nimport classNames from 'classnames';\nimport { DateInput, NoWrap, ModelErrors, TextAreaInput, RadioInput, TextInput } from 'sharedComponents'\nimport PurchaseOrderSelect from './PurchaseOrderSelect'\n\nvar App = ({\n authorityStates, vendorInvoice, submitting, purchaseOrders,\n onStateChange, onPoNumberChange, onAuthorityNoteChange, onReceiptNumberChange, onReceiptedOnChange, onPaidOnChange, onPaymentExceptionChange,\n onSave\n}) => {\n var { errors, authorityState, poNumber, authorityNote, receiptNumber, receiptedOn, paidOn, paymentException, authorisedForPayment } = vendorInvoice\n var receiptedFields = _.includes(['paid', 'receipted'], authorityState)\n var paidFields = _.includes(['paid'], authorityState)\n var saveIcon = _.isPresent(errors) ? \"warning\" : \"check\"\n var buttonColor = _.isPresent(errors) ? \"danger\" : \"primary\"\n var buttonText = _.isPresent(errors) ? \"Please fix the errors above\" : \"Save\"\n var voided = authorityState == 'voided'\n\n return(\n <div>\n <h6 className=\"mt-4 border-bottom pb-2\">Update Status</h6>\n { !voided ? <RadioInput\n label={null}\n name=\"authorityState\"\n selectedValue={authorityState}\n options={_.map(authorityStates, ({value, label}) => { return {value, label} } )}\n onSelect={(state) => onStateChange(state)}\n /> : null }\n <PurchaseOrderSelect onChange={onPoNumberChange} value={poNumber} allErrors={errors}/>\n <TextAreaInput name='authorityNote' value={authorityNote} placeholder='Notes' label='Authority Note' onChange={onAuthorityNoteChange} allErrors={errors}/>\n { receiptedFields ?\n <div>\n <TextInput name='receiptNumber' value={receiptNumber} label={<span>SBS Receipt Number { authorityState == 'paid' ? <span className='text-muted'>(optional)</span> : null }</span>} onChange={onReceiptNumberChange} allErrors={errors}/>\n <DateInput name='receiptedOn' value={receiptedOn} label={<span>Receipted on <span className='text-muted'>(optional)</span></span>} onChange={onReceiptedOnChange} allErrors={errors}/>\n </div> : null }\n { paidFields ? <DateInput name='paidOn' value={paidOn} label='Paid On' onChange={onPaidOnChange} allErrors={errors}/> : null }\n {\n receiptedFields && !authorisedForPayment ? <div className=\"alert alert-danger mt-1\" role=\"alert\">\n <h4 className=\"alert-heading\"><i className=\"fa fa-warning\" style={{ marginRight: 10 }}></i>Warning!</h4>\n <p>This invoice has <strong>not been authorised to pay</strong> by Anenta. You are making payment outside the agreed process</p>\n <hr/>\n <p>For future reference, please providing details as to why this action is being taken.</p>\n <TextAreaInput name='paymentException' value={paymentException} placeholder='I am paying this because....' onChange={onPaymentExceptionChange} allErrors={errors}/>\n </div> : null\n }\n <div name=\"button\" disabled={submitting} onClick={onSave} className={`btn btn-block btn-${buttonColor}`}>\n <i className={`fa fa-${saveIcon}`}></i>  {buttonText}\n </div>\n </div>\n )\n\n }\n\nApp.propTypes = {\n\n}\n\nconst mapStateToProps = (state, props) => {\n return {\n vendorInvoice: state.vendorInvoice,\n authorityStates: state.form.authorityStates,\n submitting: state.api.submitting,\n }\n}\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {\n onStateChange: (newState) => { dispatch(actions.updateInvoiceAttributes({authorityState: newState}))},\n onPoNumberChange: (newPoNumber) => { dispatch(actions.updateInvoiceAttributes({poNumber: newPoNumber}))},\n onReceiptNumberChange: (newReceiptNumber) => { dispatch(actions.updateInvoiceAttributes({receiptNumber: newReceiptNumber}))},\n onReceiptedOnChange: (newReceiptedOn) => { dispatch(actions.updateInvoiceAttributes({receiptedOn: newReceiptedOn}))},\n onPaidOnChange: (newPaidOn) => { dispatch(actions.updateInvoiceAttributes({paidOn: newPaidOn}))},\n onPaymentExceptionChange: (newPaymentException) => { dispatch(actions.updateInvoiceAttributes({paymentException: newPaymentException}))},\n onAuthorityNoteChange: (newNote) => { dispatch(actions.updateInvoiceAttributes({authorityNote: newNote}))},\n onSave: () => { dispatch(submit()) }\n }\n}\n\nApp = connect(\n mapStateToProps,\n mapDispatchToProps\n)(App)\n\nexport default App\n\n","import { createReducer } from 'redux-act';\nimport actions from './actions';\nimport dotProp from 'dot-prop-immutable'\n\n\nconst {\n updateInvoiceAttributes,\n submitStart,\n submitSuccess,\n serverError,\n submitError,\n updateApiFromServer,\n updateInvoiceFromServer\n} = actions\n\nconst vendorInvoiceReducer = createReducer({\n [updateInvoiceAttributes]: (vendorInvoice, newAttributes) => {\n return { ...vendorInvoice, ...newAttributes }\n },\n [updateInvoiceFromServer]: (vendorInvoice, newFromService) => {\n return newFromService\n },\n},\n{})\n\nlet apiReducer = createReducer({\n [submitStart]: (apiState) => {\n return dotProp.set(apiState, `submitting`, true )\n },\n [submitSuccess]: (apiState) => {\n return dotProp.set(apiState, `submitting`, false )\n },\n [serverError]: (apiState) => {\n return dotProp.set(apiState, `submitting`, false )\n },\n [submitError]: (apiState) => {\n return {...apiState, submitting: false, errors: true }\n },\n [updateApiFromServer]: (apiState, newApiState) => {\n return newApiState\n }\n}, {})\n\nconst rootReducer = (state = {}, action) => {\n\n return {\n ...state,\n vendorInvoice: vendorInvoiceReducer(state.vendorInvoice, action),\n api: apiReducer(state.api, action),\n }\n\n}\n\nexport default rootReducer\n\n","import React from \"react\"\nimport { Provider } from 'react-redux';\nimport { RootNode, configureStore } from '../apps/authority-invoice'\n\nexport default (props) => {\n return (\n <Provider store={configureStore(props)}>\n <RootNode/>\n </Provider>\n );\n}\n\n","import { createStore, applyMiddleware } from 'redux';\nimport rootReducer from './reducer'\nimport thunk from 'redux-thunk'\nimport { composeWithDevTools } from 'redux-devtools-extension';\n\nexport default function configureStore(initialState) {\n\n const store = createStore(rootReducer,\n initialState,\n composeWithDevTools(applyMiddleware(thunk)));\n\n if (module.hot) {\n module.hot.accept('./reducer', () => {\n const nextRootReducer = require('./reducer').default;\n store.replaceReducer(nextRootReducer);\n });\n }\n\n return store;\n\n}\n","import { createAction } from 'redux-act';\n\nconst updateCreditAttributes = createAction(\"update invoice attributes\")\nconst submitStart = createAction(\"start submit\");\nconst submitSuccess = createAction(\"submit success\");\nconst submitError = createAction(\"submit error\");\nconst serverError = createAction(\"server error\");\n\nconst updateApiFromServer = createAction(\"the api data has been updated from the server\");\nconst updateCreditFromServer = createAction(\"the vendor invoice have been updated from the server\");\n\nexport default {\n submitStart,\n submitSuccess,\n submitError,\n serverError,\n updateApiFromServer,\n updateCreditFromServer,\n updateCreditAttributes\n}\n","import actions from './actions'\nimport submitToServer from 'submitToServer'\n\n\nconst updateStateFromServerData = (dispatch, data) => {\n if(data.api) { dispatch(actions.updateApiFromServer(data.api))}\n if(data.vendorCredit) { dispatch(actions.updateCreditFromServer(data.vendorCredit))}\n}\n\nconst submit = () => (dispatch, getState) => {\n\n dispatch(actions.submitStart())\n\n const state = getState()\n const submitPath = state.api.submitPath\n\n submitToServer(submitPath, { vendorCredit: state.vendorCredit },\n\n (data,v) => {\n updateStateFromServerData(dispatch, data)\n dispatch(actions.submitSuccess(data))\n window.location.reload()\n },\n\n (data, status) => {\n if(status == 422) {\n updateStateFromServerData(dispatch, data)\n dispatch(actions.submitError(data))\n } else {\n dispatch(actions.serverError())\n alert(`There was an issue with the server, Please contact support, support@anenta.com (status: ${status})`)\n }\n }, { method: 'PUT' })\n\n}\n\n\nexport {\n submit,\n}\n\n\n\n\n\n\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux';\nimport _ from 'lodashExtended'\nimport actions from '../actions'\nimport { submit } from '../operations'\nimport classNames from 'classnames';\nimport { TextAreaInput, RadioInput } from 'sharedComponents'\n\nvar App = ({\n authorityStates,\n vendorCredit,\n submitting,\n purchaseOrders,\n onStateChange,\n onPoNumberChange,\n onAuthorityNoteChange,\n onSave\n}) => {\n var { errors, authorityState, poNumber, authorityNote, receiptNumber, receiptedOn, paidOn, paymentException, authorisedForPayment } = vendorCredit\n var receiptedFields = _.includes(['paid', 'receipted'], authorityState)\n var paidFields = _.includes(['paid'], authorityState)\n var saveIcon = _.isPresent(errors) ? \"warning\" : \"check\"\n var buttonColor = _.isPresent(errors) ? \"danger\" : \"primary\"\n var buttonText = _.isPresent(errors) ? \"Please fix the errors above\" : \"Save\"\n\n return(\n <div>\n <h6 className=\"mt-4 border-bottom pb-2\">Update Status</h6>\n <RadioInput\n label={null}\n name=\"authorityState\"\n selectedValue={authorityState}\n options={_.map(authorityStates, ({value, label}) => { return {value, label} } )}\n onSelect={(state) => onStateChange(state)}\n />\n <TextAreaInput name='authorityNote' value={authorityNote} placeholder='Notes' label='Authority Note' onChange={onAuthorityNoteChange} allErrors={errors}/>\n <div name=\"button\" disabled={submitting} onClick={onSave} className={`btn btn-block btn-${buttonColor}`}>\n <i className={`fa fa-${saveIcon}`}></i>  {buttonText}\n </div>\n </div>\n )\n\n }\n\nApp.propTypes = {\n\n}\n\nconst mapStateToProps = (state, props) => {\n return {\n vendorCredit: state.vendorCredit,\n authorityStates: state.form.authorityStates,\n submitting: state.api.submitting,\n }\n}\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {\n onStateChange: (newState) => { dispatch(actions.updateCreditAttributes({authorityState: newState}))},\n onAuthorityNoteChange: (newNote) => { dispatch(actions.updateCreditAttributes({authorityNote: newNote}))},\n onSave: () => { dispatch(submit()) }\n }\n}\n\nApp = connect(\n mapStateToProps,\n mapDispatchToProps\n)(App)\n\nexport default App\n\n","import { createReducer } from 'redux-act';\nimport actions from './actions';\nimport dotProp from 'dot-prop-immutable'\n\n\nconst {\n updateCreditAttributes,\n submitStart,\n submitSuccess,\n serverError,\n submitError,\n updateApiFromServer,\n updateCreditFromServer\n} = actions\n\nconst vendorCreditReducer = createReducer({\n [updateCreditAttributes]: (vendorCredit, newAttributes) => {\n return { ...vendorCredit, ...newAttributes }\n },\n [updateCreditFromServer]: (vendorCredit, newFromService) => {\n return newFromService\n },\n},\n{})\n\nlet apiReducer = createReducer({\n [submitStart]: (apiState) => {\n return dotProp.set(apiState, `submitting`, true )\n },\n [submitSuccess]: (apiState) => {\n return dotProp.set(apiState, `submitting`, false )\n },\n [serverError]: (apiState) => {\n return dotProp.set(apiState, `submitting`, false )\n },\n [submitError]: (apiState) => {\n return {...apiState, submitting: false, errors: true }\n },\n [updateApiFromServer]: (apiState, newApiState) => {\n return newApiState\n }\n}, {})\n\nconst rootReducer = (state = {}, action) => {\n\n return {\n ...state,\n vendorCredit: vendorCreditReducer(state.vendorCredit, action),\n api: apiReducer(state.api, action),\n }\n\n}\n\nexport default rootReducer\n\n","import React from \"react\"\nimport { Provider } from 'react-redux';\nimport { RootNode, configureStore } from '../apps/authority-credit'\n\nexport default (props) => {\n return (\n <Provider store={configureStore(props)}>\n <RootNode/>\n </Provider>\n );\n}\n\n","import { createStore, applyMiddleware } from 'redux';\nimport rootReducer from './reducer'\nimport thunk from 'redux-thunk'\nimport { composeWithDevTools } from 'redux-devtools-extension';\n\nexport default function configureStore(initialState) {\n\n const store = createStore(rootReducer,\n initialState,\n composeWithDevTools(applyMiddleware(thunk)));\n\n if (module.hot) {\n module.hot.accept('./reducer', () => {\n const nextRootReducer = require('./reducer').default;\n store.replaceReducer(nextRootReducer);\n });\n }\n\n return store;\n\n}\n","import React from 'react'\nimport PropTypes from 'prop-types'\n\n\nclass ImageSelectorImg extends React.Component {\n\n constructor(props) {\n super(props);\n this.handleRemoveImage = this.handleRemoveImage.bind(this)\n }\n\n handleRemoveImage() {\n this.props.removeImage(this.props.public_id)\n }\n\n render() {\n const { path, thumbnail_url } = this.props\n\n return (\n <div style={{ marginTop: 10, height: 60, marginRight: 7, float: 'left' }}>\n <img src={thumbnail_url} style={{ width: 60, height: 60 }}/>\n <i className=\"fa fa-times\" style={{ marginLeft: 7, cursor: 'pointer' }} onClick={this.handleRemoveImage}></i>\n <input type=\"hidden\" name={'ticket_response[photos_attributes][][image_path]'} value={path}/>\n </div>\n )\n }\n}\n\nImageSelectorImg.propTypes = {\n path: PropTypes.string.isRequired,\n public_id: PropTypes.string.isRequired,\n thumbnail_url: PropTypes.string.isRequired,\n removeImage: PropTypes.func.isRequired,\n}\n\nexport default ImageSelectorImg\n","import { createAction } from 'redux-act';\n\nconst removeImage = createAction(\"remove images\")\nconst updateImages = createAction(\"update images\")\n\nexport default {\n removeImage,\n updateImages\n}\n","import React from 'react'\nimport PropTypes from 'prop-types'\n//cloudinary loaded via html script tag since thats the only way to load the widget\n//import cloudinary from 'cloudinary'\nimport { connect } from 'react-redux';\nimport ImageSelectorImg from './ImageSelectorImg'\nimport _ from 'lodashExtended'\nimport actions from '../actions'\n\nconst {\n updateImages,\n removeImage\n} = actions\n\nclass App extends React.Component {\n constructor(props) {\n super(props);\n this.handleAddImages = this.handleAddImages.bind(this)\n }\n\n handleAddImages() {\n const { cloudinarySettings, onUpdateImages } = this.props\n cloudinary.openUploadWidget({\n cloud_name: cloudinarySettings.cloudName,\n upload_preset: cloudinarySettings.uploadPreset,\n cropping: null,\n resource_type: 'image',\n sources: ['local', 'camera'],\n show_powered_by: false,\n thumbnail_transformation: {\n width: 60,\n height: 60,\n crop: 'pad'\n }\n }, (error, result) => {\n if(_.isNull(error)) {\n onUpdateImages(result);\n } else {\n console.log(error);\n }\n });\n }\n\n render() {\n const { images, onRemoveImage } = this.props\n\n var imageSelectors = _.some(images) ? <div className=\"clearfix\">{ _.map(images, function(img, i) {\n return <ImageSelectorImg {...img} removeImage={onRemoveImage} key={i}/>\n }) }</div> : null\n\n return (\n <div className=\"image-selector\" style={{ clear: 'both' }}>\n <div onClick={this.handleAddImages} className=\"btn btn-primary btn-sm\">   Attach { images.length > 0 ? 'More' : null} Images...   </div>\n <div style={{ clear: 'both' }}>{imageSelectors}</div>\n </div>\n );\n }\n\n\n}\n\nApp.propTypes = {\n images: PropTypes.array.isRequired,\n onRemoveImage: PropTypes.func.isRequired,\n onUpdateImages: PropTypes.func.isRequired,\n cloudinarySettings: PropTypes.shape({\n uploadPreset: PropTypes.string.isRequired,\n cloudName: PropTypes.string.isRequired\n })\n}\n\nconst mapStateToProps = (state, {}) => {\n return {\n images: state.images,\n cloudinarySettings: state.cloudinary\n }\n}\n\nconst mapDispatchToProps = (dispatch, ownProps) => {\n return {\n onRemoveImage: (public_id) => dispatch(removeImage(public_id)),\n onUpdateImages: (newImages) => dispatch(updateImages(newImages)),\n }\n}\n\nApp = connect(\n mapStateToProps,\n mapDispatchToProps\n)(App)\n\nexport default App\n\n","import { createReducer } from 'redux-act';\nimport actions from './actions';\nimport dotProp from 'dot-prop-immutable'\nimport _ from 'lodashExtended'\nconst {\n removeImage,\n updateImages\n} = actions\n\nconst imagesReducer = createReducer({\n [updateImages]: (images, newImages) => {\n return _.union(self.images, newImages)\n },\n [removeImage]: (images, publicId) => {\n return _.without(self.images, _.first(_.filter(self.images, { public_id: publicId })))\n }\n},\n[])\n\nconst rootReducer = (state = {}, action) => {\n\n return {\n ...state,\n images: imagesReducer(state.images, action),\n }\n\n}\n\nexport default rootReducer\n\n","import React from \"react\"\nimport { Provider } from 'react-redux';\nimport { RootNode, configureStore } from '../apps/image-selector'\n\nexport default (props) => {\n return (\n <Provider store={configureStore(props)}>\n <RootNode/>\n </Provider>\n );\n}\n\n","import { createStore, applyMiddleware } from 'redux';\nimport rootReducer from './reducer'\nimport thunk from 'redux-thunk'\nimport { composeWithDevTools } from 'redux-devtools-extension';\n\nexport default function configureStore(initialState) {\n\n const store = createStore(rootReducer,\n initialState,\n composeWithDevTools(applyMiddleware(thunk)));\n\n if (module.hot) {\n module.hot.accept('./reducer', () => {\n console.log('replace reducer')\n const nextRootReducer = require('./reducer').default;\n store.replaceReducer(nextRootReducer);\n });\n }\n\n return store;\n\n}\n","import React, { useEffect, useState, useMemo } from \"react\";\nimport { connect } from \"react-redux\";\nimport { pick } from \"lodash\";\nimport Box from \"@mui/material/Box\";\nimport { styled } from \"@mui/material\";\nimport Link from \"@mui/material/Link\";\nimport Alert from \"@mui/material/Alert\";\nimport Button from \"@mui/material/Button\";\nimport AlertTitle from \"@mui/material/AlertTitle\";\nimport moment from \"moment/moment\";\nimport { PDFObject } from \"react-pdfobject\";\nimport Grid from \"@mui/material/Grid\";\nimport { Switch, Route, Redirect, useHistory } from \"react-router-dom\";\nimport InfoOutlinedIcon from \"@mui/icons-material/InfoOutlined\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Typography from \"@mui/material/Typography\";\nimport Tab from \"@mui/material/Tab\";\nimport Tabs from \"@mui/material/Tabs\";\nimport IconButton from \"@mui/material/IconButton\";\nimport CopyAllIcon from \"@mui/icons-material/CopyAll\";\nimport stringify from \"fast-json-stable-stringify\";\n\nconst formatDateWithMoment = (dateString) => {\n const date = moment(dateString);\n return date.format(\"Do MMM YYYY\");\n};\n\nconst StyledTabs = styled(Tabs)({\n backgroundColor: \"#2C3237\",\n borderRadius: \"4px\",\n \".MuiTabs-indicator\": {\n display: \"none\",\n },\n});\n\nconst StyledTab = styled(Tab)({\n fontSize: \"12px\",\n color: \"#fff\",\n minWidth: \"120px\",\n textTransform: \"uppercase\",\n \"&.Mui-selected\": {\n color: \"#fff\",\n backgroundColor: \"#1F2328\",\n },\n \"&.Mui-focusVisible\": {\n backgroundColor: \"#262B30\",\n },\n});\n\nconst Row = ({ date, developerMode, items, idRow }) => {\n const history = useHistory();\n\n const isAnyItemSelected = items.some((item) => item.id === idRow);\n\n return (\n <>\n {items.map((item, itemIndex) => {\n const isSelected = item.id === idRow;\n\n return (\n <tr\n key={itemIndex}\n className={`${item.id}`}\n style={{\n borderBottom:\n itemIndex === items.length - 1 ? \"1px solid #dee2e6\" : \"none\",\n fontWeight: isSelected ? \"bold\" : \"normal\",\n }}\n >\n <td\n style={{\n whiteSpace: \"nowrap\",\n padding: \"2px 10px\",\n fontWeight: isAnyItemSelected ? \"bold\" : \"normal\",\n }}\n >\n {itemIndex === 0 ? formatDateWithMoment(date) : \"\"}\n </td>\n <td style={{ padding: \"2px 10px\", whiteSpace: \"nowrap\" }}>\n {item.vendorLocationCodeDerived ? \"-\" : item.vendorLocationCode}\n </td>\n {developerMode && (\n <td style={{ padding: \"2px 10px\", whiteSpace: \"nowrap\" }}>\n {item?.code}\n </td>\n )}\n <td\n style={{\n padding: \"2px 10px\",\n whiteSpace: \"nowrap\",\n fontWeight: isSelected ? \"bold\" : \"normal\",\n }}\n >\n {item.type}\n {item.alternativeRecords &&\n item.alternativeRecords?.length > 0 && (\n <>\n {\" \"}\n <strong>({item.alternativeRecords.length + 1})</strong>\n </>\n )}\n </td>\n <td style={{ padding: \"2px 10px\", textAlign: \"right\" }}>\n <Button\n size=\"small\"\n color=\"inherit\"\n variant=\"outlined\"\n href={`proof-of-collection#/details/${encodeURIComponent(\n item.id\n )}`}\n onClick={(event) => {\n event.preventDefault();\n history.push(`/details/${encodeURIComponent(item.id)}`);\n }}\n sx={{\n minWidth: \"auto\",\n fontSize: \"12px\",\n textTransform: \"none\",\n backgroundColor: \"#3BAFDA\",\n color: \"white\",\n \"&:hover\": {\n backgroundColor: \"#4FC1E9\",\n color: \"white\",\n },\n ...(isSelected\n ? {\n cursor: \"not-allowed\",\n opacity: 0.45,\n boxShadow: \"none\",\n \"&:hover\": {\n backgroundColor: \"#3BAFDA\",\n },\n }\n : {}),\n }}\n >\n {isSelected ? \"Viewing\" : \"View\"}\n </Button>\n </td>\n </tr>\n );\n })}\n </>\n );\n};\n\nconst InfoItem = ({ label, children }) => {\n return (\n <p>\n <label>{label}</label>\n <span className=\"info\">{children}</span>\n </p>\n );\n};\n\nconst ProofApp = ({\n //currentId,\n //currentItem,\n developerMode,\n //allItems\n serviceReports,\n hwcns,\n}) => {\n const allItems = [...Object.values(serviceReports), ...Object.values(hwcns)];\n\n const allItemsGroupedByDate = useMemo(\n () =>\n _(allItems)\n .groupBy(\"date\")\n .map((items, date) => ({ date, items }))\n .orderBy(\"date\", \"desc\")\n .value(),\n [stringify(allItems)]\n );\n\n const initId = allItemsGroupedByDate[0]?.items[0]?.id;\n\n return (\n <Switch>\n <Route\n path=\"/details/:id\"\n render={({ match }) => {\n const currentId = decodeURIComponent(match.params.id);\n const currentItem = hwcns[currentId] || serviceReports[currentId];\n return (\n <Grid sx={{ margin: \"-25px\", pb: 5 }} container spacing={2}>\n <Grid item xs={4}>\n <Box\n sx={{\n display: \"flex\",\n flexDirection: \"column\",\n bgcolor: \"background.paper\",\n borderRadius: \"8px\",\n boxShadow: \"0px 4px 10px rgba(0, 0, 0, 0.1)\",\n padding: \"10px 15px\",\n overflow: \"auto\",\n }}\n >\n <table\n style={{\n width: \"100%\",\n height: \"100%\",\n borderCollapse: \"collapse\",\n }}\n >\n <thead>\n <tr>\n <th style={{ padding: \"2px 10px\" }}>Date</th>\n <th\n style={{ whiteSpace: \"nowrap\", padding: \"2px 10px\" }}\n >\n VLC\n </th>\n {developerMode && (\n <th\n style={{\n whiteSpace: \"nowrap\",\n padding: \"2px 10px\",\n }}\n >\n Code\n </th>\n )}\n <th style={{ padding: \"2px 10px\" }}>Type</th>\n <th style={{ padding: \"2px 10px\" }}>Action</th>\n </tr>\n </thead>\n <tbody>\n {allItemsGroupedByDate\n .map(({ date, items }, index) => {\n return (\n <Row\n key={index}\n date={date}\n items={items}\n idRow={currentId}\n developerMode={developerMode}\n />\n );\n })}\n </tbody>\n </table>\n </Box>\n </Grid>\n\n <Grid item xs={8}>\n {currentItem && (\n <DetailsView key={currentItem.id} currentItem={currentItem} />\n )}\n </Grid>\n </Grid>\n );\n }}\n />\n <Redirect exact from=\"/\" to={`/details/${encodeURIComponent(initId)}`} />\n </Switch>\n );\n};\n\nconst DetailsView = ({ currentItem = {} }) => {\n const [currentTabIndex, setCurrentTabIndex] = useState(0);\n\n const handleTabChange = (e, tabIndex) => {\n console.log(tabIndex);\n setCurrentTabIndex(tabIndex);\n };\n\n const tabItem = _([currentItem, currentItem.alternativeRecords])\n .compact()\n .flatten()\n .value()[currentTabIndex];\n\n const handleCopyClick = (text) => navigator.clipboard.writeText(text);\n\n let {\n url,\n vendorId,\n hwcnHardcopyId,\n fileName,\n vendorLocationCode,\n vendorLocationDescriptor,\n vendorLocationCodeDerived,\n messageGid,\n receivedOn,\n inputtedByName,\n digital,\n } = tabItem || {};\n\n return (\n <>\n {currentItem.alternativeRecords?.length > 0 && (\n <StyledTabs\n className=\"text-white\"\n value={currentTabIndex}\n onChange={handleTabChange}\n >\n <StyledTab label=\"Default\" />\n {currentItem.alternativeRecords.map(({ digital }, i) => (\n <StyledTab\n label={`${digital ? \"Digital\" : \"Hardcopy\"} Alternative ${i + 1}`}\n />\n ))}\n </StyledTabs>\n )}\n\n <Box\n sx={{\n width: \"100%\",\n position: \"sticky\",\n top: \"80px\",\n maxHeight: \"1400px\",\n overflowY: \"auto\",\n }}\n >\n <PDFObject url={url} height=\"1080px\" />\n <div className=\"info-area\" style={{ padding: \"10px 15px;\" }}>\n <InfoItem label=\"Format\">{digital ? \"Digital\" : \"Hardcopy\"}</InfoItem>\n\n {fileName && <InfoItem label=\"File Name\">{fileName}</InfoItem>}\n {vendorLocationCode && (\n <InfoItem label=\"VLC\">\n <Link\n href={`/admin/vendors/${vendorId}/location_mappings/${encodeURIComponent(\n vendorLocationCode\n )}`}\n underline=\"none\"\n >\n {vendorLocationCodeDerived\n ? \"Using Descriptor \"\n : vendorLocationCode}\n </Link>\n {vendorLocationCodeDerived && (\n <Tooltip\n title={\n <Typography fontSize={20}>\n A VLC was not supplied with this document. The VLC has\n been 'Derived' from the Descriptor instead. (VLD)\n </Typography>\n }\n >\n <InfoOutlinedIcon\n style={{ marginLeft: \"5px\", marginRight: \"5px\" }}\n />\n </Tooltip>\n )}\n <Tooltip\n title={<Typography fontSize={20}>Copy to Clipboard</Typography>}\n >\n <Button\n style={{ marginLeft: \"5px\" }}\n size=\"small\"\n variant=\"contained\"\n onClick={() => handleCopyClick(vendorLocationCode)}\n >\n <CopyAllIcon />\n </Button>\n </Tooltip>\n </InfoItem>\n )}\n {vendorLocationDescriptor && (\n <InfoItem label=\"Vendor Location Descriptor\">\n {vendorLocationDescriptor}\n </InfoItem>\n )}\n {receivedOn && (\n <InfoItem label=\"Received On\">\n {moment(receivedOn).format(\"Do MMM YYYY\")}\n </InfoItem>\n )}\n {messageGid && (\n <InfoItem label=\"Data Source\">\n {\" \"}\n <Link\n target=\"_blank\"\n href={`https://mail.google.com/mail?authuser=data@anenta.com#all/${messageGid}`}\n underline=\"none\"\n >\n data@anenta.com/{messageGid}\n </Link>\n </InfoItem>\n )}\n {inputtedByName && (\n <InfoItem label=\"User\">\n {inputtedByName}\n {hwcnHardcopyId && (\n <p>\n This document was inputted manually. If you see a problem you\n can fix the entry{\" \"}\n <a\n target=\"_blank\"\n href={`/admin/hwcn_hardcopies/${encodeURIComponent(\n hwcnHardcopyId\n )}/edit`}\n >\n here.\n </a>\n <Tooltip\n title={\n <Typography fontSize={20}>\n Duplicate items will be removed when the Date, VLC and\n Code are matching\n </Typography>\n }\n >\n <InfoOutlinedIcon />\n </Tooltip>\n </p>\n )}\n </InfoItem>\n )}\n </div>\n </Box>\n </>\n );\n};\n\nconst mapStateToProps = (state) => {\n return state;\n //return {\n //hwcns: state.hwcns,\n //developerMode: state.developerMode,\n //serviceReports: state.serviceReports,\n //};\n};\n\nexport default connect(mapStateToProps)(ProofApp);\n","const createRootReducer = (routerReducer) => {\n const reducer = (state = {}, action) => {\n return {\n ...state,\n router: routerReducer(state.router, action),\n };\n };\n\n return reducer;\n};\n\nexport default createRootReducer;\n","import { createStore, applyMiddleware } from \"redux\";\nimport createRootReducer from './reducer';\nimport thunk from \"redux-thunk\";\nimport { composeWithDevTools } from \"redux-devtools-extension\";\nimport { createReduxHistoryContext } from 'redux-first-history';\nimport { createHashHistory } from \"history\";\n\nconst { createReduxHistory, routerMiddleware, routerReducer } =\n createReduxHistoryContext({\n history: createHashHistory(),\n });\n\nexport default function configureStore(locationId) {\n const rootReducer = createRootReducer(routerReducer);\n\n const store = createStore(\n rootReducer,\n locationId,\n composeWithDevTools(applyMiddleware(routerMiddleware, thunk))\n );\n\n if (module.hot) {\n module.hot.accept(\"./reducer\", () => {\n const nextCreateRootReducer = require(\"./reducer\").default;\n store.replaceReducer(createRootReducer(routerReducer));\n });\n }\n\n const history = createReduxHistory(store);\n\n return { store, history };\n}\n","import React from \"react\"\nimport { Provider } from 'react-redux';\nimport { Router } from \"react-router-dom\";\nimport { ProofApp, configureStore } from '../apps/proof-of-collection';\n\nexport default (props) => {\n const { store, history } = configureStore(props);\n\n return (\n <Provider store={store}>\n <Router history={history}>\n <ProofApp/>\n </Router>\n </Provider>\n );\n}\n","import React from \"react\"\nimport _ from 'lodashExtended'\nimport createReactClass from 'create-react-class'\nimport PropTypes from 'prop-types'\n\nvar PostcodeDistrictSelectorArea = createReactClass({\n render: function() {\n\n var self = this\n\n var {\n selectedDistrictIds,\n districts,\n railsModelName,\n name,\n id,\n description,\n onSelectArea,\n onSelectDistrict\n } = this.props\n\n\n var areaSelected = _.isBlank(_.difference(_.map(districts, 'id'), selectedDistrictIds))\n\n var districts = _.map(districts, function(district) {\n\n var selected = _.includes(selectedDistrictIds, district.id)\n\n return <PostcodeDistrictSelectorDistrict key={district.id}\n id={district.id}\n onSelectDistrict={() => onSelectDistrict(district.id, !selected) }\n name={district.name}\n railsModelName={railsModelName}\n selected={selected}\n town={district.town} />\n })\n\n var toggleText = areaSelected ? 'De-Select All' : 'Select All'\n\n var displayName = 'Area: ' + description + ' (' + name + ')'\n\n var title = (\n <div>\n <div className='pull-right'>\n <span onClick={() => onSelectArea(id, !areaSelected) } className=\"btn btn-flat btn-xs\">{toggleText}</span>\n </div>\n <h3>{displayName}</h3>\n </div>\n )\n\n return (\n\n <div className=\"panel panel-primary\">\n <div className=\"panel-heading\">{title}</div>\n <div className=\"panel-body\">\n <div className='districts'>{districts}</div>\n </div>\n </div>\n )\n }\n\n})\n\n\n\nvar PostcodeDistrictSelectorDistrict = createReactClass({\n render: function() {\n var space = ' '\n var postcodeDistrictsIdsName = this.props.railsModelName + '[postcode_district_ids][]'\n\n if(this.props.selected) {\n var style = 'label-success'\n //self.areaSelected = true\n } else {\n var style = 'label-default'\n }\n\n var input = this.props.selected ? (\n <input value={this.props.id} type=\"hidden\" name={postcodeDistrictsIdsName}/>\n ) : null\n\n return (\n <span>\n {space}\n <span key={this.props.id} className={'unselectable label ' + style} onClick={this.clickHandler}>{this.props.name}</span>\n {input}\n </span>\n )\n\n },\n clickHandler: function() {\n this.props.onSelectDistrict(this.props.id)\n }\n})\n\n\nvar App = createReactClass({\n render: function() {\n var self = this\n var { selectedDistrictIds } = this.props\n\n var areas = _.map(this.props.areas, function(area) {\n return <PostcodeDistrictSelectorArea key={area.id}\n id={area.id}\n name={area.name}\n description={area.description}\n selectedDistrictIds={selectedDistrictIds}\n districts={area.districts}\n railsModelName={self.props.railsModelName}\n onSelectArea={self.props.selectAreaHandler}\n onSelectDistrict={self.props.selectDistrictHandler} />\n })\n\n return (\n <div>\n <span onClick={self.props.selectAllHandler} className=\"btn btn-flat btn-success btn-xs m-2\">Select All</span>\n <span onClick={self.props.deSelectAllHandler} className=\"btn btn-flat btn-xs m-2\">De-Select All</span>\n <input type=\"hidden\" name={`${this.props.railsModelName}[postcode_district_ids][]`} value=\"\"/>\n {areas}\n </div>\n )\n }\n})\n\n\n\n\nexport default App;\n","import React from 'react'\nimport ReactDOM from 'react-dom'\nimport _ from 'lodashExtended'\n\nimport App from './Components'\n\n\nclass PostcodeDistrictSelectorApp extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.state = {\n ...props\n }\n\n\n this.selectAreaHandler = this.updateSelectedArea.bind(this)\n this.selectDistrictHandler = this.updateSelectedDistrict.bind(this)\n this.selectAllHandler = this.selectAll.bind(this)\n this.deSelectAllHandler = this.deSelectAll.bind(this)\n }\n\n\n render() {\n return(\n <App\n {...this.state}\n selectAreaHandler={this.selectAreaHandler}\n selectDistrictHandler={this.selectDistrictHandler}\n selectAllHandler={this.selectAllHandler}\n deSelectAllHandler={this.deSelectAllHandler}\n />\n )\n }\n //render() {\n //return(<div>fdsafdsa</div>)\n //}\n\n\n selectAll() {\n var selectedDistrictIds = _(this.state.areas).map('districts').flatten().map('id').value()\n this.setState({selectedDistrictIds})\n }\n\n deSelectAll() {\n this.setState({selectedDistrictIds: []})\n }\n\n updateSelectedDistrict(districtId, selected) {\n var newSelectedDistrictIds = selected ? _.union(this.state.selectedDistrictIds, [districtId]) : _.difference(this.state.selectedDistrictIds, [districtId])\n this.setState({selectedDistrictIds: newSelectedDistrictIds})\n }\n\n\n updateSelectedArea(areaId, selected) {\n var area = _.find(this.props.areas, { id: areaId } )\n var areaDistrictIds = _.map(area.districts, 'id')\n var newSelectedDistrictIds = selected ? _.union(this.state.selectedDistrictIds, areaDistrictIds) : _.difference(this.state.selectedDistrictIds, areaDistrictIds)\n this.setState({selectedDistrictIds: newSelectedDistrictIds})\n }\n\n}\n\nexport default PostcodeDistrictSelectorApp\n\n","import React from \"react\"\nimport { RootNode } from '../apps/postcode-districts-selector'\n\nexport default (props) => {\n return (\n <RootNode {...props}/>\n );\n}\n\n","import React from \"react\";\nimport { Provider } from \"react-redux\";\nimport { HashRouter as Router, Route, Switch } from \"react-router-dom\";\nimport { RootNode } from \"../apps/service-app-test\";\nimport { ThemeProvider } from \"@mui/material\";\nimport { theme } from \"../theme\";\nimport { createStoreWithHistory } from \"ticket/app/store\";\n\nexport default (props) => {\n const { store, history } = createStoreWithHistory(props);\n\n return (\n <React.StrictMode>\n <ThemeProvider theme={theme}>\n <Provider store={store}>\n <Router>\n <Switch>\n <Route path=\"/\" component={RootNode} />\n </Switch>\n </Router>\n </Provider>\n </ThemeProvider>\n </React.StrictMode>\n );\n};\n","import React from \"react\";\nimport { Provider } from \"react-redux\";\nimport { HashRouter as Router, Route, Switch } from \"react-router-dom\";\nimport { RootNode } from \"../apps/service-calendar\";\nimport { ThemeProvider } from \"@mui/material\";\nimport { theme } from \"../theme\";\nimport { createStoreWithHistory } from \"ticket/app/store\";\n\nexport default (props) => {\n const { store, history } = createStoreWithHistory(props);\n\n return (\n <React.StrictMode>\n <ThemeProvider theme={theme}>\n <Provider store={store}>\n <Router>\n <Switch>\n <Route path=\"/visit_activity/\" component={RootNode} />\n <Route path=\"/\" component={RootNode} />\n </Switch>\n </Router>\n </Provider>\n </ThemeProvider>\n </React.StrictMode>\n );\n};\n","import React from \"react\";\nimport { Provider } from \"react-redux\";\nimport { ThemeProvider } from \"@mui/material/styles\";\nimport { RootNode } from \"ticket\";\nimport { createStoreWithHistory } from \"ticket/app/store\";\n// import { getStore } from \"ticket/app/store\";\n// import { RootNode } from \"ticket\";\nimport { theme } from \"../theme\";\nimport { HashRouter as Router } from \"react-router-dom\";\n\ninterface initialProps {\n ticketId: number;\n serviceIds: number[];\n locationId: number;\n vendorId: number;\n}\n\nexport default (props: initialProps) => {\n const { store } = createStoreWithHistory(props);\n return (\n <React.StrictMode>\n <ThemeProvider theme={theme}>\n <Provider store={store}>\n <Router>\n <RootNode/>\n </Router>\n </Provider>\n </ThemeProvider>\n </React.StrictMode>\n );\n};\n","import AddIcon from \"@mui/icons-material/Add\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport TagIcon from \"@mui/icons-material/Tag\";\nimport {\n Accordion,\n AccordionDetails,\n AccordionSummary,\n Paper,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TableRow,\n Typography,\n} from \"@mui/material\";\nimport { Box } from \"@mui/system\";\nimport _ from \"lodashExtended\";\nimport moment from \"moment\";\nimport PropTypes from \"prop-types\";\nimport React, { useEffect, useState } from \"react\";\nimport { ServiceActionMenu } from \"serviceComponents\";\nimport { DropdownSelect, Link, ShowDate } from \"sharedComponents\";\nimport { useBinFetch } from \"sharedUtils\";\nimport { useTicket } from \"../../apps/ticket/selectors\";\nimport \"./service-box.scss\";\n// import { MenuActions } from \"../../apps/ticket/features/ticket/actions-menu/MenuActions\";\nimport { map, toArray } from \"lodash\";\n\nconst VisitFrequencyRow = ({ service }) => {\n let requestedVisitValue;\n\n if (\n _.isPresent(service?.requestedVisitPlanName) &&\n service?.requestedVisitPlanName != service?.visitPlanName\n ) {\n requestedVisitValue = `Expecting to be ${service?.requestedVisitPlanName}`\n }\n\n return (\n <React.Fragment>\n {requestedVisitValue && requestedVisitValue}\n Collected: {service?.visitPlanName || \"Unknown\"}\n </React.Fragment>\n );\n};\n\nfunction humanize(str) {\n return str\n .replace(/^[\\s_]+|[\\s_]+$/g, \"\")\n .replace(/[_\\s]+/g, \" \")\n .replace(/^[a-z]/, function (m) {\n return m.toUpperCase();\n });\n}\n\nconst StatusRow = ({ service }) => {\n const isClosed =\n service?.status === \"account_closed\" &&\n service?.vendorAccountClosedMonthName;\n\n return (\n <React.Fragment>\n {isClosed && (\n <Typography sx={{ color: \"red\" }}>\n {service.vendorAccountClosedMonthName}\n </Typography>\n )}\n Status: {humanize(service?.status)}\n </React.Fragment>\n );\n};\n\nlet Specification = ({\n service,\n //binTypes,\n //binGroups\n}) => {\n let { specifications = {}, billingHistoryUnitAverages = {} } = service;\n\n const allCodes = _([\n _.map(specifications, \"serviceCode\"),\n _.map(billingHistoryUnitAverages, \"code\"),\n ])\n .flatten()\n .uniq()\n .value();\n\n const [binTypes, binGroups, loading, hasError] = useBinFetch(allCodes);\n\n if (loading) {\n return null;\n }\n\n const codes = _.sortBy(allCodes, (code) => {\n let { capacityMcl = 0, groupName = \"X\" } = binTypes[code] || {};\n return [groupName, capacityMcl];\n });\n\n let rows = _.map(codes, (code) => {\n let { serviceCode, quantity, visitActionId } = specifications[code] || {};\n\n let { quantity: averageQuantity } = billingHistoryUnitAverages[code] || {};\n\n const binType = binTypes[code] || {};\n const bg = binGroups[binType.binGroupId];\n\n return (\n <TableRow key={code}>\n <TableCell>\n <BinDot binGroup={bg} />\n </TableCell>\n <TableCell>{averageQuantity}</TableCell>\n <TableCell>{quantity}</TableCell>\n <TableCell>{code}</TableCell>\n <TableCell>{binType.name}</TableCell>\n <TableCell>{visitActionId}</TableCell>\n </TableRow>\n );\n });\n\n return (\n <TableContainer\n sx={{\n marginY: 2,\n \"& .MuiTableCell-root\": {\n fontSize: \"11px\",\n fontWeight: \"inherit\",\n color: \"inherit\",\n },\n }}\n >\n <Table size=\"small\">\n <TableHead>\n <TableRow\n sx={{\n fontWeight: \"bold\",\n color: \"#828B98\",\n border: \"1px solid transparent\",\n }}\n >\n <TableCell>Type</TableCell>\n <TableCell>Avg Qty</TableCell>\n <TableCell>Qty</TableCell>\n <TableCell>Code</TableCell>\n <TableCell>Name</TableCell>\n <TableCell>Action</TableCell>\n </TableRow>\n </TableHead>\n <TableBody\n sx={{\n \"& .MuiTableCell-root\": {\n border: \"1px solid #F1F1F5\",\n },\n }}\n >\n {rows}\n </TableBody>\n </Table>\n </TableContainer>\n );\n};\n\nlet ServiceBox = ({ service, onSelectAction }) => {\n const formatDate = (date) => new Date(date).toLocaleDateString(\"en-GB\");\n\n const lastVisit = service?.lastVisit?.date;\n const nextVisit = service?.nextVisit?.date;\n const vendorComments = service?.vendorComments;\n const specifications = service?.specifications;\n const billingHistoryUnitAverages = service?.billingHistoryUnitAverages;\n\n const actions = service?.actions;\n const [anchorEl, setAnchorEl] = useState(null);\n const [expanded, setExpanded] = useState(true);\n\n const handleOpenMenu = (event) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleCloseMenu = () => {\n setAnchorEl(null);\n };\n\n const allCodes = _([\n _.map(specifications, \"serviceCode\"),\n _.map(billingHistoryUnitAverages, \"code\"),\n ])\n .flatten()\n .uniq()\n .value();\n\n const { binGroups } = useBinFetch(allCodes);\n const availableBinGroups = map(binGroups, (b) => {\n return <BinDot binGroup={b} />;\n });\n\n return (\n <Box\n sx={{\n backgroundColor: \"#fff\",\n padding: 2,\n paddingBottom: 0,\n position: \"sticky\",\n top: 80,\n borderRadius: 2,\n }}\n >\n <Box\n sx={{\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n }}\n >\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n {service?.name} - {service?.vendorName}\n </Typography>\n <div style={{ display: \"flex\" }}>\n <AddIcon\n onClick={handleOpenMenu}\n sx={{ cursor: \"pointer\", color: \"blue\", fontSize: \"35px\" }}\n />\n <TagIcon\n // onClick={onSelectAction}\n sx={{ cursor: \"pointer\", color: \"green\", fontSize: \"35px\" }}\n />\n </div>\n\n <MenuActions\n menuOptions={toArray(actions)}\n anchorEl={anchorEl}\n handleClose={handleCloseMenu}\n onMenuItemClick={onSelectAction}\n />\n </Box>\n\n <Box sx={{ color: \"#828B98\", marginTop: 1 }}>\n <VisitFrequencyRow service={service} />\n <div>\n Last Collection <ShowDate date={lastVisit?.date} />\n {lastVisit?.status && ` (${_.capitalize(lastVisit.status)})`}\n </div>\n <div>\n Next Visit <ShowDate date={nextVisit?.date} />\n {nextVisit?.status && ` (${_.capitalize(nextVisit.status)})`}\n </div>\n <StatusRow service={service} />\n <div>Vendor Comment: {_.join(vendorComments, \", \")}</div>\n </Box>\n\n <TableContainer\n sx={{\n marginY: 2,\n mx: -2,\n width: \"auto\",\n \"& .MuiTableCell-root\": {\n fontSize: \"11px\",\n fontWeight: \"inherit\",\n color: \"inherit\",\n },\n }}\n >\n <Table size=\"small\">\n <TableHead>\n <TableRow\n sx={{\n fontWeight: \"bold\",\n color: \"#828B98\",\n border: \"1px solid transparent\",\n }}\n >\n <TableCell>VLC</TableCell>\n <TableCell>First Billed</TableCell>\n <TableCell>Last Billed</TableCell>\n </TableRow>\n </TableHead>\n <TableBody\n sx={{\n \"& .MuiTableCell-root\": {\n border: \"1px solid #F1F1F5\",\n },\n }}\n >\n {service?.vendorLocationAccounts?.map((item) => (\n <TableRow key={item.vendorLocationCode}>\n <TableCell>{item.vendorLocationCode}</TableCell>\n <TableCell>{formatDate(item.firstBilledOn)}</TableCell>\n <TableCell>{formatDate(item.lastBilledOn)}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </TableContainer>\n <Accordion\n expanded={expanded}\n onChange={(e, _expanded) => setExpanded(_expanded)}\n disableGutters\n sx={{\n display: \"flex\",\n flexDirection: \"column-reverse\",\n mx: -2,\n mb: -2,\n }}\n >\n <AccordionSummary\n expandIcon={<ExpandMoreIcon sx={{ fontSize: \"35px\" }} />}\n aria-controls=\"panel1a-content\"\n id=\"panel1a-header\"\n sx={{\n \"& .MuiAccordionSummary-content\": {\n alignItems: \"center\",\n gap: 2,\n },\n }}\n >\n {!expanded && (\n <>\n <Typography variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n Bin Groups\n </Typography>\n {availableBinGroups}\n </>\n )}\n </AccordionSummary>\n\n <AccordionDetails sx={{ mx: -2 }}>\n <Specification service={service} />\n </AccordionDetails>\n </Accordion>\n </Box>\n );\n};\n\nServiceBox.propTypes = {\n service: PropTypes.shape({\n title: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n status: PropTypes.string.isRequired,\n vendorName: PropTypes.string.isRequired,\n nextVisit: PropTypes.shape({\n date: PropTypes.string.isRequired,\n status: PropTypes.string.isRequired,\n }),\n lastVisit: PropTypes.shape({\n date: PropTypes.string.isRequired,\n status: PropTypes.string.isRequired,\n }),\n specifications: PropTypes.objectOf(\n PropTypes.shape({\n quantity: PropTypes.number,\n visitActionId: PropTypes.string,\n //visitActionId: PropTypes.string.isRequired,\n serviceCode: PropTypes.string.isRequired,\n })\n ),\n billingHistoryUnitAverages: PropTypes.objectOf(\n PropTypes.shape({\n quantity: PropTypes.integer,\n code: PropTypes.string.isRequired,\n serviceCode: PropTypes.string,\n })\n ),\n vendorServiceCodes: PropTypes.arrayOf(PropTypes.string).isRequired,\n }).isRequired,\n onSelectAction: PropTypes.func,\n};\n\nexport default ServiceBox;\n","import { TextAreaInput } from 'auditComponents';\nimport dotProp from 'dot-prop-immutable';\nimport _ from 'lodashExtended';\nimport { useReducer } from 'react';\nimport { connect } from 'react-redux';\nimport { useRouteMatch } from 'react-router-dom';\n\nimport { updateSectionData } from '../../sections/operations';\nimport { getSectionData } from '../../sections/selectors';\nimport { selectRequiredBinGroupsForSectionId, updateBgSurvey } from '../../wasteAudit/selectors';\nimport Section from '../Section';\nimport SubmitSummarySection from '../SubmitSummarySection';\nimport { CustomSummaryRow } from './PAASummaryRow';\nimport { selectWasteProductionAreasState } from './Sec2WasteProductionAreas';\nimport {\n WasteProducedAndSegregationPerBinGroup,\n} from './Sec3WasteProducedAndSegregation/WasteProducedAndSegregationPerBinGroup';\n\nconst SECTION_ID = \"waste_produced_and_segregation_at_this_premises\";\nconst TITLE = \"Waste Produced & Segregation At This Premises\";\n\nconst d = dotProp;\n\n/**\n * This method's primarily used to replace _.merge which has a few issues:\n *\n * 1. guarantees immutably creates a new object.\n *\n * 2. when dealing with merging nested arrays.\n * E.g. (existing scenarios)\n * merge([1,2], [3]) === [3,2] <-- Updates like object\n * merge([3], []) === [3] <-- Ignores unsetting\n *\n * 3. Ignores null\n * @param objectSources: Any<T>[]\n * @returns T\n */\nexport const cleanMerge = (...objectSources) => {\n return _.mergeWith({}, ...objectSources, (src, obj) => {\n if (Array.isArray(src)) {\n return obj;\n }\n return undefined;\n });\n};\n\nconst validateIntFieldGTE =\n (min) =>\n ({ fieldName, updatedAttrs }) => {\n if (fieldName in updatedAttrs && updatedAttrs[fieldName]?.length > 0) {\n return parseInt(updatedAttrs[fieldName]) >= min\n ? null\n : [`please enter a value ${min} or greater`];\n }\n return undefined;\n };\n\n// Slightly more compliciated, validates based on a sibling field\nconst validateIntFieldLTE =\n (max) =>\n ({ depFieldNames, fieldName, updatedAttrs, errorMessage }) => {\n if (\n fieldName in updatedAttrs ||\n // validate `fieldName` if depField was updated\n depFieldNames.some((dFieldName) => dFieldName in updatedAttrs)\n ) {\n // skip validation if there's nothing entered for either this or the dep\n if ((!updatedAttrs[fieldName] || updatedAttrs[fieldName]?.length === 0) || depFieldNames.some((dFieldName) => !(updatedAttrs[dFieldName]))) {\n return null\n }\n return parseInt(updatedAttrs[fieldName]) <= max ? null : [errorMessage];\n }\n return undefined;\n };\n\nconst validateFields = (bgSurveyIdAndUpdatedAttrs, binGroupSurveys) => {\n let errors = {};\n\n for (const [bgSurveyId, updatedAttrs] of Object.entries(\n bgSurveyIdAndUpdatedAttrs\n )) {\n errors[bgSurveyId] = errors[bgSurveyId] || {};\n\n errors[bgSurveyId][\"totalKg\"] = validateIntFieldGTE(1)({\n fieldName: \"totalKg\",\n updatedAttrs,\n });\n\n // NOTE: used to get other attributes for comparison as well as determining the minimum `number of Containers`\n const thisSurvey = binGroupSurveys.find(\n (bgs) => bgs.id.toString() === bgSurveyId\n );\n errors[bgSurveyId][\"numberOfContainers\"] = validateIntFieldGTE(thisSurvey.id === 131 ? 0 : 1)({\n fieldName: \"numberOfContainers\",\n updatedAttrs,\n });\n\n\n const numberOfContainers = +thisSurvey?.numberOfContainers || 1;\n errors[bgSurveyId][\"numberOfContainersAudited\"] =\n validateIntFieldGTE(0)({\n fieldName: \"numberOfContainersAudited\",\n updatedAttrs,\n }) ||\n (thisSurvey[\"numberOfContainersAudited\"] !== \"\" &&\n validateIntFieldLTE(numberOfContainers)({\n depFieldNames: [\"numberOfContainers\"],\n fieldName: \"numberOfContainersAudited\",\n // Need this to grab the original field\n updatedAttrs: cleanMerge(thisSurvey, updatedAttrs),\n errorMessage: `value cannot be more than Total number of containers on site: ${numberOfContainers}`,\n }));\n\n errors[bgSurveyId][\"numberOfContainersNonConforming\"] = validateIntFieldGTE(\n 0\n )({\n fieldName: \"numberOfContainersNonConforming\",\n updatedAttrs,\n });\n }\n\n return errors;\n};\n\n// NOTE: this functions like a selector\nconst incompleteMessage = (state) => {\n const sectionData = getSectionData(SECTION_ID, state);\n const binGroupSurveys =\n selectRequiredBinGroupsForSectionId(SECTION_ID)(state);\n const { packingNotesOrComment } = sectionData;\n\n const toCheck = [\n // packingNotesOrComment,\n\n // plucking out value of `binGroupSurveys` that's required\n ...binGroupSurveys.flatMap((bgSurvey) => {\n const {\n adrLabel,\n wasAdrLabelUsed,\n totalKg,\n compositionAndPhysicalForm,\n compositionAndPhysicalFormUseOther,\n compositionAndPhysicalFormUseOtherFreeText,\n\n numberOfContainers,\n numberOfContainersAudited,\n numberOfContainersNonConforming,\n reasonForNonConformance,\n } = bgSurvey;\n\n return [\n ...(adrLabel ? [wasAdrLabelUsed] : []),\n totalKg,\n [\n ...(compositionAndPhysicalForm || []),\n compositionAndPhysicalFormUseOther &&\n compositionAndPhysicalFormUseOtherFreeText,\n ].filter((exist) => !!exist),\n numberOfContainers,\n numberOfContainersAudited,\n numberOfContainersNonConforming,\n\n // only validate `reasonForNonConformance` if numberOfContainersNonConforming > 0\n ...(parseInt(numberOfContainersNonConforming) > 0\n ? [reasonForNonConformance]\n : []),\n ];\n }),\n ];\n\n const blankFields = _.filter(toCheck, _.isBlank).length;\n const result =\n blankFields > 0\n ? `There ${\n blankFields == 1 ? \"is\" : \"are\"\n } ${blankFields} unanswered question${\n blankFields == 1 ? \"\" : \"s\"\n } remaining`\n : null;\n\n return result;\n};\n\nconst isStarted = (state) => {\n const sectionData = getSectionData(SECTION_ID, state);\n return _(sectionData).isPresent();\n};\n\nconst WasteProducedAndSegregation = ({\n onChange,\n number,\n sectionData,\n docRequirementText,\n isDocInProgress,\n hasFinalisedDocAudit,\n finalizedWasteAudit,\n binGroupSurveys,\n onChangeForBinGroupSurvey,\n wasteProductionAreasData,\n}) => {\n const { url } = useRouteMatch();\n const { packingNotesOrComment } = sectionData;\n // console.log({ binGroupSurveys });\n\n const [errors, setErrors] = useReducer((errorStates, updatedAttr) => {\n console.log({\n prev: errorStates,\n next: validateFields(updatedAttr, binGroupSurveys),\n });\n return cleanMerge(\n errorStates,\n // NOTE: need to pass 2nd param b/c validation needs to compare for `totalAudited < totalContainersOnSite`\n validateFields(updatedAttr, binGroupSurveys)\n );\n }, {});\n const preamble = (\n <div>\n <p>\n During this section you will need to check the contents of several\n containers for each healthcare waste stream that your site produces,\n e.g. sharps boxes, pedal bins etc. Anenta have pre-filled this section\n as much as possible. You are looking for waste being in the wrong\n container or other non-conformances. You can use the form below to\n record your findings. You will need to check at least three-quarters of\n the rooms/wards and three-quarters of the containers in those rooms to\n satisfy the audit.\n </p>\n\n <h4 className=\"h5 summary__section--subtitle\">WPA being Audited</h4>\n\n <table style={{ width: \"100%\" }} className=\"py-3\">\n <thead>\n <tr className=\"px-3 py-2\">\n <th style={{ backgroundColor: \"#eee\" }}>\n Total number of WPAs on site\n </th>\n <th style={{ backgroundColor: \"#eee\" }}>\n Total number of WPAs audited\n </th>\n </tr>\n </thead>\n <tbody>\n <tr className=\"px-3 py-2\">\n <td>{Object.values(wasteProductionAreasData).length}</td>\n <td>\n {\n Object.values(wasteProductionAreasData).filter(\n (wpa) => wpa.isAreaIncludedInAudit === \"yes\"\n ).length\n }\n </td>\n </tr>\n </tbody>\n </table>\n\n {binGroupSurveys.map((binGroupSurvey) => {\n return (\n <WasteProducedAndSegregationPerBinGroup\n key={binGroupSurvey.id}\n binGroupSurvey={binGroupSurvey}\n onChange={onChangeForBinGroupSurvey(binGroupSurvey.id)}\n errors={errors[binGroupSurvey.id]}\n setErrors={(updatedAttr) =>\n setErrors({ [binGroupSurvey.id]: updatedAttr })\n }\n />\n );\n })}\n\n <div className=\"panel-body mt-4\">\n {hasFinalisedDocAudit ? (\n <div\n className=\"bordered--blue\"\n style={{\n padding: \"15px 15px 10px 15px\",\n marginBottom: \"20px\",\n }}\n >\n <h4 className=\"h5 mb-3 strong\">\n The DoC audit completed on {finalizedWasteAudit.reportFinalizedOn}{\" \"}\n named {finalizedWasteAudit.reportFilename} provides evidence\n related compositional audit conducted of which there is currently\n no change\n </h4>\n </div>\n ) : (\n isDocInProgress && (\n <div\n className=\"bordered--red\"\n style={{\n padding: \"15px 15px 10px 15px\",\n marginBottom: \"20px\",\n }}\n >\n <strong className=\"text-danger\">\n Duty of Care Audit has not been completed yet\n </strong>\n\n <h4 className=\"h5 mt-4 mb-3 strong\">\n A Duty of Care audit is required to ensure full compliance with\n waste management requirements to generate detailed evidence to\n support the pre-acceptance audit. You can access this within\n your Anenta account on the dashboard.\n </h4>\n </div>\n )\n )}\n </div>\n\n <TextAreaInput\n name=\"packingNotesOrComment\"\n value={packingNotesOrComment}\n label={\"Packing Notes or Comment\"}\n subtext={\n \"If your waste is not placed in the corresponding packaging please indicate the alternative being used.\"\n }\n onChange={onChange}\n allErrors={errors}\n placeholder={\"Enter Packing Notes or Comment\"}\n />\n </div>\n );\n\n return (\n <Section sectionId={SECTION_ID} title={TITLE} subtext=\"\" wideBody=\"true\" number={number}>\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">{preamble}</div>\n </div>\n </Section>\n );\n};\n\nvar SummaryView = ({\n wasteAudit: pawaAudit,\n binGroupSurveysForWasteProducedAndSegregation,\n}) => {\n const wasteProducedAndSegregation = pawaAudit.sections[SECTION_ID] || {};\n const { packingNotesOrComment } = wasteProducedAndSegregation;\n\n const renderedBinGroups = binGroupSurveysForWasteProducedAndSegregation.map(\n (binGroupSurveyAndData) => {\n const {\n wasAdrLabelUsed,\n totalKg,\n compositionAndPhysicalForm = [],\n compositionAndPhysicalFormUseOther,\n compositionAndPhysicalFormUseOtherFreeText,\n\n numberOfContainers,\n numberOfContainersAudited,\n numberOfContainersNonConforming,\n reasonForNonConformance = [],\n\n // for renderingOnly\n adrLabel,\n } = binGroupSurveyAndData;\n\n const compositionAndPhysicalFormAggr = [\n ...compositionAndPhysicalForm,\n compositionAndPhysicalFormUseOther &&\n compositionAndPhysicalFormUseOtherFreeText,\n ].filter((exists) => !!exists);\n\n const labelToValue = {\n ...(adrLabel ? {\n [`Is ADR labelling ${adrLabel} used on the containers?`]:\n wasAdrLabelUsed,\n } : {}),\n \"Total (Kg)\": totalKg,\n \"Composition and physical form of the waste?\":\n compositionAndPhysicalFormAggr.length ? (\n <ul className=\"ml-4\">\n {compositionAndPhysicalFormAggr.map((item) => (\n <li key={item}>{item}</li>\n ))}\n </ul>\n ) : null,\n \"Total number of containers on site\": numberOfContainers,\n \"Total number audited\": numberOfContainersAudited,\n \"Number found to be non conforming\": numberOfContainersNonConforming,\n };\n return (\n <div className=\"bordered ml-3 my-3 pl-3\" key={binGroupSurveyAndData.id}>\n <h4 className=\"h4 mt-4 mb-3 strong d-flex\">\n <div\n style={{ color: binGroupSurveyAndData.legendFillColor }}\n className=\"mr-1\"\n >\n ◉\n </div>\n {binGroupSurveyAndData.title} {binGroupSurveyAndData.ewcCodes}\n </h4>\n <div>\n {Object.entries(labelToValue).map(([key, value]) => (\n <CustomSummaryRow value={value} label={key} key={key} />\n ))}\n\n {parseInt(numberOfContainersNonConforming) > 0 && (\n <CustomSummaryRow\n value={\n reasonForNonConformance.length ? (\n <ul className=\"ml-4\">\n {reasonForNonConformance.map((item) => (\n <li key={item}>{item}</li>\n ))}\n </ul>\n ) : null\n }\n notRequired={parseInt(numberOfContainersNonConforming) == 0}\n label={\"Reason for non-conformance\"}\n />\n )}\n </div>\n </div>\n );\n }\n );\n\n return (\n <SubmitSummarySection sectionId={SECTION_ID} title={TITLE}>\n <div className=\"media\">\n <div className=\"media-body\">\n {renderedBinGroups}\n <div>\n <CustomSummaryRow\n value={packingNotesOrComment}\n label={\"Packing Notes or Comments\"}\n notRequired\n />\n </div>\n </div>\n </div>\n </SubmitSummarySection>\n );\n};\n\nconst mapStateToProps = (state, ownProps) => {\n return {\n sectionData: getSectionData(SECTION_ID, state),\n isDocInProgress: state.app.isDocInProgress,\n hasFinalisedDocAudit: state.app.hasFinalisedDocAudit,\n finalizedWasteAudit: state.app.finalizedWasteAudit,\n docRequirementText: state.app.docRequirementText,\n binGroupSurveys: selectRequiredBinGroupsForSectionId(SECTION_ID)(state),\n wasteProductionAreasData: selectWasteProductionAreasState(state),\n };\n};\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onChange: (value, name) => {\n dispatch(updateSectionData(SECTION_ID, d.set({}, name, value)));\n },\n onChangeForBinGroupSurvey: (bgSurveyId) => (value, name) => {\n dispatch(updateBgSurvey(bgSurveyId, d.set({}, name, value)));\n },\n };\n};\n\nconst ConnectedWasteProducedAndSegregation = connect(\n mapStateToProps,\n mapDispatchToProps\n)(WasteProducedAndSegregation);\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n incompleteMessage,\n isStarted,\n Component: ConnectedWasteProducedAndSegregation,\n SummaryView,\n};\n","import { CheckboxInput, MultiSelectWithOtherInput, NumberInput, TextInput, YesNoInput } from 'auditComponents';\n\nimport { InfoPopover } from './InfoPopover';\n\nconst Checkbox = CheckboxInput.Checkbox;\n\nexport const convertStringToOptions = (strings) =>\n strings.map((str) => ({ value: str, label: str }));\n\n// SampleSchema:\n// adrLabel: \"6.2\"\n// adrLabelImageUrl: \"http://res.cloudinary.com/anenta-ltd/image/upload/c_lfill,h_300,w_300/v1/static_assets/adr_label_6.2\"\n// hazCodes: \"HP9\"\n// id: 127\n// legendBorderColor: \"#ffcd56\"\n// legendFillColor: \"#ffcd56\"\n// packaging: \"Yellow lidded sharps bin\"\n// title: \"Medicinally contaminated sharps EWC 18 01 09/18 01 03*\"\nexport const WasteProducedAndSegregationPerBinGroup = ({\n binGroupSurvey,\n onChange,\n errors,\n setErrors,\n}) => {\n const { id: binGroupId } = binGroupSurvey;\n const {\n wasAdrLabelUsed,\n totalKg,\n compositionAndPhysicalForm,\n otherCompositionAndPhysicalForm,\n compositionAndPhysicalFormUseOther,\n compositionAndPhysicalFormUseOtherFreeText,\n\n numberOfContainers,\n numberOfContainersAudited,\n numberOfContainersNonConforming,\n reasonForNonConformance,\n\n // For rendering only\n estimatedAnnualKg,\n adrLabel,\n svgHtml,\n\n id,\n } = binGroupSurvey;\n\n return (\n <div className={`bin-group-id--${id}`}>\n <h4 className=\"h4 mt-4 mb-3 strong d-flex\">\n <div\n className=\"mr-1\"\n dangerouslySetInnerHTML={{ __html: svgHtml }}\n ></div>\n {binGroupSurvey.title} {binGroupSurvey.ewcCodes}\n </h4>\n <div className=\"panel-body bordered px-2\">\n <div className=\"h5 mt-4 mb-3 strong\">\n Packaging Used: {binGroupSurvey.packaging}\n <br /> Haz Code: {binGroupSurvey.hazCodes}\n </div>\n\n { adrLabel && <div className=\"d-flex \">\n <YesNoInput\n name={`wasAdrLabelUsed`}\n value={wasAdrLabelUsed}\n label={`Is ADR labelling ${adrLabel} used on the containers?`}\n onChange={onChange}\n className=\"flex-grow-1\"\n />\n\n <InfoPopover className=\"ml-3 pb-3\">\n <div className=\"p-3\">\n <h5 className=\"h5 mb-3 strong\">\n Agreement concerning the International Carriage of Dangerous\n Goods by Road (ADR)\n </h5>\n <div className=\"d-flex align-items-center\">\n <img\n src={binGroupSurvey.adrLabelImageUrl}\n style={{ width: 50 }}\n />\n <h4 className=\"pl-3\">{binGroupSurvey.adrLabel}</h4>\n </div>\n </div>\n </InfoPopover>\n </div> }\n\n {/* NOTE: Adding this to allow some level of override using totalKg, once we are done with feature, we can remove the check for `totalKg === estimateAnnualKg` */}\n <NumberInput\n name={`totalKg`}\n value={totalKg}\n label={\"Estimated Annual Kgs\"}\n disabled={\n parseInt(totalKg) === estimatedAnnualKg && estimatedAnnualKg > 0\n }\n onChange={onChange}\n allErrors={errors}\n onValidate={setErrors}\n placeholder={\"Enter total weight (Kg)\"}\n />\n\n <CheckboxInput\n label=\"Composition and physical form of the waste?\"\n className=\"mt-2\"\n >\n {[\n \"Syringes and needles\",\n \"Single use sharp instruments\",\n \"Medicinal waste\",\n \"Soft clinical waste\",\n ].map((labelValue) => {\n return (\n <Checkbox\n key={labelValue}\n value={\n compositionAndPhysicalForm?.includes?.(labelValue)\n ? \"checked\"\n : \"\"\n }\n name=\"compositionAndPhysicalForm\"\n label={labelValue}\n onSelect={(bool, compositionAndPhsicalKey) => {\n // HACK: to make sure staging string values don't turn into List[Char], can consider removing later\n const backwardCompatArrayValue =\n typeof compositionAndPhysicalForm === \"string\"\n ? [compositionAndPhysicalForm]\n : compositionAndPhysicalForm || [];\n // TODO: create a Set datastructure to refactor this.\n let result;\n if (bool) {\n if (!backwardCompatArrayValue?.includes?.(labelValue)) {\n result = [...backwardCompatArrayValue, labelValue];\n }\n } else {\n result = backwardCompatArrayValue.filter(\n (value) => value !== labelValue\n );\n }\n\n onChange(result, \"compositionAndPhysicalForm\");\n }}\n />\n );\n })}\n\n <Checkbox\n value={compositionAndPhysicalFormUseOther}\n name=\"compositionAndPhysicalFormUseOther\"\n label=\"Other\"\n onSelect={onChange}\n >\n <TextInput\n name=\"compositionAndPhysicalFormUseOtherFreeText\"\n value={compositionAndPhysicalFormUseOtherFreeText}\n label={`Please specify \"other\"`}\n onChange={onChange}\n />\n </Checkbox>\n </CheckboxInput>\n\n <NumberInput\n name={`numberOfContainers`}\n value={numberOfContainers}\n label={\"Total number of containers on site\"}\n onChange={onChange}\n onValidate={setErrors}\n placeholder={\"Enter number of containers on site\"}\n style={{marginBottom: 4}}\n />\n <div className=\"d-flex justify-content-end\" style={{marginBottom: 12, color: \"#888\"}}>{errors?.['numberOfContainers']}</div>\n\n <NumberInput\n name={`numberOfContainersAudited`}\n value={numberOfContainersAudited}\n label={\"Total number audited\"}\n onChange={onChange}\n onValidate={setErrors}\n placeholder={\"Enter total number audited\"}\n style={{marginBottom: 4}}\n />\n <div className=\"d-flex justify-content-end\" style={{marginBottom: 12, color: \"#888\"}}>{errors?.['numberOfContainersAudited']}</div>\n\n <NumberInput\n name={`numberOfContainersNonConforming`}\n value={numberOfContainersNonConforming}\n label={\"Number found to be non conforming\"}\n onChange={onChange}\n onValidate={setErrors}\n placeholder={\"Enter total number\"}\n style={{marginBottom: 4}}\n />\n <div className=\"d-flex justify-content-end\" style={{marginBottom: 12, color: \"#888\"}}>{errors?.['numberOfContainersNonConforming']}</div>\n\n {parseInt(numberOfContainersNonConforming) > 0 &&\n <div className=\"form-group string\">\n <div>\n <label className=\"form-control-label text\">\n Reason for non-conformance. eg: wrong waste in container label\n </label>\n </div>\n <MultiSelectWithOtherInput\n name={`reasonForNonConformance`}\n value={reasonForNonConformance}\n onChange={onChange}\n isMulti\n options={convertStringToOptions([\n \"Packaging\",\n \"Food Waste\",\n \"General Waste\",\n \"Recyclables\",\n \"Not labeled\",\n \"None\",\n ])}\n placeholder=\"Select reason for non-conformance\"\n />\n </div>\n }\n </div>\n </div>\n );\n};\n","import cx from \"classnames\";\nimport { Popover as MaterialPopover } from \"@material-ui/core\";\n\nexport const InfoPopover = ({ children, className, style }) => {\n const [anchorEl, setAnchorEl] = React.useState(null);\n\n const handleClick = (event) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const open = Boolean(anchorEl);\n const id = open ? \"simple-popover\" : undefined;\n return (\n <div className={cx(className, \"d-flex align-items-center\")} style={style}>\n <button\n onClick={handleClick}\n style={{ borderRadius: \"50%\", height: 30, width: 30 }}\n >\n ?\n </button>\n <MaterialPopover\n id={id}\n open={open}\n anchorEl={anchorEl}\n onClose={handleClose}\n anchorOrigin={{\n vertical: \"top\",\n horizontal: \"right\",\n }}\n transformOrigin={{\n vertical: \"bottom\",\n horizontal: \"left\",\n }}\n >\n {children}\n </MaterialPopover>\n </div>\n );\n};\n","import { CheckboxInput, SummaryRow, TextAreaInput } from 'auditComponents';\nimport dotProp from 'dot-prop-immutable';\nimport _ from 'lodashExtended';\nimport { useReducer } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useRouteMatch } from 'react-router-dom';\nimport { ModalRoute } from 'react-router-modal';\n\nimport { updateSectionData } from '../../sections/operations';\nimport { getSectionData } from '../../sections/selectors';\nimport { selectRequiredBinGroupsForSectionId, updateBgSurvey } from '../../wasteAudit/selectors';\nimport Section from '../Section';\nimport SubmitSummarySection from '../SubmitSummarySection';\nimport { CustomSummaryRow, SubmitSummaryRowWithValidation } from './PAASummaryRow';\nimport { OtherWasteProducedModal } from './Sec4OtherWasteProduced/OtherWasteProducedModal';\nimport { OtherWasteProducedPerBinGroup } from './Sec4OtherWasteProduced/OtherWasteProducedPerBinGroup';\n\nconst SECTION_ID = \"other_waste_produced_at_this_premises\";\nconst TITLE = \"Other Waste Produced at this Premises\";\n\nconst Checkbox = CheckboxInput.Checkbox;\n\nconst d = dotProp;\n\nconst validateIntFieldGTE =\n (min) =>\n ({ fieldName, errorObject, updatedAttrs }) => {\n if (fieldName in updatedAttrs) {\n return parseInt(updatedAttrs[fieldName]) >= min\n ? null\n : [`please enter a value ${min} or greater`];\n }\n return null;\n };\n\nconst validateFields = (bgSurveyIdAndUpdatedAttrs) => {\n let errors = {};\n\n for (const [bgSurveyId, updatedAttrs] of Object.entries(\n bgSurveyIdAndUpdatedAttrs\n )) {\n errors[bgSurveyId] = errors[bgSurveyId] || {};\n\n errors[bgSurveyId][\"totalKg\"] = validateIntFieldGTE(1)({\n fieldName: \"totalKg\",\n updatedAttrs,\n });\n }\n\n return errors;\n};\n\nconst incompleteMessage = (state) => {\n const sectionData = getSectionData(SECTION_ID, state);\n const binGroupSurveys =\n selectRequiredBinGroupsForSectionId(SECTION_ID)(state);\n const { packingNotesOrComment } = sectionData;\n\n const toCheck = [\n // packingNotesOrComment,\n ...binGroupSurveys.flatMap((bgSurvey) => {\n const {\n totalKg,\n hasUsedDefaultPackaging,\n hasUsedOtherWastePackaging,\n otherWastePackagingUsedFreeText,\n\n isProduced,\n askIsProduced,\n } = bgSurvey;\n\n // NOTE: skip validation for this if its optional (eg. Recycling Waste)\n if (askIsProduced && isProduced != \"yes\") {\n return [];\n }\n\n return [\n // We want to mark this as incomplete if user doesn't enter any value and this becomes 0\n parseInt(totalKg) === 0 || totalKg == null\n ? \"\"\n : \"consider it completed\",\n\n // must satisfy one\n hasUsedDefaultPackaging ||\n (hasUsedOtherWastePackaging && otherWastePackagingUsedFreeText),\n ];\n }),\n ];\n\n const blankFields = _.filter(toCheck, _.isBlank).length;\n const result =\n blankFields > 0\n ? `There ${\n blankFields == 1 ? \"is\" : \"are\"\n } ${blankFields} unanswered question${\n blankFields == 1 ? \"\" : \"s\"\n } remaining`\n : null;\n\n return result;\n};\n\nconst isStarted = (state) => {\n const sectionData = getSectionData(SECTION_ID, state);\n return _(sectionData).isPresent();\n};\n\nconst OtherWasteProduced = ({\n onChange,\n number,\n sectionData,\n binGroupSurveys,\n onChangeForBinGroupSurvey,\n}) => {\n const { packingNotesOrComment } = sectionData;\n\n const [errors, setErrors] = useReducer(\n (errorStates, updatedAttr) => ({\n ...errorStates,\n ...validateFields(updatedAttr),\n }),\n {}\n );\n\n const preamble = (\n <div>\n <p>\n Please use the form below to confirm which waste streams your site\n produces. For each waste stream your site produces, please indicate\n using Tot. (Kg) an estimated yearly weight. Also, please confirm if you\n are using the indicated packaging by selecting the radio button.\n Selected means Yes\n </p>\n </div>\n );\n\n const { url } = useRouteMatch();\n const history = useHistory();\n const modalUrl = `${url}/other-waste-produced`;\n const handleOpenHelpModal = () => history.push(modalUrl);\n\n return (\n // In the previous section Anenta have pre-filled most of the information\n // related to waste we know is collected from your premises. There are\n // unfortunately waste types that we do not know about which we need you to\n // provide some detail. This information is required to demonstrate\n // effective segregation even if the NHS has no responsibility for the\n // waste.\n <Section sectionId={SECTION_ID} title={TITLE} subtext=\"\" wideBody=\"true\" number={number}>\n <ModalRoute\n path={modalUrl}\n parentPath={url}\n className=\"an-modal-lg react-router-modal__modal\"\n >\n <OtherWasteProducedModal onClose={() => history.push(url)} />\n </ModalRoute>\n\n <div className=\"media mb-3 mt-3\">\n <div className=\"media-body\">\n {preamble}\n\n <h4 className=\"h4 mt-4 mb-3 strong\">\n Non Clinical Waste Type Audit Survey\n </h4>\n\n {binGroupSurveys.map((binGroupSurvey) => {\n return (\n <OtherWasteProducedPerBinGroup\n onOpenHelpModal={handleOpenHelpModal}\n key={binGroupSurvey.id}\n onChange={onChangeForBinGroupSurvey(binGroupSurvey.id)}\n binGroupSurvey={binGroupSurvey}\n errors={errors[binGroupSurvey.id]}\n setErrors={(updatedAttr) =>\n setErrors({ [binGroupSurvey.id]: updatedAttr })\n }\n />\n );\n })}\n\n <TextAreaInput\n name=\"packingNotesOrComment\"\n value={packingNotesOrComment}\n label={\"Packing Notes or Comment\"}\n subtext=\"If your waste is not placed in the corresponding packaging please indicate the alternative being used.\"\n onChange={onChange}\n allErrors={errors}\n placeholder={\"Enter Packing Notes or Comment\"}\n />\n </div>\n </div>\n </Section>\n );\n};\n\nvar SummaryView = ({\n wasteAudit: pawaAudit,\n binGroupSurveysForOtherWasteProduced,\n}) => {\n const { packingNotesOrComment } = pawaAudit.sections[SECTION_ID] || {};\n\n // console.log({ binGroupSurveysForOtherWasteProduced });\n\n const renderedBinGroups = binGroupSurveysForOtherWasteProduced.map(\n (binGroupSurveyAndData) => {\n const {\n // data\n\n id,\n title,\n packaging,\n legendFillColor,\n\n // form fields\n totalKg,\n hasUsedDefaultPackaging,\n hasUsedOtherWastePackaging,\n otherWastePackagingUsedFreeText,\n\n // handles cases where form is optional\n isProduced,\n askIsProduced,\n } = binGroupSurveyAndData;\n\n const labelToValue = {\n [`Packaging Used`]: (\n <ul className=\"ml-4\">\n {[\n hasUsedDefaultPackaging && packaging,\n hasUsedOtherWastePackaging && otherWastePackagingUsedFreeText,\n ]\n .filter((exists) => exists)\n .map((item) => (\n <li key={item}>{item}</li>\n ))}\n </ul>\n ),\n };\n\n const otherPackagingRowValue = hasUsedOtherWastePackaging\n ? otherWastePackagingUsedFreeText\n : hasUsedOtherWastePackaging;\n\n return (\n <div className=\"bordered ml-3 my-3 pl-3\" key={id}>\n <h4 className=\"h4 mt-4 mb-3 strong d-flex\">\n <div style={{ color: legendFillColor }} className=\"mr-1\">\n ◉\n </div>\n {title}\n </h4>\n\n <div>\n {askIsProduced && (\n <SummaryRow\n value={isProduced}\n label={\"Is Recycling Waste produced?\"}\n />\n )}\n <SubmitSummaryRowWithValidation\n value={totalKg}\n label={\"Total KG\"}\n validator={(value) =>\n (askIsProduced && isProduced === 'yes') ? validateIntFieldGTE(1)({\n fieldName: \"totalKg\",\n updatedAttrs: { totalKg },\n }) : null\n }\n />\n {(!askIsProduced || isProduced === \"yes\") &&\n Object.entries(labelToValue).map(([key, value]) => (\n <CustomSummaryRow value={value} label={key} key={key} />\n ))}\n </div>\n </div>\n );\n }\n );\n\n return (\n <SubmitSummarySection sectionId={SECTION_ID} title={TITLE}>\n <div className=\"media\">\n <div className=\"media-body\">\n {renderedBinGroups}\n\n <CustomSummaryRow\n value={packingNotesOrComment}\n label={\"Packing Notes or Comment\"}\n notRequired\n />\n </div>\n </div>\n </SubmitSummarySection>\n );\n};\n\nconst mapStateToProps = (state, ownProps) => {\n return {\n sectionData: getSectionData(SECTION_ID, state),\n binGroupSurveys: selectRequiredBinGroupsForSectionId(SECTION_ID)(state),\n };\n};\n\nconst mapDispatchToProps = (dispatch, {}) => {\n return {\n onChange: (value, name) => {\n dispatch(updateSectionData(SECTION_ID, d.set({}, name, value)));\n },\n onChangeForBinGroupSurvey: (bgSurveyId) => (value, name) => {\n dispatch(updateBgSurvey(bgSurveyId, d.set({}, name, value)));\n },\n };\n};\n\nconst ConnectedOtherWasteProduced = connect(\n mapStateToProps,\n mapDispatchToProps\n)(OtherWasteProduced);\n\nexport default {\n sectionId: SECTION_ID,\n title: TITLE,\n incompleteMessage,\n isStarted,\n Component: ConnectedOtherWasteProduced,\n SummaryView,\n};\n","import React from \"react\";\nimport { Redirect, Route, Switch, useHistory } from \"react-router-dom\";\nimport { ModalBox } from \"auditComponents\";\nimport { faExclamationCircle } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nexport const OtherWasteProducedModal = ({ onClose, ...props }) => {\n let history = useHistory();\n\n return (\n <ModalBox\n title=\"To determine the estimated annual weight of your non-clinical waste in kilograms you can:\"\n onClose={() => {\n onClose();\n }}\n >\n <div style={{ textDecoration: \"underline\" }} className=\"mt-2\">\n Contact your waste contractor to see if they can provide you with this\n information\n </div>\n\n <p className=\"bordered p-2 mt-2\">\n If the waste transfer notes contain the weight of the waste you can add\n those up. If you take a sample month and multiply it by 12 to obtain an\n annual estimate that is sufficient.\n </p>\n\n <h5 className=\"h5 font-weight-bold mt-2\">Steps to estimate the weight</h5>\n <ul className=\"pl-4\">\n <li>\n Identify your collection cycle: i.e. weekly (52 times a year),\n fortnightly (26 times a year) etc.\n </li>\n <li>\n Identify what bins you have and how many of each type 1100 litre, 660\n litre, 360 litre, 240 litre (this should be written on your bins)\n </li>\n <li>\n If you are using black waste bags for the general waste and no\n containers, take the average bags collected by the collection cycle\n </li>\n </ul>\n\n <div className=\"d-flex mt-2\">\n <div>\n <div className=\"font-weight-bold\">\n The average weight of General Waste per bin type is:\n </div>\n <div>1100 litre: 110kg</div>\n <div>660 litre: 25kg</div>\n <div>360 litre: 20kg</div>\n <div>240 litre: 15kg</div>\n <div>Black bag: 6kg</div>\n </div>\n\n <div>\n <div className=\"font-weight-bold\">\n The average weight of Recycling Waste per bin type is:\n </div>\n <div>1100 litre: 45kg</div>\n <div>660 litre: 25kg</div>\n <div>360 litre: 15kg</div>\n <div>240 litre: 14kg</div>\n </div>\n </div>\n\n <h5 className=\"h5 mt-3 font-weight-bold\">An example</h5>\n <div className=\"bordered px-2 pt-3\">\n <p style={{ textDecoration: \"underline\" }}>\n If your waste is collected on a weekly basis and you have two\n 1100-litre bins:\n </p>\n\n <p style={{ textDecoration: \"underline\" }}>\n Formula: (total annual collections) * (average weight of 1100 litre\n General Waste) * (Count of Bins)\n </p>\n <p>52 x 110 x 2 = 11440 kg</p>\n </div>\n\n <div className=\"mt-2\">\n <FontAwesomeIcon className=\"text-warning\" icon={faExclamationCircle} />{\" \"}\n For the recycling waste using the average weights for recycling waste\n </div>\n </ModalBox>\n );\n};\n","import { CheckboxInput, NumberInput, TextInput, YesNoInput } from 'auditComponents';\n\nconst Checkbox = CheckboxInput.Checkbox;\n\n// adrLabel: null\n// adrLabelImageUrl: null\n// hazCodes: \"\"\n// id: 138\n// legendBorderColor: \"#000000\"\n// legendFillColor: \"#000000\"\n// packaging: \"Black bags or other packaging provided by your contractor\"\n// title: \"Domestic Waste EWC 20 01 39/20 03 07/20 01 08/20 03 99/20 01 11/20 01 99/20 03 01/20 01 10/20 01 01/20 01 40/20 03 02/20 01 02\"\n// totalKg: \"\"\nexport const OtherWasteProducedPerBinGroup = ({\n binGroupSurvey,\n onChange,\n onOpenHelpModal,\n errors,\n setErrors,\n}) => {\n const {\n // data\n id,\n title,\n packaging,\n svgHtml,\n\n // form fields\n totalKg,\n hasUsedDefaultPackaging,\n hasUsedOtherWastePackaging,\n otherWastePackagingUsedFreeText,\n\n // handles cases where form is optional\n isProduced,\n askIsProduced,\n } = binGroupSurvey;\n\n console.log({ binGroupSurvey });\n\n return (\n <>\n <h5 className={`h5 mt-4 mb-3 strong d-flex id-${id}`}>\n <div\n className=\"mr-1\"\n dangerouslySetInnerHTML={{ __html: svgHtml }}\n ></div>\n {title}\n </h5>\n <div className=\"panel-body\">\n <div className=\"p-4 mb-4 bordered relative\">\n {askIsProduced && (\n <YesNoInput\n className=\"mr-4 pr-4\"\n name=\"isProduced\"\n value={isProduced}\n label={\"Is Recycling Waste produced?\"}\n onChange={onChange}\n />\n )}\n\n {(!askIsProduced || isProduced === \"yes\") && (\n <div>\n <button\n onClick={onOpenHelpModal}\n className=\"absolute\"\n style={{\n borderRadius: \"50%\",\n height: 30,\n width: 30,\n right: 20,\n top: 10,\n }}\n >\n ?\n </button>\n\n <div className=\"pr-4 mr-4\">\n <NumberInput\n name=\"totalKg\"\n subtext={\n <span>\n Please use the form below to confirm which waste streams your site produces other than clinically related waste. For each waste stream your site produces, please indicate an estimated <b>annual</b> weight (kg). You must indicated packaging by selecting from the options presented. The <b>annual</b> kg cannot be 1 and will be a multiple of the weekly kgs produced. Should you have any issues in determining this please contact your general or recycling supplier who will assist you.\n </span>\n }\n value={totalKg}\n label={\"Estimated Annual Kgs\"}\n onChange={onChange}\n allErrors={errors}\n onValidate={setErrors}\n placeholder={\"Enter total KG\"}\n />\n </div>\n\n <CheckboxInput label=\"Packaging Used\">\n <Checkbox\n value={hasUsedDefaultPackaging}\n name={\"hasUsedDefaultPackaging\"}\n label={packaging}\n onSelect={onChange}\n />\n\n <Checkbox\n value={hasUsedOtherWastePackaging}\n name={\"hasUsedOtherWastePackaging\"}\n label={\"Other\"}\n onSelect={onChange}\n />\n </CheckboxInput>\n\n {hasUsedOtherWastePackaging && (\n <TextInput\n name=\"otherWastePackagingUsedFreeText\"\n value={otherWastePackagingUsedFreeText}\n label={\"\"}\n onChange={onChange}\n placeholder={\"Enter other packaging used\"}\n />\n )}\n </div>\n )}\n </div>\n </div>\n </>\n );\n};\n","import { Grid } from \"@mui/material\";\nimport { useGetLocationServiceVendorsQuery } from \"api/services\";\nimport { map } from \"lodash\";\nimport LocationServicesVendorBoxAndy from \"service/LocationServicesVendorBoxAndy\";\nimport AppContext from \"ticket/AppContext\";\n\nlet SideBarAndy = ({ locationId, onSelectDate }) => {\n const { data: locationServiceVendors } =\n useGetLocationServiceVendorsQuery(locationId);\n\n const onSelectAction = () => undefined;\n\n return (\n <AppContext.Provider\n value={{\n onSelectAction,\n selectedContainer: undefined,\n setSelectedContainer: (_x) => {},\n formType: \"all\",\n setFormType: (_x) => {},\n cardTab: \"request\",\n setCardTab: (_x) => {},\n showTaggingForm: false,\n setShowTaggingForm: (_x) => {},\n highlightedIds: [],\n setHighlightedIds: (_x) => {},\n currentTicketId: \"\",\n onSelectDate: onSelectDate,\n }}\n >\n <Grid container spacing={1}>\n {map(locationServiceVendors, (locationServiceVendor) => {\n return (\n <Grid item sx={{ width: \"100%\", mb: 1 }}>\n <LocationServicesVendorBoxAndy\n initialOpenState={true}\n onSelectAction={onSelectAction}\n key={locationServiceVendor.vendor.id}\n {...locationServiceVendor}\n />\n </Grid>\n );\n })}\n </Grid>\n </AppContext.Provider>\n );\n};\nexport default SideBarAndy;\n","import ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport { Collapse, IconButton, Grid, Box, Card, CardContent, Typography } from \"@mui/material\";\nimport { useEffect, useState } from \"react\";\nimport RequestsCards from \"./report-request-box/RequestsCards\";\nimport FailedVisitsCollapsible from \"./service-box/FailedVisitsCollapsible\";\nimport OutstandingRequestsCollapsible from \"./service-box/OutstandingRequestsCollapsible\";\nimport VendorHeader from \"./VendorHeader\";\nimport ServiceBox from \"./ServiceBox\";\nimport { useTheme } from '@mui/material/styles';\nimport { getLocationId } from \"ticket/selectors\";\nimport TicketsList from \"service/ticket/TicketsList\";\nimport { useGetAllLocationRemediationsQuery } from \"api/services\";\nimport { mapKeys, camelCase } from \"lodash\";\n\nconst LocationServicesVendorBox = ({\n vendor,\n services,\n calendar,\n initialOpenState,\n}) => {\n const [openServiceMap, setOpenServiceMap] = useState({});\n const [openActions, setOpenActions] = useState(true);\n\n const theme = useTheme();\n\n useEffect(() => {\n const newOpenServiceMap = {};\n services?.forEach((service) => {\n if (\n service?.status === \"terminated\" ||\n service?.status === \"account_closed\"\n ) {\n newOpenServiceMap[service.id] = false;\n } else {\n newOpenServiceMap[service.id] = initialOpenState;\n }\n });\n setOpenServiceMap(newOpenServiceMap);\n }, [services, initialOpenState]);\n\n const handleOpenServiceChange = (serviceId, isOpen) => {\n setOpenServiceMap((prevState) => ({\n ...prevState,\n [serviceId]: isOpen,\n }));\n };\n\n const locationId = getLocationId();\n const remediationsData = useGetAllLocationRemediationsQuery(locationId, {skip: !locationId}).data?.remediations || [];\n const remediations = remediationsData.map(remediation => mapKeys(remediation, (_, key) => camelCase(key)));\n\n\n\n return (\n <Box sx={{background: 'white', borderRadius: '4px' }}>\n\n <VendorHeader vendor={vendor} calendar={calendar} />\n\n <TicketsList vendor={vendor}/>\n\n {services?.map((service, key) => (\n <Box key={key}>\n <ServiceBox\n key={service.id}\n service={service}\n openService={openServiceMap[service.id]}\n setOpenServiceMap={(isOpen) =>\n handleOpenServiceChange(service.id, isOpen)\n }\n />\n\n <Box sx={{\n background: '#23272D',\n color: \"#fff\",\n borderRadius: '0 0 4px 4px',\n border: '1px solid #656D78',\n borderTop: 'none',\n }}>\n\n <Grid container>\n <Grid item xs={6} sx={{ borderRight: '1px solid #646D78' }}>\n\n {openServiceMap[service.id] && (\n <Box\n >\n <FailedVisitsCollapsible service={service} />\n </Box>\n )}\n\n </Grid>\n <Grid item xs={6} sx={{ borderLeft: '1px solid #646D78' }}>\n\n <Box onClick={() => setOpenActions(!openActions)}\n sx={{\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n minHeight: \"40px\",\n px: '10px',\n cursor: 'pointer',\n }}\n >\n <strong>Service Requests</strong>\n\n {service?.requests.length > 0 && (\n <IconButton disableRipple sx={{ color: \"#fff\" }} >\n {open ? <ExpandLessIcon /> : <ExpandMoreIcon />}\n </IconButton>\n )}\n\n </Box>\n\n {service?.requests?.length > 0 && (\n <Collapse in={openActions} timeout=\"auto\" unmountOnExit>\n <RequestsCards requests={service?.requests} remediations={remediations}/>\n </Collapse>\n )}\n\n </Grid>\n </Grid>\n\n </Box>\n </Box>\n ))}\n </Box>\n );\n};\n\n\n\nexport default LocationServicesVendorBox;\n","import { Box, Button, Link, Typography } from \"@mui/material\";\nimport { useEffect, useState } from \"react\";\nimport PdfModal from \"service/forms/common/PdfModal\";\nimport { formatDate } from \"sharedUtils\";\nimport { useTicket } from \"ticket/selectors\";\nimport {\n useFormServiceActionMutation,\n useGetLocationServiceVendorQuery,\n} from \"api/services\";\n\nimport ReportRequestCardLayout from \"./ReportRequestCardLayout\"\n\nconst statusMessages = {\n awaiting_response: { text: \"Awaiting Formal Response\", color: \"#FFA600\" },\n cancelled: { text: \"Cancelled\", color: \"red\" },\n vendor_replied: { text: \"Pending Review\", color: \"#FFA600\" },\n accepted: { text: \"response accepted\", color: \"#19E53B\" },\n rejected: { text: \"Response Rejected\", color: \"red\" },\n open: { text: 'Open is a status on this remediation action?', color: 'red' }\n};\n\nconst RemediationCard = ({ remediation, isLog = false }) => {\n const ticket = useTicket();\n const [openModal, setOpenModal] = useState(false);\n const [pdfUrl, setPdfUrl] = useState('')\n\n const [submitForm] = useFormServiceActionMutation();\n const [serviceUuid, setServiceUuid] = useState(\"\");\n const { data: locationServiceVendor } = useGetLocationServiceVendorQuery({\n locationId: `${ticket?.location?.id}`,\n vendorId: ticket?.vendor?.id,\n }, { skip: !ticket?.location?.id || !ticket?.vendor?.id });\n\n useEffect(() => {\n if (!locationServiceVendor) return;\n setServiceUuid(locationServiceVendor[ticket?.vendor?.id].services[0].uuid);\n }, [locationServiceVendor]);\n\n const statusMessage = statusMessages[remediation?.status];\n const acceptRemediation = () => {\n const acceptUrl = `/admin/service_actions/${serviceUuid}/accept_remediation_response`;\n submitResponse(acceptUrl);\n };\n\n const rejectRemediation = () => {\n const rejectUrl = `/admin/service_actions/${serviceUuid}/reject_remediation_response`;\n submitResponse(rejectUrl);\n };\n\n const submitResponse = (url) => {\n submitForm({\n url: url,\n body: {\n tagged_reply_id: remediation.lastTaggedReplyId,\n form: {\n vendor_id: ticket?.vendor?.id,\n ticket_id: ticket?.id,\n location_uuid: ticket?.location?.uuid,\n service_uuid: serviceUuid,\n authority_id: ticket?.location?.authority_id,\n },\n },\n });\n };\n\n const pdfUrls = {\n notice: remediation?.noticePdfUrl,\n response: remediation?.replyPdfUrl\n };\n\n const handleOpenPdf = (pdfType) => () => {\n setOpenModal(true);\n setPdfUrl(pdfUrls[pdfType]);\n };\n\n const title = remediation ? (\n <>\n {remediation.status === \"rejected\" ? \"Latest Remediation \" : \"Remediation \"}\n <Typography\n component=\"span\"\n sx={{\n color: statusMessage.color,\n }}\n >\n {` ${statusMessage.text}`}\n </Typography>\n {\n remediation.status === 'rejected' ?\n <>\n {\" \"} by {remediation.contractManagerFullName},{\" \"}\n <Typography\n component='span'\n sx={{\n color: '#FFA600',\n }}>\n Awaiting Formal Response\n </Typography>\n </>\n : \"\"}\n </>\n ) : (<></>)\n\n const label = remediation ? (\n <>\n for <strong>{remediation.serviceActionReason}</strong> \n {remediation.status !== 'awaiting_response' && remediation.status !== 'cancelled' && remediation.status !== 'rejected' && (\n <> by <strong>{remediation.contractManagerFullName}</strong></>\n )}\n </>\n ) : (<></>)\n\n const links = remediation ? (\n <>\n {remediation?.replyPdfUrl && (\n <Link\n onClick={handleOpenPdf('response')}\n underline=\"none\"\n sx={{ cursor: \"pointer\", mr: 1 }}\n >\n Open Response\n </Link>\n )}\n <Link\n onClick={handleOpenPdf('notice')}\n underline=\"none\"\n sx={{\n cursor: \"pointer\",\n }}\n >\n Open Notice\n </Link></>\n ) : (<></>)\n\n\n const body = remediation ? (\n <>\n <Box\n sx={{\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n }}\n >\n <Typography sx={{ fontSize: \"11px\", fontWeight: \"400\", color: \"#828B98\" }}>\n Date of contract failure{\" \"}\n <span style={{ color: \"#BFBFBF\" }}>{formatDate(remediation.dateOfContractFailure)}</span>\n </Typography>\n <Typography color=\"grey\" sx={{ fontSize: \"11px\", color: \"#5F6369\" }}>\n Requested on <span style={{ color: \"#828B98\" }}>{formatDate(remediation?.requestedOn)}</span> by{\" \"}\n <span style={{ color: \"#828B98\" }}>{remediation.inputedByFullName || \"No Agent\"}</span>\n </Typography>\n\n </Box>\n <Typography sx={{ fontSize: \"11px\", color: \"#828B98\", mb: isLog ? 1 : 0 }}>\n {remediation.message}\n </Typography>\n\n {remediation?.status == \"vendor_replied\" && (\n <Box sx={{ display: \"flex\", justifyContent: \"flex-end\", mt: 2, gap: 1 }}>\n <Button\n variant=\"contained\"\n color=\"success\"\n sx={{ textTransform: \"none\" }}\n onClick={() => acceptRemediation()}\n >\n Accept\n </Button>\n <Button\n variant=\"contained\"\n color=\"error\"\n sx={{ textTransform: \"none\" }}\n onClick={() => rejectRemediation()}\n >\n Reject\n </Button>\n </Box>\n )}\n <PdfModal open={openModal} onClose={() => setOpenModal(false)} pdfUrl={pdfUrl} />\n </>\n\n ) : (<></>)\n\n return remediation ? (\n <ReportRequestCardLayout title={title} links={links} label={label} body={body} request={remediation} />\n ) : (<></>);\n};\n\nexport default RemediationCard;\n","import LinkIcon from \"@mui/icons-material/Link\";\nimport {\n Box, Card, CardContent, Chip, Collapse, IconButton, Link, Stack, Typography,\n} from \"@mui/material\";\nimport { Contact } from \"api/tickets\";\nimport _ from 'lodashExtended';\nimport { flatMap } from \"lodash\";\nimport { useContext, useMemo, useState } from \"react\";\n// import { useHistory, useLocation } from \"react-router-dom\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport {\n DownArrowIcon,\n UpArrowIcon,\n} from \"service/utils/Icons\";\nimport { formatDate } from \"sharedUtils\";\nimport AppContext from \"ticket/AppContext\";\nimport { getLocationId, useTicket } from \"ticket/selectors\";\nimport ReportRequestCardLayout from \"./ReportRequestCardLayout\"\n\nconst ReattemptVisitCard = ({ request }) => {\n const { stakeholderContacts } = useTicket() || {};\n\n // const history = useHistory();\n // const location = useLocation();\n const locationId = getLocationId();\n const {\n currentTicketId,\n highlightedIds,\n setHighlightedIds,\n onOpenRemediation,\n } = useContext(AppContext);\n\n // const [open, setOpen] = useState(true);\n\n // Get all stakeholders\n const allStakeholders: Contact[] = flatMap(\n stakeholderContacts || [],\n (x) => x\n );\n\n // Find who inputted the request\n // TODO: Get inputtedById on the request ?\n const inputtedBy = allStakeholders?.find(\n (x) => x.id === request?.inputtedById\n );\n\n\n const statusMap = {\n awaiting_date: \"#FFA600\",\n date_received: \"#1CAF38\",\n };\n\n const title = (\n <>\n Re-attempt Visit{\" \"}\n {_.isPresent(request?.reattemptDate) ? (\n <>\n <span style={{ color: \"#19E53B\" }}>Confirmed </span>\n for {formatDate(request?.reattemptDate)}\n </>\n ) : (\n <Typography\n component=\"span\"\n sx={{\n fontSize: \"13px\",\n fontWeight: \"700\",\n color: statusMap[\"awaiting_date\"],\n }}\n >\n Awaiting Date\n </Typography>\n )}\n </>\n )\n\n const body = (\n <>\n { _.isPresent(request?.reattemptDate) ? (\n <Typography sx={{ fontSize: \"13px\", color: \"#828B98\" }}>\n Visit confirmed for{\" \"}\n <span style={{ color: \"#19E53B\" }}>\n {formatDate(request?.reattemptDate)}\n </span>\n <Typography\n component=\"span\"\n sx={{ fontSize: \"11px\", color: \"#828B98\" }}\n >\n {\" \"}\n on{\" \"}\n <span style={{ color: \"#BFBFBF\" }}>\n {formatDate(request?.confirmedAt)}\n </span>{\" \"}\n by{\" \"}\n <span style={{ color: \"#BFBFBF\" }}>\n {inputtedBy?.nameWithoutEmail || \"No Agent\"}\n </span>\n </Typography>\n </Typography>\n ) : (\n <Typography sx={{ fontSize: \"13px\", color: \"#828B98\" }}>\n Visit confirmed for{\" \"}\n <Chip\n label=\"Awaiting Date\"\n size=\"small\"\n sx={{\n background: \"#5F6369\",\n color: \"#BFBFBF\",\n fontSize: \"11px\",\n fontWeight: \"bold\",\n }}\n />\n </Typography>\n )}\n </>\n )\n\n return (\n <ReportRequestCardLayout title={title} links='' label={undefined} body={body} request={request} />\n );\n};\n\nexport default ReattemptVisitCard;\n","import { orderBy } from \"lodash\";\nimport ReportCard from \"./ReportCard\";\n\nconst ReportsCards = ({ service }) => {\n const { latestVisitFailureReports: reports } = service;\n\n return (\n <>\n {orderBy(reports, [\"reportedAt\", \"desc\"]).map((report, key) => (\n <ReportCard report={report} key={key} />\n ))}\n </>\n );\n};\n\nexport default ReportsCards;\n","import CheckIcon from \"@mui/icons-material/Check\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport UnknownIcon from \"@mui/icons-material/Remove\";\n\nimport LinkIcon from \"@mui/icons-material/Link\";\nimport {\n Box, Card, CardContent, Chip, Collapse, Grid, IconButton, Link, Stack, Table, TableBody, TableCell, TableContainer, TableRow, Typography,\n} from \"@mui/material\";\nimport { Contact } from \"api/tickets\";\nimport { useGetLocationRemediationQuery } from \"api/services\";\nimport { flatMap, get, last, startCase, camelCase, mapKeys } from \"lodash\";\nimport { useContext, useEffect, useMemo, useState } from \"react\";\nimport BinDot from \"service/BinDot\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport { formatDate } from \"sharedUtils\";\nimport AppContext from \"ticket/AppContext\";\nimport { getInUseBinGroupsForService, } from \"ticket/selectors\";\nimport ReportRequestCardLayout from \"./ReportRequestCardLayout\"\nimport { TypoSuccess, TypoWarning, TypoError, TypoHaveInfo, TypoNeedInfo } from 'sharedComponents';\n\n\n\nconst ReportCard = ({ report }) => {\n\n const inUseBinGroups = getInUseBinGroupsForService(report.serviceUuid);\n\n // Determine the latest feedback and collected bin group IDs\n const { latestFeedback, collectedBinGroupIds, uncollectedBinGroupIds } =\n useMemo(() => {\n const vendorFeedback = last(report.vendorFeedback);\n const clientFeedback = last(report.clientFeedback);\n\n const latest = vendorFeedback || clientFeedback;\n\n return {\n latestFeedback: latest,\n collectedBinGroupIds: get(\n latest,\n \"visitReport.collectedBinGroupIds\",\n report.collectedBinGroupIds,\n ),\n uncollectedBinGroupIds: get(\n latest,\n \"visitReport.uncollectedBinGroupIds\",\n report.uncollectedBinGroupIds,\n ),\n };\n }, [report]);\n\n // Update delivery and collection result slugs based on latest feedback\n const deliveryResultSlug = get(\n latestFeedback,\n \"visitReport.deliveryResultSlug\",\n report.deliveryResultSlug,\n );\n const collectionResultSlug = get(\n latestFeedback,\n \"visitReport.collectionResultSlug\",\n report.collectionResultSlug,\n );\n\n\n const title = (\n <>\n Failed Visit Report for  \n\n <Chip size=\"xsmall\" color=\"warning\" label={formatDate(report?.date)} />  \n { report.status === 'awaiting_feedback' ? (\n <TypoNeedInfo> <strong>{startCase(report.status)}</strong> </TypoNeedInfo>\n ) : (\n <TypoHaveInfo> <strong>{startCase(report.status)}</strong> </TypoHaveInfo>\n )\n }\n\n </>\n );\n\n const label = (\n <Box>\n\n <strong> Driver\n { report?.driverTurnUp ? (\n <TypoSuccess> Arrived</TypoSuccess>\n ) : (\n <TypoError> Failed to Arrived</TypoError>\n )\n }\n </strong>\n\n     Reported by\n\n { report.reportedByStakeholderId === 1 || report.reportedByStakeholderId === 2 ? \" Client\" : \" Vendor\" }\n\n </Box>\n );\n\n\n\n const renderReportStatus = (slug) => {\n switch (slug) {\n case 'total_failure':\n return (\n <TypoError component=\"strong\">Nothing</TypoError>\n );\n case 'partial_failure':\n return (\n <TypoWarning component=\"strong\">Partial</TypoWarning>\n );\n case 'success':\n return (\n <TypoSuccess component=\"strong\">All Good</TypoSuccess>\n );\n default:\n return (\n <Typography component=\"strong\" color=\"info\">Unknown Status</Typography>\n );\n }\n };\n\n const body = (\n <>\n <>\n <Grid container spacing={2}>\n\n\n <Grid item xs={6}>\n <Box sx={{ mb: '7px'}}>Collected <strong>{renderReportStatus(collectionResultSlug)}</strong></Box>\n <Box>\n <span>Reason </span>\n {report?.collectionFailureReason?.name ? (\n <Typography> {report.collectionFailureReason.name}</Typography>\n ) : (\n <Chip label=\"Not Supplied\" size=\"xsmall\" color=\"info\"/>\n )}\n </Box>\n\n </Grid>\n\n <Grid item xs={6}>\n <Box sx={{ mb: '7px'}}>Delivered <strong>{renderReportStatus(deliveryResultSlug)}</strong></Box>\n\n <Box>\n <span>Reason </span>\n {report?.deliveryFailureReason?.name ? (\n <Typography>\n {report.deliveryFailureReason.name}\n </Typography>\n ) : (\n <Chip label=\"Not Supplied\" size=\"xsmall\" color=\"info\"/>\n )}\n </Box>\n\n </Grid>\n\n </Grid>\n\n { (collectedBinGroupIds.length > 0 || uncollectedBinGroupIds.length > 0) && (\n <Box sx={{ mt: '7px'}}>\n <TableContainer>\n <Table\n size=\"small\"\n sx={{\n \"& .MuiTableCell-root\": {\n padding: 0,\n fontSize: \"11px\",\n border: \"none\",\n },\n width: \"auto\",\n tableLayout: \"fixed\",\n }}\n >\n <TableBody\n sx={{\n \"& .MuiTableCell-root\": {\n fontSize: \"11px\",\n color: \"#BFBFBF\",\n },\n }}\n >\n {inUseBinGroups.map((bg: any) => (\n <BinGroupRow\n key={bg.id}\n binGroup={bg}\n isCollected={collectedBinGroupIds.includes(bg.id)}\n isUncollected={uncollectedBinGroupIds.includes(\n bg.id,\n )}\n />\n ))}\n </TableBody>\n </Table>\n </TableContainer>\n </Box>\n )}\n </>\n\n </>\n );\n\n\n return (\n <ReportRequestCardLayout title={title} links='' label={label} body={body} request={report} />\n );\n\n};\n\nexport default ReportCard;\n\nconst BinGroupRow = ({ binGroup, isCollected, isUncollected }) => {\n\n const getIconColor = () => {\n if (isCollected === true) return \"success.main\";\n if (isCollected === false) return \"error.main\";\n return \"action.disabled\";\n };\n\n const getIcon = () => {\n\n const iconSx = { color: getIconColor(), fontSize: '18px', }\n\n if (isCollected === true) return (\n <CheckIcon sx={{...iconSx}}/>\n );\n if (isCollected === false) return (\n <CloseIcon sx={{...iconSx}}/>\n );\n return (\n <UnknownIcon sx={{...iconSx}}/>\n );\n };\n\n return (\n <TableRow>\n <TableCell align=\"center\" sx={{ width: '20px', textAlign: 'left'}}>\n {getIcon()}\n </TableCell>\n <TableCell>\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: 1 }}>\n <BinDot binGroup={binGroup} tooltipName={true} tooltipPlace=\"top\" />\n <Typography noWrap>{binGroup.binTypes.join(\", \")}</Typography>\n </Box>\n </TableCell>\n </TableRow>\n );\n};\n","import React from \"react\";\nimport _ from \"lodashExtended\";\nimport { Box, Typography, Tooltip, Chip } from \"@mui/material\";\nimport { FrequencyChip } from 'sharedComponents';\nimport { useTheme } from '@mui/material/styles';\nimport CheckIcon from \"@mui/icons-material/Check\";\nimport OverflowTooltip from \"service/forms/common/OverflowTooltip\";\n\nexport const VisitFrequencyRow = ({ service }) => {\n return renderSwitch(service);\n};\n\nfunction renderSwitch(service) {\n\n const theme = useTheme();\n\n switch (service.visitFrequencyStatus) {\n case \"frequencies_aligned\":\n return (\n <Tooltip title={\"The Vendor's Frequency and Anenta's Frequency Align\"} >\n <Chip label={service.requestedVisitPlanName} size=\"small\" color=\"success\" sx={{fontWeight: 'bold' }}/>\n </Tooltip>\n );\n case \"frequencies_not_aligned\":\n return (\n <>\n <FrequencyChip\n anentaLabel={service.requestedVisitPlanName}\n anentaColor=\"success\"\n vendorLabel={service.vendorVisitPlanName}\n vendorColor=\"warning\"\n />\n </>\n );\n case \"vendor_frequency_only\":\n return (\n <>\n <FrequencyChip\n anentaLabel=\"Not Set\"\n anentaColor=\"error\"\n vendorLabel={service.vendorVisitPlanName}\n vendorColor=\"success\"\n />\n </>\n );\n case \"vendor_frequency_unknown\":\n return (\n <>\n <FrequencyChip\n anentaLabel={service.requestedVisitPlanName}\n anentaColor=\"success\"\n vendorLabel=\"Unknown\"\n vendorColor=\"error\"\n />\n </>\n );\n case \"jointly_unspecified_frequency\":\n return (\n <>\n <FrequencyChip\n anentaLabel=\"Not Set\"\n anentaColor=\"error\"\n vendorLabel=\"Unknown\"\n vendorColor=\"warning\"\n />\n </>\n );\n default:\n return null;\n }\n}\n","import ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport { Box, Collapse, IconButton, Grid } from \"@mui/material\";\nimport { useContext, useState } from \"react\";\nimport ServiceMappingInfo, {\n ServiceMappingInfoProps,\n} from \"./ServiceMappingInfo\";\nimport VlcTable from \"./VlcTable\";\nimport ServiceBoxContext from \"ticket/ServiceBoxContext\";\nimport { useTheme } from '@mui/material/styles';\nimport VendorAccountLink from \"./VendorAccountLink\";\n\n\nconst VlcSection = ({ service }) => {\n const [openVLC, setOpenVLC] = useState(false);\n const { currentVendorLocationAccount } = useContext(ServiceBoxContext)\n const theme = useTheme();\n\n\n const remainingServiceMappings = service?.serviceMappings?.slice(1) || [];\n\n return (\n <>\n <Grid container gap={0}>\n\n <Grid item xs={10} sx={{ alignItems: 'center' }}>\n\n <ServiceMappingInfo openVLC={openVLC}\n {...(currentVendorLocationAccount as ServiceMappingInfoProps)}\n vendorAccountClosedMonthName={service?.vendorAccountClosedMonthName}\n />\n\n </Grid>\n <Grid item xs={2} sx={{ alignItems: 'center', textAlign: 'right' }}>\n\n {currentVendorLocationAccount && (\n\n <IconButton size=\"small\" onClick={() => setOpenVLC(!openVLC)}>\n {openVLC ? <ExpandLessIcon /> : <ExpandMoreIcon />}\n </IconButton>\n\n )}\n\n </Grid>\n\n </Grid>\n\n\n\n\n\n <Collapse in={openVLC} timeout={0} unmountOnExit>\n\n <VlcTable\n vendorLocationAccounts={\n currentVendorLocationAccount?.vendorLocationAccounts\n }\n />\n\n {remainingServiceMappings?.map((sm) => (\n <Box mt={1}>\n <ServiceMappingInfo\n openVLC={openVLC}\n {...(sm as ServiceMappingInfoProps)}\n oldVLA\n />\n <VlcTable vendorLocationAccounts={sm?.vendorLocationAccounts} />\n </Box>\n ))}\n\n </Collapse>\n </>\n );\n};\n\nexport default VlcSection;\n","import { Box, Link, IconButton } from \"@mui/material\";\nimport { VendorAccount } from \"./ServiceMappingInfo\";\nimport { useTheme } from '@mui/material/styles';\n\ninterface VendorAccountLinkProps {\n vendorAccount: VendorAccount;\n vendorAccountClosedMonthName: string;\n}\n\nconst VendorAccountLink: React.FC<VendorAccountLinkProps> = ({\n vendorAccount,\n vendorAccountClosedMonthName,\n}) => {\n\n const theme = useTheme();\n\n\n if (vendorAccount?.closed) {\n return (\n <>\n <Link\n href={`/admin/vendor_accounts/${vendorAccount?.id}`}\n target=\"_blank\"\n underline=\"none\"\n sx={{ color: \"#3BAFDA\", fontSize: \"12px\" }}\n >\n {vendorAccount?.nameWithoutClosed}{\" \"}\n </Link>\n  \n <IconButton\n href={`/admin/vendor_services/${vendorAccount?.vendorServiceId}`}\n target=\"_blank\"\n size=\"small\"\n sx={{ color: theme.palette.grey[400] }}\n >\n <i className=\"fa fa-puzzle-piece\" aria-hidden=\"true\"></i>\n </IconButton>\n\n -{\" \"}\n <span className=\"text-danger\">\n <strong>Closed</strong> {vendorAccountClosedMonthName}\n </span>\n  \n </>\n );\n }\n\n if (vendorAccount) {\n return (\n <>\n <Link\n href={`/admin/vendor_accounts/${vendorAccount?.id}`}\n target=\"_blank\"\n underline=\"none\"\n sx={{ color: \"#3BAFDA\", fontSize: \"12px\" }}\n >\n {vendorAccount?.name}\n </Link>\n  \n <IconButton\n href={`/admin/vendor_services/${vendorAccount?.vendorServiceId}`}\n target=\"_blank\"\n size=\"small\"\n sx={{ color: theme.palette.grey[400] }}\n >\n <i className=\"fa fa-puzzle-piece\" aria-hidden=\"true\"></i>\n </IconButton>\n </>\n );\n } else {\n return (\n <Box sx={{ color: \"#828B98\", fontSize: '12px', fontWeight: 'bold', pt: 1 }}>\n Undefined Account \n <i className=\"fa fa-puzzle-piece\" aria-hidden=\"true\"></i>\n </Box>\n\n )\n }\n\n\n};\n\nexport default VendorAccountLink;\n","import {\n Collapse, Box, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TableSortLabel, Tooltip, TooltipProps, Typography,\n} from \"@mui/material\";\nimport Slider from \"@mui/material/Slider\";\nimport _ from \"lodash\";\nimport { useMemo, useState } from \"react\";\nimport BinDot from \"service/BinDot\";\nimport { formatDate, useBinFetch } from \"sharedUtils\";\nimport { useDebounceValue } from \"usehooks-ts\";\nimport BillingHistoryChart from \"./service-box/BillingHistoryChart\";\nimport { useTheme } from '@mui/material/styles';\nimport { styled } from '@mui/material/styles';\n\nexport const Specification = ({\n specifications = {},\n billingHistory = [],\n billingHistoryUnitAverages = {},\n}) => {\n const billingHistoryLength = billingHistory.length;\n const cloneBillingHistory = _.cloneDeep(billingHistory);\n\n const theme = useTheme();\n\n const [pickStartingFrom, setPickStartingFrom] = useDebounceValue(0, 100);\n const [hiddenServiceCodes, setHiddenServiceCodes] = useState({});\n const [orderBy, setOrderBy] = useState(\"lastBilledDate\");\n const [order, setOrder] = useState<\"asc\" | \"desc\">(\"desc\");\n\n const slicedBillingHistory = billingHistory.slice(pickStartingFrom);\n\n const allCodes = _.uniq([\n ..._.map(specifications, \"serviceCode\"),\n ..._.map(billingHistoryUnitAverages, \"code\"),\n ]);\n\n const { binTypes, binGroups } = useBinFetch(allCodes);\n\n const accumulator = {};\n\n slicedBillingHistory.forEach((entry) => {\n entry.items.forEach((item) => {\n if (!accumulator[item.serviceCode]) {\n accumulator[item.serviceCode] = { totalQuantity: 0 };\n }\n // Increment total quantity for the serviceCode\n accumulator[item.serviceCode].totalQuantity += item.quantity;\n });\n });\n\n // Calculate the average quantity for each serviceCode based on the total count of dates\n const billingHistoryUnitAveragesCalc = {};\n Object.keys(accumulator).forEach((code) => {\n billingHistoryUnitAveragesCalc[code] = {\n code,\n quantity: _.round(\n accumulator[code].totalQuantity / billingHistoryLength,\n 2\n ),\n };\n });\n\n // High order function to avoid onClick={(event) => handleSort(event, 'code')}\n const createSortHandler = (property) => (_event) => {\n const isAsc = orderBy === property && order === \"asc\";\n setOrder(isAsc ? \"desc\" : \"asc\");\n setOrderBy(property);\n };\n\n const rows = useMemo(() => {\n return _.map(allCodes, (code) => {\n let { quantity, visitActionId } = specifications[code] || {};\n let { quantity: averageQuantityCalc } =\n billingHistoryUnitAveragesCalc[code] || {};\n let { quantity: averageQuantity } =\n billingHistoryUnitAverages[code] || {};\n const binType = binTypes[code] || {};\n const bg = binGroups[binType.binGroupId];\n const lastBilledDate = billingHistoryUnitAverages[code]?.lastBilledDate;\n\n return {\n code,\n binType,\n bg,\n quantity,\n averageQuantityCalc: averageQuantityCalc || 0,\n averageQuantity: averageQuantity || 0,\n lastBilledDate,\n visitActionId,\n };\n });\n }, [\n allCodes,\n specifications,\n billingHistoryUnitAveragesCalc,\n billingHistoryUnitAverages,\n binTypes,\n binGroups,\n ]);\n\n const StyledTableCell = styled(TableCell)({\n borderRight: 'none',\n borderLeft: 'none',\n });\n\n const sortedRows = useMemo(() => {\n return _.orderBy(\n rows,\n [\n (row) => {\n if (orderBy === \"lastBilledDate\") {\n // For lastBilledDate, treat empty strings as the oldest date possible\n return row.lastBilledDate\n ? new Date(row.lastBilledDate)\n : new Date(0);\n }\n // For other columns, use the value directly\n return _.get(row, orderBy);\n },\n ],\n [order]\n );\n }, [rows, orderBy, order]);\n\n return (\n <Box>\n <TableContainer\n sx={{\n \"& .MuiTableCell-root\": {\n fontWeight: \"inherit\",\n color: \"inherit\",\n borderLeft: 'none',\n borderRight: 'none',\n px: '2px',\n py: '4px'\n },\n }}\n >\n <Table size=\"small\">\n <TableHead>\n <TableRow\n sx={{\n fontWeight: \"normal\",\n color: \"#828B98\",\n border: \"1px solid transparent\",\n }}\n >\n <StyledTableCell></StyledTableCell>\n <StyledTableCell>\n <TableSortLabel\n active={orderBy === \"binType.name\"}\n direction={orderBy === \"binType.name\" ? order : \"asc\"}\n onClick={createSortHandler(\"binType.name\")}\n >\n Name\n </TableSortLabel>\n </StyledTableCell>\n <StyledTableCell>\n <TableSortLabel\n active={orderBy === \"code\"}\n direction={orderBy === \"code\" ? order : \"asc\"}\n onClick={createSortHandler(\"code\")}\n >\n Code\n </TableSortLabel>\n </StyledTableCell>\n <StyledTableCell>\n <CustomTooltip title=\"Spec suggests that's these bins are being collected currently.\">\n <TableSortLabel\n active={orderBy === \"quantity\"}\n direction={orderBy === \"quantity\" ? order : \"asc\"}\n onClick={createSortHandler(\"quantity\")}\n >\n Qty\n </TableSortLabel>\n </CustomTooltip>\n </StyledTableCell>\n <StyledTableCell>\n <CustomTooltip title=\"Average Quantity, Showing the Calculated Alignment / Backend Calculation \">\n <TableSortLabel\n active={orderBy === \"averageQuantityCalc\"}\n direction={\n orderBy === \"averageQuantityCalc\" ? order : \"asc\"\n }\n onClick={createSortHandler(\"averageQuantityCalc\")}\n >\n Avg Col\n </TableSortLabel>\n </CustomTooltip>\n </StyledTableCell>\n <StyledTableCell>\n <TableSortLabel\n active={orderBy === \"lastBilledDate\"}\n direction={orderBy === \"lastBilledDate\" ? order : \"asc\"}\n onClick={createSortHandler(\"lastBilledDate\")}\n >\n Last Billed\n </TableSortLabel>\n </StyledTableCell>\n <StyledTableCell>Action</StyledTableCell>\n </TableRow>\n </TableHead>\n <TableBody\n sx={{\n \"& .MuiTableCell-root\": {\n borderColor: \"#F1F1F5\",\n },\n }}\n >\n {sortedRows.map((row) => (\n <RowTable\n key={row.code}\n row={row}\n hiddenServiceCodes={hiddenServiceCodes}\n setHiddenServiceCodes={setHiddenServiceCodes}\n />\n ))}\n </TableBody>\n </Table>\n </TableContainer>\n\n\n <Collapse in={false} timeout={0} unmountOnExit>\n\n <BillingHistoryChart\n hiddenServiceCodes={hiddenServiceCodes}\n billingHistory={slicedBillingHistory}\n cloneBillingHistory={cloneBillingHistory}\n />\n\n <BillingHistorySlider\n value={pickStartingFrom}\n maxValue={billingHistoryLength}\n onChange={setPickStartingFrom}\n />\n\n </Collapse>\n\n </Box>\n );\n};\n\n\n\n\nconst RowTable = ({ row, hiddenServiceCodes, setHiddenServiceCodes }) => {\n\n const StyledTableCell = styled(TableCell)({\n borderX: '0px',\n });\n\n const theme = useTheme();\n\n return (\n <TableRow\n sx={{\n backgroundColor: !hiddenServiceCodes[row.code] ? \"inherit\" : theme.palette.grey[200],\n border: \"1px solid transparent\",\n\n }}\n >\n <StyledTableCell>\n <Box sx={{ pl: '8px', pr: '3px' }}><BinDot binGroup={row.bg} tooltipName={true} imgSize=\"20px\"/></Box>\n </StyledTableCell>\n <StyledTableCell onClick={() =>\n setHiddenServiceCodes({\n ...hiddenServiceCodes,\n [row.code]: !hiddenServiceCodes[row.code],\n })\n } sx={{ cursor: \"pointer\", pl: '10px', pr: '3px' }}>\n {row.binType?.imageUrl && (\n <img\n src={row.binType?.imageUrl}\n alt={row.binType?.name}\n style={{ width: \"20px\", height: \"20px\" }}\n />\n )}\n {row.binType?.name}\n </StyledTableCell>\n <StyledTableCell>{row.code}</StyledTableCell>\n <StyledTableCell>{row.quantity}</StyledTableCell>\n <StyledTableCell>\n {row.averageQuantityCalc} / {row.averageQuantity}\n </StyledTableCell>\n <StyledTableCell>\n {row.lastBilledDate ? formatDate(row.lastBilledDate) : \"\"}\n </StyledTableCell>\n <StyledTableCell>{row.visitActionId}</StyledTableCell>\n </TableRow>\n );\n};\n\nconst CustomTooltip = ({ title, children, placement = \"top\", ...props }) => {\n const customStyles = {\n tooltip: {\n fontSize: \"12px\",\n background: \"#000\",\n },\n arrow: {\n color: \"#000\",\n },\n };\n\n return (\n <Tooltip\n title={title}\n placement={placement as TooltipProps[\"placement\"]}\n arrow\n slotProps={{\n tooltip: { style: customStyles.tooltip },\n arrow: { style: customStyles.arrow },\n }}\n {...props}\n >\n {children}\n </Tooltip>\n );\n};\n\nconst BillingHistorySlider = ({ maxValue, value, onChange }) => {\n const valueLabelFormat = (v) => {\n return `${maxValue - v}`;\n };\n\n const handleSliderChange = (_event: Event, newValue: number) => {\n onChange(newValue as number);\n //setLocalValue(newValue as number)\n };\n\n return (\n <Slider\n defaultValue={value}\n onChange={handleSliderChange}\n step={1}\n marks\n getAriaValueText={valueLabelFormat}\n valueLabelDisplay=\"on\"\n valueLabelFormat={valueLabelFormat}\n min={0}\n max={maxValue - 1}\n track=\"inverted\"\n />\n );\n};\n","import InfoIcon from \"@mui/icons-material/Info\";\nimport {\n Box,\n Tooltip as MuiTooltip,\n Paper,\n TableCell,\n TableRow,\n Typography,\n} from \"@mui/material\";\nimport type { ChartOptions } from \"chart.js\";\nimport {\n BarElement,\n CategoryScale,\n Chart as ChartJS,\n Legend,\n LinearScale,\n Title,\n Tooltip,\n} from \"chart.js\";\nimport \"chart.js/auto\";\nimport \"chartjs-adapter-dayjs\";\nimport dayjs from \"dayjs\";\nimport customParseFormat from \"dayjs/plugin/customParseFormat\";\nimport isSameOrAfter from \"dayjs/plugin/isSameOrAfter\";\nimport isSameOrBefore from \"dayjs/plugin/isSameOrBefore\";\nimport _ from \"lodash\";\nimport { useRef, useState } from \"react\";\nimport { Bar } from \"react-chartjs-2\";\nimport BinDot from \"service/BinDot\";\nimport CustomTable from \"service/forms/common/CustomTable\";\nimport { formatDate, useBinFetch } from \"sharedUtils\";\n\ndayjs.extend(customParseFormat);\ndayjs.extend(isSameOrAfter);\ndayjs.extend(isSameOrBefore);\n\nChartJS.register(\n CategoryScale,\n LinearScale,\n BarElement,\n Title,\n Tooltip,\n Legend\n);\n\nconst windowSize = 4;\n\nconst averageWeekGapExpectations = [\n ...[1, 2, 3, 4, 5].map((timesPerWeek) => [\n (7 - timesPerWeek) / 7,\n timesPerWeek == 1 ? \"Weekly\" : `${timesPerWeek} times per week`,\n ]),\n ...[1, 2, 4, 6, 8, 12, 24, 52].map((interval) => [\n interval,\n interval == 1 ? \"Weekly\" : `${interval} Weekly`,\n ]),\n];\n\nfunction rollingAverageToFrequencyGuess(target, thresholdPercentage = 12) {\n // Calculate differences and find the minimum difference\n const differences = averageWeekGapExpectations.map((value) => ({\n name: value[1],\n diff: Math.abs(value[0] - target),\n }));\n const minDifference = Math.min(...differences.map((item) => item.diff));\n const threshold = minDifference + (minDifference * thresholdPercentage) / 100;\n\n // Filter close values and format the output based on the number of close values\n const closeValues = differences\n .filter((item) => item.diff <= threshold)\n .map((item) => item.name);\n if (closeValues.length > 1) {\n return `Visits occur on average between ${closeValues[0]} and ${closeValues[1]}`; // Assumes the closest two are the most relevant\n } else if (closeValues.length === 1) {\n return `Visits occur on average ${closeValues[0]}`;\n } else {\n return \"Visit Frequency cannot be determined\";\n }\n}\n\nconst BillingHistoryChart = ({\n billingHistory,\n hiddenServiceCodes = {},\n cloneBillingHistory,\n}) => {\n const { binTypes, binGroups } = useBinFetch();\n const tooltipRef = useRef(null);\n\n const [tooltip, setTooltip] = useState({\n open: false,\n content: null,\n position: { x: 0, y: 0 },\n });\n const [isHoveringTooltip, setIsHoveringTooltip] = useState(false);\n\n const externalTooltipHandler = ({ chart, tooltip }) => {\n if (tooltip.opacity === 0 && !isHoveringTooltip) {\n setTimeout(() => {\n if (!isHoveringTooltip) {\n setTooltip((prev) => ({ ...prev, open: false }));\n }\n }, 500); // Retardo antes de cerrar el tooltip para permitir interacción\n return;\n }\n\n const dataIndex = tooltip.dataPoints[0].dataIndex;\n const date = dayjs(chart.data.labels[dataIndex]);\n\n // Aggregate data for the date across all datasets\n let dataByServiceCode = chart.data.datasets\n .map((dataset) => ({\n label: dataset.label,\n data: dataset.data[dataIndex],\n color: dataset.borderColor,\n }))\n .reverse();\n\n const rows = dataByServiceCode.map((item) => {\n const binType = binTypes[item.label];\n const binGroup = binGroups[binType?.binGroupId];\n\n return (\n <>\n {item.data > 0 &&\n item.label !== \"visits\" &&\n item.label !== \"average\" && (\n <TableRow key={item.label}>\n <TableCell>\n <BinDot binGroup={binGroup} {...binType} />\n </TableCell>\n <TableCell>{item.label}</TableCell>\n <TableCell>{item.data}</TableCell>\n </TableRow>\n )}\n </>\n );\n });\n\n const averageVisits = dataByServiceCode.find(\n (item) => item.label === \"average\"\n );\n\n const rollingAverageInWeeks = averageVisits?.data;\n\n // Create JSX content for the tooltip\n const jsxTooltipContent = (\n <Box style={{ padding: 8 }}>\n <Typography variant=\"h6\">{formatDate(date)}</Typography>\n {averageVisits && (\n <Typography variant=\"h6\">\n {rollingAverageToFrequencyGuess(averageVisits.data)}\n <MuiTooltip\n title={`Average Interval in Weeks (+/- ${windowSize} visits rolling window): ${averageVisits.data.toFixed(\n 2\n )}`}\n >\n <InfoIcon />\n </MuiTooltip>\n </Typography>\n )}\n <CustomTable rows={rows} headers={[\"Bin\", \"Code\", \"Qty\"]} />\n </Box>\n );\n\n const tooltipWidth = tooltipRef.current\n ? tooltipRef.current.offsetWidth\n : 0;\n const canvasWidth = chart.canvas.offsetWidth;\n const mouseX = tooltip.caretX;\n\n let adjustedX;\n if (mouseX + tooltipWidth + 20 > canvasWidth) {\n adjustedX = mouseX - tooltipWidth - 20;\n } else {\n adjustedX = mouseX + 10;\n }\n\n setTooltip({\n open: true,\n content: jsxTooltipContent,\n position: {\n x: adjustedX,\n y: chart.canvas.offsetTop,\n },\n });\n };\n\n const firstDatesOfMonth = findFirstDatesOfMonth(billingHistory);\n\n // Extract dates for labels, ensure uniqueness and sort them\n const labels = _.uniq(\n billingHistory.map((entry) => dayjs(entry.date).format(\"YYYY-MM-DD\"))\n ).sort() as string[];\n\n // Create a map to hold datasets keyed by service code\n const datasetsMap = new Map();\n\n // Iterate over each entry in the billing history\n billingHistory.forEach((entry) => {\n // Sort items within each entry\n const sortedItems = _.filter(\n entry.items,\n (item) => !hiddenServiceCodes[item.serviceCode]\n );\n\n sortedItems.forEach((item) => {\n const serviceDate = dayjs(entry.date).format(\"YYYY-MM-DD\");\n if (!datasetsMap.has(item.serviceCode)) {\n const binType = binTypes[item.serviceCode];\n const binGroup = binGroups[binType?.binGroupId];\n const fillColor = binGroup?.legendFillColor || \"#0F6E60\";\n const strokeColor = binGroup?.legendBorderColor || \"#0F6E60\";\n\n // Initialize dataset for new service code\n datasetsMap.set(item.serviceCode, {\n label: item.serviceCode,\n data: new Array(labels.length).fill(0), // Initialize data array for each label\n backgroundColor: fillColor,\n borderColor: strokeColor,\n borderWidth: 1,\n });\n }\n\n // Place quantity in the correct position based on the date\n const index = labels.indexOf(serviceDate);\n datasetsMap.get(item.serviceCode).data[index] = item.quantity;\n });\n });\n\n // Convert map values to an array for Chart.js\n const datasets = Array.from(datasetsMap.values());\n const rollingAverageVisits = calculateVisitsPerWeek(cloneBillingHistory);\n\n const averageVisitsDataset = {\n label: \"average\",\n type: \"line\",\n data: labels.map((label) => {\n return rollingAverageVisits[label] || 0;\n }),\n borderColor: \"rgba(245, 39, 39, 0.79)\",\n borderWidth: 2,\n fill: false,\n pointRadius: 0,\n yAxisID: \"y1\",\n };\n\n datasets.unshift(averageVisitsDataset);\n\n // Assemble the final data object for Chart.js\n const data = {\n labels,\n datasets,\n };\n\n // Event handlers for mouse enter and leave\n const handleMouseEnter = () => {\n setIsHoveringTooltip(true);\n };\n\n const handleMouseLeave = () => {\n setIsHoveringTooltip(false);\n setTooltip((prev) => ({ ...prev, open: false }));\n };\n const options: ChartOptions<\"bar\"> = {\n animation: {\n duration: 0,\n },\n plugins: {\n title: {\n display: true,\n text: \"Billing History Chart\",\n },\n legend: {\n display: false,\n },\n tooltip: {\n enabled: false,\n external: externalTooltipHandler,\n intersect: false,\n },\n },\n\n scales: {\n x: {\n stacked: true,\n title: {\n display: true,\n text: \"Date\",\n },\n\n grid: {\n color: (context) => {\n if (context?.tick?.label) {\n return \"#ccc\";\n }\n return \"\";\n },\n },\n\n ticks: {\n display: true,\n source: \"labels\",\n align: \"start\",\n crossAlign: \"near\",\n autoSkip: false,\n maxRotation: 90,\n callback: function (value) {\n const date = dayjs(this.getLabelForValue(Number(value)));\n const monthKey = date.format(\"YYYY-MM\"); // Use year-month as key to match the map\n if (firstDatesOfMonth.has(monthKey)) {\n if (firstDatesOfMonth.get(monthKey).isSame(date)) {\n return date.format(\"MMM YY\"); // Show the month if it's the first occurrence\n }\n return \"\";\n }\n return \"\"; // No label otherwise\n },\n },\n },\n\n y: {\n stacked: true,\n title: {\n display: true,\n text: \"Quantity\",\n },\n },\n y1: {\n position: \"right\",\n grace: \"150%\",\n title: {\n display: true,\n text: \"Average Weeks between Visit\",\n },\n grace: \"200%\",\n grid: {\n drawOnChartArea: true,\n },\n },\n },\n };\n\n return (\n <>\n <Bar options={options} data={data} />\n {tooltip.open && (\n <Paper\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n style={{\n position: \"absolute\",\n left: tooltip.position.x,\n top: tooltip.position.y,\n padding: \"10px\",\n backgroundColor: \"rgba(255, 255, 255, 0.9)\",\n boxShadow: \"0px 2px 10px rgba(0, 0, 0, 0.1)\",\n borderRadius: \"4px\",\n zIndex: 999,\n }}\n ref={tooltipRef}\n >\n <Typography>{tooltip.content}</Typography>\n </Paper>\n )}\n </>\n );\n};\n\nexport default BillingHistoryChart;\n\nconst findFirstDatesOfMonth = (billingHistory) => {\n const firstDates = new Map();\n\n billingHistory.forEach((entry) => {\n const monthKey = dayjs(entry.date).format(\"YYYY-MM\"); // Key as Year-Month\n const currentDate = dayjs(entry.date);\n\n if (\n !firstDates.has(monthKey) ||\n currentDate?.isBefore(firstDates.get(monthKey))\n ) {\n firstDates.set(monthKey, currentDate);\n }\n });\n\n return firstDates; // Map containing the earliest date found for each month\n};\n\nconst eachCons = (array, num) => {\n return Array.from({ length: array.length - num + 1 }, (_, i) =>\n array.slice(i, i + num)\n );\n};\n\nconst calculateVisitsPerWeek = (billingHistory) => {\n const visitsPerDate = {};\n\n billingHistory.forEach((entry) => {\n const date = dayjs(entry.date).format(\"YYYY-MM-DD\");\n\n if (!visitsPerDate[date]) {\n visitsPerDate[date] = 0;\n }\n\n visitsPerDate[date]++;\n });\n\n const dateKeys = Object.keys(visitsPerDate).sort();\n const rollingAverageVisits = {};\n\n for (let i = 0; i < dateKeys.length; i++) {\n const currentDate = dateKeys[i];\n\n // Get window\n const startIndex = Math.max(0, i - windowSize);\n const endIndex = Math.min(dateKeys.length - 1, i + windowSize);\n const window = dateKeys.slice(startIndex, endIndex);\n\n let weekGaps = _.map(eachCons(window, 2), (x) => {\n return Math.abs(dayjs(x[0]).diff(x[1], \"week\", true));\n });\n\n const averageWeeks = _.sum(weekGaps) / weekGaps.length;\n rollingAverageVisits[currentDate] = averageWeeks;\n }\n\n return rollingAverageVisits;\n};\n","import { ExpandLess, ExpandMore } from \"@mui/icons-material\";\nimport { Alert, Box, Collapse, ListItemButton } from \"@mui/material\";\nimport { groupBy, map, orderBy } from \"lodash\";\nimport { useState } from \"react\";\nimport { AdhocVisitRequest, AdhocVisitRequests } from \"service/ticket/types\";\nimport { getTicketId } from \"ticket/selectors\";\nimport AdhocVisitRequestCard from \"./AdhocVisitRequestCard\";\nimport { useTypedSelector } from \"ticket/app/store\";\ninterface AdhocVisitRequestProps {\n adhocVisitRequests: AdhocVisitRequests;\n}\nconst AdhocVisitRequestTab: React.FC<AdhocVisitRequestProps> = ({\n adhocVisitRequests,\n}) => {\n const ticketId = useTypedSelector(getTicketId);\n const [openStates, setOpenStates] = useState(() => {\n let initialStates = {};\n if (adhocVisitRequests) {\n initialStates = adhocVisitRequests.reduce((acc, request) => {\n const isTicketId = request.linkedTicketIds[0] === Number(ticketId);\n\n acc[request.id] = false;\n acc[`group-${request.linkedTicketIds[0]}`] = isTicketId;\n return acc;\n }, {});\n }\n return initialStates;\n });\n\n const handleClick = (id: string) => {\n setOpenStates((prevStates) => ({\n ...prevStates,\n [id]: !prevStates[id],\n }));\n };\n\n const groupedRequests = groupBy(\n orderBy(adhocVisitRequests, [\"requestedAt\"], [\"desc\"]),\n (request) => {\n return request?.linkedTicketIds[0];\n }\n );\n\n const renderGroup = (requests: AdhocVisitRequest[], currentTicketId) => (\n <Box key={currentTicketId}>\n <ListItemButton\n onClick={() => handleClick(`group-${currentTicketId}`)}\n sx={{ fontSize: \"12px\", fontWeight: \"bold\", pb: 1, color: \"#fff\" }}\n >\n {currentTicketId === ticketId\n ? \"Requests on this Ticket\"\n : `Ticket ID: ${currentTicketId}`}\n {openStates[`group-${currentTicketId}`] ? (\n <ExpandLess />\n ) : (\n <ExpandMore />\n )}\n </ListItemButton>\n <Collapse\n in={openStates[`group-${currentTicketId}`]}\n timeout={0}\n unmountOnExit\n >\n {requests.map((request) => (\n <AdhocVisitRequestCard\n key={request.id}\n request={request}\n isOpen={openStates[request.id]}\n toggleOpen={() => handleClick(request.id)}\n />\n ))}\n </Collapse>\n </Box>\n );\n\n return (\n <>\n {Object.values(adhocVisitRequests)?.length === 0 && (\n <Alert severity=\"warning\" sx={{ p: 2, fontSize: \"14px\" }}>\n No requests to show\n </Alert>\n )}\n\n {/* Render the group with the specific ticketId first if it exists */}\n {groupedRequests[ticketId] &&\n renderGroup(groupedRequests[ticketId], ticketId)}\n\n {/* Render other groups */}\n {map(groupedRequests, (requests, currentTicketId) => {\n if (currentTicketId !== ticketId.toString()) {\n return renderGroup(requests, currentTicketId);\n }\n })}\n </>\n );\n};\n\nexport default AdhocVisitRequestTab;\n","import { ExpandLess, ExpandMore } from \"@mui/icons-material\";\nimport { Box, Collapse, ListItemButton } from \"@mui/material\";\nimport { groupBy, map, orderBy, union } from \"lodash\";\nimport { useState } from \"react\";\nimport {\n AdhocVisitRequest,\n StockDeliveryRequest,\n SpecChangeRequest,\n VisitFrequencyChangeRequest,\n ServiceSuspensionRequest,\n ServiceTerminationRequest,\n ServiceResumptionRequest,\n} from \"service/ticket/types\";\nimport { getTicketId } from \"ticket/selectors\";\nimport AdhocVisitRequestCard from \"./AdhocVisitRequestCard\";\nimport StockDeliveryRequestCard from \"./StockDeliveryCard\";\nimport SpecChangeRequestCard from \"./SpecChangeRequestCard\";\nimport VisitFrequencyChangeRequestCard from \"./VisitFrequencyChangeRequestCard\";\nimport ServiceSuspensionRequestCard from \"./ServiceSuspensionRequestCard\";\nimport ServiceTerminationRequestCard from \"./ServiceTerminationRequestCard\";\nimport ServiceResumptionRequestCard from \"./ServiceResumptionRequestCard\";\nimport { useTypedSelector } from \"ticket/app/store\";\n\ntype AllRequests =\n | AdhocVisitRequest\n | StockDeliveryRequest\n | SpecChangeRequest\n | VisitFrequencyChangeRequest\n | ServiceSuspensionRequest\n | ServiceResumptionRequest\n | ServiceTerminationRequest;\n\nconst AllRequestTab = ({\n adhocVisitRequests,\n stockDeliveryRequests,\n specChangeRequests,\n visitFrequencyChangeRequests,\n serviceSuspensionRequests,\n serviceResumptionRequests,\n serviceTerminationRequests,\n}) => {\n const ticketId = useTypedSelector(getTicketId);\n const allRequests: AllRequests[] = union(\n adhocVisitRequests,\n stockDeliveryRequests,\n specChangeRequests,\n visitFrequencyChangeRequests,\n serviceSuspensionRequests,\n serviceResumptionRequests,\n serviceTerminationRequests,\n );\n\n const [openStates, setOpenStates] = useState(() => {\n let initialStates = {};\n if (allRequests) {\n // Set the initial state for the group of the current ticket to be expanded\n initialStates[`group-${ticketId}`] = true;\n allRequests.forEach((request) => {\n initialStates[request.id] = false;\n });\n }\n return initialStates;\n });\n\n const handleClick = (id: string) => {\n setOpenStates((prevStates) => ({\n ...prevStates,\n [id]: !prevStates[id],\n }));\n };\n\n const groupedRequests = groupBy(\n orderBy(allRequests, [\"requestedAt\"], [\"desc\"]),\n (request) => {\n return request?.linkedTicketIds[0];\n },\n );\n\n const renderGroup = (requests, currentTicketId) => (\n <Box key={currentTicketId}>\n <ListItemButton\n onClick={() => handleClick(`group-${currentTicketId}`)}\n sx={{ fontSize: \"12px\", fontWeight: \"bold\", pb: 1, color: \"#fff\" }}\n >\n {currentTicketId === ticketId\n ? \"Requests on this Ticket\"\n : `Ticket ID: ${currentTicketId}`}\n {openStates[`group-${currentTicketId}`] ? (\n <ExpandLess />\n ) : (\n <ExpandMore />\n )}\n </ListItemButton>\n <Collapse\n in={openStates[`group-${currentTicketId}`]}\n timeout=\"auto\"\n unmountOnExit\n >\n {requests.map((request) => {\n const RequestCardComponent = {\n AdhocVisitRequest: AdhocVisitRequestCard,\n StockDeliveryRequest: StockDeliveryRequestCard,\n SpecChangeRequest: SpecChangeRequestCard,\n VisitFrequencyChangeRequest: VisitFrequencyChangeRequestCard,\n ServiceSuspensionRequest: ServiceSuspensionRequestCard,\n ServiceTerminationRequest: ServiceTerminationRequestCard,\n ServiceResumptionRequest: ServiceResumptionRequestCard,\n }[request.type];\n return (\n <RequestCardComponent\n key={request.id}\n request={request}\n isOpen={openStates[request.id]}\n toggleOpen={() => handleClick(request.id)}\n />\n );\n })}\n </Collapse>\n </Box>\n );\n\n return (\n <>\n {/* Render the group with the specific ticketId first if it exists */}\n {groupedRequests[ticketId] &&\n renderGroup(groupedRequests[ticketId], ticketId)}\n\n {/* Render other groups */}\n {map(groupedRequests, (requests, currentTicketId) => {\n if (currentTicketId !== ticketId.toString()) {\n return renderGroup(requests, currentTicketId);\n }\n })}\n </>\n );\n};\n\nexport default AllRequestTab;\n","import CalendarTodayIcon from \"@mui/icons-material/CalendarToday\";\nimport ExitToAppIcon from \"@mui/icons-material/ExitToApp\";\nimport FolderIcon from \"@mui/icons-material/Folder\";\nimport NotificationsActiveIcon from \"@mui/icons-material/NotificationsActive\";\nimport PendingIcon from \"@mui/icons-material/Pending\";\nimport TagIcon from \"@mui/icons-material/Tag\";\nimport TextSnippetOutlinedIcon from \"@mui/icons-material/TextSnippetOutlined\";\nimport {\n Timeline,\n TimelineConnector,\n TimelineContent,\n TimelineDot,\n TimelineItem,\n timelineItemClasses,\n TimelineSeparator,\n} from \"@mui/lab\";\nimport {\n Alert, Box, Card, CardContent, Stack, Tooltip, Typography,\n} from \"@mui/material\";\nimport dayjs from \"dayjs\";\nimport { capitalize, filter, findLast, lowerCase, startCase } from \"lodash\";\nimport React from \"react\";\nimport { formatDate } from \"sharedUtils\";\nimport EventAvailableIcon from \"@mui/icons-material/EventAvailable\";\n\nconst RemediationCaseTab = ({ remediationCase }) => {\n if (!remediationCase || Object.keys(remediationCase).length === 0) {\n return (\n <Alert severity=\"warning\" sx={{ p: 2, fontSize: \"14px\" }}>\n No requests to show\n </Alert>\n );\n }\n const openedOnDate = dayjs(remediationCase?.openedOn).startOf(\"day\");\n const today = dayjs().startOf(\"day\");\n let daysOpen = today.diff(openedOnDate, \"day\");\n daysOpen = Math.max(daysOpen, 0);\n\n const lastReattemptLogEntry = findLast(remediationCase.allLogEntries, {\n dataType: \"Reattempt date confirmed\",\n });\n const storedReattemptDate = lastReattemptLogEntry\n ? lastReattemptLogEntry.data.reattemptDate\n : undefined;\n\n const filteredLogEntries = filter(remediationCase.allLogEntries, (entry) =>\n /failed|failure|reattempt/.test(lowerCase(entry.dataType)),\n );\n\n return (\n <Box sx={{ p: 1, pt: 0 }} key={remediationCase.id}>\n <Card\n variant=\"outlined\"\n sx={{\n borderRadius: 2,\n backgroundColor: \"#402943\",\n color: \"#fff\",\n \"& .MuiCardContent-root:last-child\": {\n pb: 1,\n },\n }}\n >\n <CardContent>\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: 1 }}>\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Case {capitalize(remediationCase?.status)}{\" \"}\n <span style={{ color: \"#DD7DFF\" }}>\n on {formatDate(remediationCase?.openedOn)}\n </span>\n </Typography>\n </Box>\n\n <Box\n sx={{\n flexDirection: \"column\",\n display: \"flex\",\n alignItems: \"start\",\n gap: 1,\n }}\n >\n <Box sx={{ display: \"flex\", gap: \"30px\" }}>\n <Tooltip\n placement=\"top\"\n title={\n <>\n <div>Case Opened Date</div>{\" \"}\n <div>{formatDate(remediationCase?.openedOn)}</div>\n </>\n }\n arrow\n >\n <Box sx={{ display: \"flex\", alignItems: \"center\" }}>\n <TextSnippetOutlinedIcon />\n <span> Open for {daysOpen} days</span>\n </Box>\n </Tooltip>\n <Tooltip\n placement=\"top\"\n title=\"Number of Failed Visit Report\"\n arrow\n >\n <Box sx={{ display: \"flex\", alignItems: \"center\" }}>\n <TagIcon /> <span>{remediationCase?.failureReportCount}</span>\n </Box>\n </Tooltip>\n <Tooltip\n placement=\"top\"\n title=\"Date of First Failed Visit Report\"\n arrow\n >\n <Box sx={{ display: \"flex\", alignItems: \"center\" }}>\n <CalendarTodayIcon />\n <span> {formatDate(remediationCase?.firstFailedOn)}</span>\n </Box>\n </Tooltip>\n <Tooltip\n placement=\"top\"\n title=\"Number of Notifications Send\"\n arrow\n >\n <Box sx={{ display: \"flex\", alignItems: \"center\" }}>\n <NotificationsActiveIcon />\n <span> {remediationCase?.notificationsSent}</span>\n </Box>\n </Tooltip>\n </Box>\n <Box sx={{ display: \"flex\", gap: \"30px\" }}>\n <Box sx={{ display: \"flex\", alignItems: \"center\" }}>\n {storedReattemptDate && (\n <>\n <EventAvailableIcon />\n {formatDate(storedReattemptDate)}\n </>\n )}\n {!storedReattemptDate && (\n <>\n <PendingIcon />\n <span>No reattempt date</span>\n </>\n )}\n </Box>\n <Box sx={{ display: \"flex\", alignItems: \"center\" }}>\n <FolderIcon />\n <span>{` ${remediationCase.casesInPastMonthsCount} cases in last 6 months`}</span>\n </Box>\n </Box>\n </Box>\n </CardContent>\n </Card>\n <Timeline\n sx={{\n color: \"#fff\",\n fontSize: \"12px\",\n [`& .${timelineItemClasses.root}:before`]: {\n flex: 0,\n padding: 0,\n },\n }}\n >\n <TimelineItem sx={{ minHeight: 0, alignItems: \"center\" }}>\n <TimelineDot\n sx={{ color: \"#8C3F65\", backgroundColor: \"#8C3F65\", m: 0 }}\n >\n <ExitToAppIcon sx={{ color: \"#fff\" }} />\n </TimelineDot>\n <TimelineContent sx={{ fontSize: \"12px\" }}>\n Case opened\n </TimelineContent>\n </TimelineItem>\n {filteredLogEntries?.map((logEntry) => <LogCard log={logEntry} />)}\n <TimelineItem sx={{ minHeight: \"15px\", my: \"8px\", pl: \"10px\" }}>\n <TimelineSeparator>\n <TimelineConnector sx={{ background: \"#8C3F65\" }} />\n </TimelineSeparator>\n </TimelineItem>\n <TimelineItem sx={{ minHeight: 0, alignItems: \"center\" }}>\n <TimelineDot\n sx={{ color: \"#8C3F65\", backgroundColor: \"#8C3F65\", m: 0 }}\n >\n <ExitToAppIcon\n sx={{ color: \"#fff\", transform: \"rotate(180deg)\" }}\n />\n </TimelineDot>\n <TimelineContent sx={{ fontSize: \"12px\" }}>\n Case closed\n </TimelineContent>\n </TimelineItem>\n </Timeline>\n </Box>\n );\n};\n\nexport default RemediationCaseTab;\n\nconst LogCard = ({ log }) => {\n const isReattemptConfirmed = log.dataType === \"Reattempt date confirmed\";\n\n const messagePrefix = isReattemptConfirmed\n ? \"Reattempt on \"\n : \"Visit failed on \";\n\n const dateToFormat = isReattemptConfirmed\n ? log.data.reattemptDate\n : log.data.failureDate;\n\n const textColor = isReattemptConfirmed ? \"#D678F6\" : \"#e9573f\";\n\n const feedbackTitle = (dataType: string) => {\n if (dataType === \"Vendor feedback on visit failure recieved\")\n return \"Vendo Feedback Received\";\n if (dataType === \"Client feedback on visit failure recieved\")\n return \"Client Feedback Received\";\n\n return dataType;\n };\n return (\n <React.Fragment key={log.medatada?.requestId}>\n <TimelineItem sx={{ minHeight: \"15px\", mt: \"8px\", pl: \"10px\" }}>\n <TimelineSeparator>\n <TimelineConnector sx={{ background: \"#8C3F65\" }} />\n </TimelineSeparator>\n </TimelineItem>\n <TimelineItem sx={{ mt: 1 }}>\n <Card\n sx={{\n width: \"100%\",\n \"& .MuiTypography-root\": {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n },\n }}\n >\n <CardContent>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={1}\n >\n <Typography>{startCase(feedbackTitle(log?.dataType))}</Typography>\n <Typography color=\"grey\">\n on {formatDate(log.data.reportedAt)}\n </Typography>\n </Stack>\n <Typography color=\"grey\">\n {messagePrefix}\n <span style={{ color: textColor }}>\n {formatDate(dateToFormat)}\n </span>\n </Typography>\n </CardContent>\n </Card>\n </TimelineItem>\n </React.Fragment>\n );\n};\n","import { ExpandLess, ExpandMore } from \"@mui/icons-material\";\nimport { Alert, Box, Collapse, ListItemButton } from \"@mui/material\";\nimport { groupBy, map, orderBy } from \"lodash\";\nimport { useMemo, useState } from \"react\";\nimport { FailedVisitReport } from \"service/ticket/types\";\nimport { getTicketId } from \"ticket/selectors\";\nimport ReportVisitFailureCard from \"./ReportVisitFailureCard\";\nimport { useTypedSelector } from \"ticket/app/store\";\n\ninterface ReportTabProps {\n failedVisitReports: FailedVisitReport[];\n}\n\nconst ReportTab: React.FC<ReportTabProps> = ({ failedVisitReports }) => {\n const ticketId = useTypedSelector(getTicketId);\n const [openStates, setOpenStates] = useState(() => {\n let initialStates = {};\n if (failedVisitReports) {\n initialStates = failedVisitReports.reduce((acc, report) => {\n const isTicketId = report.linkedTicketIds[0] === Number(ticketId);\n acc[report.id] = false;\n acc[`group-${report.linkedTicketIds[0]}`] = isTicketId;\n return acc;\n }, {});\n }\n return initialStates;\n });\n\n const handleClick = (reportId: string) => {\n setOpenStates((prevStates: { [x: string]: boolean }) => ({\n ...prevStates,\n [reportId]: !prevStates[reportId],\n }));\n };\n\n const sortedReports = useMemo(() => {\n return orderBy(failedVisitReports, \"reportedAt\", \"desc\");\n }, [failedVisitReports]);\n\n const groupedReports = groupBy(\n sortedReports,\n (report) => report?.linkedTicketIds[0]\n );\n\n const renderGroup = (reports: FailedVisitReport[], currentTicketId) => (\n <Box key={currentTicketId}>\n <ListItemButton\n onClick={() => handleClick(`group-${currentTicketId}`)}\n sx={{ fontSize: \"12px\", fontWeight: \"bold\", pb: 1, color: \"#fff\" }}\n >\n {currentTicketId === ticketId\n ? \"Reports on this Ticket\"\n : `Ticket ID: ${currentTicketId}`}\n {openStates[`group-${currentTicketId}`] ? (\n <ExpandLess />\n ) : (\n <ExpandMore />\n )}\n </ListItemButton>\n <Collapse\n in={openStates[`group-${currentTicketId}`]}\n timeout=\"auto\"\n unmountOnExit\n >\n {reports.map((report) => (\n <ReportVisitFailureCard\n report={report}\n isOpen={openStates[report.id]}\n toggleOpen={() => handleClick(report.id)}\n />\n ))}\n </Collapse>\n </Box>\n );\n return (\n <>\n {sortedReports?.length === 0 && (\n <Box sx={{ p: 2 }}>\n <Alert severity=\"warning\" sx={{ fontSize: \"14px\" }}>\n No reports to show\n </Alert>\n </Box>\n )}\n {groupedReports[ticketId] &&\n renderGroup(groupedReports[ticketId], ticketId)}\n\n {map(groupedReports, (reports, currentTicketId) => {\n if (currentTicketId !== ticketId.toString()) {\n return renderGroup(reports, currentTicketId);\n }\n })}\n </>\n );\n};\n\nexport default ReportTab;\n","import { ExpandLess, ExpandMore } from \"@mui/icons-material\";\nimport { Alert, Box, Collapse, ListItemButton } from \"@mui/material\";\nimport { groupBy, map, orderBy } from \"lodash\";\nimport { useState } from \"react\";\nimport {\n ServiceResumptionRequest,\n ServiceResumptionRequests,\n} from \"service/ticket/types\";\nimport { getTicketId } from \"ticket/selectors\";\nimport ServiceResumptionRequestCard from \"./ServiceResumptionRequestCard\";\nimport { useTypedSelector } from \"ticket/app/store\";\n\ninterface ServiceResumptionRequestTabProps {\n serviceResumptionRequests: ServiceResumptionRequests;\n}\n\nconst ServiceResumptionRequestTab: React.FC<\n ServiceResumptionRequestTabProps\n> = ({ serviceResumptionRequests }) => {\n const ticketId = useTypedSelector(getTicketId);\n const [openStates, setOpenStates] = useState(() => {\n let initialStates = {};\n if (serviceResumptionRequests) {\n initialStates = serviceResumptionRequests.reduce((acc, request) => {\n const isTicketId = request.linkedTicketIds[0] === Number(ticketId);\n\n acc[request.id] = false;\n acc[`group-${request.linkedTicketIds[0]}`] = isTicketId;\n return acc;\n }, {});\n }\n return initialStates;\n });\n\n const handleClick = (id: string) => {\n setOpenStates((prev) => ({ ...prev, [id]: !prev[id] }));\n };\n\n const groupedRequests = groupBy(\n orderBy(serviceResumptionRequests, [\"requestedAt\"], [\"desc\"]),\n (request) => request.linkedTicketIds[0].toString()\n );\n\n const renderGroup = (\n requests: ServiceResumptionRequest[],\n currentTicketId\n ) => (\n <Box key={currentTicketId}>\n <ListItemButton\n onClick={() => handleClick(`group-${currentTicketId}`)}\n sx={{ fontSize: \"12px\", fontWeight: \"bold\", pb: 1, color: \"#fff\" }}\n >\n {currentTicketId === ticketId\n ? \"Requests on this Ticket\"\n : `Ticket ID: ${currentTicketId}`}\n {openStates[`group-${currentTicketId}`] ? (\n <ExpandLess />\n ) : (\n <ExpandMore />\n )}\n </ListItemButton>\n <Collapse\n in={openStates[`group-${currentTicketId}`]}\n timeout=\"auto\"\n unmountOnExit\n >\n {requests.map((request) => (\n <ServiceResumptionRequestCard\n key={request.id}\n request={request}\n isOpen={openStates[request.id]}\n toggleOpen={() => handleClick(request.id)}\n />\n ))}\n </Collapse>\n </Box>\n );\n\n return (\n <>\n {Object.values(serviceResumptionRequests)?.length === 0 && (\n <Alert severity=\"warning\" sx={{ p: 2, fontSize: \"14px\" }}>\n No requests to show\n </Alert>\n )}\n\n {/* Render the group with the specific ticketId first if it exists */}\n {groupedRequests[ticketId] &&\n renderGroup(groupedRequests[ticketId], ticketId)}\n\n {/* Render other groups */}\n {map(groupedRequests, (requests, currentTicketId) => {\n if (currentTicketId !== ticketId.toString()) {\n return renderGroup(requests, currentTicketId);\n }\n })}\n </>\n );\n};\nexport default ServiceResumptionRequestTab;\n","import { ExpandLess, ExpandMore } from \"@mui/icons-material\";\nimport { Alert, Box, Collapse, ListItemButton } from \"@mui/material\";\nimport { groupBy, map, orderBy } from \"lodash\";\nimport { useState } from \"react\";\nimport {\n ServiceSuspensionRequest,\n ServiceSuspensionRequests,\n} from \"service/ticket/types\";\nimport { getTicketId } from \"ticket/selectors\";\nimport ServiceSuspensionRequestCard from \"./ServiceSuspensionRequestCard\";\nimport { useTypedSelector } from \"ticket/app/store\";\n\ninterface ServiceSuspensionRequestTabProps {\n serviceSuspensionRequests: ServiceSuspensionRequests;\n}\n\nconst ServiceSuspensionRequestTab: React.FC<\n ServiceSuspensionRequestTabProps\n> = ({ serviceSuspensionRequests }) => {\n const ticketId = useTypedSelector(getTicketId);\n const [openStates, setOpenStates] = useState(() => {\n let initialStates = {};\n if (serviceSuspensionRequests) {\n initialStates = serviceSuspensionRequests.reduce((acc, request) => {\n const isTicketId = request.linkedTicketIds[0] === Number(ticketId);\n\n acc[request.id] = false;\n acc[`group-${request.linkedTicketIds[0]}`] = isTicketId;\n return acc;\n }, {});\n }\n return initialStates;\n });\n\n const handleClick = (id: string) => {\n setOpenStates((prev) => ({ ...prev, [id]: !prev[id] }));\n };\n\n const groupedRequests = groupBy(\n orderBy(serviceSuspensionRequests, [\"requestedAt\"], [\"desc\"]),\n (request) => request.linkedTicketIds[0]\n );\n\n const renderGroup = (\n requests: ServiceSuspensionRequest[],\n currentTicketId\n ) => (\n <Box key={currentTicketId}>\n <ListItemButton\n onClick={() => handleClick(`group-${currentTicketId}`)}\n sx={{ fontSize: \"12px\", fontWeight: \"bold\", pb: 1, color: \"#fff\" }}\n >\n {currentTicketId === ticketId\n ? \"Requests on this Ticket\"\n : `Ticket ID: ${currentTicketId}`}\n {openStates[`group-${currentTicketId}`] ? (\n <ExpandLess />\n ) : (\n <ExpandMore />\n )}\n </ListItemButton>\n <Collapse\n in={openStates[`group-${currentTicketId}`]}\n timeout=\"auto\"\n unmountOnExit\n >\n {requests.map((request) => (\n <ServiceSuspensionRequestCard\n key={request.id}\n request={request}\n isOpen={openStates[request.id]}\n toggleOpen={() => handleClick(request.id)}\n />\n ))}\n </Collapse>\n </Box>\n );\n\n return (\n <>\n {Object.values(serviceSuspensionRequests)?.length === 0 && (\n <Alert severity=\"warning\" sx={{ p: 2, fontSize: \"14px\" }}>\n No requests to show\n </Alert>\n )}\n\n {/* Render the group with the specific ticketId first if it exists */}\n {groupedRequests[ticketId] &&\n renderGroup(groupedRequests[ticketId], ticketId)}\n\n {/* Render other groups */}\n {map(groupedRequests, (requests, currentTicketId) => {\n if (currentTicketId !== ticketId.toString()) {\n return renderGroup(requests, currentTicketId);\n }\n })}\n </>\n );\n};\n\nexport default ServiceSuspensionRequestTab;\n","import { ExpandLess, ExpandMore } from \"@mui/icons-material\";\nimport { Alert, Box, Collapse, ListItemButton } from \"@mui/material\";\nimport { groupBy, map, orderBy } from \"lodash\";\nimport { useState } from \"react\";\nimport {\n ServiceTerminationRequest,\n ServiceTerminationRequests,\n} from \"service/ticket/types\";\nimport { getTicketId } from \"ticket/selectors\";\nimport ServiceTerminationRequestCard from \"./ServiceTerminationRequestCard\";\nimport { useTypedSelector } from \"ticket/app/store\";\n\ninterface ServiceTerminationRequestTabProps {\n serviceTerminationRequests: ServiceTerminationRequests;\n}\n\nconst ServiceTerminationRequestTab: React.FC<\n ServiceTerminationRequestTabProps\n> = ({ serviceTerminationRequests }) => {\n const ticketId = useTypedSelector(getTicketId);\n const [openStates, setOpenStates] = useState(() => {\n let initialStates = {};\n if (serviceTerminationRequests) {\n initialStates = serviceTerminationRequests.reduce((acc, request) => {\n const isTicketId = request.linkedTicketIds[0] === Number(ticketId);\n\n acc[request.id] = false;\n acc[`group-${request.linkedTicketIds[0]}`] = isTicketId;\n return acc;\n }, {});\n }\n return initialStates;\n });\n\n const handleClick = (id: string) => {\n setOpenStates((prev) => ({ ...prev, [id]: !prev[id] }));\n };\n\n const groupedRequests = groupBy(\n orderBy(serviceTerminationRequests, [\"requestedAt\"], [\"desc\"]),\n (request) => request.linkedTicketIds[0].toString()\n );\n\n const renderGroup = (\n requests: ServiceTerminationRequest[],\n currentTicketId\n ) => (\n <Box key={currentTicketId}>\n <ListItemButton\n onClick={() => handleClick(`group-${currentTicketId}`)}\n sx={{ fontSize: \"12px\", fontWeight: \"bold\", pb: 1, color: \"#fff\" }}\n >\n {currentTicketId === ticketId\n ? \"Requests on this Ticket\"\n : `Ticket ID: ${currentTicketId}`}\n {openStates[`group-${currentTicketId}`] ? (\n <ExpandLess />\n ) : (\n <ExpandMore />\n )}\n </ListItemButton>\n <Collapse\n in={openStates[`group-${currentTicketId}`]}\n timeout=\"auto\"\n unmountOnExit\n >\n {requests.map((request) => (\n <ServiceTerminationRequestCard\n key={request.id}\n request={request}\n isOpen={openStates[request.id]}\n toggleOpen={() => handleClick(request.id)}\n />\n ))}\n </Collapse>\n </Box>\n );\n\n return (\n <>\n {Object.values(serviceTerminationRequests)?.length === 0 && (\n <Alert severity=\"warning\" sx={{ p: 2, fontSize: \"14px\" }}>\n No requests to show\n </Alert>\n )}\n\n {/* Render the group with the specific ticketId first if it exists */}\n {groupedRequests[ticketId] &&\n renderGroup(groupedRequests[ticketId], ticketId)}\n\n {/* Render other groups */}\n {map(groupedRequests, (requests, currentTicketId) => {\n if (currentTicketId !== ticketId.toString()) {\n return renderGroup(requests, currentTicketId);\n }\n })}\n </>\n );\n};\n\nexport default ServiceTerminationRequestTab;\n","import { ExpandLess, ExpandMore } from \"@mui/icons-material\";\nimport { Alert, Box, Collapse, ListItemButton } from \"@mui/material\";\nimport { groupBy, map, orderBy } from \"lodash\";\nimport { useState } from \"react\";\nimport { SpecChangeRequest, SpecChangeRequests } from \"service/ticket/types\";\nimport { getTicketId } from \"ticket/selectors\";\nimport SpecChangeRequestCard from \"./SpecChangeRequestCard\";\nimport { useTypedSelector } from \"ticket/app/store\";\n\ninterface SpecChangeRequestProps {\n specChangeRequests: SpecChangeRequests;\n}\n\nconst SpecChangeRequestTab: React.FC<SpecChangeRequestProps> = ({\n specChangeRequests,\n}) => {\n const ticketId = useTypedSelector(getTicketId);\n const [openStates, setOpenStates] = useState(() => {\n let initialStates = {};\n if (specChangeRequests) {\n initialStates = specChangeRequests.reduce((acc, request) => {\n const isTicketId = request.linkedTicketIds[0] === Number(ticketId);\n\n acc[request.id] = false;\n acc[`group-${request.linkedTicketIds[0]}`] = isTicketId;\n return acc;\n }, {});\n }\n return initialStates;\n });\n\n const handleClick = (id: string) => {\n setOpenStates((prevStates) => ({\n ...prevStates,\n [id]: !prevStates[id],\n }));\n };\n\n const groupedRequests = groupBy(\n orderBy(specChangeRequests, [\"requestedAt\"], [\"desc\"]),\n (request) => request?.linkedTicketIds[0]\n );\n\n const renderGroup = (requests: SpecChangeRequest[], currentTicketId) => (\n <Box key={currentTicketId}>\n <ListItemButton\n onClick={() => handleClick(`group-${currentTicketId}`)}\n sx={{ fontSize: \"12px\", fontWeight: \"bold\", pb: 1, color: \"#fff\" }}\n >\n {currentTicketId === ticketId\n ? \"Requests on this Ticket\"\n : `Ticket ID: ${currentTicketId}`}\n {openStates[`group-${currentTicketId}`] ? (\n <ExpandLess />\n ) : (\n <ExpandMore />\n )}\n </ListItemButton>\n <Collapse\n in={openStates[`group-${currentTicketId}`]}\n timeout=\"auto\"\n unmountOnExit\n >\n {requests.map((request) => (\n <SpecChangeRequestCard\n key={request.id}\n request={request}\n isOpen={openStates[request.id]}\n toggleOpen={() => handleClick(request.id)}\n />\n ))}\n </Collapse>\n </Box>\n );\n\n return (\n <>\n {Object.values(specChangeRequests)?.length === 0 && (\n <Alert severity=\"warning\" sx={{ p: 2, fontSize: \"14px\" }}>\n No requests to show\n </Alert>\n )}\n\n {/* Render the group with the specific ticketId first if it exists */}\n {groupedRequests[ticketId] &&\n renderGroup(groupedRequests[ticketId], ticketId)}\n\n {/* Render other groups */}\n {map(groupedRequests, (requests, currentTicketId) => {\n if (currentTicketId !== ticketId.toString()) {\n return renderGroup(requests, currentTicketId);\n }\n })}\n </>\n );\n};\n\nexport default SpecChangeRequestTab;\n","import { ExpandLess, ExpandMore } from \"@mui/icons-material\";\nimport { Alert, Box, Collapse, ListItemButton } from \"@mui/material\";\nimport { groupBy, map } from \"lodash\";\nimport { useState } from \"react\";\nimport { StockDeliveryRequests } from \"service/ticket/types\";\nimport StockDeliveryRequestCard from \"./StockDeliveryCard\";\n\ninterface StockDeliveryRequestTabProps {\n stockDeliveryRequests: StockDeliveryRequests;\n}\n\nconst StockDeliveryRequestTab: React.FC<StockDeliveryRequestTabProps> = ({\n stockDeliveryRequests,\n}) => {\n const [openStates, setOpenStates] = useState(() => {\n let initialStates = {};\n if (stockDeliveryRequests) {\n stockDeliveryRequests.forEach((request) => {\n initialStates[request.id] = false;\n initialStates[`group-${request.linkedTicketIds[0]}`] = false;\n });\n }\n return initialStates;\n });\n\n const handleClick = (id: string) => {\n setOpenStates((prevStates) => ({\n ...prevStates,\n [id]: !prevStates[id],\n }));\n };\n\n const groupedRequests = groupBy(stockDeliveryRequests, (request) => {\n return request?.linkedTicketIds[0];\n });\n\n return (\n <>\n {Object.values(stockDeliveryRequests).length === 0 && (\n <Alert severity=\"warning\" sx={{ p: 2, fontSize: \"14px\" }}>\n No requests to show\n </Alert>\n )}\n {map(groupedRequests, (requests, ticketId) => (\n <Box key={ticketId}>\n <ListItemButton\n onClick={() => handleClick(`group-${ticketId}`)}\n sx={{ fontSize: \"12px\", fontWeight: \"bold\", pb: 1, color: \"#fff\" }}\n >\n Ticket ID: {ticketId}{\" \"}\n {openStates[`group-${ticketId}`] ? <ExpandLess /> : <ExpandMore />}\n </ListItemButton>\n\n <Collapse\n in={openStates[`group-${ticketId}`]}\n timeout=\"auto\"\n unmountOnExit\n >\n {requests.map((request) => (\n <StockDeliveryRequestCard\n key={request.id}\n request={request}\n isOpen={openStates[request.id]}\n toggleOpen={() => handleClick(request.id)}\n />\n ))}\n </Collapse>\n </Box>\n ))}\n </>\n );\n};\n\nexport default StockDeliveryRequestTab;\n","import { ExpandLess, ExpandMore } from \"@mui/icons-material\";\nimport { Alert, Box, Collapse, ListItemButton } from \"@mui/material\";\nimport { groupBy, map, orderBy } from \"lodash\";\nimport { useState } from \"react\";\nimport {\n VisitFrequencyChangeRequest,\n VisitFrequencyChangeRequests,\n} from \"service/ticket/types\";\nimport { getTicketId } from \"ticket/selectors\";\nimport VisitFrequencyChangeRequestCard from \"./VisitFrequencyChangeRequestCard\";\nimport { useTypedSelector } from \"ticket/app/store\";\n\ninterface VisitFrequencyChangeRequestProps {\n visitFrequencyChangeRequests: VisitFrequencyChangeRequests;\n}\n\nconst VisitFrequencyChangeRequestTab: React.FC<\n VisitFrequencyChangeRequestProps\n> = ({ visitFrequencyChangeRequests }) => {\n const ticketId = useTypedSelector(getTicketId);\n const [openStates, setOpenStates] = useState(() => {\n let initialStates = {};\n if (visitFrequencyChangeRequests) {\n initialStates = visitFrequencyChangeRequests.reduce((acc, request) => {\n const isTicketId = request.linkedTicketIds[0] === Number(ticketId);\n\n acc[request.id] = false;\n acc[`group-${request.linkedTicketIds[0]}`] = isTicketId;\n return acc;\n }, {});\n }\n return initialStates;\n });\n\n const handleClick = (id: string) => {\n setOpenStates((prevStates) => ({\n ...prevStates,\n [id]: !prevStates[id],\n }));\n };\n\n const groupedRequests = groupBy(\n orderBy(visitFrequencyChangeRequests, [\"requestedAt\"], [\"desc\"]),\n (request) => request?.linkedTicketIds[0]\n );\n\n const renderGroup = (\n requests: VisitFrequencyChangeRequest[],\n currentTicketId\n ) => (\n <Box key={currentTicketId}>\n <ListItemButton\n onClick={() => handleClick(`group-${currentTicketId}`)}\n sx={{ fontSize: \"12px\", fontWeight: \"bold\", pb: 1, color: \"#fff\" }}\n >\n {currentTicketId === ticketId\n ? \"Requests on this Ticket\"\n : `Ticket ID: ${currentTicketId}`}\n {openStates[`group-${currentTicketId}`] ? (\n <ExpandLess />\n ) : (\n <ExpandMore />\n )}\n </ListItemButton>\n <Collapse\n in={openStates[`group-${currentTicketId}`]}\n timeout=\"auto\"\n unmountOnExit\n >\n {requests.map((request) => (\n <VisitFrequencyChangeRequestCard\n key={request.id}\n request={request}\n isOpen={openStates[request.id]}\n toggleOpen={() => handleClick(request.id)}\n />\n ))}\n </Collapse>\n </Box>\n );\n\n return (\n <>\n {Object.values(visitFrequencyChangeRequests)?.length === 0 && (\n <Alert severity=\"warning\" sx={{ p: 2, fontSize: \"14px\" }}>\n No requests to show\n </Alert>\n )}\n\n {/* Render the group with the specific ticketId first if it exists */}\n {groupedRequests[ticketId] &&\n renderGroup(groupedRequests[ticketId], ticketId)}\n\n {/* Render other groups */}\n {map(groupedRequests, (requests, currentTicketId) => {\n if (currentTicketId !== ticketId.toString()) {\n return renderGroup(requests, currentTicketId);\n }\n })}\n </>\n );\n};\n\nexport default VisitFrequencyChangeRequestTab;\n","import {\n Box,\n Collapse,\n IconButton,\n Link,\n TableRow,\n Typography,\n} from \"@mui/material\";\nimport { useState } from \"react\";\nimport ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport { useBinFetch, useVendorServiceMappingsFetch } from \"sharedUtils\";\nimport VisitBoxTable, { StyledCell } from \"./VisitBoxTable\";\nimport { BinDotMissing } from \"service/BinDot\";\n\nconst InvoiceCollapse = ({ visit }) => {\n const [open, setOpen] = useState(false);\n const vendorServiceMappings = useVendorServiceMappingsFetch(visit?.vendorId);\n\n return (\n <>\n <Box\n sx={{\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n }}\n >\n <Typography>INVOICES</Typography>\n <IconButton\n disableRipple\n onClick={() => setOpen(!open)}\n sx={{ \"& .MuiSvgIcon-root\": { fontSize: \"35px\" } }}\n >\n {open ? <ExpandLessIcon /> : <ExpandMoreIcon />}\n </IconButton>\n </Box>\n <Collapse in={open} sx={{ m: -2, my: 0 }}>\n <VendorInvoiceTable\n vendorId={visit?.vendorId}\n invoiceSources={visit?.invoiceSources}\n vendorServiceMappings={vendorServiceMappings}\n />\n </Collapse>\n </>\n );\n};\n\nexport const VendorInvoiceTable = ({\n invoiceSources,\n vendorServiceMappings,\n vendorId,\n}) => {\n const { binTypes, binGroups } = useBinFetch();\n const headers = [\"type\", \"qty\", \"code\", \"name\", \"VLC\", \"INVOICE\"];\n const rows = invoiceSources.flatMap(\n ({ number, uuid, vendorLocationCode, vendorSpecs }) =>\n vendorSpecs.map(({ qty, vsc }, specIndex) => {\n const code =\n vendorServiceMappings && vendorServiceMappings[vsc]\n ? vendorServiceMappings[vsc]\n : vsc;\n\n const binType = binTypes[code] || {};\n const binGroup = binGroups[binType?.binGroupId];\n\n return (\n <TableRow key={`${uuid}-${specIndex}`}>\n <StyledCell>\n {binType?.imageUrl ? (\n <img\n src={binType?.imageUrl}\n alt={binType?.name}\n style={{ marginRight: \"10px\", width: \"30px\", height: \"30px\" }}\n />\n ) : (\n <BinDotMissing color=\"#fff\" />\n )}\n </StyledCell>\n <StyledCell>{qty}</StyledCell>\n <StyledCell>{code}</StyledCell>\n <StyledCell>{binType.name}</StyledCell>\n <StyledCell>\n <Link\n target=\"_blank\"\n href={`/admin/vendors/${vendorId}/location_mappings/${encodeURIComponent(\n vendorLocationCode\n )}`}\n underline=\"none\"\n sx={{ color: \"#3BAFDA !important\" }}\n >\n {vendorLocationCode}\n </Link>\n </StyledCell>\n <StyledCell>\n <Link\n target=\"_blank\"\n href={`/admin/vendor_invoices/${uuid}`}\n underline=\"none\"\n sx={{ color: \"#3BAFDA !important\" }}\n >\n {number}\n </Link>\n </StyledCell>\n </TableRow>\n );\n })\n );\n return <VisitBoxTable rows={rows} headers={headers} />;\n};\n\nexport default InvoiceCollapse;\n","import { Alert, Box } from \"@mui/material\";\nimport _ from \"lodash\";\nimport moment from \"moment\";\nimport { FC, useEffect, useRef, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport Error from \"service-calendar/components/Error\";\nimport StatusBar from \"service-calendar/components/StatusBar\";\nimport Week from \"service-calendar/components/Week\";\nimport { fetchAtDate, fetchMoreData } from \"service-calendar/operations\";\nimport Loader from \"../../components/shared/Loader\";\n\ninterface CalendarProps {\n calendarApi: any;\n onDayClick: any;\n fetchMore?: any;\n fetchInit?: any;\n selectedDay: string;\n}\n\nlet Calendar: FC<CalendarProps> = ({\n calendarApi,\n onDayClick,\n fetchMore,\n fetchInit,\n selectedDay,\n}) => {\n const {\n availableData,\n fetchingCurrent,\n fetchingPast,\n fetchingFuture,\n errorPast,\n errorFuture,\n } = calendarApi;\n const { startDate, endDate, visits } = availableData;\n const scrollRef = useRef<HTMLDivElement>();\n const todayCalendarRef = useRef<HTMLHRElement>();\n\n let weekStart = selectedDay\n ? moment(selectedDay).isoWeekday(1)\n : moment().isoWeekday(1);\n\n const [previousScrollPosition, setPreviousScrollPosition] = useState(null);\n const [selectedDayWeek, setSelectedDayWeek] = useState(selectedDay);\n\n const weeks = [];\n\n const onScroll = () => {\n if (scrollRef.current) {\n const { scrollTop, scrollHeight, clientHeight } = scrollRef.current;\n const scrollBottom = scrollHeight - scrollTop;\n if (scrollBottom < 2 * clientHeight) {\n fetchMoreDataFromServer(\"forward\");\n } else if (scrollTop < 200) {\n setPreviousScrollPosition(weeks[0].key);\n fetchMoreDataFromServer(\"back\");\n } else {\n setPreviousScrollPosition(null);\n }\n }\n };\n\n const jumpToToday = () => {\n if (todayCalendarRef.current) {\n const { top, bottom } = todayCalendarRef.current.getBoundingClientRect();\n const isVisible = top >= 0 && bottom <= window.innerHeight;\n\n if (!isVisible) {\n todayCalendarRef.current.scrollIntoView({\n behavior: \"smooth\",\n block: \"center\",\n });\n }\n }\n };\n\n const fetchMoreDataFromServer = (direction) => {\n fetchMore(direction);\n };\n\n let date = moment(startDate).isoWeekday(1);\n while (date < moment(endDate)) {\n const selected = previousScrollPosition\n ? moment(previousScrollPosition)\n .subtract(7, \"d\")\n .isoWeekday(1)\n .format(\"YYYYMMDD\") === date.format(\"YYYYMMDD\")\n : date.format(\"YYYYMMDD\") === weekStart.format(\"YYYYMMDD\");\n weeks.push(\n <Week\n key={date.format(\"YYYY-MM-DD\")}\n start={date}\n index={date.format(\"YYYY-MM-DD\")}\n selected={selected}\n visits={visits}\n todayRef={todayCalendarRef}\n onDayClick={onDayClick}\n selectedDay={selectedDayWeek}\n setSelectedDay={setSelectedDayWeek}\n />\n );\n date = moment(date).add(7, \"days\");\n }\n // Fetch specific day data only once\n useEffect(() => {\n if (availableData.startDate === null && !fetchingCurrent) {\n fetchInit(selectedDay);\n }\n }, []);\n\n if (availableData.startDate === null || fetchingCurrent) {\n // fetchingCurrent\n return <Loader message=\"Loading...\" />;\n }\n\n return (\n <div className=\"anenta-calendar\">\n <StatusBar />\n <div id=\"calendar-holder\">\n <div id=\"calendar\">\n {!availableData.noData && (\n <div className=\"calendar-week first-week\">\n <div className=\"calendar-week-label\" />\n {_.range(7).map((index) => {\n const day = moment(date).add(index, \"days\");\n return (\n <div key={index} className=\"calendar-day name\">\n <div className=\"day-label\">{day.format(\"ddd\")}</div>\n </div>\n );\n })}\n </div>\n )}\n {availableData.noData ? (\n <Box padding={2}>\n <Alert severity=\"warning\" sx={{ p: 1, fontSize: \"14px\" }}>\n There is no visit data available at this time\n </Alert>\n </Box>\n ) : (\n <div\n id=\"calendar-scroll\"\n onScroll={() => onScroll()}\n ref={scrollRef}\n >\n {fetchingPast && <DataLoader />}\n {errorPast && <DataError />}\n {weeks}\n {errorFuture && <DataError />}\n {fetchingFuture && <DataLoader />}\n </div>\n )}\n {todayCalendarRef.current && (\n <button className=\"jump-to-today\" onClick={() => jumpToToday()}>\n Jump to Today\n </button>\n )}\n </div>\n </div>\n </div>\n );\n};\n\nconst DataLoader = () => (\n <div className=\"calendar-week\">\n <div className=\"calendar-week-label\" />\n <div className=\"calendar-day calendar-day-loader\">\n <Loader />\n </div>\n </div>\n);\n\nconst DataError = () => (\n <div className=\"calendar-week\">\n <div className=\"calendar-week-label\" />\n <div className=\"calendar-day calendar-day-loader\">\n <Error />\n </div>\n </div>\n);\n\nconst mapStateToProps = () => {\n return {};\n};\n\nconst mapDispatchToProps = (dispatch) => {\n return {\n fetchInit: (date) => {\n dispatch(fetchAtDate(date));\n },\n fetchMore: (direction) => {\n dispatch(fetchMoreData(direction));\n },\n //fetchDetailsData: (date) => {\n //dispatch(fetchDetails(date));\n //},\n };\n};\n\nCalendar = connect(mapStateToProps, mapDispatchToProps)(Calendar);\n\nexport default Calendar;\n","import React, { useRef, useEffect, useState } from \"react\";\nimport PropTypes from \"prop-types\";\nimport moment from \"moment\";\nimport VisitTile from \"./VisitTile\";\nimport { useBinGroupFetch } from \"sharedUtils\";\nimport { STATUS_COLORS } from \"service/forms/common/VisitBoxButtons\";\nimport { useTypedSelector } from \"ticket/app/store\";\n\nvar Week = ({\n start,\n index,\n onDayClick,\n selected,\n visits,\n todayRef,\n selectedDay,\n setSelectedDay,\n}) => {\n const calendarApi = useTypedSelector((state) => state.calendarApi);\n\n const [dateToDisplay, setDateToDisplay] = useState(null);\n const selectedRef = useRef();\n\n useEffect(() => {\n // Directly find if the week contains the start of a month\n for (let day = 0; day < 7; day++) {\n const checkDate = moment(start).add(day, \"days\");\n if (checkDate.date() === 1) {\n setDateToDisplay(checkDate);\n break; // Found the start of a month, no need to continue\n }\n }\n }, [start]);\n\n useEffect(() => {\n if (selectedRef.current) {\n selectedRef.current.scrollIntoView({\n // behavior: \"smooth\",\n block: \"center\",\n });\n }\n }, []);\n\n return (\n <div\n className=\"calendar-week\"\n ref={selected ? selectedRef : null}\n id={`date-${start.format(\"YYYY-MM-DD\")}`}\n >\n <div className=\"calendar-week-label\">\n {dateToDisplay && dateToDisplay.format(\"MMMM YYYY\")}\n </div>\n {[...Array(7).keys()].map(function (_x, index) {\n const day = moment(start).add(index, \"days\");\n const isSelectedDay = day.format(\"YYYY-MM-DD\") === selectedDay;\n return (\n <div\n key={index}\n className=\"calendar-day\"\n ref={moment().isSame(day, \"d\") ? todayRef : null}\n onClick={() => {\n setSelectedDay(day.format(\"YYYY-MM-DD\"));\n onDayClick(day, \"visitDetails\");\n }}\n style={{\n ...(moment().isSame(day, \"day\") && {\n boxShadow: \"0px 0px 15px 2px #fff\",\n backgroundColor: \"#e6f7ff\",\n animation: \"pulse 2s infinite\",\n fontWeight: \"bold\",\n fontSize: \"1.2em\",\n }),\n ...(isSelectedDay && {\n border: \"2px solid #6B81BF\",\n backgroundColor: \"#2E323F\",\n }),\n }}\n >\n <div className=\"day-label\">\n {day.format(\"D\")}\n {moment().isSame(day, \"d\") && (\n <span className=\"today\">Today</span>\n )}\n </div>\n {moment(day).format(\"YYYY-MM-DD\") in visits &&\n visits[day.format(\"YYYY-MM-DD\")].map((visit, index) => (\n <VisitTile key={index} visit={visit} />\n ))}\n </div>\n );\n })}\n </div>\n );\n};\n\nexport default Week;\n","import { FC, memo } from \"react\";\nimport BinDot from \"service/BinDot\";\nimport { groupBinsByGroup } from \"../utils\";\nimport { useBinFetch, useVendorServiceMappingsFetch } from \"sharedUtils\";\nimport { Box, Typography } from \"@mui/material\";\nimport {\n HWCNIcon,\n InvoiceIcon,\n ServiceIcon,\n} from \"service/forms/common/VisitIcons\";\nimport { isEmpty } from \"lodash\";\n\ninterface VisitTileProps {\n visit: any;\n}\n\nconst VisitTile: FC<VisitTileProps> = memo(({ visit }) => {\n const { status, vendorServiceCodes } = visit;\n\n const { binTypes, binGroups, isLoading: loading } = useBinFetch();\n\n const vendorServiceMappings = useVendorServiceMappingsFetch(\n visit.vendorId,\n vendorServiceCodes\n );\n\n const grouped = loading\n ? []\n : groupBinsByGroup(vendorServiceCodes, vendorServiceMappings, binTypes);\n\n return (\n <Box\n className={`visit visit-${status}`}\n sx={{\n display: \"flex\",\n flexDirection: \"column\",\n height: \"100%\",\n \"& .MuiTypography-root\": {\n fontSize: \"12px\",\n },\n }}\n >\n <Box>\n <Typography fontWeight=\"bold\" sx={{ color: \"#fff\" }}>\n {visit?.vendorName}\n </Typography>\n <Box sx={{ display: \"flex\", justifyContent: \"space-between\" }}>\n <Typography sx={{ color: \"grey\", fontSize: \"10px !importat\" }}>\n {visit?.title}\n </Typography>\n <Box>\n {visit?.hasInvoice && <InvoiceIcon />}\n {visit?.hasHwcn && <HWCNIcon />}\n {!isEmpty(visit?.serviceReportSources) && <ServiceIcon />}\n </Box>\n </Box>\n </Box>\n\n {grouped && (\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"2px\",\n flexWrap: \"wrap\",\n }}\n >\n {Object.entries(grouped).map(([groupId], index) => (\n <BinDot\n key={index}\n binGroup={binGroups[groupId]}\n tooltipName={true}\n tooltipPlace=\"top\"\n />\n ))}\n </Box>\n )}\n </Box>\n );\n});\n\nexport default VisitTile;\n","import { Grid } from \"@mui/material\";\nimport { useGetLocationServiceVendorsQuery } from \"api/services\";\nimport { map } from \"lodash\";\nimport LocationServicesVendorBox from \"service/LocationServicesVendorBox\";\nimport {\n StyledTab,\n StyledTabs,\n TabPanel,\n} from \"service/report-request-box/MainTabs\";\nimport VisitDetails from \"service/VisitDetails\";\nimport { formatDate } from \"sharedUtils\";\nimport AppContext from \"ticket/AppContext\";\n\nlet SideBar = ({\n locationId,\n detailsDate,\n sideTab,\n onSelectSideTab,\n onSelectDate,\n}) => {\n const { data: locationServiceVendors } =\n useGetLocationServiceVendorsQuery(locationId);\n\n const tabMap = {\n services: 0,\n visitDetails: 1,\n };\n\n const onSelectAction = () => undefined;\n\n return (\n <AppContext.Provider\n value={{\n onSelectAction,\n selectedContainer: undefined,\n setSelectedContainer: (_x) => {},\n formType: \"all\",\n setFormType: (_x) => {},\n cardTab: \"request\",\n setCardTab: (_x) => {},\n showTaggingForm: false,\n setShowTaggingForm: (_x) => {},\n highlightedIds: [],\n setHighlightedIds: (_x) => {},\n currentTicketId: \"\",\n onSelectDate: onSelectDate,\n }}\n >\n <StyledTabs\n value={tabMap[sideTab]}\n onChange={(_e, newValue) => {\n const selectedTab = Object.keys(tabMap).find(\n (key) => tabMap[key] === newValue\n );\n onSelectSideTab(selectedTab);\n }}\n >\n <StyledTab label=\"Services\" />\n <StyledTab\n label={formatDate(detailsDate)}\n sx={{ display: detailsDate ? \"block\" : \"none\" }}\n />\n </StyledTabs>\n <TabPanel value={tabMap[sideTab]} index={tabMap.services}>\n <Grid container spacing={1}>\n {map(locationServiceVendors, (locationServiceVendor) => {\n return (\n <Grid item sx={{ width: \"100%\", mb: 1 }}>\n <LocationServicesVendorBox\n initialOpenState={undefined}\n onSelectAction={onSelectAction}\n key={locationServiceVendor.vendor.id}\n {...locationServiceVendor}\n />\n </Grid>\n );\n })}\n </Grid>\n </TabPanel>\n <TabPanel value={tabMap[sideTab]} index={tabMap.visitDetails}>\n <VisitDetails\n date={detailsDate}\n onBack={() => undefined}\n locationServiceVendors={locationServiceVendors}\n />\n </TabPanel>\n </AppContext.Provider>\n );\n};\nexport default SideBar;\n","import ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport LinkIcon from \"@mui/icons-material/Link\";\nimport {\n Box,\n Chip,\n Collapse,\n IconButton,\n Link,\n TableCell,\n TableRow,\n Tooltip,\n Typography,\n} from \"@mui/material\";\nimport dayjs from \"dayjs\";\nimport relativeTime from \"dayjs/plugin/relativeTime\";\nimport { startCase, uniq } from \"lodash\";\nimport { useContext, useEffect, useRef, useState } from \"react\";\nimport { useHistory, useLocation } from \"react-router-dom\";\nimport TimeAgo from \"react-timeago\";\n\n// import RequestsCards from \"service/report-request-box/RequestsCards\";\nimport { useTheme } from '@mui/material/styles';\n\nimport CustomTable from \"service/forms/common/CustomTable\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport { formatDate } from \"sharedUtils\";\nimport AppContext from \"ticket/AppContext\";\nimport { getLocationId } from \"ticket/selectors\";\n\n\ndayjs.extend(relativeTime);\n\nconst OutstandingRequestsCollapsible = ({ service }) => {\n const theme = useTheme();\n const containerRef = useRef(null);\n const outstandingRequestsRef = useRef(null);\n const typesContainerRef = useRef(null);\n const { requests } = service;\n\n const [open, setOpen] = useState(false);\n const [hasOverflow, setHasOverflow] = useState(false);\n const [filter, setFilter] = useState(\"all\");\n\n const headers = [\"Type\", \"Status\", \"Ticket ID\", \"Sent\", \"\"];\n\n const requestsList = uniq(requests?.map((r) => r.type));\n\n const filteredRequests = requests.filter(\n (request) => filter === \"all\" || request.status === filter,\n );\n\n useEffect(() => {\n const checkOverflow = () => {\n if (\n containerRef.current &&\n outstandingRequestsRef.current &&\n typesContainerRef.current\n ) {\n const containerWidth = containerRef.current.clientWidth;\n const outstandingRequestsWidth =\n outstandingRequestsRef.current.offsetWidth;\n const typesWidth = Array.from(\n typesContainerRef.current.children,\n ).reduce((total, child: any) => total + child.offsetWidth, 0);\n\n const totalContentWidth = outstandingRequestsWidth + typesWidth + 80;\n\n setHasOverflow(totalContentWidth > containerWidth);\n }\n };\n\n checkOverflow();\n window.addEventListener(\"resize\", checkOverflow);\n return () => window.removeEventListener(\"resize\", checkOverflow);\n }, [requestsList]);\n\n const handleFilterChange = (newFilter) => {\n setFilter(newFilter === filter ? \"all\" : newFilter);\n };\n\n return (\n <>\n {/* Remove this when changing the table */}\n <Box\n ref={containerRef}\n sx={{\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n minHeight: \"40px\",\n // background: \"#1C365B\",\n // color: \"#fff\",\n // mx: -2,\n // minHeight: \"43px\",\n }}\n >\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n\n {open && (\n <Box sx={{ display: \"flex\", gap: 1, mr: 2 }}>\n {[\"confirmed\", \"cancelled\", \"unconfirmed\"].map((status) => (\n <Chip\n key={status}\n label={\n status === \"awaiting_response\"\n ? \"Awaiting response\"\n : startCase(status)\n }\n onClick={() => handleFilterChange(status)}\n variant={filter === status ? \"filled\" : \"outlined\"}\n color={filter === status ? \"warning\" : \"default\"}\n size=\"small\"\n sx={{ cursor: \"pointer\", color: \"#fff\", }}\n />\n ))}\n </Box>\n )}\n\n <Typography\n ref={outstandingRequestsRef}\n sx={{\n fontSize: \"12px\",\n fontWeight: \"600\",\n color: \"#fff\",\n mr: 2,\n whiteSpace: \"nowrap\",\n }}\n >\n {filteredRequests.length}{\" \"}\n {getLabel(filter, filteredRequests.length)}\n </Typography>\n\n {!open && (\n <>\n <Box\n ref={typesContainerRef}\n sx={{\n display: \"flex\",\n overflow: \"hidden\",\n }}\n >\n {requestsList?.map((r: string) => (\n <Typography\n key={r}\n sx={{\n fontSize: \"12px\",\n whiteSpace: \"nowrap\",\n color: \"#4FC1E9\",\n }}\n >\n {startCase(r)}\n </Typography>\n ))}\n </Box>\n {hasOverflow && (\n <Tooltip\n arrow\n placement=\"top\"\n title={requestsList?.map(startCase).join(\", \")}\n >\n <Typography sx={{ fontSize: \"12px\", marginLeft: \"4px\" }}>\n ...\n </Typography>\n </Tooltip>\n )}\n </>\n )}\n </Box>\n {requests.length > 0 && (\n <IconButton\n disableRipple\n onClick={() => setOpen(!open)}\n sx={{ color: \"#fff\"}}\n >\n {open ? <ExpandLessIcon /> : <ExpandMoreIcon />}\n </IconButton>\n )}\n </Box>\n\n {filteredRequests?.length > 0 && (\n <Collapse\n in={open}\n timeout=\"auto\"\n unmountOnExit\n >\n <CustomTable\n headers={headers}\n rows={<RequestRows requests={filteredRequests} />}\n />\n {/* <RequestsCards requests={filteredRequests} /> */}\n </Collapse>\n )}\n </>\n );\n};\n\nexport default OutstandingRequestsCollapsible;\n\nconst RequestRows = ({ requests }) => {\n const history = useHistory();\n const location = useLocation();\n const locationId = getLocationId();\n const { currentTicketId, highlightedIds, setHighlightedIds } =\n useContext(AppContext);\n\n const toggleHighlightedReplies = (request) => {\n const searchParams = new URLSearchParams(location.search);\n const currentHighlights = searchParams.getAll(\"highlight\").map(Number);\n\n if (String(request.linkedTicketIds[0]) === currentTicketId) {\n // We're on the same ticket\n const newHighlights = request?.replyIds?.every((id) =>\n currentHighlights?.includes(id),\n )\n ? currentHighlights.filter((id) => !request?.replyIds?.includes(id)) // Remove all if all are currently highlighted\n : Array.from(new Set([...currentHighlights, ...request.replyIds])); // Add any that aren't already highlighted\n\n if (newHighlights.length > 0) {\n searchParams.delete(\"highlight\"); // Clear existing highlights\n newHighlights.forEach((id) => searchParams.append(\"highlight\", id));\n } else {\n searchParams.delete(\"highlight\");\n }\n\n setHighlightedIds(newHighlights);\n\n // Update the URL and push to history\n history.replace({\n pathname: location.pathname,\n search: searchParams.toString(),\n });\n } else {\n // We are not on the same ticket\n const ticketId = request?.linkedTicketIds[0];\n const queryParam = `highlight=${request?.replyIds.join(\"&highlight=\")}`;\n const newTabUrl = `/admin/locations/${locationId}/app#/tickets/${ticketId}?${queryParam}`;\n window.open(newTabUrl, \"_blank\");\n }\n };\n\n const handleLinkClick = (e, isInCurrentPath) => {\n if (isInCurrentPath) {\n e.preventDefault();\n }\n };\n\n return requests.map((request, index) => {\n // highlight is a string url\n const isSelected =\n request?.replyIds.length > 0 &&\n request?.replyIds?.every((id) => highlightedIds?.includes(String(id)));\n\n const isInCurrentPath =\n currentTicketId === String(request?.linkedTicketIds[0]);\n\n const isLastRow = index === requests.length - 1;\n\n return (\n <TableRow\n key={request.id}\n sx={{\n color: \"#fff\",\n ...(isLastRow && {\n \"& .MuiTableCell-root\": {\n borderBottom: \"none\",\n },\n }),\n }}\n >\n <TableCell>\n <Typography noWrap sx={{ fontSize: \"11px\" }}>\n {startCase(request.type)}\n </Typography>\n </TableCell>\n <TableCell>\n <Typography noWrap sx={{ fontSize: \"11px\" }}>\n {startCase(request.status)}\n </Typography>\n </TableCell>\n\n <TableCell>\n <Link\n target=\"_blank\"\n href={`/admin/tickets/${request.linkedTicketIds}/app`}\n onClick={(e) => handleLinkClick(e, isInCurrentPath)}\n underline=\"none\"\n sx={{\n color: isInCurrentPath ? \"#fff\" : \"#4FC1E9 !important\",\n \"&:hover\": {\n ...(isInCurrentPath ? { color: \"#fff\" } : {}),\n },\n }}\n >\n {isInCurrentPath ? \"This ticket\" : `#${request.linkedTicketIds[0]}`}\n </Link>\n </TableCell>\n <TableCell>\n <Tooltip title={formatDate(request.requestedAt)} arrow>\n <span>\n <TimeChip date={request.requestedAt} />\n </span>\n </Tooltip>\n </TableCell>\n <TableCell>\n <IconButton onClick={() => toggleHighlightedReplies(request)}>\n <LinkIcon\n sx={{\n color: isSelected ? \"#4FC1E9\" : \"#fff\",\n }}\n />\n </IconButton>\n </TableCell>\n <DebugButton data={request} />\n </TableRow>\n );\n });\n};\n\nexport const TimeChip = ({ date }) => {\n const now = dayjs();\n const requestDate = dayjs(date);\n const diffInDays = now.diff(requestDate, \"day\");\n const isOverTwoDays = diffInDays > 2;\n\n if (isOverTwoDays) {\n return (\n <Chip\n label={<TimeAgo date={date} />}\n color=\"error\"\n sx={{ fontSize: \"11px\" }}\n />\n );\n }\n\n return <TimeAgo date={date} />;\n};\n\nconst getLabel = (filter, count) => {\n const getSingularPlural = (singular, plural) =>\n count === 1 ? singular : plural;\n\n switch (filter) {\n case \"all\":\n return getSingularPlural(\"Request\", \"Requests\");\n case \"confirmed\":\n return getSingularPlural(\"Confirmed Request\", \"Confirmed Requests\");\n case \"cancelled\":\n return getSingularPlural(\"Canceled Request\", \"Canceled Requests\");\n case \"awaiting_response\":\n return getSingularPlural(\"Awaiting Response\", \"Awaiting Responses\");\n default:\n return \"Unknown\";\n }\n};\n","import { api } from \"./apiConfig\";\nimport dayjs from \"dayjs\";\n\n// Represents the detailed information about a visit\ninterface VisitDetail {\n status: string;\n date: string;\n title: string;\n vendorId: number;\n vendorLocationCodes: string[];\n vendorServiceCodes: string[];\n rescheduledFromDates: string[];\n rescheduledToDates: string[];\n planSources: string[];\n vendorName: string;\n planSourcesMap: {\n [key: string]: {\n type: string;\n messageGid: string;\n receivedOn: string;\n vendorLocationCode: string;\n };\n };\n type: string;\n}\n\n// Represents the structure of the response, mapping dates to arrays of visit details\ninterface VisitsResponse {\n visits: {\n [date: string]: VisitDetail[];\n };\n}\n\n// Define a type for the query parameters\ninterface GetLocationVisitsParams {\n locationId: string;\n date: string;\n [key: string]: any; // For additional dynamic parameters\n}\n\nexport const calendarApi = api.injectEndpoints({\n endpoints: (build) => ({\n getLocationVisits: build.query<VisitsResponse, GetLocationVisitsParams>({\n query: ({ locationId, date }) => {\n // For future use with vendorId\n\n const isoDate = dayjs(date).format(\"YYYY-MM-DD\");\n return {\n url: `admin/locations/${locationId}/calendar/details/${isoDate}.json`,\n };\n },\n providesTags: [\"Visit\"],\n }),\n }),\n});\n\nexport const { useGetLocationVisitsQuery } = calendarApi;\n\nexport const {\n endpoints: { getLocationVisits },\n} = calendarApi;\n\nexport default calendarApi;\n","import { useCallback, useState } from \"react\";\n\nexport const useDrawer = () => {\n const [isDrawerOpen, setIsDrawerOpen] = useState(false);\n const [activeChannel, setActiveChannel] = useState(\"\");\n\n const toggleDrawer = useCallback(() => setIsDrawerOpen((prev) => !prev), []);\n const closeDrawer = useCallback(() => {\n setIsDrawerOpen(false);\n setActiveChannel(null);\n }, []);\n\n const toggleDrawerAndSetChannel = useCallback(\n (newChannel) => {\n if (activeChannel === newChannel && isDrawerOpen) {\n closeDrawer();\n } else {\n toggleDrawer();\n setActiveChannel(newChannel);\n setIsDrawerOpen(true);\n }\n },\n [activeChannel, isDrawerOpen, closeDrawer, toggleDrawer]\n );\n\n return {\n isDrawerOpen,\n closeDrawer,\n activeChannel,\n toggleDrawerAndSetChannel,\n setIsDrawerOpen,\n setActiveChannel,\n };\n};\n","import { Box, Typography } from \"@mui/material\";\nimport { useContext, useEffect, useState } from \"react\";\nimport { useParams } from \"react-router-dom\";\nimport FormSkeleton from \"service/forms/common/FormSkeleton\";\nimport NewMessageActionForm from \"service/forms/NewMessageActionForm\";\nimport { TabPanel } from \"service/report-request-box/MainTabs\";\nimport AppContext from \"ticket/AppContext\";\nimport { getTicketById } from \"ticket/selectors\";\nimport ChannelFooter from \"./channel-footer/ChannelFooter\";\nimport ResponseForm from \"./channel-footer/form/ResponseForm\";\nimport ChannelHeader from \"./channel-header/ChannelHeader\";\nimport NoVendorSelected from \"./NoVendorSelected\";\nimport SortedReplies from \"./response-card/SortedReplies\";\n\n\nconst TicketTab = ({\n isGloballyLoading,\n appTab,\n showOverview,\n setShowOverview,\n openFormUrl,\n setOpenFormUrl,\n setShowFooterButtons,\n onSelectAction,\n showFooterButtons,\n}) => {\n const { ticketId } = useParams<{ ticketId: string }>();\n const ticket = getTicketById(ticketId);\n const replies = ticket?.replies;\n\n const { toggleDrawerAndSetChannel, closeDrawer, setActiveChannel } =\n useContext(AppContext);\n\n const noVendorSelected = ticket?.vendor?.id === null;\n\n const [heightInVh, setHeightInVh] = useState(0);\n const [openFormId, setOpenFormId] = useState(null);\n const [showDrawer, setShowDrawer] = useState(true);\n\n const onClickShowOverview = () => {\n setShowOverview(!showOverview);\n const el = document.getElementById(\"service-box\");\n\n // Ensure the element exists\n if (el) {\n // Get the viewport height\n const vh = window.innerHeight || document.documentElement.clientHeight;\n\n // Calculate the height of the element in vh\n const newHeight = (el.offsetHeight / vh) * 100;\n setHeightInVh(newHeight);\n } else {\n console.log(\"Element not found.\");\n // Handle the case where the element doesn't exist\n return null;\n }\n };\n\n const handleToggleButton = (channel) => {\n setOpenFormUrl(null);\n setOpenFormId(null);\n toggleDrawerAndSetChannel(channel);\n };\n\n const onCloseForm = () => {\n setOpenFormUrl(null);\n closeDrawer();\n setActiveChannel(null);\n setShowFooterButtons(true);\n };\n\n const currentForm = openFormUrl ? (\n <NewMessageActionForm\n key={openFormUrl}\n formUrl={openFormUrl}\n onClose={onCloseForm}\n stakeholderContacts={ticket?.stakeholderContacts}\n setOpenFormUrl={setOpenFormUrl}\n />\n ) : (\n <ResponseForm stakeholderContacts={ticket?.stakeholderContacts} />\n );\n\n useEffect(() => {\n const el = document.getElementById(\"service-box\");\n\n if (!el) return;\n\n const calculateAndSetHeight = () => {\n if (showOverview) {\n const vh = window.innerHeight || document.documentElement.clientHeight;\n const newHeightInVh = (el.offsetHeight / vh) * 100;\n setHeightInVh(newHeightInVh);\n }\n };\n\n const observer = new ResizeObserver((entries) => {\n for (let _entry of entries) {\n calculateAndSetHeight();\n }\n });\n\n observer.observe(el);\n\n return () => observer.disconnect();\n }, [showOverview]);\n\n return (\n <>\n {ticket && false && (\n <Box\n sx={{\n background: \"#1F2328\",\n color: \"#fff\",\n p: 1,\n mb: 1,\n position: \"sticky\",\n top: \"126px\",\n zIndex: 1,\n }}\n >\n <Typography fontSize={12}>\n Ticket Id #{ticket.id} - {ticket.subject}\n </Typography>\n </Box>\n )}\n\n <TabPanel value={appTab} index={0}>\n {isGloballyLoading && <FormSkeleton />}\n <Box\n sx={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n width: \"100%\",\n height: \"100%\",\n position: \"relative\",\n visibility: isGloballyLoading ? \"hidden\" : \"visible\",\n }}\n >\n <ChannelHeader\n showOverview={showOverview}\n onClickShowOverview={onClickShowOverview}\n appTab={appTab}\n />\n\n {noVendorSelected && <NoVendorSelected />}\n\n <Box\n className=\"replies-container\"\n sx={{\n width: \"100%\",\n ...(showOverview && {\n height: heightInVh > 50 ? `${heightInVh}vh` : \"50vh\",\n overflow: \"auto\",\n scrollbarWidth: \"thin\",\n scrollbarColor: \"#656567 #2d323a\",\n \"&::-webkit-scrollbar\": {\n width: \"8px\",\n },\n \"&::-webkit-scrollbar-track\": {\n background: \"#2d323a\",\n },\n \"&::-webkit-scrollbar-thumb\": {\n backgroundColor: \"#656567\",\n borderRadius: \"4px\",\n },\n }),\n }}\n >\n <SortedReplies\n replies={replies}\n openFormUrl={openFormUrl}\n setOpenFormUrl={setOpenFormUrl}\n openFormId={openFormId}\n setOpenFormId={setOpenFormId}\n setShowFooterButtons={setShowFooterButtons}\n onCloseForm={onCloseForm}\n setShowDrawer={setShowDrawer}\n />\n </Box>\n\n <ChannelFooter\n openFormUrl={openFormUrl}\n currentForm={currentForm}\n handleToggleButton={handleToggleButton}\n onSelectAction={onSelectAction}\n showFooterButtons={showFooterButtons}\n showDrawer={showDrawer}\n />\n </Box>\n </TabPanel>\n </>\n );\n};\n\nexport default TicketTab;\n","import { useMemo, useState } from \"react\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport PropTypes from \"prop-types\";\nimport \"react-infinite-calendar/styles.css\";\nimport \"./styles.scss\";\nimport { DaysOfWeekSelect, ModelErrors } from \"sharedComponents\";\nimport { Alert, Grid, Stack, Typography } from \"@mui/material\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport dayjs from \"dayjs\";\nimport _ from \"lodash\";\nimport NotesSection from \"./common/NotesSection\";\nimport AssumedCancelledVisits from \"./common/AssumedCancelledVisits\";\nimport Debugger from \"./Debugger\";\n\nconst getPotentialCancellationDates = (nextVisits, date) => {\n return date\n ? _(nextVisits)\n .reject({ status: \"cancelled\" })\n .map(\"date\")\n .filter((d) => dayjs(d) < dayjs(date))\n .value()\n : [];\n};\n\nvar ConfirmNextRoutineVisitForm = ({ form, context, errors, onSetForm }) => {\n const [open, setOpen] = useState(false);\n\n var { date, visitDayIds } = form;\n var {\n nextVisits,\n serviceName,\n expectedVisitPlanName,\n expectedVisitsPerWeek,\n } = context;\n\n const potentialCancellationDates = useMemo(\n () => getPotentialCancellationDates(nextVisits, date),\n [nextVisits, date]\n );\n\n const [selectedDates, setSelectedDates] = useState(\n potentialCancellationDates\n );\n\n const visitDays = nextVisits?.map((visit) => {\n return { ...visit, date: dayjs(visit.date) };\n });\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={3}\n sx={{ \"& .MuiTypography-root\": { fontWeight: \"bold\" } }}\n >\n <Typography variant=\"h5\">\n Confirm next {expectedVisitPlanName} visit\n </Typography>\n <Typography color=\"grey\" variant=\"h6\">\n / {serviceName}\n </Typography>\n </Stack>\n <Grid container spacing={2}>\n <Grid item container xs={4} spacing={2}>\n <Grid item xs>\n <Typography variant=\"h6\" fontWeight=\"bold\" noWrap>\n Next {expectedVisitPlanName} visit date\n </Typography>\n <ServiceCalendarDatePicker\n open={open}\n visitDays={visitDays}\n setOpen={setOpen}\n // minDate={dayjs(new Date())}\n onChange={(newValue) =>\n onSetForm({\n date: newValue.format(\"YYYY-MM-DD\"),\n visitDayIds: [dayjs(newValue).day()],\n cancelledVisitDates: getPotentialCancellationDates(\n nextVisits,\n newValue\n ),\n })\n }\n />\n </Grid>\n\n {date && expectedVisitsPerWeek > 1 && (\n <Grid item xs>\n <Typography variant=\"h6\" fontWeight=\"bold\">\n Select {expectedVisitsPerWeek} days of the week\n </Typography>\n {expectedVisitsPerWeek > 1 && (\n <DaysOfWeekSelect\n blankText=\"<select days of week>\"\n requiredDayId={dayjs(date).day()}\n onSelectDayIds={(visitDayIds) =>\n onSetForm({ visitDayIds: visitDayIds })\n }\n selectedDayIds={visitDayIds}\n timesPerWeek={expectedVisitsPerWeek}\n />\n )}\n </Grid>\n )}\n </Grid>\n {potentialCancellationDates?.length > 0 && (\n <>\n <Grid item xs={4}>\n <Alert severity=\"error\" sx={{ fontSize: \"12px\" }}>\n The date selected as next routine visit is after previously\n planned routine visits and are assumed to be cancelled. Please\n review the date\n </Alert>\n </Grid>\n <Grid item xs={4}>\n <Typography variant=\"h6\" fontWeight=\"bold\">\n {selectedDates.length} Visit\n {selectedDates.length > 1 ? \"s\" : \"\"} Assumed Cancelled\n </Typography>\n <AssumedCancelledVisits\n selectedDates={selectedDates}\n setSelectedDates={setSelectedDates}\n potentialCancellationDates={potentialCancellationDates}\n onSetForm={onSetForm}\n />\n </Grid>\n </>\n )}\n </Grid>\n\n <NotesSection\n form={form}\n onSetForm={onSetForm}\n context={context}\n contactPlaceholder=\"Who confirmed the date?\"\n contactLabel=\"Confirmed By\"\n dateLabel=\"Confirmed on\"\n dateValue={form?.confirmedAt}\n onChange={(newValue) =>\n onSetForm({\n confirmedAt: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n <DebugButton {...form} />\n <ModelErrors errors={errors} />\n </div>\n );\n};\n\nConfirmNextRoutineVisitForm.propTypes = {\n form: PropTypes.object.isRequired,\n errors: PropTypes.object,\n context: PropTypes.shape({\n serviceName: PropTypes.string.isRequired,\n expectedVisitsPerWeek: PropTypes.number.isRequired,\n nextVisits: PropTypes.arrayOf(\n PropTypes.shape({\n date: PropTypes.string.isRequired,\n status: PropTypes.string.isRequired,\n })\n ),\n }),\n onSetForm: PropTypes.func.isRequired,\n};\n\nexport default ConfirmNextRoutineVisitForm;\n","import { useState } from \"react\";\nimport \"react-infinite-calendar/styles.css\";\nimport \"./styles.scss\";\nimport { ModelErrors } from \"sharedComponents\";\nimport { Box, Stack, Typography } from \"@mui/material\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport dayjs from \"dayjs\";\nimport NotesSection from \"./common/NotesSection\";\n\nconst ConfirmFinalCollectionForm = ({ form, context, errors, onSetForm }) => {\n const [open, setOpen] = useState(false);\n\n const { nextVisits, serviceName, visitPlanName } = context;\n\n const visitDays = nextVisits?.map((visit) => {\n return { ...visit, date: dayjs(visit.date) };\n });\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={3}\n >\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Confirm Final Visit\n </Typography>\n <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n / {serviceName}\n </Typography>\n </Stack>\n\n <Box sx={{ my: 1 }}>\n <label>Final visit Planned for</label>\n <ServiceCalendarDatePicker\n visitDays={visitDays}\n open={open}\n setOpen={setOpen}\n onChange={(newValue) => {\n onSetForm({\n date: newValue.format(\"DD/MM/YYYY\"),\n });\n }}\n />\n </Box>\n <NotesSection\n form={form}\n onSetForm={onSetForm}\n context={context}\n contactLabel=\"Confirmed by\"\n contactPlaceholder=\"Who confirmed the date\"\n dateLabel=\"Received on\"\n dateValue={form?.confirmedAt}\n onChange={(newValue) =>\n onSetForm({\n confirmedAt: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n\n <ModelErrors errors={errors} />\n </div>\n );\n};\n\nexport default ConfirmFinalCollectionForm;\n","import { FC } from \"react\";\nimport \"./styles.scss\";\nimport Select from \"react-select\";\nimport { ModelErrors } from \"sharedComponents\";\nimport { Stack, Typography } from \"@mui/material\";\nimport _, { find } from \"lodash\";\nimport NotesSection from \"./common/NotesSection\";\n\ninterface VisitPlan {\n name: string;\n slug: string;\n}\n\ninterface FormProps {\n visitPlanSlug: string;\n notes: string;\n sourceContactId: number;\n requestedAt: string;\n}\n\ninterface ContextProps {\n serviceName: string;\n vendorLocationCode: string;\n visitPlanName: string;\n visitPlans: VisitPlan[];\n}\n\ninterface RequestVisitFrequencyChangeFormProps {\n form: FormProps;\n context: ContextProps;\n errors: any;\n onSetForm: (newForm: any) => void;\n}\n\nconst RequestVisitFrequencyChangeForm: FC<\n RequestVisitFrequencyChangeFormProps\n> = ({ form, context, errors, onSetForm }) => {\n const { visitPlanSlug } = form;\n\n const { visitPlanName, serviceName, visitPlans, requestedVisitPlanName } = context;\n\n const visitPlanOptions = _.map(visitPlans, ({ name, slug }) => {\n return { label: name, value: slug };\n });\n\n const currentVisitPlanSlug = find(visitPlanOptions, { label: requestedVisitPlanName || visitPlanName });\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={2}\n >\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Request Visit Frequency Change\n </Typography>\n <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n / {serviceName}\n </Typography>\n </Stack>\n\n <div className=\"mt-1\">\n <div className=\"form-group row\">\n <div className=\"input-wrapper col-md-12\">\n <label>New Frequency</label>\n <Select\n styles={{\n // Fixes the overlapping problem of the component\n menu: (provided) => ({ ...provided, zIndex: 9999 }),\n }}\n options={visitPlanOptions}\n value={\n _.find(visitPlanOptions, {\n value: visitPlanSlug,\n }) || currentVisitPlanSlug\n }\n onChange={({ value }) => onSetForm({ visitPlanSlug: value })}\n />\n </div>\n </div>\n </div>\n\n <NotesSection\n form={form}\n onSetForm={onSetForm}\n context={context}\n contactPlaceholder=\"Who requested the change?\"\n contactLabel=\"Requested by\"\n dateLabel=\"Requested on\"\n dateValue={form?.requestedAt}\n onChange={(newValue) =>\n onSetForm({\n requestedAt: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n\n <ModelErrors errors={errors} />\n </div>\n );\n};\n\nexport default RequestVisitFrequencyChangeForm;\n","import \"./styles.scss\";\nimport Debugger from \"./Debugger\";\nimport { ModelErrors } from \"sharedComponents\";\nimport { Stack, Typography } from \"@mui/material\";\nimport NotesSection from \"./common/NotesSection\";\nimport { DebugButton } from \"service/GlobalDebugger\";\n\ninterface FormProps {\n notes: string;\n sourceContactId: number;\n}\n\ninterface ContextProps {\n serviceName: string;\n visitPlanName: string;\n}\n\ninterface AcceptVisitFrequencyChangeFormProps {\n form: FormProps;\n context: ContextProps;\n errors: any;\n onSetForm: (form: any) => void;\n}\n\nconst AcceptVisitFrequencyChangeForm: React.FC<\n AcceptVisitFrequencyChangeFormProps\n> = ({ form, context, errors, onSetForm }) => {\n const { visitPlanName, serviceName } = context;\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={2}\n >\n <Typography variant=\"h4\" sx={{ fontWeight: \"bold\" }}>\n Accept Visit Frequency of {visitPlanName}\n </Typography>\n <Typography color=\"grey\" variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n / {serviceName}\n </Typography>\n </Stack>\n\n <p className=\"mt-2\">\n <strong>\n The current visit frequency of {visitPlanName} will be accepted\n </strong>\n </p>\n\n <NotesSection\n form={form}\n onSetForm={onSetForm}\n context={context}\n contactPlaceholder=\"Who accepted the change?\"\n contactLabel=\"Accepted By\"\n dateLabel=\"Accepted at\"\n dateValue={form?.acceptedAt}\n onChange={(newValue) =>\n onSetForm({\n acceptedAt: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n <DebugButton {...form} />\n <ModelErrors errors={errors} />\n </div>\n );\n};\n\nexport default AcceptVisitFrequencyChangeForm;\n","import { useMemo, useState } from \"react\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport PropTypes from \"prop-types\";\nimport \"react-infinite-calendar/styles.css\";\nimport \"./styles.scss\";\nimport { DaysOfWeekSelect, ModelErrors } from \"sharedComponents\";\nimport { Alert, Grid, Stack, Typography, Box } from \"@mui/material\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport dayjs from \"dayjs\";\nimport _ from \"lodash\";\nimport NotesSection from \"./common/NotesSection\";\nimport AssumedCancelledVisits from \"./common/AssumedCancelledVisits\";\nimport Debugger from \"./Debugger\";\n\nconst getPotentialCancellationDates = (nextVisits, date) => {\n return date\n ? _(nextVisits)\n .reject({ status: \"cancelled\" })\n .map(\"date\")\n .filter((d) => dayjs(d) < dayjs(date))\n .value()\n : [];\n};\n\nconst ConfirmVisitFrequencyChangeForm = ({\n form,\n context,\n errors,\n onSetForm,\n}) => {\n const [open, setOpen] = useState(false);\n\n var { date, visitDayIds } = form;\n var {\n nextVisits,\n serviceName,\n expectedVisitPlanName,\n expectedVisitsPerWeek,\n } = context;\n\n const potentialCancellationDates = useMemo(\n () => getPotentialCancellationDates(nextVisits, date),\n [nextVisits, date]\n );\n\n const [selectedDates, setSelectedDates] = useState(\n potentialCancellationDates\n );\n\n const visitDays = nextVisits?.map((visit) => {\n return { ...visit, date: dayjs(visit.date) };\n });\n\n const renderStandardForm = () => (\n <Grid container spacing={2}>\n <Grid item container xs={4} spacing={2}>\n <Grid item xs>\n <Typography variant=\"h6\" fontWeight=\"bold\" noWrap>\n Next {expectedVisitPlanName} Visit Date\n </Typography>\n <ServiceCalendarDatePicker\n open={open}\n visitDays={visitDays}\n setOpen={setOpen}\n onChange={(newValue) =>\n onSetForm({\n date: newValue.format(\"YYYY-MM-DD\"),\n visitDayIds: [dayjs(newValue).day()],\n cancelledVisitDates: getPotentialCancellationDates(\n nextVisits,\n newValue\n ),\n })\n }\n />\n </Grid>\n\n {date && expectedVisitsPerWeek > 1 && (\n <Grid item xs>\n <Typography variant=\"h6\" fontWeight=\"bold\">\n Select {expectedVisitsPerWeek} days of the week\n </Typography>\n <DaysOfWeekSelect\n blankText=\"<select days of week>\"\n requiredDayId={dayjs(date).day()}\n onSelectDayIds={(visitDayIds) =>\n onSetForm({ visitDayIds: visitDayIds })\n }\n selectedDayIds={visitDayIds}\n timesPerWeek={expectedVisitsPerWeek}\n />\n </Grid>\n )}\n </Grid>\n {potentialCancellationDates?.length > 0 && (\n <>\n <Grid item xs={4}>\n <Alert severity=\"error\" sx={{ fontSize: \"12px\" }}>\n The date selected as next routine visit is after previously\n planned routine visits and are assumed to be cancelled. Please\n review the date\n </Alert>\n </Grid>\n <Grid item xs={4}>\n <Typography variant=\"h6\" fontWeight=\"bold\">\n {selectedDates.length} Visit\n {selectedDates.length > 1 ? \"s\" : \"\"} Assumed Cancelled\n </Typography>\n <AssumedCancelledVisits\n selectedDates={selectedDates}\n setSelectedDates={setSelectedDates}\n potentialCancellationDates={potentialCancellationDates}\n onSetForm={onSetForm}\n />\n </Grid>\n </>\n )}\n </Grid>\n );\n\n const renderOnDemandForm = () => (\n <Grid container spacing={2}>\n <Grid item xs={4}>\n <Typography variant=\"h6\" fontWeight=\"bold\" noWrap>\n On Demand Visit Date\n </Typography>\n <ServiceCalendarDatePicker\n open={open}\n visitDays={visitDays}\n setOpen={setOpen}\n onChange={(newValue) =>\n onSetForm({\n date: newValue.format(\"YYYY-MM-DD\"),\n visitDayIds: [dayjs(newValue).day()],\n cancelledVisitDates: getPotentialCancellationDates(\n nextVisits,\n newValue\n ),\n })\n }\n />\n </Grid>\n </Grid>\n );\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={3}\n sx={{ \"& .MuiTypography-root\": { fontWeight: \"bold\" } }}\n >\n <Typography variant=\"h5\">Confirm Frequency Change</Typography>\n <Typography color=\"grey\" variant=\"h6\">\n / {serviceName}\n </Typography>\n </Stack>\n <Box sx={{ marginTop: 1 }}>\n <li>\n <strong>\n Vendor was requested to change visit frequency to{\" \"}\n {expectedVisitPlanName}\n </strong>\n </li>\n </Box>\n\n {expectedVisitPlanName === \"On Demand\"\n ? renderOnDemandForm()\n : renderStandardForm()}\n\n <NotesSection\n form={form}\n onSetForm={onSetForm}\n context={context}\n contactPlaceholder=\"Who confirmed the date?\"\n contactLabel=\"Confirmed By\"\n dateLabel=\"Confirmed on\"\n dateValue={form?.confirmedAt}\n onChange={(newValue) =>\n onSetForm({\n confirmedAt: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n <DebugButton {...form} />\n <ModelErrors errors={errors} />\n </div>\n );\n};\n\nConfirmVisitFrequencyChangeForm.propTypes = {\n form: PropTypes.object.isRequired,\n errors: PropTypes.object,\n context: PropTypes.shape({\n serviceName: PropTypes.string.isRequired,\n expectedVisitsPerWeek: PropTypes.number.isRequired,\n nextVisits: PropTypes.arrayOf(\n PropTypes.shape({\n date: PropTypes.string.isRequired,\n status: PropTypes.string.isRequired,\n })\n ),\n }),\n onSetForm: PropTypes.func.isRequired,\n};\n\nexport default ConfirmVisitFrequencyChangeForm;\n","import { Box, Stack, Typography } from \"@mui/material\";\nimport { ModelErrors } from \"sharedComponents\";\nimport \"./styles.scss\";\nimport NotesSection from \"./common/NotesSection\";\n\nconst CancelVisitFrequencyChangeForm = ({ form, context, errors, onSetForm }) => {\n const { serviceName, requestedVisitPlanName } = context;\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={2}\n >\n {\" \"}\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Cancel Frequency Change Request\n </Typography>\n <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n {serviceName}\n </Typography>\n </Stack>\n <Box sx={{ marginTop: 1 }}>\n <li><strong>Vendor was requested to change visit frequency to {requestedVisitPlanName}</strong></li>\n </Box>\n <Box sx={{ display: \"flex\", flexDirection: \"column\", gap: 2, mt: 2 }}>\n <NotesSection\n form={form}\n onSetForm={onSetForm}\n context={context}\n contactLabel=\"Cancelled By\"\n contactPlaceholder=\"Who requested the cancellation?\"\n dateLabel=\"Cancelled on\"\n dateValue={form?.cancelledAt}\n onChange={(newValue) =>\n onSetForm({\n cancelledAt: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n <ModelErrors errors={errors} />\n </Box>\n </div>\n );\n};\n\nexport default CancelVisitFrequencyChangeForm;\n","import { useState } from \"react\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport PropTypes from \"prop-types\";\nimport \"react-infinite-calendar/styles.css\";\nimport \"./styles.scss\";\nimport Debugger from \"./Debugger\";\nimport { CheckBoxWithLabel, ModelErrors } from \"sharedComponents\";\nimport { Stack, Typography } from \"@mui/material\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport dayjs from \"dayjs\";\nimport NotesSection from \"./common/NotesSection\";\nimport ActionFormLayout from './common/ActionFormLayout';\nimport { TextMuted } from 'sharedComponents';\n\nconst RequestTerminationForm = ({ form, context, errors, onSetForm }) => {\n const { finalCollectionRequired } = form;\n\n const { nextVisits, serviceName, visitPlanName } = context;\n\n const [open, setOpen] = useState(false);\n const visitDays = nextVisits?.map((visit) => {\n return { ...visit, date: dayjs(visit.date) };\n });\n\n const title = (\n <span>\n <strong>Request Service Termination</strong>   <TextMuted> {serviceName}</TextMuted>\n </span>\n )\n\n const body = (\n <>\n <CheckBoxWithLabel\n checked={finalCollectionRequired}\n onClick={(finalCollectionRequired) =>\n onSetForm({ finalCollectionRequired })\n }\n >\n Is Final Collection Required?\n </CheckBoxWithLabel>\n {finalCollectionRequired ? (\n <div>\n <label>Final Collection Required Before</label>\n <ServiceCalendarDatePicker\n // minDate={dayjs(new Date())}\n visitDays={visitDays}\n open={open}\n setOpen={setOpen}\n onChange={(newValue) =>\n onSetForm({\n finalCollectionRequiredBefore: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n </div>\n ) : null}\n </>\n )\n\n return (\n <ActionFormLayout title={title} body={body} form={form} onSetForm={onSetForm} errors={errors}/>\n )\n\n\n // return (\n // <div>\n // <Stack\n // direction=\"row\"\n // justifyContent=\"flex-start\"\n // alignItems=\"center\"\n // spacing={3}\n // >\n // <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n // Request Service Termination\n // </Typography>\n // <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n // / {serviceName}\n // </Typography>\n // </Stack>\n // <div\n // className=\"mt-3\"\n // style={{ display: \"flex\", flexDirection: \"column\", gap: \"5px\" }}\n // >\n // <CheckBoxWithLabel\n // checked={finalCollectionRequired}\n // onClick={(finalCollectionRequired) =>\n // onSetForm({ finalCollectionRequired })\n // }\n // >\n // Is Final Collection Required?\n // </CheckBoxWithLabel>\n // {finalCollectionRequired ? (\n // <div>\n // <label>Final Collection Required Before</label>\n // <ServiceCalendarDatePicker\n // // minDate={dayjs(new Date())}\n // visitDays={visitDays}\n // open={open}\n // setOpen={setOpen}\n // onChange={(newValue) =>\n // onSetForm({\n // finalCollectionRequiredBefore: newValue.format(\"DD/MM/YYYY\"),\n // })\n // }\n // />\n // </div>\n // ) : null}\n // <NotesSection\n // form={form}\n // onSetForm={onSetForm}\n // context={context}\n // contactPlaceholder=\"Who requested the termination?\"\n // contactLabel=\"Requested by\"\n // dateLabel=\"Requested on\"\n // dateValue={form?.requestedAt}\n // onChange={(newValue) =>\n // onSetForm({\n // requestedAt: newValue.format(\"DD/MM/YYYY\"),\n // })\n // }\n // />\n // </div>\n\n // <DebugButton {...form} />\n\n // <ModelErrors errors={errors} />\n // </div>\n // );\n};\n\nRequestTerminationForm.propTypes = {\n form: PropTypes.shape({\n notes: PropTypes.string,\n finalCollectionRequired: PropTypes.bool.isRequired,\n finalCollectionRequiredBefore: PropTypes.string,\n }),\n errors: PropTypes.object,\n context: PropTypes.shape({\n serviceName: PropTypes.string.isRequired,\n nextVisits: PropTypes.arrayOf(\n PropTypes.shape({\n date: PropTypes.string.isRequired,\n status: PropTypes.string.isRequired,\n })\n ),\n }),\n onSetForm: PropTypes.func.isRequired,\n};\n\nexport default RequestTerminationForm;\n","import \"./styles.scss\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport Debugger from \"./Debugger\";\nimport { ModelErrors } from \"sharedComponents\";\nimport { Box, Stack, Typography } from \"@mui/material\";\nimport NotesSection from \"./common/NotesSection\";\nimport { formatDate } from \"sharedUtils\";\nimport ActionFormLayout from './common/ActionFormLayout';\nimport { TextMuted } from 'sharedComponents';\n\nconst CancelTerminationForm = ({ form, context, errors, onSetForm }) => {\n const { serviceName, requestedAt } = context;\n\n\n const title = (\n <span>\n <strong>Cancel Termination Request</strong>   <TextMuted> {serviceName}</TextMuted>\n </span>\n )\n\n const body = (\n <>\n Vendor was requested on{\" \"}{formatDate(requestedAt)}{\" \"}to terminate service\n </>\n )\n\n return (\n <ActionFormLayout title={title} body={body} form={form} onSetForm={onSetForm} errors={errors}/>\n )\n\n // return (\n // <div>\n // <Stack\n // direction=\"row\"\n // justifyContent=\"flex-start\"\n // alignItems=\"center\"\n // spacing={2}\n // >\n // <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n // Cancel Termination Request\n // </Typography>\n // <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n // {serviceName}\n // </Typography>\n // </Stack>\n // <Box sx={{ marginTop: 1 }}>Vendor was requested on{\" \"}{formatDate(requestedAt)}{\" \"}to terminate service</Box>\n // <NotesSection\n // form={form}\n // onSetForm={onSetForm}\n // context={context}\n // contactLabel=\"Canceled By\"\n // contactPlaceholder=\"Who requested the cancellation?\"\n // dateLabel=\"Cancelled on\"\n // dateValue={form?.cancelledAt}\n // onChange={(newValue) =>\n // onSetForm({\n // cancelledAt: newValue.format(\"DD/MM/YYYY\"),\n // })\n // }\n // />\n // <DebugButton {...form} />\n // <ModelErrors errors={errors} />\n // </div>\n // );\n};\n\nexport default CancelTerminationForm;\n","import { useEffect, useState } from \"react\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport PropTypes from \"prop-types\";\nimport \"react-infinite-calendar/styles.css\";\nimport \"./styles.scss\";\nimport Debugger from \"./Debugger\";\nimport { CheckBoxWithLabel, ModelErrors } from \"sharedComponents\";\nimport { Box, Stack, Typography } from \"@mui/material\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport dayjs from \"dayjs\";\nimport NotesSection from \"./common/NotesSection\";\nimport { formatDate } from \"sharedUtils\";\nimport ActionFormLayout from './common/ActionFormLayout';\nimport { TextMuted } from 'sharedComponents';\n\nconst ConfirmTerminationForm = ({ form, context, errors, onSetForm }) => {\n const {\n nextVisits,\n serviceName,\n finalCollectionRequired,\n finalCollectionRequiredBefore,\n requestedAt,\n } = context;\n\n const [open, setOpen] = useState(false);\n const [value, setValue] = useState(dayjs());\n\n const visitDays = nextVisits?.map((visit) => {\n return { ...visit, date: dayjs(visit.date) };\n });\n\n useEffect(() => {\n if (finalCollectionRequired && finalCollectionRequiredBefore) {\n const formattedDate = dayjs(finalCollectionRequiredBefore).format(\"DD/MM/YYYY\");\n setValue(dayjs(finalCollectionRequiredBefore));\n onSetForm({ finalCollectionDate: formattedDate });\n } else {\n const requestedDate = dayjs(requestedAt).format(\"DD/MM/YYYY\");\n setValue(dayjs(requestedAt));\n onSetForm({ noVisitsExpectedAfter: requestedDate });\n }\n }, [finalCollectionRequired, finalCollectionRequiredBefore]);\n\n const handleDateChange = (newValue) => {\n setValue(newValue);\n if (finalCollectionRequired) {\n onSetForm({ finalCollectionDate: newValue.format(\"DD/MM/YYYY\") });\n } else {\n onSetForm({ noVisitsExpectedAfter: newValue.format(\"DD/MM/YYYY\") });\n }\n };\n\n\n const title = (\n <span>\n <strong>Confirm Termination</strong>   <TextMuted> {serviceName}</TextMuted>\n </span>\n )\n\n const body = (\n <>\n {finalCollectionRequired ? (\n <div>\n <Box sx={{ marginTop: 1 }}>\n Vendor was requested to terminate service with final collection\n before {formatDate(finalCollectionRequiredBefore)}\n </Box>\n <label>Final Collection on</label>\n <ServiceCalendarDatePicker\n visitDays={visitDays}\n open={open}\n setOpen={setOpen}\n maxDate={dayjs(finalCollectionRequiredBefore)}\n value={value}\n onChange={handleDateChange}\n />\n </div>\n ) : (\n <div>\n <Box sx={{ marginTop: 1 }}>\n Vendor was requested to terminate service without final collection\n and effective from: {formatDate(requestedAt)}\n </Box>\n <label>No Visits Expected After</label>\n <ServiceCalendarDatePicker\n visitDays={visitDays}\n open={open}\n setOpen={setOpen}\n value={value}\n onChange={handleDateChange}\n />\n </div>\n )}\n </>\n )\n\n return (\n <ActionFormLayout title={title} body={body} form={form} onSetForm={onSetForm} errors={errors}/>\n )\n\n // return (\n // <div>\n // <Stack\n // direction=\"row\"\n // justifyContent=\"flex-start\"\n // alignItems=\"center\"\n // spacing={3}\n // >\n // <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n // Confirm Termination\n // </Typography>\n // <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n // / {serviceName}\n // </Typography>\n // </Stack>\n // <div\n // className=\"mt-3\"\n // style={{ display: \"flex\", flexDirection: \"column\", gap: \"5px\" }}\n // >\n // {finalCollectionRequired ? (\n // <div>\n // <Box sx={{ marginTop: 1 }}>\n // Vendor was requested to terminate service with final collection\n // before {formatDate(finalCollectionRequiredBefore)}\n // </Box>\n // <label>Final Collection on</label>\n // <ServiceCalendarDatePicker\n // visitDays={visitDays}\n // open={open}\n // setOpen={setOpen}\n // maxDate={dayjs(finalCollectionRequiredBefore)}\n // value={value}\n // onChange={handleDateChange}\n // />\n // </div>\n // ) : (\n // <div>\n // <Box sx={{ marginTop: 1 }}>\n // Vendor was requested to terminate service without final collection\n // and effective from: {formatDate(requestedAt)}\n // </Box>\n // <label>No Visits Expected After</label>\n // <ServiceCalendarDatePicker\n // visitDays={visitDays}\n // open={open}\n // setOpen={setOpen}\n // value={value}\n // onChange={handleDateChange}\n // />\n // </div>\n // )}\n\n // <NotesSection\n // form={form}\n // onSetForm={onSetForm}\n // context={context}\n // contactPlaceholder=\"Who confirmed the termination?\"\n // contactLabel=\"Confirmed by\"\n // dateLabel=\"Confirmed on\"\n // dateValue={form?.confirmedAt}\n // onChange={(newValue) =>\n // onSetForm({\n // confirmedAt: newValue.format(\"DD/MM/YYYY\"),\n // })\n // }\n // />\n // </div>\n\n // <DebugButton {...form} />\n\n // <ModelErrors errors={errors} />\n // </div>\n // );\n};\n\nConfirmTerminationForm.propTypes = {\n form: PropTypes.shape({\n notes: PropTypes.string,\n finalCollectionDate: PropTypes.string,\n noVisitsExpectedAfter: PropTypes.string,\n }),\n errors: PropTypes.object,\n context: PropTypes.shape({\n serviceName: PropTypes.string.isRequired,\n nextVisits: PropTypes.arrayOf(\n PropTypes.shape({\n date: PropTypes.string.isRequired,\n status: PropTypes.string.isRequired,\n })\n ),\n }),\n onSetForm: PropTypes.func.isRequired,\n};\n\nexport default ConfirmTerminationForm;\n","import { useState } from \"react\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport PropTypes from \"prop-types\";\nimport \"react-infinite-calendar/styles.css\";\nimport \"./styles.scss\";\nimport Debugger from \"./Debugger\";\nimport { ModelErrors } from \"sharedComponents\";\nimport { Stack, Typography } from \"@mui/material\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport NotesSection from \"./common/NotesSection\";\n\nconst RequestResumptionForm = ({ form, context, errors, onSetForm }) => {\n const { serviceName } = context;\n\n const [open, setOpen] = useState(false);\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={3}\n >\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Request Resumption of Service\n </Typography>\n <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n / {serviceName}\n </Typography>\n </Stack>\n <div\n className=\"mt-3\"\n style={{ display: \"flex\", flexDirection: \"column\", gap: \"5px\" }}\n >\n <label>Resume after date</label>\n <ServiceCalendarDatePicker\n // minDate={dayjs(new Date())}\n open={open}\n setOpen={setOpen}\n onChange={(newValue) =>\n onSetForm({\n visitsExpectedAfter: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n </div>\n <NotesSection\n form={form}\n onSetForm={onSetForm}\n context={context}\n contactLabel=\"Requested By\"\n contactPlaceholder=\"Who requested the resumption?\"\n dateLabel=\"Requested at\"\n dateValue={form?.requestedAt}\n onChange={(newValue) =>\n onSetForm({\n requestedAt: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n <DebugButton {...form} />\n <ModelErrors errors={errors} />\n </div>\n );\n};\n\nRequestResumptionForm.propTypes = {\n form: PropTypes.shape({\n notes: PropTypes.string,\n visitsExpectedAfter: PropTypes.string\n }),\n errors: PropTypes.object,\n context: PropTypes.shape({\n serviceName: PropTypes.string.isRequired,\n nextVisits: PropTypes.arrayOf(\n PropTypes.shape({\n date: PropTypes.string.isRequired,\n status: PropTypes.string.isRequired,\n })\n ),\n }),\n onSetForm: PropTypes.func.isRequired,\n};\n\nexport default RequestResumptionForm;\n","import \"./styles.scss\";\nimport Debugger from \"./Debugger\";\nimport PropTypes from \"prop-types\";\nimport { ModelErrors } from \"sharedComponents\";\nimport { Box, Stack, Typography } from \"@mui/material\";\nimport NotesSection from \"./common/NotesSection\";\nimport { formatDate } from \"sharedUtils\";\n\nconst CancelResumptionForm = ({ form, context, errors, onSetForm }) => {\n const { serviceName, requestedAt } = context;\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={2}\n >\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Cancel Resumption Request\n </Typography>\n <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n {serviceName}\n </Typography>\n </Stack>\n <Box sx={{ marginTop: 1 }}>\n <li>\n <strong>Vendor was requested on{\" \"}{formatDate(requestedAt)}{\" \"}to resume service</strong>\n </li>\n </Box>\n <NotesSection\n form={form}\n onSetForm={onSetForm}\n context={context}\n contactLabel=\"Canceled By\"\n contactPlaceholder=\"Who requested the cancellation?\"\n dateLabel=\"Cancelled on\"\n dateValue={form?.cancelledAt}\n onChange={(newValue) =>\n onSetForm({\n cancelledAt: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n <Debugger {...form} />\n <ModelErrors errors={errors} />\n </div>\n );\n};\n\nCancelResumptionForm.propTypes = {\n form: PropTypes.shape({\n notes: PropTypes.string,\n cancelledAt: PropTypes.string,\n }),\n errors: PropTypes.object,\n context: PropTypes.shape({\n requestedAt: PropTypes.string,\n serviceName: PropTypes.string.isRequired,\n nextVisits: PropTypes.arrayOf(\n PropTypes.shape({\n date: PropTypes.string.isRequired,\n status: PropTypes.string.isRequired,\n })\n ),\n }),\n onSetForm: PropTypes.func.isRequired,\n};\n\nexport default CancelResumptionForm;\n","import { useEffect, useState } from \"react\";\nimport PropTypes from \"prop-types\";\nimport \"react-infinite-calendar/styles.css\";\nimport \"./styles.scss\";\nimport Debugger from \"./Debugger\";\nimport { CheckBoxWithLabel, ModelErrors } from \"sharedComponents\";\nimport { Box, Stack, Typography } from \"@mui/material\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport dayjs from \"dayjs\";\nimport NotesSection from \"./common/NotesSection\";\nimport { formatDate } from \"sharedUtils\";\n\nconst ConfirmResumptionForm = ({ form, context, errors, onSetForm }) => {\n const { nextVisits, serviceName, visitsExpectedAfter} = context;\n\n const [open, setOpen] = useState(false);\n const [value, setValue] = useState(dayjs());\n\n const visitDays = nextVisits?.map((visit) => {\n return { ...visit, date: dayjs(visit.date) };\n });\n\n useEffect(() => {\n const formattedDate = dayjs(visitsExpectedAfter).format(\"DD/MM/YYYY\");\n setValue(dayjs(visitsExpectedAfter));\n onSetForm({ confirmedVisitsExpectedAfter: formattedDate });\n }, [visitsExpectedAfter]);\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={3}\n >\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Confirm Resumption\n </Typography>\n <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n / {serviceName}\n </Typography>\n </Stack>\n <div\n className=\"mt-3\"\n style={{ display: \"flex\", flexDirection: \"column\", gap: \"5px\" }}\n >\n <div>\n <Box sx={{ marginTop: 1 }}>\n <li>\n <strong>Vendor was requested to resume service from: {formatDate(visitsExpectedAfter)}</strong>\n </li>\n </Box>\n <label>Resumption From</label>\n </div>\n <ServiceCalendarDatePicker\n minDate={dayjs()}\n visitDays={visitDays}\n open={open}\n setOpen={setOpen}\n value={value}\n onChange={(newValue) =>\n onSetForm({ confirmedVisitsExpectedAfter: newValue.format(\"DD/MM/YYYY\") })\n }\n />\n <NotesSection\n form={form}\n onSetForm={onSetForm}\n context={context}\n contactPlaceholder=\"Who requested the Resumption?\"\n contactLabel=\"Confirmed by\"\n dateLabel=\"Confirmed on\"\n dateValue={form?.confirmedAt}\n onChange={(newValue) =>\n onSetForm({\n confirmedAt: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n </div>\n\n <Debugger {...form} />\n\n <ModelErrors errors={errors} />\n </div>\n );\n};\n\nConfirmResumptionForm.propTypes = {\n form: PropTypes.shape({\n notes: PropTypes.string,\n confirmedVisitsExpectedAfter: PropTypes.string,\n }),\n errors: PropTypes.object,\n context: PropTypes.shape({\n visitsExpectedAfter: PropTypes.string,\n serviceName: PropTypes.string.isRequired,\n nextVisits: PropTypes.arrayOf(\n PropTypes.shape({\n date: PropTypes.string.isRequired,\n status: PropTypes.string.isRequired,\n })\n ),\n }),\n onSetForm: PropTypes.func.isRequired,\n};\n\nexport default ConfirmResumptionForm;\n","import { useState } from \"react\";\nimport PropTypes from \"prop-types\";\nimport \"react-infinite-calendar/styles.css\";\nimport \"./styles.scss\";\nimport Debugger from \"./Debugger\";\nimport { ModelErrors } from \"sharedComponents\";\nimport { Stack, Typography } from \"@mui/material\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport NotesSection from \"./common/NotesSection\";\n\nconst RequestReinstatementForm = ({\n form,\n context,\n errors,\n onSetForm\n}) => {\n const { serviceName } = context;\n\n const [open, setOpen] = useState(false);\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={3}\n >\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Request Reinstatement of Service\n </Typography>\n <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n / {serviceName}\n </Typography>\n </Stack>\n <div\n className=\"mt-3\"\n style={{ display: \"flex\", flexDirection: \"column\", gap: \"5px\" }}\n >\n <label>Reinstate after date</label>\n <ServiceCalendarDatePicker\n // minDate={dayjs(new Date())}\n open={open}\n setOpen={setOpen}\n onChange={(newValue) =>\n onSetForm({\n visitsExpectedAfter: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n </div>\n <NotesSection\n form={form}\n onSetForm={onSetForm}\n context={context}\n contactLabel=\"Requested By\"\n contactPlaceholder=\"Who requested the resumption?\"\n dateLabel=\"Requested at\"\n dateValue={form?.requestedAt}\n onChange={(newValue) =>\n onSetForm({\n requestedAt: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n <Debugger {...form} />\n <ModelErrors errors={errors} />\n </div>\n );\n};\n\nRequestReinstatementForm.propTypes = {\n form: PropTypes.shape({\n notes: PropTypes.string,\n visitsExpectedAfter: PropTypes.string,\n }),\n errors: PropTypes.object,\n context: PropTypes.shape({\n serviceName: PropTypes.string.isRequired,\n nextVisits: PropTypes.arrayOf(\n PropTypes.shape({\n date: PropTypes.string.isRequired,\n status: PropTypes.string.isRequired,\n })\n ),\n }),\n onSetForm: PropTypes.func.isRequired,\n};\n\nexport default RequestReinstatementForm;\n","import \"./styles.scss\";\nimport Debugger from \"./Debugger\";\nimport PropTypes from \"prop-types\";\nimport { ModelErrors } from \"sharedComponents\";\nimport { Box, Stack, Typography } from \"@mui/material\";\nimport NotesSection from \"./common/NotesSection\";\nimport { formatDate } from \"sharedUtils\";\n\nconst CancelReinstatementForm = ({ form, context, errors, onSetForm }) => {\n const { serviceName, requestedAt } = context;\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={2}\n >\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Cancel Reinstatement Request\n </Typography>\n <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n {serviceName}\n </Typography>\n </Stack>\n <Box sx={{ marginTop: 1 }}>\n <li>\n <strong>Vendor was requested on{\" \"}{formatDate(requestedAt)}{\" \"}to reinstate service</strong>\n </li>\n </Box>\n <NotesSection\n form={form}\n onSetForm={onSetForm}\n context={context}\n contactLabel=\"Canceled By\"\n contactPlaceholder=\"Who requested the cancellation?\"\n dateLabel=\"Cancelled on\"\n dateValue={form?.cancelledAt}\n onChange={(newValue) =>\n onSetForm({\n cancelledAt: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n <Debugger {...form} />\n <ModelErrors errors={errors} />\n </div>\n );\n};\n\nCancelReinstatementForm.propTypes = {\n form: PropTypes.shape({\n notes: PropTypes.string,\n cancelledAt: PropTypes.string,\n }),\n errors: PropTypes.object,\n context: PropTypes.shape({\n requestedAt: PropTypes.string,\n serviceName: PropTypes.string.isRequired,\n nextVisits: PropTypes.arrayOf(\n PropTypes.shape({\n date: PropTypes.string.isRequired,\n status: PropTypes.string.isRequired,\n })\n ),\n }),\n onSetForm: PropTypes.func.isRequired,\n};\n\nexport default CancelReinstatementForm;\n","import { useEffect, useState } from \"react\";\nimport PropTypes from \"prop-types\";\nimport \"react-infinite-calendar/styles.css\";\nimport \"./styles.scss\";\nimport Debugger from \"./Debugger\";\nimport { CheckBoxWithLabel, ModelErrors } from \"sharedComponents\";\nimport { Box, Stack, Typography } from \"@mui/material\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport dayjs from \"dayjs\";\nimport NotesSection from \"./common/NotesSection\";\nimport { formatDate } from \"sharedUtils\";\n\nconst ConfirmReinstatementForm = ({ form, context, errors, onSetForm }) => {\n const { nextVisits, serviceName, visitsExpectedAfter} = context;\n\n const [open, setOpen] = useState(false);\n const [value, setValue] = useState(dayjs());\n\n const visitDays = nextVisits?.map((visit) => {\n return { ...visit, date: dayjs(visit.date) };\n });\n\n useEffect(() => {\n const formattedDate = dayjs(visitsExpectedAfter).format(\"DD/MM/YYYY\");\n setValue(dayjs(visitsExpectedAfter));\n onSetForm({ confirmedVisitsExpectedAfter: formattedDate });\n }, [visitsExpectedAfter]);\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={3}\n >\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Confirm Reinstatement\n </Typography>\n <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n / {serviceName}\n </Typography>\n </Stack>\n <div\n className=\"mt-3\"\n style={{ display: \"flex\", flexDirection: \"column\", gap: \"5px\" }}\n >\n <div>\n <Box sx={{ marginTop: 1 }}>\n <li>\n <strong>Vendor was requested to reinstate service from: {formatDate(visitsExpectedAfter)}</strong>\n </li>\n </Box>\n <label>Reinstatement From</label>\n </div>\n <ServiceCalendarDatePicker\n minDate={dayjs()}\n visitDays={visitDays}\n open={open}\n setOpen={setOpen}\n value={value}\n onChange={(newValue) =>\n onSetForm({ confirmedVisitsExpectedAfter: newValue.format(\"DD/MM/YYYY\") })\n }\n />\n <NotesSection\n form={form}\n onSetForm={onSetForm}\n context={context}\n contactPlaceholder=\"Who requested the Reinstatement?\"\n contactLabel=\"Confirmed by\"\n dateLabel=\"Confirmed on\"\n dateValue={form?.confirmedAt}\n onChange={(newValue) =>\n onSetForm({\n confirmedAt: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n </div>\n\n <Debugger {...form} />\n\n <ModelErrors errors={errors} />\n </div>\n );\n};\n\nConfirmReinstatementForm.propTypes = {\n form: PropTypes.shape({\n notes: PropTypes.string,\n confirmedVisitsExpectedAfter: PropTypes.string,\n }),\n errors: PropTypes.object,\n context: PropTypes.shape({\n visitsExpectedAfter: PropTypes.string,\n serviceName: PropTypes.string.isRequired,\n nextVisits: PropTypes.arrayOf(\n PropTypes.shape({\n date: PropTypes.string.isRequired,\n status: PropTypes.string.isRequired,\n })\n ),\n }),\n onSetForm: PropTypes.func.isRequired,\n};\n\nexport default ConfirmReinstatementForm;\n","import PropTypes from \"prop-types\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport \"./styles.scss\";\nimport Debugger from \"./Debugger\";\nimport { ModelErrors } from \"sharedComponents\";\nimport {\n Box,\n Stack,\n Table,\n TableCell,\n TableHead,\n TableRow,\n Typography,\n} from \"@mui/material\";\nimport {\n StyledTableBody,\n StyledTableContainer,\n StyledTableRow,\n} from \"./common/CustomTable\";\nimport _ from \"lodash\";\nimport { useBinFetch } from \"sharedUtils\";\nimport BinDot from \"service/BinDot\";\nimport NotesSection from \"./common/NotesSection\";\n\nconst CancelSpecChangeForm = ({ form, context, errors, onSetForm }) => {\n const { serviceName, requestSpecifications, requestSpecificationsCodes } =\n context;\n\n const { binTypes, binGroups } = useBinFetch(requestSpecificationsCodes);\n\n let rows = _.map(requestSpecificationsCodes, (code) => {\n let { quantity, visitActionId } = requestSpecifications[code] || {};\n\n const binType = binTypes[code] || {};\n const bg = binGroups[binType.binGroupId];\n\n return (\n <TableRow key={code}>\n <TableCell scope=\"row\">\n <BinDot\n binGroup={bg}\n tooltipName={true}\n tooltipPlace=\"top\"\n showImg\n {...binType}\n />\n {binType.name}\n </TableCell>\n <TableCell>{code}</TableCell>\n <TableCell>{quantity}</TableCell>\n <TableCell>{_.startCase(visitActionId)}</TableCell>\n </TableRow>\n );\n });\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={2}\n >\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Cancel Bin Spec Change\n </Typography>\n <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n {serviceName}\n </Typography>\n </Stack>\n\n <Box sx={{ mt: 1 }}>\n <li>\n <strong>\n Vendor was requested to change the bin spec with the following\n {/* {status === \"confirmation\"\n ? \"Vendor has confirmed to change the bin spec the following\"\n : \"Vendor was requested to change the bin spec with the following\"\n } */}\n </strong>\n </li>\n <StyledTableContainer>\n <Table size=\"small\">\n <TableHead>\n <StyledTableRow>\n <TableCell>Type</TableCell>\n <TableCell>Code</TableCell>\n <TableCell>Cancel Quantity</TableCell>\n <TableCell>Visit Action</TableCell>\n </StyledTableRow>\n </TableHead>\n <StyledTableBody>{rows}</StyledTableBody>\n </Table>\n </StyledTableContainer>\n </Box>\n <NotesSection\n form={form}\n onSetForm={onSetForm}\n context={context}\n contactLabel=\"Canceled By\"\n contactPlaceholder=\"Who requested the cancellation?\"\n dateLabel=\"Cancelled on\"\n dateValue={form?.cancelledAt}\n onChange={(newValue) =>\n onSetForm({\n cancelledAt: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n <DebugButton {...form} />\n <ModelErrors errors={errors} />\n </div>\n );\n};\n\nCancelSpecChangeForm.propTypes = {\n form: PropTypes.object.isRequired,\n errors: PropTypes.object,\n context: PropTypes.shape({\n serviceName: PropTypes.string.isRequired,\n visitPlanName: PropTypes.string,\n binGroups: PropTypes.objectOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n name: PropTypes.string.isRequired,\n legendFillColor: PropTypes.string.isRequired,\n legendBorderColor: PropTypes.string.isRequired,\n })\n ).isRequired,\n binTypes: PropTypes.objectOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n name: PropTypes.string.isRequired,\n groupName: PropTypes.string.isRequired,\n binGroupId: PropTypes.number.isRequired,\n })\n ).isRequired,\n requestSpecifications: PropTypes.objectOf(\n PropTypes.shape({\n quantity: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n serviceCode: PropTypes.string.isRequired,\n visitActionId: PropTypes.string,\n })\n ),\n }),\n onSetForm: PropTypes.func.isRequired,\n};\n\nexport default CancelSpecChangeForm;\n","import { useState } from \"react\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport PropTypes from \"prop-types\";\nimport \"react-infinite-calendar/styles.css\";\nimport \"./styles.scss\";\nimport Debugger from \"./Debugger\";\nimport { Stack, Typography } from \"@mui/material\";\nimport Select from \"react-select\";\nimport { CheckBoxWithLabel, ModelErrors } from \"sharedComponents\";\nimport NotesSection from \"./common/NotesSection\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport dayjs from \"dayjs\";\nimport _ from \"lodash\";\nimport ActionFormLayout from './common/ActionFormLayout';\nimport { TextMuted } from 'sharedComponents';\n\nconst RequestSuspensionForm = ({ form, context, errors, onSetForm }) => {\n const { withImmediateEffect, reasonId } = form;\n\n const [open, setOpen] = useState(false);\n const { nextVisits, serviceName, visitPlanName, suspensionReasons } = context;\n\n const reasonOptions = _.map(suspensionReasons, ({ name, id }) => {\n return { label: name, value: id };\n });\n\n const visitDays = nextVisits?.map((visit) => {\n return { ...visit, date: dayjs(visit.date) };\n });\n\n const title = (\n <span>\n <strong>Request Service Suspension</strong>   <TextMuted> {serviceName}</TextMuted>\n </span>\n )\n\n const body = (\n <>\n <div className=\"form-group row\">\n <label className=\"col-md-2 control-label required\">\n Reason for Suspension\n </label>\n <div className=\"input-wrapper col-md-10\">\n <Select\n styles={{\n // Fixes the overlapping problem of the component\n menu: (provided) => ({ ...provided, zIndex: 9999 }),\n }}\n options={reasonOptions}\n value={_.find(reasonOptions, { value: reasonId })}\n onChange={({ value }) => onSetForm({ reasonId: value })}\n name=\"invoice\"\n placeholder=\"Select the reason\"\n />\n </div>\n </div>\n\n <div className=\"form-group row\">\n <div className=\"input-wrapper col-md-10\">\n <CheckBoxWithLabel\n checked={withImmediateEffect}\n onClick={(withImmediateEffect) =>\n onSetForm({ withImmediateEffect })\n }\n >\n With Immediate Effect?\n </CheckBoxWithLabel>\n </div>\n </div>\n\n {!withImmediateEffect ? (\n <div className=\"form-group row\">\n <label className=\"col-md-2 control-label required\">\n Effective From\n </label>\n <div className=\"input-wrapper col-md-10\">\n <ServiceCalendarDatePicker\n // minDate={dayjs(new Date())}\n visitDays={visitDays}\n open={open}\n setOpen={setOpen}\n onChange={(newValue) =>\n onSetForm({\n noVisitsExpectedAfter: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n </div>\n </div>\n ) : null}\n </>\n )\n\n return (\n <ActionFormLayout title={title} body={body} form={form} onSetForm={onSetForm} errors={errors}/>\n )\n\n\n\n // return (\n // <div>\n // <Stack\n // direction=\"row\"\n // justifyContent=\"flex-start\"\n // alignItems=\"center\"\n // spacing={2}\n // >\n // <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n // Request Service Suspension\n // </Typography>\n // <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n // / {serviceName}\n // </Typography>\n // </Stack>\n\n // <div className=\"mt-3\">\n // <div className=\"form-group row\">\n // <label className=\"col-md-2 control-label required\">\n // Reason for Suspension\n // </label>\n // <div className=\"input-wrapper col-md-10\">\n // <Select\n // styles={{\n // // Fixes the overlapping problem of the component\n // menu: (provided) => ({ ...provided, zIndex: 9999 }),\n // }}\n // options={reasonOptions}\n // value={_.find(reasonOptions, { value: reasonId })}\n // onChange={({ value }) => onSetForm({ reasonId: value })}\n // name=\"invoice\"\n // placeholder=\"Select the reason\"\n // />\n // </div>\n // </div>\n\n // <div className=\"form-group row\">\n // <div className=\"input-wrapper col-md-10\">\n // <CheckBoxWithLabel\n // checked={withImmediateEffect}\n // onClick={(withImmediateEffect) =>\n // onSetForm({ withImmediateEffect })\n // }\n // >\n // With Immediate Effect?\n // </CheckBoxWithLabel>\n // </div>\n // </div>\n\n // {!withImmediateEffect ? (\n // <div className=\"form-group row\">\n // <label className=\"col-md-2 control-label required\">\n // Effective From\n // </label>\n // <div className=\"input-wrapper col-md-10\">\n // <ServiceCalendarDatePicker\n // // minDate={dayjs(new Date())}\n // visitDays={visitDays}\n // open={open}\n // setOpen={setOpen}\n // onChange={(newValue) =>\n // onSetForm({\n // noVisitsExpectedAfter: newValue.format(\"DD/MM/YYYY\"),\n // })\n // }\n // />\n // </div>\n // </div>\n // ) : null}\n\n // <NotesSection\n // form={form}\n // onSetForm={onSetForm}\n // context={context}\n // contactPlaceholder=\"Who made the request?\"\n // contactLabel=\"Requested by\"\n // dateLabel=\"Requested on\"\n // dateValue={form?.requestedAt}\n // onChange={(newValue) =>\n // onSetForm({\n // requestedAt: newValue.format(\"DD/MM/YYYY\"),\n // })\n // }\n // />\n // </div>\n\n // <DebugButton {...form} />\n\n // <ModelErrors errors={errors} />\n // </div>\n // );\n};\n\nRequestSuspensionForm.propTypes = {\n form: PropTypes.shape({\n notes: PropTypes.string,\n withImmediateEffect: PropTypes.bool.isRequired,\n noVisitsExpectedAfter: PropTypes.string,\n }),\n errors: PropTypes.object,\n context: PropTypes.shape({\n serviceName: PropTypes.string.isRequired,\n vendorLocationCode: PropTypes.string.isRequired,\n nextVisits: PropTypes.arrayOf(\n PropTypes.shape({\n date: PropTypes.string.isRequired,\n status: PropTypes.string.isRequired,\n })\n ),\n suspensionReasons: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n })\n ),\n visitPlanName: PropTypes.string.isRequired,\n }),\n onSetForm: PropTypes.func.isRequired,\n};\n\nexport default RequestSuspensionForm;\n","import \"./styles.scss\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport PropTypes from \"prop-types\";\nimport Debugger from \"./Debugger\";\nimport { ModelErrors } from \"sharedComponents\";\nimport { Box, Stack, Typography } from \"@mui/material\";\nimport NotesSection from \"./common/NotesSection\";\nimport { formatDate } from \"sharedUtils\";\nimport ActionFormLayout from './common/ActionFormLayout';\nimport { TextMuted } from 'sharedComponents';\n\nconst CancelSuspensionForm = ({ form, context, errors, onSetForm }) => {\n const { serviceName, requestedAt } = context;\n\n\n const title = (\n <span>\n <strong>Cancel Suspension Request</strong>   <TextMuted> {serviceName}</TextMuted>\n </span>\n )\n\n const body = (\n <>\n <li>\n <strong>Vendor was requested on{\" \"}{formatDate(requestedAt)}{\" \"}to suspend service</strong>\n </li>\n </>\n )\n\n return (\n <ActionFormLayout title={title} body={body} form={form} onSetForm={onSetForm} errors={errors}/>\n )\n\n // return (\n // <div>\n // <Stack\n // direction=\"row\"\n // justifyContent=\"flex-start\"\n // alignItems=\"center\"\n // spacing={2}\n // >\n // <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n // Cancel Suspension Request\n // </Typography>\n // <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n // {serviceName}\n // </Typography>\n // </Stack>\n // <Box sx={{ marginTop: 1 }}>\n // <li>\n // <strong>Vendor was requested on{\" \"}{formatDate(requestedAt)}{\" \"}to suspend service</strong>\n // </li>\n // </Box>\n // <NotesSection\n // form={form}\n // onSetForm={onSetForm}\n // context={context}\n // contactLabel=\"Canceled By\"\n // contactPlaceholder=\"Who requested the cancellation?\"\n // dateLabel=\"Cancelled on\"\n // dateValue={form?.cancelledAt}\n // onChange={(newValue) =>\n // onSetForm({\n // cancelledAt: newValue.format(\"DD/MM/YYYY\"),\n // })\n // }\n // />\n // <DebugButton {...form} />\n // <ModelErrors errors={errors} />\n // </div>\n // );\n};\n\nCancelSuspensionForm.propTypes = {\n form: PropTypes.shape({\n notes: PropTypes.string,\n cancelledAt: PropTypes.string,\n }),\n errors: PropTypes.object,\n context: PropTypes.shape({\n noVisitsExpectedAfter: PropTypes.string,\n serviceName: PropTypes.string.isRequired,\n nextVisits: PropTypes.arrayOf(\n PropTypes.shape({\n date: PropTypes.string.isRequired,\n status: PropTypes.string.isRequired,\n })\n ),\n }),\n onSetForm: PropTypes.func.isRequired,\n};\nexport default CancelSuspensionForm;\n","import { useEffect, useState } from \"react\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport PropTypes from \"prop-types\";\nimport \"react-infinite-calendar/styles.css\";\nimport \"./styles.scss\";\nimport Debugger from \"./Debugger\";\nimport { CheckBoxWithLabel, ModelErrors } from \"sharedComponents\";\nimport { Box, Stack, Typography } from \"@mui/material\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport dayjs from \"dayjs\";\nimport NotesSection from \"./common/NotesSection\";\nimport { formatDate } from \"sharedUtils\";\nimport ActionFormLayout from './common/ActionFormLayout';\nimport { TextMuted } from 'sharedComponents';\n\nconst ConfirmSuspensionForm = ({ form, context, errors, onSetForm }) => {\n const { nextVisits, serviceName, noVisitsExpectedAfter, withImmediateEffect, requestedAt } = context;\n\n const [open, setOpen] = useState(false);\n const [value, setValue] = useState(dayjs());\n\n const visitDays = nextVisits?.map((visit) => {\n return { ...visit, date: dayjs(visit.date) };\n });\n\n\n useEffect(() => {\n if (withImmediateEffect) {\n const requestedDate = dayjs(requestedAt).format(\"DD/MM/YYYY\");\n setValue(dayjs(requestedAt));\n onSetForm({ confirmedNoVisitsExpectedAfter: requestedDate });\n } else {\n const formattedDate = dayjs(noVisitsExpectedAfter).format(\"DD/MM/YYYY\");\n setValue(dayjs(noVisitsExpectedAfter));\n onSetForm({ confirmedNoVisitsExpectedAfter: formattedDate });\n }\n }, [withImmediateEffect, noVisitsExpectedAfter]);\n\n\n\n const title = (\n <span>\n <strong>Confirm Suspension</strong>   <TextMuted> {serviceName}</TextMuted>\n </span>\n )\n\n const body = (\n <>\n {withImmediateEffect ? (\n <div>\n <Box sx={{ marginTop: 1 }}>\n Vendor was requested to suspend service with immediate effect\n </Box>\n <label>No Visits Expected After: {formatDate(requestedAt)}</label>\n </div>\n ) : (\n <div>\n <Box sx={{ marginTop: 1 }}>\n Vendor was requested to suspend service from: {formatDate(noVisitsExpectedAfter)}\n </Box>\n <label>No Visits Expected After</label>\n <ServiceCalendarDatePicker\n // minDate={dayjs(new Date())}\n visitDays={visitDays}\n open={open}\n setOpen={setOpen}\n value={value}\n onChange={(newValue) =>\n onSetForm({\n confirmedNoVisitsExpectedAfter: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n </div>\n )}\n </>\n )\n\n return (\n <ActionFormLayout title={title} body={body} form={form} onSetForm={onSetForm} errors={errors}/>\n )\n\n\n // return (\n // <div>\n // <Stack\n // direction=\"row\"\n // justifyContent=\"flex-start\"\n // alignItems=\"center\"\n // spacing={3}\n // >\n // <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n // Confirm Suspension\n // </Typography>\n // <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n // / {serviceName}\n // </Typography>\n // </Stack>\n // <div\n // className=\"mt-3\"\n // style={{ display: \"flex\", flexDirection: \"column\", gap: \"5px\" }}\n // >\n // {withImmediateEffect ? (\n // <div>\n // <Box sx={{ marginTop: 1 }}>\n // Vendor was requested to suspend service with immediate effect\n // </Box>\n // <label>No Visits Expected After: {formatDate(requestedAt)}</label>\n // </div>\n // ) : (\n // <div>\n // <Box sx={{ marginTop: 1 }}>\n // Vendor was requested to suspend service from: {formatDate(noVisitsExpectedAfter)}\n // </Box>\n // <label>No Visits Expected After</label>\n // <ServiceCalendarDatePicker\n // // minDate={dayjs(new Date())}\n // visitDays={visitDays}\n // open={open}\n // setOpen={setOpen}\n // value={value}\n // onChange={(newValue) =>\n // onSetForm({\n // confirmedNoVisitsExpectedAfter: newValue.format(\"DD/MM/YYYY\"),\n // })\n // }\n // />\n // </div>\n // )}\n // <NotesSection\n // form={form}\n // onSetForm={onSetForm}\n // context={context}\n // contactPlaceholder=\"Who requested the Suspension?\"\n // contactLabel=\"Confirmed by\"\n // dateLabel=\"Confirmed on\"\n // dateValue={form?.confirmedAt}\n // onChange={(newValue) =>\n // onSetForm({\n // confirmedAt: newValue.format(\"DD/MM/YYYY\"),\n // })\n // }\n // />\n // </div>\n\n // <DebugButton {...form} />\n\n // <ModelErrors errors={errors} />\n // </div>\n // );\n};\n\nConfirmSuspensionForm.propTypes = {\n form: PropTypes.shape({\n notes: PropTypes.string,\n confirmedNoVisitsExpectedAfter: PropTypes.string,\n }),\n errors: PropTypes.object,\n context: PropTypes.shape({\n noVisitsExpectedAfter: PropTypes.string,\n serviceName: PropTypes.string.isRequired,\n nextVisits: PropTypes.arrayOf(\n PropTypes.shape({\n date: PropTypes.string.isRequired,\n status: PropTypes.string.isRequired,\n })\n ),\n }),\n onSetForm: PropTypes.func.isRequired,\n};\n\nexport default ConfirmSuspensionForm;\n","import { useState } from \"react\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport \"./styles.scss\";\nimport Select from \"react-select\";\nimport Debugger from \"./Debugger\";\nimport { sanatizeDotProp, useBinFetch } from \"sharedUtils\";\nimport { Stack, Typography } from \"@mui/material\";\nimport { toArray } from \"lodash\";\nimport { BinTypeSelectorPopover } from \"./common/QuantitySelector\";\nimport CollectionUnitsTable from \"./common/CollectionUnitsTable\";\nimport DeliveryUnitsTable from \"./common/DeliveryUnitsTable\";\nimport _ from \"lodash\";\nimport { CheckBoxWithLabel, ModelErrors } from \"sharedComponents\";\nimport dotProp from \"dot-prop-immutable\";\nimport NotesSection from \"./common/NotesSection\";\nimport dayjs from \"dayjs\";\nimport ActionFormLayout from './common/ActionFormLayout';\nimport { TextMuted } from 'sharedComponents';\n\nconst d = dotProp;\n\ninterface ICollectionUnit {\n name: string;\n id: string;\n}\n\ninterface IRequestAdhocVisitForm {\n form: any;\n errors: any;\n context: {\n id: string;\n serviceName: string;\n serviceUuid: string;\n visitPlanName: string;\n availableBinTypeCodes: string[];\n collectionInstructions: ICollectionUnit[];\n availableCollectionServiceCodes: string[];\n availableDeliveryServiceCodes: string[];\n };\n onSetForm: any;\n}\n\nconst RequestAdhocVisitForm: React.FC<IRequestAdhocVisitForm> = ({\n form,\n context,\n errors,\n onSetForm,\n}) => {\n const {\n deliverAdditionalStock,\n deliveryUnits,\n collectionUnits,\n collectionInstructionId,\n } = form;\n\n const {\n serviceName,\n availableCollectionServiceCodes,\n availableDeliveryServiceCodes,\n collectionInstructions,\n } = context;\n\n const { binTypes, binGroups } = useBinFetch();\n\n const [anchorElemSpecOnly, setAnchorElemSpecOnly] = useState(null);\n const [anchorElemAddStock, setAnchorElemAddStock] = useState(null);\n\n const availableCollectionOptions = _.pick(\n binTypes,\n _.difference(\n availableCollectionServiceCodes,\n _.map(collectionUnits, \"serviceCode\")\n )\n );\n\n const availableDeliveryOptions = _.pick(\n binTypes,\n _.difference(\n availableDeliveryServiceCodes,\n _.map(deliveryUnits, \"serviceCode\")\n )\n );\n\n const updateDeliveryQuantity = (quantity, serviceCode) => {\n const newUnits = d.merge(deliveryUnits, sanatizeDotProp(serviceCode), {\n quantity,\n });\n onSetForm({ deliveryUnits: newUnits });\n };\n const updateCollectionQuantity = (quantity, serviceCode) => {\n const newUnits = d.merge(collectionUnits, sanatizeDotProp(serviceCode), {\n quantity,\n });\n onSetForm({ collectionUnits: newUnits });\n };\n const updateCollectionCollectAll = (collectAll, serviceCode) => {\n const newUnits = d.merge(collectionUnits, sanatizeDotProp(serviceCode), {\n collectAll,\n });\n onSetForm({ collectionUnits: newUnits });\n };\n const updateVisitActionId = (visitActionId, serviceCode) => {\n const newSpecs = d.merge(collectionUnits, sanatizeDotProp(serviceCode), {\n visitActionId,\n });\n onSetForm({ collectionUnits: newSpecs });\n };\n\n const collectionInstructionOptions = _.map(\n collectionInstructions,\n ({ name, id }) => {\n return { label: name, value: id };\n }\n );\n\n const deliveryOnly = collectionInstructionId == \"delivery_only\";\n\n const updateUnitHandler = (serviceCode) => {\n const newCollectionUnits = d.merge(\n collectionUnits,\n sanatizeDotProp(serviceCode),\n {\n visitActionId: \"collect_and_replace\",\n collectAll: false,\n quantity: 0,\n serviceCode: serviceCode,\n }\n );\n\n const newDeliveryUnits = d.merge(\n deliveryUnits,\n sanatizeDotProp(serviceCode),\n {\n quantity: 1,\n serviceCode,\n }\n );\n\n onSetForm({\n collectionUnits: newCollectionUnits,\n deliveryUnits: newDeliveryUnits,\n });\n };\n\n const removeUnit = (serviceCode) => {\n const newCollectionUnits = _.omit(collectionUnits, serviceCode);\n const newDeliveryUnits = _.omit(deliveryUnits, serviceCode);\n onSetForm({\n collectionUnits: newCollectionUnits,\n deliveryUnits: newDeliveryUnits,\n });\n };\n\n\n const title = (\n <span>\n <strong>Request Adhoc Visit</strong>   <TextMuted> {serviceName}</TextMuted>\n </span>\n )\n\n\n const body = (\n <>\n <div>\n <div className=\"form-group row\">\n <div className=\"input-wrapper col-md-3\">\n <Select\n styles={{\n // Fixes the overlapping problem of the component\n menu: (provided) => ({ ...provided, zIndex: 10000 }),\n }}\n options={collectionInstructionOptions}\n value={_.find(collectionInstructionOptions, {\n value: collectionInstructionId,\n })}\n onChange={({ value }) =>\n onSetForm({ collectionInstructionId: value })\n }\n />\n </div>\n <div className=\"input-wrapper col-md-5\">\n {!deliveryOnly ? (\n <CheckBoxWithLabel\n checked={deliverAdditionalStock}\n onClick={(deliverAdditionalStock) =>\n onSetForm({ deliverAdditionalStock })\n }\n >\n Deliver Additional Stock?\n </CheckBoxWithLabel>\n ) : (\n <strong>Deliver the following</strong>\n )}\n </div>\n </div>\n {collectionInstructionId == \"spec_only\" ? (\n <CollectionUnitsTable\n headerDetailsHandler={(e) => setAnchorElemSpecOnly(e.currentTarget)}\n collectionUnits={collectionUnits}\n deliveryUnits={deliveryUnits}\n binTypes={binTypes}\n binGroups={binGroups}\n updateCollectionQuantity={updateCollectionQuantity}\n updateCollectionCollectAll={updateCollectionCollectAll}\n deliverAdditionalStock={deliverAdditionalStock}\n updateDeliveryQuantity={updateDeliveryQuantity}\n updateVisitActionId={updateVisitActionId}\n removeUnit={removeUnit}\n availableCollectionOptions={toArray(availableCollectionOptions)}\n />\n ) : null}\n\n {(deliverAdditionalStock || deliveryOnly) &&\n collectionInstructionId !== \"spec_only\" ? (\n <DeliveryUnitsTable\n headerDetailsHandler={(e) => setAnchorElemAddStock(e.currentTarget)}\n deliveryUnits={deliveryUnits}\n binTypes={binTypes}\n binGroups={binGroups}\n updateDeliveryQuantity={updateDeliveryQuantity}\n removeUnit={removeUnit}\n availableDeliveryOptions={toArray(availableDeliveryOptions)}\n />\n ) : null}\n </div>\n\n <BinTypeSelectorPopover\n anchorEl={anchorElemSpecOnly}\n setAnchorEl={setAnchorElemSpecOnly}\n options={toArray(availableCollectionOptions)}\n addBinHandler={updateUnitHandler}\n />\n\n <BinTypeSelectorPopover\n anchorEl={anchorElemAddStock}\n setAnchorEl={setAnchorElemAddStock}\n options={toArray(availableDeliveryOptions)}\n addBinHandler={updateUnitHandler}\n />\n </>\n )\n\n return (\n <ActionFormLayout title={title} body={body} form={form} onSetForm={onSetForm} errors={errors}/>\n )\n\n // return (\n // <div>\n // <Stack\n // direction=\"row\"\n // justifyContent=\"flex-start\"\n // alignItems=\"center\"\n // spacing={3}\n // >\n // <DebugButton {...{ form, context, errors }} />\n // <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n // Request Adhoc Visit\n // </Typography>\n // <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n // / {serviceName}\n // </Typography>\n // </Stack>\n // <div className=\"mt-4\">\n // <div className=\"form-group row\">\n // <div className=\"input-wrapper col-md-3\">\n // <Select\n // styles={{\n // // Fixes the overlapping problem of the component\n // menu: (provided) => ({ ...provided, zIndex: 10000 }),\n // }}\n // options={collectionInstructionOptions}\n // value={_.find(collectionInstructionOptions, {\n // value: collectionInstructionId,\n // })}\n // onChange={({ value }) =>\n // onSetForm({ collectionInstructionId: value })\n // }\n // />\n // </div>\n // <div className=\"input-wrapper col-md-5\">\n // {!deliveryOnly ? (\n // <CheckBoxWithLabel\n // checked={deliverAdditionalStock}\n // onClick={(deliverAdditionalStock) =>\n // onSetForm({ deliverAdditionalStock })\n // }\n // >\n // Deliver Additional Stock?\n // </CheckBoxWithLabel>\n // ) : (\n // <strong>Deliver the following</strong>\n // )}\n // </div>\n // </div>\n // {collectionInstructionId == \"spec_only\" ? (\n // <CollectionUnitsTable\n // headerDetailsHandler={(e) => setAnchorElemSpecOnly(e.currentTarget)}\n // collectionUnits={collectionUnits}\n // deliveryUnits={deliveryUnits}\n // binTypes={binTypes}\n // binGroups={binGroups}\n // updateCollectionQuantity={updateCollectionQuantity}\n // updateCollectionCollectAll={updateCollectionCollectAll}\n // deliverAdditionalStock={deliverAdditionalStock}\n // updateDeliveryQuantity={updateDeliveryQuantity}\n // updateVisitActionId={updateVisitActionId}\n // removeUnit={removeUnit}\n // availableCollectionOptions={toArray(availableCollectionOptions)}\n // />\n // ) : null}\n\n // {(deliverAdditionalStock || deliveryOnly) &&\n // collectionInstructionId !== \"spec_only\" ? (\n // <DeliveryUnitsTable\n // headerDetailsHandler={(e) => setAnchorElemAddStock(e.currentTarget)}\n // deliveryUnits={deliveryUnits}\n // binTypes={binTypes}\n // binGroups={binGroups}\n // updateDeliveryQuantity={updateDeliveryQuantity}\n // removeUnit={removeUnit}\n // availableDeliveryOptions={toArray(availableDeliveryOptions)}\n // />\n // ) : null}\n // </div>\n\n // <BinTypeSelectorPopover\n // anchorEl={anchorElemSpecOnly}\n // setAnchorEl={setAnchorElemSpecOnly}\n // options={toArray(availableCollectionOptions)}\n // addBinHandler={updateUnitHandler}\n // />\n\n // <BinTypeSelectorPopover\n // anchorEl={anchorElemAddStock}\n // setAnchorEl={setAnchorElemAddStock}\n // options={toArray(availableDeliveryOptions)}\n // addBinHandler={updateUnitHandler}\n // />\n\n // <NotesSection\n // form={form}\n // onSetForm={onSetForm}\n // context={context}\n // contactLabel=\"Requested By\"\n // contactPlaceholder=\"Who made the request?\"\n // dateLabel=\"Requested On\"\n // // Initial value is not triggering the onChange\n // dateValue={form?.requestedAt}\n // onChange={(newValue) =>\n // onSetForm({\n // requestedAt: newValue.format(\"DD/MM/YYYY\"),\n // })\n // }\n // />\n // <DebugButton {...form} />\n // <ModelErrors errors={errors} />\n // </div>\n // );\n};\n\nexport default RequestAdhocVisitForm;\n","import BinDot from \"service/BinDot\";\nimport {\n CollectionQuantitySelector,\n HeaderDetails,\n QuantitySelector,\n} from \"./QuantitySelector\";\nimport VisitActionSelector from \"../VisitActionSelector.jsx\";\nimport RemoveIcon from \"@mui/icons-material/Remove\";\nimport {\n IconButton,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TableRow,\n} from \"@mui/material\";\nimport _ from \"lodash\";\n\nconst CollectionUnitsTable = ({\n headerDetailsHandler,\n collectionUnits,\n deliveryUnits,\n binTypes,\n binGroups,\n updateCollectionQuantity,\n updateCollectionCollectAll,\n deliverAdditionalStock,\n updateDeliveryQuantity,\n updateVisitActionId,\n removeUnit,\n availableCollectionOptions,\n}) => {\n const collectionRows = _.map(\n collectionUnits,\n ({ serviceCode, collectAll, visitActionId, quantity: collectionQty }) => {\n const bin = binTypes[serviceCode];\n\n const { quantity: deliveryQty } = deliveryUnits[serviceCode];\n // Uncomment this to load value from specifications\n // const quantity = specifications[serviceCode]?.quantity;\n\n const binGroup = binGroups[bin?.binGroupId];\n return (\n <TableRow key={serviceCode}>\n <TableCell scope=\"row\">\n <BinDot binGroup={binGroup} tooltipName={true} />\n </TableCell>\n <TableCell>\n {bin?.imageUrl && (\n <img\n src={bin?.imageUrl}\n alt={bin?.name}\n style={{ marginRight: \"10px\", width: \"30px\", height: \"30px\" }}\n />\n )}\n {bin?.name}\n </TableCell>\n <TableCell>{serviceCode}</TableCell>\n <TableCell>\n <CollectionQuantitySelector\n quantity={collectionQty}\n collectAll={collectAll}\n onChangeQuantity={(q) =>\n updateCollectionQuantity(Number(q), serviceCode)\n }\n onChangeCollectAll={(c) =>\n updateCollectionCollectAll(c, serviceCode)\n }\n />\n </TableCell>\n {deliverAdditionalStock && (\n <TableCell style={{ width: \"10%\" }}>\n <QuantitySelector\n quantity={deliveryQty}\n onChange={(q) => updateDeliveryQuantity(q, serviceCode)}\n />\n </TableCell>\n )}\n <TableCell style={{ width: \"30%\" }}>\n <VisitActionSelector\n visitActionId={visitActionId}\n defaultValue=\"collect_and_replace\"\n possibleVisitActions={bin?.possibleVisitActions}\n onChange={(vaId) => updateVisitActionId(vaId, serviceCode)}\n />\n </TableCell>\n\n <TableCell>\n <IconButton\n sx={{\n m: 0,\n p: 0,\n }}\n >\n <RemoveIcon\n onClick={(_e) => removeUnit(serviceCode)}\n sx={{\n cursor: \"pointer\",\n fontSize: \"35px\",\n color: \"red\",\n display: \"block\",\n margin: \"auto\",\n }}\n />\n </IconButton>\n </TableCell>\n </TableRow>\n );\n }\n );\n return (\n <>\n <HeaderDetails\n onClick={headerDetailsHandler}\n noOptions={availableCollectionOptions.length === 0}\n />\n <TableContainer\n sx={{\n marginY: 1,\n overflow: \"hidden\",\n \"& .MuiTableCell-root\": {\n fontSize: \"11px\",\n fontWeight: \"inherit\",\n color: \"inherit\",\n },\n }}\n >\n <Table size=\"small\">\n <TableHead>\n <TableRow\n sx={{\n textWrap: \"nowrap\",\n fontWeight: \"bold\",\n color: \"#828B98\",\n border: \"1px solid transparent\",\n }}\n >\n <TableCell>Type</TableCell>\n <TableCell>Name</TableCell>\n <TableCell>Code</TableCell>\n <TableCell>Quantity</TableCell>\n {deliverAdditionalStock && (\n <TableCell>Deliver Additional Units</TableCell>\n )}\n <TableCell>Visit Action</TableCell>\n <TableCell></TableCell>\n </TableRow>\n </TableHead>\n <TableBody\n sx={{\n \"& .MuiTableCell-root\": {\n borderTop: \"1px solid #F1F1F5\",\n borderBottom: \"1px solid #F1F1F5\",\n padding: 0,\n },\n }}\n >\n {collectionRows}\n </TableBody>\n </Table>\n </TableContainer>\n </>\n );\n};\n\nexport default CollectionUnitsTable;\n","import PropTypes from \"prop-types\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport \"./styles.scss\";\nimport Debugger from \"./Debugger\";\nimport { ModelErrors } from \"sharedComponents\";\nimport dotProp from \"dot-prop-immutable\";\nimport { sanatizeDotProp, useBinFetch } from \"sharedUtils\";\nimport { Box, Stack, Typography } from \"@mui/material\";\nimport _, { toArray } from \"lodash\";\nimport DeliveryUnitsTable from \"./common/DeliveryUnitsTable\";\nimport { useState } from \"react\";\nimport { BinTypeSelectorPopover } from \"./common/QuantitySelector\";\nimport NotesSection from \"./common/NotesSection\";\nimport dayjs from \"dayjs\";\n\nvar d = dotProp;\n\nconst RequestStockDeliveryForm = ({ form, context, errors, onSetForm }) => {\n const { deliveryUnits } = form;\n\n const [anchorElemAddStock, setAnchorElemAddStock] = useState(null);\n\n const { visitPlanName, serviceName, availableBinTypeCodes } = context;\n\n const {\n binTypes,\n binGroups,\n isLoading: binsloading,\n } = useBinFetch(availableBinTypeCodes);\n\n if (binsloading) {\n return null;\n }\n\n const availableDeliveryOptions = _.pick(\n binTypes,\n _.difference(availableBinTypeCodes, _.map(deliveryUnits, \"serviceCode\"))\n );\n\n const updateDeliveryQuantity = (quantity, serviceCode) => {\n const newUnits = d.merge(deliveryUnits, sanatizeDotProp(serviceCode), {\n quantity,\n });\n onSetForm({ deliveryUnits: newUnits });\n };\n\n const removeDeliveryUnit = (serviceCode) => {\n // Using _.omit to create a new object without the specified serviceCode\n const updatedDeliveryUnits = _.omit(deliveryUnits, serviceCode);\n onSetForm({ deliveryUnits: updatedDeliveryUnits });\n };\n\n const updateDeliveryUnitHandler = (serviceCode) => {\n const newSpecs = d.merge(deliveryUnits, sanatizeDotProp(serviceCode), {\n quantity: 0,\n serviceCode,\n });\n\n onSetForm({ deliveryUnits: newSpecs });\n };\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={3}\n >\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Request Delivery of Stock next {visitPlanName} visit{\" \"}\n </Typography>\n <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n / {serviceName}\n </Typography>\n </Stack>\n\n <Box mt={2}>\n <DeliveryUnitsTable\n headerDetailsHandler={(e) => setAnchorElemAddStock(e.currentTarget)}\n deliveryUnits={deliveryUnits}\n binTypes={binTypes}\n binGroups={binGroups}\n updateDeliveryQuantity={updateDeliveryQuantity}\n removeUnit={removeDeliveryUnit}\n availableDeliveryOptions={toArray(availableDeliveryOptions)}\n />\n {toArray(availableDeliveryOptions).length > 0 && (\n <BinTypeSelectorPopover\n anchorEl={anchorElemAddStock}\n setAnchorEl={setAnchorElemAddStock}\n options={toArray(availableDeliveryOptions)}\n addBinHandler={updateDeliveryUnitHandler}\n />\n )}\n <NotesSection\n form={form}\n onSetForm={onSetForm}\n context={context}\n contactPlaceholder=\"Who made the request?\"\n contactLabel=\"Requested by\"\n dateLabel=\"Requested on\"\n dateValue={form?.requestedAt}\n onChange={(newValue) =>\n onSetForm({\n requestedAt: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n </Box>\n <DebugButton {...form} />\n <ModelErrors errors={errors} />\n </div>\n );\n};\n\nRequestStockDeliveryForm.propTypes = {\n form: PropTypes.object.isRequired,\n errors: PropTypes.object,\n context: PropTypes.shape({\n serviceName: PropTypes.string.isRequired,\n serviceUuid: PropTypes.string.isRequired,\n visitPlanName: PropTypes.string.isRequired,\n availableBinTypeCodes: PropTypes.arrayOf(PropTypes.string).isRequired,\n }),\n onSetForm: PropTypes.func.isRequired,\n};\n\nexport default RequestStockDeliveryForm;\n","import { Box, Stack, TableCell, TableRow, Typography } from \"@mui/material\";\nimport { TextMuted } from \"sharedComponents\";\nimport { map } from \"lodash\";\nimport BinDot from \"service/BinDot\";\nimport { ModelErrors } from \"sharedComponents\";\nimport { useBinFetch } from \"sharedUtils\";\nimport CustomTable from \"./common/CustomTable\";\nimport \"./styles.scss\";\nimport NotesSection from \"./common/NotesSection\";\nimport ActionFormLayout from './common/ActionFormLayout';\n\n\nconst CancelStockDeliveryForm = ({ form, context, errors, onSetForm }) => {\n const {\n visitPlanName,\n serviceName,\n requestDeliveryUnits,\n requestDeliveryCodes,\n } = context;\n\n const { binTypes, binGroups } = useBinFetch(requestDeliveryCodes);\n\n const rows = map(requestDeliveryUnits, ({ serviceCode, quantity }) => {\n const binType = binTypes[serviceCode];\n const binGroup = binGroups[binType?.binGroupId];\n\n return (\n <TableRow key={binType?.serviceCode}>\n <TableCell>\n <BinDot\n binGroup={binGroup}\n tooltipName={true}\n tooltipPlace=\"top\"\n showImg\n {...binType}\n />\n </TableCell>\n <TableCell>{binType?.name}</TableCell>\n <TableCell>{binType?.serviceCode}</TableCell>\n <TableCell>{quantity}</TableCell>\n </TableRow>\n );\n });\n\n\n const title = (\n <span>\n <strong>Cancel Stock Delivery Request for the Next Visit</strong>   <TextMuted> {serviceName}</TextMuted>\n </span>\n )\n\n\n const body = (\n <>\n <CustomTable rows={rows} />\n </>\n )\n\n return (\n <ActionFormLayout title={title} body={body} form={form} onSetForm={onSetForm} errors={errors}/>\n )\n\n\n\n // return (\n // <div>\n // <Stack\n // direction=\"row\"\n // justifyContent=\"flex-start\"\n // alignItems=\"center\"\n // spacing={2}\n // >\n // {\" \"}\n // <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n // Cancel the Stock Delivery Request for the Next Visit\n // </Typography>\n // <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n // {serviceName}\n // </Typography>\n // </Stack>\n // <Box sx={{ display: \"flex\", flexDirection: \"column\", gap: 2, mt: 2 }}>\n // <CustomTable rows={rows} />\n // <NotesSection\n // form={form}\n // onSetForm={onSetForm}\n // context={context}\n // contactLabel=\"Cancelled By\"\n // contactPlaceholder=\"Who requested the cancellation?\"\n // dateLabel=\"Cancelled on\"\n // dateValue={form?.cancelledAt}\n // onChange={(newValue) =>\n // onSetForm({\n // cancelledAt: newValue.format(\"DD/MM/YYYY\"),\n // })\n // }\n // />\n // <ModelErrors errors={errors} />\n // </Box>\n // </div>\n // );\n};\n\nexport default CancelStockDeliveryForm;\n","import { Box, Stack, TableCell, TableRow, Typography } from \"@mui/material\";\nimport { TextMuted } from \"sharedComponents\";\nimport dayjs from \"dayjs\";\nimport _ from \"lodash\";\nimport { useState } from \"react\";\nimport \"react-infinite-calendar/styles.css\";\nimport BinDot from \"service/BinDot\";\n// import { ModelErrors } from \"/sharedComponents\";\nimport { useBinFetch } from \"sharedUtils\";\nimport CustomTable from \"./common/CustomTable\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport \"./styles.scss\";\nimport NotesSection from \"./common/NotesSection\";\nimport { ModelErrors } from \"sharedComponents\";\nimport ActionFormLayout from './common/ActionFormLayout';\n\nvar ConfirmStockDeliveryForm = ({ form, context, errors, onSetForm }) => {\n const [open, setOpen] = useState(false);\n\n var {\n visitPlanName,\n serviceName,\n requestDeliveryCodes,\n requestDeliveryUnits,\n nextVisits,\n } = context;\n\n const { binTypes, binGroups } = useBinFetch(requestDeliveryCodes);\n\n const visitDays = nextVisits?.map((visit) => {\n return { ...visit, date: dayjs(visit.date) };\n });\n\n const rows = _.map(requestDeliveryUnits, ({ serviceCode, quantity }) => {\n const binType = binTypes[serviceCode];\n const binGroup = binGroups[binType?.binGroupId];\n\n return (\n <TableRow key={serviceCode}>\n <TableCell scope=\"row\">\n <BinDot\n binGroup={binGroup}\n tooltipName={true}\n tooltipPlace=\"top\"\n showImg\n {...binType}\n />\n </TableCell>\n <TableCell>{binType?.name}</TableCell>\n <TableCell>{serviceCode}</TableCell>\n <TableCell>{quantity}</TableCell>\n </TableRow>\n );\n });\n\n\n const title = (\n <span>\n <strong>Confirm Stock Delivery Request for the Next Visit</strong>   <TextMuted> {serviceName}</TextMuted>\n </span>\n )\n\n const body = (\n <>\n <div>\n <label>Confirmed for</label>\n <ServiceCalendarDatePicker\n open={open}\n setOpen={setOpen}\n visitDays={visitDays}\n onChange={(newValue) =>\n onSetForm({ date: newValue.format(\"DD/MM/YYYY\") })\n }\n />\n </div>\n <CustomTable\n rows={rows}\n headers={[\"Type\", \"Name\", \"Code\", \"Confirm Delivery of # Units\"]}\n />\n </>\n )\n\n return (\n <ActionFormLayout title={title} body={body} form={form} onSetForm={onSetForm} errors={errors}/>\n )\n\n\n // return (\n // <div>\n // <Stack\n // direction=\"row\"\n // justifyContent=\"flex-start\"\n // alignItems=\"center\"\n // spacing={2}\n // >\n // <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n // Confirm the Stock Delivery Request for the Next Visit\n // </Typography>\n // <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n // {serviceName}\n // </Typography>\n // </Stack>\n\n // <Box sx={{ display: \"flex\", flexDirection: \"column\", gap: 2, mt: 2 }}>\n // <div>\n // <label>Confirmed for</label>\n // <ServiceCalendarDatePicker\n // open={open}\n // setOpen={setOpen}\n // visitDays={visitDays}\n // onChange={(newValue) =>\n // onSetForm({ date: newValue.format(\"DD/MM/YYYY\") })\n // }\n // />\n // </div>\n // <CustomTable\n // rows={rows}\n // headers={[\"Type\", \"Name\", \"Code\", \"Confirm Delivery of # Units\"]}\n // />\n // </Box>\n // <NotesSection\n // form={form}\n // onSetForm={onSetForm}\n // context={context}\n // contactLabel=\"Confirmed by\"\n // contactPlaceholder=\"Who confimed the request?\"\n // dateLabel=\"Received on\"\n // dateValue={form?.confirmedAt}\n // onChange={(newValue) =>\n // onSetForm({\n // confirmedAt: newValue.format(\"DD/MM/YYYY\"),\n // })\n // }\n // />\n // <ModelErrors errors={errors} />\n // </div>\n // );\n};\n\nexport default ConfirmStockDeliveryForm;\n","import PropTypes from \"prop-types\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport \"./styles.scss\";\nimport Debugger from \"./Debugger\";\nimport { ModelErrors } from \"sharedComponents\";\nimport { Box, Stack, Typography } from \"@mui/material\";\nimport { TextMuted } from \"sharedComponents\";\nimport CollectionInstruction from \"service/CollectionInstruction\";\nimport DeliveryInstruction from \"service/DeliveryInstruction\";\nimport NotesSection from \"./common/NotesSection\";\nimport BinReportTable from \"./common/BinReportTable\";\nimport ActionFormLayout from './common/ActionFormLayout';\n\nconst CancelAdhocVisitForm = ({ form, context, errors, onSetForm }) => {\n const {\n visitPlanName,\n serviceName,\n requestDeliveryUnits,\n requestCollectionUnits,\n requestDeliveryCodes,\n requestCollectionCodes,\n requestClearAll,\n } = context;\n\n\n const title = (\n <span>\n <strong>Cancel Adhoc Visit Date</strong>   <TextMuted> {serviceName}</TextMuted>\n </span>\n )\n\n\n const body = (\n <>\n <Box sx={{ mt: 1 }}>\n <CollectionInstruction\n {...context}\n collectionUnits={requestCollectionUnits}\n clearAll={requestClearAll}\n requestCollectionCodes={requestCollectionCodes}\n status={\"cancelation\"}\n />\n\n <DeliveryInstruction\n deliveryUnits={requestDeliveryUnits}\n requestDeliveryCodes={requestDeliveryCodes}\n status={\"cancelation\"}\n {...context}\n />\n </Box>\n </>\n )\n\n\n return (\n <ActionFormLayout title={title} body={body} form={form} onSetForm={onSetForm} errors={errors}/>\n )\n\n\n\n\n // return (\n // <div>\n // <Stack\n // direction=\"row\"\n // justifyContent=\"flex-start\"\n // alignItems=\"center\"\n // spacing={2}\n // >\n // <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n // Cancel Adhoc Visit Request\n // </Typography>\n // <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n // {serviceName}\n // </Typography>\n // </Stack>\n\n // <Box sx={{ mt: 1 }}>\n // <CollectionInstruction\n // {...context}\n // collectionUnits={requestCollectionUnits}\n // clearAll={requestClearAll}\n // requestCollectionCodes={requestCollectionCodes}\n // status={\"cancelation\"}\n // />\n\n // <DeliveryInstruction\n // deliveryUnits={requestDeliveryUnits}\n // requestDeliveryCodes={requestDeliveryCodes}\n // status={\"cancelation\"}\n // {...context}\n // />\n // </Box>\n // <NotesSection\n // form={form}\n // onSetForm={onSetForm}\n // context={context}\n // contactLabel=\"Canceled By\"\n // contactPlaceholder=\"Who requested the cancellation?\"\n // dateLabel=\"Cancelled on\"\n // dateValue={form?.cancelledAt}\n // onChange={(newValue) =>\n // onSetForm({\n // cancelledAt: newValue.format(\"DD/MM/YYYY\"),\n // })\n // }\n // />\n // <DebugButton {...form} />\n // <ModelErrors errors={errors} />\n // </div>\n // );\n};\n\nCancelAdhocVisitForm.propTypes = {\n form: PropTypes.object.isRequired,\n errors: PropTypes.object,\n context: PropTypes.shape({\n serviceName: PropTypes.string.isRequired,\n vendorLocationCode: PropTypes.string.isRequired,\n visitPlanName: PropTypes.string,\n binGroups: PropTypes.objectOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n name: PropTypes.string.isRequired,\n legendFillColor: PropTypes.string.isRequired,\n legendBorderColor: PropTypes.string.isRequired,\n })\n ).isRequired,\n binTypes: PropTypes.objectOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n name: PropTypes.string.isRequired,\n groupName: PropTypes.string.isRequired,\n binGroupId: PropTypes.number.isRequired,\n })\n ).isRequired,\n requestDeliveryUnits: PropTypes.objectOf(\n PropTypes.shape({\n quantity: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n serviceCode: PropTypes.string.isRequired,\n })\n ),\n requestCollectionUnits: PropTypes.objectOf(\n PropTypes.shape({\n quantity: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n serviceCode: PropTypes.string.isRequired,\n visitActionName: PropTypes.string.isRequired,\n })\n ),\n requestClearAll: PropTypes.bool.isRequired,\n }),\n onSetForm: PropTypes.func.isRequired,\n};\n\nexport default CancelAdhocVisitForm;\n","import {\n Box,\n FormControl,\n Grid,\n MenuItem,\n Select,\n Stack,\n Typography,\n} from \"@mui/material\";\nimport { isEmpty } from \"lodash\";\nimport { ModelErrors } from \"sharedComponents\";\nimport { formatDate } from \"sharedUtils\";\nimport NotesSection from \"./common/NotesSection\";\nimport BinCollectionReportTable from \"./common/BinReportTable\";\n\nconst ClientFeedbackOnFailedVisitReportForm = ({\n form,\n context,\n errors,\n onSetForm,\n}) => {\n const { collectionResultSlug, reportUuid } = form;\n\n const {\n serviceName,\n // deliveryResults,\n // collectionResults,\n inUseBinGroups,\n failureDate,\n // visitPlanName,\n } = context;\n\n const showPartialCollected =\n !isEmpty(inUseBinGroups) &&\n [\"partial_failure\"].includes(collectionResultSlug);\n\n // const collectionHandler = (slug) =>\n // onSetForm({\n // collectionResultSlug: slug,\n // });\n //\n // const deliveryHandler = (slug) =>\n // onSetForm({\n // deliveryResultSlug: slug,\n // });\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={3}\n >\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Client Feedback\n </Typography>\n <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n / {serviceName}\n </Typography>\n </Stack>\n\n <Grid\n container\n spacing={1}\n direction=\"row\"\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n <Grid\n item\n xs\n sx={{\n \"& .MuiTypography-root\": {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n },\n }}\n >\n <Box>\n <Typography>Failure Date</Typography>\n {formatDate(failureDate)}\n </Box>\n </Grid>\n\n <Grid\n item\n xs\n sx={{\n display: \"flex\",\n justifyContent: \"space-between\",\n \"& .MuiTypography-root\": {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n },\n \"& > *\": {\n flex: 1,\n },\n }}\n >\n {/* <div>\n <Typography variant=\"h6\" fontWeight={\"bold\"}>\n Was waste collected\n </Typography>\n <VisitFailureChips\n showDeliveryReasonFailure={false}\n onChangeSelect={(event) =>\n onSetForm({\n collectionFailureReasonSlug: event.target.value,\n })\n }\n />\n </div>\n <div>\n <Typography variant=\"h6\" fontWeight={\"bold\"}>\n Was waste delivered\n </Typography>\n <VisitFailureChips\n options={deliveryResults}\n selectedSlug={deliveryResultSlug}\n onChange={deliveryHandler}\n showReasonFailure={false}\n onChangeSelect={(event) =>\n onSetForm({\n deliveryFailureReasonSlug: event.target.value,\n })\n }\n />\n </div> */}\n </Grid>\n\n {showPartialCollected && (\n <BinCollectionReportTable\n inUseBinGroups={inUseBinGroups}\n onSetForm={onSetForm}\n showCollectionReasonFailure={false}\n />\n )}\n </Grid>\n\n <NotesSection form={form} onSetForm={onSetForm} />\n\n <ModelErrors errors={errors} />\n </div>\n );\n};\n\nexport default ClientFeedbackOnFailedVisitReportForm;\n","import { Box, Grid, MenuItem, Select, Stack, Typography } from \"@mui/material\";\nimport YesNoSelect from \"components/YesNoSelect\";\nimport dayjs from \"dayjs\";\nimport { isEmpty } from \"lodash\";\nimport { useState } from \"react\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport { ModelErrors } from \"sharedComponents\";\nimport { formatDate } from \"sharedUtils\";\nimport BinReportTable from \"./common/BinReportTable\";\nimport NotesSection from \"./common/NotesSection\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\n\nconst VendorFeedbackOnFailedVisitReportForm = ({\n form,\n context,\n errors,\n onSetForm,\n}) => {\n const [openReattemptDate, setOpenReattemptDate] = useState(false);\n\n const {\n driverTurnUp,\n collectionFailureReasonSlug,\n deliveryFailureReasonSlug,\n reattemptDateProvided,\n collectionResultSlug,\n deliveryResultSlug,\n binGroupCollectionStatus,\n } = form;\n\n const {\n serviceName,\n deliveryFailureReasons,\n collectionFailureReasons,\n nextVisits,\n failureDate,\n inUseBinGroups,\n } = context;\n\n const selectValue =\n !driverTurnUp && collectionFailureReasonSlug !== deliveryFailureReasonSlug\n ? \"null\"\n : collectionFailureReasonSlug;\n\n const visitDays = nextVisits?.map((visit) => {\n return { ...visit, date: dayjs(visit.date) };\n });\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={3}\n sx={{ \"& .MuiTypography-root\": { fontWeight: \"bold\" } }}\n >\n <Typography variant=\"h5\">Failed Visit Update</Typography>\n <Typography color=\"grey\" variant=\"h6\">\n / {serviceName}\n </Typography>\n </Stack>\n\n <Box\n sx={{\n display: \"flex\",\n gap: 2,\n mt: 1,\n \"& .MuiTypography-root\": {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n },\n \"& .MuiTextField-root\": { width: \"fit-content\" },\n }}\n >\n <Box>\n <Typography>Failure Date</Typography>\n {formatDate(failureDate)}\n </Box>\n <Box>\n <YesNoSelect\n label=\"Did the driver turn up?\"\n onChange={(driverTurnUp) =>\n onSetForm({\n driverTurnUp,\n })\n }\n value={driverTurnUp}\n />\n </Box>\n {!driverTurnUp && (\n <Select\n size=\"small\"\n displayEmpty\n value={selectValue}\n onChange={(event) => {\n onSetForm({\n collectionFailureReasonSlug: event.target.value,\n deliveryFailureReasonSlug: event.target.value,\n });\n }}\n >\n <MenuItem value={null} disabled>\n Reason for failure\n </MenuItem>\n {collectionFailureReasons.map((reason) => (\n <MenuItem\n key={reason.slug}\n value={reason.slug}\n sx={{ fontSize: \"12px\" }}\n >\n {reason.name}\n </MenuItem>\n ))}\n </Select>\n )}\n </Box>\n {driverTurnUp && (\n <Box\n sx={{\n display: \"flex\",\n mt: 1,\n \"& > .MuiBox-root\": {\n width: \"50%\",\n },\n }}\n >\n <Box>\n {!isEmpty(inUseBinGroups) && (\n <BinReportTable\n inUseBinGroups={inUseBinGroups}\n initialStatus={collectionResultSlug}\n onSetForm={onSetForm}\n failureReasonSlug={collectionFailureReasonSlug}\n failureReasons={collectionFailureReasons}\n initialBinGroupStatus={binGroupCollectionStatus}\n mode=\"collection\"\n />\n )}\n </Box>\n <Box>\n <BinReportTable\n inUseBinGroups={[]}\n initialStatus={deliveryResultSlug}\n onSetForm={onSetForm}\n failureReasonSlug={deliveryFailureReasonSlug}\n failureReasons={deliveryFailureReasons}\n mode=\"delivery\"\n />\n </Box>\n </Box>\n )}\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 1,\n mt: driverTurnUp ? 0 : 1,\n \"& .MuiTypography-root\": {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n },\n \"& .MuiTextField-root\": { width: \"fit-content\" },\n }}\n >\n <YesNoSelect\n label=\"Did the vendor confirm the re-attempt date?\"\n onChange={(reattemptDateProvided) =>\n onSetForm({\n reattemptDateProvided,\n })\n }\n value={reattemptDateProvided}\n />\n {reattemptDateProvided && (\n <ServiceCalendarDatePicker\n open={openReattemptDate}\n visitDays={visitDays}\n setOpen={setOpenReattemptDate}\n onChange={(newValue) => {\n onSetForm({\n reattemptDate: newValue.format(\"DD/MM/YYYY\"),\n });\n }}\n />\n )}\n </Box>\n\n <NotesSection form={form} onSetForm={onSetForm} />\n <ModelErrors errors={errors} />\n <DebugButton {...form} />\n </div>\n );\n};\n\nexport default VendorFeedbackOnFailedVisitReportForm;\n","import { Box, Stack, Typography } from \"@mui/material\";\nimport { useState } from \"react\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport dayjs from \"dayjs\";\nimport ThreeColumnFlexBox from \"./common/ThreeColumnFlexBox\";\nimport NotesSection from \"./common/NotesSection\";\nimport { ModelErrors } from \"sharedComponents\";\n\nconst ConfirmVisitFailureReattemptDateForm = ({\n form,\n context,\n errors,\n onSetForm,\n}) => {\n const [open, setOpen] = useState(false);\n\n const { serviceName, visitPlanName, nextVisits } = context;\n\n const visitDays = nextVisits?.map((visit) => {\n return { ...visit, date: dayjs(visit.date) };\n });\n\n return (\n <>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={3}\n >\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Confirm Re-attempt Date\n </Typography>\n <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n / {serviceName}\n </Typography>\n </Stack>\n <ThreeColumnFlexBox>\n <Box>\n <label>Re-attempt date</label>\n <ServiceCalendarDatePicker\n visitDays={visitDays}\n open={open}\n setOpen={setOpen}\n onChange={(newValue) => {\n onSetForm({\n reattemptDate: newValue.format(\"DD/MM/YYYY\"),\n });\n }}\n />\n </Box>\n </ThreeColumnFlexBox>\n\n <NotesSection\n form={form}\n onSetForm={onSetForm}\n context={context}\n contactLabel=\"Confirmed By\"\n contactPlaceholder=\"Who confirmed the reattempt date?\"\n dateLabel=\"Received On\"\n dateValue={form?.confirmedAt}\n onChange={(newValue) =>\n onSetForm({\n confirmedAt: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n\n <ModelErrors errors={errors} />\n </>\n );\n};\n\nexport default ConfirmVisitFailureReattemptDateForm;\n","import { Stack, Typography } from \"@mui/material\";\nimport NotesSection from \"./common/NotesSection\";\nimport { ModelErrors } from \"sharedComponents\";\n\nconst RequestReattemptDateForm = ({\n form,\n context,\n errors,\n onSetForm,\n}) => {\n\n const { serviceName } = context;\n\n return (\n <>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={3}\n >\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Request Re-attempt Date\n </Typography>\n <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n / {serviceName}\n </Typography>\n </Stack>\n\n <NotesSection\n form={form}\n onSetForm={onSetForm}\n context={context}\n contactLabel=\"Requested By\"\n contactPlaceholder=\"Who requested the reattempt date?\"\n dateLabel=\"Received On\"\n dateValue={form?.requestedAt}\n onChange={(newValue) =>\n onSetForm({\n requestedAt: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n\n <ModelErrors errors={errors} />\n </>\n );\n};\n\nexport default RequestReattemptDateForm;\n","import ReportProblemIcon from \"@mui/icons-material/ReportProblem\";\nimport { Box, Grid, MenuItem, Select, Stack, Typography } from \"@mui/material\";\nimport YesNoSelect from \"components/YesNoSelect\";\nimport dayjs from \"dayjs\";\nimport { isEmpty } from \"lodash\";\nimport { useState } from \"react\";\nimport \"react-infinite-calendar/styles.css\";\nimport { ModelErrors } from \"sharedComponents\";\nimport { formatDate } from \"sharedUtils\";\nimport BinReportTable from \"./common/BinReportTable\";\nimport NotesSection from \"./common/NotesSection\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport \"./styles.scss\";\n\nconst VendorReportVisitFailureResponseForm = ({ form, context, errors, onSetForm }) => {\n const [open, setOpen] = useState(false);\n const [openReattemptDate, setOpenReattemptDate] = useState(false);\n\n const {\n driverTurnUp,\n collectionFailureReasonSlug,\n deliveryFailureReasonSlug,\n requestReattempt,\n reattemptDateProvided,\n } = form;\n\n const {\n serviceName,\n deliveryFailureReasons,\n collectionFailureReasons,\n inUseBinGroups,\n lastVisits,\n nextVisits,\n } = context;\n\n const selectValue =\n !driverTurnUp && collectionFailureReasonSlug !== deliveryFailureReasonSlug\n ? \"null\"\n : collectionFailureReasonSlug;\n\n const visitDays = lastVisits?.map((visit) => {\n return { ...visit, date: dayjs(visit.date) };\n });\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={3}\n >\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Visit Failure From Vendor\n </Typography>\n <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n / {serviceName}\n </Typography>\n </Stack>\n\n <Box\n sx={{\n display: \"flex\",\n gap: 2,\n mt: 1,\n \"& .MuiTypography-root\": {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n },\n \"& .MuiTextField-root\": { width: \"fit-content\" },\n }}\n >\n <Box>\n <Typography>Failure Date</Typography>\n <ServiceCalendarDatePicker\n open={open}\n visitDays={visitDays}\n setOpen={setOpen}\n maxDate={dayjs(new Date())}\n onChange={(newValue) =>\n onSetForm({\n failureDate: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n </Box>\n <Box>\n <YesNoSelect\n label=\"Did the driver turn up?\"\n onChange={(driverTurnUp) =>\n onSetForm({\n driverTurnUp,\n })\n }\n value={driverTurnUp}\n />\n </Box>\n {driverTurnUp === false && (\n <Box>\n <Select\n size=\"small\"\n displayEmpty\n value={selectValue}\n onChange={(event) => {\n onSetForm({\n collectionFailureReasonSlug: event.target.value,\n deliveryFailureReasonSlug: event.target.value,\n });\n }}\n >\n <MenuItem value={null} disabled>\n Reason for failure\n </MenuItem>\n {collectionFailureReasons.map((reason) => (\n <MenuItem\n key={reason.slug}\n value={reason.slug}\n sx={{ fontSize: \"12px\" }}\n >\n {reason.name}\n </MenuItem>\n ))}\n </Select>\n </Box>\n )}\n </Box>\n {driverTurnUp && (\n <Box\n sx={{\n display: \"flex\",\n mt: 1,\n \"& > .MuiBox-root\": {\n width: \"50%\",\n },\n }}\n >\n {!isEmpty(inUseBinGroups) && (\n <Box>\n <BinReportTable\n inUseBinGroups={inUseBinGroups}\n onSetForm={onSetForm}\n failureReasonSlug={collectionFailureReasonSlug}\n failureReasons={collectionFailureReasons}\n mode=\"collection\"\n />\n </Box>\n )}\n <Box>\n <BinReportTable\n inUseBinGroups={[]}\n onSetForm={onSetForm}\n failureReasonSlug={deliveryFailureReasonSlug}\n failureReasons={deliveryFailureReasons}\n mode=\"delivery\"\n />\n </Box>\n </Box>\n )}\n\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 2,\n mt: driverTurnUp ? 0 : 1,\n \"& .MuiTypography-root\": {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n },\n \"& .MuiTextField-root\": { width: \"fit-content\" },\n }}\n >\n <YesNoSelect\n label=\"Did the vendor provide a re-attempt date?\"\n onChange={(reattemptDateProvided) =>\n onSetForm({\n reattemptDateProvided,\n })\n }\n value={reattemptDateProvided}\n />\n {reattemptDateProvided && (\n <ServiceCalendarDatePicker\n open={openReattemptDate}\n visitDays={visitDays}\n setOpen={setOpenReattemptDate}\n onChange={(newValue) => {\n onSetForm({\n reattemptDate: newValue.format(\"DD/MM/YYYY\"),\n requestReattempt: false,\n });\n }}\n />\n )}\n {reattemptDateProvided === false && (\n <YesNoSelect\n label=\"Do you want to request re-attempt date?\"\n value={requestReattempt}\n onChange={(requestReattempt) =>\n onSetForm({\n requestReattempt,\n })\n }\n />\n )}\n {requestReattempt === false && nextVisits[0]?.date && (\n <Typography\n sx={{\n fontSize: \"12px\",\n color: \"#5C5F62\",\n display: \"flex\",\n alignItems: \"center\",\n fontWeight: \"500 !important\",\n }}\n >\n <ReportProblemIcon sx={{ color: \"#CF2D42\" }} />\n The Next Visit would be a routine visit on{\" \"}\n {formatDate(nextVisits[0]?.date) || \"waiting vendor response\"}\n </Typography>\n )}\n </Box>\n\n <NotesSection form={form} onSetForm={onSetForm} />\n <ModelErrors errors={errors} />\n </div>\n );\n};\n\nexport default VendorReportVisitFailureResponseForm;\n","import ReportProblemIcon from \"@mui/icons-material/ReportProblem\";\nimport { Box, Grid, MenuItem, Select, Stack, Typography } from \"@mui/material\";\nimport YesNoSelect from \"components/YesNoSelect\";\nimport dayjs from \"dayjs\";\nimport { isEmpty } from \"lodash\";\nimport { useState } from \"react\";\nimport \"react-infinite-calendar/styles.css\";\nimport { ModelErrors } from \"sharedComponents\";\nimport { formatDate } from \"sharedUtils\";\nimport BinReportTable from \"./common/BinReportTable\";\nimport NotesSection from \"./common/NotesSection\";\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport \"./styles.scss\";\n\nconst VendorReportVisitFailureTagForm = ({ form, context, errors, onSetForm }) => {\n const [open, setOpen] = useState(false);\n const [openReattemptDate, setOpenReattemptDate] = useState(false);\n\n const {\n driverTurnUp,\n collectionFailureReasonSlug,\n deliveryFailureReasonSlug,\n reattemptDateProvided,\n } = form;\n\n const {\n serviceName,\n deliveryFailureReasons,\n collectionFailureReasons,\n inUseBinGroups,\n lastVisits,\n nextVisits,\n } = context;\n\n const selectValue =\n !driverTurnUp && collectionFailureReasonSlug !== deliveryFailureReasonSlug\n ? \"null\"\n : collectionFailureReasonSlug;\n\n const visitDays = lastVisits?.map((visit) => {\n return { ...visit, date: dayjs(visit.date) };\n });\n\n return (\n <div>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={3}\n >\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n Visit Failure From Vendor\n </Typography>\n <Typography color=\"grey\" variant=\"h6\" sx={{ fontWeight: \"bold\" }}>\n / {serviceName}\n </Typography>\n </Stack>\n\n <Box\n sx={{\n display: \"flex\",\n gap: 2,\n mt: 1,\n \"& .MuiTypography-root\": {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n },\n \"& .MuiTextField-root\": { width: \"fit-content\" },\n }}\n >\n <Box>\n <Typography>Failure Date</Typography>\n <ServiceCalendarDatePicker\n open={open}\n visitDays={visitDays}\n setOpen={setOpen}\n maxDate={dayjs(new Date())}\n onChange={(newValue) =>\n onSetForm({\n failureDate: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n </Box>\n <Box>\n <YesNoSelect\n label=\"Did the driver turn up?\"\n onChange={(driverTurnUp) =>\n onSetForm({\n driverTurnUp,\n })\n }\n value={driverTurnUp}\n />\n </Box>\n {!driverTurnUp && (\n <Box>\n <Select\n size=\"small\"\n displayEmpty\n value={selectValue}\n onChange={(event) => {\n onSetForm({\n collectionFailureReasonSlug: event.target.value,\n deliveryFailureReasonSlug: event.target.value,\n });\n }}\n >\n <MenuItem value={null} disabled>\n Reason for failure\n </MenuItem>\n {collectionFailureReasons.map((reason) => (\n <MenuItem\n key={reason.slug}\n value={reason.slug}\n sx={{ fontSize: \"12px\" }}\n >\n {reason.name}\n </MenuItem>\n ))}\n </Select>\n </Box>\n )}\n </Box>\n {driverTurnUp && (\n <Box\n sx={{\n display: \"flex\",\n mt: 1,\n \"& > .MuiBox-root\": {\n width: \"50%\",\n },\n }}\n >\n {!isEmpty(inUseBinGroups) && (\n <Box>\n <BinReportTable\n inUseBinGroups={inUseBinGroups}\n onSetForm={onSetForm}\n failureReasonSlug={collectionFailureReasonSlug}\n failureReasons={collectionFailureReasons}\n mode=\"collection\"\n />\n </Box>\n )}\n <Box>\n <BinReportTable\n inUseBinGroups={[]}\n onSetForm={onSetForm}\n failureReasonSlug={deliveryFailureReasonSlug}\n failureReasons={deliveryFailureReasons}\n mode=\"delivery\"\n />\n </Box>\n </Box>\n )}\n\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 2,\n mt: driverTurnUp ? 0 : 1,\n \"& .MuiTypography-root\": {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n },\n \"& .MuiTextField-root\": { width: \"fit-content\" },\n }}\n >\n <YesNoSelect\n label=\"Did the vendor provide a re-attempt date in this reply?\"\n onChange={(reattemptDateProvided) =>\n onSetForm({\n reattemptDateProvided,\n })\n }\n value={reattemptDateProvided}\n />\n {reattemptDateProvided && (\n <ServiceCalendarDatePicker\n open={openReattemptDate}\n visitDays={visitDays}\n setOpen={setOpenReattemptDate}\n onChange={(newValue) => {\n onSetForm({\n reattemptDate: newValue.format(\"DD/MM/YYYY\"),\n });\n }}\n />\n )}\n {reattemptDateProvided === false && nextVisits[0]?.date && (\n <Typography\n sx={{\n fontSize: \"12px\",\n color: \"#5C5F62\",\n display: \"flex\",\n alignItems: \"center\",\n fontWeight: \"500 !important\",\n }}\n >\n <ReportProblemIcon sx={{ color: \"#CF2D42\" }} />\n The Next Visit would be a routine visit on{\" \"}\n {formatDate(nextVisits[0]?.date) || \"waiting vendor response\"}\n </Typography>\n )}\n </Box>\n\n <NotesSection form={form} onSetForm={onSetForm} />\n <ModelErrors errors={errors} />\n </div>\n );\n};\n\nexport default VendorReportVisitFailureTagForm;\n","import ReportProblemIcon from \"@mui/icons-material/ReportProblem\";\nimport { Chip, Box, Grid, Stack, Typography } from \"@mui/material\";\nimport { TextMuted } from \"sharedComponents\";\nimport YesNoSelect from \"components/YesNoSelect\";\nimport dayjs from \"dayjs\";\nimport { isEmpty } from \"lodash\";\nimport { useState } from \"react\";\nimport \"react-infinite-calendar/styles.css\";\n\nimport { formatDate } from \"sharedUtils\";\nimport BinReportTable from \"./common/BinReportTable\";\n\nimport ServiceCalendarDatePicker from \"./common/ServiceCalendarDatePicker\";\nimport ActionFormLayout from './common/ActionFormLayout';\nimport \"./styles.scss\";\n\n\nconst ClientReportVisitFailureForm = ({ form, context, errors, onSetForm }) => {\n const [open, setOpen] = useState(false);\n\n const {\n driverTurnUp,\n requestReattempt,\n } = form;\n\n const {\n serviceName,\n inUseBinGroups,\n lastVisits,\n nextVisits,\n } = context;\n\n const visitDays = lastVisits?.map((visit) => {\n return { ...visit, date: dayjs(visit.date) };\n });\n\n const title = (\n <span>\n <strong>Visit Failure Report</strong>   <TextMuted> {serviceName}</TextMuted>\n </span>\n )\n\n const body = (\n <Box sx={{ minHeight: '200px'}} >\n\n\n\n\n\n <Grid container spacing={2}>\n <Grid item xs={4}>\n\n <Box sx={{\n padding: '8px',\n marginBottom: '6px',\n border: '1px solid #F1F1F5',\n borderRadius: '4px', }}\n >\n\n <Box>\n <Typography>Failure Date</Typography>\n <ServiceCalendarDatePicker\n open={open}\n visitDays={visitDays}\n setOpen={setOpen}\n maxDate={dayjs(new Date())}\n onChange={(newValue) =>\n onSetForm({\n failureDate: newValue.format(\"DD/MM/YYYY\"),\n })\n }\n />\n </Box>\n\n\n <Box sx={{ mb: '10px' }}>\n <YesNoSelect\n label=\"Did the driver arrive?\"\n layout=\"horizontal\"\n onChange={(driverTurnUp) => onSetForm({ driverTurnUp, }) }\n value={driverTurnUp}\n />\n </Box>\n\n <Box >\n <YesNoSelect\n label=\"Request re-attempt date?\"\n layout=\"horizontal\"\n value={requestReattempt}\n onChange={(requestReattempt) => onSetForm({ requestReattempt, }) }\n />\n {requestReattempt === false && nextVisits[0]?.date && (\n <Box sx={{ ml: '10px', mt: '5px', fontWeight: '400' }}>\n <span >Next visit will be on </span> <Chip size=\"small\" color=\"success\" label={formatDate(nextVisits[0]?.date)} />\n </Box>\n )}\n\n </Box>\n\n </Box>\n\n </Grid>\n <Grid item xs={4}>\n\n\n\n { driverTurnUp && (\n <Box sx={{ padding: '8px', marginBottom: '6px', border: '1px solid #F1F1F5', borderRadius: '4px', }} >\n <Box sx={{ mb: '15px'}}>\n {!isEmpty(inUseBinGroups) && (\n <BinReportTable\n inUseBinGroups={inUseBinGroups}\n onSetForm={onSetForm}\n mode=\"collection\"\n isClient\n />\n )}\n </Box>\n </Box>\n )}\n\n </Grid>\n <Grid item xs={4}>\n\n { driverTurnUp && (\n\n <Box sx={{ padding: '8px', marginBottom: '6px', border: '1px solid #F1F1F5', borderRadius: '4px', }} >\n <Box>\n <BinReportTable\n inUseBinGroups={[]}\n onSetForm={onSetForm}\n mode=\"delivery\"\n isClient\n />\n </Box>\n </Box>\n )}\n\n\n </Grid>\n </Grid>\n\n\n\n\n </Box>\n )\n\n//\n\n return (\n <ActionFormLayout title={title} body={body} form={form} onSetForm={onSetForm} errors={errors}/>\n )\n\n};\n\nexport default ClientReportVisitFailureForm;\n","import { Box, Stack, Typography } from \"@mui/material\";\nimport { ModelErrors } from \"sharedComponents\";\nimport \"./styles.scss\";\nimport NotesSection from \"./common/NotesSection\";\nimport ActionFormLayout from './common/ActionFormLayout';\nimport { TextMuted } from 'sharedComponents';\n\nconst CancelRemediationForm = ({\n form,\n context,\n errors,\n onSetForm }) => {\n const { serviceName } = context;\n\n const title = (\n <span>\n <strong>Cancel Remediation</strong>   <TextMuted> {serviceName}</TextMuted>\n </span>\n )\n\n\n const body = (\n\n <li><strong>Vendor was sent a remediation notice</strong></li>\n )\n\n return (\n <ActionFormLayout title={title} body={body} form={form} onSetForm={onSetForm} errors={errors}/>\n )\n\n\n // return (\n // <div>\n // <Stack\n // direction=\"row\"\n // justifyContent=\"flex-start\"\n // alignItems=\"center\"\n // spacing={2}\n // >\n // {\" \"}\n\n // </Stack>\n // <Box sx={{ marginTop: 1 }}>\n // <li><strong>Vendor was sent a remediation notice</strong></li>\n // </Box>\n // <Box sx={{ display: \"flex\", flexDirection: \"column\", gap: 2, mt: 2 }}>\n // <NotesSection\n // form={form}\n // onSetForm={onSetForm}\n // context={context}\n // contactLabel=\"Cancelled By\"\n // contactPlaceholder=\"Who requested the cancellation?\"\n // dateLabel=\"Cancelled on\"\n // dateValue={form?.cancelledAt}\n // onChange={(newValue) =>\n // onSetForm({\n // cancelledAt: newValue.format(\"DD/MM/YYYY\"),\n // })\n // }\n // />\n // <ModelErrors errors={errors} />\n // </Box>\n // </div>\n // );\n};\n\n\nexport default CancelRemediationForm;\n","import CloseIcon from \"@mui/icons-material/Close\";\nimport {\n Box,\n Button,\n IconButton,\n Stack,\n Typography,\n} from \"@mui/material\";\nimport { useContext, useEffect, useState } from \"react\";\nimport AppContext from \"ticket/AppContext\";\nimport { useTicket } from \"ticket/selectors\";\nimport { useFormServiceActionMutation, useGetLocationServiceVendorQuery } from \"api/services\";\n\nconst LogRemediationReplyForm = ({ context }) => {\n const ticket = useTicket();\n const { onCloseRemediation } = useContext(AppContext);\n const [submitForm] = useFormServiceActionMutation();\n const [serviceUuid, setServiceUuid] = useState(\"\");\n\n const { data: locationServiceVendor } =\n useGetLocationServiceVendorQuery({ locationId: `${ticket?.location?.id}`, vendorId: ticket?.vendor?.id });\n\n useEffect(() => {\n if (!locationServiceVendor)\n return;\n\n setServiceUuid(locationServiceVendor[ticket?.vendor?.id].services[0].uuid);\n }, [locationServiceVendor])\n\n const handleSubmit = () => {\n submitForm({\n url: `/admin/service_actions/${serviceUuid}/log_remediation_reply`,\n body: {\n remediation_notice_id: context.remediationNoticeId,\n tagged_reply_id: context.taggedReplyId,\n form: {\n vendor_id: ticket?.vendor?.id,\n location_uuid: ticket?.location?.uuid,\n service_uuid: serviceUuid,\n authority_id: ticket?.location?.authority_id,\n },\n },\n });\n onCloseRemediation();\n\n };\n\n return (\n <>\n <Box\n sx={{\n p: 0,\n \"& .MuiTypography-root\": { fontSize: \"12px\" },\n }}\n >\n <Typography\n sx={{ fontWeight: \"bold\", fontSize: \"15px !important\", lineHeight: \"37px\", mb: 1 }}\n >\n Valid PDF for Remediation from Vendor\n </Typography>\n <Typography\n sx={{ fontWeight: 500, fontSize: \"14px !important\", lineHeight: \"26px\", mb: 1 }}\n >\n Log as Valid PDF when you've checked that the PDF attached sent by the vendor has a formal response for the remediation\n </Typography>\n <Box\n sx={{\n display: \"flex\",\n justifyContent: \"end\",\n position: \"absolute\",\n top: 0,\n right: 1,\n }}\n >\n <IconButton size=\"large\" onClick={() => onCloseRemediation()}>\n <CloseIcon sx={{ fontSize: \"30px\" }} />\n </IconButton>\n </Box>\n </Box>\n </>\n );\n};\n\nexport default LogRemediationReplyForm;\n","import { Autocomplete, Stack, TextField, Typography } from \"@mui/material\";\nimport { useState } from \"react\";\nimport { DebugButton } from \"service/GlobalDebugger\";\nimport { ModelErrors } from \"sharedComponents\";\n\nconst NoActionRequiredForm = ({ form, context, errors, onSetForm }) => {\n const { reason } = form || {};\n const { reasons } = context || {};\n const [customOptions, setCustomOptions] = useState([]);\n\n // Combine original reasons with custom options\n const allOptions = [\n ...reasons,\n ...customOptions.map((option) => ({ slug: option, name: option })),\n ];\n\n const handleChange = (_event, newValue) => {\n if (typeof newValue === \"string\") {\n // Check if the string matches an existing slug\n const existingReason = allOptions.find(\n (option) => option.slug === newValue,\n );\n if (existingReason) {\n onSetForm({ reason: existingReason.slug });\n } else {\n // Add new custom option\n setCustomOptions((prev) => [...prev, newValue]);\n onSetForm({ reason: newValue });\n }\n } else if (newValue && newValue.inputValue) {\n // Create a new value from the user input\n setCustomOptions((prev) => [...prev, newValue.inputValue]);\n onSetForm({ reason: newValue.inputValue });\n } else {\n // Regular option selected\n onSetForm({ reason: newValue ? newValue.slug : null });\n }\n };\n\n return (\n <>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n spacing={3}\n >\n <DebugButton {...{ form, context, errors }} />\n <Typography variant=\"h5\" sx={{ fontWeight: \"bold\" }}>\n No Action Required\n </Typography>\n </Stack>\n <Autocomplete\n selectOnFocus\n clearOnBlur\n handleHomeEndKeys\n freeSolo\n autoSelect\n size=\"small\"\n options={allOptions}\n getOptionLabel={(option) =>\n typeof option === \"string\" ? option : option.name\n }\n value={allOptions.find((option) => option.slug === reason) || null}\n onChange={handleChange}\n renderInput={(params) => (\n <TextField {...params} label=\"No action required reason\" />\n )}\n sx={{\n mt: 1,\n \"& .MuiInputBase-root\": { fontSize: \"12px\" },\n }}\n />\n <ModelErrors errors={errors} />\n </>\n );\n};\n\nexport default NoActionRequiredForm;\n","import { Box, Grid } from \"@mui/material\";\nimport OrganisationMessageSection from \"./common/OrganisationMessageSection\";\nimport VendorMessageSection from \"./common/VendorMessageSection\";\n\ninterface ServiceActionMessageFormProps {\n formDefaults: {\n vendor: {\n responseRequired: boolean,\n messageRequired: boolean\n },\n organisation: {\n responseRequired: boolean,\n messageRequired: boolean\n }\n }\n}\n\nexport const ServiceActionMessageForm:FC<ServiceActionMessageFormProps> = ({ formDefaults }) => {\n return (\n <Box sx={{\n padding: '0 8px',\n backgroundColor: '#EEEEEE',\n }}>\n <Grid container spacing={2}>\n <Grid item xs={6}>\n <OrganisationMessageSection {...formDefaults.organisation} />\n </Grid>\n <Grid item xs={6}>\n <VendorMessageSection {...formDefaults.vendor} />\n </Grid>\n </Grid>\n </Box>\n );\n};\n\n\n\n","import {\n Stack, Box, Grid, Link, MenuItem, Select, TextField, ToggleButton, ToggleButtonGroup, Typography,\n} from \"@mui/material\";\nimport { useContext, useEffect } from \"react\";\nimport { MessageFormContext } from \"../NewMessageActionForm\";\nimport { ResponseExpectedToggleButton } from \"./ResponseExpectedToggleButton\";\n\nconst OrganisationMessageSection = ({\n messageRequired = false,\n responseRequired = false,\n}) => {\n const {\n organisationResponse,\n organisationError,\n sendMessageOrganisation,\n setSendMessageOrganisation,\n stakeholderContacts,\n setOrganisationError,\n } = useContext(MessageFormContext);\n\n //const value = formDefaults?.organisationMessage;\n\n const handleSentMessage = () => {\n setSendMessageOrganisation((prev) => !prev);\n };\n\n useEffect(() => {\n if (organisationResponse?.message || !sendMessageOrganisation) {\n setOrganisationError(false);\n }\n }, [organisationResponse?.message, sendMessageOrganisation]);\n\n return (\n <Stack direction=\"column\" spacing={0}\n sx={{\n justifyContent: \"flex-start\",\n alignItems: \"stretch\",\n padding: '6px',\n marginBottom: '6px',\n border: '2px solid #398D73',\n borderRadius: '4px',\n }}\n >\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 1,\n minHeight: \"35px\",\n }}\n >\n <Typography sx={{ fontSize: \"12px\", marginBottom: '6px' }}>\n Send Message to <Typography component=\"span\" sx={{ color: '#398D73', fontWeight: '700'}}>Organisation</Typography>\n </Typography>\n {!messageRequired && (\n <ToggleButtonGroup\n size=\"small\"\n value={sendMessageOrganisation}\n disabled={messageRequired}\n exclusive\n onChange={messageRequired ? null : handleSentMessage}\n sx={{\n \"& .MuiToggleButton-root\": {\n py: 0,\n fontSize: \"12px\",\n textTransform: \"none\",\n backgroundColor: \"#fff\",\n \"&.Mui-selected\": {\n backgroundColor: \"#007bff\",\n color: \"#fff\",\n \"&:hover\": {\n backgroundColor: \"#0056b3\",\n },\n },\n },\n \"& .MuiToggleButtonGroup-grouped\": {\n borderRadius: 1,\n mx: 0,\n },\n }}\n >\n <ToggleButton value={true}>Yes</ToggleButton>\n <ToggleButton value={false}>No</ToggleButton>\n </ToggleButtonGroup>\n )}\n </Box>\n {(messageRequired || sendMessageOrganisation) && (\n <Select\n size=\"small\"\n value={organisationResponse.toContactId}\n sx={{ fontSize: \"12px\", marginBottom: '6px' }}\n onChange={(e) => organisationResponse.setToContactId(e.target.value)}\n >\n {stakeholderContacts?.[\"organisation\"]?.map((contact) => (\n <MenuItem key={contact.id} value={contact.id}>\n {contact.name}\n </MenuItem>\n ))}\n </Select>\n )}\n {(messageRequired || sendMessageOrganisation) && (\n <>\n <TextField\n error={organisationError}\n helperText={\n organisationError ? (\n `Please write a message ${\n messageRequired ? \"\" : \"or uncheck send message\"\n }`\n ) : organisationResponse.resetToCannedResponse ? (\n <>\n Form has been updated since editing reponse.\n <Link\n underline=\"hover\"\n onClick={organisationResponse.resetToCannedResponse}\n >\n {\" \"}\n Click to reset\n </Link>\n </>\n ) : null\n }\n disabled={!sendMessageOrganisation}\n multiline\n size=\"small\"\n value={organisationResponse.message}\n onChange={(e) => organisationResponse.setMessage(e.target.value)}\n InputProps={{\n sx: {\n height: \"100%\",\n backgroundColor: '#fff',\n },\n }}\n sx={{ flex: 1 }}\n />\n <Box sx={{ display: \"flex\", justifyContent: \"end\" }}>\n <ResponseExpectedToggleButton\n disabled={responseRequired}\n channel=\"organisation\"\n />\n </Box>\n </>\n )}\n </Stack>\n );\n};\n\nexport default OrganisationMessageSection;\n","import {\n Stack, Box, Grid, Link, MenuItem, Select, TextField, ToggleButton, ToggleButtonGroup, Typography,\n} from \"@mui/material\";\nimport { useContext, useEffect } from \"react\";\nimport { MessageFormContext } from \"../NewMessageActionForm\";\nimport { ResponseExpectedToggleButton } from \"./ResponseExpectedToggleButton\";\n\nconst VendorMessageSection = ({\n messageRequired = false,\n responseRequired = false,\n}) => {\n const {\n vendorResponse,\n vendorError,\n sendMessageVendor,\n setSendMessageVendor,\n stakeholderContacts,\n setVendorError,\n } = useContext(MessageFormContext);\n\n //const value = formDefaults?.vendorMessage;\n\n const handleSentMessage = () => {\n setSendMessageVendor((prev) => !prev);\n };\n\n useEffect(() => {\n if (vendorResponse?.message || !sendMessageVendor) {\n setVendorError(false);\n }\n }, [vendorResponse?.message, sendMessageVendor]);\n\n return (\n <Stack\n direction=\"column\"\n spacing={0}\n sx={{\n justifyContent: \"flex-start\",\n alignItems: \"stretch\",\n padding: '6px',\n marginBottom: '6px',\n border: '2px solid #A42435',\n borderRadius: '4px',\n }}\n>\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 1,\n minHeight: \"35px\",\n }}\n >\n <Typography sx={{ fontSize: \"12px\", marginBottom: '6px' }}>\n Send Message to <Typography component=\"span\" sx={{ color: '#A42435', fontWeight: '700'}}>Vendor</Typography>\n </Typography>\n\n {!messageRequired && (\n <ToggleButtonGroup\n size=\"small\"\n value={sendMessageVendor}\n disabled={messageRequired}\n exclusive\n onChange={messageRequired ? null : handleSentMessage}\n sx={{\n \"& .MuiToggleButton-root\": {\n py: 0,\n fontSize: \"12px\",\n textTransform: \"none\",\n backgroundColor: \"#fff\",\n \"&.Mui-selected\": {\n backgroundColor: \"#007bff\",\n color: \"#fff\",\n \"&:hover\": {\n backgroundColor: \"#0056b3\",\n },\n },\n },\n \"& .MuiToggleButtonGroup-grouped\": {\n borderRadius: 1,\n mx: 0,\n },\n }}\n >\n <ToggleButton value={true}>Yes</ToggleButton>\n <ToggleButton value={false}>No</ToggleButton>\n </ToggleButtonGroup>\n )}\n </Box>\n\n {(messageRequired || sendMessageVendor) && (\n <Select\n size=\"small\"\n value={vendorResponse.toContactId}\n sx={{ fontSize: \"12px\", marginBottom: '6px' }}\n onChange={(e) => vendorResponse.setToContactId(e.target.value)}\n >\n {stakeholderContacts?.[\"vendor\"]?.map((contact) => (\n <MenuItem key={contact.id} value={contact.id}>\n {contact.name}\n </MenuItem>\n ))}\n </Select>\n )}\n\n {(messageRequired || sendMessageVendor) && (\n <>\n <TextField\n size=\"small\"\n multiline\n fullWidth\n error={vendorError}\n helperText={\n vendorError ? (\n `Please write a message ${\n messageRequired ? \"\" : \"or uncheck send message\"\n }`\n ) : vendorResponse.resetToCannedResponse ? (\n <>\n Form has been updated since editing reponse.\n <Link\n underline=\"hover\"\n onClick={vendorResponse.resetToCannedResponse}\n >\n {\" \"}\n Click to reset\n </Link>\n </>\n ) : null\n }\n value={vendorResponse.message}\n onChange={(e) => vendorResponse.setMessage(e.target.value)}\n InputProps={{\n sx: {\n height: \"100%\",\n backgroundColor: '#fff',\n },\n }}\n sx={{ flex: 1 }}\n />\n <Box sx={{ display: \"flex\", justifyContent: \"end\" }}>\n <ResponseExpectedToggleButton\n disabled={responseRequired}\n channel=\"vendor\"\n />\n </Box>\n </>\n )}\n </Stack>\n );\n};\n\nexport default VendorMessageSection;\n","import AddIcon from \"@mui/icons-material/Add\";\nimport EmailIcon from \"@mui/icons-material/Email\";\nimport { alpha, Box, Button, Menu, MenuItem, Tooltip } from \"@mui/material\";\nimport { useGetLocationServiceVendorsQuery } from \"api/services\";\nimport { useContext, useMemo, useRef, useState } from \"react\";\nimport RemediationForm from \"service/forms/RemediationForm\";\nimport AppContext from \"ticket/AppContext\";\nimport { getLocationId, useTicket } from \"ticket/selectors\";\nimport { useCopyToClipboard } from \"usehooks-ts\";\nimport ActionMenuButton from \"../actions-menu/ActionMenuButton\";\nimport {\n AGENT_COLOR,\n ORGANISATION_COLOR,\n VENDOR_COLOR,\n} from \"../channel-header/ChannelHeaderStyles\";\nimport { Channel } from \"../types\";\nimport { ToggleButton } from \"./ChannelFooterButtons\";\nimport { FooterDrawer } from \"./FooterDrawer\";\n\nconst ChannelFooter = ({\n currentForm,\n handleToggleButton,\n openFormUrl,\n onSelectAction,\n showFooterButtons,\n showDrawer,\n}) => {\n const ticket = useTicket();\n const locationId = getLocationId();\n const vendorId = ticket?.vendor?.id;\n const ticketActions = ticket?.actions || []\n const { data: locationServiceVendors } =\n useGetLocationServiceVendorsQuery(locationId);\n\n // TODO: Remove when we have remediation model\n const {\n closeDrawer,\n activeChannel,\n isDrawerOpen,\n openRemediation,\n onCloseRemediation,\n } = useContext(AppContext);\n\n const currentServices = useMemo(\n () => locationServiceVendors?.[vendorId]?.services || [],\n [locationServiceVendors, vendorId]\n );\n\n const serviceActions = useMemo(\n () => currentServices.flatMap((service) => service.actions || []),\n [currentServices]\n );\n\n const [, copyToClipboard] = useCopyToClipboard();\n const [anchorEl, setAnchorEl] = useState(null);\n const open = Boolean(anchorEl);\n\n const stickyBoxRef = useRef(null);\n\n const toggleButtonsConfig = [\n {\n color: ORGANISATION_COLOR,\n // label: ticket?.location?.name,\n label: 'Organisation',\n channel: Channel.Organisation,\n },\n {\n color: AGENT_COLOR,\n label: \"Agent\",\n channel: Channel.Agent,\n },\n {\n color: VENDOR_COLOR,\n // label: ticket?.vendor?.name,\n label: 'Vendor',\n channel: Channel.Vendor,\n },\n ];\n\n const onClickHandler = (config) => {\n handleToggleButton(config?.channel);\n };\n const handleClick = (event) => {\n setAnchorEl(event?.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const handleCopyEmail = (email) => {\n copyToClipboard(email);\n handleClose();\n };\n\n return (\n <Box\n sx={{\n borderTop: '2px solid #4f5660',\n background: '#272B31',\n mt: '10px',\n mb: '20px',\n pt: '10px',\n minHeight: \"60px\",\n position: \"sticky\",\n bottom: \"0px\",\n gap: (theme) => theme.spacing(1),\n width: \"100%\",\n zIndex: 2,\n boxSizing: \"border-box\",\n borderRadius: 0,\n }}\n >\n {showFooterButtons && (\n <Box\n sx={{\n borderRadius: (theme) => theme.spacing(1),\n display: \"flex\",\n gap: (theme) => theme.spacing(1),\n justifyContent: \"space-around\",\n alignItems: \"center\",\n width: \"100%\",\n background: \"#262B30\",\n zIndex: 2,\n\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n }}\n ref={stickyBoxRef}\n >\n\n {!isDrawerOpen && (\n <ActionMenuButton\n serviceActions={[...serviceActions, ...ticketActions]}\n icon={<AddIcon />}\n onClickHandler={onSelectAction}\n isFooterMenu={true}\n />\n )}\n {toggleButtonsConfig.map((config, index) => (\n <ToggleButton\n key={index}\n isActive={activeChannel === config.channel}\n color={config.color}\n label={config.label}\n onClick={() => onClickHandler(config)}\n />\n ))}\n <Tooltip title=\"Incoming Email\" arrow>\n <Button\n onClick={handleClick}\n variant=\"outlined\"\n size=\"small\"\n sx={{\n border: \"1px solid #BFBFBF\",\n color: \"#BFBFBF\",\n minWidth: \"34px\",\n fontSize: '21px'\n }}\n >\n <EmailIcon/>\n </Button>\n </Tooltip>\n {ticket?.replyEmails && (\n <Menu anchorEl={anchorEl} open={open} onClose={handleClose}>\n {Object.entries(ticket?.replyEmails).map(([channel, email]) => (\n <MenuItem key={channel} onClick={() => handleCopyEmail(email)}>\n {`Copy ${channel} email`}\n </MenuItem>\n ))}\n </Menu>\n )}\n </Box>\n )}\n\n {(isDrawerOpen || openFormUrl) && showDrawer && (\n <FooterDrawer\n openFormUrl={openFormUrl}\n isDrawerOpen={isDrawerOpen}\n closeDrawer={closeDrawer}\n >\n {currentForm}\n </FooterDrawer>\n )}\n {/* TODO: REMOVE THIS WHEN WE HAVE REMEDIATION MODEL */}\n {openRemediation && (\n <FooterDrawer\n openFormUrl={true}\n isDrawerOpen={openRemediation}\n closeDrawer={() => onCloseRemediation()}\n >\n <RemediationForm />\n </FooterDrawer>\n )}\n </Box>\n );\n};\n\nexport default ChannelFooter;\n","import CloseIcon from \"@mui/icons-material/Close\";\nimport { Alert, Box, Button, Grid, IconButton, MenuItem, Select, Stack, TextField, Typography } from \"@mui/material\";\nimport { map } from \"lodash\";\nimport { useContext, useEffect, useState } from \"react\";\nimport AppContext from \"ticket/AppContext\";\nimport { useTicket } from \"ticket/selectors\";\nimport {\n useFormServiceActionMutation,\n} from \"api/services\";\nimport { useCannedResponses } from \"hooks/useCannedResponses\";\n\nimport { datePickerStyles } from \"./common/ServiceCalendarDatePicker\";\n\nimport { DatePicker, LocalizationProvider } from \"@mui/x-date-pickers\";\n\nimport Loader from \"../../../components/shared/Loader\";\n\nimport dayjs from \"dayjs\";\nimport { AdapterDayjs } from \"@mui/x-date-pickers/AdapterDayjs\";\nimport \"dayjs/locale/en-gb\";\nimport { formatDate } from \"sharedUtils\";\nimport { ActionFormBody, ActionFormTitle } from \"./common/ActionFormLayout\";\n\nconst textForNotice = (requestType, date) => {\n const serviceActionReson = (() => {\n switch (requestType) {\n case 'AdhocVisitRequest': return 'Adhoc Visit';\n case 'FailedVisitReported': return 'Failed Visit Report';\n case 'StockDeliveryRequest': return 'Request Stock Delivery'\n case 'ServiceTerminationRequest': return 'Request Service Termination'\n case 'ServiceSuspensionRequest': return 'Request Service Suspension'\n default: return 'Default value';\n }\n })();\n\n return `${serviceActionReson} was requested on ${formatDate(date)}, and we have not yet received a response.`;\n};\n\nconst RemediationForm = () => {\n const [loading, setLoading] = useState(false);\n\n const ticket = useTicket();\n const { onCloseRemediation, requestedAtDate, eventId, requestType, serviceUuid } =\n useContext(AppContext);\n const [submitForm] = useFormServiceActionMutation();\n const [validationDateError, setValidationDateError] = useState(false);\n const [validationError, setValidationError] = useState(false);\n const [serverError, setServerError] = useState(false);\n const minRemediationDate =\n new Date(requestedAtDate).toDateString() === new Date().toDateString()\n ? requestedAtDate\n : dayjs(requestedAtDate).add(1, \"day\").toDate().toDateString();\n\n const [open, setOpen] = useState(false);\n\n const noticeText = textForNotice(requestType, requestedAtDate);\n const [formData, setFormData] = useState({\n textForNotice: noticeText,\n descriptionOfFailure: \"\",\n dateOfContractFailure: requestedAtDate,\n vendorMessage: \"\",\n });\n\n const { vendorResponse } = useCannedResponses(\n serviceUuid ? `/admin/service_actions/${serviceUuid}/request_remediation.json` : null,\n formData\n );\n\n useEffect(() => {\n setFormData((formData) => ({\n ...formData,\n vendorMessage: vendorResponse.message,\n }));\n }, [vendorResponse.message]);\n\n const handleSubmit = () => {\n if (formData.dateOfContractFailure === \"Invalid Date\") {\n setValidationDateError(true);\n return;\n }\n\n if (formData.textForNotice === \"\" || formData.descriptionOfFailure === \"\" || formData.vendorMessage === \"\") {\n setValidationError(true);\n return;\n }\n\n setLoading(true);\n setServerError(false);\n submitForm({\n url: `/admin/service_actions/${serviceUuid}/request_remediation`,\n body: {\n ticket_id: ticket?.id,\n form: {\n vendor_id: ticket?.vendor?.id,\n location_uuid: ticket?.location?.uuid,\n service_uuid: serviceUuid,\n ticket_id: ticket?.id,\n authority_id: ticket?.location?.authority_id,\n date_of_contract_failure: formData.dateOfContractFailure,\n service_action_requested_at: requestedAtDate,\n text_for_notice: formData.textForNotice,\n description_of_failure: formData.descriptionOfFailure,\n service_action_reason: eventId,\n vendor_response_attributes: {\n to_contact_id: vendorResponse.toContactId,\n response_expected: vendorResponse.responseExpected,\n message: formData.vendorMessage,\n },\n },\n },\n })\n .unwrap()\n .then(onCloseRemediation)\n .catch((error) => {\n setLoading(false);\n setServerError(true);\n console.log(error);\n });\n };\n\n const loadingStyles = {\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n backgroundColor: \"rgba(255, 255, 255, 0.5)\",\n backdropFilter: \"blur(3px)\",\n zIndex: 1000,\n } as React.CSSProperties;\n\n const body = (\n <>\n {loading && (\n <div style={loadingStyles}>\n <Loader message=\"Creating remediation...\" />\n </div>\n )}\n <Box>\n <Grid\n container\n spacing={2}\n sx={{\n \"& .MuiInputBase-input\": {\n fontSize: \"12px\",\n },\n \"& .MuiGrid-item:first-of-type\": {\n pl: 1,\n },\n }}\n >\n <Grid item xs={6}>\n <Box\n sx={{\n padding: \"8px\",\n marginBottom: \"6px\",\n border: \"1px solid #F1F1F5\",\n borderRadius: \"4px\",\n }}\n >\n <Box sx={{ mb: \"10px\" }}>\n <Typography> Contract Failure Date</Typography>\n\n <LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale=\"en-gb\">\n <DatePicker\n slotProps={{\n calendarHeader: datePickerStyles.calendarHeader,\n textField: {\n ...datePickerStyles.textField,\n onClick: () => setOpen(true),\n },\n layout: datePickerStyles.layout,\n }}\n open={open}\n onChange={(newValue) => {\n setValidationDateError(false),\n setFormData({\n ...formData,\n dateOfContractFailure: newValue.format(\"DD/MM/YYYY\"),\n });\n }}\n onClose={() => setOpen(false)}\n minDate={dayjs(minRemediationDate)}\n maxDate={dayjs(new Date())}\n value={dayjs(new Date().toDateString())}\n />\n </LocalizationProvider>\n\n {validationDateError && (\n <Alert severity=\"error\" sx={{ fontSize: \"12px\", marginBottom: \"16px\" }}>\n Please select a valid date\n </Alert>\n )}\n {validationError && (\n <Alert severity=\"error\" sx={{ fontSize: \"12px\", marginBottom: \"16px\" }}>\n Please fill in all fields\n </Alert>\n )}\n {serverError && (\n <Alert severity=\"error\" sx={{ fontSize: \"12px\", marginBottom: \"16px\" }}>\n Server error, please try again\n </Alert>\n )}\n\n {false && (\n <Alert\n icon={false}\n variant=\"outlined\"\n severity=\"error\"\n sx={{\n color: \"#323B44\",\n \"& .MuiAlert-message\": { p: 0 },\n }}\n >\n Warning, please check with a manager that this is ok to send, it may be to soon to remediate!\n </Alert>\n )}\n </Box>\n\n <Typography>Text for notice under: 'Vendor has failed to provide service as set out below'</Typography>\n <TextField\n required\n error={validationError && formData.textForNotice === \"\"}\n multiline\n fullWidth\n rows={4}\n onChange={(e) => {\n setValidationError(false);\n setFormData({\n ...formData,\n textForNotice: e.target.value,\n });\n }}\n defaultValue={noticeText}\n sx={{ mb: \"10px\" }}\n />\n\n <Typography>Text for notice in table: 'Description of Failure'</Typography>\n\n <TextField\n required\n fullWidth\n multiline\n rows={4}\n error={validationError && formData.descriptionOfFailure === \"\"}\n onChange={(e) => {\n setValidationError(false);\n setFormData({\n ...formData,\n descriptionOfFailure: e.target.value,\n });\n }}\n />\n </Box>\n </Grid>\n <Grid item xs={6}>\n <Stack\n direction=\"column\"\n spacing={0}\n sx={{\n justifyContent: \"flex-start\",\n alignItems: \"stretch\",\n padding: \"8px\",\n marginBottom: \"6px\",\n border: \"2px solid #A42435\",\n borderRadius: \"4px\",\n backgroundColor: \"#EEEEEE\",\n }}\n >\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 1,\n }}\n >\n <Typography sx={{ fontSize: \"12px\", marginBottom: \"6px\" }}>\n Send Message to{\" \"}\n <Typography\n component=\"span\"\n sx={{\n color: \"#A42435\",\n fontWeight: \"700\",\n }}\n >\n Vendor\n </Typography>\n </Typography>\n </Box>\n\n <Select size=\"small\" value={ticket?.stakeholderContacts[\"vendor\"][0]?.id} sx={{ marginBottom: \"6px\" }}>\n {map(ticket?.stakeholderContacts?.[\"vendor\"], (contact: any) => (\n <MenuItem key={contact.id} value={contact.id}>\n {contact.name}\n </MenuItem>\n ))}\n </Select>\n\n <TextField\n size=\"small\"\n multiline\n fullWidth\n required\n defaultValue={vendorResponse.message}\n error={validationError && formData.vendorMessage === \"\"}\n onChange={(e) => {\n setValidationError(false);\n setFormData({\n ...formData,\n vendorMessage: e.target.value,\n });\n }}\n InputProps={{\n sx: { height: \"100%\", backgroundColor: \"#fff\" },\n }}\n sx={{ flex: 1 }}\n />\n\n <Box sx={{ display: \"flex\", justifyContent: \"end\", mt: \"6px\" }}>\n This message requires a response from the <strong> Vendor</strong>\n </Box>\n </Stack>\n </Grid>\n </Grid>\n </Box>\n </>\n );\n\n return (\n <>\n <Box\n sx={{\n display: \"flex\",\n justifyContent: \"end\",\n position: \"absolute\",\n top: \"2px\",\n right: \"0px\",\n }}\n >\n <IconButton sx={{ color: \"#fff\" }} onClick={() => onCloseRemediation()}>\n <CloseIcon />\n </IconButton>\n </Box>\n\n <ActionFormTitle content={<strong>Send Remediation Notice</strong>} />\n\n <ActionFormBody content={body} />\n\n <Stack\n direction=\"row\"\n justifyContent=\"flex-end\"\n alignItems=\"center\"\n spacing={1}\n sx={{\n width: \"100%\",\n backgroundColor: \"#637381\",\n padding: \"10px\",\n border: \"1px solid #646D78\",\n borderTop: \"none\",\n borderBottomRightRadius: \"10px\",\n borderBottomLeftRadius: \"10px\",\n }}\n >\n <Box sx={{ flex: 1 }} />\n <Button\n variant=\"outlined\"\n color=\"info\"\n onClick={() => onCloseRemediation()}\n sx={{\n fontSize: \"12px\",\n width: \"150px\",\n color: \"#fff\",\n borderColor: \"#868d93\",\n \"&:hover\": {\n backgroundColor: \"#EEEEEE\",\n },\n }}\n >\n Cancel\n </Button>\n <Box>\n <Button\n type=\"submit\"\n variant=\"contained\"\n onClick={handleSubmit}\n color=\"success\"\n sx={{ fontSize: \"12px\", width: \"200px\" }}\n >\n Submit\n </Button>\n </Box>\n </Stack>\n </>\n );\n};\n\nexport default RemediationForm;\n","import { alpha } from \"@material-ui/core\";\nimport KeyboardArrowDownIcon from \"@mui/icons-material/KeyboardArrowDown\";\nimport KeyboardArrowUpIcon from \"@mui/icons-material/KeyboardArrowUp\";\nimport { Typography } from \"@mui/material\";\nimport Button from \"@mui/material/Button\";\n\nexport const ToggleButton = ({ isActive, color, label, onClick }) => (\n <Button\n onClick={onClick}\n sx={{\n flex: 1,\n fontWeight: \"normal\",\n background: isActive ? color : \"#AAB2BD\",\n borderColor: isActive ? color : \"#AAB2BD\",\n color: \"#fff\",\n gap: 2,\n variant: \"outlined\",\n \"&:hover\": {\n background: alpha(isActive ? color : \"#AAB2BD\", 0.8),\n borderColor: isActive ? color : \"#AAB2BD\",\n },\n }}\n variant=\"outlined\"\n size=\"small\"\n >\n <Typography noWrap>\n Send message to <strong>{label}</strong> Channel\n </Typography>\n {isActive ? (\n <KeyboardArrowDownIcon/>\n ) : (\n <KeyboardArrowUpIcon/>\n )}\n </Button>\n);\n","import HourglassBottomIcon from \"@mui/icons-material/HourglassBottom\";\nimport OutlinedFlag from \"@mui/icons-material/OutlinedFlag\";\nimport { Box, Button, Grid } from \"@mui/material\";\nimport { useContext, useEffect, useRef, useState } from \"react\";\nimport { Controller, useForm } from \"react-hook-form\";\nimport { scrollToBottom } from \"service/ticket/utils\";\nimport { useCannedResponseFetch } from \"sharedUtils\";\nimport AppContext from \"ticket/AppContext\";\nimport { useTicket } from \"ticket/selectors\";\nimport { useLocalStorage } from \"usehooks-ts\";\nimport { useAddTicketReplyMutation } from \"../../../../api/tickets\";\nimport {\n AGENT_COLOR,\n ORGANISATION_COLOR,\n VENDOR_COLOR,\n} from \"../../channel-header/ChannelHeaderStyles\";\nimport { Channel } from \"../../types\";\nimport AgentSelect from \"./AgentSelect\";\nimport { ActionSection, MessageSection } from \"./FormComponents\";\n\nconst ResponseForm = ({ stakeholderContacts }) => {\n // Selectors\n const ticket = useTicket();\n const { closeDrawer, activeChannel: channel } = useContext(AppContext);\n\n // Local state\n const [responseExpected, setResponseExpected] = useState(false);\n const [cannedResponseId, setCannedResponseId] = useState(false);\n const [blobFiles, setBlobFiles] = useState([]);\n const [originalFileNames, setOriginalFileNames] = useState([]);\n const [addNewTicketReply] = useAddTicketReplyMutation();\n const [assignedAgentId, setAssignedAgentId] = useState(\n ticket?.assignedAgent?.id || \"\"\n );\n\n const [message, setMessage] = useLocalStorage(`message-${channel}`, null);\n\n // Form hooks\n const { handleSubmit, control, setValue, watch } = useForm();\n const toContactId = watch(\"to_contact_id\");\n const textAreaRef = useRef(null);\n\n // Background color logic\n const backgroundForm =\n channel === Channel.Organisation\n ? ORGANISATION_COLOR\n : channel === Channel.Agent\n ? AGENT_COLOR\n : VENDOR_COLOR;\n\n // Event handlers\n const toggleResponse = () => {\n setResponseExpected(!responseExpected);\n };\n\n const handleSelectedResponse = (e: any) => {\n setCannedResponseId(e.target.value);\n };\n\n const cannedMessage = useCannedResponseFetch(\n cannedResponseId,\n ticket?.id,\n toContactId\n );\n\n useEffect(() => {\n if (cannedMessage) {\n setMessage(cannedMessage);\n }\n }, [cannedMessage]);\n\n // set initial value\n useEffect(() => {\n const storedMessage = window.localStorage.getItem(`message-${channel}`);\n if (storedMessage) {\n setMessage(JSON.parse(storedMessage));\n } else {\n setMessage(\"\");\n }\n }, [channel, setMessage]);\n\n const handleFileUpload = (files: any) => {\n const newBlobFiles = [];\n const newOriginalFileNames = [];\n\n for (const file of files) {\n const blob = new Blob([file], { type: file.type });\n newBlobFiles.push(blob);\n newOriginalFileNames.push(file.name);\n }\n\n setBlobFiles([...blobFiles, ...newBlobFiles]);\n setOriginalFileNames([...originalFileNames, ...newOriginalFileNames]);\n };\n\n // Form submission logic\n const onSubmitNewReply = (url: string) => async (data: any) => {\n try {\n await addNewTicketReply({\n url,\n channel: channel,\n message: message,\n responseExpected: responseExpected,\n blobFiles: blobFiles,\n originalFileNames: originalFileNames,\n assignedAgentId: assignedAgentId,\n data,\n })\n .unwrap()\n .then(() => scrollToBottom())\n .then(() => closeDrawer())\n .catch((error) => console.log(error));\n } catch (error) {\n console.error(\"Failure:\", error);\n }\n };\n\n useEffect(() => {\n if (ticket?.defaultContactMap && channel) {\n const defaultValue = ticket.defaultContactMap[channel]?.id;\n if (defaultValue !== undefined) {\n setValue(\"to_contact_id\", defaultValue);\n }\n }\n }, [ticket, channel, setValue]);\n\n useEffect(() => {\n const cursorMarker = \"**cursor**\";\n if (message) {\n const cursorPosition = message.indexOf(cursorMarker);\n\n if (cursorPosition !== -1 && textAreaRef.current) {\n const textArea = textAreaRef.current;\n textArea.focus();\n textArea.setSelectionRange(\n cursorPosition,\n cursorPosition + cursorMarker.length\n );\n }\n }\n }, [message, setValue, textAreaRef]);\n\n const displayIcon = responseExpected ? (\n <HourglassBottomIcon />\n ) : (\n <OutlinedFlag />\n );\n\n const displayText = responseExpected\n ? \"Response expected\"\n : \"No response expected\";\n\n return (\n\n <form onSubmit={handleSubmit(onSubmitNewReply(ticket?.submitPath))} >\n\n <Grid container spacing={2} sx={{ mt: '5px'}}>\n <Grid item xs={9}>\n\n <MessageSection\n message={message}\n setMessage={setMessage}\n control={control}\n defaultValueContactId={ticket?.defaultContactMap[channel]?.id || null}\n backgroundForm={backgroundForm}\n stakeholderContacts={stakeholderContacts}\n channel={channel}\n handleSelectedResponse={handleSelectedResponse}\n textAreaRef={textAreaRef}\n />\n\n </Grid>\n\n <Grid item\n xs={3}\n sx={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: 1,\n position: \"relative\",\n }}\n >\n <ActionSection\n control={control}\n handleFileUpload={handleFileUpload}\n closeDrawer={closeDrawer}\n />\n </Grid>\n\n </Grid>\n\n <Box\n sx={{\n display: \"flex\",\n width: \"100%\",\n mt: '20px',\n maxHeight: '34px'\n }}\n >\n <AgentSelect\n assignedAgentId={assignedAgentId}\n setAssignedAgentId={setAssignedAgentId}\n />\n\n {/* Response Required */}\n <Controller\n name=\"response_expected\"\n control={control}\n render={({}) => (\n <Button\n variant=\"contained\"\n color={responseExpected ? \"error\" : \"success\"}\n onClick={toggleResponse}\n size=\"small\"\n sx={{\n fontSize: \"12px\",\n textWrap: \"nowrap\",\n ml: 1\n }}\n >\n {displayIcon}\n {displayText}\n </Button>\n )}\n />\n <Button\n type=\"submit\"\n variant=\"contained\"\n color=\"success\"\n size=\"small\"\n sx={{ flex: 1, ml: 1, fontSize: \"12px\", }}\n >\n Send Message to {channel}\n </Button>\n </Box>\n\n </form>\n );\n};\n\nexport default ResponseForm;\n","import { DatePicker, LocalizationProvider } from \"@mui/x-date-pickers\";\nimport { AdapterDayjs } from \"@mui/x-date-pickers/AdapterDayjs\";\nimport { Dayjs } from \"dayjs\";\n\nconst datePickerStyles = {\n day: { sx: { fontSize: \"12px\" } },\n calendarHeader: {\n sx: {\n fontSize: \"12px\",\n \"& .MuiPickersCalendarHeader-labelContainer\": { fontSize: \"12px\" },\n },\n },\n textField: {\n sx: {\n width: \"100%\",\n \"& .MuiInputBase-root\": {\n color: '#A9B2BD',\n },\n \"& .MuiSvgIcon-root\": {\n color: '#A9B2BD',\n },\n \"& .MuiOutlinedInput-input\": {\n padding: \"8.5px 14px\",\n },\n },\n },\n layout: {\n sx: { \".MuiDayCalendar-weekDayLabel\": { fontSize: \"12px\" } },\n },\n};\n\nconst ResponseFormDatePicker = ({ open, setOpen, field }) => {\n const isWeekend = (date: Dayjs) => {\n const day = date.day();\n\n return day === 0 || day === 6;\n };\n\n return (\n <LocalizationProvider dateAdapter={AdapterDayjs}>\n <DatePicker\n slotProps={{\n day: datePickerStyles.day,\n calendarHeader: datePickerStyles.calendarHeader,\n textField: {\n ...datePickerStyles.textField,\n onClick: () => setOpen(true),\n },\n layout: datePickerStyles.layout,\n field: { clearable: true },\n inputAdornment: {\n sx: {\n color: \"#A9B2BD\",\n },\n },\n }}\n open={open}\n value={field.value}\n inputRef={field.ref}\n onChange={(date) => {\n field.onChange(date);\n }}\n onClose={() => setOpen(false)}\n shouldDisableDate={isWeekend}\n />\n </LocalizationProvider>\n );\n};\n\nexport default ResponseFormDatePicker;\n","import MenuIcon from \"@mui/icons-material/Menu\";\nimport { Box, IconButton, Stack, Tooltip, Typography } from \"@mui/material\";\nimport { startCase } from \"lodash\";\nimport { useTicket } from \"ticket/selectors\";\n\nconst Title = ({ label, type = \"\", status }) => {\n return (\n <Stack\n direction=\"row\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n spacing={0}\n sx={{\n background: type == \"organisation\" ? \"#233A3A\" : \"#482B34\",\n width: \"50%\",\n \"& .MuiTypography-root\": {\n fontWeight: \"bold\",\n fontSize: \"12px\",\n color: \"#fff\",\n height: \"100%\",\n p: \"10px\",\n },\n }}\n >\n <Typography xs={{ }}>{startCase(label)} </Typography>\n <Typography\n sx={{\n // maxHeight: '25px',\n background: type == \"organisation\" ? \"#398D73\" : \"#A42535\",\n }}\n >\n {startCase(status)}\n </Typography>\n </Stack>\n );\n};\n\nconst ChannelHeader = ({ showOverview, onClickShowOverview, appTab }) => {\n const ticket = useTicket();\n\n return (\n\n\n <Box\n sx={{\n display: \"flex\",\n width: \"100%\",\n justifyContent: \"space-between\",\n paddingTop: '10px',\n paddingBottom: \"10px\",\n marginTop: '-10px',\n background: '#272B31',\n gap: 2,\n position: \"sticky\",\n zIndex: 1,\n color: \"white\",\n // top: showOverview ? 40 : 170,\n top: '70px'\n\n }}\n >\n {appTab === 0 && (\n <Tooltip\n title=\"Toggle scroll on replies section\"\n arrow\n placement=\"top\"\n sx={{\n position: \"absolute\",\n top: \"0px\",\n left: \"-45px\",\n }}\n >\n <IconButton onClick={onClickShowOverview}>\n <MenuIcon sx={{ fill: \"#fff\" }} />\n </IconButton>\n </Tooltip>\n )}\n <Title\n label={ticket?.location?.name}\n type=\"organisation\"\n status={ticket?.organisationStatus}\n />\n <Title\n label={ticket?.vendor?.name || \"No vendor selected\"}\n status={ticket?.vendorStatus || \"Inactive\"}\n />\n </Box>\n\n );\n};\n\nexport default ChannelHeader;\n","import { Autocomplete, Box, Grid, TextField } from \"@mui/material\";\nimport { useGetLocationServiceVendorsQuery } from \"api/services\";\nimport { useUpdateTicketMutation } from \"api/tickets\";\nimport { useGetVendorsQuery } from \"api/vendor\";\nimport { map } from \"lodash\";\nimport { useState } from \"react\";\nimport { getLocationId, useTicket } from \"ticket/selectors\";\n\nconst NoVendorSelected = () => {\n const ticket = useTicket();\n const locationId = getLocationId();\n\n const [updateTicket] = useUpdateTicketMutation();\n const { data: locationServiceVendors } =\n useGetLocationServiceVendorsQuery(locationId);\n const { data } = useGetVendorsQuery();\n\n const [inputValue, setInputValue] = useState(\"\");\n const [value, setValue] = useState(null);\n\n const locationVendors = map(locationServiceVendors, (v) => v.vendor);\n const vendorList = map(data, (v) => v);\n\n const updateVendor = async (vendorId) => {\n try {\n await updateTicket({\n url: `/admin/tickets/${ticket.id}`,\n vendorId: vendorId,\n });\n } catch (error) {\n console.log(error);\n }\n };\n\n const onChange = (_event, value) => {\n if (value) {\n setValue(value.id);\n updateVendor(value.id);\n }\n };\n return (\n <>\n <Grid container sx={{ justifyContent: \"flex-end\" }}>\n <Grid item xs={6} sx={{ display: \"flex\", paddingLeft: 0 }}>\n {locationVendors.map((vendor) => (\n <Box\n key={vendor.id}\n onClick={() => updateVendor(vendor.id)}\n sx={{\n cursor: \"pointer\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n height: \"40px\",\n minWidth: \"120px\",\n borderRadius: \"4px\",\n margin: \"0 8px\",\n padding: \"0 16px\",\n border: \"1px solid #fff\",\n }}\n >\n <Box\n component=\"img\"\n src={vendor.logoOnDark.header.url}\n alt={vendor.name}\n sx={{\n height: \"20px\",\n objectFit: \"contain\",\n }}\n />\n </Box>\n ))}\n </Grid>\n </Grid>\n <Grid container sx={{ justifyContent: \"flex-end\", marginBottom: 3 }}>\n <Grid item xs={6} sx={{ paddingRight: 0 }}>\n <Autocomplete\n value={value}\n onChange={onChange}\n inputValue={inputValue}\n onInputChange={(_event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n options={vendorList || []}\n getOptionLabel={(option) => (option ? `${option.name}` : \"\")}\n renderInput={(params) => (\n <TextField\n {...params}\n variant=\"outlined\"\n placeholder=\"Other Vendors\"\n sx={{\n my: 2,\n width: \"100%\",\n backgroundColor: \"#2C3237\",\n \"& .MuiOutlinedInput-root\": {\n color: \"#fff\",\n fontSize: \"12px\",\n \"& fieldset\": {\n borderColor: \"#656567\",\n },\n \"&:hover fieldset\": {\n borderColor: \"#656567\",\n },\n \"&.Mui-focused fieldset\": {\n borderColor: \"#656567\",\n },\n },\n \"& .MuiInputLabel-root\": {\n color: \"#aaa\",\n },\n \"& .MuiSvgIcon-root\": {\n color: \"#bfbfbf\",\n },\n }}\n />\n )}\n ListboxProps={{\n style: {\n backgroundColor: \"#2C3237\",\n color: \"#fff\",\n fontSize: \"12px\",\n },\n }}\n sx={{ position: \"sticky\", top: \"120px\", zIndex: 1 }}\n />\n </Grid>\n </Grid>\n </>\n );\n};\n\nexport default NoVendorSelected;\n","import { api } from \"./apiConfig\";\n\nexport const vendorApi = api.injectEndpoints({\n endpoints: (build) => ({\n getVendors: build.query<any, void>({\n query: () => ({\n url: \"/admin/vendors.json\",\n }),\n providesTags: [\"Vendors\"],\n }),\n }),\n});\n\nexport const { useGetVendorsQuery } = vendorApi;\n","import { Box, Grid } from \"@mui/material\";\nimport { useFetch } from \"hooks/useFetch\";\nimport _, { map } from \"lodash\";\nimport React, {\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { useLocation } from \"react-router-dom\";\nimport NewMessageActionForm from \"service/forms/NewMessageActionForm\";\nimport { TaggingForm } from \"service/forms/TaggingForm\";\nimport AppContext from \"ticket/AppContext\";\nimport { useGlobalLoadingState, useTicket } from \"ticket/selectors\";\nimport ReplyCard from \"./ReplyCard\";\n\nconst findElementWithHighlightedId = (highlightedIds) => {\n const allReplyElements: any = document.querySelectorAll(\"[id]\");\n for (const element of allReplyElements) {\n const ids = element.id.split(\",\");\n if (highlightedIds?.some((id) => ids.includes(id))) {\n return element;\n }\n }\n return null;\n};\n\nconst SortedReplies = ({\n replies,\n openFormId,\n setOpenFormId,\n setShowFooterButtons,\n onCloseForm,\n setShowDrawer,\n openFormUrl,\n setOpenFormUrl\n}) => {\n const {\n setShowTaggingForm,\n highlightedIds,\n setHighlightedIds,\n setActiveChannel,\n setIsDrawerOpen,\n shouldScroll,\n setShouldScroll,\n } = useContext(AppContext);\n\n const location = useLocation();\n const globalLoadingState = useGlobalLoadingState();\n\n const sortedReplies = useMemo(() => {\n return _(replies)\n .groupBy(\"createdAt\")\n .toPairs()\n .sortBy((kvArray) => kvArray[0])\n .map((kvArray) => {\n return _.sortBy(kvArray[1], [\n (reply) => (reply.channel === \"vendor\" ? 1 : -1),\n ]);\n })\n .value();\n }, [replies]);\n\n const toggleOpenForm = (id) => {\n setIsDrawerOpen(false);\n setActiveChannel(null);\n setOpenFormId(id);\n setShowFooterButtons(false);\n setShowDrawer(false);\n };\n\n const closeHandler = () => {\n onCloseForm();\n setOpenFormId(null);\n setShowDrawer(true);\n setShowTaggingForm(false);\n };\n\n const findElementWithHighlightedId = useCallback((highlightIds) => {\n // console.log(\"Searching for elements with IDs:\", highlightIds);\n const allElements = document.querySelectorAll(\"[id]\");\n // console.log(\"Total elements in DOM:\", allElements.length);\n\n for (const element of allElements) {\n if (element.id) {\n // console.log(\"Checking element:\", element.id);\n const ids = element.id.split(\",\");\n if (highlightIds.some((id) => ids.includes(id))) {\n // console.log(\"Found matching element:\", element.id);\n return element;\n }\n }\n }\n // console.log(\"No matching element found\");\n return null;\n }, []);\n\n const scrollToHighlightedElement = useCallback(\n (highlightIds) => {\n const element = findElementWithHighlightedId(highlightIds);\n if (element) {\n element.scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n // console.log(\"Scrolled to element:\", element.id);\n return true;\n }\n // console.log(\"Failed to scroll: element not found\");\n return false;\n },\n [findElementWithHighlightedId],\n );\n\n useEffect(() => {\n const params = new URLSearchParams(location.search);\n const highlightIdsFromParam = params.getAll(\"highlight\");\n // console.log(\"Highlight IDs from URL:\", highlightIdsFromParam);\n\n if (highlightIdsFromParam.length > 0 && !globalLoadingState) {\n setHighlightedIds(highlightIdsFromParam);\n setShouldScroll(true);\n }\n }, [location.search, globalLoadingState, setHighlightedIds]);\n\n useEffect(() => {\n if (shouldScroll && highlightedIds.length > 0) {\n const scrollInterval = setInterval(() => {\n if (scrollToHighlightedElement(highlightedIds)) {\n clearInterval(scrollInterval);\n setShouldScroll(false);\n }\n }, 100);\n\n return () => clearInterval(scrollInterval);\n }\n }, [shouldScroll, highlightedIds, scrollToHighlightedElement]);\n\n return (\n <>\n {sortedReplies.map((groupedReplies, key) => (\n <React.Fragment key={key}>\n {groupedReplies.length > 1 ? (\n <ReplyGroup\n replies={groupedReplies}\n toggleOpenForm={toggleOpenForm}\n openFormUrl={openFormUrl}\n openFormId={openFormId}\n setOpenFormUrl={setOpenFormUrl}\n closeHandler={closeHandler}\n highlightedIds={highlightedIds}\n />\n ) : (\n <ReplyItem\n reply={groupedReplies[0]}\n toggleOpenForm={toggleOpenForm}\n openFormUrl={openFormUrl}\n openFormId={openFormId}\n setOpenFormUrl={setOpenFormUrl}\n closeHandler={closeHandler}\n highlightedIds={highlightedIds}\n />\n )}\n </React.Fragment>\n ))}\n </>\n );\n};\n\nexport default SortedReplies;\n\nconst ReplyGroup = ({\n replies,\n toggleOpenForm,\n setOpenFormUrl,\n openFormId,\n openFormUrl,\n closeHandler,\n highlightedIds,\n}) => {\n const ticket = useTicket();\n const { showTaggingForm } = useContext(AppContext);\n const organisationReply = _.find(\n replies,\n (reply) => reply.channel === \"organisation\",\n );\n const vendorReply = _.find(replies, (reply) => reply.channel === \"vendor\");\n\n const groupIds = map(replies, (reply) => reply.id).join(\",\");\n const isGroupHighlighted = highlightedIds?.some((id) =>\n groupIds.includes(id),\n );\n\n return (\n <Grid\n container\n spacing={2}\n alignItems=\"stretch\"\n sx={{ marginBottom: '20px', }}\n id={groupIds}\n >\n <Grid item xs={6}>\n {organisationReply && (\n <ReplyCard\n selected={isGroupHighlighted}\n reply={organisationReply}\n toggleOpenForm={() => toggleOpenForm(organisationReply.id)}\n setOpenFormUrl={setOpenFormUrl}\n />\n )}\n </Grid>\n <Grid item xs={6}>\n {vendorReply && (\n <ReplyCard\n selected={isGroupHighlighted}\n reply={vendorReply}\n toggleOpenForm={() => toggleOpenForm(vendorReply.id)}\n setOpenFormUrl={setOpenFormUrl}\n />\n )}\n </Grid>\n {replies.map((reply, key) => {\n return (\n <React.Fragment key={key}>\n {openFormId === reply.id && (\n <Box\n key={reply.id}\n sx={{\n width: \"100%\",\n backgroundColor: \"#fff\",\n margin: 2,\n padding: 2,\n borderRadius: 2,\n position: \"relative\",\n zIndex: 3,\n }}\n >\n {showTaggingForm ? (\n <TaggingForm\n formUrl={openFormUrl}\n onClose={closeHandler}\n reply={reply}\n />\n ) : (\n <NewMessageActionForm\n formUrl={openFormUrl}\n onClose={closeHandler}\n stakeholderContacts={ticket?.stakeholderContacts}\n reply={reply}\n setOpenFormUrl={setOpenFormUrl}\n />\n )}\n </Box>\n )}\n </React.Fragment>\n );\n })}\n </Grid>\n );\n};\n\nconst ReplyItem = ({\n reply,\n toggleOpenForm,\n setOpenFormUrl,\n openFormId,\n openFormUrl,\n closeHandler,\n highlightedIds,\n}) => {\n const ticket = useTicket();\n const { showTaggingForm } = useContext(AppContext);\n const isOrganisation = reply.channel === \"organisation\";\n const isAgent =\n reply.channel === \"agent\" && reply.stakeholderName === \"Agent\";\n\n const replyIds = reply?.id;\n const isHighlighted = highlightedIds?.some((id) => id == replyIds);\n\n return (\n <>\n <Box\n style={{\n display: \"flex\",\n width: \"100%\",\n justifyContent: isOrganisation ? \"flex-start\" : \"flex-end\",\n }}\n key={reply.id}\n id={replyIds}\n >\n <Box\n sx={{\n width: \"50%\",\n marginLeft: isAgent ? \"25%\" : \"0%\",\n marginRight: isAgent ? \"25%\" : \"0%\",\n paddingRight: isOrganisation ? \"8px\" : \"0px\",\n paddingLeft: !isOrganisation && !isAgent ? \"8px\" : \"0px\",\n marginBottom: '20px',\n }}\n >\n <ReplyCard\n selected={isHighlighted}\n reply={reply}\n toggleOpenForm={() => toggleOpenForm(reply.id)}\n setOpenFormUrl={setOpenFormUrl}\n />\n </Box>\n </Box>\n {openFormId === reply.id && (\n <Box\n sx={{\n padding: 2,\n width: \"100%\",\n backgroundColor: \"#fff\",\n mb: 2,\n borderRadius: 2,\n position: \"relative\",\n zIndex: 3,\n ml: isOrganisation ? \"0\" : \"auto\",\n }}\n >\n {showTaggingForm ? (\n <TaggingForm\n formUrl={openFormUrl}\n onClose={closeHandler}\n reply={reply}\n />\n ) : (\n <NewMessageActionForm\n formUrl={openFormUrl}\n onClose={closeHandler}\n stakeholderContacts={ticket?.stakeholderContacts}\n reply={reply}\n setOpenFormUrl={setOpenFormUrl}\n />\n )}\n </Box>\n )}\n </>\n );\n};\n","import { api } from \"./apiConfig\";\nimport _ from \"lodash\";\n\nexport type User = {\n fullName: string;\n id: number;\n name: string;\n email: string;\n};\n\nexport interface Users {\n [key: string]: User;\n}\n\nexport const usersApi = api.injectEndpoints({\n endpoints: (build) => ({\n getAllStaff: build.query<Users, void>({\n query: () => {\n return {\n url: \"/admin/users/all_time_staff.json\",\n method: \"GET\",\n };\n },\n providesTags: () => [\n { type: \"AllTimeStaff\", id: \"LIST\" },\n ],\n }),\n }),\n});\n\nexport const { useGetAllStaffQuery } = usersApi;\n\nexport const {\n endpoints: { getAllStaff },\n} = usersApi;\n\n","import { Box, Divider } from \"@mui/material\";\nimport AdhocVisitRequestLog from \"service/request-logs/AdhocVisitRequestLog\";\nimport SpecChangeRequestLog from \"service/request-logs/SpecChangeRequestLog\";\nimport FailedVisitReportLog from \"./FailedVisitReportLog\";\nimport ServiceSuspensionRequestLog from \"./ServiceSuspensionRequestLog\";\nimport ServiceResumptionRequestLog from \"./ServiceResumptionRequestLog\";\nimport ServiceTerminationRequestLog from \"./ServiceTerminationRequestLog\";\nimport ServiceReinstatementRequestLog from \"./ServiceReinstatementRequestLog\";\nimport StockDeliveryRequestLog from \"./StockDeliveryRequestLog\";\nimport VisitFrequencyChangeRequestLog from \"./VisitFrequencyChangeRequestLog\";\nimport ReattemptDateRequestLog from \"./ReattemptDateRequestLog\";\nimport ReattemptDateLog from \"./ReattemptDateLog\";\nimport RemediationLog from \"./RemediationLog\";\nimport NoActionRequiredLog from \"./NoActionRequiredLog\";\n\nconst logsComponents = {\n AdhocVisitRequest: AdhocVisitRequestLog,\n SpecChangeRequest: SpecChangeRequestLog,\n VisitFrequencyChangeRequest: VisitFrequencyChangeRequestLog,\n StockDeliveryRequest: StockDeliveryRequestLog,\n ServiceTerminationRequest: ServiceTerminationRequestLog,\n ServiceReinstatementRequest: ServiceReinstatementRequestLog,\n ServiceSuspensionRequest: ServiceSuspensionRequestLog,\n ServiceResumptionRequest: ServiceResumptionRequestLog,\n FailedVisitReport: FailedVisitReportLog,\n VendorFeedbackOnVisitFailureRecieve: FailedVisitReportLog,\n ClientFeedbackOnVisitFailureRecieve: null,\n ReattemptVisitRequest: ReattemptDateRequestLog,\n ReattemptDateConfirm: ReattemptDateLog,\n RemediationSent: RemediationLog,\n RemediationResponseRejected: RemediationLog,\n RemediationCancelled: RemediationLog,\n RemediationReplyLogged: RemediationLog,\n \"No Action Required\": NoActionRequiredLog,\n};\n\nconst LogComponent = ({ eventData, url }) => {\n const getLogComponent = (eventName) => {\n const componentName = Object.keys(logsComponents).find((name) =>\n eventName.includes(name),\n );\n return componentName ? logsComponents[componentName] : null;\n };\n\n return (\n <>\n {eventData.map((event, index) => {\n const SpecificLogComponent = getLogComponent(event.name);\n\n return SpecificLogComponent ? (\n <Box key={index}>\n <Divider\n variant=\"middle\"\n sx={{\n m: 0,\n borderColor: \"#fff\",\n opacity: \"0.2\",\n }}\n />\n <SpecificLogComponent request={event} url={url} />\n </Box>\n ) : null;\n })}\n </>\n );\n};\nexport default LogComponent;\n","\nimport {\n Chip, Box, Collapse, Divider, IconButton, TableCell, TableRow, Typography,\n} from \"@mui/material\";\nimport { Contact } from \"api/tickets\";\nimport { flatMap, map, size, startCase } from \"lodash\";\nimport { useState } from \"react\";\nimport BinDot from \"service/BinDot\";\nimport LogActionButton from \"service/forms/VoidFormDialog\";\nimport AdhocVisitRequestCardDetails, {\n getRequestType,\n getTypographyLabel,\n} from \"service/report-request-box/AdhocVisitRequestCardDetails\";\nimport { formatDate, useBinFetch } from \"sharedUtils\";\nimport { useTicket } from \"ticket/selectors\";\nimport ReportLogLayout from './ReportLogLayout';\n\nexport function getLabelShort(requestType) {\n switch (requestType) {\n case \"clearAllAndDeliver\":\n return \"clear all and deliver additional stock\";\n case \"clearAll\":\n return \"clear all\";\n case \"collectAndDeliver\":\n return \"collect specific bins and deliver additional stock\";\n case \"collect\":\n return \"collect specific bins only\";\n case \"deliver\":\n return \"only deliver additional stock\";\n default:\n return \"\";\n }\n}\n\nconst AdhocVisitRequestLog = ({ request }) => {\n const { binTypes, binGroups } = useBinFetch();\n const { stakeholderContacts } = useTicket() || {};\n const { deliveryUnits, cancelledAt, date, notes } = request.data || {};\n\n const [open, setOpen] = useState(false);\n\n // TODO: formUrl is not available in the request object\n\n let clearAll;\n let collectionUnits;\n if (request?.data?.collectionUnits === \"all\") {\n clearAll = true;\n collectionUnits = [];\n } else {\n clearAll = false;\n collectionUnits = request?.data?.collectionUnits;\n }\n\n const isCollect = size(collectionUnits) > 0;\n const isDelivery = size(deliveryUnits) > 0;\n const isCollectAndDelivery = isCollect && isDelivery;\n const isCancelled = cancelledAt;\n const isConfirmed = date && request.name === \"AdhocVisitRequestConfirmed\";\n\n const requestType = getRequestType({\n clearAll,\n isCollectAndDelivery,\n isCollect,\n isDelivery,\n });\n\n const label = getTypographyLabel(requestType);\n const labelShort = getLabelShort(requestType);\n\n const allStakeholders: Contact[] = flatMap(stakeholderContacts || [], (x) => x);\n const inputtedBy = allStakeholders?.find((x) => x.id === request?.metadata?.inputtedById);\n\n const deliveryRows = map(deliveryUnits, ({ serviceCode, quantity }) => {\n const binType = binTypes[serviceCode];\n const binGroup = binGroups[binType?.binGroupId];\n\n return (\n <TableRow\n key={serviceCode}\n sx={{\n \"& .MuiTableCell-root\": {\n borderTop: \"1px solid rgba(255, 255, 255, 0.2)\",\n borderBottom: \"1px solid rgba(255, 255, 255, 0.2)\",\n },\n }}\n >\n <TableCell scope=\"row\">\n <BinDot\n binGroup={binGroup}\n tooltipName={true}\n tooltipPlace=\"top\"\n showImg\n {...binType}\n />\n </TableCell>\n <TableCell>{binType?.name}</TableCell>\n <TableCell>{serviceCode}</TableCell>\n <TableCell>{quantity}</TableCell>\n </TableRow>\n );\n });\n\n const collectionRows = map(\n collectionUnits,\n ({ serviceCode, quantity, visitActionId }) => {\n const binType = binTypes[serviceCode];\n const binGroup = binGroups[binType?.binGroupId];\n\n return (\n <TableRow\n key={serviceCode}\n sx={{\n \"& .MuiTableCell-root\": {\n borderTop: \"1px solid rgba(255, 255, 255, 0.2)\",\n borderBottom: \"1px solid rgba(255, 255, 255, 0.2)\",\n },\n }}\n >\n <TableCell scope=\"row\">\n <BinDot\n binGroup={binGroup}\n tooltipName={true}\n tooltipPlace=\"top\"\n showImg\n {...binType}\n />\n </TableCell>\n <TableCell>{binType?.name}</TableCell>\n <TableCell>{serviceCode}</TableCell>\n <TableCell>{quantity}</TableCell>\n <TableCell>{startCase(visitActionId)}</TableCell>\n </TableRow>\n );\n }\n );\n\n const collectAndDeliver = collectionUnits?.reduce((acc, unit) => {\n acc[unit?.serviceCode] = { ...unit };\n return acc;\n }, {});\n\n deliveryUnits?.forEach((deliveryUnit) => {\n if (collectAndDeliver[deliveryUnit?.serviceCode]) {\n collectAndDeliver[deliveryUnit?.serviceCode].deliveryQty =\n deliveryUnit?.quantity;\n } else {\n collectAndDeliver[deliveryUnit?.serviceCode] = {\n serviceCode: deliveryUnit?.serviceCode,\n deliveryQty: deliveryUnit?.quantity,\n };\n }\n });\n\n const collectAndDeliveryRows = map(\n collectAndDeliver,\n ({ serviceCode, quantity, visitActionId, deliveryQty }) => {\n const binType = binTypes[serviceCode];\n const binGroup = binGroups[binType?.binGroupId];\n\n return (\n <TableRow\n key={serviceCode}\n sx={{\n \"& .MuiTableCell-root\": {\n borderTop: \"1px solid rgba(255, 255, 255, 0.2)\",\n borderBottom: \"1px solid rgba(255, 255, 255, 0.2)\",\n },\n }}\n >\n <TableCell scope=\"row\">\n <BinDot\n binGroup={binGroup}\n tooltipName={true}\n tooltipPlace=\"top\"\n showImg\n {...binType}\n />\n </TableCell>\n <TableCell>{binType?.name}</TableCell>\n <TableCell>{serviceCode}</TableCell>\n <TableCell>{quantity}</TableCell>\n <TableCell>{deliveryQty}</TableCell>\n <TableCell>{startCase(visitActionId)}</TableCell>\n </TableRow>\n );\n }\n );\n\n const title = isCancelled ? (\n <>\n {startCase(request.name)}\n </>\n ) : isConfirmed ? (\n <>\n Adhoc visit confirmed for  \n <Chip size=\"xsmall\" color=\"success\" label={formatDate(date)} />\n </>\n ) : (\n <>\n {`${startCase(request.name)} to `}\n </>\n )\n\n\n const logHeader = (\n <>\n {title}\n {labelShort}\n </>\n );\n\n const logContent = (\n <>\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n }}\n >\n <Box>{label}</Box>\n\n <div class=\"float-right\"><LogActionButton event={request} /></div>\n </Box>\n\n {(isCollect || isDelivery) && (\n <>\n <AdhocVisitRequestCardDetails\n clearAll={clearAll}\n isCollectAndDelivery={isCollectAndDelivery}\n isCollect={isCollect}\n isDelivery={isDelivery}\n deliveryRows={deliveryRows}\n collectionRows={collectionRows}\n collectAndDeliveryRows={collectAndDeliveryRows}\n />\n </>\n )}\n\n </>\n );\n\n return (\n <ReportLogLayout logHeader={logHeader} logContent={logContent} object={request} />\n );\n\n\n};\n\nexport default AdhocVisitRequestLog;\n","import { Typography } from \"@mui/material\";\nimport { startCase } from \"lodash\";\nimport SpecChangeRequestCardDetails from \"service/report-request-box/SpecChangeRequestCardDetails\";\nimport ReportLogLayout from './ReportLogLayout';\n\nconst SpecChangeRequestLog = ({ request }) => {\n const { date } = request.data || {};\n\n // TODO: Handle accept spec change when implemented\n // const isConfirmed = false;\n\n const logHeader = (\n <>\n {date ? `${startCase(request.name)} for ${formatDate(date)}`\n : startCase(request.name)\n }\n </>\n );\n\n const logContent = (\n <>\n {request?.data?.specifications && (\n <SpecChangeRequestCardDetails request={request?.data} />\n )}\n </>\n );\n\n return (\n <ReportLogLayout logHeader={logHeader} logContent={logContent} object={request} />\n );\n\n};\n\nexport default SpecChangeRequestLog;\n","import { Typography } from \"@mui/material\";\nimport { startCase } from \"lodash\";\nimport { formatDate } from \"sharedUtils\";\nimport ReportLogLayout from './ReportLogLayout';\n\nconst ServiceSuspensionRequestLog = ({ request }) => {\n const {\n cancelledAt,\n requestedAt,\n date,\n notes,\n withImmediateEffect,\n noVisitsExpectedAfter,\n reasonId,\n } = request.data || {};\n\n const immediateEffectText = withImmediateEffect\n ? `with immediate effect: ${formatDate(requestedAt)}`\n : \"\";\n const noVisitsExpectedAfterText = noVisitsExpectedAfter\n ? `Effective From: ${formatDate(noVisitsExpectedAfter)}`\n : \"\";\n\n const logHeader = (\n <>\n {date ? `${startCase(request.name)} for ${formatDate(date)}`\n : startCase(request.name)\n }\n </>\n );\n\n const logContent = (\n <>\n <Typography>\n Vendor has been requested to suspend service {immediateEffectText}\n </Typography>\n\n {reasonId && (\n <Typography>Reason: {startCase(reasonId)}</Typography>\n )}\n\n {noVisitsExpectedAfter && (\n <Typography>{noVisitsExpectedAfterText}</Typography>\n )}\n </>\n );\n\n return (\n <ReportLogLayout logHeader={logHeader} logContent={logContent} object={request} />\n );\n\n};\n\nexport default ServiceSuspensionRequestLog;\n","import { Typography } from \"@mui/material\";\nimport { startCase } from \"lodash\";\nimport { formatDate } from \"sharedUtils\";\nimport ReportLogLayout from './ReportLogLayout';\n\nconst ServiceResumptionRequestLog = ({ request }) => {\n const { cancelledAt, date, visitsExpectedAfter } = request.data || {};\n\n const visitsExpectedAfterText = visitsExpectedAfter\n ? `Effective From: ${formatDate(visitsExpectedAfter)}`\n : \"\";\n\n\n const logHeader = (\n <>\n {date ? `${startCase(request.name)} for ${formatDate(date)}`\n : startCase(request.name)\n }\n </>\n );\n\n const logContent = (\n <>\n <Typography>\n Vendor has been requested to resume service\n </Typography>\n\n {visitsExpectedAfter && (\n <Typography>{visitsExpectedAfterText}</Typography>\n )}\n </>\n );\n\n return (\n <ReportLogLayout logHeader={logHeader} logContent={logContent} object={request} />\n );\n\n};\n\nexport default ServiceResumptionRequestLog;\n","import { Typography } from \"@mui/material\";\nimport { startCase } from \"lodash\";\nimport { formatDate } from \"sharedUtils\";\nimport ReportLogLayout from './ReportLogLayout';\n\nconst ServiceTerminationRequestLog = ({ request }) => {\n const {\n date,\n finalCollectionRequired,\n finalCollectionRequiredBefore,\n requestedAt,\n noVisitsExpectedAfter,\n } = request.data || {};\n\n // TODO: Re visit this when confirmation is implemented\n\n const isFinalCollectionRequired =\n finalCollectionRequired && finalCollectionRequiredBefore;\n\n\n const logHeader = (\n <>\n {date ? `${startCase(request.name)} for ${formatDate(date)}`\n : startCase(request.name)\n }\n </>\n );\n\n const logContent = (\n <>\n {isFinalCollectionRequired ? (\n <div>\n <Typography>\n Vendor has been requested to terminate the service with final collection before:{\" \"}\n {formatDate(finalCollectionRequiredBefore)}\n </Typography>\n </div>\n ) : requestedAt ? (\n <div>\n <Typography>\n Vendor has been requested to terminate the service immediately:{\" \"}\n {formatDate(requestedAt)}\n </Typography>\n </div>\n ) :\n (\n <div>\n <Typography>\n Vendor has confirmed to terminate the service from{\" \"}\n {formatDate(noVisitsExpectedAfter)}\n </Typography>\n </div>\n )}\n </>\n );\n\n return (\n <ReportLogLayout logHeader={logHeader} logContent={logContent} object={request} />\n );\n\n};\n\nexport default ServiceTerminationRequestLog;\n","import { Typography } from \"@mui/material\";\nimport { startCase } from \"lodash\";\nimport { formatDate } from \"sharedUtils\";\nimport ReportLogLayout from './ReportLogLayout';\n\nconst ServiceReinstatementRequestLog = ({ request }) => {\n\n const { cancelledAt, date, visitsExpectedAfter } = request.data || {};\n\n\n const visitsExpectedAfterText = visitsExpectedAfter\n ? `Effective From: ${formatDate(visitsExpectedAfter)}`\n : \"\";\n\n const logHeader = (\n <>\n {date ? `${startCase(request.name)} for ${formatDate(date)}`\n : startCase(request.name)\n }\n </>\n );\n\n const logContent = (\n <>\n <Typography variant=\"h6\">\n Vendor has been requested to reinstate service\n </Typography>\n\n {visitsExpectedAfter && (\n <Typography variant=\"h6\">{visitsExpectedAfterText}</Typography>\n )}\n </>\n );\n\n return (\n <ReportLogLayout logHeader={logHeader} logContent={logContent} object={request} />\n );\n\n};\n\nexport default ServiceReinstatementRequestLog;\n","import ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport { Box, TableCell, TableRow, Typography, IconButton, Divider, Collapse } from \"@mui/material\";\nimport { map, startCase } from \"lodash\";\nimport { useState } from \"react\";\nimport BinDot from \"service/BinDot\";\nimport LogActionButton from \"service/forms/VoidFormDialog\";\nimport { DeliveryTable } from \"service/DeliveryInstruction\";\nimport { formatDate, useBinFetch } from \"sharedUtils\";\nimport ReportLogLayout from './ReportLogLayout';\n\nconst StockDeliveryRequestLog = ({ request }) => {\n const { binTypes, binGroups } = useBinFetch();\n const { date, deliveryUnits, notes, createdAt } = request.data || {};\n const [open, setOpen] = useState(false);\n const deliveryRows = map(deliveryUnits, ({ serviceCode, quantity }) => {\n const binType = binTypes[serviceCode];\n const binGroup = binGroups[binType?.binGroupId];\n\n return (\n <TableRow key={serviceCode}>\n <TableCell scope=\"row\">\n <BinDot\n binGroup={binGroup}\n tooltipName={true}\n tooltipPlace=\"top\"\n showImg\n {...binType}\n />\n </TableCell>\n <TableCell>{binType?.name}</TableCell>\n <TableCell>{serviceCode}</TableCell>\n <TableCell>{quantity}</TableCell>\n </TableRow>\n );\n });\n\n const inputtedBy = request?.metadata?.inputtedById;\n\n const logHeader = (\n <>\n <Box sx={{ display: \"flex\", alignItems: \"center\" }}>\n <>\n {date\n ? `${startCase(request.name)} for ${formatDate(date)}`\n : startCase(request.name)}\n </>\n <Box flex=\"1\" />\n </Box>\n\n {open && (\n <Divider\n variant=\"middle\"\n sx={{\n m: 0,\n mx: -2,\n mb: 1,\n borderColor: \"#fff\",\n opacity: \"0.2\",\n }}\n />\n )}\n </>\n );\n\n const logContent = (\n <>\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n }}\n >\n <Box sx={{ display: \"flex\", flex: 1, justifyContent: \"flex-end\" }}>\n <LogActionButton event={request} />\n </Box>\n </Box>\n {deliveryUnits && <DeliveryTable rows={deliveryRows} label={false} />}\n {notes && (\n <Typography variant=\"h6\" sx={{ my: 1 }}>\n {notes}\n </Typography>\n )}\n <Box sx={{ display: \"flex\", justifyContent: \"space-between\", alignItems: \"center\", mt: 2 }}>\n <Typography color=\"grey\" sx={{ fontSize: \"10px\" }}>\n Inputted by {inputtedBy?.nameWithoutEmail} on{\" \"}\n {formatDate(createdAt)}\n </Typography>\n </Box>\n </>\n );\n\n return (\n <ReportLogLayout\n logHeader={logHeader}\n logContent={logContent}\n notes2={notes}\n createdAt={createdAt}\n object={request}\n />\n );\n};\n\nexport default StockDeliveryRequestLog;\n","import ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport { Box, Collapse, Divider, IconButton, Typography } from \"@mui/material\";\nimport { Contact } from \"api/tickets\";\nimport { flatMap, startCase } from \"lodash\";\nimport { useState } from \"react\";\nimport { formatDate } from \"sharedUtils\";\nimport { useTicket } from \"ticket/selectors\";\nimport ReportLogLayout from './ReportLogLayout';\n\nconst VisitFrequencyChangeRequestLog = ({ request }) => {\n const { stakeholderContacts } = useTicket() || {};\n const { date, notes } = request.data || {};\n\n const allStakeholders: Contact[] = flatMap(stakeholderContacts || [], (x) => x );\n const inputtedBy = allStakeholders?.find((x) => x.id === request?.metadata?.inputtedById);\n\n // TODO: Handle accept spec change when implemented\n // const isConfirmed = false;\n\n\n const logHeader = (\n <>\n {date ? `${startCase(request.name)} for ${formatDate(date)}`\n : startCase(request.name)\n }\n </>\n );\n\n const logContent = (\n <>\n\n </>\n );\n\n return (\n <ReportLogLayout logHeader={logHeader} logContent={logContent} object={request} />\n );\n\n};\n\nexport default VisitFrequencyChangeRequestLog;\n","import CheckIcon from '@mui/icons-material/Beenhere';\nimport { Box, Typography } from \"@mui/material\";\nimport { startCase } from \"lodash\";\nimport { formatDate } from \"sharedUtils\";\nimport ReportLogLayout from './ReportLogLayout';\n\nconst StyledIcon = ({ onClick }) => (\n <Icon\n component={MenuIcon}\n sx={{\n padding: \"8px\",\n borderRadius: \"50%\",\n cursor: \"pointer\",\n '&:hover': {\n backgroundColor: 'rgba(0, 0, 0, 0.04)',\n },\n '&:active': {\n backgroundColor: 'rgba(0, 0, 0, 0.12)',\n },\n transition: 'background-color 0.3s',\n }}\n onClick={onClick}\n />\n);\n\n\nconst ReattemptDateRequestLog = ({ request }) => {\n\n // ReattemptVisitRequested\n\n const logHeader = (\n <Box sx={{ display: 'flex', alignItems: 'center' }}>\n <CheckIcon color=\"success\" fontSize=\"small\" />\n <Box component=\"span\" sx={{ marginLeft: '6px' }}>\n {startCase(request.name)}\n </Box>\n </Box>\n );\n\n const logContent = (\n <>\n\n </>\n );\n\n return (\n <ReportLogLayout logHeader={logHeader} logContent={logContent} object={request} />\n );\n\n\n\n};\n\nexport default ReattemptDateRequestLog;\n","import { Chip, Box, Collapse, Divider, IconButton, Typography } from \"@mui/material\";\nimport { startCase } from \"lodash\";\nimport { formatDate } from \"sharedUtils\";\nimport ReportLogLayout from './ReportLogLayout';\n\nconst ReattemptDateLog = ({ request }) => {\n const { reattemptDate } = request.data || {};\n\n // ReattemptDateConfirmed\n\n const logHeader = request.name == 'ReattemptDateConfirmed' ? (\n <>\n {startCase(request.name)} for  \n <Chip size=\"xsmall\" color=\"success\" label={formatDate(reattemptDate)} />\n </>\n ) : (\n <> {request.name}</>\n );\n\n const logContent = (\n <>\n {startCase(request.name)}\n </>\n );\n\n return (\n <ReportLogLayout logHeader={logHeader} logContent={logContent} object={request} />\n );\n\n\n};\n\nexport default ReattemptDateLog;\n","import BlockIcon from \"@mui/icons-material/Block\";\nimport ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport {\n Alert,\n Box,\n Button,\n Collapse,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n Divider,\n IconButton,\n Stack,\n Tooltip,\n Typography,\n} from \"@mui/material\";\nimport { useFormServiceActionMutation } from \"api/services\";\nimport { Contact } from \"api/tickets\";\nimport { flatMap } from \"lodash\";\nimport { useState } from \"react\";\nimport { formatDate } from \"sharedUtils\";\nimport { useTicket } from \"ticket/selectors\";\n\nconst NoActionRequiredLog = ({ request, url }) => {\n const { stakeholderContacts } = useTicket() || {};\n const {\n data: { reason },\n } = request || {};\n const [open, setOpen] = useState(false);\n\n const allStakeholders: Contact[] = flatMap(\n stakeholderContacts || [],\n (x) => x,\n );\n\n const inputtedBy = allStakeholders?.find(\n (x) => x.id === request?.metadata?.inputtedById,\n );\n\n return (\n <>\n <Box sx={{ display: \"flex\", alignItems: \"center\" }}>\n <Typography variant=\"h5\" fontWeight=\"bold\">\n No Action Required\n </Typography>\n <Box flex=\"1\" />\n <IconButton\n disableRipple\n onClick={() => setOpen(!open)}\n sx={{\n \"& .MuiSvgIcon-root\": { fontSize: \"20px\", color: \"#bfbfbf\" },\n }}\n >\n {open ? <ExpandLessIcon /> : <ExpandMoreIcon />}\n </IconButton>\n </Box>\n {open && (\n <Divider\n variant=\"middle\"\n sx={{\n m: 0,\n mx: -2,\n mb: 1,\n borderColor: \"#fff\",\n opacity: \"0.2\",\n }}\n />\n )}\n\n <Collapse\n in={open}\n timeout=\"auto\"\n unmountOnExit\n sx={{\n my: 1,\n \"& th.MuiTableCell-root\": {\n borderBottom: \"1px solid rgba(255, 255, 255, 0.2)\",\n },\n }}\n >\n <>\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n }}\n >\n <Typography variant=\"h6\">{reason}</Typography>\n\n <VoidNoActionRequired url={url} />\n </Box>\n\n <Typography color=\"grey\" sx={{ fontSize: \"10px\", mb: 1 }}>\n {`Inputted by ${inputtedBy?.nameWithoutEmail} on ${formatDate(\n request?.createdAt,\n )}`}\n </Typography>\n </>\n </Collapse>\n </>\n );\n};\n\nexport default NoActionRequiredLog;\n\nconst VoidNoActionRequired = ({ url }) => {\n const [dialogOpen, setDialogOpen] = useState(false);\n const handleOpenDialog = () => {\n setDialogOpen(true);\n };\n const onClose = () => {\n setDialogOpen(false);\n };\n return (\n <>\n <Tooltip title=\"Void\" arrow placement=\"top\">\n <IconButton onClick={handleOpenDialog}>\n <BlockIcon sx={{ color: \"#bfbfbf\" }} />\n </IconButton>\n </Tooltip>\n\n {dialogOpen && (\n <VoidDialog onClose={onClose} dialogOpen={dialogOpen} url={url} />\n )}\n </>\n );\n};\n\nconst VoidDialog = ({ onClose, dialogOpen, url }) => {\n const [submitForm] = useFormServiceActionMutation();\n\n const submitHandler = () => {\n submitForm({\n url: `${url}/void_no_action_required.json`,\n body: {},\n })\n .unwrap()\n .then(onClose)\n .catch((error) => {\n console.log(error);\n });\n };\n\n return (\n <>\n <Dialog open={dialogOpen} onClose={onClose}>\n <DialogTitle sx={{ fontWeight: \"bold\", fontSize: \"12px\" }}>\n Void No Action Required\n </DialogTitle>\n <DialogContent sx={{ p: \"8px 16px\" }}>\n </DialogContent>\n <DialogActions>\n <Stack\n direction=\"row\"\n justifyContent=\"flex-end\"\n alignItems=\"center\"\n spacing={1}\n sx={{ width: \"100%\" }}\n >\n <Typography variant=\"h6\" sx={{ fontSize: \"12px\" }}>\n ARE YOU SURE?\n </Typography>\n <Button\n variant=\"outlined\"\n color=\"info\"\n onClick={onClose}\n sx={{ fontSize: \"12px\", width: \"200px\" }}\n >\n No\n </Button>\n <Box>\n <Button\n type=\"submit\"\n variant=\"contained\"\n onClick={submitHandler}\n color=\"success\"\n sx={{ fontSize: \"12px\", width: \"200px\" }}\n >\n Yes\n </Button>\n </Box>\n </Stack>\n </DialogActions>\n </Dialog>\n </>\n );\n};\n","import { Box, CardContent, Divider, Typography } from \"@mui/material\";\nimport { TicketReply } from \"../../../api/tickets\";\nimport { styles } from \"./ReplyCardStyles\";\n\nconst ReplyCardContent = ({ reply }: { reply: TicketReply }) => {\n const { message, attachments } = reply;\n\n return (\n <CardContent sx={styles.cardContent}>\n <Box>{message}</Box>\n\n {attachments && attachments.length > 0 && (\n <Box sx={{ marginTop: 1 }}>\n <Divider\n sx={{\n left: 0,\n right: 0,\n top: 0,\n background: \"#fff\",\n }}\n />\n <Box sx={{ marginTop: 2 }}>\n <Typography variant=\"subtitle1\" color=\"info\">\n Attachments:\n </Typography>\n {attachments.map((attachment, key) => (\n <Box key={key}>\n <a href={attachment.url} target=\"_blank\" rel=\"noopener noreferrer\">\n {attachment.name}\n </a>\n </Box>\n ))}\n </Box>\n </Box>\n )}\n </CardContent>\n );\n};\n\nexport default ReplyCardContent;\n","import AccessTimeIcon from \"@mui/icons-material/AccessTime\";\nimport DoneIcon from \"@mui/icons-material/Done\";\nimport { Box, Tooltip, Typography } from \"@mui/material\";\nimport TimeAgo from \"react-timeago\";\nimport { formatDate } from \"sharedUtils\";\nimport { TicketReply } from \"../../../api/tickets\";\nimport { Channel } from \"../types\";\nimport { getBorderColor, styles } from \"./ReplyCardStyles\";\nimport { TextSmallMuted, TextSmall, TextMuted } from 'sharedComponents';\n\nconst ReplyCardHeader = ({ reply }: { reply: TicketReply }) => {\n const { sentByName, channel } = reply;\n\n return (\n <>\n <Box\n sx={{\n color: channel === Channel.Agent ? '#272B31' : '',\n backgroundColor: channel === Channel.Agent ? getBorderColor(reply.stakeholderName) : '',\n borderBottom: channel === Channel.Agent ? '' : '1px solid #3A3E43',\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n width: \"100%\",\n padding: \"6px 6px\",\n \"& *\": {\n fontSize: \"11px\",\n },\n }}\n >\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 1,\n }}\n >\n\n <Tooltip\n title={formatDate(reply.createdAt)}\n placement=\"top\"\n arrow\n slotProps={{\n tooltip: { style: styles.tooltipStyles.tooltip },\n arrow: { style: styles.tooltipStyles.arrow },\n }}\n >\n\n <TimeAgo date={reply.createdAt} />\n {reply?.sentToName && ` | Sent to ${reply?.sentToName}`}\n\n </Tooltip>\n </Box>\n\n <Box\n sx={{\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: 2,\n }}\n >\n\n Sent by {sentByName}\n\n {reply.stakeholderName}\n\n </Box>\n </Box>\n {reply?.reminder && (\n <TextSmall\n sx={{\n color: \"#37BC9B\",\n p: '6px',\n borderBottom: \"1px solid #3A3E43\",\n }}\n >\n Reminder set for {formatDate(reply.reminder)}\n </TextSmall>\n )}\n </>\n );\n};\n\nexport default ReplyCardHeader;\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","module.exports = false;\n","// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = require('./_wks')('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n","'use strict';\n// 19.1.3.6 Object.prototype.toString()\nvar classof = require('./_classof');\nvar test = {};\ntest[require('./_wks')('toStringTag')] = 'z';\nif (test + '' != '[object z]') {\n require('./_redefine')(Object.prototype, 'toString', function toString() {\n return '[object ' + classof(this) + ']';\n }, true);\n}\n","var $iterators = require('./es6.array.iterator');\nvar getKeys = require('./_object-keys');\nvar redefine = require('./_redefine');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar wks = require('./_wks');\nvar ITERATOR = wks('iterator');\nvar TO_STRING_TAG = wks('toStringTag');\nvar ArrayValues = Iterators.Array;\n\nvar DOMIterables = {\n CSSRuleList: true, // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true, // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true, // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n if (proto) {\n if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);\n if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = ArrayValues;\n if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);\n }\n}\n","var redefine = require('./_redefine');\nmodule.exports = function (target, src, safe) {\n for (var key in src) redefine(target, key, src[key], safe);\n return target;\n};\n","module.exports = function (it, Constructor, name, forbiddenField) {\n if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it, TYPE) {\n if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');\n return it;\n};\n","'use strict';\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = require('./_a-function');\n\nfunction PromiseCapability(C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n}\n\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","var $ = require('./$')\n , createDesc = require('./$.property-desc');\nmodule.exports = require('./$.descriptors') ? function(object, key, value){\n return $.setDesc(object, key, createDesc(1, value));\n} : function(object, key, value){\n object[key] = value;\n return object;\n};","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = require('./_ctx');\nvar IObject = require('./_iobject');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar asc = require('./_array-species-create');\nmodule.exports = function (TYPE, $create) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n var create = $create || asc;\n return function ($this, callbackfn, that) {\n var O = toObject($this);\n var self = IObject(O);\n var f = ctx(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var val, res;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n val = self[index];\n res = f(val, index, O);\n if (TYPE) {\n if (IS_MAP) result[index] = res; // map\n else if (res) switch (TYPE) {\n case 3: return true; // some\n case 5: return val; // find\n case 6: return index; // findIndex\n case 2: result.push(val); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n };\n};\n","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2018 Denis Pushkarev (zloirock.ru)'\n});\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n","// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n","'use strict';\nvar dP = require('./_object-dp').f;\nvar create = require('./_object-create');\nvar redefineAll = require('./_redefine-all');\nvar ctx = require('./_ctx');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar $iterDefine = require('./_iter-define');\nvar step = require('./_iter-step');\nvar setSpecies = require('./_set-species');\nvar DESCRIPTORS = require('./_descriptors');\nvar fastKey = require('./_meta').fastKey;\nvar validate = require('./_validate-collection');\nvar SIZE = DESCRIPTORS ? '_s' : 'size';\n\nvar getEntry = function (that, key) {\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return that._i[index];\n // frozen object case\n for (entry = that._f; entry; entry = entry.n) {\n if (entry.k == key) return entry;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = create(null); // index\n that._f = undefined; // first entry\n that._l = undefined; // last entry\n that[SIZE] = 0; // size\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {\n entry.r = true;\n if (entry.p) entry.p = entry.p.n = undefined;\n delete data[entry.i];\n }\n that._f = that._l = undefined;\n that[SIZE] = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = validate(this, NAME);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.n;\n var prev = entry.p;\n delete that._i[entry.i];\n entry.r = true;\n if (prev) prev.n = next;\n if (next) next.p = prev;\n if (that._f == entry) that._f = next;\n if (that._l == entry) that._l = prev;\n that[SIZE]--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /* , that = undefined */) {\n validate(this, NAME);\n var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n while (entry = entry ? entry.n : this._f) {\n f(entry.v, entry.k, this);\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(validate(this, NAME), key);\n }\n });\n if (DESCRIPTORS) dP(C.prototype, 'size', {\n get: function () {\n return validate(this, NAME)[SIZE];\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var entry = getEntry(that, key);\n var prev, index;\n // change existing entry\n if (entry) {\n entry.v = value;\n // create new entry\n } else {\n that._l = entry = {\n i: index = fastKey(key, true), // <- index\n k: key, // <- key\n v: value, // <- value\n p: prev = that._l, // <- previous entry\n n: undefined, // <- next entry\n r: false // <- removed\n };\n if (!that._f) that._f = entry;\n if (prev) prev.n = entry;\n that[SIZE]++;\n // add to index\n if (index !== 'F') that._i[index] = entry;\n } return that;\n },\n getEntry: getEntry,\n setStrong: function (C, NAME, IS_MAP) {\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n $iterDefine(C, NAME, function (iterated, kind) {\n this._t = validate(iterated, NAME); // target\n this._k = kind; // kind\n this._l = undefined; // previous\n }, function () {\n var that = this;\n var kind = that._k;\n var entry = that._l;\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n // get next entry\n if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {\n // or finish the iteration\n that._t = undefined;\n return step(1);\n }\n // return step by kind\n if (kind == 'keys') return step(0, entry.k);\n if (kind == 'values') return step(0, entry.v);\n return step(0, [entry.k, entry.v]);\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(NAME);\n }\n};\n","'use strict';\nvar global = require('./_global');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (KEY) {\n var C = global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !require('./_fails')(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n","'use strict';\nvar global = require('./_global');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar redefineAll = require('./_redefine-all');\nvar meta = require('./_meta');\nvar forOf = require('./_for-of');\nvar anInstance = require('./_an-instance');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar $iterDetect = require('./_iter-detect');\nvar setToStringTag = require('./_set-to-string-tag');\nvar inheritIfRequired = require('./_inherit-if-required');\n\nmodule.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {\n var Base = global[NAME];\n var C = Base;\n var ADDER = IS_MAP ? 'set' : 'add';\n var proto = C && C.prototype;\n var O = {};\n var fixMethod = function (KEY) {\n var fn = proto[KEY];\n redefine(proto, KEY,\n KEY == 'delete' ? function (a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'has' ? function has(a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'get' ? function get(a) {\n return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }\n : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }\n );\n };\n if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {\n new C().entries().next();\n }))) {\n // create collection constructor\n C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);\n redefineAll(C.prototype, methods);\n meta.NEED = true;\n } else {\n var instance = new C();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new C();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n if (!ACCEPT_ITERABLES) {\n C = wrapper(function (target, iterable) {\n anInstance(target, C, NAME);\n var that = inheritIfRequired(new Base(), target, C);\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n return that;\n });\n C.prototype = proto;\n proto.constructor = C;\n }\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n // weak collections should not contains .clear method\n if (IS_WEAK && proto.clear) delete proto.clear;\n }\n\n setToStringTag(C, NAME);\n\n O[NAME] = C;\n $export($export.G + $export.W + $export.F * (C != Base), O);\n\n if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);\n\n return C;\n};\n","exports.f = {}.propertyIsEnumerable;\n","// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar classof = require('./_classof');\nvar from = require('./_array-from-iterable');\nmodule.exports = function (NAME) {\n return function toJSON() {\n if (classof(this) != NAME) throw TypeError(NAME + \"#toJSON isn't generic\");\n return from(this);\n };\n};\n","'use strict';\n// https://tc39.github.io/proposal-setmap-offrom/\nvar $export = require('./_export');\n\nmodule.exports = function (COLLECTION) {\n $export($export.S, COLLECTION, { of: function of() {\n var length = arguments.length;\n var A = new Array(length);\n while (length--) A[length] = arguments[length];\n return new this(A);\n } });\n};\n","'use strict';\n// https://tc39.github.io/proposal-setmap-offrom/\nvar $export = require('./_export');\nvar aFunction = require('./_a-function');\nvar ctx = require('./_ctx');\nvar forOf = require('./_for-of');\n\nmodule.exports = function (COLLECTION) {\n $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {\n var mapFn = arguments[1];\n var mapping, A, n, cb;\n aFunction(this);\n mapping = mapFn !== undefined;\n if (mapping) aFunction(mapFn);\n if (source == undefined) return new this();\n A = [];\n if (mapping) {\n n = 0;\n cb = ctx(mapFn, arguments[2], 2);\n forOf(source, false, function (nextItem) {\n A.push(cb(nextItem, n++));\n });\n } else {\n forOf(source, false, A.push, A);\n }\n return new this(A);\n } });\n};\n","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object');\nvar aFunction = require('./_a-function');\nvar SPECIES = require('./_wks')('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n","var ctx = require('./_ctx');\nvar invoke = require('./_invoke');\nvar html = require('./_html');\nvar cel = require('./_dom-create');\nvar global = require('./_global');\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n var id = +this;\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function (event) {\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!setTask || !clearTask) {\n setTask = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (require('./_cof')(process) == 'process') {\n defer = function (id) {\n process.nextTick(ctx(run, id, 1));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {\n defer = function (id) {\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in cel('script')) {\n defer = function (id) {\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n","module.exports = function (exec) {\n try {\n return { e: false, v: exec() };\n } catch (e) {\n return { e: true, v: e };\n }\n};\n","var anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar newPromiseCapability = require('./_new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","var store = require('./$.shared')('wks')\n , uid = require('./$.uid')\n , Symbol = require('./$.global').Symbol;\nmodule.exports = function(name){\n return store[name] || (store[name] =\n Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));\n};","module.exports = {\n // Default for the style loading\n styleLoader: 'style-loader!css-loader!sass-loader',\n\n styles: {\n mixins: true,\n 'bordered-pulled': true,\n core: true,\n 'fixed-width': true,\n icons: true,\n larger: true,\n list: true,\n path: true,\n 'rotated-flipped': true,\n animated: true,\n stacked: true\n }\n};\n","var map = {\n\t\"./AllocateCreditApp\": 618,\n\t\"./AllocateCreditApp.jsx\": 618,\n\t\"./AuditReviewApp\": 617,\n\t\"./AuditReviewApp.jsx\": 617,\n\t\"./AuthorityCreditApp\": 624,\n\t\"./AuthorityCreditApp.jsx\": 624,\n\t\"./AuthorityInvoiceApp\": 623,\n\t\"./AuthorityInvoiceApp.jsx\": 623,\n\t\"./ImageSelectorApp\": 625,\n\t\"./ImageSelectorApp.jsx\": 625,\n\t\"./IssueApp\": 615,\n\t\"./IssueApp.jsx\": 615,\n\t\"./MapAndStreetviewApp\": 609,\n\t\"./MapAndStreetviewApp.jsx\": 609,\n\t\"./MultiMapApp\": 610,\n\t\"./MultiMapApp.jsx\": 610,\n\t\"./NotesApp\": 622,\n\t\"./NotesApp.jsx\": 622,\n\t\"./PawaAuditorApp\": 620,\n\t\"./PawaAuditorApp.jsx\": 620,\n\t\"./PolygonsMapApp\": 611,\n\t\"./PolygonsMapApp.jsx\": 611,\n\t\"./PostcodeDistrictsSelectorApp\": 627,\n\t\"./PostcodeDistrictsSelectorApp.jsx\": 627,\n\t\"./ProofCollectionApp\": 626,\n\t\"./ProofCollectionApp.jsx\": 626,\n\t\"./ServiceAppAndy\": 629,\n\t\"./ServiceAppAndy.jsx\": 629,\n\t\"./ServiceCalendarApp\": 630,\n\t\"./ServiceCalendarApp.jsx\": 630,\n\t\"./ServiceMappingsApp\": 619,\n\t\"./ServiceMappingsApp.jsx\": 619,\n\t\"./TicketApp2\": 631,\n\t\"./TicketApp2.tsx\": 631,\n\t\"./ValidationApp\": 616,\n\t\"./ValidationApp.jsx\": 616,\n\t\"./WasteAuditorApp\": 621,\n\t\"./WasteAuditorApp.jsx\": 621,\n\t\"./audit/CheckboxInput\": 390,\n\t\"./audit/CheckboxInput.jsx\": 390,\n\t\"./audit/DateInput\": 391,\n\t\"./audit/DateInput.jsx\": 391,\n\t\"./audit/ModalBox\": 394,\n\t\"./audit/ModalBox.jsx\": 394,\n\t\"./audit/ModalLink\": 389,\n\t\"./audit/ModalLink.jsx\": 389,\n\t\"./audit/MultiLineTextInput\": 388,\n\t\"./audit/MultiLineTextInput.jsx\": 388,\n\t\"./audit/MultiSelectWithOtherInput\": 393,\n\t\"./audit/MultiSelectWithOtherInput.jsx\": 393,\n\t\"./audit/NumberInput\": 387,\n\t\"./audit/NumberInput.jsx\": 387,\n\t\"./audit/RadioInput\": 386,\n\t\"./audit/RadioInput.jsx\": 386,\n\t\"./audit/Section\": 396,\n\t\"./audit/Section.jsx\": 396,\n\t\"./audit/SelectListInput\": 395,\n\t\"./audit/SelectListInput.jsx\": 395,\n\t\"./audit/SelectWithOtherInput\": 392,\n\t\"./audit/SelectWithOtherInput.jsx\": 392,\n\t\"./audit/StatusSummary\": 397,\n\t\"./audit/StatusSummary.jsx\": 397,\n\t\"./audit/SubmitSummary\": 400,\n\t\"./audit/SubmitSummary.jsx\": 400,\n\t\"./audit/SubmitSummarySection\": 399,\n\t\"./audit/SubmitSummarySection.jsx\": 399,\n\t\"./audit/SummaryField\": 385,\n\t\"./audit/SummaryField.jsx\": 385,\n\t\"./audit/SummaryRow\": 398,\n\t\"./audit/SummaryRow.jsx\": 398,\n\t\"./audit/TextAreaInput\": 383,\n\t\"./audit/TextAreaInput.jsx\": 383,\n\t\"./audit/TextInput\": 384,\n\t\"./audit/TextInput.jsx\": 384,\n\t\"./audit/YesNoInput\": 382,\n\t\"./audit/YesNoInput.jsx\": 382,\n\t\"./service/CollectionInstruction\": 403,\n\t\"./service/CollectionInstruction.jsx\": 403,\n\t\"./service/DeliveryInstruction\": 404,\n\t\"./service/DeliveryInstruction.jsx\": 404,\n\t\"./service/Form\": 407,\n\t\"./service/Form.jsx\": 407,\n\t\"./service/ServiceActionMenu\": 405,\n\t\"./service/ServiceActionMenu.jsx\": 405,\n\t\"./service/ServiceBox\": 632,\n\t\"./service/ServiceBox.jsx\": 632,\n\t\"./service/ServiceFormDrawer\": 406,\n\t\"./service/ServiceFormDrawer.jsx\": 406,\n\t\"./service/service-box\": 505,\n\t\"./service/service-box.scss\": 505,\n\t\"./shared/Btn\": 361,\n\t\"./shared/Btn.jsx\": 361,\n\t\"./shared/CheckBoxWithLabel\": 362,\n\t\"./shared/CheckBoxWithLabel.jsx\": 362,\n\t\"./shared/CheckWithLabel\": 295,\n\t\"./shared/CheckWithLabel.jsx\": 295,\n\t\"./shared/DateInput\": 376,\n\t\"./shared/DateInput.jsx\": 376,\n\t\"./shared/DateSelect\": 363,\n\t\"./shared/DateSelect.jsx\": 363,\n\t\"./shared/DaysOfWeekSelect\": 364,\n\t\"./shared/DaysOfWeekSelect.jsx\": 364,\n\t\"./shared/DropdownSelect\": 365,\n\t\"./shared/DropdownSelect.jsx\": 365,\n\t\"./shared/InlineVariable\": 201,\n\t\"./shared/InlineVariable.jsx\": 201,\n\t\"./shared/Link\": 366,\n\t\"./shared/Link.jsx\": 366,\n\t\"./shared/ListGroup\": 367,\n\t\"./shared/ListGroup.jsx\": 367,\n\t\"./shared/ListGroupItem\": 368,\n\t\"./shared/ListGroupItem.jsx\": 368,\n\t\"./shared/Loader\": 156,\n\t\"./shared/Loader.jsx\": 156,\n\t\"./shared/Modal\": 369,\n\t\"./shared/Modal.jsx\": 369,\n\t\"./shared/ModelErrors\": 370,\n\t\"./shared/ModelErrors.jsx\": 370,\n\t\"./shared/NoWrap\": 371,\n\t\"./shared/NoWrap.jsx\": 371,\n\t\"./shared/Popover\": 296,\n\t\"./shared/Popover.jsx\": 296,\n\t\"./shared/RadioInput\": 374,\n\t\"./shared/RadioInput.jsx\": 374,\n\t\"./shared/Scroller\": 372,\n\t\"./shared/Scroller.jsx\": 372,\n\t\"./shared/ShowDate\": 378,\n\t\"./shared/ShowDate.jsx\": 378,\n\t\"./shared/StatelessModal\": 243,\n\t\"./shared/StatelessModal.jsx\": 243,\n\t\"./shared/StatelessPopover\": 244,\n\t\"./shared/StatelessPopover.jsx\": 244,\n\t\"./shared/StyledDialog\": 379,\n\t\"./shared/StyledDialog.jsx\": 379,\n\t\"./shared/TextAreaInput\": 375,\n\t\"./shared/TextAreaInput.jsx\": 375,\n\t\"./shared/TextInput\": 377,\n\t\"./shared/TextInput.jsx\": 377,\n\t\"./shared/TickCross\": 373,\n\t\"./shared/TickCross.jsx\": 373,\n\t\"./shared/VectorMaterial\": 167,\n\t\"./shared/VectorMaterial.jsx\": 167,\n\t\"./shared/dayHelpers\": 245,\n\t\"./shared/dayHelpers.js\": 245\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 1053;","'use strict';\n\n/**\n * Copyright Marc J. Schmidt. See the LICENSE file at the top-level\n * directory of this distribution and at\n * https://github.com/marcj/css-element-queries/blob/master/LICENSE.\n */\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n(function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(factory);\n } else if ((typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === \"object\") {\n module.exports = factory();\n } else {\n root.ResizeSensor = factory();\n }\n})(typeof window !== 'undefined' ? window : this, function () {\n // Make sure it does not throw in a SSR (Server Side Rendering) situation\n if (typeof window === \"undefined\") {\n return null;\n }\n // https://github.com/Semantic-Org/Semantic-UI/issues/3855\n // https://github.com/marcj/css-element-queries/issues/257\n var globalWindow = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\n // Only used for the dirty checking, so the event callback count is limited to max 1 call per fps per sensor.\n // In combination with the event based resize sensor this saves cpu time, because the sensor is too fast and\n // would generate too many unnecessary events.\n var requestAnimationFrame = globalWindow.requestAnimationFrame || globalWindow.mozRequestAnimationFrame || globalWindow.webkitRequestAnimationFrame || function (fn) {\n return globalWindow.setTimeout(fn, 20);\n };\n\n /**\n * Iterate over each of the provided element(s).\n *\n * @param {HTMLElement|HTMLElement[]} elements\n * @param {Function} callback\n */\n function forEachElement(elements, callback) {\n var elementsType = Object.prototype.toString.call(elements);\n var isCollectionTyped = '[object Array]' === elementsType || '[object NodeList]' === elementsType || '[object HTMLCollection]' === elementsType || '[object Object]' === elementsType || 'undefined' !== typeof jQuery && elements instanceof jQuery //jquery\n || 'undefined' !== typeof Elements && elements instanceof Elements //mootools\n ;\n var i = 0,\n j = elements.length;\n if (isCollectionTyped) {\n for (; i < j; i++) {\n callback(elements[i]);\n }\n } else {\n callback(elements);\n }\n }\n\n /**\n * Get element size\n * @param {HTMLElement} element\n * @returns {Object} {width, height}\n */\n function getElementSize(element) {\n if (!element.getBoundingClientRect) {\n return {\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n }\n var rect = element.getBoundingClientRect();\n return {\n width: Math.round(rect.width),\n height: Math.round(rect.height)\n };\n }\n\n /**\n * Apply CSS styles to element.\n *\n * @param {HTMLElement} element\n * @param {Object} style\n */\n function setStyle(element, style) {\n Object.keys(style).forEach(function (key) {\n element.style[key] = style[key];\n });\n }\n\n /**\n * Class for dimension change detection.\n *\n * @param {Element|Element[]|Elements|jQuery} element\n * @param {Function} callback\n *\n * @constructor\n */\n var ResizeSensor = function ResizeSensor(element, callback) {\n /**\n *\n * @constructor\n */\n function EventQueue() {\n var q = [];\n this.add = function (ev) {\n q.push(ev);\n };\n var i, j;\n this.call = function (sizeInfo) {\n for (i = 0, j = q.length; i < j; i++) {\n q[i].call(this, sizeInfo);\n }\n };\n this.remove = function (ev) {\n var newQueue = [];\n for (i = 0, j = q.length; i < j; i++) {\n if (q[i] !== ev) newQueue.push(q[i]);\n }\n q = newQueue;\n };\n this.length = function () {\n return q.length;\n };\n }\n\n /**\n *\n * @param {HTMLElement} element\n * @param {Function} resized\n */\n function attachResizeEvent(element, resized) {\n if (!element) return;\n if (element.resizedAttached) {\n element.resizedAttached.add(resized);\n return;\n }\n element.resizedAttached = new EventQueue();\n element.resizedAttached.add(resized);\n element.resizeSensor = document.createElement('div');\n element.resizeSensor.dir = 'ltr';\n element.resizeSensor.className = 'resize-sensor';\n var style = {\n pointerEvents: 'none',\n position: 'absolute',\n left: '0px',\n top: '0px',\n right: '0px',\n bottom: '0px',\n overflow: 'hidden',\n zIndex: '-1',\n visibility: 'hidden',\n maxWidth: '100%'\n };\n var styleChild = {\n position: 'absolute',\n left: '0px',\n top: '0px',\n transition: '0s'\n };\n setStyle(element.resizeSensor, style);\n var expand = document.createElement('div');\n expand.className = 'resize-sensor-expand';\n setStyle(expand, style);\n var expandChild = document.createElement('div');\n setStyle(expandChild, styleChild);\n expand.appendChild(expandChild);\n var shrink = document.createElement('div');\n shrink.className = 'resize-sensor-shrink';\n setStyle(shrink, style);\n var shrinkChild = document.createElement('div');\n setStyle(shrinkChild, styleChild);\n setStyle(shrinkChild, {\n width: '200%',\n height: '200%'\n });\n shrink.appendChild(shrinkChild);\n element.resizeSensor.appendChild(expand);\n element.resizeSensor.appendChild(shrink);\n element.appendChild(element.resizeSensor);\n var computedStyle = window.getComputedStyle(element);\n var position = computedStyle ? computedStyle.getPropertyValue('position') : null;\n if ('absolute' !== position && 'relative' !== position && 'fixed' !== position) {\n element.style.position = 'relative';\n }\n var dirty, rafId;\n var size = getElementSize(element);\n var lastWidth = 0;\n var lastHeight = 0;\n var initialHiddenCheck = true;\n var lastAnimationFrame = 0;\n var resetExpandShrink = function resetExpandShrink() {\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n expandChild.style.width = width + 10 + 'px';\n expandChild.style.height = height + 10 + 'px';\n expand.scrollLeft = width + 10;\n expand.scrollTop = height + 10;\n shrink.scrollLeft = width + 10;\n shrink.scrollTop = height + 10;\n };\n var reset = function reset() {\n // Check if element is hidden\n if (initialHiddenCheck) {\n var invisible = element.offsetWidth === 0 && element.offsetHeight === 0;\n if (invisible) {\n // Check in next frame\n if (!lastAnimationFrame) {\n lastAnimationFrame = requestAnimationFrame(function () {\n lastAnimationFrame = 0;\n reset();\n });\n }\n return;\n } else {\n // Stop checking\n initialHiddenCheck = false;\n }\n }\n resetExpandShrink();\n };\n element.resizeSensor.resetSensor = reset;\n var onResized = function onResized() {\n rafId = 0;\n if (!dirty) return;\n lastWidth = size.width;\n lastHeight = size.height;\n if (element.resizedAttached) {\n element.resizedAttached.call(size);\n }\n };\n var onScroll = function onScroll() {\n size = getElementSize(element);\n dirty = size.width !== lastWidth || size.height !== lastHeight;\n if (dirty && !rafId) {\n rafId = requestAnimationFrame(onResized);\n }\n reset();\n };\n var addEvent = function addEvent(el, name, cb) {\n if (el.attachEvent) {\n el.attachEvent('on' + name, cb);\n } else {\n el.addEventListener(name, cb);\n }\n };\n addEvent(expand, 'scroll', onScroll);\n addEvent(shrink, 'scroll', onScroll);\n\n // Fix for custom Elements\n requestAnimationFrame(reset);\n }\n forEachElement(element, function (elem) {\n attachResizeEvent(elem, callback);\n });\n this.detach = function (ev) {\n ResizeSensor.detach(element, ev);\n };\n this.reset = function () {\n element.resizeSensor.resetSensor();\n };\n };\n ResizeSensor.reset = function (element) {\n forEachElement(element, function (elem) {\n elem.resizeSensor.resetSensor();\n });\n };\n ResizeSensor.detach = function (element, ev) {\n forEachElement(element, function (elem) {\n if (!elem) return;\n if (elem.resizedAttached && typeof ev === \"function\") {\n elem.resizedAttached.remove(ev);\n if (elem.resizedAttached.length()) return;\n }\n if (elem.resizeSensor) {\n if (elem.contains(elem.resizeSensor)) {\n elem.removeChild(elem.resizeSensor);\n }\n delete elem.resizeSensor;\n delete elem.resizedAttached;\n }\n });\n };\n if (typeof MutationObserver !== \"undefined\") {\n var observer = new MutationObserver(function (mutations) {\n for (var i in mutations) {\n if (mutations.hasOwnProperty(i)) {\n var items = mutations[i].addedNodes;\n for (var j = 0; j < items.length; j++) {\n if (items[j].resizeSensor) {\n ResizeSensor.reset(items[j]);\n }\n }\n }\n }\n });\n document.addEventListener(\"DOMContentLoaded\", function (event) {\n observer.observe(document.body, {\n childList: true,\n subtree: true\n });\n });\n }\n return ResizeSensor;\n});","export function definitionsFromContext(context) {\n return context.keys().map(function (key) {\n return definitionForModuleWithContextAndKey(context, key);\n }).filter(function (value) {\n return value;\n });\n}\nfunction definitionForModuleWithContextAndKey(context, key) {\n var identifier = identifierForContextKey(key);\n if (identifier) {\n return definitionForModuleAndIdentifier(context(key), identifier);\n }\n}\nfunction definitionForModuleAndIdentifier(module, identifier) {\n var controllerConstructor = module[\"default\"];\n if (typeof controllerConstructor == \"function\") {\n return {\n identifier: identifier,\n controllerConstructor: controllerConstructor\n };\n }\n}\nexport function identifierForContextKey(key) {\n var logicalName = (key.match(/^(?:\\.\\/)?(.+)(?:[_-]controller\\..+?)$/) || [])[1];\n if (logicalName) {\n return logicalName.replace(/_/g, \"-\").replace(/\\//g, \"--\");\n }\n}","var $Object = Object;\nmodule.exports = {\n create: $Object.create,\n getProto: $Object.getPrototypeOf,\n isEnum: {}.propertyIsEnumerable,\n getDesc: $Object.getOwnPropertyDescriptor,\n setDesc: $Object.defineProperty,\n setDescs: $Object.defineProperties,\n getKeys: $Object.keys,\n getNames: $Object.getOwnPropertyNames,\n getSymbols: $Object.getOwnPropertySymbols,\n each: [].forEach\n};","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n// THIS FILE IS AUTOMATICALLY GENERATED DO NOT EDIT DIRECTLY\n// https://data.iana.org/TLD/tlds-alpha-by-domain.txt\nvar tlds = 'aaa \\\naarp \\\nabarth \\\nabb \\\nabbott \\\nabbvie \\\nabc \\\nable \\\nabogado \\\nabudhabi \\\nac \\\nacademy \\\naccenture \\\naccountant \\\naccountants \\\naco \\\nactor \\\nad \\\nadac \\\nads \\\nadult \\\nae \\\naeg \\\naero \\\naetna \\\naf \\\nafl \\\nafrica \\\nag \\\nagakhan \\\nagency \\\nai \\\naig \\\nairbus \\\nairforce \\\nairtel \\\nakdn \\\nal \\\nalfaromeo \\\nalibaba \\\nalipay \\\nallfinanz \\\nallstate \\\nally \\\nalsace \\\nalstom \\\nam \\\namazon \\\namericanexpress \\\namericanfamily \\\namex \\\namfam \\\namica \\\namsterdam \\\nanalytics \\\nandroid \\\nanquan \\\nanz \\\nao \\\naol \\\napartments \\\napp \\\napple \\\naq \\\naquarelle \\\nar \\\narab \\\naramco \\\narchi \\\narmy \\\narpa \\\nart \\\narte \\\nas \\\nasda \\\nasia \\\nassociates \\\nat \\\nathleta \\\nattorney \\\nau \\\nauction \\\naudi \\\naudible \\\naudio \\\nauspost \\\nauthor \\\nauto \\\nautos \\\navianca \\\naw \\\naws \\\nax \\\naxa \\\naz \\\nazure \\\nba \\\nbaby \\\nbaidu \\\nbanamex \\\nbananarepublic \\\nband \\\nbank \\\nbar \\\nbarcelona \\\nbarclaycard \\\nbarclays \\\nbarefoot \\\nbargains \\\nbaseball \\\nbasketball \\\nbauhaus \\\nbayern \\\nbb \\\nbbc \\\nbbt \\\nbbva \\\nbcg \\\nbcn \\\nbd \\\nbe \\\nbeats \\\nbeauty \\\nbeer \\\nbentley \\\nberlin \\\nbest \\\nbestbuy \\\nbet \\\nbf \\\nbg \\\nbh \\\nbharti \\\nbi \\\nbible \\\nbid \\\nbike \\\nbing \\\nbingo \\\nbio \\\nbiz \\\nbj \\\nblack \\\nblackfriday \\\nblockbuster \\\nblog \\\nbloomberg \\\nblue \\\nbm \\\nbms \\\nbmw \\\nbn \\\nbnpparibas \\\nbo \\\nboats \\\nboehringer \\\nbofa \\\nbom \\\nbond \\\nboo \\\nbook \\\nbooking \\\nbosch \\\nbostik \\\nboston \\\nbot \\\nboutique \\\nbox \\\nbr \\\nbradesco \\\nbridgestone \\\nbroadway \\\nbroker \\\nbrother \\\nbrussels \\\nbs \\\nbt \\\nbugatti \\\nbuild \\\nbuilders \\\nbusiness \\\nbuy \\\nbuzz \\\nbv \\\nbw \\\nby \\\nbz \\\nbzh \\\nca \\\ncab \\\ncafe \\\ncal \\\ncall \\\ncalvinklein \\\ncam \\\ncamera \\\ncamp \\\ncancerresearch \\\ncanon \\\ncapetown \\\ncapital \\\ncapitalone \\\ncar \\\ncaravan \\\ncards \\\ncare \\\ncareer \\\ncareers \\\ncars \\\ncasa \\\ncase \\\ncash \\\ncasino \\\ncat \\\ncatering \\\ncatholic \\\ncba \\\ncbn \\\ncbre \\\ncbs \\\ncc \\\ncd \\\ncenter \\\nceo \\\ncern \\\ncf \\\ncfa \\\ncfd \\\ncg \\\nch \\\nchanel \\\nchannel \\\ncharity \\\nchase \\\nchat \\\ncheap \\\nchintai \\\nchristmas \\\nchrome \\\nchurch \\\nci \\\ncipriani \\\ncircle \\\ncisco \\\ncitadel \\\nciti \\\ncitic \\\ncity \\\ncityeats \\\nck \\\ncl \\\nclaims \\\ncleaning \\\nclick \\\nclinic \\\nclinique \\\nclothing \\\ncloud \\\nclub \\\nclubmed \\\ncm \\\ncn \\\nco \\\ncoach \\\ncodes \\\ncoffee \\\ncollege \\\ncologne \\\ncom \\\ncomcast \\\ncommbank \\\ncommunity \\\ncompany \\\ncompare \\\ncomputer \\\ncomsec \\\ncondos \\\nconstruction \\\nconsulting \\\ncontact \\\ncontractors \\\ncooking \\\ncookingchannel \\\ncool \\\ncoop \\\ncorsica \\\ncountry \\\ncoupon \\\ncoupons \\\ncourses \\\ncpa \\\ncr \\\ncredit \\\ncreditcard \\\ncreditunion \\\ncricket \\\ncrown \\\ncrs \\\ncruise \\\ncruises \\\ncu \\\ncuisinella \\\ncv \\\ncw \\\ncx \\\ncy \\\ncymru \\\ncyou \\\ncz \\\ndabur \\\ndad \\\ndance \\\ndata \\\ndate \\\ndating \\\ndatsun \\\nday \\\ndclk \\\ndds \\\nde \\\ndeal \\\ndealer \\\ndeals \\\ndegree \\\ndelivery \\\ndell \\\ndeloitte \\\ndelta \\\ndemocrat \\\ndental \\\ndentist \\\ndesi \\\ndesign \\\ndev \\\ndhl \\\ndiamonds \\\ndiet \\\ndigital \\\ndirect \\\ndirectory \\\ndiscount \\\ndiscover \\\ndish \\\ndiy \\\ndj \\\ndk \\\ndm \\\ndnp \\\ndo \\\ndocs \\\ndoctor \\\ndog \\\ndomains \\\ndot \\\ndownload \\\ndrive \\\ndtv \\\ndubai \\\ndunlop \\\ndupont \\\ndurban \\\ndvag \\\ndvr \\\ndz \\\nearth \\\neat \\\nec \\\neco \\\nedeka \\\nedu \\\neducation \\\nee \\\neg \\\nemail \\\nemerck \\\nenergy \\\nengineer \\\nengineering \\\nenterprises \\\nepson \\\nequipment \\\ner \\\nericsson \\\nerni \\\nes \\\nesq \\\nestate \\\net \\\netisalat \\\neu \\\neurovision \\\neus \\\nevents \\\nexchange \\\nexpert \\\nexposed \\\nexpress \\\nextraspace \\\nfage \\\nfail \\\nfairwinds \\\nfaith \\\nfamily \\\nfan \\\nfans \\\nfarm \\\nfarmers \\\nfashion \\\nfast \\\nfedex \\\nfeedback \\\nferrari \\\nferrero \\\nfi \\\nfiat \\\nfidelity \\\nfido \\\nfilm \\\nfinal \\\nfinance \\\nfinancial \\\nfire \\\nfirestone \\\nfirmdale \\\nfish \\\nfishing \\\nfit \\\nfitness \\\nfj \\\nfk \\\nflickr \\\nflights \\\nflir \\\nflorist \\\nflowers \\\nfly \\\nfm \\\nfo \\\nfoo \\\nfood \\\nfoodnetwork \\\nfootball \\\nford \\\nforex \\\nforsale \\\nforum \\\nfoundation \\\nfox \\\nfr \\\nfree \\\nfresenius \\\nfrl \\\nfrogans \\\nfrontdoor \\\nfrontier \\\nftr \\\nfujitsu \\\nfun \\\nfund \\\nfurniture \\\nfutbol \\\nfyi \\\nga \\\ngal \\\ngallery \\\ngallo \\\ngallup \\\ngame \\\ngames \\\ngap \\\ngarden \\\ngay \\\ngb \\\ngbiz \\\ngd \\\ngdn \\\nge \\\ngea \\\ngent \\\ngenting \\\ngeorge \\\ngf \\\ngg \\\nggee \\\ngh \\\ngi \\\ngift \\\ngifts \\\ngives \\\ngiving \\\ngl \\\nglass \\\ngle \\\nglobal \\\nglobo \\\ngm \\\ngmail \\\ngmbh \\\ngmo \\\ngmx \\\ngn \\\ngodaddy \\\ngold \\\ngoldpoint \\\ngolf \\\ngoo \\\ngoodyear \\\ngoog \\\ngoogle \\\ngop \\\ngot \\\ngov \\\ngp \\\ngq \\\ngr \\\ngrainger \\\ngraphics \\\ngratis \\\ngreen \\\ngripe \\\ngrocery \\\ngroup \\\ngs \\\ngt \\\ngu \\\nguardian \\\ngucci \\\nguge \\\nguide \\\nguitars \\\nguru \\\ngw \\\ngy \\\nhair \\\nhamburg \\\nhangout \\\nhaus \\\nhbo \\\nhdfc \\\nhdfcbank \\\nhealth \\\nhealthcare \\\nhelp \\\nhelsinki \\\nhere \\\nhermes \\\nhgtv \\\nhiphop \\\nhisamitsu \\\nhitachi \\\nhiv \\\nhk \\\nhkt \\\nhm \\\nhn \\\nhockey \\\nholdings \\\nholiday \\\nhomedepot \\\nhomegoods \\\nhomes \\\nhomesense \\\nhonda \\\nhorse \\\nhospital \\\nhost \\\nhosting \\\nhot \\\nhoteles \\\nhotels \\\nhotmail \\\nhouse \\\nhow \\\nhr \\\nhsbc \\\nht \\\nhu \\\nhughes \\\nhyatt \\\nhyundai \\\nibm \\\nicbc \\\nice \\\nicu \\\nid \\\nie \\\nieee \\\nifm \\\nikano \\\nil \\\nim \\\nimamat \\\nimdb \\\nimmo \\\nimmobilien \\\nin \\\ninc \\\nindustries \\\ninfiniti \\\ninfo \\\ning \\\nink \\\ninstitute \\\ninsurance \\\ninsure \\\nint \\\ninternational \\\nintuit \\\ninvestments \\\nio \\\nipiranga \\\niq \\\nir \\\nirish \\\nis \\\nismaili \\\nist \\\nistanbul \\\nit \\\nitau \\\nitv \\\njaguar \\\njava \\\njcb \\\nje \\\njeep \\\njetzt \\\njewelry \\\njio \\\njll \\\njm \\\njmp \\\njnj \\\njo \\\njobs \\\njoburg \\\njot \\\njoy \\\njp \\\njpmorgan \\\njprs \\\njuegos \\\njuniper \\\nkaufen \\\nkddi \\\nke \\\nkerryhotels \\\nkerrylogistics \\\nkerryproperties \\\nkfh \\\nkg \\\nkh \\\nki \\\nkia \\\nkids \\\nkim \\\nkinder \\\nkindle \\\nkitchen \\\nkiwi \\\nkm \\\nkn \\\nkoeln \\\nkomatsu \\\nkosher \\\nkp \\\nkpmg \\\nkpn \\\nkr \\\nkrd \\\nkred \\\nkuokgroup \\\nkw \\\nky \\\nkyoto \\\nkz \\\nla \\\nlacaixa \\\nlamborghini \\\nlamer \\\nlancaster \\\nlancia \\\nland \\\nlandrover \\\nlanxess \\\nlasalle \\\nlat \\\nlatino \\\nlatrobe \\\nlaw \\\nlawyer \\\nlb \\\nlc \\\nlds \\\nlease \\\nleclerc \\\nlefrak \\\nlegal \\\nlego \\\nlexus \\\nlgbt \\\nli \\\nlidl \\\nlife \\\nlifeinsurance \\\nlifestyle \\\nlighting \\\nlike \\\nlilly \\\nlimited \\\nlimo \\\nlincoln \\\nlinde \\\nlink \\\nlipsy \\\nlive \\\nliving \\\nlk \\\nllc \\\nllp \\\nloan \\\nloans \\\nlocker \\\nlocus \\\nloft \\\nlol \\\nlondon \\\nlotte \\\nlotto \\\nlove \\\nlpl \\\nlplfinancial \\\nlr \\\nls \\\nlt \\\nltd \\\nltda \\\nlu \\\nlundbeck \\\nluxe \\\nluxury \\\nlv \\\nly \\\nma \\\nmacys \\\nmadrid \\\nmaif \\\nmaison \\\nmakeup \\\nman \\\nmanagement \\\nmango \\\nmap \\\nmarket \\\nmarketing \\\nmarkets \\\nmarriott \\\nmarshalls \\\nmaserati \\\nmattel \\\nmba \\\nmc \\\nmckinsey \\\nmd \\\nme \\\nmed \\\nmedia \\\nmeet \\\nmelbourne \\\nmeme \\\nmemorial \\\nmen \\\nmenu \\\nmerckmsd \\\nmg \\\nmh \\\nmiami \\\nmicrosoft \\\nmil \\\nmini \\\nmint \\\nmit \\\nmitsubishi \\\nmk \\\nml \\\nmlb \\\nmls \\\nmm \\\nmma \\\nmn \\\nmo \\\nmobi \\\nmobile \\\nmoda \\\nmoe \\\nmoi \\\nmom \\\nmonash \\\nmoney \\\nmonster \\\nmormon \\\nmortgage \\\nmoscow \\\nmoto \\\nmotorcycles \\\nmov \\\nmovie \\\nmp \\\nmq \\\nmr \\\nms \\\nmsd \\\nmt \\\nmtn \\\nmtr \\\nmu \\\nmuseum \\\nmusic \\\nmutual \\\nmv \\\nmw \\\nmx \\\nmy \\\nmz \\\nna \\\nnab \\\nnagoya \\\nname \\\nnatura \\\nnavy \\\nnba \\\nnc \\\nne \\\nnec \\\nnet \\\nnetbank \\\nnetflix \\\nnetwork \\\nneustar \\\nnew \\\nnews \\\nnext \\\nnextdirect \\\nnexus \\\nnf \\\nnfl \\\nng \\\nngo \\\nnhk \\\nni \\\nnico \\\nnike \\\nnikon \\\nninja \\\nnissan \\\nnissay \\\nnl \\\nno \\\nnokia \\\nnorthwesternmutual \\\nnorton \\\nnow \\\nnowruz \\\nnowtv \\\nnp \\\nnr \\\nnra \\\nnrw \\\nntt \\\nnu \\\nnyc \\\nnz \\\nobi \\\nobserver \\\noffice \\\nokinawa \\\nolayan \\\nolayangroup \\\noldnavy \\\nollo \\\nom \\\nomega \\\none \\\nong \\\nonl \\\nonline \\\nooo \\\nopen \\\noracle \\\norange \\\norg \\\norganic \\\norigins \\\nosaka \\\notsuka \\\nott \\\novh \\\npa \\\npage \\\npanasonic \\\nparis \\\npars \\\npartners \\\nparts \\\nparty \\\npassagens \\\npay \\\npccw \\\npe \\\npet \\\npf \\\npfizer \\\npg \\\nph \\\npharmacy \\\nphd \\\nphilips \\\nphone \\\nphoto \\\nphotography \\\nphotos \\\nphysio \\\npics \\\npictet \\\npictures \\\npid \\\npin \\\nping \\\npink \\\npioneer \\\npizza \\\npk \\\npl \\\nplace \\\nplay \\\nplaystation \\\nplumbing \\\nplus \\\npm \\\npn \\\npnc \\\npohl \\\npoker \\\npolitie \\\nporn \\\npost \\\npr \\\npramerica \\\npraxi \\\npress \\\nprime \\\npro \\\nprod \\\nproductions \\\nprof \\\nprogressive \\\npromo \\\nproperties \\\nproperty \\\nprotection \\\npru \\\nprudential \\\nps \\\npt \\\npub \\\npw \\\npwc \\\npy \\\nqa \\\nqpon \\\nquebec \\\nquest \\\nracing \\\nradio \\\nre \\\nread \\\nrealestate \\\nrealtor \\\nrealty \\\nrecipes \\\nred \\\nredstone \\\nredumbrella \\\nrehab \\\nreise \\\nreisen \\\nreit \\\nreliance \\\nren \\\nrent \\\nrentals \\\nrepair \\\nreport \\\nrepublican \\\nrest \\\nrestaurant \\\nreview \\\nreviews \\\nrexroth \\\nrich \\\nrichardli \\\nricoh \\\nril \\\nrio \\\nrip \\\nro \\\nrocher \\\nrocks \\\nrodeo \\\nrogers \\\nroom \\\nrs \\\nrsvp \\\nru \\\nrugby \\\nruhr \\\nrun \\\nrw \\\nrwe \\\nryukyu \\\nsa \\\nsaarland \\\nsafe \\\nsafety \\\nsakura \\\nsale \\\nsalon \\\nsamsclub \\\nsamsung \\\nsandvik \\\nsandvikcoromant \\\nsanofi \\\nsap \\\nsarl \\\nsas \\\nsave \\\nsaxo \\\nsb \\\nsbi \\\nsbs \\\nsc \\\nsca \\\nscb \\\nschaeffler \\\nschmidt \\\nscholarships \\\nschool \\\nschule \\\nschwarz \\\nscience \\\nscot \\\nsd \\\nse \\\nsearch \\\nseat \\\nsecure \\\nsecurity \\\nseek \\\nselect \\\nsener \\\nservices \\\nses \\\nseven \\\nsew \\\nsex \\\nsexy \\\nsfr \\\nsg \\\nsh \\\nshangrila \\\nsharp \\\nshaw \\\nshell \\\nshia \\\nshiksha \\\nshoes \\\nshop \\\nshopping \\\nshouji \\\nshow \\\nshowtime \\\nsi \\\nsilk \\\nsina \\\nsingles \\\nsite \\\nsj \\\nsk \\\nski \\\nskin \\\nsky \\\nskype \\\nsl \\\nsling \\\nsm \\\nsmart \\\nsmile \\\nsn \\\nsncf \\\nso \\\nsoccer \\\nsocial \\\nsoftbank \\\nsoftware \\\nsohu \\\nsolar \\\nsolutions \\\nsong \\\nsony \\\nsoy \\\nspa \\\nspace \\\nsport \\\nspot \\\nsr \\\nsrl \\\nss \\\nst \\\nstada \\\nstaples \\\nstar \\\nstatebank \\\nstatefarm \\\nstc \\\nstcgroup \\\nstockholm \\\nstorage \\\nstore \\\nstream \\\nstudio \\\nstudy \\\nstyle \\\nsu \\\nsucks \\\nsupplies \\\nsupply \\\nsupport \\\nsurf \\\nsurgery \\\nsuzuki \\\nsv \\\nswatch \\\nswiss \\\nsx \\\nsy \\\nsydney \\\nsystems \\\nsz \\\ntab \\\ntaipei \\\ntalk \\\ntaobao \\\ntarget \\\ntatamotors \\\ntatar \\\ntattoo \\\ntax \\\ntaxi \\\ntc \\\ntci \\\ntd \\\ntdk \\\nteam \\\ntech \\\ntechnology \\\ntel \\\ntemasek \\\ntennis \\\nteva \\\ntf \\\ntg \\\nth \\\nthd \\\ntheater \\\ntheatre \\\ntiaa \\\ntickets \\\ntienda \\\ntiffany \\\ntips \\\ntires \\\ntirol \\\ntj \\\ntjmaxx \\\ntjx \\\ntk \\\ntkmaxx \\\ntl \\\ntm \\\ntmall \\\ntn \\\nto \\\ntoday \\\ntokyo \\\ntools \\\ntop \\\ntoray \\\ntoshiba \\\ntotal \\\ntours \\\ntown \\\ntoyota \\\ntoys \\\ntr \\\ntrade \\\ntrading \\\ntraining \\\ntravel \\\ntravelchannel \\\ntravelers \\\ntravelersinsurance \\\ntrust \\\ntrv \\\ntt \\\ntube \\\ntui \\\ntunes \\\ntushu \\\ntv \\\ntvs \\\ntw \\\ntz \\\nua \\\nubank \\\nubs \\\nug \\\nuk \\\nunicom \\\nuniversity \\\nuno \\\nuol \\\nups \\\nus \\\nuy \\\nuz \\\nva \\\nvacations \\\nvana \\\nvanguard \\\nvc \\\nve \\\nvegas \\\nventures \\\nverisign \\\nvermögensberater \\\nvermögensberatung \\\nversicherung \\\nvet \\\nvg \\\nvi \\\nviajes \\\nvideo \\\nvig \\\nviking \\\nvillas \\\nvin \\\nvip \\\nvirgin \\\nvisa \\\nvision \\\nviva \\\nvivo \\\nvlaanderen \\\nvn \\\nvodka \\\nvolkswagen \\\nvolvo \\\nvote \\\nvoting \\\nvoto \\\nvoyage \\\nvu \\\nvuelos \\\nwales \\\nwalmart \\\nwalter \\\nwang \\\nwanggou \\\nwatch \\\nwatches \\\nweather \\\nweatherchannel \\\nwebcam \\\nweber \\\nwebsite \\\nwed \\\nwedding \\\nweibo \\\nweir \\\nwf \\\nwhoswho \\\nwien \\\nwiki \\\nwilliamhill \\\nwin \\\nwindows \\\nwine \\\nwinners \\\nwme \\\nwolterskluwer \\\nwoodside \\\nwork \\\nworks \\\nworld \\\nwow \\\nws \\\nwtc \\\nwtf \\\nxbox \\\nxerox \\\nxfinity \\\nxihuan \\\nxin \\\nxxx \\\nxyz \\\nyachts \\\nyahoo \\\nyamaxun \\\nyandex \\\nye \\\nyodobashi \\\nyoga \\\nyokohama \\\nyou \\\nyoutube \\\nyt \\\nyun \\\nza \\\nzappos \\\nzara \\\nzero \\\nzip \\\nzm \\\nzone \\\nzuerich \\\nzw'.split(' '); // Internationalized domain names containing non-ASCII\n\nvar utlds = 'ελ \\\nευ \\\nбг \\\nбел \\\nдети \\\nею \\\nкатолик \\\nком \\\nмкд \\\nмон \\\nмосква \\\nонлайн \\\nорг \\\nрус \\\nрф \\\nсайт \\\nсрб \\\nукр \\\nқаз \\\nհայ \\\nישראל \\\nקום \\\nابوظبي \\\nاتصالات \\\nارامكو \\\nالاردن \\\nالبحرين \\\nالجزائر \\\nالسعودية \\\nالعليان \\\nالمغرب \\\nامارات \\\nایران \\\nبارت \\\nبازار \\\nبيتك \\\nبھارت \\\nتونس \\\nسودان \\\nسورية \\\nشبكة \\\nعراق \\\nعرب \\\nعمان \\\nفلسطين \\\nقطر \\\nكاثوليك \\\nكوم \\\nمصر \\\nمليسيا \\\nموريتانيا \\\nموقع \\\nهمراه \\\nپاکستان \\\nڀارت \\\nकॉम \\\nनेट \\\nभारत \\\nभारतम् \\\nभारोत \\\nसंगठन \\\nবাংলা \\\nভারত \\\nভাৰত \\\nਭਾਰਤ \\\nભારત \\\nଭାରତ \\\nஇந்தியா \\\nஇலங்கை \\\nசிங்கப்பூர் \\\nభారత్ \\\nಭಾರತ \\\nഭാരതം \\\nලංකා \\\nคอม \\\nไทย \\\nລາວ \\\nგე \\\nみんな \\\nアマゾン \\\nクラウド \\\nグーグル \\\nコム \\\nストア \\\nセール \\\nファッション \\\nポイント \\\n世界 \\\n中信 \\\n中国 \\\n中國 \\\n中文网 \\\n亚马逊 \\\n企业 \\\n佛山 \\\n信息 \\\n健康 \\\n八卦 \\\n公司 \\\n公益 \\\n台湾 \\\n台灣 \\\n商城 \\\n商店 \\\n商标 \\\n嘉里 \\\n嘉里大酒店 \\\n在线 \\\n大拿 \\\n天主教 \\\n娱乐 \\\n家電 \\\n广东 \\\n微博 \\\n慈善 \\\n我爱你 \\\n手机 \\\n招聘 \\\n政务 \\\n政府 \\\n新加坡 \\\n新闻 \\\n时尚 \\\n書籍 \\\n机构 \\\n淡马锡 \\\n游戏 \\\n澳門 \\\n点看 \\\n移动 \\\n组织机构 \\\n网址 \\\n网店 \\\n网站 \\\n网络 \\\n联通 \\\n诺基亚 \\\n谷歌 \\\n购物 \\\n通販 \\\n集团 \\\n電訊盈科 \\\n飞利浦 \\\n食品 \\\n餐厅 \\\n香格里拉 \\\n香港 \\\n닷넷 \\\n닷컴 \\\n삼성 \\\n한국'.split(' ');\n\n/**\n * @template A\n * @template B\n * @param {A} target\n * @param {B} properties\n * @return {A & B}\n */\nvar assign = function assign(target, properties) {\n for (var key in properties) {\n target[key] = properties[key];\n }\n return target;\n};\n\n/**\n * Finite State Machine generation utilities\n */\n/**\n * @template T\n * @typedef {{ [group: string]: T[] }} Collections\n */\n\n/**\n * @typedef {{ [group: string]: true }} Flags\n */\n// Keys in scanner Collections instances\n\nvar numeric = 'numeric';\nvar ascii = 'ascii';\nvar alpha = 'alpha';\nvar asciinumeric = 'asciinumeric';\nvar alphanumeric = 'alphanumeric';\nvar domain = 'domain';\nvar emoji = 'emoji';\nvar scheme = 'scheme';\nvar slashscheme = 'slashscheme';\nvar whitespace = 'whitespace';\n/**\n * @template T\n * @param {string} name\n * @param {Collections<T>} groups to register in\n * @returns {T[]} Current list of tokens in the given collection\n */\n\nfunction registerGroup(name, groups) {\n if (!(name in groups)) {\n groups[name] = [];\n }\n return groups[name];\n}\n/**\n * @template T\n * @param {T} t token to add\n * @param {Collections<T>} groups\n * @param {Flags} flags\n */\n\nfunction addToGroups(t, flags, groups) {\n if (flags[numeric]) {\n flags[asciinumeric] = true;\n flags[alphanumeric] = true;\n }\n if (flags[ascii]) {\n flags[asciinumeric] = true;\n flags[alpha] = true;\n }\n if (flags[asciinumeric]) {\n flags[alphanumeric] = true;\n }\n if (flags[alpha]) {\n flags[alphanumeric] = true;\n }\n if (flags[alphanumeric]) {\n flags[domain] = true;\n }\n if (flags[emoji]) {\n flags[domain] = true;\n }\n for (var k in flags) {\n var group = registerGroup(k, groups);\n if (group.indexOf(t) < 0) {\n group.push(t);\n }\n }\n}\n/**\n * @template T\n * @param {T} t token to check\n * @param {Collections<T>} groups\n * @returns {Flags} group flags that contain this token\n */\n\nfunction flagsForToken(t, groups) {\n var result = {};\n for (var c in groups) {\n if (groups[c].indexOf(t) >= 0) {\n result[c] = true;\n }\n }\n return result;\n}\n/**\n * @template T\n * @typedef {null | T } Transition\n */\n\n/**\n * Define a basic state machine state. j is the list of character transitions,\n * jr is the list of regex-match transitions, jd is the default state to\n * transition to t is the accepting token type, if any. If this is the terminal\n * state, then it does not emit a token.\n *\n * The template type T represents the type of the token this state accepts. This\n * should be a string (such as of the token exports in `text.js`) or a\n * MultiToken subclass (from `multi.js`)\n *\n * @template T\n * @param {T} [token] Token that this state emits\n */\n\nfunction State(token) {\n if (token === void 0) {\n token = null;\n }\n\n // this.n = null; // DEBUG: State name\n\n /** @type {{ [input: string]: State<T> }} j */\n this.j = {}; // IMPLEMENTATION 1\n // this.j = []; // IMPLEMENTATION 2\n\n /** @type {[RegExp, State<T>][]} jr */\n\n this.jr = [];\n /** @type {?State<T>} jd */\n\n this.jd = null;\n /** @type {?T} t */\n\n this.t = token;\n}\n/**\n * Scanner token groups\n * @type Collections<string>\n */\n\nState.groups = {};\nState.prototype = {\n accepts: function accepts() {\n return !!this.t;\n },\n /**\n * Follow an existing transition from the given input to the next state.\n * Does not mutate.\n * @param {string} input character or token type to transition on\n * @returns {?State<T>} the next state, if any\n */\n go: function go(input) {\n var state = this;\n var nextState = state.j[input];\n if (nextState) {\n return nextState;\n }\n for (var i = 0; i < state.jr.length; i++) {\n var regex = state.jr[i][0];\n var _nextState = state.jr[i][1]; // note: might be empty to prevent default jump\n\n if (_nextState && regex.test(input)) {\n return _nextState;\n }\n } // Nowhere left to jump! Return default, if any\n\n return state.jd;\n },\n /**\n * Whether the state has a transition for the given input. Set the second\n * argument to true to only look for an exact match (and not a default or\n * regular-expression-based transition)\n * @param {string} input\n * @param {boolean} exactOnly\n */\n has: function has(input, exactOnly) {\n if (exactOnly === void 0) {\n exactOnly = false;\n }\n return exactOnly ? input in this.j : !!this.go(input);\n },\n /**\n * Short for \"transition all\"; create a transition from the array of items\n * in the given list to the same final resulting state.\n * @param {string | string[]} inputs Group of inputs to transition on\n * @param {Transition<T> | State<T>} [next] Transition options\n * @param {Flags} [flags] Collections flags to add token to\n * @param {Collections<T>} [groups] Master list of token groups\n */\n ta: function ta(inputs, next, flags, groups) {\n for (var i = 0; i < inputs.length; i++) {\n this.tt(inputs[i], next, flags, groups);\n }\n },\n /**\n * Short for \"take regexp transition\"; defines a transition for this state\n * when it encounters a token which matches the given regular expression\n * @param {RegExp} regexp Regular expression transition (populate first)\n * @param {T | State<T>} [next] Transition options\n * @param {Flags} [flags] Collections flags to add token to\n * @param {Collections<T>} [groups] Master list of token groups\n * @returns {State<T>} taken after the given input\n */\n tr: function tr(regexp, next, flags, groups) {\n groups = groups || State.groups;\n var nextState;\n if (next && next.j) {\n nextState = next;\n } else {\n // Token with maybe token groups\n nextState = new State(next);\n if (flags && groups) {\n addToGroups(next, flags, groups);\n }\n }\n this.jr.push([regexp, nextState]);\n return nextState;\n },\n /**\n * Short for \"take transitions\", will take as many sequential transitions as\n * the length of the given input and returns the\n * resulting final state.\n * @param {string | string[]} input\n * @param {T | State<T>} [next] Transition options\n * @param {Flags} [flags] Collections flags to add token to\n * @param {Collections<T>} [groups] Master list of token groups\n * @returns {State<T>} taken after the given input\n */\n ts: function ts(input, next, flags, groups) {\n var state = this;\n var len = input.length;\n if (!len) {\n return state;\n }\n for (var i = 0; i < len - 1; i++) {\n state = state.tt(input[i]);\n }\n return state.tt(input[len - 1], next, flags, groups);\n },\n /**\n * Short for \"take transition\", this is a method for building/working with\n * state machines.\n *\n * If a state already exists for the given input, returns it.\n *\n * If a token is specified, that state will emit that token when reached by\n * the linkify engine.\n *\n * If no state exists, it will be initialized with some default transitions\n * that resemble existing default transitions.\n *\n * If a state is given for the second argument, that state will be\n * transitioned to on the given input regardless of what that input\n * previously did.\n *\n * Specify a token group flags to define groups that this token belongs to.\n * The token will be added to corresponding entires in the given groups\n * object.\n *\n * @param {string} input character, token type to transition on\n * @param {T | State<T>} [next] Transition options\n * @param {Flags} [flags] Collections flags to add token to\n * @param {Collections<T>} [groups] Master list of groups\n * @returns {State<T>} taken after the given input\n */\n tt: function tt(input, next, flags, groups) {\n groups = groups || State.groups;\n var state = this; // Check if existing state given, just a basic transition\n\n if (next && next.j) {\n state.j[input] = next;\n return next;\n }\n var t = next; // Take the transition with the usual default mechanisms and use that as\n // a template for creating the next state\n\n var nextState,\n templateState = state.go(input);\n if (templateState) {\n nextState = new State();\n assign(nextState.j, templateState.j);\n nextState.jr.push.apply(nextState.jr, templateState.jr);\n nextState.jd = templateState.jd;\n nextState.t = templateState.t;\n } else {\n nextState = new State();\n }\n if (t) {\n // Ensure newly token is in the same groups as the old token\n if (groups) {\n if (nextState.t && typeof nextState.t === 'string') {\n var allFlags = assign(flagsForToken(nextState.t, groups), flags);\n addToGroups(t, allFlags, groups);\n } else if (flags) {\n addToGroups(t, flags, groups);\n }\n }\n nextState.t = t; // overwrite anything that was previously there\n }\n state.j[input] = nextState;\n return nextState;\n }\n}; // Helper functions to improve minification (not exported outside linkifyjs module)\n\n/**\n * @template T\n * @param {State<T>} state\n * @param {string | string[]} input\n * @param {Flags} [flags]\n * @param {Collections<T>} [groups]\n */\n\nvar ta = function ta(state, input, next, flags, groups) {\n return state.ta(input, next, flags, groups);\n};\n/**\n * @template T\n * @param {State<T>} state\n * @param {RegExp} regexp\n * @param {T | State<T>} [next]\n * @param {Flags} [flags]\n * @param {Collections<T>} [groups]\n */\n\nvar tr = function tr(state, regexp, next, flags, groups) {\n return state.tr(regexp, next, flags, groups);\n};\n/**\n * @template T\n * @param {State<T>} state\n * @param {string | string[]} input\n * @param {T | State<T>} [next]\n * @param {Flags} [flags]\n * @param {Collections<T>} [groups]\n */\n\nvar ts = function ts(state, input, next, flags, groups) {\n return state.ts(input, next, flags, groups);\n};\n/**\n * @template T\n * @param {State<T>} state\n * @param {string} input\n * @param {T | State<T>} [next]\n * @param {Collections<T>} [groups]\n * @param {Flags} [flags]\n */\n\nvar tt = function tt(state, input, next, flags, groups) {\n return state.tt(input, next, flags, groups);\n};\n\n/******************************************************************************\nText Tokens\nIdentifiers for token outputs from the regexp scanner\n******************************************************************************/\n// A valid web domain token\nvar WORD = 'WORD'; // only contains a-z\n\nvar UWORD = 'UWORD'; // contains letters other than a-z, used for IDN\n// Special case of word\n\nvar LOCALHOST = 'LOCALHOST'; // Valid top-level domain, special case of WORD (see tlds.js)\n\nvar TLD = 'TLD'; // Valid IDN TLD, special case of UWORD (see tlds.js)\n\nvar UTLD = 'UTLD'; // The scheme portion of a web URI protocol. Supported types include: `mailto`,\n// `file`, and user-defined custom protocols. Limited to schemes that contain\n// only letters\n\nvar SCHEME = 'SCHEME'; // Similar to SCHEME, except makes distinction for schemes that must always be\n// followed by `://`, not just `:`. Supported types include `http`, `https`,\n// `ftp`, `ftps`\n\nvar SLASH_SCHEME = 'SLASH_SCHEME'; // Any sequence of digits 0-9\n\nvar NUM = 'NUM'; // Any number of consecutive whitespace characters that are not newline\n\nvar WS = 'WS'; // New line (unix style)\n\nvar NL$1 = 'NL'; // \\n\n// Opening/closing bracket classes\n\nvar OPENBRACE = 'OPENBRACE'; // {\n\nvar OPENBRACKET = 'OPENBRACKET'; // [\n\nvar OPENANGLEBRACKET = 'OPENANGLEBRACKET'; // <\n\nvar OPENPAREN = 'OPENPAREN'; // (\n\nvar CLOSEBRACE = 'CLOSEBRACE'; // }\n\nvar CLOSEBRACKET = 'CLOSEBRACKET'; // ]\n\nvar CLOSEANGLEBRACKET = 'CLOSEANGLEBRACKET'; // >\n\nvar CLOSEPAREN = 'CLOSEPAREN'; // )\n// Various symbols\n\nvar AMPERSAND = 'AMPERSAND'; // &\n\nvar APOSTROPHE = 'APOSTROPHE'; // '\n\nvar ASTERISK = 'ASTERISK'; // *\n\nvar AT = 'AT'; // @\n\nvar BACKSLASH = 'BACKSLASH'; // \\\n\nvar BACKTICK = 'BACKTICK'; // `\n\nvar CARET = 'CARET'; // ^\n\nvar COLON = 'COLON'; // :\n\nvar COMMA = 'COMMA'; // ,\n\nvar DOLLAR = 'DOLLAR'; // $\n\nvar DOT = 'DOT'; // .\n\nvar EQUALS = 'EQUALS'; // =\n\nvar EXCLAMATION = 'EXCLAMATION'; // !\n\nvar HYPHEN = 'HYPHEN'; // -\n\nvar PERCENT = 'PERCENT'; // %\n\nvar PIPE = 'PIPE'; // |\n\nvar PLUS = 'PLUS'; // +\n\nvar POUND = 'POUND'; // #\n\nvar QUERY = 'QUERY'; // ?\n\nvar QUOTE = 'QUOTE'; // \"\n\nvar SEMI = 'SEMI'; // ;\n\nvar SLASH = 'SLASH'; // /\n\nvar TILDE = 'TILDE'; // ~\n\nvar UNDERSCORE = 'UNDERSCORE'; // _\n// Emoji symbol\n\nvar EMOJI$1 = 'EMOJI'; // Default token - anything that is not one of the above\n\nvar SYM = 'SYM';\nvar tk = /*#__PURE__*/Object.freeze({\n __proto__: null,\n WORD: WORD,\n UWORD: UWORD,\n LOCALHOST: LOCALHOST,\n TLD: TLD,\n UTLD: UTLD,\n SCHEME: SCHEME,\n SLASH_SCHEME: SLASH_SCHEME,\n NUM: NUM,\n WS: WS,\n NL: NL$1,\n OPENBRACE: OPENBRACE,\n OPENBRACKET: OPENBRACKET,\n OPENANGLEBRACKET: OPENANGLEBRACKET,\n OPENPAREN: OPENPAREN,\n CLOSEBRACE: CLOSEBRACE,\n CLOSEBRACKET: CLOSEBRACKET,\n CLOSEANGLEBRACKET: CLOSEANGLEBRACKET,\n CLOSEPAREN: CLOSEPAREN,\n AMPERSAND: AMPERSAND,\n APOSTROPHE: APOSTROPHE,\n ASTERISK: ASTERISK,\n AT: AT,\n BACKSLASH: BACKSLASH,\n BACKTICK: BACKTICK,\n CARET: CARET,\n COLON: COLON,\n COMMA: COMMA,\n DOLLAR: DOLLAR,\n DOT: DOT,\n EQUALS: EQUALS,\n EXCLAMATION: EXCLAMATION,\n HYPHEN: HYPHEN,\n PERCENT: PERCENT,\n PIPE: PIPE,\n PLUS: PLUS,\n POUND: POUND,\n QUERY: QUERY,\n QUOTE: QUOTE,\n SEMI: SEMI,\n SLASH: SLASH,\n TILDE: TILDE,\n UNDERSCORE: UNDERSCORE,\n EMOJI: EMOJI$1,\n SYM: SYM\n});\n\n// Note that these two Unicode ones expand into a really big one with Babel\nvar ASCII_LETTER = /[a-z]/;\nvar LETTER = /(?:[A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91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u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\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uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCDF\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD2F\\uDD3F\\uDD41\\uDDA0-\\uDDA7\\uDDAA-\\uDDD0\\uDDE1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEB0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|\\uD80B[\\uDF90-\\uDFF0]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE70-\\uDEBE\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82B[\\uDFF0-\\uDFF3\\uDFF5-\\uDFFB\\uDFFD\\uDFFE]|\\uD82C[\\uDC00-\\uDD22\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uD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-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A])/; // Any Unicode character with letter data type\n\nvar EMOJI = /(?:[#\\*0-9\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u261D\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A1\\u26A7\\u26AA\\u26AB\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C5\\u26C8\\u26CE\\u26CF\\u26D1\\u26D3\\u26D4\\u26E9\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDC04\\uDCCF\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE02\\uDE1A\\uDE2F\\uDE32-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF21\\uDF24-\\uDF93\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E-\\uDFF0\\uDFF3-\\uDFF5\\uDFF7-\\uDFFF]|\\uD83D[\\uDC00-\\uDCFD\\uDCFF-\\uDD3D\\uDD49-\\uDD4E\\uDD50-\\uDD67\\uDD6F\\uDD70\\uDD73-\\uDD7A\\uDD87\\uDD8A-\\uDD8D\\uDD90\\uDD95\\uDD96\\uDDA4\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA-\\uDE4F\\uDE80-\\uDEC5\\uDECB-\\uDED2\\uDED5-\\uDED7\\uDEDD-\\uDEE5\\uDEE9\\uDEEB\\uDEEC\\uDEF0\\uDEF3-\\uDEFC\\uDFE0-\\uDFEB\\uDFF0]|\\uD83E[\\uDD0C-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDDFF\\uDE70-\\uDE74\\uDE78-\\uDE7C\\uDE80-\\uDE86\\uDE90-\\uDEAC\\uDEB0-\\uDEBA\\uDEC0-\\uDEC5\\uDED0-\\uDED9\\uDEE0-\\uDEE7\\uDEF0-\\uDEF6])/; // Any Unicode emoji character\n\nvar EMOJI_VARIATION$1 = /\\ufe0f/;\nvar DIGIT = /\\d/;\nvar SPACE = /\\s/;\nvar regexp = /*#__PURE__*/Object.freeze({\n __proto__: null,\n ASCII_LETTER: ASCII_LETTER,\n LETTER: LETTER,\n EMOJI: EMOJI,\n EMOJI_VARIATION: EMOJI_VARIATION$1,\n DIGIT: DIGIT,\n SPACE: SPACE\n});\n\n/**\n\tThe scanner provides an interface that takes a string of text as input, and\n\toutputs an array of tokens instances that can be used for easy URL parsing.\n*/\nvar NL = '\\n'; // New line character\n\nvar EMOJI_VARIATION = \"\\uFE0F\"; // Variation selector, follows heart and others\n\nvar EMOJI_JOINER = \"\\u200D\"; // zero-width joiner\n\n/**\n * Scanner output token:\n * - `t` is the token name (e.g., 'NUM', 'EMOJI', 'TLD')\n * - `v` is the value of the token (e.g., '123', '❤️', 'com')\n * - `s` is the start index of the token in the original string\n * - `e` is the end index of the token in the original string\n * @typedef {{t: string, v: string, s: number, e: number}} Token\n */\n\n/**\n * @template T\n * @typedef {{ [collection: string]: T[] }} Collections\n */\n\n/**\n * Initialize the scanner character-based state machine for the given start\n * state\n * @param {[string, boolean][]} customSchemes List of custom schemes, where each\n * item is a length-2 tuple with the first element set to the string scheme, and\n * the second element set to `true` if the `://` after the scheme is optional\n */\n\nfunction init$2(customSchemes) {\n var _tr, _tr2, _tr3, _tr4, _tt, _tr5;\n if (customSchemes === void 0) {\n customSchemes = [];\n }\n\n // Frequently used states (name argument removed during minification)\n\n /** @type Collections<string> */\n var groups = {}; // of tokens\n\n State.groups = groups;\n /** @type State<string> */\n\n var Start = new State(); // States for special URL symbols that accept immediately after start\n\n tt(Start, \"'\", APOSTROPHE);\n tt(Start, '{', OPENBRACE);\n tt(Start, '[', OPENBRACKET);\n tt(Start, '<', OPENANGLEBRACKET);\n tt(Start, '(', OPENPAREN);\n tt(Start, '}', CLOSEBRACE);\n tt(Start, ']', CLOSEBRACKET);\n tt(Start, '>', CLOSEANGLEBRACKET);\n tt(Start, ')', CLOSEPAREN);\n tt(Start, '&', AMPERSAND);\n tt(Start, '*', ASTERISK);\n tt(Start, '@', AT);\n tt(Start, '`', BACKTICK);\n tt(Start, '^', CARET);\n tt(Start, ':', COLON);\n tt(Start, ',', COMMA);\n tt(Start, '$', DOLLAR);\n tt(Start, '.', DOT);\n tt(Start, '=', EQUALS);\n tt(Start, '!', EXCLAMATION);\n tt(Start, '-', HYPHEN);\n tt(Start, '%', PERCENT);\n tt(Start, '|', PIPE);\n tt(Start, '+', PLUS);\n tt(Start, '#', POUND);\n tt(Start, '?', QUERY);\n tt(Start, '\"', QUOTE);\n tt(Start, '/', SLASH);\n tt(Start, ';', SEMI);\n tt(Start, '~', TILDE);\n tt(Start, '_', UNDERSCORE);\n tt(Start, '\\\\', BACKSLASH);\n var Num = tr(Start, DIGIT, NUM, (_tr = {}, _tr[numeric] = true, _tr));\n tr(Num, DIGIT, Num); // State which emits a word token\n\n var Word = tr(Start, ASCII_LETTER, WORD, (_tr2 = {}, _tr2[ascii] = true, _tr2));\n tr(Word, ASCII_LETTER, Word); // Same as previous, but specific to non-fsm.ascii alphabet words\n\n var UWord = tr(Start, LETTER, UWORD, (_tr3 = {}, _tr3[alpha] = true, _tr3));\n tr(UWord, ASCII_LETTER); // Non-accepting\n\n tr(UWord, LETTER, UWord); // Whitespace jumps\n // Tokens of only non-newline whitespace are arbitrarily long\n // If any whitespace except newline, more whitespace!\n\n var Ws = tr(Start, SPACE, WS, (_tr4 = {}, _tr4[whitespace] = true, _tr4));\n tt(Start, NL, NL$1, (_tt = {}, _tt[whitespace] = true, _tt));\n tt(Ws, NL); // non-accepting state to avoid mixing whitespaces\n\n tr(Ws, SPACE, Ws); // Emoji tokens. They are not grouped by the scanner except in cases where a\n // zero-width joiner is present\n\n var Emoji = tr(Start, EMOJI, EMOJI$1, (_tr5 = {}, _tr5[emoji] = true, _tr5));\n tr(Emoji, EMOJI, Emoji);\n tt(Emoji, EMOJI_VARIATION, Emoji); // tt(Start, EMOJI_VARIATION, Emoji); // This one is sketchy\n\n var EmojiJoiner = tt(Emoji, EMOJI_JOINER);\n tr(EmojiJoiner, EMOJI, Emoji); // tt(EmojiJoiner, EMOJI_VARIATION, Emoji); // also sketchy\n // Generates states for top-level domains\n // Note that this is most accurate when tlds are in alphabetical order\n\n var wordjr = [[ASCII_LETTER, Word]];\n var uwordjr = [[ASCII_LETTER, null], [LETTER, UWord]];\n for (var i = 0; i < tlds.length; i++) {\n fastts(Start, tlds[i], TLD, WORD, wordjr);\n }\n for (var _i = 0; _i < utlds.length; _i++) {\n fastts(Start, utlds[_i], UTLD, UWORD, uwordjr);\n }\n addToGroups(TLD, {\n tld: true,\n ascii: true\n }, groups);\n addToGroups(UTLD, {\n utld: true,\n alpha: true\n }, groups); // Collect the states generated by different protocols. NOTE: If any new TLDs\n // get added that are also protocols, set the token to be the same as the\n // protocol to ensure parsing works as expected.\n\n fastts(Start, 'file', SCHEME, WORD, wordjr);\n fastts(Start, 'mailto', SCHEME, WORD, wordjr);\n fastts(Start, 'http', SLASH_SCHEME, WORD, wordjr);\n fastts(Start, 'https', SLASH_SCHEME, WORD, wordjr);\n fastts(Start, 'ftp', SLASH_SCHEME, WORD, wordjr);\n fastts(Start, 'ftps', SLASH_SCHEME, WORD, wordjr);\n addToGroups(SCHEME, {\n scheme: true,\n ascii: true\n }, groups);\n addToGroups(SLASH_SCHEME, {\n slashscheme: true,\n ascii: true\n }, groups); // Register custom schemes. Assumes each scheme is asciinumeric with hyphens\n\n customSchemes = customSchemes.sort(function (a, b) {\n return a[0] > b[0] ? 1 : -1;\n });\n for (var _i2 = 0; _i2 < customSchemes.length; _i2++) {\n var _ref, _ref2;\n var sch = customSchemes[_i2][0];\n var optionalSlashSlash = customSchemes[_i2][1];\n var flags = optionalSlashSlash ? (_ref = {}, _ref[scheme] = true, _ref) : (_ref2 = {}, _ref2[slashscheme] = true, _ref2);\n if (sch.indexOf('-') >= 0) {\n flags[domain] = true;\n } else if (!ASCII_LETTER.test(sch)) {\n flags[numeric] = true; // numbers only\n } else if (DIGIT.test(sch)) {\n flags[asciinumeric] = true;\n } else {\n flags[ascii] = true;\n }\n ts(Start, sch, sch, flags);\n } // Localhost token\n\n ts(Start, 'localhost', LOCALHOST, {\n ascii: true\n }); // Set default transition for start state (some symbol)\n\n Start.jd = new State(SYM);\n return {\n start: Start,\n tokens: assign({\n groups: groups\n }, tk)\n };\n}\n/**\n\tGiven a string, returns an array of TOKEN instances representing the\n\tcomposition of that string.\n\n\t@method run\n\t@param {State<string>} start scanner starting state\n\t@param {string} str input string to scan\n\t@return {Token[]} list of tokens, each with a type and value\n*/\n\nfunction run$1(start, str) {\n // State machine is not case sensitive, so input is tokenized in lowercased\n // form (still returns regular case). Uses selective `toLowerCase` because\n // lowercasing the entire string causes the length and character position to\n // vary in some non-English strings with V8-based runtimes.\n var iterable = stringToArray(str.replace(/[A-Z]/g, function (c) {\n return c.toLowerCase();\n }));\n var charCount = iterable.length; // <= len if there are emojis, etc\n\n var tokens = []; // return value\n // cursor through the string itself, accounting for characters that have\n // width with length 2 such as emojis\n\n var cursor = 0; // Cursor through the array-representation of the string\n\n var charCursor = 0; // Tokenize the string\n\n while (charCursor < charCount) {\n var state = start;\n var nextState = null;\n var tokenLength = 0;\n var latestAccepting = null;\n var sinceAccepts = -1;\n var charsSinceAccepts = -1;\n while (charCursor < charCount && (nextState = state.go(iterable[charCursor]))) {\n state = nextState; // Keep track of the latest accepting state\n\n if (state.accepts()) {\n sinceAccepts = 0;\n charsSinceAccepts = 0;\n latestAccepting = state;\n } else if (sinceAccepts >= 0) {\n sinceAccepts += iterable[charCursor].length;\n charsSinceAccepts++;\n }\n tokenLength += iterable[charCursor].length;\n cursor += iterable[charCursor].length;\n charCursor++;\n } // Roll back to the latest accepting state\n\n cursor -= sinceAccepts;\n charCursor -= charsSinceAccepts;\n tokenLength -= sinceAccepts; // No more jumps, just make a new token from the last accepting one\n\n tokens.push({\n t: latestAccepting.t,\n // token type/name\n v: str.slice(cursor - tokenLength, cursor),\n // string value\n s: cursor - tokenLength,\n // start index\n e: cursor // end index (excluding)\n });\n }\n return tokens;\n}\n/**\n * Convert a String to an Array of characters, taking into account that some\n * characters like emojis take up two string indexes.\n *\n * Adapted from core-js (MIT license)\n * https://github.com/zloirock/core-js/blob/2d69cf5f99ab3ea3463c395df81e5a15b68f49d9/packages/core-js/internals/string-multibyte.js\n *\n * @function stringToArray\n * @param {string} str\n * @returns {string[]}\n */\n\nfunction stringToArray(str) {\n var result = [];\n var len = str.length;\n var index = 0;\n while (index < len) {\n var first = str.charCodeAt(index);\n var second = void 0;\n var _char = first < 0xd800 || first > 0xdbff || index + 1 === len || (second = str.charCodeAt(index + 1)) < 0xdc00 || second > 0xdfff ? str[index] // single character\n : str.slice(index, index + 2); // two-index characters\n\n result.push(_char);\n index += _char.length;\n }\n return result;\n}\n/**\n * Fast version of ts function for when transition defaults are well known\n * @param {State<string>} state\n * @param {string} input\n * @param {string} t\n * @param {string} defaultt\n * @param {[RegExp, State<string>][]} jr\n * @returns {State<string>}\n */\n\nfunction fastts(state, input, t, defaultt, jr) {\n var next;\n var len = input.length;\n for (var i = 0; i < len - 1; i++) {\n var _char2 = input[i];\n if (state.j[_char2]) {\n next = state.j[_char2];\n } else {\n next = new State(defaultt);\n next.jr = jr.slice();\n state.j[_char2] = next;\n }\n state = next;\n }\n next = new State(t);\n next.jr = jr.slice();\n state.j[input[len - 1]] = next;\n return next;\n}\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n}\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\n\n/**\n * An object where each key is a valid DOM Event Name such as `click` or `focus`\n * and each value is an event handler function.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/Element#events\n * @typedef {?{ [event: string]: Function }} EventListeners\n */\n\n/**\n * All formatted properties required to render a link, including `tagName`,\n * `attributes`, `content` and `eventListeners`.\n * @typedef {{ tagName: any, attributes: {[attr: string]: any}, content: string,\n * eventListeners: EventListeners }} IntermediateRepresentation\n */\n\n/**\n * Specify either an object described by the template type `O` or a function.\n *\n * The function takes a string value (usually the link's href attribute), the\n * link type (`'url'`, `'hashtag`', etc.) and an internal token representation\n * of the link. It should return an object of the template type `O`\n * @template O\n * @typedef {O | ((value: string, type: string, token: MultiToken) => O)} OptObj\n */\n\n/**\n * Specify either a function described by template type `F` or an object.\n *\n * Each key in the object should be a link type (`'url'`, `'hashtag`', etc.). Each\n * value should be a function with template type `F` that is called when the\n * corresponding link type is encountered.\n * @template F\n * @typedef {F | { [type: string]: F}} OptFn\n */\n\n/**\n * Specify either a value with template type `V`, a function that returns `V` or\n * an object where each value resolves to `V`.\n *\n * The function takes a string value (usually the link's href attribute), the\n * link type (`'url'`, `'hashtag`', etc.) and an internal token representation\n * of the link. It should return an object of the template type `V`\n *\n * For the object, each key should be a link type (`'url'`, `'hashtag`', etc.).\n * Each value should either have type `V` or a function that returns V. This\n * function similarly takes a string value and a token.\n *\n * Example valid types for `Opt<string>`:\n *\n * ```js\n * 'hello'\n * (value, type, token) => 'world'\n * { url: 'hello', email: (value, token) => 'world'}\n * ```\n * @template V\n * @typedef {V | ((value: string, type: string, token: MultiToken) => V) | { [type: string]: V | ((value: string, token: MultiToken) => V) }} Opt\n */\n\n/**\n * See available options: https://linkify.js.org/docs/options.html\n * @typedef {{\n * \tdefaultProtocol?: string,\n * events?: OptObj<EventListeners>,\n * \tformat?: Opt<string>,\n * \tformatHref?: Opt<string>,\n * \tnl2br?: boolean,\n * \ttagName?: Opt<any>,\n * \ttarget?: Opt<string>,\n * \trel?: Opt<string>,\n * \tvalidate?: Opt<boolean>,\n * \ttruncate?: Opt<number>,\n * \tclassName?: Opt<string>,\n * \tattributes?: OptObj<({ [attr: string]: any })>,\n * ignoreTags?: string[],\n * \trender?: OptFn<((ir: IntermediateRepresentation) => any)>\n * }} Opts\n */\n\n/**\n * @type Required<Opts>\n */\n\nvar defaults = {\n defaultProtocol: 'http',\n events: null,\n format: noop,\n formatHref: noop,\n nl2br: false,\n tagName: 'a',\n target: null,\n rel: null,\n validate: true,\n truncate: Infinity,\n className: null,\n attributes: null,\n ignoreTags: [],\n render: null\n};\n/**\n * Utility class for linkify interfaces to apply specified\n * {@link Opts formatting and rendering options}.\n *\n * @param {Opts | Options} [opts] Option value overrides.\n * @param {(ir: IntermediateRepresentation) => any} [defaultRender] (For\n * internal use) default render function that determines how to generate an\n * HTML element based on a link token's derived tagName, attributes and HTML.\n * Similar to render option\n */\n\nfunction Options(opts, defaultRender) {\n if (defaultRender === void 0) {\n defaultRender = null;\n }\n var o = assign({}, defaults);\n if (opts) {\n o = assign(o, opts instanceof Options ? opts.o : opts);\n } // Ensure all ignored tags are uppercase\n\n var ignoredTags = o.ignoreTags;\n var uppercaseIgnoredTags = [];\n for (var i = 0; i < ignoredTags.length; i++) {\n uppercaseIgnoredTags.push(ignoredTags[i].toUpperCase());\n }\n /** @protected */\n\n this.o = o;\n if (defaultRender) {\n this.defaultRender = defaultRender;\n }\n this.ignoreTags = uppercaseIgnoredTags;\n}\nOptions.prototype = {\n o: defaults,\n /**\n * @type string[]\n */\n ignoreTags: [],\n /**\n * @param {IntermediateRepresentation} ir\n * @returns {any}\n */\n defaultRender: function defaultRender(ir) {\n return ir;\n },\n /**\n * Returns true or false based on whether a token should be displayed as a\n * link based on the user options.\n * @param {MultiToken} token\n * @returns {boolean}\n */\n check: function check(token) {\n return this.get('validate', token.toString(), token);\n },\n // Private methods\n\n /**\n * Resolve an option's value based on the value of the option and the given\n * params. If operator and token are specified and the target option is\n * callable, automatically calls the function with the given argument.\n * @template {keyof Opts} K\n * @param {K} key Name of option to use\n * @param {string} [operator] will be passed to the target option if it's a\n * function. If not specified, RAW function value gets returned\n * @param {MultiToken} [token] The token from linkify.tokenize\n * @returns {Opts[K] | any}\n */\n get: function get(key, operator, token) {\n var isCallable = operator != null;\n var option = this.o[key];\n if (!option) {\n return option;\n }\n if (_typeof(option) === 'object') {\n option = token.t in option ? option[token.t] : defaults[key];\n if (typeof option === 'function' && isCallable) {\n option = option(operator, token);\n }\n } else if (typeof option === 'function' && isCallable) {\n option = option(operator, token.t, token);\n }\n return option;\n },\n /**\n * @template {keyof Opts} L\n * @param {L} key Name of options object to use\n * @param {string} [operator]\n * @param {MultiToken} [token]\n * @returns {Opts[L] | any}\n */\n getObj: function getObj(key, operator, token) {\n var obj = this.o[key];\n if (typeof obj === 'function' && operator != null) {\n obj = obj(operator, token.t, token);\n }\n return obj;\n },\n /**\n * Convert the given token to a rendered element that may be added to the\n * calling-interface's DOM\n * @param {MultiToken} token Token to render to an HTML element\n * @returns {any} Render result; e.g., HTML string, DOM element, React\n * Component, etc.\n */\n render: function render(token) {\n var ir = token.render(this); // intermediate representation\n\n var renderFn = this.get('render', null, token) || this.defaultRender;\n return renderFn(ir, token.t, token);\n }\n};\nfunction noop(val) {\n return val;\n}\nvar options = /*#__PURE__*/Object.freeze({\n __proto__: null,\n defaults: defaults,\n Options: Options,\n assign: assign\n});\n\n/******************************************************************************\n\tMulti-Tokens\n\tTokens composed of arrays of TextTokens\n******************************************************************************/\n\n/**\n * @param {string} value\n * @param {Token[]} tokens\n */\n\nfunction MultiToken(value, tokens) {\n this.t = 'token';\n this.v = value;\n this.tk = tokens;\n}\n/**\n * Abstract class used for manufacturing tokens of text tokens. That is rather\n * than the value for a token being a small string of text, it's value an array\n * of text tokens.\n *\n * Used for grouping together URLs, emails, hashtags, and other potential\n * creations.\n * @class MultiToken\n * @property {string} t\n * @property {string} v\n * @property {Token[]} tk\n * @abstract\n */\n\nMultiToken.prototype = {\n isLink: false,\n /**\n * Return the string this token represents.\n * @return {string}\n */\n toString: function toString() {\n return this.v;\n },\n /**\n * What should the value for this token be in the `href` HTML attribute?\n * Returns the `.toString` value by default.\n * @param {string} [scheme]\n * @return {string}\n */\n toHref: function toHref(scheme) {\n return this.toString();\n },\n /**\n * @param {Options} options Formatting options\n * @returns {string}\n */\n toFormattedString: function toFormattedString(options) {\n var val = this.toString();\n var truncate = options.get('truncate', val, this);\n var formatted = options.get('format', val, this);\n return truncate && formatted.length > truncate ? formatted.substring(0, truncate) + '…' : formatted;\n },\n /**\n *\n * @param {Options} options\n * @returns {string}\n */\n toFormattedHref: function toFormattedHref(options) {\n return options.get('formatHref', this.toHref(options.get('defaultProtocol')), this);\n },\n /**\n * The start index of this token in the original input string\n * @returns {number}\n */\n startIndex: function startIndex() {\n return this.tk[0].s;\n },\n /**\n * The end index of this token in the original input string (up to this\n * index but not including it)\n * @returns {number}\n */\n endIndex: function endIndex() {\n return this.tk[this.tk.length - 1].e;\n },\n /**\n \tReturns an object of relevant values for this token, which includes keys\n \t* type - Kind of token ('url', 'email', etc.)\n \t* value - Original text\n \t* href - The value that should be added to the anchor tag's href\n \t\tattribute\n \t\t@method toObject\n \t@param {string} [protocol] `'http'` by default\n */\n toObject: function toObject(protocol) {\n if (protocol === void 0) {\n protocol = defaults.defaultProtocol;\n }\n return {\n type: this.t,\n value: this.toString(),\n isLink: this.isLink,\n href: this.toHref(protocol),\n start: this.startIndex(),\n end: this.endIndex()\n };\n },\n /**\n *\n * @param {Options} options Formatting option\n */\n toFormattedObject: function toFormattedObject(options) {\n return {\n type: this.t,\n value: this.toFormattedString(options),\n isLink: this.isLink,\n href: this.toFormattedHref(options),\n start: this.startIndex(),\n end: this.endIndex()\n };\n },\n /**\n * Whether this token should be rendered as a link according to the given options\n * @param {Options} options\n * @returns {boolean}\n */\n validate: function validate(options) {\n return options.get('validate', this.toString(), this);\n },\n /**\n * Return an object that represents how this link should be rendered.\n * @param {Options} options Formattinng options\n */\n render: function render(options) {\n var token = this;\n var href = this.toFormattedHref(options);\n var tagName = options.get('tagName', href, token);\n var content = this.toFormattedString(options);\n var attributes = {};\n var className = options.get('className', href, token);\n var target = options.get('target', href, token);\n var rel = options.get('rel', href, token);\n var attrs = options.getObj('attributes', href, token);\n var eventListeners = options.getObj('events', href, token);\n attributes.href = href;\n if (className) {\n attributes[\"class\"] = className;\n }\n if (target) {\n attributes.target = target;\n }\n if (rel) {\n attributes.rel = rel;\n }\n if (attrs) {\n assign(attributes, attrs);\n }\n return {\n tagName: tagName,\n attributes: attributes,\n content: content,\n eventListeners: eventListeners\n };\n }\n}; // Base token\n/**\n * Create a new token that can be emitted by the parser state machine\n * @param {string} type readable type of the token\n * @param {object} props properties to assign or override, including isLink = true or false\n * @returns {new (value: string, tokens: Token[]) => MultiToken} new token class\n */\n\nfunction createTokenClass(type, props) {\n var Token = /*#__PURE__*/function (_MultiToken) {\n _inheritsLoose(Token, _MultiToken);\n function Token(value, tokens) {\n var _this;\n _this = _MultiToken.call(this, value, tokens) || this;\n _this.t = type;\n return _this;\n }\n return Token;\n }(MultiToken);\n for (var p in props) {\n Token.prototype[p] = props[p];\n }\n Token.t = type;\n return Token;\n}\n/**\n\tRepresents a list of tokens making up a valid email address\n*/\n\nvar Email = createTokenClass('email', {\n isLink: true,\n toHref: function toHref() {\n return 'mailto:' + this.toString();\n }\n});\n/**\n\tRepresents some plain text\n*/\n\nvar Text = createTokenClass('text');\n/**\n\tMulti-linebreak token - represents a line break\n\t@class Nl\n*/\n\nvar Nl = createTokenClass('nl');\n/**\n\tRepresents a list of text tokens making up a valid URL\n\t@class Url\n*/\n\nvar Url = createTokenClass('url', {\n isLink: true,\n /**\n \tLowercases relevant parts of the domain and adds the protocol if\n \trequired. Note that this will not escape unsafe HTML characters in the\n \tURL.\n \t\t@param {string} [scheme] default scheme (e.g., 'https')\n \t@return {string} the full href\n */\n toHref: function toHref(scheme) {\n if (scheme === void 0) {\n scheme = defaults.defaultProtocol;\n }\n\n // Check if already has a prefix scheme\n return this.hasProtocol() ? this.v : scheme + \"://\" + this.v;\n },\n /**\n * Check whether this URL token has a protocol\n * @return {boolean}\n */\n hasProtocol: function hasProtocol() {\n var tokens = this.tk;\n return tokens.length >= 2 && tokens[0].t !== LOCALHOST && tokens[1].t === COLON;\n }\n});\nvar multi = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MultiToken: MultiToken,\n Base: MultiToken,\n createTokenClass: createTokenClass,\n Email: Email,\n Text: Text,\n Nl: Nl,\n Url: Url\n});\n\n/**\n\tNot exactly parser, more like the second-stage scanner (although we can\n\ttheoretically hotswap the code here with a real parser in the future... but\n\tfor a little URL-finding utility abstract syntax trees may be a little\n\toverkill).\n\n\tURL format: http://en.wikipedia.org/wiki/URI_scheme\n\tEmail format: http://en.wikipedia.org/wiki/EmailAddress (links to RFC in\n\treference)\n\n\t@module linkify\n\t@submodule parser\n\t@main run\n*/\n\nvar makeState = function makeState(arg) {\n return new State(arg);\n};\n/**\n * Generate the parser multi token-based state machine\n * @param {{ groups: Collections<string> }} tokens\n */\n\nfunction init$1(_ref) {\n var groups = _ref.groups;\n // Types of characters the URL can definitely end in\n var qsAccepting = groups.domain.concat([AMPERSAND, ASTERISK, AT, BACKSLASH, BACKTICK, CARET, DOLLAR, EQUALS, HYPHEN, NUM, PERCENT, PIPE, PLUS, POUND, SLASH, SYM, TILDE, UNDERSCORE]); // Types of tokens that can follow a URL and be part of the query string\n // but cannot be the very last characters\n // Characters that cannot appear in the URL at all should be excluded\n\n var qsNonAccepting = [APOSTROPHE, CLOSEANGLEBRACKET, CLOSEBRACE, CLOSEBRACKET, CLOSEPAREN, COLON, COMMA, DOT, EXCLAMATION, OPENANGLEBRACKET, OPENBRACE, OPENBRACKET, OPENPAREN, QUERY, QUOTE, SEMI]; // For addresses without the mailto prefix\n // Tokens allowed in the localpart of the email\n\n var localpartAccepting = [AMPERSAND, APOSTROPHE, ASTERISK, BACKSLASH, BACKTICK, CARET, CLOSEBRACE, DOLLAR, EQUALS, HYPHEN, NUM, OPENBRACE, PERCENT, PIPE, PLUS, POUND, QUERY, SLASH, SYM, TILDE, UNDERSCORE]; // The universal starting state.\n\n /**\n * @type State<Token>\n */\n\n var Start = makeState();\n var Localpart = tt(Start, TILDE); // Local part of the email address\n\n ta(Localpart, localpartAccepting, Localpart);\n ta(Localpart, groups.domain, Localpart);\n var Domain = makeState(),\n Scheme = makeState(),\n SlashScheme = makeState();\n ta(Start, groups.domain, Domain); // parsed string ends with a potential domain name (A)\n\n ta(Start, groups.scheme, Scheme); // e.g., 'mailto'\n\n ta(Start, groups.slashscheme, SlashScheme); // e.g., 'http'\n\n ta(Domain, localpartAccepting, Localpart);\n ta(Domain, groups.domain, Domain);\n var LocalpartAt = tt(Domain, AT); // Local part of the email address plus @\n\n tt(Localpart, AT, LocalpartAt); // close to an email address now\n\n var LocalpartDot = tt(Localpart, DOT); // Local part of the email address plus '.' (localpart cannot end in .)\n\n ta(LocalpartDot, localpartAccepting, Localpart);\n ta(LocalpartDot, groups.domain, Localpart);\n var EmailDomain = makeState();\n ta(LocalpartAt, groups.domain, EmailDomain); // parsed string starts with local email info + @ with a potential domain name\n\n var EmailDomainDot = tt(EmailDomain, DOT); // domain followed by DOT\n\n ta(EmailDomainDot, groups.domain, EmailDomain);\n var Email$1 = makeState(Email); // Possible email address (could have more tlds)\n\n ta(EmailDomainDot, groups.tld, Email$1);\n ta(EmailDomainDot, groups.utld, Email$1);\n tt(LocalpartAt, LOCALHOST, Email$1); // Hyphen can jump back to a domain name\n\n var EmailDomainHyphen = tt(EmailDomain, HYPHEN); // parsed string starts with local email info + @ with a potential domain name\n\n ta(EmailDomainHyphen, groups.domain, EmailDomain);\n ta(Email$1, groups.domain, EmailDomain);\n tt(Email$1, DOT, EmailDomainDot);\n tt(Email$1, HYPHEN, EmailDomainHyphen); // Final possible email states\n\n var EmailColon = tt(Email$1, COLON); // URL followed by colon (potential port number here)\n\n /*const EmailColonPort = */\n\n ta(EmailColon, groups.numeric, Email); // URL followed by colon and port numner\n // Account for dots and hyphens. Hyphens are usually parts of domain names\n // (but not TLDs)\n\n var DomainHyphen = tt(Domain, HYPHEN); // domain followed by hyphen\n\n var DomainDot = tt(Domain, DOT); // domain followed by DOT\n\n ta(DomainHyphen, groups.domain, Domain);\n ta(DomainDot, localpartAccepting, Localpart);\n ta(DomainDot, groups.domain, Domain);\n var DomainDotTld = makeState(Url); // Simplest possible URL with no query string\n\n ta(DomainDot, groups.tld, DomainDotTld);\n ta(DomainDot, groups.utld, DomainDotTld);\n ta(DomainDotTld, groups.domain, Domain);\n ta(DomainDotTld, localpartAccepting, Localpart);\n tt(DomainDotTld, DOT, DomainDot);\n tt(DomainDotTld, HYPHEN, DomainHyphen);\n tt(DomainDotTld, AT, LocalpartAt);\n var DomainDotTldColon = tt(DomainDotTld, COLON); // URL followed by colon (potential port number here)\n\n var DomainDotTldColonPort = makeState(Url); // TLD followed by a port number\n\n ta(DomainDotTldColon, groups.numeric, DomainDotTldColonPort); // Long URL with optional port and maybe query string\n\n var Url$1 = makeState(Url); // URL with extra symbols at the end, followed by an opening bracket\n\n var UrlNonaccept = makeState(); // URL followed by some symbols (will not be part of the final URL)\n // Query strings\n\n ta(Url$1, qsAccepting, Url$1);\n ta(Url$1, qsNonAccepting, UrlNonaccept);\n ta(UrlNonaccept, qsAccepting, Url$1);\n ta(UrlNonaccept, qsNonAccepting, UrlNonaccept); // Become real URLs after `SLASH` or `COLON NUM SLASH`\n // Here works with or without scheme:// prefix\n\n tt(DomainDotTld, SLASH, Url$1);\n tt(DomainDotTldColonPort, SLASH, Url$1); // Note that domains that begin with schemes are treated slighly differently\n\n var UriPrefix = tt(Scheme, COLON); // e.g., 'mailto:' or 'http://'\n\n var SlashSchemeColon = tt(SlashScheme, COLON); // e.g., 'http:'\n\n var SlashSchemeColonSlash = tt(SlashSchemeColon, SLASH); // e.g., 'http:/'\n\n tt(SlashSchemeColonSlash, SLASH, UriPrefix); // Scheme states can transition to domain states\n\n ta(Scheme, groups.domain, Domain);\n tt(Scheme, DOT, DomainDot);\n tt(Scheme, HYPHEN, DomainHyphen);\n ta(SlashScheme, groups.domain, Domain);\n tt(SlashScheme, DOT, DomainDot);\n tt(SlashScheme, HYPHEN, DomainHyphen); // Force URL with scheme prefix followed by anything sane\n\n ta(UriPrefix, groups.domain, Url$1);\n tt(UriPrefix, SLASH, Url$1); // URL, followed by an opening bracket\n\n var UrlOpenbrace = tt(Url$1, OPENBRACE); // URL followed by {\n\n var UrlOpenbracket = tt(Url$1, OPENBRACKET); // URL followed by [\n\n var UrlOpenanglebracket = tt(Url$1, OPENANGLEBRACKET); // URL followed by <\n\n var UrlOpenparen = tt(Url$1, OPENPAREN); // URL followed by (\n\n tt(UrlNonaccept, OPENBRACE, UrlOpenbrace);\n tt(UrlNonaccept, OPENBRACKET, UrlOpenbracket);\n tt(UrlNonaccept, OPENANGLEBRACKET, UrlOpenanglebracket);\n tt(UrlNonaccept, OPENPAREN, UrlOpenparen); // Closing bracket component. This character WILL be included in the URL\n\n tt(UrlOpenbrace, CLOSEBRACE, Url$1);\n tt(UrlOpenbracket, CLOSEBRACKET, Url$1);\n tt(UrlOpenanglebracket, CLOSEANGLEBRACKET, Url$1);\n tt(UrlOpenparen, CLOSEPAREN, Url$1);\n tt(UrlOpenbrace, CLOSEBRACE, Url$1); // URL that beings with an opening bracket, followed by a symbols.\n // Note that the final state can still be `UrlOpenbrace` (if the URL only\n // has a single opening bracket for some reason).\n\n var UrlOpenbraceQ = makeState(Url); // URL followed by { and some symbols that the URL can end it\n\n var UrlOpenbracketQ = makeState(Url); // URL followed by [ and some symbols that the URL can end it\n\n var UrlOpenanglebracketQ = makeState(Url); // URL followed by < and some symbols that the URL can end it\n\n var UrlOpenparenQ = makeState(Url); // URL followed by ( and some symbols that the URL can end it\n\n ta(UrlOpenbrace, qsAccepting, UrlOpenbraceQ);\n ta(UrlOpenbracket, qsAccepting, UrlOpenbracketQ);\n ta(UrlOpenanglebracket, qsAccepting, UrlOpenanglebracketQ);\n ta(UrlOpenparen, qsAccepting, UrlOpenparenQ);\n var UrlOpenbraceSyms = makeState(); // UrlOpenbrace followed by some symbols it cannot end it\n\n var UrlOpenbracketSyms = makeState(); // UrlOpenbracketQ followed by some symbols it cannot end it\n\n var UrlOpenanglebracketSyms = makeState(); // UrlOpenanglebracketQ followed by some symbols it cannot end it\n\n var UrlOpenparenSyms = makeState(); // UrlOpenparenQ followed by some symbols it cannot end it\n\n ta(UrlOpenbrace, qsNonAccepting);\n ta(UrlOpenbracket, qsNonAccepting);\n ta(UrlOpenanglebracket, qsNonAccepting);\n ta(UrlOpenparen, qsNonAccepting); // URL that begins with an opening bracket, followed by some symbols\n\n ta(UrlOpenbraceQ, qsAccepting, UrlOpenbraceQ);\n ta(UrlOpenbracketQ, qsAccepting, UrlOpenbracketQ);\n ta(UrlOpenanglebracketQ, qsAccepting, UrlOpenanglebracketQ);\n ta(UrlOpenparenQ, qsAccepting, UrlOpenparenQ);\n ta(UrlOpenbraceQ, qsNonAccepting, UrlOpenbraceQ);\n ta(UrlOpenbracketQ, qsNonAccepting, UrlOpenbracketQ);\n ta(UrlOpenanglebracketQ, qsNonAccepting, UrlOpenanglebracketQ);\n ta(UrlOpenparenQ, qsNonAccepting, UrlOpenparenQ);\n ta(UrlOpenbraceSyms, qsAccepting, UrlOpenbraceSyms);\n ta(UrlOpenbracketSyms, qsAccepting, UrlOpenbracketQ);\n ta(UrlOpenanglebracketSyms, qsAccepting, UrlOpenanglebracketQ);\n ta(UrlOpenparenSyms, qsAccepting, UrlOpenparenQ);\n ta(UrlOpenbraceSyms, qsNonAccepting, UrlOpenbraceSyms);\n ta(UrlOpenbracketSyms, qsNonAccepting, UrlOpenbracketSyms);\n ta(UrlOpenanglebracketSyms, qsNonAccepting, UrlOpenanglebracketSyms);\n ta(UrlOpenparenSyms, qsNonAccepting, UrlOpenparenSyms); // Close brace/bracket to become regular URL\n\n tt(UrlOpenbracketQ, CLOSEBRACKET, Url$1);\n tt(UrlOpenanglebracketQ, CLOSEANGLEBRACKET, Url$1);\n tt(UrlOpenparenQ, CLOSEPAREN, Url$1);\n tt(UrlOpenbraceQ, CLOSEBRACE, Url$1);\n tt(UrlOpenbracketSyms, CLOSEBRACKET, Url$1);\n tt(UrlOpenanglebracketSyms, CLOSEANGLEBRACKET, Url$1);\n tt(UrlOpenparenSyms, CLOSEPAREN, Url$1);\n tt(UrlOpenbraceSyms, CLOSEPAREN, Url$1);\n tt(Start, LOCALHOST, DomainDotTld); // localhost is a valid URL state\n\n tt(Start, NL$1, Nl); // single new line\n\n return {\n start: Start,\n tokens: tk\n };\n}\n/**\n * Run the parser state machine on a list of scanned string-based tokens to\n * create a list of multi tokens, each of which represents a URL, email address,\n * plain text, etc.\n *\n * @param {State<MultiToken>} start parser start state\n * @param {string} input the original input used to generate the given tokens\n * @param {Token[]} tokens list of scanned tokens\n * @returns {MultiToken[]}\n */\n\nfunction run(start, input, tokens) {\n var len = tokens.length;\n var cursor = 0;\n var multis = [];\n var textTokens = [];\n while (cursor < len) {\n var state = start;\n var secondState = null;\n var nextState = null;\n var multiLength = 0;\n var latestAccepting = null;\n var sinceAccepts = -1;\n while (cursor < len && !(secondState = state.go(tokens[cursor].t))) {\n // Starting tokens with nowhere to jump to.\n // Consider these to be just plain text\n textTokens.push(tokens[cursor++]);\n }\n while (cursor < len && (nextState = secondState || state.go(tokens[cursor].t))) {\n // Get the next state\n secondState = null;\n state = nextState; // Keep track of the latest accepting state\n\n if (state.accepts()) {\n sinceAccepts = 0;\n latestAccepting = state;\n } else if (sinceAccepts >= 0) {\n sinceAccepts++;\n }\n cursor++;\n multiLength++;\n }\n if (sinceAccepts < 0) {\n // No accepting state was found, part of a regular text token add\n // the first text token to the text tokens array and try again from\n // the next\n cursor -= multiLength;\n if (cursor < len) {\n textTokens.push(tokens[cursor]);\n cursor++;\n }\n } else {\n // Accepting state!\n // First close off the textTokens (if available)\n if (textTokens.length > 0) {\n multis.push(initMultiToken(Text, input, textTokens));\n textTokens = [];\n } // Roll back to the latest accepting state\n\n cursor -= sinceAccepts;\n multiLength -= sinceAccepts; // Create a new multitoken\n\n var Multi = latestAccepting.t;\n var subtokens = tokens.slice(cursor - multiLength, cursor);\n multis.push(initMultiToken(Multi, input, subtokens));\n }\n } // Finally close off the textTokens (if available)\n\n if (textTokens.length > 0) {\n multis.push(initMultiToken(Text, input, textTokens));\n }\n return multis;\n}\n/**\n * Utility function for instantiating a new multitoken with all the relevant\n * fields during parsing.\n * @param {new (value: string, tokens: Token[]) => MultiToken} Multi class to instantiate\n * @param {string} input original input string\n * @param {Token[]} tokens consecutive tokens scanned from input string\n * @returns {MultiToken}\n */\n\nfunction initMultiToken(Multi, input, tokens) {\n var startIdx = tokens[0].s;\n var endIdx = tokens[tokens.length - 1].e;\n var value = input.slice(startIdx, endIdx);\n return new Multi(value, tokens);\n}\nvar warn = typeof console !== 'undefined' && console && console.warn || function () {};\nvar warnAdvice = 'To avoid this warning, please register all custom schemes before invoking linkify the first time.'; // Side-effect initialization state\n\nvar INIT = {\n scanner: null,\n parser: null,\n tokenQueue: [],\n pluginQueue: [],\n customSchemes: [],\n initialized: false\n};\n/**\n * @typedef {{\n * \tstart: State<string>,\n * \ttokens: { groups: Collections<string> } & typeof tk\n * }} ScannerInit\n */\n\n/**\n * @typedef {{\n * \tstart: State<MultiToken>,\n * \ttokens: typeof multi\n * }} ParserInit\n */\n\n/**\n * @typedef {(arg: { scanner: ScannerInit }) => void} TokenPlugin\n */\n\n/**\n * @typedef {(arg: { scanner: ScannerInit, parser: ParserInit }) => void} Plugin\n */\n\n/**\n * De-register all plugins and reset the internal state-machine. Used for\n * testing; not required in practice.\n * @private\n */\n\nfunction reset() {\n State.groups = {};\n INIT.scanner = null;\n INIT.parser = null;\n INIT.tokenQueue = [];\n INIT.pluginQueue = [];\n INIT.customSchemes = [];\n INIT.initialized = false;\n}\n/**\n * Register a token plugin to allow the scanner to recognize additional token\n * types before the parser state machine is constructed from the results.\n * @param {string} name of plugin to register\n * @param {TokenPlugin} plugin function that accepts the scanner state machine\n * and available scanner tokens and collections and extends the state machine to\n * recognize additional tokens or groups.\n */\n\nfunction registerTokenPlugin(name, plugin) {\n if (typeof plugin !== 'function') {\n throw new Error(\"linkifyjs: Invalid token plugin \" + plugin + \" (expects function)\");\n }\n for (var i = 0; i < INIT.tokenQueue.length; i++) {\n if (name === INIT.tokenQueue[i][0]) {\n warn(\"linkifyjs: token plugin \\\"\" + name + \"\\\" already registered - will be overwritten\");\n INIT.tokenQueue[i] = [name, plugin];\n return;\n }\n }\n INIT.tokenQueue.push([name, plugin]);\n if (INIT.initialized) {\n warn(\"linkifyjs: already initialized - will not register token plugin \\\"\" + name + \"\\\" until you manually call linkify.init(). \" + warnAdvice);\n }\n}\n/**\n * Register a linkify plugin\n * @param {string} name of plugin to register\n * @param {Plugin} plugin function that accepts the parser state machine and\n * extends the parser to recognize additional link types\n */\n\nfunction registerPlugin(name, plugin) {\n if (typeof plugin !== 'function') {\n throw new Error(\"linkifyjs: Invalid plugin \" + plugin + \" (expects function)\");\n }\n for (var i = 0; i < INIT.pluginQueue.length; i++) {\n if (name === INIT.pluginQueue[i][0]) {\n warn(\"linkifyjs: plugin \\\"\" + name + \"\\\" already registered - will be overwritten\");\n INIT.pluginQueue[i] = [name, plugin];\n return;\n }\n }\n INIT.pluginQueue.push([name, plugin]);\n if (INIT.initialized) {\n warn(\"linkifyjs: already initialized - will not register plugin \\\"\" + name + \"\\\" until you manually call linkify.init(). \" + warnAdvice);\n }\n}\n/**\n * Detect URLs with the following additional protocol. Anything with format\n * \"protocol://...\" will be considered a link. If `optionalSlashSlash` is set to\n * `true`, anything with format \"protocol:...\" will be considered a link.\n * @param {string} protocol\n * @param {boolean} [optionalSlashSlash]\n */\n\nfunction registerCustomProtocol(scheme, optionalSlashSlash) {\n if (optionalSlashSlash === void 0) {\n optionalSlashSlash = false;\n }\n if (INIT.initialized) {\n warn(\"linkifyjs: already initialized - will not register custom scheme \\\"\" + scheme + \"\\\" until you manually call linkify.init(). \" + warnAdvice);\n }\n if (!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(scheme)) {\n throw new Error('linkifyjs: incorrect scheme format.\\n 1. Must only contain digits, lowercase ASCII letters or \"-\"\\n 2. Cannot start or end with \"-\"\\n 3. \"-\" cannot repeat');\n }\n INIT.customSchemes.push([scheme, optionalSlashSlash]);\n}\n/**\n * Initialize the linkify state machine. Called automatically the first time\n * linkify is called on a string, but may be called manually as well.\n */\n\nfunction init() {\n // Initialize scanner state machine and plugins\n INIT.scanner = init$2(INIT.customSchemes);\n for (var i = 0; i < INIT.tokenQueue.length; i++) {\n INIT.tokenQueue[i][1]({\n scanner: INIT.scanner\n });\n } // Initialize parser state machine and plugins\n\n INIT.parser = init$1(INIT.scanner.tokens);\n for (var _i = 0; _i < INIT.pluginQueue.length; _i++) {\n INIT.pluginQueue[_i][1]({\n scanner: INIT.scanner,\n parser: INIT.parser\n });\n }\n INIT.initialized = true;\n}\n/**\n * Parse a string into tokens that represent linkable and non-linkable sub-components\n * @param {string} str\n * @return {MultiToken[]} tokens\n */\n\nfunction tokenize(str) {\n if (!INIT.initialized) {\n init();\n }\n return run(INIT.parser.start, str, run$1(INIT.scanner.start, str));\n}\n/**\n * Find a list of linkable items in the given string.\n * @param {string} str string to find links in\n * @param {string | Opts} [type] either formatting options or specific type of\n * links to find, e.g., 'url' or 'email'\n * @param {Opts} [opts] formatting options for final output. Cannot be specified\n * if opts already provided in `type` argument\n*/\n\nfunction find(str, type, opts) {\n if (type === void 0) {\n type = null;\n }\n if (opts === void 0) {\n opts = null;\n }\n if (type && _typeof(type) === 'object') {\n if (opts) {\n throw Error(\"linkifyjs: Invalid link type \" + type + \"; must be a string\");\n }\n opts = type;\n type = null;\n }\n var options = new Options(opts);\n var tokens = tokenize(str);\n var filtered = [];\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (token.isLink && (!type || token.t === type)) {\n filtered.push(token.toFormattedObject(options));\n }\n }\n return filtered;\n}\n/**\n * Is the given string valid linkable text of some sort. Note that this does not\n * trim the text for you.\n *\n * Optionally pass in a second `type` param, which is the type of link to test\n * for.\n *\n * For example,\n *\n * linkify.test(str, 'email');\n *\n * Returns `true` if str is a valid email.\n * @param {string} str string to test for links\n * @param {string} [type] optional specific link type to look for\n * @returns boolean true/false\n */\n\nfunction test(str, type) {\n if (type === void 0) {\n type = null;\n }\n var tokens = tokenize(str);\n return tokens.length === 1 && tokens[0].isLink && (!type || tokens[0].t === type);\n}\nexport { MultiToken, Options, State, createTokenClass, find, init, multi, options, regexp, registerCustomProtocol, registerPlugin, registerTokenPlugin, reset, stringToArray, test, tokenize };","import \"core-js/fn/array/find\";\nimport \"core-js/fn/array/find-index\";\nimport \"core-js/fn/array/from\";\nimport \"core-js/fn/map\";\nimport \"core-js/fn/object/assign\";\nimport \"core-js/fn/promise\";\nimport \"core-js/fn/set\";\nimport \"element-closest\";\nimport \"mutation-observer-inner-html-shim\";","require('../../modules/es6.array.find');\nmodule.exports = require('../../modules/_core').Array.find;\n","'use strict';\n// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)\nvar $export = require('./_export');\nvar $find = require('./_array-methods')(5);\nvar KEY = 'find';\nvar forced = true;\n// Shouldn't skip holes\nif (KEY in []) Array(1)[KEY](function () { forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\nrequire('./_add-to-unscopables')(KEY);\n","// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = require('./_array-species-constructor');\n\nmodule.exports = function (original, length) {\n return new (speciesConstructor(original))(length);\n};\n","var isObject = require('./_is-object');\nvar isArray = require('./_is-array');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (original) {\n var C;\n if (isArray(original)) {\n C = original.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n","require('../../modules/es6.array.find-index');\nmodule.exports = require('../../modules/_core').Array.findIndex;\n","'use strict';\n// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)\nvar $export = require('./_export');\nvar $find = require('./_array-methods')(6);\nvar KEY = 'findIndex';\nvar forced = true;\n// Shouldn't skip holes\nif (KEY in []) Array(1)[KEY](function () { forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n findIndex: function findIndex(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\nrequire('./_add-to-unscopables')(KEY);\n","require('../../modules/es6.string.iterator');\nrequire('../../modules/es6.array.from');\nmodule.exports = require('../../modules/_core').Array.from;\n","var toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n","'use strict';\nvar ctx = require('./_ctx');\nvar $export = require('./_export');\nvar toObject = require('./_to-object');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar toLength = require('./_to-length');\nvar createProperty = require('./_create-property');\nvar getIterFn = require('./core.get-iterator-method');\n\n$export($export.S + $export.F * !require('./_iter-detect')(function (iter) { Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iterFn = getIterFn(O);\n var length, result, step, iterator;\n if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {\n for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for (result = new C(length); length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n","'use strict';\nvar $defineProperty = require('./_object-dp');\nvar createDesc = require('./_property-desc');\n\nmodule.exports = function (object, index, value) {\n if (index in object) $defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.map');\nrequire('../modules/es7.map.to-json');\nrequire('../modules/es7.map.of');\nrequire('../modules/es7.map.from');\nmodule.exports = require('../modules/_core').Map;\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","'use strict';\nvar strong = require('./_collection-strong');\nvar validate = require('./_validate-collection');\nvar MAP = 'Map';\n\n// 23.1 Map Objects\nmodule.exports = require('./_collection')(MAP, function (get) {\n return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.1.3.6 Map.prototype.get(key)\n get: function get(key) {\n var entry = strong.getEntry(validate(this, MAP), key);\n return entry && entry.v;\n },\n // 23.1.3.9 Map.prototype.set(key, value)\n set: function set(key, value) {\n return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);\n }\n}, strong, true);\n","var isObject = require('./_is-object');\nvar setPrototypeOf = require('./_set-proto').set;\nmodule.exports = function (that, target, C) {\n var S = target.constructor;\n var P;\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n } return that;\n};\n","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n","// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar $export = require('./_export');\n\n$export($export.P + $export.R, 'Map', { toJSON: require('./_collection-to-json')('Map') });\n","var forOf = require('./_for-of');\n\nmodule.exports = function (iter, ITERATOR) {\n var result = [];\n forOf(iter, false, result.push, result, ITERATOR);\n return result;\n};\n","// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of\nrequire('./_set-collection-of')('Map');\n","// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from\nrequire('./_set-collection-from')('Map');\n","require('../../modules/es6.object.assign');\nmodule.exports = require('../../modules/_core').Object.assign;\n","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') });\n","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n","exports.f = Object.getOwnPropertySymbols;\n","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.promise');\nrequire('../modules/es7.promise.finally');\nrequire('../modules/es7.promise.try');\nmodule.exports = require('../modules/_core').Promise;\n","'use strict';\nvar LIBRARY = require('./_library');\nvar global = require('./_global');\nvar ctx = require('./_ctx');\nvar classof = require('./_classof');\nvar $export = require('./_export');\nvar isObject = require('./_is-object');\nvar aFunction = require('./_a-function');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar speciesConstructor = require('./_species-constructor');\nvar task = require('./_task').set;\nvar microtask = require('./_microtask')();\nvar newPromiseCapabilityModule = require('./_new-promise-capability');\nvar perform = require('./_perform');\nvar userAgent = require('./_user-agent');\nvar promiseResolve = require('./_promise-resolve');\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8 || '';\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1);\n var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function')\n && promise.then(empty) instanceof FakePromise\n // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // we can't detect it synchronously, so just check versions\n && v8.indexOf('6.6') !== 0\n && userAgent.indexOf('Chrome/66') === -1;\n } catch (e) { /* empty */ }\n}();\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function (promise, isReject) {\n if (promise._n) return;\n promise._n = true;\n var chain = promise._c;\n microtask(function () {\n var value = promise._v;\n var ok = promise._s == 1;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (promise._h == 2) onHandleUnhandled(promise);\n promise._h = 1;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // may throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (e) {\n if (domain && !exited) domain.exit();\n reject(e);\n }\n };\n while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if (isReject && !promise._h) onUnhandled(promise);\n });\n};\nvar onUnhandled = function (promise) {\n task.call(global, function () {\n var value = promise._v;\n var unhandled = isUnhandled(promise);\n var result, handler, console;\n if (unhandled) {\n result = perform(function () {\n if (isNode) {\n process.emit('unhandledRejection', value, promise);\n } else if (handler = global.onunhandledrejection) {\n handler({ promise: promise, reason: value });\n } else if ((console = global.console) && console.error) {\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if (unhandled && result.e) throw result.v;\n });\n};\nvar isUnhandled = function (promise) {\n return promise._h !== 1 && (promise._a || promise._c).length === 0;\n};\nvar onHandleUnhandled = function (promise) {\n task.call(global, function () {\n var handler;\n if (isNode) {\n process.emit('rejectionHandled', promise);\n } else if (handler = global.onrejectionhandled) {\n handler({ promise: promise, reason: promise._v });\n }\n });\n};\nvar $reject = function (value) {\n var promise = this;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if (!promise._a) promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function (value) {\n var promise = this;\n var then;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n if (then = isThenable(value)) {\n microtask(function () {\n var wrapper = { _w: promise, _d: false }; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch (e) {\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch (e) {\n $reject.call({ _w: promise, _d: false }, e); // wrap\n }\n};\n\n// constructor polyfill\nif (!USE_NATIVE) {\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor) {\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch (err) {\n $reject.call(this, err);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected) {\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if (this._a) this._a.push(reaction);\n if (this._s) notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === $Promise || C === Wrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n var $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x) {\n return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) {\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var values = [];\n var index = 0;\n var remaining = 1;\n forOf(iterable, false, function (promise) {\n var $index = index++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.e) reject(result.v);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n forOf(iterable, false, function (promise) {\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if (result.e) reject(result.v);\n return capability.promise;\n }\n});\n","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function (fn, args, that) {\n var un = that === undefined;\n switch (args.length) {\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n","var global = require('./_global');\nvar macrotask = require('./_task').set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function () {\n var head, last, notify;\n\n var flush = function () {\n var parent, fn;\n if (isNode && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (e) {\n if (head) notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (isNode) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339\n } else if (Observer && !(global.navigator && global.navigator.standalone)) {\n var toggle = true;\n var node = document.createTextNode('');\n new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n var promise = Promise.resolve(undefined);\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n };\n};\n","var global = require('./_global');\nvar navigator = global.navigator;\n\nmodule.exports = navigator && navigator.userAgent || '';\n","// https://github.com/tc39/proposal-promise-finally\n'use strict';\nvar $export = require('./_export');\nvar core = require('./_core');\nvar global = require('./_global');\nvar speciesConstructor = require('./_species-constructor');\nvar promiseResolve = require('./_promise-resolve');\n\n$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {\n var C = speciesConstructor(this, core.Promise || global.Promise);\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n} });\n","'use strict';\n// https://github.com/tc39/proposal-promise-try\nvar $export = require('./_export');\nvar newPromiseCapability = require('./_new-promise-capability');\nvar perform = require('./_perform');\n\n$export($export.S, 'Promise', { 'try': function (callbackfn) {\n var promiseCapability = newPromiseCapability.f(this);\n var result = perform(callbackfn);\n (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);\n return promiseCapability.promise;\n} });\n","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.set');\nrequire('../modules/es7.set.to-json');\nrequire('../modules/es7.set.of');\nrequire('../modules/es7.set.from');\nmodule.exports = require('../modules/_core').Set;\n","'use strict';\nvar strong = require('./_collection-strong');\nvar validate = require('./_validate-collection');\nvar SET = 'Set';\n\n// 23.2 Set Objects\nmodule.exports = require('./_collection')(SET, function (get) {\n return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value) {\n return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);\n }\n}, strong);\n","// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar $export = require('./_export');\n\n$export($export.P + $export.R, 'Set', { toJSON: require('./_collection-to-json')('Set') });\n","// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of\nrequire('./_set-collection-of')('Set');\n","// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from\nrequire('./_set-collection-from')('Set');\n","// element-closest | CC0-1.0 | github.com/jonathantneal/closest\n\n(function (ElementProto) {\n if (typeof ElementProto.matches !== 'function') {\n ElementProto.matches = ElementProto.msMatchesSelector || ElementProto.mozMatchesSelector || ElementProto.webkitMatchesSelector || function matches(selector) {\n var element = this;\n var elements = (element.document || element.ownerDocument).querySelectorAll(selector);\n var index = 0;\n while (elements[index] && elements[index] !== element) {\n ++index;\n }\n return Boolean(elements[index]);\n };\n }\n if (typeof ElementProto.closest !== 'function') {\n ElementProto.closest = function closest(selector) {\n var element = this;\n while (element && element.nodeType === 1) {\n if (element.matches(selector)) {\n return element;\n }\n element = element.parentNode;\n }\n return null;\n };\n }\n})(window.Element.prototype);","(function () {\n 'use strict';\n\n mutationObserverHasBuggyRemovedNodes(function (result) {\n if (result) patchInnerHTMLToRemoveChildNodes();\n });\n function mutationObserverHasBuggyRemovedNodes(callback) {\n if (!window.MutationObserver) {\n callback(false);\n return;\n }\n var element = document.createElement(\"div\");\n element.innerHTML = \"<div><div></div></div>\";\n var observer = new MutationObserver(function (mutations) {\n observer.disconnect();\n var mutation = mutations[0];\n if (mutation && mutation.type == \"childList\") {\n var removedNode = mutation.removedNodes[0];\n var isBuggy = removedNode.childNodes.length == 0;\n callback(isBuggy);\n }\n });\n observer.observe(element, {\n childList: true,\n subtree: true\n });\n element.innerHTML = \"\";\n }\n function patchInnerHTMLToRemoveChildNodes() {\n var _HTMLElement = HTMLElement,\n prototype = _HTMLElement.prototype;\n var descriptor = Object.getOwnPropertyDescriptor(prototype, \"innerHTML\");\n if (!descriptor) return;\n var _set = descriptor.set;\n if (!_set) return;\n Object.defineProperty(prototype, \"innerHTML\", {\n set: function set(value) {\n while (this.lastChild) {\n this.removeChild(this.lastChild);\n }\n _set.call(this, value);\n }\n });\n }\n})();","var map = {\n\t\"./authority-ticket-types_controller.js\": 1274,\n\t\"./authority-tickets-overdue_controller.js\": 1275,\n\t\"./avatar_controller.js\": 1276,\n\t\"./basic-bar-chart_controller.js\": 1278,\n\t\"./basic-map_controller.js\": 1279,\n\t\"./chart-location-service-summary_controller.js\": 1281,\n\t\"./client-usage-chart_controller.js\": 1282,\n\t\"./expanded-link_controller.js\": 1283,\n\t\"./hello_controller.js\": 1284,\n\t\"./kpi-pre-acceptance-audits_controller.js\": 1285,\n\t\"./kpi-prem-types_controller.js\": 1286,\n\t\"./kpi-registrations_controller.js\": 1287,\n\t\"./kpi-spend_controller.js\": 1288,\n\t\"./kpi-tickets-and-replies_controller.js\": 1289,\n\t\"./signin-mode_controller.js\": 1290,\n\t\"./simple-bar-chart_controller.js\": 1291,\n\t\"./simple-bar-month-chart_controller.js\": 1292,\n\t\"./stacked-bar-month-chart_controller.js\": 1293,\n\t\"./toggle-area_controller.js\": 1294,\n\t\"./vendor-kpi-missed-collections_controller.js\": 1295,\n\t\"./vendor-kpi-scheduled-vs-actual-chart-authority-version_controller.js\": 1296,\n\t\"./vendor-kpi-scheduled-vs-actual-chart_controller.js\": 1297\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 1273;","import { Controller } from \"stimulus\"\n\nimport * as am4core from \"@amcharts/amcharts4/core\";\nimport * as am4charts from \"@amcharts/amcharts4/charts\";\nimport am4themes_animated from \"@amcharts/amcharts4/themes/animated\";\n\n\nexport default class extends Controller {\n initialize() {\n\n am4core.useTheme(am4themes_animated);\n\n var chart1 = am4core.create(this.element, am4charts.XYChart);\n chart1.logo.disabled = true;\n\n\n chart1.data = $('#authority-ticket-types-data').data('chart-data');\n\n chart1.padding(40, 40, 40, 40);\n\n var categoryAxis1 = chart1.yAxes.push(new am4charts.CategoryAxis());\n categoryAxis1.renderer.grid.template.location = 0;\n categoryAxis1.dataFields.category = \"issue_type\";\n categoryAxis1.renderer.minGridDistance = 1;\n categoryAxis1.renderer.inversed = true;\n categoryAxis1.renderer.grid.template.disabled = true;\n\n var valueAxis1 = chart1.xAxes.push(new am4charts.ValueAxis());\n valueAxis1.min = 0;\n\n var series1 = chart1.series.push(new am4charts.ColumnSeries());\n series1.stacked = true;\n series1.name = \"Pending Confirmation\";\n series1.dataFields.categoryY = \"issue_type\";\n series1.dataFields.valueX = \"resolved\";\n series1.tooltipText = \"{valueX.value}\"\n series1.columns.template.strokeOpacity = 0;\n series1.columns.template.fill = am4core.color(\"#8CC152\")\n\n\n var series1a = chart1.series.push(new am4charts.ColumnSeries());\n series1a.stacked = true;\n series1a.name = \"Information Required\";\n series1a.dataFields.categoryY = \"issue_type\";\n series1a.dataFields.valueX = \"not_resolved\";\n series1a.tooltipText = \"{valueX.value}\"\n series1a.columns.template.strokeOpacity = 0;\n series1a.columns.template.fill = am4core.color(\"#f5a9b1\")\n\n var labelBullet1 = series1.bullets.push(new am4charts.LabelBullet())\n labelBullet1.label.text = \"{valueX}\";\n labelBullet1.locationX = 0.5;\n\n var labelBullet1a = series1a.bullets.push(new am4charts.LabelBullet())\n labelBullet1a.label.text = \"{valueX}\";\n labelBullet1a.locationX = 0.5;\n\n series1.columns.template.events.on(\"hit\", function(ev) { show_hide(ev) }, this);\n series1a.columns.template.events.on(\"hit\", function(ev) { show_hide(ev) }, this);\n\n chart1.legend = new am4charts.Legend();\n\n function show_hide(ev) {\n var category = ev.target.dataItem.categories.categoryY.toLowerCase().replaceAll(\" \", \"_\")\n\n $('.ticket').hide()\n $('.'+category).show()\n $('.show-all-tickets').show()\n\n $('.show-all-tickets').show()\n\n console.log(category);\n }\n\n labelBullet1a.label.adapter.add(\"textOutput\", function(text, target) {\n if(target.dataItem && target.dataItem.valueX == 0) { return \"\" }\n return text\n });\n\n labelBullet1.label.adapter.add(\"textOutput\", function(text, target) {\n if(target.dataItem && target.dataItem.valueX == 0) { return \"\" }\n return text\n });\n\n\n\n }\n}\n","import { Controller } from \"stimulus\"\n\nimport * as am4core from \"@amcharts/amcharts4/core\";\nimport * as am4charts from \"@amcharts/amcharts4/charts\";\nimport am4themes_animated from \"@amcharts/amcharts4/themes/animated\";\n\n\nexport default class extends Controller {\n initialize() {\n\n am4core.useTheme(am4themes_animated);\n\n var chart2 = am4core.create(this.element, am4charts.XYChart);\n chart2.logo.disabled = true;\n\n chart2.data = $(\"#authority-tickets-overdue-data\").data('chart-data')\n\n chart2.padding(40, 40, 40, 40);\n\n var categoryAxis2 = chart2.yAxes.push(new am4charts.CategoryAxis());\n categoryAxis2.renderer.grid.template.location = 0;\n categoryAxis2.dataFields.category = \"age\";\n categoryAxis2.renderer.minGridDistance = 1;\n categoryAxis2.renderer.inversed = true;\n categoryAxis2.renderer.grid.template.disabled = true;\n\n var valueAxis2 = chart2.xAxes.push(new am4charts.ValueAxis());\n valueAxis2.min = 0;\n\n var series2 = chart2.series.push(new am4charts.ColumnSeries());\n series2.dataFields.categoryY = \"age\";\n series2.dataFields.valueX = \"number\";\n series2.tooltipText = \"{valueX.value}\"\n series2.columns.template.strokeOpacity = 0;\n series2.columns.template.column.cornerRadiusBottomRight = 5;\n series2.columns.template.column.cornerRadiusTopRight = 5;\n\n var labelBullet2 = series2.bullets.push(new am4charts.LabelBullet())\n labelBullet2.label.horizontalCenter = \"left\";\n labelBullet2.label.dx = 10;\n labelBullet2.label.text = \"{values.valueX.workingValue}\";\n labelBullet2.locationX = 1;\n\nchart2.legend = new am4charts.Legend();\nchart2.legend.position = \"bottom\";\nchart2.legend.fontSize = 11\nchart2.legend.color = \"#414141\"\n\n\nconst markerTemplate = chart2.legend.markers.template;\n markerTemplate.width = 10;\n markerTemplate.height = 10;\n\n }\n}\n","import { Controller } from \"stimulus\";\nimport 'material-avatar';\n\nexport default class extends Controller {\n // static targets = [ \"view\" ]\n\n connect() {\n MaterialAvatar(this.element, {\n shape: \"circle\"\n })\n\n }\n}\n","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n;\n(function (win, doc) {\n /**\r\n * Main function to create material avatars\r\n * @param element - The element(s) to apply the material avatar look to\r\n */\n function MaterialAvatar(elements, options) {\n if (!elements) {\n throw new Error('No elements selected/found');\n }\n var _this = this;\n this.options = {\n colorPalette: ['#1abc9c', '#2ecc71', '#3498db', '#9b59b6', '#34495e', '#16a085', '#27ae60', '#2980b9', '#8e44ad', '#2c3e50', '#f1c40f', '#e67e22', '#e74c3c', '#95a5a6', '#f39c12', '#d35400', '#c0392b', '#bdc3c7', '#7f8c8d'],\n fontFamily: 'Arial'\n };\n this.name = 'MaterialAvatar';\n extend(_this.options, options);\n this.elements = elements;\n if (this.elements[0]) {\n //Turn our HTMLCollection into an array so we can iterate through it.\n this.elements = [].slice.call(this.elements);\n this.elements.forEach(function (element) {\n element.avatar = new Avatar(element, _this.options);\n });\n } else {\n this.elements.avatar = new Avatar(elements, _this.options);\n }\n }\n MaterialAvatar.prototype.updateOptions = function (options) {\n var _this = this;\n if (options) {\n this.options = options;\n }\n this.elements.forEach(function (element) {\n element.avatar.options = _this.options;\n });\n };\n function Avatar(element, options) {\n if (!element) {\n throw new Error('No element selected/found');\n }\n var _this = this;\n this.element = element;\n this.options = options;\n this.canvas = doc.createElement('canvas');\n\n //Push our reflows to a new animation frame.\n requestAnimationFrame(function () {\n return _this.init();\n });\n }\n Avatar.prototype.init = function () {\n this.width = parseInt(this.element.offsetWidth, 10);\n this.height = parseInt(this.element.offsetHeight, 10);\n this.canvas.setAttribute('width', this.width);\n this.canvas.setAttribute('height', this.width);\n this.initials = this.getInitials();\n this.fontSize = this.getFontSize();\n this.render();\n };\n Avatar.prototype.render = function () {\n this.backgroundColor = this.generateColor(this.initials.charCodeAt(0) - 65);\n this.context = this.canvas.getContext('2d');\n\n //Create our font styles\n this.context.font = this.fontSize + 'px/0px ' + this.options.fontFamily;\n this.context.textAlign = 'center';\n\n //Decide what type of shape we should draw for the background\n if (this.options) {\n if (this.options.shape === 'circle') {\n this._drawCircle();\n } else {\n this._drawSquare();\n }\n } else {\n this._drawSquare();\n }\n\n //Create the color and add our initials\n this.context.fillStyle = this.getTextColor();\n this.context.fillText(this.initials, this.width / 2, this.height / 2 + this.fontSize * 0.68 / 2);\n\n //Remove the inner text and swap in the canvas elemnt\n this.element.innerHTML = '';\n this.element.appendChild(this.canvas);\n };\n\n //Creates circle background area\n Avatar.prototype._drawCircle = function () {\n var centerX = this.width / 2;\n var centerY = this.height / 2;\n var radius = this.width / 2;\n this.context.beginPath();\n this.context.arc(centerX, centerY, radius, 0, 2 * Math.PI, false);\n this.context.fillStyle = this.backgroundColor;\n this.context.fill();\n };\n\n //Creates square background area\n Avatar.prototype._drawSquare = function () {\n this.context.fillStyle = this.backgroundColor;\n this.context.fillRect(0, 0, this.width, this.height);\n };\n Avatar.prototype.getInitials = function () {\n if (this.options.initials) {\n return this.options.initials;\n }\n this.name = this.options.name || this.element.getAttribute('data-name') || this.element.innerHTML.trim();\n var _nameSplit = this.name.split(' ');\n var _initials;\n this.element.setAttribute('data-name', this.name);\n\n //Get initials from name\n if (_nameSplit.length > 1) {\n _initials = _nameSplit[0].charAt(0).toUpperCase() + _nameSplit[1].charAt(0).toUpperCase();\n } else {\n _initials = _nameSplit[0].charAt(0).toUpperCase();\n }\n return _initials;\n };\n Avatar.prototype.getFontSize = function () {\n if (this.options.fontSize) {\n if (typeof this.options.fontSize === 'function') {\n return this.options.fontSize(this.height, this.initials.length);\n }\n return this.options.fontSize;\n }\n var _fontSize = this.height / (this.initials.length * 0.5 + 1);\n return _fontSize;\n };\n Avatar.prototype.getTextColor = function () {\n //Override generated text color with a custom one\n if (this.options.textColor) {\n return this.options.textColor;\n }\n var _hexColor = this._hexToRgb(this.backgroundColor);\n\n //Optional fallback incase our function returns null\n if (!_hexColor) return '#222';\n var _colorValue = _hexColor.r * 299 + _hexColor.g * 587 + _hexColor.b * 114;\n return Math.round(_colorValue / 1000) > 125 ? '#222' : '#fff';\n };\n Avatar.prototype._hexToRgb = function (hex) {\n var _result;\n\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n hex = hex.replace(/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i, function (m, r, g, b) {\n return r + r + g + g + b + b;\n });\n _result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n if (_result) {\n return {\n r: parseInt(_result[1], 16),\n g: parseInt(_result[2], 16),\n b: parseInt(_result[3], 16)\n };\n }\n return null;\n };\n Avatar.prototype.generateColor = function (index) {\n if (this.options.backgroundColor) {\n return this.options.backgroundColor;\n }\n\n //Uses the randomColor generator - https://github.com/davidmerfield/randomColor\n if ((typeof randomColor === \"undefined\" ? \"undefined\" : _typeof(randomColor)) !== undefined) {\n if (this.options && this.options.randomColor) {\n return randomColor(this.options.randomColor);\n } else if (!this.options) {\n return randomColor();\n }\n }\n return this.options.colorPalette[Math.abs(index) % this.options.colorPalette.length];\n };\n\n // export\n win.MaterialAvatar = MaterialAvatar;\n if (typeof jQuery !== 'undefined' && typeof jQuery.fn !== 'undefined') {\n jQuery.fn.materialAvatar = function (options) {\n return this.each(function () {\n if (!jQuery.data(this, 'plugin_materialAvatar')) {\n jQuery.data(this, 'plugin_materialAvatar', new MaterialAvatar(this, options));\n }\n });\n };\n }\n function extend(_this, obj) {\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n _this[i] = obj[i];\n }\n }\n }\n})(window, document);","import { Controller } from \"stimulus\"\n\nimport * as am4core from \"@amcharts/amcharts4/core\";\nimport * as am4charts from \"@amcharts/amcharts4/charts\";\nimport am4themes_animated from \"@amcharts/amcharts4/themes/animated\";\n\n\nexport default class extends Controller {\n initialize() {\n\n var chartData = $(this.element).data('chart-data')\n am4core.useTheme(am4themes_animated);\n let chart = am4core.create(this.element, am4charts.XYChart);\n\n chart.data = chartData['data'];\n\n\n// Add data\nchart.data = [{\n \"country\": \"USA\",\n \"visits\": 2025\n}, {\n \"country\": \"China\",\n \"visits\": 1882\n}, {\n \"country\": \"Japan\",\n \"visits\": 1809\n}, {\n \"country\": \"Germany\",\n \"visits\": 1322\n}, {\n \"country\": \"UK\",\n \"visits\": 1122\n}, {\n \"country\": \"France\",\n \"visits\": 1114\n}, {\n \"country\": \"India\",\n \"visits\": 984\n}, {\n \"country\": \"Spain\",\n \"visits\": 711\n}, {\n \"country\": \"Netherlands\",\n \"visits\": 665\n}, {\n \"country\": \"Russia\",\n \"visits\": 580\n}, {\n \"country\": \"South Korea\",\n \"visits\": 443\n}, {\n \"country\": \"Canada\",\n \"visits\": 441\n}, {\n \"country\": \"Brazil\",\n \"visits\": 395\n}];\n\n// Create axes\n\nlet categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());\ncategoryAxis.dataFields.category = \"country\";\ncategoryAxis.renderer.grid.template.location = 0;\ncategoryAxis.renderer.minGridDistance = 30;\n\ncategoryAxis.renderer.labels.template.adapter.add(\"dy\", function(dy, target) {\n if (target.dataItem && target.dataItem.index & 2 == 2) {\n return dy + 25;\n }\n return dy;\n});\n\nlet valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\n\n// Create series\nlet series = chart.series.push(new am4charts.ColumnSeries());\nseries.dataFields.valueY = \"visits\";\nseries.dataFields.categoryX = \"country\";\nseries.name = \"Visits\";\nseries.tooltipText = \"{categoryX}: [bold]{valueY}[/]\";\nseries.columns.template.fillOpacity = .8;\n\nlet columnTemplate = series.columns.template;\ncolumnTemplate.strokeWidth = 2;\ncolumnTemplate.strokeOpacity = 1;\n\n\n }\n}\n","import { Controller } from \"stimulus\";\nvar GoogleMapsLoader = require('google-maps');\n\nexport default class extends Controller {\n static targets = [ \"view\" ]\n\n\n connect() {\n\n var latLng = {lat: parseFloat(this.viewTarget.getAttribute('data-latitude')), lng: parseFloat(this.viewTarget.getAttribute('data-longitude'))}\n\n var map = new google.maps.Map(this.viewTarget, {\n center: latLng,\n zoom: 13\n });\n\n new google.maps.Marker({\n position: latLng,\n map: map\n });\n\n }\n}\n","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n(function (root, factory) {\n if (root === null) {\n throw new Error('Google-maps package can be used only in browser');\n }\n if (typeof define === 'function' && define.amd) {\n define(factory);\n } else if ((typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object') {\n module.exports = factory();\n } else {\n root.GoogleMapsLoader = factory();\n }\n})(typeof window !== 'undefined' ? window : null, function () {\n 'use strict';\n\n var googleVersion = '3.31';\n var script = null;\n var google = null;\n var loading = false;\n var callbacks = [];\n var onLoadEvents = [];\n var originalCreateLoaderMethod = null;\n var GoogleMapsLoader = {};\n GoogleMapsLoader.URL = 'https://maps.googleapis.com/maps/api/js';\n GoogleMapsLoader.KEY = null;\n GoogleMapsLoader.LIBRARIES = [];\n GoogleMapsLoader.CLIENT = null;\n GoogleMapsLoader.CHANNEL = null;\n GoogleMapsLoader.LANGUAGE = null;\n GoogleMapsLoader.REGION = null;\n GoogleMapsLoader.VERSION = googleVersion;\n GoogleMapsLoader.WINDOW_CALLBACK_NAME = '__google_maps_api_provider_initializator__';\n GoogleMapsLoader._googleMockApiObject = {};\n GoogleMapsLoader.load = function (fn) {\n if (google === null) {\n if (loading === true) {\n if (fn) {\n callbacks.push(fn);\n }\n } else {\n loading = true;\n window[GoogleMapsLoader.WINDOW_CALLBACK_NAME] = function () {\n ready(fn);\n };\n GoogleMapsLoader.createLoader();\n }\n } else if (fn) {\n fn(google);\n }\n };\n GoogleMapsLoader.createLoader = function () {\n script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = GoogleMapsLoader.createUrl();\n document.body.appendChild(script);\n };\n GoogleMapsLoader.isLoaded = function () {\n return google !== null;\n };\n GoogleMapsLoader.createUrl = function () {\n var url = GoogleMapsLoader.URL;\n url += '?callback=' + GoogleMapsLoader.WINDOW_CALLBACK_NAME;\n if (GoogleMapsLoader.KEY) {\n url += '&key=' + GoogleMapsLoader.KEY;\n }\n if (GoogleMapsLoader.LIBRARIES.length > 0) {\n url += '&libraries=' + GoogleMapsLoader.LIBRARIES.join(',');\n }\n if (GoogleMapsLoader.CLIENT) {\n url += '&client=' + GoogleMapsLoader.CLIENT;\n }\n if (GoogleMapsLoader.CHANNEL) {\n url += '&channel=' + GoogleMapsLoader.CHANNEL;\n }\n if (GoogleMapsLoader.LANGUAGE) {\n url += '&language=' + GoogleMapsLoader.LANGUAGE;\n }\n if (GoogleMapsLoader.REGION) {\n url += '®ion=' + GoogleMapsLoader.REGION;\n }\n if (GoogleMapsLoader.VERSION) {\n url += '&v=' + GoogleMapsLoader.VERSION;\n }\n return url;\n };\n GoogleMapsLoader.release = function (fn) {\n var release = function release() {\n GoogleMapsLoader.KEY = null;\n GoogleMapsLoader.LIBRARIES = [];\n GoogleMapsLoader.CLIENT = null;\n GoogleMapsLoader.CHANNEL = null;\n GoogleMapsLoader.LANGUAGE = null;\n GoogleMapsLoader.REGION = null;\n GoogleMapsLoader.VERSION = googleVersion;\n google = null;\n loading = false;\n callbacks = [];\n onLoadEvents = [];\n if (typeof window.google !== 'undefined') {\n delete window.google;\n }\n if (typeof window[GoogleMapsLoader.WINDOW_CALLBACK_NAME] !== 'undefined') {\n delete window[GoogleMapsLoader.WINDOW_CALLBACK_NAME];\n }\n if (originalCreateLoaderMethod !== null) {\n GoogleMapsLoader.createLoader = originalCreateLoaderMethod;\n originalCreateLoaderMethod = null;\n }\n if (script !== null) {\n script.parentElement.removeChild(script);\n script = null;\n }\n if (fn) {\n fn();\n }\n };\n if (loading) {\n GoogleMapsLoader.load(function () {\n release();\n });\n } else {\n release();\n }\n };\n GoogleMapsLoader.onLoad = function (fn) {\n onLoadEvents.push(fn);\n };\n GoogleMapsLoader.makeMock = function () {\n originalCreateLoaderMethod = GoogleMapsLoader.createLoader;\n GoogleMapsLoader.createLoader = function () {\n window.google = GoogleMapsLoader._googleMockApiObject;\n window[GoogleMapsLoader.WINDOW_CALLBACK_NAME]();\n };\n };\n var ready = function ready(fn) {\n var i;\n loading = false;\n if (google === null) {\n google = window.google;\n }\n for (i = 0; i < onLoadEvents.length; i++) {\n onLoadEvents[i](google);\n }\n if (fn) {\n fn(google);\n }\n for (i = 0; i < callbacks.length; i++) {\n callbacks[i](google);\n }\n callbacks = [];\n };\n return GoogleMapsLoader;\n});","import { Controller } from \"stimulus\"\n\nimport * as am4core from \"@amcharts/amcharts4/core\";\nimport * as am4charts from \"@amcharts/amcharts4/charts\";\nimport am4themes_animated from \"@amcharts/amcharts4/themes/animated\";\n\n\n\nexport default class extends Controller {\n\n}\n","import { Controller } from \"stimulus\";\nimport * as am4core from \"@amcharts/amcharts4/core\";\nimport * as am4charts from \"@amcharts/amcharts4/charts\";\n// import am4themes_animated from \"@amcharts/amcharts4/themes/animated\";\n\nexport default class extends Controller {\n connect() {\n // Get the chart data from the data attribute\n const inputData = this.element.dataset.chartData;\n const parsedData = JSON.parse(inputData);\n\n const data = parsedData['data'];\n const serviceCodes = parsedData['service_codes'];\n\n // Parse dates\n data.forEach(function (datum) {\n datum['date'] = Date.parse(datum['date']);\n });\n\n // Create chart\n const chart = am4core.create(this.element, am4charts.XYChart);\n this.chart = chart; // Store the chart instance for later disposal\n chart.logo.disabled = true;\n\n chart.data = data;\n chart.fontSize = 12;\n chart.dateFormatter.inputDateFormat = \"yyyy-MM-dd\";\n\n chart.scrollbarX = new am4charts.XYChartScrollbar();\n chart.scrollbarX.parent = chart.bottomAxesContainer;\n chart.scrollbarX.animationDuration = 0;\n\n // Date Axis\n const dateAxis = chart.xAxes.push(new am4charts.DateAxis());\n dateAxis.title.text = \"Date\";\n chart.events.on(\"ready\", function (ev) {\n valueAxis.min = valueAxis.minZoomed;\n valueAxis.max = valueAxis.maxZoomed;\n dateAxis.zoomToDates(Date.parse(parsedData['zoom_start']), Date.parse(parsedData['zoom_end']), false, true);\n });\n dateAxis.renderer.minGridDistance = 50;\n dateAxis.renderer.grid.template.location = 0.5;\n dateAxis.startLocation = -1;\n dateAxis.endLocation = 2;\n dateAxis.tooltipDateFormat = \"EEE dt MMM yyyy\";\n\n dateAxis.dateFormats.setKey(\"day\", \"dd MMM\");\n dateAxis.periodChangeDateFormats.setKey(\"day\", \"[bold]MMM\");\n\n // Value Axis\n const valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\n valueAxis.title.text = \"Units Collected\";\n\n // Function to create series\n const createSeries = (name, color, chart) => {\n const series = chart.series.push(new am4charts.ColumnSeries());\n series.name = name;\n series.dataFields.dateX = \"date\";\n series.dataFields.valueY = name;\n series.width = am4core.percent(100);\n series.tooltipText = \"[bold]{valueY}[/] x {name}\";\n series.columns.template.fill = color;\n series.strokeWidth = 0;\n series.stacked = true;\n series.tooltip.fontSize = 12;\n chart.scrollbarX.series.push(series);\n };\n\n // Create all service code series\n serviceCodes.forEach((set) => {\n createSeries(set['name'], set['color'], chart);\n });\n\n\n // // Missed Collection Series\n if(parsedData['showMissed']) {\n const seriesMissedCollections = chart.series.push(new am4charts.LineSeries());\n seriesMissedCollections.name = 'Missed Collection Reports';\n seriesMissedCollections.dataFields.dateX = \"date\";\n seriesMissedCollections.dataFields.valueY = \"missed_value\";\n seriesMissedCollections.strokeWidth = 1;\n seriesMissedCollections.stroke = \"#ccc\";\n seriesMissedCollections.tooltip.fontSize = 12;\n seriesMissedCollections.tooltip.getFillFromObject = false;\n seriesMissedCollections.tooltip.background.fill = am4core.color(\"#656d77\");\n\n seriesMissedCollections.adapter.add(\"tooltipText\", (text, target) => {\n if (!target.tooltipDataItem.dataContext) return text;\n const values = target.tooltipDataItem.dataContext;\n return values.missed ? `Missed ${values.missed_fault} fault : ${values.missed_reason}` : \"Success\";\n });\n\n const missedBullet = seriesMissedCollections.bullets.push(new am4charts.Bullet());\n missedBullet.strokeWidth = 0;\n const circle = missedBullet.createChild(am4core.Circle);\n circle.radius = 5;\n\n missedBullet.adapter.add(\"fill\", (fill, target) => {\n if (!target || !target.tooltipDataItem || !target.tooltipDataItem.dataContext) return fill;\n const values = target.tooltipDataItem.dataContext;\n return values.missed ? \"#e64759\" : \"#5cb86a\";\n });\n }\n\n // HWCN Series\n const seriesHwcns = chart.series.push(new am4charts.LineSeries());\n seriesHwcns.name = 'HWCNs';\n seriesHwcns.dataFields.dateX = \"date\";\n seriesHwcns.dataFields.valueY = \"hwcn_value\";\n seriesHwcns.strokeWidth = 1;\n seriesHwcns.stroke = \"#ccc\";\n\n const hwcnBullet = seriesHwcns.bullets.push(new am4charts.Bullet());\n hwcnBullet.cursorOverStyle = am4core.MouseCursorStyle.pointer;\n\n const triangle = hwcnBullet.createChild(am4core.Triangle);\n triangle.width = 10;\n triangle.height = 10;\n triangle.horizontalCenter = \"middle\";\n triangle.verticalCenter = \"middle\";\n triangle.fill = '#ccc';\n triangle.strokeWidth = 0;\n\n hwcnBullet.events.on('hit', (ev) => {\n const url = ev.target.tooltipDataItem.dataContext.hwcn_url;\n if (url) window.location = url;\n });\n\n hwcnBullet.adapter.add(\"hoverable\", (hoverable, target) => {\n if (!target || !target.tooltipDataItem || !target.tooltipDataItem.dataContext) return hoverable;\n const values = target.tooltipDataItem.dataContext;\n return values.hwcn;\n });\n\n hwcnBullet.adapter.add(\"fillOpacity\", (fillOpacity, target) => {\n if (!target || !target.tooltipDataItem || !target.tooltipDataItem.dataContext) return fillOpacity;\n const values = target.tooltipDataItem.dataContext;\n return values.hwcn ? 1 : 0;\n });\n\n // Invoices Series\n if(parsedData['showInvoices']) {\n const seriesInvoices = chart.series.push(new am4charts.LineSeries());\n seriesInvoices.name = 'Invoices';\n seriesInvoices.dataFields.dateX = \"date\";\n seriesInvoices.dataFields.valueY = \"invoice_value\";\n seriesInvoices.strokeWidth = 1;\n seriesInvoices.stroke = \"#ccc\";\n\n const invoiceBullet = seriesInvoices.bullets.push(new am4charts.Bullet());\n const square = invoiceBullet.createChild(am4core.Rectangle);\n square.width = 8;\n square.height = 8;\n square.horizontalCenter = \"middle\";\n square.verticalCenter = \"middle\";\n square.fill = '#ccc';\n\n invoiceBullet.strokeWidth = 0;\n invoiceBullet.cursorOverStyle = am4core.MouseCursorStyle.pointer;\n\n invoiceBullet.events.on('hit', (ev) => {\n window.location = ev.target.tooltipDataItem.dataContext.invoice_url;\n });\n\n invoiceBullet.adapter.add(\"fillOpacity\", (fillOpacity, target) => {\n if (!target || !target.tooltipDataItem || !target.tooltipDataItem.dataContext) return fillOpacity;\n const values = target.tooltipDataItem.dataContext;\n return values.invoice ? 1 : 0;\n });\n }\n // Cursor\n chart.cursor = new am4charts.XYCursor();\n chart.cursor.xAxis = dateAxis;\n chart.cursor.fullWidthLineX = true;\n chart.cursor.lineX.strokeOpacity = 0;\n chart.cursor.lineX.fill = am4core.color(\"#2c3035\");\n chart.cursor.lineX.fillOpacity = 0.1;\n\n // Legend\n chart.legend = new am4charts.Legend();\n const markerTemplate = chart.legend.markers.template;\n markerTemplate.width = 10;\n markerTemplate.height = 10;\n }\n\n disconnect() {\n // Dispose of the chart when the controller is disconnected\n if (this.chart) {\n this.chart.dispose();\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n\n static targets = [ \"link\" ]\n\n click(el) {\n var url = this.linkTarget.getAttribute('href')\n if(url) { window.location = url }\n }\n\n}\n","// Visit The Stimulus Handbook for more details\n// https://stimulusjs.org/handbook/introduction\n//\n// This example controller works with specially annotated HTML like:\n//\n// <div data-controller=\"hello\">\n// <h1 data-target=\"hello.output\"></h1>\n// </div>\n\nimport { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [ \"output\" ]\n\n connect() {\n\n this.outputTarget.textContent = 'Hello, Stimulus!'\n }\n}\n\n\n\n","import { Controller } from \"stimulus\"\n\nimport * as am4core from \"@amcharts/amcharts4/core\";\nimport * as am4charts from \"@amcharts/amcharts4/charts\";\nimport am4themes_animated from \"@amcharts/amcharts4/themes/animated\";\n\n\nexport default class extends Controller {\n initialize() {\n\n var chartData = $(this.element).data('chart-data')\n am4core.useTheme(am4themes_animated);\n let chart = am4core.create(this.element, am4charts.PieChart);\n chart.data = chartData['data'];\n chart.logo.disabled = true;\n chart.innerRadius = am4core.percent(40);\n\n chart.colors.list = [\n am4core.color(\"#90bf5c\"),\n am4core.color(\"#ffe9b6\"),\n ];\n\n // Add and configure Series\n let pieSeries = chart.series.push(new am4charts.PieSeries());\n pieSeries.dataFields.value = \"value\";\n pieSeries.dataFields.category = \"category\";\n\n\n }\n}\n","import { Controller } from \"stimulus\"\n\nimport * as am4core from \"@amcharts/amcharts4/core\";\nimport * as am4charts from \"@amcharts/amcharts4/charts\";\nimport am4themes_animated from \"@amcharts/amcharts4/themes/animated\";\n\n\nexport default class extends Controller {\n initialize() {\n\n var chartData = $(this.element).data('chart-data')\n am4core.useTheme(am4themes_animated);\n let chart = am4core.create(this.element, am4charts.XYChart);\n chart.data = chartData['data'];\n chart.logo.disabled = true;\n\n // chart.colors.list = [\n // am4core.color(\"#90bf5c\"),\n // am4core.color(\"#ffe9b6\"),\n // ];\n\n // Add and configure Series\n //\n let categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());\n categoryAxis.dataFields.category = \"category\";\n categoryAxis.renderer.grid.template.location = 0;\n categoryAxis.renderer.minGridDistance = 30;\n categoryAxis.tooltip.disabled = true;\n\n let valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\n valueAxis.renderer.minWidth = 50;\n valueAxis.min = 0;\n valueAxis.tooltip.disabled = true;\n\n let series = chart.series.push(new am4charts.ColumnSeries());\n series.dataFields.valueY = \"value\";\n series.dataFields.categoryX = \"category\";\n series.name = \"Premises Type\";\n series.tooltipText = \"{name}: [bold]{valueY}[/]\";\n series.columns.template.fill = \"#90bf5c\"\n series.strokeWidth = 0;\n\n let labelBullet = series.bullets.push(new am4charts.LabelBullet());\n labelBullet.label.text = \"{valueY}\";\n labelBullet.locationY = 0.25;\n labelBullet.label.fill = am4core.color(\"#fff\");\n\n\n chart.legend = new am4charts.Legend();\n chart.legend.position = \"bottom\";\n chart.legend.fontSize = 11\n chart.legend.color = \"#414141\"\n\n\n const markerTemplate = chart.legend.markers.template;\n markerTemplate.width = 10;\n markerTemplate.height = 10;\n\n }\n}\n","import { Controller } from \"stimulus\"\n\nimport * as am4core from \"@amcharts/amcharts4/core\";\nimport * as am4charts from \"@amcharts/amcharts4/charts\";\nimport am4themes_animated from \"@amcharts/amcharts4/themes/animated\";\n\n\nexport default class extends Controller {\n initialize() {\n\n var chartData = $(this.element).data('chart-data')\n am4core.useTheme(am4themes_animated);\n let chart = am4core.create(this.element, am4charts.XYChart);\n\n chart.data = chartData['data'];\n chart.logo.disabled = true;\n\n // Create axes\n chart.dateFormatter.inputDateFormat = \"yyyy-MM-dd\";\n let dateAxis = chart.xAxes.push(new am4charts.DateAxis());\n //dateAxis.renderer.minGridDistance = 60;\n //dateAxis.startLocation = 0;\n //dateAxis.endLocation = 1;\n //dateAxis.baseInterval = {\n //timeUnit: \"month\",\n //count: 1\n //}\n\n // First value axis\n let valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\n valueAxis.title.text = \"Registered\";\n\n // Second value axis\n let valueAxis2 = chart.yAxes.push(new am4charts.ValueAxis());\n valueAxis2.title.text = \"Total Count\";\n valueAxis2.renderer.opposite = true;\n\n // First series\n let series = chart.series.push(new am4charts.ColumnSeries());\n series.dataFields.valueY = \"registered\";\n series.dataFields.dateX = \"date\";\n series.name = \"Daily Registered\";\n series.tooltipText = \"{name}: [bold]{valueY}[/]\";\n series.columns.template.fill = \"#90bf5c\"\n series.strokeWidth = 0;\n\n\n // Second series\n let series2 = chart.series.push(new am4charts.LineSeries());\n series2.dataFields.valueY = \"cumulative\";\n series2.dataFields.dateX = \"date\";\n series2.name = \"Cumulative Total\";\n series2.tooltipText = \"{name}: [bold]{valueY}[/]\";\n series2.strokeWidth = 1;\n series2.yAxis = valueAxis2;\n series2.tensionX = 0.77;\n series2.stroke = \"#3f95cd\"\n\n //var circleBullet = series2.bullets.push(new am4charts.CircleBullet());\n //circleBullet.circle.stroke = am4core.color(\"#3f95cd\");\n //circleBullet.fill = am4core.color(\"white\");\n //circleBullet.circle.strokeWidth = 2;\n\n // Add legend\nchart.legend = new am4charts.Legend();\nchart.legend.position = \"bottom\";\nchart.legend.fontSize = 11\nchart.legend.color = \"#414141\"\n\n\nconst markerTemplate = chart.legend.markers.template;\n markerTemplate.width = 10;\n markerTemplate.height = 10;\n\n // Add cursor\n chart.cursor = new am4charts.XYCursor();\n\n\n }\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","import { Controller } from \"stimulus\"\n\nimport * as am4core from \"@amcharts/amcharts4/core\";\nimport * as am4charts from \"@amcharts/amcharts4/charts\";\nimport am4themes_animated from \"@amcharts/amcharts4/themes/animated\";\n\nexport default class extends Controller {\n initialize() {\n\n var chartData = $(this.element).data('chart-data')\n am4core.useTheme(am4themes_animated);\n let chart = am4core.create(this.element, am4charts.XYChart);\n chart.hiddenState.properties.opacity = 0;\n chart.data = chartData['data'];\n chart.logo.disabled = true;\n\n\n chart.scrollbarX = new am4charts.XYChartScrollbar();\n chart.scrollbarX.parent = chart.bottomAxesContainer;\n chart.scrollbarX.animationDuration = 0;\n\n chart.numberFormatter.numberFormat = \"#.\";\n\n chart.dateFormatter.inputDateFormat = \"MMM yyyy\";\n let dateAxis = chart.xAxes.push(new am4charts.DateAxis());\n dateAxis.renderer.minGridDistance = 60;\n dateAxis.startLocation = 0.2;\n dateAxis.endLocation = 0.8;\n dateAxis.baseInterval = {\n timeUnit: \"month\",\n count: 1\n }\n\n let valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\n valueAxis.title.text = \"Spend (£)\";\n valueAxis.tooltip.disabled = true;\n valueAxis.calculateTotals = true;\n valueAxis.extraMax = 0.1;\n\n // Set up a fixed column width\n const columnWidth = am4core.percent(60); // Set the desired fixed width for columns\n\n function createSeries(name) {\n let series = chart.series.push(new am4charts.ColumnSeries());\n series.name = name;\n series.dataFields.dateX = \"month\";\n series.dataFields.valueY = name;\n series.tooltipText = \"{name}: [bold]£{valueY.formatNumber('#,###.')}[/]\";\n series.tooltip.fontSize = 12;\n series.stacked = true;\n series.strokeWidth = 0;\n series.sequencedInterpolation = true;\n series.columns.template.width = columnWidth; // Set the fixed width for columns\n\n return series;\n }\n\n chartData['series'].forEach(function(name) {\n createSeries(name);\n });\n\n // var totalSeries = chart.series.push(new am4charts.ColumnSeries());\n // totalSeries.dataFields.valueY = \"none\";\n // totalSeries.dataFields.dateX = \"month\";\n // totalSeries.stacked = true;\n // totalSeries.hiddenInLegend = true;\n // totalSeries.columns.template.strokeOpacity = 0;\n // totalSeries.columns.template.width = columnWidth; // Ensure total columns are the same width\n\n // var totalBullet = totalSeries.bullets.push(new am4charts.LabelBullet());\n // totalBullet.dy = -20;\n // totalBullet.label.text = \"£{valueY.total.formatNumber('#,###.')}\";\n // totalBullet.label.hideOversized = false;\n // totalBullet.label.fontSize = 12;\n // totalBullet.label.background.fill = totalSeries.stroke;\n // totalBullet.label.background.fillOpacity = 0;\n\n // Add legend\n chart.legend = new am4charts.Legend();\n chart.legend.position = \"bottom\";\n chart.legend.fontSize = 11;\n chart.legend.color = \"#414141\";\n\n const markerTemplate = chart.legend.markers.template;\n markerTemplate.width = 10;\n markerTemplate.height = 10;\n\n // Add cursor\n chart.cursor = new am4charts.XYCursor();\n\n // Enable horizontal scroll bar\n chart.scrollbarX = new am4charts.XYChartScrollbar();\n chart.scrollbarX.parent = chart.bottomAxesContainer;\n chart.scrollbarX.series.push(chart.series.values[0]); // Add a series to the scrollbar\n\n // Adjust chart's width for scrolling if needed\n chart.seriesContainer.width = am4core.percent(200); // Adjust percentage to control the scroll width\n }\n}\n","import { Controller } from \"stimulus\"\n\nimport * as am4core from \"@amcharts/amcharts4/core\";\nimport * as am4charts from \"@amcharts/amcharts4/charts\";\nimport am4themes_animated from \"@amcharts/amcharts4/themes/animated\";\n\n\nexport default class extends Controller {\n initialize() {\n\n var chartData = $(this.element).data('chart-data')\n am4core.useTheme(am4themes_animated);\n let chart = am4core.create(this.element, am4charts.XYChart);\n chart.data = chartData['data'];\n chart.logo.disabled = true;\n\n // Create axes\n chart.dateFormatter.inputDateFormat = \"MMM yyyy\";\n let dateAxis = chart.xAxes.push(new am4charts.DateAxis());\n dateAxis.renderer.minGridDistance = 60;\n dateAxis.startLocation = 0;\n dateAxis.endLocation = 1;\n dateAxis.baseInterval = {\n timeUnit: \"month\",\n count: 1\n }\n\n // First value axis\n let valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\n valueAxis.title.text = \"Tickets\";\n\n // Second value axis\n let valueAxis2 = chart.yAxes.push(new am4charts.ValueAxis());\n valueAxis2.title.text = \"Replies\";\n valueAxis2.renderer.opposite = true;\n\n // First series\n let series = chart.series.push(new am4charts.ColumnSeries());\n series.dataFields.valueY = \"opened\";\n series.dataFields.dateX = \"month\";\n series.name = \"Opened\";\n series.tooltipText = \"{name}: [bold]{valueY}[/]\";\n series.columns.template.fill = \"#90bf5c\"\n series.strokeWidth = 0;\n\n\n let series1 = chart.series.push(new am4charts.ColumnSeries());\n series1.dataFields.valueY = \"not-closed\";\n series1.dataFields.dateX = \"month\";\n series1.name = \"Not Closed\";\n series1.tooltipText = \"{name}: [bold]{valueY}[/]\";\n series1.columns.template.fill = \"#ffb1c0\"\n series1.strokeWidth = 0;\n\n\n // Second series\n let series2 = chart.series.push(new am4charts.LineSeries());\n series2.dataFields.valueY = \"replies\";\n series2.dataFields.dateX = \"month\";\n series2.name = \"Agent Replies\";\n series2.tooltipText = \"{name}: [bold]{valueY}[/]\";\n series2.strokeWidth = 3;\n series2.yAxis = valueAxis2;\n series2.tensionX = 0.77;\n series2.stroke = \"#3f95cd\"\n\n var circleBullet = series2.bullets.push(new am4charts.CircleBullet());\n circleBullet.circle.stroke = am4core.color(\"#3f95cd\");\n circleBullet.fill = am4core.color(\"white\");\n circleBullet.circle.strokeWidth = 2;\n\n // Add legend\n chart.legend = new am4charts.Legend();\nchart.legend.position = \"bottom\";\nchart.legend.fontSize = 11\nchart.legend.color = \"#414141\"\n\n\nconst markerTemplate = chart.legend.markers.template;\n markerTemplate.width = 10;\n markerTemplate.height = 10;\n\n // Add cursor\n chart.cursor = new am4charts.XYCursor();\n\n\n }\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","import { Controller } from \"stimulus\"\n\nimport { jQuery } from \"jquery\"\n\nexport default class extends Controller {\n\n static targets = [ \"magic\", \"password\", \"magicEmail\", \"passwordEmail\" ]\n\n gotoMagic() {\n this.magicTarget.style.display = 'block';\n this.passwordTarget.style.display = 'none';\n this.magicEmailTarget.value = this.passwordEmailTarget.value\n }\n\n gotoPassword() {\n this.passwordTarget.style.display = 'block';\n this.magicTarget.style.display = 'none';\n this.passwordEmailTarget.value = this.magicEmailTarget.value\n }\n\n}\n","import { Controller } from \"stimulus\";\n\nimport * as am4core from \"@amcharts/amcharts4/core\";\nimport * as am4charts from \"@amcharts/amcharts4/charts\";\nimport am4themes_animated from \"@amcharts/amcharts4/themes/animated\";\n\nexport default class extends Controller {\n initialize() {\n\n var chartData = $(this.element).data('chart-data');\n am4core.useTheme(am4themes_animated);\n let chart = am4core.create(this.element, am4charts.XYChart);\n\n chart.data = chartData['data'];\n chart.logo.disabled = true;\n\n\n\n let categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());\n categoryAxis.dataFields.category = \"category\";\n categoryAxis.renderer.minGridDistance = 1;\n categoryAxis.startLocation = 0;\n categoryAxis.endLocation = 1;\n categoryAxis.renderer.labels.template.wrap = true; // Wrap text if too long\n categoryAxis.renderer.labels.template.maxWidth = 120; // Set a maximum width for the labels to wrap text\n categoryAxis.renderer.labels.template.truncate = false; // Prevent truncation of labels\n categoryAxis.tooltip.disabled = true\n\n categoryAxis.renderer.labels.template.horizontalCenter = \"middle\";\n categoryAxis.renderer.labels.template.verticalCenter = \"middle\";\n // categoryAxis.renderer.labels.template.dx = 10\n // categoryAxis.renderer.labels.template.adapter.add(\"dy\", function(dy, target) {\n // if (target.dataItem && target.dataItem.index & 1) {\n // return dy + 15;\n // }\n // return dy;\n // });\n\n if (chartData['rotateLabels']) {\n categoryAxis.renderer.labels.template.rotation = 90;\n\n }\n\n categoryAxis.renderer.labels.template.events.on(\"hit\", function(ev) {\n const category = ev.target.dataItem.category;\n const item = chartData['data'].find(d => d.category === category);\n if (item && item.url) {\n window.open(item.url); // Open the URL in a new tab\n }\n });\n\n let hoverState = categoryAxis.renderer.labels.template.states.create(\"hover\");\n hoverState.properties.fill = am4core.color(\"#0000FF\"); // Set hover color to blue\n\n categoryAxis.renderer.labels.template.cursorOverStyle = am4core.MouseCursorStyle.pointer;\n\n let valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\n valueAxis.tooltip.disabled = true;\n\n let series = chart.series.push(new am4charts.ColumnSeries());\n series.name = chartData['name'];\n series.dataFields.categoryX = \"category\";\n series.dataFields.valueY = \"data\";\n series.tooltipText = chartData['tooltip'];\n series.tooltip.fontSize = 12;\n series.columns.template.fill = chartData['color'];\n series.stacked = true;\n series.strokeWidth = 0;\n\n\n\n chart.cursor = new am4charts.XYCursor();\n chart.cursor.xAxis = categoryAxis;\n\n // chart.legend = new am4charts.Legend();\n // chart.legend.position = \"bottom\";\n // chart.legend.fontSize = 11;\n // chart.legend.color = \"#414141\";\n\n // const markerTemplate = chart.legend.markers.template;\n // markerTemplate.width = 10;\n // markerTemplate.height = 10;\n\n }\n}\n","import { Controller } from \"stimulus\"\n\nimport * as am4core from \"@amcharts/amcharts4/core\";\nimport * as am4charts from \"@amcharts/amcharts4/charts\";\nimport am4themes_animated from \"@amcharts/amcharts4/themes/animated\";\n\n\nexport default class extends Controller {\n initialize() {\n\n var chartData = $(this.element).data('chart-data')\n am4core.useTheme(am4themes_animated);\n let chart = am4core.create(this.element, am4charts.XYChart);\n\n chart.data = chartData['data'];\n chart.logo.disabled = true;\n\n chart.dateFormatter.inputDateFormat = \"MMM yyyy\";\n let dateAxis = chart.xAxes.push(new am4charts.DateAxis());\n dateAxis.renderer.minGridDistance = 60;\n dateAxis.startLocation = 0;\n dateAxis.endLocation = 1;\n dateAxis.baseInterval = {\n timeUnit: \"month\",\n count: 1\n }\n\n let valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\n valueAxis.tooltip.disabled = true;\n\n\n let series = chart.series.push(new am4charts.ColumnSeries());\n series.name = chartData['name'];\n series.dataFields.dateX = \"month\";\n series.dataFields.valueY = \"data\";\n series.tooltipText = chartData['tooltip'];\n series.tooltip.fontSize = 12\n series.columns.template.fill = chartData['color']\n series.stacked = true;\n series.strokeWidth = 0;\n\n\n chart.cursor = new am4charts.XYCursor();\n chart.cursor.xAxis = dateAxis;\n\n chart.legend = new am4charts.Legend();\n chart.legend.position = \"bottom\";\n chart.legend.fontSize = 11\n chart.legend.color = \"#414141\"\n\n\n const markerTemplate = chart.legend.markers.template;\n markerTemplate.width = 10;\n markerTemplate.height = 10;\n\n }\n}\n","import { Controller } from \"stimulus\"\n\nimport * as am4core from \"@amcharts/amcharts4/core\";\nimport * as am4charts from \"@amcharts/amcharts4/charts\";\nimport am4themes_animated from \"@amcharts/amcharts4/themes/animated\";\n\n\nexport default class extends Controller {\n initialize() {\n\n var chartData = $(this.element).data('chart-data')\n am4core.useTheme(am4themes_animated);\n const chart = am4core.create(this.element, am4charts.XYChart);\n this.chart = chart\n\n chart.data = chartData['data'];\n const series_data = chartData['series_data'];\n\n chart.logo.disabled = true;\n\n chart.dateFormatter.inputDateFormat = \"MMM yyyy\";\n let dateAxis = chart.xAxes.push(new am4charts.DateAxis());\n dateAxis.renderer.minGridDistance = 60;\n dateAxis.startLocation = 0;\n dateAxis.endLocation = 1;\n dateAxis.baseInterval = {\n timeUnit: \"month\",\n count: 1\n }\n\n\n\n dateAxis.tooltipDateFormat = \"MMM yyyy\";\n\n let valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\n valueAxis.tooltip.disabled = true;\n valueAxis.title.text = chartData['yAxixTitle'];\n\n// Function to create series\n const createSeries = (name, color, tooltip, chart) => {\n const series = chart.series.push(new am4charts.ColumnSeries());\n series.name = name;\n series.dataFields.dateX = \"month\";\n series.dataFields.valueY = name;\n series.width = am4core.percent(100);\n // series.tooltipText = \"[bold]{valueY}[/] x {name}\";\n series.tooltipText = tooltip;\n series.columns.template.fill = color;\n series.strokeWidth = 0;\n series.stacked = true;\n series.tooltip.fontSize = 12;\n // debugger\n // chart.scrollbarX.series.push(series);\n };\n // Create all service code series\n series_data.forEach((set) => {\n createSeries(set['name'], set['color'], set['tooltip'], chart);\n });\n\n\n chart.cursor = new am4charts.XYCursor();\n chart.cursor.xAxis = dateAxis;\n\n chart.legend = new am4charts.Legend();\n chart.legend.position = \"bottom\";\n chart.legend.fontSize = 11\n chart.legend.color = \"#414141\"\n\n\n const markerTemplate = chart.legend.markers.template;\n markerTemplate.width = 10;\n markerTemplate.height = 10;\n\n }\n\n disconnect() {\n // Dispose of the chart when the controller is disconnected\n if (this.chart) {\n this.chart.dispose();\n }\n }\n\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n\n static targets = [ \"toggleable\" ]\n\n click(el) {\n if(this.toggleableTarget.classList.contains('d-block')) {\n this.toggleableTarget.classList.add('d-none')\n this.toggleableTarget.classList.remove('d-block')\n } else {\n this.toggleableTarget.classList.add('d-block')\n this.toggleableTarget.classList.remove('d-none')\n }\n }\n\n}\n","import { Controller } from \"stimulus\"\n\nimport * as am4core from \"@amcharts/amcharts4/core\";\nimport * as am4charts from \"@amcharts/amcharts4/charts\";\nimport am4themes_animated from \"@amcharts/amcharts4/themes/animated\";\n\nexport default class extends Controller {\n initialize() {\n\n var chartData = $(this.element).data('chart-data')\n am4core.useTheme(am4themes_animated);\n let chart = am4core.create(this.element, am4charts.XYChart);\n chart.hiddenState.properties.opacity = 0;\n chart.data = chartData['data'];\n chart.logo.disabled = true;\n\nchart.dateFormatter.inputDateFormat = \"MMM yyyy\";\n\nlet dateAxis = chart.xAxes.push(new am4charts.DateAxis());\n dateAxis.renderer.minGridDistance = 60;\n dateAxis.startLocation = 0;\n dateAxis.endLocation = 1;\n dateAxis.baseInterval = {\n timeUnit: \"month\",\n count: 1\n }\n\nlet valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\n valueAxis.tooltip.disabled = true;\n\nlet agent = chart.series.push(new am4charts.ColumnSeries());\n agent.name = \"Agent fault \";\n agent.dataFields.dateX = \"month\";\n agent.dataFields.valueY = \"agent-fault\";\n agent.tooltipText = \"Agent Fault: [bold]{valueY}[/]\";\n agent.tooltip.fontSize = 12\n agent.columns.template.fill = \"#ffe9b6\"\n agent.stacked = true;\n agent.strokeWidth = 0;\n\nlet client = chart.series.push(new am4charts.ColumnSeries());\n client.name = \"Client fault \";\n client.dataFields.dateX = \"month\";\n client.dataFields.valueY = \"client-fault\";\n client.tooltipText = \"Client Fault: [bold]{valueY}[/]\";\n client.tooltip.fontSize = 12\n client.columns.template.fill = \"#aed8f7\"\n client.stacked = true;\n client.strokeWidth = 0;\n\nlet vendor = chart.series.push(new am4charts.ColumnSeries());\n vendor.name = \"Vendor fault\";\n vendor.dataFields.dateX = \"month\";\n vendor.dataFields.valueY = \"vendor-fault\";\n vendor.tooltipText = \"Vendor Fault: [bold]{valueY}[/]\";\n vendor.tooltip.fontSize = 12\n vendor.columns.template.fill = \"#ffb1c0\"\n vendor.stacked = true;\n vendor.strokeWidth = 0;\n\nlet reperform = chart.series.push(new am4charts.StepLineSeries());\n reperform.name = \"Vendor Fault reperform (avg days)\";\n reperform.dataFields.dateX = \"month\";\n reperform.dataFields.valueY = \"vendor-fault-reperform-days\";\n reperform.tooltipText = \"{name}: [bold]{valueY}[/]\";\n reperform.tooltip.fontSize = 12;\n reperform.stacked = false;\n reperform.stroke = am4core.color(\"#ffb1c0\");\n reperform.fill = \"#ffb1c0\"\n reperform.startLocation = 0;\n reperform.strokeWidth = 2;\n reperform.noRisers= true;\n reperform.hiddenInLegend = true;\n\nlet client_reperform = chart.series.push(new am4charts.StepLineSeries());\n client_reperform.name = \"Agent Fault reperform Days\";\n client_reperform.dataFields.dateX = \"month\";\n client_reperform.dataFields.valueY = \"client-fault-reperform-days\";\n client_reperform.tooltipText = \"{name}: [bold]{valueY}[/]\";\n client_reperform.tooltip.fontSize = 12\n client_reperform.stacked = false;\n client_reperform.stroke = am4core.color(\"#aed8f7\");\n client_reperform.fill = \"#aed8f7\"\n client_reperform.startLocation = 0;\n client_reperform.strokeWidth = 2;\n client_reperform.noRisers = true;\n client_reperform.hiddenInLegend = true;\n\n\nvar bullet = reperform.bullets.push(new am4charts.CircleBullet());\n bullet.fill = am4core.color(\"white\");\n bullet.strokeWidth = 2;\n\nvar client_reperform_bullet = client_reperform.bullets.push(new am4charts.CircleBullet());\n client_reperform_bullet.fill = am4core.color(\"white\");\n client_reperform_bullet.strokeWidth = 2;\n\nchart.cursor = new am4charts.XYCursor();\nchart.cursor.xAxis = dateAxis;\n// chart.scrollbarX = new am4core.Scrollbar();\n\nchart.legend = new am4charts.Legend();\nchart.legend.position = \"bottom\";\nchart.legend.fontSize = 11\nchart.legend.color = \"#414141\"\n\n\nconst markerTemplate = chart.legend.markers.template;\n markerTemplate.width = 10;\n markerTemplate.height = 10;\n\n// axis ranges\n// let range = dateAxis.axisRanges.create();\n// range.date = new Date(2001, 1, 1);\n// range.endDate = new Date(2003, 1, 1);\n// range.axisFill.fill = chart.colors.getIndex(7);\n// range.axisFill.fillOpacity = 0.2;\n\n// range.label.text = \"Fines for speeding increased\";\n// range.label.inside = true;\n// range.label.rotation = 90;\n// range.label.horizontalCenter = \"right\";\n// range.label.verticalCenter = \"bottom\";\n\n// let range2 = dateAxis.axisRanges.create();\n// range2.date = new Date(2007, 1, 1);\n// range2.grid.stroke = chart.colors.getIndex(7);\n// range2.grid.strokeOpacity = 0.6;\n// range2.grid.strokeDasharray = \"5,2\";\n\n\n// range2.label.text = \"Motorcycle fee introduced\";\n// range2.label.inside = true;\n// range2.label.rotation = 90;\n// range2.label.horizontalCenter = \"right\";\n// range2.label.verticalCenter = \"bottom\";\n\n }\n}\n","import { Controller } from \"stimulus\"\n\nimport * as am4core from \"@amcharts/amcharts4/core\";\nimport * as am4charts from \"@amcharts/amcharts4/charts\";\nimport am4themes_animated from \"@amcharts/amcharts4/themes/animated\";\n\n\nexport default class extends Controller {\n initialize() {\n\n var chartData = $(this.element).data('chart-data')\n console.log(chartData)\n am4core.useTheme(am4themes_animated);\n let chart = am4core.create(this.element, am4charts.XYChart);\n\n chart.data = chartData['data'];\n chart.logo.disabled = true;\n\n//chart.numberFormatter.numberFormat = \"#.'%'\";\nchart.dateFormatter.inputDateFormat = \"MMM yyyy\";\n\nlet dateAxis = chart.xAxes.push(new am4charts.DateAxis());\n // dateAxis.renderer.minGridDistance = 60;\n // dateAxis.startLocation = 0;\n // dateAxis.endLocation = 1;\n dateAxis.renderer.grid.template.location = 0;\n dateAxis.renderer.minGridDistance = 20;\n dateAxis.renderer.cellStartLocation = 0.1;\n dateAxis.renderer.cellEndLocation = 0.9;\n dateAxis.baseInterval = {\n timeUnit: \"month\",\n count: 1\n }\n\n\n\nlet valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\n //valueAxis.min = 0;\n //valueAxis.max = 100;\n //valueAxis.strictMinMax = true;\n //valueAxis.calculateTotals = true;\n // valueAxis.renderer.minWidth = 50;\n //\n //\nfunction createSeries(field, name, color, stacked, width) {\n\n let series = chart.series.push(new am4charts.ColumnSeries());\n series.name = name;\n series.dataFields.dateX = \"month\";\n series.columns.template.width = am4core.percent(width);\n series.tooltipText = \"{name}: {valueY}\";\n series.columns.template.fill = color;\n series.strokeWidth = 0;\n series.dataFields.valueY = field;\n //series.dataFields.valueYShow = \"totalPercent\";\n series.stacked = stacked;\n // series.tooltip.pointerOrientation = \"vertical\";\n series.tooltip.fontSize = 12\n // series.tooltip.dy = -10;\n\n // let bullet = series.bullets.push(new am4charts.LabelBullet());\n // bullet.interactionsEnabled = false;\n // bullet.label.text = \"{valueY.totalPercent.formatNumber('#.00')}%\";\n // bullet.label.fill = am4core.color(\"#ffffff\");\n // bullet.locationY = 0.5;\n}\n\ncreateSeries(\"total-collections\", \"Scheduled Collections\", \"#ccc\", false, 40)\n// createSeries(\"result-unconfirmed\", \"Not yet Confirmed\", \"#4c4f4d\", true)\ncreateSeries(\"as-scheduled\", \"As Scheduled\", \"#90bf5c\", false, 80)\ncreateSeries(\"within-2-days\", \"Within 2 days\", \"#ffe9b6\", true, 80)\ncreateSeries(\"more-than-2-days\", \"More than 2 days\", \"#ffb1c0\", true, 80)\ncreateSeries(\"not-preformed-and-not-yet-confirmed\", \"Not Performed\", \"#bf1d1d\", true, 80)\n// createSeries(\"extra-collection\", \"Schedule Unknown\", \"#ccc\", true)\n\nchart.cursor = new am4charts.XYCursor();\nchart.cursor.xAxis = dateAxis;\n// chart.scrollbarX = new am4core.Scrollbar();\n\n\n\nchart.legend = new am4charts.Legend();\nchart.legend.position = \"bottom\";\nchart.legend.fontSize = 11\nchart.legend.color = \"#414141\"\n\n\nconst markerTemplate = chart.legend.markers.template;\n markerTemplate.width = 10;\n markerTemplate.height = 10;\n\n }\n}\n","import { Controller } from \"stimulus\"\n\nimport * as am4core from \"@amcharts/amcharts4/core\";\nimport * as am4charts from \"@amcharts/amcharts4/charts\";\nimport am4themes_animated from \"@amcharts/amcharts4/themes/animated\";\n\n\nexport default class extends Controller {\n initialize() {\n\n var chartData = $(this.element).data('chart-data')\n console.log(chartData)\n am4core.useTheme(am4themes_animated);\n let chart = am4core.create(this.element, am4charts.XYChart);\n\n chart.data = chartData['data'];\n chart.logo.disabled = true;\n\n//chart.numberFormatter.numberFormat = \"#.'%'\";\nchart.dateFormatter.inputDateFormat = \"MMM yyyy\";\n\nlet dateAxis = chart.xAxes.push(new am4charts.DateAxis());\n dateAxis.renderer.minGridDistance = 60;\n dateAxis.startLocation = 0;\n dateAxis.endLocation = 1;\n dateAxis.baseInterval = {\n timeUnit: \"month\",\n count: 1\n }\n\n\n\nlet valueAxis = chart.yAxes.push(new am4charts.ValueAxis());\n //valueAxis.min = 0;\n //valueAxis.max = 100;\n //valueAxis.strictMinMax = true;\n //valueAxis.calculateTotals = true;\n // valueAxis.renderer.minWidth = 50;\n //\n //\nfunction createSeries(field, name, color) {\n\n let series = chart.series.push(new am4charts.ColumnSeries());\n series.name = name;\n series.dataFields.dateX = \"month\";\n series.columns.template.width = am4core.percent(40);\n series.tooltipText = \"{name}: {valueY}\";\n series.columns.template.fill = color;\n series.strokeWidth = 0;\n series.dataFields.valueY = field;\n //series.dataFields.valueYShow = \"totalPercent\";\n series.stacked = true;\n // series.tooltip.pointerOrientation = \"vertical\";\n series.tooltip.fontSize = 12\n // series.tooltip.dy = -10;\n\n // let bullet = series.bullets.push(new am4charts.LabelBullet());\n // bullet.interactionsEnabled = false;\n // bullet.label.text = \"{valueY.totalPercent.formatNumber('#.00')}%\";\n // bullet.label.fill = am4core.color(\"#ffffff\");\n // bullet.locationY = 0.5;\n}\n\n\ncreateSeries(\"as-scheduled\", \"Success\", \"#90bf5c\")\n// createSeries(\"within-2-days\", \"Within 2 days\", \"#ffe9b6\")\n// createSeries(\"more-than-2-days\", \"More than 2 days\", \"#ffb1c0\")\ncreateSeries(\"extra-collection\", \"Delivery Failure\", \"#e65959\")\ncreateSeries(\"not-performed\", \"Total Failure\", \"#bf1d1d\")\ncreateSeries(\"no-vendor-data\", \"Awaiting Vendor Data\", \"#ccc\" )\n\nchart.cursor = new am4charts.XYCursor();\nchart.cursor.xAxis = dateAxis;\n// chart.scrollbarX = new am4core.Scrollbar();\n\n\n\nchart.legend = new am4charts.Legend();\nchart.legend.position = \"bottom\";\nchart.legend.fontSize = 11\nchart.legend.color = \"#414141\"\n\n\nconst markerTemplate = chart.legend.markers.template;\n markerTemplate.width = 10;\n markerTemplate.height = 10;\n\n }\n}\n","var global = require('./$.global')\n , core = require('./$.core')\n , hide = require('./$.hide')\n , redefine = require('./$.redefine')\n , ctx = require('./$.ctx')\n , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n var IS_FORCED = type & $export.F\n , IS_GLOBAL = type & $export.G\n , IS_STATIC = type & $export.S\n , IS_PROTO = type & $export.P\n , IS_BIND = type & $export.B\n , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]\n , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {})\n , key, own, out, exp;\n if(IS_GLOBAL)source = name;\n for(key in source){\n // contains in native\n own = !IS_FORCED && target && key in target;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if(target && !own)redefine(target, key, out);\n // export\n if(exports[key] != out)hide(exports, key, exp);\n if(IS_PROTO && expProto[key] != out)expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\nmodule.exports = $export;","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function(fn, args, that){\n var un = that === undefined;\n switch(args.length){\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};","module.exports = {};","var map = {\n\t\"./af\": 789,\n\t\"./af.js\": 789,\n\t\"./ar\": 790,\n\t\"./ar-dz\": 791,\n\t\"./ar-dz.js\": 791,\n\t\"./ar-kw\": 792,\n\t\"./ar-kw.js\": 792,\n\t\"./ar-ly\": 793,\n\t\"./ar-ly.js\": 793,\n\t\"./ar-ma\": 794,\n\t\"./ar-ma.js\": 794,\n\t\"./ar-sa\": 795,\n\t\"./ar-sa.js\": 795,\n\t\"./ar-tn\": 796,\n\t\"./ar-tn.js\": 796,\n\t\"./ar.js\": 790,\n\t\"./az\": 797,\n\t\"./az.js\": 797,\n\t\"./be\": 798,\n\t\"./be.js\": 798,\n\t\"./bg\": 799,\n\t\"./bg.js\": 799,\n\t\"./bm\": 800,\n\t\"./bm.js\": 800,\n\t\"./bn\": 801,\n\t\"./bn-bd\": 802,\n\t\"./bn-bd.js\": 802,\n\t\"./bn.js\": 801,\n\t\"./bo\": 803,\n\t\"./bo.js\": 803,\n\t\"./br\": 804,\n\t\"./br.js\": 804,\n\t\"./bs\": 805,\n\t\"./bs.js\": 805,\n\t\"./ca\": 806,\n\t\"./ca.js\": 806,\n\t\"./cs\": 807,\n\t\"./cs.js\": 807,\n\t\"./cv\": 808,\n\t\"./cv.js\": 808,\n\t\"./cy\": 809,\n\t\"./cy.js\": 809,\n\t\"./da\": 810,\n\t\"./da.js\": 810,\n\t\"./de\": 811,\n\t\"./de-at\": 812,\n\t\"./de-at.js\": 812,\n\t\"./de-ch\": 813,\n\t\"./de-ch.js\": 813,\n\t\"./de.js\": 811,\n\t\"./dv\": 814,\n\t\"./dv.js\": 814,\n\t\"./el\": 815,\n\t\"./el.js\": 815,\n\t\"./en-au\": 816,\n\t\"./en-au.js\": 816,\n\t\"./en-ca\": 817,\n\t\"./en-ca.js\": 817,\n\t\"./en-gb\": 818,\n\t\"./en-gb.js\": 818,\n\t\"./en-ie\": 819,\n\t\"./en-ie.js\": 819,\n\t\"./en-il\": 820,\n\t\"./en-il.js\": 820,\n\t\"./en-in\": 821,\n\t\"./en-in.js\": 821,\n\t\"./en-nz\": 822,\n\t\"./en-nz.js\": 822,\n\t\"./en-sg\": 823,\n\t\"./en-sg.js\": 823,\n\t\"./eo\": 824,\n\t\"./eo.js\": 824,\n\t\"./es\": 825,\n\t\"./es-do\": 826,\n\t\"./es-do.js\": 826,\n\t\"./es-mx\": 827,\n\t\"./es-mx.js\": 827,\n\t\"./es-us\": 828,\n\t\"./es-us.js\": 828,\n\t\"./es.js\": 825,\n\t\"./et\": 829,\n\t\"./et.js\": 829,\n\t\"./eu\": 830,\n\t\"./eu.js\": 830,\n\t\"./fa\": 831,\n\t\"./fa.js\": 831,\n\t\"./fi\": 832,\n\t\"./fi.js\": 832,\n\t\"./fil\": 833,\n\t\"./fil.js\": 833,\n\t\"./fo\": 834,\n\t\"./fo.js\": 834,\n\t\"./fr\": 835,\n\t\"./fr-ca\": 836,\n\t\"./fr-ca.js\": 836,\n\t\"./fr-ch\": 837,\n\t\"./fr-ch.js\": 837,\n\t\"./fr.js\": 835,\n\t\"./fy\": 838,\n\t\"./fy.js\": 838,\n\t\"./ga\": 839,\n\t\"./ga.js\": 839,\n\t\"./gd\": 840,\n\t\"./gd.js\": 840,\n\t\"./gl\": 841,\n\t\"./gl.js\": 841,\n\t\"./gom-deva\": 842,\n\t\"./gom-deva.js\": 842,\n\t\"./gom-latn\": 843,\n\t\"./gom-latn.js\": 843,\n\t\"./gu\": 844,\n\t\"./gu.js\": 844,\n\t\"./he\": 845,\n\t\"./he.js\": 845,\n\t\"./hi\": 846,\n\t\"./hi.js\": 846,\n\t\"./hr\": 847,\n\t\"./hr.js\": 847,\n\t\"./hu\": 848,\n\t\"./hu.js\": 848,\n\t\"./hy-am\": 849,\n\t\"./hy-am.js\": 849,\n\t\"./id\": 850,\n\t\"./id.js\": 850,\n\t\"./is\": 851,\n\t\"./is.js\": 851,\n\t\"./it\": 852,\n\t\"./it-ch\": 853,\n\t\"./it-ch.js\": 853,\n\t\"./it.js\": 852,\n\t\"./ja\": 854,\n\t\"./ja.js\": 854,\n\t\"./jv\": 855,\n\t\"./jv.js\": 855,\n\t\"./ka\": 856,\n\t\"./ka.js\": 856,\n\t\"./kk\": 857,\n\t\"./kk.js\": 857,\n\t\"./km\": 858,\n\t\"./km.js\": 858,\n\t\"./kn\": 859,\n\t\"./kn.js\": 859,\n\t\"./ko\": 860,\n\t\"./ko.js\": 860,\n\t\"./ku\": 861,\n\t\"./ku.js\": 861,\n\t\"./ky\": 862,\n\t\"./ky.js\": 862,\n\t\"./lb\": 863,\n\t\"./lb.js\": 863,\n\t\"./lo\": 864,\n\t\"./lo.js\": 864,\n\t\"./lt\": 865,\n\t\"./lt.js\": 865,\n\t\"./lv\": 866,\n\t\"./lv.js\": 866,\n\t\"./me\": 867,\n\t\"./me.js\": 867,\n\t\"./mi\": 868,\n\t\"./mi.js\": 868,\n\t\"./mk\": 869,\n\t\"./mk.js\": 869,\n\t\"./ml\": 870,\n\t\"./ml.js\": 870,\n\t\"./mn\": 871,\n\t\"./mn.js\": 871,\n\t\"./mr\": 872,\n\t\"./mr.js\": 872,\n\t\"./ms\": 873,\n\t\"./ms-my\": 874,\n\t\"./ms-my.js\": 874,\n\t\"./ms.js\": 873,\n\t\"./mt\": 875,\n\t\"./mt.js\": 875,\n\t\"./my\": 876,\n\t\"./my.js\": 876,\n\t\"./nb\": 877,\n\t\"./nb.js\": 877,\n\t\"./ne\": 878,\n\t\"./ne.js\": 878,\n\t\"./nl\": 879,\n\t\"./nl-be\": 880,\n\t\"./nl-be.js\": 880,\n\t\"./nl.js\": 879,\n\t\"./nn\": 881,\n\t\"./nn.js\": 881,\n\t\"./oc-lnc\": 882,\n\t\"./oc-lnc.js\": 882,\n\t\"./pa-in\": 883,\n\t\"./pa-in.js\": 883,\n\t\"./pl\": 884,\n\t\"./pl.js\": 884,\n\t\"./pt\": 885,\n\t\"./pt-br\": 886,\n\t\"./pt-br.js\": 886,\n\t\"./pt.js\": 885,\n\t\"./ro\": 887,\n\t\"./ro.js\": 887,\n\t\"./ru\": 888,\n\t\"./ru.js\": 888,\n\t\"./sd\": 889,\n\t\"./sd.js\": 889,\n\t\"./se\": 890,\n\t\"./se.js\": 890,\n\t\"./si\": 891,\n\t\"./si.js\": 891,\n\t\"./sk\": 892,\n\t\"./sk.js\": 892,\n\t\"./sl\": 893,\n\t\"./sl.js\": 893,\n\t\"./sq\": 894,\n\t\"./sq.js\": 894,\n\t\"./sr\": 895,\n\t\"./sr-cyrl\": 896,\n\t\"./sr-cyrl.js\": 896,\n\t\"./sr.js\": 895,\n\t\"./ss\": 897,\n\t\"./ss.js\": 897,\n\t\"./sv\": 898,\n\t\"./sv.js\": 898,\n\t\"./sw\": 899,\n\t\"./sw.js\": 899,\n\t\"./ta\": 900,\n\t\"./ta.js\": 900,\n\t\"./te\": 901,\n\t\"./te.js\": 901,\n\t\"./tet\": 902,\n\t\"./tet.js\": 902,\n\t\"./tg\": 903,\n\t\"./tg.js\": 903,\n\t\"./th\": 904,\n\t\"./th.js\": 904,\n\t\"./tk\": 905,\n\t\"./tk.js\": 905,\n\t\"./tl-ph\": 906,\n\t\"./tl-ph.js\": 906,\n\t\"./tlh\": 907,\n\t\"./tlh.js\": 907,\n\t\"./tr\": 908,\n\t\"./tr.js\": 908,\n\t\"./tzl\": 909,\n\t\"./tzl.js\": 909,\n\t\"./tzm\": 910,\n\t\"./tzm-latn\": 911,\n\t\"./tzm-latn.js\": 911,\n\t\"./tzm.js\": 910,\n\t\"./ug-cn\": 912,\n\t\"./ug-cn.js\": 912,\n\t\"./uk\": 913,\n\t\"./uk.js\": 913,\n\t\"./ur\": 914,\n\t\"./ur.js\": 914,\n\t\"./uz\": 915,\n\t\"./uz-latn\": 916,\n\t\"./uz-latn.js\": 916,\n\t\"./uz.js\": 915,\n\t\"./vi\": 917,\n\t\"./vi.js\": 917,\n\t\"./x-pseudo\": 918,\n\t\"./x-pseudo.js\": 918,\n\t\"./yo\": 919,\n\t\"./yo.js\": 919,\n\t\"./zh-cn\": 920,\n\t\"./zh-cn.js\": 920,\n\t\"./zh-hk\": 921,\n\t\"./zh-hk.js\": 921,\n\t\"./zh-mo\": 922,\n\t\"./zh-mo.js\": 922,\n\t\"./zh-tw\": 923,\n\t\"./zh-tw.js\": 923\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 1301;","var core = module.exports = {version: '1.2.6'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef","module.exports = function(bitmap, value){\n return {\n enumerable : !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable : !(bitmap & 4),\n value : value\n };\n};","// add fake Function#toString\n// for correct work wrapped methods / constructors with methods like LoDash isNative\nvar global = require('./$.global')\n , hide = require('./$.hide')\n , SRC = require('./$.uid')('src')\n , TO_STRING = 'toString'\n , $toString = Function[TO_STRING]\n , TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./$.core').inspectSource = function(it){\n return $toString.call(it);\n};\n\n(module.exports = function(O, key, val, safe){\n if(typeof val == 'function'){\n val.hasOwnProperty(SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n val.hasOwnProperty('name') || hide(val, 'name', key);\n }\n if(O === global){\n O[key] = val;\n } else {\n if(!safe)delete O[key];\n hide(O, key, val);\n }\n})(Function.prototype, TO_STRING, function toString(){\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});","var id = 0\n , px = Math.random();\nmodule.exports = function(key){\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};","// optional / simple context binding\nvar aFunction = require('./$.a-function');\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};","module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};","var toString = {}.toString;\n\nmodule.exports = function(it){\n return toString.call(it).slice(8, -1);\n};","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function(it, key){\n return hasOwnProperty.call(it, key);\n};","var def = require('./$').setDesc\n , has = require('./$.has')\n , TAG = require('./$.wks')('toStringTag');\n\nmodule.exports = function(it, tag, stat){\n if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});\n};","/**!\n * @fileOverview Kickass library to create and place poppers near their reference elements.\n * @version 1.14.3\n * @license\n * Copyright (c) 2016 Federico Zivolo and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';\nvar longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\nvar timeoutDuration = 0;\nfor (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n timeoutDuration = 1;\n break;\n }\n}\nfunction microtaskDebounce(fn) {\n var called = false;\n return function () {\n if (called) {\n return;\n }\n called = true;\n window.Promise.resolve().then(function () {\n called = false;\n fn();\n });\n };\n}\nfunction taskDebounce(fn) {\n var scheduled = false;\n return function () {\n if (!scheduled) {\n scheduled = true;\n setTimeout(function () {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\nvar supportsMicroTasks = isBrowser && window.Promise;\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nvar debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;\n\n/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nfunction isFunction(functionToCheck) {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\n/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nfunction getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n var css = getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n\n/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nfunction getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nfunction getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body;\n }\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body;\n case '#document':\n return element.body;\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n\n var _getStyleComputedProp = getStyleComputedProperty(element),\n overflow = _getStyleComputedProp.overflow,\n overflowX = _getStyleComputedProp.overflowX,\n overflowY = _getStyleComputedProp.overflowY;\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n return getScrollParent(getParentNode(element));\n}\nvar isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nvar isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nfunction isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nfunction getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n var noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n var offsetParent = element.offsetParent;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n var nodeName = offsetParent && offsetParent.nodeName;\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {\n return getOffsetParent(offsetParent);\n }\n return offsetParent;\n}\nfunction isOffsetContainer(element) {\n var nodeName = element.nodeName;\n if (nodeName === 'BODY') {\n return false;\n }\n return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;\n}\n\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nfunction getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n return node;\n}\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nfunction findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n var start = order ? element1 : element2;\n var end = order ? element2 : element1;\n\n // Get common ancestor container\n var range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n var commonAncestorContainer = range.commonAncestorContainer;\n\n // Both nodes are inside #document\n\n if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n var element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nfunction getScroll(element) {\n var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';\n var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n var nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n var html = element.ownerDocument.documentElement;\n var scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n return element[upperSide];\n}\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nfunction includeScroll(rect, element) {\n var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n var modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n\n/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nfunction getBordersSize(styles, axis) {\n var sideA = axis === 'x' ? 'Left' : 'Top';\n var sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);\n}\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0);\n}\nfunction getWindowSizes() {\n var body = document.body;\n var html = document.documentElement;\n var computedStyle = isIE(10) && getComputedStyle(html);\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle)\n };\n}\nvar classCallCheck = function classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar defineProperty = function defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n};\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n};\n\n/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nfunction getClientRect(offsets) {\n return _extends({}, offsets, {\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height\n });\n}\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nfunction getBoundingClientRect(element) {\n var rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n } else {\n rect = element.getBoundingClientRect();\n }\n } catch (e) {}\n var result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n\n // subtract scrollbar size from sizes\n var sizes = element.nodeName === 'HTML' ? getWindowSizes() : {};\n var width = sizes.width || element.clientWidth || result.right - result.left;\n var height = sizes.height || element.clientHeight || result.bottom - result.top;\n var horizScrollbar = element.offsetWidth - width;\n var vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n var styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n return getClientRect(result);\n}\nfunction getOffsetRectRelativeToArbitraryNode(children, parent) {\n var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var isIE10 = isIE(10);\n var isHTML = parent.nodeName === 'HTML';\n var childrenRect = getBoundingClientRect(children);\n var parentRect = getBoundingClientRect(parent);\n var scrollParent = getScrollParent(children);\n var styles = getStyleComputedProperty(parent);\n var borderTopWidth = parseFloat(styles.borderTopWidth, 10);\n var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if (fixedPosition && parent.nodeName === 'HTML') {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n var offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n var marginTop = parseFloat(styles.marginTop, 10);\n var marginLeft = parseFloat(styles.marginLeft, 10);\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {\n offsets = includeScroll(offsets, parent);\n }\n return offsets;\n}\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element) {\n var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var html = element.ownerDocument.documentElement;\n var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n var width = Math.max(html.clientWidth, window.innerWidth || 0);\n var height = Math.max(html.clientHeight, window.innerHeight || 0);\n var scrollTop = !excludeScroll ? getScroll(html) : 0;\n var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n var offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width: width,\n height: height\n };\n return getClientRect(offset);\n}\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nfunction isFixed(element) {\n var nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n return isFixed(getParentNode(element));\n}\n\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nfunction getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n var el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n}\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nfunction getBoundaries(popper, reference, padding, boundariesElement) {\n var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n // NOTE: 1 DOM access here\n\n var boundaries = {\n top: 0,\n left: 0\n };\n var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);\n\n // Handle viewport case\n if (boundariesElement === 'viewport') {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n } else {\n // Handle other cases based on DOM element used as boundaries\n var boundariesNode = void 0;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n var _getWindowSizes = getWindowSizes(),\n height = _getWindowSizes.height,\n width = _getWindowSizes.width;\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n boundaries.left += padding;\n boundaries.top += padding;\n boundaries.right -= padding;\n boundaries.bottom -= padding;\n return boundaries;\n}\nfunction getArea(_ref) {\n var width = _ref.width,\n height = _ref.height;\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {\n var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n var boundaries = getBoundaries(popper, reference, padding, boundariesElement);\n var rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height\n }\n };\n var sortedAreas = Object.keys(rects).map(function (key) {\n return _extends({\n key: key\n }, rects[key], {\n area: getArea(rects[key])\n });\n }).sort(function (a, b) {\n return b.area - a.area;\n });\n var filteredAreas = sortedAreas.filter(function (_ref2) {\n var width = _ref2.width,\n height = _ref2.height;\n return width >= popper.clientWidth && height >= popper.clientHeight;\n });\n var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;\n var variation = placement.split('-')[1];\n return computedPlacement + (variation ? '-' + variation : '');\n}\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nfunction getReferenceOffsets(state, popper, reference) {\n var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n\n/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nfunction getOuterSizes(element) {\n var styles = getComputedStyle(element);\n var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);\n var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);\n var result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x\n };\n return result;\n}\n\n/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nfunction getOppositePlacement(placement) {\n var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n };\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nfunction getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n var popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n var popperOffsets = {\n width: popperRect.width,\n height: popperRect.height\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n var isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n var mainSide = isHoriz ? 'top' : 'left';\n var secondarySide = isHoriz ? 'left' : 'top';\n var measurement = isHoriz ? 'height' : 'width';\n var secondaryMeasurement = !isHoriz ? 'height' : 'width';\n popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];\n }\n return popperOffsets;\n}\n\n/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(function (cur) {\n return cur[prop] === value;\n });\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n var match = find(arr, function (obj) {\n return obj[prop] === value;\n });\n return arr.indexOf(match);\n}\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nfunction runModifiers(modifiers, data, ends) {\n var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n modifiersToRun.forEach(function (modifier) {\n if (modifier['function']) {\n // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n data = fn(data, modifier);\n }\n });\n return data;\n}\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.<br />\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nfunction update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n\n/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nfunction isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(function (_ref) {\n var name = _ref.name,\n enabled = _ref.enabled;\n return enabled && name === modifierName;\n });\n}\n\n/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nfunction getSupportedPropertyName(property) {\n var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n var upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n for (var i = 0; i < prefixes.length; i++) {\n var prefix = prefixes[i];\n var toCheck = prefix ? '' + prefix + upperProp : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n\n/**\n * Destroy the popper\n * @method\n * @memberof Popper\n */\nfunction destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n this.disableEventListeners();\n\n // remove the popper if user explicity asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n\n/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nfunction getWindow(element) {\n var ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n var isBody = scrollParent.nodeName === 'BODY';\n var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, {\n passive: true\n });\n if (!isBody) {\n attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nfunction enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger onUpdate callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nfunction disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n\n/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nfunction isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setStyles(element, styles) {\n Object.keys(styles).forEach(function (prop) {\n var unit = '';\n // add unit if the value is numeric and is one of the following\n if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n\n/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function (prop) {\n var value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nfunction applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nfunction applyStyleOnLoad(reference, popper, options, modifierOptions, state) {\n // compute reference element offsets\n var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, {\n position: options.positionFixed ? 'fixed' : 'absolute'\n });\n return options;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeStyle(data, options) {\n var x = options.x,\n y = options.y;\n var popper = data.offsets.popper;\n\n // Remove this legacy support in Popper.js v2\n\n var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'applyStyle';\n }).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');\n }\n var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;\n var offsetParent = getOffsetParent(data.instance.popper);\n var offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n var styles = {\n position: popper.position\n };\n\n // Avoid blurry text by using full pixel integers.\n // For pixel-perfect positioning, top/bottom prefers rounded\n // values, while left/right prefers floored values.\n var offsets = {\n left: Math.floor(popper.left),\n top: Math.round(popper.top),\n bottom: Math.round(popper.bottom),\n right: Math.floor(popper.right)\n };\n var sideA = x === 'bottom' ? 'top' : 'bottom';\n var sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n var prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n var left = void 0,\n top = void 0;\n if (sideA === 'bottom') {\n top = -offsetParentRect.height + offsets.bottom;\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n left = -offsetParentRect.width + offsets.right;\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n var invertTop = sideA === 'bottom' ? -1 : 1;\n var invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = sideA + ', ' + sideB;\n }\n\n // Attributes\n var attributes = {\n 'x-placement': data.placement\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = _extends({}, attributes, data.attributes);\n data.styles = _extends({}, styles, data.styles);\n data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);\n return data;\n}\n\n/**\n * Helper used to know if the given modifier depends from another one.<br />\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nfunction isModifierRequired(modifiers, requestingName, requestedName) {\n var requesting = find(modifiers, function (_ref) {\n var name = _ref.name;\n return name === requestingName;\n });\n var isRequired = !!requesting && modifiers.some(function (modifier) {\n return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;\n });\n if (!isRequired) {\n var _requesting = '`' + requestingName + '`';\n var requested = '`' + requestedName + '`';\n console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');\n }\n return isRequired;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction arrow(data, options) {\n var _data$offsets$arrow;\n\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n var arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn('WARNING: `arrow.element` must be child of its popper element!');\n return data;\n }\n }\n var placement = data.placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var isVertical = ['left', 'right'].indexOf(placement) !== -1;\n var len = isVertical ? 'height' : 'width';\n var sideCapitalized = isVertical ? 'Top' : 'Left';\n var side = sideCapitalized.toLowerCase();\n var altSide = isVertical ? 'left' : 'top';\n var opSide = isVertical ? 'bottom' : 'right';\n var arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjuction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n var css = getStyleComputedProperty(data.instance.popper);\n var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10);\n var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10);\n var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n data.arrowElement = arrowElement;\n data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);\n return data;\n}\n\n/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nfunction getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n\n/**\n * List of accepted placements to use as values of the `placement` option.<br />\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.<br />\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-right` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nvar placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];\n\n// Get rid of `auto` `auto-start` and `auto-end`\nvar validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nfunction clockwise(placement) {\n var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var index = validPlacements.indexOf(placement);\n var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\nvar BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise'\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);\n var placement = data.placement.split('-')[0];\n var placementOpposite = getOppositePlacement(placement);\n var variation = data.placement.split('-')[1] || '';\n var flipOrder = [];\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n flipOrder.forEach(function (step, index) {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n var popperOffsets = data.offsets.popper;\n var refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n var floor = Math.floor;\n var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);\n var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);\n var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;\n\n // flip the variation if required\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction keepTogether(data) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var placement = data.placement.split('-')[0];\n var floor = Math.floor;\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n var side = isVertical ? 'right' : 'bottom';\n var opSide = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n return data;\n}\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nfunction toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n var split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n var value = +split[1];\n var unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n if (unit.indexOf('%') === 0) {\n var element = void 0;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n var rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n var size = void 0;\n if (unit === 'vh') {\n size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n } else {\n size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nfunction parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {\n var offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n var fragments = offset.split(/(\\+|\\-)/).map(function (frag) {\n return frag.trim();\n });\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n var divider = fragments.indexOf(find(fragments, function (frag) {\n return frag.search(/,|\\s/) !== -1;\n }));\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n var splitRegex = /\\s*,\\s*|\\s+/;\n var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map(function (op, index) {\n // Most of the units rely on the orientation of the popper\n var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';\n var mergeWithPrevious = false;\n return op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce(function (a, b) {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(function (str) {\n return toValue(str, measurement, popperOffsets, referenceOffsets);\n });\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach(function (op, index) {\n op.forEach(function (frag, index2) {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nfunction offset(data, _ref) {\n var offset = _ref.offset;\n var placement = data.placement,\n _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var basePlacement = placement.split('-')[0];\n var offsets = void 0;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n data.popper = popper;\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction preventOverflow(data, options) {\n var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n var transformProp = getSupportedPropertyName('transform');\n var popperStyles = data.instance.popper.style; // assignment to help minification\n var top = popperStyles.top,\n left = popperStyles.left,\n transform = popperStyles[transformProp];\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n options.boundaries = boundaries;\n var order = options.priority;\n var popper = data.offsets.popper;\n var check = {\n primary: function primary(placement) {\n var value = popper[placement];\n if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return defineProperty({}, placement, value);\n },\n secondary: function secondary(placement) {\n var mainSide = placement === 'right' ? 'left' : 'top';\n var value = popper[mainSide];\n if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {\n value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));\n }\n return defineProperty({}, mainSide, value);\n }\n };\n order.forEach(function (placement) {\n var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = _extends({}, popper, check[side](placement));\n });\n data.offsets.popper = popper;\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction shift(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n var _data$offsets = data.offsets,\n reference = _data$offsets.reference,\n popper = _data$offsets.popper;\n var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n var side = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n var shiftOffsets = {\n start: defineProperty({}, side, reference[side]),\n end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])\n };\n data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);\n }\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n var refRect = data.offsets.reference;\n var bound = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'preventOverflow';\n }).boundaries;\n if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction inner(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n return data;\n}\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.<br />\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.<br />\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nvar modifiers = {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.<br />\n * It will read the variation of the `placement` property.<br />\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift\n },\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unitless, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.<br />\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the height.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.<br />\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.<br />\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > More on this [reading this issue](https://github.com/FezVrasta/popper.js/issues/373)\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0\n },\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * An scenario exists where the reference itself is not within the boundaries.<br />\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".<br />\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper this makes sure the popper has always a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier, can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent'\n },\n /**\n * Modifier used to make sure the reference and its popper stay near eachothers\n * without leaving any gap between the two. Expecially useful when the arrow is\n * enabled and you want to assure it to point to its reference element.\n * It cares only about the first axis, you can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether\n },\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjuction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]'\n },\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations).\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position,\n * the popper will never be placed outside of the defined boundaries\n * (except if keepTogether is enabled)\n */\n boundariesElement: 'viewport'\n },\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner\n },\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide\n },\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3d transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties.\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right'\n },\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define you own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3d transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties.\n */\n gpuAcceleration: undefined\n }\n};\n\n/**\n * The `dataObject` is an object containing all the informations used by Popper.js\n * this object get passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper.\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper, it expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow, it expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements.\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n\n/**\n * Default options provided to Popper.js constructor.<br />\n * These can be overriden using the `options` argument of Popper.js.<br />\n * To override an option, simply pass as 3rd argument an object with the same\n * structure of this object, example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nvar Defaults = {\n /**\n * Popper's placement\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n /**\n * Whether events (resize, scroll) are initially enabled\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n /**\n * Callback called when the popper is created.<br />\n * By default, is set to no-op.<br />\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: function onCreate() {},\n /**\n * Callback called when the popper is updated, this callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.<br />\n * By default, is set to no-op.<br />\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: function onUpdate() {},\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js\n * @prop {modifiers}\n */\n modifiers: modifiers\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n\n// Utils\n// Methods\nvar Popper = function () {\n /**\n * Create a new Popper.js instance\n * @class Popper\n * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper.\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n function Popper(reference, popper) {\n var _this = this;\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, Popper);\n this.scheduleUpdate = function () {\n return requestAnimationFrame(_this.update);\n };\n\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = _extends({}, Popper.Defaults, options);\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: []\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {\n _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers).map(function (name) {\n return _extends({\n name: name\n }, _this.options.modifiers[name]);\n })\n // sort the modifiers by order\n .sort(function (a, b) {\n return a.order - b.order;\n });\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(function (modifierOptions) {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n var eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n\n createClass(Popper, [{\n key: 'update',\n value: function update$$1() {\n return update.call(this);\n }\n }, {\n key: 'destroy',\n value: function destroy$$1() {\n return destroy.call(this);\n }\n }, {\n key: 'enableEventListeners',\n value: function enableEventListeners$$1() {\n return enableEventListeners.call(this);\n }\n }, {\n key: 'disableEventListeners',\n value: function disableEventListeners$$1() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedule an update, it will run on the next UI update available\n * @method scheduleUpdate\n * @memberof Popper\n */\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n }]);\n return Popper;\n}();\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.<br />\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n\nPopper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\nPopper.placements = placements;\nPopper.Defaults = Defaults;\nexport default Popper;","import jQuery from 'jquery';\nimport { Options, tokenize } from 'linkifyjs';\nvar HTML_NODE = 1,\n TXT_NODE = 3;\n/**\n * @param {HTMLElement} parent\n * @param {Text | HTMLElement | ChildNode} oldChild\n * @param {Array<Text | HTMLElement>} newChildren\n */\n\nfunction replaceChildWithChildren(parent, oldChild, newChildren) {\n var lastNewChild = newChildren[newChildren.length - 1];\n parent.replaceChild(lastNewChild, oldChild);\n for (var i = newChildren.length - 2; i >= 0; i--) {\n parent.insertBefore(newChildren[i], lastNewChild);\n lastNewChild = newChildren[i];\n }\n}\n/**\n * @param {import('linkifyjs').MultiToken[]} tokens\n * @param {import('linkifyjs').Options} options\n * @param {Document} doc Document implementation\n * @returns {Array<Text | HTMLElement>}\n */\n\nfunction tokensToNodes(tokens, options, doc) {\n var result = [];\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (token.t === 'nl' && options.get('nl2br')) {\n result.push(doc.createElement('br'));\n } else if (!token.isLink || !options.check(token)) {\n result.push(doc.createTextNode(token.toString()));\n } else {\n result.push(options.render(token));\n }\n }\n return result;\n}\n/**\n * Requires document.createElement\n * @param {HTMLElement | ChildNode} element\n * @param {import('linkifyjs').Options} options\n * @param {Document} doc\n * @returns {HTMLElement}\n */\n\nfunction linkifyElementHelper(element, options, doc) {\n // Can the element be linkified?\n if (!element || element.nodeType !== HTML_NODE) {\n throw new Error(\"Cannot linkify \" + element + \" - Invalid DOM Node type\");\n } // Is this element already a link?\n\n if (element.tagName === 'A' || options.ignoreTags.indexOf(element.tagName) >= 0) {\n // No need to linkify\n return element;\n }\n var childElement = element.firstChild;\n while (childElement) {\n var str = void 0,\n tokens = void 0,\n nodes = void 0;\n switch (childElement.nodeType) {\n case HTML_NODE:\n linkifyElementHelper(childElement, options, doc);\n break;\n case TXT_NODE:\n {\n str = childElement.nodeValue;\n tokens = tokenize(str);\n if (tokens.length === 0 || tokens.length === 1 && tokens[0].t === 'text') {\n // No node replacement required\n break;\n }\n nodes = tokensToNodes(tokens, options, doc); // Swap out the current child for the set of nodes\n\n replaceChildWithChildren(element, childElement, nodes); // so that the correct sibling is selected next\n\n childElement = nodes[nodes.length - 1];\n break;\n }\n }\n childElement = childElement.nextSibling;\n }\n return element;\n}\n/**\n * @param {Document} doc The document implementaiton\n */\n\nfunction getDefaultRender(doc) {\n return function (_ref) {\n var tagName = _ref.tagName,\n attributes = _ref.attributes,\n content = _ref.content,\n eventListeners = _ref.eventListeners;\n var link = doc.createElement(tagName);\n for (var attr in attributes) {\n link.setAttribute(attr, attributes[attr]);\n }\n if (eventListeners && link.addEventListener) {\n for (var event in eventListeners) {\n link.addEventListener(event, eventListeners[event]);\n }\n }\n link.appendChild(doc.createTextNode(content));\n return link;\n };\n}\n/**\n * Recursively traverse the given DOM node, find all links in the text and\n * convert them to anchor tags.\n *\n * @param {HTMLElement} element A DOM node to linkify\n * @param {import('linkifyjs').Opts} [opts] linkify options\n * @param {Document} [doc] (optional) window.document implementation, if differs from global\n * @returns {HTMLElement}\n */\n\nfunction linkifyElement(element, opts, doc) {\n if (opts === void 0) {\n opts = null;\n }\n if (doc === void 0) {\n doc = null;\n }\n try {\n doc = doc || document || window && window.document || global && global.document;\n } catch (e) {\n /* do nothing for now */\n }\n if (!doc) {\n throw new Error('Cannot find document implementation. ' + 'If you are in a non-browser environment like Node.js, ' + 'pass the document implementation as the third argument to linkifyElement.');\n }\n var options = new Options(opts, getDefaultRender(doc));\n return linkifyElementHelper(element, options, doc);\n} // Maintain reference to the recursive helper and option-normalization for use\n// in linkify-jquery\n\nlinkifyElement.helper = linkifyElementHelper;\nlinkifyElement.getDefaultRender = getDefaultRender;\n/**\n * @param {import('linkifyjs').Opts | import('linkifyjs').Options} opts\n * @param {Document} doc\n */\n\nlinkifyElement.normalize = function (opts, doc) {\n return new Options(opts, getDefaultRender(doc));\n};\n\n/**\n *\n * @param {any} $ the global jQuery object\n * @param {Document} [doc] (optional) browser document implementation\n * @returns\n */\n\nfunction apply($, doc) {\n if (doc === void 0) {\n doc = false;\n }\n $.fn = $.fn || {};\n if (typeof $.fn.linkify === 'function') {\n // Already applied\n return;\n }\n try {\n doc = doc || document || window && window.document || global && global.document;\n } catch (e) {\n /* do nothing for now */\n }\n if (!doc) {\n throw new Error('Cannot find document implementation. ' + 'If you are in a non-browser environment like Node.js, ' + 'pass the document implementation as the second argument to linkify-jquery');\n }\n function jqLinkify(opts) {\n var options = linkifyElement.normalize(opts, doc);\n return this.each(function () {\n linkifyElement.helper(this, options, doc);\n });\n }\n $.fn.linkify = jqLinkify;\n $(function () {\n $('[data-linkify]').each(function () {\n var $this = $(this);\n var data = $this.data();\n var target = data.linkify;\n var nl2br = data.linkifyNl2br;\n var opts = {\n nl2br: !!nl2br && nl2br !== 0 && nl2br !== 'false'\n };\n if ('linkifyAttributes' in data) {\n opts.attributes = data.linkifyAttributes;\n }\n if ('linkifyDefaultProtocol' in data) {\n opts.defaultProtocol = data.linkifyDefaultProtocol;\n }\n if ('linkifyEvents' in data) {\n opts.events = data.linkifyEvents;\n }\n if ('linkifyFormat' in data) {\n opts.format = data.linkifyFormat;\n }\n if ('linkifyFormatHref' in data) {\n opts.formatHref = data.linkifyFormatHref;\n }\n if ('linkifyTagname' in data) {\n opts.tagName = data.linkifyTagname;\n }\n if ('linkifyTarget' in data) {\n opts.target = data.linkifyTarget;\n }\n if ('linkifyRel' in data) {\n opts.rel = data.linkifyRel;\n }\n if ('linkifyValidate' in data) {\n opts.validate = data.linkifyValidate;\n }\n if ('linkifyIgnoreTags' in data) {\n opts.ignoreTags = data.linkifyIgnoreTags;\n }\n if ('linkifyClassName' in data) {\n opts.className = data.linkifyClassName;\n }\n var $target = target === 'this' ? $this : $this.find(target);\n $target.linkify(opts);\n });\n });\n} // Try applying to the globally-defined jQuery element, if possible\n\ntry {\n apply(jQuery);\n} catch (e) {\n /**/\n} // Try assigning linkifyElement to the browser scope\n\ntry {\n window.linkifyElement = linkifyElement;\n} catch (e) {\n /**/\n}\nexport { apply as default };","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/*global ActiveXObject, window, console, define, module, jQuery */\n//jshint unused:false, strict: false\n\n/*\n PDFObject v2.0.201604172\n https://github.com/pipwerks/PDFObject\n Copyright (c) 2008-2016 Philip Hutchison\n MIT-style license: http://pipwerks.mit-license.org/\n UMD module pattern from https://github.com/umdjs/umd/blob/master/templates/returnExports.js\n*/\n\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([], factory);\n } else if ((typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory();\n } else {\n // Browser globals (root is window)\n root.PDFObject = factory();\n }\n})(this, function () {\n \"use strict\";\n\n //jshint unused:true\n\n //PDFObject is designed for client-side (browsers), not server-side (node)\n //Will choke on undefined navigator and window vars when run on server\n //Return boolean false and exit function when running server-side\n if (typeof window === \"undefined\" || typeof navigator === \"undefined\") {\n return false;\n }\n var pdfobjectversion = \"2.0.201604172\",\n supportsPDFs,\n //declare functions\n createAXO,\n isIE,\n supportsPdfMimeType = typeof navigator.mimeTypes['application/pdf'] !== \"undefined\",\n supportsPdfActiveX,\n buildFragmentString,\n log,\n embedError,\n _embed,\n getTargetElement,\n generatePDFJSiframe,\n isIOS = function () {\n return /iphone|ipad|ipod/i.test(navigator.userAgent.toLowerCase());\n }(),\n generateEmbedElement;\n\n /* ----------------------------------------------------\n Supporting functions\n ---------------------------------------------------- */\n\n createAXO = function createAXO(type) {\n var ax;\n try {\n ax = new ActiveXObject(type);\n } catch (e) {\n ax = null; //ensure ax remains null\n }\n return ax;\n };\n\n //IE11 still uses ActiveX for Adobe Reader, but IE 11 doesn't expose\n //window.ActiveXObject the same way previous versions of IE did\n //window.ActiveXObject will evaluate to false in IE 11, but \"ActiveXObject\" in window evaluates to true\n //so check the first one for older IE, and the second for IE11\n //FWIW, MS Edge (replacing IE11) does not support ActiveX at all, both will evaluate false\n //Constructed as a method (not a prop) to avoid unneccesarry overhead -- will only be evaluated if needed\n isIE = function isIE() {\n return !!(window.ActiveXObject || \"ActiveXObject\" in window);\n };\n\n //If either ActiveX support for \"AcroPDF.PDF\" or \"PDF.PdfCtrl\" are found, return true\n //Constructed as a method (not a prop) to avoid unneccesarry overhead -- will only be evaluated if needed\n supportsPdfActiveX = function supportsPdfActiveX() {\n return !!(createAXO(\"AcroPDF.PDF\") || createAXO(\"PDF.PdfCtrl\"));\n };\n\n //Determines whether PDF support is available\n supportsPDFs = supportsPdfMimeType || isIE() && supportsPdfActiveX();\n\n //Create a fragment identifier for using PDF Open parameters when embedding PDF\n buildFragmentString = function buildFragmentString(pdfParams) {\n var string = \"\",\n prop;\n if (pdfParams) {\n for (prop in pdfParams) {\n if (pdfParams.hasOwnProperty(prop)) {\n string += encodeURIComponent(prop) + \"=\" + encodeURIComponent(pdfParams[prop]) + \"&\";\n }\n }\n\n //The string will be empty if no PDF Params found\n if (string) {\n string = \"#\" + string;\n\n //Remove last ampersand\n string = string.slice(0, string.length - 1);\n }\n }\n return string;\n };\n log = function log(msg) {\n if (typeof console !== \"undefined\" && console.log) {\n console.log(\"[PDFObject] \" + msg);\n }\n };\n embedError = function embedError(msg) {\n log(msg);\n return false;\n };\n getTargetElement = function getTargetElement(targetSelector) {\n //Default to body for full-browser PDF\n var targetNode = document.body;\n\n //If a targetSelector is specified, check to see whether\n //it's passing a selector, jQuery object, or an HTML element\n\n if (typeof targetSelector === \"string\") {\n //Is CSS selector\n targetNode = document.querySelector(targetSelector);\n } else if (typeof jQuery !== \"undefined\" && targetSelector instanceof jQuery && targetSelector.length) {\n //Is jQuery element. Extract HTML node\n targetNode = targetSelector.get(0);\n } else if (typeof targetSelector.nodeType !== \"undefined\" && targetSelector.nodeType === 1) {\n //Is HTML element\n targetNode = targetSelector;\n }\n return targetNode;\n };\n generatePDFJSiframe = function generatePDFJSiframe(targetNode, url, pdfOpenFragment, PDFJS_URL, id) {\n var fullURL = PDFJS_URL + \"?file=\" + encodeURIComponent(url) + pdfOpenFragment;\n var scrollfix = isIOS ? \"-webkit-overflow-scrolling: touch; overflow-y: scroll; \" : \"overflow: hidden; \";\n var iframe = \"<div style='\" + scrollfix + \"position: absolute; top: 0; right: 0; bottom: 0; left: 0;'><iframe \" + id + \" src='\" + fullURL + \"' style='border: none; width: 100%; height: 100%;' frameborder='0'></iframe></div>\";\n targetNode.className += \" pdfobject-container\";\n targetNode.style.position = \"relative\";\n targetNode.style.overflow = \"auto\";\n targetNode.innerHTML = iframe;\n return targetNode.getElementsByTagName(\"iframe\")[0];\n };\n generateEmbedElement = function generateEmbedElement(targetNode, targetSelector, url, pdfOpenFragment, width, height, id) {\n var style = \"\";\n if (targetSelector && targetSelector !== document.body) {\n style = \"width: \" + width + \"; height: \" + height + \";\";\n } else {\n style = \"position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%;\";\n }\n targetNode.className += \" pdfobject-container\";\n targetNode.innerHTML = \"<embed \" + id + \" class='pdfobject' src='\" + url + pdfOpenFragment + \"' type='application/pdf' style='overflow: auto; \" + style + \"'/>\";\n return targetNode.getElementsByTagName(\"embed\")[0];\n };\n _embed = function embed(url, targetSelector, options) {\n //Ensure URL is available. If not, exit now.\n if (typeof url !== \"string\") {\n return embedError(\"URL is not valid\");\n }\n\n //If targetSelector is not defined, convert to boolean\n targetSelector = typeof targetSelector !== \"undefined\" ? targetSelector : false;\n\n //Ensure options object is not undefined -- enables easier error checking below\n options = typeof options !== \"undefined\" ? options : {};\n\n //Get passed options, or set reasonable defaults\n var id = options.id && typeof options.id === \"string\" ? \"id='\" + options.id + \"'\" : \"\",\n page = options.page ? options.page : false,\n pdfOpenParams = options.pdfOpenParams ? options.pdfOpenParams : {},\n fallbackLink = typeof options.fallbackLink !== \"undefined\" ? options.fallbackLink : true,\n width = options.width ? options.width : \"100%\",\n height = options.height ? options.height : \"100%\",\n forcePDFJS = typeof options.forcePDFJS === \"boolean\" ? options.forcePDFJS : false,\n PDFJS_URL = options.PDFJS_URL ? options.PDFJS_URL : false,\n targetNode = getTargetElement(targetSelector),\n fallbackHTML = \"\",\n pdfOpenFragment = \"\",\n fallbackHTML_default = \"<p>This browser does not support inline PDFs. Please download the PDF to view it: <a href='[url]'>Download PDF</a></p>\";\n\n //If target element is specified but is not valid, exit without doing anything\n if (!targetNode) {\n return embedError(\"Target element cannot be determined\");\n }\n\n //page option overrides pdfOpenParams, if found\n if (page) {\n pdfOpenParams.page = page;\n }\n\n //Stringify optional Adobe params for opening document (as fragment identifier)\n pdfOpenFragment = buildFragmentString(pdfOpenParams);\n\n //Do the dance\n if (forcePDFJS && PDFJS_URL) {\n return generatePDFJSiframe(targetNode, url, pdfOpenFragment, PDFJS_URL, id);\n } else if (supportsPDFs) {\n return generateEmbedElement(targetNode, targetSelector, url, pdfOpenFragment, width, height, id);\n } else {\n if (PDFJS_URL) {\n return generatePDFJSiframe(targetNode, url, pdfOpenFragment, PDFJS_URL, id);\n } else if (fallbackLink) {\n fallbackHTML = typeof fallbackLink === \"string\" ? fallbackLink : fallbackHTML_default;\n targetNode.innerHTML = fallbackHTML.replace(/\\[url\\]/g, url);\n }\n return embedError(\"This browser does not support embedded PDFs\");\n }\n };\n return {\n embed: function embed(a, b, c) {\n return _embed(a, b, c);\n },\n pdfobjectversion: function () {\n return pdfobjectversion;\n }(),\n supportsPDFs: function () {\n return supportsPDFs;\n }()\n };\n});","function _typeof2(o) { \"@babel/helpers - typeof\"; return _typeof2 = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof2(o); }\n/*!\n* sweetalert2 v7.26.28\n* Released under the MIT License.\n*/\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof2(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.Sweetalert2 = factory();\n})(this, function () {\n 'use strict';\n\n function _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n return _typeof(obj);\n }\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n }\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n }\n function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n }\n function isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n }\n function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n return _construct.apply(null, arguments);\n }\n function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n }\n function _possibleConstructorReturn(self, call) {\n if (call && (_typeof2(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return _assertThisInitialized(self);\n }\n function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n return object;\n }\n function _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n if (desc.get) {\n return desc.get.call(receiver);\n }\n return desc.value;\n };\n }\n return _get(target, property, receiver || target);\n }\n var consolePrefix = 'SweetAlert2:';\n /**\n * Filter the unique values into a new array\n * @param arr\n */\n\n var uniqueArray = function uniqueArray(arr) {\n var result = [];\n for (var i = 0; i < arr.length; i++) {\n if (result.indexOf(arr[i]) === -1) {\n result.push(arr[i]);\n }\n }\n return result;\n };\n /**\n * Convert NodeList to Array\n * @param nodeList\n */\n\n var toArray = function toArray(nodeList) {\n return Array.prototype.slice.call(nodeList);\n };\n /**\n * Converts `inputOptions` into an array of `[value, label]`s\n * @param inputOptions\n */\n\n var formatInputOptions = function formatInputOptions(inputOptions) {\n var result = [];\n if (typeof Map !== 'undefined' && inputOptions instanceof Map) {\n inputOptions.forEach(function (value, key) {\n result.push([key, value]);\n });\n } else {\n Object.keys(inputOptions).forEach(function (key) {\n result.push([key, inputOptions[key]]);\n });\n }\n return result;\n };\n /**\n * Standardise console warnings\n * @param message\n */\n\n var warn = function warn(message) {\n console.warn(\"\".concat(consolePrefix, \" \").concat(message));\n };\n /**\n * Standardise console errors\n * @param message\n */\n\n var error = function error(message) {\n console.error(\"\".concat(consolePrefix, \" \").concat(message));\n };\n /**\n * Private global state for `warnOnce`\n * @type {Array}\n * @private\n */\n\n var previousWarnOnceMessages = [];\n /**\n * Show a console warning, but only if it hasn't already been shown\n * @param message\n */\n\n var warnOnce = function warnOnce(message) {\n if (!(previousWarnOnceMessages.indexOf(message) !== -1)) {\n previousWarnOnceMessages.push(message);\n warn(message);\n }\n };\n /**\n * If `arg` is a function, call it (with no arguments or context) and return the result.\n * Otherwise, just pass the value through\n * @param arg\n */\n\n var callIfFunction = function callIfFunction(arg) {\n return typeof arg === 'function' ? arg() : arg;\n };\n var isThenable = function isThenable(arg) {\n return _typeof(arg) === 'object' && typeof arg.then === 'function';\n };\n var DismissReason = Object.freeze({\n cancel: 'cancel',\n backdrop: 'overlay',\n close: 'close',\n esc: 'esc',\n timer: 'timer'\n });\n var version = \"7.26.28\";\n var argsToParams = function argsToParams(args) {\n var params = {};\n switch (_typeof(args[0])) {\n case 'object':\n _extends(params, args[0]);\n break;\n default:\n ['title', 'html', 'type'].forEach(function (name, index) {\n switch (_typeof(args[index])) {\n case 'string':\n params[name] = args[index];\n break;\n case 'undefined':\n break;\n default:\n error(\"Unexpected type of \".concat(name, \"! Expected \\\"string\\\", got \").concat(_typeof(args[index])));\n }\n });\n }\n return params;\n };\n\n /**\n * Adapt a legacy inputValidator for use with expectRejections=false\n */\n var adaptInputValidator = function adaptInputValidator(legacyValidator) {\n return function adaptedInputValidator(inputValue, extraParams) {\n return legacyValidator.call(this, inputValue, extraParams).then(function () {\n return undefined;\n }, function (validationError) {\n return validationError;\n });\n };\n };\n var swalPrefix = 'swal2-';\n var prefix = function prefix(items) {\n var result = {};\n for (var i in items) {\n result[items[i]] = swalPrefix + items[i];\n }\n return result;\n };\n var swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'toast', 'toast-shown', 'toast-column', 'fade', 'show', 'hide', 'noanimation', 'close', 'title', 'header', 'content', 'actions', 'confirm', 'cancel', 'footer', 'icon', 'icon-text', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'validationerror', 'progresssteps', 'activeprogressstep', 'progresscircle', 'progressline', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen']);\n var iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);\n var states = {\n previousBodyPadding: null\n };\n var hasClass = function hasClass(elem, className) {\n return elem.classList.contains(className);\n };\n var focusInput = function focusInput(input) {\n input.focus(); // place cursor at end of text in text input\n\n if (input.type !== 'file') {\n // http://stackoverflow.com/a/2345915/1331425\n var val = input.value;\n input.value = '';\n input.value = val;\n }\n };\n var addOrRemoveClass = function addOrRemoveClass(target, classList, add) {\n if (!target || !classList) {\n return;\n }\n if (typeof classList === 'string') {\n classList = classList.split(/\\s+/).filter(Boolean);\n }\n classList.forEach(function (className) {\n if (target.forEach) {\n target.forEach(function (elem) {\n add ? elem.classList.add(className) : elem.classList.remove(className);\n });\n } else {\n add ? target.classList.add(className) : target.classList.remove(className);\n }\n });\n };\n var addClass = function addClass(target, classList) {\n addOrRemoveClass(target, classList, true);\n };\n var removeClass = function removeClass(target, classList) {\n addOrRemoveClass(target, classList, false);\n };\n var getChildByClass = function getChildByClass(elem, className) {\n for (var i = 0; i < elem.childNodes.length; i++) {\n if (hasClass(elem.childNodes[i], className)) {\n return elem.childNodes[i];\n }\n }\n };\n var show = function show(elem) {\n elem.style.opacity = '';\n elem.style.display = elem.id === swalClasses.content ? 'block' : 'flex';\n };\n var hide = function hide(elem) {\n elem.style.opacity = '';\n elem.style.display = 'none';\n }; // borrowed from jquery $(elem).is(':visible') implementation\n\n var isVisible = function isVisible(elem) {\n return elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);\n };\n var removeStyleProperty = function removeStyleProperty(elem, property) {\n if (elem.style.removeProperty) {\n elem.style.removeProperty(property);\n } else {\n elem.style.removeAttribute(property);\n }\n };\n var getContainer = function getContainer() {\n return document.body.querySelector('.' + swalClasses.container);\n };\n var elementByClass = function elementByClass(className) {\n var container = getContainer();\n return container ? container.querySelector('.' + className) : null;\n };\n var getPopup = function getPopup() {\n return elementByClass(swalClasses.popup);\n };\n var getIcons = function getIcons() {\n var popup = getPopup();\n return toArray(popup.querySelectorAll('.' + swalClasses.icon));\n };\n var getTitle = function getTitle() {\n return elementByClass(swalClasses.title);\n };\n var getContent = function getContent() {\n return elementByClass(swalClasses.content);\n };\n var getImage = function getImage() {\n return elementByClass(swalClasses.image);\n };\n var getProgressSteps = function getProgressSteps() {\n return elementByClass(swalClasses.progresssteps);\n };\n var getValidationError = function getValidationError() {\n return elementByClass(swalClasses.validationerror);\n };\n var getConfirmButton = function getConfirmButton() {\n return elementByClass(swalClasses.confirm);\n };\n var getCancelButton = function getCancelButton() {\n return elementByClass(swalClasses.cancel);\n };\n /* @deprecated */\n\n /* istanbul ignore next */\n\n var getButtonsWrapper = function getButtonsWrapper() {\n warnOnce(\"swal.getButtonsWrapper() is deprecated and will be removed in the next major release, use swal.getActions() instead\");\n return elementByClass(swalClasses.actions);\n };\n var getActions = function getActions() {\n return elementByClass(swalClasses.actions);\n };\n var getFooter = function getFooter() {\n return elementByClass(swalClasses.footer);\n };\n var getCloseButton = function getCloseButton() {\n return elementByClass(swalClasses.close);\n };\n var getFocusableElements = function getFocusableElements() {\n var focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex=\"-1\"]):not([tabindex=\"0\"])')) // sort according to tabindex\n .sort(function (a, b) {\n a = parseInt(a.getAttribute('tabindex'));\n b = parseInt(b.getAttribute('tabindex'));\n if (a > b) {\n return 1;\n } else if (a < b) {\n return -1;\n }\n return 0;\n }); // https://github.com/jkup/focusable/blob/master/index.js\n\n var otherFocusableElements = toArray(getPopup().querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex=\"0\"], [contenteditable], audio[controls], video[controls]')).filter(function (el) {\n return el.getAttribute('tabindex') !== '-1';\n });\n return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(function (el) {\n return isVisible(el);\n });\n };\n var isModal = function isModal() {\n return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']);\n };\n var isToast = function isToast() {\n return document.body.classList.contains(swalClasses['toast-shown']);\n };\n var isLoading = function isLoading() {\n return getPopup().hasAttribute('data-loading');\n };\n\n // Detect Node env\n var isNodeEnv = function isNodeEnv() {\n return typeof window === 'undefined' || typeof document === 'undefined';\n };\n var sweetHTML = \"\\n <div aria-labelledby=\\\"\".concat(swalClasses.title, \"\\\" aria-describedby=\\\"\").concat(swalClasses.content, \"\\\" class=\\\"\").concat(swalClasses.popup, \"\\\" tabindex=\\\"-1\\\">\\n <div class=\\\"\").concat(swalClasses.header, \"\\\">\\n <ul class=\\\"\").concat(swalClasses.progresssteps, \"\\\"></ul>\\n <div class=\\\"\").concat(swalClasses.icon, \" \").concat(iconTypes.error, \"\\\">\\n <span class=\\\"swal2-x-mark\\\"><span class=\\\"swal2-x-mark-line-left\\\"></span><span class=\\\"swal2-x-mark-line-right\\\"></span></span>\\n </div>\\n <div class=\\\"\").concat(swalClasses.icon, \" \").concat(iconTypes.question, \"\\\">\\n <span class=\\\"\").concat(swalClasses['icon-text'], \"\\\">?</span>\\n </div>\\n <div class=\\\"\").concat(swalClasses.icon, \" \").concat(iconTypes.warning, \"\\\">\\n <span class=\\\"\").concat(swalClasses['icon-text'], \"\\\">!</span>\\n </div>\\n <div class=\\\"\").concat(swalClasses.icon, \" \").concat(iconTypes.info, \"\\\">\\n <span class=\\\"\").concat(swalClasses['icon-text'], \"\\\">i</span>\\n </div>\\n <div class=\\\"\").concat(swalClasses.icon, \" \").concat(iconTypes.success, \"\\\">\\n <div class=\\\"swal2-success-circular-line-left\\\"></div>\\n <span class=\\\"swal2-success-line-tip\\\"></span> <span class=\\\"swal2-success-line-long\\\"></span>\\n <div class=\\\"swal2-success-ring\\\"></div> <div class=\\\"swal2-success-fix\\\"></div>\\n <div class=\\\"swal2-success-circular-line-right\\\"></div>\\n </div>\\n <img class=\\\"\").concat(swalClasses.image, \"\\\" />\\n <h2 class=\\\"\").concat(swalClasses.title, \"\\\" id=\\\"\").concat(swalClasses.title, \"\\\"></h2>\\n <button type=\\\"button\\\" class=\\\"\").concat(swalClasses.close, \"\\\">\\xD7</button>\\n </div>\\n <div class=\\\"\").concat(swalClasses.content, \"\\\">\\n <div id=\\\"\").concat(swalClasses.content, \"\\\"></div>\\n <input class=\\\"\").concat(swalClasses.input, \"\\\" />\\n <input type=\\\"file\\\" class=\\\"\").concat(swalClasses.file, \"\\\" />\\n <div class=\\\"\").concat(swalClasses.range, \"\\\">\\n <input type=\\\"range\\\" />\\n <output></output>\\n </div>\\n <select class=\\\"\").concat(swalClasses.select, \"\\\"></select>\\n <div class=\\\"\").concat(swalClasses.radio, \"\\\"></div>\\n <label for=\\\"\").concat(swalClasses.checkbox, \"\\\" class=\\\"\").concat(swalClasses.checkbox, \"\\\">\\n <input type=\\\"checkbox\\\" />\\n <span class=\\\"\").concat(swalClasses.label, \"\\\"></span>\\n </label>\\n <textarea class=\\\"\").concat(swalClasses.textarea, \"\\\"></textarea>\\n <div class=\\\"\").concat(swalClasses.validationerror, \"\\\" id=\\\"\").concat(swalClasses.validationerror, \"\\\"></div>\\n </div>\\n <div class=\\\"\").concat(swalClasses.actions, \"\\\">\\n <button type=\\\"button\\\" class=\\\"\").concat(swalClasses.confirm, \"\\\">OK</button>\\n <button type=\\\"button\\\" class=\\\"\").concat(swalClasses.cancel, \"\\\">Cancel</button>\\n </div>\\n <div class=\\\"\").concat(swalClasses.footer, \"\\\">\\n </div>\\n </div>\\n\").replace(/(^|\\n)\\s*/g, '');\n /*\n * Add modal + backdrop to DOM\n */\n\n var init = function init(params) {\n // Clean up the old popup if it exists\n var c = getContainer();\n if (c) {\n c.parentNode.removeChild(c);\n removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]);\n }\n if (isNodeEnv()) {\n error('SweetAlert2 requires document to initialize');\n return;\n }\n var container = document.createElement('div');\n container.className = swalClasses.container;\n container.innerHTML = sweetHTML;\n var targetElement = typeof params.target === 'string' ? document.querySelector(params.target) : params.target;\n targetElement.appendChild(container);\n var popup = getPopup();\n var content = getContent();\n var input = getChildByClass(content, swalClasses.input);\n var file = getChildByClass(content, swalClasses.file);\n var range = content.querySelector(\".\".concat(swalClasses.range, \" input\"));\n var rangeOutput = content.querySelector(\".\".concat(swalClasses.range, \" output\"));\n var select = getChildByClass(content, swalClasses.select);\n var checkbox = content.querySelector(\".\".concat(swalClasses.checkbox, \" input\"));\n var textarea = getChildByClass(content, swalClasses.textarea); // a11y\n\n popup.setAttribute('role', params.toast ? 'alert' : 'dialog');\n popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive');\n if (!params.toast) {\n popup.setAttribute('aria-modal', 'true');\n }\n var oldInputVal; // IE11 workaround, see #1109 for details\n\n var resetValidationError = function resetValidationError(e) {\n if (Swal.isVisible() && oldInputVal !== e.target.value) {\n Swal.resetValidationError();\n }\n oldInputVal = e.target.value;\n };\n input.oninput = resetValidationError;\n file.onchange = resetValidationError;\n select.onchange = resetValidationError;\n checkbox.onchange = resetValidationError;\n textarea.oninput = resetValidationError;\n range.oninput = function (e) {\n resetValidationError(e);\n rangeOutput.value = range.value;\n };\n range.onchange = function (e) {\n resetValidationError(e);\n range.nextSibling.value = range.value;\n };\n return popup;\n };\n var parseHtmlToContainer = function parseHtmlToContainer(param, target) {\n if (!param) {\n return hide(target);\n }\n if (_typeof(param) === 'object') {\n target.innerHTML = '';\n if (0 in param) {\n for (var i = 0; (i in param); i++) {\n target.appendChild(param[i].cloneNode(true));\n }\n } else {\n target.appendChild(param.cloneNode(true));\n }\n } else if (param) {\n target.innerHTML = param;\n }\n show(target);\n };\n var animationEndEvent = function () {\n // Prevent run in Node env\n if (isNodeEnv()) {\n return false;\n }\n var testEl = document.createElement('div');\n var transEndEventNames = {\n 'WebkitAnimation': 'webkitAnimationEnd',\n 'OAnimation': 'oAnimationEnd oanimationend',\n 'animation': 'animationend'\n };\n for (var i in transEndEventNames) {\n if (transEndEventNames.hasOwnProperty(i) && typeof testEl.style[i] !== 'undefined') {\n return transEndEventNames[i];\n }\n }\n return false;\n }();\n\n // Measure width of scrollbar\n // https://github.com/twbs/bootstrap/blob/master/js/modal.js#L279-L286\n var measureScrollbar = function measureScrollbar() {\n var supportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;\n if (supportsTouch) {\n return 0;\n }\n var scrollDiv = document.createElement('div');\n scrollDiv.style.width = '50px';\n scrollDiv.style.height = '50px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarWidth;\n };\n var renderActions = function renderActions(params) {\n var actions = getActions();\n var confirmButton = getConfirmButton();\n var cancelButton = getCancelButton(); // Actions (buttons) wrapper\n\n if (!params.showConfirmButton && !params.showCancelButton) {\n hide(actions);\n } else {\n show(actions);\n } // Cancel button\n\n if (params.showCancelButton) {\n cancelButton.style.display = 'inline-block';\n } else {\n hide(cancelButton);\n } // Confirm button\n\n if (params.showConfirmButton) {\n removeStyleProperty(confirmButton, 'display');\n } else {\n hide(confirmButton);\n } // Edit text on confirm and cancel buttons\n\n confirmButton.innerHTML = params.confirmButtonText;\n cancelButton.innerHTML = params.cancelButtonText; // ARIA labels for confirm and cancel buttons\n\n confirmButton.setAttribute('aria-label', params.confirmButtonAriaLabel);\n cancelButton.setAttribute('aria-label', params.cancelButtonAriaLabel); // Add buttons custom classes\n\n confirmButton.className = swalClasses.confirm;\n addClass(confirmButton, params.confirmButtonClass);\n cancelButton.className = swalClasses.cancel;\n addClass(cancelButton, params.cancelButtonClass); // Buttons styling\n\n if (params.buttonsStyling) {\n addClass([confirmButton, cancelButton], swalClasses.styled); // Buttons background colors\n\n if (params.confirmButtonColor) {\n confirmButton.style.backgroundColor = params.confirmButtonColor;\n }\n if (params.cancelButtonColor) {\n cancelButton.style.backgroundColor = params.cancelButtonColor;\n } // Loading state\n\n var confirmButtonBackgroundColor = window.getComputedStyle(confirmButton).getPropertyValue('background-color');\n confirmButton.style.borderLeftColor = confirmButtonBackgroundColor;\n confirmButton.style.borderRightColor = confirmButtonBackgroundColor;\n } else {\n removeClass([confirmButton, cancelButton], swalClasses.styled);\n confirmButton.style.backgroundColor = confirmButton.style.borderLeftColor = confirmButton.style.borderRightColor = '';\n cancelButton.style.backgroundColor = cancelButton.style.borderLeftColor = cancelButton.style.borderRightColor = '';\n }\n };\n var renderContent = function renderContent(params) {\n var content = getContent().querySelector('#' + swalClasses.content); // Content as HTML\n\n if (params.html) {\n parseHtmlToContainer(params.html, content); // Content as plain text\n } else if (params.text) {\n content.textContent = params.text;\n show(content);\n } else {\n hide(content);\n }\n };\n var renderIcon = function renderIcon(params) {\n var icons = getIcons();\n for (var i = 0; i < icons.length; i++) {\n hide(icons[i]);\n }\n if (params.type) {\n if (Object.keys(iconTypes).indexOf(params.type) !== -1) {\n var icon = Swal.getPopup().querySelector(\".\".concat(swalClasses.icon, \".\").concat(iconTypes[params.type]));\n show(icon); // Animate icon\n\n if (params.animation) {\n addClass(icon, \"swal2-animate-\".concat(params.type, \"-icon\"));\n }\n } else {\n error(\"Unknown type! Expected \\\"success\\\", \\\"error\\\", \\\"warning\\\", \\\"info\\\" or \\\"question\\\", got \\\"\".concat(params.type, \"\\\"\"));\n }\n }\n };\n var renderImage = function renderImage(params) {\n var image = getImage();\n if (params.imageUrl) {\n image.setAttribute('src', params.imageUrl);\n image.setAttribute('alt', params.imageAlt);\n show(image);\n if (params.imageWidth) {\n image.setAttribute('width', params.imageWidth);\n } else {\n image.removeAttribute('width');\n }\n if (params.imageHeight) {\n image.setAttribute('height', params.imageHeight);\n } else {\n image.removeAttribute('height');\n }\n image.className = swalClasses.image;\n if (params.imageClass) {\n addClass(image, params.imageClass);\n }\n } else {\n hide(image);\n }\n };\n var renderProgressSteps = function renderProgressSteps(params) {\n var progressStepsContainer = getProgressSteps();\n var currentProgressStep = parseInt(params.currentProgressStep === null ? Swal.getQueueStep() : params.currentProgressStep, 10);\n if (params.progressSteps && params.progressSteps.length) {\n show(progressStepsContainer);\n progressStepsContainer.innerHTML = '';\n if (currentProgressStep >= params.progressSteps.length) {\n warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)');\n }\n params.progressSteps.forEach(function (step, index) {\n var circle = document.createElement('li');\n addClass(circle, swalClasses.progresscircle);\n circle.innerHTML = step;\n if (index === currentProgressStep) {\n addClass(circle, swalClasses.activeprogressstep);\n }\n progressStepsContainer.appendChild(circle);\n if (index !== params.progressSteps.length - 1) {\n var line = document.createElement('li');\n addClass(line, swalClasses.progressline);\n if (params.progressStepsDistance) {\n line.style.width = params.progressStepsDistance;\n }\n progressStepsContainer.appendChild(line);\n }\n });\n } else {\n hide(progressStepsContainer);\n }\n };\n var renderTitle = function renderTitle(params) {\n var title = getTitle();\n if (params.titleText) {\n title.innerText = params.titleText;\n } else if (params.title) {\n if (typeof params.title === 'string') {\n params.title = params.title.split('\\n').join('<br />');\n }\n parseHtmlToContainer(params.title, title);\n }\n };\n var fixScrollbar = function fixScrollbar() {\n // for queues, do not do this more than once\n if (states.previousBodyPadding !== null) {\n return;\n } // if the body has overflow\n\n if (document.body.scrollHeight > window.innerHeight) {\n // add padding so the content doesn't shift after removal of scrollbar\n states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'));\n document.body.style.paddingRight = states.previousBodyPadding + measureScrollbar() + 'px';\n }\n };\n var undoScrollbar = function undoScrollbar() {\n if (states.previousBodyPadding !== null) {\n document.body.style.paddingRight = states.previousBodyPadding;\n states.previousBodyPadding = null;\n }\n };\n\n /* istanbul ignore next */\n\n var iOSfix = function iOSfix() {\n var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\n if (iOS && !hasClass(document.body, swalClasses.iosfix)) {\n var offset = document.body.scrollTop;\n document.body.style.top = offset * -1 + 'px';\n addClass(document.body, swalClasses.iosfix);\n }\n };\n /* istanbul ignore next */\n\n var undoIOSfix = function undoIOSfix() {\n if (hasClass(document.body, swalClasses.iosfix)) {\n var offset = parseInt(document.body.style.top, 10);\n removeClass(document.body, swalClasses.iosfix);\n document.body.style.top = '';\n document.body.scrollTop = offset * -1;\n }\n };\n\n // Adding aria-hidden=\"true\" to elements outside of the active modal dialog ensures that\n // elements not within the active modal dialog will not be surfaced if a user opens a screen\n // reader’s list of elements (headings, form controls, landmarks, etc.) in the document.\n\n var setAriaHidden = function setAriaHidden() {\n var bodyChildren = toArray(document.body.children);\n bodyChildren.forEach(function (el) {\n if (el === getContainer() || el.contains(getContainer())) {\n return;\n }\n if (el.hasAttribute('aria-hidden')) {\n el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden'));\n }\n el.setAttribute('aria-hidden', 'true');\n });\n };\n var unsetAriaHidden = function unsetAriaHidden() {\n var bodyChildren = toArray(document.body.children);\n bodyChildren.forEach(function (el) {\n if (el.hasAttribute('data-previous-aria-hidden')) {\n el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden'));\n el.removeAttribute('data-previous-aria-hidden');\n } else {\n el.removeAttribute('aria-hidden');\n }\n });\n };\n var RESTORE_FOCUS_TIMEOUT = 100;\n var globalState = {};\n var restoreActiveElement = function restoreActiveElement() {\n var x = window.scrollX;\n var y = window.scrollY;\n globalState.restoreFocusTimeout = setTimeout(function () {\n if (globalState.previousActiveElement && globalState.previousActiveElement.focus) {\n globalState.previousActiveElement.focus();\n globalState.previousActiveElement = null;\n } else if (document.body) {\n document.body.focus();\n }\n }, RESTORE_FOCUS_TIMEOUT); // issues/900\n\n if (typeof x !== 'undefined' && typeof y !== 'undefined') {\n // IE doesn't have scrollX/scrollY support\n window.scrollTo(x, y);\n }\n };\n\n /*\n * Global function to close sweetAlert\n */\n\n var close = function close(onClose, onAfterClose) {\n var container = getContainer();\n var popup = getPopup();\n if (!popup) {\n return;\n }\n if (onClose !== null && typeof onClose === 'function') {\n onClose(popup);\n }\n removeClass(popup, swalClasses.show);\n addClass(popup, swalClasses.hide);\n var removePopupAndResetState = function removePopupAndResetState() {\n if (!isToast()) {\n restoreActiveElement();\n globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {\n capture: globalState.keydownListenerCapture\n });\n globalState.keydownHandlerAdded = false;\n }\n if (container.parentNode) {\n container.parentNode.removeChild(container);\n }\n removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['toast-column']]);\n if (isModal()) {\n undoScrollbar();\n undoIOSfix();\n unsetAriaHidden();\n }\n if (onAfterClose !== null && typeof onAfterClose === 'function') {\n setTimeout(function () {\n onAfterClose();\n });\n }\n }; // If animation is supported, animate\n\n if (animationEndEvent && !hasClass(popup, swalClasses.noanimation)) {\n popup.addEventListener(animationEndEvent, function swalCloseEventFinished() {\n popup.removeEventListener(animationEndEvent, swalCloseEventFinished);\n if (hasClass(popup, swalClasses.hide)) {\n removePopupAndResetState();\n }\n });\n } else {\n // Otherwise, remove immediately\n removePopupAndResetState();\n }\n };\n\n /*\n * Global function to determine if swal2 popup is shown\n */\n\n var isVisible$1 = function isVisible() {\n return !!getPopup();\n };\n /*\n * Global function to click 'Confirm' button\n */\n\n var clickConfirm = function clickConfirm() {\n return getConfirmButton().click();\n };\n /*\n * Global function to click 'Cancel' button\n */\n\n var clickCancel = function clickCancel() {\n return getCancelButton().click();\n };\n function fire() {\n var Swal = this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _construct(Swal, args);\n }\n\n /**\n * Extends a Swal class making it able to be instantiated without the `new` keyword (and thus without `Swal.fire`)\n * @param ParentSwal\n * @returns {NoNewKeywordSwal}\n */\n function withNoNewKeyword(ParentSwal) {\n var NoNewKeywordSwal = function NoNewKeywordSwal() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (!(this instanceof NoNewKeywordSwal)) {\n return _construct(NoNewKeywordSwal, args);\n }\n Object.getPrototypeOf(NoNewKeywordSwal).apply(this, args);\n };\n NoNewKeywordSwal.prototype = _extends(Object.create(ParentSwal.prototype), {\n constructor: NoNewKeywordSwal\n });\n if (typeof Object.setPrototypeOf === 'function') {\n Object.setPrototypeOf(NoNewKeywordSwal, ParentSwal);\n } else {\n // Android 4.4\n // eslint-disable-next-line\n NoNewKeywordSwal.__proto__ = ParentSwal;\n }\n return NoNewKeywordSwal;\n }\n var defaultParams = {\n title: '',\n titleText: '',\n text: '',\n html: '',\n footer: '',\n type: null,\n toast: false,\n customClass: '',\n target: 'body',\n backdrop: true,\n animation: true,\n heightAuto: true,\n allowOutsideClick: true,\n allowEscapeKey: true,\n allowEnterKey: true,\n stopKeydownPropagation: true,\n keydownListenerCapture: false,\n showConfirmButton: true,\n showCancelButton: false,\n preConfirm: null,\n confirmButtonText: 'OK',\n confirmButtonAriaLabel: '',\n confirmButtonColor: null,\n confirmButtonClass: null,\n cancelButtonText: 'Cancel',\n cancelButtonAriaLabel: '',\n cancelButtonColor: null,\n cancelButtonClass: null,\n buttonsStyling: true,\n reverseButtons: false,\n focusConfirm: true,\n focusCancel: false,\n showCloseButton: false,\n closeButtonAriaLabel: 'Close this dialog',\n showLoaderOnConfirm: false,\n imageUrl: null,\n imageWidth: null,\n imageHeight: null,\n imageAlt: '',\n imageClass: null,\n timer: null,\n width: null,\n padding: null,\n background: null,\n input: null,\n inputPlaceholder: '',\n inputValue: '',\n inputOptions: {},\n inputAutoTrim: true,\n inputClass: null,\n inputAttributes: {},\n inputValidator: null,\n grow: false,\n position: 'center',\n progressSteps: [],\n currentProgressStep: null,\n progressStepsDistance: null,\n onBeforeOpen: null,\n onAfterClose: null,\n onOpen: null,\n onClose: null,\n useRejections: false,\n expectRejections: false\n };\n var deprecatedParams = ['useRejections', 'expectRejections'];\n var toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusCancel', 'heightAuto', 'keydownListenerCapture'];\n /**\n * Is valid parameter\n * @param {String} paramName\n */\n\n var isValidParameter = function isValidParameter(paramName) {\n return defaultParams.hasOwnProperty(paramName) || paramName === 'extraParams';\n };\n /**\n * Is deprecated parameter\n * @param {String} paramName\n */\n\n var isDeprecatedParameter = function isDeprecatedParameter(paramName) {\n return deprecatedParams.indexOf(paramName) !== -1;\n };\n /**\n * Show relevant warnings for given params\n *\n * @param params\n */\n\n var showWarningsForParams = function showWarningsForParams(params) {\n for (var param in params) {\n if (!isValidParameter(param)) {\n warn(\"Unknown parameter \\\"\".concat(param, \"\\\"\"));\n }\n if (params.toast && toastIncompatibleParams.indexOf(param) !== -1) {\n warn(\"The parameter \\\"\".concat(param, \"\\\" is incompatible with toasts\"));\n }\n if (isDeprecatedParameter(param)) {\n warnOnce(\"The parameter \\\"\".concat(param, \"\\\" is deprecated and will be removed in the next major release.\"));\n }\n }\n };\n var deprecationWarning = \"\\\"setDefaults\\\" & \\\"resetDefaults\\\" methods are deprecated in favor of \\\"mixin\\\" method and will be removed in the next major release. For new projects, use \\\"mixin\\\". For past projects already using \\\"setDefaults\\\", support will be provided through an additional package.\";\n var defaults = {};\n function withGlobalDefaults(ParentSwal) {\n var SwalWithGlobalDefaults = /*#__PURE__*/\n function (_ParentSwal) {\n _inherits(SwalWithGlobalDefaults, _ParentSwal);\n function SwalWithGlobalDefaults() {\n _classCallCheck(this, SwalWithGlobalDefaults);\n return _possibleConstructorReturn(this, _getPrototypeOf(SwalWithGlobalDefaults).apply(this, arguments));\n }\n _createClass(SwalWithGlobalDefaults, [{\n key: \"_main\",\n value: function _main(params) {\n return _get(_getPrototypeOf(SwalWithGlobalDefaults.prototype), \"_main\", this).call(this, _extends({}, defaults, params));\n }\n }], [{\n key: \"setDefaults\",\n value: function setDefaults(params) {\n warnOnce(deprecationWarning);\n if (!params || _typeof(params) !== 'object') {\n throw new TypeError('SweetAlert2: The argument for setDefaults() is required and has to be a object');\n }\n showWarningsForParams(params); // assign valid params from `params` to `defaults`\n\n Object.keys(params).forEach(function (param) {\n if (ParentSwal.isValidParameter(param)) {\n defaults[param] = params[param];\n }\n });\n }\n }, {\n key: \"resetDefaults\",\n value: function resetDefaults() {\n warnOnce(deprecationWarning);\n defaults = {};\n }\n }]);\n return SwalWithGlobalDefaults;\n }(ParentSwal); // Set default params if `window._swalDefaults` is an object\n\n if (typeof window !== 'undefined' && _typeof(window._swalDefaults) === 'object') {\n SwalWithGlobalDefaults.setDefaults(window._swalDefaults);\n }\n return SwalWithGlobalDefaults;\n }\n\n /**\n * Returns an extended version of `Swal` containing `params` as defaults.\n * Useful for reusing Swal configuration.\n *\n * For example:\n *\n * Before:\n * const textPromptOptions = { input: 'text', showCancelButton: true }\n * const {value: firstName} = await Swal({ ...textPromptOptions, title: 'What is your first name?' })\n * const {value: lastName} = await Swal({ ...textPromptOptions, title: 'What is your last name?' })\n *\n * After:\n * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true })\n * const {value: firstName} = await TextPrompt('What is your first name?')\n * const {value: lastName} = await TextPrompt('What is your last name?')\n *\n * @param mixinParams\n */\n\n function mixin(mixinParams) {\n return withNoNewKeyword( /*#__PURE__*/\n function (_this) {\n _inherits(MixinSwal, _this);\n function MixinSwal() {\n _classCallCheck(this, MixinSwal);\n return _possibleConstructorReturn(this, _getPrototypeOf(MixinSwal).apply(this, arguments));\n }\n _createClass(MixinSwal, [{\n key: \"_main\",\n value: function _main(params) {\n return _get(_getPrototypeOf(MixinSwal.prototype), \"_main\", this).call(this, _extends({}, mixinParams, params));\n }\n }]);\n return MixinSwal;\n }(this));\n }\n\n // private global state for the queue feature\n var currentSteps = [];\n /*\n * Global function for chaining sweetAlert popups\n */\n\n var queue = function queue(steps) {\n var swal = this;\n currentSteps = steps;\n var resetQueue = function resetQueue() {\n currentSteps = [];\n document.body.removeAttribute('data-swal2-queue-step');\n };\n var queueResult = [];\n return new Promise(function (resolve) {\n (function step(i, callback) {\n if (i < currentSteps.length) {\n document.body.setAttribute('data-swal2-queue-step', i);\n swal(currentSteps[i]).then(function (result) {\n if (typeof result.value !== 'undefined') {\n queueResult.push(result.value);\n step(i + 1, callback);\n } else {\n resetQueue();\n resolve({\n dismiss: result.dismiss\n });\n }\n });\n } else {\n resetQueue();\n resolve({\n value: queueResult\n });\n }\n })(0);\n });\n };\n /*\n * Global function for getting the index of current popup in queue\n */\n\n var getQueueStep = function getQueueStep() {\n return document.body.getAttribute('data-swal2-queue-step');\n };\n /*\n * Global function for inserting a popup to the queue\n */\n\n var insertQueueStep = function insertQueueStep(step, index) {\n if (index && index < currentSteps.length) {\n return currentSteps.splice(index, 0, step);\n }\n return currentSteps.push(step);\n };\n /*\n * Global function for deleting a popup from the queue\n */\n\n var deleteQueueStep = function deleteQueueStep(index) {\n if (typeof currentSteps[index] !== 'undefined') {\n currentSteps.splice(index, 1);\n }\n };\n\n /**\n * Show spinner instead of Confirm button and disable Cancel button\n */\n\n var showLoading = function showLoading() {\n var popup = getPopup();\n if (!popup) {\n Swal('');\n }\n popup = getPopup();\n var actions = getActions();\n var confirmButton = getConfirmButton();\n var cancelButton = getCancelButton();\n show(actions);\n show(confirmButton);\n addClass([popup, actions], swalClasses.loading);\n confirmButton.disabled = true;\n cancelButton.disabled = true;\n popup.setAttribute('data-loading', true);\n popup.setAttribute('aria-busy', true);\n popup.focus();\n };\n\n /**\n * If `timer` parameter is set, returns number os milliseconds of timer remained.\n * Otherwise, returns null.\n */\n\n var getTimerLeft = function getTimerLeft() {\n return globalState.timeout && globalState.timeout.getTimerLeft();\n };\n var staticMethods = Object.freeze({\n isValidParameter: isValidParameter,\n isDeprecatedParameter: isDeprecatedParameter,\n argsToParams: argsToParams,\n adaptInputValidator: adaptInputValidator,\n close: close,\n closePopup: close,\n closeModal: close,\n closeToast: close,\n isVisible: isVisible$1,\n clickConfirm: clickConfirm,\n clickCancel: clickCancel,\n getContainer: getContainer,\n getPopup: getPopup,\n getTitle: getTitle,\n getContent: getContent,\n getImage: getImage,\n getIcons: getIcons,\n getCloseButton: getCloseButton,\n getButtonsWrapper: getButtonsWrapper,\n getActions: getActions,\n getConfirmButton: getConfirmButton,\n getCancelButton: getCancelButton,\n getFooter: getFooter,\n getFocusableElements: getFocusableElements,\n isLoading: isLoading,\n fire: fire,\n mixin: mixin,\n queue: queue,\n getQueueStep: getQueueStep,\n insertQueueStep: insertQueueStep,\n deleteQueueStep: deleteQueueStep,\n showLoading: showLoading,\n enableLoading: showLoading,\n getTimerLeft: getTimerLeft\n });\n\n // https://github.com/Riim/symbol-polyfill/blob/master/index.js\n\n /* istanbul ignore next */\n var _Symbol = typeof Symbol === 'function' ? Symbol : function () {\n var idCounter = 0;\n function _Symbol(key) {\n return '__' + key + '_' + Math.floor(Math.random() * 1e9) + '_' + ++idCounter + '__';\n }\n _Symbol.iterator = _Symbol('Symbol.iterator');\n return _Symbol;\n }();\n\n // WeakMap polyfill, needed for Android 4.4\n // Related issue: https://github.com/sweetalert2/sweetalert2/issues/1071\n // http://webreflection.blogspot.fi/2015/04/a-weakmap-polyfill-in-20-lines-of-code.html\n /* istanbul ignore next */\n\n var WeakMap$1 = typeof WeakMap === 'function' ? WeakMap : function (s, dP, hOP) {\n function WeakMap() {\n dP(this, s, {\n value: _Symbol('WeakMap')\n });\n }\n WeakMap.prototype = {\n 'delete': function del(o) {\n delete o[this[s]];\n },\n get: function get(o) {\n return o[this[s]];\n },\n has: function has(o) {\n return hOP.call(o, this[s]);\n },\n set: function set(o, v) {\n dP(o, this[s], {\n configurable: true,\n value: v\n });\n }\n };\n return WeakMap;\n }(_Symbol('WeakMap'), Object.defineProperty, {}.hasOwnProperty);\n\n /**\n * This module containts `WeakMap`s for each effectively-\"private property\" that a `swal` has.\n * For example, to set the private property \"foo\" of `this` to \"bar\", you can `privateProps.foo.set(this, 'bar')`\n * This is the approach that Babel will probably take to implement private methods/fields\n * https://github.com/tc39/proposal-private-methods\n * https://github.com/babel/babel/pull/7555\n * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*\n * then we can use that language feature.\n */\n var privateProps = {\n promise: new WeakMap$1(),\n innerParams: new WeakMap$1(),\n domCache: new WeakMap$1()\n };\n\n /**\n * Enables buttons and hide loader.\n */\n\n function hideLoading() {\n var innerParams = privateProps.innerParams.get(this);\n var domCache = privateProps.domCache.get(this);\n if (!innerParams.showConfirmButton) {\n hide(domCache.confirmButton);\n if (!innerParams.showCancelButton) {\n hide(domCache.actions);\n }\n }\n removeClass([domCache.popup, domCache.actions], swalClasses.loading);\n domCache.popup.removeAttribute('aria-busy');\n domCache.popup.removeAttribute('data-loading');\n domCache.confirmButton.disabled = false;\n domCache.cancelButton.disabled = false;\n }\n function getInput(inputType) {\n var innerParams = privateProps.innerParams.get(this);\n var domCache = privateProps.domCache.get(this);\n inputType = inputType || innerParams.input;\n if (!inputType) {\n return null;\n }\n switch (inputType) {\n case 'select':\n case 'textarea':\n case 'file':\n return getChildByClass(domCache.content, swalClasses[inputType]);\n case 'checkbox':\n return domCache.popup.querySelector(\".\".concat(swalClasses.checkbox, \" input\"));\n case 'radio':\n return domCache.popup.querySelector(\".\".concat(swalClasses.radio, \" input:checked\")) || domCache.popup.querySelector(\".\".concat(swalClasses.radio, \" input:first-child\"));\n case 'range':\n return domCache.popup.querySelector(\".\".concat(swalClasses.range, \" input\"));\n default:\n return getChildByClass(domCache.content, swalClasses.input);\n }\n }\n function enableButtons() {\n var domCache = privateProps.domCache.get(this);\n domCache.confirmButton.disabled = false;\n domCache.cancelButton.disabled = false;\n }\n function disableButtons() {\n var domCache = privateProps.domCache.get(this);\n domCache.confirmButton.disabled = true;\n domCache.cancelButton.disabled = true;\n }\n function enableConfirmButton() {\n var domCache = privateProps.domCache.get(this);\n domCache.confirmButton.disabled = false;\n }\n function disableConfirmButton() {\n var domCache = privateProps.domCache.get(this);\n domCache.confirmButton.disabled = true;\n }\n function enableInput() {\n var input = this.getInput();\n if (!input) {\n return false;\n }\n if (input.type === 'radio') {\n var radiosContainer = input.parentNode.parentNode;\n var radios = radiosContainer.querySelectorAll('input');\n for (var i = 0; i < radios.length; i++) {\n radios[i].disabled = false;\n }\n } else {\n input.disabled = false;\n }\n }\n function disableInput() {\n var input = this.getInput();\n if (!input) {\n return false;\n }\n if (input && input.type === 'radio') {\n var radiosContainer = input.parentNode.parentNode;\n var radios = radiosContainer.querySelectorAll('input');\n for (var i = 0; i < radios.length; i++) {\n radios[i].disabled = true;\n }\n } else {\n input.disabled = true;\n }\n }\n function showValidationError(error) {\n var domCache = privateProps.domCache.get(this);\n domCache.validationError.innerHTML = error;\n var popupComputedStyle = window.getComputedStyle(domCache.popup);\n domCache.validationError.style.marginLeft = \"-\".concat(popupComputedStyle.getPropertyValue('padding-left'));\n domCache.validationError.style.marginRight = \"-\".concat(popupComputedStyle.getPropertyValue('padding-right'));\n show(domCache.validationError);\n var input = this.getInput();\n if (input) {\n input.setAttribute('aria-invalid', true);\n input.setAttribute('aria-describedBy', swalClasses.validationerror);\n focusInput(input);\n addClass(input, swalClasses.inputerror);\n }\n } // Hide block with validation error\n\n function resetValidationError() {\n var domCache = privateProps.domCache.get(this);\n if (domCache.validationError) {\n hide(domCache.validationError);\n }\n var input = this.getInput();\n if (input) {\n input.removeAttribute('aria-invalid');\n input.removeAttribute('aria-describedBy');\n removeClass(input, swalClasses.inputerror);\n }\n }\n function getProgressSteps$1() {\n var innerParams = privateProps.innerParams.get(this);\n return innerParams.progressSteps;\n }\n function setProgressSteps(progressSteps) {\n var innerParams = privateProps.innerParams.get(this);\n var updatedParams = _extends({}, innerParams, {\n progressSteps: progressSteps\n });\n privateProps.innerParams.set(this, updatedParams);\n renderProgressSteps(updatedParams);\n }\n function showProgressSteps() {\n var domCache = privateProps.domCache.get(this);\n show(domCache.progressSteps);\n }\n function hideProgressSteps() {\n var domCache = privateProps.domCache.get(this);\n hide(domCache.progressSteps);\n }\n var Timer = function Timer(callback, delay) {\n _classCallCheck(this, Timer);\n var id, started, running;\n var remaining = delay;\n this.start = function () {\n running = true;\n started = new Date();\n id = setTimeout(callback, remaining);\n };\n this.stop = function () {\n running = false;\n clearTimeout(id);\n remaining -= new Date() - started;\n };\n this.getTimerLeft = function () {\n if (running) {\n this.stop();\n this.start();\n }\n return remaining;\n };\n this.start();\n };\n var defaultInputValidators = {\n email: function email(string, extraParams) {\n return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.reject(extraParams && extraParams.validationMessage ? extraParams.validationMessage : 'Invalid email address');\n },\n url: function url(string, extraParams) {\n // taken from https://stackoverflow.com/a/3809435/1331425\n return /^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_+.~#?&//=]*)$/.test(string) ? Promise.resolve() : Promise.reject(extraParams && extraParams.validationMessage ? extraParams.validationMessage : 'Invalid URL');\n }\n };\n\n /**\n * Set type, text and actions on popup\n *\n * @param params\n * @returns {boolean}\n */\n\n function setParameters(params) {\n // Use default `inputValidator` for supported input types if not provided\n if (!params.inputValidator) {\n Object.keys(defaultInputValidators).forEach(function (key) {\n if (params.input === key) {\n params.inputValidator = params.expectRejections ? defaultInputValidators[key] : Swal.adaptInputValidator(defaultInputValidators[key]);\n }\n });\n } // Determine if the custom target element is valid\n\n if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) {\n warn('Target parameter is not valid, defaulting to \"body\"');\n params.target = 'body';\n }\n var popup;\n var oldPopup = getPopup();\n var targetElement = typeof params.target === 'string' ? document.querySelector(params.target) : params.target; // If the model target has changed, refresh the popup\n\n if (oldPopup && targetElement && oldPopup.parentNode !== targetElement.parentNode) {\n popup = init(params);\n } else {\n popup = oldPopup || init(params);\n } // Set popup width\n\n if (params.width) {\n popup.style.width = typeof params.width === 'number' ? params.width + 'px' : params.width;\n } // Set popup padding\n\n if (params.padding) {\n popup.style.padding = typeof params.padding === 'number' ? params.padding + 'px' : params.padding;\n } // Set popup background\n\n if (params.background) {\n popup.style.background = params.background;\n }\n var popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');\n var successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');\n for (var i = 0; i < successIconParts.length; i++) {\n successIconParts[i].style.backgroundColor = popupBackgroundColor;\n }\n var container = getContainer();\n var closeButton = getCloseButton();\n var footer = getFooter(); // Title\n\n renderTitle(params); // Content\n\n renderContent(params); // Backdrop\n\n if (typeof params.backdrop === 'string') {\n getContainer().style.background = params.backdrop;\n } else if (!params.backdrop) {\n addClass([document.documentElement, document.body], swalClasses['no-backdrop']);\n }\n if (!params.backdrop && params.allowOutsideClick) {\n warn('\"allowOutsideClick\" parameter requires `backdrop` parameter to be set to `true`');\n } // Position\n\n if (params.position in swalClasses) {\n addClass(container, swalClasses[params.position]);\n } else {\n warn('The \"position\" parameter is not valid, defaulting to \"center\"');\n addClass(container, swalClasses.center);\n } // Grow\n\n if (params.grow && typeof params.grow === 'string') {\n var growClass = 'grow-' + params.grow;\n if (growClass in swalClasses) {\n addClass(container, swalClasses[growClass]);\n }\n } // Animation\n\n if (typeof params.animation === 'function') {\n params.animation = params.animation.call();\n } // Close button\n\n if (params.showCloseButton) {\n closeButton.setAttribute('aria-label', params.closeButtonAriaLabel);\n show(closeButton);\n } else {\n hide(closeButton);\n } // Default Class\n\n popup.className = swalClasses.popup;\n if (params.toast) {\n addClass([document.documentElement, document.body], swalClasses['toast-shown']);\n addClass(popup, swalClasses.toast);\n } else {\n addClass(popup, swalClasses.modal);\n } // Custom Class\n\n if (params.customClass) {\n addClass(popup, params.customClass);\n } // Progress steps\n\n renderProgressSteps(params); // Icon\n\n renderIcon(params); // Image\n\n renderImage(params); // Actions (buttons)\n\n renderActions(params); // Footer\n\n parseHtmlToContainer(params.footer, footer); // CSS animation\n\n if (params.animation === true) {\n removeClass(popup, swalClasses.noanimation);\n } else {\n addClass(popup, swalClasses.noanimation);\n } // showLoaderOnConfirm && preConfirm\n\n if (params.showLoaderOnConfirm && !params.preConfirm) {\n warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\\n' + 'https://sweetalert2.github.io/#ajax-request');\n }\n }\n\n /**\n * Open popup, add necessary classes and styles, fix scrollbar\n *\n * @param {Array} params\n */\n\n var openPopup = function openPopup(params) {\n var container = getContainer();\n var popup = getPopup();\n if (params.onBeforeOpen !== null && typeof params.onBeforeOpen === 'function') {\n params.onBeforeOpen(popup);\n }\n if (params.animation) {\n addClass(popup, swalClasses.show);\n addClass(container, swalClasses.fade);\n removeClass(popup, swalClasses.hide);\n } else {\n removeClass(popup, swalClasses.fade);\n }\n show(popup); // scrolling is 'hidden' until animation is done, after that 'auto'\n\n container.style.overflowY = 'hidden';\n if (animationEndEvent && !hasClass(popup, swalClasses.noanimation)) {\n popup.addEventListener(animationEndEvent, function swalCloseEventFinished() {\n popup.removeEventListener(animationEndEvent, swalCloseEventFinished);\n container.style.overflowY = 'auto';\n });\n } else {\n container.style.overflowY = 'auto';\n }\n addClass([document.documentElement, document.body, container], swalClasses.shown);\n if (params.heightAuto && params.backdrop && !params.toast) {\n addClass([document.documentElement, document.body], swalClasses['height-auto']);\n }\n if (isModal()) {\n fixScrollbar();\n iOSfix();\n setAriaHidden();\n }\n if (!isToast() && !globalState.previousActiveElement) {\n globalState.previousActiveElement = document.activeElement;\n }\n if (params.onOpen !== null && typeof params.onOpen === 'function') {\n setTimeout(function () {\n params.onOpen(popup);\n });\n }\n };\n function _main(userParams) {\n var _this = this;\n showWarningsForParams(userParams);\n var innerParams = _extends({}, defaultParams, userParams);\n setParameters(innerParams);\n Object.freeze(innerParams);\n privateProps.innerParams.set(this, innerParams); // clear the previous timer\n\n if (globalState.timeout) {\n globalState.timeout.stop();\n delete globalState.timeout;\n } // clear the restore focus timeout\n\n clearTimeout(globalState.restoreFocusTimeout);\n var domCache = {\n popup: getPopup(),\n container: getContainer(),\n content: getContent(),\n actions: getActions(),\n confirmButton: getConfirmButton(),\n cancelButton: getCancelButton(),\n closeButton: getCloseButton(),\n validationError: getValidationError(),\n progressSteps: getProgressSteps()\n };\n privateProps.domCache.set(this, domCache);\n var constructor = this.constructor;\n return new Promise(function (resolve, reject) {\n // functions to handle all resolving/rejecting/settling\n var succeedWith = function succeedWith(value) {\n constructor.closePopup(innerParams.onClose, innerParams.onAfterClose); // TODO: make closePopup an *instance* method\n\n if (innerParams.useRejections) {\n resolve(value);\n } else {\n resolve({\n value: value\n });\n }\n };\n var dismissWith = function dismissWith(dismiss) {\n constructor.closePopup(innerParams.onClose, innerParams.onAfterClose);\n if (innerParams.useRejections) {\n reject(dismiss);\n } else {\n resolve({\n dismiss: dismiss\n });\n }\n };\n var errorWith = function errorWith(error$$1) {\n constructor.closePopup(innerParams.onClose, innerParams.onAfterClose);\n reject(error$$1);\n }; // Close on timer\n\n if (innerParams.timer) {\n globalState.timeout = new Timer(function () {\n dismissWith('timer');\n delete globalState.timeout;\n }, innerParams.timer);\n } // Get the value of the popup input\n\n var getInputValue = function getInputValue() {\n var input = _this.getInput();\n if (!input) {\n return null;\n }\n switch (innerParams.input) {\n case 'checkbox':\n return input.checked ? 1 : 0;\n case 'radio':\n return input.checked ? input.value : null;\n case 'file':\n return input.files.length ? input.files[0] : null;\n default:\n return innerParams.inputAutoTrim ? input.value.trim() : input.value;\n }\n }; // input autofocus\n\n if (innerParams.input) {\n setTimeout(function () {\n var input = _this.getInput();\n if (input) {\n focusInput(input);\n }\n }, 0);\n }\n var confirm = function confirm(value) {\n if (innerParams.showLoaderOnConfirm) {\n constructor.showLoading(); // TODO: make showLoading an *instance* method\n }\n if (innerParams.preConfirm) {\n _this.resetValidationError();\n var preConfirmPromise = Promise.resolve().then(function () {\n return innerParams.preConfirm(value, innerParams.extraParams);\n });\n if (innerParams.expectRejections) {\n preConfirmPromise.then(function (preConfirmValue) {\n return succeedWith(preConfirmValue || value);\n }, function (validationError) {\n _this.hideLoading();\n if (validationError) {\n _this.showValidationError(validationError);\n }\n });\n } else {\n preConfirmPromise.then(function (preConfirmValue) {\n if (isVisible(domCache.validationError) || preConfirmValue === false) {\n _this.hideLoading();\n } else {\n succeedWith(preConfirmValue || value);\n }\n }, function (error$$1) {\n return errorWith(error$$1);\n });\n }\n } else {\n succeedWith(value);\n }\n }; // Mouse interactions\n\n var onButtonEvent = function onButtonEvent(e) {\n var target = e.target;\n var confirmButton = domCache.confirmButton,\n cancelButton = domCache.cancelButton;\n var targetedConfirm = confirmButton && (confirmButton === target || confirmButton.contains(target));\n var targetedCancel = cancelButton && (cancelButton === target || cancelButton.contains(target));\n switch (e.type) {\n case 'click':\n // Clicked 'confirm'\n if (targetedConfirm && constructor.isVisible()) {\n _this.disableButtons();\n if (innerParams.input) {\n var inputValue = getInputValue();\n if (innerParams.inputValidator) {\n _this.disableInput();\n var validationPromise = Promise.resolve().then(function () {\n return innerParams.inputValidator(inputValue, innerParams.extraParams);\n });\n if (innerParams.expectRejections) {\n validationPromise.then(function () {\n _this.enableButtons();\n _this.enableInput();\n confirm(inputValue);\n }, function (validationError) {\n _this.enableButtons();\n _this.enableInput();\n if (validationError) {\n _this.showValidationError(validationError);\n }\n });\n } else {\n validationPromise.then(function (validationError) {\n _this.enableButtons();\n _this.enableInput();\n if (validationError) {\n _this.showValidationError(validationError);\n } else {\n confirm(inputValue);\n }\n }, function (error$$1) {\n return errorWith(error$$1);\n });\n }\n } else {\n confirm(inputValue);\n }\n } else {\n confirm(true);\n } // Clicked 'cancel'\n } else if (targetedCancel && constructor.isVisible()) {\n _this.disableButtons();\n dismissWith(constructor.DismissReason.cancel);\n }\n break;\n default:\n }\n };\n var buttons = domCache.popup.querySelectorAll('button');\n for (var i = 0; i < buttons.length; i++) {\n buttons[i].onclick = onButtonEvent;\n buttons[i].onmouseover = onButtonEvent;\n buttons[i].onmouseout = onButtonEvent;\n buttons[i].onmousedown = onButtonEvent;\n } // Closing popup by close button\n\n domCache.closeButton.onclick = function () {\n dismissWith(constructor.DismissReason.close);\n };\n if (innerParams.toast) {\n // Closing popup by internal click\n domCache.popup.onclick = function () {\n if (innerParams.showConfirmButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.input) {\n return;\n }\n dismissWith(constructor.DismissReason.close);\n };\n } else {\n var ignoreOutsideClick = false; // Ignore click events that had mousedown on the popup but mouseup on the container\n // This can happen when the user drags a slider\n\n domCache.popup.onmousedown = function () {\n domCache.container.onmouseup = function (e) {\n domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't\n // have any other direct children aside of the popup\n\n if (e.target === domCache.container) {\n ignoreOutsideClick = true;\n }\n };\n }; // Ignore click events that had mousedown on the container but mouseup on the popup\n\n domCache.container.onmousedown = function () {\n domCache.popup.onmouseup = function (e) {\n domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup\n\n if (e.target === domCache.popup || domCache.popup.contains(e.target)) {\n ignoreOutsideClick = true;\n }\n };\n };\n domCache.container.onclick = function (e) {\n if (ignoreOutsideClick) {\n ignoreOutsideClick = false;\n return;\n }\n if (e.target !== domCache.container) {\n return;\n }\n if (callIfFunction(innerParams.allowOutsideClick)) {\n dismissWith(constructor.DismissReason.backdrop);\n }\n };\n } // Reverse buttons (Confirm on the right side)\n\n if (innerParams.reverseButtons) {\n domCache.confirmButton.parentNode.insertBefore(domCache.cancelButton, domCache.confirmButton);\n } else {\n domCache.confirmButton.parentNode.insertBefore(domCache.confirmButton, domCache.cancelButton);\n } // Focus handling\n\n var setFocus = function setFocus(index, increment) {\n var focusableElements = getFocusableElements(innerParams.focusCancel); // search for visible elements and select the next possible match\n\n for (var _i = 0; _i < focusableElements.length; _i++) {\n index = index + increment; // rollover to first item\n\n if (index === focusableElements.length) {\n index = 0; // go to last item\n } else if (index === -1) {\n index = focusableElements.length - 1;\n }\n return focusableElements[index].focus();\n } // no visible focusable elements, focus the popup\n\n domCache.popup.focus();\n };\n var keydownHandler = function keydownHandler(e, innerParams) {\n if (innerParams.stopKeydownPropagation) {\n e.stopPropagation();\n }\n var arrowKeys = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Left', 'Right', 'Up', 'Down' // IE11\n ];\n if (e.key === 'Enter' && !e.isComposing) {\n if (e.target && _this.getInput() && e.target.outerHTML === _this.getInput().outerHTML) {\n if (['textarea', 'file'].indexOf(innerParams.input) !== -1) {\n return; // do not submit\n }\n constructor.clickConfirm();\n e.preventDefault();\n } // TAB\n } else if (e.key === 'Tab') {\n var targetElement = e.target;\n var focusableElements = getFocusableElements(innerParams.focusCancel);\n var btnIndex = -1;\n for (var _i2 = 0; _i2 < focusableElements.length; _i2++) {\n if (targetElement === focusableElements[_i2]) {\n btnIndex = _i2;\n break;\n }\n }\n if (!e.shiftKey) {\n // Cycle to the next button\n setFocus(btnIndex, 1);\n } else {\n // Cycle to the prev button\n setFocus(btnIndex, -1);\n }\n e.stopPropagation();\n e.preventDefault(); // ARROWS - switch focus between buttons\n } else if (arrowKeys.indexOf(e.key) !== -1) {\n // focus Cancel button if Confirm button is currently focused\n if (document.activeElement === domCache.confirmButton && isVisible(domCache.cancelButton)) {\n domCache.cancelButton.focus(); // and vice versa\n } else if (document.activeElement === domCache.cancelButton && isVisible(domCache.confirmButton)) {\n domCache.confirmButton.focus();\n } // ESC\n } else if ((e.key === 'Escape' || e.key === 'Esc') && callIfFunction(innerParams.allowEscapeKey) === true) {\n dismissWith(constructor.DismissReason.esc);\n }\n };\n if (globalState.keydownHandlerAdded) {\n globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {\n capture: globalState.keydownListenerCapture\n });\n globalState.keydownHandlerAdded = false;\n }\n if (!innerParams.toast) {\n globalState.keydownHandler = function (e) {\n return keydownHandler(e, innerParams);\n };\n globalState.keydownTarget = innerParams.keydownListenerCapture ? window : domCache.popup;\n globalState.keydownListenerCapture = innerParams.keydownListenerCapture;\n globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, {\n capture: globalState.keydownListenerCapture\n });\n globalState.keydownHandlerAdded = true;\n }\n _this.enableButtons();\n _this.hideLoading();\n _this.resetValidationError();\n if (innerParams.toast && (innerParams.input || innerParams.footer || innerParams.showCloseButton)) {\n addClass(document.body, swalClasses['toast-column']);\n } else {\n removeClass(document.body, swalClasses['toast-column']);\n } // inputs\n\n var inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];\n var input;\n for (var _i3 = 0; _i3 < inputTypes.length; _i3++) {\n var inputClass = swalClasses[inputTypes[_i3]];\n var inputContainer = getChildByClass(domCache.content, inputClass);\n input = _this.getInput(inputTypes[_i3]); // set attributes\n\n if (input) {\n for (var j in input.attributes) {\n if (input.attributes.hasOwnProperty(j)) {\n var attrName = input.attributes[j].name;\n if (attrName !== 'type' && attrName !== 'value') {\n input.removeAttribute(attrName);\n }\n }\n }\n for (var attr in innerParams.inputAttributes) {\n input.setAttribute(attr, innerParams.inputAttributes[attr]);\n }\n } // set class\n\n inputContainer.className = inputClass;\n if (innerParams.inputClass) {\n addClass(inputContainer, innerParams.inputClass);\n }\n hide(inputContainer);\n }\n var populateInputOptions;\n switch (innerParams.input) {\n case 'text':\n case 'email':\n case 'password':\n case 'number':\n case 'tel':\n case 'url':\n {\n input = getChildByClass(domCache.content, swalClasses.input);\n input.value = innerParams.inputValue;\n input.placeholder = innerParams.inputPlaceholder;\n input.type = innerParams.input;\n show(input);\n break;\n }\n case 'file':\n {\n input = getChildByClass(domCache.content, swalClasses.file);\n input.placeholder = innerParams.inputPlaceholder;\n input.type = innerParams.input;\n show(input);\n break;\n }\n case 'range':\n {\n var range = getChildByClass(domCache.content, swalClasses.range);\n var rangeInput = range.querySelector('input');\n var rangeOutput = range.querySelector('output');\n rangeInput.value = innerParams.inputValue;\n rangeInput.type = innerParams.input;\n rangeOutput.value = innerParams.inputValue;\n show(range);\n break;\n }\n case 'select':\n {\n var select = getChildByClass(domCache.content, swalClasses.select);\n select.innerHTML = '';\n if (innerParams.inputPlaceholder) {\n var placeholder = document.createElement('option');\n placeholder.innerHTML = innerParams.inputPlaceholder;\n placeholder.value = '';\n placeholder.disabled = true;\n placeholder.selected = true;\n select.appendChild(placeholder);\n }\n populateInputOptions = function populateInputOptions(inputOptions) {\n inputOptions.forEach(function (inputOption) {\n var optionValue = inputOption[0];\n var optionLabel = inputOption[1];\n var option = document.createElement('option');\n option.value = optionValue;\n option.innerHTML = optionLabel;\n if (innerParams.inputValue.toString() === optionValue.toString()) {\n option.selected = true;\n }\n select.appendChild(option);\n });\n show(select);\n select.focus();\n };\n break;\n }\n case 'radio':\n {\n var radio = getChildByClass(domCache.content, swalClasses.radio);\n radio.innerHTML = '';\n populateInputOptions = function populateInputOptions(inputOptions) {\n inputOptions.forEach(function (inputOption) {\n var radioValue = inputOption[0];\n var radioLabel = inputOption[1];\n var radioInput = document.createElement('input');\n var radioLabelElement = document.createElement('label');\n radioInput.type = 'radio';\n radioInput.name = swalClasses.radio;\n radioInput.value = radioValue;\n if (innerParams.inputValue.toString() === radioValue.toString()) {\n radioInput.checked = true;\n }\n var label = document.createElement('span');\n label.innerHTML = radioLabel;\n label.className = swalClasses.label;\n radioLabelElement.appendChild(radioInput);\n radioLabelElement.appendChild(label);\n radio.appendChild(radioLabelElement);\n });\n show(radio);\n var radios = radio.querySelectorAll('input');\n if (radios.length) {\n radios[0].focus();\n }\n };\n break;\n }\n case 'checkbox':\n {\n var checkbox = getChildByClass(domCache.content, swalClasses.checkbox);\n var checkboxInput = _this.getInput('checkbox');\n checkboxInput.type = 'checkbox';\n checkboxInput.value = 1;\n checkboxInput.id = swalClasses.checkbox;\n checkboxInput.checked = Boolean(innerParams.inputValue);\n var label = checkbox.querySelector('span');\n label.innerHTML = innerParams.inputPlaceholder;\n show(checkbox);\n break;\n }\n case 'textarea':\n {\n var textarea = getChildByClass(domCache.content, swalClasses.textarea);\n textarea.value = innerParams.inputValue;\n textarea.placeholder = innerParams.inputPlaceholder;\n show(textarea);\n break;\n }\n case null:\n {\n break;\n }\n default:\n error(\"Unexpected type of input! Expected \\\"text\\\", \\\"email\\\", \\\"password\\\", \\\"number\\\", \\\"tel\\\", \\\"select\\\", \\\"radio\\\", \\\"checkbox\\\", \\\"textarea\\\", \\\"file\\\" or \\\"url\\\", got \\\"\".concat(innerParams.input, \"\\\"\"));\n break;\n }\n if (innerParams.input === 'select' || innerParams.input === 'radio') {\n var processInputOptions = function processInputOptions(inputOptions) {\n return populateInputOptions(formatInputOptions(inputOptions));\n };\n if (isThenable(innerParams.inputOptions)) {\n constructor.showLoading();\n innerParams.inputOptions.then(function (inputOptions) {\n _this.hideLoading();\n processInputOptions(inputOptions);\n });\n } else if (_typeof(innerParams.inputOptions) === 'object') {\n processInputOptions(innerParams.inputOptions);\n } else {\n error(\"Unexpected type of inputOptions! Expected object, Map or Promise, got \".concat(_typeof(innerParams.inputOptions)));\n }\n } else if (['text', 'email', 'number', 'tel', 'textarea'].indexOf(innerParams.input) !== -1 && isThenable(innerParams.inputValue)) {\n constructor.showLoading();\n hide(input);\n innerParams.inputValue.then(function (inputValue) {\n input.value = innerParams.input === 'number' ? parseFloat(inputValue) || 0 : inputValue + '';\n show(input);\n input.focus();\n _this.hideLoading();\n })[\"catch\"](function (err) {\n error('Error in inputValue promise: ' + err);\n input.value = '';\n show(input);\n input.focus();\n _this.hideLoading();\n });\n }\n openPopup(innerParams);\n if (!innerParams.toast) {\n if (!callIfFunction(innerParams.allowEnterKey)) {\n if (document.activeElement) {\n document.activeElement.blur();\n }\n } else if (innerParams.focusCancel && isVisible(domCache.cancelButton)) {\n domCache.cancelButton.focus();\n } else if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) {\n domCache.confirmButton.focus();\n } else {\n setFocus(-1, 1);\n }\n } // fix scroll\n\n domCache.container.scrollTop = 0;\n });\n }\n var instanceMethods = Object.freeze({\n hideLoading: hideLoading,\n disableLoading: hideLoading,\n getInput: getInput,\n enableButtons: enableButtons,\n disableButtons: disableButtons,\n enableConfirmButton: enableConfirmButton,\n disableConfirmButton: disableConfirmButton,\n enableInput: enableInput,\n disableInput: disableInput,\n showValidationError: showValidationError,\n resetValidationError: resetValidationError,\n getProgressSteps: getProgressSteps$1,\n setProgressSteps: setProgressSteps,\n showProgressSteps: showProgressSteps,\n hideProgressSteps: hideProgressSteps,\n _main: _main\n });\n var currentInstance; // SweetAlert constructor\n\n function SweetAlert() {\n // Prevent run in Node env\n if (typeof window === 'undefined') {\n return;\n } // Check for the existence of Promise\n\n if (typeof Promise === 'undefined') {\n error('This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)');\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (args.length === 0) {\n error('At least 1 argument is expected!');\n return false;\n }\n currentInstance = this;\n var outerParams = Object.freeze(this.constructor.argsToParams(args));\n Object.defineProperties(this, {\n params: {\n value: outerParams,\n writable: false,\n enumerable: true\n }\n });\n var promise = this._main(this.params);\n privateProps.promise.set(this, promise);\n } // `catch` cannot be the name of a module export, so we define our thenable methods here instead\n\n SweetAlert.prototype.then = function (onFulfilled, onRejected) {\n var promise = privateProps.promise.get(this);\n return promise.then(onFulfilled, onRejected);\n };\n SweetAlert.prototype[\"catch\"] = function (onRejected) {\n var promise = privateProps.promise.get(this);\n return promise[\"catch\"](onRejected);\n };\n SweetAlert.prototype[\"finally\"] = function (onFinally) {\n var promise = privateProps.promise.get(this);\n return promise[\"finally\"](onFinally);\n }; // Assign instance methods from src/instanceMethods/*.js to prototype\n\n _extends(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor\n\n _extends(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility\n\n Object.keys(instanceMethods).forEach(function (key) {\n SweetAlert[key] = function () {\n if (currentInstance) {\n var _currentInstance;\n return (_currentInstance = currentInstance)[key].apply(_currentInstance, arguments);\n }\n };\n });\n SweetAlert.DismissReason = DismissReason;\n SweetAlert.noop = function () {};\n SweetAlert.version = version;\n var Swal = withNoNewKeyword(withGlobalDefaults(SweetAlert));\n Swal[\"default\"] = Swal;\n return Swal;\n});\nif (typeof window !== 'undefined' && window.Sweetalert2) {\n window.swal = window.sweetAlert = window.Swal = window.SweetAlert = window.Sweetalert2;\n}\n\"undefined\" != typeof document && function (e, t) {\n var n = e.createElement(\"style\");\n if (e.getElementsByTagName(\"head\")[0].appendChild(n), n.styleSheet) n.styleSheet.disabled || (n.styleSheet.cssText = t);else try {\n n.innerHTML = t;\n } catch (e) {\n n.innerText = t;\n }\n}(document, \"@-webkit-keyframes swal2-show {\\n\" + \" 0% {\\n\" + \" -webkit-transform: scale(0.7);\\n\" + \" transform: scale(0.7); }\\n\" + \" 45% {\\n\" + \" -webkit-transform: scale(1.05);\\n\" + \" transform: scale(1.05); }\\n\" + \" 80% {\\n\" + \" -webkit-transform: scale(0.95);\\n\" + \" transform: scale(0.95); }\\n\" + \" 100% {\\n\" + \" -webkit-transform: scale(1);\\n\" + \" transform: scale(1); } }\\n\" + \"\\n\" + \"@keyframes swal2-show {\\n\" + \" 0% {\\n\" + \" -webkit-transform: scale(0.7);\\n\" + \" transform: scale(0.7); }\\n\" + \" 45% {\\n\" + \" -webkit-transform: scale(1.05);\\n\" + \" transform: scale(1.05); }\\n\" + \" 80% {\\n\" + \" -webkit-transform: scale(0.95);\\n\" + \" transform: scale(0.95); }\\n\" + \" 100% {\\n\" + \" -webkit-transform: scale(1);\\n\" + \" transform: scale(1); } }\\n\" + \"\\n\" + \"@-webkit-keyframes swal2-hide {\\n\" + \" 0% {\\n\" + \" -webkit-transform: scale(1);\\n\" + \" transform: scale(1);\\n\" + \" opacity: 1; }\\n\" + \" 100% {\\n\" + \" -webkit-transform: scale(0.5);\\n\" + \" transform: scale(0.5);\\n\" + \" opacity: 0; } }\\n\" + \"\\n\" + \"@keyframes swal2-hide {\\n\" + \" 0% {\\n\" + \" -webkit-transform: scale(1);\\n\" + \" transform: scale(1);\\n\" + \" opacity: 1; }\\n\" + \" 100% {\\n\" + \" -webkit-transform: scale(0.5);\\n\" + \" transform: scale(0.5);\\n\" + \" opacity: 0; } }\\n\" + \"\\n\" + \"@-webkit-keyframes swal2-animate-success-line-tip {\\n\" + \" 0% {\\n\" + \" top: 1.1875em;\\n\" + \" left: .0625em;\\n\" + \" width: 0; }\\n\" + \" 54% {\\n\" + \" top: 1.0625em;\\n\" + \" left: .125em;\\n\" + \" width: 0; }\\n\" + \" 70% {\\n\" + \" top: 2.1875em;\\n\" + \" left: -.375em;\\n\" + \" width: 3.125em; }\\n\" + \" 84% {\\n\" + \" top: 3em;\\n\" + \" left: 1.3125em;\\n\" + \" width: 1.0625em; }\\n\" + \" 100% {\\n\" + \" top: 2.8125em;\\n\" + \" left: .875em;\\n\" + \" width: 1.5625em; } }\\n\" + \"\\n\" + \"@keyframes swal2-animate-success-line-tip {\\n\" + \" 0% {\\n\" + \" top: 1.1875em;\\n\" + \" left: .0625em;\\n\" + \" width: 0; }\\n\" + \" 54% {\\n\" + \" top: 1.0625em;\\n\" + \" left: .125em;\\n\" + \" width: 0; }\\n\" + \" 70% {\\n\" + \" top: 2.1875em;\\n\" + \" left: -.375em;\\n\" + \" width: 3.125em; }\\n\" + \" 84% {\\n\" + \" top: 3em;\\n\" + \" left: 1.3125em;\\n\" + \" width: 1.0625em; }\\n\" + \" 100% {\\n\" + \" top: 2.8125em;\\n\" + \" left: .875em;\\n\" + \" width: 1.5625em; } }\\n\" + \"\\n\" + \"@-webkit-keyframes swal2-animate-success-line-long {\\n\" + \" 0% {\\n\" + \" top: 3.375em;\\n\" + \" right: 2.875em;\\n\" + \" width: 0; }\\n\" + \" 65% {\\n\" + \" top: 3.375em;\\n\" + \" right: 2.875em;\\n\" + \" width: 0; }\\n\" + \" 84% {\\n\" + \" top: 2.1875em;\\n\" + \" right: 0;\\n\" + \" width: 3.4375em; }\\n\" + \" 100% {\\n\" + \" top: 2.375em;\\n\" + \" right: .5em;\\n\" + \" width: 2.9375em; } }\\n\" + \"\\n\" + \"@keyframes swal2-animate-success-line-long {\\n\" + \" 0% {\\n\" + \" top: 3.375em;\\n\" + \" right: 2.875em;\\n\" + \" width: 0; }\\n\" + \" 65% {\\n\" + \" top: 3.375em;\\n\" + \" right: 2.875em;\\n\" + \" width: 0; }\\n\" + \" 84% {\\n\" + \" top: 2.1875em;\\n\" + \" right: 0;\\n\" + \" width: 3.4375em; }\\n\" + \" 100% {\\n\" + \" top: 2.375em;\\n\" + \" right: .5em;\\n\" + \" width: 2.9375em; } }\\n\" + \"\\n\" + \"@-webkit-keyframes swal2-rotate-success-circular-line {\\n\" + \" 0% {\\n\" + \" -webkit-transform: rotate(-45deg);\\n\" + \" transform: rotate(-45deg); }\\n\" + \" 5% {\\n\" + \" -webkit-transform: rotate(-45deg);\\n\" + \" transform: rotate(-45deg); }\\n\" + \" 12% {\\n\" + \" -webkit-transform: rotate(-405deg);\\n\" + \" transform: rotate(-405deg); }\\n\" + \" 100% {\\n\" + \" -webkit-transform: rotate(-405deg);\\n\" + \" transform: rotate(-405deg); } }\\n\" + \"\\n\" + \"@keyframes swal2-rotate-success-circular-line {\\n\" + \" 0% {\\n\" + \" -webkit-transform: rotate(-45deg);\\n\" + \" transform: rotate(-45deg); }\\n\" + \" 5% {\\n\" + \" -webkit-transform: rotate(-45deg);\\n\" + \" transform: rotate(-45deg); }\\n\" + \" 12% {\\n\" + \" -webkit-transform: rotate(-405deg);\\n\" + \" transform: rotate(-405deg); }\\n\" + \" 100% {\\n\" + \" -webkit-transform: rotate(-405deg);\\n\" + \" transform: rotate(-405deg); } }\\n\" + \"\\n\" + \"@-webkit-keyframes swal2-animate-error-x-mark {\\n\" + \" 0% {\\n\" + \" margin-top: 1.625em;\\n\" + \" -webkit-transform: scale(0.4);\\n\" + \" transform: scale(0.4);\\n\" + \" opacity: 0; }\\n\" + \" 50% {\\n\" + \" margin-top: 1.625em;\\n\" + \" -webkit-transform: scale(0.4);\\n\" + \" transform: scale(0.4);\\n\" + \" opacity: 0; }\\n\" + \" 80% {\\n\" + \" margin-top: -.375em;\\n\" + \" -webkit-transform: scale(1.15);\\n\" + \" transform: scale(1.15); }\\n\" + \" 100% {\\n\" + \" margin-top: 0;\\n\" + \" -webkit-transform: scale(1);\\n\" + \" transform: scale(1);\\n\" + \" opacity: 1; } }\\n\" + \"\\n\" + \"@keyframes swal2-animate-error-x-mark {\\n\" + \" 0% {\\n\" + \" margin-top: 1.625em;\\n\" + \" -webkit-transform: scale(0.4);\\n\" + \" transform: scale(0.4);\\n\" + \" opacity: 0; }\\n\" + \" 50% {\\n\" + \" margin-top: 1.625em;\\n\" + \" -webkit-transform: scale(0.4);\\n\" + \" transform: scale(0.4);\\n\" + \" opacity: 0; }\\n\" + \" 80% {\\n\" + \" margin-top: -.375em;\\n\" + \" -webkit-transform: scale(1.15);\\n\" + \" transform: scale(1.15); }\\n\" + \" 100% {\\n\" + \" margin-top: 0;\\n\" + \" -webkit-transform: scale(1);\\n\" + \" transform: scale(1);\\n\" + \" opacity: 1; } }\\n\" + \"\\n\" + \"@-webkit-keyframes swal2-animate-error-icon {\\n\" + \" 0% {\\n\" + \" -webkit-transform: rotateX(100deg);\\n\" + \" transform: rotateX(100deg);\\n\" + \" opacity: 0; }\\n\" + \" 100% {\\n\" + \" -webkit-transform: rotateX(0deg);\\n\" + \" transform: rotateX(0deg);\\n\" + \" opacity: 1; } }\\n\" + \"\\n\" + \"@keyframes swal2-animate-error-icon {\\n\" + \" 0% {\\n\" + \" -webkit-transform: rotateX(100deg);\\n\" + \" transform: rotateX(100deg);\\n\" + \" opacity: 0; }\\n\" + \" 100% {\\n\" + \" -webkit-transform: rotateX(0deg);\\n\" + \" transform: rotateX(0deg);\\n\" + \" opacity: 1; } }\\n\" + \"\\n\" + \"body.swal2-toast-shown .swal2-container {\\n\" + \" position: fixed;\\n\" + \" background-color: transparent; }\\n\" + \" body.swal2-toast-shown .swal2-container.swal2-shown {\\n\" + \" background-color: transparent; }\\n\" + \" body.swal2-toast-shown .swal2-container.swal2-top {\\n\" + \" top: 0;\\n\" + \" right: auto;\\n\" + \" bottom: auto;\\n\" + \" left: 50%;\\n\" + \" -webkit-transform: translateX(-50%);\\n\" + \" transform: translateX(-50%); }\\n\" + \" body.swal2-toast-shown .swal2-container.swal2-top-end, body.swal2-toast-shown .swal2-container.swal2-top-right {\\n\" + \" top: 0;\\n\" + \" right: 0;\\n\" + \" bottom: auto;\\n\" + \" left: auto; }\\n\" + \" body.swal2-toast-shown .swal2-container.swal2-top-start, body.swal2-toast-shown .swal2-container.swal2-top-left {\\n\" + \" top: 0;\\n\" + \" right: auto;\\n\" + \" bottom: auto;\\n\" + \" left: 0; }\\n\" + \" body.swal2-toast-shown .swal2-container.swal2-center-start, body.swal2-toast-shown .swal2-container.swal2-center-left {\\n\" + \" top: 50%;\\n\" + \" right: auto;\\n\" + \" bottom: auto;\\n\" + \" left: 0;\\n\" + \" -webkit-transform: translateY(-50%);\\n\" + \" transform: translateY(-50%); }\\n\" + \" body.swal2-toast-shown .swal2-container.swal2-center {\\n\" + \" top: 50%;\\n\" + \" right: auto;\\n\" + \" bottom: auto;\\n\" + \" left: 50%;\\n\" + \" -webkit-transform: translate(-50%, -50%);\\n\" + \" transform: translate(-50%, -50%); }\\n\" + \" body.swal2-toast-shown .swal2-container.swal2-center-end, body.swal2-toast-shown .swal2-container.swal2-center-right {\\n\" + \" top: 50%;\\n\" + \" right: 0;\\n\" + \" bottom: auto;\\n\" + \" left: auto;\\n\" + \" -webkit-transform: translateY(-50%);\\n\" + \" transform: translateY(-50%); }\\n\" + \" body.swal2-toast-shown .swal2-container.swal2-bottom-start, body.swal2-toast-shown .swal2-container.swal2-bottom-left {\\n\" + \" top: auto;\\n\" + \" right: auto;\\n\" + \" bottom: 0;\\n\" + \" left: 0; }\\n\" + \" body.swal2-toast-shown .swal2-container.swal2-bottom {\\n\" + \" top: auto;\\n\" + \" right: auto;\\n\" + \" bottom: 0;\\n\" + \" left: 50%;\\n\" + \" -webkit-transform: translateX(-50%);\\n\" + \" transform: translateX(-50%); }\\n\" + \" body.swal2-toast-shown .swal2-container.swal2-bottom-end, body.swal2-toast-shown .swal2-container.swal2-bottom-right {\\n\" + \" top: auto;\\n\" + \" right: 0;\\n\" + \" bottom: 0;\\n\" + \" left: auto; }\\n\" + \"\\n\" + \"body.swal2-toast-column .swal2-toast {\\n\" + \" flex-direction: column;\\n\" + \" align-items: stretch; }\\n\" + \" body.swal2-toast-column .swal2-toast .swal2-actions {\\n\" + \" flex: 1;\\n\" + \" align-self: stretch;\\n\" + \" height: 2.2em;\\n\" + \" margin-top: .3125em; }\\n\" + \" body.swal2-toast-column .swal2-toast .swal2-loading {\\n\" + \" justify-content: center; }\\n\" + \" body.swal2-toast-column .swal2-toast .swal2-input {\\n\" + \" height: 2em;\\n\" + \" margin: .3125em auto;\\n\" + \" font-size: 1em; }\\n\" + \" body.swal2-toast-column .swal2-toast .swal2-validationerror {\\n\" + \" font-size: 1em; }\\n\" + \"\\n\" + \".swal2-popup.swal2-toast {\\n\" + \" flex-direction: row;\\n\" + \" align-items: center;\\n\" + \" width: auto;\\n\" + \" padding: 0.625em;\\n\" + \" box-shadow: 0 0 0.625em #d9d9d9;\\n\" + \" overflow-y: hidden; }\\n\" + \" .swal2-popup.swal2-toast .swal2-header {\\n\" + \" flex-direction: row; }\\n\" + \" .swal2-popup.swal2-toast .swal2-title {\\n\" + \" flex-grow: 1;\\n\" + \" justify-content: flex-start;\\n\" + \" margin: 0 .6em;\\n\" + \" font-size: 1em; }\\n\" + \" .swal2-popup.swal2-toast .swal2-footer {\\n\" + \" margin: 0.5em 0 0;\\n\" + \" padding: 0.5em 0 0;\\n\" + \" font-size: 0.8em; }\\n\" + \" .swal2-popup.swal2-toast .swal2-close {\\n\" + \" position: initial;\\n\" + \" width: 0.8em;\\n\" + \" height: 0.8em;\\n\" + \" line-height: 0.8; }\\n\" + \" .swal2-popup.swal2-toast .swal2-content {\\n\" + \" justify-content: flex-start;\\n\" + \" font-size: 1em; }\\n\" + \" .swal2-popup.swal2-toast .swal2-icon {\\n\" + \" width: 2em;\\n\" + \" min-width: 2em;\\n\" + \" height: 2em;\\n\" + \" margin: 0; }\\n\" + \" .swal2-popup.swal2-toast .swal2-icon-text {\\n\" + \" font-size: 2em;\\n\" + \" font-weight: bold;\\n\" + \" line-height: 1em; }\\n\" + \" .swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring {\\n\" + \" width: 2em;\\n\" + \" height: 2em; }\\n\" + \" .swal2-popup.swal2-toast .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {\\n\" + \" top: .875em;\\n\" + \" width: 1.375em; }\\n\" + \" .swal2-popup.swal2-toast .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='left'] {\\n\" + \" left: .3125em; }\\n\" + \" .swal2-popup.swal2-toast .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='right'] {\\n\" + \" right: .3125em; }\\n\" + \" .swal2-popup.swal2-toast .swal2-actions {\\n\" + \" height: auto;\\n\" + \" margin: 0 .3125em; }\\n\" + \" .swal2-popup.swal2-toast .swal2-styled {\\n\" + \" margin: 0 .3125em;\\n\" + \" padding: .3125em .625em;\\n\" + \" font-size: 1em; }\\n\" + \" .swal2-popup.swal2-toast .swal2-styled:focus {\\n\" + \" box-shadow: 0 0 0 0.0625em #fff, 0 0 0 0.125em rgba(50, 100, 150, 0.4); }\\n\" + \" .swal2-popup.swal2-toast .swal2-success {\\n\" + \" border-color: #a5dc86; }\\n\" + \" .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-circular-line'] {\\n\" + \" position: absolute;\\n\" + \" width: 2em;\\n\" + \" height: 2.8125em;\\n\" + \" -webkit-transform: rotate(45deg);\\n\" + \" transform: rotate(45deg);\\n\" + \" border-radius: 50%; }\\n\" + \" .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-circular-line'][class$='left'] {\\n\" + \" top: -.25em;\\n\" + \" left: -.9375em;\\n\" + \" -webkit-transform: rotate(-45deg);\\n\" + \" transform: rotate(-45deg);\\n\" + \" -webkit-transform-origin: 2em 2em;\\n\" + \" transform-origin: 2em 2em;\\n\" + \" border-radius: 4em 0 0 4em; }\\n\" + \" .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-circular-line'][class$='right'] {\\n\" + \" top: -.25em;\\n\" + \" left: .9375em;\\n\" + \" -webkit-transform-origin: 0 2em;\\n\" + \" transform-origin: 0 2em;\\n\" + \" border-radius: 0 4em 4em 0; }\\n\" + \" .swal2-popup.swal2-toast .swal2-success .swal2-success-ring {\\n\" + \" width: 2em;\\n\" + \" height: 2em; }\\n\" + \" .swal2-popup.swal2-toast .swal2-success .swal2-success-fix {\\n\" + \" top: 0;\\n\" + \" left: .4375em;\\n\" + \" width: .4375em;\\n\" + \" height: 2.6875em; }\\n\" + \" .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-line'] {\\n\" + \" height: .3125em; }\\n\" + \" .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-line'][class$='tip'] {\\n\" + \" top: 1.125em;\\n\" + \" left: .1875em;\\n\" + \" width: .75em; }\\n\" + \" .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-line'][class$='long'] {\\n\" + \" top: .9375em;\\n\" + \" right: .1875em;\\n\" + \" width: 1.375em; }\\n\" + \" .swal2-popup.swal2-toast.swal2-show {\\n\" + \" -webkit-animation: showSweetToast .5s;\\n\" + \" animation: showSweetToast .5s; }\\n\" + \" .swal2-popup.swal2-toast.swal2-hide {\\n\" + \" -webkit-animation: hideSweetToast .2s forwards;\\n\" + \" animation: hideSweetToast .2s forwards; }\\n\" + \" .swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-tip {\\n\" + \" -webkit-animation: animate-toast-success-tip .75s;\\n\" + \" animation: animate-toast-success-tip .75s; }\\n\" + \" .swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-long {\\n\" + \" -webkit-animation: animate-toast-success-long .75s;\\n\" + \" animation: animate-toast-success-long .75s; }\\n\" + \"\\n\" + \"@-webkit-keyframes showSweetToast {\\n\" + \" 0% {\\n\" + \" -webkit-transform: translateY(-0.625em) rotateZ(2deg);\\n\" + \" transform: translateY(-0.625em) rotateZ(2deg);\\n\" + \" opacity: 0; }\\n\" + \" 33% {\\n\" + \" -webkit-transform: translateY(0) rotateZ(-2deg);\\n\" + \" transform: translateY(0) rotateZ(-2deg);\\n\" + \" opacity: .5; }\\n\" + \" 66% {\\n\" + \" -webkit-transform: translateY(0.3125em) rotateZ(2deg);\\n\" + \" transform: translateY(0.3125em) rotateZ(2deg);\\n\" + \" opacity: .7; }\\n\" + \" 100% {\\n\" + \" -webkit-transform: translateY(0) rotateZ(0);\\n\" + \" transform: translateY(0) rotateZ(0);\\n\" + \" opacity: 1; } }\\n\" + \"\\n\" + \"@keyframes showSweetToast {\\n\" + \" 0% {\\n\" + \" -webkit-transform: translateY(-0.625em) rotateZ(2deg);\\n\" + \" transform: translateY(-0.625em) rotateZ(2deg);\\n\" + \" opacity: 0; }\\n\" + \" 33% {\\n\" + \" -webkit-transform: translateY(0) rotateZ(-2deg);\\n\" + \" transform: translateY(0) rotateZ(-2deg);\\n\" + \" opacity: .5; }\\n\" + \" 66% {\\n\" + \" -webkit-transform: translateY(0.3125em) rotateZ(2deg);\\n\" + \" transform: translateY(0.3125em) rotateZ(2deg);\\n\" + \" opacity: .7; }\\n\" + \" 100% {\\n\" + \" -webkit-transform: translateY(0) rotateZ(0);\\n\" + \" transform: translateY(0) rotateZ(0);\\n\" + \" opacity: 1; } }\\n\" + \"\\n\" + \"@-webkit-keyframes hideSweetToast {\\n\" + \" 0% {\\n\" + \" opacity: 1; }\\n\" + \" 33% {\\n\" + \" opacity: .5; }\\n\" + \" 100% {\\n\" + \" -webkit-transform: rotateZ(1deg);\\n\" + \" transform: rotateZ(1deg);\\n\" + \" opacity: 0; } }\\n\" + \"\\n\" + \"@keyframes hideSweetToast {\\n\" + \" 0% {\\n\" + \" opacity: 1; }\\n\" + \" 33% {\\n\" + \" opacity: .5; }\\n\" + \" 100% {\\n\" + \" -webkit-transform: rotateZ(1deg);\\n\" + \" transform: rotateZ(1deg);\\n\" + \" opacity: 0; } }\\n\" + \"\\n\" + \"@-webkit-keyframes animate-toast-success-tip {\\n\" + \" 0% {\\n\" + \" top: .5625em;\\n\" + \" left: .0625em;\\n\" + \" width: 0; }\\n\" + \" 54% {\\n\" + \" top: .125em;\\n\" + \" left: .125em;\\n\" + \" width: 0; }\\n\" + \" 70% {\\n\" + \" top: .625em;\\n\" + \" left: -.25em;\\n\" + \" width: 1.625em; }\\n\" + \" 84% {\\n\" + \" top: 1.0625em;\\n\" + \" left: .75em;\\n\" + \" width: .5em; }\\n\" + \" 100% {\\n\" + \" top: 1.125em;\\n\" + \" left: .1875em;\\n\" + \" width: .75em; } }\\n\" + \"\\n\" + \"@keyframes animate-toast-success-tip {\\n\" + \" 0% {\\n\" + \" top: .5625em;\\n\" + \" left: .0625em;\\n\" + \" width: 0; }\\n\" + \" 54% {\\n\" + \" top: .125em;\\n\" + \" left: .125em;\\n\" + \" width: 0; }\\n\" + \" 70% {\\n\" + \" top: .625em;\\n\" + \" left: -.25em;\\n\" + \" width: 1.625em; }\\n\" + \" 84% {\\n\" + \" top: 1.0625em;\\n\" + \" left: .75em;\\n\" + \" width: .5em; }\\n\" + \" 100% {\\n\" + \" top: 1.125em;\\n\" + \" left: .1875em;\\n\" + \" width: .75em; } }\\n\" + \"\\n\" + \"@-webkit-keyframes animate-toast-success-long {\\n\" + \" 0% {\\n\" + \" top: 1.625em;\\n\" + \" right: 1.375em;\\n\" + \" width: 0; }\\n\" + \" 65% {\\n\" + \" top: 1.25em;\\n\" + \" right: .9375em;\\n\" + \" width: 0; }\\n\" + \" 84% {\\n\" + \" top: .9375em;\\n\" + \" right: 0;\\n\" + \" width: 1.125em; }\\n\" + \" 100% {\\n\" + \" top: .9375em;\\n\" + \" right: .1875em;\\n\" + \" width: 1.375em; } }\\n\" + \"\\n\" + \"@keyframes animate-toast-success-long {\\n\" + \" 0% {\\n\" + \" top: 1.625em;\\n\" + \" right: 1.375em;\\n\" + \" width: 0; }\\n\" + \" 65% {\\n\" + \" top: 1.25em;\\n\" + \" right: .9375em;\\n\" + \" width: 0; }\\n\" + \" 84% {\\n\" + \" top: .9375em;\\n\" + \" right: 0;\\n\" + \" width: 1.125em; }\\n\" + \" 100% {\\n\" + \" top: .9375em;\\n\" + \" right: .1875em;\\n\" + \" width: 1.375em; } }\\n\" + \"\\n\" + \"body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {\\n\" + \" overflow-y: hidden; }\\n\" + \"\\n\" + \"body.swal2-height-auto {\\n\" + \" height: auto !important; }\\n\" + \"\\n\" + \"body.swal2-no-backdrop .swal2-shown {\\n\" + \" top: auto;\\n\" + \" right: auto;\\n\" + \" bottom: auto;\\n\" + \" left: auto;\\n\" + \" background-color: transparent; }\\n\" + \" body.swal2-no-backdrop .swal2-shown > .swal2-modal {\\n\" + \" box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); }\\n\" + \" body.swal2-no-backdrop .swal2-shown.swal2-top {\\n\" + \" top: 0;\\n\" + \" left: 50%;\\n\" + \" -webkit-transform: translateX(-50%);\\n\" + \" transform: translateX(-50%); }\\n\" + \" body.swal2-no-backdrop .swal2-shown.swal2-top-start, body.swal2-no-backdrop .swal2-shown.swal2-top-left {\\n\" + \" top: 0;\\n\" + \" left: 0; }\\n\" + \" body.swal2-no-backdrop .swal2-shown.swal2-top-end, body.swal2-no-backdrop .swal2-shown.swal2-top-right {\\n\" + \" top: 0;\\n\" + \" right: 0; }\\n\" + \" body.swal2-no-backdrop .swal2-shown.swal2-center {\\n\" + \" top: 50%;\\n\" + \" left: 50%;\\n\" + \" -webkit-transform: translate(-50%, -50%);\\n\" + \" transform: translate(-50%, -50%); }\\n\" + \" body.swal2-no-backdrop .swal2-shown.swal2-center-start, body.swal2-no-backdrop .swal2-shown.swal2-center-left {\\n\" + \" top: 50%;\\n\" + \" left: 0;\\n\" + \" -webkit-transform: translateY(-50%);\\n\" + \" transform: translateY(-50%); }\\n\" + \" body.swal2-no-backdrop .swal2-shown.swal2-center-end, body.swal2-no-backdrop .swal2-shown.swal2-center-right {\\n\" + \" top: 50%;\\n\" + \" right: 0;\\n\" + \" -webkit-transform: translateY(-50%);\\n\" + \" transform: translateY(-50%); }\\n\" + \" body.swal2-no-backdrop .swal2-shown.swal2-bottom {\\n\" + \" bottom: 0;\\n\" + \" left: 50%;\\n\" + \" -webkit-transform: translateX(-50%);\\n\" + \" transform: translateX(-50%); }\\n\" + \" body.swal2-no-backdrop .swal2-shown.swal2-bottom-start, body.swal2-no-backdrop .swal2-shown.swal2-bottom-left {\\n\" + \" bottom: 0;\\n\" + \" left: 0; }\\n\" + \" body.swal2-no-backdrop .swal2-shown.swal2-bottom-end, body.swal2-no-backdrop .swal2-shown.swal2-bottom-right {\\n\" + \" right: 0;\\n\" + \" bottom: 0; }\\n\" + \"\\n\" + \".swal2-container {\\n\" + \" display: flex;\\n\" + \" position: fixed;\\n\" + \" top: 0;\\n\" + \" right: 0;\\n\" + \" bottom: 0;\\n\" + \" left: 0;\\n\" + \" flex-direction: row;\\n\" + \" align-items: center;\\n\" + \" justify-content: center;\\n\" + \" padding: 10px;\\n\" + \" background-color: transparent;\\n\" + \" z-index: 1060;\\n\" + \" overflow-x: hidden;\\n\" + \" -webkit-overflow-scrolling: touch; }\\n\" + \" .swal2-container.swal2-top {\\n\" + \" align-items: flex-start; }\\n\" + \" .swal2-container.swal2-top-start, .swal2-container.swal2-top-left {\\n\" + \" align-items: flex-start;\\n\" + \" justify-content: flex-start; }\\n\" + \" .swal2-container.swal2-top-end, .swal2-container.swal2-top-right {\\n\" + \" align-items: flex-start;\\n\" + \" justify-content: flex-end; }\\n\" + \" .swal2-container.swal2-center {\\n\" + \" align-items: center; }\\n\" + \" .swal2-container.swal2-center-start, .swal2-container.swal2-center-left {\\n\" + \" align-items: center;\\n\" + \" justify-content: flex-start; }\\n\" + \" .swal2-container.swal2-center-end, .swal2-container.swal2-center-right {\\n\" + \" align-items: center;\\n\" + \" justify-content: flex-end; }\\n\" + \" .swal2-container.swal2-bottom {\\n\" + \" align-items: flex-end; }\\n\" + \" .swal2-container.swal2-bottom-start, .swal2-container.swal2-bottom-left {\\n\" + \" align-items: flex-end;\\n\" + \" justify-content: flex-start; }\\n\" + \" .swal2-container.swal2-bottom-end, .swal2-container.swal2-bottom-right {\\n\" + \" align-items: flex-end;\\n\" + \" justify-content: flex-end; }\\n\" + \" .swal2-container.swal2-grow-fullscreen > .swal2-modal {\\n\" + \" display: flex !important;\\n\" + \" flex: 1;\\n\" + \" align-self: stretch;\\n\" + \" justify-content: center; }\\n\" + \" .swal2-container.swal2-grow-row > .swal2-modal {\\n\" + \" display: flex !important;\\n\" + \" flex: 1;\\n\" + \" align-content: center;\\n\" + \" justify-content: center; }\\n\" + \" .swal2-container.swal2-grow-column {\\n\" + \" flex: 1;\\n\" + \" flex-direction: column; }\\n\" + \" .swal2-container.swal2-grow-column.swal2-top, .swal2-container.swal2-grow-column.swal2-center, .swal2-container.swal2-grow-column.swal2-bottom {\\n\" + \" align-items: center; }\\n\" + \" .swal2-container.swal2-grow-column.swal2-top-start, .swal2-container.swal2-grow-column.swal2-center-start, .swal2-container.swal2-grow-column.swal2-bottom-start, .swal2-container.swal2-grow-column.swal2-top-left, .swal2-container.swal2-grow-column.swal2-center-left, .swal2-container.swal2-grow-column.swal2-bottom-left {\\n\" + \" align-items: flex-start; }\\n\" + \" .swal2-container.swal2-grow-column.swal2-top-end, .swal2-container.swal2-grow-column.swal2-center-end, .swal2-container.swal2-grow-column.swal2-bottom-end, .swal2-container.swal2-grow-column.swal2-top-right, .swal2-container.swal2-grow-column.swal2-center-right, .swal2-container.swal2-grow-column.swal2-bottom-right {\\n\" + \" align-items: flex-end; }\\n\" + \" .swal2-container.swal2-grow-column > .swal2-modal {\\n\" + \" display: flex !important;\\n\" + \" flex: 1;\\n\" + \" align-content: center;\\n\" + \" justify-content: center; }\\n\" + \" .swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen) > .swal2-modal {\\n\" + \" margin: auto; }\\n\" + \" @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\\n\" + \" .swal2-container .swal2-modal {\\n\" + \" margin: 0 !important; } }\\n\" + \" .swal2-container.swal2-fade {\\n\" + \" transition: background-color .1s; }\\n\" + \" .swal2-container.swal2-shown {\\n\" + \" background-color: rgba(0, 0, 0, 0.4); }\\n\" + \"\\n\" + \".swal2-popup {\\n\" + \" display: none;\\n\" + \" position: relative;\\n\" + \" flex-direction: column;\\n\" + \" justify-content: center;\\n\" + \" width: 32em;\\n\" + \" max-width: 100%;\\n\" + \" padding: 1.25em;\\n\" + \" border-radius: 0.3125em;\\n\" + \" background: #fff;\\n\" + \" font-family: inherit;\\n\" + \" font-size: 1rem;\\n\" + \" box-sizing: border-box; }\\n\" + \" .swal2-popup:focus {\\n\" + \" outline: none; }\\n\" + \" .swal2-popup.swal2-loading {\\n\" + \" overflow-y: hidden; }\\n\" + \" .swal2-popup .swal2-header {\\n\" + \" display: flex;\\n\" + \" flex-direction: column;\\n\" + \" align-items: center; }\\n\" + \" .swal2-popup .swal2-title {\\n\" + \" display: block;\\n\" + \" position: relative;\\n\" + \" max-width: 100%;\\n\" + \" margin: 0 0 0.4em;\\n\" + \" padding: 0;\\n\" + \" color: #595959;\\n\" + \" font-size: 1.875em;\\n\" + \" font-weight: 600;\\n\" + \" text-align: center;\\n\" + \" text-transform: none;\\n\" + \" word-wrap: break-word; }\\n\" + \" .swal2-popup .swal2-actions {\\n\" + \" flex-wrap: wrap;\\n\" + \" align-items: center;\\n\" + \" justify-content: center;\\n\" + \" margin: 1.25em auto 0;\\n\" + \" z-index: 1; }\\n\" + \" .swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled[disabled] {\\n\" + \" opacity: .4; }\\n\" + \" .swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled:hover {\\n\" + \" background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)); }\\n\" + \" .swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled:active {\\n\" + \" background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)); }\\n\" + \" .swal2-popup .swal2-actions.swal2-loading .swal2-styled.swal2-confirm {\\n\" + \" width: 2.5em;\\n\" + \" height: 2.5em;\\n\" + \" margin: .46875em;\\n\" + \" padding: 0;\\n\" + \" border: .25em solid transparent;\\n\" + \" border-radius: 100%;\\n\" + \" border-color: transparent;\\n\" + \" background-color: transparent !important;\\n\" + \" color: transparent;\\n\" + \" cursor: default;\\n\" + \" box-sizing: border-box;\\n\" + \" -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal;\\n\" + \" animation: swal2-rotate-loading 1.5s linear 0s infinite normal;\\n\" + \" -webkit-user-select: none;\\n\" + \" -moz-user-select: none;\\n\" + \" -ms-user-select: none;\\n\" + \" user-select: none; }\\n\" + \" .swal2-popup .swal2-actions.swal2-loading .swal2-styled.swal2-cancel {\\n\" + \" margin-right: 30px;\\n\" + \" margin-left: 30px; }\\n\" + \" .swal2-popup .swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after {\\n\" + \" display: inline-block;\\n\" + \" width: 15px;\\n\" + \" height: 15px;\\n\" + \" margin-left: 5px;\\n\" + \" border: 3px solid #999999;\\n\" + \" border-radius: 50%;\\n\" + \" border-right-color: transparent;\\n\" + \" box-shadow: 1px 1px 1px #fff;\\n\" + \" content: '';\\n\" + \" -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal;\\n\" + \" animation: swal2-rotate-loading 1.5s linear 0s infinite normal; }\\n\" + \" .swal2-popup .swal2-styled {\\n\" + \" margin: .3125em;\\n\" + \" padding: .625em 2em;\\n\" + \" font-weight: 500;\\n\" + \" box-shadow: none; }\\n\" + \" .swal2-popup .swal2-styled:not([disabled]) {\\n\" + \" cursor: pointer; }\\n\" + \" .swal2-popup .swal2-styled.swal2-confirm {\\n\" + \" border: 0;\\n\" + \" border-radius: 0.25em;\\n\" + \" background: initial;\\n\" + \" background-color: #3085d6;\\n\" + \" color: #fff;\\n\" + \" font-size: 1.0625em; }\\n\" + \" .swal2-popup .swal2-styled.swal2-cancel {\\n\" + \" border: 0;\\n\" + \" border-radius: 0.25em;\\n\" + \" background: initial;\\n\" + \" background-color: #aaa;\\n\" + \" color: #fff;\\n\" + \" font-size: 1.0625em; }\\n\" + \" .swal2-popup .swal2-styled:focus {\\n\" + \" outline: none;\\n\" + \" box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(50, 100, 150, 0.4); }\\n\" + \" .swal2-popup .swal2-styled::-moz-focus-inner {\\n\" + \" border: 0; }\\n\" + \" .swal2-popup .swal2-footer {\\n\" + \" justify-content: center;\\n\" + \" margin: 1.25em 0 0;\\n\" + \" padding: 1em 0 0;\\n\" + \" border-top: 1px solid #eee;\\n\" + \" color: #545454;\\n\" + \" font-size: 1em; }\\n\" + \" .swal2-popup .swal2-image {\\n\" + \" max-width: 100%;\\n\" + \" margin: 1.25em auto; }\\n\" + \" .swal2-popup .swal2-close {\\n\" + \" position: absolute;\\n\" + \" top: 0;\\n\" + \" right: 0;\\n\" + \" justify-content: center;\\n\" + \" width: 1.2em;\\n\" + \" height: 1.2em;\\n\" + \" padding: 0;\\n\" + \" transition: color 0.1s ease-out;\\n\" + \" border: none;\\n\" + \" border-radius: 0;\\n\" + \" background: transparent;\\n\" + \" color: #cccccc;\\n\" + \" font-family: serif;\\n\" + \" font-size: 2.5em;\\n\" + \" line-height: 1.2;\\n\" + \" cursor: pointer;\\n\" + \" overflow: hidden; }\\n\" + \" .swal2-popup .swal2-close:hover {\\n\" + \" -webkit-transform: none;\\n\" + \" transform: none;\\n\" + \" color: #f27474; }\\n\" + \" .swal2-popup > .swal2-input,\\n\" + \" .swal2-popup > .swal2-file,\\n\" + \" .swal2-popup > .swal2-textarea,\\n\" + \" .swal2-popup > .swal2-select,\\n\" + \" .swal2-popup > .swal2-radio,\\n\" + \" .swal2-popup > .swal2-checkbox {\\n\" + \" display: none; }\\n\" + \" .swal2-popup .swal2-content {\\n\" + \" justify-content: center;\\n\" + \" margin: 0;\\n\" + \" padding: 0;\\n\" + \" color: #545454;\\n\" + \" font-size: 1.125em;\\n\" + \" font-weight: 300;\\n\" + \" line-height: normal;\\n\" + \" z-index: 1;\\n\" + \" word-wrap: break-word; }\\n\" + \" .swal2-popup #swal2-content {\\n\" + \" text-align: center; }\\n\" + \" .swal2-popup .swal2-input,\\n\" + \" .swal2-popup .swal2-file,\\n\" + \" .swal2-popup .swal2-textarea,\\n\" + \" .swal2-popup .swal2-select,\\n\" + \" .swal2-popup .swal2-radio,\\n\" + \" .swal2-popup .swal2-checkbox {\\n\" + \" margin: 1em auto; }\\n\" + \" .swal2-popup .swal2-input,\\n\" + \" .swal2-popup .swal2-file,\\n\" + \" .swal2-popup .swal2-textarea {\\n\" + \" width: 100%;\\n\" + \" transition: border-color .3s, box-shadow .3s;\\n\" + \" border: 1px solid #d9d9d9;\\n\" + \" border-radius: 0.1875em;\\n\" + \" font-size: 1.125em;\\n\" + \" box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06);\\n\" + \" box-sizing: border-box; }\\n\" + \" .swal2-popup .swal2-input.swal2-inputerror,\\n\" + \" .swal2-popup .swal2-file.swal2-inputerror,\\n\" + \" .swal2-popup .swal2-textarea.swal2-inputerror {\\n\" + \" border-color: #f27474 !important;\\n\" + \" box-shadow: 0 0 2px #f27474 !important; }\\n\" + \" .swal2-popup .swal2-input:focus,\\n\" + \" .swal2-popup .swal2-file:focus,\\n\" + \" .swal2-popup .swal2-textarea:focus {\\n\" + \" border: 1px solid #b4dbed;\\n\" + \" outline: none;\\n\" + \" box-shadow: 0 0 3px #c4e6f5; }\\n\" + \" .swal2-popup .swal2-input::-webkit-input-placeholder,\\n\" + \" .swal2-popup .swal2-file::-webkit-input-placeholder,\\n\" + \" .swal2-popup .swal2-textarea::-webkit-input-placeholder {\\n\" + \" color: #cccccc; }\\n\" + \" .swal2-popup .swal2-input:-ms-input-placeholder,\\n\" + \" .swal2-popup .swal2-file:-ms-input-placeholder,\\n\" + \" .swal2-popup .swal2-textarea:-ms-input-placeholder {\\n\" + \" color: #cccccc; }\\n\" + \" .swal2-popup .swal2-input::-ms-input-placeholder,\\n\" + \" .swal2-popup .swal2-file::-ms-input-placeholder,\\n\" + \" .swal2-popup .swal2-textarea::-ms-input-placeholder {\\n\" + \" color: #cccccc; }\\n\" + \" .swal2-popup .swal2-input::placeholder,\\n\" + \" .swal2-popup .swal2-file::placeholder,\\n\" + \" .swal2-popup .swal2-textarea::placeholder {\\n\" + \" color: #cccccc; }\\n\" + \" .swal2-popup .swal2-range input {\\n\" + \" width: 80%; }\\n\" + \" .swal2-popup .swal2-range output {\\n\" + \" width: 20%;\\n\" + \" font-weight: 600;\\n\" + \" text-align: center; }\\n\" + \" .swal2-popup .swal2-range input,\\n\" + \" .swal2-popup .swal2-range output {\\n\" + \" height: 2.625em;\\n\" + \" margin: 1em auto;\\n\" + \" padding: 0;\\n\" + \" font-size: 1.125em;\\n\" + \" line-height: 2.625em; }\\n\" + \" .swal2-popup .swal2-input {\\n\" + \" height: 2.625em;\\n\" + \" padding: 0 0.75em; }\\n\" + \" .swal2-popup .swal2-input[type='number'] {\\n\" + \" max-width: 10em; }\\n\" + \" .swal2-popup .swal2-file {\\n\" + \" font-size: 1.125em; }\\n\" + \" .swal2-popup .swal2-textarea {\\n\" + \" height: 6.75em;\\n\" + \" padding: 0.75em; }\\n\" + \" .swal2-popup .swal2-select {\\n\" + \" min-width: 50%;\\n\" + \" max-width: 100%;\\n\" + \" padding: .375em .625em;\\n\" + \" color: #545454;\\n\" + \" font-size: 1.125em; }\\n\" + \" .swal2-popup .swal2-radio,\\n\" + \" .swal2-popup .swal2-checkbox {\\n\" + \" align-items: center;\\n\" + \" justify-content: center; }\\n\" + \" .swal2-popup .swal2-radio label,\\n\" + \" .swal2-popup .swal2-checkbox label {\\n\" + \" margin: 0 .6em;\\n\" + \" font-size: 1.125em; }\\n\" + \" .swal2-popup .swal2-radio input,\\n\" + \" .swal2-popup .swal2-checkbox input {\\n\" + \" margin: 0 .4em; }\\n\" + \" .swal2-popup .swal2-validationerror {\\n\" + \" display: none;\\n\" + \" align-items: center;\\n\" + \" justify-content: center;\\n\" + \" padding: 0.625em;\\n\" + \" background: #f0f0f0;\\n\" + \" color: #666666;\\n\" + \" font-size: 1em;\\n\" + \" font-weight: 300;\\n\" + \" overflow: hidden; }\\n\" + \" .swal2-popup .swal2-validationerror::before {\\n\" + \" display: inline-block;\\n\" + \" width: 1.5em;\\n\" + \" min-width: 1.5em;\\n\" + \" height: 1.5em;\\n\" + \" margin: 0 .625em;\\n\" + \" border-radius: 50%;\\n\" + \" background-color: #f27474;\\n\" + \" color: #fff;\\n\" + \" font-weight: 600;\\n\" + \" line-height: 1.5em;\\n\" + \" text-align: center;\\n\" + \" content: '!';\\n\" + \" zoom: normal; }\\n\" + \"\\n\" + \"@supports (-ms-accelerator: true) {\\n\" + \" .swal2-range input {\\n\" + \" width: 100% !important; }\\n\" + \" .swal2-range output {\\n\" + \" display: none; } }\\n\" + \"\\n\" + \"@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\\n\" + \" .swal2-range input {\\n\" + \" width: 100% !important; }\\n\" + \" .swal2-range output {\\n\" + \" display: none; } }\\n\" + \"\\n\" + \"@-moz-document url-prefix() {\\n\" + \" .swal2-close:focus {\\n\" + \" outline: 2px solid rgba(50, 100, 150, 0.4); } }\\n\" + \"\\n\" + \".swal2-icon {\\n\" + \" position: relative;\\n\" + \" justify-content: center;\\n\" + \" width: 5em;\\n\" + \" height: 5em;\\n\" + \" margin: 1.25em auto 1.875em;\\n\" + \" border: .25em solid transparent;\\n\" + \" border-radius: 50%;\\n\" + \" line-height: 5em;\\n\" + \" cursor: default;\\n\" + \" box-sizing: content-box;\\n\" + \" -webkit-user-select: none;\\n\" + \" -moz-user-select: none;\\n\" + \" -ms-user-select: none;\\n\" + \" user-select: none;\\n\" + \" zoom: normal; }\\n\" + \" .swal2-icon-text {\\n\" + \" font-size: 3.75em; }\\n\" + \" .swal2-icon.swal2-error {\\n\" + \" border-color: #f27474; }\\n\" + \" .swal2-icon.swal2-error .swal2-x-mark {\\n\" + \" position: relative;\\n\" + \" flex-grow: 1; }\\n\" + \" .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {\\n\" + \" display: block;\\n\" + \" position: absolute;\\n\" + \" top: 2.3125em;\\n\" + \" width: 2.9375em;\\n\" + \" height: .3125em;\\n\" + \" border-radius: .125em;\\n\" + \" background-color: #f27474; }\\n\" + \" .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='left'] {\\n\" + \" left: 1.0625em;\\n\" + \" -webkit-transform: rotate(45deg);\\n\" + \" transform: rotate(45deg); }\\n\" + \" .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='right'] {\\n\" + \" right: 1em;\\n\" + \" -webkit-transform: rotate(-45deg);\\n\" + \" transform: rotate(-45deg); }\\n\" + \" .swal2-icon.swal2-warning {\\n\" + \" border-color: #facea8;\\n\" + \" color: #f8bb86; }\\n\" + \" .swal2-icon.swal2-info {\\n\" + \" border-color: #9de0f6;\\n\" + \" color: #3fc3ee; }\\n\" + \" .swal2-icon.swal2-question {\\n\" + \" border-color: #c9dae1;\\n\" + \" color: #87adbd; }\\n\" + \" .swal2-icon.swal2-success {\\n\" + \" border-color: #a5dc86; }\\n\" + \" .swal2-icon.swal2-success [class^='swal2-success-circular-line'] {\\n\" + \" position: absolute;\\n\" + \" width: 3.75em;\\n\" + \" height: 7.5em;\\n\" + \" -webkit-transform: rotate(45deg);\\n\" + \" transform: rotate(45deg);\\n\" + \" border-radius: 50%; }\\n\" + \" .swal2-icon.swal2-success [class^='swal2-success-circular-line'][class$='left'] {\\n\" + \" top: -.4375em;\\n\" + \" left: -2.0635em;\\n\" + \" -webkit-transform: rotate(-45deg);\\n\" + \" transform: rotate(-45deg);\\n\" + \" -webkit-transform-origin: 3.75em 3.75em;\\n\" + \" transform-origin: 3.75em 3.75em;\\n\" + \" border-radius: 7.5em 0 0 7.5em; }\\n\" + \" .swal2-icon.swal2-success [class^='swal2-success-circular-line'][class$='right'] {\\n\" + \" top: -.6875em;\\n\" + \" left: 1.875em;\\n\" + \" -webkit-transform: rotate(-45deg);\\n\" + \" transform: rotate(-45deg);\\n\" + \" -webkit-transform-origin: 0 3.75em;\\n\" + \" transform-origin: 0 3.75em;\\n\" + \" border-radius: 0 7.5em 7.5em 0; }\\n\" + \" .swal2-icon.swal2-success .swal2-success-ring {\\n\" + \" position: absolute;\\n\" + \" top: -.25em;\\n\" + \" left: -.25em;\\n\" + \" width: 100%;\\n\" + \" height: 100%;\\n\" + \" border: 0.25em solid rgba(165, 220, 134, 0.3);\\n\" + \" border-radius: 50%;\\n\" + \" z-index: 2;\\n\" + \" box-sizing: content-box; }\\n\" + \" .swal2-icon.swal2-success .swal2-success-fix {\\n\" + \" position: absolute;\\n\" + \" top: .5em;\\n\" + \" left: 1.625em;\\n\" + \" width: .4375em;\\n\" + \" height: 5.625em;\\n\" + \" -webkit-transform: rotate(-45deg);\\n\" + \" transform: rotate(-45deg);\\n\" + \" z-index: 1; }\\n\" + \" .swal2-icon.swal2-success [class^='swal2-success-line'] {\\n\" + \" display: block;\\n\" + \" position: absolute;\\n\" + \" height: .3125em;\\n\" + \" border-radius: .125em;\\n\" + \" background-color: #a5dc86;\\n\" + \" z-index: 2; }\\n\" + \" .swal2-icon.swal2-success [class^='swal2-success-line'][class$='tip'] {\\n\" + \" top: 2.875em;\\n\" + \" left: .875em;\\n\" + \" width: 1.5625em;\\n\" + \" -webkit-transform: rotate(45deg);\\n\" + \" transform: rotate(45deg); }\\n\" + \" .swal2-icon.swal2-success [class^='swal2-success-line'][class$='long'] {\\n\" + \" top: 2.375em;\\n\" + \" right: .5em;\\n\" + \" width: 2.9375em;\\n\" + \" -webkit-transform: rotate(-45deg);\\n\" + \" transform: rotate(-45deg); }\\n\" + \"\\n\" + \".swal2-progresssteps {\\n\" + \" align-items: center;\\n\" + \" margin: 0 0 1.25em;\\n\" + \" padding: 0;\\n\" + \" font-weight: 600; }\\n\" + \" .swal2-progresssteps li {\\n\" + \" display: inline-block;\\n\" + \" position: relative; }\\n\" + \" .swal2-progresssteps .swal2-progresscircle {\\n\" + \" width: 2em;\\n\" + \" height: 2em;\\n\" + \" border-radius: 2em;\\n\" + \" background: #3085d6;\\n\" + \" color: #fff;\\n\" + \" line-height: 2em;\\n\" + \" text-align: center;\\n\" + \" z-index: 20; }\\n\" + \" .swal2-progresssteps .swal2-progresscircle:first-child {\\n\" + \" margin-left: 0; }\\n\" + \" .swal2-progresssteps .swal2-progresscircle:last-child {\\n\" + \" margin-right: 0; }\\n\" + \" .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep {\\n\" + \" background: #3085d6; }\\n\" + \" .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep ~ .swal2-progresscircle {\\n\" + \" background: #add8e6; }\\n\" + \" .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep ~ .swal2-progressline {\\n\" + \" background: #add8e6; }\\n\" + \" .swal2-progresssteps .swal2-progressline {\\n\" + \" width: 2.5em;\\n\" + \" height: .4em;\\n\" + \" margin: 0 -1px;\\n\" + \" background: #3085d6;\\n\" + \" z-index: 10; }\\n\" + \"\\n\" + \"[class^='swal2'] {\\n\" + \" -webkit-tap-highlight-color: transparent; }\\n\" + \"\\n\" + \".swal2-show {\\n\" + \" -webkit-animation: swal2-show 0.3s;\\n\" + \" animation: swal2-show 0.3s; }\\n\" + \" .swal2-show.swal2-noanimation {\\n\" + \" -webkit-animation: none;\\n\" + \" animation: none; }\\n\" + \"\\n\" + \".swal2-hide {\\n\" + \" -webkit-animation: swal2-hide 0.15s forwards;\\n\" + \" animation: swal2-hide 0.15s forwards; }\\n\" + \" .swal2-hide.swal2-noanimation {\\n\" + \" -webkit-animation: none;\\n\" + \" animation: none; }\\n\" + \"\\n\" + \"[dir='rtl'] .swal2-close {\\n\" + \" right: auto;\\n\" + \" left: 0; }\\n\" + \"\\n\" + \".swal2-animate-success-icon .swal2-success-line-tip {\\n\" + \" -webkit-animation: swal2-animate-success-line-tip 0.75s;\\n\" + \" animation: swal2-animate-success-line-tip 0.75s; }\\n\" + \"\\n\" + \".swal2-animate-success-icon .swal2-success-line-long {\\n\" + \" -webkit-animation: swal2-animate-success-line-long 0.75s;\\n\" + \" animation: swal2-animate-success-line-long 0.75s; }\\n\" + \"\\n\" + \".swal2-animate-success-icon .swal2-success-circular-line-right {\\n\" + \" -webkit-animation: swal2-rotate-success-circular-line 4.25s ease-in;\\n\" + \" animation: swal2-rotate-success-circular-line 4.25s ease-in; }\\n\" + \"\\n\" + \".swal2-animate-error-icon {\\n\" + \" -webkit-animation: swal2-animate-error-icon 0.5s;\\n\" + \" animation: swal2-animate-error-icon 0.5s; }\\n\" + \" .swal2-animate-error-icon .swal2-x-mark {\\n\" + \" -webkit-animation: swal2-animate-error-x-mark 0.5s;\\n\" + \" animation: swal2-animate-error-x-mark 0.5s; }\\n\" + \"\\n\" + \"@-webkit-keyframes swal2-rotate-loading {\\n\" + \" 0% {\\n\" + \" -webkit-transform: rotate(0deg);\\n\" + \" transform: rotate(0deg); }\\n\" + \" 100% {\\n\" + \" -webkit-transform: rotate(360deg);\\n\" + \" transform: rotate(360deg); } }\\n\" + \"\\n\" + \"@keyframes swal2-rotate-loading {\\n\" + \" 0% {\\n\" + \" -webkit-transform: rotate(0deg);\\n\" + \" transform: rotate(0deg); }\\n\" + \" 100% {\\n\" + \" -webkit-transform: rotate(360deg);\\n\" + \" transform: rotate(360deg); } }\");","/* eslint no-console:0 */\n// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/javascript and only use these pack files to reference\n// that code so it'll be compiled.\n//\n// To reference this file, add <%= javascript_packs_with_chunks_tag 'application' %> to the appropriate\n// layout file, like app/views/layouts/application.html.erb\n\n// console.log('Hello World from Webpacker')\n\nimport \"./awesome-font-config\";\nimport \"jquery\";\nimport \"@babel/polyfill\";\nimport \"bootstrap\";\nimport \"chart.js\";\nimport \"select2\";\nimport linkifyJq from \"linkify-jquery\";\n\nimport datePicker from \"pc-bootstrap4-datetimepicker\";\nconst moment = require(\"moment\");\n\nimport \"../stylesheets/application.scss\";\n\nimport \"@stimulus/polyfills\";\nimport { Application } from \"stimulus\";\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\";\n\nconst application = Application.start();\nconst context = require.context(\"controllers\", true, /.js$/);\napplication.load(definitionsFromContext(context));\n\nimport PDFObject from \"pdfobject\";\nwindow.PDFObject = PDFObject;\n\nimport swal from \"sweetalert2\";\nwindow.swal = swal;\n\nconst $ = require(\"jquery\");\nwindow.$ = $;\nwindow.jQuery = $;\nlinkifyJq($, document);\n\n$(document).ready(function () {\n // javascript hackery of checkbox and radio classes to get around simple forms inadequacies\n $(\".collection_check_boxes, .collection_radio_buttons\").addClass(\n \"custom-control-label\",\n );\n $(\"label.checkbox .custom-control-input.boolean\").each(\n function (i, checkbox) {\n var $checkbox = $(checkbox);\n var $label = $checkbox.closest(\"label\");\n $label.after($checkbox);\n $label.remove();\n },\n );\n $(\".form-group.radio_buttons\").removeClass(\"radio_buttons\");\n $(\".radio.custom-control\").removeClass(\"radio\");\n $(\".custom-control-input.radio_buttons\")\n .removeClass(\"radio_buttons\")\n .removeClass(\"form-control\");\n $(\".collection_radio_buttons.custom-control-label\").removeClass(\n \"collection_radio_buttons\",\n );\n // end -- simple form hackery\n\n // file attachment set text after selecting file\n $(\".file-attachment-holder\").on(\"change\", \".custom-file-input\", function () {\n var fileName = $(this).val();\n $(this).next(\".custom-file-label\").html(fileName);\n });\n\n // Rendering links as <a> in /o/tickets/68123\n $(\".ticket-reply-body\").each(function (el) {\n $(this).linkify({\n defaultProtocol: \"https\",\n });\n });\n\n $('[data-toggle=\"tooltip\"]').tooltip();\n\n // $.fn.select2.defaults.set( \"theme\", \"bootstrap4\" );\n $(\"select\")\n .not(\".standard-input\")\n .select2({ width: \"resolve\", minimumResultsForSearch: 20 });\n\n $('input[type=\"file\"]').on(\"change\", 'input[type=\"file\"]', function (e) {\n var fileName = e.target.files[0].name;\n $(e).html(fileName);\n });\n\n $(\".datetime-holder\").not(\".standard-input\").datetimepicker({\n format: \"Do MMMM YYYY\",\n defaultDate: moment(),\n });\n\n $(\".datetime-holder\")\n .not(\".standard-input\")\n .datetimepicker()\n .on(\"dp.change\", function () {\n var hidden = $(this).next(\"input\");\n var picker = $(this).data(\"DateTimePicker\");\n\n var date = picker.date();\n\n var clear = $(this)\n .closest(\".datetime-holder\")\n .find(\".input-group-append.clear\");\n\n if (clear) {\n if (date) {\n hidden.val(date.format());\n clear.css({ display: \"table-cell\" });\n } else {\n hidden.val(\"\");\n clear.css({ display: \"none\" });\n }\n }\n })\n .on(\"dp.hide\", function (e) {\n e.target.blur();\n })\n .find(\".input-group-append.clear\")\n .on(\"click\", function (e) {\n e.stopPropagation();\n $(this).closest(\".datetime-holder\").data(\"DateTimePicker\").hide().clear();\n });\n\n $(\" .datetime-holder\")\n .find(\"input\")\n .on(\"click\", function (e) {\n $(this).closest(\".datetime-holder\").data(\"DateTimePicker\").toggle();\n });\n\n $(\" [data-date-open-calender-on]\").click(function () {\n var $input = $(this);\n var picker = $input.data(\"DateTimePicker\");\n var currentDate = picker.date();\n if (currentDate) {\n return null;\n } else {\n var calendarDate = moment($input.data(\"date-open-calender-on\"));\n if (!calendarDate.isValid()) {\n calendarDate = $($input.data(\"date-open-calender-on\"))\n .data(\"DateTimePicker\")\n .date();\n }\n picker.date(calendarDate);\n picker.clear();\n }\n });\n\n //radio with other select input\n //\n $(\".radio-with-other\").change(function () {\n if ($(this).val() == \"Other\") {\n $(\".radio-with-other\")\n .parents(\".form-group\")\n .find(\"input.radio-with-other-text-option\")\n .show();\n $(\".radio-with-other\")\n .parents(\".form-group\")\n .find(\"input.radio-with-other-text-option\")\n .prop(\"disabled\", false);\n } else {\n $(\".radio-with-other\")\n .parents(\".form-group\")\n .find(\"input.radio-with-other-text-option\")\n .hide();\n $(\".radio-with-other\")\n .parents(\".form-group\")\n .find(\"input.radio-with-other-text-option\")\n .prop(\"disabled\", true);\n }\n });\n});\n\n// Support component names relative to this directory:\nconsole.log(\"application react_ujs\");\nvar componentRequireContext = require.context(\"components\", true);\nvar ReactRailsUJS = require(\"react_ujs\");\nReactRailsUJS.useContext(componentRequireContext);\n\n//ReactRailsUJS.start()\n","// ie9- setTimeout & setInterval additional parameters fix\nvar global = require('./$.global')\n , $export = require('./$.export')\n , invoke = require('./$.invoke')\n , partial = require('./$.partial')\n , navigator = global.navigator\n , MSIE = !!navigator && /MSIE .\\./.test(navigator.userAgent); // <- dirty ie9- check\nvar wrap = function(set){\n return MSIE ? function(fn, time /*, ...args */){\n return set(invoke(\n partial,\n [].slice.call(arguments, 2),\n typeof fn == 'function' ? fn : Function(fn)\n ), time);\n } : set;\n};\n$export($export.G + $export.B + $export.F * MSIE, {\n setTimeout: wrap(global.setTimeout),\n setInterval: wrap(global.setInterval)\n});","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./$.fails')(function(){\n return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});","module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};","'use strict';\nvar path = require('./$.path')\n , invoke = require('./$.invoke')\n , aFunction = require('./$.a-function');\nmodule.exports = function(/* ...pargs */){\n var fn = aFunction(this)\n , length = arguments.length\n , pargs = Array(length)\n , i = 0\n , _ = path._\n , holder = false;\n while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true;\n return function(/* ...args */){\n var that = this\n , $$ = arguments\n , $$len = $$.length\n , j = 0, k = 0, args;\n if(!holder && !$$len)return invoke(fn, pargs, that);\n args = pargs.slice();\n if(holder)for(;length > j; j++)if(args[j] === _)args[j] = $$[k++];\n while($$len > k)args.push($$[k++]);\n return invoke(fn, args, that);\n };\n};","module.exports = require('./$.global');","var $export = require('./$.export')\n , $task = require('./$.task');\n$export($export.G + $export.B, {\n setImmediate: $task.set,\n clearImmediate: $task.clear\n});","var ctx = require('./$.ctx')\n , invoke = require('./$.invoke')\n , html = require('./$.html')\n , cel = require('./$.dom-create')\n , global = require('./$.global')\n , process = global.process\n , setTask = global.setImmediate\n , clearTask = global.clearImmediate\n , MessageChannel = global.MessageChannel\n , counter = 0\n , queue = {}\n , ONREADYSTATECHANGE = 'onreadystatechange'\n , defer, channel, port;\nvar run = function(){\n var id = +this;\n if(queue.hasOwnProperty(id)){\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listner = function(event){\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif(!setTask || !clearTask){\n setTask = function setImmediate(fn){\n var args = [], i = 1;\n while(arguments.length > i)args.push(arguments[i++]);\n queue[++counter] = function(){\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id){\n delete queue[id];\n };\n // Node.js 0.8-\n if(require('./$.cof')(process) == 'process'){\n defer = function(id){\n process.nextTick(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if(MessageChannel){\n channel = new MessageChannel;\n port = channel.port2;\n channel.port1.onmessage = listner;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){\n defer = function(id){\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listner, false);\n // IE8-\n } else if(ONREADYSTATECHANGE in cel('script')){\n defer = function(id){\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function(id){\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};","module.exports = require('./$.global').document && document.documentElement;","var isObject = require('./$.is-object')\n , document = require('./$.global').document\n // in old IE typeof document.createElement is 'object'\n , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n return is ? document.createElement(it) : {};\n};","module.exports = function(it){\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};","require('./es6.array.iterator');\nvar global = require('./$.global')\n , hide = require('./$.hide')\n , Iterators = require('./$.iterators')\n , ITERATOR = require('./$.wks')('iterator')\n , NL = global.NodeList\n , HTC = global.HTMLCollection\n , NLProto = NL && NL.prototype\n , HTCProto = HTC && HTC.prototype\n , ArrayValues = Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array;\nif(NLProto && !NLProto[ITERATOR])hide(NLProto, ITERATOR, ArrayValues);\nif(HTCProto && !HTCProto[ITERATOR])hide(HTCProto, ITERATOR, ArrayValues);","'use strict';\nvar addToUnscopables = require('./$.add-to-unscopables')\n , step = require('./$.iter-step')\n , Iterators = require('./$.iterators')\n , toIObject = require('./$.to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./$.iter-define')(Array, 'Array', function(iterated, kind){\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , kind = this._k\n , index = this._i++;\n if(!O || index >= O.length){\n this._t = undefined;\n return step(1);\n }\n if(kind == 'keys' )return step(0, index);\n if(kind == 'values')return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');","// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = require('./$.wks')('unscopables')\n , ArrayProto = Array.prototype;\nif(ArrayProto[UNSCOPABLES] == undefined)require('./$.hide')(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function(key){\n ArrayProto[UNSCOPABLES][key] = true;\n};","var global = require('./$.global')\n , SHARED = '__core-js_shared__'\n , store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function(key){\n return store[key] || (store[key] = {});\n};","module.exports = function(done, value){\n return {value: value, done: !!done};\n};","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./$.iobject')\n , defined = require('./$.defined');\nmodule.exports = function(it){\n return IObject(defined(it));\n};","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./$.cof');\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){\n return cof(it) == 'String' ? it.split('') : Object(it);\n};","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function(it){\n if(it == undefined)throw TypeError(\"Can't call method on \" + it);\n return it;\n};","'use strict';\nvar LIBRARY = require('./$.library')\n , $export = require('./$.export')\n , redefine = require('./$.redefine')\n , hide = require('./$.hide')\n , has = require('./$.has')\n , Iterators = require('./$.iterators')\n , $iterCreate = require('./$.iter-create')\n , setToStringTag = require('./$.set-to-string-tag')\n , getProto = require('./$').getProto\n , ITERATOR = require('./$.wks')('iterator')\n , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`\n , FF_ITERATOR = '@@iterator'\n , KEYS = 'keys'\n , VALUES = 'values';\n\nvar returnThis = function(){ return this; };\n\nmodule.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){\n $iterCreate(Constructor, NAME, next);\n var getMethod = function(kind){\n if(!BUGGY && kind in proto)return proto[kind];\n switch(kind){\n case KEYS: return function keys(){ return new Constructor(this, kind); };\n case VALUES: return function values(){ return new Constructor(this, kind); };\n } return function entries(){ return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator'\n , DEF_VALUES = DEFAULT == VALUES\n , VALUES_BUG = false\n , proto = Base.prototype\n , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]\n , $default = $native || getMethod(DEFAULT)\n , methods, key;\n // Fix native\n if($native){\n var IteratorPrototype = getProto($default.call(new Base));\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // FF fix\n if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);\n // fix Array#{values, @@iterator}.name in V8 / FF\n if(DEF_VALUES && $native.name !== VALUES){\n VALUES_BUG = true;\n $default = function values(){ return $native.call(this); };\n }\n }\n // Define iterator\n if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if(DEFAULT){\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: !DEF_VALUES ? $default : getMethod('entries')\n };\n if(FORCED)for(key in methods){\n if(!(key in proto))redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};","module.exports = false;","'use strict';\nvar $ = require('./$')\n , descriptor = require('./$.property-desc')\n , setToStringTag = require('./$.set-to-string-tag')\n , IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./$.hide')(IteratorPrototype, require('./$.wks')('iterator'), function(){ return this; });\n\nmodule.exports = function(Constructor, NAME, next){\n Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)});\n setToStringTag(Constructor, NAME + ' Iterator');\n};","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; };\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n defineProperty(generator, \"_invoke\", { value: makeInvokeMethod(innerFn, self, context) });\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n defineProperty(Gp, \"constructor\", { value: GeneratorFunctionPrototype, configurable: true });\n defineProperty(\n GeneratorFunctionPrototype,\n \"constructor\",\n { value: GeneratorFunction, configurable: true }\n );\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n defineProperty(this, \"_invoke\", { value: enqueue });\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method;\n var method = delegate.iterator[methodName];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method, or a missing .next mehtod, always terminate the\n // yield* loop.\n context.delegate = null;\n\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (methodName === \"throw\" && delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n if (methodName !== \"return\") {\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a '\" + methodName + \"' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(val) {\n var object = Object(val);\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/*!\n * Bootstrap v4.1.1 (https://getbootstrap.com/)\n * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) : typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) : factory(global.bootstrap = {}, global.jQuery, global.Popper);\n})(this, function (exports, $, Popper) {\n 'use strict';\n\n $ = $ && $.hasOwnProperty('default') ? $['default'] : $;\n Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n }\n function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n }\n return target;\n }\n function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.1.1): util.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n var Util = function ($$$1) {\n /**\n * ------------------------------------------------------------------------\n * Private TransitionEnd Helpers\n * ------------------------------------------------------------------------\n */\n var TRANSITION_END = 'transitionend';\n var MAX_UID = 1000000;\n var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)\n\n function toType(obj) {\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase();\n }\n function getSpecialTransitionEndEvent() {\n return {\n bindType: TRANSITION_END,\n delegateType: TRANSITION_END,\n handle: function handle(event) {\n if ($$$1(event.target).is(this)) {\n return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params\n }\n return undefined; // eslint-disable-line no-undefined\n }\n };\n }\n function transitionEndEmulator(duration) {\n var _this = this;\n var called = false;\n $$$1(this).one(Util.TRANSITION_END, function () {\n called = true;\n });\n setTimeout(function () {\n if (!called) {\n Util.triggerTransitionEnd(_this);\n }\n }, duration);\n return this;\n }\n function setTransitionEndSupport() {\n $$$1.fn.emulateTransitionEnd = transitionEndEmulator;\n $$$1.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();\n }\n /**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\n var Util = {\n TRANSITION_END: 'bsTransitionEnd',\n getUID: function getUID(prefix) {\n do {\n // eslint-disable-next-line no-bitwise\n prefix += ~~(Math.random() * MAX_UID); // \"~~\" acts like a faster Math.floor() here\n } while (document.getElementById(prefix));\n return prefix;\n },\n getSelectorFromElement: function getSelectorFromElement(element) {\n var selector = element.getAttribute('data-target');\n if (!selector || selector === '#') {\n selector = element.getAttribute('href') || '';\n }\n try {\n var $selector = $$$1(document).find(selector);\n return $selector.length > 0 ? selector : null;\n } catch (err) {\n return null;\n }\n },\n getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {\n if (!element) {\n return 0;\n } // Get transition-duration of the element\n\n var transitionDuration = $$$1(element).css('transition-duration');\n var floatTransitionDuration = parseFloat(transitionDuration); // Return 0 if element or transition duration is not found\n\n if (!floatTransitionDuration) {\n return 0;\n } // If multiple durations are defined, take the first\n\n transitionDuration = transitionDuration.split(',')[0];\n return parseFloat(transitionDuration) * MILLISECONDS_MULTIPLIER;\n },\n reflow: function reflow(element) {\n return element.offsetHeight;\n },\n triggerTransitionEnd: function triggerTransitionEnd(element) {\n $$$1(element).trigger(TRANSITION_END);\n },\n // TODO: Remove in v5\n supportsTransitionEnd: function supportsTransitionEnd() {\n return Boolean(TRANSITION_END);\n },\n isElement: function isElement(obj) {\n return (obj[0] || obj).nodeType;\n },\n typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {\n for (var property in configTypes) {\n if (Object.prototype.hasOwnProperty.call(configTypes, property)) {\n var expectedTypes = configTypes[property];\n var value = config[property];\n var valueType = value && Util.isElement(value) ? 'element' : toType(value);\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(componentName.toUpperCase() + \": \" + (\"Option \\\"\" + property + \"\\\" provided type \\\"\" + valueType + \"\\\" \") + (\"but expected type \\\"\" + expectedTypes + \"\\\".\"));\n }\n }\n }\n }\n };\n setTransitionEndSupport();\n return Util;\n }($);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.1.1): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n var Alert = function ($$$1) {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n var NAME = 'alert';\n var VERSION = '4.1.1';\n var DATA_KEY = 'bs.alert';\n var EVENT_KEY = \".\" + DATA_KEY;\n var DATA_API_KEY = '.data-api';\n var JQUERY_NO_CONFLICT = $$$1.fn[NAME];\n var Selector = {\n DISMISS: '[data-dismiss=\"alert\"]'\n };\n var Event = {\n CLOSE: \"close\" + EVENT_KEY,\n CLOSED: \"closed\" + EVENT_KEY,\n CLICK_DATA_API: \"click\" + EVENT_KEY + DATA_API_KEY\n };\n var ClassName = {\n ALERT: 'alert',\n FADE: 'fade',\n SHOW: 'show'\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n };\n var Alert = /*#__PURE__*/\n function () {\n function Alert(element) {\n this._element = element;\n } // Getters\n\n var _proto = Alert.prototype;\n\n // Public\n _proto.close = function close(element) {\n var rootElement = this._element;\n if (element) {\n rootElement = this._getRootElement(element);\n }\n var customEvent = this._triggerCloseEvent(rootElement);\n if (customEvent.isDefaultPrevented()) {\n return;\n }\n this._removeElement(rootElement);\n };\n _proto.dispose = function dispose() {\n $$$1.removeData(this._element, DATA_KEY);\n this._element = null;\n }; // Private\n\n _proto._getRootElement = function _getRootElement(element) {\n var selector = Util.getSelectorFromElement(element);\n var parent = false;\n if (selector) {\n parent = $$$1(selector)[0];\n }\n if (!parent) {\n parent = $$$1(element).closest(\".\" + ClassName.ALERT)[0];\n }\n return parent;\n };\n _proto._triggerCloseEvent = function _triggerCloseEvent(element) {\n var closeEvent = $$$1.Event(Event.CLOSE);\n $$$1(element).trigger(closeEvent);\n return closeEvent;\n };\n _proto._removeElement = function _removeElement(element) {\n var _this = this;\n $$$1(element).removeClass(ClassName.SHOW);\n if (!$$$1(element).hasClass(ClassName.FADE)) {\n this._destroyElement(element);\n return;\n }\n var transitionDuration = Util.getTransitionDurationFromElement(element);\n $$$1(element).one(Util.TRANSITION_END, function (event) {\n return _this._destroyElement(element, event);\n }).emulateTransitionEnd(transitionDuration);\n };\n _proto._destroyElement = function _destroyElement(element) {\n $$$1(element).detach().trigger(Event.CLOSED).remove();\n }; // Static\n\n Alert._jQueryInterface = function _jQueryInterface(config) {\n return this.each(function () {\n var $element = $$$1(this);\n var data = $element.data(DATA_KEY);\n if (!data) {\n data = new Alert(this);\n $element.data(DATA_KEY, data);\n }\n if (config === 'close') {\n data[config](this);\n }\n });\n };\n Alert._handleDismiss = function _handleDismiss(alertInstance) {\n return function (event) {\n if (event) {\n event.preventDefault();\n }\n alertInstance.close(this);\n };\n };\n _createClass(Alert, null, [{\n key: \"VERSION\",\n get: function get() {\n return VERSION;\n }\n }]);\n return Alert;\n }();\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $$$1(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $$$1.fn[NAME] = Alert._jQueryInterface;\n $$$1.fn[NAME].Constructor = Alert;\n $$$1.fn[NAME].noConflict = function () {\n $$$1.fn[NAME] = JQUERY_NO_CONFLICT;\n return Alert._jQueryInterface;\n };\n return Alert;\n }($);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.1.1): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n var Button = function ($$$1) {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n var NAME = 'button';\n var VERSION = '4.1.1';\n var DATA_KEY = 'bs.button';\n var EVENT_KEY = \".\" + DATA_KEY;\n var DATA_API_KEY = '.data-api';\n var JQUERY_NO_CONFLICT = $$$1.fn[NAME];\n var ClassName = {\n ACTIVE: 'active',\n BUTTON: 'btn',\n FOCUS: 'focus'\n };\n var Selector = {\n DATA_TOGGLE_CARROT: '[data-toggle^=\"button\"]',\n DATA_TOGGLE: '[data-toggle=\"buttons\"]',\n INPUT: 'input',\n ACTIVE: '.active',\n BUTTON: '.btn'\n };\n var Event = {\n CLICK_DATA_API: \"click\" + EVENT_KEY + DATA_API_KEY,\n FOCUS_BLUR_DATA_API: \"focus\" + EVENT_KEY + DATA_API_KEY + \" \" + (\"blur\" + EVENT_KEY + DATA_API_KEY)\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n };\n var Button = /*#__PURE__*/\n function () {\n function Button(element) {\n this._element = element;\n } // Getters\n\n var _proto = Button.prototype;\n\n // Public\n _proto.toggle = function toggle() {\n var triggerChangeEvent = true;\n var addAriaPressed = true;\n var rootElement = $$$1(this._element).closest(Selector.DATA_TOGGLE)[0];\n if (rootElement) {\n var input = $$$1(this._element).find(Selector.INPUT)[0];\n if (input) {\n if (input.type === 'radio') {\n if (input.checked && $$$1(this._element).hasClass(ClassName.ACTIVE)) {\n triggerChangeEvent = false;\n } else {\n var activeElement = $$$1(rootElement).find(Selector.ACTIVE)[0];\n if (activeElement) {\n $$$1(activeElement).removeClass(ClassName.ACTIVE);\n }\n }\n }\n if (triggerChangeEvent) {\n if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {\n return;\n }\n input.checked = !$$$1(this._element).hasClass(ClassName.ACTIVE);\n $$$1(input).trigger('change');\n }\n input.focus();\n addAriaPressed = false;\n }\n }\n if (addAriaPressed) {\n this._element.setAttribute('aria-pressed', !$$$1(this._element).hasClass(ClassName.ACTIVE));\n }\n if (triggerChangeEvent) {\n $$$1(this._element).toggleClass(ClassName.ACTIVE);\n }\n };\n _proto.dispose = function dispose() {\n $$$1.removeData(this._element, DATA_KEY);\n this._element = null;\n }; // Static\n\n Button._jQueryInterface = function _jQueryInterface(config) {\n return this.each(function () {\n var data = $$$1(this).data(DATA_KEY);\n if (!data) {\n data = new Button(this);\n $$$1(this).data(DATA_KEY, data);\n }\n if (config === 'toggle') {\n data[config]();\n }\n });\n };\n _createClass(Button, null, [{\n key: \"VERSION\",\n get: function get() {\n return VERSION;\n }\n }]);\n return Button;\n }();\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {\n event.preventDefault();\n var button = event.target;\n if (!$$$1(button).hasClass(ClassName.BUTTON)) {\n button = $$$1(button).closest(Selector.BUTTON);\n }\n Button._jQueryInterface.call($$$1(button), 'toggle');\n }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {\n var button = $$$1(event.target).closest(Selector.BUTTON)[0];\n $$$1(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $$$1.fn[NAME] = Button._jQueryInterface;\n $$$1.fn[NAME].Constructor = Button;\n $$$1.fn[NAME].noConflict = function () {\n $$$1.fn[NAME] = JQUERY_NO_CONFLICT;\n return Button._jQueryInterface;\n };\n return Button;\n }($);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.1.1): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n var Carousel = function ($$$1) {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n var NAME = 'carousel';\n var VERSION = '4.1.1';\n var DATA_KEY = 'bs.carousel';\n var EVENT_KEY = \".\" + DATA_KEY;\n var DATA_API_KEY = '.data-api';\n var JQUERY_NO_CONFLICT = $$$1.fn[NAME];\n var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key\n\n var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key\n\n var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch\n\n var Default = {\n interval: 5000,\n keyboard: true,\n slide: false,\n pause: 'hover',\n wrap: true\n };\n var DefaultType = {\n interval: '(number|boolean)',\n keyboard: 'boolean',\n slide: '(boolean|string)',\n pause: '(string|boolean)',\n wrap: 'boolean'\n };\n var Direction = {\n NEXT: 'next',\n PREV: 'prev',\n LEFT: 'left',\n RIGHT: 'right'\n };\n var Event = {\n SLIDE: \"slide\" + EVENT_KEY,\n SLID: \"slid\" + EVENT_KEY,\n KEYDOWN: \"keydown\" + EVENT_KEY,\n MOUSEENTER: \"mouseenter\" + EVENT_KEY,\n MOUSELEAVE: \"mouseleave\" + EVENT_KEY,\n TOUCHEND: \"touchend\" + EVENT_KEY,\n LOAD_DATA_API: \"load\" + EVENT_KEY + DATA_API_KEY,\n CLICK_DATA_API: \"click\" + EVENT_KEY + DATA_API_KEY\n };\n var ClassName = {\n CAROUSEL: 'carousel',\n ACTIVE: 'active',\n SLIDE: 'slide',\n RIGHT: 'carousel-item-right',\n LEFT: 'carousel-item-left',\n NEXT: 'carousel-item-next',\n PREV: 'carousel-item-prev',\n ITEM: 'carousel-item'\n };\n var Selector = {\n ACTIVE: '.active',\n ACTIVE_ITEM: '.active.carousel-item',\n ITEM: '.carousel-item',\n NEXT_PREV: '.carousel-item-next, .carousel-item-prev',\n INDICATORS: '.carousel-indicators',\n DATA_SLIDE: '[data-slide], [data-slide-to]',\n DATA_RIDE: '[data-ride=\"carousel\"]'\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n };\n var Carousel = /*#__PURE__*/\n function () {\n function Carousel(element, config) {\n this._items = null;\n this._interval = null;\n this._activeElement = null;\n this._isPaused = false;\n this._isSliding = false;\n this.touchTimeout = null;\n this._config = this._getConfig(config);\n this._element = $$$1(element)[0];\n this._indicatorsElement = $$$1(this._element).find(Selector.INDICATORS)[0];\n this._addEventListeners();\n } // Getters\n\n var _proto = Carousel.prototype;\n\n // Public\n _proto.next = function next() {\n if (!this._isSliding) {\n this._slide(Direction.NEXT);\n }\n };\n _proto.nextWhenVisible = function nextWhenVisible() {\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden && $$$1(this._element).is(':visible') && $$$1(this._element).css('visibility') !== 'hidden') {\n this.next();\n }\n };\n _proto.prev = function prev() {\n if (!this._isSliding) {\n this._slide(Direction.PREV);\n }\n };\n _proto.pause = function pause(event) {\n if (!event) {\n this._isPaused = true;\n }\n if ($$$1(this._element).find(Selector.NEXT_PREV)[0]) {\n Util.triggerTransitionEnd(this._element);\n this.cycle(true);\n }\n clearInterval(this._interval);\n this._interval = null;\n };\n _proto.cycle = function cycle(event) {\n if (!event) {\n this._isPaused = false;\n }\n if (this._interval) {\n clearInterval(this._interval);\n this._interval = null;\n }\n if (this._config.interval && !this._isPaused) {\n this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);\n }\n };\n _proto.to = function to(index) {\n var _this = this;\n this._activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0];\n var activeIndex = this._getItemIndex(this._activeElement);\n if (index > this._items.length - 1 || index < 0) {\n return;\n }\n if (this._isSliding) {\n $$$1(this._element).one(Event.SLID, function () {\n return _this.to(index);\n });\n return;\n }\n if (activeIndex === index) {\n this.pause();\n this.cycle();\n return;\n }\n var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;\n this._slide(direction, this._items[index]);\n };\n _proto.dispose = function dispose() {\n $$$1(this._element).off(EVENT_KEY);\n $$$1.removeData(this._element, DATA_KEY);\n this._items = null;\n this._config = null;\n this._element = null;\n this._interval = null;\n this._isPaused = null;\n this._isSliding = null;\n this._activeElement = null;\n this._indicatorsElement = null;\n }; // Private\n\n _proto._getConfig = function _getConfig(config) {\n config = _objectSpread({}, Default, config);\n Util.typeCheckConfig(NAME, config, DefaultType);\n return config;\n };\n _proto._addEventListeners = function _addEventListeners() {\n var _this2 = this;\n if (this._config.keyboard) {\n $$$1(this._element).on(Event.KEYDOWN, function (event) {\n return _this2._keydown(event);\n });\n }\n if (this._config.pause === 'hover') {\n $$$1(this._element).on(Event.MOUSEENTER, function (event) {\n return _this2.pause(event);\n }).on(Event.MOUSELEAVE, function (event) {\n return _this2.cycle(event);\n });\n if ('ontouchstart' in document.documentElement) {\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n $$$1(this._element).on(Event.TOUCHEND, function () {\n _this2.pause();\n if (_this2.touchTimeout) {\n clearTimeout(_this2.touchTimeout);\n }\n _this2.touchTimeout = setTimeout(function (event) {\n return _this2.cycle(event);\n }, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval);\n });\n }\n }\n };\n _proto._keydown = function _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return;\n }\n switch (event.which) {\n case ARROW_LEFT_KEYCODE:\n event.preventDefault();\n this.prev();\n break;\n case ARROW_RIGHT_KEYCODE:\n event.preventDefault();\n this.next();\n break;\n default:\n }\n };\n _proto._getItemIndex = function _getItemIndex(element) {\n this._items = $$$1.makeArray($$$1(element).parent().find(Selector.ITEM));\n return this._items.indexOf(element);\n };\n _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {\n var isNextDirection = direction === Direction.NEXT;\n var isPrevDirection = direction === Direction.PREV;\n var activeIndex = this._getItemIndex(activeElement);\n var lastItemIndex = this._items.length - 1;\n var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;\n if (isGoingToWrap && !this._config.wrap) {\n return activeElement;\n }\n var delta = direction === Direction.PREV ? -1 : 1;\n var itemIndex = (activeIndex + delta) % this._items.length;\n return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];\n };\n _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {\n var targetIndex = this._getItemIndex(relatedTarget);\n var fromIndex = this._getItemIndex($$$1(this._element).find(Selector.ACTIVE_ITEM)[0]);\n var slideEvent = $$$1.Event(Event.SLIDE, {\n relatedTarget: relatedTarget,\n direction: eventDirectionName,\n from: fromIndex,\n to: targetIndex\n });\n $$$1(this._element).trigger(slideEvent);\n return slideEvent;\n };\n _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {\n if (this._indicatorsElement) {\n $$$1(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);\n var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];\n if (nextIndicator) {\n $$$1(nextIndicator).addClass(ClassName.ACTIVE);\n }\n }\n };\n _proto._slide = function _slide(direction, element) {\n var _this3 = this;\n var activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0];\n var activeElementIndex = this._getItemIndex(activeElement);\n var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);\n var nextElementIndex = this._getItemIndex(nextElement);\n var isCycling = Boolean(this._interval);\n var directionalClassName;\n var orderClassName;\n var eventDirectionName;\n if (direction === Direction.NEXT) {\n directionalClassName = ClassName.LEFT;\n orderClassName = ClassName.NEXT;\n eventDirectionName = Direction.LEFT;\n } else {\n directionalClassName = ClassName.RIGHT;\n orderClassName = ClassName.PREV;\n eventDirectionName = Direction.RIGHT;\n }\n if (nextElement && $$$1(nextElement).hasClass(ClassName.ACTIVE)) {\n this._isSliding = false;\n return;\n }\n var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);\n if (slideEvent.isDefaultPrevented()) {\n return;\n }\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n return;\n }\n this._isSliding = true;\n if (isCycling) {\n this.pause();\n }\n this._setActiveIndicatorElement(nextElement);\n var slidEvent = $$$1.Event(Event.SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n });\n if ($$$1(this._element).hasClass(ClassName.SLIDE)) {\n $$$1(nextElement).addClass(orderClassName);\n Util.reflow(nextElement);\n $$$1(activeElement).addClass(directionalClassName);\n $$$1(nextElement).addClass(directionalClassName);\n var transitionDuration = Util.getTransitionDurationFromElement(activeElement);\n $$$1(activeElement).one(Util.TRANSITION_END, function () {\n $$$1(nextElement).removeClass(directionalClassName + \" \" + orderClassName).addClass(ClassName.ACTIVE);\n $$$1(activeElement).removeClass(ClassName.ACTIVE + \" \" + orderClassName + \" \" + directionalClassName);\n _this3._isSliding = false;\n setTimeout(function () {\n return $$$1(_this3._element).trigger(slidEvent);\n }, 0);\n }).emulateTransitionEnd(transitionDuration);\n } else {\n $$$1(activeElement).removeClass(ClassName.ACTIVE);\n $$$1(nextElement).addClass(ClassName.ACTIVE);\n this._isSliding = false;\n $$$1(this._element).trigger(slidEvent);\n }\n if (isCycling) {\n this.cycle();\n }\n }; // Static\n\n Carousel._jQueryInterface = function _jQueryInterface(config) {\n return this.each(function () {\n var data = $$$1(this).data(DATA_KEY);\n var _config = _objectSpread({}, Default, $$$1(this).data());\n if (_typeof(config) === 'object') {\n _config = _objectSpread({}, _config, config);\n }\n var action = typeof config === 'string' ? config : _config.slide;\n if (!data) {\n data = new Carousel(this, _config);\n $$$1(this).data(DATA_KEY, data);\n }\n if (typeof config === 'number') {\n data.to(config);\n } else if (typeof action === 'string') {\n if (typeof data[action] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + action + \"\\\"\");\n }\n data[action]();\n } else if (_config.interval) {\n data.pause();\n data.cycle();\n }\n });\n };\n Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {\n var selector = Util.getSelectorFromElement(this);\n if (!selector) {\n return;\n }\n var target = $$$1(selector)[0];\n if (!target || !$$$1(target).hasClass(ClassName.CAROUSEL)) {\n return;\n }\n var config = _objectSpread({}, $$$1(target).data(), $$$1(this).data());\n var slideIndex = this.getAttribute('data-slide-to');\n if (slideIndex) {\n config.interval = false;\n }\n Carousel._jQueryInterface.call($$$1(target), config);\n if (slideIndex) {\n $$$1(target).data(DATA_KEY).to(slideIndex);\n }\n event.preventDefault();\n };\n _createClass(Carousel, null, [{\n key: \"VERSION\",\n get: function get() {\n return VERSION;\n }\n }, {\n key: \"Default\",\n get: function get() {\n return Default;\n }\n }]);\n return Carousel;\n }();\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);\n $$$1(window).on(Event.LOAD_DATA_API, function () {\n $$$1(Selector.DATA_RIDE).each(function () {\n var $carousel = $$$1(this);\n Carousel._jQueryInterface.call($carousel, $carousel.data());\n });\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $$$1.fn[NAME] = Carousel._jQueryInterface;\n $$$1.fn[NAME].Constructor = Carousel;\n $$$1.fn[NAME].noConflict = function () {\n $$$1.fn[NAME] = JQUERY_NO_CONFLICT;\n return Carousel._jQueryInterface;\n };\n return Carousel;\n }($);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.1.1): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n var Collapse = function ($$$1) {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n var NAME = 'collapse';\n var VERSION = '4.1.1';\n var DATA_KEY = 'bs.collapse';\n var EVENT_KEY = \".\" + DATA_KEY;\n var DATA_API_KEY = '.data-api';\n var JQUERY_NO_CONFLICT = $$$1.fn[NAME];\n var Default = {\n toggle: true,\n parent: ''\n };\n var DefaultType = {\n toggle: 'boolean',\n parent: '(string|element)'\n };\n var Event = {\n SHOW: \"show\" + EVENT_KEY,\n SHOWN: \"shown\" + EVENT_KEY,\n HIDE: \"hide\" + EVENT_KEY,\n HIDDEN: \"hidden\" + EVENT_KEY,\n CLICK_DATA_API: \"click\" + EVENT_KEY + DATA_API_KEY\n };\n var ClassName = {\n SHOW: 'show',\n COLLAPSE: 'collapse',\n COLLAPSING: 'collapsing',\n COLLAPSED: 'collapsed'\n };\n var Dimension = {\n WIDTH: 'width',\n HEIGHT: 'height'\n };\n var Selector = {\n ACTIVES: '.show, .collapsing',\n DATA_TOGGLE: '[data-toggle=\"collapse\"]'\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n };\n var Collapse = /*#__PURE__*/\n function () {\n function Collapse(element, config) {\n this._isTransitioning = false;\n this._element = element;\n this._config = this._getConfig(config);\n this._triggerArray = $$$1.makeArray($$$1(\"[data-toggle=\\\"collapse\\\"][href=\\\"#\" + element.id + \"\\\"],\" + (\"[data-toggle=\\\"collapse\\\"][data-target=\\\"#\" + element.id + \"\\\"]\")));\n var tabToggles = $$$1(Selector.DATA_TOGGLE);\n for (var i = 0; i < tabToggles.length; i++) {\n var elem = tabToggles[i];\n var selector = Util.getSelectorFromElement(elem);\n if (selector !== null && $$$1(selector).filter(element).length > 0) {\n this._selector = selector;\n this._triggerArray.push(elem);\n }\n }\n this._parent = this._config.parent ? this._getParent() : null;\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._element, this._triggerArray);\n }\n if (this._config.toggle) {\n this.toggle();\n }\n } // Getters\n\n var _proto = Collapse.prototype;\n\n // Public\n _proto.toggle = function toggle() {\n if ($$$1(this._element).hasClass(ClassName.SHOW)) {\n this.hide();\n } else {\n this.show();\n }\n };\n _proto.show = function show() {\n var _this = this;\n if (this._isTransitioning || $$$1(this._element).hasClass(ClassName.SHOW)) {\n return;\n }\n var actives;\n var activesData;\n if (this._parent) {\n actives = $$$1.makeArray($$$1(this._parent).find(Selector.ACTIVES).filter(\"[data-parent=\\\"\" + this._config.parent + \"\\\"]\"));\n if (actives.length === 0) {\n actives = null;\n }\n }\n if (actives) {\n activesData = $$$1(actives).not(this._selector).data(DATA_KEY);\n if (activesData && activesData._isTransitioning) {\n return;\n }\n }\n var startEvent = $$$1.Event(Event.SHOW);\n $$$1(this._element).trigger(startEvent);\n if (startEvent.isDefaultPrevented()) {\n return;\n }\n if (actives) {\n Collapse._jQueryInterface.call($$$1(actives).not(this._selector), 'hide');\n if (!activesData) {\n $$$1(actives).data(DATA_KEY, null);\n }\n }\n var dimension = this._getDimension();\n $$$1(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);\n this._element.style[dimension] = 0;\n if (this._triggerArray.length > 0) {\n $$$1(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);\n }\n this.setTransitioning(true);\n var complete = function complete() {\n $$$1(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);\n _this._element.style[dimension] = '';\n _this.setTransitioning(false);\n $$$1(_this._element).trigger(Event.SHOWN);\n };\n var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);\n var scrollSize = \"scroll\" + capitalizedDimension;\n var transitionDuration = Util.getTransitionDurationFromElement(this._element);\n $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);\n this._element.style[dimension] = this._element[scrollSize] + \"px\";\n };\n _proto.hide = function hide() {\n var _this2 = this;\n if (this._isTransitioning || !$$$1(this._element).hasClass(ClassName.SHOW)) {\n return;\n }\n var startEvent = $$$1.Event(Event.HIDE);\n $$$1(this._element).trigger(startEvent);\n if (startEvent.isDefaultPrevented()) {\n return;\n }\n var dimension = this._getDimension();\n this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + \"px\";\n Util.reflow(this._element);\n $$$1(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);\n if (this._triggerArray.length > 0) {\n for (var i = 0; i < this._triggerArray.length; i++) {\n var trigger = this._triggerArray[i];\n var selector = Util.getSelectorFromElement(trigger);\n if (selector !== null) {\n var $elem = $$$1(selector);\n if (!$elem.hasClass(ClassName.SHOW)) {\n $$$1(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);\n }\n }\n }\n }\n this.setTransitioning(true);\n var complete = function complete() {\n _this2.setTransitioning(false);\n $$$1(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);\n };\n this._element.style[dimension] = '';\n var transitionDuration = Util.getTransitionDurationFromElement(this._element);\n $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);\n };\n _proto.setTransitioning = function setTransitioning(isTransitioning) {\n this._isTransitioning = isTransitioning;\n };\n _proto.dispose = function dispose() {\n $$$1.removeData(this._element, DATA_KEY);\n this._config = null;\n this._parent = null;\n this._element = null;\n this._triggerArray = null;\n this._isTransitioning = null;\n }; // Private\n\n _proto._getConfig = function _getConfig(config) {\n config = _objectSpread({}, Default, config);\n config.toggle = Boolean(config.toggle); // Coerce string values\n\n Util.typeCheckConfig(NAME, config, DefaultType);\n return config;\n };\n _proto._getDimension = function _getDimension() {\n var hasWidth = $$$1(this._element).hasClass(Dimension.WIDTH);\n return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;\n };\n _proto._getParent = function _getParent() {\n var _this3 = this;\n var parent = null;\n if (Util.isElement(this._config.parent)) {\n parent = this._config.parent; // It's a jQuery object\n\n if (typeof this._config.parent.jquery !== 'undefined') {\n parent = this._config.parent[0];\n }\n } else {\n parent = $$$1(this._config.parent)[0];\n }\n var selector = \"[data-toggle=\\\"collapse\\\"][data-parent=\\\"\" + this._config.parent + \"\\\"]\";\n $$$1(parent).find(selector).each(function (i, element) {\n _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);\n });\n return parent;\n };\n _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {\n if (element) {\n var isOpen = $$$1(element).hasClass(ClassName.SHOW);\n if (triggerArray.length > 0) {\n $$$1(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);\n }\n }\n }; // Static\n\n Collapse._getTargetFromElement = function _getTargetFromElement(element) {\n var selector = Util.getSelectorFromElement(element);\n return selector ? $$$1(selector)[0] : null;\n };\n Collapse._jQueryInterface = function _jQueryInterface(config) {\n return this.each(function () {\n var $this = $$$1(this);\n var data = $this.data(DATA_KEY);\n var _config = _objectSpread({}, Default, $this.data(), _typeof(config) === 'object' && config ? config : {});\n if (!data && _config.toggle && /show|hide/.test(config)) {\n _config.toggle = false;\n }\n if (!data) {\n data = new Collapse(this, _config);\n $this.data(DATA_KEY, data);\n }\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n data[config]();\n }\n });\n };\n _createClass(Collapse, null, [{\n key: \"VERSION\",\n get: function get() {\n return VERSION;\n }\n }, {\n key: \"Default\",\n get: function get() {\n return Default;\n }\n }]);\n return Collapse;\n }();\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n // preventDefault only for <a> elements (which change the URL) not inside the collapsible element\n if (event.currentTarget.tagName === 'A') {\n event.preventDefault();\n }\n var $trigger = $$$1(this);\n var selector = Util.getSelectorFromElement(this);\n $$$1(selector).each(function () {\n var $target = $$$1(this);\n var data = $target.data(DATA_KEY);\n var config = data ? 'toggle' : $trigger.data();\n Collapse._jQueryInterface.call($target, config);\n });\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $$$1.fn[NAME] = Collapse._jQueryInterface;\n $$$1.fn[NAME].Constructor = Collapse;\n $$$1.fn[NAME].noConflict = function () {\n $$$1.fn[NAME] = JQUERY_NO_CONFLICT;\n return Collapse._jQueryInterface;\n };\n return Collapse;\n }($);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.1.1): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n var Dropdown = function ($$$1) {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n var NAME = 'dropdown';\n var VERSION = '4.1.1';\n var DATA_KEY = 'bs.dropdown';\n var EVENT_KEY = \".\" + DATA_KEY;\n var DATA_API_KEY = '.data-api';\n var JQUERY_NO_CONFLICT = $$$1.fn[NAME];\n var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key\n\n var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key\n\n var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key\n\n var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key\n\n var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key\n\n var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)\n\n var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + \"|\" + ARROW_DOWN_KEYCODE + \"|\" + ESCAPE_KEYCODE);\n var Event = {\n HIDE: \"hide\" + EVENT_KEY,\n HIDDEN: \"hidden\" + EVENT_KEY,\n SHOW: \"show\" + EVENT_KEY,\n SHOWN: \"shown\" + EVENT_KEY,\n CLICK: \"click\" + EVENT_KEY,\n CLICK_DATA_API: \"click\" + EVENT_KEY + DATA_API_KEY,\n KEYDOWN_DATA_API: \"keydown\" + EVENT_KEY + DATA_API_KEY,\n KEYUP_DATA_API: \"keyup\" + EVENT_KEY + DATA_API_KEY\n };\n var ClassName = {\n DISABLED: 'disabled',\n SHOW: 'show',\n DROPUP: 'dropup',\n DROPRIGHT: 'dropright',\n DROPLEFT: 'dropleft',\n MENURIGHT: 'dropdown-menu-right',\n MENULEFT: 'dropdown-menu-left',\n POSITION_STATIC: 'position-static'\n };\n var Selector = {\n DATA_TOGGLE: '[data-toggle=\"dropdown\"]',\n FORM_CHILD: '.dropdown form',\n MENU: '.dropdown-menu',\n NAVBAR_NAV: '.navbar-nav',\n VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'\n };\n var AttachmentMap = {\n TOP: 'top-start',\n TOPEND: 'top-end',\n BOTTOM: 'bottom-start',\n BOTTOMEND: 'bottom-end',\n RIGHT: 'right-start',\n RIGHTEND: 'right-end',\n LEFT: 'left-start',\n LEFTEND: 'left-end'\n };\n var Default = {\n offset: 0,\n flip: true,\n boundary: 'scrollParent',\n reference: 'toggle',\n display: 'dynamic'\n };\n var DefaultType = {\n offset: '(number|string|function)',\n flip: 'boolean',\n boundary: '(string|element)',\n reference: '(string|element)',\n display: 'string'\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n };\n var Dropdown = /*#__PURE__*/\n function () {\n function Dropdown(element, config) {\n this._element = element;\n this._popper = null;\n this._config = this._getConfig(config);\n this._menu = this._getMenuElement();\n this._inNavbar = this._detectNavbar();\n this._addEventListeners();\n } // Getters\n\n var _proto = Dropdown.prototype;\n\n // Public\n _proto.toggle = function toggle() {\n if (this._element.disabled || $$$1(this._element).hasClass(ClassName.DISABLED)) {\n return;\n }\n var parent = Dropdown._getParentFromElement(this._element);\n var isActive = $$$1(this._menu).hasClass(ClassName.SHOW);\n Dropdown._clearMenus();\n if (isActive) {\n return;\n }\n var relatedTarget = {\n relatedTarget: this._element\n };\n var showEvent = $$$1.Event(Event.SHOW, relatedTarget);\n $$$1(parent).trigger(showEvent);\n if (showEvent.isDefaultPrevented()) {\n return;\n } // Disable totally Popper.js for Dropdown in Navbar\n\n if (!this._inNavbar) {\n /**\n * Check for Popper dependency\n * Popper - https://popper.js.org\n */\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap dropdown require Popper.js (https://popper.js.org)');\n }\n var referenceElement = this._element;\n if (this._config.reference === 'parent') {\n referenceElement = parent;\n } else if (Util.isElement(this._config.reference)) {\n referenceElement = this._config.reference; // Check if it's jQuery element\n\n if (typeof this._config.reference.jquery !== 'undefined') {\n referenceElement = this._config.reference[0];\n }\n } // If boundary is not `scrollParent`, then set position to `static`\n // to allow the menu to \"escape\" the scroll parent's boundaries\n // https://github.com/twbs/bootstrap/issues/24251\n\n if (this._config.boundary !== 'scrollParent') {\n $$$1(parent).addClass(ClassName.POSITION_STATIC);\n }\n this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());\n } // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n if ('ontouchstart' in document.documentElement && $$$1(parent).closest(Selector.NAVBAR_NAV).length === 0) {\n $$$1(document.body).children().on('mouseover', null, $$$1.noop);\n }\n this._element.focus();\n this._element.setAttribute('aria-expanded', true);\n $$$1(this._menu).toggleClass(ClassName.SHOW);\n $$$1(parent).toggleClass(ClassName.SHOW).trigger($$$1.Event(Event.SHOWN, relatedTarget));\n };\n _proto.dispose = function dispose() {\n $$$1.removeData(this._element, DATA_KEY);\n $$$1(this._element).off(EVENT_KEY);\n this._element = null;\n this._menu = null;\n if (this._popper !== null) {\n this._popper.destroy();\n this._popper = null;\n }\n };\n _proto.update = function update() {\n this._inNavbar = this._detectNavbar();\n if (this._popper !== null) {\n this._popper.scheduleUpdate();\n }\n }; // Private\n\n _proto._addEventListeners = function _addEventListeners() {\n var _this = this;\n $$$1(this._element).on(Event.CLICK, function (event) {\n event.preventDefault();\n event.stopPropagation();\n _this.toggle();\n });\n };\n _proto._getConfig = function _getConfig(config) {\n config = _objectSpread({}, this.constructor.Default, $$$1(this._element).data(), config);\n Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);\n return config;\n };\n _proto._getMenuElement = function _getMenuElement() {\n if (!this._menu) {\n var parent = Dropdown._getParentFromElement(this._element);\n this._menu = $$$1(parent).find(Selector.MENU)[0];\n }\n return this._menu;\n };\n _proto._getPlacement = function _getPlacement() {\n var $parentDropdown = $$$1(this._element).parent();\n var placement = AttachmentMap.BOTTOM; // Handle dropup\n\n if ($parentDropdown.hasClass(ClassName.DROPUP)) {\n placement = AttachmentMap.TOP;\n if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) {\n placement = AttachmentMap.TOPEND;\n }\n } else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {\n placement = AttachmentMap.RIGHT;\n } else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {\n placement = AttachmentMap.LEFT;\n } else if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) {\n placement = AttachmentMap.BOTTOMEND;\n }\n return placement;\n };\n _proto._detectNavbar = function _detectNavbar() {\n return $$$1(this._element).closest('.navbar').length > 0;\n };\n _proto._getPopperConfig = function _getPopperConfig() {\n var _this2 = this;\n var offsetConf = {};\n if (typeof this._config.offset === 'function') {\n offsetConf.fn = function (data) {\n data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets) || {});\n return data;\n };\n } else {\n offsetConf.offset = this._config.offset;\n }\n var popperConfig = {\n placement: this._getPlacement(),\n modifiers: {\n offset: offsetConf,\n flip: {\n enabled: this._config.flip\n },\n preventOverflow: {\n boundariesElement: this._config.boundary\n }\n } // Disable Popper.js if we have a static display\n };\n if (this._config.display === 'static') {\n popperConfig.modifiers.applyStyle = {\n enabled: false\n };\n }\n return popperConfig;\n }; // Static\n\n Dropdown._jQueryInterface = function _jQueryInterface(config) {\n return this.each(function () {\n var data = $$$1(this).data(DATA_KEY);\n var _config = _typeof(config) === 'object' ? config : null;\n if (!data) {\n data = new Dropdown(this, _config);\n $$$1(this).data(DATA_KEY, data);\n }\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n data[config]();\n }\n });\n };\n Dropdown._clearMenus = function _clearMenus(event) {\n if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {\n return;\n }\n var toggles = $$$1.makeArray($$$1(Selector.DATA_TOGGLE));\n for (var i = 0; i < toggles.length; i++) {\n var parent = Dropdown._getParentFromElement(toggles[i]);\n var context = $$$1(toggles[i]).data(DATA_KEY);\n var relatedTarget = {\n relatedTarget: toggles[i]\n };\n if (!context) {\n continue;\n }\n var dropdownMenu = context._menu;\n if (!$$$1(parent).hasClass(ClassName.SHOW)) {\n continue;\n }\n if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $$$1.contains(parent, event.target)) {\n continue;\n }\n var hideEvent = $$$1.Event(Event.HIDE, relatedTarget);\n $$$1(parent).trigger(hideEvent);\n if (hideEvent.isDefaultPrevented()) {\n continue;\n } // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n if ('ontouchstart' in document.documentElement) {\n $$$1(document.body).children().off('mouseover', null, $$$1.noop);\n }\n toggles[i].setAttribute('aria-expanded', 'false');\n $$$1(dropdownMenu).removeClass(ClassName.SHOW);\n $$$1(parent).removeClass(ClassName.SHOW).trigger($$$1.Event(Event.HIDDEN, relatedTarget));\n }\n };\n Dropdown._getParentFromElement = function _getParentFromElement(element) {\n var parent;\n var selector = Util.getSelectorFromElement(element);\n if (selector) {\n parent = $$$1(selector)[0];\n }\n return parent || element.parentNode;\n }; // eslint-disable-next-line complexity\n\n Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {\n // If not input/textarea:\n // - And not a key in REGEXP_KEYDOWN => not a dropdown command\n // If input/textarea:\n // - If space key => not a dropdown command\n // - If key is other than escape\n // - If key is not up or down => not a dropdown command\n // - If trigger inside the menu => not a dropdown command\n if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $$$1(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n if (this.disabled || $$$1(this).hasClass(ClassName.DISABLED)) {\n return;\n }\n var parent = Dropdown._getParentFromElement(this);\n var isActive = $$$1(parent).hasClass(ClassName.SHOW);\n if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {\n if (event.which === ESCAPE_KEYCODE) {\n var toggle = $$$1(parent).find(Selector.DATA_TOGGLE)[0];\n $$$1(toggle).trigger('focus');\n }\n $$$1(this).trigger('click');\n return;\n }\n var items = $$$1(parent).find(Selector.VISIBLE_ITEMS).get();\n if (items.length === 0) {\n return;\n }\n var index = items.indexOf(event.target);\n if (event.which === ARROW_UP_KEYCODE && index > 0) {\n // Up\n index--;\n }\n if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {\n // Down\n index++;\n }\n if (index < 0) {\n index = 0;\n }\n items[index].focus();\n };\n _createClass(Dropdown, null, [{\n key: \"VERSION\",\n get: function get() {\n return VERSION;\n }\n }, {\n key: \"Default\",\n get: function get() {\n return Default;\n }\n }, {\n key: \"DefaultType\",\n get: function get() {\n return DefaultType;\n }\n }]);\n return Dropdown;\n }();\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $$$1(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + \" \" + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault();\n event.stopPropagation();\n Dropdown._jQueryInterface.call($$$1(this), 'toggle');\n }).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {\n e.stopPropagation();\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $$$1.fn[NAME] = Dropdown._jQueryInterface;\n $$$1.fn[NAME].Constructor = Dropdown;\n $$$1.fn[NAME].noConflict = function () {\n $$$1.fn[NAME] = JQUERY_NO_CONFLICT;\n return Dropdown._jQueryInterface;\n };\n return Dropdown;\n }($, Popper);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.1.1): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n var Modal = function ($$$1) {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n var NAME = 'modal';\n var VERSION = '4.1.1';\n var DATA_KEY = 'bs.modal';\n var EVENT_KEY = \".\" + DATA_KEY;\n var DATA_API_KEY = '.data-api';\n var JQUERY_NO_CONFLICT = $$$1.fn[NAME];\n var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key\n\n var Default = {\n backdrop: true,\n keyboard: true,\n focus: true,\n show: true\n };\n var DefaultType = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n focus: 'boolean',\n show: 'boolean'\n };\n var Event = {\n HIDE: \"hide\" + EVENT_KEY,\n HIDDEN: \"hidden\" + EVENT_KEY,\n SHOW: \"show\" + EVENT_KEY,\n SHOWN: \"shown\" + EVENT_KEY,\n FOCUSIN: \"focusin\" + EVENT_KEY,\n RESIZE: \"resize\" + EVENT_KEY,\n CLICK_DISMISS: \"click.dismiss\" + EVENT_KEY,\n KEYDOWN_DISMISS: \"keydown.dismiss\" + EVENT_KEY,\n MOUSEUP_DISMISS: \"mouseup.dismiss\" + EVENT_KEY,\n MOUSEDOWN_DISMISS: \"mousedown.dismiss\" + EVENT_KEY,\n CLICK_DATA_API: \"click\" + EVENT_KEY + DATA_API_KEY\n };\n var ClassName = {\n SCROLLBAR_MEASURER: 'modal-scrollbar-measure',\n BACKDROP: 'modal-backdrop',\n OPEN: 'modal-open',\n FADE: 'fade',\n SHOW: 'show'\n };\n var Selector = {\n DIALOG: '.modal-dialog',\n DATA_TOGGLE: '[data-toggle=\"modal\"]',\n DATA_DISMISS: '[data-dismiss=\"modal\"]',\n FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',\n STICKY_CONTENT: '.sticky-top',\n NAVBAR_TOGGLER: '.navbar-toggler'\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n };\n var Modal = /*#__PURE__*/\n function () {\n function Modal(element, config) {\n this._config = this._getConfig(config);\n this._element = element;\n this._dialog = $$$1(element).find(Selector.DIALOG)[0];\n this._backdrop = null;\n this._isShown = false;\n this._isBodyOverflowing = false;\n this._ignoreBackdropClick = false;\n this._scrollbarWidth = 0;\n } // Getters\n\n var _proto = Modal.prototype;\n\n // Public\n _proto.toggle = function toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n };\n _proto.show = function show(relatedTarget) {\n var _this = this;\n if (this._isTransitioning || this._isShown) {\n return;\n }\n if ($$$1(this._element).hasClass(ClassName.FADE)) {\n this._isTransitioning = true;\n }\n var showEvent = $$$1.Event(Event.SHOW, {\n relatedTarget: relatedTarget\n });\n $$$1(this._element).trigger(showEvent);\n if (this._isShown || showEvent.isDefaultPrevented()) {\n return;\n }\n this._isShown = true;\n this._checkScrollbar();\n this._setScrollbar();\n this._adjustDialog();\n $$$1(document.body).addClass(ClassName.OPEN);\n this._setEscapeEvent();\n this._setResizeEvent();\n $$$1(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {\n return _this.hide(event);\n });\n $$$1(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {\n $$$1(_this._element).one(Event.MOUSEUP_DISMISS, function (event) {\n if ($$$1(event.target).is(_this._element)) {\n _this._ignoreBackdropClick = true;\n }\n });\n });\n this._showBackdrop(function () {\n return _this._showElement(relatedTarget);\n });\n };\n _proto.hide = function hide(event) {\n var _this2 = this;\n if (event) {\n event.preventDefault();\n }\n if (this._isTransitioning || !this._isShown) {\n return;\n }\n var hideEvent = $$$1.Event(Event.HIDE);\n $$$1(this._element).trigger(hideEvent);\n if (!this._isShown || hideEvent.isDefaultPrevented()) {\n return;\n }\n this._isShown = false;\n var transition = $$$1(this._element).hasClass(ClassName.FADE);\n if (transition) {\n this._isTransitioning = true;\n }\n this._setEscapeEvent();\n this._setResizeEvent();\n $$$1(document).off(Event.FOCUSIN);\n $$$1(this._element).removeClass(ClassName.SHOW);\n $$$1(this._element).off(Event.CLICK_DISMISS);\n $$$1(this._dialog).off(Event.MOUSEDOWN_DISMISS);\n if (transition) {\n var transitionDuration = Util.getTransitionDurationFromElement(this._element);\n $$$1(this._element).one(Util.TRANSITION_END, function (event) {\n return _this2._hideModal(event);\n }).emulateTransitionEnd(transitionDuration);\n } else {\n this._hideModal();\n }\n };\n _proto.dispose = function dispose() {\n $$$1.removeData(this._element, DATA_KEY);\n $$$1(window, document, this._element, this._backdrop).off(EVENT_KEY);\n this._config = null;\n this._element = null;\n this._dialog = null;\n this._backdrop = null;\n this._isShown = null;\n this._isBodyOverflowing = null;\n this._ignoreBackdropClick = null;\n this._scrollbarWidth = null;\n };\n _proto.handleUpdate = function handleUpdate() {\n this._adjustDialog();\n }; // Private\n\n _proto._getConfig = function _getConfig(config) {\n config = _objectSpread({}, Default, config);\n Util.typeCheckConfig(NAME, config, DefaultType);\n return config;\n };\n _proto._showElement = function _showElement(relatedTarget) {\n var _this3 = this;\n var transition = $$$1(this._element).hasClass(ClassName.FADE);\n if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n // Don't move modal's DOM position\n document.body.appendChild(this._element);\n }\n this._element.style.display = 'block';\n this._element.removeAttribute('aria-hidden');\n this._element.scrollTop = 0;\n if (transition) {\n Util.reflow(this._element);\n }\n $$$1(this._element).addClass(ClassName.SHOW);\n if (this._config.focus) {\n this._enforceFocus();\n }\n var shownEvent = $$$1.Event(Event.SHOWN, {\n relatedTarget: relatedTarget\n });\n var transitionComplete = function transitionComplete() {\n if (_this3._config.focus) {\n _this3._element.focus();\n }\n _this3._isTransitioning = false;\n $$$1(_this3._element).trigger(shownEvent);\n };\n if (transition) {\n var transitionDuration = Util.getTransitionDurationFromElement(this._element);\n $$$1(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);\n } else {\n transitionComplete();\n }\n };\n _proto._enforceFocus = function _enforceFocus() {\n var _this4 = this;\n $$$1(document).off(Event.FOCUSIN) // Guard against infinite focus loop\n .on(Event.FOCUSIN, function (event) {\n if (document !== event.target && _this4._element !== event.target && $$$1(_this4._element).has(event.target).length === 0) {\n _this4._element.focus();\n }\n });\n };\n _proto._setEscapeEvent = function _setEscapeEvent() {\n var _this5 = this;\n if (this._isShown && this._config.keyboard) {\n $$$1(this._element).on(Event.KEYDOWN_DISMISS, function (event) {\n if (event.which === ESCAPE_KEYCODE) {\n event.preventDefault();\n _this5.hide();\n }\n });\n } else if (!this._isShown) {\n $$$1(this._element).off(Event.KEYDOWN_DISMISS);\n }\n };\n _proto._setResizeEvent = function _setResizeEvent() {\n var _this6 = this;\n if (this._isShown) {\n $$$1(window).on(Event.RESIZE, function (event) {\n return _this6.handleUpdate(event);\n });\n } else {\n $$$1(window).off(Event.RESIZE);\n }\n };\n _proto._hideModal = function _hideModal() {\n var _this7 = this;\n this._element.style.display = 'none';\n this._element.setAttribute('aria-hidden', true);\n this._isTransitioning = false;\n this._showBackdrop(function () {\n $$$1(document.body).removeClass(ClassName.OPEN);\n _this7._resetAdjustments();\n _this7._resetScrollbar();\n $$$1(_this7._element).trigger(Event.HIDDEN);\n });\n };\n _proto._removeBackdrop = function _removeBackdrop() {\n if (this._backdrop) {\n $$$1(this._backdrop).remove();\n this._backdrop = null;\n }\n };\n _proto._showBackdrop = function _showBackdrop(callback) {\n var _this8 = this;\n var animate = $$$1(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';\n if (this._isShown && this._config.backdrop) {\n this._backdrop = document.createElement('div');\n this._backdrop.className = ClassName.BACKDROP;\n if (animate) {\n $$$1(this._backdrop).addClass(animate);\n }\n $$$1(this._backdrop).appendTo(document.body);\n $$$1(this._element).on(Event.CLICK_DISMISS, function (event) {\n if (_this8._ignoreBackdropClick) {\n _this8._ignoreBackdropClick = false;\n return;\n }\n if (event.target !== event.currentTarget) {\n return;\n }\n if (_this8._config.backdrop === 'static') {\n _this8._element.focus();\n } else {\n _this8.hide();\n }\n });\n if (animate) {\n Util.reflow(this._backdrop);\n }\n $$$1(this._backdrop).addClass(ClassName.SHOW);\n if (!callback) {\n return;\n }\n if (!animate) {\n callback();\n return;\n }\n var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);\n $$$1(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);\n } else if (!this._isShown && this._backdrop) {\n $$$1(this._backdrop).removeClass(ClassName.SHOW);\n var callbackRemove = function callbackRemove() {\n _this8._removeBackdrop();\n if (callback) {\n callback();\n }\n };\n if ($$$1(this._element).hasClass(ClassName.FADE)) {\n var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);\n $$$1(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);\n } else {\n callbackRemove();\n }\n } else if (callback) {\n callback();\n }\n }; // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // todo (fat): these should probably be refactored out of modal.js\n // ----------------------------------------------------------------------\n\n _proto._adjustDialog = function _adjustDialog() {\n var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n if (!this._isBodyOverflowing && isModalOverflowing) {\n this._element.style.paddingLeft = this._scrollbarWidth + \"px\";\n }\n if (this._isBodyOverflowing && !isModalOverflowing) {\n this._element.style.paddingRight = this._scrollbarWidth + \"px\";\n }\n };\n _proto._resetAdjustments = function _resetAdjustments() {\n this._element.style.paddingLeft = '';\n this._element.style.paddingRight = '';\n };\n _proto._checkScrollbar = function _checkScrollbar() {\n var rect = document.body.getBoundingClientRect();\n this._isBodyOverflowing = rect.left + rect.right < window.innerWidth;\n this._scrollbarWidth = this._getScrollbarWidth();\n };\n _proto._setScrollbar = function _setScrollbar() {\n var _this9 = this;\n if (this._isBodyOverflowing) {\n // Note: DOMNode.style.paddingRight returns the actual value or '' if not set\n // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set\n // Adjust fixed content padding\n $$$1(Selector.FIXED_CONTENT).each(function (index, element) {\n var actualPadding = $$$1(element)[0].style.paddingRight;\n var calculatedPadding = $$$1(element).css('padding-right');\n $$$1(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + \"px\");\n }); // Adjust sticky content margin\n\n $$$1(Selector.STICKY_CONTENT).each(function (index, element) {\n var actualMargin = $$$1(element)[0].style.marginRight;\n var calculatedMargin = $$$1(element).css('margin-right');\n $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + \"px\");\n }); // Adjust navbar-toggler margin\n\n $$$1(Selector.NAVBAR_TOGGLER).each(function (index, element) {\n var actualMargin = $$$1(element)[0].style.marginRight;\n var calculatedMargin = $$$1(element).css('margin-right');\n $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + \"px\");\n }); // Adjust body padding\n\n var actualPadding = document.body.style.paddingRight;\n var calculatedPadding = $$$1(document.body).css('padding-right');\n $$$1(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + \"px\");\n }\n };\n _proto._resetScrollbar = function _resetScrollbar() {\n // Restore fixed content padding\n $$$1(Selector.FIXED_CONTENT).each(function (index, element) {\n var padding = $$$1(element).data('padding-right');\n if (typeof padding !== 'undefined') {\n $$$1(element).css('padding-right', padding).removeData('padding-right');\n }\n }); // Restore sticky content and navbar-toggler margin\n\n $$$1(Selector.STICKY_CONTENT + \", \" + Selector.NAVBAR_TOGGLER).each(function (index, element) {\n var margin = $$$1(element).data('margin-right');\n if (typeof margin !== 'undefined') {\n $$$1(element).css('margin-right', margin).removeData('margin-right');\n }\n }); // Restore body padding\n\n var padding = $$$1(document.body).data('padding-right');\n if (typeof padding !== 'undefined') {\n $$$1(document.body).css('padding-right', padding).removeData('padding-right');\n }\n };\n _proto._getScrollbarWidth = function _getScrollbarWidth() {\n // thx d.walsh\n var scrollDiv = document.createElement('div');\n scrollDiv.className = ClassName.SCROLLBAR_MEASURER;\n document.body.appendChild(scrollDiv);\n var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarWidth;\n }; // Static\n\n Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n var data = $$$1(this).data(DATA_KEY);\n var _config = _objectSpread({}, Default, $$$1(this).data(), _typeof(config) === 'object' && config ? config : {});\n if (!data) {\n data = new Modal(this, _config);\n $$$1(this).data(DATA_KEY, data);\n }\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n data[config](relatedTarget);\n } else if (_config.show) {\n data.show(relatedTarget);\n }\n });\n };\n _createClass(Modal, null, [{\n key: \"VERSION\",\n get: function get() {\n return VERSION;\n }\n }, {\n key: \"Default\",\n get: function get() {\n return Default;\n }\n }]);\n return Modal;\n }();\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n var _this10 = this;\n var target;\n var selector = Util.getSelectorFromElement(this);\n if (selector) {\n target = $$$1(selector)[0];\n }\n var config = $$$1(target).data(DATA_KEY) ? 'toggle' : _objectSpread({}, $$$1(target).data(), $$$1(this).data());\n if (this.tagName === 'A' || this.tagName === 'AREA') {\n event.preventDefault();\n }\n var $target = $$$1(target).one(Event.SHOW, function (showEvent) {\n if (showEvent.isDefaultPrevented()) {\n // Only register focus restorer if modal will actually get shown\n return;\n }\n $target.one(Event.HIDDEN, function () {\n if ($$$1(_this10).is(':visible')) {\n _this10.focus();\n }\n });\n });\n Modal._jQueryInterface.call($$$1(target), config, this);\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $$$1.fn[NAME] = Modal._jQueryInterface;\n $$$1.fn[NAME].Constructor = Modal;\n $$$1.fn[NAME].noConflict = function () {\n $$$1.fn[NAME] = JQUERY_NO_CONFLICT;\n return Modal._jQueryInterface;\n };\n return Modal;\n }($);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.1.1): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n var Tooltip = function ($$$1) {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n var NAME = 'tooltip';\n var VERSION = '4.1.1';\n var DATA_KEY = 'bs.tooltip';\n var EVENT_KEY = \".\" + DATA_KEY;\n var JQUERY_NO_CONFLICT = $$$1.fn[NAME];\n var CLASS_PREFIX = 'bs-tooltip';\n var BSCLS_PREFIX_REGEX = new RegExp(\"(^|\\\\s)\" + CLASS_PREFIX + \"\\\\S+\", 'g');\n var DefaultType = {\n animation: 'boolean',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string',\n delay: '(number|object)',\n html: 'boolean',\n selector: '(string|boolean)',\n placement: '(string|function)',\n offset: '(number|string)',\n container: '(string|element|boolean)',\n fallbackPlacement: '(string|array)',\n boundary: '(string|element)'\n };\n var AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: 'right',\n BOTTOM: 'bottom',\n LEFT: 'left'\n };\n var Default = {\n animation: true,\n template: '<div class=\"tooltip\" role=\"tooltip\">' + '<div class=\"arrow\"></div>' + '<div class=\"tooltip-inner\"></div></div>',\n trigger: 'hover focus',\n title: '',\n delay: 0,\n html: false,\n selector: false,\n placement: 'top',\n offset: 0,\n container: false,\n fallbackPlacement: 'flip',\n boundary: 'scrollParent'\n };\n var HoverState = {\n SHOW: 'show',\n OUT: 'out'\n };\n var Event = {\n HIDE: \"hide\" + EVENT_KEY,\n HIDDEN: \"hidden\" + EVENT_KEY,\n SHOW: \"show\" + EVENT_KEY,\n SHOWN: \"shown\" + EVENT_KEY,\n INSERTED: \"inserted\" + EVENT_KEY,\n CLICK: \"click\" + EVENT_KEY,\n FOCUSIN: \"focusin\" + EVENT_KEY,\n FOCUSOUT: \"focusout\" + EVENT_KEY,\n MOUSEENTER: \"mouseenter\" + EVENT_KEY,\n MOUSELEAVE: \"mouseleave\" + EVENT_KEY\n };\n var ClassName = {\n FADE: 'fade',\n SHOW: 'show'\n };\n var Selector = {\n TOOLTIP: '.tooltip',\n TOOLTIP_INNER: '.tooltip-inner',\n ARROW: '.arrow'\n };\n var Trigger = {\n HOVER: 'hover',\n FOCUS: 'focus',\n CLICK: 'click',\n MANUAL: 'manual'\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n };\n var Tooltip = /*#__PURE__*/\n function () {\n function Tooltip(element, config) {\n /**\n * Check for Popper dependency\n * Popper - https://popper.js.org\n */\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap tooltips require Popper.js (https://popper.js.org)');\n } // private\n\n this._isEnabled = true;\n this._timeout = 0;\n this._hoverState = '';\n this._activeTrigger = {};\n this._popper = null; // Protected\n\n this.element = element;\n this.config = this._getConfig(config);\n this.tip = null;\n this._setListeners();\n } // Getters\n\n var _proto = Tooltip.prototype;\n\n // Public\n _proto.enable = function enable() {\n this._isEnabled = true;\n };\n _proto.disable = function disable() {\n this._isEnabled = false;\n };\n _proto.toggleEnabled = function toggleEnabled() {\n this._isEnabled = !this._isEnabled;\n };\n _proto.toggle = function toggle(event) {\n if (!this._isEnabled) {\n return;\n }\n if (event) {\n var dataKey = this.constructor.DATA_KEY;\n var context = $$$1(event.currentTarget).data(dataKey);\n if (!context) {\n context = new this.constructor(event.currentTarget, this._getDelegateConfig());\n $$$1(event.currentTarget).data(dataKey, context);\n }\n context._activeTrigger.click = !context._activeTrigger.click;\n if (context._isWithActiveTrigger()) {\n context._enter(null, context);\n } else {\n context._leave(null, context);\n }\n } else {\n if ($$$1(this.getTipElement()).hasClass(ClassName.SHOW)) {\n this._leave(null, this);\n return;\n }\n this._enter(null, this);\n }\n };\n _proto.dispose = function dispose() {\n clearTimeout(this._timeout);\n $$$1.removeData(this.element, this.constructor.DATA_KEY);\n $$$1(this.element).off(this.constructor.EVENT_KEY);\n $$$1(this.element).closest('.modal').off('hide.bs.modal');\n if (this.tip) {\n $$$1(this.tip).remove();\n }\n this._isEnabled = null;\n this._timeout = null;\n this._hoverState = null;\n this._activeTrigger = null;\n if (this._popper !== null) {\n this._popper.destroy();\n }\n this._popper = null;\n this.element = null;\n this.config = null;\n this.tip = null;\n };\n _proto.show = function show() {\n var _this = this;\n if ($$$1(this.element).css('display') === 'none') {\n throw new Error('Please use show on visible elements');\n }\n var showEvent = $$$1.Event(this.constructor.Event.SHOW);\n if (this.isWithContent() && this._isEnabled) {\n $$$1(this.element).trigger(showEvent);\n var isInTheDom = $$$1.contains(this.element.ownerDocument.documentElement, this.element);\n if (showEvent.isDefaultPrevented() || !isInTheDom) {\n return;\n }\n var tip = this.getTipElement();\n var tipId = Util.getUID(this.constructor.NAME);\n tip.setAttribute('id', tipId);\n this.element.setAttribute('aria-describedby', tipId);\n this.setContent();\n if (this.config.animation) {\n $$$1(tip).addClass(ClassName.FADE);\n }\n var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;\n var attachment = this._getAttachment(placement);\n this.addAttachmentClass(attachment);\n var container = this.config.container === false ? document.body : $$$1(this.config.container);\n $$$1(tip).data(this.constructor.DATA_KEY, this);\n if (!$$$1.contains(this.element.ownerDocument.documentElement, this.tip)) {\n $$$1(tip).appendTo(container);\n }\n $$$1(this.element).trigger(this.constructor.Event.INSERTED);\n this._popper = new Popper(this.element, tip, {\n placement: attachment,\n modifiers: {\n offset: {\n offset: this.config.offset\n },\n flip: {\n behavior: this.config.fallbackPlacement\n },\n arrow: {\n element: Selector.ARROW\n },\n preventOverflow: {\n boundariesElement: this.config.boundary\n }\n },\n onCreate: function onCreate(data) {\n if (data.originalPlacement !== data.placement) {\n _this._handlePopperPlacementChange(data);\n }\n },\n onUpdate: function onUpdate(data) {\n _this._handlePopperPlacementChange(data);\n }\n });\n $$$1(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n if ('ontouchstart' in document.documentElement) {\n $$$1(document.body).children().on('mouseover', null, $$$1.noop);\n }\n var complete = function complete() {\n if (_this.config.animation) {\n _this._fixTransition();\n }\n var prevHoverState = _this._hoverState;\n _this._hoverState = null;\n $$$1(_this.element).trigger(_this.constructor.Event.SHOWN);\n if (prevHoverState === HoverState.OUT) {\n _this._leave(null, _this);\n }\n };\n if ($$$1(this.tip).hasClass(ClassName.FADE)) {\n var transitionDuration = Util.getTransitionDurationFromElement(this.tip);\n $$$1(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);\n } else {\n complete();\n }\n }\n };\n _proto.hide = function hide(callback) {\n var _this2 = this;\n var tip = this.getTipElement();\n var hideEvent = $$$1.Event(this.constructor.Event.HIDE);\n var complete = function complete() {\n if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {\n tip.parentNode.removeChild(tip);\n }\n _this2._cleanTipClass();\n _this2.element.removeAttribute('aria-describedby');\n $$$1(_this2.element).trigger(_this2.constructor.Event.HIDDEN);\n if (_this2._popper !== null) {\n _this2._popper.destroy();\n }\n if (callback) {\n callback();\n }\n };\n $$$1(this.element).trigger(hideEvent);\n if (hideEvent.isDefaultPrevented()) {\n return;\n }\n $$$1(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n if ('ontouchstart' in document.documentElement) {\n $$$1(document.body).children().off('mouseover', null, $$$1.noop);\n }\n this._activeTrigger[Trigger.CLICK] = false;\n this._activeTrigger[Trigger.FOCUS] = false;\n this._activeTrigger[Trigger.HOVER] = false;\n if ($$$1(this.tip).hasClass(ClassName.FADE)) {\n var transitionDuration = Util.getTransitionDurationFromElement(tip);\n $$$1(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);\n } else {\n complete();\n }\n this._hoverState = '';\n };\n _proto.update = function update() {\n if (this._popper !== null) {\n this._popper.scheduleUpdate();\n }\n }; // Protected\n\n _proto.isWithContent = function isWithContent() {\n return Boolean(this.getTitle());\n };\n _proto.addAttachmentClass = function addAttachmentClass(attachment) {\n $$$1(this.getTipElement()).addClass(CLASS_PREFIX + \"-\" + attachment);\n };\n _proto.getTipElement = function getTipElement() {\n this.tip = this.tip || $$$1(this.config.template)[0];\n return this.tip;\n };\n _proto.setContent = function setContent() {\n var $tip = $$$1(this.getTipElement());\n this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());\n $tip.removeClass(ClassName.FADE + \" \" + ClassName.SHOW);\n };\n _proto.setElementContent = function setElementContent($element, content) {\n var html = this.config.html;\n if (_typeof(content) === 'object' && (content.nodeType || content.jquery)) {\n // Content is a DOM node or a jQuery\n if (html) {\n if (!$$$1(content).parent().is($element)) {\n $element.empty().append(content);\n }\n } else {\n $element.text($$$1(content).text());\n }\n } else {\n $element[html ? 'html' : 'text'](content);\n }\n };\n _proto.getTitle = function getTitle() {\n var title = this.element.getAttribute('data-original-title');\n if (!title) {\n title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;\n }\n return title;\n }; // Private\n\n _proto._getAttachment = function _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()];\n };\n _proto._setListeners = function _setListeners() {\n var _this3 = this;\n var triggers = this.config.trigger.split(' ');\n triggers.forEach(function (trigger) {\n if (trigger === 'click') {\n $$$1(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) {\n return _this3.toggle(event);\n });\n } else if (trigger !== Trigger.MANUAL) {\n var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN;\n var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT;\n $$$1(_this3.element).on(eventIn, _this3.config.selector, function (event) {\n return _this3._enter(event);\n }).on(eventOut, _this3.config.selector, function (event) {\n return _this3._leave(event);\n });\n }\n $$$1(_this3.element).closest('.modal').on('hide.bs.modal', function () {\n return _this3.hide();\n });\n });\n if (this.config.selector) {\n this.config = _objectSpread({}, this.config, {\n trigger: 'manual',\n selector: ''\n });\n } else {\n this._fixTitle();\n }\n };\n _proto._fixTitle = function _fixTitle() {\n var titleType = _typeof(this.element.getAttribute('data-original-title'));\n if (this.element.getAttribute('title') || titleType !== 'string') {\n this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');\n this.element.setAttribute('title', '');\n }\n };\n _proto._enter = function _enter(event, context) {\n var dataKey = this.constructor.DATA_KEY;\n context = context || $$$1(event.currentTarget).data(dataKey);\n if (!context) {\n context = new this.constructor(event.currentTarget, this._getDelegateConfig());\n $$$1(event.currentTarget).data(dataKey, context);\n }\n if (event) {\n context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;\n }\n if ($$$1(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {\n context._hoverState = HoverState.SHOW;\n return;\n }\n clearTimeout(context._timeout);\n context._hoverState = HoverState.SHOW;\n if (!context.config.delay || !context.config.delay.show) {\n context.show();\n return;\n }\n context._timeout = setTimeout(function () {\n if (context._hoverState === HoverState.SHOW) {\n context.show();\n }\n }, context.config.delay.show);\n };\n _proto._leave = function _leave(event, context) {\n var dataKey = this.constructor.DATA_KEY;\n context = context || $$$1(event.currentTarget).data(dataKey);\n if (!context) {\n context = new this.constructor(event.currentTarget, this._getDelegateConfig());\n $$$1(event.currentTarget).data(dataKey, context);\n }\n if (event) {\n context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;\n }\n if (context._isWithActiveTrigger()) {\n return;\n }\n clearTimeout(context._timeout);\n context._hoverState = HoverState.OUT;\n if (!context.config.delay || !context.config.delay.hide) {\n context.hide();\n return;\n }\n context._timeout = setTimeout(function () {\n if (context._hoverState === HoverState.OUT) {\n context.hide();\n }\n }, context.config.delay.hide);\n };\n _proto._isWithActiveTrigger = function _isWithActiveTrigger() {\n for (var trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true;\n }\n }\n return false;\n };\n _proto._getConfig = function _getConfig(config) {\n config = _objectSpread({}, this.constructor.Default, $$$1(this.element).data(), _typeof(config) === 'object' && config ? config : {});\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n };\n }\n if (typeof config.title === 'number') {\n config.title = config.title.toString();\n }\n if (typeof config.content === 'number') {\n config.content = config.content.toString();\n }\n Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);\n return config;\n };\n _proto._getDelegateConfig = function _getDelegateConfig() {\n var config = {};\n if (this.config) {\n for (var key in this.config) {\n if (this.constructor.Default[key] !== this.config[key]) {\n config[key] = this.config[key];\n }\n }\n }\n return config;\n };\n _proto._cleanTipClass = function _cleanTipClass() {\n var $tip = $$$1(this.getTipElement());\n var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);\n if (tabClass !== null && tabClass.length > 0) {\n $tip.removeClass(tabClass.join(''));\n }\n };\n _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(data) {\n this._cleanTipClass();\n this.addAttachmentClass(this._getAttachment(data.placement));\n };\n _proto._fixTransition = function _fixTransition() {\n var tip = this.getTipElement();\n var initConfigAnimation = this.config.animation;\n if (tip.getAttribute('x-placement') !== null) {\n return;\n }\n $$$1(tip).removeClass(ClassName.FADE);\n this.config.animation = false;\n this.hide();\n this.show();\n this.config.animation = initConfigAnimation;\n }; // Static\n\n Tooltip._jQueryInterface = function _jQueryInterface(config) {\n return this.each(function () {\n var data = $$$1(this).data(DATA_KEY);\n var _config = _typeof(config) === 'object' && config;\n if (!data && /dispose|hide/.test(config)) {\n return;\n }\n if (!data) {\n data = new Tooltip(this, _config);\n $$$1(this).data(DATA_KEY, data);\n }\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n data[config]();\n }\n });\n };\n _createClass(Tooltip, null, [{\n key: \"VERSION\",\n get: function get() {\n return VERSION;\n }\n }, {\n key: \"Default\",\n get: function get() {\n return Default;\n }\n }, {\n key: \"NAME\",\n get: function get() {\n return NAME;\n }\n }, {\n key: \"DATA_KEY\",\n get: function get() {\n return DATA_KEY;\n }\n }, {\n key: \"Event\",\n get: function get() {\n return Event;\n }\n }, {\n key: \"EVENT_KEY\",\n get: function get() {\n return EVENT_KEY;\n }\n }, {\n key: \"DefaultType\",\n get: function get() {\n return DefaultType;\n }\n }]);\n return Tooltip;\n }();\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $$$1.fn[NAME] = Tooltip._jQueryInterface;\n $$$1.fn[NAME].Constructor = Tooltip;\n $$$1.fn[NAME].noConflict = function () {\n $$$1.fn[NAME] = JQUERY_NO_CONFLICT;\n return Tooltip._jQueryInterface;\n };\n return Tooltip;\n }($, Popper);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.1.1): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n var Popover = function ($$$1) {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n var NAME = 'popover';\n var VERSION = '4.1.1';\n var DATA_KEY = 'bs.popover';\n var EVENT_KEY = \".\" + DATA_KEY;\n var JQUERY_NO_CONFLICT = $$$1.fn[NAME];\n var CLASS_PREFIX = 'bs-popover';\n var BSCLS_PREFIX_REGEX = new RegExp(\"(^|\\\\s)\" + CLASS_PREFIX + \"\\\\S+\", 'g');\n var Default = _objectSpread({}, Tooltip.Default, {\n placement: 'right',\n trigger: 'click',\n content: '',\n template: '<div class=\"popover\" role=\"tooltip\">' + '<div class=\"arrow\"></div>' + '<h3 class=\"popover-header\"></h3>' + '<div class=\"popover-body\"></div></div>'\n });\n var DefaultType = _objectSpread({}, Tooltip.DefaultType, {\n content: '(string|element|function)'\n });\n var ClassName = {\n FADE: 'fade',\n SHOW: 'show'\n };\n var Selector = {\n TITLE: '.popover-header',\n CONTENT: '.popover-body'\n };\n var Event = {\n HIDE: \"hide\" + EVENT_KEY,\n HIDDEN: \"hidden\" + EVENT_KEY,\n SHOW: \"show\" + EVENT_KEY,\n SHOWN: \"shown\" + EVENT_KEY,\n INSERTED: \"inserted\" + EVENT_KEY,\n CLICK: \"click\" + EVENT_KEY,\n FOCUSIN: \"focusin\" + EVENT_KEY,\n FOCUSOUT: \"focusout\" + EVENT_KEY,\n MOUSEENTER: \"mouseenter\" + EVENT_KEY,\n MOUSELEAVE: \"mouseleave\" + EVENT_KEY\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n };\n var Popover = /*#__PURE__*/\n function (_Tooltip) {\n _inheritsLoose(Popover, _Tooltip);\n function Popover() {\n return _Tooltip.apply(this, arguments) || this;\n }\n var _proto = Popover.prototype;\n\n // Overrides\n _proto.isWithContent = function isWithContent() {\n return this.getTitle() || this._getContent();\n };\n _proto.addAttachmentClass = function addAttachmentClass(attachment) {\n $$$1(this.getTipElement()).addClass(CLASS_PREFIX + \"-\" + attachment);\n };\n _proto.getTipElement = function getTipElement() {\n this.tip = this.tip || $$$1(this.config.template)[0];\n return this.tip;\n };\n _proto.setContent = function setContent() {\n var $tip = $$$1(this.getTipElement()); // We use append for html objects to maintain js events\n\n this.setElementContent($tip.find(Selector.TITLE), this.getTitle());\n var content = this._getContent();\n if (typeof content === 'function') {\n content = content.call(this.element);\n }\n this.setElementContent($tip.find(Selector.CONTENT), content);\n $tip.removeClass(ClassName.FADE + \" \" + ClassName.SHOW);\n }; // Private\n\n _proto._getContent = function _getContent() {\n return this.element.getAttribute('data-content') || this.config.content;\n };\n _proto._cleanTipClass = function _cleanTipClass() {\n var $tip = $$$1(this.getTipElement());\n var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);\n if (tabClass !== null && tabClass.length > 0) {\n $tip.removeClass(tabClass.join(''));\n }\n }; // Static\n\n Popover._jQueryInterface = function _jQueryInterface(config) {\n return this.each(function () {\n var data = $$$1(this).data(DATA_KEY);\n var _config = _typeof(config) === 'object' ? config : null;\n if (!data && /destroy|hide/.test(config)) {\n return;\n }\n if (!data) {\n data = new Popover(this, _config);\n $$$1(this).data(DATA_KEY, data);\n }\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n data[config]();\n }\n });\n };\n _createClass(Popover, null, [{\n key: \"VERSION\",\n // Getters\n get: function get() {\n return VERSION;\n }\n }, {\n key: \"Default\",\n get: function get() {\n return Default;\n }\n }, {\n key: \"NAME\",\n get: function get() {\n return NAME;\n }\n }, {\n key: \"DATA_KEY\",\n get: function get() {\n return DATA_KEY;\n }\n }, {\n key: \"Event\",\n get: function get() {\n return Event;\n }\n }, {\n key: \"EVENT_KEY\",\n get: function get() {\n return EVENT_KEY;\n }\n }, {\n key: \"DefaultType\",\n get: function get() {\n return DefaultType;\n }\n }]);\n return Popover;\n }(Tooltip);\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $$$1.fn[NAME] = Popover._jQueryInterface;\n $$$1.fn[NAME].Constructor = Popover;\n $$$1.fn[NAME].noConflict = function () {\n $$$1.fn[NAME] = JQUERY_NO_CONFLICT;\n return Popover._jQueryInterface;\n };\n return Popover;\n }($);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.1.1): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n var ScrollSpy = function ($$$1) {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n var NAME = 'scrollspy';\n var VERSION = '4.1.1';\n var DATA_KEY = 'bs.scrollspy';\n var EVENT_KEY = \".\" + DATA_KEY;\n var DATA_API_KEY = '.data-api';\n var JQUERY_NO_CONFLICT = $$$1.fn[NAME];\n var Default = {\n offset: 10,\n method: 'auto',\n target: ''\n };\n var DefaultType = {\n offset: 'number',\n method: 'string',\n target: '(string|element)'\n };\n var Event = {\n ACTIVATE: \"activate\" + EVENT_KEY,\n SCROLL: \"scroll\" + EVENT_KEY,\n LOAD_DATA_API: \"load\" + EVENT_KEY + DATA_API_KEY\n };\n var ClassName = {\n DROPDOWN_ITEM: 'dropdown-item',\n DROPDOWN_MENU: 'dropdown-menu',\n ACTIVE: 'active'\n };\n var Selector = {\n DATA_SPY: '[data-spy=\"scroll\"]',\n ACTIVE: '.active',\n NAV_LIST_GROUP: '.nav, .list-group',\n NAV_LINKS: '.nav-link',\n NAV_ITEMS: '.nav-item',\n LIST_ITEMS: '.list-group-item',\n DROPDOWN: '.dropdown',\n DROPDOWN_ITEMS: '.dropdown-item',\n DROPDOWN_TOGGLE: '.dropdown-toggle'\n };\n var OffsetMethod = {\n OFFSET: 'offset',\n POSITION: 'position'\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n };\n var ScrollSpy = /*#__PURE__*/\n function () {\n function ScrollSpy(element, config) {\n var _this = this;\n this._element = element;\n this._scrollElement = element.tagName === 'BODY' ? window : element;\n this._config = this._getConfig(config);\n this._selector = this._config.target + \" \" + Selector.NAV_LINKS + \",\" + (this._config.target + \" \" + Selector.LIST_ITEMS + \",\") + (this._config.target + \" \" + Selector.DROPDOWN_ITEMS);\n this._offsets = [];\n this._targets = [];\n this._activeTarget = null;\n this._scrollHeight = 0;\n $$$1(this._scrollElement).on(Event.SCROLL, function (event) {\n return _this._process(event);\n });\n this.refresh();\n this._process();\n } // Getters\n\n var _proto = ScrollSpy.prototype;\n\n // Public\n _proto.refresh = function refresh() {\n var _this2 = this;\n var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION;\n var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;\n var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;\n this._offsets = [];\n this._targets = [];\n this._scrollHeight = this._getScrollHeight();\n var targets = $$$1.makeArray($$$1(this._selector));\n targets.map(function (element) {\n var target;\n var targetSelector = Util.getSelectorFromElement(element);\n if (targetSelector) {\n target = $$$1(targetSelector)[0];\n }\n if (target) {\n var targetBCR = target.getBoundingClientRect();\n if (targetBCR.width || targetBCR.height) {\n // TODO (fat): remove sketch reliance on jQuery position/offset\n return [$$$1(target)[offsetMethod]().top + offsetBase, targetSelector];\n }\n }\n return null;\n }).filter(function (item) {\n return item;\n }).sort(function (a, b) {\n return a[0] - b[0];\n }).forEach(function (item) {\n _this2._offsets.push(item[0]);\n _this2._targets.push(item[1]);\n });\n };\n _proto.dispose = function dispose() {\n $$$1.removeData(this._element, DATA_KEY);\n $$$1(this._scrollElement).off(EVENT_KEY);\n this._element = null;\n this._scrollElement = null;\n this._config = null;\n this._selector = null;\n this._offsets = null;\n this._targets = null;\n this._activeTarget = null;\n this._scrollHeight = null;\n }; // Private\n\n _proto._getConfig = function _getConfig(config) {\n config = _objectSpread({}, Default, _typeof(config) === 'object' && config ? config : {});\n if (typeof config.target !== 'string') {\n var id = $$$1(config.target).attr('id');\n if (!id) {\n id = Util.getUID(NAME);\n $$$1(config.target).attr('id', id);\n }\n config.target = \"#\" + id;\n }\n Util.typeCheckConfig(NAME, config, DefaultType);\n return config;\n };\n _proto._getScrollTop = function _getScrollTop() {\n return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;\n };\n _proto._getScrollHeight = function _getScrollHeight() {\n return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);\n };\n _proto._getOffsetHeight = function _getOffsetHeight() {\n return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;\n };\n _proto._process = function _process() {\n var scrollTop = this._getScrollTop() + this._config.offset;\n var scrollHeight = this._getScrollHeight();\n var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();\n if (this._scrollHeight !== scrollHeight) {\n this.refresh();\n }\n if (scrollTop >= maxScroll) {\n var target = this._targets[this._targets.length - 1];\n if (this._activeTarget !== target) {\n this._activate(target);\n }\n return;\n }\n if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {\n this._activeTarget = null;\n this._clear();\n return;\n }\n for (var i = this._offsets.length; i--;) {\n var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);\n if (isActiveTarget) {\n this._activate(this._targets[i]);\n }\n }\n };\n _proto._activate = function _activate(target) {\n this._activeTarget = target;\n this._clear();\n var queries = this._selector.split(','); // eslint-disable-next-line arrow-body-style\n\n queries = queries.map(function (selector) {\n return selector + \"[data-target=\\\"\" + target + \"\\\"],\" + (selector + \"[href=\\\"\" + target + \"\\\"]\");\n });\n var $link = $$$1(queries.join(','));\n if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {\n $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);\n $link.addClass(ClassName.ACTIVE);\n } else {\n // Set triggered link as active\n $link.addClass(ClassName.ACTIVE); // Set triggered links parents as active\n // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor\n\n $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS + \", \" + Selector.LIST_ITEMS).addClass(ClassName.ACTIVE); // Handle special case when .nav-link is inside .nav-item\n\n $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);\n }\n $$$1(this._scrollElement).trigger(Event.ACTIVATE, {\n relatedTarget: target\n });\n };\n _proto._clear = function _clear() {\n $$$1(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);\n }; // Static\n\n ScrollSpy._jQueryInterface = function _jQueryInterface(config) {\n return this.each(function () {\n var data = $$$1(this).data(DATA_KEY);\n var _config = _typeof(config) === 'object' && config;\n if (!data) {\n data = new ScrollSpy(this, _config);\n $$$1(this).data(DATA_KEY, data);\n }\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n data[config]();\n }\n });\n };\n _createClass(ScrollSpy, null, [{\n key: \"VERSION\",\n get: function get() {\n return VERSION;\n }\n }, {\n key: \"Default\",\n get: function get() {\n return Default;\n }\n }]);\n return ScrollSpy;\n }();\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $$$1(window).on(Event.LOAD_DATA_API, function () {\n var scrollSpys = $$$1.makeArray($$$1(Selector.DATA_SPY));\n for (var i = scrollSpys.length; i--;) {\n var $spy = $$$1(scrollSpys[i]);\n ScrollSpy._jQueryInterface.call($spy, $spy.data());\n }\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $$$1.fn[NAME] = ScrollSpy._jQueryInterface;\n $$$1.fn[NAME].Constructor = ScrollSpy;\n $$$1.fn[NAME].noConflict = function () {\n $$$1.fn[NAME] = JQUERY_NO_CONFLICT;\n return ScrollSpy._jQueryInterface;\n };\n return ScrollSpy;\n }($);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.1.1): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n var Tab = function ($$$1) {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n var NAME = 'tab';\n var VERSION = '4.1.1';\n var DATA_KEY = 'bs.tab';\n var EVENT_KEY = \".\" + DATA_KEY;\n var DATA_API_KEY = '.data-api';\n var JQUERY_NO_CONFLICT = $$$1.fn[NAME];\n var Event = {\n HIDE: \"hide\" + EVENT_KEY,\n HIDDEN: \"hidden\" + EVENT_KEY,\n SHOW: \"show\" + EVENT_KEY,\n SHOWN: \"shown\" + EVENT_KEY,\n CLICK_DATA_API: \"click\" + EVENT_KEY + DATA_API_KEY\n };\n var ClassName = {\n DROPDOWN_MENU: 'dropdown-menu',\n ACTIVE: 'active',\n DISABLED: 'disabled',\n FADE: 'fade',\n SHOW: 'show'\n };\n var Selector = {\n DROPDOWN: '.dropdown',\n NAV_LIST_GROUP: '.nav, .list-group',\n ACTIVE: '.active',\n ACTIVE_UL: '> li > .active',\n DATA_TOGGLE: '[data-toggle=\"tab\"], [data-toggle=\"pill\"], [data-toggle=\"list\"]',\n DROPDOWN_TOGGLE: '.dropdown-toggle',\n DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n };\n var Tab = /*#__PURE__*/\n function () {\n function Tab(element) {\n this._element = element;\n } // Getters\n\n var _proto = Tab.prototype;\n\n // Public\n _proto.show = function show() {\n var _this = this;\n if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $$$1(this._element).hasClass(ClassName.ACTIVE) || $$$1(this._element).hasClass(ClassName.DISABLED)) {\n return;\n }\n var target;\n var previous;\n var listElement = $$$1(this._element).closest(Selector.NAV_LIST_GROUP)[0];\n var selector = Util.getSelectorFromElement(this._element);\n if (listElement) {\n var itemSelector = listElement.nodeName === 'UL' ? Selector.ACTIVE_UL : Selector.ACTIVE;\n previous = $$$1.makeArray($$$1(listElement).find(itemSelector));\n previous = previous[previous.length - 1];\n }\n var hideEvent = $$$1.Event(Event.HIDE, {\n relatedTarget: this._element\n });\n var showEvent = $$$1.Event(Event.SHOW, {\n relatedTarget: previous\n });\n if (previous) {\n $$$1(previous).trigger(hideEvent);\n }\n $$$1(this._element).trigger(showEvent);\n if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {\n return;\n }\n if (selector) {\n target = $$$1(selector)[0];\n }\n this._activate(this._element, listElement);\n var complete = function complete() {\n var hiddenEvent = $$$1.Event(Event.HIDDEN, {\n relatedTarget: _this._element\n });\n var shownEvent = $$$1.Event(Event.SHOWN, {\n relatedTarget: previous\n });\n $$$1(previous).trigger(hiddenEvent);\n $$$1(_this._element).trigger(shownEvent);\n };\n if (target) {\n this._activate(target, target.parentNode, complete);\n } else {\n complete();\n }\n };\n _proto.dispose = function dispose() {\n $$$1.removeData(this._element, DATA_KEY);\n this._element = null;\n }; // Private\n\n _proto._activate = function _activate(element, container, callback) {\n var _this2 = this;\n var activeElements;\n if (container.nodeName === 'UL') {\n activeElements = $$$1(container).find(Selector.ACTIVE_UL);\n } else {\n activeElements = $$$1(container).children(Selector.ACTIVE);\n }\n var active = activeElements[0];\n var isTransitioning = callback && active && $$$1(active).hasClass(ClassName.FADE);\n var complete = function complete() {\n return _this2._transitionComplete(element, active, callback);\n };\n if (active && isTransitioning) {\n var transitionDuration = Util.getTransitionDurationFromElement(active);\n $$$1(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);\n } else {\n complete();\n }\n };\n _proto._transitionComplete = function _transitionComplete(element, active, callback) {\n if (active) {\n $$$1(active).removeClass(ClassName.SHOW + \" \" + ClassName.ACTIVE);\n var dropdownChild = $$$1(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];\n if (dropdownChild) {\n $$$1(dropdownChild).removeClass(ClassName.ACTIVE);\n }\n if (active.getAttribute('role') === 'tab') {\n active.setAttribute('aria-selected', false);\n }\n }\n $$$1(element).addClass(ClassName.ACTIVE);\n if (element.getAttribute('role') === 'tab') {\n element.setAttribute('aria-selected', true);\n }\n Util.reflow(element);\n $$$1(element).addClass(ClassName.SHOW);\n if (element.parentNode && $$$1(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {\n var dropdownElement = $$$1(element).closest(Selector.DROPDOWN)[0];\n if (dropdownElement) {\n $$$1(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);\n }\n element.setAttribute('aria-expanded', true);\n }\n if (callback) {\n callback();\n }\n }; // Static\n\n Tab._jQueryInterface = function _jQueryInterface(config) {\n return this.each(function () {\n var $this = $$$1(this);\n var data = $this.data(DATA_KEY);\n if (!data) {\n data = new Tab(this);\n $this.data(DATA_KEY, data);\n }\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n }\n data[config]();\n }\n });\n };\n _createClass(Tab, null, [{\n key: \"VERSION\",\n get: function get() {\n return VERSION;\n }\n }]);\n return Tab;\n }();\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault();\n Tab._jQueryInterface.call($$$1(this), 'show');\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $$$1.fn[NAME] = Tab._jQueryInterface;\n $$$1.fn[NAME].Constructor = Tab;\n $$$1.fn[NAME].noConflict = function () {\n $$$1.fn[NAME] = JQUERY_NO_CONFLICT;\n return Tab._jQueryInterface;\n };\n return Tab;\n }($);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.1.1): index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n (function ($$$1) {\n if (typeof $$$1 === 'undefined') {\n throw new TypeError('Bootstrap\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\'s JavaScript.');\n }\n var version = $$$1.fn.jquery.split(' ')[0].split('.');\n var minMajor = 1;\n var ltMajor = 2;\n var minMinor = 9;\n var minPatch = 1;\n var maxMajor = 4;\n if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {\n throw new Error('Bootstrap\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');\n }\n })($);\n exports.Util = Util;\n exports.Alert = Alert;\n exports.Button = Button;\n exports.Carousel = Carousel;\n exports.Collapse = Collapse;\n exports.Dropdown = Dropdown;\n exports.Modal = Modal;\n exports.Popover = Popover;\n exports.Scrollspy = ScrollSpy;\n exports.Tab = Tab;\n exports.Tooltip = Tooltip;\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n});","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/*!\n * Select2 4.0.6\n * https://select2.github.io\n *\n * Released under the MIT license\n * https://github.com/select2/select2/blob/master/LICENSE.md\n */\n;\n(function (factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['jquery'], factory);\n } else if ((typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === 'object' && module.exports) {\n // Node/CommonJS\n module.exports = function (root, jQuery) {\n if (jQuery === undefined) {\n // require('jQuery') returns a factory that requires window to\n // build a jQuery instance, we normalize how we use modules\n // that require this pattern but the window provided is a noop\n // if it's defined (how jquery works)\n if (typeof window !== 'undefined') {\n jQuery = require('jquery');\n } else {\n jQuery = require('jquery')(root);\n }\n }\n factory(jQuery);\n return jQuery;\n };\n } else {\n // Browser globals\n factory(jQuery);\n }\n})(function (jQuery) {\n // This is needed so we can catch the AMD loader configuration and use it\n // The inner file should be wrapped (by `banner.start.js`) in a function that\n // returns the AMD loader references.\n var S2 = function () {\n // Restore the Select2 AMD loader so it can be used\n // Needed mostly in the language files, where the loader is not inserted\n if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {\n var S2 = jQuery.fn.select2.amd;\n }\n var S2;\n (function () {\n if (!S2 || !S2.requirejs) {\n if (!S2) {\n S2 = {};\n } else {\n require = S2;\n }\n /**\n * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.\n * Released under MIT license, http://github.com/requirejs/almond/LICENSE\n */\n //Going sloppy to avoid 'use strict' string cost, but strict practices should\n //be followed.\n /*global setTimeout: false */\n\n var requirejs, require, define;\n (function (undef) {\n var main,\n _req,\n makeMap,\n handlers,\n defined = {},\n waiting = {},\n config = {},\n defining = {},\n hasOwn = Object.prototype.hasOwnProperty,\n aps = [].slice,\n jsSuffixRegExp = /\\.js$/;\n function hasProp(obj, prop) {\n return hasOwn.call(obj, prop);\n }\n\n /**\n * Given a relative module name, like ./something, normalize it to\n * a real name that can be mapped to a path.\n * @param {String} name the relative name\n * @param {String} baseName a real name that the name arg is relative\n * to.\n * @returns {String} normalized name\n */\n function normalize(name, baseName) {\n var nameParts,\n nameSegment,\n mapValue,\n foundMap,\n lastIndex,\n foundI,\n foundStarMap,\n starI,\n i,\n j,\n part,\n normalizedBaseParts,\n baseParts = baseName && baseName.split(\"/\"),\n map = config.map,\n starMap = map && map['*'] || {};\n\n //Adjust any relative paths.\n if (name) {\n name = name.split('/');\n lastIndex = name.length - 1;\n\n // If wanting node ID compatibility, strip .js from end\n // of IDs. Have to do this here, and not in nameToUrl\n // because node allows either .js or non .js to map\n // to same file.\n if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {\n name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');\n }\n\n // Starts with a '.' so need the baseName\n if (name[0].charAt(0) === '.' && baseParts) {\n //Convert baseName to array, and lop off the last part,\n //so that . matches that 'directory' and not name of the baseName's\n //module. For instance, baseName of 'one/two/three', maps to\n //'one/two/three.js', but we want the directory, 'one/two' for\n //this normalization.\n normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);\n name = normalizedBaseParts.concat(name);\n }\n\n //start trimDots\n for (i = 0; i < name.length; i++) {\n part = name[i];\n if (part === '.') {\n name.splice(i, 1);\n i -= 1;\n } else if (part === '..') {\n // If at the start, or previous value is still ..,\n // keep them so that when converted to a path it may\n // still work when converted to a path, even though\n // as an ID it is less than ideal. In larger point\n // releases, may be better to just kick out an error.\n if (i === 0 || i === 1 && name[2] === '..' || name[i - 1] === '..') {\n continue;\n } else if (i > 0) {\n name.splice(i - 1, 2);\n i -= 2;\n }\n }\n }\n //end trimDots\n\n name = name.join('/');\n }\n\n //Apply map config if available.\n if ((baseParts || starMap) && map) {\n nameParts = name.split('/');\n for (i = nameParts.length; i > 0; i -= 1) {\n nameSegment = nameParts.slice(0, i).join(\"/\");\n if (baseParts) {\n //Find the longest baseName segment match in the config.\n //So, do joins on the biggest to smallest lengths of baseParts.\n for (j = baseParts.length; j > 0; j -= 1) {\n mapValue = map[baseParts.slice(0, j).join('/')];\n\n //baseName segment has config, find if it has one for\n //this name.\n if (mapValue) {\n mapValue = mapValue[nameSegment];\n if (mapValue) {\n //Match, update name to the new value.\n foundMap = mapValue;\n foundI = i;\n break;\n }\n }\n }\n }\n if (foundMap) {\n break;\n }\n\n //Check for a star map match, but just hold on to it,\n //if there is a shorter segment match later in a matching\n //config, then favor over this star map.\n if (!foundStarMap && starMap && starMap[nameSegment]) {\n foundStarMap = starMap[nameSegment];\n starI = i;\n }\n }\n if (!foundMap && foundStarMap) {\n foundMap = foundStarMap;\n foundI = starI;\n }\n if (foundMap) {\n nameParts.splice(0, foundI, foundMap);\n name = nameParts.join('/');\n }\n }\n return name;\n }\n function makeRequire(relName, forceSync) {\n return function () {\n //A version of a require function that passes a moduleName\n //value for items that may need to\n //look up paths relative to the moduleName\n var args = aps.call(arguments, 0);\n\n //If first arg is not require('string'), and there is only\n //one arg, it is the array form without a callback. Insert\n //a null so that the following concat is correct.\n if (typeof args[0] !== 'string' && args.length === 1) {\n args.push(null);\n }\n return _req.apply(undef, args.concat([relName, forceSync]));\n };\n }\n function makeNormalize(relName) {\n return function (name) {\n return normalize(name, relName);\n };\n }\n function makeLoad(depName) {\n return function (value) {\n defined[depName] = value;\n };\n }\n function callDep(name) {\n if (hasProp(waiting, name)) {\n var args = waiting[name];\n delete waiting[name];\n defining[name] = true;\n main.apply(undef, args);\n }\n if (!hasProp(defined, name) && !hasProp(defining, name)) {\n throw new Error('No ' + name);\n }\n return defined[name];\n }\n\n //Turns a plugin!resource to [plugin, resource]\n //with the plugin being undefined if the name\n //did not have a plugin prefix.\n function splitPrefix(name) {\n var prefix,\n index = name ? name.indexOf('!') : -1;\n if (index > -1) {\n prefix = name.substring(0, index);\n name = name.substring(index + 1, name.length);\n }\n return [prefix, name];\n }\n\n //Creates a parts array for a relName where first part is plugin ID,\n //second part is resource ID. Assumes relName has already been normalized.\n function makeRelParts(relName) {\n return relName ? splitPrefix(relName) : [];\n }\n\n /**\n * Makes a name map, normalizing the name, and using a plugin\n * for normalization if necessary. Grabs a ref to plugin\n * too, as an optimization.\n */\n makeMap = function makeMap(name, relParts) {\n var plugin,\n parts = splitPrefix(name),\n prefix = parts[0],\n relResourceName = relParts[1];\n name = parts[1];\n if (prefix) {\n prefix = normalize(prefix, relResourceName);\n plugin = callDep(prefix);\n }\n\n //Normalize according\n if (prefix) {\n if (plugin && plugin.normalize) {\n name = plugin.normalize(name, makeNormalize(relResourceName));\n } else {\n name = normalize(name, relResourceName);\n }\n } else {\n name = normalize(name, relResourceName);\n parts = splitPrefix(name);\n prefix = parts[0];\n name = parts[1];\n if (prefix) {\n plugin = callDep(prefix);\n }\n }\n\n //Using ridiculous property names for space reasons\n return {\n f: prefix ? prefix + '!' + name : name,\n //fullName\n n: name,\n pr: prefix,\n p: plugin\n };\n };\n function makeConfig(name) {\n return function () {\n return config && config.config && config.config[name] || {};\n };\n }\n handlers = {\n require: function require(name) {\n return makeRequire(name);\n },\n exports: function exports(name) {\n var e = defined[name];\n if (typeof e !== 'undefined') {\n return e;\n } else {\n return defined[name] = {};\n }\n },\n module: function module(name) {\n return {\n id: name,\n uri: '',\n exports: defined[name],\n config: makeConfig(name)\n };\n }\n };\n main = function main(name, deps, callback, relName) {\n var cjsModule,\n depName,\n ret,\n map,\n i,\n relParts,\n args = [],\n callbackType = _typeof(callback),\n usingExports;\n\n //Use name if no relName\n relName = relName || name;\n relParts = makeRelParts(relName);\n\n //Call the callback to define the module, if necessary.\n if (callbackType === 'undefined' || callbackType === 'function') {\n //Pull out the defined dependencies and pass the ordered\n //values to the callback.\n //Default to [require, exports, module] if no deps\n deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;\n for (i = 0; i < deps.length; i += 1) {\n map = makeMap(deps[i], relParts);\n depName = map.f;\n\n //Fast path CommonJS standard dependencies.\n if (depName === \"require\") {\n args[i] = handlers.require(name);\n } else if (depName === \"exports\") {\n //CommonJS module spec 1.1\n args[i] = handlers.exports(name);\n usingExports = true;\n } else if (depName === \"module\") {\n //CommonJS module spec 1.1\n cjsModule = args[i] = handlers.module(name);\n } else if (hasProp(defined, depName) || hasProp(waiting, depName) || hasProp(defining, depName)) {\n args[i] = callDep(depName);\n } else if (map.p) {\n map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});\n args[i] = defined[depName];\n } else {\n throw new Error(name + ' missing ' + depName);\n }\n }\n ret = callback ? callback.apply(defined[name], args) : undefined;\n if (name) {\n //If setting exports via \"module\" is in play,\n //favor that over return value and exports. After that,\n //favor a non-undefined return value over exports use.\n if (cjsModule && cjsModule.exports !== undef && cjsModule.exports !== defined[name]) {\n defined[name] = cjsModule.exports;\n } else if (ret !== undef || !usingExports) {\n //Use the return value from the function.\n defined[name] = ret;\n }\n }\n } else if (name) {\n //May just be an object definition for the module. Only\n //worry about defining if have a module name.\n defined[name] = callback;\n }\n };\n requirejs = require = _req = function req(deps, callback, relName, forceSync, alt) {\n if (typeof deps === \"string\") {\n if (handlers[deps]) {\n //callback in this case is really relName\n return handlers[deps](callback);\n }\n //Just return the module wanted. In this scenario, the\n //deps arg is the module name, and second arg (if passed)\n //is just the relName.\n //Normalize module name, if it contains . or ..\n return callDep(makeMap(deps, makeRelParts(callback)).f);\n } else if (!deps.splice) {\n //deps is a config object, not an array.\n config = deps;\n if (config.deps) {\n _req(config.deps, config.callback);\n }\n if (!callback) {\n return;\n }\n if (callback.splice) {\n //callback is an array, which means it is a dependency list.\n //Adjust args if there are dependencies\n deps = callback;\n callback = relName;\n relName = null;\n } else {\n deps = undef;\n }\n }\n\n //Support require(['a'])\n callback = callback || function () {};\n\n //If relName is a function, it is an errback handler,\n //so remove it.\n if (typeof relName === 'function') {\n relName = forceSync;\n forceSync = alt;\n }\n\n //Simulate async callback;\n if (forceSync) {\n main(undef, deps, callback, relName);\n } else {\n //Using a non-zero value because of concern for what old browsers\n //do, and latest browsers \"upgrade\" to 4 if lower value is used:\n //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:\n //If want a value immediately, use require('id') instead -- something\n //that works in almond on the global level, but not guaranteed and\n //unlikely to work in other AMD implementations.\n setTimeout(function () {\n main(undef, deps, callback, relName);\n }, 4);\n }\n return _req;\n };\n\n /**\n * Just drops the config on the floor, but returns req in case\n * the config return value is used.\n */\n _req.config = function (cfg) {\n return _req(cfg);\n };\n\n /**\n * Expose module registry for debugging and tooling\n */\n requirejs._defined = defined;\n define = function define(name, deps, callback) {\n if (typeof name !== 'string') {\n throw new Error('See almond README: incorrect module build, no module name');\n }\n\n //This module may not have dependencies\n if (!deps.splice) {\n //deps is not an array, so probably means\n //an object literal or factory function for\n //the value. Adjust args.\n callback = deps;\n deps = [];\n }\n if (!hasProp(defined, name) && !hasProp(waiting, name)) {\n waiting[name] = [name, deps, callback];\n }\n };\n define.amd = {\n jQuery: true\n };\n })();\n S2.requirejs = requirejs;\n S2.require = require;\n S2.define = define;\n }\n })();\n S2.define(\"almond\", function () {});\n\n /* global jQuery:false, $:false */\n S2.define('jquery', [], function () {\n var _$ = jQuery || $;\n if (_$ == null && console && console.error) {\n console.error('Select2: An instance of jQuery or a jQuery-compatible library was not ' + 'found. Make sure that you are including jQuery before Select2 on your ' + 'web page.');\n }\n return _$;\n });\n S2.define('select2/utils', ['jquery'], function ($) {\n var Utils = {};\n Utils.Extend = function (ChildClass, SuperClass) {\n var __hasProp = {}.hasOwnProperty;\n function BaseConstructor() {\n this.constructor = ChildClass;\n }\n for (var key in SuperClass) {\n if (__hasProp.call(SuperClass, key)) {\n ChildClass[key] = SuperClass[key];\n }\n }\n BaseConstructor.prototype = SuperClass.prototype;\n ChildClass.prototype = new BaseConstructor();\n ChildClass.__super__ = SuperClass.prototype;\n return ChildClass;\n };\n function getMethods(theClass) {\n var proto = theClass.prototype;\n var methods = [];\n for (var methodName in proto) {\n var m = proto[methodName];\n if (typeof m !== 'function') {\n continue;\n }\n if (methodName === 'constructor') {\n continue;\n }\n methods.push(methodName);\n }\n return methods;\n }\n Utils.Decorate = function (SuperClass, DecoratorClass) {\n var decoratedMethods = getMethods(DecoratorClass);\n var superMethods = getMethods(SuperClass);\n function DecoratedClass() {\n var unshift = Array.prototype.unshift;\n var argCount = DecoratorClass.prototype.constructor.length;\n var calledConstructor = SuperClass.prototype.constructor;\n if (argCount > 0) {\n unshift.call(arguments, SuperClass.prototype.constructor);\n calledConstructor = DecoratorClass.prototype.constructor;\n }\n calledConstructor.apply(this, arguments);\n }\n DecoratorClass.displayName = SuperClass.displayName;\n function ctr() {\n this.constructor = DecoratedClass;\n }\n DecoratedClass.prototype = new ctr();\n for (var m = 0; m < superMethods.length; m++) {\n var superMethod = superMethods[m];\n DecoratedClass.prototype[superMethod] = SuperClass.prototype[superMethod];\n }\n var calledMethod = function calledMethod(methodName) {\n // Stub out the original method if it's not decorating an actual method\n var originalMethod = function originalMethod() {};\n if (methodName in DecoratedClass.prototype) {\n originalMethod = DecoratedClass.prototype[methodName];\n }\n var decoratedMethod = DecoratorClass.prototype[methodName];\n return function () {\n var unshift = Array.prototype.unshift;\n unshift.call(arguments, originalMethod);\n return decoratedMethod.apply(this, arguments);\n };\n };\n for (var d = 0; d < decoratedMethods.length; d++) {\n var decoratedMethod = decoratedMethods[d];\n DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);\n }\n return DecoratedClass;\n };\n var Observable = function Observable() {\n this.listeners = {};\n };\n Observable.prototype.on = function (event, callback) {\n this.listeners = this.listeners || {};\n if (event in this.listeners) {\n this.listeners[event].push(callback);\n } else {\n this.listeners[event] = [callback];\n }\n };\n Observable.prototype.trigger = function (event) {\n var slice = Array.prototype.slice;\n var params = slice.call(arguments, 1);\n this.listeners = this.listeners || {};\n\n // Params should always come in as an array\n if (params == null) {\n params = [];\n }\n\n // If there are no arguments to the event, use a temporary object\n if (params.length === 0) {\n params.push({});\n }\n\n // Set the `_type` of the first object to the event\n params[0]._type = event;\n if (event in this.listeners) {\n this.invoke(this.listeners[event], slice.call(arguments, 1));\n }\n if ('*' in this.listeners) {\n this.invoke(this.listeners['*'], arguments);\n }\n };\n Observable.prototype.invoke = function (listeners, params) {\n for (var i = 0, len = listeners.length; i < len; i++) {\n listeners[i].apply(this, params);\n }\n };\n Utils.Observable = Observable;\n Utils.generateChars = function (length) {\n var chars = '';\n for (var i = 0; i < length; i++) {\n var randomChar = Math.floor(Math.random() * 36);\n chars += randomChar.toString(36);\n }\n return chars;\n };\n Utils.bind = function (func, context) {\n return function () {\n func.apply(context, arguments);\n };\n };\n Utils._convertData = function (data) {\n for (var originalKey in data) {\n var keys = originalKey.split('-');\n var dataLevel = data;\n if (keys.length === 1) {\n continue;\n }\n for (var k = 0; k < keys.length; k++) {\n var key = keys[k];\n\n // Lowercase the first letter\n // By default, dash-separated becomes camelCase\n key = key.substring(0, 1).toLowerCase() + key.substring(1);\n if (!(key in dataLevel)) {\n dataLevel[key] = {};\n }\n if (k == keys.length - 1) {\n dataLevel[key] = data[originalKey];\n }\n dataLevel = dataLevel[key];\n }\n delete data[originalKey];\n }\n return data;\n };\n Utils.hasScroll = function (index, el) {\n // Adapted from the function created by @ShadowScripter\n // and adapted by @BillBarry on the Stack Exchange Code Review website.\n // The original code can be found at\n // http://codereview.stackexchange.com/q/13338\n // and was designed to be used with the Sizzle selector engine.\n\n var $el = $(el);\n var overflowX = el.style.overflowX;\n var overflowY = el.style.overflowY;\n\n //Check both x and y declarations\n if (overflowX === overflowY && (overflowY === 'hidden' || overflowY === 'visible')) {\n return false;\n }\n if (overflowX === 'scroll' || overflowY === 'scroll') {\n return true;\n }\n return $el.innerHeight() < el.scrollHeight || $el.innerWidth() < el.scrollWidth;\n };\n Utils.escapeMarkup = function (markup) {\n var replaceMap = {\n '\\\\': '\',\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n '\\'': ''',\n '/': '/'\n };\n\n // Do not try to escape the markup if it's not a string\n if (typeof markup !== 'string') {\n return markup;\n }\n return String(markup).replace(/[&<>\"'\\/\\\\]/g, function (match) {\n return replaceMap[match];\n });\n };\n\n // Append an array of jQuery nodes to a given element.\n Utils.appendMany = function ($element, $nodes) {\n // jQuery 1.7.x does not support $.fn.append() with an array\n // Fall back to a jQuery object collection using $.fn.add()\n if ($.fn.jquery.substr(0, 3) === '1.7') {\n var $jqNodes = $();\n $.map($nodes, function (node) {\n $jqNodes = $jqNodes.add(node);\n });\n $nodes = $jqNodes;\n }\n $element.append($nodes);\n };\n\n // Cache objects in Utils.__cache instead of $.data (see #4346)\n Utils.__cache = {};\n var id = 0;\n Utils.GetUniqueElementId = function (element) {\n // Get a unique element Id. If element has no id,\n // creates a new unique number, stores it in the id\n // attribute and returns the new id.\n // If an id already exists, it simply returns it.\n\n var select2Id = element.getAttribute('data-select2-id');\n if (select2Id == null) {\n // If element has id, use it.\n if (element.id) {\n select2Id = element.id;\n element.setAttribute('data-select2-id', select2Id);\n } else {\n element.setAttribute('data-select2-id', ++id);\n select2Id = id.toString();\n }\n }\n return select2Id;\n };\n Utils.StoreData = function (element, name, value) {\n // Stores an item in the cache for a specified element.\n // name is the cache key.\n var id = Utils.GetUniqueElementId(element);\n if (!Utils.__cache[id]) {\n Utils.__cache[id] = {};\n }\n Utils.__cache[id][name] = value;\n };\n Utils.GetData = function (element, name) {\n // Retrieves a value from the cache by its key (name)\n // name is optional. If no name specified, return\n // all cache items for the specified element.\n // and for a specified element.\n var id = Utils.GetUniqueElementId(element);\n if (name) {\n if (Utils.__cache[id]) {\n if (Utils.__cache[id][name] != null) {\n return Utils.__cache[id][name];\n }\n return $(element).data(name); // Fallback to HTML5 data attribs.\n }\n return $(element).data(name); // Fallback to HTML5 data attribs.\n } else {\n return Utils.__cache[id];\n }\n };\n Utils.RemoveData = function (element) {\n // Removes all cached items for a specified element.\n var id = Utils.GetUniqueElementId(element);\n if (Utils.__cache[id] != null) {\n delete Utils.__cache[id];\n }\n };\n return Utils;\n });\n S2.define('select2/results', ['jquery', './utils'], function ($, Utils) {\n function Results($element, options, dataAdapter) {\n this.$element = $element;\n this.data = dataAdapter;\n this.options = options;\n Results.__super__.constructor.call(this);\n }\n Utils.Extend(Results, Utils.Observable);\n Results.prototype.render = function () {\n var $results = $('<ul class=\"select2-results__options\" role=\"tree\"></ul>');\n if (this.options.get('multiple')) {\n $results.attr('aria-multiselectable', 'true');\n }\n this.$results = $results;\n return $results;\n };\n Results.prototype.clear = function () {\n this.$results.empty();\n };\n Results.prototype.displayMessage = function (params) {\n var escapeMarkup = this.options.get('escapeMarkup');\n this.clear();\n this.hideLoading();\n var $message = $('<li role=\"treeitem\" aria-live=\"assertive\"' + ' class=\"select2-results__option\"></li>');\n var message = this.options.get('translations').get(params.message);\n $message.append(escapeMarkup(message(params.args)));\n $message[0].className += ' select2-results__message';\n this.$results.append($message);\n };\n Results.prototype.hideMessages = function () {\n this.$results.find('.select2-results__message').remove();\n };\n Results.prototype.append = function (data) {\n this.hideLoading();\n var $options = [];\n if (data.results == null || data.results.length === 0) {\n if (this.$results.children().length === 0) {\n this.trigger('results:message', {\n message: 'noResults'\n });\n }\n return;\n }\n data.results = this.sort(data.results);\n for (var d = 0; d < data.results.length; d++) {\n var item = data.results[d];\n var $option = this.option(item);\n $options.push($option);\n }\n this.$results.append($options);\n };\n Results.prototype.position = function ($results, $dropdown) {\n var $resultsContainer = $dropdown.find('.select2-results');\n $resultsContainer.append($results);\n };\n Results.prototype.sort = function (data) {\n var sorter = this.options.get('sorter');\n return sorter(data);\n };\n Results.prototype.highlightFirstItem = function () {\n var $options = this.$results.find('.select2-results__option[aria-selected]');\n var $selected = $options.filter('[aria-selected=true]');\n\n // Check if there are any selected options\n if ($selected.length > 0) {\n // If there are selected options, highlight the first\n $selected.first().trigger('mouseenter');\n } else {\n // If there are no selected options, highlight the first option\n // in the dropdown\n $options.first().trigger('mouseenter');\n }\n this.ensureHighlightVisible();\n };\n Results.prototype.setClasses = function () {\n var self = this;\n this.data.current(function (selected) {\n var selectedIds = $.map(selected, function (s) {\n return s.id.toString();\n });\n var $options = self.$results.find('.select2-results__option[aria-selected]');\n $options.each(function () {\n var $option = $(this);\n var item = Utils.GetData(this, 'data');\n\n // id needs to be converted to a string when comparing\n var id = '' + item.id;\n if (item.element != null && item.element.selected || item.element == null && $.inArray(id, selectedIds) > -1) {\n $option.attr('aria-selected', 'true');\n } else {\n $option.attr('aria-selected', 'false');\n }\n });\n });\n };\n Results.prototype.showLoading = function (params) {\n this.hideLoading();\n var loadingMore = this.options.get('translations').get('searching');\n var loading = {\n disabled: true,\n loading: true,\n text: loadingMore(params)\n };\n var $loading = this.option(loading);\n $loading.className += ' loading-results';\n this.$results.prepend($loading);\n };\n Results.prototype.hideLoading = function () {\n this.$results.find('.loading-results').remove();\n };\n Results.prototype.option = function (data) {\n var option = document.createElement('li');\n option.className = 'select2-results__option';\n var attrs = {\n 'role': 'treeitem',\n 'aria-selected': 'false'\n };\n if (data.disabled) {\n delete attrs['aria-selected'];\n attrs['aria-disabled'] = 'true';\n }\n if (data.id == null) {\n delete attrs['aria-selected'];\n }\n if (data._resultId != null) {\n option.id = data._resultId;\n }\n if (data.title) {\n option.title = data.title;\n }\n if (data.children) {\n attrs.role = 'group';\n attrs['aria-label'] = data.text;\n delete attrs['aria-selected'];\n }\n for (var attr in attrs) {\n var val = attrs[attr];\n option.setAttribute(attr, val);\n }\n if (data.children) {\n var $option = $(option);\n var label = document.createElement('strong');\n label.className = 'select2-results__group';\n var $label = $(label);\n this.template(data, label);\n var $children = [];\n for (var c = 0; c < data.children.length; c++) {\n var child = data.children[c];\n var $child = this.option(child);\n $children.push($child);\n }\n var $childrenContainer = $('<ul></ul>', {\n 'class': 'select2-results__options select2-results__options--nested'\n });\n $childrenContainer.append($children);\n $option.append(label);\n $option.append($childrenContainer);\n } else {\n this.template(data, option);\n }\n Utils.StoreData(option, 'data', data);\n return option;\n };\n Results.prototype.bind = function (container, $container) {\n var self = this;\n var id = container.id + '-results';\n this.$results.attr('id', id);\n container.on('results:all', function (params) {\n self.clear();\n self.append(params.data);\n if (container.isOpen()) {\n self.setClasses();\n self.highlightFirstItem();\n }\n });\n container.on('results:append', function (params) {\n self.append(params.data);\n if (container.isOpen()) {\n self.setClasses();\n }\n });\n container.on('query', function (params) {\n self.hideMessages();\n self.showLoading(params);\n });\n container.on('select', function () {\n if (!container.isOpen()) {\n return;\n }\n self.setClasses();\n if (self.options.get('scrollAfterSelect')) {\n self.highlightFirstItem();\n }\n });\n container.on('unselect', function () {\n if (!container.isOpen()) {\n return;\n }\n self.setClasses();\n if (self.options.get('scrollAfterSelect')) {\n self.highlightFirstItem();\n }\n });\n container.on('open', function () {\n // When the dropdown is open, aria-expended=\"true\"\n self.$results.attr('aria-expanded', 'true');\n self.$results.attr('aria-hidden', 'false');\n self.setClasses();\n self.ensureHighlightVisible();\n });\n container.on('close', function () {\n // When the dropdown is closed, aria-expended=\"false\"\n self.$results.attr('aria-expanded', 'false');\n self.$results.attr('aria-hidden', 'true');\n self.$results.removeAttr('aria-activedescendant');\n });\n container.on('results:toggle', function () {\n var $highlighted = self.getHighlightedResults();\n if ($highlighted.length === 0) {\n return;\n }\n $highlighted.trigger('mouseup');\n });\n container.on('results:select', function () {\n var $highlighted = self.getHighlightedResults();\n if ($highlighted.length === 0) {\n return;\n }\n var data = Utils.GetData($highlighted[0], 'data');\n if ($highlighted.attr('aria-selected') == 'true') {\n self.trigger('close', {});\n } else {\n self.trigger('select', {\n data: data\n });\n }\n });\n container.on('results:previous', function () {\n var $highlighted = self.getHighlightedResults();\n var $options = self.$results.find('[aria-selected]');\n var currentIndex = $options.index($highlighted);\n\n // If we are already at the top, don't move further\n // If no options, currentIndex will be -1\n if (currentIndex <= 0) {\n return;\n }\n var nextIndex = currentIndex - 1;\n\n // If none are highlighted, highlight the first\n if ($highlighted.length === 0) {\n nextIndex = 0;\n }\n var $next = $options.eq(nextIndex);\n $next.trigger('mouseenter');\n var currentOffset = self.$results.offset().top;\n var nextTop = $next.offset().top;\n var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);\n if (nextIndex === 0) {\n self.$results.scrollTop(0);\n } else if (nextTop - currentOffset < 0) {\n self.$results.scrollTop(nextOffset);\n }\n });\n container.on('results:next', function () {\n var $highlighted = self.getHighlightedResults();\n var $options = self.$results.find('[aria-selected]');\n var currentIndex = $options.index($highlighted);\n var nextIndex = currentIndex + 1;\n\n // If we are at the last option, stay there\n if (nextIndex >= $options.length) {\n return;\n }\n var $next = $options.eq(nextIndex);\n $next.trigger('mouseenter');\n var currentOffset = self.$results.offset().top + self.$results.outerHeight(false);\n var nextBottom = $next.offset().top + $next.outerHeight(false);\n var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;\n if (nextIndex === 0) {\n self.$results.scrollTop(0);\n } else if (nextBottom > currentOffset) {\n self.$results.scrollTop(nextOffset);\n }\n });\n container.on('results:focus', function (params) {\n params.element.addClass('select2-results__option--highlighted');\n });\n container.on('results:message', function (params) {\n self.displayMessage(params);\n });\n if ($.fn.mousewheel) {\n this.$results.on('mousewheel', function (e) {\n var top = self.$results.scrollTop();\n var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;\n var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;\n var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();\n if (isAtTop) {\n self.$results.scrollTop(0);\n e.preventDefault();\n e.stopPropagation();\n } else if (isAtBottom) {\n self.$results.scrollTop(self.$results.get(0).scrollHeight - self.$results.height());\n e.preventDefault();\n e.stopPropagation();\n }\n });\n }\n this.$results.on('mouseup', '.select2-results__option[aria-selected]', function (evt) {\n var $this = $(this);\n var data = Utils.GetData(this, 'data');\n if ($this.attr('aria-selected') === 'true') {\n if (self.options.get('multiple')) {\n self.trigger('unselect', {\n originalEvent: evt,\n data: data\n });\n } else {\n self.trigger('close', {});\n }\n return;\n }\n self.trigger('select', {\n originalEvent: evt,\n data: data\n });\n });\n this.$results.on('mouseenter', '.select2-results__option[aria-selected]', function (evt) {\n var data = Utils.GetData(this, 'data');\n self.getHighlightedResults().removeClass('select2-results__option--highlighted');\n self.trigger('results:focus', {\n data: data,\n element: $(this)\n });\n });\n };\n Results.prototype.getHighlightedResults = function () {\n var $highlighted = this.$results.find('.select2-results__option--highlighted');\n return $highlighted;\n };\n Results.prototype.destroy = function () {\n this.$results.remove();\n };\n Results.prototype.ensureHighlightVisible = function () {\n var $highlighted = this.getHighlightedResults();\n if ($highlighted.length === 0) {\n return;\n }\n var $options = this.$results.find('[aria-selected]');\n var currentIndex = $options.index($highlighted);\n var currentOffset = this.$results.offset().top;\n var nextTop = $highlighted.offset().top;\n var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);\n var offsetDelta = nextTop - currentOffset;\n nextOffset -= $highlighted.outerHeight(false) * 2;\n if (currentIndex <= 2) {\n this.$results.scrollTop(0);\n } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {\n this.$results.scrollTop(nextOffset);\n }\n };\n Results.prototype.template = function (result, container) {\n var template = this.options.get('templateResult');\n var escapeMarkup = this.options.get('escapeMarkup');\n var content = template(result, container);\n if (content == null) {\n container.style.display = 'none';\n } else if (typeof content === 'string') {\n container.innerHTML = escapeMarkup(content);\n } else {\n $(container).append(content);\n }\n };\n return Results;\n });\n S2.define('select2/keys', [], function () {\n var KEYS = {\n BACKSPACE: 8,\n TAB: 9,\n ENTER: 13,\n SHIFT: 16,\n CTRL: 17,\n ALT: 18,\n ESC: 27,\n SPACE: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n DELETE: 46\n };\n return KEYS;\n });\n S2.define('select2/selection/base', ['jquery', '../utils', '../keys'], function ($, Utils, KEYS) {\n function BaseSelection($element, options) {\n this.$element = $element;\n this.options = options;\n BaseSelection.__super__.constructor.call(this);\n }\n Utils.Extend(BaseSelection, Utils.Observable);\n BaseSelection.prototype.render = function () {\n var $selection = $('<span class=\"select2-selection\" role=\"combobox\" ' + ' aria-haspopup=\"true\" aria-expanded=\"false\">' + '</span>');\n this._tabindex = 0;\n if (Utils.GetData(this.$element[0], 'old-tabindex') != null) {\n this._tabindex = Utils.GetData(this.$element[0], 'old-tabindex');\n } else if (this.$element.attr('tabindex') != null) {\n this._tabindex = this.$element.attr('tabindex');\n }\n $selection.attr('title', this.$element.attr('title'));\n $selection.attr('tabindex', this._tabindex);\n this.$selection = $selection;\n return $selection;\n };\n BaseSelection.prototype.bind = function (container, $container) {\n var self = this;\n var id = container.id + '-container';\n var resultsId = container.id + '-results';\n this.container = container;\n this.$selection.on('focus', function (evt) {\n self.trigger('focus', evt);\n });\n this.$selection.on('blur', function (evt) {\n self._handleBlur(evt);\n });\n this.$selection.on('keydown', function (evt) {\n self.trigger('keypress', evt);\n if (evt.which === KEYS.SPACE) {\n evt.preventDefault();\n }\n });\n container.on('results:focus', function (params) {\n self.$selection.attr('aria-activedescendant', params.data._resultId);\n });\n container.on('selection:update', function (params) {\n self.update(params.data);\n });\n container.on('open', function () {\n // When the dropdown is open, aria-expanded=\"true\"\n self.$selection.attr('aria-expanded', 'true');\n self.$selection.attr('aria-owns', resultsId);\n self._attachCloseHandler(container);\n });\n container.on('close', function () {\n // When the dropdown is closed, aria-expanded=\"false\"\n self.$selection.attr('aria-expanded', 'false');\n self.$selection.removeAttr('aria-activedescendant');\n self.$selection.removeAttr('aria-owns');\n window.setTimeout(function () {\n self.$selection.focus();\n }, 0);\n self._detachCloseHandler(container);\n });\n container.on('enable', function () {\n self.$selection.attr('tabindex', self._tabindex);\n });\n container.on('disable', function () {\n self.$selection.attr('tabindex', '-1');\n });\n };\n BaseSelection.prototype._handleBlur = function (evt) {\n var self = this;\n\n // This needs to be delayed as the active element is the body when the tab\n // key is pressed, possibly along with others.\n window.setTimeout(function () {\n // Don't trigger `blur` if the focus is still in the selection\n if (document.activeElement == self.$selection[0] || $.contains(self.$selection[0], document.activeElement)) {\n return;\n }\n self.trigger('blur', evt);\n }, 1);\n };\n BaseSelection.prototype._attachCloseHandler = function (container) {\n var self = this;\n $(document.body).on('mousedown.select2.' + container.id, function (e) {\n var $target = $(e.target);\n var $select = $target.closest('.select2');\n var $all = $('.select2.select2-container--open');\n $all.each(function () {\n var $this = $(this);\n if (this == $select[0]) {\n return;\n }\n var $element = Utils.GetData(this, 'element');\n $element.select2('close');\n });\n });\n };\n BaseSelection.prototype._detachCloseHandler = function (container) {\n $(document.body).off('mousedown.select2.' + container.id);\n };\n BaseSelection.prototype.position = function ($selection, $container) {\n var $selectionContainer = $container.find('.selection');\n $selectionContainer.append($selection);\n };\n BaseSelection.prototype.destroy = function () {\n this._detachCloseHandler(this.container);\n };\n BaseSelection.prototype.update = function (data) {\n throw new Error('The `update` method must be defined in child classes.');\n };\n return BaseSelection;\n });\n S2.define('select2/selection/single', ['jquery', './base', '../utils', '../keys'], function ($, BaseSelection, Utils, KEYS) {\n function SingleSelection() {\n SingleSelection.__super__.constructor.apply(this, arguments);\n }\n Utils.Extend(SingleSelection, BaseSelection);\n SingleSelection.prototype.render = function () {\n var $selection = SingleSelection.__super__.render.call(this);\n $selection.addClass('select2-selection--single');\n $selection.html('<span class=\"select2-selection__rendered\"></span>' + '<span class=\"select2-selection__arrow\" role=\"presentation\">' + '<b role=\"presentation\"></b>' + '</span>');\n return $selection;\n };\n SingleSelection.prototype.bind = function (container, $container) {\n var self = this;\n SingleSelection.__super__.bind.apply(this, arguments);\n var id = container.id + '-container';\n this.$selection.find('.select2-selection__rendered').attr('id', id).attr('role', 'textbox').attr('aria-readonly', 'true');\n this.$selection.attr('aria-labelledby', id);\n this.$selection.on('mousedown', function (evt) {\n // Only respond to left clicks\n if (evt.which !== 1) {\n return;\n }\n self.trigger('toggle', {\n originalEvent: evt\n });\n });\n this.$selection.on('focus', function (evt) {\n // User focuses on the container\n });\n this.$selection.on('blur', function (evt) {\n // User exits the container\n });\n container.on('focus', function (evt) {\n if (!container.isOpen()) {\n self.$selection.focus();\n }\n });\n };\n SingleSelection.prototype.clear = function () {\n var $rendered = this.$selection.find('.select2-selection__rendered');\n $rendered.empty();\n $rendered.removeAttr('title'); // clear tooltip on empty\n };\n SingleSelection.prototype.display = function (data, container) {\n var template = this.options.get('templateSelection');\n var escapeMarkup = this.options.get('escapeMarkup');\n return escapeMarkup(template(data, container));\n };\n SingleSelection.prototype.selectionContainer = function () {\n return $('<span></span>');\n };\n SingleSelection.prototype.update = function (data) {\n if (data.length === 0) {\n this.clear();\n return;\n }\n var selection = data[0];\n var $rendered = this.$selection.find('.select2-selection__rendered');\n var formatted = this.display(selection, $rendered);\n $rendered.empty().append(formatted);\n $rendered.attr('title', selection.title || selection.text);\n };\n return SingleSelection;\n });\n S2.define('select2/selection/multiple', ['jquery', './base', '../utils'], function ($, BaseSelection, Utils) {\n function MultipleSelection($element, options) {\n MultipleSelection.__super__.constructor.apply(this, arguments);\n }\n Utils.Extend(MultipleSelection, BaseSelection);\n MultipleSelection.prototype.render = function () {\n var $selection = MultipleSelection.__super__.render.call(this);\n $selection.addClass('select2-selection--multiple');\n $selection.html('<ul class=\"select2-selection__rendered\"></ul>');\n return $selection;\n };\n MultipleSelection.prototype.bind = function (container, $container) {\n var self = this;\n MultipleSelection.__super__.bind.apply(this, arguments);\n this.$selection.on('click', function (evt) {\n self.trigger('toggle', {\n originalEvent: evt\n });\n });\n this.$selection.on('click', '.select2-selection__choice__remove', function (evt) {\n // Ignore the event if it is disabled\n if (self.options.get('disabled')) {\n return;\n }\n var $remove = $(this);\n var $selection = $remove.parent();\n var data = Utils.GetData($selection[0], 'data');\n self.trigger('unselect', {\n originalEvent: evt,\n data: data\n });\n });\n };\n MultipleSelection.prototype.clear = function () {\n var $rendered = this.$selection.find('.select2-selection__rendered');\n $rendered.empty();\n $rendered.removeAttr('title');\n };\n MultipleSelection.prototype.display = function (data, container) {\n var template = this.options.get('templateSelection');\n var escapeMarkup = this.options.get('escapeMarkup');\n return escapeMarkup(template(data, container));\n };\n MultipleSelection.prototype.selectionContainer = function () {\n var $container = $('<li class=\"select2-selection__choice\">' + '<span class=\"select2-selection__choice__remove\" role=\"presentation\">' + '×' + '</span>' + '</li>');\n return $container;\n };\n MultipleSelection.prototype.update = function (data) {\n this.clear();\n if (data.length === 0) {\n return;\n }\n var $selections = [];\n for (var d = 0; d < data.length; d++) {\n var selection = data[d];\n var $selection = this.selectionContainer();\n var formatted = this.display(selection, $selection);\n $selection.append(formatted);\n $selection.attr('title', selection.title || selection.text);\n Utils.StoreData($selection[0], 'data', selection);\n $selections.push($selection);\n }\n var $rendered = this.$selection.find('.select2-selection__rendered');\n Utils.appendMany($rendered, $selections);\n };\n return MultipleSelection;\n });\n S2.define('select2/selection/placeholder', ['../utils'], function (Utils) {\n function Placeholder(decorated, $element, options) {\n this.placeholder = this.normalizePlaceholder(options.get('placeholder'));\n decorated.call(this, $element, options);\n }\n Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {\n if (typeof placeholder === 'string') {\n placeholder = {\n id: '',\n text: placeholder\n };\n }\n return placeholder;\n };\n Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {\n var $placeholder = this.selectionContainer();\n $placeholder.html(this.display(placeholder));\n $placeholder.addClass('select2-selection__placeholder').removeClass('select2-selection__choice');\n return $placeholder;\n };\n Placeholder.prototype.update = function (decorated, data) {\n var singlePlaceholder = data.length == 1 && data[0].id != this.placeholder.id;\n var multipleSelections = data.length > 1;\n if (multipleSelections || singlePlaceholder) {\n return decorated.call(this, data);\n }\n this.clear();\n var $placeholder = this.createPlaceholder(this.placeholder);\n this.$selection.find('.select2-selection__rendered').append($placeholder);\n };\n return Placeholder;\n });\n S2.define('select2/selection/allowClear', ['jquery', '../keys', '../utils'], function ($, KEYS, Utils) {\n function AllowClear() {}\n AllowClear.prototype.bind = function (decorated, container, $container) {\n var self = this;\n decorated.call(this, container, $container);\n if (this.placeholder == null) {\n if (this.options.get('debug') && window.console && console.error) {\n console.error('Select2: The `allowClear` option should be used in combination ' + 'with the `placeholder` option.');\n }\n }\n this.$selection.on('mousedown', '.select2-selection__clear', function (evt) {\n self._handleClear(evt);\n });\n container.on('keypress', function (evt) {\n self._handleKeyboardClear(evt, container);\n });\n };\n AllowClear.prototype._handleClear = function (_, evt) {\n // Ignore the event if it is disabled\n if (this.options.get('disabled')) {\n return;\n }\n var $clear = this.$selection.find('.select2-selection__clear');\n\n // Ignore the event if nothing has been selected\n if ($clear.length === 0) {\n return;\n }\n evt.stopPropagation();\n var data = Utils.GetData($clear[0], 'data');\n var previousVal = this.$element.val();\n this.$element.val(this.placeholder.id);\n var unselectData = {\n data: data\n };\n this.trigger('clear', unselectData);\n if (unselectData.prevented) {\n this.$element.val(previousVal);\n return;\n }\n for (var d = 0; d < data.length; d++) {\n unselectData = {\n data: data[d]\n };\n\n // Trigger the `unselect` event, so people can prevent it from being\n // cleared.\n this.trigger('unselect', unselectData);\n\n // If the event was prevented, don't clear it out.\n if (unselectData.prevented) {\n this.$element.val(previousVal);\n return;\n }\n }\n this.$element.trigger('change');\n this.trigger('toggle', {});\n };\n AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {\n if (container.isOpen()) {\n return;\n }\n if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {\n this._handleClear(evt);\n }\n };\n AllowClear.prototype.update = function (decorated, data) {\n decorated.call(this, data);\n if (this.$selection.find('.select2-selection__placeholder').length > 0 || data.length === 0) {\n return;\n }\n var removeAll = this.options.get('translations').get('removeAllItems');\n var $remove = $('<span class=\"select2-selection__clear\" title=\"' + removeAll() + '\">' + '×' + '</span>');\n Utils.StoreData($remove[0], 'data', data);\n this.$selection.find('.select2-selection__rendered').prepend($remove);\n };\n return AllowClear;\n });\n S2.define('select2/selection/search', ['jquery', '../utils', '../keys'], function ($, Utils, KEYS) {\n function Search(decorated, $element, options) {\n decorated.call(this, $element, options);\n }\n Search.prototype.render = function (decorated) {\n var $search = $('<li class=\"select2-search select2-search--inline\">' + '<input class=\"select2-search__field\" type=\"search\" tabindex=\"-1\"' + ' autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"none\"' + ' spellcheck=\"false\" role=\"textbox\" aria-autocomplete=\"list\" />' + '</li>');\n this.$searchContainer = $search;\n this.$search = $search.find('input');\n var $rendered = decorated.call(this);\n this._transferTabIndex();\n return $rendered;\n };\n Search.prototype.bind = function (decorated, container, $container) {\n var self = this;\n decorated.call(this, container, $container);\n container.on('open', function () {\n self.$search.trigger('focus');\n });\n container.on('close', function () {\n self.$search.val('');\n self.$search.removeAttr('aria-activedescendant');\n self.$search.trigger('focus');\n });\n container.on('enable', function () {\n self.$search.prop('disabled', false);\n self._transferTabIndex();\n });\n container.on('disable', function () {\n self.$search.prop('disabled', true);\n });\n container.on('focus', function (evt) {\n self.$search.trigger('focus');\n });\n container.on('results:focus', function (params) {\n self.$search.attr('aria-activedescendant', params.id);\n });\n this.$selection.on('focusin', '.select2-search--inline', function (evt) {\n self.trigger('focus', evt);\n });\n this.$selection.on('focusout', '.select2-search--inline', function (evt) {\n self._handleBlur(evt);\n });\n this.$selection.on('keydown', '.select2-search--inline', function (evt) {\n evt.stopPropagation();\n self.trigger('keypress', evt);\n self._keyUpPrevented = evt.isDefaultPrevented();\n var key = evt.which;\n if (key === KEYS.BACKSPACE && self.$search.val() === '') {\n var $previousChoice = self.$searchContainer.prev('.select2-selection__choice');\n if ($previousChoice.length > 0) {\n var item = Utils.GetData($previousChoice[0], 'data');\n self.searchRemoveChoice(item);\n evt.preventDefault();\n }\n }\n });\n\n // Try to detect the IE version should the `documentMode` property that\n // is stored on the document. This is only implemented in IE and is\n // slightly cleaner than doing a user agent check.\n // This property is not available in Edge, but Edge also doesn't have\n // this bug.\n var msie = document.documentMode;\n var disableInputEvents = msie && msie <= 11;\n\n // Workaround for browsers which do not support the `input` event\n // This will prevent double-triggering of events for browsers which support\n // both the `keyup` and `input` events.\n this.$selection.on('input.searchcheck', '.select2-search--inline', function (evt) {\n // IE will trigger the `input` event when a placeholder is used on a\n // search box. To get around this issue, we are forced to ignore all\n // `input` events in IE and keep using `keyup`.\n if (disableInputEvents) {\n self.$selection.off('input.search input.searchcheck');\n return;\n }\n\n // Unbind the duplicated `keyup` event\n self.$selection.off('keyup.search');\n });\n this.$selection.on('keyup.search input.search', '.select2-search--inline', function (evt) {\n // IE will trigger the `input` event when a placeholder is used on a\n // search box. To get around this issue, we are forced to ignore all\n // `input` events in IE and keep using `keyup`.\n if (disableInputEvents && evt.type === 'input') {\n self.$selection.off('input.search input.searchcheck');\n return;\n }\n var key = evt.which;\n\n // We can freely ignore events from modifier keys\n if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {\n return;\n }\n\n // Tabbing will be handled during the `keydown` phase\n if (key == KEYS.TAB) {\n return;\n }\n self.handleSearch(evt);\n });\n };\n\n /**\n * This method will transfer the tabindex attribute from the rendered\n * selection to the search box. This allows for the search box to be used as\n * the primary focus instead of the selection container.\n *\n * @private\n */\n Search.prototype._transferTabIndex = function (decorated) {\n this.$search.attr('tabindex', this.$selection.attr('tabindex'));\n this.$selection.attr('tabindex', '-1');\n };\n Search.prototype.createPlaceholder = function (decorated, placeholder) {\n this.$search.attr('placeholder', placeholder.text);\n };\n Search.prototype.update = function (decorated, data) {\n var searchHadFocus = this.$search[0] == document.activeElement;\n this.$search.attr('placeholder', '');\n decorated.call(this, data);\n this.$selection.find('.select2-selection__rendered').append(this.$searchContainer);\n this.resizeSearch();\n if (searchHadFocus) {\n var isTagInput = this.$element.find('[data-select2-tag]').length;\n if (isTagInput) {\n // fix IE11 bug where tag input lost focus\n this.$element.focus();\n } else {\n this.$search.focus();\n }\n }\n };\n Search.prototype.handleSearch = function () {\n this.resizeSearch();\n if (!this._keyUpPrevented) {\n var input = this.$search.val();\n this.trigger('query', {\n term: input\n });\n }\n this._keyUpPrevented = false;\n };\n Search.prototype.searchRemoveChoice = function (decorated, item) {\n this.trigger('unselect', {\n data: item\n });\n this.$search.val(item.text);\n this.handleSearch();\n };\n Search.prototype.resizeSearch = function () {\n this.$search.css('width', '25px');\n var width = '';\n if (this.$search.attr('placeholder') !== '') {\n width = this.$selection.find('.select2-selection__rendered').innerWidth();\n } else {\n var minimumWidth = this.$search.val().length + 1;\n width = minimumWidth * 0.75 + 'em';\n }\n this.$search.css('width', width);\n };\n return Search;\n });\n S2.define('select2/selection/eventRelay', ['jquery'], function ($) {\n function EventRelay() {}\n EventRelay.prototype.bind = function (decorated, container, $container) {\n var self = this;\n var relayEvents = ['open', 'opening', 'close', 'closing', 'select', 'selecting', 'unselect', 'unselecting', 'clear', 'clearing'];\n var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting', 'clearing'];\n decorated.call(this, container, $container);\n container.on('*', function (name, params) {\n // Ignore events that should not be relayed\n if ($.inArray(name, relayEvents) === -1) {\n return;\n }\n\n // The parameters should always be an object\n params = params || {};\n\n // Generate the jQuery event for the Select2 event\n var evt = $.Event('select2:' + name, {\n params: params\n });\n self.$element.trigger(evt);\n\n // Only handle preventable events if it was one\n if ($.inArray(name, preventableEvents) === -1) {\n return;\n }\n params.prevented = evt.isDefaultPrevented();\n });\n };\n return EventRelay;\n });\n S2.define('select2/translation', ['jquery', 'require'], function ($, require) {\n function Translation(dict) {\n this.dict = dict || {};\n }\n Translation.prototype.all = function () {\n return this.dict;\n };\n Translation.prototype.get = function (key) {\n return this.dict[key];\n };\n Translation.prototype.extend = function (translation) {\n this.dict = $.extend({}, translation.all(), this.dict);\n };\n\n // Static functions\n\n Translation._cache = {};\n Translation.loadPath = function (path) {\n if (!(path in Translation._cache)) {\n var translations = require(path);\n Translation._cache[path] = translations;\n }\n return new Translation(Translation._cache[path]);\n };\n return Translation;\n });\n S2.define('select2/diacritics', [], function () {\n var diacritics = {\n \"\\u24B6\": 'A',\n \"\\uFF21\": 'A',\n \"\\xC0\": 'A',\n \"\\xC1\": 'A',\n \"\\xC2\": 'A',\n \"\\u1EA6\": 'A',\n \"\\u1EA4\": 'A',\n \"\\u1EAA\": 'A',\n \"\\u1EA8\": 'A',\n \"\\xC3\": 'A',\n \"\\u0100\": 'A',\n \"\\u0102\": 'A',\n \"\\u1EB0\": 'A',\n \"\\u1EAE\": 'A',\n \"\\u1EB4\": 'A',\n \"\\u1EB2\": 'A',\n \"\\u0226\": 'A',\n \"\\u01E0\": 'A',\n \"\\xC4\": 'A',\n \"\\u01DE\": 'A',\n \"\\u1EA2\": 'A',\n \"\\xC5\": 'A',\n \"\\u01FA\": 'A',\n \"\\u01CD\": 'A',\n \"\\u0200\": 'A',\n \"\\u0202\": 'A',\n \"\\u1EA0\": 'A',\n \"\\u1EAC\": 'A',\n \"\\u1EB6\": 'A',\n \"\\u1E00\": 'A',\n \"\\u0104\": 'A',\n \"\\u023A\": 'A',\n \"\\u2C6F\": 'A',\n \"\\uA732\": 'AA',\n \"\\xC6\": 'AE',\n \"\\u01FC\": 'AE',\n \"\\u01E2\": 'AE',\n \"\\uA734\": 'AO',\n \"\\uA736\": 'AU',\n \"\\uA738\": 'AV',\n \"\\uA73A\": 'AV',\n \"\\uA73C\": 'AY',\n \"\\u24B7\": 'B',\n \"\\uFF22\": 'B',\n \"\\u1E02\": 'B',\n \"\\u1E04\": 'B',\n \"\\u1E06\": 'B',\n \"\\u0243\": 'B',\n \"\\u0182\": 'B',\n \"\\u0181\": 'B',\n \"\\u24B8\": 'C',\n \"\\uFF23\": 'C',\n \"\\u0106\": 'C',\n \"\\u0108\": 'C',\n \"\\u010A\": 'C',\n \"\\u010C\": 'C',\n \"\\xC7\": 'C',\n \"\\u1E08\": 'C',\n \"\\u0187\": 'C',\n \"\\u023B\": 'C',\n \"\\uA73E\": 'C',\n \"\\u24B9\": 'D',\n \"\\uFF24\": 'D',\n \"\\u1E0A\": 'D',\n \"\\u010E\": 'D',\n \"\\u1E0C\": 'D',\n \"\\u1E10\": 'D',\n \"\\u1E12\": 'D',\n \"\\u1E0E\": 'D',\n \"\\u0110\": 'D',\n \"\\u018B\": 'D',\n \"\\u018A\": 'D',\n \"\\u0189\": 'D',\n \"\\uA779\": 'D',\n \"\\u01F1\": 'DZ',\n \"\\u01C4\": 'DZ',\n \"\\u01F2\": 'Dz',\n \"\\u01C5\": 'Dz',\n \"\\u24BA\": 'E',\n \"\\uFF25\": 'E',\n \"\\xC8\": 'E',\n \"\\xC9\": 'E',\n \"\\xCA\": 'E',\n \"\\u1EC0\": 'E',\n \"\\u1EBE\": 'E',\n \"\\u1EC4\": 'E',\n \"\\u1EC2\": 'E',\n \"\\u1EBC\": 'E',\n \"\\u0112\": 'E',\n \"\\u1E14\": 'E',\n \"\\u1E16\": 'E',\n \"\\u0114\": 'E',\n \"\\u0116\": 'E',\n \"\\xCB\": 'E',\n \"\\u1EBA\": 'E',\n \"\\u011A\": 'E',\n \"\\u0204\": 'E',\n \"\\u0206\": 'E',\n \"\\u1EB8\": 'E',\n \"\\u1EC6\": 'E',\n \"\\u0228\": 'E',\n \"\\u1E1C\": 'E',\n \"\\u0118\": 'E',\n \"\\u1E18\": 'E',\n \"\\u1E1A\": 'E',\n \"\\u0190\": 'E',\n \"\\u018E\": 'E',\n \"\\u24BB\": 'F',\n \"\\uFF26\": 'F',\n \"\\u1E1E\": 'F',\n \"\\u0191\": 'F',\n \"\\uA77B\": 'F',\n \"\\u24BC\": 'G',\n \"\\uFF27\": 'G',\n \"\\u01F4\": 'G',\n \"\\u011C\": 'G',\n \"\\u1E20\": 'G',\n \"\\u011E\": 'G',\n \"\\u0120\": 'G',\n \"\\u01E6\": 'G',\n \"\\u0122\": 'G',\n \"\\u01E4\": 'G',\n \"\\u0193\": 'G',\n \"\\uA7A0\": 'G',\n \"\\uA77D\": 'G',\n \"\\uA77E\": 'G',\n \"\\u24BD\": 'H',\n \"\\uFF28\": 'H',\n \"\\u0124\": 'H',\n \"\\u1E22\": 'H',\n \"\\u1E26\": 'H',\n \"\\u021E\": 'H',\n \"\\u1E24\": 'H',\n \"\\u1E28\": 'H',\n \"\\u1E2A\": 'H',\n \"\\u0126\": 'H',\n \"\\u2C67\": 'H',\n \"\\u2C75\": 'H',\n \"\\uA78D\": 'H',\n \"\\u24BE\": 'I',\n \"\\uFF29\": 'I',\n \"\\xCC\": 'I',\n \"\\xCD\": 'I',\n \"\\xCE\": 'I',\n \"\\u0128\": 'I',\n \"\\u012A\": 'I',\n \"\\u012C\": 'I',\n \"\\u0130\": 'I',\n \"\\xCF\": 'I',\n \"\\u1E2E\": 'I',\n \"\\u1EC8\": 'I',\n \"\\u01CF\": 'I',\n \"\\u0208\": 'I',\n \"\\u020A\": 'I',\n \"\\u1ECA\": 'I',\n \"\\u012E\": 'I',\n \"\\u1E2C\": 'I',\n \"\\u0197\": 'I',\n \"\\u24BF\": 'J',\n \"\\uFF2A\": 'J',\n \"\\u0134\": 'J',\n \"\\u0248\": 'J',\n \"\\u24C0\": 'K',\n \"\\uFF2B\": 'K',\n \"\\u1E30\": 'K',\n \"\\u01E8\": 'K',\n \"\\u1E32\": 'K',\n \"\\u0136\": 'K',\n \"\\u1E34\": 'K',\n \"\\u0198\": 'K',\n \"\\u2C69\": 'K',\n \"\\uA740\": 'K',\n \"\\uA742\": 'K',\n \"\\uA744\": 'K',\n \"\\uA7A2\": 'K',\n \"\\u24C1\": 'L',\n \"\\uFF2C\": 'L',\n \"\\u013F\": 'L',\n \"\\u0139\": 'L',\n \"\\u013D\": 'L',\n \"\\u1E36\": 'L',\n \"\\u1E38\": 'L',\n \"\\u013B\": 'L',\n \"\\u1E3C\": 'L',\n \"\\u1E3A\": 'L',\n \"\\u0141\": 'L',\n \"\\u023D\": 'L',\n \"\\u2C62\": 'L',\n \"\\u2C60\": 'L',\n \"\\uA748\": 'L',\n \"\\uA746\": 'L',\n \"\\uA780\": 'L',\n \"\\u01C7\": 'LJ',\n \"\\u01C8\": 'Lj',\n \"\\u24C2\": 'M',\n \"\\uFF2D\": 'M',\n \"\\u1E3E\": 'M',\n \"\\u1E40\": 'M',\n \"\\u1E42\": 'M',\n \"\\u2C6E\": 'M',\n \"\\u019C\": 'M',\n \"\\u24C3\": 'N',\n \"\\uFF2E\": 'N',\n \"\\u01F8\": 'N',\n \"\\u0143\": 'N',\n \"\\xD1\": 'N',\n \"\\u1E44\": 'N',\n \"\\u0147\": 'N',\n \"\\u1E46\": 'N',\n \"\\u0145\": 'N',\n \"\\u1E4A\": 'N',\n \"\\u1E48\": 'N',\n \"\\u0220\": 'N',\n \"\\u019D\": 'N',\n \"\\uA790\": 'N',\n \"\\uA7A4\": 'N',\n \"\\u01CA\": 'NJ',\n \"\\u01CB\": 'Nj',\n \"\\u24C4\": 'O',\n \"\\uFF2F\": 'O',\n \"\\xD2\": 'O',\n \"\\xD3\": 'O',\n \"\\xD4\": 'O',\n \"\\u1ED2\": 'O',\n \"\\u1ED0\": 'O',\n \"\\u1ED6\": 'O',\n \"\\u1ED4\": 'O',\n \"\\xD5\": 'O',\n \"\\u1E4C\": 'O',\n \"\\u022C\": 'O',\n \"\\u1E4E\": 'O',\n \"\\u014C\": 'O',\n \"\\u1E50\": 'O',\n \"\\u1E52\": 'O',\n \"\\u014E\": 'O',\n \"\\u022E\": 'O',\n \"\\u0230\": 'O',\n \"\\xD6\": 'O',\n \"\\u022A\": 'O',\n \"\\u1ECE\": 'O',\n \"\\u0150\": 'O',\n \"\\u01D1\": 'O',\n \"\\u020C\": 'O',\n \"\\u020E\": 'O',\n \"\\u01A0\": 'O',\n \"\\u1EDC\": 'O',\n \"\\u1EDA\": 'O',\n \"\\u1EE0\": 'O',\n \"\\u1EDE\": 'O',\n \"\\u1EE2\": 'O',\n \"\\u1ECC\": 'O',\n \"\\u1ED8\": 'O',\n \"\\u01EA\": 'O',\n \"\\u01EC\": 'O',\n \"\\xD8\": 'O',\n \"\\u01FE\": 'O',\n \"\\u0186\": 'O',\n \"\\u019F\": 'O',\n \"\\uA74A\": 'O',\n \"\\uA74C\": 'O',\n \"\\u0152\": 'OE',\n \"\\u01A2\": 'OI',\n \"\\uA74E\": 'OO',\n \"\\u0222\": 'OU',\n \"\\u24C5\": 'P',\n \"\\uFF30\": 'P',\n \"\\u1E54\": 'P',\n \"\\u1E56\": 'P',\n \"\\u01A4\": 'P',\n \"\\u2C63\": 'P',\n \"\\uA750\": 'P',\n \"\\uA752\": 'P',\n \"\\uA754\": 'P',\n \"\\u24C6\": 'Q',\n \"\\uFF31\": 'Q',\n \"\\uA756\": 'Q',\n \"\\uA758\": 'Q',\n \"\\u024A\": 'Q',\n \"\\u24C7\": 'R',\n \"\\uFF32\": 'R',\n \"\\u0154\": 'R',\n \"\\u1E58\": 'R',\n \"\\u0158\": 'R',\n \"\\u0210\": 'R',\n \"\\u0212\": 'R',\n \"\\u1E5A\": 'R',\n \"\\u1E5C\": 'R',\n \"\\u0156\": 'R',\n \"\\u1E5E\": 'R',\n \"\\u024C\": 'R',\n \"\\u2C64\": 'R',\n \"\\uA75A\": 'R',\n \"\\uA7A6\": 'R',\n \"\\uA782\": 'R',\n \"\\u24C8\": 'S',\n \"\\uFF33\": 'S',\n \"\\u1E9E\": 'S',\n \"\\u015A\": 'S',\n \"\\u1E64\": 'S',\n \"\\u015C\": 'S',\n \"\\u1E60\": 'S',\n \"\\u0160\": 'S',\n \"\\u1E66\": 'S',\n \"\\u1E62\": 'S',\n \"\\u1E68\": 'S',\n \"\\u0218\": 'S',\n \"\\u015E\": 'S',\n \"\\u2C7E\": 'S',\n \"\\uA7A8\": 'S',\n \"\\uA784\": 'S',\n \"\\u24C9\": 'T',\n \"\\uFF34\": 'T',\n \"\\u1E6A\": 'T',\n \"\\u0164\": 'T',\n \"\\u1E6C\": 'T',\n \"\\u021A\": 'T',\n \"\\u0162\": 'T',\n \"\\u1E70\": 'T',\n \"\\u1E6E\": 'T',\n \"\\u0166\": 'T',\n \"\\u01AC\": 'T',\n \"\\u01AE\": 'T',\n \"\\u023E\": 'T',\n \"\\uA786\": 'T',\n \"\\uA728\": 'TZ',\n \"\\u24CA\": 'U',\n \"\\uFF35\": 'U',\n \"\\xD9\": 'U',\n \"\\xDA\": 'U',\n \"\\xDB\": 'U',\n \"\\u0168\": 'U',\n \"\\u1E78\": 'U',\n \"\\u016A\": 'U',\n \"\\u1E7A\": 'U',\n \"\\u016C\": 'U',\n \"\\xDC\": 'U',\n \"\\u01DB\": 'U',\n \"\\u01D7\": 'U',\n \"\\u01D5\": 'U',\n \"\\u01D9\": 'U',\n \"\\u1EE6\": 'U',\n \"\\u016E\": 'U',\n \"\\u0170\": 'U',\n \"\\u01D3\": 'U',\n \"\\u0214\": 'U',\n \"\\u0216\": 'U',\n \"\\u01AF\": 'U',\n \"\\u1EEA\": 'U',\n \"\\u1EE8\": 'U',\n \"\\u1EEE\": 'U',\n \"\\u1EEC\": 'U',\n \"\\u1EF0\": 'U',\n \"\\u1EE4\": 'U',\n \"\\u1E72\": 'U',\n \"\\u0172\": 'U',\n \"\\u1E76\": 'U',\n \"\\u1E74\": 'U',\n \"\\u0244\": 'U',\n \"\\u24CB\": 'V',\n \"\\uFF36\": 'V',\n \"\\u1E7C\": 'V',\n \"\\u1E7E\": 'V',\n \"\\u01B2\": 'V',\n \"\\uA75E\": 'V',\n \"\\u0245\": 'V',\n \"\\uA760\": 'VY',\n \"\\u24CC\": 'W',\n \"\\uFF37\": 'W',\n \"\\u1E80\": 'W',\n \"\\u1E82\": 'W',\n \"\\u0174\": 'W',\n \"\\u1E86\": 'W',\n \"\\u1E84\": 'W',\n \"\\u1E88\": 'W',\n \"\\u2C72\": 'W',\n \"\\u24CD\": 'X',\n \"\\uFF38\": 'X',\n \"\\u1E8A\": 'X',\n \"\\u1E8C\": 'X',\n \"\\u24CE\": 'Y',\n \"\\uFF39\": 'Y',\n \"\\u1EF2\": 'Y',\n \"\\xDD\": 'Y',\n \"\\u0176\": 'Y',\n \"\\u1EF8\": 'Y',\n \"\\u0232\": 'Y',\n \"\\u1E8E\": 'Y',\n \"\\u0178\": 'Y',\n \"\\u1EF6\": 'Y',\n \"\\u1EF4\": 'Y',\n \"\\u01B3\": 'Y',\n \"\\u024E\": 'Y',\n \"\\u1EFE\": 'Y',\n \"\\u24CF\": 'Z',\n \"\\uFF3A\": 'Z',\n \"\\u0179\": 'Z',\n \"\\u1E90\": 'Z',\n \"\\u017B\": 'Z',\n \"\\u017D\": 'Z',\n \"\\u1E92\": 'Z',\n \"\\u1E94\": 'Z',\n \"\\u01B5\": 'Z',\n \"\\u0224\": 'Z',\n \"\\u2C7F\": 'Z',\n \"\\u2C6B\": 'Z',\n \"\\uA762\": 'Z',\n \"\\u24D0\": 'a',\n \"\\uFF41\": 'a',\n \"\\u1E9A\": 'a',\n \"\\xE0\": 'a',\n \"\\xE1\": 'a',\n \"\\xE2\": 'a',\n \"\\u1EA7\": 'a',\n \"\\u1EA5\": 'a',\n \"\\u1EAB\": 'a',\n \"\\u1EA9\": 'a',\n \"\\xE3\": 'a',\n \"\\u0101\": 'a',\n \"\\u0103\": 'a',\n \"\\u1EB1\": 'a',\n \"\\u1EAF\": 'a',\n \"\\u1EB5\": 'a',\n \"\\u1EB3\": 'a',\n \"\\u0227\": 'a',\n \"\\u01E1\": 'a',\n \"\\xE4\": 'a',\n \"\\u01DF\": 'a',\n \"\\u1EA3\": 'a',\n \"\\xE5\": 'a',\n \"\\u01FB\": 'a',\n \"\\u01CE\": 'a',\n \"\\u0201\": 'a',\n \"\\u0203\": 'a',\n \"\\u1EA1\": 'a',\n \"\\u1EAD\": 'a',\n \"\\u1EB7\": 'a',\n \"\\u1E01\": 'a',\n \"\\u0105\": 'a',\n \"\\u2C65\": 'a',\n \"\\u0250\": 'a',\n \"\\uA733\": 'aa',\n \"\\xE6\": 'ae',\n \"\\u01FD\": 'ae',\n \"\\u01E3\": 'ae',\n \"\\uA735\": 'ao',\n \"\\uA737\": 'au',\n \"\\uA739\": 'av',\n \"\\uA73B\": 'av',\n \"\\uA73D\": 'ay',\n \"\\u24D1\": 'b',\n \"\\uFF42\": 'b',\n \"\\u1E03\": 'b',\n \"\\u1E05\": 'b',\n \"\\u1E07\": 'b',\n \"\\u0180\": 'b',\n \"\\u0183\": 'b',\n \"\\u0253\": 'b',\n \"\\u24D2\": 'c',\n \"\\uFF43\": 'c',\n \"\\u0107\": 'c',\n \"\\u0109\": 'c',\n \"\\u010B\": 'c',\n \"\\u010D\": 'c',\n \"\\xE7\": 'c',\n \"\\u1E09\": 'c',\n \"\\u0188\": 'c',\n \"\\u023C\": 'c',\n \"\\uA73F\": 'c',\n \"\\u2184\": 'c',\n \"\\u24D3\": 'd',\n \"\\uFF44\": 'd',\n \"\\u1E0B\": 'd',\n \"\\u010F\": 'd',\n \"\\u1E0D\": 'd',\n \"\\u1E11\": 'd',\n \"\\u1E13\": 'd',\n \"\\u1E0F\": 'd',\n \"\\u0111\": 'd',\n \"\\u018C\": 'd',\n \"\\u0256\": 'd',\n \"\\u0257\": 'd',\n \"\\uA77A\": 'd',\n \"\\u01F3\": 'dz',\n \"\\u01C6\": 'dz',\n \"\\u24D4\": 'e',\n \"\\uFF45\": 'e',\n \"\\xE8\": 'e',\n \"\\xE9\": 'e',\n \"\\xEA\": 'e',\n \"\\u1EC1\": 'e',\n \"\\u1EBF\": 'e',\n \"\\u1EC5\": 'e',\n \"\\u1EC3\": 'e',\n \"\\u1EBD\": 'e',\n \"\\u0113\": 'e',\n \"\\u1E15\": 'e',\n \"\\u1E17\": 'e',\n \"\\u0115\": 'e',\n \"\\u0117\": 'e',\n \"\\xEB\": 'e',\n \"\\u1EBB\": 'e',\n \"\\u011B\": 'e',\n \"\\u0205\": 'e',\n \"\\u0207\": 'e',\n \"\\u1EB9\": 'e',\n \"\\u1EC7\": 'e',\n \"\\u0229\": 'e',\n \"\\u1E1D\": 'e',\n \"\\u0119\": 'e',\n \"\\u1E19\": 'e',\n \"\\u1E1B\": 'e',\n \"\\u0247\": 'e',\n \"\\u025B\": 'e',\n \"\\u01DD\": 'e',\n \"\\u24D5\": 'f',\n \"\\uFF46\": 'f',\n \"\\u1E1F\": 'f',\n \"\\u0192\": 'f',\n \"\\uA77C\": 'f',\n \"\\u24D6\": 'g',\n \"\\uFF47\": 'g',\n \"\\u01F5\": 'g',\n \"\\u011D\": 'g',\n \"\\u1E21\": 'g',\n \"\\u011F\": 'g',\n \"\\u0121\": 'g',\n \"\\u01E7\": 'g',\n \"\\u0123\": 'g',\n \"\\u01E5\": 'g',\n \"\\u0260\": 'g',\n \"\\uA7A1\": 'g',\n \"\\u1D79\": 'g',\n \"\\uA77F\": 'g',\n \"\\u24D7\": 'h',\n \"\\uFF48\": 'h',\n \"\\u0125\": 'h',\n \"\\u1E23\": 'h',\n \"\\u1E27\": 'h',\n \"\\u021F\": 'h',\n \"\\u1E25\": 'h',\n \"\\u1E29\": 'h',\n \"\\u1E2B\": 'h',\n \"\\u1E96\": 'h',\n \"\\u0127\": 'h',\n \"\\u2C68\": 'h',\n \"\\u2C76\": 'h',\n \"\\u0265\": 'h',\n \"\\u0195\": 'hv',\n \"\\u24D8\": 'i',\n \"\\uFF49\": 'i',\n \"\\xEC\": 'i',\n \"\\xED\": 'i',\n \"\\xEE\": 'i',\n \"\\u0129\": 'i',\n \"\\u012B\": 'i',\n \"\\u012D\": 'i',\n \"\\xEF\": 'i',\n \"\\u1E2F\": 'i',\n \"\\u1EC9\": 'i',\n \"\\u01D0\": 'i',\n \"\\u0209\": 'i',\n \"\\u020B\": 'i',\n \"\\u1ECB\": 'i',\n \"\\u012F\": 'i',\n \"\\u1E2D\": 'i',\n \"\\u0268\": 'i',\n \"\\u0131\": 'i',\n \"\\u24D9\": 'j',\n \"\\uFF4A\": 'j',\n \"\\u0135\": 'j',\n \"\\u01F0\": 'j',\n \"\\u0249\": 'j',\n \"\\u24DA\": 'k',\n \"\\uFF4B\": 'k',\n \"\\u1E31\": 'k',\n \"\\u01E9\": 'k',\n \"\\u1E33\": 'k',\n \"\\u0137\": 'k',\n \"\\u1E35\": 'k',\n \"\\u0199\": 'k',\n \"\\u2C6A\": 'k',\n \"\\uA741\": 'k',\n \"\\uA743\": 'k',\n \"\\uA745\": 'k',\n \"\\uA7A3\": 'k',\n \"\\u24DB\": 'l',\n \"\\uFF4C\": 'l',\n \"\\u0140\": 'l',\n \"\\u013A\": 'l',\n \"\\u013E\": 'l',\n \"\\u1E37\": 'l',\n \"\\u1E39\": 'l',\n \"\\u013C\": 'l',\n \"\\u1E3D\": 'l',\n \"\\u1E3B\": 'l',\n \"\\u017F\": 'l',\n \"\\u0142\": 'l',\n \"\\u019A\": 'l',\n \"\\u026B\": 'l',\n \"\\u2C61\": 'l',\n \"\\uA749\": 'l',\n \"\\uA781\": 'l',\n \"\\uA747\": 'l',\n \"\\u01C9\": 'lj',\n \"\\u24DC\": 'm',\n \"\\uFF4D\": 'm',\n \"\\u1E3F\": 'm',\n \"\\u1E41\": 'm',\n \"\\u1E43\": 'm',\n \"\\u0271\": 'm',\n \"\\u026F\": 'm',\n \"\\u24DD\": 'n',\n \"\\uFF4E\": 'n',\n \"\\u01F9\": 'n',\n \"\\u0144\": 'n',\n \"\\xF1\": 'n',\n \"\\u1E45\": 'n',\n \"\\u0148\": 'n',\n \"\\u1E47\": 'n',\n \"\\u0146\": 'n',\n \"\\u1E4B\": 'n',\n \"\\u1E49\": 'n',\n \"\\u019E\": 'n',\n \"\\u0272\": 'n',\n \"\\u0149\": 'n',\n \"\\uA791\": 'n',\n \"\\uA7A5\": 'n',\n \"\\u01CC\": 'nj',\n \"\\u24DE\": 'o',\n \"\\uFF4F\": 'o',\n \"\\xF2\": 'o',\n \"\\xF3\": 'o',\n \"\\xF4\": 'o',\n \"\\u1ED3\": 'o',\n \"\\u1ED1\": 'o',\n \"\\u1ED7\": 'o',\n \"\\u1ED5\": 'o',\n \"\\xF5\": 'o',\n \"\\u1E4D\": 'o',\n \"\\u022D\": 'o',\n \"\\u1E4F\": 'o',\n \"\\u014D\": 'o',\n \"\\u1E51\": 'o',\n \"\\u1E53\": 'o',\n \"\\u014F\": 'o',\n \"\\u022F\": 'o',\n \"\\u0231\": 'o',\n \"\\xF6\": 'o',\n \"\\u022B\": 'o',\n \"\\u1ECF\": 'o',\n \"\\u0151\": 'o',\n \"\\u01D2\": 'o',\n \"\\u020D\": 'o',\n \"\\u020F\": 'o',\n \"\\u01A1\": 'o',\n \"\\u1EDD\": 'o',\n \"\\u1EDB\": 'o',\n \"\\u1EE1\": 'o',\n \"\\u1EDF\": 'o',\n \"\\u1EE3\": 'o',\n \"\\u1ECD\": 'o',\n \"\\u1ED9\": 'o',\n \"\\u01EB\": 'o',\n \"\\u01ED\": 'o',\n \"\\xF8\": 'o',\n \"\\u01FF\": 'o',\n \"\\u0254\": 'o',\n \"\\uA74B\": 'o',\n \"\\uA74D\": 'o',\n \"\\u0275\": 'o',\n \"\\u0153\": 'oe',\n \"\\u01A3\": 'oi',\n \"\\u0223\": 'ou',\n \"\\uA74F\": 'oo',\n \"\\u24DF\": 'p',\n \"\\uFF50\": 'p',\n \"\\u1E55\": 'p',\n \"\\u1E57\": 'p',\n \"\\u01A5\": 'p',\n \"\\u1D7D\": 'p',\n \"\\uA751\": 'p',\n \"\\uA753\": 'p',\n \"\\uA755\": 'p',\n \"\\u24E0\": 'q',\n \"\\uFF51\": 'q',\n \"\\u024B\": 'q',\n \"\\uA757\": 'q',\n \"\\uA759\": 'q',\n \"\\u24E1\": 'r',\n \"\\uFF52\": 'r',\n \"\\u0155\": 'r',\n \"\\u1E59\": 'r',\n \"\\u0159\": 'r',\n \"\\u0211\": 'r',\n \"\\u0213\": 'r',\n \"\\u1E5B\": 'r',\n \"\\u1E5D\": 'r',\n \"\\u0157\": 'r',\n \"\\u1E5F\": 'r',\n \"\\u024D\": 'r',\n \"\\u027D\": 'r',\n \"\\uA75B\": 'r',\n \"\\uA7A7\": 'r',\n \"\\uA783\": 'r',\n \"\\u24E2\": 's',\n \"\\uFF53\": 's',\n \"\\xDF\": 's',\n \"\\u015B\": 's',\n \"\\u1E65\": 's',\n \"\\u015D\": 's',\n \"\\u1E61\": 's',\n \"\\u0161\": 's',\n \"\\u1E67\": 's',\n \"\\u1E63\": 's',\n \"\\u1E69\": 's',\n \"\\u0219\": 's',\n \"\\u015F\": 's',\n \"\\u023F\": 's',\n \"\\uA7A9\": 's',\n \"\\uA785\": 's',\n \"\\u1E9B\": 's',\n \"\\u24E3\": 't',\n \"\\uFF54\": 't',\n \"\\u1E6B\": 't',\n \"\\u1E97\": 't',\n \"\\u0165\": 't',\n \"\\u1E6D\": 't',\n \"\\u021B\": 't',\n \"\\u0163\": 't',\n \"\\u1E71\": 't',\n \"\\u1E6F\": 't',\n \"\\u0167\": 't',\n \"\\u01AD\": 't',\n \"\\u0288\": 't',\n \"\\u2C66\": 't',\n \"\\uA787\": 't',\n \"\\uA729\": 'tz',\n \"\\u24E4\": 'u',\n \"\\uFF55\": 'u',\n \"\\xF9\": 'u',\n \"\\xFA\": 'u',\n \"\\xFB\": 'u',\n \"\\u0169\": 'u',\n \"\\u1E79\": 'u',\n \"\\u016B\": 'u',\n \"\\u1E7B\": 'u',\n \"\\u016D\": 'u',\n \"\\xFC\": 'u',\n \"\\u01DC\": 'u',\n \"\\u01D8\": 'u',\n \"\\u01D6\": 'u',\n \"\\u01DA\": 'u',\n \"\\u1EE7\": 'u',\n \"\\u016F\": 'u',\n \"\\u0171\": 'u',\n \"\\u01D4\": 'u',\n \"\\u0215\": 'u',\n \"\\u0217\": 'u',\n \"\\u01B0\": 'u',\n \"\\u1EEB\": 'u',\n \"\\u1EE9\": 'u',\n \"\\u1EEF\": 'u',\n \"\\u1EED\": 'u',\n \"\\u1EF1\": 'u',\n \"\\u1EE5\": 'u',\n \"\\u1E73\": 'u',\n \"\\u0173\": 'u',\n \"\\u1E77\": 'u',\n \"\\u1E75\": 'u',\n \"\\u0289\": 'u',\n \"\\u24E5\": 'v',\n \"\\uFF56\": 'v',\n \"\\u1E7D\": 'v',\n \"\\u1E7F\": 'v',\n \"\\u028B\": 'v',\n \"\\uA75F\": 'v',\n \"\\u028C\": 'v',\n \"\\uA761\": 'vy',\n \"\\u24E6\": 'w',\n \"\\uFF57\": 'w',\n \"\\u1E81\": 'w',\n \"\\u1E83\": 'w',\n \"\\u0175\": 'w',\n \"\\u1E87\": 'w',\n \"\\u1E85\": 'w',\n \"\\u1E98\": 'w',\n \"\\u1E89\": 'w',\n \"\\u2C73\": 'w',\n \"\\u24E7\": 'x',\n \"\\uFF58\": 'x',\n \"\\u1E8B\": 'x',\n \"\\u1E8D\": 'x',\n \"\\u24E8\": 'y',\n \"\\uFF59\": 'y',\n \"\\u1EF3\": 'y',\n \"\\xFD\": 'y',\n \"\\u0177\": 'y',\n \"\\u1EF9\": 'y',\n \"\\u0233\": 'y',\n \"\\u1E8F\": 'y',\n \"\\xFF\": 'y',\n \"\\u1EF7\": 'y',\n \"\\u1E99\": 'y',\n \"\\u1EF5\": 'y',\n \"\\u01B4\": 'y',\n \"\\u024F\": 'y',\n \"\\u1EFF\": 'y',\n \"\\u24E9\": 'z',\n \"\\uFF5A\": 'z',\n \"\\u017A\": 'z',\n \"\\u1E91\": 'z',\n \"\\u017C\": 'z',\n \"\\u017E\": 'z',\n \"\\u1E93\": 'z',\n \"\\u1E95\": 'z',\n \"\\u01B6\": 'z',\n \"\\u0225\": 'z',\n \"\\u0240\": 'z',\n \"\\u2C6C\": 'z',\n \"\\uA763\": 'z',\n \"\\u0386\": \"\\u0391\",\n \"\\u0388\": \"\\u0395\",\n \"\\u0389\": \"\\u0397\",\n \"\\u038A\": \"\\u0399\",\n \"\\u03AA\": \"\\u0399\",\n \"\\u038C\": \"\\u039F\",\n \"\\u038E\": \"\\u03A5\",\n \"\\u03AB\": \"\\u03A5\",\n \"\\u038F\": \"\\u03A9\",\n \"\\u03AC\": \"\\u03B1\",\n \"\\u03AD\": \"\\u03B5\",\n \"\\u03AE\": \"\\u03B7\",\n \"\\u03AF\": \"\\u03B9\",\n \"\\u03CA\": \"\\u03B9\",\n \"\\u0390\": \"\\u03B9\",\n \"\\u03CC\": \"\\u03BF\",\n \"\\u03CD\": \"\\u03C5\",\n \"\\u03CB\": \"\\u03C5\",\n \"\\u03B0\": \"\\u03C5\",\n \"\\u03CE\": \"\\u03C9\",\n \"\\u03C2\": \"\\u03C3\",\n \"\\u2019\": '\\''\n };\n return diacritics;\n });\n S2.define('select2/data/base', ['../utils'], function (Utils) {\n function BaseAdapter($element, options) {\n BaseAdapter.__super__.constructor.call(this);\n }\n Utils.Extend(BaseAdapter, Utils.Observable);\n BaseAdapter.prototype.current = function (callback) {\n throw new Error('The `current` method must be defined in child classes.');\n };\n BaseAdapter.prototype.query = function (params, callback) {\n throw new Error('The `query` method must be defined in child classes.');\n };\n BaseAdapter.prototype.bind = function (container, $container) {\n // Can be implemented in subclasses\n };\n BaseAdapter.prototype.destroy = function () {\n // Can be implemented in subclasses\n };\n BaseAdapter.prototype.generateResultId = function (container, data) {\n var id = container.id + '-result-';\n id += Utils.generateChars(4);\n if (data.id != null) {\n id += '-' + data.id.toString();\n } else {\n id += '-' + Utils.generateChars(4);\n }\n return id;\n };\n return BaseAdapter;\n });\n S2.define('select2/data/select', ['./base', '../utils', 'jquery'], function (BaseAdapter, Utils, $) {\n function SelectAdapter($element, options) {\n this.$element = $element;\n this.options = options;\n SelectAdapter.__super__.constructor.call(this);\n }\n Utils.Extend(SelectAdapter, BaseAdapter);\n SelectAdapter.prototype.current = function (callback) {\n var data = [];\n var self = this;\n this.$element.find(':selected').each(function () {\n var $option = $(this);\n var option = self.item($option);\n data.push(option);\n });\n callback(data);\n };\n SelectAdapter.prototype.select = function (data) {\n var self = this;\n data.selected = true;\n\n // If data.element is a DOM node, use it instead\n if ($(data.element).is('option')) {\n data.element.selected = true;\n this.$element.trigger('change');\n return;\n }\n if (this.$element.prop('multiple')) {\n this.current(function (currentData) {\n var val = [];\n data = [data];\n data.push.apply(data, currentData);\n for (var d = 0; d < data.length; d++) {\n var id = data[d].id;\n if ($.inArray(id, val) === -1) {\n val.push(id);\n }\n }\n self.$element.val(val);\n self.$element.trigger('change');\n });\n } else {\n var val = data.id;\n this.$element.val(val);\n this.$element.trigger('change');\n }\n };\n SelectAdapter.prototype.unselect = function (data) {\n var self = this;\n if (!this.$element.prop('multiple')) {\n return;\n }\n data.selected = false;\n if ($(data.element).is('option')) {\n data.element.selected = false;\n this.$element.trigger('change');\n return;\n }\n this.current(function (currentData) {\n var val = [];\n for (var d = 0; d < currentData.length; d++) {\n var id = currentData[d].id;\n if (id !== data.id && $.inArray(id, val) === -1) {\n val.push(id);\n }\n }\n self.$element.val(val);\n self.$element.trigger('change');\n });\n };\n SelectAdapter.prototype.bind = function (container, $container) {\n var self = this;\n this.container = container;\n container.on('select', function (params) {\n self.select(params.data);\n });\n container.on('unselect', function (params) {\n self.unselect(params.data);\n });\n };\n SelectAdapter.prototype.destroy = function () {\n // Remove anything added to child elements\n this.$element.find('*').each(function () {\n // Remove any custom data set by Select2\n Utils.RemoveData(this);\n });\n };\n SelectAdapter.prototype.query = function (params, callback) {\n var data = [];\n var self = this;\n var $options = this.$element.children();\n $options.each(function () {\n var $option = $(this);\n if (!$option.is('option') && !$option.is('optgroup')) {\n return;\n }\n var option = self.item($option);\n var matches = self.matches(params, option);\n if (matches !== null) {\n data.push(matches);\n }\n });\n callback({\n results: data\n });\n };\n SelectAdapter.prototype.addOptions = function ($options) {\n Utils.appendMany(this.$element, $options);\n };\n SelectAdapter.prototype.option = function (data) {\n var option;\n if (data.children) {\n option = document.createElement('optgroup');\n option.label = data.text;\n } else {\n option = document.createElement('option');\n if (option.textContent !== undefined) {\n option.textContent = data.text;\n } else {\n option.innerText = data.text;\n }\n }\n if (data.id !== undefined) {\n option.value = data.id;\n }\n if (data.disabled) {\n option.disabled = true;\n }\n if (data.selected) {\n option.selected = true;\n }\n if (data.title) {\n option.title = data.title;\n }\n var $option = $(option);\n var normalizedData = this._normalizeItem(data);\n normalizedData.element = option;\n\n // Override the option's data with the combined data\n Utils.StoreData(option, 'data', normalizedData);\n return $option;\n };\n SelectAdapter.prototype.item = function ($option) {\n var data = {};\n data = Utils.GetData($option[0], 'data');\n if (data != null) {\n return data;\n }\n if ($option.is('option')) {\n data = {\n id: $option.val(),\n text: $option.text(),\n disabled: $option.prop('disabled'),\n selected: $option.prop('selected'),\n title: $option.prop('title')\n };\n } else if ($option.is('optgroup')) {\n data = {\n text: $option.prop('label'),\n children: [],\n title: $option.prop('title')\n };\n var $children = $option.children('option');\n var children = [];\n for (var c = 0; c < $children.length; c++) {\n var $child = $($children[c]);\n var child = this.item($child);\n children.push(child);\n }\n data.children = children;\n }\n data = this._normalizeItem(data);\n data.element = $option[0];\n Utils.StoreData($option[0], 'data', data);\n return data;\n };\n SelectAdapter.prototype._normalizeItem = function (item) {\n if (item !== Object(item)) {\n item = {\n id: item,\n text: item\n };\n }\n item = $.extend({}, {\n text: ''\n }, item);\n var defaults = {\n selected: false,\n disabled: false\n };\n if (item.id != null) {\n item.id = item.id.toString();\n }\n if (item.text != null) {\n item.text = item.text.toString();\n }\n if (item._resultId == null && item.id && this.container != null) {\n item._resultId = this.generateResultId(this.container, item);\n }\n return $.extend({}, defaults, item);\n };\n SelectAdapter.prototype.matches = function (params, data) {\n var matcher = this.options.get('matcher');\n return matcher(params, data);\n };\n return SelectAdapter;\n });\n S2.define('select2/data/array', ['./select', '../utils', 'jquery'], function (SelectAdapter, Utils, $) {\n function ArrayAdapter($element, options) {\n var data = options.get('data') || [];\n ArrayAdapter.__super__.constructor.call(this, $element, options);\n this.addOptions(this.convertToOptions(data));\n }\n Utils.Extend(ArrayAdapter, SelectAdapter);\n ArrayAdapter.prototype.select = function (data) {\n var $option = this.$element.find('option').filter(function (i, elm) {\n return elm.value == data.id.toString();\n });\n if ($option.length === 0) {\n $option = this.option(data);\n this.addOptions($option);\n }\n ArrayAdapter.__super__.select.call(this, data);\n };\n ArrayAdapter.prototype.convertToOptions = function (data) {\n var self = this;\n var $existing = this.$element.find('option');\n var existingIds = $existing.map(function () {\n return self.item($(this)).id;\n }).get();\n var $options = [];\n\n // Filter out all items except for the one passed in the argument\n function onlyItem(item) {\n return function () {\n return $(this).val() == item.id;\n };\n }\n for (var d = 0; d < data.length; d++) {\n var item = this._normalizeItem(data[d]);\n\n // Skip items which were pre-loaded, only merge the data\n if ($.inArray(item.id, existingIds) >= 0) {\n var $existingOption = $existing.filter(onlyItem(item));\n var existingData = this.item($existingOption);\n var newData = $.extend(true, {}, item, existingData);\n var $newOption = this.option(newData);\n $existingOption.replaceWith($newOption);\n continue;\n }\n var $option = this.option(item);\n if (item.children) {\n var $children = this.convertToOptions(item.children);\n Utils.appendMany($option, $children);\n }\n $options.push($option);\n }\n return $options;\n };\n return ArrayAdapter;\n });\n S2.define('select2/data/ajax', ['./array', '../utils', 'jquery'], function (ArrayAdapter, Utils, $) {\n function AjaxAdapter($element, options) {\n this.ajaxOptions = this._applyDefaults(options.get('ajax'));\n if (this.ajaxOptions.processResults != null) {\n this.processResults = this.ajaxOptions.processResults;\n }\n AjaxAdapter.__super__.constructor.call(this, $element, options);\n }\n Utils.Extend(AjaxAdapter, ArrayAdapter);\n AjaxAdapter.prototype._applyDefaults = function (options) {\n var defaults = {\n data: function data(params) {\n return $.extend({}, params, {\n q: params.term\n });\n },\n transport: function transport(params, success, failure) {\n var $request = $.ajax(params);\n $request.then(success);\n $request.fail(failure);\n return $request;\n }\n };\n return $.extend({}, defaults, options, true);\n };\n AjaxAdapter.prototype.processResults = function (results) {\n return results;\n };\n AjaxAdapter.prototype.query = function (params, callback) {\n var matches = [];\n var self = this;\n if (this._request != null) {\n // JSONP requests cannot always be aborted\n if ($.isFunction(this._request.abort)) {\n this._request.abort();\n }\n this._request = null;\n }\n var options = $.extend({\n type: 'GET'\n }, this.ajaxOptions);\n if (typeof options.url === 'function') {\n options.url = options.url.call(this.$element, params);\n }\n if (typeof options.data === 'function') {\n options.data = options.data.call(this.$element, params);\n }\n function request() {\n var $request = options.transport(options, function (data) {\n var results = self.processResults(data, params);\n if (self.options.get('debug') && window.console && console.error) {\n // Check to make sure that the response included a `results` key.\n if (!results || !results.results || !$.isArray(results.results)) {\n console.error('Select2: The AJAX results did not return an array in the ' + '`results` key of the response.');\n }\n }\n callback(results);\n }, function () {\n // Attempt to detect if a request was aborted\n // Only works if the transport exposes a status property\n if ('status' in $request && ($request.status === 0 || $request.status === '0')) {\n return;\n }\n self.trigger('results:message', {\n message: 'errorLoading'\n });\n });\n self._request = $request;\n }\n if (this.ajaxOptions.delay && params.term != null) {\n if (this._queryTimeout) {\n window.clearTimeout(this._queryTimeout);\n }\n this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);\n } else {\n request();\n }\n };\n return AjaxAdapter;\n });\n S2.define('select2/data/tags', ['jquery'], function ($) {\n function Tags(decorated, $element, options) {\n var tags = options.get('tags');\n var createTag = options.get('createTag');\n if (createTag !== undefined) {\n this.createTag = createTag;\n }\n var insertTag = options.get('insertTag');\n if (insertTag !== undefined) {\n this.insertTag = insertTag;\n }\n decorated.call(this, $element, options);\n if ($.isArray(tags)) {\n for (var t = 0; t < tags.length; t++) {\n var tag = tags[t];\n var item = this._normalizeItem(tag);\n var $option = this.option(item);\n this.$element.append($option);\n }\n }\n }\n Tags.prototype.query = function (decorated, params, callback) {\n var self = this;\n this._removeOldTags();\n if (params.term == null || params.page != null) {\n decorated.call(this, params, callback);\n return;\n }\n function wrapper(obj, child) {\n var data = obj.results;\n for (var i = 0; i < data.length; i++) {\n var option = data[i];\n var checkChildren = option.children != null && !wrapper({\n results: option.children\n }, true);\n var optionText = (option.text || '').toUpperCase();\n var paramsTerm = (params.term || '').toUpperCase();\n var checkText = optionText === paramsTerm;\n if (checkText || checkChildren) {\n if (child) {\n return false;\n }\n obj.data = data;\n callback(obj);\n return;\n }\n }\n if (child) {\n return true;\n }\n var tag = self.createTag(params);\n if (tag != null) {\n var $option = self.option(tag);\n $option.attr('data-select2-tag', true);\n self.addOptions([$option]);\n self.insertTag(data, tag);\n }\n obj.results = data;\n callback(obj);\n }\n decorated.call(this, params, wrapper);\n };\n Tags.prototype.createTag = function (decorated, params) {\n var term = $.trim(params.term);\n if (term === '') {\n return null;\n }\n return {\n id: term,\n text: term\n };\n };\n Tags.prototype.insertTag = function (_, data, tag) {\n data.unshift(tag);\n };\n Tags.prototype._removeOldTags = function (_) {\n var tag = this._lastTag;\n var $options = this.$element.find('option[data-select2-tag]');\n $options.each(function () {\n if (this.selected) {\n return;\n }\n $(this).remove();\n });\n };\n return Tags;\n });\n S2.define('select2/data/tokenizer', ['jquery'], function ($) {\n function Tokenizer(decorated, $element, options) {\n var tokenizer = options.get('tokenizer');\n if (tokenizer !== undefined) {\n this.tokenizer = tokenizer;\n }\n decorated.call(this, $element, options);\n }\n Tokenizer.prototype.bind = function (decorated, container, $container) {\n decorated.call(this, container, $container);\n this.$search = container.dropdown.$search || container.selection.$search || $container.find('.select2-search__field');\n };\n Tokenizer.prototype.query = function (decorated, params, callback) {\n var self = this;\n function createAndSelect(data) {\n // Normalize the data object so we can use it for checks\n var item = self._normalizeItem(data);\n\n // Check if the data object already exists as a tag\n // Select it if it doesn't\n var $existingOptions = self.$element.find('option').filter(function () {\n return $(this).val() === item.id;\n });\n\n // If an existing option wasn't found for it, create the option\n if (!$existingOptions.length) {\n var $option = self.option(item);\n $option.attr('data-select2-tag', true);\n self._removeOldTags();\n self.addOptions([$option]);\n }\n\n // Select the item, now that we know there is an option for it\n select(item);\n }\n function select(data) {\n self.trigger('select', {\n data: data\n });\n }\n params.term = params.term || '';\n var tokenData = this.tokenizer(params, this.options, createAndSelect);\n if (tokenData.term !== params.term) {\n // Replace the search term if we have the search box\n if (this.$search.length) {\n this.$search.val(tokenData.term);\n this.$search.focus();\n }\n params.term = tokenData.term;\n }\n decorated.call(this, params, callback);\n };\n Tokenizer.prototype.tokenizer = function (_, params, options, callback) {\n var separators = options.get('tokenSeparators') || [];\n var term = params.term;\n var i = 0;\n var createTag = this.createTag || function (params) {\n return {\n id: params.term,\n text: params.term\n };\n };\n while (i < term.length) {\n var termChar = term[i];\n if ($.inArray(termChar, separators) === -1) {\n i++;\n continue;\n }\n var part = term.substr(0, i);\n var partParams = $.extend({}, params, {\n term: part\n });\n var data = createTag(partParams);\n if (data == null) {\n i++;\n continue;\n }\n callback(data);\n\n // Reset the term to not include the tokenized portion\n term = term.substr(i + 1) || '';\n i = 0;\n }\n return {\n term: term\n };\n };\n return Tokenizer;\n });\n S2.define('select2/data/minimumInputLength', [], function () {\n function MinimumInputLength(decorated, $e, options) {\n this.minimumInputLength = options.get('minimumInputLength');\n decorated.call(this, $e, options);\n }\n MinimumInputLength.prototype.query = function (decorated, params, callback) {\n params.term = params.term || '';\n if (params.term.length < this.minimumInputLength) {\n this.trigger('results:message', {\n message: 'inputTooShort',\n args: {\n minimum: this.minimumInputLength,\n input: params.term,\n params: params\n }\n });\n return;\n }\n decorated.call(this, params, callback);\n };\n return MinimumInputLength;\n });\n S2.define('select2/data/maximumInputLength', [], function () {\n function MaximumInputLength(decorated, $e, options) {\n this.maximumInputLength = options.get('maximumInputLength');\n decorated.call(this, $e, options);\n }\n MaximumInputLength.prototype.query = function (decorated, params, callback) {\n params.term = params.term || '';\n if (this.maximumInputLength > 0 && params.term.length > this.maximumInputLength) {\n this.trigger('results:message', {\n message: 'inputTooLong',\n args: {\n maximum: this.maximumInputLength,\n input: params.term,\n params: params\n }\n });\n return;\n }\n decorated.call(this, params, callback);\n };\n return MaximumInputLength;\n });\n S2.define('select2/data/maximumSelectionLength', [], function () {\n function MaximumSelectionLength(decorated, $e, options) {\n this.maximumSelectionLength = options.get('maximumSelectionLength');\n decorated.call(this, $e, options);\n }\n MaximumSelectionLength.prototype.query = function (decorated, params, callback) {\n var self = this;\n this.current(function (currentData) {\n var count = currentData != null ? currentData.length : 0;\n if (self.maximumSelectionLength > 0 && count >= self.maximumSelectionLength) {\n self.trigger('results:message', {\n message: 'maximumSelected',\n args: {\n maximum: self.maximumSelectionLength\n }\n });\n return;\n }\n decorated.call(self, params, callback);\n });\n };\n return MaximumSelectionLength;\n });\n S2.define('select2/dropdown', ['jquery', './utils'], function ($, Utils) {\n function Dropdown($element, options) {\n this.$element = $element;\n this.options = options;\n Dropdown.__super__.constructor.call(this);\n }\n Utils.Extend(Dropdown, Utils.Observable);\n Dropdown.prototype.render = function () {\n var $dropdown = $('<span class=\"select2-dropdown\">' + '<span class=\"select2-results\"></span>' + '</span>');\n $dropdown.attr('dir', this.options.get('dir'));\n this.$dropdown = $dropdown;\n return $dropdown;\n };\n Dropdown.prototype.bind = function () {\n // Should be implemented in subclasses\n };\n Dropdown.prototype.position = function ($dropdown, $container) {\n // Should be implemented in subclasses\n };\n Dropdown.prototype.destroy = function () {\n // Remove the dropdown from the DOM\n this.$dropdown.remove();\n };\n return Dropdown;\n });\n S2.define('select2/dropdown/search', ['jquery', '../utils'], function ($, Utils) {\n function Search() {}\n Search.prototype.render = function (decorated) {\n var $rendered = decorated.call(this);\n var $search = $('<span class=\"select2-search select2-search--dropdown\">' + '<input class=\"select2-search__field\" type=\"search\" tabindex=\"-1\"' + ' autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"none\"' + ' spellcheck=\"false\" role=\"textbox\" />' + '</span>');\n this.$searchContainer = $search;\n this.$search = $search.find('input');\n $rendered.prepend($search);\n return $rendered;\n };\n Search.prototype.bind = function (decorated, container, $container) {\n var self = this;\n decorated.call(this, container, $container);\n this.$search.on('keydown', function (evt) {\n self.trigger('keypress', evt);\n self._keyUpPrevented = evt.isDefaultPrevented();\n });\n\n // Workaround for browsers which do not support the `input` event\n // This will prevent double-triggering of events for browsers which support\n // both the `keyup` and `input` events.\n this.$search.on('input', function (evt) {\n // Unbind the duplicated `keyup` event\n $(this).off('keyup');\n });\n this.$search.on('keyup input', function (evt) {\n self.handleSearch(evt);\n });\n container.on('open', function () {\n self.$search.attr('tabindex', 0);\n self.$search.focus();\n window.setTimeout(function () {\n self.$search.focus();\n }, 0);\n });\n container.on('close', function () {\n self.$search.attr('tabindex', -1);\n self.$search.val('');\n self.$search.blur();\n });\n container.on('focus', function () {\n if (!container.isOpen()) {\n self.$search.focus();\n }\n });\n container.on('results:all', function (params) {\n if (params.query.term == null || params.query.term === '') {\n var showSearch = self.showSearch(params);\n if (showSearch) {\n self.$searchContainer.removeClass('select2-search--hide');\n } else {\n self.$searchContainer.addClass('select2-search--hide');\n }\n }\n });\n };\n Search.prototype.handleSearch = function (evt) {\n if (!this._keyUpPrevented) {\n var input = this.$search.val();\n this.trigger('query', {\n term: input\n });\n }\n this._keyUpPrevented = false;\n };\n Search.prototype.showSearch = function (_, params) {\n return true;\n };\n return Search;\n });\n S2.define('select2/dropdown/hidePlaceholder', [], function () {\n function HidePlaceholder(decorated, $element, options, dataAdapter) {\n this.placeholder = this.normalizePlaceholder(options.get('placeholder'));\n decorated.call(this, $element, options, dataAdapter);\n }\n HidePlaceholder.prototype.append = function (decorated, data) {\n data.results = this.removePlaceholder(data.results);\n decorated.call(this, data);\n };\n HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {\n if (typeof placeholder === 'string') {\n placeholder = {\n id: '',\n text: placeholder\n };\n }\n return placeholder;\n };\n HidePlaceholder.prototype.removePlaceholder = function (_, data) {\n var modifiedData = data.slice(0);\n for (var d = data.length - 1; d >= 0; d--) {\n var item = data[d];\n if (this.placeholder.id === item.id) {\n modifiedData.splice(d, 1);\n }\n }\n return modifiedData;\n };\n return HidePlaceholder;\n });\n S2.define('select2/dropdown/infiniteScroll', ['jquery'], function ($) {\n function InfiniteScroll(decorated, $element, options, dataAdapter) {\n this.lastParams = {};\n decorated.call(this, $element, options, dataAdapter);\n this.$loadingMore = this.createLoadingMore();\n this.loading = false;\n }\n InfiniteScroll.prototype.append = function (decorated, data) {\n this.$loadingMore.remove();\n this.loading = false;\n decorated.call(this, data);\n if (this.showLoadingMore(data)) {\n this.$results.append(this.$loadingMore);\n }\n };\n InfiniteScroll.prototype.bind = function (decorated, container, $container) {\n var self = this;\n decorated.call(this, container, $container);\n container.on('query', function (params) {\n self.lastParams = params;\n self.loading = true;\n });\n container.on('query:append', function (params) {\n self.lastParams = params;\n self.loading = true;\n });\n this.$results.on('scroll', function () {\n var isLoadMoreVisible = $.contains(document.documentElement, self.$loadingMore[0]);\n if (self.loading || !isLoadMoreVisible) {\n return;\n }\n var currentOffset = self.$results.offset().top + self.$results.outerHeight(false);\n var loadingMoreOffset = self.$loadingMore.offset().top + self.$loadingMore.outerHeight(false);\n if (currentOffset + 50 >= loadingMoreOffset) {\n self.loadMore();\n }\n });\n };\n InfiniteScroll.prototype.loadMore = function () {\n this.loading = true;\n var params = $.extend({}, {\n page: 1\n }, this.lastParams);\n params.page++;\n this.trigger('query:append', params);\n };\n InfiniteScroll.prototype.showLoadingMore = function (_, data) {\n return data.pagination && data.pagination.more;\n };\n InfiniteScroll.prototype.createLoadingMore = function () {\n var $option = $('<li ' + 'class=\"select2-results__option select2-results__option--load-more\"' + 'role=\"treeitem\" aria-disabled=\"true\"></li>');\n var message = this.options.get('translations').get('loadingMore');\n $option.html(message(this.lastParams));\n return $option;\n };\n return InfiniteScroll;\n });\n S2.define('select2/dropdown/attachBody', ['jquery', '../utils'], function ($, Utils) {\n function AttachBody(decorated, $element, options) {\n this.$dropdownParent = options.get('dropdownParent') || $(document.body);\n decorated.call(this, $element, options);\n }\n AttachBody.prototype.bind = function (decorated, container, $container) {\n var self = this;\n var setupResultsEvents = false;\n decorated.call(this, container, $container);\n container.on('open', function () {\n self._showDropdown();\n self._attachPositioningHandler(container);\n if (!setupResultsEvents) {\n setupResultsEvents = true;\n container.on('results:all', function () {\n self._positionDropdown();\n self._resizeDropdown();\n });\n container.on('results:append', function () {\n self._positionDropdown();\n self._resizeDropdown();\n });\n }\n });\n container.on('close', function () {\n self._hideDropdown();\n self._detachPositioningHandler(container);\n });\n this.$dropdownContainer.on('mousedown', function (evt) {\n evt.stopPropagation();\n });\n };\n AttachBody.prototype.destroy = function (decorated) {\n decorated.call(this);\n this.$dropdownContainer.remove();\n };\n AttachBody.prototype.position = function (decorated, $dropdown, $container) {\n // Clone all of the container classes\n $dropdown.attr('class', $container.attr('class'));\n $dropdown.removeClass('select2');\n $dropdown.addClass('select2-container--open');\n $dropdown.css({\n position: 'absolute',\n top: -999999\n });\n this.$container = $container;\n };\n AttachBody.prototype.render = function (decorated) {\n var $container = $('<span></span>');\n var $dropdown = decorated.call(this);\n $container.append($dropdown);\n this.$dropdownContainer = $container;\n return $container;\n };\n AttachBody.prototype._hideDropdown = function (decorated) {\n this.$dropdownContainer.detach();\n };\n AttachBody.prototype._attachPositioningHandler = function (decorated, container) {\n var self = this;\n var scrollEvent = 'scroll.select2.' + container.id;\n var resizeEvent = 'resize.select2.' + container.id;\n var orientationEvent = 'orientationchange.select2.' + container.id;\n var $watchers = this.$container.parents().filter(Utils.hasScroll);\n $watchers.each(function () {\n Utils.StoreData(this, 'select2-scroll-position', {\n x: $(this).scrollLeft(),\n y: $(this).scrollTop()\n });\n });\n $watchers.on(scrollEvent, function (ev) {\n var position = Utils.GetData(this, 'select2-scroll-position');\n $(this).scrollTop(position.y);\n });\n $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent, function (e) {\n self._positionDropdown();\n self._resizeDropdown();\n });\n };\n AttachBody.prototype._detachPositioningHandler = function (decorated, container) {\n var scrollEvent = 'scroll.select2.' + container.id;\n var resizeEvent = 'resize.select2.' + container.id;\n var orientationEvent = 'orientationchange.select2.' + container.id;\n var $watchers = this.$container.parents().filter(Utils.hasScroll);\n $watchers.off(scrollEvent);\n $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);\n };\n AttachBody.prototype._positionDropdown = function () {\n var $window = $(window);\n var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');\n var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');\n var newDirection = null;\n var offset = this.$container.offset();\n offset.bottom = offset.top + this.$container.outerHeight(false);\n var container = {\n height: this.$container.outerHeight(false)\n };\n container.top = offset.top;\n container.bottom = offset.top + container.height;\n var dropdown = {\n height: this.$dropdown.outerHeight(false)\n };\n var viewport = {\n top: $window.scrollTop(),\n bottom: $window.scrollTop() + $window.height()\n };\n var enoughRoomAbove = viewport.top < offset.top - dropdown.height;\n var enoughRoomBelow = viewport.bottom > offset.bottom + dropdown.height;\n var css = {\n left: offset.left,\n top: container.bottom\n };\n\n // Determine what the parent element is to use for calculating the offset\n var $offsetParent = this.$dropdownParent;\n\n // For statically positioned elements, we need to get the element\n // that is determining the offset\n if ($offsetParent.css('position') === 'static') {\n $offsetParent = $offsetParent.offsetParent();\n }\n var parentOffset = $offsetParent.offset();\n css.top -= parentOffset.top;\n css.left -= parentOffset.left;\n if (!isCurrentlyAbove && !isCurrentlyBelow) {\n newDirection = 'below';\n }\n if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {\n newDirection = 'above';\n } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {\n newDirection = 'below';\n }\n if (newDirection == 'above' || isCurrentlyAbove && newDirection !== 'below') {\n css.top = container.top - parentOffset.top - dropdown.height;\n }\n if (newDirection != null) {\n this.$dropdown.removeClass('select2-dropdown--below select2-dropdown--above').addClass('select2-dropdown--' + newDirection);\n this.$container.removeClass('select2-container--below select2-container--above').addClass('select2-container--' + newDirection);\n }\n this.$dropdownContainer.css(css);\n };\n AttachBody.prototype._resizeDropdown = function () {\n var css = {\n width: this.$container.outerWidth(false) + 'px'\n };\n if (this.options.get('dropdownAutoWidth')) {\n css.minWidth = css.width;\n css.position = 'relative';\n css.width = 'auto';\n }\n this.$dropdown.css(css);\n };\n AttachBody.prototype._showDropdown = function (decorated) {\n this.$dropdownContainer.appendTo(this.$dropdownParent);\n this._positionDropdown();\n this._resizeDropdown();\n };\n return AttachBody;\n });\n S2.define('select2/dropdown/minimumResultsForSearch', [], function () {\n function countResults(data) {\n var count = 0;\n for (var d = 0; d < data.length; d++) {\n var item = data[d];\n if (item.children) {\n count += countResults(item.children);\n } else {\n count++;\n }\n }\n return count;\n }\n function MinimumResultsForSearch(decorated, $element, options, dataAdapter) {\n this.minimumResultsForSearch = options.get('minimumResultsForSearch');\n if (this.minimumResultsForSearch < 0) {\n this.minimumResultsForSearch = Infinity;\n }\n decorated.call(this, $element, options, dataAdapter);\n }\n MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {\n if (countResults(params.data.results) < this.minimumResultsForSearch) {\n return false;\n }\n return decorated.call(this, params);\n };\n return MinimumResultsForSearch;\n });\n S2.define('select2/dropdown/selectOnClose', ['../utils'], function (Utils) {\n function SelectOnClose() {}\n SelectOnClose.prototype.bind = function (decorated, container, $container) {\n var self = this;\n decorated.call(this, container, $container);\n container.on('close', function (params) {\n self._handleSelectOnClose(params);\n });\n };\n SelectOnClose.prototype._handleSelectOnClose = function (_, params) {\n if (params && params.originalSelect2Event != null) {\n var event = params.originalSelect2Event;\n\n // Don't select an item if the close event was triggered from a select or\n // unselect event\n if (event._type === 'select' || event._type === 'unselect') {\n return;\n }\n }\n var $highlightedResults = this.getHighlightedResults();\n\n // Only select highlighted results\n if ($highlightedResults.length < 1) {\n return;\n }\n var data = Utils.GetData($highlightedResults[0], 'data');\n\n // Don't re-select already selected resulte\n if (data.element != null && data.element.selected || data.element == null && data.selected) {\n return;\n }\n this.trigger('select', {\n data: data\n });\n };\n return SelectOnClose;\n });\n S2.define('select2/dropdown/closeOnSelect', [], function () {\n function CloseOnSelect() {}\n CloseOnSelect.prototype.bind = function (decorated, container, $container) {\n var self = this;\n decorated.call(this, container, $container);\n container.on('select', function (evt) {\n self._selectTriggered(evt);\n });\n container.on('unselect', function (evt) {\n self._selectTriggered(evt);\n });\n };\n CloseOnSelect.prototype._selectTriggered = function (_, evt) {\n var originalEvent = evt.originalEvent;\n\n // Don't close if the control key is being held\n if (originalEvent && originalEvent.ctrlKey) {\n return;\n }\n this.trigger('close', {\n originalEvent: originalEvent,\n originalSelect2Event: evt\n });\n };\n return CloseOnSelect;\n });\n S2.define('select2/i18n/en', [], function () {\n // English\n return {\n errorLoading: function errorLoading() {\n return 'The results could not be loaded.';\n },\n inputTooLong: function inputTooLong(args) {\n var overChars = args.input.length - args.maximum;\n var message = 'Please delete ' + overChars + ' character';\n if (overChars != 1) {\n message += 's';\n }\n return message;\n },\n inputTooShort: function inputTooShort(args) {\n var remainingChars = args.minimum - args.input.length;\n var message = 'Please enter ' + remainingChars + ' or more characters';\n return message;\n },\n loadingMore: function loadingMore() {\n return 'Loading more results…';\n },\n maximumSelected: function maximumSelected(args) {\n var message = 'You can only select ' + args.maximum + ' item';\n if (args.maximum != 1) {\n message += 's';\n }\n return message;\n },\n noResults: function noResults() {\n return 'No results found';\n },\n searching: function searching() {\n return 'Searching…';\n },\n removeAllItems: function removeAllItems() {\n return 'Remove all items';\n }\n };\n });\n S2.define('select2/defaults', ['jquery', 'require', './results', './selection/single', './selection/multiple', './selection/placeholder', './selection/allowClear', './selection/search', './selection/eventRelay', './utils', './translation', './diacritics', './data/select', './data/array', './data/ajax', './data/tags', './data/tokenizer', './data/minimumInputLength', './data/maximumInputLength', './data/maximumSelectionLength', './dropdown', './dropdown/search', './dropdown/hidePlaceholder', './dropdown/infiniteScroll', './dropdown/attachBody', './dropdown/minimumResultsForSearch', './dropdown/selectOnClose', './dropdown/closeOnSelect', './i18n/en'], function ($, require, ResultsList, SingleSelection, MultipleSelection, Placeholder, AllowClear, SelectionSearch, EventRelay, Utils, Translation, DIACRITICS, SelectData, ArrayData, AjaxData, Tags, Tokenizer, MinimumInputLength, MaximumInputLength, MaximumSelectionLength, Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll, AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect, EnglishTranslation) {\n function Defaults() {\n this.reset();\n }\n Defaults.prototype.apply = function (options) {\n options = $.extend(true, {}, this.defaults, options);\n if (options.dataAdapter == null) {\n if (options.ajax != null) {\n options.dataAdapter = AjaxData;\n } else if (options.data != null) {\n options.dataAdapter = ArrayData;\n } else {\n options.dataAdapter = SelectData;\n }\n if (options.minimumInputLength > 0) {\n options.dataAdapter = Utils.Decorate(options.dataAdapter, MinimumInputLength);\n }\n if (options.maximumInputLength > 0) {\n options.dataAdapter = Utils.Decorate(options.dataAdapter, MaximumInputLength);\n }\n if (options.maximumSelectionLength > 0) {\n options.dataAdapter = Utils.Decorate(options.dataAdapter, MaximumSelectionLength);\n }\n if (options.tags) {\n options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);\n }\n if (options.tokenSeparators != null || options.tokenizer != null) {\n options.dataAdapter = Utils.Decorate(options.dataAdapter, Tokenizer);\n }\n if (options.query != null) {\n var Query = require(options.amdBase + 'compat/query');\n options.dataAdapter = Utils.Decorate(options.dataAdapter, Query);\n }\n if (options.initSelection != null) {\n var InitSelection = require(options.amdBase + 'compat/initSelection');\n options.dataAdapter = Utils.Decorate(options.dataAdapter, InitSelection);\n }\n }\n if (options.resultsAdapter == null) {\n options.resultsAdapter = ResultsList;\n if (options.ajax != null) {\n options.resultsAdapter = Utils.Decorate(options.resultsAdapter, InfiniteScroll);\n }\n if (options.placeholder != null) {\n options.resultsAdapter = Utils.Decorate(options.resultsAdapter, HidePlaceholder);\n }\n if (options.selectOnClose) {\n options.resultsAdapter = Utils.Decorate(options.resultsAdapter, SelectOnClose);\n }\n }\n if (options.dropdownAdapter == null) {\n if (options.multiple) {\n options.dropdownAdapter = Dropdown;\n } else {\n var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);\n options.dropdownAdapter = SearchableDropdown;\n }\n if (options.minimumResultsForSearch !== 0) {\n options.dropdownAdapter = Utils.Decorate(options.dropdownAdapter, MinimumResultsForSearch);\n }\n if (options.closeOnSelect) {\n options.dropdownAdapter = Utils.Decorate(options.dropdownAdapter, CloseOnSelect);\n }\n if (options.dropdownCssClass != null || options.dropdownCss != null || options.adaptDropdownCssClass != null) {\n var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');\n options.dropdownAdapter = Utils.Decorate(options.dropdownAdapter, DropdownCSS);\n }\n options.dropdownAdapter = Utils.Decorate(options.dropdownAdapter, AttachBody);\n }\n if (options.selectionAdapter == null) {\n if (options.multiple) {\n options.selectionAdapter = MultipleSelection;\n } else {\n options.selectionAdapter = SingleSelection;\n }\n\n // Add the placeholder mixin if a placeholder was specified\n if (options.placeholder != null) {\n options.selectionAdapter = Utils.Decorate(options.selectionAdapter, Placeholder);\n }\n if (options.allowClear) {\n options.selectionAdapter = Utils.Decorate(options.selectionAdapter, AllowClear);\n }\n if (options.multiple) {\n options.selectionAdapter = Utils.Decorate(options.selectionAdapter, SelectionSearch);\n }\n if (options.containerCssClass != null || options.containerCss != null || options.adaptContainerCssClass != null) {\n var ContainerCSS = require(options.amdBase + 'compat/containerCss');\n options.selectionAdapter = Utils.Decorate(options.selectionAdapter, ContainerCSS);\n }\n options.selectionAdapter = Utils.Decorate(options.selectionAdapter, EventRelay);\n }\n if (typeof options.language === 'string') {\n // Check if the language is specified with a region\n if (options.language.indexOf('-') > 0) {\n // Extract the region information if it is included\n var languageParts = options.language.split('-');\n var baseLanguage = languageParts[0];\n options.language = [options.language, baseLanguage];\n } else {\n options.language = [options.language];\n }\n }\n if ($.isArray(options.language)) {\n var languages = new Translation();\n options.language.push('en');\n var languageNames = options.language;\n for (var l = 0; l < languageNames.length; l++) {\n var name = languageNames[l];\n var language = {};\n try {\n // Try to load it with the original name\n language = Translation.loadPath(name);\n } catch (e) {\n try {\n // If we couldn't load it, check if it wasn't the full path\n name = this.defaults.amdLanguageBase + name;\n language = Translation.loadPath(name);\n } catch (ex) {\n // The translation could not be loaded at all. Sometimes this is\n // because of a configuration problem, other times this can be\n // because of how Select2 helps load all possible translation files.\n if (options.debug && window.console && console.warn) {\n console.warn('Select2: The language file for \"' + name + '\" could not be ' + 'automatically loaded. A fallback will be used instead.');\n }\n continue;\n }\n }\n languages.extend(language);\n }\n options.translations = languages;\n } else {\n var baseTranslation = Translation.loadPath(this.defaults.amdLanguageBase + 'en');\n var customTranslation = new Translation(options.language);\n customTranslation.extend(baseTranslation);\n options.translations = customTranslation;\n }\n return options;\n };\n Defaults.prototype.reset = function () {\n function stripDiacritics(text) {\n // Used 'uni range + named function' from http://jsperf.com/diacritics/18\n function match(a) {\n return DIACRITICS[a] || a;\n }\n return text.replace(/[^\\u0000-\\u007E]/g, match);\n }\n function matcher(params, data) {\n // Always return the object if there is nothing to compare\n if ($.trim(params.term) === '') {\n return data;\n }\n\n // Do a recursive check for options with children\n if (data.children && data.children.length > 0) {\n // Clone the data object if there are children\n // This is required as we modify the object to remove any non-matches\n var match = $.extend(true, {}, data);\n\n // Check each child of the option\n for (var c = data.children.length - 1; c >= 0; c--) {\n var child = data.children[c];\n var matches = matcher(params, child);\n\n // If there wasn't a match, remove the object in the array\n if (matches == null) {\n match.children.splice(c, 1);\n }\n }\n\n // If any children matched, return the new object\n if (match.children.length > 0) {\n return match;\n }\n\n // If there were no matching children, check just the plain object\n return matcher(params, match);\n }\n var original = stripDiacritics(data.text).toUpperCase();\n var term = stripDiacritics(params.term).toUpperCase();\n\n // Check if the text contains the term\n if (original.indexOf(term) > -1) {\n return data;\n }\n\n // If it doesn't contain the term, don't return anything\n return null;\n }\n this.defaults = {\n amdBase: './',\n amdLanguageBase: './i18n/',\n closeOnSelect: true,\n debug: false,\n dropdownAutoWidth: false,\n escapeMarkup: Utils.escapeMarkup,\n language: EnglishTranslation,\n matcher: matcher,\n minimumInputLength: 0,\n maximumInputLength: 0,\n maximumSelectionLength: 0,\n minimumResultsForSearch: 0,\n selectOnClose: false,\n scrollAfterSelect: false,\n sorter: function sorter(data) {\n return data;\n },\n templateResult: function templateResult(result) {\n return result.text;\n },\n templateSelection: function templateSelection(selection) {\n return selection.text;\n },\n theme: 'default',\n width: 'resolve'\n };\n };\n Defaults.prototype.set = function (key, value) {\n var camelKey = $.camelCase(key);\n var data = {};\n data[camelKey] = value;\n var convertedData = Utils._convertData(data);\n $.extend(true, this.defaults, convertedData);\n };\n var defaults = new Defaults();\n return defaults;\n });\n S2.define('select2/options', ['require', 'jquery', './defaults', './utils'], function (require, $, Defaults, Utils) {\n function Options(options, $element) {\n this.options = options;\n if ($element != null) {\n this.fromElement($element);\n }\n this.options = Defaults.apply(this.options);\n if ($element && $element.is('input')) {\n var InputCompat = require(this.get('amdBase') + 'compat/inputData');\n this.options.dataAdapter = Utils.Decorate(this.options.dataAdapter, InputCompat);\n }\n }\n Options.prototype.fromElement = function ($e) {\n var excludedData = ['select2'];\n if (this.options.multiple == null) {\n this.options.multiple = $e.prop('multiple');\n }\n if (this.options.disabled == null) {\n this.options.disabled = $e.prop('disabled');\n }\n if (this.options.language == null) {\n if ($e.prop('lang')) {\n this.options.language = $e.prop('lang').toLowerCase();\n } else if ($e.closest('[lang]').prop('lang')) {\n this.options.language = $e.closest('[lang]').prop('lang');\n }\n }\n if (this.options.dir == null) {\n if ($e.prop('dir')) {\n this.options.dir = $e.prop('dir');\n } else if ($e.closest('[dir]').prop('dir')) {\n this.options.dir = $e.closest('[dir]').prop('dir');\n } else {\n this.options.dir = 'ltr';\n }\n }\n $e.prop('disabled', this.options.disabled);\n $e.prop('multiple', this.options.multiple);\n if (Utils.GetData($e[0], 'select2Tags')) {\n if (this.options.debug && window.console && console.warn) {\n console.warn('Select2: The `data-select2-tags` attribute has been changed to ' + 'use the `data-data` and `data-tags=\"true\"` attributes and will be ' + 'removed in future versions of Select2.');\n }\n Utils.StoreData($e[0], 'data', Utils.GetData($e[0], 'select2Tags'));\n Utils.StoreData($e[0], 'tags', true);\n }\n if (Utils.GetData($e[0], 'ajaxUrl')) {\n if (this.options.debug && window.console && console.warn) {\n console.warn('Select2: The `data-ajax-url` attribute has been changed to ' + '`data-ajax--url` and support for the old attribute will be removed' + ' in future versions of Select2.');\n }\n $e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl'));\n Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl'));\n }\n var dataset = {};\n function upperCaseLetter(_, letter) {\n return letter.toUpperCase();\n }\n\n // Pre-load all of the attributes which are prefixed with `data-`\n for (var attr = 0; attr < $e[0].attributes.length; attr++) {\n var attributeName = $e[0].attributes[attr].name;\n var prefix = 'data-';\n if (attributeName.substr(0, prefix.length) == prefix) {\n // Get the contents of the attribute after `data-`\n var dataName = attributeName.substring(prefix.length);\n\n // Get the data contents from the consistent source\n // This is more than likely the jQuery data helper\n var dataValue = Utils.GetData($e[0], dataName);\n\n // camelCase the attribute name to match the spec\n var camelDataName = dataName.replace(/-([a-z])/g, upperCaseLetter);\n\n // Store the data attribute contents into the dataset since\n dataset[camelDataName] = dataValue;\n }\n }\n\n // Prefer the element's `dataset` attribute if it exists\n // jQuery 1.x does not correctly handle data attributes with multiple dashes\n if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {\n dataset = $.extend(true, {}, $e[0].dataset, dataset);\n }\n\n // Prefer our internal data cache if it exists\n var data = $.extend(true, {}, Utils.GetData($e[0]), dataset);\n data = Utils._convertData(data);\n for (var key in data) {\n if ($.inArray(key, excludedData) > -1) {\n continue;\n }\n if ($.isPlainObject(this.options[key])) {\n $.extend(this.options[key], data[key]);\n } else {\n this.options[key] = data[key];\n }\n }\n return this;\n };\n Options.prototype.get = function (key) {\n return this.options[key];\n };\n Options.prototype.set = function (key, val) {\n this.options[key] = val;\n };\n return Options;\n });\n S2.define('select2/core', ['jquery', './options', './utils', './keys'], function ($, Options, Utils, KEYS) {\n var Select2 = function Select2($element, options) {\n if (Utils.GetData($element[0], 'select2') != null) {\n Utils.GetData($element[0], 'select2').destroy();\n }\n this.$element = $element;\n this.id = this._generateId($element);\n options = options || {};\n this.options = new Options(options, $element);\n Select2.__super__.constructor.call(this);\n\n // Set up the tabindex\n\n var tabindex = $element.attr('tabindex') || 0;\n Utils.StoreData($element[0], 'old-tabindex', tabindex);\n $element.attr('tabindex', '-1');\n\n // Set up containers and adapters\n\n var DataAdapter = this.options.get('dataAdapter');\n this.dataAdapter = new DataAdapter($element, this.options);\n var $container = this.render();\n this._placeContainer($container);\n var SelectionAdapter = this.options.get('selectionAdapter');\n this.selection = new SelectionAdapter($element, this.options);\n this.$selection = this.selection.render();\n this.selection.position(this.$selection, $container);\n var DropdownAdapter = this.options.get('dropdownAdapter');\n this.dropdown = new DropdownAdapter($element, this.options);\n this.$dropdown = this.dropdown.render();\n this.dropdown.position(this.$dropdown, $container);\n var ResultsAdapter = this.options.get('resultsAdapter');\n this.results = new ResultsAdapter($element, this.options, this.dataAdapter);\n this.$results = this.results.render();\n this.results.position(this.$results, this.$dropdown);\n\n // Bind events\n\n var self = this;\n\n // Bind the container to all of the adapters\n this._bindAdapters();\n\n // Register any DOM event handlers\n this._registerDomEvents();\n\n // Register any internal event handlers\n this._registerDataEvents();\n this._registerSelectionEvents();\n this._registerDropdownEvents();\n this._registerResultsEvents();\n this._registerEvents();\n\n // Set the initial state\n this.dataAdapter.current(function (initialData) {\n self.trigger('selection:update', {\n data: initialData\n });\n });\n\n // Hide the original select\n $element.addClass('select2-hidden-accessible');\n $element.attr('aria-hidden', 'true');\n\n // Synchronize any monitored attributes\n this._syncAttributes();\n Utils.StoreData($element[0], 'select2', this);\n\n // Ensure backwards compatibility with $element.data('select2').\n $element.data('select2', this);\n };\n Utils.Extend(Select2, Utils.Observable);\n Select2.prototype._generateId = function ($element) {\n var id = '';\n if ($element.attr('id') != null) {\n id = $element.attr('id');\n } else if ($element.attr('name') != null) {\n id = $element.attr('name') + '-' + Utils.generateChars(2);\n } else {\n id = Utils.generateChars(4);\n }\n id = id.replace(/(:|\\.|\\[|\\]|,)/g, '');\n id = 'select2-' + id;\n return id;\n };\n Select2.prototype._placeContainer = function ($container) {\n $container.insertAfter(this.$element);\n var width = this._resolveWidth(this.$element, this.options.get('width'));\n if (width != null) {\n $container.css('width', width);\n }\n };\n Select2.prototype._resolveWidth = function ($element, method) {\n var WIDTH = /^width:(([-+]?([0-9]*\\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;\n if (method == 'resolve') {\n var styleWidth = this._resolveWidth($element, 'style');\n if (styleWidth != null) {\n return styleWidth;\n }\n return this._resolveWidth($element, 'element');\n }\n if (method == 'element') {\n var elementWidth = $element.outerWidth(false);\n if (elementWidth <= 0) {\n return 'auto';\n }\n return elementWidth + 'px';\n }\n if (method == 'style') {\n var style = $element.attr('style');\n if (typeof style !== 'string') {\n return null;\n }\n var attrs = style.split(';');\n for (var i = 0, l = attrs.length; i < l; i = i + 1) {\n var attr = attrs[i].replace(/\\s/g, '');\n var matches = attr.match(WIDTH);\n if (matches !== null && matches.length >= 1) {\n return matches[1];\n }\n }\n return null;\n }\n return method;\n };\n Select2.prototype._bindAdapters = function () {\n this.dataAdapter.bind(this, this.$container);\n this.selection.bind(this, this.$container);\n this.dropdown.bind(this, this.$container);\n this.results.bind(this, this.$container);\n };\n Select2.prototype._registerDomEvents = function () {\n var self = this;\n this.$element.on('change.select2', function () {\n self.dataAdapter.current(function (data) {\n self.trigger('selection:update', {\n data: data\n });\n });\n });\n this.$element.on('focus.select2', function (evt) {\n self.trigger('focus', evt);\n });\n this._syncA = Utils.bind(this._syncAttributes, this);\n this._syncS = Utils.bind(this._syncSubtree, this);\n if (this.$element[0].attachEvent) {\n this.$element[0].attachEvent('onpropertychange', this._syncA);\n }\n var observer = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;\n if (observer != null) {\n this._observer = new observer(function (mutations) {\n $.each(mutations, self._syncA);\n $.each(mutations, self._syncS);\n });\n this._observer.observe(this.$element[0], {\n attributes: true,\n childList: true,\n subtree: false\n });\n } else if (this.$element[0].addEventListener) {\n this.$element[0].addEventListener('DOMAttrModified', self._syncA, false);\n this.$element[0].addEventListener('DOMNodeInserted', self._syncS, false);\n this.$element[0].addEventListener('DOMNodeRemoved', self._syncS, false);\n }\n };\n Select2.prototype._registerDataEvents = function () {\n var self = this;\n this.dataAdapter.on('*', function (name, params) {\n self.trigger(name, params);\n });\n };\n Select2.prototype._registerSelectionEvents = function () {\n var self = this;\n var nonRelayEvents = ['toggle', 'focus'];\n this.selection.on('toggle', function () {\n self.toggleDropdown();\n });\n this.selection.on('focus', function (params) {\n self.focus(params);\n });\n this.selection.on('*', function (name, params) {\n if ($.inArray(name, nonRelayEvents) !== -1) {\n return;\n }\n self.trigger(name, params);\n });\n };\n Select2.prototype._registerDropdownEvents = function () {\n var self = this;\n this.dropdown.on('*', function (name, params) {\n self.trigger(name, params);\n });\n };\n Select2.prototype._registerResultsEvents = function () {\n var self = this;\n this.results.on('*', function (name, params) {\n self.trigger(name, params);\n });\n };\n Select2.prototype._registerEvents = function () {\n var self = this;\n this.on('focus', function () {\n self.$container.addClass('select2-container--focus');\n if (!self.$container.hasClass('select2-container--disabled') && !self.isOpen()) {\n if (self.options.get('multiple')) {\n window.setTimeout(function () {\n self.open();\n }, self.options.get('ajax') ? 300 : 100);\n } else {\n self.open();\n }\n }\n });\n this.on('open', function () {\n self.$container.addClass('select2-container--open');\n });\n this.on('close', function () {\n self.$container.removeClass('select2-container--open');\n });\n this.on('enable', function () {\n self.$container.removeClass('select2-container--disabled');\n });\n this.on('disable', function () {\n self.$container.addClass('select2-container--disabled');\n });\n this.on('blur', function () {\n self.$container.removeClass('select2-container--focus');\n });\n this.on('query', function (params) {\n if (!self.isOpen()) {\n self.trigger('open', {});\n }\n this.dataAdapter.query(params, function (data) {\n self.trigger('results:all', {\n data: data,\n query: params\n });\n });\n });\n this.on('query:append', function (params) {\n this.dataAdapter.query(params, function (data) {\n self.trigger('results:append', {\n data: data,\n query: params\n });\n });\n });\n this.on('keypress', function (evt) {\n var key = evt.which;\n if (self.isOpen()) {\n if (key === KEYS.ESC || key === KEYS.TAB || key === KEYS.UP && evt.altKey) {\n self.close();\n evt.preventDefault();\n } else if (key === KEYS.ENTER) {\n self.trigger('results:select', {});\n evt.preventDefault();\n } else if (key === KEYS.SPACE && evt.ctrlKey) {\n self.trigger('results:toggle', {});\n evt.preventDefault();\n } else if (key === KEYS.UP) {\n self.trigger('results:previous', {});\n evt.preventDefault();\n } else if (key === KEYS.DOWN) {\n self.trigger('results:next', {});\n evt.preventDefault();\n }\n } else {\n if (key === KEYS.ENTER || key === KEYS.SPACE || key === KEYS.DOWN && evt.altKey) {\n self.open();\n evt.preventDefault();\n }\n }\n });\n };\n Select2.prototype._syncAttributes = function () {\n this.options.set('disabled', this.$element.prop('disabled'));\n if (this.options.get('disabled')) {\n if (this.isOpen()) {\n this.close();\n }\n this.trigger('disable', {});\n } else {\n this.trigger('enable', {});\n }\n };\n Select2.prototype._syncSubtree = function (evt, mutations) {\n var changed = false;\n var self = this;\n\n // Ignore any mutation events raised for elements that aren't options or\n // optgroups. This handles the case when the select element is destroyed\n if (evt && evt.target && evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP') {\n return;\n }\n if (!mutations) {\n // If mutation events aren't supported, then we can only assume that the\n // change affected the selections\n changed = true;\n } else if (mutations.addedNodes && mutations.addedNodes.length > 0) {\n for (var n = 0; n < mutations.addedNodes.length; n++) {\n var node = mutations.addedNodes[n];\n if (node.selected) {\n changed = true;\n }\n }\n } else if (mutations.removedNodes && mutations.removedNodes.length > 0) {\n changed = true;\n }\n\n // Only re-pull the data if we think there is a change\n if (changed) {\n this.dataAdapter.current(function (currentData) {\n self.trigger('selection:update', {\n data: currentData\n });\n });\n }\n };\n\n /**\n * Override the trigger method to automatically trigger pre-events when\n * there are events that can be prevented.\n */\n Select2.prototype.trigger = function (name, args) {\n var actualTrigger = Select2.__super__.trigger;\n var preTriggerMap = {\n 'open': 'opening',\n 'close': 'closing',\n 'select': 'selecting',\n 'unselect': 'unselecting',\n 'clear': 'clearing'\n };\n if (args === undefined) {\n args = {};\n }\n if (name in preTriggerMap) {\n var preTriggerName = preTriggerMap[name];\n var preTriggerArgs = {\n prevented: false,\n name: name,\n args: args\n };\n actualTrigger.call(this, preTriggerName, preTriggerArgs);\n if (preTriggerArgs.prevented) {\n args.prevented = true;\n return;\n }\n }\n actualTrigger.call(this, name, args);\n };\n Select2.prototype.toggleDropdown = function () {\n if (this.options.get('disabled')) {\n return;\n }\n if (this.isOpen()) {\n this.close();\n } else {\n this.open();\n }\n };\n Select2.prototype.open = function () {\n if (this.isOpen()) {\n return;\n }\n this.trigger('query', {});\n };\n Select2.prototype.close = function () {\n if (!this.isOpen()) {\n return;\n }\n this.trigger('close', {});\n };\n Select2.prototype.isOpen = function () {\n return this.$container.hasClass('select2-container--open');\n };\n Select2.prototype.hasFocus = function () {\n return this.$container.hasClass('select2-container--focus');\n };\n Select2.prototype.focus = function (data) {\n // No need to re-trigger focus events if we are already focused\n if (this.hasFocus()) {\n return;\n }\n this.$container.addClass('select2-container--focus');\n this.trigger('focus', {});\n };\n Select2.prototype.enable = function (args) {\n if (this.options.get('debug') && window.console && console.warn) {\n console.warn('Select2: The `select2(\"enable\")` method has been deprecated and will' + ' be removed in later Select2 versions. Use $element.prop(\"disabled\")' + ' instead.');\n }\n if (args == null || args.length === 0) {\n args = [true];\n }\n var disabled = !args[0];\n this.$element.prop('disabled', disabled);\n };\n Select2.prototype.data = function () {\n if (this.options.get('debug') && arguments.length > 0 && window.console && console.warn) {\n console.warn('Select2: Data can no longer be set using `select2(\"data\")`. You ' + 'should consider setting the value instead using `$element.val()`.');\n }\n var data = [];\n this.dataAdapter.current(function (currentData) {\n data = currentData;\n });\n return data;\n };\n Select2.prototype.val = function (args) {\n if (this.options.get('debug') && window.console && console.warn) {\n console.warn('Select2: The `select2(\"val\")` method has been deprecated and will be' + ' removed in later Select2 versions. Use $element.val() instead.');\n }\n if (args == null || args.length === 0) {\n return this.$element.val();\n }\n var newVal = args[0];\n if ($.isArray(newVal)) {\n newVal = $.map(newVal, function (obj) {\n return obj.toString();\n });\n }\n this.$element.val(newVal).trigger('change');\n };\n Select2.prototype.destroy = function () {\n this.$container.remove();\n if (this.$element[0].detachEvent) {\n this.$element[0].detachEvent('onpropertychange', this._syncA);\n }\n if (this._observer != null) {\n this._observer.disconnect();\n this._observer = null;\n } else if (this.$element[0].removeEventListener) {\n this.$element[0].removeEventListener('DOMAttrModified', this._syncA, false);\n this.$element[0].removeEventListener('DOMNodeInserted', this._syncS, false);\n this.$element[0].removeEventListener('DOMNodeRemoved', this._syncS, false);\n }\n this._syncA = null;\n this._syncS = null;\n this.$element.off('.select2');\n this.$element.attr('tabindex', Utils.GetData(this.$element[0], 'old-tabindex'));\n this.$element.removeClass('select2-hidden-accessible');\n this.$element.attr('aria-hidden', 'false');\n Utils.RemoveData(this.$element[0]);\n this.$element.removeData('select2');\n this.dataAdapter.destroy();\n this.selection.destroy();\n this.dropdown.destroy();\n this.results.destroy();\n this.dataAdapter = null;\n this.selection = null;\n this.dropdown = null;\n this.results = null;\n };\n Select2.prototype.render = function () {\n var $container = $('<span class=\"select2 select2-container\">' + '<span class=\"selection\"></span>' + '<span class=\"dropdown-wrapper\" aria-hidden=\"true\"></span>' + '</span>');\n $container.attr('dir', this.options.get('dir'));\n this.$container = $container;\n this.$container.addClass('select2-container--' + this.options.get('theme'));\n Utils.StoreData($container[0], 'element', this.$element);\n return $container;\n };\n return Select2;\n });\n S2.define('jquery-mousewheel', ['jquery'], function ($) {\n // Used to shim jQuery.mousewheel for non-full builds.\n return $;\n });\n S2.define('jquery.select2', ['jquery', 'jquery-mousewheel', './select2/core', './select2/defaults', './select2/utils'], function ($, _, Select2, Defaults, Utils) {\n if ($.fn.select2 == null) {\n // All methods that should return the element\n var thisMethods = ['open', 'close', 'destroy'];\n $.fn.select2 = function (options) {\n options = options || {};\n if (_typeof(options) === 'object') {\n this.each(function () {\n var instanceOptions = $.extend(true, {}, options);\n var instance = new Select2($(this), instanceOptions);\n });\n return this;\n } else if (typeof options === 'string') {\n var ret;\n var args = Array.prototype.slice.call(arguments, 1);\n this.each(function () {\n var instance = Utils.GetData(this, 'select2');\n if (instance == null && window.console && console.error) {\n console.error('The select2(\\'' + options + '\\') method was called on an ' + 'element that is not using Select2.');\n }\n ret = instance[options].apply(instance, args);\n });\n\n // Check if we should be returning `this`\n if ($.inArray(options, thisMethods) > -1) {\n return this;\n }\n return ret;\n } else {\n throw new Error('Invalid arguments for Select2: ' + options);\n }\n };\n }\n if ($.fn.select2.defaults == null) {\n $.fn.select2.defaults = Defaults;\n }\n return Select2;\n });\n\n // Return the AMD loader configuration so it can be used outside of this file\n return {\n define: S2.define,\n require: S2.require\n };\n }();\n\n // Autoload the jQuery bindings\n // We know that all of the modules exist above this, so we're safe\n var select2 = S2.require('jquery.select2');\n\n // Hold the AMD module references on the jQuery function that was just loaded\n // This allows Select2 to use the internal loader outside of this file, such\n // as in the language files.\n jQuery.fn.select2.amd = S2;\n\n // Return the Select2 instance for anyone who is importing it.\n return select2;\n});","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/*! version : 4.17.47\n =========================================================\n bootstrap-datetimejs\n https://github.com/Eonasdan/bootstrap-datetimepicker\n Copyright (c) 2015 Jonathan Peterson\n =========================================================\n */\n/*\n The MIT License (MIT)\n\n Copyright (c) 2015 Jonathan Peterson\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n */\n/*global define:false */\n/*global exports:false */\n/*global require:false */\n/*global jQuery:false */\n/*global moment:false */\n(function (factory) {\n 'use strict';\n\n if (typeof define === 'function' && define.amd) {\n // AMD is used - Register as an anonymous module.\n define(['jquery', 'moment'], factory);\n } else if ((typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object') {\n module.exports = factory(require('jquery'), require('moment'));\n } else {\n // Neither AMD nor CommonJS used. Use global variables.\n if (typeof jQuery === 'undefined') {\n throw 'bootstrap-datetimepicker requires jQuery to be loaded first';\n }\n if (typeof moment === 'undefined') {\n throw 'bootstrap-datetimepicker requires Moment.js to be loaded first';\n }\n factory(jQuery, moment);\n }\n})(function ($, moment) {\n 'use strict';\n\n if (!moment) {\n throw new Error('bootstrap-datetimepicker requires Moment.js to be loaded first');\n }\n var dateTimePicker = function dateTimePicker(element, options) {\n var picker = {},\n date,\n viewDate,\n unset = true,\n input,\n component = false,\n widget = false,\n use24Hours,\n minViewModeNumber = 0,\n actualFormat,\n parseFormats,\n currentViewMode,\n datePickerModes = [{\n clsName: 'days',\n navFnc: 'M',\n navStep: 1\n }, {\n clsName: 'months',\n navFnc: 'y',\n navStep: 1\n }, {\n clsName: 'years',\n navFnc: 'y',\n navStep: 10\n }, {\n clsName: 'decades',\n navFnc: 'y',\n navStep: 100\n }],\n viewModes = ['days', 'months', 'years', 'decades'],\n verticalModes = ['top', 'bottom', 'auto'],\n horizontalModes = ['left', 'right', 'auto'],\n toolbarPlacements = ['default', 'top', 'bottom'],\n keyMap = {\n 'up': 38,\n 38: 'up',\n 'down': 40,\n 40: 'down',\n 'left': 37,\n 37: 'left',\n 'right': 39,\n 39: 'right',\n 'tab': 9,\n 9: 'tab',\n 'escape': 27,\n 27: 'escape',\n 'enter': 13,\n 13: 'enter',\n 'pageUp': 33,\n 33: 'pageUp',\n 'pageDown': 34,\n 34: 'pageDown',\n 'shift': 16,\n 16: 'shift',\n 'control': 17,\n 17: 'control',\n 'space': 32,\n 32: 'space',\n 't': 84,\n 84: 't',\n 'delete': 46,\n 46: 'delete'\n },\n keyState = {},\n /********************************************************************************\n *\n * Private functions\n *\n ********************************************************************************/\n\n hasTimeZone = function hasTimeZone() {\n return moment.tz !== undefined && options.timeZone !== undefined && options.timeZone !== null && options.timeZone !== '';\n },\n getMoment = function getMoment(d) {\n var returnMoment;\n if (d === undefined || d === null) {\n returnMoment = moment(); //TODO should this use format? and locale?\n } else if (moment.isDate(d) || moment.isMoment(d)) {\n // If the date that is passed in is already a Date() or moment() object,\n // pass it directly to moment.\n returnMoment = moment(d);\n } else if (hasTimeZone()) {\n // There is a string to parse and a default time zone\n // parse with the tz function which takes a default time zone if it is not in the format string\n returnMoment = moment.tz(d, parseFormats, options.useStrict, options.timeZone);\n } else {\n returnMoment = moment(d, parseFormats, options.useStrict);\n }\n if (hasTimeZone()) {\n returnMoment.tz(options.timeZone);\n }\n return returnMoment;\n },\n isEnabled = function isEnabled(granularity) {\n if (typeof granularity !== 'string' || granularity.length > 1) {\n throw new TypeError('isEnabled expects a single character string parameter');\n }\n switch (granularity) {\n case 'y':\n return actualFormat.indexOf('Y') !== -1;\n case 'M':\n return actualFormat.indexOf('M') !== -1;\n case 'd':\n return actualFormat.toLowerCase().indexOf('d') !== -1;\n case 'h':\n case 'H':\n return actualFormat.toLowerCase().indexOf('h') !== -1;\n case 'm':\n return actualFormat.indexOf('m') !== -1;\n case 's':\n return actualFormat.indexOf('s') !== -1;\n default:\n return false;\n }\n },\n hasTime = function hasTime() {\n return isEnabled('h') || isEnabled('m') || isEnabled('s');\n },\n hasDate = function hasDate() {\n return isEnabled('y') || isEnabled('M') || isEnabled('d');\n },\n getDatePickerTemplate = function getDatePickerTemplate() {\n var headTemplate = $('<thead>').append($('<tr>').append($('<th>').addClass('prev').attr('data-action', 'previous').append($('<i>').addClass(options.icons.previous))).append($('<th>').addClass('picker-switch').attr('data-action', 'pickerSwitch').attr('colspan', options.calendarWeeks ? '6' : '5')).append($('<th>').addClass('next').attr('data-action', 'next').append($('<i>').addClass(options.icons.next)))),\n contTemplate = $('<tbody>').append($('<tr>').append($('<td>').attr('colspan', options.calendarWeeks ? '8' : '7')));\n return [$('<div>').addClass('datepicker-days').append($('<table>').addClass('table-condensed').append(headTemplate).append($('<tbody>'))), $('<div>').addClass('datepicker-months').append($('<table>').addClass('table-condensed').append(headTemplate.clone()).append(contTemplate.clone())), $('<div>').addClass('datepicker-years').append($('<table>').addClass('table-condensed').append(headTemplate.clone()).append(contTemplate.clone())), $('<div>').addClass('datepicker-decades').append($('<table>').addClass('table-condensed').append(headTemplate.clone()).append(contTemplate.clone()))];\n },\n getTimePickerMainTemplate = function getTimePickerMainTemplate() {\n var topRow = $('<tr>'),\n middleRow = $('<tr>'),\n bottomRow = $('<tr>');\n if (isEnabled('h')) {\n topRow.append($('<td>').append($('<a>').attr({\n href: '#',\n tabindex: '-1',\n 'title': options.tooltips.incrementHour\n }).addClass('btn').attr('data-action', 'incrementHours').append($('<i>').addClass(options.icons.up))));\n middleRow.append($('<td>').append($('<span>').addClass('timepicker-hour').attr({\n 'data-time-component': 'hours',\n 'title': options.tooltips.pickHour\n }).attr('data-action', 'showHours')));\n bottomRow.append($('<td>').append($('<a>').attr({\n href: '#',\n tabindex: '-1',\n 'title': options.tooltips.decrementHour\n }).addClass('btn').attr('data-action', 'decrementHours').append($('<i>').addClass(options.icons.down))));\n }\n if (isEnabled('m')) {\n if (isEnabled('h')) {\n topRow.append($('<td>').addClass('separator'));\n middleRow.append($('<td>').addClass('separator').html(':'));\n bottomRow.append($('<td>').addClass('separator'));\n }\n topRow.append($('<td>').append($('<a>').attr({\n href: '#',\n tabindex: '-1',\n 'title': options.tooltips.incrementMinute\n }).addClass('btn').attr('data-action', 'incrementMinutes').append($('<i>').addClass(options.icons.up))));\n middleRow.append($('<td>').append($('<span>').addClass('timepicker-minute').attr({\n 'data-time-component': 'minutes',\n 'title': options.tooltips.pickMinute\n }).attr('data-action', 'showMinutes')));\n bottomRow.append($('<td>').append($('<a>').attr({\n href: '#',\n tabindex: '-1',\n 'title': options.tooltips.decrementMinute\n }).addClass('btn').attr('data-action', 'decrementMinutes').append($('<i>').addClass(options.icons.down))));\n }\n if (isEnabled('s')) {\n if (isEnabled('m')) {\n topRow.append($('<td>').addClass('separator'));\n middleRow.append($('<td>').addClass('separator').html(':'));\n bottomRow.append($('<td>').addClass('separator'));\n }\n topRow.append($('<td>').append($('<a>').attr({\n href: '#',\n tabindex: '-1',\n 'title': options.tooltips.incrementSecond\n }).addClass('btn').attr('data-action', 'incrementSeconds').append($('<i>').addClass(options.icons.up))));\n middleRow.append($('<td>').append($('<span>').addClass('timepicker-second').attr({\n 'data-time-component': 'seconds',\n 'title': options.tooltips.pickSecond\n }).attr('data-action', 'showSeconds')));\n bottomRow.append($('<td>').append($('<a>').attr({\n href: '#',\n tabindex: '-1',\n 'title': options.tooltips.decrementSecond\n }).addClass('btn').attr('data-action', 'decrementSeconds').append($('<i>').addClass(options.icons.down))));\n }\n if (!use24Hours) {\n topRow.append($('<td>').addClass('separator'));\n middleRow.append($('<td>').append($('<button>').addClass('btn btn-primary').attr({\n 'data-action': 'togglePeriod',\n tabindex: '-1',\n 'title': options.tooltips.togglePeriod\n })));\n bottomRow.append($('<td>').addClass('separator'));\n }\n return $('<div>').addClass('timepicker-picker').append($('<table>').addClass('table-condensed').append([topRow, middleRow, bottomRow]));\n },\n getTimePickerTemplate = function getTimePickerTemplate() {\n var hoursView = $('<div>').addClass('timepicker-hours').append($('<table>').addClass('table-condensed')),\n minutesView = $('<div>').addClass('timepicker-minutes').append($('<table>').addClass('table-condensed')),\n secondsView = $('<div>').addClass('timepicker-seconds').append($('<table>').addClass('table-condensed')),\n ret = [getTimePickerMainTemplate()];\n if (isEnabled('h')) {\n ret.push(hoursView);\n }\n if (isEnabled('m')) {\n ret.push(minutesView);\n }\n if (isEnabled('s')) {\n ret.push(secondsView);\n }\n return ret;\n },\n getToolbar = function getToolbar() {\n var row = [];\n if (options.showTodayButton) {\n row.push($('<td>').append($('<a>').attr({\n 'data-action': 'today',\n 'title': options.tooltips.today\n }).append($('<i>').addClass(options.icons.today))));\n }\n if (!options.sideBySide && hasDate() && hasTime()) {\n row.push($('<td>').append($('<a>').attr({\n 'data-action': 'togglePicker',\n 'title': options.tooltips.selectTime\n }).append($('<i>').addClass(options.icons.time))));\n }\n if (options.showClear) {\n row.push($('<td>').append($('<a>').attr({\n 'data-action': 'clear',\n 'title': options.tooltips.clear\n }).append($('<i>').addClass(options.icons.clear))));\n }\n if (options.showClose) {\n row.push($('<td>').append($('<a>').attr({\n 'data-action': 'close',\n 'title': options.tooltips.close\n }).append($('<i>').addClass(options.icons.close))));\n }\n return $('<table>').addClass('table-condensed').append($('<tbody>').append($('<tr>').append(row)));\n },\n getTemplate = function getTemplate() {\n var template = $('<div>').addClass('bootstrap-datetimepicker-widget dropdown-menu'),\n dateView = $('<div>').addClass('datepicker').append(getDatePickerTemplate()),\n timeView = $('<div>').addClass('timepicker').append(getTimePickerTemplate()),\n content = $('<ul>').addClass('list-unstyled'),\n toolbar = $('<li>').addClass('picker-switch' + (options.collapse ? ' accordion-toggle' : '')).append(getToolbar());\n if (options.inline) {\n template.removeClass('dropdown-menu');\n }\n if (use24Hours) {\n template.addClass('usetwentyfour');\n }\n if (isEnabled('s') && !use24Hours) {\n template.addClass('wider');\n }\n if (options.sideBySide && hasDate() && hasTime()) {\n template.addClass('timepicker-sbs');\n if (options.toolbarPlacement === 'top') {\n template.append(toolbar);\n }\n template.append($('<div>').addClass('row').append(dateView.addClass('col-md-6')).append(timeView.addClass('col-md-6')));\n if (options.toolbarPlacement === 'bottom') {\n template.append(toolbar);\n }\n return template;\n }\n if (options.toolbarPlacement === 'top') {\n content.append(toolbar);\n }\n if (hasDate()) {\n content.append($('<li>').addClass(options.collapse && hasTime() ? 'collapse show' : '').append(dateView));\n }\n if (options.toolbarPlacement === 'default') {\n content.append(toolbar);\n }\n if (hasTime()) {\n content.append($('<li>').addClass(options.collapse && hasDate() ? 'collapse' : '').append(timeView));\n }\n if (options.toolbarPlacement === 'bottom') {\n content.append(toolbar);\n }\n return template.append(content);\n },\n dataToOptions = function dataToOptions() {\n var eData,\n dataOptions = {};\n if (element.is('input') || options.inline) {\n eData = element.data();\n } else {\n eData = element.find('input').data();\n }\n if (eData.dateOptions && eData.dateOptions instanceof Object) {\n dataOptions = $.extend(true, dataOptions, eData.dateOptions);\n }\n $.each(options, function (key) {\n var attributeName = 'date' + key.charAt(0).toUpperCase() + key.slice(1);\n if (eData[attributeName] !== undefined) {\n dataOptions[key] = eData[attributeName];\n }\n });\n return dataOptions;\n },\n place = function place() {\n var position = (component || element).position(),\n offset = (component || element).offset(),\n vertical = options.widgetPositioning.vertical,\n horizontal = options.widgetPositioning.horizontal,\n parent;\n if (options.widgetParent) {\n parent = options.widgetParent.append(widget);\n } else if (element.is('input')) {\n parent = element.after(widget).parent();\n } else if (options.inline) {\n parent = element.append(widget);\n return;\n } else {\n parent = element;\n element.children().first().after(widget);\n }\n\n // Top and bottom logic\n if (vertical === 'auto') {\n if (offset.top + widget.height() * 1.5 >= $(window).height() + $(window).scrollTop() && widget.height() + element.outerHeight() < offset.top) {\n vertical = 'top';\n } else {\n vertical = 'bottom';\n }\n }\n\n // Left and right logic\n if (horizontal === 'auto') {\n if (parent.width() < offset.left + widget.outerWidth() / 2 && offset.left + widget.outerWidth() > $(window).width()) {\n horizontal = 'right';\n } else {\n horizontal = 'left';\n }\n }\n if (vertical === 'top') {\n widget.addClass('top').removeClass('bottom');\n } else {\n widget.addClass('bottom').removeClass('top');\n }\n if (horizontal === 'right') {\n widget.addClass('pull-right');\n } else {\n widget.removeClass('pull-right');\n }\n\n // find the first parent element that has a non-static css positioning\n if (parent.css('position') === 'static') {\n parent = parent.parents().filter(function () {\n return $(this).css('position') !== 'static';\n }).first();\n }\n if (parent.length === 0) {\n throw new Error('datetimepicker component should be placed within a non-static positioned container');\n }\n widget.css({\n top: vertical === 'top' ? 'auto' : position.top + element.outerHeight(),\n bottom: vertical === 'top' ? parent.outerHeight() - (parent === element ? 0 : position.top) : 'auto',\n left: horizontal === 'left' ? parent === element ? 0 : position.left : 'auto',\n right: horizontal === 'left' ? 'auto' : parent.outerWidth() - element.outerWidth() - (parent === element ? 0 : position.left)\n });\n },\n notifyEvent = function notifyEvent(e) {\n if (e.type === 'dp.change' && (e.date && e.date.isSame(e.oldDate) || !e.date && !e.oldDate)) {\n return;\n }\n element.trigger(e);\n },\n viewUpdate = function viewUpdate(e) {\n if (e === 'y') {\n e = 'YYYY';\n }\n notifyEvent({\n type: 'dp.update',\n change: e,\n viewDate: viewDate.clone()\n });\n },\n showMode = function showMode(dir) {\n if (!widget) {\n return;\n }\n if (dir) {\n currentViewMode = Math.max(minViewModeNumber, Math.min(3, currentViewMode + dir));\n }\n widget.find('.datepicker > div').hide().filter('.datepicker-' + datePickerModes[currentViewMode].clsName).show();\n },\n fillDow = function fillDow() {\n var row = $('<tr>'),\n currentDate = viewDate.clone().startOf('w').startOf('d');\n if (options.calendarWeeks === true) {\n row.append($('<th>').addClass('cw').text('#'));\n }\n while (currentDate.isBefore(viewDate.clone().endOf('w'))) {\n row.append($('<th>').addClass('dow').text(currentDate.format('dd')));\n currentDate.add(1, 'd');\n }\n widget.find('.datepicker-days thead').append(row);\n },\n isInDisabledDates = function isInDisabledDates(testDate) {\n return options.disabledDates[testDate.format('YYYY-MM-DD')] === true;\n },\n isInEnabledDates = function isInEnabledDates(testDate) {\n return options.enabledDates[testDate.format('YYYY-MM-DD')] === true;\n },\n isInDisabledHours = function isInDisabledHours(testDate) {\n return options.disabledHours[testDate.format('H')] === true;\n },\n isInEnabledHours = function isInEnabledHours(testDate) {\n return options.enabledHours[testDate.format('H')] === true;\n },\n isValid = function isValid(targetMoment, granularity) {\n if (!targetMoment.isValid()) {\n return false;\n }\n if (options.disabledDates && granularity === 'd' && isInDisabledDates(targetMoment)) {\n return false;\n }\n if (options.enabledDates && granularity === 'd' && !isInEnabledDates(targetMoment)) {\n return false;\n }\n if (options.minDate && targetMoment.isBefore(options.minDate, granularity)) {\n return false;\n }\n if (options.maxDate && targetMoment.isAfter(options.maxDate, granularity)) {\n return false;\n }\n if (options.daysOfWeekDisabled && granularity === 'd' && options.daysOfWeekDisabled.indexOf(targetMoment.day()) !== -1) {\n return false;\n }\n if (options.disabledHours && (granularity === 'h' || granularity === 'm' || granularity === 's') && isInDisabledHours(targetMoment)) {\n return false;\n }\n if (options.enabledHours && (granularity === 'h' || granularity === 'm' || granularity === 's') && !isInEnabledHours(targetMoment)) {\n return false;\n }\n if (options.disabledTimeIntervals && (granularity === 'h' || granularity === 'm' || granularity === 's')) {\n var found = false;\n $.each(options.disabledTimeIntervals, function () {\n if (targetMoment.isBetween(this[0], this[1])) {\n found = true;\n return false;\n }\n });\n if (found) {\n return false;\n }\n }\n return true;\n },\n fillMonths = function fillMonths() {\n var spans = [],\n monthsShort = viewDate.clone().startOf('y').startOf('d');\n while (monthsShort.isSame(viewDate, 'y')) {\n spans.push($('<span>').attr('data-action', 'selectMonth').addClass('month').text(monthsShort.format('MMM')));\n monthsShort.add(1, 'M');\n }\n widget.find('.datepicker-months td').empty().append(spans);\n },\n updateMonths = function updateMonths() {\n var monthsView = widget.find('.datepicker-months'),\n monthsViewHeader = monthsView.find('th'),\n months = monthsView.find('tbody').find('span');\n monthsViewHeader.eq(0).find('span').attr('title', options.tooltips.prevYear);\n monthsViewHeader.eq(1).attr('title', options.tooltips.selectYear);\n monthsViewHeader.eq(2).find('span').attr('title', options.tooltips.nextYear);\n monthsView.find('.disabled').removeClass('disabled');\n if (!isValid(viewDate.clone().subtract(1, 'y'), 'y')) {\n monthsViewHeader.eq(0).addClass('disabled');\n }\n monthsViewHeader.eq(1).text(viewDate.year());\n if (!isValid(viewDate.clone().add(1, 'y'), 'y')) {\n monthsViewHeader.eq(2).addClass('disabled');\n }\n months.removeClass('active');\n if (date.isSame(viewDate, 'y') && !unset) {\n months.eq(date.month()).addClass('active');\n }\n months.each(function (index) {\n if (!isValid(viewDate.clone().month(index), 'M')) {\n $(this).addClass('disabled');\n }\n });\n },\n updateYears = function updateYears() {\n var yearsView = widget.find('.datepicker-years'),\n yearsViewHeader = yearsView.find('th'),\n startYear = viewDate.clone().subtract(5, 'y'),\n endYear = viewDate.clone().add(6, 'y'),\n html = '';\n yearsViewHeader.eq(0).find('span').attr('title', options.tooltips.prevDecade);\n yearsViewHeader.eq(1).attr('title', options.tooltips.selectDecade);\n yearsViewHeader.eq(2).find('span').attr('title', options.tooltips.nextDecade);\n yearsView.find('.disabled').removeClass('disabled');\n if (options.minDate && options.minDate.isAfter(startYear, 'y')) {\n yearsViewHeader.eq(0).addClass('disabled');\n }\n yearsViewHeader.eq(1).text(startYear.year() + '-' + endYear.year());\n if (options.maxDate && options.maxDate.isBefore(endYear, 'y')) {\n yearsViewHeader.eq(2).addClass('disabled');\n }\n while (!startYear.isAfter(endYear, 'y')) {\n html += '<span data-action=\"selectYear\" class=\"year' + (startYear.isSame(date, 'y') && !unset ? ' active' : '') + (!isValid(startYear, 'y') ? ' disabled' : '') + '\">' + startYear.year() + '</span>';\n startYear.add(1, 'y');\n }\n yearsView.find('td').html(html);\n },\n updateDecades = function updateDecades() {\n var decadesView = widget.find('.datepicker-decades'),\n decadesViewHeader = decadesView.find('th'),\n startDecade = moment({\n y: viewDate.year() - viewDate.year() % 100 - 1\n }),\n endDecade = startDecade.clone().add(100, 'y'),\n startedAt = startDecade.clone(),\n minDateDecade = false,\n maxDateDecade = false,\n endDecadeYear,\n html = '';\n decadesViewHeader.eq(0).find('span').attr('title', options.tooltips.prevCentury);\n decadesViewHeader.eq(2).find('span').attr('title', options.tooltips.nextCentury);\n decadesView.find('.disabled').removeClass('disabled');\n if (startDecade.isSame(moment({\n y: 1900\n })) || options.minDate && options.minDate.isAfter(startDecade, 'y')) {\n decadesViewHeader.eq(0).addClass('disabled');\n }\n decadesViewHeader.eq(1).text(startDecade.year() + '-' + endDecade.year());\n if (startDecade.isSame(moment({\n y: 2000\n })) || options.maxDate && options.maxDate.isBefore(endDecade, 'y')) {\n decadesViewHeader.eq(2).addClass('disabled');\n }\n while (!startDecade.isAfter(endDecade, 'y')) {\n endDecadeYear = startDecade.year() + 12;\n minDateDecade = options.minDate && options.minDate.isAfter(startDecade, 'y') && options.minDate.year() <= endDecadeYear;\n maxDateDecade = options.maxDate && options.maxDate.isAfter(startDecade, 'y') && options.maxDate.year() <= endDecadeYear;\n html += '<span data-action=\"selectDecade\" class=\"decade' + (date.isAfter(startDecade) && date.year() <= endDecadeYear ? ' active' : '') + (!isValid(startDecade, 'y') && !minDateDecade && !maxDateDecade ? ' disabled' : '') + '\" data-selection=\"' + (startDecade.year() + 6) + '\">' + (startDecade.year() + 1) + ' - ' + (startDecade.year() + 12) + '</span>';\n startDecade.add(12, 'y');\n }\n html += '<span></span><span></span><span></span>'; //push the dangling block over, at least this way it's even\n\n decadesView.find('td').html(html);\n decadesViewHeader.eq(1).text(startedAt.year() + 1 + '-' + startDecade.year());\n },\n fillDate = function fillDate() {\n var daysView = widget.find('.datepicker-days'),\n daysViewHeader = daysView.find('th'),\n currentDate,\n html = [],\n row,\n clsNames = [],\n i;\n if (!hasDate()) {\n return;\n }\n daysViewHeader.eq(0).find('span').attr('title', options.tooltips.prevMonth);\n daysViewHeader.eq(1).attr('title', options.tooltips.selectMonth);\n daysViewHeader.eq(2).find('span').attr('title', options.tooltips.nextMonth);\n daysView.find('.disabled').removeClass('disabled');\n daysViewHeader.eq(1).text(viewDate.format(options.dayViewHeaderFormat));\n if (!isValid(viewDate.clone().subtract(1, 'M'), 'M')) {\n daysViewHeader.eq(0).addClass('disabled');\n }\n if (!isValid(viewDate.clone().add(1, 'M'), 'M')) {\n daysViewHeader.eq(2).addClass('disabled');\n }\n currentDate = viewDate.clone().startOf('M').startOf('w').startOf('d');\n for (i = 0; i < 42; i++) {\n //always display 42 days (should show 6 weeks)\n if (currentDate.weekday() === 0) {\n row = $('<tr>');\n if (options.calendarWeeks) {\n row.append('<td class=\"cw\">' + currentDate.week() + '</td>');\n }\n html.push(row);\n }\n clsNames = ['day'];\n if (currentDate.isBefore(viewDate, 'M')) {\n clsNames.push('old');\n }\n if (currentDate.isAfter(viewDate, 'M')) {\n clsNames.push('new');\n }\n if (currentDate.isSame(date, 'd') && !unset) {\n clsNames.push('active');\n }\n if (!isValid(currentDate, 'd')) {\n clsNames.push('disabled');\n }\n if (currentDate.isSame(getMoment(), 'd')) {\n clsNames.push('today');\n }\n if (currentDate.day() === 0 || currentDate.day() === 6) {\n clsNames.push('weekend');\n }\n notifyEvent({\n type: 'dp.classify',\n date: currentDate,\n classNames: clsNames\n });\n row.append('<td data-action=\"selectDay\" data-day=\"' + currentDate.format('L') + '\" class=\"' + clsNames.join(' ') + '\">' + currentDate.date() + '</td>');\n currentDate.add(1, 'd');\n }\n daysView.find('tbody').empty().append(html);\n updateMonths();\n updateYears();\n updateDecades();\n },\n fillHours = function fillHours() {\n var table = widget.find('.timepicker-hours table'),\n currentHour = viewDate.clone().startOf('d'),\n html = [],\n row = $('<tr>');\n if (viewDate.hour() > 11 && !use24Hours) {\n currentHour.hour(12);\n }\n while (currentHour.isSame(viewDate, 'd') && (use24Hours || viewDate.hour() < 12 && currentHour.hour() < 12 || viewDate.hour() > 11)) {\n if (currentHour.hour() % 4 === 0) {\n row = $('<tr>');\n html.push(row);\n }\n row.append('<td data-action=\"selectHour\" class=\"hour' + (!isValid(currentHour, 'h') ? ' disabled' : '') + '\">' + currentHour.format(use24Hours ? 'HH' : 'hh') + '</td>');\n currentHour.add(1, 'h');\n }\n table.empty().append(html);\n },\n fillMinutes = function fillMinutes() {\n var table = widget.find('.timepicker-minutes table'),\n currentMinute = viewDate.clone().startOf('h'),\n html = [],\n row = $('<tr>'),\n step = options.stepping === 1 ? 5 : options.stepping;\n while (viewDate.isSame(currentMinute, 'h')) {\n if (currentMinute.minute() % (step * 4) === 0) {\n row = $('<tr>');\n html.push(row);\n }\n row.append('<td data-action=\"selectMinute\" class=\"minute' + (!isValid(currentMinute, 'm') ? ' disabled' : '') + '\">' + currentMinute.format('mm') + '</td>');\n currentMinute.add(step, 'm');\n }\n table.empty().append(html);\n },\n fillSeconds = function fillSeconds() {\n var table = widget.find('.timepicker-seconds table'),\n currentSecond = viewDate.clone().startOf('m'),\n html = [],\n row = $('<tr>');\n while (viewDate.isSame(currentSecond, 'm')) {\n if (currentSecond.second() % 20 === 0) {\n row = $('<tr>');\n html.push(row);\n }\n row.append('<td data-action=\"selectSecond\" class=\"second' + (!isValid(currentSecond, 's') ? ' disabled' : '') + '\">' + currentSecond.format('ss') + '</td>');\n currentSecond.add(5, 's');\n }\n table.empty().append(html);\n },\n fillTime = function fillTime() {\n var toggle,\n newDate,\n timeComponents = widget.find('.timepicker span[data-time-component]');\n if (!use24Hours) {\n toggle = widget.find('.timepicker [data-action=togglePeriod]');\n newDate = date.clone().add(date.hours() >= 12 ? -12 : 12, 'h');\n toggle.text(date.format('A'));\n if (isValid(newDate, 'h')) {\n toggle.removeClass('disabled');\n } else {\n toggle.addClass('disabled');\n }\n }\n timeComponents.filter('[data-time-component=hours]').text(date.format(use24Hours ? 'HH' : 'hh'));\n timeComponents.filter('[data-time-component=minutes]').text(date.format('mm'));\n timeComponents.filter('[data-time-component=seconds]').text(date.format('ss'));\n fillHours();\n fillMinutes();\n fillSeconds();\n },\n update = function update() {\n if (!widget) {\n return;\n }\n fillDate();\n fillTime();\n },\n setValue = function setValue(targetMoment) {\n var oldDate = unset ? null : date;\n\n // case of calling setValue(null or false)\n if (!targetMoment) {\n unset = true;\n input.val('');\n element.data('date', '');\n notifyEvent({\n type: 'dp.change',\n date: false,\n oldDate: oldDate\n });\n update();\n return;\n }\n targetMoment = targetMoment.clone().locale(options.locale);\n if (hasTimeZone()) {\n targetMoment.tz(options.timeZone);\n }\n if (options.stepping !== 1) {\n targetMoment.minutes(Math.round(targetMoment.minutes() / options.stepping) * options.stepping).seconds(0);\n while (options.minDate && targetMoment.isBefore(options.minDate)) {\n targetMoment.add(options.stepping, 'minutes');\n }\n }\n if (isValid(targetMoment)) {\n date = targetMoment;\n viewDate = date.clone();\n input.val(date.format(actualFormat));\n element.data('date', date.format(actualFormat));\n unset = false;\n update();\n notifyEvent({\n type: 'dp.change',\n date: date.clone(),\n oldDate: oldDate\n });\n } else {\n if (!options.keepInvalid) {\n input.val(unset ? '' : date.format(actualFormat));\n } else {\n notifyEvent({\n type: 'dp.change',\n date: targetMoment,\n oldDate: oldDate\n });\n }\n notifyEvent({\n type: 'dp.error',\n date: targetMoment,\n oldDate: oldDate\n });\n }\n },\n /**\n * Hides the widget. Possibly will emit dp.hide\n */\n hide = function hide() {\n var transitioning = false;\n if (!widget) {\n return picker;\n }\n // Ignore event if in the middle of a picker transition\n widget.find('.collapse').each(function () {\n var collapseData = $(this).data('collapse');\n if (collapseData && collapseData.transitioning) {\n transitioning = true;\n return false;\n }\n return true;\n });\n if (transitioning) {\n return picker;\n }\n if (component && component.hasClass('btn')) {\n component.toggleClass('active');\n }\n widget.hide();\n $(window).off('resize', place);\n widget.off('click', '[data-action]');\n widget.off('mousedown', false);\n widget.remove();\n widget = false;\n notifyEvent({\n type: 'dp.hide',\n date: date.clone()\n });\n input.blur();\n viewDate = date.clone();\n return picker;\n },\n clear = function clear() {\n setValue(null);\n },\n parseInputDate = function parseInputDate(inputDate) {\n if (options.parseInputDate === undefined) {\n if (!moment.isMoment(inputDate) || inputDate instanceof Date) {\n inputDate = getMoment(inputDate);\n }\n } else {\n inputDate = options.parseInputDate(inputDate);\n }\n //inputDate.locale(options.locale);\n return inputDate;\n },\n /********************************************************************************\n *\n * Widget UI interaction functions\n *\n ********************************************************************************/\n actions = {\n next: function next() {\n var navFnc = datePickerModes[currentViewMode].navFnc;\n viewDate.add(datePickerModes[currentViewMode].navStep, navFnc);\n fillDate();\n viewUpdate(navFnc);\n },\n previous: function previous() {\n var navFnc = datePickerModes[currentViewMode].navFnc;\n viewDate.subtract(datePickerModes[currentViewMode].navStep, navFnc);\n fillDate();\n viewUpdate(navFnc);\n },\n pickerSwitch: function pickerSwitch() {\n showMode(1);\n },\n selectMonth: function selectMonth(e) {\n var month = $(e.target).closest('tbody').find('span').index($(e.target));\n viewDate.month(month);\n if (currentViewMode === minViewModeNumber) {\n setValue(date.clone().year(viewDate.year()).month(viewDate.month()));\n if (!options.inline) {\n hide();\n }\n } else {\n showMode(-1);\n fillDate();\n }\n viewUpdate('M');\n },\n selectYear: function selectYear(e) {\n var year = parseInt($(e.target).text(), 10) || 0;\n viewDate.year(year);\n if (currentViewMode === minViewModeNumber) {\n setValue(date.clone().year(viewDate.year()));\n if (!options.inline) {\n hide();\n }\n } else {\n showMode(-1);\n fillDate();\n }\n viewUpdate('YYYY');\n },\n selectDecade: function selectDecade(e) {\n var year = parseInt($(e.target).data('selection'), 10) || 0;\n viewDate.year(year);\n if (currentViewMode === minViewModeNumber) {\n setValue(date.clone().year(viewDate.year()));\n if (!options.inline) {\n hide();\n }\n } else {\n showMode(-1);\n fillDate();\n }\n viewUpdate('YYYY');\n },\n selectDay: function selectDay(e) {\n var day = viewDate.clone();\n if ($(e.target).is('.old')) {\n day.subtract(1, 'M');\n }\n if ($(e.target).is('.new')) {\n day.add(1, 'M');\n }\n setValue(day.date(parseInt($(e.target).text(), 10)));\n if (!hasTime() && !options.keepOpen && !options.inline) {\n hide();\n }\n },\n incrementHours: function incrementHours() {\n var newDate = date.clone().add(1, 'h');\n if (isValid(newDate, 'h')) {\n setValue(newDate);\n }\n },\n incrementMinutes: function incrementMinutes() {\n var newDate = date.clone().add(options.stepping, 'm');\n if (isValid(newDate, 'm')) {\n setValue(newDate);\n }\n },\n incrementSeconds: function incrementSeconds() {\n var newDate = date.clone().add(1, 's');\n if (isValid(newDate, 's')) {\n setValue(newDate);\n }\n },\n decrementHours: function decrementHours() {\n var newDate = date.clone().subtract(1, 'h');\n if (isValid(newDate, 'h')) {\n setValue(newDate);\n }\n },\n decrementMinutes: function decrementMinutes() {\n var newDate = date.clone().subtract(options.stepping, 'm');\n if (isValid(newDate, 'm')) {\n setValue(newDate);\n }\n },\n decrementSeconds: function decrementSeconds() {\n var newDate = date.clone().subtract(1, 's');\n if (isValid(newDate, 's')) {\n setValue(newDate);\n }\n },\n togglePeriod: function togglePeriod() {\n setValue(date.clone().add(date.hours() >= 12 ? -12 : 12, 'h'));\n },\n togglePicker: function togglePicker(e) {\n var $this = $(e.target),\n $parent = $this.closest('ul'),\n expanded = $parent.find('.show'),\n closed = $parent.find('.collapse:not(.show)'),\n collapseData;\n if (expanded && expanded.length) {\n collapseData = expanded.data('collapse');\n if (collapseData && collapseData.transitioning) {\n return;\n }\n if (expanded.collapse) {\n // if collapse plugin is available through bootstrap.js then use it\n expanded.collapse('hide');\n closed.collapse('show');\n } else {\n // otherwise just toggle in class on the two views\n expanded.removeClass('show');\n closed.addClass('show');\n }\n if ($this.is('i')) {\n $this.toggleClass(options.icons.time + ' ' + options.icons.date);\n } else {\n $this.find('i').toggleClass(options.icons.time + ' ' + options.icons.date);\n }\n\n // NOTE: uncomment if toggled state will be restored in show()\n //if (component) {\n // component.find('span').toggleClass(options.icons.time + ' ' + options.icons.date);\n //}\n }\n },\n showPicker: function showPicker() {\n widget.find('.timepicker > div:not(.timepicker-picker)').hide();\n widget.find('.timepicker .timepicker-picker').show();\n },\n showHours: function showHours() {\n widget.find('.timepicker .timepicker-picker').hide();\n widget.find('.timepicker .timepicker-hours').show();\n },\n showMinutes: function showMinutes() {\n widget.find('.timepicker .timepicker-picker').hide();\n widget.find('.timepicker .timepicker-minutes').show();\n },\n showSeconds: function showSeconds() {\n widget.find('.timepicker .timepicker-picker').hide();\n widget.find('.timepicker .timepicker-seconds').show();\n },\n selectHour: function selectHour(e) {\n var hour = parseInt($(e.target).text(), 10);\n if (!use24Hours) {\n if (date.hours() >= 12) {\n if (hour !== 12) {\n hour += 12;\n }\n } else {\n if (hour === 12) {\n hour = 0;\n }\n }\n }\n setValue(date.clone().hours(hour));\n actions.showPicker.call(picker);\n },\n selectMinute: function selectMinute(e) {\n setValue(date.clone().minutes(parseInt($(e.target).text(), 10)));\n actions.showPicker.call(picker);\n },\n selectSecond: function selectSecond(e) {\n setValue(date.clone().seconds(parseInt($(e.target).text(), 10)));\n actions.showPicker.call(picker);\n },\n clear: clear,\n today: function today() {\n var todaysDate = getMoment();\n if (isValid(todaysDate, 'd')) {\n setValue(todaysDate);\n }\n },\n close: hide\n },\n doAction = function doAction(e) {\n if ($(e.currentTarget).is('.disabled')) {\n return false;\n }\n actions[$(e.currentTarget).data('action')].apply(picker, arguments);\n return false;\n },\n /**\n * Shows the widget. Possibly will emit dp.show and dp.change\n */\n show = function show() {\n var currentMoment,\n useCurrentGranularity = {\n 'year': function year(m) {\n return m.month(0).date(1).hours(0).seconds(0).minutes(0);\n },\n 'month': function month(m) {\n return m.date(1).hours(0).seconds(0).minutes(0);\n },\n 'day': function day(m) {\n return m.hours(0).seconds(0).minutes(0);\n },\n 'hour': function hour(m) {\n return m.seconds(0).minutes(0);\n },\n 'minute': function minute(m) {\n return m.seconds(0);\n }\n };\n if (input.prop('disabled') || !options.ignoreReadonly && input.prop('readonly') || widget) {\n return picker;\n }\n if (input.val() !== undefined && input.val().trim().length !== 0) {\n setValue(parseInputDate(input.val().trim()));\n } else if (unset && options.useCurrent && (options.inline || input.is('input') && input.val().trim().length === 0)) {\n currentMoment = getMoment();\n if (typeof options.useCurrent === 'string') {\n currentMoment = useCurrentGranularity[options.useCurrent](currentMoment);\n }\n setValue(currentMoment);\n }\n widget = getTemplate();\n fillDow();\n fillMonths();\n widget.find('.timepicker-hours').hide();\n widget.find('.timepicker-minutes').hide();\n widget.find('.timepicker-seconds').hide();\n update();\n showMode();\n $(window).on('resize', place);\n widget.on('click', '[data-action]', doAction); // this handles clicks on the widget\n widget.on('mousedown', false);\n if (component && component.hasClass('btn')) {\n component.toggleClass('active');\n }\n place();\n widget.show();\n if (options.focusOnShow && !input.is(':focus')) {\n input.focus();\n }\n notifyEvent({\n type: 'dp.show'\n });\n return picker;\n },\n /**\n * Shows or hides the widget\n */\n toggle = function toggle() {\n return widget ? hide() : show();\n },\n keydown = function keydown(e) {\n var handler = null,\n index,\n index2,\n pressedKeys = [],\n pressedModifiers = {},\n currentKey = e.which,\n keyBindKeys,\n allModifiersPressed,\n pressed = 'p';\n keyState[currentKey] = pressed;\n for (index in keyState) {\n if (keyState.hasOwnProperty(index) && keyState[index] === pressed) {\n pressedKeys.push(index);\n if (parseInt(index, 10) !== currentKey) {\n pressedModifiers[index] = true;\n }\n }\n }\n for (index in options.keyBinds) {\n if (options.keyBinds.hasOwnProperty(index) && typeof options.keyBinds[index] === 'function') {\n keyBindKeys = index.split(' ');\n if (keyBindKeys.length === pressedKeys.length && keyMap[currentKey] === keyBindKeys[keyBindKeys.length - 1]) {\n allModifiersPressed = true;\n for (index2 = keyBindKeys.length - 2; index2 >= 0; index2--) {\n if (!(keyMap[keyBindKeys[index2]] in pressedModifiers)) {\n allModifiersPressed = false;\n break;\n }\n }\n if (allModifiersPressed) {\n handler = options.keyBinds[index];\n break;\n }\n }\n }\n }\n if (handler) {\n handler.call(picker, widget);\n e.stopPropagation();\n e.preventDefault();\n }\n },\n keyup = function keyup(e) {\n keyState[e.which] = 'r';\n e.stopPropagation();\n e.preventDefault();\n },\n change = function change(e) {\n var val = $(e.target).val().trim(),\n parsedDate = val ? parseInputDate(val) : null;\n setValue(parsedDate);\n e.stopImmediatePropagation();\n return false;\n },\n attachDatePickerElementEvents = function attachDatePickerElementEvents() {\n input.on({\n 'change': change,\n 'blur': options.debug ? '' : hide,\n 'keydown': keydown,\n 'keyup': keyup,\n 'focus': options.allowInputToggle ? show : ''\n });\n if (element.is('input')) {\n input.on({\n 'focus': show\n });\n } else if (component) {\n component.on('click', toggle);\n component.on('mousedown', false);\n }\n },\n detachDatePickerElementEvents = function detachDatePickerElementEvents() {\n input.off({\n 'change': change,\n 'blur': blur,\n 'keydown': keydown,\n 'keyup': keyup,\n 'focus': options.allowInputToggle ? hide : ''\n });\n if (element.is('input')) {\n input.off({\n 'focus': show\n });\n } else if (component) {\n component.off('click', toggle);\n component.off('mousedown', false);\n }\n },\n indexGivenDates = function indexGivenDates(givenDatesArray) {\n // Store given enabledDates and disabledDates as keys.\n // This way we can check their existence in O(1) time instead of looping through whole array.\n // (for example: options.enabledDates['2014-02-27'] === true)\n var givenDatesIndexed = {};\n $.each(givenDatesArray, function () {\n var dDate = parseInputDate(this);\n if (dDate.isValid()) {\n givenDatesIndexed[dDate.format('YYYY-MM-DD')] = true;\n }\n });\n return Object.keys(givenDatesIndexed).length ? givenDatesIndexed : false;\n },\n indexGivenHours = function indexGivenHours(givenHoursArray) {\n // Store given enabledHours and disabledHours as keys.\n // This way we can check their existence in O(1) time instead of looping through whole array.\n // (for example: options.enabledHours['2014-02-27'] === true)\n var givenHoursIndexed = {};\n $.each(givenHoursArray, function () {\n givenHoursIndexed[this] = true;\n });\n return Object.keys(givenHoursIndexed).length ? givenHoursIndexed : false;\n },\n initFormatting = function initFormatting() {\n var format = options.format || 'L LT';\n actualFormat = format.replace(/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (formatInput) {\n var newinput = date.localeData().longDateFormat(formatInput) || formatInput;\n return newinput.replace(/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (formatInput2) {\n //temp fix for #740\n return date.localeData().longDateFormat(formatInput2) || formatInput2;\n });\n });\n parseFormats = options.extraFormats ? options.extraFormats.slice() : [];\n if (parseFormats.indexOf(format) < 0 && parseFormats.indexOf(actualFormat) < 0) {\n parseFormats.push(actualFormat);\n }\n use24Hours = actualFormat.toLowerCase().indexOf('a') < 1 && actualFormat.replace(/\\[.*?\\]/g, '').indexOf('h') < 1;\n if (isEnabled('y')) {\n minViewModeNumber = 2;\n }\n if (isEnabled('M')) {\n minViewModeNumber = 1;\n }\n if (isEnabled('d')) {\n minViewModeNumber = 0;\n }\n currentViewMode = Math.max(minViewModeNumber, currentViewMode);\n if (!unset) {\n setValue(date);\n }\n };\n\n /********************************************************************************\n *\n * Public API functions\n * =====================\n *\n * Important: Do not expose direct references to private objects or the options\n * object to the outer world. Always return a clone when returning values or make\n * a clone when setting a private variable.\n *\n ********************************************************************************/\n picker.destroy = function () {\n ///<summary>Destroys the widget and removes all attached event listeners</summary>\n hide();\n detachDatePickerElementEvents();\n element.removeData('DateTimePicker');\n element.removeData('date');\n };\n picker.toggle = toggle;\n picker.show = show;\n picker.hide = hide;\n picker.disable = function () {\n ///<summary>Disables the input element, the component is attached to, by adding a disabled=\"true\" attribute to it.\n ///If the widget was visible before that call it is hidden. Possibly emits dp.hide</summary>\n hide();\n if (component && component.hasClass('btn')) {\n component.addClass('disabled');\n }\n input.prop('disabled', true);\n return picker;\n };\n picker.enable = function () {\n ///<summary>Enables the input element, the component is attached to, by removing disabled attribute from it.</summary>\n if (component && component.hasClass('btn')) {\n component.removeClass('disabled');\n }\n input.prop('disabled', false);\n return picker;\n };\n picker.ignoreReadonly = function (ignoreReadonly) {\n if (arguments.length === 0) {\n return options.ignoreReadonly;\n }\n if (typeof ignoreReadonly !== 'boolean') {\n throw new TypeError('ignoreReadonly () expects a boolean parameter');\n }\n options.ignoreReadonly = ignoreReadonly;\n return picker;\n };\n picker.options = function (newOptions) {\n if (arguments.length === 0) {\n return $.extend(true, {}, options);\n }\n if (!(newOptions instanceof Object)) {\n throw new TypeError('options() options parameter should be an object');\n }\n $.extend(true, options, newOptions);\n $.each(options, function (key, value) {\n if (picker[key] !== undefined) {\n picker[key](value);\n } else {\n throw new TypeError('option ' + key + ' is not recognized!');\n }\n });\n return picker;\n };\n picker.date = function (newDate) {\n ///<signature helpKeyword=\"$.fn.datetimepicker.date\">\n ///<summary>Returns the component's model current date, a moment object or null if not set.</summary>\n ///<returns type=\"Moment\">date.clone()</returns>\n ///</signature>\n ///<signature>\n ///<summary>Sets the components model current moment to it. Passing a null value unsets the components model current moment. Parsing of the newDate parameter is made using moment library with the options.format and options.useStrict components configuration.</summary>\n ///<param name=\"newDate\" locid=\"$.fn.datetimepicker.date_p:newDate\">Takes string, Date, moment, null parameter.</param>\n ///</signature>\n if (arguments.length === 0) {\n if (unset) {\n return null;\n }\n return date.clone();\n }\n if (newDate !== null && typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date)) {\n throw new TypeError('date() parameter must be one of [null, string, moment or Date]');\n }\n setValue(newDate === null ? null : parseInputDate(newDate));\n return picker;\n };\n picker.format = function (newFormat) {\n ///<summary>test su</summary>\n ///<param name=\"newFormat\">info about para</param>\n ///<returns type=\"string|boolean\">returns foo</returns>\n if (arguments.length === 0) {\n return options.format;\n }\n if (typeof newFormat !== 'string' && (typeof newFormat !== 'boolean' || newFormat !== false)) {\n throw new TypeError('format() expects a string or boolean:false parameter ' + newFormat);\n }\n options.format = newFormat;\n if (actualFormat) {\n initFormatting(); // reinit formatting\n }\n return picker;\n };\n picker.timeZone = function (newZone) {\n if (arguments.length === 0) {\n return options.timeZone;\n }\n if (typeof newZone !== 'string') {\n throw new TypeError('newZone() expects a string parameter');\n }\n options.timeZone = newZone;\n return picker;\n };\n picker.dayViewHeaderFormat = function (newFormat) {\n if (arguments.length === 0) {\n return options.dayViewHeaderFormat;\n }\n if (typeof newFormat !== 'string') {\n throw new TypeError('dayViewHeaderFormat() expects a string parameter');\n }\n options.dayViewHeaderFormat = newFormat;\n return picker;\n };\n picker.extraFormats = function (formats) {\n if (arguments.length === 0) {\n return options.extraFormats;\n }\n if (formats !== false && !(formats instanceof Array)) {\n throw new TypeError('extraFormats() expects an array or false parameter');\n }\n options.extraFormats = formats;\n if (parseFormats) {\n initFormatting(); // reinit formatting\n }\n return picker;\n };\n picker.disabledDates = function (dates) {\n ///<signature helpKeyword=\"$.fn.datetimepicker.disabledDates\">\n ///<summary>Returns an array with the currently set disabled dates on the component.</summary>\n ///<returns type=\"array\">options.disabledDates</returns>\n ///</signature>\n ///<signature>\n ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of\n ///options.enabledDates if such exist.</summary>\n ///<param name=\"dates\" locid=\"$.fn.datetimepicker.disabledDates_p:dates\">Takes an [ string or Date or moment ] of values and allows the user to select only from those days.</param>\n ///</signature>\n if (arguments.length === 0) {\n return options.disabledDates ? $.extend({}, options.disabledDates) : options.disabledDates;\n }\n if (!dates) {\n options.disabledDates = false;\n update();\n return picker;\n }\n if (!(dates instanceof Array)) {\n throw new TypeError('disabledDates() expects an array parameter');\n }\n options.disabledDates = indexGivenDates(dates);\n options.enabledDates = false;\n update();\n return picker;\n };\n picker.enabledDates = function (dates) {\n ///<signature helpKeyword=\"$.fn.datetimepicker.enabledDates\">\n ///<summary>Returns an array with the currently set enabled dates on the component.</summary>\n ///<returns type=\"array\">options.enabledDates</returns>\n ///</signature>\n ///<signature>\n ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of options.disabledDates if such exist.</summary>\n ///<param name=\"dates\" locid=\"$.fn.datetimepicker.enabledDates_p:dates\">Takes an [ string or Date or moment ] of values and allows the user to select only from those days.</param>\n ///</signature>\n if (arguments.length === 0) {\n return options.enabledDates ? $.extend({}, options.enabledDates) : options.enabledDates;\n }\n if (!dates) {\n options.enabledDates = false;\n update();\n return picker;\n }\n if (!(dates instanceof Array)) {\n throw new TypeError('enabledDates() expects an array parameter');\n }\n options.enabledDates = indexGivenDates(dates);\n options.disabledDates = false;\n update();\n return picker;\n };\n picker.daysOfWeekDisabled = function (daysOfWeekDisabled) {\n if (arguments.length === 0) {\n return options.daysOfWeekDisabled.splice(0);\n }\n if (typeof daysOfWeekDisabled === 'boolean' && !daysOfWeekDisabled) {\n options.daysOfWeekDisabled = false;\n update();\n return picker;\n }\n if (!(daysOfWeekDisabled instanceof Array)) {\n throw new TypeError('daysOfWeekDisabled() expects an array parameter');\n }\n options.daysOfWeekDisabled = daysOfWeekDisabled.reduce(function (previousValue, currentValue) {\n currentValue = parseInt(currentValue, 10);\n if (currentValue > 6 || currentValue < 0 || isNaN(currentValue)) {\n return previousValue;\n }\n if (previousValue.indexOf(currentValue) === -1) {\n previousValue.push(currentValue);\n }\n return previousValue;\n }, []).sort();\n if (options.useCurrent && !options.keepInvalid) {\n var tries = 0;\n while (!isValid(date, 'd')) {\n date.add(1, 'd');\n if (tries === 31) {\n throw 'Tried 31 times to find a valid date';\n }\n tries++;\n }\n setValue(date);\n }\n update();\n return picker;\n };\n picker.maxDate = function (maxDate) {\n if (arguments.length === 0) {\n return options.maxDate ? options.maxDate.clone() : options.maxDate;\n }\n if (typeof maxDate === 'boolean' && maxDate === false) {\n options.maxDate = false;\n update();\n return picker;\n }\n if (typeof maxDate === 'string') {\n if (maxDate === 'now' || maxDate === 'moment') {\n maxDate = getMoment();\n }\n }\n var parsedDate = parseInputDate(maxDate);\n if (!parsedDate.isValid()) {\n throw new TypeError('maxDate() Could not parse date parameter: ' + maxDate);\n }\n if (options.minDate && parsedDate.isBefore(options.minDate)) {\n throw new TypeError('maxDate() date parameter is before options.minDate: ' + parsedDate.format(actualFormat));\n }\n options.maxDate = parsedDate;\n if (options.useCurrent && !options.keepInvalid && date.isAfter(maxDate)) {\n setValue(options.maxDate);\n }\n if (viewDate.isAfter(parsedDate)) {\n viewDate = parsedDate.clone().subtract(options.stepping, 'm');\n }\n update();\n return picker;\n };\n picker.minDate = function (minDate) {\n if (arguments.length === 0) {\n return options.minDate ? options.minDate.clone() : options.minDate;\n }\n if (typeof minDate === 'boolean' && minDate === false) {\n options.minDate = false;\n update();\n return picker;\n }\n if (typeof minDate === 'string') {\n if (minDate === 'now' || minDate === 'moment') {\n minDate = getMoment();\n }\n }\n var parsedDate = parseInputDate(minDate);\n if (!parsedDate.isValid()) {\n throw new TypeError('minDate() Could not parse date parameter: ' + minDate);\n }\n if (options.maxDate && parsedDate.isAfter(options.maxDate)) {\n throw new TypeError('minDate() date parameter is after options.maxDate: ' + parsedDate.format(actualFormat));\n }\n options.minDate = parsedDate;\n if (options.useCurrent && !options.keepInvalid && date.isBefore(minDate)) {\n setValue(options.minDate);\n }\n if (viewDate.isBefore(parsedDate)) {\n viewDate = parsedDate.clone().add(options.stepping, 'm');\n }\n update();\n return picker;\n };\n picker.defaultDate = function (defaultDate) {\n ///<signature helpKeyword=\"$.fn.datetimepicker.defaultDate\">\n ///<summary>Returns a moment with the options.defaultDate option configuration or false if not set</summary>\n ///<returns type=\"Moment\">date.clone()</returns>\n ///</signature>\n ///<signature>\n ///<summary>Will set the picker's inital date. If a boolean:false value is passed the options.defaultDate parameter is cleared.</summary>\n ///<param name=\"defaultDate\" locid=\"$.fn.datetimepicker.defaultDate_p:defaultDate\">Takes a string, Date, moment, boolean:false</param>\n ///</signature>\n if (arguments.length === 0) {\n return options.defaultDate ? options.defaultDate.clone() : options.defaultDate;\n }\n if (!defaultDate) {\n options.defaultDate = false;\n return picker;\n }\n if (typeof defaultDate === 'string') {\n if (defaultDate === 'now' || defaultDate === 'moment') {\n defaultDate = getMoment();\n } else {\n defaultDate = getMoment(defaultDate);\n }\n }\n var parsedDate = parseInputDate(defaultDate);\n if (!parsedDate.isValid()) {\n throw new TypeError('defaultDate() Could not parse date parameter: ' + defaultDate);\n }\n if (!isValid(parsedDate)) {\n throw new TypeError('defaultDate() date passed is invalid according to component setup validations');\n }\n options.defaultDate = parsedDate;\n if (options.defaultDate && options.inline || input.val().trim() === '') {\n setValue(options.defaultDate);\n }\n return picker;\n };\n picker.locale = function (locale) {\n if (arguments.length === 0) {\n return options.locale;\n }\n if (!moment.localeData(locale)) {\n throw new TypeError('locale() locale ' + locale + ' is not loaded from moment locales!');\n }\n options.locale = locale;\n date.locale(options.locale);\n viewDate.locale(options.locale);\n if (actualFormat) {\n initFormatting(); // reinit formatting\n }\n if (widget) {\n hide();\n show();\n }\n return picker;\n };\n picker.stepping = function (stepping) {\n if (arguments.length === 0) {\n return options.stepping;\n }\n stepping = parseInt(stepping, 10);\n if (isNaN(stepping) || stepping < 1) {\n stepping = 1;\n }\n options.stepping = stepping;\n return picker;\n };\n picker.useCurrent = function (useCurrent) {\n var useCurrentOptions = ['year', 'month', 'day', 'hour', 'minute'];\n if (arguments.length === 0) {\n return options.useCurrent;\n }\n if (typeof useCurrent !== 'boolean' && typeof useCurrent !== 'string') {\n throw new TypeError('useCurrent() expects a boolean or string parameter');\n }\n if (typeof useCurrent === 'string' && useCurrentOptions.indexOf(useCurrent.toLowerCase()) === -1) {\n throw new TypeError('useCurrent() expects a string parameter of ' + useCurrentOptions.join(', '));\n }\n options.useCurrent = useCurrent;\n return picker;\n };\n picker.collapse = function (collapse) {\n if (arguments.length === 0) {\n return options.collapse;\n }\n if (typeof collapse !== 'boolean') {\n throw new TypeError('collapse() expects a boolean parameter');\n }\n if (options.collapse === collapse) {\n return picker;\n }\n options.collapse = collapse;\n if (widget) {\n hide();\n show();\n }\n return picker;\n };\n picker.icons = function (icons) {\n if (arguments.length === 0) {\n return $.extend({}, options.icons);\n }\n if (!(icons instanceof Object)) {\n throw new TypeError('icons() expects parameter to be an Object');\n }\n $.extend(options.icons, icons);\n if (widget) {\n hide();\n show();\n }\n return picker;\n };\n picker.tooltips = function (tooltips) {\n if (arguments.length === 0) {\n return $.extend({}, options.tooltips);\n }\n if (!(tooltips instanceof Object)) {\n throw new TypeError('tooltips() expects parameter to be an Object');\n }\n $.extend(options.tooltips, tooltips);\n if (widget) {\n hide();\n show();\n }\n return picker;\n };\n picker.useStrict = function (useStrict) {\n if (arguments.length === 0) {\n return options.useStrict;\n }\n if (typeof useStrict !== 'boolean') {\n throw new TypeError('useStrict() expects a boolean parameter');\n }\n options.useStrict = useStrict;\n return picker;\n };\n picker.sideBySide = function (sideBySide) {\n if (arguments.length === 0) {\n return options.sideBySide;\n }\n if (typeof sideBySide !== 'boolean') {\n throw new TypeError('sideBySide() expects a boolean parameter');\n }\n options.sideBySide = sideBySide;\n if (widget) {\n hide();\n show();\n }\n return picker;\n };\n picker.viewMode = function (viewMode) {\n if (arguments.length === 0) {\n return options.viewMode;\n }\n if (typeof viewMode !== 'string') {\n throw new TypeError('viewMode() expects a string parameter');\n }\n if (viewModes.indexOf(viewMode) === -1) {\n throw new TypeError('viewMode() parameter must be one of (' + viewModes.join(', ') + ') value');\n }\n options.viewMode = viewMode;\n currentViewMode = Math.max(viewModes.indexOf(viewMode), minViewModeNumber);\n showMode();\n return picker;\n };\n picker.toolbarPlacement = function (toolbarPlacement) {\n if (arguments.length === 0) {\n return options.toolbarPlacement;\n }\n if (typeof toolbarPlacement !== 'string') {\n throw new TypeError('toolbarPlacement() expects a string parameter');\n }\n if (toolbarPlacements.indexOf(toolbarPlacement) === -1) {\n throw new TypeError('toolbarPlacement() parameter must be one of (' + toolbarPlacements.join(', ') + ') value');\n }\n options.toolbarPlacement = toolbarPlacement;\n if (widget) {\n hide();\n show();\n }\n return picker;\n };\n picker.widgetPositioning = function (widgetPositioning) {\n if (arguments.length === 0) {\n return $.extend({}, options.widgetPositioning);\n }\n if ({}.toString.call(widgetPositioning) !== '[object Object]') {\n throw new TypeError('widgetPositioning() expects an object variable');\n }\n if (widgetPositioning.horizontal) {\n if (typeof widgetPositioning.horizontal !== 'string') {\n throw new TypeError('widgetPositioning() horizontal variable must be a string');\n }\n widgetPositioning.horizontal = widgetPositioning.horizontal.toLowerCase();\n if (horizontalModes.indexOf(widgetPositioning.horizontal) === -1) {\n throw new TypeError('widgetPositioning() expects horizontal parameter to be one of (' + horizontalModes.join(', ') + ')');\n }\n options.widgetPositioning.horizontal = widgetPositioning.horizontal;\n }\n if (widgetPositioning.vertical) {\n if (typeof widgetPositioning.vertical !== 'string') {\n throw new TypeError('widgetPositioning() vertical variable must be a string');\n }\n widgetPositioning.vertical = widgetPositioning.vertical.toLowerCase();\n if (verticalModes.indexOf(widgetPositioning.vertical) === -1) {\n throw new TypeError('widgetPositioning() expects vertical parameter to be one of (' + verticalModes.join(', ') + ')');\n }\n options.widgetPositioning.vertical = widgetPositioning.vertical;\n }\n update();\n return picker;\n };\n picker.calendarWeeks = function (calendarWeeks) {\n if (arguments.length === 0) {\n return options.calendarWeeks;\n }\n if (typeof calendarWeeks !== 'boolean') {\n throw new TypeError('calendarWeeks() expects parameter to be a boolean value');\n }\n options.calendarWeeks = calendarWeeks;\n update();\n return picker;\n };\n picker.showTodayButton = function (showTodayButton) {\n if (arguments.length === 0) {\n return options.showTodayButton;\n }\n if (typeof showTodayButton !== 'boolean') {\n throw new TypeError('showTodayButton() expects a boolean parameter');\n }\n options.showTodayButton = showTodayButton;\n if (widget) {\n hide();\n show();\n }\n return picker;\n };\n picker.showClear = function (showClear) {\n if (arguments.length === 0) {\n return options.showClear;\n }\n if (typeof showClear !== 'boolean') {\n throw new TypeError('showClear() expects a boolean parameter');\n }\n options.showClear = showClear;\n if (widget) {\n hide();\n show();\n }\n return picker;\n };\n picker.widgetParent = function (widgetParent) {\n if (arguments.length === 0) {\n return options.widgetParent;\n }\n if (typeof widgetParent === 'string') {\n widgetParent = $(widgetParent);\n }\n if (widgetParent !== null && typeof widgetParent !== 'string' && !(widgetParent instanceof $)) {\n throw new TypeError('widgetParent() expects a string or a jQuery object parameter');\n }\n options.widgetParent = widgetParent;\n if (widget) {\n hide();\n show();\n }\n return picker;\n };\n picker.keepOpen = function (keepOpen) {\n if (arguments.length === 0) {\n return options.keepOpen;\n }\n if (typeof keepOpen !== 'boolean') {\n throw new TypeError('keepOpen() expects a boolean parameter');\n }\n options.keepOpen = keepOpen;\n return picker;\n };\n picker.focusOnShow = function (focusOnShow) {\n if (arguments.length === 0) {\n return options.focusOnShow;\n }\n if (typeof focusOnShow !== 'boolean') {\n throw new TypeError('focusOnShow() expects a boolean parameter');\n }\n options.focusOnShow = focusOnShow;\n return picker;\n };\n picker.inline = function (inline) {\n if (arguments.length === 0) {\n return options.inline;\n }\n if (typeof inline !== 'boolean') {\n throw new TypeError('inline() expects a boolean parameter');\n }\n options.inline = inline;\n return picker;\n };\n picker.clear = function () {\n clear();\n return picker;\n };\n picker.keyBinds = function (keyBinds) {\n if (arguments.length === 0) {\n return options.keyBinds;\n }\n options.keyBinds = keyBinds;\n return picker;\n };\n picker.getMoment = function (d) {\n return getMoment(d);\n };\n picker.debug = function (debug) {\n if (typeof debug !== 'boolean') {\n throw new TypeError('debug() expects a boolean parameter');\n }\n options.debug = debug;\n return picker;\n };\n picker.allowInputToggle = function (allowInputToggle) {\n if (arguments.length === 0) {\n return options.allowInputToggle;\n }\n if (typeof allowInputToggle !== 'boolean') {\n throw new TypeError('allowInputToggle() expects a boolean parameter');\n }\n options.allowInputToggle = allowInputToggle;\n return picker;\n };\n picker.showClose = function (showClose) {\n if (arguments.length === 0) {\n return options.showClose;\n }\n if (typeof showClose !== 'boolean') {\n throw new TypeError('showClose() expects a boolean parameter');\n }\n options.showClose = showClose;\n return picker;\n };\n picker.keepInvalid = function (keepInvalid) {\n if (arguments.length === 0) {\n return options.keepInvalid;\n }\n if (typeof keepInvalid !== 'boolean') {\n throw new TypeError('keepInvalid() expects a boolean parameter');\n }\n options.keepInvalid = keepInvalid;\n return picker;\n };\n picker.datepickerInput = function (datepickerInput) {\n if (arguments.length === 0) {\n return options.datepickerInput;\n }\n if (typeof datepickerInput !== 'string') {\n throw new TypeError('datepickerInput() expects a string parameter');\n }\n options.datepickerInput = datepickerInput;\n return picker;\n };\n picker.parseInputDate = function (parseInputDate) {\n if (arguments.length === 0) {\n return options.parseInputDate;\n }\n if (typeof parseInputDate !== 'function') {\n throw new TypeError('parseInputDate() sholud be as function');\n }\n options.parseInputDate = parseInputDate;\n return picker;\n };\n picker.disabledTimeIntervals = function (disabledTimeIntervals) {\n ///<signature helpKeyword=\"$.fn.datetimepicker.disabledTimeIntervals\">\n ///<summary>Returns an array with the currently set disabled dates on the component.</summary>\n ///<returns type=\"array\">options.disabledTimeIntervals</returns>\n ///</signature>\n ///<signature>\n ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of\n ///options.enabledDates if such exist.</summary>\n ///<param name=\"dates\" locid=\"$.fn.datetimepicker.disabledTimeIntervals_p:dates\">Takes an [ string or Date or moment ] of values and allows the user to select only from those days.</param>\n ///</signature>\n if (arguments.length === 0) {\n return options.disabledTimeIntervals ? $.extend({}, options.disabledTimeIntervals) : options.disabledTimeIntervals;\n }\n if (!disabledTimeIntervals) {\n options.disabledTimeIntervals = false;\n update();\n return picker;\n }\n if (!(disabledTimeIntervals instanceof Array)) {\n throw new TypeError('disabledTimeIntervals() expects an array parameter');\n }\n options.disabledTimeIntervals = disabledTimeIntervals;\n update();\n return picker;\n };\n picker.disabledHours = function (hours) {\n ///<signature helpKeyword=\"$.fn.datetimepicker.disabledHours\">\n ///<summary>Returns an array with the currently set disabled hours on the component.</summary>\n ///<returns type=\"array\">options.disabledHours</returns>\n ///</signature>\n ///<signature>\n ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of\n ///options.enabledHours if such exist.</summary>\n ///<param name=\"hours\" locid=\"$.fn.datetimepicker.disabledHours_p:hours\">Takes an [ int ] of values and disallows the user to select only from those hours.</param>\n ///</signature>\n if (arguments.length === 0) {\n return options.disabledHours ? $.extend({}, options.disabledHours) : options.disabledHours;\n }\n if (!hours) {\n options.disabledHours = false;\n update();\n return picker;\n }\n if (!(hours instanceof Array)) {\n throw new TypeError('disabledHours() expects an array parameter');\n }\n options.disabledHours = indexGivenHours(hours);\n options.enabledHours = false;\n if (options.useCurrent && !options.keepInvalid) {\n var tries = 0;\n while (!isValid(date, 'h')) {\n date.add(1, 'h');\n if (tries === 24) {\n throw 'Tried 24 times to find a valid date';\n }\n tries++;\n }\n setValue(date);\n }\n update();\n return picker;\n };\n picker.enabledHours = function (hours) {\n ///<signature helpKeyword=\"$.fn.datetimepicker.enabledHours\">\n ///<summary>Returns an array with the currently set enabled hours on the component.</summary>\n ///<returns type=\"array\">options.enabledHours</returns>\n ///</signature>\n ///<signature>\n ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of options.disabledHours if such exist.</summary>\n ///<param name=\"hours\" locid=\"$.fn.datetimepicker.enabledHours_p:hours\">Takes an [ int ] of values and allows the user to select only from those hours.</param>\n ///</signature>\n if (arguments.length === 0) {\n return options.enabledHours ? $.extend({}, options.enabledHours) : options.enabledHours;\n }\n if (!hours) {\n options.enabledHours = false;\n update();\n return picker;\n }\n if (!(hours instanceof Array)) {\n throw new TypeError('enabledHours() expects an array parameter');\n }\n options.enabledHours = indexGivenHours(hours);\n options.disabledHours = false;\n if (options.useCurrent && !options.keepInvalid) {\n var tries = 0;\n while (!isValid(date, 'h')) {\n date.add(1, 'h');\n if (tries === 24) {\n throw 'Tried 24 times to find a valid date';\n }\n tries++;\n }\n setValue(date);\n }\n update();\n return picker;\n };\n /**\n * Returns the component's model current viewDate, a moment object or null if not set. Passing a null value unsets the components model current moment. Parsing of the newDate parameter is made using moment library with the options.format and options.useStrict components configuration.\n * @param {Takes string, viewDate, moment, null parameter.} newDate\n * @returns {viewDate.clone()}\n */\n picker.viewDate = function (newDate) {\n if (arguments.length === 0) {\n return viewDate.clone();\n }\n if (!newDate) {\n viewDate = date.clone();\n return picker;\n }\n if (typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date)) {\n throw new TypeError('viewDate() parameter must be one of [string, moment or Date]');\n }\n viewDate = parseInputDate(newDate);\n viewUpdate();\n return picker;\n };\n\n // initializing element and component attributes\n if (element.is('input')) {\n input = element;\n } else {\n input = element.find(options.datepickerInput);\n if (input.length === 0) {\n input = element.find('input');\n } else if (!input.is('input')) {\n throw new Error('CSS class \"' + options.datepickerInput + '\" cannot be applied to non input element');\n }\n }\n if (element.hasClass('input-group')) {\n // in case there is more then one 'input-group-addon' Issue #48\n if (element.find('.datepickerbutton').length === 0) {\n component = element.find('.input-group-addon');\n } else {\n component = element.find('.datepickerbutton');\n }\n }\n if (!options.inline && !input.is('input')) {\n throw new Error('Could not initialize DateTimePicker without an input element');\n }\n\n // Set defaults for date here now instead of in var declaration\n date = getMoment();\n viewDate = date.clone();\n $.extend(true, options, dataToOptions());\n picker.options(options);\n initFormatting();\n attachDatePickerElementEvents();\n if (input.prop('disabled')) {\n picker.disable();\n }\n if (input.is('input') && input.val().trim().length !== 0) {\n setValue(parseInputDate(input.val().trim()));\n } else if (options.defaultDate && input.attr('placeholder') === undefined) {\n setValue(options.defaultDate);\n }\n if (options.inline) {\n show();\n }\n return picker;\n };\n\n /********************************************************************************\n *\n * jQuery plugin constructor and defaults object\n *\n ********************************************************************************/\n\n /**\n * See (http://jquery.com/).\n * @name jQuery\n * @class\n * See the jQuery Library (http://jquery.com/) for full details. This just\n * documents the function and classes that are added to jQuery by this plug-in.\n */\n /**\n * See (http://jquery.com/)\n * @name fn\n * @class\n * See the jQuery Library (http://jquery.com/) for full details. This just\n * documents the function and classes that are added to jQuery by this plug-in.\n * @memberOf jQuery\n */\n /**\n * Show comments\n * @class datetimepicker\n * @memberOf jQuery.fn\n */\n $.fn.datetimepicker = function (options) {\n options = options || {};\n var args = Array.prototype.slice.call(arguments, 1),\n isInstance = true,\n thisMethods = ['destroy', 'hide', 'show', 'toggle'],\n returnValue;\n if (_typeof(options) === 'object') {\n return this.each(function () {\n var $this = $(this),\n _options;\n if (!$this.data('DateTimePicker')) {\n // create a private copy of the defaults object\n _options = $.extend(true, {}, $.fn.datetimepicker.defaults, options);\n $this.data('DateTimePicker', dateTimePicker($this, _options));\n }\n });\n } else if (typeof options === 'string') {\n this.each(function () {\n var $this = $(this),\n instance = $this.data('DateTimePicker');\n if (!instance) {\n throw new Error('bootstrap-datetimepicker(\"' + options + '\") method was called on an element that is not using DateTimePicker');\n }\n returnValue = instance[options].apply(instance, args);\n isInstance = returnValue === instance;\n });\n if (isInstance || $.inArray(options, thisMethods) > -1) {\n return this;\n }\n return returnValue;\n }\n throw new TypeError('Invalid arguments for DateTimePicker: ' + options);\n };\n $.fn.datetimepicker.defaults = {\n timeZone: '',\n format: false,\n dayViewHeaderFormat: 'MMMM YYYY',\n extraFormats: false,\n stepping: 1,\n minDate: false,\n maxDate: false,\n useCurrent: true,\n collapse: true,\n locale: moment.locale(),\n defaultDate: false,\n disabledDates: false,\n enabledDates: false,\n icons: {\n time: 'fa fa-clock-o',\n date: 'fa fa-calendar',\n up: 'fa fa-chevron-up',\n down: 'fa fa-chevron-down',\n previous: 'fa fa-chevron-left',\n next: 'fa fa-chevron-right',\n today: 'fa fa-crosshairs',\n clear: 'fa fa-trash-o',\n close: 'fa fa-times'\n },\n tooltips: {\n today: 'Go to today',\n clear: 'Clear selection',\n close: 'Close the picker',\n selectMonth: 'Select Month',\n prevMonth: 'Previous Month',\n nextMonth: 'Next Month',\n selectYear: 'Select Year',\n prevYear: 'Previous Year',\n nextYear: 'Next Year',\n selectDecade: 'Select Decade',\n prevDecade: 'Previous Decade',\n nextDecade: 'Next Decade',\n prevCentury: 'Previous Century',\n nextCentury: 'Next Century',\n pickHour: 'Pick Hour',\n incrementHour: 'Increment Hour',\n decrementHour: 'Decrement Hour',\n pickMinute: 'Pick Minute',\n incrementMinute: 'Increment Minute',\n decrementMinute: 'Decrement Minute',\n pickSecond: 'Pick Second',\n incrementSecond: 'Increment Second',\n decrementSecond: 'Decrement Second',\n togglePeriod: 'Toggle Period',\n selectTime: 'Select Time'\n },\n useStrict: false,\n sideBySide: false,\n daysOfWeekDisabled: false,\n calendarWeeks: false,\n viewMode: 'days',\n toolbarPlacement: 'default',\n showTodayButton: false,\n showClear: false,\n showClose: false,\n widgetPositioning: {\n horizontal: 'auto',\n vertical: 'auto'\n },\n widgetParent: null,\n ignoreReadonly: false,\n keepOpen: false,\n focusOnShow: true,\n inline: false,\n keepInvalid: false,\n datepickerInput: '.datepickerinput',\n keyBinds: {\n up: function up(widget) {\n if (!widget) {\n return;\n }\n var d = this.date() || this.getMoment();\n if (widget.find('.datepicker').is(':visible')) {\n this.date(d.clone().subtract(7, 'd'));\n } else {\n this.date(d.clone().add(this.stepping(), 'm'));\n }\n },\n down: function down(widget) {\n if (!widget) {\n this.show();\n return;\n }\n var d = this.date() || this.getMoment();\n if (widget.find('.datepicker').is(':visible')) {\n this.date(d.clone().add(7, 'd'));\n } else {\n this.date(d.clone().subtract(this.stepping(), 'm'));\n }\n },\n 'control up': function controlUp(widget) {\n if (!widget) {\n return;\n }\n var d = this.date() || this.getMoment();\n if (widget.find('.datepicker').is(':visible')) {\n this.date(d.clone().subtract(1, 'y'));\n } else {\n this.date(d.clone().add(1, 'h'));\n }\n },\n 'control down': function controlDown(widget) {\n if (!widget) {\n return;\n }\n var d = this.date() || this.getMoment();\n if (widget.find('.datepicker').is(':visible')) {\n this.date(d.clone().add(1, 'y'));\n } else {\n this.date(d.clone().subtract(1, 'h'));\n }\n },\n left: function left(widget) {\n if (!widget) {\n return;\n }\n var d = this.date() || this.getMoment();\n if (widget.find('.datepicker').is(':visible')) {\n this.date(d.clone().subtract(1, 'd'));\n }\n },\n right: function right(widget) {\n if (!widget) {\n return;\n }\n var d = this.date() || this.getMoment();\n if (widget.find('.datepicker').is(':visible')) {\n this.date(d.clone().add(1, 'd'));\n }\n },\n pageUp: function pageUp(widget) {\n if (!widget) {\n return;\n }\n var d = this.date() || this.getMoment();\n if (widget.find('.datepicker').is(':visible')) {\n this.date(d.clone().subtract(1, 'M'));\n }\n },\n pageDown: function pageDown(widget) {\n if (!widget) {\n return;\n }\n var d = this.date() || this.getMoment();\n if (widget.find('.datepicker').is(':visible')) {\n this.date(d.clone().add(1, 'M'));\n }\n },\n enter: function enter() {\n this.hide();\n },\n escape: function escape() {\n this.hide();\n },\n //tab: function (widget) { //this break the flow of the form. disabling for now\n // var toggle = widget.find('.picker-switch a[data-action=\"togglePicker\"]');\n // if(toggle.length > 0) toggle.click();\n //},\n 'control space': function controlSpace(widget) {\n if (!widget) {\n return;\n }\n if (widget.find('.timepicker').is(':visible')) {\n widget.find('.btn[data-action=\"togglePeriod\"]').click();\n }\n },\n t: function t() {\n this.date(this.getMoment());\n },\n 'delete': function _delete() {\n this.clear();\n }\n },\n debug: false,\n allowInputToggle: false,\n disabledTimeIntervals: false,\n disabledHours: false,\n enabledHours: false,\n viewDate: false\n };\n return $.fn.datetimepicker;\n});"],"sourceRoot":""}