@zeedhi/common 3.0.6 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/coverage/clover.xml +5676 -0
- package/coverage/coverage-final.json +147 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +1331 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov-report/src/components/index.html +116 -0
- package/coverage/lcov-report/src/components/index.ts.html +730 -0
- package/coverage/lcov-report/src/components/tek-grid/columns-searcher.ts.html +151 -0
- package/coverage/lcov-report/src/components/tek-grid/dynamic-filter-datasource-factory.ts.html +145 -0
- package/coverage/lcov-report/src/components/tek-grid/filter-helper.ts.html +145 -0
- package/coverage/lcov-report/src/components/tek-grid/grid-filter-button.ts.html +1351 -0
- package/coverage/lcov-report/src/components/tek-grid/grouped-data-manager.ts.html +1429 -0
- package/coverage/lcov-report/src/components/tek-grid/grouped-data-selector.ts.html +205 -0
- package/coverage/lcov-report/src/components/tek-grid/grouped-view-navigator.ts.html +340 -0
- package/coverage/lcov-report/src/components/tek-grid/index.html +326 -0
- package/coverage/lcov-report/src/components/tek-grid/index.ts.html +139 -0
- package/coverage/lcov-report/src/components/tek-grid/interfaces.ts.html +1072 -0
- package/coverage/lcov-report/src/components/tek-grid/keymap-grouped.ts.html +148 -0
- package/coverage/lcov-report/src/components/tek-grid/layout-options.ts.html +829 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-datasource/index.html +161 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-datasource/index.ts.html +94 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-datasource/interfaces.ts.html +193 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-datasource/tek-memory-datasource.ts.html +1027 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-datasource/tek-rest-datasource.ts.html +757 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-grid-column.ts.html +664 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-grid-columns-button/index.html +131 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button-controller.ts.html +169 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button.ts.html +196 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-grid-controller.ts.html +505 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-grid-events.ts.html +400 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-grid-toolbar-provider/export-options/button-option.ts.html +163 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-grid-toolbar-provider/export-options/index.html +146 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-grid-toolbar-provider/export-options/index.ts.html +94 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-grid-toolbar-provider/export-options/multi-option.ts.html +340 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-grid-toolbar-provider/index.html +131 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-grid-toolbar-provider/index.ts.html +91 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-grid-toolbar-provider/tek-grid-toolbar-provider.ts.html +1186 -0
- package/coverage/lcov-report/src/components/tek-grid/tek-grid.ts.html +3451 -0
- package/coverage/lcov-report/src/components/zd-alert/alert.ts.html +502 -0
- package/coverage/lcov-report/src/components/zd-alert/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-badge/badge.ts.html +226 -0
- package/coverage/lcov-report/src/components/zd-badge/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-breadcrumbs/breadcrumbs.ts.html +226 -0
- package/coverage/lcov-report/src/components/zd-breadcrumbs/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-button/button.ts.html +706 -0
- package/coverage/lcov-report/src/components/zd-button/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-button-group/button-group.ts.html +412 -0
- package/coverage/lcov-report/src/components/zd-button-group/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-card/card.ts.html +748 -0
- package/coverage/lcov-report/src/components/zd-card/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-carousel/carousel.ts.html +949 -0
- package/coverage/lcov-report/src/components/zd-carousel/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-checkbox/checkbox.ts.html +148 -0
- package/coverage/lcov-report/src/components/zd-checkbox/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-checkbox-multiple/checkbox-multiple.ts.html +313 -0
- package/coverage/lcov-report/src/components/zd-checkbox-multiple/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-chip/chip.ts.html +352 -0
- package/coverage/lcov-report/src/components/zd-chip/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-code-editor/code-editor.ts.html +1045 -0
- package/coverage/lcov-report/src/components/zd-code-editor/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-code-viewer/code-viewer.ts.html +682 -0
- package/coverage/lcov-report/src/components/zd-code-viewer/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-col/col.ts.html +250 -0
- package/coverage/lcov-report/src/components/zd-col/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-collapse-card/collapse-card.ts.html +343 -0
- package/coverage/lcov-report/src/components/zd-collapse-card/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-component/child-not-found.ts.html +109 -0
- package/coverage/lcov-report/src/components/zd-component/component-render.ts.html +160 -0
- package/coverage/lcov-report/src/components/zd-component/component.ts.html +1084 -0
- package/coverage/lcov-report/src/components/zd-component/index.html +146 -0
- package/coverage/lcov-report/src/components/zd-container/container.ts.html +289 -0
- package/coverage/lcov-report/src/components/zd-container/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-currency/currency.ts.html +259 -0
- package/coverage/lcov-report/src/components/zd-currency/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-date-input/date-input.ts.html +1441 -0
- package/coverage/lcov-report/src/components/zd-date-input/index.html +131 -0
- package/coverage/lcov-report/src/components/zd-date-input/utils.ts.html +136 -0
- package/coverage/lcov-report/src/components/zd-date-range/date-range.ts.html +1873 -0
- package/coverage/lcov-report/src/components/zd-date-range/index.html +131 -0
- package/coverage/lcov-report/src/components/zd-date-range/utils.ts.html +178 -0
- package/coverage/lcov-report/src/components/zd-dialog/dialog.ts.html +541 -0
- package/coverage/lcov-report/src/components/zd-dialog/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-divider/divider.ts.html +178 -0
- package/coverage/lcov-report/src/components/zd-divider/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-dropdown/dropdown.ts.html +460 -0
- package/coverage/lcov-report/src/components/zd-dropdown/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-field-group/field-group.ts.html +325 -0
- package/coverage/lcov-report/src/components/zd-field-group/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-footer/footer.ts.html +451 -0
- package/coverage/lcov-report/src/components/zd-footer/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-form/form.ts.html +1075 -0
- package/coverage/lcov-report/src/components/zd-form/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-frame/frame.ts.html +763 -0
- package/coverage/lcov-report/src/components/zd-frame/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-frame-page/frame-page.ts.html +169 -0
- package/coverage/lcov-report/src/components/zd-frame-page/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-grid/data-navigator.ts.html +304 -0
- package/coverage/lcov-report/src/components/zd-grid/data-selector.ts.html +532 -0
- package/coverage/lcov-report/src/components/zd-grid/grid-column.ts.html +709 -0
- package/coverage/lcov-report/src/components/zd-grid/grid-events.ts.html +244 -0
- package/coverage/lcov-report/src/components/zd-grid/grid.ts.html +1042 -0
- package/coverage/lcov-report/src/components/zd-grid/index.html +266 -0
- package/coverage/lcov-report/src/components/zd-grid/index.ts.html +118 -0
- package/coverage/lcov-report/src/components/zd-grid/iterable-table.ts.html +274 -0
- package/coverage/lcov-report/src/components/zd-grid/keymap-merger.ts.html +241 -0
- package/coverage/lcov-report/src/components/zd-grid/keymap-navigation.ts.html +313 -0
- package/coverage/lcov-report/src/components/zd-grid/table-action-builder.ts.html +427 -0
- package/coverage/lcov-report/src/components/zd-grid/view-navigator.ts.html +175 -0
- package/coverage/lcov-report/src/components/zd-grid-editable/data-editor-with-add.ts.html +826 -0
- package/coverage/lcov-report/src/components/zd-grid-editable/data-editor.ts.html +1570 -0
- package/coverage/lcov-report/src/components/zd-grid-editable/errors/index.html +146 -0
- package/coverage/lcov-report/src/components/zd-grid-editable/errors/index.ts.html +91 -0
- package/coverage/lcov-report/src/components/zd-grid-editable/errors/not-editing.ts.html +109 -0
- package/coverage/lcov-report/src/components/zd-grid-editable/errors/row-not-found.ts.html +109 -0
- package/coverage/lcov-report/src/components/zd-grid-editable/grid-column-editable.ts.html +130 -0
- package/coverage/lcov-report/src/components/zd-grid-editable/grid-editable-controller.ts.html +139 -0
- package/coverage/lcov-report/src/components/zd-grid-editable/grid-editable-events.ts.html +430 -0
- package/coverage/lcov-report/src/components/zd-grid-editable/grid-editable.ts.html +1477 -0
- package/coverage/lcov-report/src/components/zd-grid-editable/index.html +221 -0
- package/coverage/lcov-report/src/components/zd-grid-editable/index.ts.html +109 -0
- package/coverage/lcov-report/src/components/zd-grid-editable/keymap-editing.ts.html +139 -0
- package/coverage/lcov-report/src/components/zd-header/header.ts.html +502 -0
- package/coverage/lcov-report/src/components/zd-header/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-icon/icon.ts.html +325 -0
- package/coverage/lcov-report/src/components/zd-icon/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-image/image.ts.html +424 -0
- package/coverage/lcov-report/src/components/zd-image/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-increment/increment.ts.html +436 -0
- package/coverage/lcov-report/src/components/zd-increment/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-input/index.html +131 -0
- package/coverage/lcov-report/src/components/zd-input/input-factory.ts.html +130 -0
- package/coverage/lcov-report/src/components/zd-input/input.ts.html +1345 -0
- package/coverage/lcov-report/src/components/zd-iterable/column-not-found.ts.html +109 -0
- package/coverage/lcov-report/src/components/zd-iterable/column.ts.html +823 -0
- package/coverage/lcov-report/src/components/zd-iterable/conditions-manager.ts.html +523 -0
- package/coverage/lcov-report/src/components/zd-iterable/index.html +281 -0
- package/coverage/lcov-report/src/components/zd-iterable/iterable-columns-button-controller.ts.html +136 -0
- package/coverage/lcov-report/src/components/zd-iterable/iterable-columns-button.ts.html +313 -0
- package/coverage/lcov-report/src/components/zd-iterable/iterable-controller.ts.html +166 -0
- package/coverage/lcov-report/src/components/zd-iterable/iterable-page-component.ts.html +244 -0
- package/coverage/lcov-report/src/components/zd-iterable/iterable-page-info.ts.html +106 -0
- package/coverage/lcov-report/src/components/zd-iterable/iterable-page-size.ts.html +421 -0
- package/coverage/lcov-report/src/components/zd-iterable/iterable-pagination.ts.html +208 -0
- package/coverage/lcov-report/src/components/zd-iterable/iterable.ts.html +934 -0
- package/coverage/lcov-report/src/components/zd-iterable/search.ts.html +343 -0
- package/coverage/lcov-report/src/components/zd-iterable-component-render/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-iterable-component-render/iterable-component-render.ts.html +592 -0
- package/coverage/lcov-report/src/components/zd-layout/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-layout/layout.ts.html +145 -0
- package/coverage/lcov-report/src/components/zd-list/index.html +161 -0
- package/coverage/lcov-report/src/components/zd-list/item-not-found.ts.html +109 -0
- package/coverage/lcov-report/src/components/zd-list/list-group.ts.html +241 -0
- package/coverage/lcov-report/src/components/zd-list/list-item.ts.html +298 -0
- package/coverage/lcov-report/src/components/zd-list/list.ts.html +460 -0
- package/coverage/lcov-report/src/components/zd-loading/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-loading/loading.ts.html +217 -0
- package/coverage/lcov-report/src/components/zd-login/index.html +131 -0
- package/coverage/lcov-report/src/components/zd-login/login-button.ts.html +421 -0
- package/coverage/lcov-report/src/components/zd-login/login.ts.html +340 -0
- package/coverage/lcov-report/src/components/zd-main/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-main/main.ts.html +133 -0
- package/coverage/lcov-report/src/components/zd-master-detail/detail-not-found.ts.html +118 -0
- package/coverage/lcov-report/src/components/zd-master-detail/index.html +146 -0
- package/coverage/lcov-report/src/components/zd-master-detail/master-detail.ts.html +331 -0
- package/coverage/lcov-report/src/components/zd-master-detail/master-not-found.ts.html +118 -0
- package/coverage/lcov-report/src/components/zd-menu/index.html +176 -0
- package/coverage/lcov-report/src/components/zd-menu/menu-button.ts.html +241 -0
- package/coverage/lcov-report/src/components/zd-menu/menu-group.ts.html +400 -0
- package/coverage/lcov-report/src/components/zd-menu/menu-link.ts.html +337 -0
- package/coverage/lcov-report/src/components/zd-menu/menu-separator.ts.html +106 -0
- package/coverage/lcov-report/src/components/zd-menu/menu.ts.html +1384 -0
- package/coverage/lcov-report/src/components/zd-modal/index.html +131 -0
- package/coverage/lcov-report/src/components/zd-modal/modal-close-button.ts.html +220 -0
- package/coverage/lcov-report/src/components/zd-modal/modal.ts.html +355 -0
- package/coverage/lcov-report/src/components/zd-month/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-month/month.ts.html +352 -0
- package/coverage/lcov-report/src/components/zd-number-input/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-number-input/number-input.ts.html +532 -0
- package/coverage/lcov-report/src/components/zd-password/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-password/password.ts.html +220 -0
- package/coverage/lcov-report/src/components/zd-progress/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-progress/progress.ts.html +262 -0
- package/coverage/lcov-report/src/components/zd-radio/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-radio/radio.ts.html +289 -0
- package/coverage/lcov-report/src/components/zd-row/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-row/row.ts.html +256 -0
- package/coverage/lcov-report/src/components/zd-select/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-select/select.ts.html +2089 -0
- package/coverage/lcov-report/src/components/zd-select-multiple/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-select-multiple/select-multiple.ts.html +1549 -0
- package/coverage/lcov-report/src/components/zd-svg-map/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-svg-map/svg-map.ts.html +475 -0
- package/coverage/lcov-report/src/components/zd-switch/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-switch/switch.ts.html +163 -0
- package/coverage/lcov-report/src/components/zd-table/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-table/table.ts.html +280 -0
- package/coverage/lcov-report/src/components/zd-tabs/index.html +146 -0
- package/coverage/lcov-report/src/components/zd-tabs/tab-not-found.ts.html +127 -0
- package/coverage/lcov-report/src/components/zd-tabs/tab.ts.html +370 -0
- package/coverage/lcov-report/src/components/zd-tabs/tabs.ts.html +586 -0
- package/coverage/lcov-report/src/components/zd-tag/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-tag/tag.ts.html +142 -0
- package/coverage/lcov-report/src/components/zd-text/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-text/text.ts.html +136 -0
- package/coverage/lcov-report/src/components/zd-text-input/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-text-input/text-input.ts.html +778 -0
- package/coverage/lcov-report/src/components/zd-textarea/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-textarea/textarea.ts.html +418 -0
- package/coverage/lcov-report/src/components/zd-time/index.html +131 -0
- package/coverage/lcov-report/src/components/zd-time/time-format-selector.ts.html +157 -0
- package/coverage/lcov-report/src/components/zd-time/time.ts.html +1687 -0
- package/coverage/lcov-report/src/components/zd-toggleable/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-toggleable/toggleable.ts.html +196 -0
- package/coverage/lcov-report/src/components/zd-tooltip/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-tooltip/tooltip.ts.html +340 -0
- package/coverage/lcov-report/src/components/zd-tree/index.html +116 -0
- package/coverage/lcov-report/src/components/zd-tree/tree.ts.html +1849 -0
- package/coverage/lcov-report/src/components/zd-tree-grid/index.html +191 -0
- package/coverage/lcov-report/src/components/zd-tree-grid/index.ts.html +103 -0
- package/coverage/lcov-report/src/components/zd-tree-grid/iterable-tree.ts.html +202 -0
- package/coverage/lcov-report/src/components/zd-tree-grid/keymap-tree.ts.html +154 -0
- package/coverage/lcov-report/src/components/zd-tree-grid/tree-data-navigator.ts.html +235 -0
- package/coverage/lcov-report/src/components/zd-tree-grid/tree-data-selector.ts.html +448 -0
- package/coverage/lcov-report/src/components/zd-tree-grid/tree-grid.ts.html +1390 -0
- package/coverage/lcov-report/src/error/delete-rows.ts.html +124 -0
- package/coverage/lcov-report/src/error/index.html +161 -0
- package/coverage/lcov-report/src/error/index.ts.html +94 -0
- package/coverage/lcov-report/src/error/non-initialized.ts.html +118 -0
- package/coverage/lcov-report/src/error/tek-grid-delete-rows.ts.html +130 -0
- package/coverage/lcov-report/src/error/teknisa-common-error.ts.html +109 -0
- package/coverage/lcov-report/src/error/zeedhi-error.ts.html +109 -0
- package/coverage/lcov-report/src/index.html +116 -0
- package/coverage/lcov-report/src/index.ts.html +145 -0
- package/coverage/lcov-report/src/services/index.html +116 -0
- package/coverage/lcov-report/src/services/index.ts.html +97 -0
- package/coverage/lcov-report/src/services/zd-alert/alert-queue.ts.html +205 -0
- package/coverage/lcov-report/src/services/zd-alert/alert-replace.ts.html +220 -0
- package/coverage/lcov-report/src/services/zd-alert/alert-service.ts.html +316 -0
- package/coverage/lcov-report/src/services/zd-alert/alert-stack.ts.html +172 -0
- package/coverage/lcov-report/src/services/zd-alert/index.html +176 -0
- package/coverage/lcov-report/src/services/zd-alert/index.ts.html +100 -0
- package/coverage/lcov-report/src/services/zd-dialog/dialog-service.ts.html +205 -0
- package/coverage/lcov-report/src/services/zd-dialog/index.html +116 -0
- package/coverage/lcov-report/src/services/zd-loading/index.html +116 -0
- package/coverage/lcov-report/src/services/zd-loading/loading-service.ts.html +157 -0
- package/coverage/lcov-report/src/services/zd-modal/index.html +116 -0
- package/coverage/lcov-report/src/services/zd-modal/modal-service.ts.html +298 -0
- package/coverage/lcov-report/src/utils/data-value-out/data-value-out.ts.html +202 -0
- package/coverage/lcov-report/src/utils/data-value-out/index.html +131 -0
- package/coverage/lcov-report/src/utils/data-value-out/index.ts.html +91 -0
- package/coverage/lcov-report/src/utils/datasource-searcher/datasource-searcher.ts.html +241 -0
- package/coverage/lcov-report/src/utils/datasource-searcher/index.html +131 -0
- package/coverage/lcov-report/src/utils/datasource-searcher/index.ts.html +91 -0
- package/coverage/lcov-report/src/utils/date-utils/date-utils.ts.html +166 -0
- package/coverage/lcov-report/src/utils/date-utils/index.html +116 -0
- package/coverage/lcov-report/src/utils/icons/icons.ts.html +547 -0
- package/coverage/lcov-report/src/utils/icons/index.html +116 -0
- package/coverage/lcov-report/src/utils/index.html +116 -0
- package/coverage/lcov-report/src/utils/index.ts.html +106 -0
- package/coverage/lcov-report/src/utils/is-filled-object/index.html +116 -0
- package/coverage/lcov-report/src/utils/is-filled-object/is-filled-object.ts.html +100 -0
- package/coverage/lcov-report/src/utils/is-nil.ts.html +94 -0
- package/coverage/lcov-report/src/utils/omit/index.html +116 -0
- package/coverage/lcov-report/src/utils/omit/omit.ts.html +124 -0
- package/coverage/lcov-report/src/utils/theme/index.html +116 -0
- package/coverage/lcov-report/src/utils/theme/theme.ts.html +679 -0
- package/coverage/lcov-report/src/utils/tree-data-structure/index.html +131 -0
- package/coverage/lcov-report/src/utils/tree-data-structure/index.ts.html +91 -0
- package/coverage/lcov-report/src/utils/tree-data-structure/tree-data-structure.ts.html +1645 -0
- package/coverage/lcov-report/src/utils/unique-by/index.html +116 -0
- package/coverage/lcov-report/src/utils/unique-by/unique-by.ts.html +130 -0
- package/coverage/lcov-report/tests/unit/__helpers__/component-event-helper.ts.html +106 -0
- package/coverage/lcov-report/tests/unit/__helpers__/flush-promises-helper.ts.html +94 -0
- package/coverage/lcov-report/tests/unit/__helpers__/index.html +146 -0
- package/coverage/lcov-report/tests/unit/__helpers__/mock-http-get-helper.ts.html +172 -0
- package/coverage/lcov-report/tests/unit/components/zd-component/ComponentMock.ts.html +166 -0
- package/coverage/lcov-report/tests/unit/components/zd-component/index.html +116 -0
- package/coverage/lcov.info +10070 -0
- package/dist/style.css +1 -1
- package/dist/zd-common.d.mts +7826 -0
- package/dist/zd-common.iife.min.js +11 -0
- package/dist/zd-common.mjs +12318 -0
- package/package.json +16 -12
- package/src/components/zd-date-input/date-input.ts +40 -147
- package/src/components/zd-date-input/utils.ts +17 -0
- package/src/components/zd-date-range/date-range.ts +86 -210
- package/src/components/zd-date-range/utils.ts +31 -0
- package/src/components/zd-frame/frame.ts +2 -2
- package/src/components/zd-grid-editable/data-editor-with-add.ts +1 -1
- package/src/components/zd-grid-editable/data-editor.ts +2 -2
- package/src/components/zd-month/month.ts +19 -91
- package/src/styles/_display.scss +3 -1
- package/src/styles/_elevation.scss +2 -1
- package/src/styles/_functions.scss +14 -11
- package/src/styles/_utilities.scss +67 -62
- package/src/styles/_variables.scss +17 -16
- package/src/styles/index.scss +5 -5
- package/src/utils/date-utils/date-utils.ts +9 -0
- package/src/utils/tree-data-structure/tree-data-structure.ts +1 -1
- package/tests/unit/components/zd-date-input/date-input.spec.ts +36 -281
- package/tests/unit/components/zd-date-range/date-range.spec.ts +372 -475
- package/tests/unit/components/zd-grid/grid-column.spec.ts +1 -1
- package/tests/unit/components/zd-month/month.spec.ts +7 -334
- package/tests/unit/components/zd-select/select.spec.ts +1 -2
- package/tsdown.config.ts +74 -0
- package/dist/types/components/index.d.ts +0 -151
- package/dist/types/components/zd-alert/alert.d.ts +0 -94
- package/dist/types/components/zd-alert/interfaces.d.ts +0 -18
- package/dist/types/components/zd-badge/badge.d.ts +0 -28
- package/dist/types/components/zd-badge/interfaces.d.ts +0 -10
- package/dist/types/components/zd-breadcrumbs/breadcrumbs.d.ts +0 -32
- package/dist/types/components/zd-breadcrumbs/interfaces.d.ts +0 -24
- package/dist/types/components/zd-button/button.d.ts +0 -89
- package/dist/types/components/zd-button/interfaces.d.ts +0 -48
- package/dist/types/components/zd-button-group/button-group.d.ts +0 -67
- package/dist/types/components/zd-button-group/interfaces.d.ts +0 -25
- package/dist/types/components/zd-card/card.d.ts +0 -152
- package/dist/types/components/zd-card/interfaces.d.ts +0 -40
- package/dist/types/components/zd-carousel/carousel.d.ts +0 -163
- package/dist/types/components/zd-carousel/interfaces.d.ts +0 -49
- package/dist/types/components/zd-checkbox/checkbox.d.ts +0 -12
- package/dist/types/components/zd-checkbox/interfaces.d.ts +0 -5
- package/dist/types/components/zd-checkbox-multiple/checkbox-multiple.d.ts +0 -39
- package/dist/types/components/zd-checkbox-multiple/interfaces.d.ts +0 -13
- package/dist/types/components/zd-chip/chip.d.ts +0 -60
- package/dist/types/components/zd-chip/interfaces.d.ts +0 -18
- package/dist/types/components/zd-code-viewer/code-viewer.d.ts +0 -86
- package/dist/types/components/zd-code-viewer/interfaces.d.ts +0 -13
- package/dist/types/components/zd-col/col.d.ts +0 -33
- package/dist/types/components/zd-col/interfaces.d.ts +0 -15
- package/dist/types/components/zd-collapse-card/collapse-card.d.ts +0 -56
- package/dist/types/components/zd-collapse-card/interfaces.d.ts +0 -14
- package/dist/types/components/zd-component/child-not-found.d.ts +0 -6
- package/dist/types/components/zd-component/component-render.d.ts +0 -16
- package/dist/types/components/zd-component/component.d.ts +0 -120
- package/dist/types/components/zd-component/interfaces.d.ts +0 -74
- package/dist/types/components/zd-container/container.d.ts +0 -45
- package/dist/types/components/zd-container/interfaces.d.ts +0 -12
- package/dist/types/components/zd-currency/currency.d.ts +0 -12
- package/dist/types/components/zd-currency/interfaces.d.ts +0 -6
- package/dist/types/components/zd-date-input/date-input.d.ts +0 -152
- package/dist/types/components/zd-date-input/interfaces.d.ts +0 -27
- package/dist/types/components/zd-date-range/date-range.d.ts +0 -160
- package/dist/types/components/zd-date-range/interfaces.d.ts +0 -18
- package/dist/types/components/zd-dialog/dialog.d.ts +0 -76
- package/dist/types/components/zd-dialog/interfaces.d.ts +0 -13
- package/dist/types/components/zd-divider/divider.d.ts +0 -20
- package/dist/types/components/zd-divider/interfaces.d.ts +0 -8
- package/dist/types/components/zd-dropdown/dropdown.d.ts +0 -81
- package/dist/types/components/zd-dropdown/interfaces.d.ts +0 -23
- package/dist/types/components/zd-footer/footer.d.ts +0 -80
- package/dist/types/components/zd-footer/interfaces.d.ts +0 -26
- package/dist/types/components/zd-form/form.d.ts +0 -174
- package/dist/types/components/zd-form/interfaces.d.ts +0 -36
- package/dist/types/components/zd-frame/frame.d.ts +0 -81
- package/dist/types/components/zd-frame/interfaces.d.ts +0 -23
- package/dist/types/components/zd-frame-page/frame-page.d.ts +0 -14
- package/dist/types/components/zd-frame-page/interfaces.d.ts +0 -4
- package/dist/types/components/zd-grid/data-navigator.d.ts +0 -12
- package/dist/types/components/zd-grid/data-selector.d.ts +0 -25
- package/dist/types/components/zd-grid/grid-column.d.ts +0 -47
- package/dist/types/components/zd-grid/grid-events.d.ts +0 -26
- package/dist/types/components/zd-grid/grid.d.ts +0 -85
- package/dist/types/components/zd-grid/index.d.ts +0 -11
- package/dist/types/components/zd-grid/interfaces.d.ts +0 -148
- package/dist/types/components/zd-grid/iterable-table.d.ts +0 -28
- package/dist/types/components/zd-grid/keymap-merger.d.ts +0 -26
- package/dist/types/components/zd-grid/keymap-navigation.d.ts +0 -6
- package/dist/types/components/zd-grid/table-action-builder.d.ts +0 -19
- package/dist/types/components/zd-grid/view-navigator.d.ts +0 -10
- package/dist/types/components/zd-grid-editable/data-editor-with-add.d.ts +0 -35
- package/dist/types/components/zd-grid-editable/data-editor.d.ts +0 -64
- package/dist/types/components/zd-grid-editable/errors/index.d.ts +0 -2
- package/dist/types/components/zd-grid-editable/errors/not-editing.d.ts +0 -6
- package/dist/types/components/zd-grid-editable/errors/row-not-found.d.ts +0 -6
- package/dist/types/components/zd-grid-editable/grid-column-editable.d.ts +0 -9
- package/dist/types/components/zd-grid-editable/grid-editable-controller.d.ts +0 -8
- package/dist/types/components/zd-grid-editable/grid-editable-events.d.ts +0 -32
- package/dist/types/components/zd-grid-editable/grid-editable.d.ts +0 -124
- package/dist/types/components/zd-grid-editable/index.d.ts +0 -8
- package/dist/types/components/zd-grid-editable/interfaces.d.ts +0 -66
- package/dist/types/components/zd-grid-editable/keymap-editing.d.ts +0 -7
- package/dist/types/components/zd-header/header.d.ts +0 -94
- package/dist/types/components/zd-header/interfaces.d.ts +0 -29
- package/dist/types/components/zd-icon/icon.d.ts +0 -55
- package/dist/types/components/zd-icon/interfaces.d.ts +0 -13
- package/dist/types/components/zd-image/image.d.ts +0 -73
- package/dist/types/components/zd-image/interfaces.d.ts +0 -17
- package/dist/types/components/zd-increment/increment.d.ts +0 -56
- package/dist/types/components/zd-increment/interfaces.d.ts +0 -9
- package/dist/types/components/zd-input/input-factory.d.ts +0 -6
- package/dist/types/components/zd-input/input.d.ts +0 -223
- package/dist/types/components/zd-input/interfaces.d.ts +0 -38
- package/dist/types/components/zd-iterable/column-not-found.d.ts +0 -6
- package/dist/types/components/zd-iterable/column.d.ts +0 -78
- package/dist/types/components/zd-iterable/conditions-manager.d.ts +0 -49
- package/dist/types/components/zd-iterable/interfaces.d.ts +0 -103
- package/dist/types/components/zd-iterable/iterable-columns-button-controller.d.ts +0 -9
- package/dist/types/components/zd-iterable/iterable-columns-button.d.ts +0 -35
- package/dist/types/components/zd-iterable/iterable-controller.d.ts +0 -8
- package/dist/types/components/zd-iterable/iterable-page-component.d.ts +0 -27
- package/dist/types/components/zd-iterable/iterable-page-info.d.ts +0 -7
- package/dist/types/components/zd-iterable/iterable-page-size.d.ts +0 -62
- package/dist/types/components/zd-iterable/iterable-pagination.d.ts +0 -28
- package/dist/types/components/zd-iterable/iterable.d.ts +0 -86
- package/dist/types/components/zd-iterable/search.d.ts +0 -31
- package/dist/types/components/zd-iterable-component-render/interfaces.d.ts +0 -34
- package/dist/types/components/zd-iterable-component-render/iterable-component-render.d.ts +0 -84
- package/dist/types/components/zd-layout/interfaces.d.ts +0 -7
- package/dist/types/components/zd-layout/layout.d.ts +0 -9
- package/dist/types/components/zd-list/interfaces.d.ts +0 -44
- package/dist/types/components/zd-list/item-not-found.d.ts +0 -6
- package/dist/types/components/zd-list/list-group.d.ts +0 -30
- package/dist/types/components/zd-list/list-item.d.ts +0 -46
- package/dist/types/components/zd-list/list.d.ts +0 -81
- package/dist/types/components/zd-loading/interfaces.d.ts +0 -7
- package/dist/types/components/zd-loading/loading.d.ts +0 -21
- package/dist/types/components/zd-login/interfaces.d.ts +0 -25
- package/dist/types/components/zd-login/login-button.d.ts +0 -50
- package/dist/types/components/zd-login/login.d.ts +0 -54
- package/dist/types/components/zd-main/interfaces.d.ts +0 -5
- package/dist/types/components/zd-main/main.d.ts +0 -7
- package/dist/types/components/zd-master-detail/detail-not-found.d.ts +0 -7
- package/dist/types/components/zd-master-detail/interfaces.d.ts +0 -10
- package/dist/types/components/zd-master-detail/master-detail.d.ts +0 -18
- package/dist/types/components/zd-master-detail/master-not-found.d.ts +0 -7
- package/dist/types/components/zd-menu/interfaces.d.ts +0 -68
- package/dist/types/components/zd-menu/menu-button.d.ts +0 -29
- package/dist/types/components/zd-menu/menu-group.d.ts +0 -61
- package/dist/types/components/zd-menu/menu-link.d.ts +0 -50
- package/dist/types/components/zd-menu/menu-separator.d.ts +0 -7
- package/dist/types/components/zd-menu/menu.d.ts +0 -199
- package/dist/types/components/zd-modal/interfaces.d.ts +0 -35
- package/dist/types/components/zd-modal/modal-close-button.d.ts +0 -28
- package/dist/types/components/zd-modal/modal.d.ts +0 -53
- package/dist/types/components/zd-month/interfaces.d.ts +0 -6
- package/dist/types/components/zd-month/month.d.ts +0 -33
- package/dist/types/components/zd-number-input/interfaces.d.ts +0 -8
- package/dist/types/components/zd-number-input/number-input.d.ts +0 -43
- package/dist/types/components/zd-password/interfaces.d.ts +0 -6
- package/dist/types/components/zd-password/password.d.ts +0 -17
- package/dist/types/components/zd-progress/interfaces.d.ts +0 -10
- package/dist/types/components/zd-progress/progress.d.ts +0 -41
- package/dist/types/components/zd-radio/interfaces.d.ts +0 -11
- package/dist/types/components/zd-radio/radio.d.ts +0 -35
- package/dist/types/components/zd-row/interfaces.d.ts +0 -13
- package/dist/types/components/zd-row/row.d.ts +0 -39
- package/dist/types/components/zd-select/interfaces.d.ts +0 -24
- package/dist/types/components/zd-select/select.d.ts +0 -238
- package/dist/types/components/zd-select-multiple/interfaces.d.ts +0 -18
- package/dist/types/components/zd-select-multiple/select-multiple.d.ts +0 -113
- package/dist/types/components/zd-svg-map/interfaces.d.ts +0 -26
- package/dist/types/components/zd-svg-map/svg-map.d.ts +0 -35
- package/dist/types/components/zd-switch/interfaces.d.ts +0 -7
- package/dist/types/components/zd-switch/switch.d.ts +0 -16
- package/dist/types/components/zd-table/interfaces.d.ts +0 -25
- package/dist/types/components/zd-table/table.d.ts +0 -42
- package/dist/types/components/zd-tabs/interfaces.d.ts +0 -40
- package/dist/types/components/zd-tabs/tab-not-found.d.ts +0 -11
- package/dist/types/components/zd-tabs/tab.d.ts +0 -57
- package/dist/types/components/zd-tabs/tabs.d.ts +0 -86
- package/dist/types/components/zd-tag/interfaces.d.ts +0 -7
- package/dist/types/components/zd-tag/tag.d.ts +0 -13
- package/dist/types/components/zd-text/interfaces.d.ts +0 -9
- package/dist/types/components/zd-text/text.d.ts +0 -8
- package/dist/types/components/zd-text-input/interfaces.d.ts +0 -23
- package/dist/types/components/zd-text-input/text-input.d.ts +0 -91
- package/dist/types/components/zd-textarea/interfaces.d.ts +0 -21
- package/dist/types/components/zd-textarea/textarea.d.ts +0 -71
- package/dist/types/components/zd-time/interfaces.d.ts +0 -22
- package/dist/types/components/zd-time/time-format-selector.d.ts +0 -8
- package/dist/types/components/zd-time/time.d.ts +0 -149
- package/dist/types/components/zd-toggleable/interfaces.d.ts +0 -6
- package/dist/types/components/zd-toggleable/toggleable.d.ts +0 -21
- package/dist/types/components/zd-tooltip/interfaces.d.ts +0 -18
- package/dist/types/components/zd-tooltip/tooltip.d.ts +0 -57
- package/dist/types/components/zd-tree/interfaces.d.ts +0 -107
- package/dist/types/components/zd-tree/tree.d.ts +0 -161
- package/dist/types/components/zd-tree-grid/index.d.ts +0 -6
- package/dist/types/components/zd-tree-grid/interfaces.d.ts +0 -35
- package/dist/types/components/zd-tree-grid/iterable-tree.d.ts +0 -10
- package/dist/types/components/zd-tree-grid/keymap-tree.d.ts +0 -7
- package/dist/types/components/zd-tree-grid/tree-data-navigator.d.ts +0 -10
- package/dist/types/components/zd-tree-grid/tree-data-selector.d.ts +0 -18
- package/dist/types/components/zd-tree-grid/tree-grid.d.ts +0 -119
- package/dist/types/error/delete-rows.d.ts +0 -7
- package/dist/types/error/index.d.ts +0 -3
- package/dist/types/error/non-initialized.d.ts +0 -7
- package/dist/types/error/zeedhi-error.d.ts +0 -6
- package/dist/types/index.d.ts +0 -6
- package/dist/types/services/index.d.ts +0 -4
- package/dist/types/services/zd-alert/alert-queue.d.ts +0 -13
- package/dist/types/services/zd-alert/alert-replace.d.ts +0 -18
- package/dist/types/services/zd-alert/alert-service.d.ts +0 -45
- package/dist/types/services/zd-alert/alert-stack.d.ts +0 -9
- package/dist/types/services/zd-alert/index.d.ts +0 -5
- package/dist/types/services/zd-alert/interfaces.d.ts +0 -6
- package/dist/types/services/zd-dialog/dialog-service.d.ts +0 -24
- package/dist/types/services/zd-loading/loading-service.d.ts +0 -17
- package/dist/types/services/zd-modal/modal-service.d.ts +0 -39
- package/dist/types/utils/data-value-out/data-value-out.d.ts +0 -5
- package/dist/types/utils/data-value-out/index.d.ts +0 -2
- package/dist/types/utils/data-value-out/interfaces.d.ts +0 -8
- package/dist/types/utils/datasource-searcher/datasource-searcher.d.ts +0 -6
- package/dist/types/utils/datasource-searcher/index.d.ts +0 -2
- package/dist/types/utils/datasource-searcher/interfaces.d.ts +0 -5
- package/dist/types/utils/date-utils/date-utils.d.ts +0 -1
- package/dist/types/utils/icons/icons.d.ts +0 -24
- package/dist/types/utils/index.d.ts +0 -7
- package/dist/types/utils/omit/omit.d.ts +0 -11
- package/dist/types/utils/theme/theme.d.ts +0 -34
- package/dist/types/utils/tree-data-structure/index.d.ts +0 -2
- package/dist/types/utils/tree-data-structure/interfaces.d.ts +0 -30
- package/dist/types/utils/tree-data-structure/tree-data-structure.d.ts +0 -155
- package/dist/types/utils/unique-by/unique-by.d.ts +0 -3
- package/dist/zd-common.js +0 -13184
- package/dist/zd-common.min.js +0 -13184
- package/rollup.config.js +0 -27
- package/rollup.scss.config.js +0 -14
- package/tsconfig.build.json +0 -7
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var ZdCommon=(function(e,t){var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),l=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(o=i(t,d))||o.enumerable});return e},u=(e,t,i)=>(i=e==null?{}:n(o(e)),l(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e));let d={defaultTheme:`light`,minifyTheme:e=>e.replace(/[\r\n|\r|\n]/g,``),variations:{colors:[`primary`,`secondary`,`grey`],darken:4,lighten:5},themes:{light:{colors:{primary:`#772583`,secondary:`#A0A0A0`,background:`#FFFFFF`,surface:`#FFFFFF`,accent:`#A08CA0`,error:`#FF5252`,info:`#2196F3`,success:`#4CAF50`,warning:`#FFC107`,anchor:`#772583`,grey:`#6A6A6A`}},dark:{colors:{primary:`#AE5AB9`,secondary:`#A0A0A0`,background:`#121212`,surface:`#1E1E1E`,accent:`#FF4081`,error:`#FF5252`,info:`#2196F3`,success:`#4CAF50`,warning:`#FB8C00`,anchor:`#772583`,grey:`#6A6A6A`}}},zeedhi:{light:{"scrollbar-track":`#F0F0F0`,"scrollbar-thumb":`#D4D4D4`},dark:{"scrollbar-track":`#252525`,"scrollbar-thumb":`#6A6A6A`},variables:{"default-padding":`16px`,"font-headline-size":`20px`,"font-headline-weight":`400`,"font-title-size":`18px`,"font-title-weight":`400`,"font-body1-size":`13px`,"font-body1-weight":`400`,"font-body2-size":`13px`,"font-body2-weight":`500`,"font-body3-size":`14px`,"font-body3-weight":`400`,"font-body4-size":`14px`,"font-body4-weight":`500`,"font-caption-size":`11px`,"font-caption-weight":`400`}}};function f(){let e=document.createElement(`style`);return e.type=`text/css`,e.id=`zeedhi-theme-stylesheet`,document.head.appendChild(e),e}function p(e,t,n=d.minifyTheme,r){let i=``;Object.keys(e.variables).forEach(t=>{i+=` --zd-${t}: ${e.variables[t]};\n`});let a=e[t]||{};Object.keys(a).forEach(e=>{i+=` --zd-${e}: ${a[e]};\n`}),i=`:root {\n${i}}\n\n`;let o=document.getElementById(`zeedhi-theme-stylesheet`);o||=f(),o.innerHTML=n(i),r&&o.setAttribute(`nonce`,r)}let m=e=>{let t={defaultTheme:d.defaultTheme,variations:{...d.variations},themes:{...d.themes}},n={...d.zeedhi};return e&&(t.defaultTheme=e.defaultTheme??d.defaultTheme,t.cspNonce=e.cspNonce,e.variations&&(t.variations={...d.variations,...e.variations}),e.themes&&Object.keys(e.themes).forEach(n=>{if(!d.themes[n]){t.themes[n]={...e.themes[n]};return}t.themes[n].dark=e.themes[n].dark??d.themes[n].dark,t.themes[n].colors={...d.themes[n].colors,...e.themes[n].colors}}),e.zeedhi&&Object.keys(e.zeedhi).forEach(t=>{if(!d.zeedhi[t]){n[t]={...e.zeedhi[t]};return}n[t]={...d.zeedhi[t],...e.zeedhi[t]}})),p(n,t.defaultTheme,e?.minifyTheme,e?.cspNonce),t};var h=class e{static mdiIcons={alertOctagon:`mdi-alert-octagon`,cancel:`mdi-close-circle`,calendar:`mdi-calendar`,checkboxIndeterminate:`mdi-minus-box`,checkboxOff:`mdi-checkbox-blank-outline`,checkboxOn:`mdi-checkbox-marked`,chevronUp:`mdi-chevron-up`,chevronRight:`mdi-chevron-right`,clear:`mdi-close`,close:`mdi-close`,complete:`mdi-check`,contentCopy:`mdi-content-copy`,delete:`mdi-close-circle`,delimiter:`mdi-circle`,dropdown:`mdi-menu-down`,edit:`mdi-pencil`,error:`mdi-alert`,expand:`mdi-chevron-down`,eye:`mdi-eye`,eyeOff:`mdi-eye-off`,file:`mdi-paperclip`,fileDownload:`mdi-file-download-outline`,first:`mdi-page-first`,info:`mdi-information`,infoOutline:`mdi-information-outline`,last:`mdi-page-last`,loading:`mdi-cached`,magnify:`mdi-magnify`,menu:`mdi-menu`,messageAlert:`mdi-message-alert`,minus:`mdi-minus`,next:`mdi-chevron-right`,pencil:`mdi-pencil`,pencilOff:`mdi-pencil-off`,plus:`mdi-plus`,prev:`mdi-chevron-left`,radioOff:`mdi-radiobox-blank`,radioOn:`mdi-radiobox-marked`,shieldCheck:`mdi-shield-check`,starOutline:`mdi-star-outline`,star:`mdi-star`,starHalf:`mdi-star-half`,sort:`mdi-arrow-up`,subgroup:`mdi-menu-down`,success:`mdi-check-circle`,tableConfig:`mdi-table-cog`,tableColumns:`mdi-table-headers-eye`,unfold:`mdi-unfold-more-horizontal`,warning:`mdi-exclamation`,zoom:`mdi-magnify`,zoomIn:`mdi-plus-circle-outline`,zoomPanning:`mdi-hand-back-right-outline`,zoomOut:`mdi-minus-circle-outline`,zoomReset:`mdi-magnify-close`,zoomSelection:`mdi-magnify-scan`};static faIcons={alertOctagon:`fa fa-exclamation-circle`,cancel:`fa fa-times-circle`,calendar:`fa fa-calendar-o`,checkboxIndeterminate:`fa fa-minus-square`,checkboxOff:`fa fa-square-o`,checkboxOn:`fa fa-check-square-o`,chevronUp:`fa fa-chevron-up`,chevronRight:`fa fa-chevron-right`,clear:`fa fa-times`,close:`fa fa-times`,complete:`fa fa-check`,contentCopy:`fa fa-clone`,delete:`fa fa-times-circle`,delimiter:`fa fa-circle`,dropdown:`fa fa-caret-down`,edit:`fa fa-pencil`,error:`fa fa-exclamation-triangle`,expand:`fa fa-chevron-down`,eye:`fa fa-eye`,eyeOff:`fa fa-eye-slash`,file:`fa fa-paperclip`,fileDownload:`fas fa-file-download`,first:`fa fa-step-backward`,info:`fa fa-info-circle`,infoOutline:`fa fa-info-circle`,last:`fa fa-step-forward`,loading:`fa fa-refresh`,magnify:`fa fa-search`,menu:`fa fa-bars`,messageAlert:`fa fa-exclamation`,minus:`fa fa-minus`,next:`fa fa-chevron-right`,pencil:`fa fa-pencil`,plus:`fa fa-plus`,prev:`fa fa-chevron-left`,radioOff:`fa fa-circle-o`,radioOn:`fa fa-stop-circle-o`,shieldCheck:`far fa-shield-check`,starOutline:`fa fa-star-o`,star:`fa fa-star`,starHalf:`fa fa-star-half-o`,sort:`fa fa-arrow-up`,subgroup:`fa fa-caret-down`,success:`fa fa-check-circle`,tableConfig:`fa fa-columns`,tableColumns:`fa fa-columns`,unfold:`fa fa-sort`,warning:`fa fa-exclamation`,zoom:`fa fa-search`,zoomIn:`fa fa-search-plus`,zoomPanning:`fa fa-hand-paper`,zoomOut:`fa fa-search-minus`,zoomReset:`fa fa-undo`,zoomSelection:`fa fa-expand`};static icons=(()=>e.mdiIcons)();static setIcons(t){e.icons={...t}}static addIcons(t){e.icons={...e.icons,...t}}static changeIconLibrary(t=`mdi`){t===`fa`?e.addIcons(e.faIcons):e.addIcons(e.mdiIcons)}static getIcons(){return e.icons}},g=class e{static getFormParent(e){let{formParent:n}=e;if(e.dataValueOutFormName)try{n=t.Metadata.getInstance(e.dataValueOutFormName)}catch{}return n}static setDataValueOut(n,r){let{dataValueOut:i}=n;if(i?.length&&typeof r==`object`){let a=e.getFormParent(n);a&&i.forEach(e=>{let{column:n,columnOnForm:i}=e;if(!n||!i)return;let o=r?r[n]:null;t.Utils.isEqual(a.value[i],o)||(a.value[i]=o)})}}};let _=(e,t)=>{let n={};return e.filter(e=>{let r=e[t]||JSON.stringify(e);return n[r]?!1:(n[r]=!0,!0)})};var v=class{dsSearch={SEARCH:(e,t)=>({searchIn:[t],search:String(e)}),FILTER:(e,t)=>({filter:{[t]:e}}),FIND:(e,t)=>({find:{[t]:e}}),DYNAMIC_FILTER:(e,t)=>{let n=(Array.isArray(e)?e:[e]).map(e=>({operation:`EQUALS`,relation:`OR`,value:e}));return{dynamicFilter:{[t]:n}}}};async search(e,n,r,i){let a={...e.clone(),...this.dsSearch[i](n,r),lazyLoad:!0,loadAll:Array.isArray(n)},o=t.DatasourceFactory.factory(a);await o.initialize();let s=await o.get();return o.destroy(),Array.isArray(n)?s.filter(e=>n.includes(e[r])):s.filter(e=>e[r]===n)}};let y=(e,t)=>{let{[t]:n,...r}=e;return r};var b=class{originalDatasource;parentField;openLevelOnLoad=!1;treeData=[];searchHasNoData=!1;treeStructure={};fieldHasChild=``;tree;constructor(e){this.parentField=e.parentField,this.openLevelOnLoad=e.openLevelOnLoad,this.fieldHasChild=e.fieldHasChild,this.tree=e}detach;get fetchOnDemand(){return this.tree.fetchOnDemand||!1}set fetchOnDemand(e){this.tree.fetchOnDemand!==void 0&&(this.tree.fetchOnDemand=e)}initialize(){this.originalDatasource=this.tree.datasource;let e=this.originalDatasource.get;this.originalDatasource.get=this.treeGetData(e),this.originalDatasource.reloadAndUpdateSelectedRows=this.reloadAndUpdateSelectedRows.bind(this)}searchValue=``;treeGetData(e){return async()=>(this.searchValue=this.originalDatasource.search,this.searchHasNoData=!1,this.fetchOnDemand&&(this.tree.detach||this.originalDatasource.search?delete this.originalDatasource.filter[this.parentField]:this.originalDatasource.filter[this.parentField]||(this.originalDatasource.filter[this.parentField]=`NULL`)),!this.tree.detach&&!this.fetchOnDemand&&this.searchValue?(this.searchAllData(),Promise.resolve(this.originalDatasource.data)):e.call(this.originalDatasource).then(e=>(this.searchValue?this.buildDetached():this.buildTree(),e)))}buildTree(){this.tree.detach?this.buildDetached():this.fetchOnDemand?this.buildOnDemand():this.buildAllData()}buildAllData(){this.treeData=[],this.treeStructure={},this.originalDatasource.data.forEach(e=>{let t=e[this.parentField]||`no-parent`;this.treeStructure[t]||(this.treeStructure[t]=[]),this.treeStructure[t].push({...e})}),this.buildTreeData(),this.sortData()}buildTreeData(e=void 0){let t=e?.[this.originalDatasource.uniqueKey]||`no-parent`,n=(this.treeStructure[t]||[]).map(t=>{let n=(e?.tree__level||0)+1;return t.tree__children=[{}],t.tree__opened=this.openLevelOnLoad===!0||n<=this.openLevelOnLoad,t.tree__parent=e,t.tree__level=n,t.tree__searched=!1,t});e&&(e.tree__children=n),n.forEach(e=>{this.treeData.push(e),this.buildTreeData(e)})}findDataIndex(e,t){let{uniqueKey:n}=this.originalDatasource;return e.findIndex(e=>e[n]===t)}buildOnDemand(){let e=this.originalDatasource.filter[this.parentField];e===`NULL`&&(e=`no-parent`,this.treeData=[],this.treeStructure={});let t=this.findDataIndex(this.treeData,e),n=t===-1?void 0:this.treeData[t];n&&(n.tree__children=[]);let r=this.originalDatasource.data.map(e=>{let t={...e,tree__children:[{}],tree__opened:!1,tree__searched:!1,tree__level:n?n.tree__level+1:1,tree__parent:n};return n&&n.tree__children.push(t),t});n&&(this.treeData=this.treeData.filter(e=>e.tree__parent!==n)),n?this.treeData.splice(t+1,0,...r):this.treeData=r,this.treeStructure[e]=[...r]}sortData(){let e=[],t=[];this.originalDatasource.order.forEach(n=>{let r=n.split(`.`);e.push(r[0]),t.push(r[1])}),this.treeData=[],this.originalDatasource.data=[],this.sortTreeDataRows(this.treeStructure[`no-parent`]||[],e,t)}sortTreeDataRows(e,t,n){let{uniqueKey:r}=this.originalDatasource;e.sort((e,r)=>this.sort(e,r,t,n)).forEach(e=>{this.treeData.push(e),this.originalDatasource.data.push(this.clearRow(e));let i=e[r];this.treeStructure[i]?.length&&this.sortTreeDataRows(this.treeStructure[i],t,n)})}sort(e,t,n,r,i=0){let a={asc:1,desc:-1,same:0};if(e[n[i]]===t[n[i]]){let o=i+1;return Object.hasOwn(n,o)?this.sort(e,t,n,r,o):a.same}return e[n[i]]>t[n[i]]?a[r[i]]:a[r[i]]*-1}isOpened(e){let t=this.getRowData(e),n=!this.searchValue||t.tree__searched,r=!t.tree__parent||t.tree__parent.tree__opened&&this.isOpened(t.tree__parent);return n&&r}previousOpenedRow(e){let t=-1;for(let n=e-1;n>=0;--n)if(this.isOpened(this.treeData[n])){t=n;break}return t}nextOpenedRow(e){let t=-1;for(let n=e+1;n<this.treeData.length;n+=1)if(this.isOpened(this.treeData[n])){t=n;break}return t}async toggleExpand(e,t=-1){let{uniqueKey:n}=this.originalDatasource,r=this.getRowData(e);if(r.tree__opened=!r.tree__opened,r.tree__opened&&this.fetchOnDemand&&r.tree__children.length===1&&!r.tree__children[0][n]){let r=t;r===-1&&(r=this.findDataIndex(this.treeData,e[n]));let i=[...this.originalDatasource.data],a=await this.originalDatasource.addFilter(this.parentField,e[n]);return i.splice(r+1,0,...a),this.originalDatasource.data=i,this.originalDatasource.currentRow=this.clearRow(e),delete this.originalDatasource.filter[this.parentField],a}}getRowData(e){if(e.tree__opened!==void 0)return e;let t=this.findDataIndex(this.treeData,e[this.originalDatasource.uniqueKey]);return this.treeData[t]}navigateToggle(e){let{currentRow:t}=this.originalDatasource,n=this.getRowData(t);n.tree__opened===e&&n.tree__children.length>0?this.toggleExpand(n):e&&n.tree__parent&&(this.originalDatasource.currentRow=this.clearRow(n.tree__parent))}async reloadAndUpdateSelectedRows(){this.sortData()}buildDetached(){this.treeData=[],this.treeStructure={};let e=this.originalDatasource.data.map(e=>({...e,tree__children:[],tree__opened:!1,tree__searched:!!this.searchValue,tree__level:1,tree__parent:void 0}));this.treeData=e,this.treeStructure[`no-parent`]=e}searchAllData(){this.searchHasNoData=!0;let e=this.searchValue.toLowerCase();this.treeData.forEach(t=>{let n=!1;if(Object.keys(t).every(r=>{let i=(t[r]||``).toString().toLowerCase();return n=this.originalDatasource.searchIn.indexOf(r)!==-1&&i.indexOf(e)!==-1,!n}),t.tree__searched=n,n){this.searchHasNoData=!1;let e=t.tree__parent;for(;e&&!e.tree__searched;)e.tree__searched=!0,e=e.tree__parent}}),this.searchHasNoData=!this.treeData.some(e=>e.tree__searched)}clearRow(e){let t={...e};return t.tree__children=void 0,t.tree__level=void 0,t.tree__parent=void 0,t.tree__opened=void 0,t.tree__searched=void 0,t}getChildren(e){let t=[],{uniqueKey:n}=this.originalDatasource;return(this.treeStructure[e[n]]||[]).forEach(e=>{t.push(this.clearRow(e)),t=t.concat(this.getChildren(e))}),t}hasChildOnDemand(e){if(!this.fieldHasChild)return!0;let t=e[this.fieldHasChild],n=!0;switch(t){case`0`:case!1:case 0:n=!1;break;case`1`:case!0:case 1:n=!0;break;default:n=!0;break}return n}getParentRow(e){return this.getRowData(e).tree__parent}resetTree(){this.treeData=[],this.buildTree()}},x=u(c(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.AutoNumeric=r():n.AutoNumeric=r()})(e,function(){return t=[function(e,t,n){"use strict";n.r(t);var r={allowedTagList:`b.caption.cite.code.const.dd.del.div.dfn.dt.em.h1.h2.h3.h4.h5.h6.input.ins.kdb.label.li.option.output.p.q.s.sample.span.strong.td.th.u`.split(`.`)};Object.freeze(r.allowedTagList),Object.defineProperty(r,`allowedTagList`,{configurable:!1,writable:!1}),r.keyCode={Backspace:8,Tab:9,Enter:13,Shift:16,Ctrl:17,Alt:18,Pause:19,CapsLock:20,Esc:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,LeftArrow:37,UpArrow:38,RightArrow:39,DownArrow:40,Insert:45,Delete:46,num0:48,num1:49,num2:50,num3:51,num4:52,num5:53,num6:54,num7:55,num8:56,num9:57,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,OSLeft:91,OSRight:92,ContextMenu:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,MultiplyNumpad:106,PlusNumpad:107,MinusNumpad:109,DotNumpad:110,SlashNumpad:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NumLock:144,ScrollLock:145,HyphenFirefox:173,MyComputer:182,MyCalculator:183,Semicolon:186,Equal:187,Comma:188,Hyphen:189,Dot:190,Slash:191,Backquote:192,LeftBracket:219,Backslash:220,RightBracket:221,Quote:222,Command:224,AltGraph:225,AndroidDefault:229},Object.freeze(r.keyCode),Object.defineProperty(r,`keyCode`,{configurable:!1,writable:!1}),r.fromCharCodeKeyCode={0:`LaunchCalculator`,8:`Backspace`,9:`Tab`,13:`Enter`,16:`Shift`,17:`Ctrl`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,48:`0`,49:`1`,50:`2`,51:`3`,52:`4`,53:`5`,54:`6`,55:`7`,56:`8`,57:`9`,91:`OS`,92:`OSRight`,93:`ContextMenu`,96:`0`,97:`1`,98:`2`,99:`3`,100:`4`,101:`5`,102:`6`,103:`7`,104:`8`,105:`9`,106:`*`,107:`+`,109:`-`,110:`.`,111:`/`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,173:`-`,182:`MyComputer`,183:`MyCalculator`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`,224:`Meta`,225:`AltGraph`},Object.freeze(r.fromCharCodeKeyCode),Object.defineProperty(r,`fromCharCodeKeyCode`,{configurable:!1,writable:!1}),r.keyName={Unidentified:`Unidentified`,AndroidDefault:`AndroidDefault`,Alt:`Alt`,AltGr:`AltGraph`,CapsLock:`CapsLock`,Ctrl:`Control`,Fn:`Fn`,FnLock:`FnLock`,Hyper:`Hyper`,Meta:`Meta`,OSLeft:`OS`,OSRight:`OS`,Command:`OS`,NumLock:`NumLock`,ScrollLock:`ScrollLock`,Shift:`Shift`,Super:`Super`,Symbol:`Symbol`,SymbolLock:`SymbolLock`,Enter:`Enter`,Tab:`Tab`,Space:` `,LeftArrow:`ArrowLeft`,UpArrow:`ArrowUp`,RightArrow:`ArrowRight`,DownArrow:`ArrowDown`,End:`End`,Home:`Home`,PageUp:`PageUp`,PageDown:`PageDown`,Backspace:`Backspace`,Clear:`Clear`,Copy:`Copy`,CrSel:`CrSel`,Cut:`Cut`,Delete:`Delete`,EraseEof:`EraseEof`,ExSel:`ExSel`,Insert:`Insert`,Paste:`Paste`,Redo:`Redo`,Undo:`Undo`,Accept:`Accept`,Again:`Again`,Attn:`Attn`,Cancel:`Cancel`,ContextMenu:`ContextMenu`,Esc:`Escape`,Execute:`Execute`,Find:`Find`,Finish:`Finish`,Help:`Help`,Pause:`Pause`,Play:`Play`,Props:`Props`,Select:`Select`,ZoomIn:`ZoomIn`,ZoomOut:`ZoomOut`,BrightnessDown:`BrightnessDown`,BrightnessUp:`BrightnessUp`,Eject:`Eject`,LogOff:`LogOff`,Power:`Power`,PowerOff:`PowerOff`,PrintScreen:`PrintScreen`,Hibernate:`Hibernate`,Standby:`Standby`,WakeUp:`WakeUp`,Compose:`Compose`,Dead:`Dead`,F1:`F1`,F2:`F2`,F3:`F3`,F4:`F4`,F5:`F5`,F6:`F6`,F7:`F7`,F8:`F8`,F9:`F9`,F10:`F10`,F11:`F11`,F12:`F12`,Print:`Print`,num0:`0`,num1:`1`,num2:`2`,num3:`3`,num4:`4`,num5:`5`,num6:`6`,num7:`7`,num8:`8`,num9:`9`,a:`a`,b:`b`,c:`c`,d:`d`,e:`e`,f:`f`,g:`g`,h:`h`,i:`i`,j:`j`,k:`k`,l:`l`,m:`m`,n:`n`,o:`o`,p:`p`,q:`q`,r:`r`,s:`s`,t:`t`,u:`u`,v:`v`,w:`w`,x:`x`,y:`y`,z:`z`,A:`A`,B:`B`,C:`C`,D:`D`,E:`E`,F:`F`,G:`G`,H:`H`,I:`I`,J:`J`,K:`K`,L:`L`,M:`M`,N:`N`,O:`O`,P:`P`,Q:`Q`,R:`R`,S:`S`,T:`T`,U:`U`,V:`V`,W:`W`,X:`X`,Y:`Y`,Z:`Z`,Semicolon:`;`,Equal:`=`,Comma:`,`,Hyphen:`-`,Minus:`-`,Plus:`+`,Dot:`.`,Slash:`/`,Backquote:"`",LeftParenthesis:`(`,RightParenthesis:`)`,LeftBracket:`[`,RightBracket:`]`,Backslash:`\\`,Quote:`'`,numpad0:`0`,numpad1:`1`,numpad2:`2`,numpad3:`3`,numpad4:`4`,numpad5:`5`,numpad6:`6`,numpad7:`7`,numpad8:`8`,numpad9:`9`,NumpadDot:`.`,NumpadDotAlt:`,`,NumpadMultiply:`*`,NumpadPlus:`+`,NumpadMinus:`-`,NumpadSubtract:`-`,NumpadSlash:`/`,NumpadDotObsoleteBrowsers:`Decimal`,NumpadMultiplyObsoleteBrowsers:`Multiply`,NumpadPlusObsoleteBrowsers:`Add`,NumpadMinusObsoleteBrowsers:`Subtract`,NumpadSlashObsoleteBrowsers:`Divide`,_allFnKeys:[`F1`,`F2`,`F3`,`F4`,`F5`,`F6`,`F7`,`F8`,`F9`,`F10`,`F11`,`F12`],_someNonPrintableKeys:[`Tab`,`Enter`,`Shift`,`ShiftLeft`,`ShiftRight`,`Control`,`ControlLeft`,`ControlRight`,`Alt`,`AltLeft`,`AltRight`,`Pause`,`CapsLock`,`Escape`],_directionKeys:[`PageUp`,`PageDown`,`End`,`Home`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`]},Object.freeze(r.keyName._allFnKeys),Object.freeze(r.keyName._someNonPrintableKeys),Object.freeze(r.keyName._directionKeys),Object.freeze(r.keyName),Object.defineProperty(r,`keyName`,{configurable:!1,writable:!1}),Object.freeze(r);var i=r;function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}()||c(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||n.return==null||n.return()}finally{if(s)throw i}}return a}}(e,t)||c(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function c(e,t){if(e){if(typeof e==`string`)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return(n=n===`Object`&&e.constructor?e.constructor.name:n)===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e){return(u=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e})(e)}var d=function(){function e(){(function(t){if(!(t instanceof e))throw TypeError(`Cannot call a class as a function`)})(this)}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e,[{key:`isNull`,value:function(e){return e===null}},{key:`isUndefined`,value:function(e){return e===void 0}},{key:`isUndefinedOrNullOrEmpty`,value:function(e){return e==null||e===``}},{key:`isString`,value:function(e){return typeof e==`string`||e instanceof String}},{key:`isEmptyString`,value:function(e){return e===``}},{key:`isBoolean`,value:function(e){return typeof e==`boolean`}},{key:`isTrueOrFalseString`,value:function(e){return(e=String(e).toLowerCase())===`true`||e===`false`}},{key:`isObject`,value:function(e){return u(e)===`object`&&e!==null&&!Array.isArray(e)}},{key:`isEmptyObj`,value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}},{key:`isNumberStrict`,value:function(e){return typeof e==`number`}},{key:`isNumber`,value:function(e){return!this.isArray(e)&&!isNaN(parseFloat(e))&&isFinite(e)}},{key:`isDigit`,value:function(e){return/\d/.test(e)}},{key:`isNumberOrArabic`,value:function(e){return e=this.arabicToLatinNumbers(e,!1,!0,!0),this.isNumber(e)}},{key:`isInt`,value:function(e){return typeof e==`number`&&parseFloat(e)===parseInt(e,10)&&!isNaN(e)}},{key:`isFunction`,value:function(e){return typeof e==`function`}},{key:`isIE11`,value:function(){return typeof window<`u`&&!!window.MSInputMethodContext&&!!document.documentMode}},{key:`contains`,value:function(e,t){return!(!this.isString(e)||!this.isString(t)||e===``||t===``)&&e.indexOf(t)!==-1}},{key:`isInArray`,value:function(e,t){return!(!this.isArray(t)||t===[]||this.isUndefined(e))&&t.indexOf(e)!==-1}},{key:`isArray`,value:function(e){if(Object.prototype.toString.call([])===`[object Array]`)return Array.isArray(e)||u(e)===`object`&&Object.prototype.toString.call(e)===`[object Array]`;throw Error(`toString message changed for Object Array`)}},{key:`isElement`,value:function(e){return typeof Element<`u`&&e instanceof Element}},{key:`isInputElement`,value:function(e){return this.isElement(e)&&e.tagName.toLowerCase()===`input`}},{key:`decimalPlaces`,value:function(e){return e=s(e.split(`.`),2)[1],this.isUndefined(e)?0:e.length}},{key:`indexFirstNonZeroDecimalPlace`,value:function(e){return e=s(String(Math.abs(e)).split(`.`),2)[1],this.isUndefined(e)?0:((e=e.lastIndexOf(`0`))===-1?e=0:e+=2,e)}},{key:`keyCodeNumber`,value:function(e){return e.which===void 0?e.keyCode:e.which}},{key:`character`,value:function(t){var n;if(t.key===`Unidentified`||t.key===void 0||this.isSeleniumBot()){var r=this.keyCodeNumber(t);if(r===i.keyCode.AndroidDefault)return i.keyName.AndroidDefault;var a=i.fromCharCodeKeyCode[r],o=e.isUndefinedOrNullOrEmpty(a)?String.fromCharCode(r):a}else switch(t.key){case`Add`:o=i.keyName.NumpadPlus;break;case`Apps`:o=i.keyName.ContextMenu;break;case`Crsel`:o=i.keyName.CrSel;break;case`Decimal`:o=t.char||i.keyName.NumpadDot;break;case`Del`:o=(n=this.browser()).name===`firefox`&&n.version<=36||n.name===`ie`&&n.version<=9?i.keyName.Dot:i.keyName.Delete;break;case`Divide`:o=i.keyName.NumpadSlash;break;case`Down`:o=i.keyName.DownArrow;break;case`Esc`:o=i.keyName.Esc;break;case`Exsel`:o=i.keyName.ExSel;break;case`Left`:o=i.keyName.LeftArrow;break;case`Meta`:case`Super`:o=i.keyName.OSLeft;break;case`Multiply`:o=i.keyName.NumpadMultiply;break;case`Right`:o=i.keyName.RightArrow;break;case`Spacebar`:o=i.keyName.Space;break;case`Subtract`:o=i.keyName.NumpadMinus;break;case`Up`:o=i.keyName.UpArrow;break;default:o=t.key}return o}},{key:`browser`,value:function(){var e,t=navigator.userAgent,n=t.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?{name:`ie`,version:(e=/\brv[ :]+(\d+)/g.exec(t)||[])[1]||``}:n[1]===`Chrome`&&(e=t.match(/\b(OPR|Edge)\/(\d+)/))!==null?{name:e[1].replace(`OPR`,`opera`),version:e[2]}:(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,`-?`],(e=t.match(/version\/(\d+)/i))!==null&&n.splice(1,1,e[1]),{name:n[0].toLowerCase(),version:n[1]})}},{key:`isSeleniumBot`,value:function(){return!0===window.navigator.webdriver}},{key:`isNegative`,value:function(t){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:`-`,r=!(2<arguments.length&&arguments[2]!==void 0)||arguments[2];return t===n||t!==``&&(e.isNumber(t)?t<0:r?this.contains(t,n):this.isNegativeStrict(t,n))}},{key:`isNegativeStrict`,value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:`-`;return e.charAt(0)===t}},{key:`isNegativeWithBrackets`,value:function(e,t,n){return e.charAt(0)===t&&this.contains(e,n)}},{key:`isZeroOrHasNoValue`,value:function(e){return!/[1-9]/g.test(e)}},{key:`setRawNegativeSign`,value:function(e){return this.isNegativeStrict(e,`-`)?e:`-${e}`}},{key:`replaceCharAt`,value:function(e,t,n){return`${e.substr(0,t)}${n}${e.substr(t+n.length)}`}},{key:`clampToRangeLimits`,value:function(e,t){return Math.max(t.minimumValue,Math.min(t.maximumValue,e))}},{key:`countNumberCharactersOnTheCaretLeftSide`,value:function(e,t,n){for(var r=RegExp(`[0-9${n}-]`),i=0,a=0;a<t;a++)r.test(e[a])&&i++;return i}},{key:`findCaretPositionInFormattedNumber`,value:function(e,t,n,r){for(var i=n.length,a=e.length,o=0,s=0;s<i&&o<a&&o<t;s++)(e[o]===n[s]||e[o]===`.`&&n[s]===r)&&o++;return s}},{key:`countCharInText`,value:function(e,t){for(var n=0,r=0;r<t.length;r++)t[r]===e&&n++;return n}},{key:`convertCharacterCountToIndexPosition`,value:function(e){return Math.max(e,e-1)}},{key:`getElementSelection`,value:function(e){var t,n,r={};try{t=this.isUndefined(e.selectionStart)}catch{t=!1}try{t?(n=window.getSelection().getRangeAt(0),r.start=n.startOffset,r.end=n.endOffset):(r.start=e.selectionStart,r.end=e.selectionEnd),r.length=r.end-r.start}catch{r.start=0,r.end=0,r.length=0}return r}},{key:`setElementSelection`,value:function(t,n){var r,i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;this.isUndefinedOrNullOrEmpty(i)&&(i=n),this.isInputElement(t)?t.setSelectionRange(n,i):e.isNull(t.firstChild)||((r=document.createRange()).setStart(t.firstChild,n),r.setEnd(t.firstChild,i),(i=window.getSelection()).removeAllRanges(),i.addRange(r))}},{key:`throwError`,value:function(e){throw Error(e)}},{key:`warning`,value:function(e){1<arguments.length&&arguments[1]!==void 0&&!arguments[1]||console.warn(`Warning: ${e}`)}},{key:`isWheelEvent`,value:function(e){return e instanceof WheelEvent}},{key:`isWheelUpEvent`,value:function(e){return this.isWheelEvent(e)&&!this.isUndefinedOrNullOrEmpty(e.deltaY)||this.throwError(`The event passed as a parameter is not a valid wheel event, '${e.type}' given.`),e.deltaY<0}},{key:`isWheelDownEvent`,value:function(e){return this.isWheelEvent(e)&&!this.isUndefinedOrNullOrEmpty(e.deltaY)||this.throwError(`The event passed as a parameter is not a valid wheel event, '${e.type}' given.`),0<e.deltaY}},{key:`forceDecimalPlaces`,value:function(e,t){var n=s(String(e).split(`.`),2),r=n[0];return(n=n[1])?`${r}.${n.substr(0,t)}`:e}},{key:`roundToNearest`,value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1e3;return e===0?0:(t===0&&this.throwError("The `stepPlace` used to round is equal to `0`. This value must not be equal to zero."),Math.round(e/t)*t)}},{key:`modifyAndRoundToNearestAuto`,value:function(e,t,n){e=Number(this.forceDecimalPlaces(e,n));var r=Math.abs(e);if(0<=r&&r<1){var i=10**-n;return e===0?t?i:-i:(i=(r=n)-1<=(n=this.indexFirstNonZeroDecimalPlace(e))?i:10**-(n+1),this.roundToNearest(n=t?e+i:e-i,i))}e=parseInt(e,10);var a,o=Math.abs(e).toString().length;switch(o){case 1:a=0;break;case 2:case 3:a=1;break;case 4:case 5:a=2;break;default:a=o-3}return i=10**a,(e=t?e+i:e-i)<=10&&-10<=e?e:this.roundToNearest(e,i)}},{key:`addAndRoundToNearestAuto`,value:function(e,t){return this.modifyAndRoundToNearestAuto(e,!0,t)}},{key:`subtractAndRoundToNearestAuto`,value:function(e,t){return this.modifyAndRoundToNearestAuto(e,!1,t)}},{key:`arabicToLatinNumbers`,value:function(e){var t=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1],n=2<arguments.length&&arguments[2]!==void 0&&arguments[2],r=3<arguments.length&&arguments[3]!==void 0&&arguments[3];if(this.isNull(e)||(i=e.toString())===``)return e;if(i.match(/[٠١٢٣٤٥٦٧٨٩۴۵۶]/g)===null)return t?Number(i):i;n&&(i=i.replace(/٫/,`.`));var i=(i=r?i.replace(/٬/g,``):i).replace(/[٠١٢٣٤٥٦٧٨٩]/g,function(e){return e.charCodeAt(0)-1632}).replace(/[۰۱۲۳۴۵۶۷۸۹]/g,function(e){return e.charCodeAt(0)-1776}),r=Number(i);return isNaN(r)||t?r:i}},{key:`triggerEvent`,value:function(e){var t,n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:document,r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,i=!(3<arguments.length&&arguments[3]!==void 0)||arguments[3],a=!(4<arguments.length&&arguments[4]!==void 0)||arguments[4];window.CustomEvent?t=new CustomEvent(e,{detail:r,bubbles:i,cancelable:a}):(t=document.createEvent(`CustomEvent`)).initCustomEvent(e,i,a,{detail:r}),n.dispatchEvent(t)}},{key:`parseStr`,value:function(e){var t,n,r,i,a={};if(e=(e=e===0&&1/e<0?`-0`:e).toString(),this.isNegativeStrict(e,`-`)?(e=e.slice(1),a.s=-1):a.s=1,-1<(t=e.indexOf(`.`))&&(e=e.replace(`.`,``)),t<0&&(t=e.length),(n=e.search(/[1-9]/i)===-1?e.length:e.search(/[1-9]/i))===(r=e.length))a.e=0,a.c=[0];else{for(i=r-1;e.charAt(i)===`0`;--i)--r;for(--r,a.e=t-n-1,a.c=[],t=0;n<=r;n+=1)a.c[t]=+e.charAt(n),t+=1}return a}},{key:`testMinMax`,value:function(e,t){var n=t.c,r=e.c,i=t.s,a=e.s,o=t.e,t=e.e;if(!n[0]||!r[0])return n[0]?i:r[0]?-a:0;if(i!==a)return i;var s=i<0;if(o!==t)return t<o^s?1:-1;for(i=-1,a=(o=n.length)<(t=r.length)?o:t,i+=1;i<a;i+=1)if(n[i]!==r[i])return n[i]>r[i]^s?1:-1;return o===t?0:t<o^s?1:-1}},{key:`randomString`,value:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:5;return Math.random().toString(36).substr(2,e)}},{key:`domElement`,value:function(t){return e.isString(t)?document.querySelector(t):t}},{key:`getElementValue`,value:function(e){return e.tagName.toLowerCase()===`input`?e.value:this.text(e)}},{key:`setElementValue`,value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;e.tagName.toLowerCase()===`input`?e.value=t:e.textContent=t}},{key:`setInvalidState`,value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:`Invalid`;t!==``&&!this.isNull(t)||this.throwError(`Cannot set the invalid state with an empty message.`),e.setCustomValidity(t)}},{key:`setValidState`,value:function(e){e.setCustomValidity(``)}},{key:`cloneObject`,value:function(e){return o({},e)}},{key:`camelize`,value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:`-`,n=!(2<arguments.length&&arguments[2]!==void 0)||arguments[2],r=!(3<arguments.length&&arguments[3]!==void 0)||arguments[3];return this.isNull(e)?null:(t=(t=(e=n?e.replace(/^data-/,``):e).split(t).map(function(e){return`${e.charAt(0).toUpperCase()}${e.slice(1)}`})).join(``),r?`${t.charAt(0).toLowerCase()}${t.slice(1)}`:t)}},{key:`text`,value:function(e){var t=e.nodeType;return t===Node.ELEMENT_NODE||t===Node.DOCUMENT_NODE||t===Node.DOCUMENT_FRAGMENT_NODE?e.textContent:t===Node.TEXT_NODE?e.nodeValue:``}},{key:`setText`,value:function(e,t){var n=e.nodeType;n!==Node.ELEMENT_NODE&&n!==Node.DOCUMENT_NODE&&n!==Node.DOCUMENT_FRAGMENT_NODE||(e.textContent=t)}},{key:`filterOut`,value:function(e,t){var n=this;return e.filter(function(e){return!n.isInArray(e,t)})}},{key:`trimPaddedZerosFromDecimalPlaces`,value:function(e){if((e=String(e))===``)return``;var e=(t=s(e.split(`.`),2))[0],t=t[1];return this.isUndefinedOrNullOrEmpty(t)||(t=t.replace(/0+$/g,``))===``?e:`${e}.${t}`}},{key:`getHoveredElement`,value:function(){var e=a(document.querySelectorAll(`:hover`));return e[e.length-1]}},{key:`arrayTrim`,value:function(e,t){var n=e.length;return n===0||n<t?e:t<0?[]:(e.length=parseInt(t,10),e)}},{key:`arrayUnique`,value:function(){var e;return a(new Set((e=[]).concat.apply(e,arguments)))}},{key:`mergeMaps`,value:function(){var e=[...arguments];return new Map(e.reduce(function(e,t){return e.concat(a(t))},[]))}},{key:`objectKeyLookup`,value:function(e,t){var n=Object.entries(e).find(function(e){return e[1]===t}),e=null;return n===void 0?e:n[0]}},{key:`insertAt`,value:function(e,t,n){if(n>(e=String(e)).length)throw Error(`The given index is out of the string range.`);if(t.length!==1)throw Error("The given string `char` should be only one character long.");return e===``&&n===0?t:`${e.slice(0,n)}${t}${e.slice(n)}`}},{key:`scientificToDecimal`,value:function(e){var t=Number(e);if(isNaN(t))return NaN;if(e=String(e),!this.contains(e,`e`)&&!this.contains(e,`E`))return e;var n=(a=s(e.split(/e/i),2))[0],r=a[1],i=n<0;i&&(n=n.replace(`-`,``)),(t=+r<0)&&(r=r.replace(`-`,``));var a=(e=s(n.split(/\./),2))[0],e=e[1],o=t?(o=a.length>r?this.insertAt(a,`.`,a.length-r):`0.${`0`.repeat(r-a.length)}${a}`,`${o}${e||``}`):e?(n=`${a}${e}`,r<e.length?this.insertAt(n,`.`,+r+a.length):`${n}${`0`.repeat(r-e.length)}`):(n=n.replace(`.`,``),`${n}${`0`.repeat(Number(r))}`);return i?`-${o}`:o}}]),e}(),f=function(){function e(t){if(function(t){if(!(t instanceof e))throw TypeError(`Cannot call a class as a function`)}(this),t===null)throw Error(`Invalid AST`)}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,[{key:`evaluate`,value:function(e){if(e==null)throw Error(`Invalid AST sub-tree`);if(e.type===`number`)return e.value;if(e.type===`unaryMinus`)return-this.evaluate(e.left);var t=this.evaluate(e.left),n=this.evaluate(e.right);switch(e.type){case`op_+`:return Number(t)+Number(n);case`op_-`:return t-n;case`op_*`:return t*n;case`op_/`:return t/n;default:throw Error(`Invalid operator '${e.type}'`)}}}]),e}(),p=function(){function e(){(function(t){if(!(t instanceof e))throw TypeError(`Cannot call a class as a function`)})(this)}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e,[{key:`createNode`,value:function(t,n,r){var i=new e;return i.type=t,i.left=n,i.right=r,i}},{key:`createUnaryNode`,value:function(t){var n=new e;return n.type=`unaryMinus`,n.left=t,n.right=null,n}},{key:`createLeaf`,value:function(t){var n=new e;return n.type=`number`,n.value=t,n}}]),e}();function m(e,t,n){(function(e){if(!(e instanceof m))throw TypeError(`Cannot call a class as a function`)})(this),this.type=e,this.value=t,this.symbol=n}var h=function(){function e(t){(function(t){if(!(t instanceof e))throw TypeError(`Cannot call a class as a function`)})(this),this.text=t,this.textLength=t.length,this.index=0,this.token=new m(`Error`,0,0)}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,[{key:`_skipSpaces`,value:function(){for(;this.text[this.index]===` `&&this.index<=this.textLength;)this.index++}},{key:`getIndex`,value:function(){return this.index}},{key:`getNextToken`,value:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:`.`;if(this._skipSpaces(),this.textLength===this.index)return this.token.type=`EOT`,this.token;if(d.isDigit(this.text[this.index]))return this.token.type=`num`,this.token.value=this._getNumber(e),this.token;switch(this.token.type=`Error`,this.text[this.index]){case`+`:this.token.type=`+`;break;case`-`:this.token.type=`-`;break;case`*`:this.token.type=`*`;break;case`/`:this.token.type=`/`;break;case`(`:this.token.type=`(`;break;case`)`:this.token.type=`)`}if(this.token.type===`Error`)throw Error(`Unexpected token '${this.token.symbol}' at position '${this.token.index}' in the token function`);return this.token.symbol=this.text[this.index],this.index++,this.token}},{key:`_getNumber`,value:function(e){this._skipSpaces();for(var t=this.index;this.index<=this.textLength&&d.isDigit(this.text[this.index]);)this.index++;for(this.text[this.index]===e&&this.index++;this.index<=this.textLength&&d.isDigit(this.text[this.index]);)this.index++;if(this.index===t)throw Error(`No number has been found while it was expected`);return this.text.substring(t,this.index).replace(e,`.`)}}]),e}(),g=function(){function e(t){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:`.`;return function(t){if(!(t instanceof e))throw TypeError(`Cannot call a class as a function`)}(this),this.text=t,this.decimalCharacter=n,this.lexer=new h(t),this.token=this.lexer.getNextToken(this.decimalCharacter),this._exp()}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,[{key:`_exp`,value:function(){var e=this._term(),t=this._moreExp();return p.createNode(`op_+`,e,t)}},{key:`_moreExp`,value:function(){var e,t;switch(this.token.type){case`+`:return this.token=this.lexer.getNextToken(this.decimalCharacter),e=this._term(),t=this._moreExp(),p.createNode(`op_+`,t,e);case`-`:return this.token=this.lexer.getNextToken(this.decimalCharacter),e=this._term(),t=this._moreExp(),p.createNode(`op_-`,t,e)}return p.createLeaf(0)}},{key:`_term`,value:function(){var e=this._factor(),t=this._moreTerms();return p.createNode(`op_*`,e,t)}},{key:`_moreTerms`,value:function(){var e,t;switch(this.token.type){case`*`:return this.token=this.lexer.getNextToken(this.decimalCharacter),e=this._factor(),t=this._moreTerms(),p.createNode(`op_*`,t,e);case`/`:return this.token=this.lexer.getNextToken(this.decimalCharacter),e=this._factor(),t=this._moreTerms(),p.createNode(`op_/`,t,e)}return p.createLeaf(1)}},{key:`_factor`,value:function(){var e,t;switch(this.token.type){case`num`:return t=this.token.value,this.token=this.lexer.getNextToken(this.decimalCharacter),p.createLeaf(t);case`-`:return this.token=this.lexer.getNextToken(this.decimalCharacter),e=this._factor(),p.createUnaryNode(e);case`(`:return this.token=this.lexer.getNextToken(this.decimalCharacter),e=this._exp(),this._match(`)`),e;default:throw Error(`Unexpected token '${this.token.symbol}' with type '${this.token.type}' at position '${this.token.index}' in the factor function`)}}},{key:`_match`,value:function(e){var t=this.lexer.getIndex()-1;if(this.text[t]!==e)throw Error(`Unexpected token '${this.token.symbol}' at position '${t}' in the match function`);this.token=this.lexer.getNextToken(this.decimalCharacter)}}]),e}();function _(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}()||y(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||n.return==null||n.return()}finally{if(s)throw i}}return a}}(e,t)||y(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
5
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function y(e,t){if(e){if(typeof e==`string`)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return(n=n===`Object`&&e.constructor?e.constructor.name:n)===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function x(){return(x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function S(e){return(S=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e})(e)}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var w,T=function(){function e(){var t=this,n=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,r=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null,i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;(function(t){if(!(t instanceof e))throw TypeError(`Cannot call a class as a function`)})(this);var a,r=(n=e._setArgumentsValues(n,r,i)).domElement,i=n.initialValue,n=n.userOptions;if(this.domElement=r,this.defaultRawValue=``,this._setSettings(n,!1),this._checkElement(),this.savedCancellableValue=null,this.historyTable=[],this.historyTableIndex=-1,this.onGoingRedo=!1,this.parentForm=this._getParentForm(),!this.runOnce&&this.settings.formatOnPageLoad)this._formatDefaultValueOnPageLoad(i);else{if(d.isNull(i))switch(this.settings.emptyInputBehavior){case e.options.emptyInputBehavior.min:a=this.settings.minimumValue;break;case e.options.emptyInputBehavior.max:a=this.settings.maximumValue;break;case e.options.emptyInputBehavior.zero:a=`0`;break;case e.options.emptyInputBehavior.focus:case e.options.emptyInputBehavior.press:case e.options.emptyInputBehavior.always:case e.options.emptyInputBehavior.null:a=``;break;default:a=this.settings.emptyInputBehavior}else a=i;this._setElementAndRawValue(a)}this.runOnce=!0,this.hasEventListeners=!1,(this.isInputElement||this.isContentEditable)&&(this.settings.noEventListeners||this._createEventListeners(),this._setWritePermissions(!0)),this._saveInitialValues(i),this.sessionStorageAvailable=this.constructor._storageTest(),this.storageNamePrefix=`AUTO_`,this._setPersistentStorageName(),this.validState=!0,this.isFocused=!1,this.isWheelEvent=!1,this.isDropEvent=!1,this.isEditing=!1,this.rawValueOnFocus=void 0,this.internalModification=!1,this.attributeToWatch=this._getAttributeToWatch(),this.getterSetter=Object.getOwnPropertyDescriptor(this.domElement.__proto__,this.attributeToWatch),this._addWatcher(),this.settings.createLocalList&&this._createLocalList(),this.constructor._addToGlobalList(this),this.global={set:function(e){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;t.autoNumericLocalList.forEach(function(t){t.set(e,n)})},setUnformatted:function(e){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;t.autoNumericLocalList.forEach(function(t){t.setUnformatted(e,n)})},get:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,n=[];return t.autoNumericLocalList.forEach(function(e){n.push(e.get())}),t._executeCallback(n,e),n},getNumericString:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,n=[];return t.autoNumericLocalList.forEach(function(e){n.push(e.getNumericString())}),t._executeCallback(n,e),n},getFormatted:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,n=[];return t.autoNumericLocalList.forEach(function(e){n.push(e.getFormatted())}),t._executeCallback(n,e),n},getNumber:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,n=[];return t.autoNumericLocalList.forEach(function(e){n.push(e.getNumber())}),t._executeCallback(n,e),n},getLocalized:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,n=[];return t.autoNumericLocalList.forEach(function(e){n.push(e.getLocalized())}),t._executeCallback(n,e),n},reformat:function(){t.autoNumericLocalList.forEach(function(e){e.reformat()})},unformat:function(){t.autoNumericLocalList.forEach(function(e){e.unformat()})},unformatLocalized:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;t.autoNumericLocalList.forEach(function(t){t.unformatLocalized(e)})},update:function(){var e=[...arguments];t.autoNumericLocalList.forEach(function(t){t.update.apply(t,e)})},isPristine:function(){var e=!(0<arguments.length&&arguments[0]!==void 0)||arguments[0],n=!0;return t.autoNumericLocalList.forEach(function(t){n&&!t.isPristine(e)&&(n=!1)}),n},clear:function(){var e=0<arguments.length&&arguments[0]!==void 0&&arguments[0];t.autoNumericLocalList.forEach(function(t){t.clear(e)})},remove:function(){t.autoNumericLocalList.forEach(function(e){e.remove()})},wipe:function(){t.autoNumericLocalList.forEach(function(e){e.wipe()})},nuke:function(){t.autoNumericLocalList.forEach(function(e){e.nuke()})},has:function(n){return n instanceof e?t.autoNumericLocalList.has(n.node()):t.autoNumericLocalList.has(n)},addObject:function(n){var r,i,a=n instanceof e?(r=n.node(),n):e.getAutoNumericElement(r=n);t._hasLocalList()||t._createLocalList(),(n=a._getLocalList()).size===0&&(a._createLocalList(),n=a._getLocalList()),(i=n instanceof Map?d.mergeMaps(t._getLocalList(),n):(t._addToLocalList(r,a),t._getLocalList())).forEach(function(e){e._setLocalList(i)})},removeObject:function(n){var r,i=1<arguments.length&&arguments[1]!==void 0&&arguments[1],a=n instanceof e?(r=n.node(),n):e.getAutoNumericElement(r=n),n=t.autoNumericLocalList;t.autoNumericLocalList.delete(r),n.forEach(function(e){e._setLocalList(t.autoNumericLocalList)}),i||r!==t.node()?a._createLocalList():a._setLocalList(new Map)},empty:function(){var e=0<arguments.length&&arguments[0]!==void 0&&arguments[0];t.autoNumericLocalList.forEach(function(t){e?t._createLocalList():t._setLocalList(new Map)})},elements:function(){var e=[];return t.autoNumericLocalList.forEach(function(t){e.push(t.node())}),e},getList:function(){return t.autoNumericLocalList},size:function(){return t.autoNumericLocalList.size}},this.options={reset:function(){return t.settings={rawValue:t.defaultRawValue},t.update(e.defaultSettings),t},allowDecimalPadding:function(e){return t.update({allowDecimalPadding:e}),t},alwaysAllowDecimalCharacter:function(e){return t.update({alwaysAllowDecimalCharacter:e}),t},caretPositionOnFocus:function(e){return t.settings.caretPositionOnFocus=e,t},createLocalList:function(e){return t.settings.createLocalList=e,t.settings.createLocalList?t._hasLocalList()||t._createLocalList():t._deleteLocalList(),t},currencySymbol:function(e){return t.update({currencySymbol:e}),t},currencySymbolPlacement:function(e){return t.update({currencySymbolPlacement:e}),t},decimalCharacter:function(e){return t.update({decimalCharacter:e}),t},decimalCharacterAlternative:function(e){return t.settings.decimalCharacterAlternative=e,t},decimalPlaces:function(e){return d.warning("Using `options.decimalPlaces()` instead of calling the specific `options.decimalPlacesRawValue()`, `options.decimalPlacesShownOnFocus()` and `options.decimalPlacesShownOnBlur()` methods will reset those options.\nPlease call the specific methods if you do not want to reset those.",t.settings.showWarnings),t.update({decimalPlaces:e}),t},decimalPlacesRawValue:function(e){return t.update({decimalPlacesRawValue:e}),t},decimalPlacesShownOnBlur:function(e){return t.update({decimalPlacesShownOnBlur:e}),t},decimalPlacesShownOnFocus:function(e){return t.update({decimalPlacesShownOnFocus:e}),t},defaultValueOverride:function(e){return t.update({defaultValueOverride:e}),t},digitalGroupSpacing:function(e){return t.update({digitalGroupSpacing:e}),t},digitGroupSeparator:function(e){return t.update({digitGroupSeparator:e}),t},divisorWhenUnfocused:function(e){return t.update({divisorWhenUnfocused:e}),t},emptyInputBehavior:function(n){return t.rawValue===null&&n!==e.options.emptyInputBehavior.null&&(d.warning(`You are trying to modify the \`emptyInputBehavior\` option to something different than \`'null'\` (${n}), but the element raw value is currently set to \`null\`. This would result in an invalid \`rawValue\`. In order to fix that, the element value has been changed to the empty string \`''\`.`,t.settings.showWarnings),t.rawValue=``),t.update({emptyInputBehavior:n}),t},eventBubbles:function(e){return t.settings.eventBubbles=e,t},eventIsCancelable:function(e){return t.settings.eventIsCancelable=e,t},failOnUnknownOption:function(e){return t.settings.failOnUnknownOption=e,t},formatOnPageLoad:function(e){return t.settings.formatOnPageLoad=e,t},formulaMode:function(e){return t.settings.formulaMode=e,t},historySize:function(e){return t.settings.historySize=e,t},invalidClass:function(e){return t.settings.invalidClass=e,t},isCancellable:function(e){return t.settings.isCancellable=e,t},leadingZero:function(e){return t.update({leadingZero:e}),t},maximumValue:function(e){return t.update({maximumValue:e}),t},minimumValue:function(e){return t.update({minimumValue:e}),t},modifyValueOnWheel:function(e){return t.settings.modifyValueOnWheel=e,t},negativeBracketsTypeOnBlur:function(e){return t.update({negativeBracketsTypeOnBlur:e}),t},negativePositiveSignPlacement:function(e){return t.update({negativePositiveSignPlacement:e}),t},negativeSignCharacter:function(e){return t.update({negativeSignCharacter:e}),t},noEventListeners:function(n){return n===e.options.noEventListeners.noEvents&&t.settings.noEventListeners===e.options.noEventListeners.addEvents&&t._removeEventListeners(),t.update({noEventListeners:n}),t},onInvalidPaste:function(e){return t.settings.onInvalidPaste=e,t},outputFormat:function(e){return t.settings.outputFormat=e,t},overrideMinMaxLimits:function(e){return t.update({overrideMinMaxLimits:e}),t},positiveSignCharacter:function(e){return t.update({positiveSignCharacter:e}),t},rawValueDivisor:function(e){return t.update({rawValueDivisor:e}),t},readOnly:function(e){return t.settings.readOnly=e,t._setWritePermissions(),t},roundingMethod:function(e){return t.update({roundingMethod:e}),t},saveValueToSessionStorage:function(e){return t.update({saveValueToSessionStorage:e}),t},symbolWhenUnfocused:function(e){return t.update({symbolWhenUnfocused:e}),t},selectNumberOnly:function(e){return t.settings.selectNumberOnly=e,t},selectOnFocus:function(e){return t.settings.selectOnFocus=e,t},serializeSpaces:function(e){return t.settings.serializeSpaces=e,t},showOnlyNumbersOnFocus:function(e){return t.update({showOnlyNumbersOnFocus:e}),t},showPositiveSign:function(e){return t.update({showPositiveSign:e}),t},showWarnings:function(e){return t.settings.showWarnings=e,t},styleRules:function(e){return t.update({styleRules:e}),t},suffixText:function(e){return t.update({suffixText:e}),t},unformatOnHover:function(e){return t.settings.unformatOnHover=e,t},unformatOnSubmit:function(e){return t.settings.unformatOnSubmit=e,t},valuesToStrings:function(e){return t.update({valuesToStrings:e}),t},watchExternalChanges:function(e){return t.update({watchExternalChanges:e}),t},wheelOn:function(e){return t.settings.wheelOn=e,t},wheelStep:function(e){return t.settings.wheelStep=e,t}},this._triggerEvent(e.events.initialized,this.domElement,{newValue:d.getElementValue(this.domElement),newRawValue:this.rawValue,error:null,aNElement:this})}var t=e;return C(t.prototype,[{key:`_saveInitialValues`,value:function(e){this.initialValueHtmlAttribute=d.scientificToDecimal(this.domElement.getAttribute(`value`)),d.isNull(this.initialValueHtmlAttribute)&&(this.initialValueHtmlAttribute=``),this.initialValue=e,d.isNull(this.initialValue)&&(this.initialValue=``)}},{key:`_createEventListeners`,value:function(){var t=this;this.formulaMode=!1,this._onFocusInFunc=function(e){t._onFocusIn(e)},this._onFocusInAndMouseEnterFunc=function(e){t._onFocusInAndMouseEnter(e)},this._onFocusFunc=function(){t._onFocus()},this._onKeydownFunc=function(e){t._onKeydown(e)},this._onKeypressFunc=function(e){t._onKeypress(e)},this._onKeyupFunc=function(e){t._onKeyup(e)},this._onFocusOutAndMouseLeaveFunc=function(e){t._onFocusOutAndMouseLeave(e)},this._onPasteFunc=function(e){t._onPaste(e)},this._onWheelFunc=function(e){t._onWheel(e)},this._onDropFunc=function(e){t._onDrop(e)},this._onKeydownGlobalFunc=function(e){t._onKeydownGlobal(e)},this._onKeyupGlobalFunc=function(e){t._onKeyupGlobal(e)},this.domElement.addEventListener(`focusin`,this._onFocusInFunc,!1),this.domElement.addEventListener(`focus`,this._onFocusInAndMouseEnterFunc,!1),this.domElement.addEventListener(`focus`,this._onFocusFunc,!1),this.domElement.addEventListener(`mouseenter`,this._onFocusInAndMouseEnterFunc,!1),this.domElement.addEventListener(`keydown`,this._onKeydownFunc,!1),this.domElement.addEventListener(`keypress`,this._onKeypressFunc,!1),this.domElement.addEventListener(`keyup`,this._onKeyupFunc,!1),this.domElement.addEventListener(`blur`,this._onFocusOutAndMouseLeaveFunc,!1),this.domElement.addEventListener(`mouseleave`,this._onFocusOutAndMouseLeaveFunc,!1),this.domElement.addEventListener(`paste`,this._onPasteFunc,!1),this.domElement.addEventListener(`wheel`,this._onWheelFunc,!1),this.domElement.addEventListener(`drop`,this._onDropFunc,!1),this._setupFormListener(),this.hasEventListeners=!0,e._doesGlobalListExists()||(document.addEventListener(`keydown`,this._onKeydownGlobalFunc,!1),document.addEventListener(`keyup`,this._onKeyupGlobalFunc,!1))}},{key:`_removeEventListeners`,value:function(){this.domElement.removeEventListener(`focusin`,this._onFocusInFunc,!1),this.domElement.removeEventListener(`focus`,this._onFocusInAndMouseEnterFunc,!1),this.domElement.removeEventListener(`focus`,this._onFocusFunc,!1),this.domElement.removeEventListener(`mouseenter`,this._onFocusInAndMouseEnterFunc,!1),this.domElement.removeEventListener(`blur`,this._onFocusOutAndMouseLeaveFunc,!1),this.domElement.removeEventListener(`mouseleave`,this._onFocusOutAndMouseLeaveFunc,!1),this.domElement.removeEventListener(`keydown`,this._onKeydownFunc,!1),this.domElement.removeEventListener(`keypress`,this._onKeypressFunc,!1),this.domElement.removeEventListener(`keyup`,this._onKeyupFunc,!1),this.domElement.removeEventListener(`paste`,this._onPasteFunc,!1),this.domElement.removeEventListener(`wheel`,this._onWheelFunc,!1),this.domElement.removeEventListener(`drop`,this._onDropFunc,!1),this._removeFormListener(),this.hasEventListeners=!1,document.removeEventListener(`keydown`,this._onKeydownGlobalFunc,!1),document.removeEventListener(`keyup`,this._onKeyupGlobalFunc,!1)}},{key:`_updateEventListeners`,value:function(){this.settings.noEventListeners||this.hasEventListeners||this._createEventListeners(),this.settings.noEventListeners&&this.hasEventListeners&&this._removeEventListeners()}},{key:`_setupFormListener`,value:function(){var e=this;d.isNull(this.parentForm)||(this._onFormSubmitFunc=function(){e._onFormSubmit()},this._onFormResetFunc=function(){e._onFormReset()},this._hasParentFormCounter()?this._incrementParentFormCounter():(this._initializeFormCounterToOne(),this.parentForm.addEventListener(`submit`,this._onFormSubmitFunc,!1),this.parentForm.addEventListener(`reset`,this._onFormResetFunc,!1),this._storeFormHandlerFunction()))}},{key:`_removeFormListener`,value:function(){var e;d.isNull(this.parentForm)||((e=this._getParentFormCounter())===1?(this.parentForm.removeEventListener(`submit`,this._getFormHandlerFunction().submitFn,!1),this.parentForm.removeEventListener(`reset`,this._getFormHandlerFunction().resetFn,!1),this._removeFormDataSetInfo()):1<e?this._decrementParentFormCounter():d.throwError(`The AutoNumeric object count on the form is incoherent.`))}},{key:`_hasParentFormCounter`,value:function(){return`anCount`in this.parentForm.dataset}},{key:`_getParentFormCounter`,value:function(){return Number(this.parentForm.dataset.anCount)}},{key:`_initializeFormCounterToOne`,value:function(){this._getFormElement(0<arguments.length&&arguments[0]!==void 0?arguments[0]:null).dataset.anCount=1}},{key:`_incrementParentFormCounter`,value:function(){this._getFormElement(0<arguments.length&&arguments[0]!==void 0?arguments[0]:null).dataset.anCount++}},{key:`_decrementParentFormCounter`,value:function(){this.parentForm.dataset.anCount--}},{key:`_hasFormHandlerFunction`,value:function(){return`anFormHandler`in this._getFormElement(0<arguments.length&&arguments[0]!==void 0?arguments[0]:null).dataset}},{key:`_getFormElement`,value:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;return d.isNull(e)?this.parentForm:e}},{key:`_storeFormHandlerFunction`,value:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;this.constructor._doesFormHandlerListExists()||this.constructor._createFormHandlerList();var t=d.randomString();this._getFormElement(e).dataset.anFormHandler=t,window.aNFormHandlerMap.set(t,{submitFn:this._onFormSubmitFunc,resetFn:this._onFormResetFunc})}},{key:`_getFormHandlerKey`,value:function(){this._hasFormHandlerFunction()||d.throwError(`Unable to retrieve the form handler name`);var e=this.parentForm.dataset.anFormHandler;return e===``&&d.throwError(`The form handler name is invalid`),e}},{key:`_getFormHandlerFunction`,value:function(){var e=this._getFormHandlerKey();return window.aNFormHandlerMap.get(e)}},{key:`_removeFormDataSetInfo`,value:function(){this._decrementParentFormCounter(),window.aNFormHandlerMap.delete(this._getFormHandlerKey()),this.parentForm.removeAttribute(`data-an-count`),this.parentForm.removeAttribute(`data-an-form-handler`)}},{key:`_setWritePermissions`,value:function(){0<arguments.length&&arguments[0]!==void 0&&arguments[0]&&this.domElement.readOnly||this.settings.readOnly?this._setReadOnly():this._setReadWrite()}},{key:`_setReadOnly`,value:function(){this.isInputElement?this.domElement.readOnly=!0:this.domElement.setAttribute(`contenteditable`,!1)}},{key:`_setReadWrite`,value:function(){this.isInputElement?this.domElement.readOnly=!1:this.domElement.setAttribute(`contenteditable`,!0)}},{key:`_addWatcher`,value:function(){var e,t,n,r=this;d.isUndefined(this.getterSetter)||(e=this.getterSetter,t=e.set,n=e.get,Object.defineProperty(this.domElement,this.attributeToWatch,{configurable:!0,get:function(){return n.call(r.domElement)},set:function(e){t.call(r.domElement,e),r.settings.watchExternalChanges&&!r.internalModification&&r.set(e)}}))}},{key:`_removeWatcher`,value:function(){var e,t,n,r=this;d.isUndefined(this.getterSetter)||(e=this.getterSetter,t=e.set,n=e.get,Object.defineProperty(this.domElement,this.attributeToWatch,{configurable:!0,get:function(){return n.call(r.domElement)},set:function(e){t.call(r.domElement,e)}}))}},{key:`_getAttributeToWatch`,value:function(){var e,t;return this.isInputElement?e=`value`:(t=this.domElement.nodeType)===Node.ELEMENT_NODE||t===Node.DOCUMENT_NODE||t===Node.DOCUMENT_FRAGMENT_NODE?e=`textContent`:t===Node.TEXT_NODE&&(e=`nodeValue`),e}},{key:`_historyTableAdd`,value:function(){var e,t=this.historyTable.length===0;!t&&this.rawValue===this._historyTableCurrentValueUsed()||(e=!0,t||((t=this.historyTableIndex+1)<this.historyTable.length&&this.rawValue===this.historyTable[t].value?e=!1:d.arrayTrim(this.historyTable,this.historyTableIndex+1)),this.historyTableIndex++,e&&(e=d.getElementSelection(this.domElement),this.selectionStart=e.start,this.selectionEnd=e.end,this.historyTable.push({value:this.rawValue,start:this.selectionStart+1,end:this.selectionEnd+1}),1<this.historyTable.length&&(this.historyTable[this.historyTableIndex-1].start=this.selectionStart,this.historyTable[this.historyTableIndex-1].end=this.selectionEnd)),this.historyTable.length>this.settings.historySize&&this._historyTableForget())}},{key:`_historyTableUndoOrRedo`,value:function(){var e;0<arguments.length&&arguments[0]!==void 0&&!arguments[0]?(e=this.historyTableIndex+1<this.historyTable.length)&&this.historyTableIndex++:(e=0<this.historyTableIndex)&&this.historyTableIndex--,e&&(e=this.historyTable[this.historyTableIndex],this.set(e.value,null,!1),d.setElementSelection(this.domElement,e.start,e.end))}},{key:`_historyTableUndo`,value:function(){this._historyTableUndoOrRedo(!0)}},{key:`_historyTableRedo`,value:function(){this._historyTableUndoOrRedo(!1)}},{key:`_historyTableForget`,value:function(){for(var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:1,t=[],n=0;n<e;n++)t.push(this.historyTable.shift()),this.historyTableIndex--,this.historyTableIndex<0&&(this.historyTableIndex=0);return t.length===1?t[0]:t}},{key:`_historyTableCurrentValueUsed`,value:function(){var e=this.historyTableIndex;return d.isUndefinedOrNullOrEmpty(this.historyTable[e=e<0?0:e])?``:this.historyTable[e].value}},{key:`_parseStyleRules`,value:function(){var e=this;d.isUndefinedOrNullOrEmpty(this.settings.styleRules)||this.rawValue===``||(d.isUndefinedOrNullOrEmpty(this.settings.styleRules.positive)||(0<=this.rawValue?this._addCSSClass(this.settings.styleRules.positive):this._removeCSSClass(this.settings.styleRules.positive)),d.isUndefinedOrNullOrEmpty(this.settings.styleRules.negative)||(this.rawValue<0?this._addCSSClass(this.settings.styleRules.negative):this._removeCSSClass(this.settings.styleRules.negative)),d.isUndefinedOrNullOrEmpty(this.settings.styleRules.ranges)||this.settings.styleRules.ranges.length===0||this.settings.styleRules.ranges.forEach(function(t){e.rawValue>=t.min&&e.rawValue<t.max?e._addCSSClass(t.class):e._removeCSSClass(t.class)}),d.isUndefinedOrNullOrEmpty(this.settings.styleRules.userDefined)||this.settings.styleRules.userDefined.length===0||this.settings.styleRules.userDefined.forEach(function(t){var n;d.isFunction(t.callback)?d.isString(t.classes)?t.callback(e.rawValue)?e._addCSSClass(t.classes):e._removeCSSClass(t.classes):d.isArray(t.classes)?t.classes.length===2?t.callback(e.rawValue)?(e._addCSSClass(t.classes[0]),e._removeCSSClass(t.classes[1])):(e._removeCSSClass(t.classes[0]),e._addCSSClass(t.classes[1])):2<t.classes.length?(n=t.callback(e.rawValue),d.isArray(n)?t.classes.forEach(function(t,r){d.isInArray(r,n)?e._addCSSClass(t):e._removeCSSClass(t)}):d.isInt(n)?t.classes.forEach(function(t,r){r===n?e._addCSSClass(t):e._removeCSSClass(t)}):d.isNull(n)?t.classes.forEach(function(t){e._removeCSSClass(t)}):d.throwError(`The callback result is not an array nor a valid array index, ${S(n)} given.`)):d.throwError("The classes attribute is not valid for the `styleRules` option."):d.isUndefinedOrNullOrEmpty(t.classes)?t.callback(e):d.throwError("The callback/classes structure is not valid for the `styleRules` option."):d.warning(`The given \`styleRules\` callback is not a function, ${typeof callback>`u`?`undefined`:S(callback)} given.`,e.settings.showWarnings)}))}},{key:`_addCSSClass`,value:function(e){this.domElement.classList.add(e)}},{key:`_removeCSSClass`,value:function(e){this.domElement.classList.remove(e)}},{key:`update`,value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];Array.isArray(n)&&Array.isArray(n[0])&&(n=n[0]);var i=d.cloneObject(this.settings),a=this.rawValue,o={};d.isUndefinedOrNullOrEmpty(n)||n.length===0?o=null:1<=n.length&&n.forEach(function(t){e.constructor._isPreDefinedOptionValid(t)&&(t=e.constructor._getOptionObject(t)),x(o,t)});try{this._setSettings(o,!0),this._setWritePermissions(),this._updateEventListeners(),this.set(a)}catch(e){return this._setSettings(i,!0),d.throwError(`Unable to update the settings, those are invalid: [${e}]`),this}return this}},{key:`getSettings`,value:function(){return this.settings}},{key:`set`,value:function(t){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null,r=!(2<arguments.length&&arguments[2]!==void 0)||arguments[2];if(d.isUndefined(t))return d.warning(`You are trying to set an 'undefined' value ; an error could have occurred.`,this.settings.showWarnings),this;if(d.isNull(n)||this._setSettings(n,!0),t===null&&this.settings.emptyInputBehavior!==e.options.emptyInputBehavior.null)return d.warning(`You are trying to set the \`null\` value while the \`emptyInputBehavior\` option is set to ${this.settings.emptyInputBehavior}. If you want to be able to set the \`null\` value, you need to change the 'emptyInputBehavior' option to \`'null'\`.`,this.settings.showWarnings),this;if(t===null)return this._setElementAndRawValue(null,null,r),this._saveValueToPersistentStorage(),this;if(a=this.constructor._toNumericValue(t,this.settings),isNaN(Number(a)))return d.warning("The value you are trying to set results in `NaN`. The element value is set to the empty string instead.",this.settings.showWarnings),this.setValue(``,r),this;if(a===``)switch(this.settings.emptyInputBehavior){case e.options.emptyInputBehavior.zero:a=0;break;case e.options.emptyInputBehavior.min:a=this.settings.minimumValue;break;case e.options.emptyInputBehavior.max:a=this.settings.maximumValue;break;default:d.isNumber(this.settings.emptyInputBehavior)&&(a=Number(this.settings.emptyInputBehavior))}if(a===``)return i=this.settings.emptyInputBehavior===e.options.emptyInputBehavior.always?this.settings.currencySymbol:``,this._setElementAndRawValue(i,``,r),this;var t=(n=v(this.constructor._checkIfInRangeWithOverrideOption(a,this.settings),2))[0],i=n[1];if(t&&i&&this.settings.valuesToStrings&&this._checkValuesToStrings(a))return this._setElementAndRawValue(this.settings.valuesToStrings[a],a,r),this._saveValueToPersistentStorage(),this;if(d.isZeroOrHasNoValue(a)&&(a=`0`),t&&i){var n=this.constructor._roundRawValue(a,this.settings),n=this._trimLeadingAndTrailingZeros(n.replace(this.settings.decimalCharacter,`.`)),a=this._getRawValueToFormat(a),a=this.isFocused?this.constructor._roundFormattedValueShownOnFocus(a,this.settings):(this.settings.divisorWhenUnfocused&&(a=(a/=this.settings.divisorWhenUnfocused).toString()),this.constructor._roundFormattedValueShownOnBlur(a,this.settings));return a=this.constructor._modifyNegativeSignAndDecimalCharacterForFormattedValue(a,this.settings),a=this.constructor._addGroupSeparators(a,this.settings,this.isFocused,this.rawValue,n),!this.isFocused&&this.settings.symbolWhenUnfocused&&(a=`${a}${this.settings.symbolWhenUnfocused}`),(this.settings.decimalPlacesShownOnFocus||this.settings.divisorWhenUnfocused)&&this._saveValueToPersistentStorage(),this._setElementAndRawValue(a,n,r),this._setValidOrInvalidState(n),this}return this._triggerRangeEvents(t,i),d.throwError(`The value [${a}] being set falls outside of the minimumValue [${this.settings.minimumValue}] and maximumValue [${this.settings.maximumValue}] range set for this element`),this._removeValueFromPersistentStorage(),this.setValue(``,r),this}},{key:`setUnformatted`,value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;return e===null||d.isUndefined(e)||(d.isNull(t)||this._setSettings(t,!0),t=this.constructor._removeBrackets(e,this.settings),t=this.constructor._stripAllNonNumberCharacters(t,this.settings,!0,this.isFocused),d.isNumber(t)||d.throwError(`The value is not a valid one, it's not a numeric string nor a recognized currency.`),this.constructor._isWithinRangeWithOverrideOption(t,this.settings)?this.setValue(e):d.throwError(`The value is out of the range limits [${this.settings.minimumValue}, ${this.settings.maximumValue}].`)),this}},{key:`setValue`,value:function(e){return this._setElementAndRawValue(e,!(1<arguments.length&&arguments[1]!==void 0)||arguments[1]),this}},{key:`_setRawValue`,value:function(t){var n,r=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];this.rawValue!==t&&(n=this.rawValue,this.rawValue=t,!d.isNull(this.settings.rawValueDivisor)&&this.settings.rawValueDivisor!==0&&t!==``&&t!==null&&this._isUserManuallyEditingTheValue()&&(this.rawValue/=this.settings.rawValueDivisor),this._triggerEvent(e.events.rawValueModified,this.domElement,{oldRawValue:n,newRawValue:this.rawValue,isPristine:this.isPristine(!0),error:null,aNElement:this}),this._parseStyleRules(),r&&this._historyTableAdd())}},{key:`_setElementValue`,value:function(t){var n=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1],r=d.getElementValue(this.domElement);return t!==r&&(this.internalModification=!0,d.setElementValue(this.domElement,t),this.internalModification=!1,n&&this._triggerEvent(e.events.formatted,this.domElement,{oldValue:r,newValue:t,oldRawValue:this.rawValue,newRawValue:this.rawValue,isPristine:this.isPristine(!1),error:null,aNElement:this})),this}},{key:`_setElementAndRawValue`,value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null,n=!(2<arguments.length&&arguments[2]!==void 0)||arguments[2];return d.isNull(t)?t=e:d.isBoolean(t)&&(n=t,t=e),this._setElementValue(e),this._setRawValue(t,n),this}},{key:`_getRawValueToFormat`,value:function(e){return d.isNull(this.settings.rawValueDivisor)||this.settings.rawValueDivisor===0||e===``||e===null?e:e*this.settings.rawValueDivisor}},{key:`_checkValuesToStrings`,value:function(e){return this.constructor._checkValuesToStringsArray(e,this.valuesToStringsKeys)}},{key:`_isUserManuallyEditingTheValue`,value:function(){return this.isFocused&&this.isEditing||this.isDropEvent}},{key:`_executeCallback`,value:function(e,t){!d.isNull(t)&&d.isFunction(t)&&t(e,this)}},{key:`_triggerEvent`,value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:document;d.triggerEvent(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,this.settings.eventBubbles,this.settings.eventIsCancelable)}},{key:`get`,value:function(){return this.getNumericString(0<arguments.length&&arguments[0]!==void 0?arguments[0]:null)}},{key:`getNumericString`,value:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,t=d.isNull(this.rawValue)?null:d.trimPaddedZerosFromDecimalPlaces(this.rawValue);return this._executeCallback(t,e),t}},{key:`getFormatted`,value:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;`value`in this.domElement||`textContent`in this.domElement||d.throwError(`Unable to get the formatted string from the element.`);var t=d.getElementValue(this.domElement);return this._executeCallback(t,e),t}},{key:`getNumber`,value:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,t=this.rawValue===null?null:this.constructor._toLocale(this.getNumericString(),`number`,this.settings);return this._executeCallback(t,e),t}},{key:`getLocalized`,value:function(){var t,n=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,r=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;return d.isFunction(n)&&d.isNull(r)&&(r=n,n=null),(t=d.isEmptyString(this.rawValue)?``:``+Number(this.rawValue))&&Number(t)===0&&this.settings.leadingZero!==e.options.leadingZero.keep&&(t=`0`),n=d.isNull(n)?this.settings.outputFormat:n,n=this.constructor._toLocale(t,n,this.settings),this._executeCallback(n,r),n}},{key:`reformat`,value:function(){return this.set(this.rawValue),this}},{key:`unformat`,value:function(){return this._setElementValue(this.getNumericString()),this}},{key:`unformatLocalized`,value:function(){return this._setElementValue(this.getLocalized(0<arguments.length&&arguments[0]!==void 0?arguments[0]:null)),this}},{key:`isPristine`,value:function(){return 0<arguments.length&&arguments[0]!==void 0&&!arguments[0]?this.initialValueHtmlAttribute===this.getFormatted():this.initialValue===this.getNumericString()}},{key:`select`,value:function(){return this.settings.selectNumberOnly?this.selectNumber():this._defaultSelectAll(),this}},{key:`_defaultSelectAll`,value:function(){d.setElementSelection(this.domElement,0,d.getElementValue(this.domElement).length)}},{key:`selectNumber`,value:function(){var t,n=(s=d.getElementValue(this.domElement)).length,r=this.settings.currencySymbol.length,i=this.settings.currencySymbolPlacement,a=d.isNegative(s,this.settings.negativeSignCharacter)?1:0,o=this.settings.suffixText.length,s=i===e.options.currencySymbolPlacement.suffix?0:this.settings.negativePositiveSignPlacement===e.options.negativePositiveSignPlacement.left&&a==1&&0<r?r+1:r;if(i===e.options.currencySymbolPlacement.prefix)t=n-o;else switch(this.settings.negativePositiveSignPlacement){case e.options.negativePositiveSignPlacement.left:t=n-(o+r);break;case e.options.negativePositiveSignPlacement.right:t=0<r?n-(r+a+o):n-(r+o);break;default:t=n-(r+o)}return d.setElementSelection(this.domElement,s,t),this}},{key:`selectInteger`,value:function(){var t=0,n=0<=this.rawValue;this.settings.currencySymbolPlacement!==e.options.currencySymbolPlacement.prefix&&(this.settings.currencySymbolPlacement!==e.options.currencySymbolPlacement.suffix||this.settings.negativePositiveSignPlacement!==e.options.negativePositiveSignPlacement.prefix&&this.settings.negativePositiveSignPlacement!==e.options.negativePositiveSignPlacement.none)||(this.settings.showPositiveSign&&n||!n&&this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===e.options.negativePositiveSignPlacement.left)&&(t+=1),this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.prefix&&(t+=this.settings.currencySymbol.length);var r=d.getElementValue(this.domElement),i=r.indexOf(this.settings.decimalCharacter);return i===-1&&(i=this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.suffix?r.length-this.settings.currencySymbol.length:r.length,n||this.settings.negativePositiveSignPlacement!==e.options.negativePositiveSignPlacement.suffix&&this.settings.currencySymbolPlacement!==e.options.currencySymbolPlacement.suffix||--i,i-=this.settings.suffixText.length),d.setElementSelection(this.domElement,t,i),this}},{key:`selectDecimal`,value:function(){var e=d.getElementValue(this.domElement).indexOf(this.settings.decimalCharacter),t=e===-1?e=0:(t=this.isFocused?this.settings.decimalPlacesShownOnFocus:this.settings.decimalPlacesShownOnBlur,(e+=1)+Number(t));return d.setElementSelection(this.domElement,e,t),this}},{key:`node`,value:function(){return this.domElement}},{key:`parent`,value:function(){return this.domElement.parentNode}},{key:`detach`,value:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,e=d.isNull(e)?this.domElement:e.node();return this._removeFromLocalList(e),this}},{key:`attach`,value:function(e){var t=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];return this._addToLocalList(e.node()),t&&e.update(this.settings),this}},{key:`formatOther`,value:function(e){return this._formatOrUnformatOther(!0,e,1<arguments.length&&arguments[1]!==void 0?arguments[1]:null)}},{key:`unformatOther`,value:function(e){return this._formatOrUnformatOther(!1,e,1<arguments.length&&arguments[1]!==void 0?arguments[1]:null)}},{key:`_formatOrUnformatOther`,value:function(t,n){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,r=d.isNull(r)?this.settings:this._cloneAndMergeSettings(r);if(d.isElement(n)){var i=d.getElementValue(n),i=t?e.format(i,r):e.unformat(i,r);return d.setElementValue(n,i),null}return t?e.format(n,r):e.unformat(n,r)}},{key:`init`,value:function(t){var n=this,r=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1],i=!1,a=[];if(d.isString(t)?a=_(document.querySelectorAll(t)):d.isElement(t)?(a.push(t),i=!0):d.isArray(t)?a=t:d.throwError(`The given parameters to the 'init' function are invalid.`),a.length===0)return d.warning(`No valid DOM elements were given hence no AutoNumeric object were instantiated.`,!0),[];var o=this._getLocalList(),s=[];return a.forEach(function(t){var i=n.settings.createLocalList;r&&(n.settings.createLocalList=!1);var a=new e(t,d.getElementValue(t),n.settings);r&&(a._setLocalList(o),n._addToLocalList(t,a),n.settings.createLocalList=i),s.push(a)}),i?s[0]:s}},{key:`clear`,value:function(){var t;return 0<arguments.length&&arguments[0]!==void 0&&arguments[0]?(t={emptyInputBehavior:e.options.emptyInputBehavior.focus},this.set(``,t)):this.set(``),this}},{key:`remove`,value:function(){this._removeValueFromPersistentStorage(),this._removeEventListeners(),this._removeWatcher(),this._removeFromLocalList(this.domElement),this.constructor._removeFromGlobalList(this)}},{key:`wipe`,value:function(){this._setElementValue(``,!1),this.remove()}},{key:`nuke`,value:function(){this.remove(),this.domElement.parentNode.removeChild(this.domElement)}},{key:`form`,value:function(){var e,t;return(0<arguments.length&&arguments[0]!==void 0&&arguments[0]||d.isUndefinedOrNullOrEmpty(this.parentForm))&&(e=this._getParentForm(),d.isNull(e)||e===this.parentForm||(t=this._getFormAutoNumericChildren(this.parentForm),this.parentForm.dataset.anCount=t.length,this._hasFormHandlerFunction(e)?this._incrementParentFormCounter(e):(this._storeFormHandlerFunction(e),this._initializeFormCounterToOne(e))),this.parentForm=e),this.parentForm}},{key:`_getFormAutoNumericChildren`,value:function(e){var t=this;return _(e.querySelectorAll(`input`)).filter(function(e){return t.constructor.isManagedByAutoNumeric(e)})}},{key:`_getParentForm`,value:function(){if(this.domElement.tagName.toLowerCase()===`body`)return null;var e,t=this.domElement;do if(t=t.parentNode,d.isNull(t))return null;while((e=t.tagName?t.tagName.toLowerCase():``)!==`body`&&e!==`form`);return e===`form`?t:null}},{key:`formNumericString`,value:function(){return this.constructor._serializeNumericString(this.form(),this.settings.serializeSpaces)}},{key:`formFormatted`,value:function(){return this.constructor._serializeFormatted(this.form(),this.settings.serializeSpaces)}},{key:`formLocalized`,value:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,e=d.isNull(e)?this.settings.outputFormat:e;return this.constructor._serializeLocalized(this.form(),this.settings.serializeSpaces,e)}},{key:`formArrayNumericString`,value:function(){return this.constructor._serializeNumericStringArray(this.form(),this.settings.serializeSpaces)}},{key:`formArrayFormatted`,value:function(){return this.constructor._serializeFormattedArray(this.form(),this.settings.serializeSpaces)}},{key:`formArrayLocalized`,value:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,e=d.isNull(e)?this.settings.outputFormat:e;return this.constructor._serializeLocalizedArray(this.form(),this.settings.serializeSpaces,e)}},{key:`formJsonNumericString`,value:function(){return JSON.stringify(this.formArrayNumericString())}},{key:`formJsonFormatted`,value:function(){return JSON.stringify(this.formArrayFormatted())}},{key:`formJsonLocalized`,value:function(){return JSON.stringify(this.formArrayLocalized(0<arguments.length&&arguments[0]!==void 0?arguments[0]:null))}},{key:`formUnformat`,value:function(){return this.constructor._getChildANInputElement(this.form()).forEach(function(t){e.getAutoNumericElement(t).unformat()}),this}},{key:`formUnformatLocalized`,value:function(){return this.constructor._getChildANInputElement(this.form()).forEach(function(t){e.getAutoNumericElement(t).unformatLocalized()}),this}},{key:`formReformat`,value:function(){return this.constructor._getChildANInputElement(this.form()).forEach(function(t){e.getAutoNumericElement(t).reformat()}),this}},{key:`formSubmitNumericString`,value:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;return d.isNull(e)?(this.formUnformat(),this.form().submit(),this.formReformat()):d.isFunction(e)?e(this.formNumericString()):d.throwError(`The given callback is not a function.`),this}},{key:`formSubmitFormatted`,value:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;return d.isNull(e)?this.form().submit():d.isFunction(e)?e(this.formFormatted()):d.throwError(`The given callback is not a function.`),this}},{key:`formSubmitLocalized`,value:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;return d.isNull(t)?(this.formUnformatLocalized(),this.form().submit(),this.formReformat()):d.isFunction(t)?t(this.formLocalized(e)):d.throwError(`The given callback is not a function.`),this}},{key:`formSubmitArrayNumericString`,value:function(e){return d.isFunction(e)?e(this.formArrayNumericString()):d.throwError(`The given callback is not a function.`),this}},{key:`formSubmitArrayFormatted`,value:function(e){return d.isFunction(e)?e(this.formArrayFormatted()):d.throwError(`The given callback is not a function.`),this}},{key:`formSubmitArrayLocalized`,value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;return d.isFunction(e)?e(this.formArrayLocalized(t)):d.throwError(`The given callback is not a function.`),this}},{key:`formSubmitJsonNumericString`,value:function(e){return d.isFunction(e)?e(this.formJsonNumericString()):d.throwError(`The given callback is not a function.`),this}},{key:`formSubmitJsonFormatted`,value:function(e){return d.isFunction(e)?e(this.formJsonFormatted()):d.throwError(`The given callback is not a function.`),this}},{key:`formSubmitJsonLocalized`,value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;return d.isFunction(e)?e(this.formJsonLocalized(t)):d.throwError(`The given callback is not a function.`),this}},{key:`_createLocalList`,value:function(){this.autoNumericLocalList=new Map,this._addToLocalList(this.domElement)}},{key:`_deleteLocalList`,value:function(){delete this.autoNumericLocalList}},{key:`_setLocalList`,value:function(e){this.autoNumericLocalList=e}},{key:`_getLocalList`,value:function(){return this.autoNumericLocalList}},{key:`_hasLocalList`,value:function(){return this.autoNumericLocalList instanceof Map&&this.autoNumericLocalList.size!==0}},{key:`_addToLocalList`,value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;d.isNull(t)&&(t=this),d.isUndefined(this.autoNumericLocalList)?d.throwError(`The local list provided does not exists when trying to add an element. [${this.autoNumericLocalList}] given.`):this.autoNumericLocalList.set(e,t)}},{key:`_removeFromLocalList`,value:function(e){d.isUndefined(this.autoNumericLocalList)?this.settings.createLocalList&&d.throwError(`The local list provided does not exists when trying to remove an element. [${this.autoNumericLocalList}] given.`):this.autoNumericLocalList.delete(e)}},{key:`_mergeSettings`,value:function(){var e=[...arguments];x.apply(void 0,[this.settings].concat(e))}},{key:`_cloneAndMergeSettings`,value:function(){for(var e={},t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return x.apply(void 0,[e,this.settings].concat(n)),e}},{key:`_updatePredefinedOptions`,value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;return d.isNull(t)?this.update(e):(this._mergeSettings(e,t),this.update(this.settings)),this}},{key:`french`,value:function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;return this._updatePredefinedOptions(e.getPredefinedOptions().French,t),this}},{key:`northAmerican`,value:function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;return this._updatePredefinedOptions(e.getPredefinedOptions().NorthAmerican,t),this}},{key:`british`,value:function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;return this._updatePredefinedOptions(e.getPredefinedOptions().British,t),this}},{key:`swiss`,value:function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;return this._updatePredefinedOptions(e.getPredefinedOptions().Swiss,t),this}},{key:`japanese`,value:function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;return this._updatePredefinedOptions(e.getPredefinedOptions().Japanese,t),this}},{key:`spanish`,value:function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;return this._updatePredefinedOptions(e.getPredefinedOptions().Spanish,t),this}},{key:`chinese`,value:function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;return this._updatePredefinedOptions(e.getPredefinedOptions().Chinese,t),this}},{key:`brazilian`,value:function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;return this._updatePredefinedOptions(e.getPredefinedOptions().Brazilian,t),this}},{key:`_runCallbacksFoundInTheSettingsObject`,value:function(){for(var e in this.settings){var t;Object.prototype.hasOwnProperty.call(this.settings,e)&&(typeof(t=this.settings[e])==`function`?this.settings[e]=t(this,e):(t=this.domElement.getAttribute(e),t=d.camelize(t),typeof this.settings[t]==`function`&&(this.settings[e]=t(this,e))))}}},{key:`_setTrailingNegativeSignInfo`,value:function(){this.isTrailingNegative=this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===e.options.negativePositiveSignPlacement.suffix||this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.suffix&&(this.settings.negativePositiveSignPlacement===e.options.negativePositiveSignPlacement.left||this.settings.negativePositiveSignPlacement===e.options.negativePositiveSignPlacement.right)}},{key:`_modifyNegativeSignAndDecimalCharacterForRawValue`,value:function(e){return this.settings.decimalCharacter!==`.`&&(e=e.replace(this.settings.decimalCharacter,`.`)),(e=this.settings.negativeSignCharacter!==`-`&&this.settings.isNegativeSignAllowed?e.replace(this.settings.negativeSignCharacter,`-`):e).match(/\d/)||(e+=`0`),e}},{key:`_initialCaretPosition`,value:function(t){d.isNull(this.settings.caretPositionOnFocus)&&this.settings.selectOnFocus===e.options.selectOnFocus.doNotSelect&&d.throwError("`_initialCaretPosition()` should never be called when the `caretPositionOnFocus` option is `null`.");var n,r=this.rawValue<0,i=d.isZeroOrHasNoValue(t),a=t.length,o=0,s=0,c=0;this.settings.caretPositionOnFocus!==e.options.caretPositionOnFocus.start&&(o=(t=(t=(t=t.replace(this.settings.negativeSignCharacter,``)).replace(this.settings.positiveSignCharacter,``)).replace(this.settings.currencySymbol,``)).length,n=d.contains(t,this.settings.decimalCharacter),this.settings.caretPositionOnFocus!==e.options.caretPositionOnFocus.decimalLeft&&this.settings.caretPositionOnFocus!==e.options.caretPositionOnFocus.decimalRight||(c=n?(s=t.indexOf(this.settings.decimalCharacter),this.settings.decimalCharacter.length):(s=o,0))),t=``,r?t=this.settings.negativeSignCharacter:this.settings.showPositiveSign&&!i&&(t=this.settings.positiveSignCharacter);var l,u=t.length,f=this.settings.currencySymbol.length;if(this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.prefix){if(this.settings.caretPositionOnFocus===e.options.caretPositionOnFocus.start)if(this.settings.negativePositiveSignPlacement!==e.options.negativePositiveSignPlacement.none&&(r||!r&&this.settings.showPositiveSign&&!i))switch(this.settings.negativePositiveSignPlacement){case e.options.negativePositiveSignPlacement.prefix:case e.options.negativePositiveSignPlacement.left:case e.options.negativePositiveSignPlacement.right:l=u+f;break;case e.options.negativePositiveSignPlacement.suffix:l=f}else l=f;else if(this.settings.caretPositionOnFocus===e.options.caretPositionOnFocus.end)if(this.settings.negativePositiveSignPlacement!==e.options.negativePositiveSignPlacement.none&&(r||!r&&this.settings.showPositiveSign&&!i))switch(this.settings.negativePositiveSignPlacement){case e.options.negativePositiveSignPlacement.prefix:case e.options.negativePositiveSignPlacement.left:case e.options.negativePositiveSignPlacement.right:l=a;break;case e.options.negativePositiveSignPlacement.suffix:l=f+o}else l=a;else if(this.settings.caretPositionOnFocus===e.options.caretPositionOnFocus.decimalLeft)if(this.settings.negativePositiveSignPlacement!==e.options.negativePositiveSignPlacement.none&&(r||!r&&this.settings.showPositiveSign&&!i))switch(this.settings.negativePositiveSignPlacement){case e.options.negativePositiveSignPlacement.prefix:case e.options.negativePositiveSignPlacement.left:case e.options.negativePositiveSignPlacement.right:l=u+f+s;break;case e.options.negativePositiveSignPlacement.suffix:l=f+s}else l=f+s;else if(this.settings.caretPositionOnFocus===e.options.caretPositionOnFocus.decimalRight)if(this.settings.negativePositiveSignPlacement!==e.options.negativePositiveSignPlacement.none&&(r||!r&&this.settings.showPositiveSign&&!i))switch(this.settings.negativePositiveSignPlacement){case e.options.negativePositiveSignPlacement.prefix:case e.options.negativePositiveSignPlacement.left:case e.options.negativePositiveSignPlacement.right:l=u+f+s+c;break;case e.options.negativePositiveSignPlacement.suffix:l=f+s+c}else l=f+s+c}else if(this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.suffix){if(this.settings.caretPositionOnFocus===e.options.caretPositionOnFocus.start)if(this.settings.negativePositiveSignPlacement!==e.options.negativePositiveSignPlacement.none&&(r||!r&&this.settings.showPositiveSign&&!i))switch(this.settings.negativePositiveSignPlacement){case e.options.negativePositiveSignPlacement.suffix:case e.options.negativePositiveSignPlacement.right:case e.options.negativePositiveSignPlacement.left:l=0;break;case e.options.negativePositiveSignPlacement.prefix:l=u}else l=0;else if(this.settings.caretPositionOnFocus===e.options.caretPositionOnFocus.end)if(this.settings.negativePositiveSignPlacement!==e.options.negativePositiveSignPlacement.none&&(r||!r&&this.settings.showPositiveSign&&!i))switch(this.settings.negativePositiveSignPlacement){case e.options.negativePositiveSignPlacement.suffix:case e.options.negativePositiveSignPlacement.right:case e.options.negativePositiveSignPlacement.left:l=o;break;case e.options.negativePositiveSignPlacement.prefix:l=u+o}else l=o;else if(this.settings.caretPositionOnFocus===e.options.caretPositionOnFocus.decimalLeft)if(this.settings.negativePositiveSignPlacement!==e.options.negativePositiveSignPlacement.none&&(r||!r&&this.settings.showPositiveSign&&!i))switch(this.settings.negativePositiveSignPlacement){case e.options.negativePositiveSignPlacement.suffix:case e.options.negativePositiveSignPlacement.right:case e.options.negativePositiveSignPlacement.left:l=s;break;case e.options.negativePositiveSignPlacement.prefix:l=u+s}else l=s;else if(this.settings.caretPositionOnFocus===e.options.caretPositionOnFocus.decimalRight)if(this.settings.negativePositiveSignPlacement!==e.options.negativePositiveSignPlacement.none&&(r||!r&&this.settings.showPositiveSign&&!i))switch(this.settings.negativePositiveSignPlacement){case e.options.negativePositiveSignPlacement.suffix:case e.options.negativePositiveSignPlacement.right:case e.options.negativePositiveSignPlacement.left:l=s+c;break;case e.options.negativePositiveSignPlacement.prefix:l=u+s+c}else l=s+c}return l}},{key:`_triggerRangeEvents`,value:function(t,n){t||this._triggerEvent(e.events.minRangeExceeded,this.domElement),n||this._triggerEvent(e.events.maxRangeExceeded,this.domElement)}},{key:`_setInvalidState`,value:function(){this.isInputElement?d.setInvalidState(this.domElement):this._addCSSClass(this.settings.invalidClass),this._triggerEvent(e.events.invalidValue,this.domElement),this.validState=!1}},{key:`_setValidState`,value:function(){this.isInputElement?d.setValidState(this.domElement):this._removeCSSClass(this.settings.invalidClass),this.validState||this._triggerEvent(e.events.correctedValue,this.domElement),this.validState=!0}},{key:`_setValidOrInvalidState`,value:function(t){var n;this.settings.overrideMinMaxLimits===e.options.overrideMinMaxLimits.invalid&&(n=this.constructor._isMinimumRangeRespected(t,this.settings),t=this.constructor._isMaximumRangeRespected(t,this.settings),n&&t?this._setValidState():this._setInvalidState(),this._triggerRangeEvents(n,t))}},{key:`_keepAnOriginalSettingsCopy`,value:function(){this.originalDigitGroupSeparator=this.settings.digitGroupSeparator,this.originalCurrencySymbol=this.settings.currencySymbol,this.originalSuffixText=this.settings.suffixText}},{key:`_trimLeadingAndTrailingZeros`,value:function(t){if(t===``||t===null)return t;if(this.settings.leadingZero!==e.options.leadingZero.keep){if(Number(t)===0)return`0`;t=t.replace(/^(-)?0+(?=\d)/g,`$1`)}return(t=d.contains(t,`.`)?t.replace(/(\.[0-9]*?)0+$/,`$1`):t).replace(/\.$/,``)}},{key:`_setPersistentStorageName`,value:function(){this.settings.saveValueToSessionStorage&&(this.domElement.name===``||d.isUndefined(this.domElement.name)?this.rawValueStorageName=`${this.storageNamePrefix}${this.domElement.id}`:this.rawValueStorageName=`${this.storageNamePrefix}${decodeURIComponent(this.domElement.name)}`)}},{key:`_saveValueToPersistentStorage`,value:function(){this.settings.saveValueToSessionStorage&&(this.sessionStorageAvailable?sessionStorage.setItem(this.rawValueStorageName,this.rawValue):document.cookie=`${this.rawValueStorageName}=${this.rawValue}; expires= ; path=/`)}},{key:`_getValueFromPersistentStorage`,value:function(){return this.settings.saveValueToSessionStorage?this.sessionStorageAvailable?sessionStorage.getItem(this.rawValueStorageName):this.constructor._readCookie(this.rawValueStorageName):(d.warning("`_getValueFromPersistentStorage()` is called but `settings.saveValueToSessionStorage` is false. There must be an error that needs fixing.",this.settings.showWarnings),null)}},{key:`_removeValueFromPersistentStorage`,value:function(){var e;this.settings.saveValueToSessionStorage&&(this.sessionStorageAvailable?sessionStorage.removeItem(this.rawValueStorageName):((e=new Date).setTime(e.getTime()-864e5),e=`; expires=${e.toUTCString()}`,document.cookie=`${this.rawValueStorageName}='' ;${e}; path=/`))}},{key:`_getDefaultValue`,value:function(e){return e=e.getAttribute(`value`),d.isNull(e)?``:e}},{key:`_onFocusInAndMouseEnter`,value:function(t){var n,r,i;this.isEditing=!1,!this.formulaMode&&this.settings.unformatOnHover&&t.type===`mouseenter`&&t.altKey?this.constructor._unformatAltHovered(this):(t.type===`focus`&&(this.isFocused=!0,this.rawValueOnFocus=this.rawValue),t.type===`focus`&&this.settings.unformatOnHover&&this.hoveredWithAlt&&this.constructor._reformatAltHovered(this),t.type!==`focus`&&(t.type!==`mouseenter`||this.isFocused)||(n=null,this.settings.emptyInputBehavior===e.options.emptyInputBehavior.focus&&this.rawValue<0&&this.settings.negativeBracketsTypeOnBlur!==null&&this.settings.isNegativeSignAllowed&&(n=this.constructor._removeBrackets(d.getElementValue(this.domElement),this.settings)),(r=this._getRawValueToFormat(this.rawValue))!==``&&(i=this.constructor._roundFormattedValueShownOnFocusOrBlur(r,this.settings,this.isFocused),n=this.settings.showOnlyNumbersOnFocus===e.options.showOnlyNumbersOnFocus.onlyNumbers?(this.settings.digitGroupSeparator=``,this.settings.currencySymbol=``,this.settings.suffixText=``,i.replace(`.`,this.settings.decimalCharacter)):d.isNull(i)?``:this.constructor._addGroupSeparators(i.replace(`.`,this.settings.decimalCharacter),this.settings,this.isFocused,r)),d.isNull(n)?this.valueOnFocus=``:this.valueOnFocus=n,this.lastVal=this.valueOnFocus,i=this.constructor._isElementValueEmptyOrOnlyTheNegativeSign(this.valueOnFocus,this.settings),r=this.constructor._orderValueCurrencySymbolAndSuffixText(this.valueOnFocus,this.settings,!0),i=i&&r!==``&&this.settings.emptyInputBehavior===e.options.emptyInputBehavior.focus,d.isNull(n=i?r:n)||this._setElementValue(n),i&&r===this.settings.currencySymbol&&this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.suffix&&d.setElementSelection(t.target,0)))}},{key:`_onFocus`,value:function(){this.settings.isCancellable&&this._saveCancellableValue()}},{key:`_onFocusIn`,value:function(e){this.settings.selectOnFocus?this.select():d.isNull(this.settings.caretPositionOnFocus)||d.setElementSelection(e.target,this._initialCaretPosition(d.getElementValue(this.domElement)))}},{key:`_enterFormulaMode`,value:function(){this.settings.formulaMode&&(this.formulaMode=!0,d.setElementValue(this.domElement,`=`),d.setElementSelection(this.domElement,1))}},{key:`_exitFormulaMode`,value:function(){var t=(t=d.getElementValue(this.domElement)).replace(/^\s*=/,``);try{var n=new g(t,this.settings.decimalCharacter),r=new f().evaluate(n)}catch{this._triggerEvent(e.events.invalidFormula,this.domElement,{formula:t,aNElement:this}),this.reformat(),this.formulaMode=!1;return}this._triggerEvent(e.events.validFormula,this.domElement,{formula:t,result:r,aNElement:this}),this.set(r),this.formulaMode=!1}},{key:`_acceptNonPrintableKeysInFormulaMode`,value:function(){return this.eventKey===i.keyName.Backspace||this.eventKey===i.keyName.Delete||this.eventKey===i.keyName.LeftArrow||this.eventKey===i.keyName.RightArrow||this.eventKey===i.keyName.Home||this.eventKey===i.keyName.End}},{key:`_onKeydown`,value:function(t){if(this.formatted=!1,this.isEditing=!0,this.formulaMode||this.isFocused||!this.settings.unformatOnHover||!t.altKey||this.domElement!==d.getHoveredElement()){if(this._updateEventKeyInfo(t),this.keydownEventCounter+=1,this.keydownEventCounter===1&&(this.initialValueOnFirstKeydown=d.getElementValue(t.target),this.initialRawValueOnFirstKeydown=this.rawValue),this.formulaMode){if(this.eventKey===i.keyName.Esc)return this.formulaMode=!1,void this.reformat();if(this.eventKey===i.keyName.Enter)return void this._exitFormulaMode();if(this._acceptNonPrintableKeysInFormulaMode())return}else if(this.eventKey===i.keyName.Equal)return void this._enterFormulaMode();var n,r;this.domElement.readOnly||this.settings.readOnly||this.domElement.disabled?this.processed=!0:(this.eventKey===i.keyName.Esc&&(t.preventDefault(),this.settings.isCancellable&&this.rawValue!==this.savedCancellableValue&&(this.set(this.savedCancellableValue),this._triggerEvent(e.events.native.input,t.target)),this.select()),n=d.getElementValue(t.target),this.eventKey===i.keyName.Enter&&this.rawValue!==this.rawValueOnFocus&&(this._triggerEvent(e.events.native.change,t.target),this.valueOnFocus=n,this.rawValueOnFocus=this.rawValue,this.settings.isCancellable&&this._saveCancellableValue()),this._updateInternalProperties(t),this._processNonPrintableKeysAndShortcuts(t)?this.processed=!0:this.eventKey!==i.keyName.Backspace&&this.eventKey!==i.keyName.Delete||(r=this._processCharacterDeletion(),this.processed=!0,r?(this._formatValue(t),(n=d.getElementValue(t.target))!==this.lastVal&&this.throwInput&&(this._triggerEvent(e.events.native.input,t.target),t.preventDefault()),this.lastVal=n,this.throwInput=!0):t.preventDefault()))}else this.constructor._unformatAltHovered(this)}},{key:`_onKeypress`,value:function(t){if(this.formulaMode)return this._acceptNonPrintableKeysInFormulaMode()||this.settings.formulaChars.test(this.eventKey)?void 0:void t.preventDefault();if(this.eventKey!==i.keyName.Insert){var n=this.processed;if(this._updateInternalProperties(t),!this._processNonPrintableKeysAndShortcuts(t))if(n)t.preventDefault();else{if(this._processCharacterInsertion())return this._formatValue(t),(n=d.getElementValue(t.target))!==this.lastVal&&this.throwInput?this._triggerEvent(e.events.native.input,t.target):this.eventKey!==this.settings.decimalCharacter&&this.eventKey!==this.settings.decimalCharacterAlternative||d.getElementSelection(t.target).start!==d.getElementSelection(t.target).end||d.getElementSelection(t.target).start!==n.indexOf(this.settings.decimalCharacter)||(n=d.getElementSelection(t.target).start+1,d.setElementSelection(t.target,n)),t.preventDefault(),this.lastVal=d.getElementValue(t.target),this.throwInput=!0,void this._setValidOrInvalidState(this.rawValue);t.preventDefault()}}}},{key:`_onKeyup`,value:function(t){if(this.isEditing=!1,this.keydownEventCounter=0,!this.formulaMode)if(this.settings.isCancellable&&this.eventKey===i.keyName.Esc)t.preventDefault();else{if(this.eventKey===i.keyName.Z||this.eventKey===i.keyName.z){if(t.ctrlKey&&t.shiftKey)return t.preventDefault(),this._historyTableRedo(),void(this.onGoingRedo=!0);if(t.ctrlKey&&!t.shiftKey){if(!this.onGoingRedo)return t.preventDefault(),void this._historyTableUndo();this.onGoingRedo=!1}}var n,r;this.onGoingRedo&&(t.ctrlKey||t.shiftKey)&&(this.onGoingRedo=!1),(t.ctrlKey||t.metaKey)&&this.eventKey===i.keyName.x&&(r=d.getElementSelection(this.domElement).start,n=this.constructor._toNumericValue(d.getElementValue(t.target),this.settings),this.set(n),this._setCaretPosition(r)),this.eventKey===i.keyName.Alt&&this.settings.unformatOnHover&&this.hoveredWithAlt?this.constructor._reformatAltHovered(this):!t.ctrlKey&&!t.metaKey||this.eventKey!==i.keyName.Backspace&&this.eventKey!==i.keyName.Delete?(this._updateInternalProperties(t),n=this._processNonPrintableKeysAndShortcuts(t),delete this.valuePartsBeforePaste,r=d.getElementValue(t.target),n||r===``&&this.initialValueOnFirstKeydown===``||(r===this.settings.currencySymbol?this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.suffix?d.setElementSelection(t.target,0):d.setElementSelection(t.target,this.settings.currencySymbol.length):this.eventKey===i.keyName.Tab&&d.setElementSelection(t.target,0,r.length),(r===this.settings.suffixText||this.rawValue===``&&this.settings.currencySymbol!==``&&this.settings.suffixText!==``)&&d.setElementSelection(t.target,0),this.settings.decimalPlacesShownOnFocus!==null&&this._saveValueToPersistentStorage(),this.formatted||this._formatValue(t),this._setValidOrInvalidState(this.rawValue),this._saveRawValueForAndroid(),r!==this.initialValueOnFirstKeydown&&this._triggerEvent(e.events.formatted,t.target,{oldValue:this.initialValueOnFirstKeydown,newValue:r,oldRawValue:this.initialRawValueOnFirstKeydown,newRawValue:this.rawValue,isPristine:this.isPristine(!1),error:null,aNElement:this}),1<this.historyTable.length&&(r=d.getElementSelection(this.domElement),this.selectionStart=r.start,this.selectionEnd=r.end,this.historyTable[this.historyTableIndex].start=this.selectionStart,this.historyTable[this.historyTableIndex].end=this.selectionEnd))):(t=d.getElementValue(t.target),this._setRawValue(this._formatOrUnformatOther(!1,t)))}}},{key:`_saveRawValueForAndroid`,value:function(){var e;this.eventKey===i.keyName.AndroidDefault&&(e=this.constructor._stripAllNonNumberCharactersExceptCustomDecimalChar(this.getFormatted(),this.settings,!0,this.isFocused),e=this.constructor._convertToNumericString(e,this.settings),this._setRawValue(e))}},{key:`_onFocusOutAndMouseLeave`,value:function(t){if(this.isEditing=!1,t.type!==`mouseleave`||!this.formulaMode){if(this.settings.unformatOnHover&&t.type===`mouseleave`&&this.hoveredWithAlt)this.constructor._reformatAltHovered(this);else if(t.type===`mouseleave`&&!this.isFocused||t.type===`blur`){t.type===`blur`&&this.formulaMode&&this._exitFormulaMode(),this._saveValueToPersistentStorage(),this.settings.showOnlyNumbersOnFocus===e.options.showOnlyNumbersOnFocus.onlyNumbers&&(this.settings.digitGroupSeparator=this.originalDigitGroupSeparator,this.settings.currencySymbol=this.originalCurrencySymbol,this.settings.suffixText=this.originalSuffixText);var n=this._getRawValueToFormat(this.rawValue),r=d.isNull(n),i=(o=v(this.constructor._checkIfInRangeWithOverrideOption(n,this.settings),2))[0],a=o[1],o=!1;if(n===``||r||(this._triggerRangeEvents(i,a),this.settings.valuesToStrings&&this._checkValuesToStrings(n)&&(this._setElementValue(this.settings.valuesToStrings[n]),o=!0)),!o){var s=r||n===``?n:String(n);if(n===``||r){if(n===``)switch(this.settings.emptyInputBehavior){case e.options.emptyInputBehavior.zero:this._setRawValue(`0`),s=this.constructor._roundValue(`0`,this.settings,0);break;case e.options.emptyInputBehavior.min:this._setRawValue(this.settings.minimumValue),s=this.constructor._roundFormattedValueShownOnFocusOrBlur(this.settings.minimumValue,this.settings,this.isFocused);break;case e.options.emptyInputBehavior.max:this._setRawValue(this.settings.maximumValue),s=this.constructor._roundFormattedValueShownOnFocusOrBlur(this.settings.maximumValue,this.settings,this.isFocused);break;default:d.isNumber(this.settings.emptyInputBehavior)&&(this._setRawValue(this.settings.emptyInputBehavior),s=this.constructor._roundFormattedValueShownOnFocusOrBlur(this.settings.emptyInputBehavior,this.settings,this.isFocused))}}else i&&a&&!this.constructor._isElementValueEmptyOrOnlyTheNegativeSign(n,this.settings)?(s=this._modifyNegativeSignAndDecimalCharacterForRawValue(s),this.settings.divisorWhenUnfocused&&!d.isNull(s)&&(s=(s/=this.settings.divisorWhenUnfocused).toString()),s=this.constructor._roundFormattedValueShownOnBlur(s,this.settings),s=this.constructor._modifyNegativeSignAndDecimalCharacterForFormattedValue(s,this.settings)):this._triggerRangeEvents(i,a);a=this.constructor._orderValueCurrencySymbolAndSuffixText(s,this.settings,!1),(a=this.constructor._isElementValueEmptyOrOnlyTheNegativeSign(s,this.settings)||r&&this.settings.emptyInputBehavior===e.options.emptyInputBehavior.null?a:this.constructor._addGroupSeparators(s,this.settings,!1,n))===n&&n!==``&&this.settings.allowDecimalPadding!==e.options.allowDecimalPadding.never&&this.settings.allowDecimalPadding!==e.options.allowDecimalPadding.floats||(this.settings.symbolWhenUnfocused&&n!==``&&n!==null&&(a=`${a}${this.settings.symbolWhenUnfocused}`),this._setElementValue(a))}this._setValidOrInvalidState(this.rawValue),t.type===`blur`&&this._onBlur(t)}}}},{key:`_onPaste`,value:function(t){if(t.preventDefault(),!(this.settings.readOnly||this.domElement.readOnly||this.domElement.disabled)){var n;window.clipboardData&&window.clipboardData.getData?n=window.clipboardData.getData(`Text`):t.clipboardData&&t.clipboardData.getData?n=t.clipboardData.getData(`text/plain`):d.throwError(`Unable to retrieve the pasted value. Please use a modern browser (ie. Firefox or Chromium).`);var r=t.target.tagName?t.target:t.explicitOriginalTarget,i=d.getElementValue(r),a=r.selectionStart||0,o=r.selectionEnd||0,s=o-a;if(s===i.length){var c=this._preparePastedText(n);(u=d.arabicToLatinNumbers(c,!1,!1,!1))===`.`||u===``||u!==`.`&&!d.isNumber(u)?(this.formatted=!0,this.settings.onInvalidPaste===e.options.onInvalidPaste.error&&d.throwError(`The pasted value '${n}' is not a valid paste content.`)):(this.set(u),this.formatted=!0,this._triggerEvent(e.events.native.input,r));return}(t=d.isNegativeStrict(n,this.settings.negativeSignCharacter))&&(n=n.slice(1,n.length));var l=(c=this._preparePastedText(n))===`.`?`.`:d.arabicToLatinNumbers(c,!1,!1,!1);if(l!==`.`&&(!d.isNumber(l)||l===``))return this.formatted=!0,void(this.settings.onInvalidPaste===e.options.onInvalidPaste.error&&d.throwError(`The pasted value '${n}' is not a valid paste content.`));var u=d.isNegativeStrict(this.getNumericString(),this.settings.negativeSignCharacter),f=!(!t||u)&&(u=!0),c=i.slice(0,a),t=i.slice(o,i.length),p=a===o?this._preparePastedText(i):this._preparePastedText(c+t);u&&(p=d.setRawNegativeSign(p)),T=d.convertCharacterCountToIndexPosition(d.countNumberCharactersOnTheCaretLeftSide(i,a,this.settings.decimalCharacter)),f&&T++;var m=p.slice(0,T),h=p.slice(T,p.length),g=!1;l===`.`&&(d.contains(m,`.`)&&(g=!0,m=m.replace(`.`,``)),h=h.replace(`.`,``));var _=!1;switch(m===``&&h===`-`&&(m=`-`,_=!(h=``)),this.settings.onInvalidPaste){case e.options.onInvalidPaste.truncate:case e.options.onInvalidPaste.replace:for(var v=d.parseStr(this.settings.minimumValue),y=d.parseStr(this.settings.maximumValue),b=p,x=0,S=m;x<l.length&&(S+=l[x],this.constructor._checkIfInRange(p=S+h,v,y));)b=p,x++;if(T+=x,_&&T++,this.settings.onInvalidPaste===e.options.onInvalidPaste.truncate){p=b,g&&T--;break}for(var C=T,w=b.length;x<l.length&&C<w;)if(b[C]!==`.`){if(p=d.replaceCharAt(b,C,l[x]),!this.constructor._checkIfInRange(p,v,y))break;b=p,x++,C++}else C++;T=C,g&&T--,p=b;break;case e.options.onInvalidPaste.error:case e.options.onInvalidPaste.ignore:case e.options.onInvalidPaste.clamp:default:var T,E,D,p=`${m}${l}${h}`;a===o?T=d.convertCharacterCountToIndexPosition(d.countNumberCharactersOnTheCaretLeftSide(i,a,this.settings.decimalCharacter))+l.length:h===``?(T=d.convertCharacterCountToIndexPosition(d.countNumberCharactersOnTheCaretLeftSide(i,a,this.settings.decimalCharacter))+l.length,_&&T++):(E=d.convertCharacterCountToIndexPosition(d.countNumberCharactersOnTheCaretLeftSide(i,o,this.settings.decimalCharacter)),D=d.getElementValue(r).slice(a,o),T=E-s+d.countCharInText(this.settings.digitGroupSeparator,D)+l.length),f&&T++,g&&T--}if(d.isNumber(p)&&p!==``){var O,k=!1,A=!1;try{this.set(p),k=!0}catch{switch(this.settings.onInvalidPaste){case e.options.onInvalidPaste.clamp:O=d.clampToRangeLimits(p,this.settings);try{this.set(O)}catch{d.throwError(`Fatal error: Unable to set the clamped value '${O}'.`)}k=A=!0,p=O;break;case e.options.onInvalidPaste.error:case e.options.onInvalidPaste.truncate:case e.options.onInvalidPaste.replace:d.throwError(`The pasted value '${n}' results in a value '${p}' that is outside of the minimum [${this.settings.minimumValue}] and maximum [${this.settings.maximumValue}] value range.`);case e.options.onInvalidPaste.ignore:default:return}}var j,M=d.getElementValue(r);if(k)switch(this.settings.onInvalidPaste){case e.options.onInvalidPaste.clamp:if(A){this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.suffix?d.setElementSelection(r,M.length-this.settings.currencySymbol.length):d.setElementSelection(r,M.length);break}case e.options.onInvalidPaste.error:case e.options.onInvalidPaste.ignore:case e.options.onInvalidPaste.truncate:case e.options.onInvalidPaste.replace:default:j=d.findCaretPositionInFormattedNumber(p,T,M,this.settings.decimalCharacter),d.setElementSelection(r,j)}k&&i!==M&&this._triggerEvent(e.events.native.input,r)}else this.settings.onInvalidPaste===e.options.onInvalidPaste.error&&d.throwError(`The pasted value '${n}' would result into an invalid content '${p}'.`)}}},{key:`_onBlur`,value:function(t){this.isFocused=!1,this.isEditing=!1,this.rawValue!==this.rawValueOnFocus&&this._triggerEvent(e.events.native.change,t.target),this.rawValueOnFocus=void 0}},{key:`_onWheel`,value:function(t){this.formulaMode||this.settings.readOnly||this.domElement.readOnly||this.domElement.disabled||this.settings.modifyValueOnWheel&&(this.settings.wheelOn===e.options.wheelOn.focus?this.isFocused?t.shiftKey||this.wheelAction(t):t.shiftKey&&this.wheelAction(t):this.settings.wheelOn===e.options.wheelOn.hover?t.shiftKey?(t.preventDefault(),window.scrollBy(0,d.isNegativeStrict(String(t.deltaY))?-50:50)):this.wheelAction(t):d.throwError("Unknown `wheelOn` option."))}},{key:`wheelAction`,value:function(t){this.isWheelEvent=!0;var n,r,i=t.target.selectionStart||0,a=t.target.selectionEnd||0,o=this.rawValue;d.isUndefinedOrNullOrEmpty(o)?0<this.settings.minimumValue||this.settings.maximumValue<0?d.isWheelUpEvent(t)?n=this.settings.minimumValue:d.isWheelDownEvent(t)?n=this.settings.maximumValue:d.throwError(`The event is not a 'wheel' event.`):n=0:n=o,n=+n,d.isNumber(this.settings.wheelStep)?(r=+this.settings.wheelStep,d.isWheelUpEvent(t)?n+=r:d.isWheelDownEvent(t)&&(n-=r)):d.isWheelUpEvent(t)?n=d.addAndRoundToNearestAuto(n,this.settings.decimalPlacesRawValue):d.isWheelDownEvent(t)&&(n=d.subtractAndRoundToNearestAuto(n,this.settings.decimalPlacesRawValue)),(n=d.clampToRangeLimits(n,this.settings))!==+o&&(this.set(n),this._triggerEvent(e.events.native.input,t.target)),t.preventDefault(),this._setSelection(i,a),this.isWheelEvent=!1}},{key:`_onDrop`,value:function(e){var t;this.formulaMode||(this.isDropEvent=!0,e.preventDefault(),t=d.isIE11()?`text`:`text/plain`,t=e.dataTransfer.getData(t),t=this.unformatOther(t),this.set(t),this.isDropEvent=!1)}},{key:`_onFormSubmit`,value:function(){var e=this;return this._getFormAutoNumericChildren(this.parentForm).map(function(t){return e.constructor.getAutoNumericElement(t)}).forEach(function(e){return e._unformatOnSubmit()}),!0}},{key:`_onFormReset`,value:function(){var e=this;this._getFormAutoNumericChildren(this.parentForm).map(function(t){return e.constructor.getAutoNumericElement(t)}).forEach(function(t){var n=e._getDefaultValue(t.node());setTimeout(function(){return t.set(n)},0)})}},{key:`_unformatOnSubmit`,value:function(){this.settings.unformatOnSubmit&&this._setElementValue(this.rawValue)}},{key:`_onKeydownGlobal`,value:function(t){d.character(t)===i.keyName.Alt&&(t=d.getHoveredElement(),!e.isManagedByAutoNumeric(t)||!(t=e.getAutoNumericElement(t)).formulaMode&&t.settings.unformatOnHover&&this.constructor._unformatAltHovered(t))}},{key:`_onKeyupGlobal`,value:function(t){d.character(t)===i.keyName.Alt&&(t=d.getHoveredElement(),!e.isManagedByAutoNumeric(t)||!(t=e.getAutoNumericElement(t)).formulaMode&&t.settings.unformatOnHover&&this.constructor._reformatAltHovered(t))}},{key:`_isElementTagSupported`,value:function(){return d.isElement(this.domElement)||d.throwError(`The DOM element is not valid, ${this.domElement} given.`),d.isInArray(this.domElement.tagName.toLowerCase(),this.allowedTagList)}},{key:`_isInputElement`,value:function(){return this.domElement.tagName.toLowerCase()===`input`}},{key:`_isInputTypeSupported`,value:function(){return this.domElement.type===`text`||this.domElement.type===`hidden`||this.domElement.type===`tel`||d.isUndefinedOrNullOrEmpty(this.domElement.type)}},{key:`_checkElement`,value:function(){var e=this.domElement.tagName.toLowerCase();this._isElementTagSupported()||d.throwError(`The <${e}> tag is not supported by autoNumeric`),this._isInputElement()?(this._isInputTypeSupported()||d.throwError(`The input type "${this.domElement.type}" is not supported by autoNumeric`),this.isInputElement=!0):(this.isInputElement=!1,this.isContentEditable=this.domElement.hasAttribute(`contenteditable`)&&this.domElement.getAttribute(`contenteditable`)===`true`)}},{key:`_formatDefaultValueOnPageLoad`,value:function(){var t,n=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,r=!0;if(d.isNull(n)?(t=d.getElementValue(this.domElement).trim(),this.domElement.setAttribute(`value`,t)):t=n,this.isInputElement||this.isContentEditable){var i=this.constructor._toNumericValue(t,this.settings);if(this.domElement.hasAttribute(`value`)&&this.domElement.getAttribute(`value`)!==``?(this.settings.defaultValueOverride!==null&&this.settings.defaultValueOverride.toString()!==t||this.settings.defaultValueOverride===null&&t!==``&&t!==this.domElement.getAttribute(`value`)||t!==``&&this.domElement.getAttribute(`type`)===`hidden`&&!d.isNumber(i))&&(this.settings.saveValueToSessionStorage&&(this.settings.decimalPlacesShownOnFocus!==null||this.settings.divisorWhenUnfocused)&&this._setRawValue(this._getValueFromPersistentStorage()),this.settings.saveValueToSessionStorage||(n=this.constructor._removeBrackets(t,this.settings),(this.settings.negativePositiveSignPlacement===e.options.negativePositiveSignPlacement.suffix||this.settings.negativePositiveSignPlacement!==e.options.negativePositiveSignPlacement.prefix&&this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.suffix)&&this.settings.negativeSignCharacter!==``&&d.isNegative(t,this.settings.negativeSignCharacter)?this._setRawValue(`-${this.constructor._stripAllNonNumberCharacters(n,this.settings,!0,this.isFocused)}`):this._setRawValue(this.constructor._stripAllNonNumberCharacters(n,this.settings,!0,this.isFocused))),r=!1):isNaN(Number(i))||i===1/0?d.throwError(`The value [${t}] used in the input is not a valid value autoNumeric can work with.`):(this.set(i),r=!1),t===``)switch(this.settings.emptyInputBehavior){case e.options.emptyInputBehavior.focus:case e.options.emptyInputBehavior.null:case e.options.emptyInputBehavior.press:break;case e.options.emptyInputBehavior.always:this._setElementValue(this.settings.currencySymbol);break;case e.options.emptyInputBehavior.min:this.set(this.settings.minimumValue);break;case e.options.emptyInputBehavior.max:this.set(this.settings.maximumValue);break;case e.options.emptyInputBehavior.zero:this.set(`0`);break;default:this.set(this.settings.emptyInputBehavior)}else r&&t===this.domElement.getAttribute(`value`)&&this.set(t)}else this.settings.defaultValueOverride!==null&&this.settings.defaultValueOverride!==t||this.set(t)}},{key:`_calculateVMinAndVMaxIntegerSizes`,value:function(){var e=v(this.settings.maximumValue.toString().split(`.`),1)[0],t=v(this.settings.minimumValue||this.settings.minimumValue===0?this.settings.minimumValue.toString().split(`.`):[],1)[0],e=e.replace(this.settings.negativeSignCharacter,``),t=t.replace(this.settings.negativeSignCharacter,``);this.settings.mIntPos=Math.max(e.length,1),this.settings.mIntNeg=Math.max(t.length,1)}},{key:`_calculateValuesToStringsKeys`,value:function(){this.settings.valuesToStrings?this.valuesToStringsKeys=Object.keys(this.settings.valuesToStrings):this.valuesToStringsKeys=[]}},{key:`_transformOptionsValuesToDefaultTypes`,value:function(){for(var e in this.settings){var t;Object.prototype.hasOwnProperty.call(this.settings,e)&&((t=this.settings[e])!==`true`&&t!==`false`||(this.settings[e]=t===`true`),typeof t==`number`&&(this.settings[e]=t.toString()))}}},{key:`_setSettings`,value:function(e){var t=1<arguments.length&&arguments[1]!==void 0&&arguments[1];!t&&d.isNull(e)||this.constructor._convertOldOptionsToNewOnes(e),t?(`decimalPlacesRawValue`in e&&(this.settings.originalDecimalPlacesRawValue=e.decimalPlacesRawValue),`decimalPlaces`in e&&(this.settings.originalDecimalPlaces=e.decimalPlaces),this.constructor._calculateDecimalPlacesOnUpdate(e,this.settings),this._mergeSettings(e)):(this.settings={},this._mergeSettings(this.constructor.getDefaultConfig(),this.domElement.dataset,e,{rawValue:this.defaultRawValue}),this.caretFix=!1,this.throwInput=!0,this.allowedTagList=i.allowedTagList,this.runOnce=!1,this.hoveredWithAlt=!1),this._transformOptionsValuesToDefaultTypes(),this._runCallbacksFoundInTheSettingsObject(),this.constructor._correctNegativePositiveSignPlacementOption(this.settings),this.constructor._correctCaretPositionOnFocusAndSelectOnFocusOptions(this.settings),this.constructor._setNegativePositiveSignPermissions(this.settings),t||(d.isNull(e)||!e.decimalPlaces?this.settings.originalDecimalPlaces=null:this.settings.originalDecimalPlaces=e.decimalPlaces,this.settings.originalDecimalPlacesRawValue=this.settings.decimalPlacesRawValue,this.constructor._calculateDecimalPlacesOnInit(this.settings)),this._calculateVMinAndVMaxIntegerSizes(),this._setTrailingNegativeSignInfo(),this.regex={},this.constructor._cachesUsualRegularExpressions(this.settings,this.regex),this.constructor._setBrackets(this.settings),this._calculateValuesToStringsKeys(),d.isEmptyObj(this.settings)&&d.throwError(`Unable to set the settings, those are invalid ; an empty object was given.`),this.constructor.validate(this.settings,!1,e),this._keepAnOriginalSettingsCopy()}},{key:`_preparePastedText`,value:function(e){return this.constructor._stripAllNonNumberCharacters(e,this.settings,!0,this.isFocused)}},{key:`_updateInternalProperties`,value:function(){this.selection=d.getElementSelection(this.domElement),this.processed=!1}},{key:`_updateEventKeyInfo`,value:function(e){this.eventKey=d.character(e)}},{key:`_saveCancellableValue`,value:function(){this.savedCancellableValue=this.rawValue}},{key:`_setSelection`,value:function(e,t){e=Math.max(e,0),t=Math.min(t,d.getElementValue(this.domElement).length),this.selection={start:e,end:t,length:t-e},d.setElementSelection(this.domElement,e,t)}},{key:`_setCaretPosition`,value:function(e){this._setSelection(e,e)}},{key:`_getLeftAndRightPartAroundTheSelection`,value:function(){var e=d.getElementValue(this.domElement);return[e.substring(0,this.selection.start),e.substring(this.selection.end,e.length)]}},{key:`_getUnformattedLeftAndRightPartAroundTheSelection`,value:function(){var t=v(this._getLeftAndRightPartAroundTheSelection(),2),n=t[0],r=t[1];return n===``&&r===``?[``,``]:(t=!0,this.eventKey!==i.keyName.Hyphen&&this.eventKey!==i.keyName.Minus||Number(n)!==0||(t=!1),this.isTrailingNegative&&(d.isNegative(r,this.settings.negativeSignCharacter)&&!d.isNegative(n,this.settings.negativeSignCharacter)||r===``&&d.isNegative(n,this.settings.negativeSignCharacter,!0))&&(n=n.replace(this.settings.negativeSignCharacter,``),r=r.replace(this.settings.negativeSignCharacter,``),n=n.replace(`-`,``),r=r.replace(`-`,``),n=`-${n}`),[n=e._stripAllNonNumberCharactersExceptCustomDecimalChar(n,this.settings,t,this.isFocused),r=e._stripAllNonNumberCharactersExceptCustomDecimalChar(r,this.settings,!1,this.isFocused)])}},{key:`_normalizeParts`,value:function(t,n){var r=!0;this.eventKey!==i.keyName.Hyphen&&this.eventKey!==i.keyName.Minus||Number(t)!==0||(r=!1),this.isTrailingNegative&&d.isNegative(n,this.settings.negativeSignCharacter)&&!d.isNegative(t,this.settings.negativeSignCharacter)&&(t=`-${t}`,n=n.replace(this.settings.negativeSignCharacter,``)),t=e._stripAllNonNumberCharactersExceptCustomDecimalChar(t,this.settings,r,this.isFocused),n=e._stripAllNonNumberCharactersExceptCustomDecimalChar(n,this.settings,!1,this.isFocused);var a=(t=this.settings.leadingZero!==e.options.leadingZero.deny||this.eventKey!==i.keyName.num0&&this.eventKey!==i.keyName.numpad0||Number(t)!==0||d.contains(t,this.settings.decimalCharacter)||n===``?t:t.substring(0,t.length-1))+n;return!this.settings.decimalCharacter||(r=a.match(RegExp(`^${this.regex.aNegRegAutoStrip}\\${this.settings.decimalCharacter}`)))&&(a=(t=t.replace(r[1],r[1]+`0`))+n),[t,n,a]}},{key:`_setValueParts`,value:function(t,n){var r=2<arguments.length&&arguments[2]!==void 0&&arguments[2],i=(s=v(this._normalizeParts(t,n),3))[0],a=s[1],o=s[2],t=v(e._checkIfInRangeWithOverrideOption(o,this.settings),2),n=t[0],s=t[1];if(n&&s){var c,t=e._truncateDecimalPlaces(o,this.settings,r,this.settings.decimalPlacesRawValue).replace(this.settings.decimalCharacter,`.`);if(t===``||t===this.settings.negativeSignCharacter){switch(this.settings.emptyInputBehavior){case e.options.emptyInputBehavior.focus:case e.options.emptyInputBehavior.press:case e.options.emptyInputBehavior.always:c=``;break;case e.options.emptyInputBehavior.min:c=this.settings.minimumValue;break;case e.options.emptyInputBehavior.max:c=this.settings.maximumValue;break;case e.options.emptyInputBehavior.zero:c=`0`;break;case e.options.emptyInputBehavior.null:c=null;break;default:c=this.settings.emptyInputBehavior}this._setRawValue(c)}else this._setRawValue(this._trimLeadingAndTrailingZeros(t));return o=e._truncateDecimalPlaces(o,this.settings,r,this.settings.decimalPlacesShownOnFocus),(r=(r=i.length)>o.length?o.length:r)===1&&i===`0`&&this.settings.leadingZero===e.options.leadingZero.deny&&(r=a===``||i===`0`&&a!==``?1:0),this._setElementValue(o,!1),this._setCaretPosition(r),!0}return this._triggerRangeEvents(n,s),!1}},{key:`_getSignPosition`,value:function(){var t,n;return this.settings.currencySymbol?(t=this.settings.currencySymbol.length,n=d.getElementValue(this.domElement),this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.prefix?this.settings.negativeSignCharacter&&n&&n.charAt(0)===this.settings.negativeSignCharacter?[1,t+1]:[0,t]:[(n=n.length)-t,n]):[1e3,-1]}},{key:`_expandSelectionOnSign`,value:function(){var e=v(this._getSignPosition(),2),t=e[0],n=e[1];(e=this.selection).start<n&&e.end>t&&((e.start<t||e.end>n)&&d.getElementValue(this.domElement).substring(Math.max(e.start,t),Math.min(e.end,n)).match(/^\s*$/)?e.start<t?this._setSelection(e.start,t):this._setSelection(n,e.end):this._setSelection(Math.min(e.start,t),Math.max(e.end,n)))}},{key:`_checkPaste`,value:function(){var t,n,r;this.formatted||d.isUndefined(this.valuePartsBeforePaste)||(t=this.valuePartsBeforePaste,r=(n=v(this._getLeftAndRightPartAroundTheSelection(),2))[0],n=n[1],delete this.valuePartsBeforePaste,r=r.substr(0,t[0].length)+e._stripAllNonNumberCharactersExceptCustomDecimalChar(r.substr(t[0].length),this.settings,!0,this.isFocused),this._setValueParts(r,n,!0)||(this._setElementValue(t.join(``),!1),this._setCaretPosition(t[0].length)))}},{key:`_processNonPrintableKeysAndShortcuts`,value:function(e){return(e.ctrlKey||e.metaKey)&&e.type===`keyup`&&!d.isUndefined(this.valuePartsBeforePaste)||e.shiftKey&&this.eventKey===i.keyName.Insert?(this._checkPaste(),!1):!!this.constructor._shouldSkipEventKey(this.eventKey)||((e.ctrlKey||e.metaKey)&&this.eventKey===i.keyName.a?(this.settings.selectNumberOnly&&(e.preventDefault(),this.selectNumber()),!0):!e.ctrlKey&&!e.metaKey||this.eventKey!==i.keyName.c&&this.eventKey!==i.keyName.v&&this.eventKey!==i.keyName.x?e.ctrlKey||e.metaKey?!(this.eventKey===i.keyName.Z||this.eventKey===i.keyName.z):this.eventKey!==i.keyName.LeftArrow&&this.eventKey!==i.keyName.RightArrow?d.isInArray(this.eventKey,i.keyName._directionKeys):(e.type!==`keydown`||e.shiftKey||(t=d.getElementValue(this.domElement),this.eventKey!==i.keyName.LeftArrow||t.charAt(this.selection.start-2)!==this.settings.digitGroupSeparator&&t.charAt(this.selection.start-2)!==this.settings.decimalCharacter?this.eventKey!==i.keyName.RightArrow||t.charAt(this.selection.start+1)!==this.settings.digitGroupSeparator&&t.charAt(this.selection.start+1)!==this.settings.decimalCharacter||this._setCaretPosition(this.selection.start+1):this._setCaretPosition(this.selection.start-1)),!0):(e.type===`keydown`&&this._expandSelectionOnSign(),this.eventKey!==i.keyName.v&&this.eventKey!==i.keyName.Insert||(e.type===`keydown`||e.type===`keypress`?d.isUndefined(this.valuePartsBeforePaste)&&(this.valuePartsBeforePaste=this._getLeftAndRightPartAroundTheSelection()):this._checkPaste()),e.type===`keydown`||e.type===`keypress`||this.eventKey===i.keyName.c));var t}},{key:`_processCharacterDeletionIfTrailingNegativeSign`,value:function(t){var n=(t=v(t,2))[0],r=t[1],a=d.getElementValue(this.domElement),o=d.isNegative(a,this.settings.negativeSignCharacter);if(this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===e.options.negativePositiveSignPlacement.suffix&&(this.eventKey===i.keyName.Backspace?(this.caretFix=this.selection.start>=a.indexOf(this.settings.suffixText)&&this.settings.suffixText!==``,a.charAt(this.selection.start-1)===`-`?n=n.substring(1):this.selection.start<=a.length-this.settings.suffixText.length&&(n=n.substring(0,n.length-1))):(this.caretFix=this.selection.start>=a.indexOf(this.settings.suffixText)&&this.settings.suffixText!==``,this.selection.start>=a.indexOf(this.settings.currencySymbol)+this.settings.currencySymbol.length&&(r=r.substring(1,r.length)),d.isNegative(n,this.settings.negativeSignCharacter)&&a.charAt(this.selection.start)===`-`&&(n=n.substring(1)))),this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.suffix)switch(this.settings.negativePositiveSignPlacement){case e.options.negativePositiveSignPlacement.left:this.caretFix=this.selection.start>=a.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length,this.eventKey===i.keyName.Backspace?this.selection.start===a.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length&&o?n=n.substring(1):n!==`-`&&(this.selection.start<=a.indexOf(this.settings.negativeSignCharacter)||!o)&&(n=n.substring(0,n.length-1)):(n[0]===`-`&&(r=r.substring(1)),this.selection.start===a.indexOf(this.settings.negativeSignCharacter)&&o&&(n=n.substring(1)));break;case e.options.negativePositiveSignPlacement.right:this.caretFix=this.selection.start>=a.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length,this.eventKey===i.keyName.Backspace?this.selection.start===a.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length?n=n.substring(1):(n!==`-`&&this.selection.start<=a.indexOf(this.settings.negativeSignCharacter)-this.settings.currencySymbol.length||n!==``&&!o)&&(n=n.substring(0,n.length-1)):(this.caretFix=this.selection.start>=a.indexOf(this.settings.currencySymbol)&&this.settings.currencySymbol!==``,this.selection.start===a.indexOf(this.settings.negativeSignCharacter)&&(n=n.substring(1)),r=r.substring(1))}return[n,r]}},{key:`_processCharacterDeletion`,value:function(){var e,t,n;return this.selection.length?(this._expandSelectionOnSign(),t=(e=v(this._getUnformattedLeftAndRightPartAroundTheSelection(),2))[0],n=e[1]):(t=(e=v(this._getUnformattedLeftAndRightPartAroundTheSelection(),2))[0],n=e[1],t===``&&n===``&&(this.throwInput=!1),this.isTrailingNegative&&d.isNegative(d.getElementValue(this.domElement),this.settings.negativeSignCharacter)?(t=(e=v(this._processCharacterDeletionIfTrailingNegativeSign([t,n]),2))[0],n=e[1]):this.eventKey===i.keyName.Backspace?t=t.substring(0,t.length-1):n=n.substring(1,n.length)),!!this.constructor._isWithinRangeWithOverrideOption(`${t}${n}`,this.settings)&&(this._setValueParts(t,n),!0)}},{key:`_isDecimalCharacterInsertionAllowed`,value:function(){return String(this.settings.decimalPlacesShownOnFocus)!==String(e.options.decimalPlacesShownOnFocus.none)&&String(this.settings.decimalPlaces)!==String(e.options.decimalPlaces.none)}},{key:`_processCharacterInsertion`,value:function(){var e=v(this._getUnformattedLeftAndRightPartAroundTheSelection(),2),t=e[0],n=e[1];if(this.eventKey!==i.keyName.AndroidDefault&&(this.throwInput=!0),this.eventKey===this.settings.decimalCharacter||this.settings.decimalCharacterAlternative&&this.eventKey===this.settings.decimalCharacterAlternative){if(!this._isDecimalCharacterInsertionAllowed()||!this.settings.decimalCharacter)return!1;if(this.settings.alwaysAllowDecimalCharacter)t=t.replace(this.settings.decimalCharacter,``),n=n.replace(this.settings.decimalCharacter,``);else{if(d.contains(t,this.settings.decimalCharacter)||0<n.indexOf(this.settings.decimalCharacter))return!0;n.indexOf(this.settings.decimalCharacter)===0&&(n=n.substr(1))}return this.settings.negativeSignCharacter&&d.contains(n,this.settings.negativeSignCharacter)&&(t=`${this.settings.negativeSignCharacter}${t}`,n=n.replace(this.settings.negativeSignCharacter,``)),this._setValueParts(t+this.settings.decimalCharacter,n),!0}return this.eventKey!==`-`&&this.eventKey!==`+`||!this.settings.isNegativeSignAllowed?0<=(e=Number(this.eventKey))&&e<=9?(this.settings.isNegativeSignAllowed&&t===``&&d.contains(n,`-`)&&(t=`-`,n=n.substring(1,n.length)),this.settings.maximumValue<=0&&this.settings.minimumValue<this.settings.maximumValue&&!d.contains(d.getElementValue(this.domElement),this.settings.negativeSignCharacter)&&this.eventKey!==`0`&&(t=`-${t}`),this._setValueParts(`${t}${this.eventKey}`,n),!0):this.throwInput=!1:(t===``&&d.contains(n,`-`)?n=n.replace(`-`,``):t=d.isNegativeStrict(t,`-`)?t.replace(`-`,``):`${this.settings.negativeSignCharacter}${t}`,this._setValueParts(t,n),!0)}},{key:`_formatValue`,value:function(t){var n=d.getElementValue(this.domElement),r=v(this._getUnformattedLeftAndRightPartAroundTheSelection(),1)[0];this.settings.digitGroupSeparator!==``&&(this.settings.digitGroupSeparator===``||d.contains(n,this.settings.digitGroupSeparator))||this.settings.currencySymbol!==``&&(this.settings.currencySymbol===``||d.contains(n,this.settings.currencySymbol))||(a=v(n.split(this.settings.decimalCharacter),1)[0],o=``,d.isNegative(a,this.settings.negativeSignCharacter)&&(o=this.settings.negativeSignCharacter,a=a.replace(this.settings.negativeSignCharacter,``),r=r.replace(`-`,``)),o===``&&a.length>this.settings.mIntPos&&r.charAt(0)===`0`&&(r=r.slice(1)),o===this.settings.negativeSignCharacter&&a.length>this.settings.mIntNeg&&r.charAt(0)===`0`&&(r=r.slice(1)),this.isTrailingNegative||(r=`${o}${r}`));var a=this.constructor._addGroupSeparators(n,this.settings,this.isFocused,this.rawValue),o=a.length;if(a){var s,c,l,u=r.split(``);this.settings.negativePositiveSignPlacement!==e.options.negativePositiveSignPlacement.suffix&&(this.settings.negativePositiveSignPlacement===e.options.negativePositiveSignPlacement.prefix||this.settings.currencySymbolPlacement!==e.options.currencySymbolPlacement.suffix)||u[0]!==this.settings.negativeSignCharacter||this.settings.isNegativeSignAllowed||(u.shift(),this.eventKey!==i.keyName.Backspace&&this.eventKey!==i.keyName.Delete||!this.caretFix||((this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.suffix&&this.settings.negativePositiveSignPlacement===e.options.negativePositiveSignPlacement.left||this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===e.options.negativePositiveSignPlacement.suffix)&&(u.push(this.settings.negativeSignCharacter),this.caretFix=t.type===`keydown`),this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.suffix&&this.settings.negativePositiveSignPlacement===e.options.negativePositiveSignPlacement.right&&(s=this.settings.currencySymbol.split(``),c=[`\\`,`^`,`$`,`.`,`|`,`?`,`*`,`+`,`(`,`)`,`[`],l=[],s.forEach(function(e,t){t=s[e],d.isInArray(t,c)?l.push(`\\`+t):l.push(t)}),this.eventKey===i.keyName.Backspace&&this.settings.negativeSignCharacter===`-`&&l.push(`-`),u.push(l.join(``)),this.caretFix=t.type===`keydown`)));for(var f=0;f<u.length;f++)u[f].match(`\\d`)||(u[f]=`\\`+u[f]);t=this.settings.currencySymbol&&`\\${this.settings.currencySymbol.split(``).join(`\\`)}`,t=this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.suffix?RegExp(`^.*?${u.join(`.*?`)}`):RegExp(`^.*?${t}${u.join(`.*?`)}`),(t=a.match(t))?(o=t[0].length,((o=this.settings.showPositiveSign&&(o=o===0&&t.input.charAt(0)===this.settings.positiveSignCharacter?t.input.indexOf(this.settings.currencySymbol)===1?this.settings.currencySymbol.length+1:1:o)===0&&t.input.charAt(this.settings.currencySymbol.length)===this.settings.positiveSignCharacter?this.settings.currencySymbol.length+1:o)===0&&a.charAt(0)!==this.settings.negativeSignCharacter||o===1&&a.charAt(0)===this.settings.negativeSignCharacter)&&this.settings.currencySymbol&&this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.prefix&&(o=this.settings.currencySymbol.length+(d.isNegativeStrict(a,this.settings.negativeSignCharacter)?1:0))):(this.settings.currencySymbol&&this.settings.currencySymbolPlacement===e.options.currencySymbolPlacement.suffix&&(o-=this.settings.currencySymbol.length),this.settings.suffixText&&(o-=this.settings.suffixText.length))}a!==n&&(this._setElementValue(a,!1),this._setCaretPosition(o)),this.formatted=!0}}]),C(t,[{key:`version`,value:function(){return`4.6.0`}},{key:`_setArgumentsValues`,value:function(e,t,n){d.isNull(e)&&d.throwError(`At least one valid parameter is needed in order to initialize an AutoNumeric object`);var r,i,a,o=d.isElement(e),s=d.isString(e),c=d.isObject(t),l=Array.isArray(t)&&0<t.length,u=d.isNumberOrArabic(t)||t===``,f=this._isPreDefinedOptionValid(t),p=d.isNull(t),m=d.isEmptyString(t),h=d.isObject(n),g=Array.isArray(n)&&0<n.length,_=d.isNull(n),v=this._isPreDefinedOptionValid(n);return o&&p&&_?(r=e,i=a=null):o&&u&&_?(r=e,a=t,i=null):o&&c&&_?(r=e,a=null,i=t):o&&f&&_?(r=e,a=null,i=this._getOptionObject(t)):o&&l&&_?(r=e,a=null,i=this.mergeOptions(t)):o&&(p||m)&&h?(r=e,a=null,i=n):o&&(p||m)&&g?(r=e,a=null,i=this.mergeOptions(n)):s&&p&&_?(r=document.querySelector(e),i=a=null):s&&c&&_?(r=document.querySelector(e),a=null,i=t):s&&f&&_?(r=document.querySelector(e),a=null,i=this._getOptionObject(t)):s&&l&&_?(r=document.querySelector(e),a=null,i=this.mergeOptions(t)):s&&(p||m)&&h?(r=document.querySelector(e),a=null,i=n):s&&(p||m)&&g?(r=document.querySelector(e),a=null,i=this.mergeOptions(n)):s&&u&&_?(r=document.querySelector(e),a=t,i=null):s&&u&&h?(r=document.querySelector(e),a=t,i=n):s&&u&&v?(r=document.querySelector(e),a=t,i=this._getOptionObject(n)):s&&u&&g?(r=document.querySelector(e),a=t,i=this.mergeOptions(n)):o&&u&&h?(r=e,a=t,i=n):o&&u&&v?(r=e,a=t,i=this._getOptionObject(n)):o&&u&&g?(r=e,a=t,i=this.mergeOptions(n)):d.throwError(`The parameters given to the AutoNumeric object are not valid, '${e}', '${t}' and '${n}' given.`),d.isNull(r)&&d.throwError(`The selector '${e}' did not select any valid DOM element. Please check on which element you called AutoNumeric.`),{domElement:r,initialValue:a,userOptions:i}}},{key:`mergeOptions`,value:function(e){var t=this,n={};return e.forEach(function(e){x(n,t._getOptionObject(e))}),n}},{key:`_isPreDefinedOptionValid`,value:function(t){return Object.prototype.hasOwnProperty.call(e.predefinedOptions,t)}},{key:`_getOptionObject`,value:function(t){var n;return d.isString(t)?(n=e.getPredefinedOptions()[t])??d.warning(`The given pre-defined option [${t}] is not recognized by autoNumeric. Please check that pre-defined option name.`,!0):n=t,n}},{key:`_doesFormHandlerListExists`,value:function(){var e=S(window.aNFormHandlerMap);return e!==`undefined`&&e===`object`}},{key:`_createFormHandlerList`,value:function(){window.aNFormHandlerMap=new Map}},{key:`_checkValuesToStringsArray`,value:function(e,t){return d.isInArray(String(e),t)}},{key:`_checkValuesToStringsSettings`,value:function(e,t){return this._checkValuesToStringsArray(e,Object.keys(t.valuesToStrings))}},{key:`_checkStringsToValuesSettings`,value:function(e,t){return this._checkValuesToStringsArray(e,Object.values(t.valuesToStrings))}},{key:`_unformatAltHovered`,value:function(e){e.hoveredWithAlt=!0,e.unformat()}},{key:`_reformatAltHovered`,value:function(e){e.hoveredWithAlt=!1,e.reformat()}},{key:`_getChildANInputElement`,value:function(e){var t=this,e=e.getElementsByTagName(`input`),n=[];return Array.prototype.slice.call(e,0).forEach(function(e){t.test(e)&&n.push(e)}),n}},{key:`test`,value:function(e){return this._isInGlobalList(d.domElement(e))}},{key:`_createWeakMap`,value:function(e){window[e]=new WeakMap}},{key:`_createGlobalList`,value:function(){this.autoNumericGlobalListName=`autoNumericGlobalList`,this._createWeakMap(this.autoNumericGlobalListName)}},{key:`_doesGlobalListExists`,value:function(){var e=S(window[this.autoNumericGlobalListName]);return e!==`undefined`&&e===`object`}},{key:`_addToGlobalList`,value:function(e){this._doesGlobalListExists()||this._createGlobalList();var t=e.node();if(this._isInGlobalList(t)){if(this._getFromGlobalList(t)===this)return;d.warning(`A reference to the DOM element you just initialized already exists in the global AutoNumeric element list. Please make sure to not initialize the same DOM element multiple times.`,e.getSettings().showWarnings)}window[this.autoNumericGlobalListName].set(t,e)}},{key:`_removeFromGlobalList`,value:function(e){this._doesGlobalListExists()&&window[this.autoNumericGlobalListName].delete(e.node())}},{key:`_getFromGlobalList`,value:function(e){return this._doesGlobalListExists()?window[this.autoNumericGlobalListName].get(e):null}},{key:`_isInGlobalList`,value:function(e){return!!this._doesGlobalListExists()&&window[this.autoNumericGlobalListName].has(e)}},{key:`validate`,value:function(t){var n=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1],r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;!d.isUndefinedOrNullOrEmpty(t)&&d.isObject(t)||d.throwError(`The userOptions are invalid ; it should be a valid object, [${t}] given.`);var i,a=d.isObject(r);a||d.isNull(r)||d.throwError(`The 'originalOptions' parameter is invalid ; it should either be a valid option object or \`null\`, [${t}] given.`),d.isNull(t)||this._convertOldOptionsToNewOnes(t),i=n?x({},this.getDefaultConfig(),t):t,d.isTrueOrFalseString(i.showWarnings)||d.isBoolean(i.showWarnings)||d.throwError(`The debug option 'showWarnings' is invalid ; it should be either 'true' or 'false', [${i.showWarnings}] given.`);var o=/^[0-9]+$/,s=/[0-9]+/,c=/^-?[0-9]+(\.?[0-9]+)?$/,n=/^[0-9]+(\.?[0-9]+)?$/;d.isTrueOrFalseString(i.allowDecimalPadding)||d.isBoolean(i.allowDecimalPadding)||i.allowDecimalPadding===e.options.allowDecimalPadding.floats||d.throwError(`The decimal padding option 'allowDecimalPadding' is invalid ; it should either be \`false\`, \`true\` or \`'floats'\`, [${i.allowDecimalPadding}] given.`),i.allowDecimalPadding!==e.options.allowDecimalPadding.never&&i.allowDecimalPadding!==`false`||i.decimalPlaces===e.options.decimalPlaces.none&&i.decimalPlacesShownOnBlur===e.options.decimalPlacesShownOnBlur.none&&i.decimalPlacesShownOnFocus===e.options.decimalPlacesShownOnFocus.none||d.warning(`Setting 'allowDecimalPadding' to [${i.allowDecimalPadding}] will override the current 'decimalPlaces*' settings [${i.decimalPlaces}, ${i.decimalPlacesShownOnBlur} and ${i.decimalPlacesShownOnFocus}].`,i.showWarnings),d.isTrueOrFalseString(i.alwaysAllowDecimalCharacter)||d.isBoolean(i.alwaysAllowDecimalCharacter)||d.throwError(`The option 'alwaysAllowDecimalCharacter' is invalid ; it should either be \`true\` or \`false\`, [${i.alwaysAllowDecimalCharacter}] given.`),d.isNull(i.caretPositionOnFocus)||d.isInArray(i.caretPositionOnFocus,[e.options.caretPositionOnFocus.start,e.options.caretPositionOnFocus.end,e.options.caretPositionOnFocus.decimalLeft,e.options.caretPositionOnFocus.decimalRight])||d.throwError(`The display on empty string option 'caretPositionOnFocus' is invalid ; it should either be \`null\`, 'focus', 'press', 'always' or 'zero', [${i.caretPositionOnFocus}] given.`),t=a?r:this._correctCaretPositionOnFocusAndSelectOnFocusOptions(t),d.isNull(t)||t.caretPositionOnFocus===e.options.caretPositionOnFocus.doNoForceCaretPosition||t.selectOnFocus!==e.options.selectOnFocus.select||d.warning(`The 'selectOnFocus' option is set to 'select', which is in conflict with the 'caretPositionOnFocus' which is set to '${t.caretPositionOnFocus}'. As a result, if this has been called when instantiating an AutoNumeric object, the 'selectOnFocus' option is forced to 'doNotSelect'.`,i.showWarnings),d.isInArray(i.digitGroupSeparator,[e.options.digitGroupSeparator.comma,e.options.digitGroupSeparator.dot,e.options.digitGroupSeparator.normalSpace,e.options.digitGroupSeparator.thinSpace,e.options.digitGroupSeparator.narrowNoBreakSpace,e.options.digitGroupSeparator.noBreakSpace,e.options.digitGroupSeparator.noSeparator,e.options.digitGroupSeparator.apostrophe,e.options.digitGroupSeparator.arabicThousandsSeparator,e.options.digitGroupSeparator.dotAbove,e.options.digitGroupSeparator.privateUseTwo])||d.throwError(`The thousand separator character option 'digitGroupSeparator' is invalid ; it should be ',', '.', '٬', '˙', "'", '', ' ', ' ', ' ', ' ' or empty (''), [${i.digitGroupSeparator}] given.`),d.isTrueOrFalseString(i.showOnlyNumbersOnFocus)||d.isBoolean(i.showOnlyNumbersOnFocus)||d.throwError(`The 'showOnlyNumbersOnFocus' option is invalid ; it should be either 'true' or 'false', [${i.showOnlyNumbersOnFocus}] given.`),d.isInArray(i.digitalGroupSpacing,[e.options.digitalGroupSpacing.two,e.options.digitalGroupSpacing.twoScaled,e.options.digitalGroupSpacing.three,e.options.digitalGroupSpacing.four])||2<=i.digitalGroupSpacing&&i.digitalGroupSpacing<=4||d.throwError(`The grouping separator option for thousands 'digitalGroupSpacing' is invalid ; it should be '2', '2s', '3', or '4', [${i.digitalGroupSpacing}] given.`),d.isInArray(i.decimalCharacter,[e.options.decimalCharacter.comma,e.options.decimalCharacter.dot,e.options.decimalCharacter.middleDot,e.options.decimalCharacter.arabicDecimalSeparator,e.options.decimalCharacter.decimalSeparatorKeySymbol])||d.throwError(`The decimal separator character option 'decimalCharacter' is invalid ; it should be '.', ',', '·', '⎖' or '٫', [${i.decimalCharacter}] given.`),i.decimalCharacter===i.digitGroupSeparator&&d.throwError(`autoNumeric will not function properly when the decimal character 'decimalCharacter' [${i.decimalCharacter}] and the thousand separator 'digitGroupSeparator' [${i.digitGroupSeparator}] are the same character.`),d.isNull(i.decimalCharacterAlternative)||d.isString(i.decimalCharacterAlternative)||d.throwError(`The alternate decimal separator character option 'decimalCharacterAlternative' is invalid ; it should be a string, [${i.decimalCharacterAlternative}] given.`),i.currencySymbol===``||d.isString(i.currencySymbol)||d.throwError(`The currency symbol option 'currencySymbol' is invalid ; it should be a string, [${i.currencySymbol}] given.`),d.isInArray(i.currencySymbolPlacement,[e.options.currencySymbolPlacement.prefix,e.options.currencySymbolPlacement.suffix])||d.throwError(`The placement of the currency sign option 'currencySymbolPlacement' is invalid ; it should either be 'p' (prefix) or 's' (suffix), [${i.currencySymbolPlacement}] given.`),d.isInArray(i.negativePositiveSignPlacement,[e.options.negativePositiveSignPlacement.prefix,e.options.negativePositiveSignPlacement.suffix,e.options.negativePositiveSignPlacement.left,e.options.negativePositiveSignPlacement.right,e.options.negativePositiveSignPlacement.none])||d.throwError(`The placement of the negative sign option 'negativePositiveSignPlacement' is invalid ; it should either be 'p' (prefix), 's' (suffix), 'l' (left), 'r' (right) or 'null', [${i.negativePositiveSignPlacement}] given.`),d.isTrueOrFalseString(i.showPositiveSign)||d.isBoolean(i.showPositiveSign)||d.throwError(`The show positive sign option 'showPositiveSign' is invalid ; it should be either 'true' or 'false', [${i.showPositiveSign}] given.`),d.isString(i.suffixText)&&(i.suffixText===``||!d.isNegative(i.suffixText,i.negativeSignCharacter)&&!s.test(i.suffixText))||d.throwError(`The additional suffix option 'suffixText' is invalid ; it should not contains the negative sign '${i.negativeSignCharacter}' nor any numerical characters, [${i.suffixText}] given.`),d.isString(i.negativeSignCharacter)&&i.negativeSignCharacter.length===1&&!d.isUndefinedOrNullOrEmpty(i.negativeSignCharacter)&&!s.test(i.negativeSignCharacter)||d.throwError(`The negative sign character option 'negativeSignCharacter' is invalid ; it should be a single character, and cannot be any numerical characters, [${i.negativeSignCharacter}] given.`),d.isString(i.positiveSignCharacter)&&i.positiveSignCharacter.length===1&&!d.isUndefinedOrNullOrEmpty(i.positiveSignCharacter)&&!s.test(i.positiveSignCharacter)||d.throwError(`The positive sign character option 'positiveSignCharacter' is invalid ; it should be a single character, and cannot be any numerical characters, [${i.positiveSignCharacter}] given.
|
|
6
|
+
If you want to hide the positive sign character, you need to set the \`showPositiveSign\` option to \`true\`.`),i.negativeSignCharacter===i.positiveSignCharacter&&d.throwError(`The positive 'positiveSignCharacter' and negative 'negativeSignCharacter' sign characters cannot be identical ; [${i.negativeSignCharacter}] given.`),s=(t=v(d.isNull(i.negativeBracketsTypeOnBlur)?[``,``]:i.negativeBracketsTypeOnBlur.split(`,`),2))[0],t=t[1],(d.contains(i.digitGroupSeparator,i.negativeSignCharacter)||d.contains(i.decimalCharacter,i.negativeSignCharacter)||d.contains(i.decimalCharacterAlternative,i.negativeSignCharacter)||d.contains(s,i.negativeSignCharacter)||d.contains(t,i.negativeSignCharacter)||d.contains(i.suffixText,i.negativeSignCharacter))&&d.throwError(`The negative sign character option 'negativeSignCharacter' is invalid ; it should not be equal or a part of the digit separator, the decimal character, the decimal character alternative, the negative brackets or the suffix text, [${i.negativeSignCharacter}] given.`),(d.contains(i.digitGroupSeparator,i.positiveSignCharacter)||d.contains(i.decimalCharacter,i.positiveSignCharacter)||d.contains(i.decimalCharacterAlternative,i.positiveSignCharacter)||d.contains(s,i.positiveSignCharacter)||d.contains(t,i.positiveSignCharacter)||d.contains(i.suffixText,i.positiveSignCharacter))&&d.throwError(`The positive sign character option 'positiveSignCharacter' is invalid ; it should not be equal or a part of the digit separator, the decimal character, the decimal character alternative, the negative brackets or the suffix text, [${i.positiveSignCharacter}] given.`),d.isNull(i.overrideMinMaxLimits)||d.isInArray(i.overrideMinMaxLimits,[e.options.overrideMinMaxLimits.ceiling,e.options.overrideMinMaxLimits.floor,e.options.overrideMinMaxLimits.ignore,e.options.overrideMinMaxLimits.invalid])||d.throwError(`The override min & max limits option 'overrideMinMaxLimits' is invalid ; it should either be 'ceiling', 'floor', 'ignore' or 'invalid', [${i.overrideMinMaxLimits}] given.`),i.overrideMinMaxLimits!==e.options.overrideMinMaxLimits.invalid&&i.overrideMinMaxLimits!==e.options.overrideMinMaxLimits.ignore&&(0<i.minimumValue||i.maximumValue<0)&&d.warning("You've set a `minimumValue` or a `maximumValue` excluding the value `0`. AutoNumeric will force the users to always have a valid value in the input, hence preventing them to clear the field. If you want to allow for temporary invalid values (ie. out-of-range), you should use the 'invalid' option for the 'overrideMinMaxLimits' setting."),d.isString(i.maximumValue)&&c.test(i.maximumValue)||d.throwError(`The maximum possible value option 'maximumValue' is invalid ; it should be a string that represents a positive or negative number, [${i.maximumValue}] given.`),d.isString(i.minimumValue)&&c.test(i.minimumValue)||d.throwError(`The minimum possible value option 'minimumValue' is invalid ; it should be a string that represents a positive or negative number, [${i.minimumValue}] given.`),parseFloat(i.minimumValue)>parseFloat(i.maximumValue)&&d.throwError(`The minimum possible value option is greater than the maximum possible value option ; 'minimumValue' [${i.minimumValue}] should be smaller than 'maximumValue' [${i.maximumValue}].`),d.isInt(i.decimalPlaces)&&0<=i.decimalPlaces||d.isString(i.decimalPlaces)&&o.test(i.decimalPlaces)||d.throwError(`The number of decimal places option 'decimalPlaces' is invalid ; it should be a positive integer, [${i.decimalPlaces}] given.`),d.isNull(i.decimalPlacesRawValue)||d.isInt(i.decimalPlacesRawValue)&&0<=i.decimalPlacesRawValue||d.isString(i.decimalPlacesRawValue)&&o.test(i.decimalPlacesRawValue)||d.throwError(`The number of decimal places for the raw value option 'decimalPlacesRawValue' is invalid ; it should be a positive integer or \`null\`, [${i.decimalPlacesRawValue}] given.`),this._validateDecimalPlacesRawValue(i),d.isNull(i.decimalPlacesShownOnFocus)||o.test(String(i.decimalPlacesShownOnFocus))||d.throwError(`The number of expanded decimal places option 'decimalPlacesShownOnFocus' is invalid ; it should be a positive integer or \`null\`, [${i.decimalPlacesShownOnFocus}] given.`),!d.isNull(i.decimalPlacesShownOnFocus)&&Number(i.decimalPlaces)>Number(i.decimalPlacesShownOnFocus)&&d.warning(`The extended decimal places 'decimalPlacesShownOnFocus' [${i.decimalPlacesShownOnFocus}] should be greater than the 'decimalPlaces' [${i.decimalPlaces}] value. Currently, this will limit the ability of your user to manually change some of the decimal places. Do you really want to do that?`,i.showWarnings),(d.isNull(i.divisorWhenUnfocused)||n.test(i.divisorWhenUnfocused))&&i.divisorWhenUnfocused!==0&&i.divisorWhenUnfocused!==`0`&&i.divisorWhenUnfocused!==1&&i.divisorWhenUnfocused!==`1`||d.throwError(`The divisor option 'divisorWhenUnfocused' is invalid ; it should be a positive number higher than one, preferably an integer, [${i.divisorWhenUnfocused}] given.`),d.isNull(i.decimalPlacesShownOnBlur)||o.test(i.decimalPlacesShownOnBlur)||d.throwError(`The number of decimals shown when unfocused option 'decimalPlacesShownOnBlur' is invalid ; it should be a positive integer or \`null\`, [${i.decimalPlacesShownOnBlur}] given.`),d.isNull(i.symbolWhenUnfocused)||d.isString(i.symbolWhenUnfocused)||d.throwError(`The symbol to show when unfocused option 'symbolWhenUnfocused' is invalid ; it should be a string, [${i.symbolWhenUnfocused}] given.`),d.isTrueOrFalseString(i.saveValueToSessionStorage)||d.isBoolean(i.saveValueToSessionStorage)||d.throwError(`The save to session storage option 'saveValueToSessionStorage' is invalid ; it should be either 'true' or 'false', [${i.saveValueToSessionStorage}] given.`),d.isInArray(i.onInvalidPaste,[e.options.onInvalidPaste.error,e.options.onInvalidPaste.ignore,e.options.onInvalidPaste.clamp,e.options.onInvalidPaste.truncate,e.options.onInvalidPaste.replace])||d.throwError(`The paste behavior option 'onInvalidPaste' is invalid ; it should either be 'error', 'ignore', 'clamp', 'truncate' or 'replace' (cf. documentation), [${i.onInvalidPaste}] given.`),d.isInArray(i.roundingMethod,[e.options.roundingMethod.halfUpSymmetric,e.options.roundingMethod.halfUpAsymmetric,e.options.roundingMethod.halfDownSymmetric,e.options.roundingMethod.halfDownAsymmetric,e.options.roundingMethod.halfEvenBankersRounding,e.options.roundingMethod.upRoundAwayFromZero,e.options.roundingMethod.downRoundTowardZero,e.options.roundingMethod.toCeilingTowardPositiveInfinity,e.options.roundingMethod.toFloorTowardNegativeInfinity,e.options.roundingMethod.toNearest05,e.options.roundingMethod.toNearest05Alt,e.options.roundingMethod.upToNext05,e.options.roundingMethod.downToNext05])||d.throwError(`The rounding method option 'roundingMethod' is invalid ; it should either be 'S', 'A', 's', 'a', 'B', 'U', 'D', 'C', 'F', 'N05', 'CHF', 'U05' or 'D05' (cf. documentation), [${i.roundingMethod}] given.`),d.isNull(i.negativeBracketsTypeOnBlur)||d.isInArray(i.negativeBracketsTypeOnBlur,[e.options.negativeBracketsTypeOnBlur.parentheses,e.options.negativeBracketsTypeOnBlur.brackets,e.options.negativeBracketsTypeOnBlur.chevrons,e.options.negativeBracketsTypeOnBlur.curlyBraces,e.options.negativeBracketsTypeOnBlur.angleBrackets,e.options.negativeBracketsTypeOnBlur.japaneseQuotationMarks,e.options.negativeBracketsTypeOnBlur.halfBrackets,e.options.negativeBracketsTypeOnBlur.whiteSquareBrackets,e.options.negativeBracketsTypeOnBlur.quotationMarks,e.options.negativeBracketsTypeOnBlur.guillemets])||d.throwError(`The brackets for negative values option 'negativeBracketsTypeOnBlur' is invalid ; it should either be '(,)', '[,]', '<,>', '{,}', '〈,〉', '「,」', '⸤,⸥', '⟦,⟧', '‹,›' or '«,»', [${i.negativeBracketsTypeOnBlur}] given.`),(d.isString(i.emptyInputBehavior)||d.isNumber(i.emptyInputBehavior))&&(d.isInArray(i.emptyInputBehavior,[e.options.emptyInputBehavior.focus,e.options.emptyInputBehavior.press,e.options.emptyInputBehavior.always,e.options.emptyInputBehavior.min,e.options.emptyInputBehavior.max,e.options.emptyInputBehavior.zero,e.options.emptyInputBehavior.null])||c.test(i.emptyInputBehavior))||d.throwError(`The display on empty string option 'emptyInputBehavior' is invalid ; it should either be 'focus', 'press', 'always', 'min', 'max', 'zero', 'null', a number, or a string that represents a number, [${i.emptyInputBehavior}] given.`),i.emptyInputBehavior===e.options.emptyInputBehavior.zero&&(0<i.minimumValue||i.maximumValue<0)&&d.throwError(`The 'emptyInputBehavior' option is set to 'zero', but this value is outside of the range defined by 'minimumValue' and 'maximumValue' [${i.minimumValue}, ${i.maximumValue}].`),c.test(String(i.emptyInputBehavior))&&(this._isWithinRangeWithOverrideOption(i.emptyInputBehavior,i)||d.throwError(`The 'emptyInputBehavior' option is set to a number or a string that represents a number, but its value [${i.emptyInputBehavior}] is outside of the range defined by the 'minimumValue' and 'maximumValue' options [${i.minimumValue}, ${i.maximumValue}].`)),d.isTrueOrFalseString(i.eventBubbles)||d.isBoolean(i.eventBubbles)||d.throwError(`The event bubbles option 'eventBubbles' is invalid ; it should be either 'true' or 'false', [${i.eventBubbles}] given.`),d.isTrueOrFalseString(i.eventIsCancelable)||d.isBoolean(i.eventIsCancelable)||d.throwError(`The event is cancelable option 'eventIsCancelable' is invalid ; it should be either 'true' or 'false', [${i.eventIsCancelable}] given.`),!d.isBoolean(i.invalidClass)&&/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/.test(i.invalidClass)||d.throwError(`The name of the 'invalidClass' option is not a valid CSS class name ; it should not be empty, and should follow the '^-?[_a-zA-Z]+[_a-zA-Z0-9-]*\$' regex, [${i.invalidClass}] given.`),d.isInArray(i.leadingZero,[e.options.leadingZero.allow,e.options.leadingZero.deny,e.options.leadingZero.keep])||d.throwError(`The leading zero behavior option 'leadingZero' is invalid ; it should either be 'allow', 'deny' or 'keep', [${i.leadingZero}] given.`),d.isTrueOrFalseString(i.formatOnPageLoad)||d.isBoolean(i.formatOnPageLoad)||d.throwError(`The format on initialization option 'formatOnPageLoad' is invalid ; it should be either 'true' or 'false', [${i.formatOnPageLoad}] given.`),d.isTrueOrFalseString(i.formulaMode)||d.isBoolean(i.formulaMode)||d.throwError(`The formula mode option 'formulaMode' is invalid ; it should be either 'true' or 'false', [${i.formulaMode}] given.`),o.test(i.historySize)&&i.historySize!==0||d.throwError(`The history size option 'historySize' is invalid ; it should be a positive integer, [${i.historySize}] given.`),d.isTrueOrFalseString(i.selectNumberOnly)||d.isBoolean(i.selectNumberOnly)||d.throwError(`The select number only option 'selectNumberOnly' is invalid ; it should be either 'true' or 'false', [${i.selectNumberOnly}] given.`),d.isTrueOrFalseString(i.selectOnFocus)||d.isBoolean(i.selectOnFocus)||d.throwError(`The select on focus option 'selectOnFocus' is invalid ; it should be either 'true' or 'false', [${i.selectOnFocus}] given.`),d.isNull(i.defaultValueOverride)||i.defaultValueOverride===``||c.test(i.defaultValueOverride)||d.throwError(`The unformatted default value option 'defaultValueOverride' is invalid ; it should be a string that represents a positive or negative number, [${i.defaultValueOverride}] given.`),d.isTrueOrFalseString(i.unformatOnSubmit)||d.isBoolean(i.unformatOnSubmit)||d.throwError(`The remove formatting on submit option 'unformatOnSubmit' is invalid ; it should be either 'true' or 'false', [${i.unformatOnSubmit}] given.`),d.isNull(i.valuesToStrings)||d.isObject(i.valuesToStrings)||d.throwError(`The option 'valuesToStrings' is invalid ; it should be an object, ideally with 'key -> value' entries, [${i.valuesToStrings}] given.`),d.isNull(i.outputFormat)||d.isInArray(i.outputFormat,[e.options.outputFormat.string,e.options.outputFormat.number,e.options.outputFormat.dot,e.options.outputFormat.negativeDot,e.options.outputFormat.comma,e.options.outputFormat.negativeComma,e.options.outputFormat.dotNegative,e.options.outputFormat.commaNegative])||d.throwError(`The custom locale format option 'outputFormat' is invalid ; it should either be null, 'string', 'number', '.', '-.', ',', '-,', '.-' or ',-', [${i.outputFormat}] given.`),d.isTrueOrFalseString(i.isCancellable)||d.isBoolean(i.isCancellable)||d.throwError(`The cancellable behavior option 'isCancellable' is invalid ; it should be either 'true' or 'false', [${i.isCancellable}] given.`),d.isTrueOrFalseString(i.modifyValueOnWheel)||d.isBoolean(i.modifyValueOnWheel)||d.throwError(`The increment/decrement on mouse wheel option 'modifyValueOnWheel' is invalid ; it should be either 'true' or 'false', [${i.modifyValueOnWheel}] given.`),d.isTrueOrFalseString(i.watchExternalChanges)||d.isBoolean(i.watchExternalChanges)||d.throwError(`The option 'watchExternalChanges' is invalid ; it should be either 'true' or 'false', [${i.watchExternalChanges}] given.`),d.isInArray(i.wheelOn,[e.options.wheelOn.focus,e.options.wheelOn.hover])||d.throwError(`The wheel behavior option 'wheelOn' is invalid ; it should either be 'focus' or 'hover', [${i.wheelOn}] given.`),(d.isString(i.wheelStep)||d.isNumber(i.wheelStep))&&(i.wheelStep===`progressive`||n.test(i.wheelStep))&&Number(i.wheelStep)!==0||d.throwError(`The wheel step value option 'wheelStep' is invalid ; it should either be the string 'progressive', or a number or a string that represents a positive number (excluding zero), [${i.wheelStep}] given.`),d.isInArray(i.serializeSpaces,[e.options.serializeSpaces.plus,e.options.serializeSpaces.percent])||d.throwError(`The space replacement character option 'serializeSpaces' is invalid ; it should either be '+' or '%20', [${i.serializeSpaces}] given.`),d.isTrueOrFalseString(i.noEventListeners)||d.isBoolean(i.noEventListeners)||d.throwError(`The option 'noEventListeners' that prevent the creation of event listeners is invalid ; it should be either 'true' or 'false', [${i.noEventListeners}] given.`),d.isNull(i.styleRules)||d.isObject(i.styleRules)&&(Object.prototype.hasOwnProperty.call(i.styleRules,`positive`)||Object.prototype.hasOwnProperty.call(i.styleRules,`negative`)||Object.prototype.hasOwnProperty.call(i.styleRules,`ranges`)||Object.prototype.hasOwnProperty.call(i.styleRules,`userDefined`))||d.throwError(`The option 'styleRules' is invalid ; it should be a correctly structured object, with one or more 'positive', 'negative', 'ranges' or 'userDefined' attributes, [${i.styleRules}] given.`),d.isNull(i.styleRules)||!Object.prototype.hasOwnProperty.call(i.styleRules,`userDefined`)||d.isNull(i.styleRules.userDefined)||i.styleRules.userDefined.forEach(function(e){Object.prototype.hasOwnProperty.call(e,`callback`)&&!d.isFunction(e.callback)&&d.throwError(`The callback defined in the \`userDefined\` attribute is not a function, ${S(e.callback)} given.`)}),(d.isNull(i.rawValueDivisor)||n.test(i.rawValueDivisor))&&i.rawValueDivisor!==0&&i.rawValueDivisor!==`0`&&i.rawValueDivisor!==1&&i.rawValueDivisor!==`1`||d.throwError(`The raw value divisor option 'rawValueDivisor' is invalid ; it should be a positive number higher than one, preferably an integer, [${i.rawValueDivisor}] given.`),d.isTrueOrFalseString(i.readOnly)||d.isBoolean(i.readOnly)||d.throwError(`The option 'readOnly' is invalid ; it should be either 'true' or 'false', [${i.readOnly}] given.`),d.isTrueOrFalseString(i.unformatOnHover)||d.isBoolean(i.unformatOnHover)||d.throwError(`The option 'unformatOnHover' is invalid ; it should be either 'true' or 'false', [${i.unformatOnHover}] given.`),d.isTrueOrFalseString(i.failOnUnknownOption)||d.isBoolean(i.failOnUnknownOption)||d.throwError(`The debug option 'failOnUnknownOption' is invalid ; it should be either 'true' or 'false', [${i.failOnUnknownOption}] given.`),d.isTrueOrFalseString(i.createLocalList)||d.isBoolean(i.createLocalList)||d.throwError(`The debug option 'createLocalList' is invalid ; it should be either 'true' or 'false', [${i.createLocalList}] given.`)}},{key:`_validateDecimalPlacesRawValue`,value:function(e){d.isNull(e.decimalPlacesRawValue)||(e.decimalPlacesRawValue<e.decimalPlaces&&d.warning(`The number of decimal places to store in the raw value [${e.decimalPlacesRawValue}] is lower than the ones to display [${e.decimalPlaces}]. This will likely confuse your users.
|
|
7
|
+
To solve that, you'd need to either set \`decimalPlacesRawValue\` to \`null\`, or set a number of decimal places for the raw value equal of bigger than \`decimalPlaces\`.`,e.showWarnings),e.decimalPlacesRawValue<e.decimalPlacesShownOnFocus&&d.warning(`The number of decimal places to store in the raw value [${e.decimalPlacesRawValue}] is lower than the ones shown on focus [${e.decimalPlacesShownOnFocus}]. This will likely confuse your users.
|
|
8
|
+
To solve that, you'd need to either set \`decimalPlacesRawValue\` to \`null\`, or set a number of decimal places for the raw value equal of bigger than \`decimalPlacesShownOnFocus\`.`,e.showWarnings),e.decimalPlacesRawValue<e.decimalPlacesShownOnBlur&&d.warning(`The number of decimal places to store in the raw value [${e.decimalPlacesRawValue}] is lower than the ones shown when unfocused [${e.decimalPlacesShownOnBlur}]. This will likely confuse your users.
|
|
9
|
+
To solve that, you'd need to either set \`decimalPlacesRawValue\` to \`null\`, or set a number of decimal places for the raw value equal of bigger than \`decimalPlacesShownOnBlur\`.`,e.showWarnings))}},{key:`areSettingsValid`,value:function(e){var t=!0;try{this.validate(e,!0)}catch{t=!1}return t}},{key:`getDefaultConfig`,value:function(){return e.defaultSettings}},{key:`getPredefinedOptions`,value:function(){return e.predefinedOptions}},{key:`_generateOptionsObjectFromOptionsArray`,value:function(e){var t,n=this;return d.isUndefinedOrNullOrEmpty(e)||e.length===0?t=null:(t={},e.length===1&&Array.isArray(e[0])?e[0].forEach(function(e){x(t,n._getOptionObject(e))}):1<=e.length&&e.forEach(function(e){x(t,n._getOptionObject(e))})),t}},{key:`format`,value:function(t){if(d.isUndefined(t)||t===null)return null;var n=d.isElement(t)?d.getElementValue(t):t;d.isString(n)||d.isNumber(n)||d.throwError(`The value "${n}" being "set" is not numeric and therefore cannot be used appropriately.`);for(var r=arguments.length,i=Array(1<r?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];var o=this._generateOptionsObjectFromOptionsArray(i),t=x({},this.getDefaultConfig(),o);return t.isNegativeSignAllowed=n<0,t.isPositiveSignAllowed=0<=n,this._setBrackets(t),this._cachesUsualRegularExpressions(t,{}),o=this._toNumericValue(n,t),isNaN(Number(o))&&d.throwError(`The value [${o}] that you are trying to format is not a recognized number.`),this._isWithinRangeWithOverrideOption(o,t)||(d.triggerEvent(e.events.formatted,document,{oldValue:null,newValue:null,oldRawValue:null,newRawValue:null,isPristine:null,error:`Range test failed`,aNElement:null},!0,!0),d.throwError(`The value [${o}] being set falls outside of the minimumValue [${t.minimumValue}] and maximumValue [${t.maximumValue}] range set for this element`)),t.valuesToStrings&&this._checkValuesToStringsSettings(n,t)?t.valuesToStrings[n]:(this._correctNegativePositiveSignPlacementOption(t),this._calculateDecimalPlacesOnInit(t),d.isUndefinedOrNullOrEmpty(t.rawValueDivisor)||t.rawValueDivisor===0||o===``||o===null||(o*=t.rawValueDivisor),o=this._roundFormattedValueShownOnFocus(o,t),o=this._modifyNegativeSignAndDecimalCharacterForFormattedValue(o,t),this._addGroupSeparators(o,t,!1,o))}},{key:`formatAndSet`,value:function(e){var t=this.format(e,1<arguments.length&&arguments[1]!==void 0?arguments[1]:null);return d.setElementValue(e,t),t}},{key:`unformat`,value:function(e){if(d.isNumberStrict(e))return e;var t=d.isElement(e)?d.getElementValue(e):e;if(t===``)return``;if(d.isUndefined(t)||t===null)return null;(d.isArray(t)||d.isObject(t))&&d.throwError(`A number or a string representing a number is needed to be able to unformat it, [${t}] given.`);for(var n=arguments.length,r=Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a=this._generateOptionsObjectFromOptionsArray(r),e=x({},this.getDefaultConfig(),a);return e.isNegativeSignAllowed=!1,e.isPositiveSignAllowed=!0,t=t.toString(),e.valuesToStrings&&this._checkStringsToValuesSettings(t,e)?d.objectKeyLookup(e.valuesToStrings,t):(d.isNegative(t,e.negativeSignCharacter)?(e.isNegativeSignAllowed=!0,e.isPositiveSignAllowed=!1):d.isNull(e.negativeBracketsTypeOnBlur)||(a=v(e.negativeBracketsTypeOnBlur.split(`,`),2),e.firstBracket=a[0],e.lastBracket=a[1],t.charAt(0)===e.firstBracket&&t.charAt(t.length-1)===e.lastBracket&&(e.isNegativeSignAllowed=!0,e.isPositiveSignAllowed=!1,t=this._removeBrackets(t,e,!1))),t=this._convertToNumericString(t,e),RegExp(`[^+-0123456789.]`,`gi`).test(t)?NaN:(this._correctNegativePositiveSignPlacementOption(e),e.decimalPlacesRawValue?e.originalDecimalPlacesRawValue=e.decimalPlacesRawValue:e.originalDecimalPlacesRawValue=e.decimalPlaces,this._calculateDecimalPlacesOnInit(e),d.isUndefinedOrNullOrEmpty(e.rawValueDivisor)||e.rawValueDivisor===0||t===``||t===null||(t/=e.rawValueDivisor),t=(t=this._roundRawValue(t,e)).replace(e.decimalCharacter,`.`),this._toLocale(t,e.outputFormat,e)))}},{key:`unformatAndSet`,value:function(e){var t=this.unformat(e,1<arguments.length&&arguments[1]!==void 0?arguments[1]:null);return d.setElementValue(e,t),t}},{key:`localize`,value:function(t){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null,r=d.isElement(t)?d.getElementValue(t):t;return r===``?``:(d.isNull(n)&&(n=e.defaultSettings),r=this.unformat(r,n),Number(r)===0&&n.leadingZero!==e.options.leadingZero.keep&&(r=`0`),t=(d.isNull(n)?n:e.defaultSettings).outputFormat,this._toLocale(r,t,n))}},{key:`localizeAndSet`,value:function(e){var t=this.localize(e,1<arguments.length&&arguments[1]!==void 0?arguments[1]:null);return d.setElementValue(e,t),t}},{key:`isManagedByAutoNumeric`,value:function(e){return this._isInGlobalList(d.domElement(e))}},{key:`getAutoNumericElement`,value:function(e){return e=d.domElement(e),this.isManagedByAutoNumeric(e)?this._getFromGlobalList(e):null}},{key:`set`,value:function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,r=!(3<arguments.length&&arguments[3]!==void 0)||arguments[3],e=d.domElement(e);return this.isManagedByAutoNumeric(e)?this.getAutoNumericElement(e).set(t,n,r):(n=!(!d.isNull(n)&&Object.prototype.hasOwnProperty.call(n,`showWarnings`))||n.showWarnings,d.warning(`Impossible to find an AutoNumeric object for the given DOM element or selector.`,n),null)}},{key:`getNumericString`,value:function(e){return this._get(e,`getNumericString`,1<arguments.length&&arguments[1]!==void 0?arguments[1]:null)}},{key:`getFormatted`,value:function(e){return this._get(e,`getFormatted`,1<arguments.length&&arguments[1]!==void 0?arguments[1]:null)}},{key:`getNumber`,value:function(e){return this._get(e,`getNumber`,1<arguments.length&&arguments[1]!==void 0?arguments[1]:null)}},{key:`_get`,value:function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,e=d.domElement(e);return this.isManagedByAutoNumeric(e)||d.throwError(`Impossible to find an AutoNumeric object for the given DOM element or selector.`),this.getAutoNumericElement(e)[t](n)}},{key:`getLocalized`,value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null,n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,e=d.domElement(e);return this.isManagedByAutoNumeric(e)||d.throwError(`Impossible to find an AutoNumeric object for the given DOM element or selector.`),this.getAutoNumericElement(e).getLocalized(t,n)}},{key:`_stripAllNonNumberCharacters`,value:function(e,t,n,r){return this._stripAllNonNumberCharactersExceptCustomDecimalChar(e,t,n,r).replace(t.decimalCharacter,`.`)}},{key:`_stripAllNonNumberCharactersExceptCustomDecimalChar`,value:function(t,n,r,i){var a,o,s=(t=(t=this._normalizeCurrencySuffixAndNegativeSignCharacters(t,n)).replace(n.allowedAutoStrip,``)).match(n.numRegAutoStrip);return t=s?[s[1],s[2],s[3]].join(``):``,n.leadingZero!==e.options.leadingZero.allow&&n.leadingZero!==e.options.leadingZero.keep||(a=``,s=(o=v(t.split(n.decimalCharacter),2))[0],o=o[1],d.contains(s,n.negativeSignCharacter)&&(a=n.negativeSignCharacter,s=s.replace(n.negativeSignCharacter,``)),a===``&&s.length>n.mIntPos&&s.charAt(0)===`0`&&(s=s.slice(1)),a!==``&&s.length>n.mIntNeg&&s.charAt(0)===`0`&&(s=s.slice(1)),t=`${a}${s}${d.isUndefined(o)?``:n.decimalCharacter+o}`),r&&n.leadingZero===e.options.leadingZero.deny||!i&&n.leadingZero===e.options.leadingZero.allow?t.replace(n.stripReg,`$1$2`):t}},{key:`_toggleNegativeBracket`,value:function(e,t,n){return n?this._removeBrackets(e,t):this._addBrackets(e,t)}},{key:`_addBrackets`,value:function(e,t){return d.isNull(t.negativeBracketsTypeOnBlur)?e:`${t.firstBracket}${e.replace(t.negativeSignCharacter,``)}${t.lastBracket}`}},{key:`_removeBrackets`,value:function(e,t){var n=!(2<arguments.length&&arguments[2]!==void 0)||arguments[2],r=d.isNull(t.negativeBracketsTypeOnBlur)||e.charAt(0)!==t.firstBracket?e:(r=(r=e.replace(t.firstBracket,``)).replace(t.lastBracket,``),n?(r=r.replace(t.currencySymbol,``),this._mergeCurrencySignNegativePositiveSignAndValue(r,t,!0,!1)):`${t.negativeSignCharacter}${r}`);return r}},{key:`_setBrackets`,value:function(e){var t,n;d.isNull(e.negativeBracketsTypeOnBlur)?(e.firstBracket=``,e.lastBracket=``):(t=(n=v(e.negativeBracketsTypeOnBlur.split(`,`),2))[0],n=n[1],e.firstBracket=t,e.lastBracket=n)}},{key:`_convertToNumericString`,value:function(t,n){return t=this._removeBrackets(t,n,!1),t=(t=this._normalizeCurrencySuffixAndNegativeSignCharacters(t,n)).replace(RegExp(`[${n.digitGroupSeparator}]`,`g`),``),n.decimalCharacter!==`.`&&(t=t.replace(n.decimalCharacter,`.`)),d.isNegative(t)&&t.lastIndexOf(`-`)===t.length-1&&(t=t.replace(`-`,``),t=`-${t}`),n.showPositiveSign&&(t=t.replace(n.positiveSignCharacter,``)),n=n.leadingZero!==e.options.leadingZero.keep,n=d.arabicToLatinNumbers(t,n,!1,!1),isNaN(n)?t:n.toString()}},{key:`_normalizeCurrencySuffixAndNegativeSignCharacters`,value:function(t,n){return t=String(t),n.currencySymbol!==e.options.currencySymbol.none&&(t=t.replace(n.currencySymbol,``)),n.suffixText!==e.options.suffixText.none&&(t=t.replace(n.suffixText,``)),n.negativeSignCharacter===e.options.negativeSignCharacter.hyphen?t:t.replace(n.negativeSignCharacter,`-`)}},{key:`_toLocale`,value:function(t,n,r){if(d.isNull(n)||n===e.options.outputFormat.string)return t;var i;switch(n){case e.options.outputFormat.number:i=Number(t);break;case e.options.outputFormat.dotNegative:i=d.isNegative(t)?t.replace(`-`,``)+`-`:t;break;case e.options.outputFormat.comma:case e.options.outputFormat.negativeComma:i=t.replace(`.`,`,`);break;case e.options.outputFormat.commaNegative:i=t.replace(`.`,`,`),i=d.isNegative(i)?i.replace(`-`,``)+`-`:i;break;case e.options.outputFormat.dot:case e.options.outputFormat.negativeDot:i=t;break;default:d.throwError(`The given outputFormat [${n}] option is not recognized.`)}return n!==e.options.outputFormat.number&&r.negativeSignCharacter!==`-`?i.replace(`-`,r.negativeSignCharacter):i}},{key:`_modifyNegativeSignAndDecimalCharacterForFormattedValue`,value:function(e,t){return t.negativeSignCharacter!==`-`&&(e=e.replace(`-`,t.negativeSignCharacter)),t.decimalCharacter===`.`?e:e.replace(`.`,t.decimalCharacter)}},{key:`_isElementValueEmptyOrOnlyTheNegativeSign`,value:function(e,t){return e===``||e===t.negativeSignCharacter}},{key:`_orderValueCurrencySymbolAndSuffixText`,value:function(t,n,r){var i;if(n.emptyInputBehavior===e.options.emptyInputBehavior.always||r)switch(n.negativePositiveSignPlacement){case e.options.negativePositiveSignPlacement.left:case e.options.negativePositiveSignPlacement.prefix:case e.options.negativePositiveSignPlacement.none:i=t+n.currencySymbol+n.suffixText;break;default:i=n.currencySymbol+t+n.suffixText}else i=t;return i}},{key:`_addGroupSeparators`,value:function(t,n,r,i){var a=4<arguments.length&&arguments[4]!==void 0?arguments[4]:null,o=d.isNull(a)?d.isNegative(t,n.negativeSignCharacter)||d.isNegativeWithBrackets(t,n.firstBracket,n.lastBracket):a<0;if(t=this._stripAllNonNumberCharactersExceptCustomDecimalChar(t,n,!1,r),this._isElementValueEmptyOrOnlyTheNegativeSign(t,n))return this._orderValueCurrencySymbolAndSuffixText(t,n,!0);var s,c=d.isZeroOrHasNoValue(t);switch(o&&(t=t.replace(`-`,``)),n.digitalGroupSpacing=n.digitalGroupSpacing.toString(),n.digitalGroupSpacing){case e.options.digitalGroupSpacing.two:s=/(\d)((\d)(\d{2}?)+)$/;break;case e.options.digitalGroupSpacing.twoScaled:s=/(\d)((?:\d{2}){0,2}\d{3}(?:(?:\d{2}){2}\d{3})*?)$/;break;case e.options.digitalGroupSpacing.four:s=/(\d)((\d{4}?)+)$/;break;default:e.options.digitalGroupSpacing.three,s=/(\d)((\d{3}?)+)$/}var l,u=(f=v(t.split(n.decimalCharacter),2))[0],f=f[1];if(n.decimalCharacterAlternative&&d.isUndefined(f)&&(u=(l=v(t.split(n.decimalCharacterAlternative),2))[0],f=l[1]),n.digitGroupSeparator!==``)for(;s.test(u);)u=u.replace(s,`\$1${n.digitGroupSeparator}\$2`);return t=(l=r?n.decimalPlacesShownOnFocus:n.decimalPlacesShownOnBlur)===0||d.isUndefined(f)?u:(f.length>l&&(f=f.substring(0,l)),`${u}${n.decimalCharacter}${f}`),t=e._mergeCurrencySignNegativePositiveSignAndValue(t,n,o,c),d.isNull(a)&&(a=i),n.negativeBracketsTypeOnBlur!==null&&(a<0||d.isNegativeStrict(t,n.negativeSignCharacter))&&(t=this._toggleNegativeBracket(t,n,r)),n.suffixText?`${t}${n.suffixText}`:t}},{key:`_mergeCurrencySignNegativePositiveSignAndValue`,value:function(t,n,r,i){var a,o=``;if(r?o=n.negativeSignCharacter:n.showPositiveSign&&!i&&(o=n.positiveSignCharacter),n.currencySymbolPlacement===e.options.currencySymbolPlacement.prefix)if(n.negativePositiveSignPlacement!==e.options.negativePositiveSignPlacement.none&&(r||!r&&n.showPositiveSign&&!i))switch(n.negativePositiveSignPlacement){case e.options.negativePositiveSignPlacement.prefix:case e.options.negativePositiveSignPlacement.left:a=`${o}${n.currencySymbol}${t}`;break;case e.options.negativePositiveSignPlacement.right:a=`${n.currencySymbol}${o}${t}`;break;case e.options.negativePositiveSignPlacement.suffix:a=`${n.currencySymbol}${t}${o}`}else a=n.currencySymbol+t;else if(n.currencySymbolPlacement===e.options.currencySymbolPlacement.suffix)if(n.negativePositiveSignPlacement!==e.options.negativePositiveSignPlacement.none&&(r||!r&&n.showPositiveSign&&!i))switch(n.negativePositiveSignPlacement){case e.options.negativePositiveSignPlacement.suffix:case e.options.negativePositiveSignPlacement.right:a=`${t}${n.currencySymbol}${o}`;break;case e.options.negativePositiveSignPlacement.left:a=`${t}${o}${n.currencySymbol}`;break;case e.options.negativePositiveSignPlacement.prefix:a=`${o}${t}${n.currencySymbol}`}else a=t+n.currencySymbol;return a}},{key:`_truncateZeros`,value:function(e,t){var n;switch(t){case 0:n=/(\.(?:\d*[1-9])?)0*$/;break;case 1:n=/(\.\d(?:\d*[1-9])?)0*$/;break;default:n=RegExp(`(\\.\\d{${t}}(?:\\d*[1-9])?)0*`)}return e=e.replace(n,`$1`),t===0?e.replace(/\.$/,``):e}},{key:`_roundRawValue`,value:function(e,t){return this._roundValue(e,t,t.decimalPlacesRawValue)}},{key:`_roundFormattedValueShownOnFocus`,value:function(e,t){return this._roundValue(e,t,Number(t.decimalPlacesShownOnFocus))}},{key:`_roundFormattedValueShownOnBlur`,value:function(e,t){return this._roundValue(e,t,Number(t.decimalPlacesShownOnBlur))}},{key:`_roundFormattedValueShownOnFocusOrBlur`,value:function(e,t,n){return n?this._roundFormattedValueShownOnFocus(e,t):this._roundFormattedValueShownOnBlur(e,t)}},{key:`_roundValue`,value:function(t,n,r){if(d.isNull(t))return t;if(t=t===``?`0`:t.toString(),n.roundingMethod===e.options.roundingMethod.toNearest05||n.roundingMethod===e.options.roundingMethod.toNearest05Alt||n.roundingMethod===e.options.roundingMethod.upToNext05||n.roundingMethod===e.options.roundingMethod.downToNext05)return this._roundCloseTo05(t,n);var i=(s=v(e._prepareValueForRounding(t,n),2))[0],a=(p=(t=s[1]).lastIndexOf(`.`))===-1,o=v(t.split(`.`),2),s=o[0];if(!(0<o[1]||n.allowDecimalPadding!==e.options.allowDecimalPadding.never&&n.allowDecimalPadding!==e.options.allowDecimalPadding.floats))return Number(t)===0?s:`${i}${s}`;var c=n.allowDecimalPadding===e.options.allowDecimalPadding.always||n.allowDecimalPadding===e.options.allowDecimalPadding.floats?r:0,s=a?t.length-1:p,l=t.length-1-s,u=``;if(l<=r){if(u=t,l<c){a&&(u=`${u}${n.decimalCharacter}`);for(var f=`000000`;l<c;)u+=f=f.substring(0,c-l),l+=f.length}else c<l?u=this._truncateZeros(u,c):l===0&&c===0&&(u=u.replace(/\.$/,``));return Number(u)===0?u:`${i}${u}`}var r=a?r-1:Number(r)+Number(p),p=Number(t.charAt(r+1)),m=t.substring(0,r+1).split(``),t=t.charAt(r)===`.`?t.charAt(r-1)%2:t.charAt(r)%2;if(this._shouldRoundUp(p,n,i,t)){for(var h=m.length-1;0<=h;--h)if(m[h]!==`.`){if(m[h]=+m[h]+1,m[h]<10)break;0<h&&(m[h]=`0`)}}return m=m.slice(0,r+1),u=this._truncateZeros(m.join(``),c),Number(u)===0?u:`${i}${u}`}},{key:`_roundCloseTo05`,value:function(t,n){switch(n.roundingMethod){case e.options.roundingMethod.toNearest05:case e.options.roundingMethod.toNearest05Alt:t=(Math.round(20*t)/20).toString();break;case e.options.roundingMethod.upToNext05:t=(Math.ceil(20*t)/20).toString();break;default:t=(Math.floor(20*t)/20).toString()}return d.contains(t,`.`)?t.length-t.indexOf(`.`)<3?t+`0`:t:t+`.00`}},{key:`_prepareValueForRounding`,value:function(t,n){var r=``;return(t=d.isNegativeStrict(t,`-`)?t.replace(r=`-`,``):t).match(/^\d/)||(t=`0${t}`),[r=Number(t)===0?``:r,t=0<Number(t)&&n.leadingZero!==e.options.leadingZero.keep||0<t.length&&n.leadingZero===e.options.leadingZero.allow?t.replace(/^0*(\d)/,`$1`):t]}},{key:`_shouldRoundUp`,value:function(t,n,r,i){return 4<t&&n.roundingMethod===e.options.roundingMethod.halfUpSymmetric||4<t&&n.roundingMethod===e.options.roundingMethod.halfUpAsymmetric&&r===``||5<t&&n.roundingMethod===e.options.roundingMethod.halfUpAsymmetric&&r===`-`||5<t&&n.roundingMethod===e.options.roundingMethod.halfDownSymmetric||5<t&&n.roundingMethod===e.options.roundingMethod.halfDownAsymmetric&&r===``||4<t&&n.roundingMethod===e.options.roundingMethod.halfDownAsymmetric&&r===`-`||5<t&&n.roundingMethod===e.options.roundingMethod.halfEvenBankersRounding||t===5&&n.roundingMethod===e.options.roundingMethod.halfEvenBankersRounding&&i===1||0<t&&n.roundingMethod===e.options.roundingMethod.toCeilingTowardPositiveInfinity&&r===``||0<t&&n.roundingMethod===e.options.roundingMethod.toFloorTowardNegativeInfinity&&r===`-`||0<t&&n.roundingMethod===e.options.roundingMethod.upRoundAwayFromZero}},{key:`_truncateDecimalPlaces`,value:function(e,t,n,r){var i=v((e=n?this._roundFormattedValueShownOnFocus(e,t):e).split(t.decimalCharacter),2),n=i[0];return(i=i[1])&&i.length>r?0<r?(r=i.substring(0,r),`${n}${t.decimalCharacter}${r}`):n:e}},{key:`_checkIfInRangeWithOverrideOption`,value:function(t,n){if(d.isNull(t)&&n.emptyInputBehavior===e.options.emptyInputBehavior.null||n.overrideMinMaxLimits===e.options.overrideMinMaxLimits.ignore||n.overrideMinMaxLimits===e.options.overrideMinMaxLimits.invalid)return[!0,!0];t=(t=t.toString()).replace(`,`,`.`);var r,i=d.parseStr(n.minimumValue),a=d.parseStr(n.maximumValue),o=d.parseStr(t);switch(n.overrideMinMaxLimits){case e.options.overrideMinMaxLimits.floor:r=[-1<d.testMinMax(i,o),!0];break;case e.options.overrideMinMaxLimits.ceiling:r=[!0,d.testMinMax(a,o)<1];break;default:r=[-1<d.testMinMax(i,o),d.testMinMax(a,o)<1]}return r}},{key:`_isWithinRangeWithOverrideOption`,value:function(e,t){return t=(e=v(this._checkIfInRangeWithOverrideOption(e,t),2))[0],e=e[1],t&&e}},{key:`_cleanValueForRangeParse`,value:function(e){return e=e.toString().replace(`,`,`.`),d.parseStr(e)}},{key:`_isMinimumRangeRespected`,value:function(e,t){return-1<d.testMinMax(d.parseStr(t.minimumValue),this._cleanValueForRangeParse(e))}},{key:`_isMaximumRangeRespected`,value:function(e,t){return d.testMinMax(d.parseStr(t.maximumValue),this._cleanValueForRangeParse(e))<1}},{key:`_readCookie`,value:function(e){for(var t=e+`=`,n=document.cookie.split(`;`),r=``,i=0;i<n.length;i+=1){for(r=n[i];r.charAt(0)===` `;)r=r.substring(1,r.length);if(r.indexOf(t)===0)return r.substring(t.length,r.length)}return null}},{key:`_storageTest`,value:function(){var e=`modernizr`;try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch{return!1}}},{key:`_correctNegativePositiveSignPlacementOption`,value:function(t){if(d.isNull(t.negativePositiveSignPlacement))if(d.isUndefined(t)||!d.isUndefinedOrNullOrEmpty(t.negativePositiveSignPlacement)||d.isUndefinedOrNullOrEmpty(t.currencySymbol))t.negativePositiveSignPlacement=e.options.negativePositiveSignPlacement.left;else switch(t.currencySymbolPlacement){case e.options.currencySymbolPlacement.suffix:t.negativePositiveSignPlacement=e.options.negativePositiveSignPlacement.prefix;break;case e.options.currencySymbolPlacement.prefix:t.negativePositiveSignPlacement=e.options.negativePositiveSignPlacement.left}}},{key:`_correctCaretPositionOnFocusAndSelectOnFocusOptions`,value:function(t){return d.isNull(t)?null:(!d.isUndefinedOrNullOrEmpty(t.caretPositionOnFocus)&&d.isUndefinedOrNullOrEmpty(t.selectOnFocus)&&(t.selectOnFocus=e.options.selectOnFocus.doNotSelect),d.isUndefinedOrNullOrEmpty(t.caretPositionOnFocus)&&!d.isUndefinedOrNullOrEmpty(t.selectOnFocus)&&t.selectOnFocus===e.options.selectOnFocus.select&&(t.caretPositionOnFocus=e.options.caretPositionOnFocus.doNoForceCaretPosition),t)}},{key:`_calculateDecimalPlacesOnInit`,value:function(t){this._validateDecimalPlacesRawValue(t),t.decimalPlacesShownOnFocus===e.options.decimalPlacesShownOnFocus.useDefault&&(t.decimalPlacesShownOnFocus=t.decimalPlaces),t.decimalPlacesShownOnBlur===e.options.decimalPlacesShownOnBlur.useDefault&&(t.decimalPlacesShownOnBlur=t.decimalPlaces),t.decimalPlacesRawValue===e.options.decimalPlacesRawValue.useDefault&&(t.decimalPlacesRawValue=t.decimalPlaces);var n=0;t.rawValueDivisor&&t.rawValueDivisor!==e.options.rawValueDivisor.none&&(n=String(t.rawValueDivisor).length-1)<0&&(n=0),t.decimalPlacesRawValue=Math.max(Math.max(t.decimalPlacesShownOnBlur,t.decimalPlacesShownOnFocus)+n,Number(t.originalDecimalPlacesRawValue)+n)}},{key:`_calculateDecimalPlacesOnUpdate`,value:function(t){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;this._validateDecimalPlacesRawValue(t),d.isNull(n)&&d.throwError(`When updating the settings, the previous ones should be passed as an argument.`);var r=`decimalPlaces`in t;(r||`decimalPlacesRawValue`in t||`decimalPlacesShownOnFocus`in t||`decimalPlacesShownOnBlur`in t||`rawValueDivisor`in t)&&(r?(`decimalPlacesShownOnFocus`in t&&t.decimalPlacesShownOnFocus!==e.options.decimalPlacesShownOnFocus.useDefault||(t.decimalPlacesShownOnFocus=t.decimalPlaces),`decimalPlacesShownOnBlur`in t&&t.decimalPlacesShownOnBlur!==e.options.decimalPlacesShownOnBlur.useDefault||(t.decimalPlacesShownOnBlur=t.decimalPlaces),`decimalPlacesRawValue`in t&&t.decimalPlacesRawValue!==e.options.decimalPlacesRawValue.useDefault||(t.decimalPlacesRawValue=t.decimalPlaces)):(d.isUndefined(t.decimalPlacesShownOnFocus)&&(t.decimalPlacesShownOnFocus=n.decimalPlacesShownOnFocus),d.isUndefined(t.decimalPlacesShownOnBlur)&&(t.decimalPlacesShownOnBlur=n.decimalPlacesShownOnBlur)),r=0,t.rawValueDivisor&&t.rawValueDivisor!==e.options.rawValueDivisor.none&&(r=String(t.rawValueDivisor).length-1)<0&&(r=0),t.decimalPlaces||t.decimalPlacesRawValue?t.decimalPlacesRawValue=Math.max(Math.max(t.decimalPlacesShownOnBlur,t.decimalPlacesShownOnFocus)+r,Number(t.decimalPlacesRawValue)+r):t.decimalPlacesRawValue=Math.max(Math.max(t.decimalPlacesShownOnBlur,t.decimalPlacesShownOnFocus)+r,Number(n.originalDecimalPlacesRawValue)+r))}},{key:`_cachesUsualRegularExpressions`,value:function(t,n){var r=t.negativeSignCharacter===e.options.negativeSignCharacter.hyphen?`(-?)`:`([-\\${t.negativeSignCharacter}]?)`;n.aNegRegAutoStrip=r,t.allowedAutoStrip=RegExp(`[^-0123456789\\${t.decimalCharacter}]`,`g`),t.numRegAutoStrip=RegExp(`${r}(?:\\${t.decimalCharacter}?([0-9]+\\${t.decimalCharacter}[0-9]+)|([0-9]*(?:\\${t.decimalCharacter}[0-9]*)?))`),t.stripReg=RegExp(`^${n.aNegRegAutoStrip}0*([0-9])`),t.formulaChars=RegExp(`[0-9${t.decimalCharacter}+\\-*/() ]`)}},{key:`_convertOldOptionsToNewOnes`,value:function(e){var t,n={aSep:`digitGroupSeparator`,nSep:`showOnlyNumbersOnFocus`,dGroup:`digitalGroupSpacing`,aDec:`decimalCharacter`,altDec:`decimalCharacterAlternative`,aSign:`currencySymbol`,pSign:`currencySymbolPlacement`,pNeg:`negativePositiveSignPlacement`,aSuffix:`suffixText`,oLimits:`overrideMinMaxLimits`,vMax:`maximumValue`,vMin:`minimumValue`,mDec:`decimalPlacesOverride`,eDec:`decimalPlacesShownOnFocus`,scaleDecimal:`decimalPlacesShownOnBlur`,aStor:`saveValueToSessionStorage`,mRound:`roundingMethod`,aPad:`allowDecimalPadding`,nBracket:`negativeBracketsTypeOnBlur`,wEmpty:`emptyInputBehavior`,lZero:`leadingZero`,aForm:`formatOnPageLoad`,sNumber:`selectNumberOnly`,anDefault:`defaultValueOverride`,unSetOnSubmit:`unformatOnSubmit`,outputType:`outputFormat`,debug:`showWarnings`,allowDecimalPadding:!0,alwaysAllowDecimalCharacter:!0,caretPositionOnFocus:!0,createLocalList:!0,currencySymbol:!0,currencySymbolPlacement:!0,decimalCharacter:!0,decimalCharacterAlternative:!0,decimalPlaces:!0,decimalPlacesRawValue:!0,decimalPlacesShownOnBlur:!0,decimalPlacesShownOnFocus:!0,defaultValueOverride:!0,digitalGroupSpacing:!0,digitGroupSeparator:!0,divisorWhenUnfocused:!0,emptyInputBehavior:!0,eventBubbles:!0,eventIsCancelable:!0,failOnUnknownOption:!0,formatOnPageLoad:!0,formulaMode:!0,historySize:!0,isCancellable:!0,leadingZero:!0,maximumValue:!0,minimumValue:!0,modifyValueOnWheel:!0,negativeBracketsTypeOnBlur:!0,negativePositiveSignPlacement:!0,negativeSignCharacter:!0,noEventListeners:!0,onInvalidPaste:!0,outputFormat:!0,overrideMinMaxLimits:!0,positiveSignCharacter:!0,rawValueDivisor:!0,readOnly:!0,roundingMethod:!0,saveValueToSessionStorage:!0,selectNumberOnly:!0,selectOnFocus:!0,serializeSpaces:!0,showOnlyNumbersOnFocus:!0,showPositiveSign:!0,showWarnings:!0,styleRules:!0,suffixText:!0,symbolWhenUnfocused:!0,unformatOnHover:!0,unformatOnSubmit:!0,valuesToStrings:!0,watchExternalChanges:!0,wheelOn:!0,wheelStep:!0,allowedAutoStrip:!0,formulaChars:!0,isNegativeSignAllowed:!0,isPositiveSignAllowed:!0,mIntNeg:!0,mIntPos:!0,numRegAutoStrip:!0,originalDecimalPlaces:!0,originalDecimalPlacesRawValue:!0,stripReg:!0};for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&!0!==n[t]&&(Object.prototype.hasOwnProperty.call(n,t)?(d.warning(`You are using the deprecated option name '${t}'. Please use '${n[t]}' instead from now on. The old option name will be dropped very soon™.`,!0),e[n[t]]=e[t],delete e[t]):e.failOnUnknownOption&&d.throwError(`Option name '${t}' is unknown. Please fix the options passed to autoNumeric`));`mDec`in e&&d.warning("The old `mDec` option has been deprecated in favor of more accurate options ; `decimalPlaces`, `decimalPlacesRawValue`, `decimalPlacesShownOnFocus` and `decimalPlacesShownOnBlur`.",!0)}},{key:`_setNegativePositiveSignPermissions`,value:function(e){e.isNegativeSignAllowed=e.minimumValue<0,e.isPositiveSignAllowed=0<=e.maximumValue}},{key:`_toNumericValue`,value:function(e,t){var n;return d.isNumber(Number(e))?n=d.scientificToDecimal(e):(n=this._convertToNumericString(e.toString(),t),d.isNumber(Number(n))||(d.warning(`The given value "${e}" cannot be converted to a numeric one and therefore cannot be used appropriately.`,t.showWarnings),n=NaN)),n}},{key:`_checkIfInRange`,value:function(e,t,n){return e=d.parseStr(e),-1<d.testMinMax(t,e)&&d.testMinMax(n,e)<1}},{key:`_shouldSkipEventKey`,value:function(e){var t=d.isInArray(e,i.keyName._allFnKeys),n=e===i.keyName.OSLeft||e===i.keyName.OSRight,r=e===i.keyName.ContextMenu,a=d.isInArray(e,i.keyName._someNonPrintableKeys),o=e===i.keyName.NumLock||e===i.keyName.ScrollLock||e===i.keyName.Insert||e===i.keyName.Command,e=e===i.keyName.Unidentified;return t||n||r||a||e||o}},{key:`_serialize`,value:function(e){var t,n=this,r=1<arguments.length&&arguments[1]!==void 0&&arguments[1],i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:`unformatted`,a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:`+`,o=4<arguments.length&&arguments[4]!==void 0?arguments[4]:null,s=[];return S(e)===`object`&&e.nodeName.toLowerCase()===`form`&&Array.prototype.slice.call(e.elements).forEach(function(e){if(e.name&&!e.disabled&&[`file`,`reset`,`submit`,`button`].indexOf(e.type)===-1){if(e.type===`select-multiple`)Array.prototype.slice.call(e.options).forEach(function(t){t.selected&&(r?s.push({name:e.name,value:t.value}):s.push(`${encodeURIComponent(e.name)}=${encodeURIComponent(t.value)}`))});else if([`checkbox`,`radio`].indexOf(e.type)===-1||e.checked){var t;if(n.isManagedByAutoNumeric(e))switch(i){case`unformatted`:a=n.getAutoNumericElement(e),d.isNull(a)||(t=n.unformat(e,a.getSettings()));break;case`localized`:var a=n.getAutoNumericElement(e);d.isNull(a)||(a=d.cloneObject(a.getSettings()),d.isNull(o)||(a.outputFormat=o),t=n.localize(e,a));break;default:t=e.value}else t=e.value;d.isUndefined(t)&&d.throwError(`This error should never be hit. If it has, something really wrong happened!`),r?s.push({name:e.name,value:t}):s.push(`${encodeURIComponent(e.name)}=${encodeURIComponent(t)}`)}}}),r?t=s:(t=s.join(`&`),a===`+`&&(t=t.replace(/%20/g,`+`))),t}},{key:`_serializeNumericString`,value:function(e){return this._serialize(e,!1,`unformatted`,1<arguments.length&&arguments[1]!==void 0?arguments[1]:`+`)}},{key:`_serializeFormatted`,value:function(e){return this._serialize(e,!1,`formatted`,1<arguments.length&&arguments[1]!==void 0?arguments[1]:`+`)}},{key:`_serializeLocalized`,value:function(e){return this._serialize(e,!1,`localized`,1<arguments.length&&arguments[1]!==void 0?arguments[1]:`+`,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)}},{key:`_serializeNumericStringArray`,value:function(e){return this._serialize(e,!0,`unformatted`,1<arguments.length&&arguments[1]!==void 0?arguments[1]:`+`)}},{key:`_serializeFormattedArray`,value:function(e){return this._serialize(e,!0,`formatted`,1<arguments.length&&arguments[1]!==void 0?arguments[1]:`+`)}},{key:`_serializeLocalizedArray`,value:function(e){return this._serialize(e,!0,`localized`,1<arguments.length&&arguments[1]!==void 0?arguments[1]:`+`,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)}}]),e}();T.multiple=function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null,n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,r=[];if(d.isObject(t)&&(n=t,t=null),d.isString(e)?e=_(document.querySelectorAll(e)):d.isObject(e)?(Object.prototype.hasOwnProperty.call(e,`rootElement`)||d.throwError(`The object passed to the 'multiple' function is invalid ; no 'rootElement' attribute found.`),a=_(e.rootElement.querySelectorAll(`input`)),e=Object.prototype.hasOwnProperty.call(e,`exclude`)?(Array.isArray(e.exclude)||d.throwError(`The 'exclude' array passed to the 'multiple' function is invalid.`),d.filterOut(a,e.exclude)):a):d.isArray(e)||d.throwError(`The given parameters to the 'multiple' function are invalid.`),e.length===0){var i=!0;return!d.isNull(n)&&d.isBoolean(n.showWarnings)&&(i=n.showWarnings),d.warning(`No valid DOM elements were given hence no AutoNumeric objects were instantiated.`,i),[]}var a=d.isArray(t)&&1<=t.length,o=!1,i=!1;a&&(s=S(Number(t[0])),(o=s===`number`&&!isNaN(Number(t[0])))||s!==`string`&&!isNaN(s)&&s!==`object`||(i=!0));var s,a=!1;d.isArray(n)&&1<=n.length&&((s=S(n[0]))!==`string`&&s!==`object`||(a=!0));var c,l=i?T.mergeOptions(t):a?T.mergeOptions(n):n,u=d.isNumber(t);return o&&(c=t.length),e.forEach(function(e,n){u?r.push(new T(e,t,l)):o&&n<=c?r.push(new T(e,t[n],l)):r.push(new T(e,null,l))}),r},Array.from||(Array.from=function(e){return[].slice.call(e)}),typeof window<`u`&&typeof window.CustomEvent!=`function`&&(window.CustomEvent=function(e,t){t||={bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent(`CustomEvent`);return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}),T.events={correctedValue:`autoNumeric:correctedValue`,initialized:`autoNumeric:initialized`,invalidFormula:`autoNumeric:invalidFormula`,invalidValue:`autoNumeric:invalidValue`,formatted:`autoNumeric:formatted`,rawValueModified:`autoNumeric:rawValueModified`,minRangeExceeded:`autoNumeric:minExceeded`,maxRangeExceeded:`autoNumeric:maxExceeded`,native:{input:`input`,change:`change`},validFormula:`autoNumeric:validFormula`},Object.freeze(T.events.native),Object.freeze(T.events),Object.defineProperty(T,`events`,{configurable:!1,writable:!1}),T.options={allowDecimalPadding:{always:!0,never:!1,floats:`floats`},alwaysAllowDecimalCharacter:{alwaysAllow:!0,doNotAllow:!1},caretPositionOnFocus:{start:`start`,end:`end`,decimalLeft:`decimalLeft`,decimalRight:`decimalRight`,doNoForceCaretPosition:null},createLocalList:{createList:!0,doNotCreateList:!1},currencySymbol:{none:``,currencySign:`¤`,austral:`₳`,australCentavo:`¢`,baht:`฿`,cedi:`₵`,cent:`¢`,colon:`₡`,cruzeiro:`₢`,dollar:`$`,dong:`₫`,drachma:`₯`,dram:`֏`,european:`₠`,euro:`€`,florin:`ƒ`,franc:`₣`,guarani:`₲`,hryvnia:`₴`,kip:`₭`,att:`ອັດ`,lepton:`Λ.`,lira:`₺`,liraOld:`₤`,lari:`₾`,mark:`ℳ`,mill:`₥`,naira:`₦`,peseta:`₧`,peso:`₱`,pfennig:`₰`,pound:`£`,real:`R$`,riel:`៛`,ruble:`₽`,rupee:`₹`,rupeeOld:`₨`,shekel:`₪`,shekelAlt:`ש״ח`,taka:`৳`,tenge:`₸`,togrog:`₮`,won:`₩`,yen:`¥`},currencySymbolPlacement:{prefix:`p`,suffix:`s`},decimalCharacter:{comma:`,`,dot:`.`,middleDot:`·`,arabicDecimalSeparator:`٫`,decimalSeparatorKeySymbol:`⎖`},decimalCharacterAlternative:{none:null,comma:`,`,dot:`.`},decimalPlaces:{none:0,one:1,two:2,three:3,four:4,five:5,six:6},decimalPlacesRawValue:{useDefault:null,none:0,one:1,two:2,three:3,four:4,five:5,six:6},decimalPlacesShownOnBlur:{useDefault:null,none:0,one:1,two:2,three:3,four:4,five:5,six:6},decimalPlacesShownOnFocus:{useDefault:null,none:0,one:1,two:2,three:3,four:4,five:5,six:6},defaultValueOverride:{doNotOverride:null},digitalGroupSpacing:{two:`2`,twoScaled:`2s`,three:`3`,four:`4`},digitGroupSeparator:{comma:`,`,dot:`.`,normalSpace:` `,thinSpace:` `,narrowNoBreakSpace:` `,noBreakSpace:`\xA0`,noSeparator:``,apostrophe:`'`,arabicThousandsSeparator:`٬`,dotAbove:`˙`,privateUseTwo:`’`},divisorWhenUnfocused:{none:null,percentage:100,permille:1e3,basisPoint:1e4},emptyInputBehavior:{focus:`focus`,press:`press`,always:`always`,zero:`zero`,min:`min`,max:`max`,null:`null`},eventBubbles:{bubbles:!0,doesNotBubble:!1},eventIsCancelable:{isCancelable:!0,isNotCancelable:!1},failOnUnknownOption:{fail:!0,ignore:!1},formatOnPageLoad:{format:!0,doNotFormat:!1},formulaMode:{enabled:!0,disabled:!1},historySize:{verySmall:5,small:10,medium:20,large:50,veryLarge:100,insane:2**53-1},invalidClass:`an-invalid`,isCancellable:{cancellable:!0,notCancellable:!1},leadingZero:{allow:`allow`,deny:`deny`,keep:`keep`},maximumValue:{tenTrillions:`10000000000000`,oneBillion:`1000000000`,zero:`0`},minimumValue:{tenTrillions:`-10000000000000`,oneBillion:`-1000000000`,zero:`0`},modifyValueOnWheel:{modifyValue:!0,doNothing:!1},negativeBracketsTypeOnBlur:{parentheses:`(,)`,brackets:`[,]`,chevrons:`<,>`,curlyBraces:`{,}`,angleBrackets:`〈,〉`,japaneseQuotationMarks:`「,」`,halfBrackets:`⸤,⸥`,whiteSquareBrackets:`⟦,⟧`,quotationMarks:`‹,›`,guillemets:`«,»`,none:null},negativePositiveSignPlacement:{prefix:`p`,suffix:`s`,left:`l`,right:`r`,none:null},negativeSignCharacter:{hyphen:`-`,minus:`−`,heavyMinus:`➖`,fullWidthHyphen:`-`,circledMinus:`⊖`,squaredMinus:`⊟`,triangleMinus:`⨺`,plusMinus:`±`,minusPlus:`∓`,dotMinus:`∸`,minusTilde:`≂`,not:`¬`},noEventListeners:{noEvents:!0,addEvents:!1},onInvalidPaste:{error:`error`,ignore:`ignore`,clamp:`clamp`,truncate:`truncate`,replace:`replace`},outputFormat:{string:`string`,number:`number`,dot:`.`,negativeDot:`-.`,comma:`,`,negativeComma:`-,`,dotNegative:`.-`,commaNegative:`,-`,none:null},overrideMinMaxLimits:{ceiling:`ceiling`,floor:`floor`,ignore:`ignore`,invalid:`invalid`,doNotOverride:null},positiveSignCharacter:{plus:`+`,fullWidthPlus:`+`,heavyPlus:`➕`,doublePlus:`⧺`,triplePlus:`⧻`,circledPlus:`⊕`,squaredPlus:`⊞`,trianglePlus:`⨹`,plusMinus:`±`,minusPlus:`∓`,dotPlus:`∔`,altHebrewPlus:`﬩`,normalSpace:` `,thinSpace:` `,narrowNoBreakSpace:` `,noBreakSpace:`\xA0`},rawValueDivisor:{none:null,percentage:100,permille:1e3,basisPoint:1e4},readOnly:{readOnly:!0,readWrite:!1},roundingMethod:{halfUpSymmetric:`S`,halfUpAsymmetric:`A`,halfDownSymmetric:`s`,halfDownAsymmetric:`a`,halfEvenBankersRounding:`B`,upRoundAwayFromZero:`U`,downRoundTowardZero:`D`,toCeilingTowardPositiveInfinity:`C`,toFloorTowardNegativeInfinity:`F`,toNearest05:`N05`,toNearest05Alt:`CHF`,upToNext05:`U05`,downToNext05:`D05`},saveValueToSessionStorage:{save:!0,doNotSave:!1},selectNumberOnly:{selectNumbersOnly:!0,selectAll:!1},selectOnFocus:{select:!0,doNotSelect:!1},serializeSpaces:{plus:`+`,percent:`%20`},showOnlyNumbersOnFocus:{onlyNumbers:!0,showAll:!1},showPositiveSign:{show:!0,hide:!1},showWarnings:{show:!0,hide:!1},styleRules:{none:null,positiveNegative:{positive:`autoNumeric-positive`,negative:`autoNumeric-negative`},range0To100With4Steps:{ranges:[{min:0,max:25,class:`autoNumeric-red`},{min:25,max:50,class:`autoNumeric-orange`},{min:50,max:75,class:`autoNumeric-yellow`},{min:75,max:100,class:`autoNumeric-green`}]},evenOdd:{userDefined:[{callback:function(e){return e%2==0},classes:[`autoNumeric-even`,`autoNumeric-odd`]}]},rangeSmallAndZero:{userDefined:[{callback:function(e){return-1<=e&&e<0?0:Number(e)===0?1:0<e&&e<=1?2:null},classes:[`autoNumeric-small-negative`,`autoNumeric-zero`,`autoNumeric-small-positive`]}]}},suffixText:{none:``,percentage:`%`,permille:`‰`,basisPoint:`‱`},symbolWhenUnfocused:{none:null,percentage:`%`,permille:`‰`,basisPoint:`‱`},unformatOnHover:{unformat:!0,doNotUnformat:!1},unformatOnSubmit:{unformat:!0,keepCurrentValue:!1},valuesToStrings:{none:null,zeroDash:{0:`-`},oneAroundZero:{"-1":`Min`,1:`Max`}},watchExternalChanges:{watch:!0,doNotWatch:!1},wheelOn:{focus:`focus`,hover:`hover`},wheelStep:{progressive:`progressive`}},w=T.options,Object.getOwnPropertyNames(w).forEach(function(e){e===`valuesToStrings`?Object.getOwnPropertyNames(w.valuesToStrings).forEach(function(e){d.isIE11()||w.valuesToStrings[e]===null||Object.freeze(w.valuesToStrings[e])}):e!==`styleRules`&&(d.isIE11()||w[e]===null||Object.freeze(w[e]))}),Object.freeze(w),Object.defineProperty(T,`options`,{configurable:!1,writable:!1}),T.defaultSettings={allowDecimalPadding:T.options.allowDecimalPadding.always,alwaysAllowDecimalCharacter:T.options.alwaysAllowDecimalCharacter.doNotAllow,caretPositionOnFocus:T.options.caretPositionOnFocus.doNoForceCaretPosition,createLocalList:T.options.createLocalList.createList,currencySymbol:T.options.currencySymbol.none,currencySymbolPlacement:T.options.currencySymbolPlacement.prefix,decimalCharacter:T.options.decimalCharacter.dot,decimalCharacterAlternative:T.options.decimalCharacterAlternative.none,decimalPlaces:T.options.decimalPlaces.two,decimalPlacesRawValue:T.options.decimalPlacesRawValue.useDefault,decimalPlacesShownOnBlur:T.options.decimalPlacesShownOnBlur.useDefault,decimalPlacesShownOnFocus:T.options.decimalPlacesShownOnFocus.useDefault,defaultValueOverride:T.options.defaultValueOverride.doNotOverride,digitalGroupSpacing:T.options.digitalGroupSpacing.three,digitGroupSeparator:T.options.digitGroupSeparator.comma,divisorWhenUnfocused:T.options.divisorWhenUnfocused.none,emptyInputBehavior:T.options.emptyInputBehavior.focus,eventBubbles:T.options.eventBubbles.bubbles,eventIsCancelable:T.options.eventIsCancelable.isCancelable,failOnUnknownOption:T.options.failOnUnknownOption.ignore,formatOnPageLoad:T.options.formatOnPageLoad.format,formulaMode:T.options.formulaMode.disabled,historySize:T.options.historySize.medium,invalidClass:T.options.invalidClass,isCancellable:T.options.isCancellable.cancellable,leadingZero:T.options.leadingZero.deny,maximumValue:T.options.maximumValue.tenTrillions,minimumValue:T.options.minimumValue.tenTrillions,modifyValueOnWheel:T.options.modifyValueOnWheel.modifyValue,negativeBracketsTypeOnBlur:T.options.negativeBracketsTypeOnBlur.none,negativePositiveSignPlacement:T.options.negativePositiveSignPlacement.none,negativeSignCharacter:T.options.negativeSignCharacter.hyphen,noEventListeners:T.options.noEventListeners.addEvents,onInvalidPaste:T.options.onInvalidPaste.error,outputFormat:T.options.outputFormat.none,overrideMinMaxLimits:T.options.overrideMinMaxLimits.doNotOverride,positiveSignCharacter:T.options.positiveSignCharacter.plus,rawValueDivisor:T.options.rawValueDivisor.none,readOnly:T.options.readOnly.readWrite,roundingMethod:T.options.roundingMethod.halfUpSymmetric,saveValueToSessionStorage:T.options.saveValueToSessionStorage.doNotSave,selectNumberOnly:T.options.selectNumberOnly.selectNumbersOnly,selectOnFocus:T.options.selectOnFocus.select,serializeSpaces:T.options.serializeSpaces.plus,showOnlyNumbersOnFocus:T.options.showOnlyNumbersOnFocus.showAll,showPositiveSign:T.options.showPositiveSign.hide,showWarnings:T.options.showWarnings.show,styleRules:T.options.styleRules.none,suffixText:T.options.suffixText.none,symbolWhenUnfocused:T.options.symbolWhenUnfocused.none,unformatOnHover:T.options.unformatOnHover.unformat,unformatOnSubmit:T.options.unformatOnSubmit.keepCurrentValue,valuesToStrings:T.options.valuesToStrings.none,watchExternalChanges:T.options.watchExternalChanges.doNotWatch,wheelOn:T.options.wheelOn.focus,wheelStep:T.options.wheelStep.progressive},Object.freeze(T.defaultSettings),Object.defineProperty(T,`defaultSettings`,{configurable:!1,writable:!1});var E={digitGroupSeparator:T.options.digitGroupSeparator.dot,decimalCharacter:T.options.decimalCharacter.comma,decimalCharacterAlternative:T.options.decimalCharacterAlternative.dot,currencySymbol:` €`,currencySymbolPlacement:T.options.currencySymbolPlacement.suffix,negativePositiveSignPlacement:T.options.negativePositiveSignPlacement.prefix},D={digitGroupSeparator:T.options.digitGroupSeparator.comma,decimalCharacter:T.options.decimalCharacter.dot,currencySymbol:T.options.currencySymbol.dollar,currencySymbolPlacement:T.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:T.options.negativePositiveSignPlacement.right},O={digitGroupSeparator:T.options.digitGroupSeparator.comma,decimalCharacter:T.options.decimalCharacter.dot,currencySymbol:T.options.currencySymbol.yen,currencySymbolPlacement:T.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:T.options.negativePositiveSignPlacement.right};d.cloneObject(E).formulaMode=T.options.formulaMode.enabled;var k=d.cloneObject(E);k.minimumValue=0;var A=d.cloneObject(E);A.maximumValue=0,A.negativePositiveSignPlacement=T.options.negativePositiveSignPlacement.prefix;var j=d.cloneObject(E);j.digitGroupSeparator=T.options.digitGroupSeparator.normalSpace;var M=d.cloneObject(j);M.minimumValue=0;var N=d.cloneObject(j);N.maximumValue=0,N.negativePositiveSignPlacement=T.options.negativePositiveSignPlacement.prefix;var P=d.cloneObject(E);P.currencySymbol=T.options.currencySymbol.none,P.suffixText=` ${T.options.suffixText.percentage}`,P.wheelStep=1e-4,P.rawValueDivisor=T.options.rawValueDivisor.percentage;var F=d.cloneObject(P);F.minimumValue=0;var I=d.cloneObject(P);I.maximumValue=0,I.negativePositiveSignPlacement=T.options.negativePositiveSignPlacement.prefix;var L=d.cloneObject(P);L.decimalPlaces=3;var ee=d.cloneObject(F);ee.decimalPlaces=3;var R=d.cloneObject(I);R.decimalPlaces=3,d.cloneObject(D).formulaMode=T.options.formulaMode.enabled;var te=d.cloneObject(D);te.minimumValue=0;var z=d.cloneObject(D);z.maximumValue=0,z.negativePositiveSignPlacement=T.options.negativePositiveSignPlacement.prefix;var B=d.cloneObject(z);B.negativeBracketsTypeOnBlur=T.options.negativeBracketsTypeOnBlur.parentheses;var V=d.cloneObject(D);V.currencySymbol=T.options.currencySymbol.none,V.suffixText=T.options.suffixText.percentage,V.wheelStep=1e-4,V.rawValueDivisor=T.options.rawValueDivisor.percentage;var H=d.cloneObject(V);H.minimumValue=0;var ne=d.cloneObject(V);ne.maximumValue=0,ne.negativePositiveSignPlacement=T.options.negativePositiveSignPlacement.prefix;var U=d.cloneObject(V);U.decimalPlaces=3;var W=d.cloneObject(H);W.decimalPlaces=3,(n=d.cloneObject(ne)).decimalPlaces=3,(r=d.cloneObject(E)).currencySymbol=T.options.currencySymbol.lira,T.predefinedOptions={euro:E,euroPos:k,euroNeg:A,euroSpace:j,euroSpacePos:M,euroSpaceNeg:N,percentageEU2dec:P,percentageEU2decPos:F,percentageEU2decNeg:I,percentageEU3dec:L,percentageEU3decPos:ee,percentageEU3decNeg:R,dollar:D,dollarPos:te,dollarNeg:z,dollarNegBrackets:B,percentageUS2dec:V,percentageUS2decPos:H,percentageUS2decNeg:ne,percentageUS3dec:U,percentageUS3decPos:W,percentageUS3decNeg:n,French:E,Spanish:E,NorthAmerican:D,British:{digitGroupSeparator:T.options.digitGroupSeparator.comma,decimalCharacter:T.options.decimalCharacter.dot,currencySymbol:T.options.currencySymbol.pound,currencySymbolPlacement:T.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:T.options.negativePositiveSignPlacement.right},Swiss:{digitGroupSeparator:T.options.digitGroupSeparator.apostrophe,decimalCharacter:T.options.decimalCharacter.dot,currencySymbol:` CHF`,currencySymbolPlacement:T.options.currencySymbolPlacement.suffix,negativePositiveSignPlacement:T.options.negativePositiveSignPlacement.prefix},Japanese:O,Chinese:O,Brazilian:{digitGroupSeparator:T.options.digitGroupSeparator.dot,decimalCharacter:T.options.decimalCharacter.comma,currencySymbol:T.options.currencySymbol.real,currencySymbolPlacement:T.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:T.options.negativePositiveSignPlacement.right},Turkish:r,dotDecimalCharCommaSeparator:{digitGroupSeparator:T.options.digitGroupSeparator.comma,decimalCharacter:T.options.decimalCharacter.dot},commaDecimalCharDotSeparator:{digitGroupSeparator:T.options.digitGroupSeparator.dot,decimalCharacter:T.options.decimalCharacter.comma,decimalCharacterAlternative:T.options.decimalCharacterAlternative.dot},integer:{decimalPlaces:0},integerPos:{minimumValue:T.options.minimumValue.zero,decimalPlaces:0},integerNeg:{maximumValue:T.options.maximumValue.zero,decimalPlaces:0},float:{allowDecimalPadding:T.options.allowDecimalPadding.never},floatPos:{allowDecimalPadding:T.options.allowDecimalPadding.never,minimumValue:T.options.minimumValue.zero,maximumValue:T.options.maximumValue.tenTrillions},floatNeg:{allowDecimalPadding:T.options.allowDecimalPadding.never,minimumValue:T.options.minimumValue.tenTrillions,maximumValue:T.options.maximumValue.zero},numeric:{digitGroupSeparator:T.options.digitGroupSeparator.noSeparator,decimalCharacter:T.options.decimalCharacter.dot,currencySymbol:T.options.currencySymbol.none},numericPos:{digitGroupSeparator:T.options.digitGroupSeparator.noSeparator,decimalCharacter:T.options.decimalCharacter.dot,currencySymbol:T.options.currencySymbol.none,minimumValue:T.options.minimumValue.zero,maximumValue:T.options.maximumValue.tenTrillions},numericNeg:{digitGroupSeparator:T.options.digitGroupSeparator.noSeparator,decimalCharacter:T.options.decimalCharacter.dot,currencySymbol:T.options.currencySymbol.none,minimumValue:T.options.minimumValue.tenTrillions,maximumValue:T.options.maximumValue.zero}},Object.getOwnPropertyNames(T.predefinedOptions).forEach(function(e){Object.freeze(T.predefinedOptions[e])}),Object.freeze(T.predefinedOptions),Object.defineProperty(T,`predefinedOptions`,{configurable:!1,writable:!1}),t.default=T}],n={},e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(e){typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n||4&n&&typeof t==`object`&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,`default`,{enumerable:!0,value:t}),2&n&&typeof t!=`string`)for(var i in t)e.d(r,i,function(e){return t[e]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,`a`,n),n},e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.p=``,e(e.s=0).default;function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var t,n})}))(),1),S=class extends Error{constructor(e,t){super(`Child ${e} not found on parent ${t}`)}},C=class{allowDuplicate=!1;autofocus=!1;children=[];childrenInstances=[];cssClass=``;cssStyle=``;directives={};events={};isVisible=!0;name;dark=!1;light=!1;theme;fillHeight=!1;parent;componentId;keyMap={};isFocused=!1;tabStop=!0;accessorManager;element;viewFocus;userProperties={};props;constructor(e){for(let n in this.props={...e},this.accessorManager=new t.AccessorManager,this.parent=e.parent,this.name=e.name,this.events=t.Event.factory(e.events||this.events),this.allowDuplicate=this.getInitValue(`allowDuplicate`,e.allowDuplicate,this.allowDuplicate),this.autofocus=this.getInitValue(`autofocus`,e.autofocus,this.autofocus),this.cssClass=this.getInitValue(`cssClass`,e.cssClass,this.cssClass),this.cssStyle=this.getInitValue(`cssStyle`,e.cssStyle,this.cssStyle),this.directives=this.getInitValue(`directives`,e.directives,this.directives),this.isVisible=this.getInitValue(`isVisible`,e.isVisible,this.isVisible),this.dark=this.getInitValue(`dark`,e.dark,this.dark),this.light=this.getInitValue(`light`,e.light,this.light),this.theme=this.getInitValue(`theme`,e.theme,this.theme),this.tabStop=this.getInitValue(`tabStop`,e.tabStop,this.tabStop),this.children=Array.isArray(e.children)?e.children:this.children,this.keyMap=t.KeyMap.factory(e.keyMap||this.keyMap),this.fillHeight=this.getInitValue(`fillHeight`,e.fillHeight,this.fillHeight),this.userProperties=this.getInitValue(`userProperties`,e.userProperties,this.userProperties),this.directives)this.directives[n]=t.Event.factory(this.directives[n]||{})}setViewFocus(e){this.viewFocus=e}setFocus(){if(this.viewFocus)return this.viewFocus();throw Error(`viewFocus method not assigned`)}getInitValue(e,t,n){let r=n;return this.accessorManager.hasAccessor(e)?r=this[e]:t!==void 0&&(r=t,this.accessorManager.addProp(e,t)),r}createAccessors(){this.accessorManager.createAccessors(this)}createObjAccessors(e,t){for(let n in e)e[n]instanceof Object?this.createObjAccessors(e[n],`${t}.${n}`):this.accessorManager.addProp(`${t}.${n}`,e[n]);this.createAccessors()}callEvent(e,t){let n=this.events[e];return n&&typeof n==`function`?!!n(t):!1}addChild(e){this.children.push(e)}removeChild(e){let t=this.children.findIndex(t=>t.name===e);t!==-1&&(this.children.splice(t,1),this.childrenInstances.splice(t,1))}getChildInstance(e){let t=this.childrenInstances.find(t=>t.name===e);if(t)return t;throw new S(e,this.name)}addChildInstance(e){this.childrenInstances.push(e)}onCreated(){this.createAccessors(),this.componentId=t.Metadata.addInstance(this,this.allowDuplicate),this.parent&&this.parent.addChildInstance(this),this.callEvent(`onCreated`,{component:this})}onBeforeMount(){this.callEvent(`onBeforeMount`,{component:this})}onMounted(e){this.element=e,Object.keys(this.keyMap).length&&t.KeyMap.bind(this.keyMap,this,e),this.callEvent(`onMounted`,{element:e,component:this})}onBeforeDestroy(){Object.keys(this.keyMap).length&&t.KeyMap.unbind(this.keyMap,this),this.callEvent(`onBeforeDestroy`,{component:this})}onDestroyed(){t.Metadata.clearInstance(this.name,this.componentId),this.callEvent(`onDestroyed`,{component:this})}click(e,t){this.callEvent(`click`,{event:e||new MouseEvent(`click`),element:t||this.element,component:this})}focus(e,t){this.isFocused=!0,this.callEvent(`focus`,{event:e,element:t,component:this})}blur(e,t){this.isFocused=!1,this.callEvent(`blur`,{event:e,element:t,component:this})}mouseenter(e,t){this.callEvent(`mouseenter`,{event:e||new MouseEvent(`mouseenter`),element:t||this.element,component:this})}mouseleave(e,t){this.callEvent(`mouseleave`,{event:e||new MouseEvent(`mouseleave`),element:t||this.element,component:this})}mouseout(e,t){this.callEvent(`mouseout`,{event:e||new MouseEvent(`mouseout`),element:t||this.element,component:this})}mouseover(e,t){this.callEvent(`mouseover`,{event:e||new MouseEvent(`mouseover`),element:t||this.element,component:this})}},w=class extends C{bottom=!0;buttonsSlot=[];color=``;dismissColor=``;left=!0;multiLine=!1;right=!1;showDismiss=!1;timeout=5e3;text=``;top=!1;vertical=!1;id=0;defaultValues={name:this.name,color:this.color,text:this.text,timeout:this.timeout,top:this.top,right:this.right,bottom:this.bottom,left:this.left,vertical:this.vertical,multiLine:this.multiLine,showDismiss:this.showDismiss,dismissColor:this.dismissColor,buttonsSlot:this.buttonsSlot,id:this.id};constructor(e){super(e),this.assignAlertProperties(e)}assignAlertProperties(e){this.name=this.getInitValue(`name`,e.name,this.defaultValues.name),this.color=this.getInitValue(`color`,e.color,this.defaultValues.color),this.text=this.getInitValue(`text`,e.text,this.defaultValues.text),this.timeout=this.getInitValue(`timeout`,e.timeout,this.defaultValues.timeout),this.top=this.getInitValue(`top`,e.top,this.defaultValues.top),this.right=this.getInitValue(`right`,e.right,this.defaultValues.right),this.bottom=this.getInitValue(`bottom`,e.bottom,this.defaultValues.bottom),this.left=this.getInitValue(`left`,e.left,this.defaultValues.left),this.vertical=this.getInitValue(`vertical`,e.vertical,this.defaultValues.vertical),this.multiLine=this.getInitValue(`multiLine`,e.multiLine,this.defaultValues.multiLine),this.showDismiss=this.getInitValue(`showDismiss`,e.showDismiss,this.defaultValues.showDismiss),this.dismissColor=this.getInitValue(`dismissColor`,e.dismissColor,this.defaultValues.dismissColor),this.buttonsSlot=e.buttonsSlot||this.defaultValues.buttonsSlot,this.id=e.id||this.defaultValues.id,this.isVisible=!1,this.createAccessors()}show(){this.isVisible=!0}hide(){this.isVisible=!1}},T=class extends C{component;constructor(e){super(e),this.component=e.component}},E=class extends T{divider=`/`;items=[];iconName=``;large=!1;small=!1;constructor(e){super(e),this.divider=this.getInitValue(`divider`,e.divider,this.divider),this.items=this.getInitValue(`items`,e.items,this.items),this.large=this.getInitValue(`large`,e.large,this.large),this.iconName=this.getInitValue(`iconName`,e.iconName,this.iconName),this.small=this.getInitValue(`small`,e.small,this.small),this.createAccessors()}},D=class extends T{badge=0;showBadgeCounter=!0;constructor(e){super(e),this.badge=this.getInitValue(`badge`,e.badge,this.badge),this.showBadgeCounter=this.getInitValue(`showBadgeCounter`,e.showBadgeCounter,this.showBadgeCounter),this.createAccessors()}getBadgeText(){return this.badge?this.badge>=100?`99+`:this.badge.toString():`0`}},O=class extends T{absolute=!1;block=!1;bottom=!1;color=`primary`;disabled=!1;fab=!1;fixed=!1;flat=!1;href=``;icon=!1;iconName=``;label=``;large=!1;left=!1;outline=!1;reverse=!1;right=!1;round=!1;small=!1;target=`_self`;tile=!1;to=``;top=!1;type=`button`;width=``;active=void 0;appendIcon;border=!1;density=`default`;elevation;loading=!1;position;prependIcon;replace=!1;ripple=!0;selectedClass;size;stacked=!1;tag;variant;constructor(e){super(e),this.absolute=this.getInitValue(`absolute`,e.absolute,this.absolute),this.block=this.getInitValue(`block`,e.block,this.block),this.bottom=this.getInitValue(`bottom`,e.bottom,this.bottom),this.color=this.getInitValue(`color`,e.color,this.color),this.disabled=this.getInitValue(`disabled`,e.disabled,this.disabled),this.fab=this.getInitValue(`fab`,e.fab,this.fab),this.fixed=this.getInitValue(`fixed`,e.fixed,this.fixed),this.flat=this.getInitValue(`flat`,e.flat,this.flat),this.href=this.getInitValue(`href`,e.href,this.href),this.icon=this.getInitValue(`icon`,e.icon,this.icon),this.iconName=this.getInitValue(`iconName`,e.iconName,this.iconName),this.label=this.getInitValue(`label`,e.label,this.label),this.large=this.getInitValue(`large`,e.large,this.large),this.left=this.getInitValue(`left`,e.left,this.left),this.outline=this.getInitValue(`outline`,e.outline,this.outline),this.right=this.getInitValue(`right`,e.right,this.right),this.reverse=this.getInitValue(`reverse`,e.reverse,this.reverse),this.round=this.getInitValue(`round`,e.round,this.round),this.small=this.getInitValue(`small`,e.small,this.small),this.target=this.getInitValue(`target`,e.target,this.target),this.tile=this.getInitValue(`tile`,e.tile,this.tile),this.to=this.getInitValue(`to`,e.to,this.to),this.top=this.getInitValue(`top`,e.top,this.top),this.type=this.getInitValue(`type`,e.type,this.type),this.width=this.getInitValue(`width`,e.width,this.width),this.active=this.getInitValue(`active`,e.active,this.active),this.appendIcon=this.getInitValue(`appendIcon`,e.appendIcon,this.appendIcon),this.border=this.getInitValue(`border`,e.border,this.border),this.density=this.getInitValue(`density`,e.density,this.density),this.elevation=this.getInitValue(`elevation`,e.elevation,this.elevation),this.loading=this.getInitValue(`loading`,e.loading,this.loading),this.position=this.getInitValue(`position`,e.position,this.position),this.prependIcon=this.getInitValue(`prependIcon`,e.prependIcon,this.prependIcon),this.replace=this.getInitValue(`replace`,e.replace,this.replace),this.ripple=this.getInitValue(`ripple`,e.ripple,this.ripple),this.selectedClass=this.getInitValue(`selectedClass`,e.selectedClass,this.selectedClass),this.size=this.getInitValue(`size`,e.size,this.size),this.stacked=this.getInitValue(`stacked`,e.stacked,this.stacked),this.tag=this.getInitValue(`tag`,e.tag,this.tag),this.variant=this.getInitValue(`variant`,e.variant,this.variant)}},k=class e{static inputClasses={};static register(t,n){e.inputClasses[t]||(e.inputClasses[t]=n)}static factory(t){if(e.inputClasses[t.component])return new e.inputClasses[t.component](t)}},A=u(c(((e,t)=>{var n=`Expected a function`,r=NaN,i=`[object Symbol]`,a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt,u=typeof global==`object`&&global&&global.Object===Object&&global,d=typeof self==`object`&&self&&self.Object===Object&&self,f=u||d||Function(`return this`)(),p=Object.prototype.toString,m=Math.max,h=Math.min,g=function(){return f.Date.now()};function _(e,t,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError(n);t=x(t)||0,v(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?m(x(r.maxWait)||0,t):o,p=`trailing`in r?!!r.trailing:p);function _(t){var n=i,r=a;return i=a=void 0,u=t,s=e.apply(r,n),s}function y(e){return u=e,c=setTimeout(C,t),d?_(e):s}function b(e){var n=e-l,r=e-u,i=t-n;return f?h(i,o-r):i}function S(e){var n=e-l,r=e-u;return l===void 0||n>=t||n<0||f&&r>=o}function C(){var e=g();if(S(e))return w(e);c=setTimeout(C,b(e))}function w(e){return c=void 0,p&&i?_(e):(i=a=void 0,s)}function T(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function E(){return c===void 0?s:w(g())}function D(){var e=g(),n=S(e);if(i=arguments,a=this,l=e,n){if(c===void 0)return y(l);if(f)return c=setTimeout(C,t),_(l)}return c===void 0&&(c=setTimeout(C,t)),s}return D.cancel=T,D.flush=E,D}function v(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function y(e){return!!e&&typeof e==`object`}function b(e){return typeof e==`symbol`||y(e)&&p.call(e)==i}function x(e){if(typeof e==`number`)return e;if(b(e))return r;if(v(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=v(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(a,``);var n=s.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):o.test(e)?r:+e}t.exports=_}))(),1),j=class extends T{align;justify;height=`auto`;minHeight=`auto`;maxHeight=`none`;width=`100%`;minWidth=`auto`;maxWidth=`none`;viewValidate;submitFunction;viewResetValidation;inputs={};internalValue={};constructor(e){super(e),this.align=this.getInitValue(`align`,e.align,this.align),this.justify=this.getInitValue(`justify`,e.justify,this.justify),this.height=this.getInitValue(`height`,e.height,this.height),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.width=this.getInitValue(`width`,e.width,this.width),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.internalValue=this.getInitValue(`value`,e.value,this.value)}get value(){return this.internalValue}set value(e){Object.keys(e).forEach(t=>{this.inputs[t]?this.inputs[t].value=e[t]:this.internalValue[t]=e[t]})}clearForm(){Object.keys(this.value).forEach(e=>{this.value[e]=null})}registerInput(e){this.inputs[e.name]=e,e.value=this.value[e.name]||e.value,Object.defineProperty(this.value,e.name,{get:()=>e.value,set:t=>{e.value=t},enumerable:!0,configurable:!0})}get childrenProps(){return this.children.map(({grid:e,...t})=>t)}matchColumn=e=>!Number.isNaN(Number(e))||e===`auto`;breakpoints=[`lg`,`md`,`sm`,`xl`,`xxl`];matchBreakpoint=e=>this.breakpoints.includes(e);handleColClass(e){let t=e.replace(`zd-col-`,``).split(`-`),n=t[0],r=t[1];return this.matchColumn(n)?{key:`cols`,value:n}:this.matchBreakpoint(n)&&this.matchColumn(r)?{key:n,value:r}:null}handleOffsetClass(e){let t=e.replace(`zd-offset-`,``).split(`-`),n=t[0],r=t[1];return this.matchColumn(n)?{key:`offset`,value:n}:this.matchBreakpoint(n)&&this.matchColumn(r)?{key:`offset-${n}`,value:r}:null}parseGridClasses(e){let t=e.split(` `),n={};return t.forEach(e=>{if(e.startsWith(`zd-col-`)){let t=this.handleColClass(e);if(!t)return;let{key:r,value:i}=t;n[r]=i;return}if(e.startsWith(`zd-offset-`)){let t=this.handleOffsetClass(e);if(!t)return;let{key:r,value:i}=t;n[r]=i;return}}),n}getChildGrid(e){return e.grid&&Object.keys(e.grid).length>0?e.grid:e.cssClass?this.parseGridClasses(e.cssClass):{}}get childrenGrid(){let e={};return this.children.forEach(t=>{let n=this.getChildGrid(t);e[t.name]={cols:`3`,...n}}),e}validate(){return this.viewValidate?this.viewValidate():Promise.resolve({valid:Object.values(this.inputs).every(e=>e.isValid())})}setViewValidate(e){this.viewValidate=e}setViewResetValidation(e){this.viewResetValidation=e}callSubmitEvent(e,t){this.callEvent(`submit`,{event:e,element:t,component:this})}onMounted(e){super.onMounted(e),this.submitFunction=e.requestSubmit?.bind(e)}submit(){this.submitFunction&&this.submitFunction()}resetValidation(){if(this.viewResetValidation)return this.viewResetValidation();throw Error(`viewResetValidation method not assigned`)}},M=class extends T{align=`left`;alwaysShowError=!1;autofill=!0;clearable=!0;color=`primary`;dense=!0;disabled=!1;hint=``;label=``;mask=``;maxLength;persistentHint=!1;placeholder=``;readonly=!1;reverse=!1;rules=[];showBorder=!0;showHelper=!0;showLabel=!0;autoHintDetails=!1;storePath=``;validations={};viewValidate;viewResetValidation;parsedValidations={};formatterFn=t.FormatterParserProvider.getFormatter(`ZdInput`);parserFn=t.FormatterParserProvider.getParser(`ZdInput`);internalDisplayValue=``;internalValue=null;formParent=this.getFormParent();grid={};constructor(e){super(e),this.align=this.getInitValue(`align`,e.align,this.align),this.alwaysShowError=this.getInitValue(`alwaysShowError`,e.alwaysShowError,this.alwaysShowError),this.autofill=this.getInitValue(`autofill`,e.autofill,this.autofill),this.clearable=this.getInitValue(`clearable`,e.clearable,this.clearable),this.color=this.getInitValue(`color`,e.color,this.color),this.dense=this.getInitValue(`dense`,e.dense,this.dense),this.disabled=this.getInitValue(`disabled`,e.disabled,this.disabled),this.hint=this.getInitValue(`hint`,e.hint,this.hint),this.autoHintDetails=this.getInitValue(`autoHintDetails`,e.autoHintDetails,this.autoHintDetails),this.label=this.getInitValue(`label`,e.label,this.label),this.mask=this.getInitValue(`mask`,e.mask,this.mask),this.maxLength=this.getInitValue(`maxLength`,e.maxLength,this.maxLength),this.persistentHint=this.getInitValue(`persistentHint`,e.persistentHint,this.persistentHint),this.placeholder=this.getInitValue(`placeholder`,e.placeholder,this.placeholder),this.readonly=this.getInitValue(`readonly`,e.readonly,this.readonly),this.reverse=this.getInitValue(`reverse`,e.reverse,this.reverse),this.showBorder=this.getInitValue(`showBorder`,e.showBorder,this.showBorder),this.showHelper=this.getInitValue(`showHelper`,e.showHelper,this.showHelper),this.showLabel=this.getInitValue(`showLabel`,e.showLabel,this.showLabel),this.storePath=this.getInitValue(`storePath`,e.storePath,this.storePath),this.value=this.getInitValue(`value`,e.value,this.value),this.validations=this.getInitValue(`validations`,e.validations,this.validations),this.grid=this.getInitValue(`grid`,e.grid,this.grid),this.parseValidations(e.validations||{})}onCreated(){super.onCreated(),this.formParent&&this.formParent.registerInput(this)}validate(){return this.viewValidate?this.viewValidate():Promise.resolve([])}setViewValidate(e){this.viewValidate=e}setViewResetValidation(e){this.viewResetValidation=e}resetValidation(){if(this.viewResetValidation)return this.viewResetValidation();throw Error(`viewResetValidation method not assigned`)}parseValidations(e){Object.keys(e).forEach(t=>this.addValidation(t,e[t]))}addValidation(e,n){let r=t.Validation.get(e)(n);this.validations[e]=n,this.parsedValidations[e]=r,this.updateRules()}removeValidation(e){delete this.parsedValidations[e],delete this.validations[e],this.updateRules()}clearValidations(){this.parsedValidations={},this.validations={},this.rules=[]}updateRules(){this.rules=Object.values(this.parsedValidations).map(e=>t=>e(t===void 0?this.value:t))}get value(){return this.internalValue}set value(e){this.internalValue!==e&&(this.internalDisplayValue=this.formatter(e),this.internalValue=e)}get displayValue(){return this.internalDisplayValue}set displayValue(e){if(this.internalDisplayValue!==e){let n=this.parser(e);if(this.value=n,!this.mask){this.internalDisplayValue=e;return}let{mask:r}=this;typeof r==`function`&&(r=r(n)),this.internalDisplayValue=t.Mask.convertAll(r,e),this.internalValue=this.parser(this.internalDisplayValue)}}formatter(e){return this.formatterFn(e)}parser(e){return this.parserFn(e)}isValid(e){return this.rules.every(t=>typeof t(e===void 0?this.value:e)!=`string`)}lastChangeValue=void 0;change(e,t){this.value===``&&(this.value=null),this.value!==this.lastChangeValue&&(this.lastChangeValue=this.value,this.callEvent(`change`,{event:e,element:t,component:this}))}lastInputValue=void 0;callInputEvent=(0,A.default)(({event:e,element:t,component:n})=>{this.callEvent(`input`,{event:e,element:t,component:n})},50);input(e,t){this.value!==this.lastInputValue&&(this.lastInputValue=this.value,this.callInputEvent({event:e,element:t,component:this}))}keyup(e,t){this.callEvent(`keyup`,{event:e,element:t,component:this})}keydown(e,t){this.callEvent(`keydown`,{event:e,element:t,component:this}),e?.defaultPrevented||this.callEvent(`afterKeydown`,{event:e,element:t,component:this})}getFormParent(){let{parent:e}=this;for(;e&&!(e instanceof j);)e=e.parent;return e}};t.FormatterParserProvider.registerFormatter(`ZdInput`,e=>e),t.FormatterParserProvider.registerParser(`ZdInput`,e=>e);let N={valueWithPrefix:!1,prefix:``,valueWithSuffix:!1,suffix:``,mask:``};var P=class extends M{appendIcon=``;appendOuterIcon=``;prefix=N.prefix;prependIcon=``;prependOuterIcon=``;suffix=N.suffix;type=``;valueWithPrefix=N.valueWithPrefix;valueWithSuffix=N.valueWithSuffix;inputMode;formatterFn=t.FormatterParserProvider.getFormatter(`ZdTextInput`);parserFn=t.FormatterParserProvider.getParser(`ZdTextInput`);constructor(e){super(e),this.appendIcon=this.getInitValue(`appendIcon`,e.appendIcon,this.appendIcon),this.appendOuterIcon=this.getInitValue(`appendOuterIcon`,e.appendOuterIcon,this.appendOuterIcon),this.prefix=this.getInitValue(`prefix`,e.prefix,this.prefix),this.prependIcon=this.getInitValue(`prependIcon`,e.prependIcon,this.prependIcon),this.prependOuterIcon=this.getInitValue(`prependOuterIcon`,e.prependOuterIcon,this.prependOuterIcon),this.suffix=this.getInitValue(`suffix`,e.suffix,this.suffix),this.type=e.type||this.type,this.valueWithPrefix=this.getInitValue(`valueWithPrefix`,e.valueWithPrefix,this.valueWithPrefix),this.valueWithSuffix=this.getInitValue(`valueWithSuffix`,e.valueWithSuffix,this.valueWithSuffix),this.inputMode=this.getInitValue(`inputMode`,e.inputMode,this.inputMode)}onCreated(){super.onCreated(),this.addKeyMap()}addKeyMap(){this.keyMap={...this.keyMap,"ctrl+space":{event:this.callSingleIconEvent.bind(this),stop:!0,active:!0,input:!0}}}callSingleIconEvent({event:e,element:t}){let n=[`prependIcon`,`prependOuterIcon`,`appendIcon`,`appendOuterIcon`].filter(e=>!!this[e]);n.length===1&&this.callEvent(`${n[0]}Click`,{event:e,element:t,component:this})}formatter(e){return this.formatterFn(e,this)}parser(e){return this.parserFn(e,this)}appendIconClick(e,t){this.callEvent(`appendIconClick`,{event:e,element:t,component:this})}appendOuterIconClick(e,t){this.callEvent(`appendOuterIconClick`,{event:e,element:t,component:this})}prependIconClick(e,t){this.callEvent(`prependIconClick`,{event:e,element:t,component:this})}prependOuterIconClick(e,t){this.callEvent(`prependOuterIconClick`,{event:e,element:t,component:this})}getMask(){return this.mask}};t.FormatterParserProvider.registerFormatter(`ZdTextInput`,(e,{valueWithPrefix:n=N.valueWithPrefix,prefix:r=N.prefix,valueWithSuffix:i=N.valueWithSuffix,suffix:a=N.suffix,mask:o=N.mask}={})=>{let s=e;if(s){s=n?s.substring(r.length):s,s=i?s.slice(0,-a.length):s;let e=o;if(t.Accessor.isAccessorDefinition(e)){let[n,r]=t.Accessor.getAccessor(e);e=t.Loader.getInstance(n)[r]}let c=typeof e==`function`?e(t.Mask.getValueWithoutMask(s)):e;s=c?t.Mask.getValueWithMask(t.Mask.getValueWithoutMask(s),c):s}return s}),t.FormatterParserProvider.registerParser(`ZdTextInput`,(e,{valueWithPrefix:n=N.valueWithPrefix,prefix:r=N.prefix,valueWithSuffix:i=N.valueWithSuffix,suffix:a=N.suffix,mask:o=N.mask}={})=>{let s=e;if(s){let e=n?r:``,c=i?a:``;s=o?t.Mask.getValueWithoutMask(s):s,s=e+s+c}return s}),k.register(`ZdTextInput`,P);function F(e,n,r){if(!r)return!0;if(r.length===0)return!1;let i=(0,t.dayjs)(e).format(n);return r instanceof Function?r(i):r.indexOf(i)!==-1}function I(e){return e.replace(/[A-Za-z]/gi,`#`)}function L(e,t){return t?I(e):``}function ee(e,n,r){return(0,t.dayjs)(e,n,!0).isValid()?{valid:!0,newValue:(0,t.dayjs)(e,n).format(r)}:{valid:!1,newValue:null}}var R=class extends P{allowedDates=void 0;viewMode=`month`;autocomplete=!1;dateFormat=t.Config.dateFormat;displayFormat=t.Config.displayFormat;inputFormat=t.Config.dateInputFormat;showDatePicker=!1;firstDayOfWeek=0;fullWidth=!1;showWeek=!1;helperOptions=[];helperValue=``;max=``;min=``;width=248;isoFormat=`YYYY-MM-DD`;dateError=!1;formatterFn=t.FormatterParserProvider.getFormatter(`ZdDateInput`);parserFn=t.FormatterParserProvider.getParser(`ZdDateInput`);inputMode=`none`;constructor(e){super(e),this.allowedDates=this.getInitValue(`allowedDates`,e.allowedDates,this.allowedDates),this.appendIcon=this.getInitValue(`appendIcon`,e.appendIcon,`calendar`),this.autocomplete=this.getInitValue(`autocomplete`,e.autocomplete,this.autocomplete),this.dateFormat=this.getInitValue(`dateFormat`,e.dateFormat,this.dateFormat),this.displayFormat=this.getInitValue(`displayFormat`,e.displayFormat,this.displayFormat),this.inputFormat=this.getInitValue(`inputFormat`,e.inputFormat,this.inputFormat),this.firstDayOfWeek=this.getInitValue(`firstDayOfWeek`,e.firstDayOfWeek,this.firstDayOfWeek),this.fullWidth=this.getInitValue(`fullWidth`,e.fullWidth,this.fullWidth),this.showDatePicker=this.getInitValue(`showDatePicker`,e.showDatePicker,this.showDatePicker),this.showWeek=this.getInitValue(`showWeek`,e.showWeek,this.showWeek),this.helperOptions=this.getInitValue(`helperOptions`,e.helperOptions,this.helperOptions),this.helperValue=this.getInitValue(`helperValue`,e.helperValue,this.helperValue),this.min=this.getInitValue(`min`,e.min,this.min),this.max=this.getInitValue(`max`,e.max,this.max),this.viewMode=this.getInitValue(`viewMode`,e.viewMode,this.viewMode),this.width=this.getInitValue(`width`,e.width,this.width),this.mask=this.getInitValue(`mask`,e.mask,void 0),this.dateValidation=this.dateValidation.bind(this),this.rules.push(this.dateValidation)}appendIconClick(e,t){this.iconClick(e,t),super.appendIconClick(e,t)}formatter(e){return this.formatterFn(e,this)}parser(e){return this.parserFn(e,this)}selectDate(e,t,n){this.callEvent(`onSelectDate`,{date:e,event:t,element:n,component:this})}get value(){return this.internalValue}set value(e){if(this.internalValue!==e){if(this.internalDisplayValue=this.formatter(e),this.internalValue=e,!e){this.dateObject=null;return}this.isValidFormatDate(e,this.dateFormat)?this.dateObject=(0,t.dayjs)(e,this.dateFormat):this.dateObject=null}}get displayValue(){return this.internalDisplayValue}set displayValue(e){this.dateError=!1,this.internalDisplayValue=e,this.value=this.parser(e)}setDateValue(e){this.isValidDate(e,this.displayFormat)?this.setValidDateValue(e):this.setInvalidDateValue(e)}setValidDateValue(e){let t=this.displayValue;this.internalDisplayValue=e,this.internalValue=this.parser(e),this.dateError=!1,t!==this.displayValue&&this.change()}setInvalidDateValue(e){let t=this.displayValue;e||(this.internalDisplayValue=e,this.internalValue=null,t!==this.displayValue&&this.change()),this.dateError=!!e}isValidDate(e,n,r=!0){let i=(0,t.dayjs)(e,n,r);if(!i.isValid())return!1;let a=this.min?(0,t.dayjs)(this.min,this.dateFormat):null;if(!(!a||i.isAfter(a)||i.isSame(a)))return!1;let o=this.max?(0,t.dayjs)(this.max,this.dateFormat):null;return!o||i.isBefore(o)||i.isSame(o)?this.getAllowedDates((0,t.dayjs)(e,n).toDate()):!1}isValidFormatDate(e,n,r=!0){return(0,t.dayjs)(e,n,r).isValid()}dateObject=null;getNativeDate(){return this.dateObject?.toDate()||null}setNativeDate(e){this.dateError=!1,this.dateObject=(0,t.dayjs)(e),this.value=this.dateObject.format(this.dateFormat)}getAllowedDates(e){return F(e,this.dateFormat,this.allowedDates)}formatISODateValue(e){return e&&this.isValidFormatDate(e,this.dateFormat)?(0,t.dayjs)(e,this.dateFormat).format(this.isoFormat):``}parseISODateValue(e){return e&&this.isValidFormatDate(e,this.isoFormat)?(0,t.dayjs)(e,this.isoFormat).format(this.dateFormat):null}dateValidation(){return!this.dateError||t.I18n.translate(`VALIDATION_INVALID_DATE`)}click(e,t){let n=e||new MouseEvent(`click`);super.click(n,t),n.defaultPrevented||this.togglePicker()}blur(e,n){super.blur(e,n),this.setDateValue(this.formatter(this.value)),t.Utils.isMobile()||(this.showDatePicker=!1)}onMounted(e){super.onMounted(e),this.value&&this.setDateValue(this.formatter(this.value))}focus(e,n){if(super.focus(e,n),!this.inputFormat||!this.value)return;let r=(0,t.dayjs)(this.value,this.dateFormat,!0);r.isValid()&&(this.internalDisplayValue=r.format(this.inputFormat))}togglePicker(){this.showDatePicker=!this.showDatePicker}iconClick(e,t){super.click(e,t),e.defaultPrevented||this.togglePicker()}previousHint=``;previousPersistentHint=!1;updateHelperHint(){this.helperValue&&(this.previousHint=this.hint,this.previousPersistentHint=this.persistentHint,this.hint=t.DateHelper.getLabel(this.helperValue),this.persistentHint=!0)}change(e,t){super.change(e,t),this.helperValue=``,this.hint=this.previousHint,this.persistentHint=this.previousPersistentHint}getMask(){return L(this.inputFormat||this.displayFormat||``,this.isFocused)}};t.FormatterParserProvider.registerFormatter(`ZdDateInput`,(e,{dateFormat:n=t.Config.dateFormat,displayFormat:r=t.Config.displayFormat,inputFormat:i=t.Config.dateInputFormat,isFocused:a=!1}={})=>e?(0,t.dayjs)(e,n,!0).isValid()?!L(i||r,a)||!a||!i?(0,t.dayjs)(e,n).format(r):(0,t.dayjs)(e,n).format(i):e:``),t.FormatterParserProvider.registerParser(`ZdDateInput`,(e,{dateFormat:n=t.Config.dateFormat,displayFormat:r=t.Config.displayFormat,inputFormat:i=t.Config.dateInputFormat,isFocused:a=!1}={})=>{if(!e)return null;let o=L(i||r,a);if(!t.Mask.checkMask(e,o))return e;if(i&&a){let{valid:t,newValue:r}=ee(e,i,n);return t?r:e}let{valid:s,newValue:c}=ee(e,r,n);return s?c:e}),t.FormatterParserProvider.registerFormatter(`ZdDateTime`,(e,{dateTimeFormat:n=t.Config.dateTimeFormat,displayFormat:r=t.Config.displayDateTimeFormat}={})=>e?(0,t.dayjs)(e,n,!0).isValid()?(0,t.dayjs)(e,n).format(r):e:``),t.FormatterParserProvider.registerParser(`ZdDateTime`,(e,{dateTimeFormat:n=t.Config.dateTimeFormat,displayFormat:r=t.Config.displayDateTimeFormat}={})=>e?(0,t.dayjs)(e,r,!0).isValid()?(0,t.dayjs)(e,r).format(n):e:null),k.register(`ZdDateInput`,R);var te=class extends T{inset=!1;vertical=!1;constructor(e){super(e),this.dark=this.getInitValue(`dark`,e.dark,this.dark),this.inset=this.getInitValue(`inset`,e.inset,this.inset),this.light=this.getInitValue(`light`,e.light,this.light),this.vertical=this.getInitValue(`vertical`,e.vertical,this.vertical),this.createAccessors()}},z=class extends T{scrollable=!1;tag=`main`;constructor(e){super(e),this.scrollable=this.getInitValue(`scrollable`,e.scrollable,this.scrollable),this.tag=this.getInitValue(`tag`,e.tag,this.tag)}},B=u(c(((e,t)=>{var n=200,r=`__lodash_hash_undefined__`,i=800,a=16,o=9007199254740991,s=`[object Arguments]`,c=`[object Array]`,l=`[object AsyncFunction]`,u=`[object Boolean]`,d=`[object Date]`,f=`[object Error]`,p=`[object Function]`,m=`[object GeneratorFunction]`,h=`[object Map]`,g=`[object Number]`,_=`[object Null]`,v=`[object Object]`,y=`[object Proxy]`,b=`[object RegExp]`,x=`[object Set]`,S=`[object String]`,C=`[object Undefined]`,w=`[object WeakMap]`,T=`[object ArrayBuffer]`,E=`[object DataView]`,D=`[object Float32Array]`,O=`[object Float64Array]`,k=`[object Int8Array]`,A=`[object Int16Array]`,j=`[object Int32Array]`,M=`[object Uint8Array]`,N=`[object Uint8ClampedArray]`,P=`[object Uint16Array]`,F=`[object Uint32Array]`,I=/[\\^$.*+?()[\]{}|]/g,L=/^\[object .+?Constructor\]$/,ee=/^(?:0|[1-9]\d*)$/,R={};R[D]=R[O]=R[k]=R[A]=R[j]=R[M]=R[N]=R[P]=R[F]=!0,R[s]=R[c]=R[T]=R[u]=R[E]=R[d]=R[f]=R[p]=R[h]=R[g]=R[v]=R[b]=R[x]=R[S]=R[w]=!1;var te=typeof global==`object`&&global&&global.Object===Object&&global,z=typeof self==`object`&&self&&self.Object===Object&&self,B=te||z||Function(`return this`)(),V=typeof e==`object`&&e&&!e.nodeType&&e,H=V&&typeof t==`object`&&t&&!t.nodeType&&t,ne=H&&H.exports===V,U=ne&&te.process,W=function(){try{return H&&H.require&&H.require(`util`).types||U&&U.binding&&U.binding(`util`)}catch{}}(),re=W&&W.isTypedArray;function ie(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ae(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function oe(e){return function(t){return e(t)}}function se(e,t){return e?.[t]}function ce(e,t){return function(n){return e(t(n))}}var le=Array.prototype,ue=Function.prototype,G=Object.prototype,de=B[`__core-js_shared__`],K=ue.toString,q=G.hasOwnProperty,J=function(){var e=/[^.]+$/.exec(de&&de.keys&&de.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),fe=G.toString,pe=K.call(Object),me=RegExp(`^`+K.call(q).replace(I,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),he=ne?B.Buffer:void 0,ge=B.Symbol,_e=B.Uint8Array,ve=he?he.allocUnsafe:void 0,ye=ce(Object.getPrototypeOf,Object),be=Object.create,xe=G.propertyIsEnumerable,Se=le.splice,Y=ge?ge.toStringTag:void 0,Ce=function(){try{var e=yt(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),we=he?he.isBuffer:void 0,Te=Math.max,Ee=Date.now,De=yt(B,`Map`),X=yt(Object,`create`),Oe=function(){function e(){}return function(t){if(!Ht(t))return{};if(be)return be(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ke(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ae(){this.__data__=X?X(null):{},this.size=0}function je(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Me(e){var t=this.__data__;if(X){var n=t[e];return n===r?void 0:n}return q.call(t,e)?t[e]:void 0}function Ne(e){var t=this.__data__;return X?t[e]!==void 0:q.call(t,e)}function Pe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=X&&t===void 0?r:t,this}ke.prototype.clear=Ae,ke.prototype.delete=je,ke.prototype.get=Me,ke.prototype.has=Ne,ke.prototype.set=Pe;function Z(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fe(){this.__data__=[],this.size=0}function Ie(e){var t=this.__data__,n=$e(t,e);return n<0?!1:(n==t.length-1?t.pop():Se.call(t,n,1),--this.size,!0)}function Le(e){var t=this.__data__,n=$e(t,e);return n<0?void 0:t[n][1]}function Re(e){return $e(this.__data__,e)>-1}function ze(e,t){var n=this.__data__,r=$e(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}Z.prototype.clear=Fe,Z.prototype.delete=Ie,Z.prototype.get=Le,Z.prototype.has=Re,Z.prototype.set=ze;function Q(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Be(){this.size=0,this.__data__={hash:new ke,map:new(De||Z),string:new ke}}function Ve(e){var t=vt(this,e).delete(e);return this.size-=t?1:0,t}function He(e){return vt(this,e).get(e)}function Ue(e){return vt(this,e).has(e)}function We(e,t){var n=vt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}Q.prototype.clear=Be,Q.prototype.delete=Ve,Q.prototype.get=He,Q.prototype.has=Ue,Q.prototype.set=We;function $(e){this.size=(this.__data__=new Z(e)).size}function Ge(){this.__data__=new Z,this.size=0}function Ke(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function qe(e){return this.__data__.get(e)}function Je(e){return this.__data__.has(e)}function Ye(e,t){var r=this.__data__;if(r instanceof Z){var i=r.__data__;if(!De||i.length<n-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Q(i)}return r.set(e,t),this.size=r.size,this}$.prototype.clear=Ge,$.prototype.delete=Ke,$.prototype.get=qe,$.prototype.has=Je,$.prototype.set=Ye;function Xe(e,t){var n=It(e),r=!n&&Ft(e),i=!n&&!r&&zt(e),a=!n&&!r&&!i&&Gt(e),o=n||r||i||a,s=o?ae(e.length,String):[],c=s.length;for(var l in e)(t||q.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||St(l,c)))&&s.push(l);return s}function Ze(e,t,n){(n!==void 0&&!Pt(e[t],n)||n===void 0&&!(t in e))&&et(e,t,n)}function Qe(e,t,n){var r=e[t];(!(q.call(e,t)&&Pt(r,n))||n===void 0&&!(t in e))&&et(e,t,n)}function $e(e,t){for(var n=e.length;n--;)if(Pt(e[n][0],t))return n;return-1}function et(e,t,n){t==`__proto__`&&Ce?Ce(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var tt=_t();function nt(e){return e==null?e===void 0?C:_:Y&&Y in Object(e)?bt(e):Ot(e)}function rt(e){return Ut(e)&&nt(e)==s}function it(e){return!Ht(e)||Tt(e)?!1:(Bt(e)?me:L).test(Nt(e))}function at(e){return Ut(e)&&Vt(e.length)&&!!R[nt(e)]}function ot(e){if(!Ht(e))return Dt(e);var t=Et(e),n=[];for(var r in e)r==`constructor`&&(t||!q.call(e,r))||n.push(r);return n}function st(e,t,n,r,i){e!==t&&tt(t,function(a,o){if(i||=new $,Ht(a))ct(e,t,o,n,st,r,i);else{var s=r?r(At(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),Ze(e,o,s)}},qt)}function ct(e,t,n,r,i,a,o){var s=At(e,n),c=At(t,n),l=o.get(c);if(l){Ze(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=It(c),p=!f&&zt(c),m=!f&&!p&&Gt(c);u=c,f||p||m?It(s)?u=s:Rt(s)?u=mt(s):p?(d=!1,u=dt(c,!0)):m?(d=!1,u=pt(c,!0)):u=[]:Wt(c)||Ft(c)?(u=s,Ft(s)?u=Kt(s):(!Ht(s)||Bt(s))&&(u=xt(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),Ze(e,n,u)}function lt(e,t){return jt(kt(e,t,Xt),e+``)}var ut=Ce?function(e,t){return Ce(e,`toString`,{configurable:!0,enumerable:!1,value:Yt(t),writable:!0})}:Xt;function dt(e,t){if(t)return e.slice();var n=e.length,r=ve?ve(n):new e.constructor(n);return e.copy(r),r}function ft(e){var t=new e.constructor(e.byteLength);return new _e(t).set(new _e(e)),t}function pt(e,t){var n=t?ft(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function mt(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}function ht(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?et(n,s,c):Qe(n,s,c)}return n}function gt(e){return lt(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&Ct(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}function _t(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}function vt(e,t){var n=e.__data__;return wt(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function yt(e,t){var n=se(e,t);return it(n)?n:void 0}function bt(e){var t=q.call(e,Y),n=e[Y];try{e[Y]=void 0;var r=!0}catch{}var i=fe.call(e);return r&&(t?e[Y]=n:delete e[Y]),i}function xt(e){return typeof e.constructor==`function`&&!Et(e)?Oe(ye(e)):{}}function St(e,t){var n=typeof e;return t??=o,!!t&&(n==`number`||n!=`symbol`&&ee.test(e))&&e>-1&&e%1==0&&e<t}function Ct(e,t,n){if(!Ht(n))return!1;var r=typeof t;return(r==`number`?Lt(n)&&St(t,n.length):r==`string`&&t in n)?Pt(n[t],e):!1}function wt(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Tt(e){return!!J&&J in e}function Et(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||G)}function Dt(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}function Ot(e){return fe.call(e)}function kt(e,t,n){return t=Te(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Te(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),ie(e,this,s)}}function At(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}var jt=Mt(ut);function Mt(e){var t=0,n=0;return function(){var r=Ee(),o=a-(r-n);if(n=r,o>0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Nt(e){if(e!=null){try{return K.call(e)}catch{}try{return e+``}catch{}}return``}function Pt(e,t){return e===t||e!==e&&t!==t}var Ft=rt(function(){return arguments}())?rt:function(e){return Ut(e)&&q.call(e,`callee`)&&!xe.call(e,`callee`)},It=Array.isArray;function Lt(e){return e!=null&&Vt(e.length)&&!Bt(e)}function Rt(e){return Ut(e)&&Lt(e)}var zt=we||Zt;function Bt(e){if(!Ht(e))return!1;var t=nt(e);return t==p||t==m||t==l||t==y}function Vt(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=o}function Ht(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function Ut(e){return typeof e==`object`&&!!e}function Wt(e){if(!Ut(e)||nt(e)!=v)return!1;var t=ye(e);if(t===null)return!0;var n=q.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&K.call(n)==pe}var Gt=re?oe(re):at;function Kt(e){return ht(e,qt(e))}function qt(e){return Lt(e)?Xe(e,!0):ot(e)}var Jt=gt(function(e,t,n){st(e,t,n)});function Yt(e){return function(){return e}}function Xt(e){return e}function Zt(){return!1}t.exports=Jt}))(),1),V=class e extends T{loading=!1;local=!1;metadata={};override={};params={};overrideNamedProps={};path=``;cache=!1;JSONCache=!1;cacheDuration=72e5;height=`auto`;minHeight=`auto`;maxHeight=`none`;width=`100%`;minWidth=`auto`;maxWidth=`none`;type=`get`;headerName=`sw-fetched-on`;static cacheName=`zd-frame-cache`;resolveLoad;rejectLoad;constructor(e){super(e),this.path=this.getInitValue(`path`,e.path,this.path),this.local=e.local===!0,this.override=e.override||this.override,this.overrideNamedProps=e.overrideNamedProps||this.overrideNamedProps,this.cache=e.cache||this.cache,this.JSONCache=this.getInitValue(`JSONCache`,e.JSONCache,this.JSONCache),this.cacheDuration=this.getInitValue(`cacheDuration`,e.cacheDuration,this.cacheDuration),this.height=this.getInitValue(`height`,e.height,this.height),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.width=this.getInitValue(`width`,e.width,this.width),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.type=this.getInitValue(`type`,e.type,this.type),this.params=this.getInitValue(`params`,e.params,this.params)}onCreated(){super.onCreated(),this.getMetadata()}overrideNamedPropsFunc(e){let t=JSON.stringify(e);return Object.keys(this.overrideNamedProps).forEach(e=>{t=t.replace(RegExp(`<<${e}>>`,`g`),this.overrideNamedProps[e])}),JSON.parse(t)}async reload(){this.loading=!0,this.getMetadata()}afterLoad(e,t){this.resolveLoad&&this.resolveLoad(this.metadata),this.callEvent(`onAfterLoad`,{event:e,element:t,component:this})}static async deleteCache(){return caches.delete(e.cacheName)}async waitLoading(){return new Promise((e,t)=>{if(!this.loading){e(this.metadata);return}this.resolveLoad=e,this.rejectLoad=t})}notFoundError(e){this.rejectLoad&&this.rejectLoad(e)}async getMetadata(){try{this.loading=!0;let e=await this.requestPage();if(typeof e!=`object`)throw Error();this.metadata=(0,B.default)(e,this.override),Object.keys(this.overrideNamedProps).length!==0&&(this.metadata=this.overrideNamedPropsFunc(this.metadata))}catch(e){this.notFoundError(e)}finally{this.loading=!1,this.afterLoad()}}async requestPage(){let{path:n}=this;if(!this.cache)return this.type===`post`?t.Metadata.post(n,this.params):t.Metadata.get(n,this.local,this.JSONCache);let r=t.Metadata.getMetadataUrl(n,this.local),i=await caches.open(e.cacheName),a=await i.match(r);if(this.isValid(a))return a.json();let o=await t.Metadata.get(n,this.local);return this.putCache(i,r,o),o}isValid(e){if(!e)return!1;let t=e.headers.get(this.headerName);return t?Number(t)+this.cacheDuration>Date.now():!1}putCache(e,t,n){let r=String(Date.now()),i=new Headers({[this.headerName]:r}),a=JSON.stringify(n),o=new Response(a,{headers:i});e.put(t,o)}},H=class extends V{notFoundRoute=`/notfound`;constructor(e){super(e),this.notFoundRoute=this.getInitValue(`notFoundRoute`,e.notFoundRoute,this.notFoundRoute)}onBeforeDestroy(){super.onBeforeDestroy(),t.Loader.clearInstances()}notFoundError(e){super.notFoundError(e),t.Router.replace(this.notFoundRoute)}},ne=class extends T{alt=``;errorImagePath=``;errorImageText=``;objectFit=``;height=`auto`;minHeight=`auto`;maxHeight=`none`;width=`auto`;minWidth=`auto`;maxWidth=`none`;srcValue=``;validImage=void 0;constructor(e){super(e),this.src=this.getInitValue(`src`,e.src,this.srcValue),this.alt=this.getInitValue(`alt`,e.alt,this.alt),this.errorImagePath=this.getInitValue(`errorImagePath`,e.errorImagePath,this.errorImagePath),this.errorImageText=this.getInitValue(`errorImageText`,e.errorImageText,this.errorImageText),this.height=this.getInitValue(`height`,e.height,this.height),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.width=this.getInitValue(`width`,e.width,this.width),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.objectFit=this.getInitValue(`objectFit`,e.objectFit,this.objectFit)}loadImage(){this.validImage=!0}errorImage(){this.validImage=!1}get src(){return this.srcValue}set src(e){this.validImage=!0,this.srcValue=e}},U=class extends Error{constructor(e){super(`[Zeedhi Common err]: ${e}`)}},W=class extends U{constructor(e){super(`Class ${e} was used before initialization. Call initialize() first.`),this.name=`NonInitializedError`}},re=class extends C{align=`left`;label=``;width;maxWidth;minWidth;mask=``;type;actionFixed=!1;fixed=!1;sortable=!0;loading=!1;componentProps={};style={};xlsType=``;lookupDatasource;lookupData={};lookupDataCount=0;dataToLookup;overflow=`ellipsis`;conditions={};viewGetWidth;helperText=``;defaultData=[];lookup=()=>{throw new W(this.constructor.name)};storeData=!0;constructor(e){super(e),this.align=this.getInitValue(`align`,e.align,this.align),this.label=this.getInitValue(`label`,e.label,this.label),this.width=this.getInitValue(`width`,e.width,this.width),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.mask=this.getInitValue(`mask`,e.mask,this.mask),this.overflow=this.getInitValue(`overflow`,e.overflow,this.overflow),this.type=this.getInitValue(`type`,e.type,this.type),this.actionFixed=this.getInitValue(`actionFixed`,e.actionFixed,this.actionFixed),this.fixed=this.getInitValue(`fixed`,e.fixed,this.fixed),this.sortable=this.getInitValue(`sortable`,e.sortable,this.sortable),this.loading=this.getInitValue(`loading`,e.loading,this.loading),this.style=this.getInitValue(`style`,e.style,this.style),this.componentProps=this.getInitValue(`componentProps`,e.componentProps,this.componentProps),this.xlsType=this.getInitValue(`xlsType`,e.xlsType,this.xlsType),this.conditions=this.getInitValue(`conditions`,e.conditions,this.conditions),this.helperText=this.getInitValue(`helperText`,e.helperText,this.helperText),this.storeData=this.getInitValue(`storeData`,e.storeData,this.storeData),this.componentProps.datasource&&(this.lookupDatasource=t.DatasourceFactory.factory({...this.componentProps.datasource,lazyLoad:!0,loadAll:!0}),this.lookupDatasource?.initialize(),this.defaultData=this.lookupDatasource?.data||this.defaultData),this.createAccessors()}setViewGetWidth(e){this.viewGetWidth=e}setLookupDataFilter(e){this.lookupDatasource?.setFilter(e)}getWidth(){if(this.viewGetWidth)return this.viewGetWidth();throw new t.MethodNotAssignedError(`viewGetWidth`)}formatterByRow(e,n){let r=e[this.name],i=t.FormatterParserProvider.getFormatter(`column_${this.componentProps.component}`);return i?i({column:this,value:r,row:e,componentProps:{...this.componentProps,...n}}):this.formatter(r,n)}formatter(e,n){let r=t.FormatterParserProvider.getFormatter(this.componentProps.component);return r?r(e,{...this.componentProps,...n}):e&&t.Mask.getValueWithMask(e,this.mask)}getLookupData(e,t){let n={};if(this.lookupData[t])return this.lookupData[t];this.lookupData[t]=n;let r=this.lookupDatasource?.data.findIndex(n=>n[e]===t)||0;return r===-1?(this.lookupDatasource?.data.every(t=>Reflect.has(t,e))?(this.dataToLookup=this.dataToLookup||[],this.dataToLookup.push(t),this.lookup(e)):console.warn(`Row datasource do not have a key: ${e}`),n):(this.lookupData[t]=this.lookupDatasource?.data[r],this.lookupData[t])}initialize(){this.lookup=(0,A.default)(this.lookupFn,100)}async lookupFn(e,t){let n=[];if(this.loading=!0,this.storeData)n=await this.lookupDatasource.get();else{let r=Array.from(new Set(t||this.dataToLookup));t||(this.dataToLookup=[]),n=await this.lookupDatasource.addFilter(e,r)}let r={};n.forEach(t=>{r[t[e]]=t}),this.lookupData={...this.lookupData,...r},this.lookupDataCount+=1,this.loading=!1}clearLookupData(){this.lookupData={},this.componentProps.datasource&&(this.componentProps.datasource.data=this.defaultData)}onBeforeDestroy(){super.onBeforeDestroy(),this.lookupDatasource?.destroy()}},ie=class extends Error{constructor(e,t){super(`Column ${e} not found on parent ${t}`)}},ae=c(((e,t)=>{var n=200,r=`__lodash_hash_undefined__`,i=9007199254740991,a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object GeneratorFunction]`,f=`[object Map]`,p=`[object Number]`,m=`[object Object]`,h=`[object Promise]`,g=`[object RegExp]`,_=`[object Set]`,v=`[object String]`,y=`[object Symbol]`,b=`[object WeakMap]`,x=`[object ArrayBuffer]`,S=`[object DataView]`,C=`[object Float32Array]`,w=`[object Float64Array]`,T=`[object Int8Array]`,E=`[object Int16Array]`,D=`[object Int32Array]`,O=`[object Uint8Array]`,k=`[object Uint8ClampedArray]`,A=`[object Uint16Array]`,j=`[object Uint32Array]`,M=/[\\^$.*+?()[\]{}|]/g,N=/\w*$/,P=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,I={};I[a]=I[o]=I[x]=I[S]=I[s]=I[c]=I[C]=I[w]=I[T]=I[E]=I[D]=I[f]=I[p]=I[m]=I[g]=I[_]=I[v]=I[y]=I[O]=I[k]=I[A]=I[j]=!0,I[l]=I[u]=I[b]=!1;var L=typeof global==`object`&&global&&global.Object===Object&&global,ee=typeof self==`object`&&self&&self.Object===Object&&self,R=L||ee||Function(`return this`)(),te=typeof e==`object`&&e&&!e.nodeType&&e,z=te&&typeof t==`object`&&t&&!t.nodeType&&t,B=z&&z.exports===te;function V(e,t){return e.set(t[0],t[1]),e}function H(e,t){return e.add(t),e}function ne(e,t){for(var n=-1,r=e?e.length:0;++n<r&&t(e[n],n,e)!==!1;);return e}function U(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function W(e,t,n,r){var i=-1,a=e?e.length:0;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function re(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function ie(e,t){return e?.[t]}function ae(e){var t=!1;if(e!=null&&typeof e.toString!=`function`)try{t=!!(e+``)}catch{}return t}function oe(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function se(e,t){return function(n){return e(t(n))}}function ce(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var le=Array.prototype,ue=Function.prototype,G=Object.prototype,de=R[`__core-js_shared__`],K=function(){var e=/[^.]+$/.exec(de&&de.keys&&de.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),q=ue.toString,J=G.hasOwnProperty,fe=G.toString,pe=RegExp(`^`+q.call(J).replace(M,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),me=B?R.Buffer:void 0,he=R.Symbol,ge=R.Uint8Array,_e=se(Object.getPrototypeOf,Object),ve=Object.create,ye=G.propertyIsEnumerable,be=le.splice,xe=Object.getOwnPropertySymbols,Se=me?me.isBuffer:void 0,Y=se(Object.keys,Object),Ce=Tt(R,`DataView`),we=Tt(R,`Map`),Te=Tt(R,`Promise`),Ee=Tt(R,`Set`),De=Tt(R,`WeakMap`),X=Tt(Object,`create`),Oe=Ft(Ce),ke=Ft(we),Ae=Ft(Te),je=Ft(Ee),Me=Ft(De),Ne=he?he.prototype:void 0,Pe=Ne?Ne.valueOf:void 0;function Z(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fe(){this.__data__=X?X(null):{}}function Ie(e){return this.has(e)&&delete this.__data__[e]}function Le(e){var t=this.__data__;if(X){var n=t[e];return n===r?void 0:n}return J.call(t,e)?t[e]:void 0}function Re(e){var t=this.__data__;return X?t[e]!==void 0:J.call(t,e)}function ze(e,t){var n=this.__data__;return n[e]=X&&t===void 0?r:t,this}Z.prototype.clear=Fe,Z.prototype.delete=Ie,Z.prototype.get=Le,Z.prototype.has=Re,Z.prototype.set=ze;function Q(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Be(){this.__data__=[]}function Ve(e){var t=this.__data__,n=it(t,e);return n<0?!1:(n==t.length-1?t.pop():be.call(t,n,1),!0)}function He(e){var t=this.__data__,n=it(t,e);return n<0?void 0:t[n][1]}function Ue(e){return it(this.__data__,e)>-1}function We(e,t){var n=this.__data__,r=it(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Q.prototype.clear=Be,Q.prototype.delete=Ve,Q.prototype.get=He,Q.prototype.has=Ue,Q.prototype.set=We;function $(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ge(){this.__data__={hash:new Z,map:new(we||Q),string:new Z}}function Ke(e){return wt(this,e).delete(e)}function qe(e){return wt(this,e).get(e)}function Je(e){return wt(this,e).has(e)}function Ye(e,t){return wt(this,e).set(e,t),this}$.prototype.clear=Ge,$.prototype.delete=Ke,$.prototype.get=qe,$.prototype.has=Je,$.prototype.set=Ye;function Xe(e){this.__data__=new Q(e)}function Ze(){this.__data__=new Q}function Qe(e){return this.__data__.delete(e)}function $e(e){return this.__data__.get(e)}function et(e){return this.__data__.has(e)}function tt(e,t){var r=this.__data__;if(r instanceof Q){var i=r.__data__;if(!we||i.length<n-1)return i.push([e,t]),this;r=this.__data__=new $(i)}return r.set(e,t),this}Xe.prototype.clear=Ze,Xe.prototype.delete=Qe,Xe.prototype.get=$e,Xe.prototype.has=et,Xe.prototype.set=tt;function nt(e,t){var n=zt(e)||Rt(e)?re(e.length,String):[],r=n.length,i=!!r;for(var a in e)(t||J.call(e,a))&&!(i&&(a==`length`||jt(a,r)))&&n.push(a);return n}function rt(e,t,n){var r=e[t];(!(J.call(e,t)&&Lt(r,n))||n===void 0&&!(t in e))&&(e[t]=n)}function it(e,t){for(var n=e.length;n--;)if(Lt(e[n][0],t))return n;return-1}function at(e,t){return e&&xt(t,qt(t),e)}function ot(e,t,n,r,i,o,s){var c;if(r&&(c=o?r(e,i,o,s):r(e)),c!==void 0)return c;if(!Gt(e))return e;var l=zt(e);if(l){if(c=Ot(e),!t)return bt(e,c)}else{var f=Dt(e),p=f==u||f==d;if(Ht(e))return ft(e,t);if(f==m||f==a||p&&!o){if(ae(e))return o?e:{};if(c=kt(p?{}:e),!t)return St(e,at(c,e))}else{if(!I[f])return o?e:{};c=At(e,f,ot,t)}}s||=new Xe;var h=s.get(e);if(h)return h;if(s.set(e,c),!l)var g=n?Ct(e):qt(e);return ne(g||e,function(i,a){g&&(a=i,i=e[a]),rt(c,a,ot(i,t,n,r,a,e,s))}),c}function st(e){return Gt(e)?ve(e):{}}function ct(e,t,n){var r=t(e);return zt(e)?r:U(r,n(e))}function lt(e){return fe.call(e)}function ut(e){return!Gt(e)||Nt(e)?!1:(Ut(e)||ae(e)?pe:P).test(Ft(e))}function dt(e){if(!Pt(e))return Y(e);var t=[];for(var n in Object(e))J.call(e,n)&&n!=`constructor`&&t.push(n);return t}function ft(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}function pt(e){var t=new e.constructor(e.byteLength);return new ge(t).set(new ge(e)),t}function mt(e,t){var n=t?pt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function ht(e,t,n){return W(t?n(oe(e),!0):oe(e),V,new e.constructor)}function gt(e){var t=new e.constructor(e.source,N.exec(e));return t.lastIndex=e.lastIndex,t}function _t(e,t,n){return W(t?n(ce(e),!0):ce(e),H,new e.constructor)}function vt(e){return Pe?Object(Pe.call(e)):{}}function yt(e,t){var n=t?pt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function bt(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}function xt(e,t,n,r){n||={};for(var i=-1,a=t.length;++i<a;){var o=t[i],s=r?r(n[o],e[o],o,n,e):void 0;rt(n,o,s===void 0?e[o]:s)}return n}function St(e,t){return xt(e,Et(e),t)}function Ct(e){return ct(e,qt,Et)}function wt(e,t){var n=e.__data__;return Mt(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Tt(e,t){var n=ie(e,t);return ut(n)?n:void 0}var Et=xe?se(xe,Object):Jt,Dt=lt;(Ce&&Dt(new Ce(new ArrayBuffer(1)))!=S||we&&Dt(new we)!=f||Te&&Dt(Te.resolve())!=h||Ee&&Dt(new Ee)!=_||De&&Dt(new De)!=b)&&(Dt=function(e){var t=fe.call(e),n=t==m?e.constructor:void 0,r=n?Ft(n):void 0;if(r)switch(r){case Oe:return S;case ke:return f;case Ae:return h;case je:return _;case Me:return b}return t});function Ot(e){var t=e.length,n=e.constructor(t);return t&&typeof e[0]==`string`&&J.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function kt(e){return typeof e.constructor==`function`&&!Pt(e)?st(_e(e)):{}}function At(e,t,n,r){var i=e.constructor;switch(t){case x:return pt(e);case s:case c:return new i(+e);case S:return mt(e,r);case C:case w:case T:case E:case D:case O:case k:case A:case j:return yt(e,r);case f:return ht(e,r,n);case p:case v:return new i(e);case g:return gt(e);case _:return _t(e,r,n);case y:return vt(e)}}function jt(e,t){return t??=i,!!t&&(typeof e==`number`||F.test(e))&&e>-1&&e%1==0&&e<t}function Mt(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Nt(e){return!!K&&K in e}function Pt(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||G)}function Ft(e){if(e!=null){try{return q.call(e)}catch{}try{return e+``}catch{}}return``}function It(e){return ot(e,!0,!0)}function Lt(e,t){return e===t||e!==e&&t!==t}function Rt(e){return Vt(e)&&J.call(e,`callee`)&&(!ye.call(e,`callee`)||fe.call(e)==a)}var zt=Array.isArray;function Bt(e){return e!=null&&Wt(e.length)&&!Ut(e)}function Vt(e){return Kt(e)&&Bt(e)}var Ht=Se||Yt;function Ut(e){var t=Gt(e)?fe.call(e):``;return t==u||t==d}function Wt(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=i}function Gt(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function Kt(e){return!!e&&typeof e==`object`}function qt(e){return Bt(e)?nt(e):dt(e)}function Jt(){return[]}function Yt(){return!1}t.exports=It})),oe=c(((e,t)=>{var n=`Expected a function`,r=`__lodash_hash_undefined__`,i=1/0,a=9007199254740991,o=`[object Function]`,s=`[object GeneratorFunction]`,c=`[object Symbol]`,l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,d=/^\./,f=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/[\\^$.*+?()[\]{}|]/g,m=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,g=/^(?:0|[1-9]\d*)$/,_=typeof global==`object`&&global&&global.Object===Object&&global,v=typeof self==`object`&&self&&self.Object===Object&&self,y=_||v||Function(`return this`)();function b(e,t){return e?.[t]}function x(e){var t=!1;if(e!=null&&typeof e.toString!=`function`)try{t=!!(e+``)}catch{}return t}var S=Array.prototype,C=Function.prototype,w=Object.prototype,T=y[`__core-js_shared__`],E=function(){var e=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),D=C.toString,O=w.hasOwnProperty,k=w.toString,A=RegExp(`^`+D.call(O).replace(p,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),j=y.Symbol,M=S.splice,N=pe(y,`Map`),P=pe(Object,`create`),F=j?j.prototype:void 0,I=F?F.toString:void 0;function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ee(){this.__data__=P?P(null):{}}function R(e){return this.has(e)&&delete this.__data__[e]}function te(e){var t=this.__data__;if(P){var n=t[e];return n===r?void 0:n}return O.call(t,e)?t[e]:void 0}function z(e){var t=this.__data__;return P?t[e]!==void 0:O.call(t,e)}function B(e,t){var n=this.__data__;return n[e]=P&&t===void 0?r:t,this}L.prototype.clear=ee,L.prototype.delete=R,L.prototype.get=te,L.prototype.has=z,L.prototype.set=B;function V(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function H(){this.__data__=[]}function ne(e){var t=this.__data__,n=G(t,e);return n<0?!1:(n==t.length-1?t.pop():M.call(t,n,1),!0)}function U(e){var t=this.__data__,n=G(t,e);return n<0?void 0:t[n][1]}function W(e){return G(this.__data__,e)>-1}function re(e,t){var n=this.__data__,r=G(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}V.prototype.clear=H,V.prototype.delete=ne,V.prototype.get=U,V.prototype.has=W,V.prototype.set=re;function ie(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ae(){this.__data__={hash:new L,map:new(N||V),string:new L}}function oe(e){return fe(this,e).delete(e)}function se(e){return fe(this,e).get(e)}function ce(e){return fe(this,e).has(e)}function le(e,t){return fe(this,e).set(e,t),this}ie.prototype.clear=ae,ie.prototype.delete=oe,ie.prototype.get=se,ie.prototype.has=ce,ie.prototype.set=le;function ue(e,t,n){var r=e[t];(!(O.call(e,t)&&Se(r,n))||n===void 0&&!(t in e))&&(e[t]=n)}function G(e,t){for(var n=e.length;n--;)if(Se(e[n][0],t))return n;return-1}function de(e){return!we(e)||_e(e)?!1:(Ce(e)||x(e)?A:h).test(be(e))}function K(e,t,n,r){if(!we(e))return e;t=he(t,e)?[t]:J(t);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=ye(t[i]),l=n;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=we(u)?u:me(t[i+1])?[]:{})}ue(s,c,l),s=s[c]}return e}function q(e){if(typeof e==`string`)return e;if(Ee(e))return I?I.call(e):``;var t=e+``;return t==`0`&&1/e==-i?`-0`:t}function J(e){return Y(e)?e:ve(e)}function fe(e,t){var n=e.__data__;return ge(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function pe(e,t){var n=b(e,t);return de(n)?n:void 0}function me(e,t){return t??=a,!!t&&(typeof e==`number`||g.test(e))&&e>-1&&e%1==0&&e<t}function he(e,t){if(Y(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Ee(e)?!0:u.test(e)||!l.test(e)||t!=null&&e in Object(t)}function ge(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function _e(e){return!!E&&E in e}var ve=xe(function(e){e=De(e);var t=[];return d.test(e)&&t.push(``),e.replace(f,function(e,n,r,i){t.push(r?i.replace(m,`$1`):n||e)}),t});function ye(e){if(typeof e==`string`||Ee(e))return e;var t=e+``;return t==`0`&&1/e==-i?`-0`:t}function be(e){if(e!=null){try{return D.call(e)}catch{}try{return e+``}catch{}}return``}function xe(e,t){if(typeof e!=`function`||t&&typeof t!=`function`)throw TypeError(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o),o};return r.cache=new(xe.Cache||ie),r}xe.Cache=ie;function Se(e,t){return e===t||e!==e&&t!==t}var Y=Array.isArray;function Ce(e){var t=we(e)?k.call(e):``;return t==o||t==s}function we(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function Te(e){return!!e&&typeof e==`object`}function Ee(e){return typeof e==`symbol`||Te(e)&&k.call(e)==c}function De(e){return e==null?``:q(e)}function X(e,t,n){return e==null?e:K(e,t,n)}t.exports=X})),se=u(ae(),1),ce=u(oe(),1),le=class{uniqueKey;columns;cellsApplied={};factoredConditions={};constructor(e,t){this.uniqueKey=e,this.columns=t,this.columns.forEach(e=>{this.createConditions(e)})}getPlainConditions(e,t=``){let n={};return Object.keys(e).forEach(r=>{let i=t?[t,r].join(`.`):r;typeof e[r]==`object`?n={...n,...this.getPlainConditions(e[r],i)}:n[i]=e[r]}),n}factorConditions(e){let n=this.getPlainConditions(e);return t.Event.factory(n)}createConditions(e,t=e.children,n=``){this.factoredConditions[e.name]={root:{},children:{}},this.factoredConditions[e.name].root=this.factorConditions(e.conditions),this.factoredConditions[e.name].children={},!(!t||t.length===0)&&t.forEach(t=>{let r=n?`${n}.${t.name}`:t.name;t.conditions&&(this.factoredConditions[e.name].children[r]=this.factorConditions(t.conditions)),t.children&&this.createConditions(e,t.children,r)})}applyCondition(e,t,n=this.factoredConditions[t.name]?.root){let r={};return Object.keys(n||{}).forEach(i=>{let a=n[i];if(typeof a!=`function`){(0,ce.default)(r,i,a);return}(0,ce.default)(r,i,a({row:e,column:t}))}),r}applyConditions(e,t){let n={root:this.applyCondition(e,t),children:{}};if(!t.children||t.children.length===0)return n;let r=this.factoredConditions[t.name]?.children;return Object.keys(r||{}).forEach(i=>{let a=r[i];n.children[i]={...this.applyCondition(e,t,a)}}),n}reapplyConditions(e,t){let n=e[this.uniqueKey],r={...this.cellsApplied};return t.forEach(t=>{r[n]||(r[n]={}),r[n][t.name]=this.applyConditions(e,t)}),this.cellsApplied=r,r}getAppliedConditions({row:e,column:t,path:n=``}){let r=e[this.uniqueKey],i=this.cellsApplied[r],a=i?i[t.name]:void 0;return a?n?a.children[n]:a.root:{}}},ue=class{iterable;searchInValue=void 0;constructor(e){this.iterable=e}get searchIn(){return this.searchInValue||this.iterable.columns.reduce((e,t)=>(t.type!==`action`&&(!this.iterable.searchVisibleOnly||t.isVisible)&&e.push(t.name),e),[])}set searchIn(e){this.searchInValue=e}},G=class extends T{datasource;columns=[];pageSizes=[`5`,`10`,`25`,`50`];virtualScroll=!1;virtualScrollCache=5;searchVisibleOnly;defaultSearchVisibleOnly=t.Config.iterableSearchVisibleOnly??!0;conditionsManager;constructor(e){super(e),this.columns=this.createColumns(e),this.pageSizes=this.getInitValue(`pageSizes`,e.pageSizes,this.pageSizes),this.searchVisibleOnly=this.getInitValue(`searchVisibleOnly`,e.searchVisibleOnly,this.defaultSearchVisibleOnly),this.virtualScroll=this.getInitValue(`virtualScroll`,e.virtualScroll,this.virtualScroll),this.virtualScrollCache=this.getInitValue(`virtualScrollCache`,e.virtualScrollCache,this.virtualScrollCache)}initializeDatasource(e){let n=(0,se.default)(e.datasource);if(typeof e.datasource==`string`&&t.Accessor.isAccessorDefinition(e.datasource)){let[r,i]=t.Accessor.getAccessor(e.datasource);n=t.Loader.getInstance(r)[i]}this.datasource=t.DatasourceFactory.factory({...n,searchIn:e.datasource?.searchIn||`{{IterableController_${this.name}.searchIn}}`})}updateData(e){return this.datasource.updateData(e)}getAppliedConditions(e){return this.conditionsManager.getAppliedConditions(e)}getCurrentRowIndex(){let{uniqueKey:e,currentRow:t}=this.datasource;return this.getData().findIndex(n=>n[e]===t[e])}getPage(){return this.datasource.page}setPage(e){return this.datasource.setPage(e)}getLastPage(){return Math.ceil(this.datasource.total/this.datasource.limit)}createController(){t.Loader.addController(`IterableController_${this.name}`,ue,[this])}onCreated(){super.onCreated(),this.columns.forEach(e=>e.initialize()),this.createController(),this.initializeDatasource(this.props),this.datasource.initialize(),this.conditionsManager=new le(this.datasource.uniqueKey,this.columns)}createColumns(e){return e.columns?e.columns?.map(e=>this.createColumn(e)):[]}getColumn(e){let t=this.columns.find(t=>t.name===e);if(!t)throw new ie(e,this.name);return t}get pageText(){let e=this.datasource.page*this.datasource.limit,n=e>this.datasource.total?this.datasource.total:e,r=n===0?0:e-this.datasource.limit+1,i=t.I18n.instance.t(`gridPageText`,{firstRow:r,lastRow:n,total:this.datasource.total});return i===`gridPageText`?`${r} - ${n} of ${this.datasource.total}`:i}get paginationLength(){let{limit:e,total:t}=this.datasource;return e=Number(e),t=Number(t),!e||Number.isNaN(t)||Number.isNaN(e)?0:Math.ceil(t/e)}getCellWithAppliedConditions(e,t){return this.reapplyConditions(t,e)}reapplyConditions(e,t=this.columns){return this.conditionsManager.reapplyConditions(e,t)}reload(){return this.columns.forEach(e=>{e.clearLookupData()}),this.datasource.get()}changeData(e){e.forEach(e=>this.reapplyConditions(e,this.columns))}onBeforeDestroy(){super.onBeforeDestroy(),this.datasource?.destroy()}changeLayout(e,t){this.callEvent(`changeLayout`,{event:e,element:t,component:this})}async setSearch(e){return this.datasource.setSearch(e)}setCurrentRow(e){this.datasource.currentRow=e}setOrder(e){return this.datasource.setOrder(e)}getRowKey(e){return e[this.datasource.uniqueKey]}delete(e){return this.datasource.delete(e)}getData(){return this.datasource.data}changeDefaultSlotNames(e){return this.recursiveReplace(e,/<<NAME>>/g,this.name)}recursiveReplace(e,t,n){if(e==null)return e;if(typeof e==`string`)return e.replace(t,n);if(Array.isArray(e))return e.map(e=>this.recursiveReplace(e,t,n));if(this.isObject(e)){let r={};for(let i in e)r[i]=this.recursiveReplace(e[i],t,n);return r}return e}isObject(e){return typeof e==`object`}findRow(e){return this.getData().find(t=>this.getRowKey(t)===e)}},de=class extends T{iterableComponentName;iterableComponent;constructor(e){super(e),this.iterableComponentName=this.getInitValue(`iterableComponentName`,e.iterableComponentName,this.iterableComponent),this.setIterableComponent()}onMounted(e){super.onMounted(e),this.setIterableComponent()}setIterableComponent(){if(this.iterableComponentName&&t.Metadata.getInstances(this.iterableComponentName).length>0)this.iterableComponent=t.Metadata.getInstance(this.iterableComponentName);else if(this.parent instanceof G)this.iterableComponent=this.parent;else throw Error(`Could not find the iterable component associated with ${this.name}`)}},K=class extends de{},q=class extends P{datasource;dataText=``;dataTextDiscrete=``;dataTextSeparator=` | `;dataValue=``;dataDisabled=`disabled`;returnObject=!1;autocomplete=!0;autoSelection=!0;preventLoadOnFocus=!0;menuMaxHeight=304;menuMaxWidth=`auto`;selectValue=null;itemAfterSlot=[];itemBeforeSlot=[];disabledItems=[];manualMode=!1;searchParam=`SEARCH`;dataValueOut=[];dataValueOutFormName=``;searchValue=``;dirtySearchValue=``;formatterFn=t.FormatterParserProvider.getFormatter(`ZdSelect`);discreteProps;loadMoreAmount=0;pushedValue=null;defaultValue;cachedData=[];cachedTotal=0;constructor(e){super({...e,value:void 0}),this.appendIcon=this.getInitValue(`appendIcon`,e.appendIcon,`expand`),this.dataText=this.getInitValue(`dataText`,e.dataText,this.dataText),this.dataTextDiscrete=this.getInitValue(`dataTextDiscrete`,e.dataTextDiscrete,this.dataTextDiscrete),this.dataTextSeparator=this.getInitValue(`dataTextSeparator`,e.dataTextSeparator,this.dataTextSeparator),this.dataValue=this.getInitValue(`dataValue`,e.dataValue,this.dataValue),this.dataDisabled=this.getInitValue(`dataDisabled`,e.dataDisabled,this.dataDisabled),this.menuMaxHeight=this.getInitValue(`menuMaxHeight`,e.menuMaxHeight,this.menuMaxHeight),this.menuMaxWidth=this.getInitValue(`menuMaxWidth`,e.menuMaxWidth,this.menuMaxWidth),this.returnObject=this.getInitValue(`returnObject`,e.returnObject,this.returnObject),this.autocomplete=this.getInitValue(`autocomplete`,e.autocomplete,this.autocomplete),this.autoSelection=this.getInitValue(`autoSelection`,e.autoSelection,this.autoSelection),this.disabledItems=this.getInitValue(`disabledItems`,e.disabledItems,this.disabledItems),this.manualMode=this.getInitValue(`manualMode`,e.manualMode,this.manualMode),this.searchParam=this.getInitValue(`searchParam`,e.searchParam,this.searchParam),this.dataValueOut=this.getInitValue(`dataValueOut`,e.dataValueOut,this.dataValueOut),this.dataValueOutFormName=this.getInitValue(`dataValueOutFormName`,e.dataValueOutFormName,this.dataValueOutFormName),this.setDataProperties(e);let n=this.getDefaultDatasource(e);this.datasource=t.DatasourceFactory.factory(n),this.defaultValue=e.value,t.Accessor.isAccessorDefinition(e.value)&&(this.defaultValue=this.getAccessorValue(e.value),this.getInitValue(`value`,e.value,this.value)),this.preventLoadOnFocus=!n.lazyLoad,this.preventLoadOnFocus=this.getInitValue(`preventLoadOnFocus`,e.preventLoadOnFocus,this.preventLoadOnFocus),this.loadMoreAmount=this.datasource.limit,this.itemAfterSlot=e.itemAfterSlot||this.itemAfterSlot,this.itemBeforeSlot=e.itemBeforeSlot||this.itemBeforeSlot,this.internalDisplayValue=this.formatter(this.selectValue),this.createAccessors()}async onCreated(){super.onCreated(),this.registerGetCallback(),await this.datasource.initialize()}onMounted(e){super.onMounted(e),this.setDefaultValue(this.defaultValue)}get items(){return this.pushedValue?[this.pushedValue,...this.datasource.data]:this.datasource.data}setDataProperties(e){e.datasource?.type===`simple`&&(this.dataValue=`value`,this.dataText=this.dataText||this.dataValue),this.dataText&&!Array.isArray(this.dataText)&&(this.dataText=[this.dataText]),this.dataTextDiscrete&&!Array.isArray(this.dataTextDiscrete)&&(this.dataTextDiscrete=[this.dataTextDiscrete]),this.discreteProps={dataText:this.dataTextDiscrete,dataTextSeparator:this.dataTextSeparator}}getAccessorValue(e){let[n,r]=t.Accessor.getAccessor(e);return t.Loader.getInstance(n)[r]}getDefaultDatasource(e){let t=this.dataText?this.dataText.map(e=>typeof e==`string`?e:e.name):[],n=(e.datasource?.searchIn||[]).concat(t);return{...e.datasource,searchIn:n,lazyLoad:e.value!==``&&e.value!==void 0||e.datasource?.lazyLoad}}formatter(e,t){return this.formatterFn(e,t??this)}registerGetCallback(){this.datasource.registerGetCallback(async()=>{this.value&&this.indexOf(this.value)===-1&&!this.pushedValue&&(this.pushedValue=this.selectValue),this.indexOf(this.value)===-1&&!this.datasource.search&&!this.isFocused&&await this.setValue(this.value,!1),this.indexOf(this.value)!==-1&&(this.pushedValue=null),!this.datasource.search&&!this.manualMode&&(this.cachedData=[...this.datasource.data],this.cachedTotal=this.datasource.total)})}get search(){return this.searchValue}set search(e){this.searchValue=e||``;let t=this.formatter(this.selectValue),n=this.formatter(this.selectValue,this.discreteProps);(this.searchValue===``||this.searchValue!==t&&this.searchValue!==n)&&(this.dirtySearchValue=this.searchValue,this.isFocused&&this.debounceSearch(this.searchValue))}async setDefaultValue(e){(e||typeof e==`number`)&&await this.setValue(e,!1)}async getItemsBySearchValue(e){this.datasource.loading=!0;let t=await new v().search(this.datasource,e,this.dataValue,this.searchParam);return this.datasource.loading=!1,t}async focus(e,t){super.focus(e,t),this.afterFocus()}async afterFocus(){this.preventLoadOnFocus||=(await this.datasource.get(),!0),this.updateSearch(this.dirtySearchValue),!this.manualMode&&(this.cachedData=[...this.datasource.data],this.cachedTotal=this.datasource.total)}get value(){return this.getReturnValue(this.selectValue)}set value(e){let n=this.getValue(e),r=this.getValue(this.selectValue);t.Utils.isEqual(n,r)||this.setValue(e)}async setValue(e,t=!0){await this.setFieldValue(e)?this.pushedValue=this.selectValue:this.pushedValue=null,t&&this.callChangeEvent(this.selectValue)}async setFieldValue(e){if(typeof e!=`number`&&(!e||Object.keys(e).length===0))return this.setFieldRowValue(null),!1;let t=this.getValue(e),n=this.datasource.data.find(e=>e[this.dataValue]===t),r=n;return!n&&!this.manualMode&&([r]=await this.getItemsBySearchValue(t)),r?(this.setFieldRowValue(r),!n):(this.setFieldRowValue(null),!1)}setFieldRowValue(e){e?this.selectValue=e:this.selectValue=null,this.datasource.currentRow=e,this.internalDisplayValue=this.formatter(this.selectValue)}getReturnValue(e){return e?this.returnObject?e:e[this.dataValue]:null}getValue(e){return e?typeof e==`object`?e[this.dataValue]:e:null}selectChange(e,t,n){let r=this.getReturnValue(e);this.setValue(e,!1).then(()=>{g.setDataValueOut(this,e),this.callChangeEvent(r,t,n)})}callChangeEvent(e,t,n){this.callEvent(`change`,{event:t,element:n,value:e,component:this})}selectInput(e,t,n){e!==this.lastInputValue&&(this.lastInputValue=e,this.callEvent(`input`,{event:t,element:n,value:e,component:this}))}async updateSearch(e){e!==this.datasource.search&&await this.datasource.setSearch(e)}async updateData(e){return this.datasource.updateData(e)}async updateItems(e){let t=e.map(e=>({value:e}));return this.datasource.updateData(t)}async doSearch(e){this.manualMode||e?await this.updateSearch(e):(this.datasource.search=this.searchValue,this.pushedValue=null,this.datasource.data=[...this.cachedData],this.datasource.total=this.cachedTotal)}debounceSearch=(0,A.default)(this.doSearch,500);async loadMore(){await this.datasource.setLimit(this.datasource.limit+this.loadMoreAmount)}blur(e,t){this.autocomplete&&(this.datasource.search=``,this.dirtySearchValue=``,this.checkValueOnBlur()),super.blur(e,t)}checkValueOnBlur(){if(!this.search&&this.value!==null&&this.setValue(null),!this.manualMode){if(this.datasource.data=[...this.cachedData],this.datasource.total=this.cachedTotal,this.value===null){this.pushedValue=null;return}this.indexOf(this.value,this.cachedData)===-1&&(this.pushedValue=this.selectValue)}}showLoadMore(){return!!this.datasource.data.length&&!this.datasource.loading&&!this.datasource.loadAll&&this.datasource.data.length<this.datasource.total}showSkeletonLoaders(){return this.datasource.loading&&(this.datasource.data.length===0||this.datasource.data.length<this.datasource.total)}onBeforeDestroy(){super.onBeforeDestroy(),this.datasource.destroy()}indexOf(e,t=this.datasource.data){let n=e&&typeof e==`object`?e[this.dataValue]:e;return t.findIndex(e=>e[this.dataValue]===n)}};t.FormatterParserProvider.registerFormatter(`ZdSelect`,(e,{dataText:n,dataTextSeparator:r=` | `})=>{if(e==null)return null;if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e;let i=Array.isArray(n)?n:[n],a=[],o=[];return i.forEach(e=>{if(typeof e==`string`)a.push(e),o.push(``);else if(a.push(e.name),t.Accessor.isAccessorDefinition(e.mask)){let[n,r]=t.Accessor.getAccessor(e.mask);o.push(t.Loader.getInstance(n)[r])}else o.push(e.mask)}),a.reduce((n,i,a)=>{if(e[i]!==null&&e[i]!==void 0){let s=a>0?r:``,c=e[i];if(o[a]){let n=typeof o[a]==`function`?o[a](e[i]):o[a];c=t.Mask.getValueWithMask(e[i],n)}return n+s+c}return n},``)}),k.register(`ZdSelect`,q);var J=class extends q{iterableComponentName;clearable=!1;dataText=`value`;dataValue=`value`;autocomplete=!1;showHelper=!1;showLabel=!1;validations={required:!0};iterableComponent;constructor(e){super(e),this.iterableComponentName=this.getInitValue(`iterableComponentName`,e.iterableComponentName,this.iterableComponent),this.clearable=this.getInitValue(`clearable`,e.clearable,this.clearable),this.dataText=this.getInitValue(`dataText`,e.dataText,this.dataText),this.dataText&&typeof this.dataText==`string`&&(this.dataText=[this.dataText]),this.dataValue=this.getInitValue(`dataValue`,e.dataValue,this.dataValue),this.dense=this.getInitValue(`dense`,e.dense,!1),this.autocomplete=this.getInitValue(`autocomplete`,e.autocomplete,this.autocomplete),this.showHelper=this.getInitValue(`showHelper`,e.showHelper,this.showHelper),this.showLabel=this.getInitValue(`showLabel`,e.showLabel,this.showLabel),this.validations=this.getInitValue(`validations`,e.validations,this.validations),this.setIterableComponent()}onMounted(e){super.onMounted(e),this.setIterableComponent()}setIterableComponent(){if(this.iterableComponentName&&t.Metadata.getInstances(this.iterableComponentName).length>0)this.iterableComponent=t.Metadata.getInstance(this.iterableComponentName);else if(this.parent instanceof G)this.iterableComponent=this.parent;else throw Error(`Could not find the iterable component associated with ${this.name}`)}selectChange(e,t,n){super.selectChange(e,t,n),e&&this.changePageSize(parseFloat(e.value))}changePageSize(e){this.iterableComponent.datasource.limit!==e&&this.iterableComponent.datasource.setLimit(e)}},fe=class extends de{prevIcon=`prev`;nextIcon=`next`;circle=!1;maxButtons;constructor(e){super(e),this.circle=this.getInitValue(`circle`,e.circle,this.circle),this.prevIcon=this.getInitValue(`prevIcon`,e.prevIcon,this.prevIcon),this.nextIcon=this.getInitValue(`nextIcon`,e.nextIcon,this.nextIcon),this.maxButtons=this.getInitValue(`maxButtons`,e.maxButtons,this.maxButtons),this.createAccessors()}},pe=class extends P{iterableComponentName;iterableComponent;showLabel=!1;showHelper=!1;appendIcon=`magnify`;placeholder=`SEARCH`;lazyAttach=!1;constructor(e){super(e),this.iterableComponentName=this.getInitValue(`iterableComponentName`,e.iterableComponentName,this.iterableComponent),this.showHelper=this.getInitValue(`showHelper`,e.showHelper,this.showHelper),this.showLabel=this.getInitValue(`showLabel`,e.showLabel,this.showLabel),this.appendIcon=this.getInitValue(`appendIcon`,e.appendIcon,this.appendIcon),this.placeholder=this.getInitValue(`placeholder`,e.placeholder,this.placeholder),this.lazyAttach=this.getInitValue(`lazyAttach`,e.lazyAttach,this.lazyAttach),this.lazyAttach||this.setIterableComponent(),this.createAccessors()}setIterableComponent(e){if(this.iterableComponentName=e||this.iterableComponentName,this.iterableComponentName&&t.Metadata.getInstances(this.iterableComponentName).length>0)this.iterableComponent=t.Metadata.getInstance(this.iterableComponentName);else if(this.parent instanceof G)this.iterableComponent=this.parent;else throw Error(`Could not find the iterable component associated with ${this.name}`)}async setSearch(e){await this.iterableComponent.setSearch(e)}debounceSetSearch=(0,A.default)(this.setSearch,500);get value(){return this.iterableComponent?.datasource.search||``}set value(e){this.iterableComponent&&(this.internalValue!==e&&(this.internalDisplayValue=this.formatter(e),this.iterableComponent.datasource.search=e),this.debounceSetSearch(e))}};k.register(`ZdSearch`,pe);var me=class{iterableComponent;constructor(e){this.iterableComponent=e}showHideColumn(e,{component:t,event:n,element:r}){e.isVisible=t.value,this.iterableComponent.changeLayout(n,r)}},he=class extends O{iterableComponentName;iterableComponent;ignoreColumns=[];controller;iconName=`mdi-table-headers-eye`;icon=!0;constructor(e){super(e),this.iterableComponentName=this.getInitValue(`iterableComponentName`,e.iterableComponentName,this.iterableComponentName),this.iconName=this.getInitValue(`iconName`,e.iconName,this.iconName),this.icon=this.getInitValue(`icon`,e.icon,this.icon),this.ignoreColumns=this.getInitValue(`ignoreColumns`,e.ignoreColumns,this.ignoreColumns),this.setIterableComponent(),this.createAccessors()}setIterableComponent(){if(this.iterableComponentName&&t.Metadata.getInstances(this.iterableComponentName).length>0)this.iterableComponent=t.Metadata.getInstance(this.iterableComponentName);else if(this.parent instanceof G)this.iterableComponent=this.parent;else throw Error(`Could not find the iterable component associated with ${this.name}`)}onCreated(){super.onCreated(),t.Loader.addController(`IterableColumnsButtonController_${this.name}`,me,[this.iterableComponent]),this.controller=t.Loader.getInstance(`IterableColumnsButtonController_${this.name}`)}filteredColumns(){return this.iterableComponent.columns.filter(e=>this.ignoreColumns.indexOf(e.name)===-1)}},ge=u(c(((e,t)=>{var n=`Expected a function`,r=`__lodash_hash_undefined__`,i=1/0,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Symbol]`,c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,u=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/[\\^$.*+?()[\]{}|]/g,p=/\\(\\)?/g,m=/^\[object .+?Constructor\]$/,h=typeof global==`object`&&global&&global.Object===Object&&global,g=typeof self==`object`&&self&&self.Object===Object&&self,_=h||g||Function(`return this`)();function v(e,t){return e?.[t]}function y(e){var t=!1;if(e!=null&&typeof e.toString!=`function`)try{t=!!(e+``)}catch{}return t}var b=Array.prototype,x=Function.prototype,S=Object.prototype,C=_[`__core-js_shared__`],w=function(){var e=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),T=x.toString,E=S.hasOwnProperty,D=S.toString,O=RegExp(`^`+T.call(E).replace(f,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),k=_.Symbol,A=b.splice,j=q(_,`Map`),M=q(Object,`create`),N=k?k.prototype:void 0,P=N?N.toString:void 0;function F(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function I(){this.__data__=M?M(null):{}}function L(e){return this.has(e)&&delete this.__data__[e]}function ee(e){var t=this.__data__;if(M){var n=t[e];return n===r?void 0:n}return E.call(t,e)?t[e]:void 0}function R(e){var t=this.__data__;return M?t[e]!==void 0:E.call(t,e)}function te(e,t){var n=this.__data__;return n[e]=M&&t===void 0?r:t,this}F.prototype.clear=I,F.prototype.delete=L,F.prototype.get=ee,F.prototype.has=R,F.prototype.set=te;function z(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function B(){this.__data__=[]}function V(e){var t=this.__data__,n=ce(t,e);return n<0?!1:(n==t.length-1?t.pop():A.call(t,n,1),!0)}function H(e){var t=this.__data__,n=ce(t,e);return n<0?void 0:t[n][1]}function ne(e){return ce(this.__data__,e)>-1}function U(e,t){var n=this.__data__,r=ce(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}z.prototype.clear=B,z.prototype.delete=V,z.prototype.get=H,z.prototype.has=ne,z.prototype.set=U;function W(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function re(){this.__data__={hash:new F,map:new(j||z),string:new F}}function ie(e){return K(this,e).delete(e)}function ae(e){return K(this,e).get(e)}function oe(e){return K(this,e).has(e)}function se(e,t){return K(this,e).set(e,t),this}W.prototype.clear=re,W.prototype.delete=ie,W.prototype.get=ae,W.prototype.has=oe,W.prototype.set=se;function ce(e,t){for(var n=e.length;n--;)if(ve(e[n][0],t))return n;return-1}function le(e,t){t=J(t,e)?[t]:de(t);for(var n=0,r=t.length;e!=null&&n<r;)e=e[he(t[n++])];return n&&n==r?e:void 0}function ue(e){return!xe(e)||pe(e)?!1:(be(e)||y(e)?O:m).test(ge(e))}function G(e){if(typeof e==`string`)return e;if(Y(e))return P?P.call(e):``;var t=e+``;return t==`0`&&1/e==-i?`-0`:t}function de(e){return ye(e)?e:me(e)}function K(e,t){var n=e.__data__;return fe(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function q(e,t){var n=v(e,t);return ue(n)?n:void 0}function J(e,t){if(ye(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Y(e)?!0:l.test(e)||!c.test(e)||t!=null&&e in Object(t)}function fe(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function pe(e){return!!w&&w in e}var me=_e(function(e){e=Ce(e);var t=[];return u.test(e)&&t.push(``),e.replace(d,function(e,n,r,i){t.push(r?i.replace(p,`$1`):n||e)}),t});function he(e){if(typeof e==`string`||Y(e))return e;var t=e+``;return t==`0`&&1/e==-i?`-0`:t}function ge(e){if(e!=null){try{return T.call(e)}catch{}try{return e+``}catch{}}return``}function _e(e,t){if(typeof e!=`function`||t&&typeof t!=`function`)throw TypeError(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o),o};return r.cache=new(_e.Cache||W),r}_e.Cache=W;function ve(e,t){return e===t||e!==e&&t!==t}var ye=Array.isArray;function be(e){var t=xe(e)?D.call(e):``;return t==a||t==o}function xe(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function Se(e){return!!e&&typeof e==`object`}function Y(e){return typeof e==`symbol`||Se(e)&&D.call(e)==s}function Ce(e){return e==null?``:G(e)}function we(e,t,n){var r=e==null?void 0:le(e,t);return r===void 0?n:r}t.exports=we}))(),1),_e=class extends G{toolbarSlot=[];footerSlot=[];componentMetadata;rowPropName=`row`;noDataSlot=[{name:`<<NAME>>_no-data`,component:`ZdText`,cssClass:`no-data`,text:`NO_DATA`}];noResultSlot=[{name:`<<NAME>>_no-result`,component:`ZdText`,cssClass:`no-result`,text:`NO_RESULT`}];height=`auto`;minHeight=`auto`;maxHeight=`none`;fillHeight=!1;width=`100%`;minWidth=`auto`;maxWidth=`none`;errorSlot=[];constructor(e){super(e),this.toolbarSlot=e.toolbarSlot||this.toolbarSlot,this.footerSlot=e.footerSlot||this.footerSlot,this.componentMetadata=this.getInitValue(`componentMetadata`,e.componentMetadata,this.componentMetadata),this.rowPropName=this.getInitValue(`rowPropName`,e.rowPropName,this.rowPropName),this.noDataSlot=e.noDataSlot||this.noDataSlot,this.noResultSlot=e.noResultSlot||this.noResultSlot,this.errorSlot=e.errorSlot||this.errorSlot,this.noDataSlot=this.changeDefaultSlotNames(this.noDataSlot),this.noResultSlot=this.changeDefaultSlotNames(this.noResultSlot),this.height=this.getInitValue(`height`,e.height,this.height),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.fillHeight=this.getInitValue(`fillHeight`,e.fillHeight,this.fillHeight),this.width=this.getInitValue(`width`,e.width,this.width),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.createAccessors()}addSlashes(e){return typeof e==`string`?e.replace(/\\/g,`\\\\`).replace(/\t/g,`\\t`).replace(/\n/g,`\\n`).replace(/\f/g,`\\f`).replace(/\r/g,`\\r`).replace(/"/g,`\\"`):e}getComponentMetadata(e){let t=RegExp(`<<${this.rowPropName}.(.[A-z]+?)>>|"<<${this.rowPropName}.(.[A-z]+?)>>"`,`g`),n=RegExp(`"<<${this.rowPropName}>>"`,`g`),r=JSON.stringify(this.componentMetadata).replace(n,JSON.stringify(e)).replace(t,t=>{let n=t.replace(/<<|>>|"/g,``).split(`.`).splice(1).join(`.`),r=this.addSlashes((0,ge.default)(e,n));return typeof r==`string`&&t.startsWith(`"`)&&t.endsWith(`"`)?`"${r}"`:r});return JSON.parse(r)}createColumn(e){return new re(e)}},ve=class extends T{absolute=!1;app=!1;centerSlot=[];color=`primary`;dense=!1;elevation=2;fixed=!1;height=``;leftSlot=[];maxHeight;maxWidth;minHeight;minWidth;padless=!1;rightSlot=[];width;image;order=0;constructor(e){super(e),this.absolute=this.getInitValue(`absolute`,e.absolute,this.absolute),this.app=this.getInitValue(`app`,e.app,this.app),this.centerSlot=e.centerSlot||this.centerSlot,this.color=this.getInitValue(`color`,e.color,this.color),this.dense=this.getInitValue(`dense`,e.dense,this.dense),this.elevation=this.getInitValue(`elevation`,e.elevation,this.elevation),this.fixed=this.getInitValue(`fixed`,e.fixed,this.fixed),this.height=this.getInitValue(`height`,e.height,this.height),this.leftSlot=e.leftSlot||this.leftSlot,this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.padless=this.getInitValue(`padless`,e.padless,this.padless),this.rightSlot=e.rightSlot||this.rightSlot,this.width=this.getInitValue(`width`,e.width,this.width),this.image=this.getInitValue(`image`,e.image,this.image),this.order=this.getInitValue(`order`,e.order,this.order)}get namedSlotsIsVisible(){return this.leftSlot.length||this.centerSlot.length||this.rightSlot.length}},ye=class extends T{cols=`12`;sm;md;lg;xl;offset;height=`auto`;minHeight=`auto`;maxHeight=`none`;constructor(e){super(e),this.cols=this.getInitValue(`cols`,e.cols,this.cols),this.sm=this.getInitValue(`sm`,e.sm,this.sm),this.md=this.getInitValue(`md`,e.md,this.md),this.lg=this.getInitValue(`lg`,e.lg,this.lg),this.xl=this.getInitValue(`xl`,e.xl,this.xl),this.offset=this.getInitValue(`offset`,e.offset,this.offset),this.height=this.getInitValue(`height`,e.height,this.height),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight)}},be=class extends T{fullHeight=!1;scrollable=!1;tag=`main`;height=`100%`;constructor(e){super(e),this.fullHeight=this.getInitValue(`fullHeight`,e.fullHeight,this.fullHeight),this.scrollable=this.getInitValue(`scrollable`,e.scrollable,this.scrollable),this.tag=this.getInitValue(`tag`,e.tag,this.tag),this.height=this.getInitValue(`height`,e.height,this.height)}},xe=class extends C{text=`Loading`;defaultText;opacity=.5;isVisible=!1;zIndex=1999;constructor(e){super(e),this.text=this.getInitValue(`text`,e.text,this.text),this.zIndex=this.getInitValue(`zIndex`,e.zIndex,this.zIndex),this.defaultText=this.text}show(e){e?this.text=e:this.text=this.defaultText,this.isVisible=!0}hide(){this.isVisible=!1}},Se=class extends T{backgroundStyle=``;bottomLink=[];cardWidth=`33%`;color=``;layout=`center`;logo=``;logoMessage=``;poweredByImage=``;poweredByImageCard=``;flatForm=!1;socialLogin=[];constructor(e){super(e),this.backgroundStyle=this.getInitValue(`backgroundStyle`,e.backgroundStyle,this.backgroundStyle),this.bottomLink=e.bottomLink||this.bottomLink,this.cardWidth=this.getInitValue(`cardWidth`,e.cardWidth,this.cardWidth),this.color=this.getInitValue(`color`,e.color,this.color),this.layout=this.getInitValue(`layout`,e.layout,this.layout),this.logo=this.getInitValue(`logo`,e.logo,this.logo),this.logoMessage=this.getInitValue(`logoMessage`,e.logoMessage,this.logoMessage),this.poweredByImage=this.getInitValue(`poweredByImage`,e.poweredByImage,this.poweredByImage),this.poweredByImageCard=this.getInitValue(`poweredByImageCard`,e.poweredByImageCard,this.poweredByImageCard),this.flatForm=this.getInitValue(`flatForm`,e.flatForm,this.flatForm),this.socialLogin=e.socialLogin||this.socialLogin,this.createAccessors()}},Y=class extends O{parent=void 0;authUrl=``;redirectUrl=t.Config.homeUrl;requestParams={};constructor(e){super(e),this.authUrl=t.Config.env?.authUrl||e.authUrl,this.redirectUrl=this.getInitValue(`redirectUrl`,e.redirectUrl,this.redirectUrl),this.requestParams=this.getInitValue(`requestParams`,e.requestParams,this.requestParams),this.createAccessors()}async click(e,t){try{if((await this.parent?.validate())?.valid&&this.parent){let n=this.parent.value,r=await this.sendRequest(n);this.handleLoginSuccess(e,t,r)}}catch(n){this.handleLoginFail(e,t,n)}}async sendRequest(e){return t.Http.post(this.authUrl,this.getQueryString(e),{headers:{"Content-Type":`application/x-www-form-urlencoded`}})}getQueryString(e){let t={...this.requestParams,...e},n=new URLSearchParams;return Object.keys(t).forEach(e=>{n.set(e,t[e])}),n.toString()}handleLoginSuccess(e,n,r){if(r.status===200){let i=!1;i=this.callEvent(`loginSuccess`,{element:n,response:r,event:e,component:this}),i||(t.Cookie.setCookie(`token`,r.data.token),t.Router.replace(this.redirectUrl))}else this.handleLoginFail(e,n,r)}handleLoginFail(e,t,n){this.callEvent(`loginFail`,{element:t,error:n,event:e,component:this})}},Ce=class extends T{app=!1;absolute=!1;clipped=!1;fixed=!1;floating=!1;permanent=!1;dense=!0;mini=!1;miniWidth=58;miniState=!1;temporary=!1;menuItems=[];closeToMini=!0;showSearch=!1;isLocal=!1;drawer;openedInitialValue;mouseOver=!1;width=256;mobileBreakpoint=600;topSlot=[];routes={};selectedPath=``;selectedItems=[];menuItemsUrl=``;openingMenuTimeout;showTooltip=!1;tooltipText=``;tooltipAnchor;tooltipContentProps={};filteredMenuItems=[];searchValue=``;currentItem=null;cache=!1;disableRouteWatcher=!1;constructor(e){super(e),this.app=this.getInitValue(`app`,e.app,this.app),this.absolute=this.getInitValue(`absolute`,e.absolute,this.absolute),this.clipped=this.getInitValue(`clipped`,e.clipped,this.clipped),this.fixed=this.getInitValue(`fixed`,e.fixed,this.fixed),this.floating=this.getInitValue(`floating`,e.floating,this.floating),this.dense=this.getInitValue(`dense`,e.dense,this.dense),this.mini=this.getInitValue(`mini`,e.mini,this.mini),this.miniState=this.getInitValue(`miniState`,e.miniState,this.miniState),this.miniWidth=this.getInitValue(`miniWidth`,e.miniWidth,this.miniWidth),this.temporary=this.getInitValue(`temporary`,e.temporary,this.temporary),this.menuItems=e.items||this.menuItems,this.menuItems.length&&this.saveLinkRoutes(this.menuItems),this.menuItemsUrl=this.getInitValue(`itemsUrl`,e.itemsUrl,this.menuItemsUrl),this.isLocal=this.getInitValue(`isLocal`,e.isLocal,this.isLocal),this.closeToMini=this.getInitValue(`closeToMini`,e.closeToMini,this.closeToMini),this.showSearch=this.getInitValue(`showSearch`,e.showSearch,this.showSearch),this.width=this.getInitValue(`width`,e.width,this.width),this.cache=this.getInitValue(`cache`,e.cache,this.cache),this.disableRouteWatcher=this.getInitValue(`disableRouteWatcher`,e.disableRouteWatcher,this.disableRouteWatcher),this.permanent=this.getInitValue(`permanent`,e.permanent,this.permanent),this.mobileBreakpoint=t.Config.mobileBreakpoint||600,this.drawer=window.innerWidth>Number(this.mobileBreakpoint),this.openedInitialValue=this.getInitValue(`opened`,e.opened,this.opened),this.openedInitialValue!==void 0&&(this.opened=this.openedInitialValue),this.topSlot=e.topSlot||this.topSlot}get itemsUrl(){return this.menuItemsUrl}set itemsUrl(e){this.menuItemsUrl!==e&&(this.menuItemsUrl=e,e?this.loadMetadata(e):(this.items=[],this.routes={}))}get items(){return this.searchValue?this.filteredMenuItems:this.menuItems}set items(e){this.menuItems=e,this.saveLinkRoutes(e),this.selectedPath&&this.routes[this.selectedPath]&&this.selectItem(this.routes[this.selectedPath])}get opened(){return this.drawer}set opened(e){this.drawer=e}onMounted(e){super.onMounted(e),this.itemsUrl&&this.loadMetadata(this.itemsUrl)}async loadMetadata(e){this.items=await t.Metadata.get(e,!!this.isLocal,this.cache)}saveLinkRoutes(e,t=[]){e.forEach(e=>{e.component===`ZdMenuLink`?this.routes[e.route]=t.concat([e]):e.component===`ZdMenuGroup`&&this.saveLinkRoutes(e.items,t.concat([e]))})}toggleMenu(){let e=window.innerWidth<=Number(this.mobileBreakpoint);this.closeToMini&&!e?(this.miniState=!this.miniState,this.miniState?this.closeAllMenus():this.openSelectedTree(),this.opened=!0):this.opened=!this.opened}closeAllMenus(){this.items.forEach(e=>{if(e.component===`ZdMenuGroup`){e.opened=!1;try{t.Metadata.getInstance(e.name).close()}catch{}}})}selectPath(e){this.selectedPath=e,this.routes[e]&&this.selectItem(this.routes[e])}selectItem(e){this.selectedItems=e,this.openSelectedTree()}isSelected(e){return this.selectedItems.filter(t=>t.name===e.name).length>0}menuMouseEnter(){this.miniState&&(this.openingMenuTimeout=setTimeout(()=>{this.mouseOver=!0,this.openSelectedTree()},200))}openSelectedTree(){this.selectedItems.forEach(e=>{if(e.component===`ZdMenuGroup`){e.opened=!0;try{t.Metadata.getInstance(e.name).open()}catch{}}})}menuMouseLeave(){this.mouseOver=!1,this.showTooltip=!1,clearTimeout(this.openingMenuTimeout),this.miniState&&this.closeAllMenus()}urlChanged(e){this.selectPath(e.path)}get search(){return this.searchValue}set search(e){this.searchValue=e,this.doSearch()}clearSearch(){this.search=``}doSearch(){let e=this.menuItems;this.filteredMenuItems=[],this.searchValue&&this.searchItems(e)}getAccessorValue(e){let[n,r]=t.Accessor.getAccessor(e);return t.Loader.getInstance(n)[r]}isItemVisible(e){return typeof e.isVisible==`string`?this.getAccessorValue(e.isVisible):e.isVisible!==!1}searchItems(e){e.forEach(e=>{this.isItemVisible(e)&&(e.component===`ZdMenuGroup`?this.searchItems(e.items):t.Utils.normalize(t.I18n.translate(e.label)).indexOf(t.Utils.normalize(this.searchValue))!==-1&&this.filteredMenuItems.push(e))})}},we=class extends O{flat=!0;icon=!0;iconName=`menu`;menuName=``;constructor(e){super(e),this.flat=this.getInitValue(`flat`,e.flat,this.flat),this.icon=this.getInitValue(`icon`,e.icon,this.icon),this.iconName=this.getInitValue(`iconName`,e.iconName,this.iconName),this.menuName=this.getInitValue(`menuName`,e.menuName,this.menuName)}onCreated(){super.onCreated(),this.events.click=()=>{if(this.menuName){let e=t.Metadata.getInstance(this.menuName);e&&e.toggleMenu()}}}},Te=class extends T{label=``;icon=``;items=[];opened=!1;parentMenu;parentGroup;expandIcon=`expand`;constructor(e){super(e),this.label=this.getInitValue(`label`,e.label,this.label),this.icon=this.getInitValue(`icon`,e.icon,this.icon),this.items=e.items,this.opened=this.getInitValue(`opened`,e.opened,this.opened),this.parentMenu=e.parentMenu,this.parentGroup=e.parentGroup,this.expandIcon=this.getInitValue(`expandIcon`,e.expandIcon,this.expandIcon)}isSelected(){return this.parentMenu?this.parentMenu.isSelected(this):!1}open(){this.opened=!0}close(){this.opened=!1}click(e){let t=!1;t=this.callEvent(`click`,{event:e||new MouseEvent(`click`),component:this}),t&&e?.preventDefault(),this.setFocus()}focus(e){this.callEvent(`focus`,{event:e,component:this}),this.parentMenu&&(this.parentMenu.currentItem=this)}},Ee=class extends T{label=``;icon=``;route=``;parentMenu;parentGroup;constructor(e){super(e),this.label=this.getInitValue(`label`,e.label,this.label),this.icon=this.getInitValue(`icon`,e.icon,this.icon),this.route=this.getInitValue(`route`,e.route,this.route),this.parentMenu=e.parentMenu,this.parentGroup=e.parentGroup}click(e){let t=!1;t=this.callEvent(`click`,{event:e||new MouseEvent(`click`),component:this}),t&&e?.preventDefault(),this.setFocus()}focus(){this.parentMenu&&(this.parentMenu.currentItem=this)}isSelected(){return this.parentMenu?this.parentMenu.isSelected(this):!1}},De=class extends T{},X=class extends T{activeClass=``;append=!1;color=``;disabled=!1;elevation;flat=!1;height;hover=!1;href;img=``;link=!1;maxHeight=`none`;maxWidth=`none`;minHeight=`auto`;minWidth=`auto`;outlined=!1;raised=!1;ripple=!1;tile=!1;to;width;border=!1;density=`default`;loading=!1;position;replace=!1;round=!1;subtitle;tag;text;title;variant;constructor(e){super(e),this.activeClass=this.getInitValue(`activeClass`,e.activeClass,this.activeClass),this.append=this.getInitValue(`append`,e.append,this.append),this.color=this.getInitValue(`color`,e.color,this.color),this.disabled=this.getInitValue(`disabled`,e.disabled,this.disabled),this.elevation=this.getInitValue(`elevation`,e.elevation,this.elevation),this.flat=this.getInitValue(`flat`,e.flat,this.flat),this.hover=this.getInitValue(`hover`,e.hover,this.hover),this.href=this.getInitValue(`href`,e.href,this.href),this.img=this.getInitValue(`img`,e.img,this.img),this.link=this.getInitValue(`link`,e.link,this.link),this.height=this.getInitValue(`height`,e.height,this.height),this.width=this.getInitValue(`width`,e.width,this.width),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.outlined=this.getInitValue(`outlined`,e.outlined,this.outlined),this.raised=this.getInitValue(`raised`,e.raised,this.raised),this.ripple=this.getInitValue(`ripple`,e.ripple,this.ripple),this.tile=this.getInitValue(`tile`,e.tile,this.tile),this.to=this.getInitValue(`to`,e.to,this.to),this.border=this.getInitValue(`border`,e.border,this.border),this.density=this.getInitValue(`density`,e.density,this.density),this.loading=this.getInitValue(`loading`,e.loading,this.loading),this.position=this.getInitValue(`position`,e.position,this.position),this.replace=this.getInitValue(`replace`,e.replace,this.replace),this.round=this.getInitValue(`round`,e.round,this.round),this.subtitle=this.getInitValue(`subtitle`,e.subtitle,this.subtitle),this.tag=this.getInitValue(`tag`,e.tag,this.tag),this.text=this.getInitValue(`text`,e.text,this.text),this.title=this.getInitValue(`title`,e.title,this.title),this.variant=this.getInitValue(`variant`,e.variant,this.variant)}},Oe=class extends X{disableActionRotate=!1;expandButton;expanded=!1;header=[];hideAction=!1;iconColor=`normal`;iconName=`expand`;lazyLoad=!1;readonly=!1;constructor(e){super(e),this.disableActionRotate=this.getInitValue(`disableActionRotate`,e.disableActionRotate,this.disableActionRotate),this.expandButton=this.getInitValue(`expandButton`,e.expandButton,this.expandButton),this.expanded=this.getInitValue(`expanded`,e.expanded,this.expanded),this.header=this.getInitValue(`header`,e.header,this.header),this.hideAction=this.getInitValue(`hideAction`,e.hideAction,this.hideAction),this.iconColor=this.getInitValue(`iconColor`,e.iconColor,this.iconColor),this.iconName=this.getInitValue(`iconName`,e.iconName,this.iconName),this.lazyLoad=this.getInitValue(`lazyLoad`,e.lazyLoad,this.lazyLoad),this.readonly=this.getInitValue(`readonly`,e.readonly,this.readonly)}change(e,t){this.expanded=!this.expanded,this.callEvent(`change`,{event:e,element:t,component:this})}},ke=class extends T{autoPlay=!1;buttonsOutside=!0;center=!1;currentSlide;events={};fractionPagination=!1;height=`auto`;maxHeight=`none`;minHeight=`auto`;fillHeight=!1;infiniteScroll=!0;initialSlide=0;interval=4e3;keysControl=!0;mouseControl=!1;paginationBackground=!0;pauseOnHover=!0;showArrows=!0;showArrowsOnHover=!1;showPagination=!1;showProgress=!1;slideCssClass=`zd-pa-4`;slidesPerView=1;slidesToSlide=1;touchControl=!0;transitionDuration=300;wheelControl=!1;nextButton={name:`<<NAME>>_nextButton`,component:`ZdButton`,iconName:`next`,icon:!0};prevButton={name:`<<NAME>>_prevButton`,component:`ZdButton`,iconName:`prev`,icon:!0};constructor(e){super(e),this.autoPlay=this.getInitValue(`autoPlay`,e.autoPlay,this.autoPlay),this.buttonsOutside=this.getInitValue(`buttonsOutside`,e.buttonsOutside,this.buttonsOutside),this.center=this.getInitValue(`center`,e.center,this.center),this.height=this.getInitValue(`height`,e.height,this.height),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.fillHeight=this.getInitValue(`fillHeight`,e.fillHeight,this.fillHeight),this.infiniteScroll=this.getInitValue(`infiniteScroll`,e.infiniteScroll,this.infiniteScroll),this.initialSlide=this.getInitValue(`initialSlide`,e.initialSlide,this.initialSlide),this.currentSlide=this.getInitValue(`currentSlide`,e.currentSlide,this.initialSlide),this.interval=this.getInitValue(`interval`,e.interval,this.interval),this.keysControl=this.getInitValue(`keysControl`,e.keysControl,this.keysControl),this.mouseControl=this.getInitValue(`mouseControl`,e.mouseControl,this.mouseControl),this.nextButton=e.nextButton||this.nextButton,this.fractionPagination=this.getInitValue(`fractionPagination`,e.fractionPagination,this.fractionPagination),this.paginationBackground=this.getInitValue(`paginationBackground`,e.paginationBackground,this.paginationBackground),this.pauseOnHover=this.getInitValue(`pauseOnHover`,e.pauseOnHover,this.pauseOnHover),this.prevButton=e.prevButton||this.prevButton,this.showArrowsOnHover=this.getInitValue(`showArrowsOnHover`,e.showArrowsOnHover,this.showArrowsOnHover),this.showArrows=this.getInitValue(`showArrows`,e.showArrows,this.showArrows),this.showPagination=this.getInitValue(`showPagination`,e.showPagination,this.showPagination),this.showProgress=this.getInitValue(`showProgress`,e.showProgress,this.showProgress),this.slideCssClass=this.getInitValue(`slideCssClass`,e.slideCssClass,this.slideCssClass),this.slidesPerView=this.getInitValue(`slidesPerView`,e.slidesPerView,this.slidesPerView),this.slidesToSlide=this.getInitValue(`slidesToSlide`,e.slidesToSlide,this.slidesToSlide),this.touchControl=this.getInitValue(`touchControl`,e.touchControl,this.touchControl),this.transitionDuration=this.getInitValue(`transitionDuration`,e.transitionDuration,this.transitionDuration),this.wheelControl=this.getInitValue(`wheelControl`,e.wheelControl,this.wheelControl),this.prevButton=this.changeDefaultButtonName(this.prevButton),this.nextButton=this.changeDefaultButtonName(this.nextButton),this.createAccessors(),e.events&&(this.events={...e.events})}slideTo(e){let t=this.children.length;this.currentSlide=e<0?(e+t)%t:e%t}slideNext(){let e=this.children.length;(this.infiniteScroll||this.currentSlide<e-1)&&this.slideTo(this.currentSlide+this.slidesToSlide)}slidePrev(){(this.infiniteScroll||this.currentSlide>0)&&this.slideTo(this.currentSlide-this.slidesToSlide)}beforeSlide(e,t,n){this.callEvent(`beforeSlide`,{event:n,element:e,slideData:t,component:this})}slide(e,t,n){this.callEvent(`slide`,{event:n,element:e,slideData:t,component:this})}changeDefaultButtonName(e){return e.name=e.name.replace(`<<NAME>>`,this.name),e}},Ae=class extends G{caption={label:``,isVisible:!1,align:`left`};fillWidth=!1;showTableHead=!0;height=`auto`;minHeight=`auto`;maxHeight=`none`;constructor(e){super(e),this.caption={...this.caption,...e.caption||{}},this.fillWidth=this.getInitValue(`fillWidth`,e.fillWidth,this.fillWidth),this.showTableHead=this.getInitValue(`showTableHead`,e.showTableHead,this.showTableHead),this.height=this.getInitValue(`height`,e.height,this.height),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight)}createColumn(e){return new re(e)}},je=class extends C{disabled=!1;tabTitle=``;lazyLoad=!0;color=`primary`;dense=!0;direction=`horizontal`;fixed=!1;iconName;rounded=!1;selectedClass=`zd-tab--selected`;value=void 0;variant=`text`;width;constructor(e){super(e),this.tabTitle=this.getInitValue(`tabTitle`,e.tabTitle,this.tabTitle),this.disabled=this.getInitValue(`disabled`,e.disabled,this.disabled),this.lazyLoad=this.getInitValue(`lazyLoad`,e.lazyLoad,this.lazyLoad),this.color=this.getInitValue(`color`,e.color,this.color),this.dense=this.getInitValue(`dense`,e.dense,this.dense),this.direction=this.getInitValue(`direction`,e.direction,this.direction),this.fixed=this.getInitValue(`fixed`,e.fixed,this.fixed),this.iconName=this.getInitValue(`iconName`,e.iconName,this.iconName),this.rounded=this.getInitValue(`rounded`,e.rounded,this.rounded),this.selectedClass=this.getInitValue(`selectedClass`,e.selectedClass,this.selectedClass),this.value=this.getInitValue(`value`,e.value,this.value),this.variant=this.getInitValue(`variant`,e.variant,this.variant),this.width=this.getInitValue(`width`,e.width,this.width),this.createAccessors()}},Me=class extends Error{constructor(e,t){super(`Tab ${e} not found on parent ${t}`)}},Ne=class extends T{activeTabValue=0;tabs=[];height=`auto`;minHeight=`auto`;maxHeight=`none`;color=`primary`;backgroudColor;dense=!0;direction=`horizontal`;disabled=!1;grow=!1;max;constructor(e){super(e),this.tabs=this.getTabs(e.tabs||[]),this.activeTab=this.getInitValue(`activeTab`,e.activeTab,this.activeTabValue),this.height=this.getInitValue(`height`,e.height,this.height),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.color=this.getInitValue(`color`,e.color,this.color),this.backgroudColor=this.getInitValue(`backgroudColor`,e.backgroudColor,this.backgroudColor),this.dense=this.getInitValue(`dense`,e.dense,this.dense),this.direction=this.getInitValue(`direction`,e.direction,this.direction),this.disabled=this.getInitValue(`disabled`,e.disabled,this.disabled),this.grow=this.getInitValue(`grow`,e.grow,this.grow),this.max=this.getInitValue(`max`,e.max,this.max)}get activeTab(){if(this.activeTabValue>=0&&!this.tabs[this.activeTabValue]?.isVisible){let e=this.tabs.findIndex(e=>e.isVisible);e>-1&&(this.activeTabValue=e)}return this.activeTabValue}set activeTab(e){this.activeTabValue=e}getTabs(e){return e.map(e=>new je(e))}getTab(e){let t=this.tabs.find(t=>t.name===e);if(!t)throw new Me(e,this.name);return t}nextTab(e=!1){e?this.activeTab=(this.activeTab+1)%this.tabs.length:this.activeTab<this.tabs.length-1&&(this.activeTab+=1)}previousTab(e=!1){if(e){let e=(this.activeTab-1)%this.tabs.length;this.activeTab=e>=0?e:e+this.tabs.length}else this.activeTab>0&&--this.activeTab}beforeChange(e,t,n){this.callEvent(`beforeChange`,{event:e,element:n,tabIndex:t,component:this})}change(e,t){this.callEvent(`change`,{event:e,element:t,component:this})}},Pe=class extends T{tag=``;constructor(e){super(e),this.tag=this.getInitValue(`tag`,e.tag,this.tag)}},Z=class extends T{tag=`p`;text=[];compile=!1;constructor(e){super(e),this.tag=this.getInitValue(`tag`,e.tag,this.tag),this.text=this.getInitValue(`text`,e.text,this.text),this.compile=e.compile===!0}},Fe=class extends T{color=``;dense=!1;disabled=!1;iconName=``;large=!1;left=!1;right=!1;size=``;small=!1;tag=`i`;constructor(e){super(e),this.color=this.getInitValue(`color`,e.color,this.color),this.dense=this.getInitValue(`dense`,e.dense,this.dense),this.disabled=this.getInitValue(`disabled`,e.disabled,this.disabled),this.iconName=this.getInitValue(`iconName`,e.iconName,this.iconName),this.large=this.getInitValue(`large`,e.large,this.large),this.left=this.getInitValue(`left`,e.left,this.left),this.right=this.getInitValue(`right`,e.right,this.right),this.size=this.getInitValue(`size`,e.size,this.size),this.small=this.getInitValue(`small`,e.small,this.small),this.tag=this.getInitValue(`tag`,e.tag,this.tag),this.createAccessors()}},Ie=class extends T{height=`auto`;maxHeight=`none`;minHeight=`auto`;width=`100%`;minWidth=`auto`;maxWidth=`none`;fluid=!0;scrollView=!1;tag=`div`;constructor(e){super(e),this.fluid=this.getInitValue(`fluid`,e.fluid,this.fluid),this.scrollView=this.getInitValue(`scrollView`,e.scrollView,this.scrollView),this.height=this.getInitValue(`height`,e.height,this.height),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.width=this.getInitValue(`width`,e.width,this.width),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.tag=this.getInitValue(`tag`,e.tag,this.tag)}},Le=class extends T{height=`auto`;minHeight=`auto`;maxHeight=`none`;width=`auto`;minWidth=`auto`;maxWidth=`none`;language=`ts`;showLineNumbers=!0;copyIcon=`content-copy`;tooltipText=t.I18n.instance.t(`COPY`);code=``;staticCodeValue=``;viewHighlight;setViewHighlight(e){this.viewHighlight=e}constructor(e){super(e),this.staticCode=this.getInitValue(`staticCode`,e.staticCode,this.staticCodeValue),this.copyIcon=this.getInitValue(`copyIcon`,e.copyIcon,this.copyIcon),this.height=this.getInitValue(`height`,e.height,this.height),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.width=this.getInitValue(`width`,e.width,this.width),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.language=this.getInitValue(`language`,e.language,this.language),this.showLineNumbers=this.getInitValue(`showLineNumbers`,e.showLineNumbers,this.showLineNumbers)}get staticCode(){return this.staticCodeValue}set staticCode(e){this.staticCodeValue=e,this.code=this.getCode()}getCode(){let e=``;return this.staticCodeValue&&(e=this.staticCodeValue,Array.isArray(e)?e=e.map(e=>typeof e==`object`?JSON.stringify(e,null,2):e).join(`
|
|
10
|
+
`):typeof e==`object`&&(e=JSON.stringify(e,null,2))),e}async copyToClipboard(){let e=this.code;if(navigator.clipboard)return await navigator.clipboard.writeText(e),this.changeTooltipText(),Promise.resolve();let t=document.createElement(`span`);t.textContent=e,t.style.whiteSpace=`pre`,t.style.opacity=`0`,document.body.appendChild(t);let n=window.getSelection(),r=window.document.createRange(),i=!1;return n&&(n.removeAllRanges(),r.selectNode(t),n.addRange(r),i=window.document.execCommand(`copy`),n.removeAllRanges(),window.document.body.removeChild(t)),i&&this.changeTooltipText(),i?Promise.resolve():Promise.reject()}changeTooltipText(){this.tooltipText=t.I18n.instance.t(`COPIED`),setTimeout(()=>{this.tooltipText=t.I18n.instance.t(`COPY`)},2e3)}getHighlightedCode(){if(!this.viewHighlight)throw new t.MethodNotAssignedError(`viewHighlight`);return this.viewHighlight(this.code,this.language)}get lineNumbersCount(){let e=this.code.split(/\r\n|\n/).length;return(this.code.endsWith(`
|
|
11
|
+
`)||!this.code)&&--e,e}},Re=class extends M{dataColor=``;dataLabel=``;datasource;dataValue=``;vertical=!0;constructor(e){super(e),this.dataColor=this.getInitValue(`dataColor`,e.dataColor,this.dataColor),this.dataLabel=this.getInitValue(`dataLabel`,e.dataLabel,this.dataLabel),this.dataValue=this.getInitValue(`dataValue`,e.dataValue,this.dataValue),this.vertical=this.getInitValue(`vertical`,e.vertical,this.vertical),e.datasource&&e.datasource.type===`simple`&&(this.dataValue=`value`,this.dataLabel=this.dataValue),this.datasource=this.getInitValue(`datasource`,e.datasource,this.datasource),this.datasource=t.DatasourceFactory.factory(this.datasource),this.createAccessors()}onBeforeDestroy(){super.onBeforeDestroy(),this.datasource.destroy()}onCreated(){super.onCreated(),this.datasource.initialize()}};k.register(`ZdRadio`,Re);var ze=class extends T{align;dense=!0;justify;noGutters=!1;height=`auto`;minHeight=`auto`;maxHeight=`none`;constructor(e){super(e),this.align=this.getInitValue(`align`,e.align,this.align),this.dense=this.getInitValue(`dense`,e.dense,this.dense),this.justify=this.getInitValue(`justify`,e.justify,this.justify),this.noGutters=this.getInitValue(`noGutters`,e.noGutters,this.noGutters),this.height=this.getInitValue(`height`,e.height,this.height),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight)}},Q=class extends T{absolute=!1;app=!1;centerSlot=[];color=`primary`;fixed=!1;height=`auto`;inset=!1;leftSlot=[];maxHeight;maxWidth;minHeight;minWidth;padless=!1;rightSlot=[];width;constructor(e){super(e),this.absolute=this.getInitValue(`absolute`,e.absolute,this.absolute),this.app=this.getInitValue(`app`,e.app,this.app),this.centerSlot=e.centerSlot||this.centerSlot,this.color=this.getInitValue(`color`,e.color,this.color),this.dark=this.getInitValue(`dark`,e.dark,this.dark),this.fixed=this.getInitValue(`fixed`,e.fixed,this.fixed),this.height=this.getInitValue(`height`,e.height,this.height),this.inset=this.getInitValue(`inset`,e.inset,this.inset),this.leftSlot=e.leftSlot||this.leftSlot,this.light=this.getInitValue(`light`,e.light,this.light),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.padless=this.getInitValue(`padless`,e.padless,this.padless),this.rightSlot=e.rightSlot||this.rightSlot,this.width=this.getInitValue(`width`,e.width,this.width),this.createAccessors()}get namedSlotsIsVisible(){return this.leftSlot.length||this.centerSlot.length||this.rightSlot.length}},Be=class extends P{autoGrow=!1;backgroundColor=``;clearIcon=`clear`;counter;filled=!1;loading=!1;resize=!1;rounded=!1;rowHeight=24;rows=5;height=`auto`;minHeight=`auto`;maxHeight=`none`;fillHeight=!1;constructor(e){super(e),this.autoGrow=this.getInitValue(`autoGrow`,e.autoGrow,this.autoGrow),this.backgroundColor=this.getInitValue(`backgroundColor`,e.backgroundColor,this.backgroundColor),this.clearIcon=this.getInitValue(`clearIcon`,e.clearIcon,this.clearIcon),this.counter=this.getInitValue(`counter`,e.counter,this.counter),this.filled=this.getInitValue(`filled`,e.filled,this.filled),this.loading=this.getInitValue(`loading`,e.loading,this.loading),this.resize=this.getInitValue(`resize`,e.resize,this.resize),this.rounded=this.getInitValue(`rounded`,e.rounded,this.reverse),this.rowHeight=this.getInitValue(`rowHeight`,e.rowHeight,this.rowHeight),this.rows=this.getInitValue(`rows`,e.rows,this.rows),this.height=this.getInitValue(`height`,e.height,this.height),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.fillHeight=this.getInitValue(`fillHeight`,e.fillHeight,this.fillHeight),this.createAccessors(),this.counter&&!Number.isNaN(parseInt(this.counter.toString(),10))&&this.addValidation(`maxLength`,{limit:parseInt(this.counter.toString(),10)})}};k.register(`ZdTextarea`,Be);var Ve=class extends M{falseValue=!1;trueValue=!0;constructor(e){super(e),this.falseValue=this.getInitValue(`falseValue`,e.falseValue,this.falseValue),this.trueValue=this.getInitValue(`trueValue`,e.trueValue,this.trueValue),this.createAccessors()}toggleValue(){this.value===this.trueValue?this.value=this.falseValue:this.value=this.trueValue}},He=class extends Ve{inset=!1;constructor(e){super(e),this.inset=this.getInitValue(`inset`,e.inset,this.inset),this.createAccessors()}};k.register(`ZdSwitch`,He);var Ue=class extends Ve{constructor(e){super(e),this.showHelper=!1,this.createAccessors()}};k.register(`ZdCheckbox`,Ue);var We=class extends T{bottom=!1;disabled=!1;label=``;left=!1;maxWidth=void 0;minWidth=void 0;nudge=10;openOnClick=!1;openOnFocus=!0;openOnHover=!0;right=!1;top=!1;constructor(e){super(e),this.bottom=this.getInitValue(`bottom`,e.bottom,this.bottom),this.disabled=this.getInitValue(`disabled`,e.disabled,this.disabled),this.left=this.getInitValue(`left`,e.left,this.left),this.label=this.getInitValue(`label`,e.label,this.label),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.nudge=this.getInitValue(`nudge`,e.nudge,this.nudge),this.openOnClick=this.getInitValue(`openOnClick`,e.openOnClick,this.openOnClick),this.openOnFocus=this.getInitValue(`openOnFocus`,e.openOnFocus,this.openOnFocus),this.openOnHover=this.getInitValue(`openOnHover`,e.openOnHover,this.openOnHover),this.right=this.getInitValue(`right`,e.right,this.right),this.top=this.getInitValue(`top`,e.top,this.top)}},$=class extends T{absolute=!1;activator;closeOnContentClick=!0;closeOnClick=!0;cursor=``;disabled=!1;hover=!1;height=`auto`;maxHeight=`none`;maxWidth=`none`;minHeight=`auto`;minWidth=`auto`;offsetX=!1;offsetY=!1;openOnClick=!0;openOnHover=!1;value;constructor(e){super(e),this.absolute=this.getInitValue(`absolute`,e.absolute,this.absolute),this.activator=this.getInitValue(`activator`,e.activator,this.activator),this.children=this.getInitValue(`children`,e.children,this.children),this.cursor=this.getInitValue(`cursor`,e.cursor,this.cursor),this.closeOnContentClick=this.getInitValue(`closeOnContentClick`,e.closeOnContentClick,this.closeOnContentClick),this.closeOnClick=this.getInitValue(`closeOnClick`,e.closeOnClick,this.closeOnClick),this.disabled=this.getInitValue(`disabled`,e.disabled,this.disabled),this.hover=this.getInitValue(`hover`,e.hover,this.hover),this.height=this.getInitValue(`height`,e.height,this.height),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.offsetX=this.getInitValue(`offsetX`,e.offsetX,this.offsetX),this.offsetY=this.getInitValue(`offsetY`,e.offsetY,this.offsetY),this.openOnClick=this.getInitValue(`openOnClick`,e.openOnClick,this.openOnClick),this.openOnHover=this.getInitValue(`openOnHover`,e.openOnHover,this.openOnHover),this.value=this.getInitValue(`value`,e.value,this.value),this.createAccessors()}},Ge=class extends q{insertedValues=[];insertsRemoved=[];maxRows=void 0;limit=null;showSelectAll=!1;showCheckboxAll=!1;constructor(e){super(e),this.selectValue||=[],this.showSelectAll=this.getInitValue(`showSelectAll`,e.showSelectAll,this.showSelectAll),this.maxRows=this.getInitValue(`maxRows`,e.maxRows,this.maxRows),this.limit=this.getInitValue(`limit`,e.limit,this.limit),this.showCheckboxAll=this.getInitValue(`showCheckboxAll`,e.showCheckboxAll,this.showCheckboxAll),this.checkboxAll=this.getInitValue(`checkboxAll`,e.checkboxAll,this.checkboxAll),Array.isArray(this.dataText)||(this.dataText=[this.dataText]),this.internalDisplayValue=this.getDisplayValue(),this.createAccessors(),this.autoSelection=!1}selectValue=[];updateSelectValue(e){if(Array.isArray(e)){if(!this.manualMode){let t=e.map(e=>e[this.dataValue]);if(t.length){let e=this.cutFromAToB(this.insertedValues,this.insertsRemoved,e=>!t.includes(e[this.dataValue]));this.insertedValues=e.updatedSource,this.insertsRemoved=e.updatedDestination,e=this.cutFromAToB(this.insertsRemoved,this.insertedValues,e=>t.includes(e[this.dataValue])),this.insertsRemoved=e.updatedSource,this.insertedValues=e.updatedDestination}else this.insertsRemoved=this.insertedValues,this.insertedValues=[]}this.selectValue=e}}checkboxAllValue=!1;get checkboxAll(){return this.checkboxAllValue}set checkboxAll(e){this.showCheckboxAll&&(this.disabled=e),this.checkboxAllValue=e}cutFromAToB(e,t,n){let r=[...e],i=[...t],a=r.filter(n);return{updatedSource:r.filter(e=>!n(e)),updatedDestination:[...i,...a]}}getCondition(e){return t=>t[this.dataValue]===e}async setFieldValue(e){let t=[],n=[],r=!1;e.forEach(e=>{let r;r=e&&typeof e==`object`?e[this.dataValue]:e;let i=this.datasource.data.find(this.getCondition(r));i?t.push(i):this.manualMode||n.push(r)});let i=async e=>{e&&(t.push(e),this.datasource.data.unshift(e),this.insertedValues.push(e),r=!0)};if(this.searchParam!==`SEARCH`)(await this.getItemsBySearchValue(n)).forEach(i);else{let e=n.map(async e=>{let[t]=await this.getItemsBySearchValue(e);i(t)});await Promise.all(e)}return t.length>0?this.setFieldRowValue(t):this.setFieldRowValue([]),r}setFieldRowValue(e){e.length>0?this.pushedValue=this.getValues(e):this.pushedValue=[],this.selectValue=e}async setValue(e,t=!0){Array.isArray(e)&&e.length>0?await this.setFieldValue(e):(this.pushedValue=[],this.selectValue=[]),this.updateSelectValue(this.selectValue),this.internalDisplayValue=this.getDisplayValue(),t&&this.callChangeEvent(this.pushedValue)}getDisplayValue(){return this.formatter(this.selectValue).map(e=>e.text)}getValue(e){return this.getValues(e)}getValues(e){return!e||e.length===0?[]:this.returnObject?e:e.map(e=>e[this.dataValue])}async updateSearch(e){let t=this.parserFn(e,this);t!==this.datasource.search&&await this.datasource.setSearch(t)}insertSelected(){this.manualMode||(this.insertedValues=[],this.selectValue.forEach(e=>{let t=e[this.dataValue];this.datasource.data.find(this.getCondition(t))||(this.datasource.data.unshift(e),this.insertedValues.push(e))}))}removePushedValue(){this.removeInserts()}async doSearch(e){this.manualMode||e?await this.updateSearch(e):(this.datasource.search=e,this.manualMode||(this.datasource.data=[...this.cachedData],this.datasource.total=this.cachedTotal),this.removeInserts(),this.insertSelected())}removeInserts(){let e=this.insertsRemoved.map(e=>e[this.dataValue]);this.datasource.data=this.datasource.data.filter(t=>!e.includes(t[this.dataValue])),this.insertsRemoved=[]}formatter(e){if(!e||e.length===0)return[];let n=t.FormatterParserProvider.getFormatter(`ZdSelect`);return e.map(e=>{let t=this.dataDisabled&&e[this.dataDisabled],r={value:e[this.dataValue],disabled:t,originalRow:e};return r.text=n(e,this),r})}getMoreChipText(e){return t.I18n.translate(`MORE_ITEM`,{count:e})}showLoadMore(){return!!this.datasource.data.length&&!this.datasource.loading&&!this.datasource.loadAll&&this.datasource.data.length-this.insertedValues.length-this.insertsRemoved.length<this.datasource.total}async loadMore(){await this.datasource.setLimit(this.datasource.limit+this.loadMoreAmount),this.insertsRemoved=this.insertsRemoved.filter(e=>{let t=e[this.dataValue];return!this.datasource.data.find(this.getCondition(t))}),this.datasource.search||this.setCache(),this.removePushedValue()}blur(e,t){super.blur(e,t),this.autocomplete&&(this.search=``,this.removeInserts(),this.insertSelected())}onSelectAll(e,t,n){e?(this.callEvent(`selectedAll`,{event:t,element:n,component:this}),t.defaultPrevented||this.selectAllItems()):(this.callEvent(`unselectedAll`,{event:t,element:n,component:this}),t.defaultPrevented||this.unSelectAllItems())}async selectAllItems(){this.datasource.data.length<this.datasource.total&&(this.datasource.loadAll=!0,await this.datasource.get());let e=this.datasource.data.filter(e=>!(e[this.dataDisabled]||this.disabledItems.map(e=>typeof e==`object`?e[this.dataValue]:e).includes(e[this.dataValue])));this.setValue(e),this.datasource.search||this.setCache()}async unSelectAllItems(){if(!this.datasource.search)this.removeInserts(),this.insertSelected(),await this.setValue([]);else{let e=this.insertedValues;await this.setValue(e),this.removeInserts(),this.insertSelected()}}checkValueOnBlur(){this.manualMode||(this.datasource.data=[...this.cachedData],this.datasource.total=this.cachedTotal)}async afterFocus(){this.preventLoadOnFocus||=(await this.datasource.get(),!0),this.setCache(),this.updateSearch(this.dirtySearchValue)}setCache(){if(!this.manualMode){if(this.insertedValues.length){this.datasource.data=_(this.insertedValues.concat(this.datasource.data),this.datasource.uniqueKey);let e=this.insertedValues.map(e=>e[this.dataValue]);this.cachedData=this.datasource.data.filter(t=>!e.includes(t[this.dataValue]))}else this.cachedData=this.datasource.data;this.cachedTotal=this.datasource.total}}registerGetCallback(){this.datasource.registerGetCallback(async()=>{!this.datasource.search&&!this.manualMode&&(this.cachedData=[...this.datasource.data],this.cachedTotal=this.datasource.total),this.insertSelected()})}updateRules(){this.rules=Object.keys(this.parsedValidations).map(e=>t=>{let n=t===void 0?this.value:t,r=this.parsedValidations[e];return r(e===`required`&&this.checkboxAll&&`all`||n)})}getReturnValue(e){return e?this.returnObject?e:e.map(e=>e[this.dataValue]):[]}},Ke=class extends C{buttons=[];maxWidth=560;persistent=!0;text=``;title=``;type=`normal`;confirmButton=`dialogButton`;denyButton=void 0;exit=!1;getDefaultButtons(){return[{name:`dialogButton`,label:`OK`,component:`ZdButton`,events:{click:()=>this.hide()}}]}defaultValues={confirmButton:this.confirmButton,denyButton:this.denyButton,name:this.name,maxWidth:this.maxWidth,persistent:this.persistent,type:this.type,title:this.title,text:this.text,exit:this.exit};constructor(e){super(e),this.assignDialogProperties(e),this.createAccessors()}assignDialogProperties(e){this.buttons=e.buttons?.length?e.buttons:this.getDefaultButtons(),this.confirmButton=this.getInitValue(`confirmButton`,e.confirmButton,this.defaultValues.confirmButton),this.denyButton=this.getInitValue(`denyButton`,e.denyButton,this.defaultValues.denyButton),this.name=this.getInitValue(`name`,e.name,this.defaultValues.name),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.defaultValues.maxWidth),this.persistent=this.getInitValue(`persistent`,e.persistent,this.defaultValues.persistent),this.type=this.getInitValue(`type`,e.type,this.defaultValues.type),this.title=this.getInitValue(`title`,e.title,this.defaultValues.title),this.text=this.getInitValue(`text`,e.text,this.defaultValues.text),this.exit=this.getInitValue(`exit`,e.exit,this.defaultValues.exit),this.isVisible=!1}clickDefaultButtonKeyMapping(){return{enter:{event:()=>{if(this.confirmButton){let e=t.Metadata.getInstance(this.confirmButton);e?.events?.click&&typeof e.events.click==`function`&&e.events.click({component:new O(e)})}},stop:!0,index:89},esc:{event:()=>{if(this.denyButton){let e=t.Metadata.getInstance(this.denyButton);e?.events?.click&&typeof e.events.click==`function`&&e.events.click({component:new O(e)})}else this.hide()},index:89,stop:!0}}}show(){t.KeyMap.bind(this.clickDefaultButtonKeyMapping(),this),this.isVisible=!0}hide(){this.isVisible=!1,t.KeyMap.unbind(this.clickDefaultButtonKeyMapping(),this)}},qe=class extends P{type=`password`;appendIcon=`eyeOff`;onCreated(){super.onCreated();let e=this.events.appendIconClick||(()=>{});this.events.appendIconClick=({event:t,element:n,component:r})=>{this.toggleView(),e&&typeof e==`function`&&e({event:t,element:n,component:r})}}toggleView(){this.type===`password`?(this.type=`text`,this.appendIcon=`eye`):(this.type=`password`,this.appendIcon=`eyeOff`)}};t.FormatterParserProvider.registerFormatter(`ZdPassword`,e=>(e||``).replace(/./g,`*`)),k.register(`ZdPassword`,qe);var Je=class extends Error{constructor(e,t){super(`Item ${e} not found on parent ${t}`)}},Ye=class extends T{color;dense=!1;disabled=!1;divided=!1;items;lines=`one`;elevation=0;openStrategy=`single`;height=`auto`;minHeight=`auto`;maxHeight=`none`;fillHeight=!1;width=`100%`;minWidth=`auto`;maxWidth=`none`;constructor(e){super(e),this.theme=this.getInitValue(`theme`,e.theme,this.theme),this.dense=this.getInitValue(`dense`,e.dense,this.dense),this.disabled=this.getInitValue(`disabled`,e.disabled,this.disabled),this.divided=this.getInitValue(`divided`,e.divided,this.divided),this.items=this.getInitValue(`items`,e.items,this.items),this.lines=this.getInitValue(`lines`,e.lines,this.lines),this.color=this.getInitValue(`color`,e.color,this.color),this.elevation=this.getInitValue(`elevation`,e.elevation,this.elevation),this.openStrategy=this.getInitValue(`openStrategy`,e.openStrategy,this.openStrategy),this.height=this.getInitValue(`height`,e.height,this.height),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.fillHeight=this.getInitValue(`fillHeight`,e.fillHeight,this.fillHeight),this.width=this.getInitValue(`width`,e.width,this.width),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.createAccessors()}getItem(e){let t=this.items.find(t=>t.name===e);if(t)return t;throw new Je(e,this.name)}},Xe=class extends T{appendIcon;disabled=!1;leftField;prependIcon;rightField;ripple=!0;subtitle;lines=`one`;title;dense=!1;constructor(e){super(e),this.appendIcon=this.getInitValue(`appendIcon`,e.appendIcon,this.appendIcon),this.disabled=this.getInitValue(`disabled`,e.disabled,this.disabled),this.leftField=e.leftField||this.leftField,this.prependIcon=this.getInitValue(`prependIcon`,e.prependIcon,this.prependIcon),this.rightField=e.rightField||this.rightField,this.ripple=this.getInitValue(`ripple`,e.ripple,this.ripple),this.subtitle=this.getInitValue(`subtitle`,e.subtitle,this.subtitle),this.lines=this.getInitValue(`lines`,e.lines,this.lines),this.title=this.getInitValue(`title`,e.title,this.title),this.dense=this.getInitValue(`dense`,e.dense,this.dense),this.createAccessors()}},Ze=class extends Xe{items;lazyLoad=!1;opened=!1;constructor(e){super(e),this.items=this.getInitValue(`items`,e.items,this.items),this.lazyLoad=this.getInitValue(`lazyLoad`,e.lazyLoad,this.lazyLoad),this.opened=this.getInitValue(`opened`,e.opened,this.opened),this.appendIcon===void 0&&(this.appendIcon=`expand`),this.createAccessors()}toggle(){this.opened=!this.opened}getItem(e){let t=this.items.find(t=>t.name===e);if(t)return t;throw new Je(e,this.name)}},Qe=class{queue=[];visibleInstances=[];show(e){return this.queue.push(e),(this.visibleInstances.length===0||!this.visibleInstances[0].isVisible)&&this.queue.length===1&&this.display(e),0}display(e){return this.visibleInstances.length===0&&this.visibleInstances.push(new w({name:`alert-instance`,id:0})),this.visibleInstances[0].assignAlertProperties(e),this.visibleInstances[0].show(),0}remove(e){this.queue.splice(e,1),e===0&&this.queue[0]&&setTimeout(()=>this.display(this.queue[0]),200)}},$e=class{queue=[];visibleInstances=[];show(e){return this.queue.push(e),this.display(e)}display(e){let t=(this.visibleInstances.slice(-1)[0]?.id||0)+1,n=new w({...e,id:t});return this.visibleInstances.push(n),n.show(),t}remove(e){this.queue.splice(e,1),this.visibleInstances.splice(e,1)}},et=class{queue=[];visibleInstances=[];show(e){return this.queue.push(e),(this.visibleInstances.length===0||!this.visibleInstances[0].isVisible)&&this.queue.length===1&&this.display(e),this.visibleInstances[0].hide(),this.remove(0),setTimeout(()=>this.display(e),200),0}display(e){return this.visibleInstances.length===0&&this.visibleInstances.push(new w({name:`alert-instance`,id:0})),this.visibleInstances[0].assignAlertProperties(e),this.visibleInstances[0].show(),0}remove(e){this.queue.splice(e,1)}},tt=class e{static alertsManager;static instantiateManager(e){return e===`queue`?new Qe:e===`stack`?new $e:new et}static registerManager(t){e.alertsManager=t}static show(t){return e.alertsManager.show(t)}static hide(t=0){e.alertsManager.visibleInstances[t].hide(),e.remove(t)}static hideById(t){let n=e.alertsManager.visibleInstances.findIndex(e=>e.id===t);e.hide(n)}static hideAll(){let{length:t}=e.alertsManager.visibleInstances;for(let n=0;n<t;n+=1)e.remove(0)}static remove(t){e.alertsManager.remove(t)}},nt=class e{static loading;static show(t){e.loading.show(t)}static hide(){e.loading.hide()}},rt=class e{static instance=new Ke({name:`dialog-instance`,isVisible:!1});static show(t){e.instance.isVisible?(e.hide(),setTimeout(()=>e.display(t),200)):e.display(t)}static hide(){e.instance.hide()}static display(t){e.instance.assignDialogProperties(t),e.instance.show()}},it=class e{static modals=[];static create(t){let n=new at(t);return e.modals.push(n),n}static async createFromJson(n,r,i){let a=await t.Metadata.get(n,r,i);return e.create(a)}static async createFromJsonPost(n,r){let i=await t.Metadata.post(n,r);return e.create(i)}static delete(t){let n=e.modals.findIndex(e=>e.name===t.name);n!==-1&&e.modals.splice(n,1)}static closeByName(t){if(e.modals.length){let n=e.modals.filter(e=>e.name===t);n.length&&n[0].hide()}}static getModal(t){return e.modals.find(e=>e.name===t)}},at=class extends C{title=``;fullscreen=!1;grid={cols:11,sm:10,lg:6};persistent=!1;draggable=!1;dragHandle=``;escKeydownStop=!0;constructor(e){super(e),this.title=this.getInitValue(`title`,e.title,this.title),this.fullscreen=this.getInitValue(`fullscreen`,e.fullscreen,this.fullscreen),this.grid=this.getInitValue(`grid`,e.grid,this.grid),this.persistent=this.getInitValue(`persistent`,e.persistent,this.persistent),this.draggable=this.getInitValue(`draggable`,e.draggable,this.draggable),this.dragHandle=this.getInitValue(`dragHandle`,e.dragHandle,this.dragHandle),this.escKeydownStop=this.getInitValue(`escKeydownStop`,e.escKeydownStop,this.escKeydownStop),this.isVisible=!1,this.createAccessors()}destroy(){it.delete(this)}show(){this.isVisible=!0,t.ViewService.nextTick(()=>this.callEvent(`onShow`,{component:this}))}hide(){this.isVisible=!1,t.ViewService.nextTick(()=>this.callEvent(`onHide`,{component:this}))}},ot=class extends O{modalName=``;flat=!0;icon=!0;iconName=`close`;constructor(e){super(e),this.modalName=this.getInitValue(`modalName`,e.modalName,this.modalName),this.flat=this.getInitValue(`flat`,e.flat,this.flat),this.icon=this.getInitValue(`icon`,e.icon,this.icon),this.iconName=this.getInitValue(`iconName`,e.iconName,this.iconName),this.events.click=()=>{it.closeByName(this.modalName)},this.createAccessors()}},st=class extends P{mask;defaultMask=t.Config.masks.numberMask||{};align=`right`;autoNumericObj;formattedValue;localValue;formatterFn=t.FormatterParserProvider.getFormatter(`ZdNumberInput`);parserFn=t.FormatterParserProvider.getParser(`ZdNumberInput`);maskValid=!1;constructor(e){super(e);let t={...this.defaultMask,...e.mask};this.align=this.getInitValue(`align`,e.align,this.align),this.mask=this.getInitValue(`mask`,t,this.defaultMask),this.value=this.getInitValue(`value`,e.value,this.value),this.createAccessors(),this.validateMask()}validateMask(){x.default.validate(this.mask,!0),this.maskValid=!0,this.value=this.localValue}get value(){return this.localValue}set value(e){typeof e==`string`&&window.Number.isNaN(parseFloat(e))||(this.localValue=e,this.maskValid&&this.localValue!==void 0&&this.localValue!==null?(this.formattedValue=x.default.format(this.localValue,this.mask),this.autoNumericObj&&e!==this.autoNumericObj.rawValue&&this.autoNumericObj.setValue(e)):(this.formattedValue=``,this.autoNumericObj&&this.autoNumericObj.clear()))}get displayValue(){return this.formattedValue}set displayValue(e){if(!e)this.formattedValue=``,this.localValue=void 0,this.autoNumericObj&&this.autoNumericObj.clear();else{if(this.formattedValue=e,!this.autoNumericObj)return;let t=parseFloat(this.autoNumericObj.rawValue);if(window.Number.isNaN(t)){this.localValue=void 0,this.autoNumericObj.clear();return}this.localValue=t}}formatter(e){return this.formatterFn(e,this)}parser(e){return this.parserFn(e,this)}};t.FormatterParserProvider.registerFormatter(`ZdNumberInput`,(e,{mask:n={}}={})=>{let r=n;if(t.Accessor.isAccessorDefinition(r)){let[e,n]=t.Accessor.getAccessor(r);r=t.Loader.getInstance(e)[n]}let i=typeof r==`function`?r(x.default.unformat(e)):r;return i={...t.Config.masks.numberMask,...i},e===null?``:x.default.format(e,i)}),t.FormatterParserProvider.registerParser(`ZdNumberInput`,(e,{mask:n={}}={})=>{let r=n;if(t.Accessor.isAccessorDefinition(r)){let[e,n]=t.Accessor.getAccessor(r);r=t.Loader.getInstance(e)[n]}let i=typeof r==`function`?r(x.default.format(e)):r;return i={...t.Config.masks.numberMask,...i},e===``?null:x.default.unformat(e,i)}),k.register(`ZdNumberInput`,st);var ct=class{iterable;constructor(e){this.iterable=e}selectAll(e){if(!this.iterable.selectable)return;this.iterable.selectionState={allSelected:e,except:[]};let t=this.iterable.getData();if(!e){t.forEach(e=>{let t=this.iterable.selectedRows.indexOf(e);t>-1&&this.iterable.selectedRows.splice(t,1)});return}t.forEach(e=>{this.callDisableSelection(e)||this.iterable.getRowKey(e)&&this.iterable.selectedRows.indexOf(e)===-1&&this.iterable.selectedRows.push(e)})}toggleRow(e){let t;t=this.iterable.selectAllPages?this.iterable.selectionState.except:this.iterable.selectedRows;let n=this.iterable.getRowKey(e),r=t.findIndex(e=>this.iterable.getRowKey(e)===n),i=r!==-1;if(!i){t.push(e);return}i&&t.splice(r,1)}selectRow(e,t){let n,r;this.iterable.selectAllPages?(n=this.iterable.selectionState.except,r=t!==this.iterable.selectionState.allSelected):(n=this.iterable.selectedRows,r=t);let i=this.iterable.getRowKey(e),a=n.findIndex(e=>this.iterable.getRowKey(e)===i),o=a!==-1;if(!o&&r){n.push(e);return}o&&!r&&n.splice(a,1)}callDisableSelection(e){return!!this.iterable.disableSelection&&typeof this.iterable.disableSelection==`function`&&this.iterable.disableSelection({row:e,component:this.iterable})}selectClick(e,t,n,r){t?this.iterable.callEvent(`selected`,{event:n,element:r,row:e,component:this.iterable,column:void 0}):this.iterable.callEvent(`unselected`,{event:n,element:r,row:e,component:this.iterable,column:void 0})}selectAllClick(e,t,n){e?this.iterable.callEvent(`selectedAll`,{event:t,element:n,component:this.iterable,row:void 0,column:void 0}):this.iterable.callEvent(`unselectedAll`,{event:t,element:n,component:this.iterable,row:void 0,column:void 0})}},lt=u(c(((e,t)=>{function n(e){return e===void 0}t.exports=n}))(),1),ut=class extends re{children=[];constructor(e){super(e),this.children=this.getInitValue(`children`,e.children,this.children),this.componentProps.component||(this.componentProps.mask=this.componentProps.mask||this.mask,this.componentProps.component=`ZdTextInput`),this.createAccessors()}get childrenProps(){return this.children.map(({conditions:e,...t})=>t)}getColumnWithoutConditions(e){return{...e,conditions:void 0}}checkOutValues(e,n,r){this.componentProps.dataValueOut&&e.datasource?.currentRow&&this.componentProps.dataValueOut.forEach(i=>{let a,o;typeof i==`string`?(a=i,o=this.componentProps.foreignColumns?.[a]||a):(a=i.column,o=i.columnOnGrid);let s=e.datasource.currentRow[a];Array.isArray(e.value)&&(s=e.selectedValue.map(e=>e[a])),!(t.Utils.isEqual(r[`${o}_original`],r.originalRow[o])&&t.Utils.isEqual(r[o],s))&&(t.Utils.isEqual(r.originalRow[o],s)?(delete r[`${o}_original`],delete r[o]):(r[`${o}_original`]=r.originalRow[o],r[o]=s),n[o]=s)})}};t.FormatterParserProvider.registerFormatter(`column_ZdSelect`,({column:e,value:n,row:r,componentProps:i})=>{if(n==null)return``;let{dataText:a,formatterDataText:o,dataTextSeparator:s,dataValue:c,dataTextDiscrete:l,foreignColumns:u}=i,d=r,f=Array.isArray(a)?a:[a];if(c){let t=Array.isArray(o)?o:[o];if(u){let t={};f.forEach(e=>{let n=typeof e==`string`?e:e.name;t[n]=d[u[n]||n]}),t[c]=d[e.name],e.lookupData[d[e.name]]=t}else if(!o)d=e.getLookupData(c,n[c]||n);else if(t.length===f.length){let n={};t.forEach((e,t)=>{let r=f[t],i=typeof r==`string`?r:r.name;n[i]=d[typeof e==`string`?e:e.name]}),n[c]=d[e.name],e.lookupData[d[e.name]]=n}}if(!Object.keys(d).length)return typeof n==`object`?``:n;let p=a;a&&u&&(p=typeof a==`string`?u[a]||a:f.map(e=>{let t=typeof e==`string`?e:e.name;return u[t]||t}));let m=o||l||p;return m?typeof m==`string`?d[m]||n:t.FormatterParserProvider.getFormatter(`ZdSelect`)(d,{dataText:m,dataTextSeparator:s}):n}),t.FormatterParserProvider.registerFormatter(`column_ZdSelectMultiple`,({column:e,value:n,row:r,componentProps:i})=>{if(!n||!Array.isArray(n)||n.length===0)return``;let{formatterDataText:a,foreignColumns:o,dataText:s}=i,c=t.FormatterParserProvider.getFormatter(`column_ZdSelect`);return n.map((t,n)=>{let l={...r},u={};if(a&&a.length>0)(Array.isArray(a)?a:[a]).forEach(e=>{let t=typeof e==`string`?e:e.name;u[t]=r[t][n]}),l={...r,...u};else if(o&&s){let e=s;e=typeof s==`string`?[o[s]||s]:s.map(e=>{let t=typeof e==`string`?e:e.name;return o[t]||t}),e.forEach(e=>{u[e]=r[e][n]}),l={...r,...u}}return c({column:e,value:t,row:l,componentProps:i})}).join(`, `)});let dt=({value:e,componentProps:n})=>{let{trueValue:r,falseValue:i,trueIcon:a,falseIcon:o,trueDisplayValue:s,falseDisplayValue:c}=n,l=(0,lt.default)(r)?!0:r,u=(0,lt.default)(i)?!1:i;if(e===l){let e=s&&t.I18n.translate(s);return a||e||l}let d=c&&t.I18n.translate(c);return o||d||u};t.FormatterParserProvider.registerFormatter(`column_ZdCheckbox`,dt),t.FormatterParserProvider.registerFormatter(`column_ZdSwitch`,dt);var ft=class{iterable;preventRowClick=!1;constructor(e){this.iterable=e}rowClick(e,t,n){this.preventRowClick||(this.iterable.setCurrentRow(e),this.iterable.callEvent(`rowClick`,{event:t,element:n,row:e,component:this.iterable,column:void 0})),this.preventRowClick=!1}cellClick(e,t,n,r){this.preventRowClick=this.iterable.callEvent(`cellClick`,{event:n,element:r,row:e,column:t,component:this.iterable})}},pt=class{iterable;constructor(e){this.iterable=e}navigateDatasource(e){let{uniqueKey:t,currentRow:n}=this.iterable.datasource,r=this.iterable.getData(),i=r.findIndex(e=>e[t]===n[t]);return i===-1?this.navigateInitial(e):e===`up`&&i===0?this.navigatePageDown():e===`down`&&i===r.length-1?this.navigatePageUp():this.navigateCurrentRow(e,i)}navigateFirst(){let e=this.iterable.getData()[0],t=this.iterable.columns[0];this.iterable.selectCell(e,t)}navigateLast(){let e=this.iterable.getData(),t=e[e.length-1],n=this.iterable.columns[0];this.iterable.selectCell(t,n)}navigateInitial(e){if(e===`up`){this.navigateLast();return}this.navigateFirst()}navigatePageDown(){let e=this.iterable.getPage();e>1&&this.iterable.setPage(e-1)}navigatePageUp(){let e=this.iterable.getPage();e<this.iterable.getLastPage()&&this.iterable.setPage(e+1)}navigateCurrentRow(e,t){let n=e===`up`?-1:1,r=this.iterable.getData()[t+n];this.iterable.setCurrentRow(r)}},mt=class extends U{constructor(){super(`Grid can't automatically delete rows when selectAllPages property is true. You should delete them manually`),this.name=`DeleteRowsError`}},ht=class{iterable;orderTypes={asc:`asc`,desc:`desc`};constructor(e){this.iterable=e}async changeOrder(e){let t=e.map(e=>`${e.key}.${e.order}`);await this.iterable.setOrder(t),this.iterable.changeLayout()}selectCell(e,t){this.iterable.setCurrentRow(e),this.iterable.currentColumn=t}rowStyleConditions=new Map;reapplyRowStyleConditions(e){if(typeof this.iterable.rowStyleConditions==`function`){let t=this.iterable.rowStyleConditions(e),n=this.iterable.getRowKey(e);return this.rowStyleConditions.set(n,t),t}return{}}getRowStyleConditions(e){return this.rowStyleConditions.get(this.iterable.getRowKey(e))||{}}async deleteRows(){if(this.iterable.selectAllPages)throw new mt;let e=await Promise.all(this.iterable.selectedRows.map(e=>this.iterable.delete(e)));return await this.iterable.reload(),this.iterable.selectedRows=[],e}},gt=class{instance;configs;map;constructor(e,t){this.instance=e,this.configs=t;let n=this.configs.map(e=>new e).map(e=>e.getMap(this.instance));this.map=Object.assign({},...n)}filterKeyMapping(e,t){return Object.keys(e).reduce((n,r)=>(r in t||(n[r]=e[r]),n),{})}bind(e){let n=this.filterKeyMapping(this.map,this.instance.keyMap);t.KeyMap.bind(n,this.instance,e)}unbind(){t.KeyMap.unbind(this.map,this.instance)}},_t=class{getMap(e){return{up:{event:e.navigateUp.bind(e),active:!0,index:99,repeat:!0},down:{event:e.navigateDown.bind(e),active:!0,index:99,repeat:!0},pageup:{event:e.navigatePageUp.bind(e),stop:!0,index:99,active:!0},pagedown:{event:e.navigatePageDown.bind(e),stop:!0,index:99,active:!0},left:{event:e.navigateLeft.bind(e),active:!0,index:99,repeat:!0},right:{event:e.navigateRight.bind(e),active:!0,index:99,repeat:!0},tab:{event:e.navigateRight.bind(e),prevent:!1,active:!0,index:99,input:!0,repeat:!0},"shift+tab":{event:e.navigateLeft.bind(e),prevent:!1,active:!0,index:99,input:!0,repeat:!0},enter:{event:e.navigateDown.bind(e),active:!0,index:99,input:!0,repeat:!0},"shift+enter":{event:e.navigateUp.bind(e),active:!0,index:99,input:!0,repeat:!0}}}},vt=class{iterable;constructor(e){this.iterable=e}getActionComponent(e,t,n,r=``){let{props:i,instance:a}=this.getActionProps(e,t,n,r);return a||i}setGridRowsInEvents(e,n,r){if(e.events?.click){let i=t.Event.factory(e.events);if(typeof i.click==`function`)return({component:e,event:t,element:a})=>i.click({component:e,event:t,element:a,row:r,column:n})}}filterObject(e,t){return Object.fromEntries(Object.entries(e).filter(([e,n])=>t(e,n)))}deleteAccessorProps(e){return this.filterObject(e,(e,n)=>!t.Accessor.isAccessorDefinition(n))}updateActionInstance(e,n){let r=this.deleteAccessorProps(n);return r.datasource=void 0,r.events=void 0,t.Metadata.updateInstance(e,r)}getActionProps(e,t,n,r){let i=this.iterable.getRowKey(n),a=e.name,o=`${a}_${i}`,s=r?`${r}.${a}`:a,c=e.activator??void 0,l=(0,B.default)({},e,this.iterable.getAppliedConditions({row:n,column:t,path:s})),u=this.setGridRowsInEvents(l,t,n);l.children=(l.children||[]).map(e=>this.getActionProps(e,t,n,s).props),l.name=o,l.allowDuplicate=!0,l.autoRegister=!1;let d=null;try{d=this.updateActionInstance(o,l),u&&(d.events.click=u)}catch{d=null}if(l.events||={},u&&(l.events.click=u),c){let e=this.setGridRowsInEvents(c,t,n);e&&(l.activator.events.click=e)}return{props:l,instance:d}}},yt=class{viewNavigate=null;setViewNavigate(e){this.viewNavigate=e}navigateLeft({event:e}){this.viewNavigate&&this.viewNavigate(`left`,e)}navigateRight({event:e}){this.viewNavigate&&this.viewNavigate(`right`,e)}navigateUp(){this.viewNavigate&&this.viewNavigate(`up`)}navigateDown(){this.viewNavigate&&this.viewNavigate(`down`)}},bt=class extends G{tableActionBuilder;iterableTable;dataSelector;gridEvents;dataNavigator;viewNavigator;keyMapMerger;currentColumn=null;selectedRows=[];selectionState={allSelected:!1,except:[]};rowStyleConditions;selectAllPages=t.Config.gridSelectAllPages;selectable=!1;disableSelection;cellSelection=!1;toolbarSlot=[{name:`<<NAME>>_gridSearch`,component:`ZdSearch`}];footerSlot=[{name:`<<NAME>>_iterablePagination`,component:`ZdIterablePagination`},{name:`<<NAME>>_iterableInfoDiv`,component:`ZdTag`,cssClass:`zd-grid-div-footer`,tag:`div`,children:[{name:`<<NAME>>_iterablePageSize`,component:`ZdIterablePageSize`,iterableComponentName:`<<NAME>>`},{name:`<<NAME>>_iterablePageInfo`,component:`ZdIterablePageInfo`,iterableComponentName:`<<NAME>>`}]}];noResultsText=`NO_RESULT`;noResultSlot=[{name:`<<NAME>>_no-result`,component:`ZdText`,cssClass:`no-result`,text:this.noResultsText}];errorSlot=[];dense=!0;dragColumns=!1;headerBackground=``;headerCellTextColor=``;height=`auto`;loadingText=`LOADING`;maxHeight=`none`;maxWidth=`none`;minHeight=`auto`;minWidth=`auto`;noDataText=`NO_DATA`;noDataSlot=[{name:`<<NAME>>_no-data`,component:`ZdText`,cssClass:`no-data`,text:this.noDataText}];resizeColumns=!1;showFooter=!0;showHeader=!0;showSelectAll=!0;width=`100%`;backgroundColor=`transparent`;constructor(e){super(e),this.tableActionBuilder=new vt(this),this.iterableTable=new ht(this),this.dataSelector=new ct(this),this.gridEvents=new ft(this),this.dataNavigator=new pt(this),this.viewNavigator=new yt,this.cellSelection=this.getInitValue(`cellSelection`,e.cellSelection,this.cellSelection),this.dense=this.getInitValue(`dense`,e.dense,this.dense),this.disableSelection=this.getInitValue(`disableSelection`,e.disableSelection,this.disableSelection),this.dragColumns=this.getInitValue(`dragColumns`,e.dragColumns,this.dragColumns),this.fillHeight=this.getInitValue(`fillHeight`,e.fillHeight,this.fillHeight),this.headerCellTextColor=this.getInitValue(`headerCellTextColor`,e.headerCellTextColor,this.headerCellTextColor),this.height=this.getInitValue(`height`,e.height,this.height),this.loadingText=this.getInitValue(`loadingText`,e.loadingText,this.loadingText),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.noDataText=this.getInitValue(`noDataText`,e.noDataText,this.noDataText),this.noResultsText=this.getInitValue(`noResultsText`,e.noResultsText,this.noResultsText),this.resizeColumns=this.getInitValue(`resizeColumns`,e.resizeColumns,this.resizeColumns),this.rowStyleConditions=this.getInitValue(`rowStyleConditions`,e.rowStyleConditions,this.rowStyleConditions),this.selectable=this.getInitValue(`selectable`,e.selectable,this.selectable),this.selectAllPages=this.getInitValue(`selectAllPages`,e.selectAllPages,this.selectAllPages),this.showFooter=this.getInitValue(`showFooter`,e.showFooter,this.showFooter),this.showHeader=this.getInitValue(`showHeader`,e.showHeader,this.showHeader),this.showSelectAll=this.getInitValue(`showSelectAll`,e.showSelectAll,this.showSelectAll),this.width=this.getInitValue(`width`,e.width,this.width),this.backgroundColor=this.getInitValue(`backgroundColor`,e.backgroundColor,this.backgroundColor);let t=this.backgroundColor===`transparent`?``:this.backgroundColor;this.headerBackground=this.getInitValue(`headerBackground`,e.headerBackground,t),this.toolbarSlot=e.toolbarSlot||this.toolbarSlot,this.footerSlot=e.footerSlot||this.footerSlot,this.noDataSlot=e.noDataSlot||this.noDataSlot,this.noResultSlot=e.noResultSlot||this.noResultSlot,this.errorSlot=e.errorSlot||this.errorSlot,this.noDataSlot=this.changeDefaultSlotNames(this.noDataSlot),this.footerSlot=this.changeDefaultSlotNames(this.footerSlot),this.toolbarSlot=this.changeDefaultSlotNames(this.toolbarSlot),this.noResultSlot=this.changeDefaultSlotNames(this.noResultSlot),this.errorSlot=this.changeDefaultSlotNames(this.errorSlot)}getConditionalProps({row:e,column:t}){let n=this.getRowStyleConditions(e),r=this.getAppliedConditions({row:e,column:t});return{...n,...r}}onMounted(e){super.onMounted(e),this.keyMapMerger=new gt(this,[_t]),this.keyMapMerger.bind(e)}onBeforeDestroy(){super.onBeforeDestroy(),this.keyMapMerger.unbind()}navigatePageUp(){this.dataNavigator.navigatePageUp()}navigatePageDown(){this.dataNavigator.navigatePageDown()}setViewNavigate(e){this.viewNavigator.setViewNavigate(e)}navigateLeft(e){this.cellSelection&&this.viewNavigator.navigateLeft(e)}navigateRight(e){this.cellSelection&&this.viewNavigator.navigateRight(e)}navigateUp(){this.viewNavigator.navigateUp()}navigateDown(){this.viewNavigator.navigateDown()}navigateDatasource(e){this.dataNavigator.navigateDatasource(e)}createColumn(e){return new ut(e)}rowClick(e,t,n){this.gridEvents.rowClick(e,t,n)}cellClick(e,t,n,r){this.gridEvents.cellClick(e,t,n,r)}selectClick(e,t,n,r){this.dataSelector.selectClick(e,t,n,r)}selectAllClick(e,t,n){this.dataSelector.selectAllClick(e,t,n)}selectAll(e){this.dataSelector.selectAll(e)}toggleRow(e){this.dataSelector.toggleRow(e)}selectRow(e,t){this.dataSelector.selectRow(e,t)}callDisableSelection(e){return this.dataSelector.callDisableSelection(e)}changeOrder(e){return this.iterableTable.changeOrder(e)}selectCell(e,t){this.iterableTable.selectCell(e,t)}reapplyRowStyleConditions(e){return this.iterableTable.reapplyRowStyleConditions(e)}getRowStyleConditions(e){return this.iterableTable.getRowStyleConditions(e)}deleteRows(){return this.iterableTable.deleteRows()}getActionComponent(e,t,n,r){return this.tableActionBuilder.getActionComponent(e,t,n,r)}changeData(e=this.datasource.data){super.changeData(e),e.forEach(e=>this.iterableTable.reapplyRowStyleConditions(e))}},xt=class extends Error{constructor(e){super(`${e} should only be called in edit mode`)}},St=class extends Error{constructor(e,t){super(`Row with key ${e} not found on grid '${t}'`)}},Ct=class{grid;editedRows=new Map;invalidComponents=new Set;viewEnterEdit=null;constructor(e){this.grid=e}getCompName(e,t){return`${t}_editable_${e}`}getVisibleValue(e,t){let n=this.grid.getRowKey(e),r=this.editedRows.get(n);return r&&Object.hasOwn(r,t.name)?r[t.name]:e[t.name]}checkLookupData(e,t,n){if(!t[e.name]||!e.lookupData||!n.datasource||(n.datasource.data=n.datasource.data||[],!Array.isArray(n.datasource.data)))return;let r=t[e.name];if(Array.isArray(r)){r.forEach(t=>{let r=typeof t==`object`?t[n.dataValue]:t;this.pushLookupValue(e,r,n)});return}if(r&&typeof r==`object`&&Object.hasOwn(r,n.dataValue)){let t=r[n.dataValue];this.pushLookupValue(e,t,n);return}this.pushLookupValue(e,r,n)}pushLookupValue(e,t,n){let r=e.lookupData[t];if(!r)return;let{dataValue:i}=n,a=r[i];n.datasource.data.find(e=>e[i]===a)||n.datasource.data.push(r)}async checkCompValidity(e){let t=(await e.validate()).length===0;return t?this.invalidComponents.delete(e.name):this.invalidComponents.add(e.name),t}updateOriginalRow(e,t){let n=this.editedRows.get(e);n&&(n.originalRow=y(t,`originalRow`))}getEditableComponent(e,n){let r=this.grid.getRowKey(n),i=this.getCompName(r,e.name),a=this.getVisibleValue(n,e),o=this.grid.getConditionalProps({row:n,column:e}),s=(0,B.default)({},e.componentProps,o?.componentProps),c={};s?.events&&(c=t.Event.factory(s.events)),this.checkLookupData(e,{...n},s);let l={change:({component:t,event:r,element:i})=>{this.changeEditableComponent(e,{...n},t.value,t),this.checkCompValidity(t),c.change&&c.change({component:t,event:r,element:i,row:n,column:e})},blur:({event:t,element:r,component:i})=>{this.checkCompValidity(i),c.blur&&c.blur({component:i,event:t,element:r,row:n,column:e})},focus:({event:t,element:r,component:i})=>{this.grid.setCurrentRow(n),c.focus&&c.focus({component:i,event:t,element:r,row:n,column:e})}};return this.updateOriginalRow(r,n),{...s,name:i,parent:this.grid,align:e.align,showLabel:!1,showHelper:!1,dense:!0,value:a,events:l,autofill:!1,allowDuplicate:!0,autoRegister:!1}}changeEditableComponent(e,n,r,i){let a=this.grid.getRowKey(n),o=e.name,s=this.editedRows.get(a);if(t.Utils.isEqual(r,n[o])){if(s){let t={...s};t=y(t,o),t=y(t,`${o}_original`),this.editedRows.set(a,t),i&&(e.checkOutValues(i,n,t),i.value=r),Object.keys(t).length===1&&t.originalRow&&this.editedRows.delete(a)}}else{let t={...s};t.originalRow=y(n,`originalRow`),t[o]=r,t[`${o}_original`]=n[o],i&&(e.checkOutValues(i,n,t),i.value=r),this.editedRows.set(a,t)}}isEdited(e,t){let n=this.grid.getRowKey(t),r=this.editedRows.get(n);return!!r&&r[e.name]!==r[`${e.name}_original`]}async isValid(e,n,r){let i=this.grid.getRowKey(n),a=this.getCompName(i,e.name);if(!r)return!this.invalidComponents.has(a);try{let t=this.getComponent(i,e.name);return await this.checkCompValidity(t)}catch(e){if(e instanceof t.InstanceNotFoundError)return!0;throw e}}checkValid(e,t){let n=this.grid.getRowKey(t),r=this.getCompName(n,e.name);return!this.invalidComponents.has(r)}isViewGridValid(e=!0){let n=[],r={},i=this.grid.columns.filter(e=>e.editable&&e.isVisible);return i.forEach(e=>{let t=this.getCompName(`temp`,e.name),n={...e.componentProps,name:t};r[e.name]=k.factory(n)}),this.grid.getData().forEach(e=>{let t=this.grid.getRowKey(e);i.forEach(i=>{r[i.name].isValid(e[i.name])||n.push(this.getCompName(t,i.name))})}),n.length>0&&e&&(this.grid.editing=!0,t.ViewService.nextTick(()=>{n.forEach(e=>{t.Metadata.getInstance(e).validate()})})),n.length===0}isGridValid(e){if(!e)return this.invalidComponents.size===0;if(!this.grid.editing)return this.isViewGridValid();let t=!0;return this.grid.getData().forEach(e=>this.grid.columns.forEach(n=>{let r=this.grid.getAppliedConditions({row:e,column:n}).editable??n.editable;!n.isVisible||!r||this.isValid(n,e,!0)||(t=!1)})),t}getComponent(e,n){let r=this.getCompName(e,n);return t.Metadata.getInstance(r)}changeCell(e,n,r,i){let a=this.grid.getData()[n];if(!r.editable||!r.isVisible){this.changeEditableComponent(r,a,i);return}try{let t=this.getComponent(e,r.name);this.changeEditableComponent(r,a,i,t)}catch(e){if(e instanceof t.InstanceNotFoundError){this.changeEditableComponent(r,a,i);return}throw e}}getRowIndex(e){return this.grid.getData().findIndex(t=>this.grid.getRowKey(t)===e)}updateRow(e){if(!this.grid.editing)throw new xt(`updateRow`);let t=this.grid.getRowKey(e),n=this.getRowIndex(t);if(n===-1)throw new St(t,this.grid.name);this.grid.columns.forEach(r=>{let i=r.name;this.changeCell(t,n,r,e[i])})}updateCell(e,t,n){if(!this.grid.editing)throw new xt(`updateCell`);let r=this.getRowIndex(e);if(r===-1)throw new St(e,this.grid.name);let i=this.grid.getColumn(t);this.changeCell(e,r,i,n)}changeData(e){let t=e?.find(e=>{let t=this.grid.getRowKey(e);return t!==0&&!t});if(!t)return;let n=this.grid.getRowKey(t);this.editedRows.delete(n)}setViewEnterEdit(e){this.viewEnterEdit=e}enterEdit(e,n){if(!this.viewEnterEdit)throw new t.MethodNotAssignedError(`viewEnterEdit`);this.viewEnterEdit(e,n)}async cancelEditedRows(){this.grid.editing=!1,this.editedRows.clear(),this.invalidComponents.clear()}async saveEditedRows(e){let t=this.grid.getPage(),n=await Promise.all(this.getEditedRows(e).map(e=>this.grid.datasource.put(e)));return this.grid.editing=!1,this.editedRows.clear(),this.invalidComponents.clear(),await this.grid.setPage(t),n}canEditRowConditions=new Map;reapplyCanEditRow(e){let t=!this.grid.canEditRow||typeof this.grid.canEditRow!=`function`||this.grid.canEditRow({row:e,component:this.grid});this.canEditRowConditions.set(this.grid.getRowKey(e),t)}getCanEditRow(e){return this.canEditRowConditions.get(this.grid.getRowKey(e))}omitInternals(e){let t={...e.originalRow,...e};return t=y(t,`originalRow`),Object.keys(t).forEach(e=>{t=y(t,`${e}_original`)}),t}getEditedRows(e,t){let n=[];return this.editedRows.forEach(r=>{let i=this.omitInternals(r);if(!t&&!this.isGridValid(e))throw Error(`Invalid rows`);n.push(i)}),n}getEditedRow(e){let t=this.editedRows.get(this.grid.getRowKey(e));return t?this.omitInternals(t):void 0}},wt=class{grid;constructor(e){this.grid=e}get hasAddedRows(){return this.grid.getAddedRows().length>0}isAddedRow({row:e}){return this.grid.isAdded(e)}},Tt=class extends Ct{NEW_ROW_IDENTIFIER=`__added_row`;addedRows=new Map;constructor(e){super(e),this.addCancelColumn(),this.createGridController()}addCancelColumn(){if(!this.grid.showCancelColumn)return;let e=this.grid.createColumn(this.getCancelColumnProps());this.grid.columns.push(e)}getCancelColumnProps(){return{name:`cancel_action_${this.grid.name}`,type:`action`,align:`center`,actionFixed:!0,isVisible:`{{GridEditableController_${this.grid.name}.hasAddedRows}}`,children:[{name:`cancel_btn`,component:`ZdButton`,icon:!0,iconName:`clear`,small:!0,conditions:{isVisible:`{{GridEditableController_${this.grid.name}.isAddedRow}}`},events:{click:({row:e})=>{let t=this.grid.getRowKey(e);this.cancelAddedRow(t)}}}]}}createGridController(){t.Loader.addController(`GridEditableController_${this.grid.name}`,wt,[this.grid])}isAdded(e){let t=this.grid.getRowKey(e);return!!this.addedRows.get(t)}cancelAddedRow(e){this.editedRows.delete(e),this.addedRows.delete(e);let t=this.grid.datasource.getLoadedData(),n=t.findIndex(t=>this.grid.getRowKey(t)===e);return t.splice(n,1),this.grid.updateData(t)}async cancelAddedRows(){let e=this.grid.datasource.getLoadedData();Promise.resolve(e);for(let t=e.length-1;t>=0;--t){let n=e[t],r=this.grid.getRowKey(n);this.addedRows.get(r)&&e.splice(t,1)}await this.grid.updateData(e)}getAddedRows(){let e=[];return this.addedRows.forEach(t=>{let n={...t.originalRow,...t};n=y(n,`originalRow`),n=y(n,this.NEW_ROW_IDENTIFIER),Object.keys(n).forEach(e=>{Object.hasOwn(n,`${e}_original`)&&delete n[`${e}_original`]}),e.push(n)}),e}async addNewRow(e,t=`end`){let n={...e},r=this.grid.datasource.getLoadedData();n[this.NEW_ROW_IDENTIFIER]=!0,t===`start`?r.unshift(n):r.push(n);let i=this.grid.getRowKey(n);i&&(this.editedRows.set(i,n),this.addedRows.set(i,n)),await this.grid.updateData(r),this.grid.editing=!0}changeEditableComponent(e,n,r,i){let a=this.grid.getRowKey(n),o=e.name,s=this.editedRows.get(a);if(t.Utils.isEqual(r,n[o])){if(s){let t={...s};t=y(t,o),t=y(t,`${o}_original`),this.editedRows.set(a,t),this.isAdded(n)&&this.addedRows.set(a,t),i&&(e.checkOutValues(i,n,t),i.value=r),Object.keys(t).length===1&&t.originalRow&&this.editedRows.delete(a)}}else{let t={...s};t.originalRow=y(n,`originalRow`),t[o]=r,t[`${o}_original`]=n[o],i&&(e.checkOutValues(i,n,t),i.value=r),this.editedRows.set(a,t),this.isAdded(n)&&this.addedRows.set(a,t)}}addDataRow(e){let t=this.grid.getRowKey(e);this.addedRows.get(t)?this.grid.datasource.post(e):this.grid.datasource.put(e)}async saveEditedRows(e=!1){let t=this.grid.getPage();await this.cancelAddedRows();let n=await Promise.all(this.getEditedRows(e).map(e=>this.addDataRow(e)));return this.grid.editing=!1,this.editedRows.clear(),this.invalidComponents.clear(),this.addedRows.clear(),await this.grid.setPage(t),n}async cancelEditedRows(){let e=this.grid.getPage();await this.cancelAddedRows(),await this.grid.setPage(e),this.grid.editing=!1,this.editedRows.clear(),this.invalidComponents.clear()}omitInternals(e){let t={...e.originalRow,...e};return t=y(t,`originalRow`),t=y(t,this.NEW_ROW_IDENTIFIER),Object.keys(t).forEach(e=>{t=y(t,`${e}_original`)}),t}reapplyCanEditRow(e){let t=!0;t=this.grid.editingNewRows?!!e[this.NEW_ROW_IDENTIFIER]:!this.grid.canEditRow||typeof this.grid.canEditRow!=`function`||this.grid.canEditRow({row:e,component:this.grid}),this.canEditRowConditions.set(this.grid.getRowKey(e),t)}},Et=class extends ut{editable=!1;constructor(e){super(e),this.editable=this.getInitValue(`editable`,e.editable,this.editable),this.createAccessors()}},Dt=class{gridEditable;preventRowClick=!1;preventRowDoubleClick=!1;constructor(e){this.gridEditable=e}rowClick(e,t,n){this.preventRowClick||(this.gridEditable.setCurrentRow(e),this.gridEditable.callEvent(`rowClick`,{event:t,element:n,row:e,component:this.gridEditable})),this.preventRowClick=!1}rowDoubleClick(e,t,n){this.preventRowDoubleClick||(this.gridEditable.setCurrentRow(e),this.gridEditable.callEvent(`rowDoubleClick`,{event:t,element:n,row:e,component:this})),this.preventRowDoubleClick=!1}cellClick(e,t,n,r){let i=this.gridEditable.getCanEditRow(e)??!0;if(t.editable&&i){this.preventRowClick=!0,this.gridEditable.setCurrentRow(e),this.inlineEdit(e,t,n,r);return}this.cellClickEvent(e,t,n,r)}cellDoubleClick(e,t,n,r){let i=this.gridEditable.getCanEditRow(e)??!0;if(t.editable&&i){this.preventRowDoubleClick=!0,this.gridEditable.setCurrentRow(e),this.inlineEdit(e,t,n,r);return}this.cellDoubleClickEvent(e,t,n,r)}inlineEdit(e,t,n,r){this.gridEditable.editing||(this.gridEditable.editing=!0,this.gridEditable.callEvent(`inlineEdit`,{event:n,element:r,row:e,column:t,component:this.gridEditable}))}cellClickEvent(e,t,n,r){this.preventRowClick=this.gridEditable.callEvent(`cellClick`,{event:n,element:r,row:e,column:t,component:this.gridEditable})}cellDoubleClickEvent(e,t,n,r){this.preventRowDoubleClick=this.gridEditable.callEvent(`cellDoubleClick`,{event:n,element:r,row:e,column:t,component:this.gridEditable})}},Ot=class{getMap(e){return{esc:{event:e.cancelEditedRows.bind(e),index:99,stop:!0,input:!0,active:!0}}}},kt=class extends G{tableActionBuilder;iterableTable;dataSelector;gridEditableEvents;dataNavigator;viewNavigator;keyMapMerger;dataEditor;editing=!1;currentColumn=null;selectedRows=[];selectionState={allSelected:!1,except:[]};rowStyleConditions;selectAllPages=t.Config.gridSelectAllPages;selectable=!1;disableSelection;cellSelection=!1;toolbarSlot=[{name:`<<NAME>>_gridSearch`,component:`ZdSearch`}];footerSlot=[{name:`<<NAME>>_iterablePagination`,component:`ZdIterablePagination`},{name:`<<NAME>>_iterableInfoDiv`,component:`ZdTag`,cssClass:`zd-grid-div-footer`,tag:`div`,children:[{name:`<<NAME>>_iterablePageSize`,component:`ZdIterablePageSize`,iterableComponentName:`<<NAME>>`},{name:`<<NAME>>_iterablePageInfo`,component:`ZdIterablePageInfo`,iterableComponentName:`<<NAME>>`}]}];noResultsText=`NO_RESULT`;noResultSlot=[{name:`<<NAME>>_no-result`,component:`ZdText`,cssClass:`no-result`,text:this.noResultsText}];errorSlot=[];dense=!0;dragColumns=!1;headerBackground=``;headerCellTextColor=``;height=`auto`;loadingText=`LOADING`;maxHeight=`none`;maxWidth=`none`;minHeight=`auto`;minWidth=`auto`;noDataText=`NO_DATA`;noDataSlot=[{name:`<<NAME>>_no-data`,component:`ZdText`,cssClass:`no-data`,text:this.noDataText}];resizeColumns=!1;showFooter=!0;showHeader=!0;showSelectAll=!0;width=`100%`;backgroundColor=`transparent`;canEditRow;showCancelColumn=!1;doubleClickEdit=!1;singleEdit=!1;editingNewRows=!1;constructor(e){super(e),this.cellSelection=this.getInitValue(`cellSelection`,e.cellSelection,this.cellSelection),this.dense=this.getInitValue(`dense`,e.dense,this.dense),this.disableSelection=this.getInitValue(`disableSelection`,e.disableSelection,this.disableSelection),this.dragColumns=this.getInitValue(`dragColumns`,e.dragColumns,this.dragColumns),this.fillHeight=this.getInitValue(`fillHeight`,e.fillHeight,this.fillHeight),this.headerCellTextColor=this.getInitValue(`headerCellTextColor`,e.headerCellTextColor,this.headerCellTextColor),this.height=this.getInitValue(`height`,e.height,this.height),this.loadingText=this.getInitValue(`loadingText`,e.loadingText,this.loadingText),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.noDataText=this.getInitValue(`noDataText`,e.noDataText,this.noDataText),this.noResultsText=this.getInitValue(`noResultsText`,e.noResultsText,this.noResultsText),this.resizeColumns=this.getInitValue(`resizeColumns`,e.resizeColumns,this.resizeColumns),this.rowStyleConditions=this.getInitValue(`rowStyleConditions`,e.rowStyleConditions,this.rowStyleConditions),this.selectable=this.getInitValue(`selectable`,e.selectable,this.selectable),this.selectAllPages=this.getInitValue(`selectAllPages`,e.selectAllPages,this.selectAllPages),this.showFooter=this.getInitValue(`showFooter`,e.showFooter,this.showFooter),this.showHeader=this.getInitValue(`showHeader`,e.showHeader,this.showHeader),this.showSelectAll=this.getInitValue(`showSelectAll`,e.showSelectAll,this.showSelectAll),this.width=this.getInitValue(`width`,e.width,this.width),this.backgroundColor=this.getInitValue(`backgroundColor`,e.backgroundColor,this.backgroundColor);let t=this.backgroundColor===`transparent`?``:this.backgroundColor;this.headerBackground=this.getInitValue(`headerBackground`,e.headerBackground,t),this.doubleClickEdit=this.getInitValue(`doubleClickEdit`,e.doubleClickEdit,this.doubleClickEdit),this.singleEdit=this.getInitValue(`singleEdit`,e.singleEdit,this.singleEdit),this.showCancelColumn=this.getInitValue(`showCancelColumn`,e.showCancelColumn,this.showCancelColumn),this.canEditRow=this.getInitValue(`canEditRow`,e.canEditRow,this.canEditRow),this.editingNewRows=this.getInitValue(`editingNewRows`,e.editingNewRows,this.editingNewRows),this.toolbarSlot=e.toolbarSlot||this.toolbarSlot,this.footerSlot=e.footerSlot||this.footerSlot,this.noDataSlot=e.noDataSlot||this.noDataSlot,this.noResultSlot=e.noResultSlot||this.noResultSlot,this.errorSlot=e.errorSlot||this.errorSlot,this.noDataSlot=this.changeDefaultSlotNames(this.noDataSlot),this.footerSlot=this.changeDefaultSlotNames(this.footerSlot),this.toolbarSlot=this.changeDefaultSlotNames(this.toolbarSlot),this.noResultSlot=this.changeDefaultSlotNames(this.noResultSlot),this.errorSlot=this.changeDefaultSlotNames(this.errorSlot),this.tableActionBuilder=new vt(this),this.iterableTable=new ht(this),this.dataSelector=new ct(this),this.gridEditableEvents=new Dt(this),this.dataNavigator=new pt(this),this.viewNavigator=new yt,this.dataEditor=new Tt(this)}getConditionalProps({row:e,column:t}){let n=this.getRowStyleConditions(e),r=this.getAppliedConditions({row:e,column:t});return{...n,...r}}addCancelColumn(){this.dataEditor.addCancelColumn()}getCancelColumnProps(){return this.dataEditor.getCancelColumnProps()}isAdded(e){return this.dataEditor.isAdded(e)}cancelAddedRow(e){return this.dataEditor.cancelAddedRow(e)}cancelAddedRows(){return this.dataEditor.cancelAddedRows()}getAddedRows(){return this.dataEditor.getAddedRows()}addNewRow(e,t){return this.dataEditor.addNewRow(e,t)}setViewEnterEdit(e){this.dataEditor.setViewEnterEdit(e)}getVisibleValue(e,t){return this.dataEditor.getVisibleValue(e,t)}getEditableComponent(e,t){return this.dataEditor.getEditableComponent(e,t)}isEdited(e,t){return this.dataEditor.isEdited(e,t)}isValid(e,t,n){return this.dataEditor.isValid(e,t,n)}checkValid(e,t){return this.dataEditor.checkValid(e,t)}isGridValid(e){return this.dataEditor.isGridValid(e)}getComponent(e,t){return this.dataEditor.getComponent(e,t)}updateRow(e){this.dataEditor.updateRow(e)}updateCell(e,t,n){this.dataEditor.updateCell(e,t,n)}changeData(e=this.datasource.data){super.changeData(e),this.dataEditor.changeData(e),e.forEach(e=>{this.iterableTable.reapplyRowStyleConditions(e),this.dataEditor.reapplyCanEditRow(e)})}enterEdit(e,t){this.dataEditor.enterEdit(e,t)}cancelEditedRows(){return this.dataEditor.cancelEditedRows()}saveEditedRows(e){return this.dataEditor.saveEditedRows(e)}reapplyCanEditRow(e){return this.dataEditor.reapplyCanEditRow(e)}getCanEditRow(e){return this.dataEditor.getCanEditRow(e)}getEditedRows(e,t){return this.dataEditor.getEditedRows(e,t)}cellDoubleClick(e,t,n,r){this.gridEditableEvents.cellDoubleClick(e,t,n,r)}inlineEdit(e,t,n,r){this.gridEditableEvents.inlineEdit(e,t,n,r)}onMounted(e){super.onMounted(e),this.keyMapMerger=new gt(this,[_t,Ot]),this.keyMapMerger.bind(e)}onBeforeDestroy(){super.onBeforeDestroy(),this.keyMapMerger.unbind()}navigatePageUp(){this.dataNavigator.navigatePageUp()}navigatePageDown(){this.dataNavigator.navigatePageDown()}setViewNavigate(e){this.viewNavigator.setViewNavigate(e)}navigateLeft(e){this.cellSelection&&this.viewNavigator.navigateLeft(e)}navigateRight(e){this.cellSelection&&this.viewNavigator.navigateRight(e)}navigateUp(){this.viewNavigator.navigateUp()}navigateDown(){this.viewNavigator.navigateDown()}navigateDatasource(e){this.dataNavigator.navigateDatasource(e)}createColumn(e){return new Et(e)}rowClick(e,t,n){this.gridEditableEvents.rowClick(e,t,n)}rowDoubleClick(e,t,n){this.gridEditableEvents.rowDoubleClick(e,t,n)}cellClick(e,t,n,r){this.gridEditableEvents.cellClick(e,t,n,r)}cellClickEvent(e,t,n,r){this.gridEditableEvents.cellClickEvent(e,t,n,r)}selectClick(e,t,n,r){this.dataSelector.selectClick(e,t,n,r)}selectAllClick(e,t,n){this.dataSelector.selectAllClick(e,t,n)}selectAll(e){this.dataSelector.selectAll(e)}toggleRow(e){this.dataSelector.toggleRow(e)}selectRow(e,t){this.dataSelector.selectRow(e,t)}callDisableSelection(e){return this.dataSelector.callDisableSelection(e)}changeOrder(e){return this.iterableTable.changeOrder(e)}selectCell(e,t){this.iterableTable.selectCell(e,t)}reapplyRowStyleConditions(e){return this.iterableTable.reapplyRowStyleConditions(e)}getRowStyleConditions(e){return this.iterableTable.getRowStyleConditions(e)}deleteRows(){return this.iterableTable.deleteRows()}getActionComponent(e,t,n,r){return this.tableActionBuilder.getActionComponent(e,t,n,r)}getEditedRow(e){return this.dataEditor.getEditedRow(e)}},At=class{treeGrid;viewUpdateScrollData;constructor(e){this.treeGrid=e}onMounted(){(!this.treeGrid.lazyLoad||this.treeGrid.getData().length)&&this.buildTree()}buildTree(e=!0){if(!e){this.treeGrid.buildTreeStructure();return}if(!this.treeGrid.fetchOnDemand){this.treeGrid.reload();return}this.treeGrid.filterRootData()}setViewUpdateScrollData(e){this.viewUpdateScrollData=e}updateScrollData(){this.treeGrid.virtualScroll&&this.viewUpdateScrollData&&this.viewUpdateScrollData()}},jt=class{getMap(e){return{right:{event:e.navigateToggle.bind(e,!1),stop:!0,index:99,active:!0},left:{event:e.navigateToggle.bind(e,!0),stop:!0,index:99,active:!0}}}},Mt=class{treeGrid;dataSelector;constructor(e){this.treeGrid=e,this.dataSelector=new ct(e)}removeDuplicates(e,t){return[...new Map(e.map(e=>[e[t],e])).values()]}selectChildren(e){let t=this.treeGrid.getChildren(e),n=this.treeGrid.flat?t:[e,...t];this.treeGrid.selectedRows=this.removeDuplicates(this.treeGrid.selectedRows.concat(n),this.treeGrid.datasource.uniqueKey)}unselectChildren(e){let t=this.treeGrid.getChildren(e);(this.treeGrid.flat?t:[e,...t]).forEach(e=>{let t=this.treeGrid.getRowKey(e),n=this.treeGrid.findDataIndex(this.treeGrid.selectedRows,t);n>-1&&this.treeGrid.selectedRows.splice(n,1)})}selectParents(e){let{parentField:t,selectAllPages:n}=this.treeGrid;if(!e[t])return;let r=n?this.treeGrid.selectionState.except:this.treeGrid.selectedRows,i=this.treeGrid.getParentRow(e),a=this.treeGrid.getChildren(i).every(e=>{let t=this.treeGrid.getRowKey(e);return this.treeGrid.findDataIndex(r,t)>-1}),o=[];(a||n&&this.treeGrid.selectionState.allSelected)&&o.push(i),r=this.removeDuplicates(r.concat(o),this.treeGrid.datasource.uniqueKey),n?this.treeGrid.selectionState.except=r:this.treeGrid.selectedRows=r,this.selectParents(i)}unselectParents(e){let{parentField:t,selectAllPages:n,selectionState:r,selectedRows:i}=this.treeGrid;if(!e[t])return;let a=n?r.except:i,o=this.treeGrid.findDataIndex(a,e[t]);o>-1&&a.splice(o,1);let s=this.treeGrid.getParentRow(e);this.unselectParents(s)}selectRow(e,t){let n=[e,...this.treeGrid.flat?[]:this.treeGrid.getChildren(e)],r;r=this.treeGrid.selectAllPages?t!==this.treeGrid.selectionState.allSelected:t,n.forEach(e=>{this.dataSelector.selectRow(e,t)}),!this.treeGrid.flat&&(r?this.selectParents(e):this.unselectParents(e))}selectAll(e){this.dataSelector.selectAll(e)}toggleRow(e){this.dataSelector.toggleRow(e)}callDisableSelection(e){return this.dataSelector.callDisableSelection(e)}selectClick(e,t,n,r){this.dataSelector.selectClick(e,t,n,r)}selectAllClick(e,t,n){this.dataSelector.selectAllClick(e,t,n)}},Nt=class{treeGrid;dataNavigator;constructor(e){this.treeGrid=e,this.dataNavigator=new pt(e)}navigateDatasource(e){let{uniqueKey:t,currentRow:n}=this.treeGrid.datasource,r=this.treeGrid.getData(),i=this.treeGrid.findDataIndex(r,n[t]);if(e===`up`){if(i===-1){let e=this.treeGrid.treeDataStructure.previousOpenedRow(r.length);this.treeGrid.setCurrentRow(r[e]);return}let e=this.treeGrid.treeDataStructure.previousOpenedRow(i);e>-1&&this.treeGrid.setCurrentRow(r[e]);return}if(i===-1){this.treeGrid.setCurrentRow(r[0]);return}let a=this.treeGrid.treeDataStructure.nextOpenedRow(i);a>-1&&this.treeGrid.setCurrentRow(r[a])}navigatePageUp(){this.dataNavigator.navigatePageUp()}navigatePageDown(){this.dataNavigator.navigatePageDown()}},Pt=class extends G{tableActionBuilder;iterableTable;dataSelector;gridEvents;dataNavigator;viewNavigator;keyMapMerger;iterableTree;treeDataStructure;currentColumn=null;selectedRows=[];selectionState={allSelected:!1,except:[]};rowStyleConditions;selectAllPages=t.Config.gridSelectAllPages;selectable=!1;disableSelection;cellSelection=!1;toolbarSlot=[{name:`<<NAME>>_gridSearch`,component:`ZdSearch`}];footerSlot=[{name:`<<NAME>>_iterablePagination`,component:`ZdIterablePagination`},{name:`<<NAME>>_iterableInfoDiv`,component:`ZdTag`,cssClass:`zd-grid-div-footer`,tag:`div`,children:[{name:`<<NAME>>_iterablePageSize`,component:`ZdIterablePageSize`,iterableComponentName:`<<NAME>>`},{name:`<<NAME>>_iterablePageInfo`,component:`ZdIterablePageInfo`,iterableComponentName:`<<NAME>>`}]}];noResultsText=`NO_RESULT`;noResultSlot=[{name:`<<NAME>>_no-result`,component:`ZdText`,cssClass:`no-result`,text:this.noResultsText}];errorSlot=[];dense=!0;dragColumns=!1;headerBackground=``;headerCellTextColor=``;height=`auto`;loadingText=`LOADING`;maxHeight=`none`;maxWidth=`none`;minHeight=`auto`;minWidth=`auto`;noDataText=`NO_DATA`;noDataSlot=[{name:`<<NAME>>_no-data`,component:`ZdText`,cssClass:`no-data`,text:this.noDataText}];resizeColumns=!1;showFooter=!0;showHeader=!0;showSelectAll=!0;width=`100%`;backgroundColor=`transparent`;parentField=``;openLevelOnLoad=!1;fetchOnDemand=!0;fieldHasChild;flat=!1;detach=!1;lazyLoad=!0;constructor(e){super(e),this.cellSelection=this.getInitValue(`cellSelection`,e.cellSelection,this.cellSelection),this.dense=this.getInitValue(`dense`,e.dense,this.dense),this.disableSelection=this.getInitValue(`disableSelection`,e.disableSelection,this.disableSelection),this.dragColumns=this.getInitValue(`dragColumns`,e.dragColumns,this.dragColumns),this.fillHeight=this.getInitValue(`fillHeight`,e.fillHeight,this.fillHeight),this.headerCellTextColor=this.getInitValue(`headerCellTextColor`,e.headerCellTextColor,this.headerCellTextColor),this.height=this.getInitValue(`height`,e.height,this.height),this.loadingText=this.getInitValue(`loadingText`,e.loadingText,this.loadingText),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.noDataText=this.getInitValue(`noDataText`,e.noDataText,this.noDataText),this.noResultsText=this.getInitValue(`noResultsText`,e.noResultsText,this.noResultsText),this.resizeColumns=this.getInitValue(`resizeColumns`,e.resizeColumns,this.resizeColumns),this.rowStyleConditions=this.getInitValue(`rowStyleConditions`,e.rowStyleConditions,this.rowStyleConditions),this.selectable=this.getInitValue(`selectable`,e.selectable,this.selectable),this.selectAllPages=this.getInitValue(`selectAllPages`,e.selectAllPages,this.selectAllPages),this.showFooter=this.getInitValue(`showFooter`,e.showFooter,this.showFooter),this.showHeader=this.getInitValue(`showHeader`,e.showHeader,this.showHeader),this.showSelectAll=this.getInitValue(`showSelectAll`,e.showSelectAll,this.showSelectAll),this.width=this.getInitValue(`width`,e.width,this.width),this.backgroundColor=this.getInitValue(`backgroundColor`,e.backgroundColor,this.backgroundColor);let t=this.backgroundColor===`transparent`?``:this.backgroundColor;this.headerBackground=this.getInitValue(`headerBackground`,e.headerBackground,t),this.parentField=this.getInitValue(`parentField`,e.parentField,this.parentField),this.openLevelOnLoad=this.getInitValue(`openLevelOnLoad`,e.openLevelOnLoad,this.openLevelOnLoad),this.fetchOnDemand=this.getInitValue(`fetchOnDemand`,e.fetchOnDemand,this.fetchOnDemand),this.fieldHasChild=this.getInitValue(`fieldHasChild`,e.fieldHasChild,this.fieldHasChild),this.flat=this.getInitValue(`flat`,e.flat,this.flat),this.detach=this.getInitValue(`detach`,e.detach,this.detach),this.lazyLoad=e.datasource?.lazyLoad!==!1,this.toolbarSlot=e.toolbarSlot||this.toolbarSlot,this.footerSlot=e.footerSlot||this.footerSlot,this.noDataSlot=e.noDataSlot||this.noDataSlot,this.noResultSlot=e.noResultSlot||this.noResultSlot,this.errorSlot=e.errorSlot||this.errorSlot,this.noDataSlot=this.changeDefaultSlotNames(this.noDataSlot),this.footerSlot=this.changeDefaultSlotNames(this.footerSlot),this.toolbarSlot=this.changeDefaultSlotNames(this.toolbarSlot),this.noResultSlot=this.changeDefaultSlotNames(this.noResultSlot),this.errorSlot=this.changeDefaultSlotNames(this.errorSlot),this.tableActionBuilder=new vt(this),this.iterableTable=new ht(this),this.dataSelector=new Mt(this),this.gridEvents=new ft(this),this.dataNavigator=new Nt(this),this.viewNavigator=new yt,this.iterableTree=new At(this),this.treeDataStructure=new b(this)}initializeDatasource(e){let t=(0,se.default)(e);t.datasource&&(t.datasource.lazyLoad=!0,t.datasource.loadAll=!0),super.initializeDatasource(t),this.treeDataStructure.initialize()}onCreated(){super.onCreated()}onMounted(e){super.onMounted(e),this.keyMapMerger=new gt(this,[_t,jt]),this.keyMapMerger.bind(e),this.iterableTree.onMounted(e)}onBeforeDestroy(){super.onBeforeDestroy(),this.keyMapMerger.unbind()}async toggleExpand(e,t){let n=await this.treeDataStructure.toggleExpand(e,t);return this.updateScrollData(),n}navigateToggle(e){this.treeDataStructure.navigateToggle(e)}getChildren(e){return this.treeDataStructure.getChildren(e)}findDataIndex(e,t){return this.treeDataStructure.findDataIndex(e,t)}getParentRow(e){return this.treeDataStructure.getParentRow(e)}buildTreeStructure(){this.treeDataStructure.buildTree()}resetTree(){this.treeDataStructure.resetTree()}filterRootData(){return this.datasource.addFilter(this.parentField,`NULL`)}getConditionalProps({row:e,column:t}){let n=this.getRowStyleConditions(e),r=this.getAppliedConditions({row:e,column:t});return{...n,...r}}navigatePageUp(){this.dataNavigator.navigatePageUp()}navigatePageDown(){this.dataNavigator.navigatePageDown()}setViewNavigate(e){this.viewNavigator.setViewNavigate(e)}navigateLeft(e){this.cellSelection&&this.viewNavigator.navigateLeft(e)}navigateRight(e){this.cellSelection&&this.viewNavigator.navigateRight(e)}navigateUp(){this.viewNavigator.navigateUp()}navigateDown(){this.viewNavigator.navigateDown()}navigateDatasource(e){this.dataNavigator.navigateDatasource(e)}createColumn(e){return new ut(e)}rowClick(e,t,n){this.gridEvents.rowClick(this.treeDataStructure.clearRow(e),t,n)}cellClick(e,t,n,r){this.gridEvents.cellClick(e,t,n,r)}selectClick(e,t,n,r){this.dataSelector.selectClick(e,t,n,r)}selectAllClick(e,t,n){this.dataSelector.selectAllClick(e,t,n)}selectAll(e){this.dataSelector.selectAll(e)}toggleRow(e){this.dataSelector.toggleRow(e)}selectRow(e,t){this.dataSelector.selectRow(e,t)}callDisableSelection(e){return this.dataSelector.callDisableSelection(e)}changeOrder(e){return this.iterableTable.changeOrder(e)}selectCell(e,t){this.iterableTable.selectCell(e,t)}reapplyRowStyleConditions(e){return this.iterableTable.reapplyRowStyleConditions(e)}getRowStyleConditions(e){return this.iterableTable.getRowStyleConditions(e)}deleteRows(){return this.iterableTable.deleteRows()}getActionComponent(e,t,n,r){return this.tableActionBuilder.getActionComponent(e,t,n,r)}changeData(e=this.datasource.data){super.changeData(e),e.forEach(e=>this.iterableTable.reapplyRowStyleConditions(e))}selectChildren(e){this.dataSelector.selectChildren(e)}unselectChildren(e){this.dataSelector.unselectChildren(e)}buildTree(e){this.iterableTree.buildTree(e)}setViewUpdateScrollData(e){this.iterableTree.setViewUpdateScrollData(e)}updateScrollData(){this.iterableTree.updateScrollData()}updateData(e){return this.datasource.data=e,this.resetTree(),Promise.resolve(e)}},Ft=class extends M{columns=4;dataLabel=``;datasource;dataValue=``;vertical=!0;returnObject=!1;constructor(e){super(e),this.columns=this.getInitValue(`columns`,e.columns,this.columns),this.dataLabel=this.getInitValue(`dataLabel`,e.dataLabel,this.dataLabel),this.dataValue=this.getInitValue(`dataValue`,e.dataValue,this.dataValue),this.vertical=this.getInitValue(`vertical`,e.vertical,this.vertical),this.returnObject=this.getInitValue(`returnObject`,e.returnObject,this.returnObject),t.Accessor.isAccessorDefinition(e.value)||(this.value=this.getInitValue(`value`,e.value,[])),e.datasource&&e.datasource.type===`simple`&&(this.dataValue=`value`,this.dataLabel=this.dataValue),this.datasource=t.DatasourceFactory.factory(e.datasource)}onBeforeDestroy(){super.onBeforeDestroy(),this.datasource.destroy()}onCreated(){super.onCreated(),this.datasource?.initialize()}};k.register(`ZdCheckboxMultiple`,Ft);var It=class extends O{active=!0;activeClass=``;closable=!1;closeIcon=`delete`;draggable=!1;link=!1;outlined=!1;ripple=!0;round=!0;value=!1;xLarge=!1;xSmall=!1;constructor(e){super(e),this.active=this.getInitValue(`active`,e.active,this.active),this.activeClass=this.getInitValue(`activeClass`,e.activeClass,this.activeClass),this.closable=this.getInitValue(`closable`,e.closable,this.closable),this.closeIcon=this.getInitValue(`closeIcon`,e.closeIcon,this.closeIcon),this.draggable=this.getInitValue(`draggable`,e.draggable,this.draggable),this.link=this.getInitValue(`link`,e.link,this.link),this.outlined=this.getInitValue(`outlined`,e.outlined,this.outlined),this.ripple=this.getInitValue(`ripple`,e.ripple,this.ripple),this.round=this.getInitValue(`round`,e.round,this.round),this.value=this.getInitValue(`value`,e.value,this.value),this.xLarge=this.getInitValue(`xLarge`,e.xLarge,this.xLarge),this.xSmall=this.getInitValue(`xSmall`,e.xSmall,this.xSmall),this.createAccessors()}},Lt=class extends T{backgroundColor=`primary`;backgroundOpacity=`0.5`;color=`primary`;height=4;indeterminate=!1;centerSlot=[];value=0;constructor(e){super(e),this.backgroundColor=this.getInitValue(`backgroundColor`,e.backgroundColor,this.backgroundColor),this.backgroundOpacity=this.getInitValue(`backgroundOpacity`,e.backgroundOpacity,this.backgroundOpacity),this.color=this.getInitValue(`color`,e.color,this.color),this.height=this.getInitValue(`height`,e.height,this.height),this.indeterminate=this.getInitValue(`indeterminate`,e.indeterminate,this.indeterminate),this.centerSlot=this.getInitValue(`centerSlot`,e.centerSlot,this.centerSlot),this.value=this.getInitValue(`value`,e.value,this.value)}},Rt=class extends T{backgroundColor=``;borderless=!1;color=`primary`;dense=!1;mandatory=!1;multiple=!1;rounded=!1;shaped=!1;tag=`div`;tile=!1;selectedButtons=null;large=!1;small=!1;constructor(e){super(e),this.backgroundColor=this.getInitValue(`backgroundColor`,e.backgroundColor,this.backgroundColor),this.borderless=this.getInitValue(`block`,e.borderless,this.borderless),this.color=this.getInitValue(`color`,e.color,this.color),this.dense=this.getInitValue(`disabled`,e.dense,this.dense),this.mandatory=this.getInitValue(`mandatory`,e.mandatory,this.mandatory),this.multiple=this.getInitValue(`multiple`,e.multiple,this.multiple),this.rounded=this.getInitValue(`rounded`,e.rounded,this.rounded),this.shaped=this.getInitValue(`shaped`,e.shaped,this.shaped),this.tag=this.getInitValue(`tag`,e.tag,this.tag),this.tile=this.getInitValue(`tile`,e.tile,this.tile),this.selectedButtons=this.getInitValue(`selectedButtons`,e.selectedButtons,this.selectedButtons),this.large=this.getInitValue(`large`,e.large,this.large),this.small=this.getInitValue(`small`,e.small,this.small),this.multiple&&!Array.isArray(this.selectedButtons)&&(this.selectedButtons=[]),Array.isArray(this.selectedButtons)&&this.selectedButtons.length>0&&(this.multiple=!0)}change(e,t){this.callEvent(`change`,{event:e,element:t,component:this})}},zt=class extends U{constructor(e){super(`Detail component '${e}' not found.`),this.name=`DetailNotFoundError`}},Bt=class extends U{constructor(e){super(`Master component '${e}' not found.`),this.name=`MasterNotFoundError`}},Vt=class extends T{config={};lazyRelate=!1;height=`auto`;minHeight=`auto`;maxHeight=`none`;fillHeight=!1;constructor(e){super(e),this.config=this.getInitValue(`config`,e.config,this.config),this.lazyRelate=this.getInitValue(`lazyRelate`,e.lazyRelate,this.lazyRelate),this.height=this.getInitValue(`height`,e.height,this.height),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.fillHeight=this.getInitValue(`fillHeight`,e.fillHeight,this.fillHeight)}createRelationship(e,n=[]){if(e.datasource&&n.length){let r=e.datasource,{onChangeCurrentRow:i}=r.events;r.events.onChangeCurrentRow=({component:e})=>{i&&i({component:e});let a=r.currentRow[r.uniqueKey];n.forEach(e=>{try{let n=t.Metadata.getInstance(e.name);n.datasource?a?n.datasource.addFilter(e.column,a):n.datasource.data=[]:n.value=r.currentRow,e.details&&this.createRelationship(n,e.details)}catch(n){throw n instanceof t.InstanceNotFoundError?new zt(e.name):n}})}}}createRelationships(){try{let e=t.Metadata.getInstance(this.config.name);this.createRelationship(e,this.config.details)}catch(e){throw e instanceof t.InstanceNotFoundError?new Bt(this.config.name):e}}onMounted(e){super.onMounted(e),this.lazyRelate||this.createRelationships()}},Ht=class extends T{areaColor=`#bdbdbd`;areaHoverColor=`#999`;areaSelectColor=`primary`;height=`auto`;multiple=!1;width=`auto`;svgContent=``;svgContainer;tooltipData;loading=!1;keyColumn=`id`;mapAreas=[];srcValue=``;selectedAreaValue=``;viewBeforeUpdate;viewUpdate;constructor(e){super(e),this.areaColor=this.getInitValue(`areaColor`,e.areaColor,this.areaColor),this.areaHoverColor=this.getInitValue(`areaHoverColor`,e.areaHoverColor,this.areaHoverColor),this.areaSelectColor=this.getInitValue(`areaSelectColor`,e.areaSelectColor,this.areaSelectColor),this.multiple=this.getInitValue(`multiple`,e.multiple,this.multiple),this.selectedArea=this.getInitValue(`selectedArea`,e.selectedArea,this.selectedArea),this.src=this.getInitValue(`src`,e.src,this.src),this.height=this.getInitValue(`height`,e.height,this.height),this.width=this.getInitValue(`width`,e.width,this.width),this.tooltipData=this.getInitValue(`tooltipData`,e.tooltipData,this.tooltipData),this.keyColumn=this.getInitValue(`keyColumn`,e.keyColumn,this.keyColumn)}get src(){return this.srcValue}set src(e){this.srcValue=e,this.getSVG()}get selectedArea(){return this.selectedAreaValue}set selectedArea(e){this.selectedAreaValue=e,this.updateSelectedArea()}updateSelectedArea(){let e=this.multiple?this.selectedAreaValue:[this.selectedAreaValue];this.mapAreas.forEach(t=>{e.indexOf(t.id)>-1?t.classList.add(`active`):t.classList.remove(`active`)})}getSVG(){this.srcValue&&(this.loading=!0,t.Http.get(this.srcValue,{baseURL:``}).then(e=>{this.svgContent=e.data,this.updateSVGContainer(),this.loading=!1}))}setViewBeforeUpdate(e){this.viewBeforeUpdate=e}setViewUpdate(e){this.viewUpdate=e}updateSVGContainer(){if(this.svgContainer&&this.svgContent)if(this.svgContent.indexOf(`<svg`)>=0&&this.svgContent.indexOf(`</svg>`)>=0){this.viewBeforeUpdate&&this.viewBeforeUpdate(),this.svgContainer.innerHTML=this.svgContent;let e=this.svgContainer.getElementsByTagName(`svg`)[0];this.mapAreas=Array.from(e.children),this.updateSelectedArea(),this.viewUpdate&&this.viewUpdate()}else throw Error(`Must be a valid svg file`)}mapClick(e){let{id:t}=e;if(!this.multiple)this.selectedArea=t;else{this.selectedArea=this.selectedArea||[],Array.isArray(this.selectedArea)||(this.selectedArea=[this.selectedArea]);let e=this.selectedArea.indexOf(t);e>-1?this.selectedArea.splice(e,1):this.selectedArea.push(t),this.updateSelectedArea()}this.callEvent(`areaClick`,{area:e,component:this})}},Ut=class extends T{nodesValue=[];itemIconName=``;groupIconName=``;openedIconName=``;closedIconName=``;allowMultiSelect=!0;allowDragDrop=!0;afterTitleSlot;toolbarSlot=[];height=`auto`;minHeight=`auto`;maxHeight=`none`;fillHeight=!1;width=`100%`;minWidth=`auto`;maxWidth=`none`;titleSlot=[];datasource;parentField=``;titleField=``;dataField=``;checkedField=`checked`;openLevelOnLoad=!1;checkbox=!1;disableCheckbox;tree;treeDataStructure;lazyLoad=!0;appliedConditions={};factoredConditions={};constructor(e){super(e),this.itemIconName=this.getInitValue(`itemIconName`,e.itemIconName,this.itemIconName),this.groupIconName=this.getInitValue(`groupIconName`,e.groupIconName,this.groupIconName),this.openedIconName=this.getInitValue(`openedIconName`,e.openedIconName,this.openedIconName),this.closedIconName=this.getInitValue(`closedIconName`,e.closedIconName,this.closedIconName),this.allowMultiSelect=this.getInitValue(`allowMultiSelect`,e.allowMultiSelect,this.allowMultiSelect),this.allowDragDrop=this.getInitValue(`allowDragDrop`,e.allowDragDrop,this.allowDragDrop),this.parentField=this.getInitValue(`parentField`,e.parentField,this.parentField),this.titleField=this.getInitValue(`titleField`,e.titleField,this.titleField),this.dataField=this.getInitValue(`dataField`,e.dataField,this.dataField),this.checkedField=this.getInitValue(`checkedField`,e.checkedField,this.checkedField),this.openLevelOnLoad=this.getInitValue(`openLevelOnLoad`,e.openLevelOnLoad,this.openLevelOnLoad),this.checkbox=this.getInitValue(`checkbox`,e.checkbox,this.checkbox),this.height=this.getInitValue(`height`,e.height,this.height),this.minHeight=this.getInitValue(`minHeight`,e.minHeight,this.minHeight),this.maxHeight=this.getInitValue(`maxHeight`,e.maxHeight,this.maxHeight),this.fillHeight=this.getInitValue(`fillHeight`,e.fillHeight,this.fillHeight),this.width=this.getInitValue(`width`,e.width,this.width),this.minWidth=this.getInitValue(`minWidth`,e.minWidth,this.minWidth),this.maxWidth=this.getInitValue(`maxWidth`,e.maxWidth,this.maxWidth),this.disableCheckbox=this.getInitValue(`disableCheckbox`,e.disableCheckbox,this.disableCheckbox),this.afterTitleSlot=e.afterTitleSlot||this.afterTitleSlot,this.toolbarSlot=e.toolbarSlot||this.toolbarSlot,this.titleSlot=e.titleSlot||this.titleSlot,e.afterTitleSlot&&this.createConditions([e.afterTitleSlot]),e.titleSlot&&this.createConditions(e.titleSlot),e.datasource&&Object.keys(e.datasource).length?(this.lazyLoad=e.datasource.lazyLoad!==!1,this.datasource=t.DatasourceFactory.factory({...e.datasource,searchIn:e.datasource.searchIn||[this.titleField,this.dataField].filter(Boolean),lazyLoad:!0,loadAll:!0})):(this.datasource=t.DatasourceFactory.factory({type:`memory`,data:[]}),console.warn(`[Tree] Nenhum datasource foi passado para o componente. Datasource de memória vazio foi criado.`)),this.nodes=e.nodes||this.nodes,this.datasource?.data?.length&&this.createDataStructure()}initNodes(e,t){return e.map(e=>{let n={title:``,isLeaf:!1,isExpanded:!0,isSelected:!1,isDraggable:!0,isSelectable:!0,data:{[this.checkedField]:!1},children:[]};if(n=(0,B.default)(n,e,t),e.isLeaf===void 0){let e=n.children.length>0;n.isLeaf=!e}return n.children=this.initNodes(e.children||[],t),n})}get nodes(){return this.nodesValue}set nodes(e){let t={};this.allowDragDrop||(t={isDraggable:!1}),this.nodesValue=this.initNodes(e,t)}async onCreated(){super.onCreated(),this.datasource&&(await this.datasource.initialize(),this.createDataStructure())}getCheckedNodes(){let e=[];return this.tree.traverse(t=>{t.data?.[this.checkedField]&&e.push(t)}),e}get selectedNodes(){return this.tree?.getSelected()||[]}createDataStructure(){this.treeDataStructure=new b(this),this.treeDataStructure.initialize(),this.lazyLoad?this.createNodesFromDatasource():this.datasource.get().then(()=>{this.createNodesFromDatasource(!1)})}createNodesFromDatasource(e=!0){if(this.datasource?.data.length&&this.treeDataStructure){e&&this.treeDataStructure.buildTree();let t=this.treeDataStructure.treeData.filter(e=>e.tree__level===1);this.nodes=this.createChildrenNodes(t)}}createNodeFromRow(e){return{title:e[this.titleField],data:e[this.dataField],isExpanded:e.tree__opened,isLeaf:e.tree__children.length===0,children:this.createChildrenNodes(e.tree__children)}}createChildrenNodes(e){let t=[];return e.forEach(e=>{let n=this.createNodeFromRow(e);t.push(n)}),t}insertNode(e){let t=this.initNodes([e])[0];if(this.selectedNodes.length){this.updateNodeData(this.selectedNodes[0],{isLeaf:!1});let e={node:this.selectedNodes[0],placement:`inside`};this.tree.insert(e,t)}else this.nodes.push(t)}importNodes(e){this.selectedNodes.length?e.reverse().forEach(e=>{this.insertNode(e)}):e.forEach(e=>{this.insertNode(e)})}removeSelected(){let e=[];if(this.selectedNodes.length){let t=this.selectedNodes.map(t=>{let n=this.getParentNode(t);return n&&e.push(n.path),t.path});this.tree.remove(t),e.forEach(e=>{let t=this.getNode(e);t?.children&&t.children.length===0&&this.tree.updateNode(e,{isLeaf:!0})})}}updateNodeData(e,t){e.children&&e.children.length===0&&this.tree.updateNode(e.path,{isLeaf:!0}),this.tree.updateNode(e.path,t)}setTree(e){this.tree=e}getPlainConditions(e,t=``){let n={};return Object.keys(e).forEach(r=>{let i=t?[t,r].join(`.`):r;typeof e[r]==`object`?n={...n,...this.getPlainConditions(e[r],i)}:n[i]=e[r]}),n}createConditions(e,n=``){e.forEach(e=>{let r=n?`${n}.${e.name}`:e.name;if(e.conditions){let n=this.getPlainConditions(e.conditions);this.factoredConditions[r]=t.Event.factory(n)}e.children&&this.createConditions(e.children,r)})}applyCondition(e,t){let n={};return Object.keys(t).forEach(r=>{let i=t[r];(0,ce.default)(n,r,i(e))}),n}applyChildCondition(e,t=this.factoredConditions){let n={};return Object.keys(t).forEach(t=>{let r=this.factoredConditions[t];n[t]={...this.applyCondition(e,r)}}),n}reapplyConditions(e){let t=e.pathStr;if(!t)return{};let n={...this.appliedConditions};return n[t]=this.applyChildCondition(e),this.appliedConditions=n,this.appliedConditions[t]}filterObject(e,t){return Object.fromEntries(Object.entries(e).filter(([e,n])=>t(e,n)))}deleteAccessorProps(e){return this.filterObject(e,(e,n)=>!t.Accessor.isAccessorDefinition(n))}updateActionInstance(e,n){let r=this.deleteAccessorProps(n);return r.datasource=void 0,r.events=void 0,t.Metadata.updateInstance(e,r)}getSlotComponent(e,t,n=``){let r=Array.isArray(e)?e:[e],i=[];return r.forEach(e=>{if(!e)return;let r=t.pathStr;if(!r)return;let a=e.name.indexOf(`_${r}`)>-1?e.name.substring(0,e.name.indexOf(`_${r}`)):e.name,o=`${a}_${r}`,s=n?`${n}.${a}`:a,c=this.appliedConditions[r]?.[s],l=(0,B.default)({},e,c),u=l.children?this.getSlotComponent(l.children,t,s):[];l.name=o,l.children=u,l.allowDuplicate=!0;let d=null;try{d=this.updateActionInstance(o,l)}catch{d=null}i.push(d||l)}),i}nodeDrop(e,t,n,r){this.callEvent(`onNodeDrop`,{event:n,element:r,component:this,nodes:e,position:t})}nodeSelect(e,t,n){setTimeout(()=>{this.callEvent(`onNodeSelect`,{event:t,element:n,component:this,nodes:e})},10)}nodeClick(e,t,n){this.callEvent(`onNodeClick`,{event:t,element:n,component:this,node:e})}nodeDblClick(e,t,n){this.callEvent(`onNodeDblClick`,{event:t,element:n,component:this,node:e})}nodeCheck(e,t,n){this.callEvent(`onNodeCheck`,{event:t,element:n,component:this,node:e})}clearSelection(e){(e||this.nodes).forEach(e=>{e.isSelected=!1,e.children&&this.clearSelection(e.children)})}getNode(e){return this.searchPath(this.nodes,e)}getParentNode(e){if(Array.isArray(e.path)&&e.path.length>1)return this.tree.getNode(e.path.slice(0,-1))}searchPath(e,t){let n=t[0]>-1&&t[0]<e.length?e[t[0]]:void 0;return n&&t.length>1?this.searchPath(n.children||[],t.slice(1)):n}callDisableCheckbox(e){return!!this.disableCheckbox&&typeof this.disableCheckbox==`function`&&this.disableCheckbox({node:e,component:this})}},Wt=class extends st{align=`center`;appendIcon=`plus`;maxValue;minValue;prependIcon=`minus`;step=1;constructor(e){super(e),this.maxValue=this.getInitValue(`maxValue`,e.maxValue,this.maxValue),this.minValue=this.getInitValue(`minValue`,e.minValue,this.minValue),this.step=this.getInitValue(`step`,e.step,this.step);let t=this.events.appendIconClick;this.events.appendIconClick=({event:e,element:n,component:r})=>{this.plusClick(e,n),t&&typeof t==`function`&&t({event:e,element:n,component:r})};let n=this.events.prependIconClick;this.events.prependIconClick=({event:e,element:t,component:r})=>{this.minusClick(e,t),n&&typeof n==`function`&&n({event:e,element:t,component:r})},this.maxValue!==void 0&&this.addValidation(`max`,{limit:this.maxValue}),this.minValue!==void 0&&this.addValidation(`min`,{limit:this.minValue})}minusClick(e,t){this.decrement(),super.change(e,t)}plusClick(e,t){this.increment(),super.change(e,t)}increment(){this.value=this.value?Number(this.value):this.value,(this.value===null||Number.isNaN(this.value))&&this.minValue?this.value=this.minValue:this.value!==this.maxValue&&(this.value+=this.step)}decrement(){this.value=this.value?Number(this.value):this.value,(this.value===null||Number.isNaN(this.value))&&this.maxValue?this.value=this.maxValue:this.value!==this.minValue&&(this.value-=this.step)}};k.register(`ZdIncrement`,Wt);var Gt=class extends st{mask;defaultMask={...t.Config.masks.numberMask,...t.Config.masks.currencyMask};formatterFn=t.FormatterParserProvider.getFormatter(`ZdCurrency`);parserFn=t.FormatterParserProvider.getParser(`ZdCurrency`);constructor(e){super(e);let t={...this.defaultMask,...e.mask};this.mask=this.getInitValue(`mask`,t,this.defaultMask),this.createAccessors(),this.validateMask()}};t.FormatterParserProvider.registerFormatter(`ZdCurrency`,(e,{mask:n={}}={})=>{let r=n;if(t.Accessor.isAccessorDefinition(r)){let[e,n]=t.Accessor.getAccessor(r);r=t.Loader.getInstance(e)[n]}let i=typeof r==`function`?r(x.default.unformat(e)):r;return i={...t.Config.masks.numberMask,...t.Config.masks.currencyMask,...i},e===null?``:x.default.format(e,i)}),t.FormatterParserProvider.registerParser(`ZdCurrency`,(e,{mask:n={}}={})=>{let r=n;if(t.Accessor.isAccessorDefinition(r)){let[e,n]=t.Accessor.getAccessor(r);r=t.Loader.getInstance(e)[n]}let i=typeof r==`function`?r(x.default.format(e)):r;return i={...t.Config.masks.numberMask,...t.Config.masks.currencyMask,...i},e===``?null:x.default.unformat(e,i)}),k.register(`ZdCurrency`,Gt);var Kt=class extends R{dateFormat=t.Config.monthFormat;displayFormat=t.Config.monthDisplayFormat;inputFormat=t.Config.monthInputFormat;isoFormat=`YYYY-MM`;viewMode=`months`;formatterFn=t.FormatterParserProvider.getFormatter(`ZdMonth`);parserFn=t.FormatterParserProvider.getParser(`ZdMonth`);constructor(e){super(e),this.dateFormat=this.getInitValue(`dateFormat`,e.dateFormat,this.dateFormat),this.displayFormat=this.getInitValue(`displayFormat`,e.displayFormat,this.displayFormat),this.inputFormat=this.getInitValue(`inputFormat`,e.inputFormat,this.inputFormat)}};t.FormatterParserProvider.registerFormatter(`ZdMonth`,(e,{dateFormat:n=t.Config.monthFormat,displayFormat:r=t.Config.monthDisplayFormat,inputFormat:i=t.Config.monthInputFormat,isFocused:a}={})=>t.FormatterParserProvider.getFormatter(`ZdDateInput`)(e,{dateFormat:n,displayFormat:r,inputFormat:i,isFocused:a})),t.FormatterParserProvider.registerParser(`ZdMonth`,(e,{dateFormat:n=t.Config.monthFormat,displayFormat:r=t.Config.monthDisplayFormat,inputFormat:i=t.Config.monthInputFormat,isFocused:a}={})=>t.FormatterParserProvider.getParser(`ZdDateInput`)(e,{dateFormat:n,displayFormat:r,inputFormat:i,isFocused:a}));var qt=class{getFormat(e,t,n){let r=[`hh:mm A`,`hh:mm:ss A`,`HH:mm:ss`,`HH:mm`],i=n?`:ss`:``,a={ampm:`hh:mm${i} A`,"24hr":`HH:mm${i}`};return r.includes(e)&&[`ampm`,`24hr`].includes(t)?a[t]:e}},Jt=class extends P{allowedHours;allowedMinutes;allowedSeconds;autofill=!1;timeFormat=t.Config.timeFormat||`ampm`;fullWidth=!1;maxTime=``;minTime=``;scrollable=!1;showTimePicker=!1;useSeconds=!1;width=290;formatterFn=t.FormatterParserProvider.getFormatter(`ZdTime`);parserFn=t.FormatterParserProvider.getParser(`ZdTime`);isoFormatValue=`HH:mm`;valueFormatInternal=t.Config.valueTimeFormat;displayFormatInternal=t.Config.displayTimeFormat;inputFormat=t.Config.timeInputFormat;isDisplayValid=!0;initialMask;isSimpleDisplay;timeError=!1;inputMode=`none`;constructor(e){super(e),this.allowedHours=this.getInitValue(`allowedHours`,e.allowedHours,this.allowedHours),this.allowedMinutes=this.getInitValue(`allowedMinutes`,e.allowedMinutes,this.allowedMinutes),this.allowedSeconds=this.getInitValue(`allowedSeconds`,e.allowedSeconds,this.allowedSeconds),this.timeFormat=this.getInitValue(`timeFormat`,e.timeFormat,this.timeFormat),this.fullWidth=this.getInitValue(`fullWidth`,e.fullWidth,this.fullWidth),this.maxTime=this.getInitValue(`maxTime`,e.maxTime,this.maxTime),this.minTime=this.getInitValue(`minTime`,e.minTime,this.minTime),this.scrollable=this.getInitValue(`scrollable`,e.scrollable,this.scrollable),this.showTimePicker=this.getInitValue(`showTimePicker`,e.showTimePicker,this.showTimePicker),this.useSeconds=this.getInitValue(`useSeconds`,e.useSeconds,this.useSeconds),this.width=this.getInitValue(`width`,e.width,this.width),this.autofill=this.getInitValue(`autofill`,e.autofill,this.autofill),this.timeValidation=this.timeValidation.bind(this),this.valueFormat=this.getInitValue(`valueFormat`,e.valueFormat,this.valueFormatInternal),this.displayFormat=this.getInitValue(`displayFormat`,e.displayFormat,this.displayFormatInternal),this.inputFormat=this.getInitValue(`inputFormat`,e.inputFormat,this.inputFormat),this.timeAllowedValidation=this.timeAllowedValidation.bind(this),this.rules.push(this.timeValidation,this.timeAllowedValidation),this.mask=this.getInitValue(`mask`,e.mask,void 0),this.initialMask=this.getInitialMask(),this.isSimpleDisplay=this.isSimpleFormat(this.displayFormat)}getFormat(e,t){return new qt().getFormat(e,t,this.useSeconds)}get displayFormat(){return this.displayFormatInternal=this.getFormat(this.displayFormatInternal,this.timeFormat),this.displayFormatInternal}set displayFormat(e){this.displayFormatInternal=e}get valueFormat(){return this.valueFormatInternal=this.getFormat(this.valueFormatInternal,`24hr`),this.valueFormatInternal}set valueFormat(e){this.valueFormatInternal=e}get isoFormat(){return this.isoFormatValue=this.useSeconds?`HH:mm:ss`:`HH:mm`,this.isoFormatValue}getInitialMask(){return(0,lt.default)(this.mask)&&(this.mask=this.inputFormat&&this.maskFormat(this.inputFormat)),this.mask}formatter(e){return this.formatterFn(e,this)}parser(e){return this.parserFn(e,this)}selectTime(e,t,n){this.events.onSelectTime&&typeof this.events.onSelectTime==`function`&&this.events.onSelectTime({time:e,event:t,element:n,component:this})}get displayValue(){return this.internalDisplayValue}set displayValue(e){this.timeError=!1,this.internalDisplayValue=e,this.internalValue=this.parser(e),this.value=this.internalValue}updateMask(){return this.isSimpleDisplay=this.isSimpleFormat(this.displayFormat),this.mask=this.getUpdatedMask(),this.mask}getUpdatedMask(){return(0,lt.default)(this.initialMask)?this.maskFormat(this.displayFormat):this.mask}maskFormat(e){return e.replace(/[A-Za-z]/gi,`#`)}setTimeValue(e){let t=this.displayValue;this.isValidTime(e,this.displayFormat)?(this.internalDisplayValue=e,this.internalValue=this.parser(e),this.timeError=!1,t!==this.displayValue&&this.change(this.value)):(e||(this.internalDisplayValue=e,this.internalValue=null,t!==this.displayValue&&this.change(this.value)),this.timeError=!!e),this.value=this.internalValue}isValidTime(e,n,r=!0){return(0,t.dayjs)(e,n,r).isValid()}get isoValue(){return this.formatISOTimeValue(this.value)}set isoValue(e){let t=this.value;this.timeError=!1,this.value=this.parseISOTimeValue(e),t!==this.value&&this.change(this.value)}formatISOTimeValue(e){return e&&this.isValidTime(e,this.valueFormat)?(0,t.dayjs)(e,this.valueFormat).format(this.isoFormat):``}parseISOTimeValue(e){return e&&this.isValidTime(e,this.valueFormat)?(0,t.dayjs)(e,this.isoFormat).format(this.valueFormat):null}isSimpleFormat(e){let n=[`HH`,`mm`,`ss`,`hh`,`A`,`a`,`p`,`P`].reduce((e,t)=>e.replace(t,``),e).split(``);return n.length?n.every(e=>t.Mask.isMaskDelimiter(e)):!0}timeValidation(){return this.isValidTime(this.displayValue,this.displayFormat)||!this.displayValue?!0:t.I18n.translate(`VALIDATION_INVALID_TIME`)}timeAllowedValidation(){return!this.displayValue||this.isValidTime(this.displayValue,this.displayFormat)&&this.isTimeAllowed()||t.I18n.translate(`VALIDATION_TIME_NOT_ALLOWED`)}click(e,t){let n=e||new MouseEvent(`click`);super.click(n,t),n.defaultPrevented||(this.showTimePicker=!this.showTimePicker)}blur(e,n){this.removeTimeMask(),this.setTimeValue(this.formatter(this.value)),super.blur(e,n),t.Utils.isMobile()||(this.showTimePicker=!1)}focus(e,t){this.addTimeMask(),super.focus(e,t)}addTimeMask(){this.value&&(this.mask=this.initialMask,this.internalDisplayValue=(0,t.dayjs)(this.value,this.valueFormat).format(this.inputFormat||this.displayFormat))}removeTimeMask(){(0,lt.default)(this.initialMask)||!this.value||this.timeError||!this.isValidTime(this.value,this.valueFormat)||(this.mask=``)}isFullyValid(e=this.value){return this.isValidTime(e,this.valueFormat,!0)&&this.isDisplayValid}isTimeAllowed(e=this.value){return this.isSameOrAfterMin(e)&&this.isSameOrBeforeMax(e)&&this.isHourAllowed(e)&&this.isMinuteAllowed(e)&&this.isSecondAllowed(e)}isSameOrAfterMin(e){if(!this.minTime)return!0;let n=(0,t.dayjs)(this.minTime,this.valueFormat);return(0,t.dayjs)(e,this.valueFormat).isSame(n)||(0,t.dayjs)(e,this.valueFormat).isAfter(n)}isSameOrBeforeMax(e){if(!this.maxTime)return!0;let n=(0,t.dayjs)(this.maxTime,this.valueFormat);return(0,t.dayjs)(e,this.valueFormat).isSame(n)||(0,t.dayjs)(e,this.valueFormat).isBefore(n)}isHourAllowed(e){if(!this.allowedHours)return!0;let n=(0,t.dayjs)(e,this.valueFormat).hour();return this.allowedHours.includes(n)}isMinuteAllowed(e){if(!this.allowedMinutes)return!0;let n=(0,t.dayjs)(e,this.valueFormat).minute();return this.allowedMinutes.includes(n)}isSecondAllowed(e){if(!this.allowedSeconds)return!0;let n=(0,t.dayjs)(e,this.valueFormat).second();return this.allowedSeconds.includes(n)}clear(){this.value=null,this.change(this.value),typeof this.events?.onClear==`function`&&this.events.onClear({component:this,value:this.value})}toMask(e){return e.replace(/[A-Za-z]/gi,`#`)}getMask(){return this.mask&&!this.mask.includes(`{{`)&&!this.mask.includes(`}}`)&&this.isFocused?this.toMask(this.displayFormat||``):``}};t.FormatterParserProvider.registerFormatter(`ZdTime`,(e,{valueFormat:n=t.Config.valueTimeFormat,displayFormat:r=t.Config.displayTimeFormat,inputFormat:i=t.Config.timeInputFormat,timeFormat:a=t.Config.timeFormat||`ampm`,useSeconds:o=!1,mask:s=``,initialMask:c,isSimpleDisplay:l=!1}={})=>{if(!e)return``;let u=new qt,d=u.getFormat(r,a,o),f=u.getFormat(n,`24hr`,o);if(!(0,t.dayjs)(e,f,!0).isValid())return e;if(s&&c){if(i)return(0,t.dayjs)(e,f).format(i);let n=e;l&&(n=(0,t.dayjs)(e,f).format(d));let r=t.Mask.getValueWithoutMask(n);return t.Mask.getValueWithMask(r,s)}return(0,t.dayjs)(e,f).format(d)}),t.FormatterParserProvider.registerParser(`ZdTime`,(e,{displayFormat:n=t.Config.displayTimeFormat,valueFormat:r=t.Config.valueTimeFormat,timeFormat:i=t.Config.timeFormat||`ampm`,useSeconds:a=!1,mask:o=``,initialMask:s}={})=>{if(!e)return null;let c=new qt,l=c.getFormat(n,i,a),u=c.getFormat(r,`24hr`,a);if((0,t.dayjs)(e,l,!0).isValid())return(0,t.dayjs)(e,l).format(u);if(o&&t.Mask.checkMask(e,o)){let n=t.Mask.getValueWithoutMask(e),r;if(!s){let e=l.replace(/[A-Za-z]/gi,`#`);r=t.Mask.getValueWithMask(n,e)}let i=u.replace(/[A-Za-z]/gi,`#`);if(r=t.Mask.getValueWithMask(n,i),(0,t.dayjs)(r,u,!0).format(u)===r)return r}return e}),k.register(`ZdTime`,Jt);function Yt(e,t,n=!0){return n&&e?Xt(e,t):``}function Xt(e,t){let n=I(e);return`${n}${t}${n}`}function Zt({inputFormat:e,displayFormat:t,splitter:n,isFocused:r}){let i=e||t,a=r?I(i):``;return{mask:Yt(i,n,r),unitMask:a}}var Qt=class extends P{allowedDates;autocomplete=!1;dateFormat=t.Config.dateFormat;displayFormat=t.Config.displayFormat;inputFormat=t.Config.dateInputFormat;showDatePicker=!1;firstDayOfWeek=0;fullWidth=!1;locale=t.I18n.instance.language;scrollable=!1;showWeek=!1;get splitter(){return t.I18n.translate(this.internalSplitter)}set splitter(e){this.internalSplitter=e}internalSplitter=` ~ `;width=248;helperOptions=[];max=``;min=``;helperValue=``;isoFormat=`YYYY-MM-DD`;dateError=!1;formatterFn=t.FormatterParserProvider.getFormatter(`ZdDateRange`);parserFn=t.FormatterParserProvider.getParser(`ZdDateRange`);inputMode=`none`;constructor(e){if(super(e),typeof e.appendIcon==`string`&&e.appendIcon.startsWith(`{{`)&&e.appendIcon.endsWith(`}}`)){let t=e.appendIcon.match(/{{(.*?)}}/);if(t){let n=t[1].trim().split(`.`),r=window;for(let e of n)r=r?.[e];this.appendIcon=r??e.appendIcon}else this.appendIcon=e.appendIcon}else this.appendIcon=this.getInitValue(`appendIcon`,e.appendIcon,`calendar`);this.allowedDates=this.getInitValue(`allowedDates`,e.allowedDates,this.allowedDates),this.autocomplete=this.getInitValue(`autocomplete`,e.autocomplete,this.autocomplete),this.dateFormat=this.getInitValue(`dateFormat`,e.dateFormat,this.dateFormat),this.dateValidation=this.dateValidation.bind(this),this.displayFormat=this.getInitValue(`displayFormat`,e.displayFormat,this.displayFormat),this.inputFormat=this.getInitValue(`inputFormat`,e.inputFormat,this.inputFormat),this.firstDayOfWeek=this.getInitValue(`firstDayOfWeek`,e.firstDayOfWeek,this.firstDayOfWeek),this.fullWidth=this.getInitValue(`fullWidth`,e.fullWidth,this.fullWidth),this.locale=this.getInitValue(`locale`,e.locale,this.locale),this.scrollable=this.getInitValue(`scrollable`,e.scrollable,this.scrollable),this.showDatePicker=this.getInitValue(`showDatePicker`,e.showDatePicker,this.showDatePicker),this.showWeek=this.getInitValue(`showWeek`,e.showWeek,this.showWeek),this.splitter=this.getInitValue(`splitter`,e.splitter,this.internalSplitter),this.width=this.getInitValue(`width`,e.width,this.width),this.helperOptions=this.getInitValue(`helperOptions`,e.helperOptions,this.helperOptions),this.helperValue=this.getInitValue(`helperValue`,e.helperValue,this.helperValue),this.min=this.getInitValue(`min`,e.min,this.min),this.max=this.getInitValue(`max`,e.max,this.max),this.rules.push(this.dateValidation)}appendIconClick(e,t){this.iconClick(e,t),super.appendIconClick(e,t)}formatter(e){return this.formatterFn(e,this)}parser(e){return this.parserFn(e,this)}get displayValue(){return this.internalDisplayValue}set displayValue(e){this.dateError=!1,this.internalDisplayValue=e,e?this.internalValue=this.parser(e):this.internalValue=[],this.value=this.internalValue}get value(){return this.internalValue}set value(e){if(!Array.isArray(e)&&e!=null)return;if(!e||e.length===0){this.internalValue=[],this.internalDisplayValue=``,this.dateObject=[];return}if(this.internalValue===e)return;this.internalDisplayValue=this.formatter(e),this.internalValue=e;let[t,n]=e,r=this.isValidFormatDate(t,this.dateFormat),i=!n||this.isValidFormatDate(n,this.dateFormat);r&&i&&(this.dateObject=this.getDatesInRange(t,n))}getDatesInRange(e,n){let r=[],i=(0,t.dayjs)(e,this.dateFormat);if(!n)return[i];let a=(0,t.dayjs)(n,this.dateFormat);for(;i.isBefore(a)||i.isSame(a);)r.push(i),i=i.add(1,`day`);return r}setDateValue(e){let t=this.displayValue,n=this.splitValues(e);this.isValidDateArray(this.displayFormat,n)?(this.internalDisplayValue=e,this.internalValue=this.parser(e),this.dateError=!1,t!==this.displayValue&&this.change()):(e||(this.internalDisplayValue=e,this.internalValue=[],t!==this.displayValue&&this.change()),this.dateError=!!e),this.value=this.internalValue}isValidDateArray(e,t){return!t||t.length<2?!1:t.every(t=>this.isValidDate(t,e))}splitValues(e){let t=[];return e?e.indexOf(this.splitter)===-1?[e]:(t=e.split(this.splitter),t[1]===``?[t[0]]:t):t}isValidDate(e,n,r=!0){let i=(0,t.dayjs)(e,n,r);if(!i.isValid())return!1;let a=this.min?(0,t.dayjs)(this.min,this.dateFormat):null;if(!(!a||i.isAfter(a)||i.isSame(a)))return!1;let o=this.max?(0,t.dayjs)(this.max,this.dateFormat):null;return!(!(!o||i.isBefore(o)||i.isSame(o))||!this.getAllowedDates((0,t.dayjs)(e,n).toDate()))}isValidFormatDate(e,n,r=!0){return(0,t.dayjs)(e,n,r).isValid()}get isoRangeValue(){return this.formatISODateRangeValue(this.value)}set isoRangeValue(e){let n=this.value;this.dateError=!1,this.value=this.parseISODateRangeValue(e),t.Utils.isEqual(n,this.value)||this.change()}formatISODateRangeValue(e){let n;n=Array.isArray(e)?e:this.splitValues(e);let r=[];return n.forEach(e=>{e&&this.isValidFormatDate(e,this.dateFormat)&&r.push((0,t.dayjs)(e,this.dateFormat,!0).format(this.isoFormat))}),r}parseISODateRangeValue(e){let n=[];return e.length&&e.forEach(e=>{e&&this.isValidFormatDate(e,this.isoFormat)&&n.push((0,t.dayjs)(e,this.isoFormat,!0).format(this.dateFormat))}),this.sortDates(n)}sortDates(e){return e.sort((e,n)=>(0,t.dayjs)(e,this.dateFormat).isAfter((0,t.dayjs)(n,this.dateFormat))?1:-1)}dateValidation(){return!this.dateError||t.I18n.translate(`VALIDATION_INVALID_DATE`)}click(e,t){let n=e||new MouseEvent(`click`);super.click(n,t),n.defaultPrevented||(this.showDatePicker=!this.showDatePicker)}blur(e,n){super.blur(e,n),this.value&&(this.value=this.sortDates(this.value),this.setDateValue(this.formatter(this.value))),t.Utils.isMobile()||(this.showDatePicker=!1)}focus(e,t){super.focus(e,t),this.updateDisplayValue()}updateDisplayValue(){if(!this.inputFormat||!this.value)return;let e,n;if(this.value[0]&&(e=(0,t.dayjs)(this.value[0],this.dateFormat,!0),!e.isValid())||this.value[1]&&(n=(0,t.dayjs)(this.value[1],this.dateFormat,!0),!n.isValid()))return;let r=this.inputFormat,i=e?e.format(r):``;if(!n){this.internalDisplayValue=i;return}let a=n.format(r);this.internalDisplayValue=`${i}${this.splitter}${a}`}togglePicker(){this.showDatePicker=!this.showDatePicker}iconClick(e,t){super.click(e,t),e.defaultPrevented||this.togglePicker()}previousHint=``;previousPersistentHint=!1;updateHelperHint(e){let n=this.helperValue?t.DateHelper.getLabel(this.helperValue):``;(!this.hint||n!==this.hint)&&(this.previousHint=this.hint,this.previousPersistentHint=this.persistentHint),this.helperValue=e;let r=t.DateHelper.getLabel(e);if(!e||!r){this.hint=this.previousHint,this.persistentHint=this.previousPersistentHint;return}this.hint=r,this.persistentHint=!0}change(e,t){super.change(e,t),this.updateHelperHint(``)}getExtremities(e){return e.length===0?[]:e.length===1?[e[0]]:[e[0],e[e.length-1]]}setNativeDate(e){this.dateError=!1;let n=(e||[]).map(e=>(0,t.dayjs)(e)),[r,i]=this.getExtremities(n);if(r&&i){for(let e=r;e.isBefore(i)||e.isSame(i);e=e.add(1,`day`))if(!this.getAllowedDates(e.toDate())){this.dateError=!0;return}}this.dateObject=(e||[]).map(e=>(0,t.dayjs)(e)),this.value=this.getExtremities(this.dateObject).filter(e=>e!==null).map(e=>e.format(this.dateFormat))}dateObject=[];getNativeDate(){return this.dateObject.filter(e=>e!==null).map(e=>e.toDate())}getAllowedDates(e){return F(e,this.dateFormat,this.allowedDates)}getMask(){return Yt(this.inputFormat||this.displayFormat||``,this.splitter,this.isFocused)}};return t.FormatterParserProvider.registerFormatter(`ZdDateRange`,(e,{dateFormat:n=t.Config.dateFormat,displayFormat:r=t.Config.displayFormat,inputFormat:i=t.Config.dateInputFormat,splitter:a=` ~ `,isFocused:o}={})=>!e||e.length===0||e.length===1&&!e[0]?``:e.filter(e=>!!e).map(e=>{if(!(0,t.dayjs)(e,n,!0).isValid())return e;let{mask:s}=Zt({inputFormat:i,displayFormat:r,splitter:a,isFocused:o});return!s||!i||!o?(0,t.dayjs)(e,n).format(r):(0,t.dayjs)(e,n).format(i)}).join(a)),t.FormatterParserProvider.registerParser(`ZdDateRange`,(e,{dateFormat:n=t.Config.dateFormat,displayFormat:r=t.Config.displayFormat,inputFormat:i=t.Config.dateInputFormat,splitter:a=` ~ `,isFocused:o}={})=>{if(!e)return[];let s=[];e.indexOf(a)===-1?s.push(e):s=e.split(a);let{unitMask:c}=Zt({inputFormat:i,displayFormat:r,splitter:a,isFocused:o});return s.filter(e=>!!e).map(e=>{if(!t.Mask.checkMask(e,c))return e;if(i&&o){let{valid:t,newValue:r}=ee(e,i,n);return t?r:e}let{valid:a,newValue:s}=ee(e,r,n);return a?s:e})}),k.register(`ZdDateRange`,Qt),h.addIcons({add:`mdi-plus-box`,delete:`mdi-trash-can-outline`,refresh:`mdi-refresh`,more:`mdi-dots-vertical`,filter:`mdi-filter`,confirmLayout:`mdi-check`,updateLayout:`mdi-square-edit-outline`,layout:`mdi-table-star`}),e.Alert=w,e.AlertQueue=Qe,e.AlertReplace=et,e.AlertService=tt,e.AlertStack=$e,e.AutoNumeric=x.default,e.Badge=D,e.Breadcrumbs=E,e.Button=O,e.ButtonGroup=Rt,e.Card=X,e.Carousel=ke,e.Checkbox=Ue,e.CheckboxMultiple=Ft,e.ChildNotFoundError=S,e.Chip=It,e.CodeViewer=Le,e.Col=ye,e.CollapseCard=Oe,e.Column=re,e.ColumnNotFoundError=ie,e.Component=C,e.ComponentRender=T,e.ConditionsManager=le,e.Container=Ie,e.Currency=Gt,e.DataEditor=Ct,e.DataEditorWithAdd=Tt,e.DataNavigator=pt,e.DataSelector=ct,e.DataValueOutHelper=g,e.DatasourceSearcher=v,e.DateInput=R,e.DateRange=Qt,e.DeleteRowsError=mt,e.DetailNotFoundError=zt,e.Dialog=Ke,e.DialogService=rt,e.Divider=te,e.Dropdown=$,e.Footer=Q,e.Form=j,e.Frame=V,e.FramePage=H,e.Grid=bt,e.GridColumn=ut,e.GridColumnEditable=Et,e.GridEditable=kt,e.GridEditableController=wt,e.GridEditableEvents=Dt,e.GridEvents=ft,e.Header=ve,e.Icon=Fe,e.Icons=h,e.Image=ne,e.Increment=Wt,e.Input=M,e.InputFactory=k,e.Iterable=G,e.IterableColumnsButton=he,e.IterableColumnsButtonController=me,e.IterableComponentRender=_e,e.IterablePageComponent=de,e.IterablePageInfo=K,e.IterablePageSize=J,e.IterablePagination=fe,e.IterableTable=ht,e.IterableTree=At,e.KeyMapEditing=Ot,e.KeyMapMerger=gt,e.KeyMapNavigation=_t,e.KeyMapTree=jt,e.Layout=be,e.List=Ye,e.ListGroup=Ze,e.ListItem=Xe,e.Loading=xe,e.LoadingService=nt,e.Login=Se,e.LoginButton=Y,e.Main=z,e.MasterDetail=Vt,e.MasterNotFoundError=Bt,e.Menu=Ce,e.MenuButton=we,e.MenuGroup=Te,e.MenuLink=Ee,e.MenuSeparator=De,e.Modal=at,e.ModalCloseButton=ot,e.ModalService=it,e.Month=Kt,e.NonInitializedError=W,e.NumberInput=st,e.Password=qe,e.Progress=Lt,e.Radio=Re,e.Row=ze,e.Search=pe,e.Select=q,e.SelectMultiple=Ge,e.SvgMap=Ht,e.Switch=He,e.Tab=je,e.TabNotFoundError=Me,e.Table=Ae,e.TableActionBuilder=vt,e.Tabs=Ne,e.Tag=Pe,e.Text=Z,e.TextInput=P,e.Textarea=Be,e.Time=Jt,e.TimeFormatSelector=qt,e.Toggleable=Ve,e.Tooltip=We,e.Tree=Ut,e.TreeDataNavigator=Nt,e.TreeDataSelector=Mt,e.TreeDataStructure=b,e.TreeGrid=Pt,e.ViewNavigator=yt,e.ZeedhiCommonError=U,e.initTheme=m,e.omit=y,e.uniqueBy=_,e})({},ZdCore);
|