@yoobic/yobi 8.5.0-39 → 8.5.0-40
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/dist/cjs/{button.factory-658ddbe0.js → button.factory-ba0e0819.js} +2 -2
- package/dist/cjs/{camera-helpers-f44e6459.js → camera-helpers-4b2106aa.js} +3 -3
- package/dist/cjs/{chat-helpers-f7afa43a.js → chat-helpers-e39c27a8.js} +2 -2
- package/dist/cjs/{common-helpers-eef55d89.js → common-helpers-82a45712.js} +2 -2
- package/dist/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/{draggable-dots-helpers-8d117df9.js → draggable-dots-helpers-b5ebafde.js} +2 -2
- package/dist/cjs/{draggable-tags-helpers-8a88c203.js → draggable-tags-helpers-3d74503f.js} +2 -2
- package/dist/cjs/{entities-helpers-ef73029a.js → entities-helpers-3e00eefa.js} +3 -3
- package/dist/cjs/{filters-helpers-45de6d54.js → filters-helpers-255ed3fb.js} +3 -3
- package/dist/cjs/{form-choice-helpers-e7943fb5.js → form-choice-helpers-e53ad4bb.js} +5 -5
- package/dist/cjs/{form-helpers-bc450ca2.js → form-helpers-b20098de.js} +3 -3
- package/dist/cjs/{form-input-helpers-032b334d.js → form-input-helpers-7738afe7.js} +4 -4
- package/dist/cjs/{form-text-area-helpers-1de2ea0f.js → form-text-area-helpers-16a521ec.js} +2 -2
- package/dist/cjs/{grid-renderers-e3a88742.js → grid-renderers-9dae21cb.js} +7 -7
- package/dist/cjs/{incentive-helpers-67195b27.js → incentive-helpers-d19331f6.js} +3 -3
- package/dist/cjs/{index-d23da915.js → index-38c5e81e.js} +30 -25
- package/dist/cjs/index-626a8eff.js +4 -0
- package/dist/cjs/{index-46d2ba10.js → index-69fa2c7c.js} +1 -1
- package/dist/cjs/{index-b3776014.js → index-988a084c.js} +3 -3
- package/dist/cjs/{index-60dbf583.js → index-9e1d34c6.js} +3 -3
- package/dist/cjs/{index-5da3d711.js → index-a1aee400.js} +698 -53
- package/dist/cjs/{index-cd80d3a2.js → index-a531ab45.js} +2 -2
- package/dist/cjs/{index-1cc02719.js → index-de12fc13.js} +1 -1
- package/dist/cjs/index-f5c362f0.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localForage-6e4a4508.js → localForage-162ce4f9.js} +2 -2
- package/dist/cjs/{map-helpers-6f4287af.js → map-helpers-65e8193f.js} +2 -2
- package/dist/cjs/{mission-locked-banner-b993497c.js → mission-locked-banner-4b44a134.js} +2 -2
- package/dist/cjs/{missions-helpers-42ae3131.js → missions-helpers-c5b0436f.js} +2 -2
- package/dist/cjs/{modal-animations-7b6d3562.js → modal-animations-114c244d.js} +2 -2
- package/dist/cjs/{operation-helpers-560be748.js → operation-helpers-42ea6829.js} +2 -2
- package/dist/cjs/{overlays-16c90c34.js → overlays-4334b40f.js} +4126 -473
- package/dist/cjs/{overlays-2e209ff3.js → overlays-bfcf5422.js} +2 -2
- package/dist/cjs/{swiper-e2a5e14c.js → swiper-6117107e.js} +6 -6
- package/dist/cjs/{theme-1fc06d82.js → theme-a7f17e4a.js} +2 -2
- package/dist/cjs/{tippy.esm-65e79fcf.js → tippy.esm-64774354.js} +1 -1
- package/dist/cjs/{video-player-helpers-87a04d87.js → video-player-helpers-d896cb98.js} +4 -4
- package/dist/cjs/{web-de3c7ddc.js → web-24fe918c.js} +2 -2
- package/dist/cjs/{web-879824fa.js → web-80d41566.js} +2 -2
- package/dist/cjs/{web-21cee1ff.js → web-d3894faa.js} +4 -4
- package/dist/cjs/{web-cfe803b4.js → web-ef236319.js} +2 -2
- package/dist/cjs/yoo-about.cjs.entry.js +3 -3
- package/dist/cjs/yoo-accordion.cjs.entry.js +6 -6
- package/dist/cjs/yoo-action-sheet-controller.cjs.entry.js +4 -4
- package/dist/cjs/yoo-action-sheet.cjs.entry.js +6 -6
- package/dist/cjs/yoo-ag-grid.cjs.entry.js +8 -8
- package/dist/cjs/yoo-alert.cjs.entry.js +6 -6
- package/dist/cjs/yoo-amap.cjs.entry.js +5 -5
- package/dist/cjs/yoo-announcement-heading.cjs.entry.js +6 -6
- package/dist/cjs/yoo-app.cjs.entry.js +3 -3
- package/dist/cjs/yoo-audio-player.cjs.entry.js +4 -4
- package/dist/cjs/yoo-audio-recorder-dialog.cjs.entry.js +4 -4
- package/dist/cjs/yoo-avatar.cjs.entry.js +3 -3
- package/dist/cjs/yoo-avatars.cjs.entry.js +3 -3
- package/dist/cjs/yoo-banner.cjs.entry.js +4 -4
- package/dist/cjs/yoo-barcode-dialog.cjs.entry.js +3 -3
- package/dist/cjs/yoo-battle-count-down.cjs.entry.js +4 -4
- package/dist/cjs/yoo-battle-result.cjs.entry.js +3 -3
- package/dist/cjs/yoo-battle-user-stats.cjs.entry.js +4 -4
- package/dist/cjs/yoo-breadcrumbs.cjs.entry.js +3 -3
- package/dist/cjs/yoo-button.cjs.entry.js +4 -4
- package/dist/cjs/yoo-calendar.cjs.entry.js +3 -3
- package/dist/cjs/yoo-camera-preview-dialog.cjs.entry.js +6 -6
- package/dist/cjs/yoo-card-battle-result.cjs.entry.js +3 -3
- package/dist/cjs/yoo-card-battle.cjs.entry.js +3 -3
- package/dist/cjs/yoo-card-calendar.cjs.entry.js +16 -7
- package/dist/cjs/yoo-card-campaign.cjs.entry.js +4 -4
- package/dist/cjs/yoo-card-cell.cjs.entry.js +4 -4
- package/dist/cjs/yoo-card-chat.cjs.entry.js +3 -3
- package/dist/cjs/yoo-card-course-row-compact.cjs.entry.js +3 -3
- package/dist/cjs/yoo-card-course-row.cjs.entry.js +5 -5
- package/dist/cjs/yoo-card-course.cjs.entry.js +3 -3
- package/dist/cjs/yoo-card-feed-row.cjs.entry.js +3 -3
- package/dist/cjs/yoo-card-feed.cjs.entry.js +15 -11
- package/dist/cjs/yoo-card-file.cjs.entry.js +3 -3
- package/dist/cjs/yoo-card-image.cjs.entry.js +3 -3
- package/dist/cjs/yoo-card-inbox.cjs.entry.js +3 -3
- package/dist/cjs/yoo-card-incentive-rank.cjs.entry.js +3 -3
- package/dist/cjs/yoo-card-incentive.cjs.entry.js +5 -5
- package/dist/cjs/yoo-card-kanban.cjs.entry.js +4 -4
- package/dist/cjs/yoo-card-lesson.cjs.entry.js +4 -4
- package/dist/cjs/yoo-card-list-collapsible.cjs.entry.js +4 -4
- package/dist/cjs/yoo-card-list-color.cjs.entry.js +3 -3
- package/dist/cjs/yoo-card-list-simple.cjs.entry.js +4 -4
- package/dist/cjs/yoo-card-list.cjs.entry.js +4 -4
- package/dist/cjs/yoo-card-location.cjs.entry.js +3 -3
- package/dist/cjs/yoo-card-media.cjs.entry.js +4 -4
- package/dist/cjs/yoo-card-menu.cjs.entry.js +4 -4
- package/dist/cjs/yoo-card-notification.cjs.entry.js +3 -3
- package/dist/cjs/yoo-card-plan.cjs.entry.js +4 -4
- package/dist/cjs/yoo-card-progress.cjs.entry.js +3 -3
- package/dist/cjs/yoo-card-recommendation.cjs.entry.js +4 -4
- package/dist/cjs/yoo-card-sticky.cjs.entry.js +4 -4
- package/dist/cjs/yoo-card-video.cjs.entry.js +3 -3
- package/dist/cjs/yoo-chart.cjs.entry.js +3 -3
- package/dist/cjs/yoo-chat-message-dialog.cjs.entry.js +4 -4
- package/dist/cjs/yoo-chat-message-preview.cjs.entry.js +4 -4
- package/dist/cjs/yoo-chat-message.cjs.entry.js +8 -14
- package/dist/cjs/yoo-chat.cjs.entry.js +9 -20
- package/dist/cjs/yoo-collapsible.cjs.entry.js +3 -3
- package/dist/cjs/yoo-color-selector.cjs.entry.js +3 -3
- package/dist/cjs/yoo-community-detail.cjs.entry.js +4 -4
- package/dist/cjs/yoo-context-menu-dialog.cjs.entry.js +4 -4
- package/dist/cjs/yoo-context-menu.cjs.entry.js +4 -4
- package/dist/cjs/yoo-copyright.cjs.entry.js +3 -3
- package/dist/cjs/yoo-count-down.cjs.entry.js +4 -4
- package/dist/cjs/yoo-course-info-card.cjs.entry.js +3 -3
- package/dist/cjs/yoo-course-summary.cjs.entry.js +4 -4
- package/dist/cjs/yoo-dashboard-detail.cjs.entry.js +3 -3
- package/dist/cjs/yoo-date.cjs.entry.js +3 -3
- package/dist/cjs/yoo-detail-bar.cjs.entry.js +4 -4
- package/dist/cjs/yoo-device-list.cjs.entry.js +3 -3
- package/dist/cjs/yoo-device.cjs.entry.js +3 -3
- package/dist/cjs/yoo-draw-flow.cjs.entry.js +3 -3
- package/dist/cjs/yoo-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/yoo-entity-query-builder.cjs.entry.js +4 -4
- package/dist/cjs/yoo-entity-search-dialog.cjs.entry.js +4 -4
- package/dist/cjs/yoo-entity-search-filters.cjs.entry.js +5 -5
- package/dist/cjs/yoo-entity-search-recent.cjs.entry.js +3 -3
- package/dist/cjs/yoo-entity-search-sorts.cjs.entry.js +4 -4
- package/dist/cjs/yoo-entity-search-tags.cjs.entry.js +4 -4
- package/dist/cjs/yoo-entity-search.cjs.entry.js +4 -4
- package/dist/cjs/yoo-entity.cjs.entry.js +20 -23
- package/dist/cjs/yoo-feed-detail.cjs.entry.js +6 -6
- package/dist/cjs/yoo-flag.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-audience.cjs.entry.js +6 -6
- package/dist/cjs/yoo-form-autocomplete-dialog.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-autocomplete.cjs.entry.js +100 -132
- package/dist/cjs/yoo-form-barcode-dialog.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-barcode.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-calendar-dialog.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-capture-map-dialog.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-capture-tag-dialog.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-capture-view-dialog.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-capture-webcam-dialog.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-capture.cjs.entry.js +7 -7
- package/dist/cjs/yoo-form-carousel.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-catalog-dialog.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-catalog.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-categorize-words.cjs.entry.js +7 -7
- package/dist/cjs/yoo-form-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-checklist.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-choice-button.cjs.entry.js +7 -7
- package/dist/cjs/yoo-form-choice-card.cjs.entry.js +7 -7
- package/dist/cjs/yoo-form-choice-chat.cjs.entry.js +7 -7
- package/dist/cjs/yoo-form-choice-image.cjs.entry.js +7 -7
- package/dist/cjs/yoo-form-choice-radio.cjs.entry.js +7 -7
- package/dist/cjs/yoo-form-color-field.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-color-picker.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-conditions.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-connect.cjs.entry.js +6 -6
- package/dist/cjs/yoo-form-creator-block-expandable.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-creator-block-simple.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-creator-condition-block.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-creator-field-selector.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-creator-header.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-creator-live-preview.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-creator-overlay.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-creator-page-card-list.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-creator-page-card.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-creator-score-expandable.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-creator-scoring-card-list.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-creator-scoring-card.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-creator-scoring-quick-setup.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-creator-translate-dialog.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-creator-translate.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-creator-workflow-side-selection.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-creator-workflow-step.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-creator.cjs.entry.js +7 -7
- package/dist/cjs/yoo-form-date-time.cjs.entry.js +28 -28
- package/dist/cjs/yoo-form-daterange.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-document-dialog.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-document.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-dynamic-dialog.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-dynamic.cjs.entry.js +17 -8
- package/dist/cjs/yoo-form-emailreport.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-entity-value-pairs.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-explanation.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-feed-preview.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-feedback.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-filter-date.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-filter-number.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-filter-text.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-filter.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-footer.cjs.entry.js +6 -6
- package/dist/cjs/yoo-form-formula.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-hotzones-creator.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-hotzones.cjs.entry.js +7 -7
- package/dist/cjs/yoo-form-iframe-dialog.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-image-collection.cjs.entry.js +6 -6
- package/dist/cjs/yoo-form-image-tagging-creator.cjs.entry.js +6 -6
- package/dist/cjs/yoo-form-image-tagging.cjs.entry.js +9 -9
- package/dist/cjs/yoo-form-incentive-participants.cjs.entry.js +1 -1
- package/dist/cjs/yoo-form-incentive-targets.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-input-comments.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-input-container.cjs.entry.js +6 -6
- package/dist/cjs/yoo-form-input.cjs.entry.js +9 -9
- package/dist/cjs/yoo-form-json.cjs.entry.js +6 -6
- package/dist/cjs/yoo-form-location.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-missing-word.cjs.entry.js +7 -7
- package/dist/cjs/yoo-form-missionfield.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-multi-input.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-number-picker-dialog.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-number-picker.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-opening-hours.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-permissions.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-phone-number.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-plan-assign.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-plan.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-pricecheck.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-product-batch.cjs.entry.js +6 -6
- package/dist/cjs/yoo-form-products-sales.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-progress-indicator.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-qrcode.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-query-builder.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-range.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-ranking.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-recap-step.cjs.entry.js +3 -3
- package/dist/cjs/yoo-form-recurrence-delay.cjs.entry.js +6 -5
- package/dist/cjs/yoo-form-recurrence-preview.cjs.entry.js +6 -5
- package/dist/cjs/yoo-form-recurrence.cjs.entry.js +49 -52
- package/dist/cjs/yoo-form-reorder.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-scorm.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-shopping.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-signature-pad-dialog.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-signature-pad.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-sorts.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-star-rating.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-stripe-card.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-swipe-cards.cjs.entry.js +6 -6
- package/dist/cjs/yoo-form-table.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-task.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-text-area.cjs.entry.js +6 -6
- package/dist/cjs/yoo-form-text-editor.cjs.entry.js +7 -7
- package/dist/cjs/yoo-form-time.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-timeslots.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-todo-dialog.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-todo-single.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-todo-task-list.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-todo-task.cjs.entry.js +4 -4
- package/dist/cjs/yoo-form-todo.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-toggle.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-uploader.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-videoplayer.cjs.entry.js +5 -5
- package/dist/cjs/yoo-form-wiki.cjs.entry.js +5 -5
- package/dist/cjs/yoo-grid-calendar.cjs.entry.js +53 -44
- package/dist/cjs/yoo-grid.cjs.entry.js +15 -15
- package/dist/cjs/yoo-gridstack.cjs.entry.js +4 -4
- package/dist/cjs/yoo-header.cjs.entry.js +4 -4
- package/dist/cjs/yoo-healthscore-dialog.cjs.entry.js +4 -4
- package/dist/cjs/yoo-healthscore.cjs.entry.js +3 -3
- package/dist/cjs/yoo-image-cropper-dialog.cjs.entry.js +3 -3
- package/dist/cjs/yoo-img.cjs.entry.js +5 -5
- package/dist/cjs/yoo-incentive-detail.cjs.entry.js +5 -5
- package/dist/cjs/yoo-input-bar.cjs.entry.js +8 -8
- package/dist/cjs/yoo-ion-alert-controller.cjs.entry.js +4 -4
- package/dist/cjs/yoo-ion-content.cjs.entry.js +3 -3
- package/dist/cjs/yoo-ion-footer.cjs.entry.js +4 -4
- package/dist/cjs/yoo-ion-infinite-scroll-content.cjs.entry.js +3 -3
- package/dist/cjs/yoo-ion-infinite-scroll.cjs.entry.js +3 -3
- package/dist/cjs/yoo-ion-item-divider.cjs.entry.js +5 -5
- package/dist/cjs/yoo-ion-item-options.cjs.entry.js +4 -4
- package/dist/cjs/yoo-ion-item-sliding.cjs.entry.js +5 -5
- package/dist/cjs/yoo-ion-item.cjs.entry.js +5 -5
- package/dist/cjs/yoo-ion-list.cjs.entry.js +4 -4
- package/dist/cjs/yoo-ion-refresher.cjs.entry.js +4 -4
- package/dist/cjs/yoo-ion-scroll.cjs.entry.js +4 -4
- package/dist/cjs/yoo-ion-slide.cjs.entry.js +4 -4
- package/dist/cjs/{yoo-ion-slides-06a0433b.js → yoo-ion-slides-27c67e13.js} +5 -5
- package/dist/cjs/yoo-ion-slides.cjs.entry.js +6 -6
- package/dist/cjs/yoo-ion-toast-controller.cjs.entry.js +4 -4
- package/dist/cjs/yoo-kanban.cjs.entry.js +4 -4
- package/dist/cjs/yoo-kpi-card.cjs.entry.js +3 -3
- package/dist/cjs/yoo-kpi-container.cjs.entry.js +4 -4
- package/dist/cjs/yoo-kpi-external.cjs.entry.js +3 -3
- package/dist/cjs/yoo-kpi.cjs.entry.js +3 -3
- package/dist/cjs/yoo-layout-sections.cjs.entry.js +3 -3
- package/dist/cjs/yoo-layout-tabs.cjs.entry.js +3 -3
- package/dist/cjs/yoo-layout-two-columns.cjs.entry.js +3 -3
- package/dist/cjs/yoo-lesson-detail-card.cjs.entry.js +3 -3
- package/dist/cjs/yoo-lesson-detail.cjs.entry.js +4 -4
- package/dist/cjs/yoo-lesson-heading.cjs.entry.js +4 -4
- package/dist/cjs/yoo-lesson-highscores.cjs.entry.js +3 -3
- package/dist/cjs/yoo-lesson-question-result.cjs.entry.js +4 -4
- package/dist/cjs/yoo-line-state.cjs.entry.js +1 -1
- package/dist/cjs/yoo-links-menu.cjs.entry.js +3 -3
- package/dist/cjs/yoo-links-preview.cjs.entry.js +5 -5
- package/dist/cjs/yoo-loader.cjs.entry.js +3 -3
- package/dist/cjs/yoo-location-info.cjs.entry.js +3 -3
- package/dist/cjs/yoo-location-map.cjs.entry.js +4 -4
- package/dist/cjs/yoo-login.cjs.entry.js +3 -3
- package/dist/cjs/yoo-lottie.cjs.entry.js +3 -3
- package/dist/cjs/yoo-map-gl.cjs.entry.js +4 -4
- package/dist/cjs/yoo-map-js.cjs.entry.js +5 -5
- package/dist/cjs/yoo-map-legend.cjs.entry.js +5 -5
- package/dist/cjs/yoo-map.cjs.entry.js +4 -4
- package/dist/cjs/yoo-markdown.cjs.entry.js +5 -5
- package/dist/cjs/yoo-memo-list-dialog.cjs.entry.js +3 -3
- package/dist/cjs/yoo-memo-list.cjs.entry.js +3 -3
- package/dist/cjs/yoo-mention-tag.cjs.entry.js +3 -3
- package/dist/cjs/yoo-mission-details.cjs.entry.js +5 -5
- package/dist/cjs/yoo-mission-heading.cjs.entry.js +6 -6
- package/dist/cjs/yoo-mission-score.cjs.entry.js +3 -3
- package/dist/cjs/yoo-mission-todo.cjs.entry.js +4 -4
- package/dist/cjs/yoo-mobile-tabbar-more.cjs.entry.js +3 -3
- package/dist/cjs/yoo-mobile-tabbar.cjs.entry.js +4 -4
- package/dist/cjs/yoo-modal-controller.cjs.entry.js +4 -4
- package/dist/cjs/yoo-modal.cjs.entry.js +7 -7
- package/dist/cjs/yoo-navbar.cjs.entry.js +4 -4
- package/dist/cjs/yoo-numbers-display.cjs.entry.js +4 -4
- package/dist/cjs/yoo-photo-editor.cjs.entry.js +8 -8
- package/dist/cjs/yoo-pivot-table.cjs.entry.js +8 -8
- package/dist/cjs/yoo-podium.cjs.entry.js +3 -3
- package/dist/cjs/yoo-profile-list.cjs.entry.js +3 -3
- package/dist/cjs/yoo-profile-summary.cjs.entry.js +4 -4
- package/dist/cjs/yoo-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/yoo-progress-loader.cjs.entry.js +3 -3
- package/dist/cjs/yoo-progress-recap.cjs.entry.js +3 -3
- package/dist/cjs/yoo-property-card.cjs.entry.js +4 -4
- package/dist/cjs/yoo-range.cjs.entry.js +5 -5
- package/dist/cjs/yoo-rating.cjs.entry.js +3 -3
- package/dist/cjs/yoo-reset-password.cjs.entry.js +3 -3
- package/dist/cjs/yoo-result-dialog.cjs.entry.js +4 -4
- package/dist/cjs/yoo-reveal.cjs.entry.js +3 -3
- package/dist/cjs/yoo-salesai-formula.cjs.entry.js +3 -3
- package/dist/cjs/yoo-scandit.cjs.entry.js +4 -4
- package/dist/cjs/yoo-scratch-card-creator.cjs.entry.js +3 -3
- package/dist/cjs/yoo-scratch-card.cjs.entry.js +5 -5
- package/dist/cjs/yoo-section-list.cjs.entry.js +3 -3
- package/dist/cjs/yoo-segmented-control.cjs.entry.js +3 -3
- package/dist/cjs/yoo-side-menu-tree.cjs.entry.js +3 -3
- package/dist/cjs/yoo-side-menu.cjs.entry.js +3 -3
- package/dist/cjs/yoo-slides-media.cjs.entry.js +6 -6
- package/dist/cjs/yoo-start-meeting-popup.cjs.entry.js +4 -4
- package/dist/cjs/yoo-tabs.cjs.entry.js +3 -3
- package/dist/cjs/yoo-text-sequence.cjs.entry.js +4 -4
- package/dist/cjs/yoo-text.cjs.entry.js +4 -4
- package/dist/cjs/yoo-toast.cjs.entry.js +5 -5
- package/dist/cjs/yoo-tooltip.cjs.entry.js +6 -6
- package/dist/cjs/yoo-truncate.cjs.entry.js +4 -4
- package/dist/cjs/yoo-truncated-line.cjs.entry.js +3 -3
- package/dist/cjs/yoo-user-detail.cjs.entry.js +3 -3
- package/dist/cjs/yoo-user-profile.cjs.entry.js +5 -5
- package/dist/cjs/yoo-user-wizard.cjs.entry.js +4 -4
- package/dist/cjs/yoo-videoplayer-core.cjs.entry.js +4 -4
- package/dist/cjs/yoo-videoplayer-dailymotion.cjs.entry.js +5 -5
- package/dist/cjs/yoo-videoplayer-videojs.cjs.entry.js +6 -6
- package/dist/cjs/yoo-videoplayer-vimeo.cjs.entry.js +5 -5
- package/dist/cjs/yoo-videoplayer-youtube.cjs.entry.js +5 -5
- package/dist/cjs/yoo-virtual-item.cjs.entry.js +3 -3
- package/dist/cjs/yoo-virtual-scroll.cjs.entry.js +4 -4
- package/dist/cjs/yoo-waitlist-location-result.cjs.entry.js +3 -3
- package/dist/cjs/yoo-waitlist-location-start.cjs.entry.js +3 -3
- package/dist/cjs/yoo-walkthrough.cjs.entry.js +3 -3
- package/dist/cjs/yoo-web-menu.cjs.entry.js +4 -4
- package/dist/cjs/yoo-webcam.cjs.entry.js +3 -3
- package/dist/cjs/yoo-welcome-banner.cjs.entry.js +4 -4
- package/dist/cjs/yoo-widget-chart.cjs.entry.js +3 -3
- package/dist/cjs/yoo-widget-small-size.cjs.entry.js +3 -3
- package/dist/cjs/yoo-widget-tab.cjs.entry.js +3 -3
- package/dist/cjs/yoo-widget-tile.cjs.entry.js +3 -3
- package/dist/cjs/yoo-workflow-state-dialog.cjs.entry.js +3 -3
- package/dist/cjs/yoo-workflow-state.cjs.entry.js +3 -3
- package/dist/cjs/yoo-workflow.cjs.entry.js +6 -6
- package/dist/cjs/yoo-zebra.cjs.entry.js +3 -3
- package/dist/cjs/yoo-zoom.cjs.entry.js +3 -3
- package/dist/collection/components/1.atoms/flag/flag.js +1 -1
- package/dist/collection/components/entities/card-placeholder/card-placeholder.js +1 -1
- package/dist/collection/components/entities/entity/entity.js +10 -13
- package/dist/collection/components/form/form-autocomplete/form-autocomplete.css +1 -1
- package/dist/collection/components/form/form-autocomplete/form-autocomplete.js +98 -147
- package/dist/collection/components/form/form-autocomplete-dialog/form-autocomplete-dialog.css +0 -4
- package/dist/collection/components/form/form-autocomplete-dialog/form-autocomplete-dialog.js +1 -1
- package/dist/collection/components/form/form-date-time/form-date-time.js +26 -23
- package/dist/collection/components/form/form-dynamic/form-dynamic.js +10 -1
- package/dist/collection/components/form/form-entity-value-pairs/form-entity-value-pairs.js +1 -1
- package/dist/collection/components/form/form-recurrence/form-recurrence.css +7 -4
- package/dist/collection/components/form/form-recurrence/form-recurrence.js +100 -32
- package/dist/collection/components/form/form-recurrence/options/frequency.js +2 -2
- package/dist/collection/components/form/form-recurrence/options/month.js +7 -7
- package/dist/collection/components/form/form-recurrence/options/schedule/end.js +3 -3
- package/dist/collection/components/form/form-recurrence/options/schedule/index.js +2 -2
- package/dist/collection/components/form/form-recurrence/options/schedule/start.js +1 -1
- package/dist/collection/components/form/form-recurrence/validation/options.js +2 -2
- package/dist/collection/components/form/form-recurrence/validation/schedule.js +1 -1
- package/dist/collection/components/form/form-recurrence-delay/form-recurrence-delay.js +3 -2
- package/dist/collection/components/form/form-recurrence-preview/form-recurrence-preview.js +7 -5
- package/dist/collection/components/form/form-table/form-table.js +1 -1
- package/dist/collection/components/grid/grid/grid.js +10 -5
- package/dist/collection/components/grid/grid-calendar/grid-calendar.css +29 -3
- package/dist/collection/components/grid/grid-calendar/grid-calendar.js +99 -47
- package/dist/collection/components/grid/kanban/kanban.js +1 -1
- package/dist/collection/feature-communicate/chat/chat/chat.js +22 -34
- package/dist/collection/feature-communicate/chat/chat-message/chat-message.js +6 -26
- package/dist/collection/feature-communicate/feed/card-feed/components/sub-cards.js +4 -3
- package/dist/collection/feature-communicate/feed/card-feed/default/card-feed.css +4 -0
- package/dist/collection/feature-platform/app/app/app.js +1 -1
- package/dist/collection/feature-platform/calendar/card-calendar/card-calendar.css +71 -2
- package/dist/collection/feature-platform/calendar/card-calendar/card-calendar.js +67 -7
- package/dist/design-system/{buffer-es6-7dcb5a7c.js → buffer-es6-2075c9bd.js} +1 -1
- package/dist/design-system/{button.factory-e56b4bf1.js → button.factory-7f3e5054.js} +2 -2
- package/dist/{esm/camera-helpers-f982e788.js → design-system/camera-helpers-5487117a.js} +3 -3
- package/dist/design-system/{chat-helpers-a2f2f817.js → chat-helpers-84698d42.js} +3 -3
- package/dist/{esm/common-helpers-dcc04717.js → design-system/common-helpers-50e7d25c.js} +3 -3
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{draggable-dots-helpers-2f0d0e72.js → draggable-dots-helpers-c53826c9.js} +3 -3
- package/dist/design-system/{draggable-tags-helpers-f776f4de.js → draggable-tags-helpers-f6b7a2e4.js} +3 -3
- package/dist/{esm/entities-helpers-23875383.js → design-system/entities-helpers-730f01be.js} +4 -4
- package/dist/design-system/{filters-helpers-49a0bf64.js → filters-helpers-139e2d2e.js} +4 -4
- package/dist/design-system/{form-choice-helpers-533e45fa.js → form-choice-helpers-c556be26.js} +6 -6
- package/dist/design-system/{form-helpers-a3a7973c.js → form-helpers-ad793921.js} +4 -4
- package/dist/{esm/form-input-helpers-3094279e.js → design-system/form-input-helpers-1dc5cc33.js} +4 -4
- package/dist/design-system/{form-text-area-helpers-673fb40a.js → form-text-area-helpers-12eec6b6.js} +3 -3
- package/dist/design-system/{geolocation-helpers-5126a3df.js → geolocation-helpers-12907e01.js} +1 -1
- package/dist/{esm/grid-renderers-87fd2e33.js → design-system/grid-renderers-dee257e3.js} +9 -9
- package/dist/{esm/incentive-helpers-f373518a.js → design-system/incentive-helpers-dda573d7.js} +4 -4
- package/dist/design-system/{index-8e862f79.js → index-241ebd9b.js} +698 -54
- package/dist/design-system/{index-b0ce07d9.js → index-2ecbe75b.js} +4 -4
- package/dist/{esm/index-14a2a4ba.js → design-system/index-30d1701e.js} +2 -2
- package/dist/design-system/{index-becaffe4.js → index-3f441fd3.js} +1 -1
- package/dist/{esm/index-c9396f6f.js → design-system/index-4888d3e1.js} +1 -1
- package/dist/design-system/{index-978126b6.js → index-5743e72c.js} +31 -26
- package/dist/design-system/index-870d5e89.js +1 -0
- package/dist/design-system/index-b902b165.js +1 -0
- package/dist/design-system/{index-b1645366.js → index-d245e4e2.js} +4 -4
- package/dist/design-system/{localForage-bbb48f80.js → localForage-7e2989d0.js} +2 -2
- package/dist/design-system/{lodash-653c0bcd.js → lodash-9f7930a6.js} +1 -1
- package/dist/{esm/map-helpers-0746c47b.js → design-system/map-helpers-9187875f.js} +3 -3
- package/dist/design-system/{mission-locked-banner-0d9e62dd.js → mission-locked-banner-6a94b84a.js} +2 -2
- package/dist/{esm/missions-helpers-cc9dde5e.js → design-system/missions-helpers-2476400e.js} +3 -3
- package/dist/{esm/modal-animations-10684397.js → design-system/modal-animations-710860a6.js} +2 -2
- package/dist/design-system/{operation-helpers-8dad9976.js → operation-helpers-abd3def9.js} +3 -3
- package/dist/design-system/{overlays-1ef74fd7.js → overlays-3d8da333.js} +4149 -499
- package/dist/design-system/{overlays-4ac57aaf.js → overlays-8c4ac757.js} +2 -2
- package/dist/design-system/swiper-d2c29ca1.js +12 -0
- package/dist/{esm/theme-58519f96.js → design-system/theme-ff96c33f.js} +2 -2
- package/dist/{esm/tippy.esm-ba803492.js → design-system/tippy.esm-b05b5f0a.js} +1 -1
- package/dist/design-system/{video-player-helpers-c8e354e7.js → video-player-helpers-d0cbf586.js} +5 -5
- package/dist/design-system/{web-65e82bd0.js → web-43b468e3.js} +5 -5
- package/dist/{esm/web-8d48a6cf.js → design-system/web-4ddd3dc4.js} +3 -3
- package/dist/{esm/web-fe78dfcb.js → design-system/web-9f2e054f.js} +3 -3
- package/dist/design-system/{web-a06e3338.js → web-c5edd553.js} +3 -3
- package/dist/design-system/yoo-about.entry.js +4 -4
- package/dist/design-system/yoo-accordion.entry.js +7 -7
- package/dist/design-system/yoo-action-sheet-controller.entry.js +5 -5
- package/dist/design-system/yoo-action-sheet.entry.js +7 -7
- package/dist/design-system/yoo-ag-grid.entry.js +10 -10
- package/dist/design-system/yoo-alert.entry.js +7 -7
- package/dist/design-system/yoo-amap.entry.js +6 -6
- package/dist/design-system/yoo-announcement-heading.entry.js +7 -7
- package/dist/design-system/yoo-app.entry.js +4 -4
- package/dist/design-system/yoo-audio-player.entry.js +5 -5
- package/dist/design-system/yoo-audio-recorder-dialog.entry.js +5 -5
- package/dist/design-system/yoo-avatar.entry.js +4 -4
- package/dist/design-system/yoo-avatars.entry.js +4 -4
- package/dist/design-system/yoo-banner.entry.js +5 -5
- package/dist/design-system/yoo-barcode-dialog.entry.js +4 -4
- package/dist/design-system/yoo-battle-count-down.entry.js +5 -5
- package/dist/design-system/yoo-battle-result.entry.js +4 -4
- package/dist/design-system/yoo-battle-user-stats.entry.js +5 -5
- package/dist/design-system/yoo-breadcrumbs.entry.js +4 -4
- package/dist/design-system/yoo-button.entry.js +5 -5
- package/dist/design-system/yoo-calendar.entry.js +4 -4
- package/dist/design-system/yoo-camera-preview-dialog.entry.js +7 -7
- package/dist/design-system/yoo-card-battle-result.entry.js +4 -4
- package/dist/design-system/yoo-card-battle.entry.js +4 -4
- package/dist/design-system/yoo-card-calendar.entry.js +17 -8
- package/dist/design-system/yoo-card-campaign.entry.js +5 -5
- package/dist/design-system/yoo-card-cell.entry.js +5 -5
- package/dist/design-system/yoo-card-chat.entry.js +4 -4
- package/dist/design-system/yoo-card-course-row-compact.entry.js +4 -4
- package/dist/design-system/yoo-card-course-row.entry.js +6 -6
- package/dist/design-system/yoo-card-course.entry.js +4 -4
- package/dist/design-system/yoo-card-feed-row.entry.js +4 -4
- package/dist/design-system/yoo-card-feed.entry.js +16 -12
- package/dist/design-system/yoo-card-file.entry.js +4 -4
- package/dist/design-system/yoo-card-image.entry.js +4 -4
- package/dist/design-system/yoo-card-inbox.entry.js +4 -4
- package/dist/design-system/yoo-card-incentive-rank.entry.js +4 -4
- package/dist/design-system/yoo-card-incentive.entry.js +6 -6
- package/dist/design-system/yoo-card-kanban.entry.js +5 -5
- package/dist/design-system/yoo-card-lesson.entry.js +5 -5
- package/dist/design-system/yoo-card-list-collapsible.entry.js +5 -5
- package/dist/design-system/yoo-card-list-color.entry.js +4 -4
- package/dist/design-system/yoo-card-list-simple.entry.js +5 -5
- package/dist/design-system/yoo-card-list.entry.js +5 -5
- package/dist/design-system/yoo-card-location.entry.js +4 -4
- package/dist/design-system/yoo-card-media.entry.js +5 -5
- package/dist/design-system/yoo-card-menu.entry.js +5 -5
- package/dist/design-system/yoo-card-notification.entry.js +4 -4
- package/dist/design-system/yoo-card-plan.entry.js +5 -5
- package/dist/design-system/yoo-card-progress.entry.js +4 -4
- package/dist/design-system/yoo-card-recommendation.entry.js +5 -5
- package/dist/design-system/yoo-card-sticky.entry.js +5 -5
- package/dist/design-system/yoo-card-template.entry.js +1 -1
- package/dist/design-system/yoo-card-video.entry.js +4 -4
- package/dist/design-system/yoo-chart.entry.js +4 -4
- package/dist/design-system/yoo-chat-message-dialog.entry.js +5 -5
- package/dist/design-system/yoo-chat-message-preview.entry.js +5 -5
- package/dist/design-system/yoo-chat-message.entry.js +9 -15
- package/dist/design-system/yoo-chat.entry.js +10 -21
- package/dist/design-system/yoo-collapsible.entry.js +4 -4
- package/dist/design-system/yoo-color-selector.entry.js +4 -4
- package/dist/design-system/yoo-community-detail.entry.js +5 -5
- package/dist/design-system/yoo-context-menu-dialog.entry.js +5 -5
- package/dist/design-system/yoo-context-menu.entry.js +5 -5
- package/dist/design-system/yoo-copyright.entry.js +4 -4
- package/dist/design-system/yoo-count-down.entry.js +5 -5
- package/dist/design-system/yoo-course-info-card.entry.js +4 -4
- package/dist/design-system/yoo-course-summary.entry.js +5 -5
- package/dist/design-system/yoo-dashboard-detail.entry.js +4 -4
- package/dist/design-system/yoo-date.entry.js +4 -4
- package/dist/design-system/yoo-detail-bar.entry.js +5 -5
- package/dist/design-system/yoo-device-list.entry.js +4 -4
- package/dist/design-system/yoo-device.entry.js +4 -4
- package/dist/design-system/yoo-draw-flow.entry.js +4 -4
- package/dist/design-system/yoo-empty-state.entry.js +1 -1
- package/dist/design-system/yoo-entity-query-builder.entry.js +5 -5
- package/dist/design-system/yoo-entity-search-dialog.entry.js +5 -5
- package/dist/design-system/yoo-entity-search-filters.entry.js +6 -6
- package/dist/design-system/yoo-entity-search-recent.entry.js +4 -4
- package/dist/design-system/yoo-entity-search-sorts.entry.js +5 -5
- package/dist/design-system/yoo-entity-search-tags.entry.js +5 -5
- package/dist/design-system/yoo-entity-search.entry.js +5 -5
- package/dist/design-system/yoo-entity.entry.js +21 -24
- package/dist/design-system/yoo-feed-detail.entry.js +7 -7
- package/dist/design-system/yoo-flag.entry.js +4 -4
- package/dist/design-system/yoo-form-audience.entry.js +7 -7
- package/dist/design-system/yoo-form-autocomplete-dialog.entry.js +6 -6
- package/dist/design-system/yoo-form-autocomplete.entry.js +101 -133
- package/dist/design-system/yoo-form-barcode-dialog.entry.js +5 -5
- package/dist/design-system/yoo-form-barcode.entry.js +6 -6
- package/dist/design-system/yoo-form-calendar-dialog.entry.js +5 -5
- package/dist/design-system/yoo-form-capture-map-dialog.entry.js +4 -4
- package/dist/design-system/yoo-form-capture-tag-dialog.entry.js +5 -5
- package/dist/design-system/yoo-form-capture-view-dialog.entry.js +5 -5
- package/dist/design-system/yoo-form-capture-webcam-dialog.entry.js +6 -6
- package/dist/design-system/yoo-form-capture.entry.js +8 -8
- package/dist/design-system/yoo-form-carousel.entry.js +5 -5
- package/dist/design-system/yoo-form-catalog-dialog.entry.js +5 -5
- package/dist/design-system/yoo-form-catalog.entry.js +6 -6
- package/dist/design-system/yoo-form-categorize-words.entry.js +8 -8
- package/dist/design-system/yoo-form-checkbox.entry.js +6 -6
- package/dist/design-system/yoo-form-checklist.entry.js +6 -6
- package/dist/design-system/yoo-form-choice-button.entry.js +8 -8
- package/dist/design-system/yoo-form-choice-card.entry.js +8 -8
- package/dist/design-system/yoo-form-choice-chat.entry.js +8 -8
- package/dist/design-system/yoo-form-choice-image.entry.js +8 -8
- package/dist/design-system/yoo-form-choice-radio.entry.js +8 -8
- package/dist/design-system/yoo-form-color-field.entry.js +6 -6
- package/dist/design-system/yoo-form-color-picker.entry.js +4 -4
- package/dist/design-system/yoo-form-conditions.entry.js +4 -4
- package/dist/design-system/yoo-form-connect.entry.js +7 -7
- package/dist/design-system/yoo-form-creator-block-expandable.entry.js +6 -6
- package/dist/design-system/yoo-form-creator-block-simple.entry.js +5 -5
- package/dist/design-system/yoo-form-creator-condition-block.entry.js +5 -5
- package/dist/design-system/yoo-form-creator-field-selector.entry.js +5 -5
- package/dist/design-system/yoo-form-creator-header.entry.js +5 -5
- package/dist/design-system/yoo-form-creator-live-preview.entry.js +4 -4
- package/dist/design-system/yoo-form-creator-overlay.entry.js +4 -4
- package/dist/design-system/yoo-form-creator-page-card-list.entry.js +5 -5
- package/dist/design-system/yoo-form-creator-page-card.entry.js +5 -5
- package/dist/design-system/yoo-form-creator-score-expandable.entry.js +5 -5
- package/dist/design-system/yoo-form-creator-scoring-card-list.entry.js +4 -4
- package/dist/design-system/yoo-form-creator-scoring-card.entry.js +4 -4
- package/dist/design-system/yoo-form-creator-scoring-quick-setup.entry.js +4 -4
- package/dist/design-system/yoo-form-creator-translate-dialog.entry.js +5 -5
- package/dist/design-system/yoo-form-creator-translate.entry.js +5 -5
- package/dist/design-system/yoo-form-creator-workflow-side-selection.entry.js +6 -6
- package/dist/design-system/yoo-form-creator-workflow-step.entry.js +5 -5
- package/dist/design-system/yoo-form-creator.entry.js +8 -8
- package/dist/design-system/yoo-form-date-time.entry.js +29 -29
- package/dist/design-system/yoo-form-daterange.entry.js +6 -6
- package/dist/design-system/yoo-form-document-dialog.entry.js +5 -5
- package/dist/design-system/yoo-form-document.entry.js +6 -6
- package/dist/design-system/yoo-form-dynamic-dialog.entry.js +6 -6
- package/dist/design-system/yoo-form-dynamic.entry.js +18 -9
- package/dist/design-system/yoo-form-emailreport.entry.js +6 -6
- package/dist/design-system/yoo-form-entity-value-pairs.entry.js +4 -4
- package/dist/design-system/yoo-form-explanation.entry.js +4 -4
- package/dist/design-system/yoo-form-feed-preview.entry.js +6 -6
- package/dist/design-system/yoo-form-feedback.entry.js +6 -6
- package/dist/design-system/yoo-form-filter-date.entry.js +4 -4
- package/dist/design-system/yoo-form-filter-number.entry.js +4 -4
- package/dist/design-system/yoo-form-filter-text.entry.js +4 -4
- package/dist/design-system/yoo-form-filter.entry.js +4 -4
- package/dist/design-system/yoo-form-footer.entry.js +7 -7
- package/dist/design-system/yoo-form-formula.entry.js +6 -6
- package/dist/design-system/yoo-form-hotzones-creator.entry.js +4 -4
- package/dist/design-system/yoo-form-hotzones.entry.js +8 -8
- package/dist/design-system/yoo-form-iframe-dialog.entry.js +4 -4
- package/dist/design-system/yoo-form-image-collection.entry.js +7 -7
- package/dist/design-system/yoo-form-image-tagging-creator.entry.js +7 -7
- package/dist/design-system/yoo-form-image-tagging.entry.js +10 -10
- package/dist/design-system/yoo-form-incentive-participants.entry.js +1 -1
- package/dist/design-system/yoo-form-incentive-targets.entry.js +6 -6
- package/dist/design-system/yoo-form-input-comments.entry.js +4 -4
- package/dist/design-system/yoo-form-input-container.entry.js +7 -7
- package/dist/design-system/yoo-form-input.entry.js +11 -11
- package/dist/design-system/yoo-form-json.entry.js +7 -7
- package/dist/design-system/yoo-form-location.entry.js +6 -6
- package/dist/design-system/yoo-form-missing-word.entry.js +8 -8
- package/dist/design-system/yoo-form-missionfield.entry.js +6 -6
- package/dist/design-system/yoo-form-multi-input.entry.js +6 -6
- package/dist/design-system/yoo-form-number-picker-dialog.entry.js +4 -4
- package/dist/design-system/yoo-form-number-picker.entry.js +4 -4
- package/dist/design-system/yoo-form-opening-hours.entry.js +4 -4
- package/dist/design-system/yoo-form-permissions.entry.js +5 -5
- package/dist/design-system/yoo-form-phone-number.entry.js +5 -5
- package/dist/design-system/yoo-form-plan-assign.entry.js +6 -6
- package/dist/design-system/yoo-form-plan.entry.js +6 -6
- package/dist/design-system/yoo-form-pricecheck.entry.js +6 -6
- package/dist/design-system/yoo-form-product-batch.entry.js +7 -7
- package/dist/design-system/yoo-form-products-sales.entry.js +6 -6
- package/dist/design-system/yoo-form-progress-indicator.entry.js +5 -5
- package/dist/design-system/yoo-form-qrcode.entry.js +6 -6
- package/dist/design-system/yoo-form-query-builder.entry.js +6 -6
- package/dist/design-system/yoo-form-range.entry.js +6 -6
- package/dist/design-system/yoo-form-ranking.entry.js +6 -6
- package/dist/design-system/yoo-form-recap-step.entry.js +4 -4
- package/dist/design-system/yoo-form-recurrence-delay.entry.js +7 -6
- package/dist/design-system/yoo-form-recurrence-preview.entry.js +7 -6
- package/dist/design-system/yoo-form-recurrence.entry.js +50 -53
- package/dist/design-system/yoo-form-reorder.entry.js +6 -6
- package/dist/design-system/yoo-form-scorm.entry.js +6 -6
- package/dist/design-system/yoo-form-shopping.entry.js +6 -6
- package/dist/design-system/yoo-form-signature-pad-dialog.entry.js +5 -5
- package/dist/design-system/yoo-form-signature-pad.entry.js +6 -6
- package/dist/design-system/yoo-form-sorts.entry.js +6 -6
- package/dist/design-system/yoo-form-star-rating.entry.js +6 -6
- package/dist/design-system/yoo-form-stripe-card.entry.js +6 -6
- package/dist/design-system/yoo-form-swipe-cards.entry.js +7 -7
- package/dist/design-system/yoo-form-table.entry.js +6 -6
- package/dist/design-system/yoo-form-task.entry.js +6 -6
- package/dist/design-system/yoo-form-text-area.entry.js +7 -7
- package/dist/design-system/yoo-form-text-editor.entry.js +9 -9
- package/dist/design-system/yoo-form-time.entry.js +6 -6
- package/dist/design-system/yoo-form-timeslots.entry.js +6 -6
- package/dist/design-system/yoo-form-todo-dialog.entry.js +5 -5
- package/dist/design-system/yoo-form-todo-single.entry.js +6 -6
- package/dist/design-system/yoo-form-todo-task-list.entry.js +5 -5
- package/dist/design-system/yoo-form-todo-task.entry.js +5 -5
- package/dist/design-system/yoo-form-todo.entry.js +6 -6
- package/dist/design-system/yoo-form-toggle.entry.js +6 -6
- package/dist/design-system/yoo-form-uploader.entry.js +6 -6
- package/dist/design-system/yoo-form-videoplayer.entry.js +6 -6
- package/dist/design-system/yoo-form-wiki.entry.js +6 -6
- package/dist/design-system/yoo-grid-calendar.entry.js +54 -45
- package/dist/design-system/yoo-grid.entry.js +17 -17
- package/dist/design-system/yoo-gridstack.entry.js +5 -5
- package/dist/design-system/yoo-header.entry.js +5 -5
- package/dist/design-system/yoo-healthscore-dialog.entry.js +5 -5
- package/dist/design-system/yoo-healthscore.entry.js +4 -4
- package/dist/design-system/yoo-image-cropper-dialog.entry.js +4 -4
- package/dist/design-system/yoo-img.entry.js +6 -6
- package/dist/design-system/yoo-incentive-detail.entry.js +6 -6
- package/dist/design-system/yoo-input-bar.entry.js +9 -9
- package/dist/design-system/yoo-ion-alert-controller.entry.js +5 -5
- package/dist/design-system/yoo-ion-content.entry.js +4 -4
- package/dist/design-system/yoo-ion-footer.entry.js +5 -5
- package/dist/design-system/yoo-ion-infinite-scroll-content.entry.js +4 -4
- package/dist/design-system/yoo-ion-infinite-scroll.entry.js +4 -4
- package/dist/design-system/yoo-ion-item-divider.entry.js +6 -6
- package/dist/design-system/yoo-ion-item-options.entry.js +5 -5
- package/dist/design-system/yoo-ion-item-sliding.entry.js +6 -6
- package/dist/design-system/yoo-ion-item.entry.js +6 -6
- package/dist/design-system/yoo-ion-list.entry.js +5 -5
- package/dist/design-system/yoo-ion-refresher.entry.js +5 -5
- package/dist/design-system/yoo-ion-scroll.entry.js +5 -5
- package/dist/design-system/yoo-ion-slide.entry.js +5 -5
- package/dist/{esm/yoo-ion-slides-0e6f81e5.js → design-system/yoo-ion-slides-6c6b8526.js} +5 -5
- package/dist/design-system/yoo-ion-slides.entry.js +7 -7
- package/dist/design-system/yoo-ion-toast-controller.entry.js +5 -5
- package/dist/design-system/yoo-kanban.entry.js +5 -5
- package/dist/design-system/yoo-kpi-card.entry.js +4 -4
- package/dist/design-system/yoo-kpi-container.entry.js +5 -5
- package/dist/design-system/yoo-kpi-external.entry.js +4 -4
- package/dist/design-system/yoo-kpi.entry.js +4 -4
- package/dist/design-system/yoo-layout-sections.entry.js +4 -4
- package/dist/design-system/yoo-layout-tabs.entry.js +4 -4
- package/dist/design-system/yoo-layout-two-columns.entry.js +4 -4
- package/dist/design-system/yoo-lesson-detail-card.entry.js +4 -4
- package/dist/design-system/yoo-lesson-detail.entry.js +5 -5
- package/dist/design-system/yoo-lesson-heading.entry.js +5 -5
- package/dist/design-system/yoo-lesson-highscores.entry.js +4 -4
- package/dist/design-system/yoo-lesson-question-result.entry.js +5 -5
- package/dist/design-system/yoo-line-state.entry.js +1 -1
- package/dist/design-system/yoo-links-menu.entry.js +4 -4
- package/dist/design-system/yoo-links-preview.entry.js +6 -6
- package/dist/design-system/yoo-loader.entry.js +4 -4
- package/dist/design-system/yoo-location-info.entry.js +4 -4
- package/dist/design-system/yoo-location-map.entry.js +5 -5
- package/dist/design-system/yoo-login.entry.js +4 -4
- package/dist/design-system/yoo-lottie.entry.js +4 -4
- package/dist/design-system/yoo-map-gl.entry.js +5 -5
- package/dist/design-system/yoo-map-js.entry.js +6 -6
- package/dist/design-system/yoo-map-legend.entry.js +6 -6
- package/dist/design-system/yoo-map.entry.js +5 -5
- package/dist/design-system/yoo-markdown.entry.js +6 -6
- package/dist/design-system/yoo-memo-list-dialog.entry.js +4 -4
- package/dist/design-system/yoo-memo-list.entry.js +4 -4
- package/dist/design-system/yoo-mention-tag.entry.js +4 -4
- package/dist/design-system/yoo-mission-details.entry.js +6 -6
- package/dist/design-system/yoo-mission-heading.entry.js +7 -7
- package/dist/design-system/yoo-mission-score.entry.js +4 -4
- package/dist/design-system/yoo-mission-todo.entry.js +5 -5
- package/dist/design-system/yoo-mobile-tabbar-more.entry.js +4 -4
- package/dist/design-system/yoo-mobile-tabbar.entry.js +5 -5
- package/dist/design-system/yoo-modal-controller.entry.js +5 -5
- package/dist/design-system/yoo-modal.entry.js +8 -8
- package/dist/design-system/yoo-navbar.entry.js +5 -5
- package/dist/design-system/yoo-numbers-display.entry.js +5 -5
- package/dist/design-system/yoo-photo-editor.entry.js +9 -9
- package/dist/design-system/yoo-pivot-table.entry.js +10 -10
- package/dist/design-system/yoo-podium.entry.js +4 -4
- package/dist/design-system/yoo-profile-list.entry.js +4 -4
- package/dist/design-system/yoo-profile-summary.entry.js +5 -5
- package/dist/design-system/yoo-progress-bar.entry.js +4 -4
- package/dist/design-system/yoo-progress-loader.entry.js +4 -4
- package/dist/design-system/yoo-progress-recap.entry.js +4 -4
- package/dist/design-system/yoo-property-card.entry.js +5 -5
- package/dist/design-system/yoo-range.entry.js +6 -6
- package/dist/design-system/yoo-rating.entry.js +4 -4
- package/dist/design-system/yoo-reset-password.entry.js +4 -4
- package/dist/design-system/yoo-result-dialog.entry.js +5 -5
- package/dist/design-system/yoo-reveal.entry.js +4 -4
- package/dist/design-system/yoo-salesai-formula.entry.js +4 -4
- package/dist/design-system/yoo-scandit.entry.js +5 -5
- package/dist/design-system/yoo-scratch-card-creator.entry.js +4 -4
- package/dist/design-system/yoo-scratch-card.entry.js +6 -6
- package/dist/design-system/yoo-section-list.entry.js +4 -4
- package/dist/design-system/yoo-segmented-control.entry.js +4 -4
- package/dist/design-system/yoo-side-menu-tree.entry.js +4 -4
- package/dist/design-system/yoo-side-menu.entry.js +4 -4
- package/dist/design-system/yoo-slides-media.entry.js +7 -7
- package/dist/design-system/yoo-start-meeting-popup.entry.js +5 -5
- package/dist/design-system/yoo-tabs.entry.js +4 -4
- package/dist/design-system/yoo-text-sequence.entry.js +5 -5
- package/dist/design-system/yoo-text.entry.js +5 -5
- package/dist/design-system/yoo-toast.entry.js +6 -6
- package/dist/design-system/yoo-tooltip.entry.js +7 -7
- package/dist/design-system/yoo-truncate.entry.js +5 -5
- package/dist/design-system/yoo-truncated-line.entry.js +4 -4
- package/dist/design-system/yoo-user-detail.entry.js +4 -4
- package/dist/design-system/yoo-user-profile.entry.js +6 -6
- package/dist/design-system/yoo-user-wizard.entry.js +5 -5
- package/dist/design-system/yoo-videoplayer-core.entry.js +5 -5
- package/dist/design-system/yoo-videoplayer-dailymotion.entry.js +6 -6
- package/dist/design-system/yoo-videoplayer-videojs.entry.js +8 -8
- package/dist/design-system/yoo-videoplayer-vimeo.entry.js +6 -6
- package/dist/design-system/yoo-videoplayer-youtube.entry.js +6 -6
- package/dist/design-system/yoo-virtual-item.entry.js +4 -4
- package/dist/design-system/yoo-virtual-scroll.entry.js +5 -5
- package/dist/design-system/yoo-waitlist-location-result.entry.js +4 -4
- package/dist/design-system/yoo-waitlist-location-start.entry.js +4 -4
- package/dist/design-system/yoo-walkthrough.entry.js +4 -4
- package/dist/design-system/yoo-web-menu.entry.js +5 -5
- package/dist/design-system/yoo-webcam.entry.js +4 -4
- package/dist/design-system/yoo-welcome-banner.entry.js +5 -5
- package/dist/design-system/yoo-widget-chart.entry.js +4 -4
- package/dist/design-system/yoo-widget-small-size.entry.js +4 -4
- package/dist/design-system/yoo-widget-tab.entry.js +4 -4
- package/dist/design-system/yoo-widget-tile.entry.js +4 -4
- package/dist/design-system/yoo-workflow-state-dialog.entry.js +4 -4
- package/dist/design-system/yoo-workflow-state.entry.js +4 -4
- package/dist/design-system/yoo-workflow.entry.js +7 -7
- package/dist/design-system/yoo-zebra.entry.js +4 -4
- package/dist/design-system/yoo-zoom.entry.js +4 -4
- package/dist/esm/{buffer-es6-7dcb5a7c.js → buffer-es6-2075c9bd.js} +1 -1
- package/dist/esm/{button.factory-e56b4bf1.js → button.factory-7f3e5054.js} +2 -2
- package/dist/{design-system/camera-helpers-f982e788.js → esm/camera-helpers-5487117a.js} +3 -3
- package/dist/esm/{chat-helpers-a2f2f817.js → chat-helpers-84698d42.js} +3 -3
- package/dist/{design-system/common-helpers-dcc04717.js → esm/common-helpers-50e7d25c.js} +3 -3
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/{draggable-dots-helpers-2f0d0e72.js → draggable-dots-helpers-c53826c9.js} +3 -3
- package/dist/esm/{draggable-tags-helpers-f776f4de.js → draggable-tags-helpers-f6b7a2e4.js} +3 -3
- package/dist/{design-system/entities-helpers-23875383.js → esm/entities-helpers-730f01be.js} +4 -4
- package/dist/esm/{filters-helpers-49a0bf64.js → filters-helpers-139e2d2e.js} +4 -4
- package/dist/esm/{form-choice-helpers-533e45fa.js → form-choice-helpers-c556be26.js} +6 -6
- package/dist/esm/{form-helpers-a3a7973c.js → form-helpers-ad793921.js} +4 -4
- package/dist/{design-system/form-input-helpers-3094279e.js → esm/form-input-helpers-1dc5cc33.js} +4 -4
- package/dist/esm/{form-text-area-helpers-673fb40a.js → form-text-area-helpers-12eec6b6.js} +3 -3
- package/dist/esm/{geolocation-helpers-5126a3df.js → geolocation-helpers-12907e01.js} +1 -1
- package/dist/{design-system/grid-renderers-87fd2e33.js → esm/grid-renderers-dee257e3.js} +9 -9
- package/dist/{design-system/incentive-helpers-f373518a.js → esm/incentive-helpers-dda573d7.js} +4 -4
- package/dist/esm/{index-8e862f79.js → index-241ebd9b.js} +698 -54
- package/dist/esm/{index-b0ce07d9.js → index-2ecbe75b.js} +4 -4
- package/dist/{design-system/index-14a2a4ba.js → esm/index-30d1701e.js} +2 -2
- package/dist/esm/{index-becaffe4.js → index-3f441fd3.js} +1 -1
- package/dist/{design-system/index-c9396f6f.js → esm/index-4888d3e1.js} +1 -1
- package/dist/esm/{index-978126b6.js → index-5743e72c.js} +31 -26
- package/dist/esm/index-870d5e89.js +1 -0
- package/dist/esm/index-b902b165.js +1 -0
- package/dist/esm/{index-b1645366.js → index-d245e4e2.js} +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localForage-bbb48f80.js → localForage-7e2989d0.js} +2 -2
- package/dist/esm/{lodash-653c0bcd.js → lodash-9f7930a6.js} +1 -1
- package/dist/{design-system/map-helpers-0746c47b.js → esm/map-helpers-9187875f.js} +3 -3
- package/dist/esm/{mission-locked-banner-0d9e62dd.js → mission-locked-banner-6a94b84a.js} +2 -2
- package/dist/{design-system/missions-helpers-cc9dde5e.js → esm/missions-helpers-2476400e.js} +3 -3
- package/dist/{design-system/modal-animations-10684397.js → esm/modal-animations-710860a6.js} +2 -2
- package/dist/esm/{operation-helpers-8dad9976.js → operation-helpers-abd3def9.js} +3 -3
- package/dist/esm/{overlays-1ef74fd7.js → overlays-3d8da333.js} +4149 -499
- package/dist/esm/{overlays-4ac57aaf.js → overlays-8c4ac757.js} +2 -2
- package/dist/esm/swiper-d2c29ca1.js +12 -0
- package/dist/{design-system/theme-58519f96.js → esm/theme-ff96c33f.js} +2 -2
- package/dist/{design-system/tippy.esm-ba803492.js → esm/tippy.esm-b05b5f0a.js} +1 -1
- package/dist/esm/{video-player-helpers-c8e354e7.js → video-player-helpers-d0cbf586.js} +5 -5
- package/dist/esm/{web-65e82bd0.js → web-43b468e3.js} +5 -5
- package/dist/{design-system/web-8d48a6cf.js → esm/web-4ddd3dc4.js} +3 -3
- package/dist/{design-system/web-fe78dfcb.js → esm/web-9f2e054f.js} +3 -3
- package/dist/esm/{web-a06e3338.js → web-c5edd553.js} +3 -3
- package/dist/esm/yoo-about.entry.js +4 -4
- package/dist/esm/yoo-accordion.entry.js +7 -7
- package/dist/esm/yoo-action-sheet-controller.entry.js +5 -5
- package/dist/esm/yoo-action-sheet.entry.js +7 -7
- package/dist/esm/yoo-ag-grid.entry.js +10 -10
- package/dist/esm/yoo-alert.entry.js +7 -7
- package/dist/esm/yoo-amap.entry.js +6 -6
- package/dist/esm/yoo-announcement-heading.entry.js +7 -7
- package/dist/esm/yoo-app.entry.js +4 -4
- package/dist/esm/yoo-audio-player.entry.js +5 -5
- package/dist/esm/yoo-audio-recorder-dialog.entry.js +5 -5
- package/dist/esm/yoo-avatar.entry.js +4 -4
- package/dist/esm/yoo-avatars.entry.js +4 -4
- package/dist/esm/yoo-banner.entry.js +5 -5
- package/dist/esm/yoo-barcode-dialog.entry.js +4 -4
- package/dist/esm/yoo-battle-count-down.entry.js +5 -5
- package/dist/esm/yoo-battle-result.entry.js +4 -4
- package/dist/esm/yoo-battle-user-stats.entry.js +5 -5
- package/dist/esm/yoo-breadcrumbs.entry.js +4 -4
- package/dist/esm/yoo-button.entry.js +5 -5
- package/dist/esm/yoo-calendar.entry.js +4 -4
- package/dist/esm/yoo-camera-preview-dialog.entry.js +7 -7
- package/dist/esm/yoo-card-battle-result.entry.js +4 -4
- package/dist/esm/yoo-card-battle.entry.js +4 -4
- package/dist/esm/yoo-card-calendar.entry.js +17 -8
- package/dist/esm/yoo-card-campaign.entry.js +5 -5
- package/dist/esm/yoo-card-cell.entry.js +5 -5
- package/dist/esm/yoo-card-chat.entry.js +4 -4
- package/dist/esm/yoo-card-course-row-compact.entry.js +4 -4
- package/dist/esm/yoo-card-course-row.entry.js +6 -6
- package/dist/esm/yoo-card-course.entry.js +4 -4
- package/dist/esm/yoo-card-feed-row.entry.js +4 -4
- package/dist/esm/yoo-card-feed.entry.js +16 -12
- package/dist/esm/yoo-card-file.entry.js +4 -4
- package/dist/esm/yoo-card-image.entry.js +4 -4
- package/dist/esm/yoo-card-inbox.entry.js +4 -4
- package/dist/esm/yoo-card-incentive-rank.entry.js +4 -4
- package/dist/esm/yoo-card-incentive.entry.js +6 -6
- package/dist/esm/yoo-card-kanban.entry.js +5 -5
- package/dist/esm/yoo-card-lesson.entry.js +5 -5
- package/dist/esm/yoo-card-list-collapsible.entry.js +5 -5
- package/dist/esm/yoo-card-list-color.entry.js +4 -4
- package/dist/esm/yoo-card-list-simple.entry.js +5 -5
- package/dist/esm/yoo-card-list.entry.js +5 -5
- package/dist/esm/yoo-card-location.entry.js +4 -4
- package/dist/esm/yoo-card-media.entry.js +5 -5
- package/dist/esm/yoo-card-menu.entry.js +5 -5
- package/dist/esm/yoo-card-notification.entry.js +4 -4
- package/dist/esm/yoo-card-plan.entry.js +5 -5
- package/dist/esm/yoo-card-progress.entry.js +4 -4
- package/dist/esm/yoo-card-recommendation.entry.js +5 -5
- package/dist/esm/yoo-card-sticky.entry.js +5 -5
- package/dist/esm/yoo-card-template.entry.js +1 -1
- package/dist/esm/yoo-card-video.entry.js +4 -4
- package/dist/esm/yoo-chart.entry.js +4 -4
- package/dist/esm/yoo-chat-message-dialog.entry.js +5 -5
- package/dist/esm/yoo-chat-message-preview.entry.js +5 -5
- package/dist/esm/yoo-chat-message.entry.js +9 -15
- package/dist/esm/yoo-chat.entry.js +10 -21
- package/dist/esm/yoo-collapsible.entry.js +4 -4
- package/dist/esm/yoo-color-selector.entry.js +4 -4
- package/dist/esm/yoo-community-detail.entry.js +5 -5
- package/dist/esm/yoo-context-menu-dialog.entry.js +5 -5
- package/dist/esm/yoo-context-menu.entry.js +5 -5
- package/dist/esm/yoo-copyright.entry.js +4 -4
- package/dist/esm/yoo-count-down.entry.js +5 -5
- package/dist/esm/yoo-course-info-card.entry.js +4 -4
- package/dist/esm/yoo-course-summary.entry.js +5 -5
- package/dist/esm/yoo-dashboard-detail.entry.js +4 -4
- package/dist/esm/yoo-date.entry.js +4 -4
- package/dist/esm/yoo-detail-bar.entry.js +5 -5
- package/dist/esm/yoo-device-list.entry.js +4 -4
- package/dist/esm/yoo-device.entry.js +4 -4
- package/dist/esm/yoo-draw-flow.entry.js +4 -4
- package/dist/esm/yoo-empty-state.entry.js +1 -1
- package/dist/esm/yoo-entity-query-builder.entry.js +5 -5
- package/dist/esm/yoo-entity-search-dialog.entry.js +5 -5
- package/dist/esm/yoo-entity-search-filters.entry.js +6 -6
- package/dist/esm/yoo-entity-search-recent.entry.js +4 -4
- package/dist/esm/yoo-entity-search-sorts.entry.js +5 -5
- package/dist/esm/yoo-entity-search-tags.entry.js +5 -5
- package/dist/esm/yoo-entity-search.entry.js +5 -5
- package/dist/esm/yoo-entity.entry.js +21 -24
- package/dist/esm/yoo-feed-detail.entry.js +7 -7
- package/dist/esm/yoo-flag.entry.js +4 -4
- package/dist/esm/yoo-form-audience.entry.js +7 -7
- package/dist/esm/yoo-form-autocomplete-dialog.entry.js +6 -6
- package/dist/esm/yoo-form-autocomplete.entry.js +101 -133
- package/dist/esm/yoo-form-barcode-dialog.entry.js +5 -5
- package/dist/esm/yoo-form-barcode.entry.js +6 -6
- package/dist/esm/yoo-form-calendar-dialog.entry.js +5 -5
- package/dist/esm/yoo-form-capture-map-dialog.entry.js +4 -4
- package/dist/esm/yoo-form-capture-tag-dialog.entry.js +5 -5
- package/dist/esm/yoo-form-capture-view-dialog.entry.js +5 -5
- package/dist/esm/yoo-form-capture-webcam-dialog.entry.js +6 -6
- package/dist/esm/yoo-form-capture.entry.js +8 -8
- package/dist/esm/yoo-form-carousel.entry.js +5 -5
- package/dist/esm/yoo-form-catalog-dialog.entry.js +5 -5
- package/dist/esm/yoo-form-catalog.entry.js +6 -6
- package/dist/esm/yoo-form-categorize-words.entry.js +8 -8
- package/dist/esm/yoo-form-checkbox.entry.js +6 -6
- package/dist/esm/yoo-form-checklist.entry.js +6 -6
- package/dist/esm/yoo-form-choice-button.entry.js +8 -8
- package/dist/esm/yoo-form-choice-card.entry.js +8 -8
- package/dist/esm/yoo-form-choice-chat.entry.js +8 -8
- package/dist/esm/yoo-form-choice-image.entry.js +8 -8
- package/dist/esm/yoo-form-choice-radio.entry.js +8 -8
- package/dist/esm/yoo-form-color-field.entry.js +6 -6
- package/dist/esm/yoo-form-color-picker.entry.js +4 -4
- package/dist/esm/yoo-form-conditions.entry.js +4 -4
- package/dist/esm/yoo-form-connect.entry.js +7 -7
- package/dist/esm/yoo-form-creator-block-expandable.entry.js +6 -6
- package/dist/esm/yoo-form-creator-block-simple.entry.js +5 -5
- package/dist/esm/yoo-form-creator-condition-block.entry.js +5 -5
- package/dist/esm/yoo-form-creator-field-selector.entry.js +5 -5
- package/dist/esm/yoo-form-creator-header.entry.js +5 -5
- package/dist/esm/yoo-form-creator-live-preview.entry.js +4 -4
- package/dist/esm/yoo-form-creator-overlay.entry.js +4 -4
- package/dist/esm/yoo-form-creator-page-card-list.entry.js +5 -5
- package/dist/esm/yoo-form-creator-page-card.entry.js +5 -5
- package/dist/esm/yoo-form-creator-score-expandable.entry.js +5 -5
- package/dist/esm/yoo-form-creator-scoring-card-list.entry.js +4 -4
- package/dist/esm/yoo-form-creator-scoring-card.entry.js +4 -4
- package/dist/esm/yoo-form-creator-scoring-quick-setup.entry.js +4 -4
- package/dist/esm/yoo-form-creator-translate-dialog.entry.js +5 -5
- package/dist/esm/yoo-form-creator-translate.entry.js +5 -5
- package/dist/esm/yoo-form-creator-workflow-side-selection.entry.js +6 -6
- package/dist/esm/yoo-form-creator-workflow-step.entry.js +5 -5
- package/dist/esm/yoo-form-creator.entry.js +8 -8
- package/dist/esm/yoo-form-date-time.entry.js +29 -29
- package/dist/esm/yoo-form-daterange.entry.js +6 -6
- package/dist/esm/yoo-form-document-dialog.entry.js +5 -5
- package/dist/esm/yoo-form-document.entry.js +6 -6
- package/dist/esm/yoo-form-dynamic-dialog.entry.js +6 -6
- package/dist/esm/yoo-form-dynamic.entry.js +18 -9
- package/dist/esm/yoo-form-emailreport.entry.js +6 -6
- package/dist/esm/yoo-form-entity-value-pairs.entry.js +4 -4
- package/dist/esm/yoo-form-explanation.entry.js +4 -4
- package/dist/esm/yoo-form-feed-preview.entry.js +6 -6
- package/dist/esm/yoo-form-feedback.entry.js +6 -6
- package/dist/esm/yoo-form-filter-date.entry.js +4 -4
- package/dist/esm/yoo-form-filter-number.entry.js +4 -4
- package/dist/esm/yoo-form-filter-text.entry.js +4 -4
- package/dist/esm/yoo-form-filter.entry.js +4 -4
- package/dist/esm/yoo-form-footer.entry.js +7 -7
- package/dist/esm/yoo-form-formula.entry.js +6 -6
- package/dist/esm/yoo-form-hotzones-creator.entry.js +4 -4
- package/dist/esm/yoo-form-hotzones.entry.js +8 -8
- package/dist/esm/yoo-form-iframe-dialog.entry.js +4 -4
- package/dist/esm/yoo-form-image-collection.entry.js +7 -7
- package/dist/esm/yoo-form-image-tagging-creator.entry.js +7 -7
- package/dist/esm/yoo-form-image-tagging.entry.js +10 -10
- package/dist/esm/yoo-form-incentive-participants.entry.js +1 -1
- package/dist/esm/yoo-form-incentive-targets.entry.js +6 -6
- package/dist/esm/yoo-form-input-comments.entry.js +4 -4
- package/dist/esm/yoo-form-input-container.entry.js +7 -7
- package/dist/esm/yoo-form-input.entry.js +11 -11
- package/dist/esm/yoo-form-json.entry.js +7 -7
- package/dist/esm/yoo-form-location.entry.js +6 -6
- package/dist/esm/yoo-form-missing-word.entry.js +8 -8
- package/dist/esm/yoo-form-missionfield.entry.js +6 -6
- package/dist/esm/yoo-form-multi-input.entry.js +6 -6
- package/dist/esm/yoo-form-number-picker-dialog.entry.js +4 -4
- package/dist/esm/yoo-form-number-picker.entry.js +4 -4
- package/dist/esm/yoo-form-opening-hours.entry.js +4 -4
- package/dist/esm/yoo-form-permissions.entry.js +5 -5
- package/dist/esm/yoo-form-phone-number.entry.js +5 -5
- package/dist/esm/yoo-form-plan-assign.entry.js +6 -6
- package/dist/esm/yoo-form-plan.entry.js +6 -6
- package/dist/esm/yoo-form-pricecheck.entry.js +6 -6
- package/dist/esm/yoo-form-product-batch.entry.js +7 -7
- package/dist/esm/yoo-form-products-sales.entry.js +6 -6
- package/dist/esm/yoo-form-progress-indicator.entry.js +5 -5
- package/dist/esm/yoo-form-qrcode.entry.js +6 -6
- package/dist/esm/yoo-form-query-builder.entry.js +6 -6
- package/dist/esm/yoo-form-range.entry.js +6 -6
- package/dist/esm/yoo-form-ranking.entry.js +6 -6
- package/dist/esm/yoo-form-recap-step.entry.js +4 -4
- package/dist/esm/yoo-form-recurrence-delay.entry.js +7 -6
- package/dist/esm/yoo-form-recurrence-preview.entry.js +7 -6
- package/dist/esm/yoo-form-recurrence.entry.js +50 -53
- package/dist/esm/yoo-form-reorder.entry.js +6 -6
- package/dist/esm/yoo-form-scorm.entry.js +6 -6
- package/dist/esm/yoo-form-shopping.entry.js +6 -6
- package/dist/esm/yoo-form-signature-pad-dialog.entry.js +5 -5
- package/dist/esm/yoo-form-signature-pad.entry.js +6 -6
- package/dist/esm/yoo-form-sorts.entry.js +6 -6
- package/dist/esm/yoo-form-star-rating.entry.js +6 -6
- package/dist/esm/yoo-form-stripe-card.entry.js +6 -6
- package/dist/esm/yoo-form-swipe-cards.entry.js +7 -7
- package/dist/esm/yoo-form-table.entry.js +6 -6
- package/dist/esm/yoo-form-task.entry.js +6 -6
- package/dist/esm/yoo-form-text-area.entry.js +7 -7
- package/dist/esm/yoo-form-text-editor.entry.js +9 -9
- package/dist/esm/yoo-form-time.entry.js +6 -6
- package/dist/esm/yoo-form-timeslots.entry.js +6 -6
- package/dist/esm/yoo-form-todo-dialog.entry.js +5 -5
- package/dist/esm/yoo-form-todo-single.entry.js +6 -6
- package/dist/esm/yoo-form-todo-task-list.entry.js +5 -5
- package/dist/esm/yoo-form-todo-task.entry.js +5 -5
- package/dist/esm/yoo-form-todo.entry.js +6 -6
- package/dist/esm/yoo-form-toggle.entry.js +6 -6
- package/dist/esm/yoo-form-uploader.entry.js +6 -6
- package/dist/esm/yoo-form-videoplayer.entry.js +6 -6
- package/dist/esm/yoo-form-wiki.entry.js +6 -6
- package/dist/esm/yoo-grid-calendar.entry.js +54 -45
- package/dist/esm/yoo-grid.entry.js +17 -17
- package/dist/esm/yoo-gridstack.entry.js +5 -5
- package/dist/esm/yoo-header.entry.js +5 -5
- package/dist/esm/yoo-healthscore-dialog.entry.js +5 -5
- package/dist/esm/yoo-healthscore.entry.js +4 -4
- package/dist/esm/yoo-image-cropper-dialog.entry.js +4 -4
- package/dist/esm/yoo-img.entry.js +6 -6
- package/dist/esm/yoo-incentive-detail.entry.js +6 -6
- package/dist/esm/yoo-input-bar.entry.js +9 -9
- package/dist/esm/yoo-ion-alert-controller.entry.js +5 -5
- package/dist/esm/yoo-ion-content.entry.js +4 -4
- package/dist/esm/yoo-ion-footer.entry.js +5 -5
- package/dist/esm/yoo-ion-infinite-scroll-content.entry.js +4 -4
- package/dist/esm/yoo-ion-infinite-scroll.entry.js +4 -4
- package/dist/esm/yoo-ion-item-divider.entry.js +6 -6
- package/dist/esm/yoo-ion-item-options.entry.js +5 -5
- package/dist/esm/yoo-ion-item-sliding.entry.js +6 -6
- package/dist/esm/yoo-ion-item.entry.js +6 -6
- package/dist/esm/yoo-ion-list.entry.js +5 -5
- package/dist/esm/yoo-ion-refresher.entry.js +5 -5
- package/dist/esm/yoo-ion-scroll.entry.js +5 -5
- package/dist/esm/yoo-ion-slide.entry.js +5 -5
- package/dist/{design-system/yoo-ion-slides-0e6f81e5.js → esm/yoo-ion-slides-6c6b8526.js} +5 -5
- package/dist/esm/yoo-ion-slides.entry.js +7 -7
- package/dist/esm/yoo-ion-toast-controller.entry.js +5 -5
- package/dist/esm/yoo-kanban.entry.js +5 -5
- package/dist/esm/yoo-kpi-card.entry.js +4 -4
- package/dist/esm/yoo-kpi-container.entry.js +5 -5
- package/dist/esm/yoo-kpi-external.entry.js +4 -4
- package/dist/esm/yoo-kpi.entry.js +4 -4
- package/dist/esm/yoo-layout-sections.entry.js +4 -4
- package/dist/esm/yoo-layout-tabs.entry.js +4 -4
- package/dist/esm/yoo-layout-two-columns.entry.js +4 -4
- package/dist/esm/yoo-lesson-detail-card.entry.js +4 -4
- package/dist/esm/yoo-lesson-detail.entry.js +5 -5
- package/dist/esm/yoo-lesson-heading.entry.js +5 -5
- package/dist/esm/yoo-lesson-highscores.entry.js +4 -4
- package/dist/esm/yoo-lesson-question-result.entry.js +5 -5
- package/dist/esm/yoo-line-state.entry.js +1 -1
- package/dist/esm/yoo-links-menu.entry.js +4 -4
- package/dist/esm/yoo-links-preview.entry.js +6 -6
- package/dist/esm/yoo-loader.entry.js +4 -4
- package/dist/esm/yoo-location-info.entry.js +4 -4
- package/dist/esm/yoo-location-map.entry.js +5 -5
- package/dist/esm/yoo-login.entry.js +4 -4
- package/dist/esm/yoo-lottie.entry.js +4 -4
- package/dist/esm/yoo-map-gl.entry.js +5 -5
- package/dist/esm/yoo-map-js.entry.js +6 -6
- package/dist/esm/yoo-map-legend.entry.js +6 -6
- package/dist/esm/yoo-map.entry.js +5 -5
- package/dist/esm/yoo-markdown.entry.js +6 -6
- package/dist/esm/yoo-memo-list-dialog.entry.js +4 -4
- package/dist/esm/yoo-memo-list.entry.js +4 -4
- package/dist/esm/yoo-mention-tag.entry.js +4 -4
- package/dist/esm/yoo-mission-details.entry.js +6 -6
- package/dist/esm/yoo-mission-heading.entry.js +7 -7
- package/dist/esm/yoo-mission-score.entry.js +4 -4
- package/dist/esm/yoo-mission-todo.entry.js +5 -5
- package/dist/esm/yoo-mobile-tabbar-more.entry.js +4 -4
- package/dist/esm/yoo-mobile-tabbar.entry.js +5 -5
- package/dist/esm/yoo-modal-controller.entry.js +5 -5
- package/dist/esm/yoo-modal.entry.js +8 -8
- package/dist/esm/yoo-navbar.entry.js +5 -5
- package/dist/esm/yoo-numbers-display.entry.js +5 -5
- package/dist/esm/yoo-photo-editor.entry.js +9 -9
- package/dist/esm/yoo-pivot-table.entry.js +10 -10
- package/dist/esm/yoo-podium.entry.js +4 -4
- package/dist/esm/yoo-profile-list.entry.js +4 -4
- package/dist/esm/yoo-profile-summary.entry.js +5 -5
- package/dist/esm/yoo-progress-bar.entry.js +4 -4
- package/dist/esm/yoo-progress-loader.entry.js +4 -4
- package/dist/esm/yoo-progress-recap.entry.js +4 -4
- package/dist/esm/yoo-property-card.entry.js +5 -5
- package/dist/esm/yoo-range.entry.js +6 -6
- package/dist/esm/yoo-rating.entry.js +4 -4
- package/dist/esm/yoo-reset-password.entry.js +4 -4
- package/dist/esm/yoo-result-dialog.entry.js +5 -5
- package/dist/esm/yoo-reveal.entry.js +4 -4
- package/dist/esm/yoo-salesai-formula.entry.js +4 -4
- package/dist/esm/yoo-scandit.entry.js +5 -5
- package/dist/esm/yoo-scratch-card-creator.entry.js +4 -4
- package/dist/esm/yoo-scratch-card.entry.js +6 -6
- package/dist/esm/yoo-section-list.entry.js +4 -4
- package/dist/esm/yoo-segmented-control.entry.js +4 -4
- package/dist/esm/yoo-side-menu-tree.entry.js +4 -4
- package/dist/esm/yoo-side-menu.entry.js +4 -4
- package/dist/esm/yoo-slides-media.entry.js +7 -7
- package/dist/esm/yoo-start-meeting-popup.entry.js +5 -5
- package/dist/esm/yoo-tabs.entry.js +4 -4
- package/dist/esm/yoo-text-sequence.entry.js +5 -5
- package/dist/esm/yoo-text.entry.js +5 -5
- package/dist/esm/yoo-toast.entry.js +6 -6
- package/dist/esm/yoo-tooltip.entry.js +7 -7
- package/dist/esm/yoo-truncate.entry.js +5 -5
- package/dist/esm/yoo-truncated-line.entry.js +4 -4
- package/dist/esm/yoo-user-detail.entry.js +4 -4
- package/dist/esm/yoo-user-profile.entry.js +6 -6
- package/dist/esm/yoo-user-wizard.entry.js +5 -5
- package/dist/esm/yoo-videoplayer-core.entry.js +5 -5
- package/dist/esm/yoo-videoplayer-dailymotion.entry.js +6 -6
- package/dist/esm/yoo-videoplayer-videojs.entry.js +8 -8
- package/dist/esm/yoo-videoplayer-vimeo.entry.js +6 -6
- package/dist/esm/yoo-videoplayer-youtube.entry.js +6 -6
- package/dist/esm/yoo-virtual-item.entry.js +4 -4
- package/dist/esm/yoo-virtual-scroll.entry.js +5 -5
- package/dist/esm/yoo-waitlist-location-result.entry.js +4 -4
- package/dist/esm/yoo-waitlist-location-start.entry.js +4 -4
- package/dist/esm/yoo-walkthrough.entry.js +4 -4
- package/dist/esm/yoo-web-menu.entry.js +5 -5
- package/dist/esm/yoo-webcam.entry.js +4 -4
- package/dist/esm/yoo-welcome-banner.entry.js +5 -5
- package/dist/esm/yoo-widget-chart.entry.js +4 -4
- package/dist/esm/yoo-widget-small-size.entry.js +4 -4
- package/dist/esm/yoo-widget-tab.entry.js +4 -4
- package/dist/esm/yoo-widget-tile.entry.js +4 -4
- package/dist/esm/yoo-workflow-state-dialog.entry.js +4 -4
- package/dist/esm/yoo-workflow-state.entry.js +4 -4
- package/dist/esm/yoo-workflow.entry.js +7 -7
- package/dist/esm/yoo-zebra.entry.js +4 -4
- package/dist/esm/yoo-zoom.entry.js +4 -4
- package/dist/types/components/form/form-autocomplete/form-autocomplete.d.ts +8 -13
- package/dist/types/components/form/form-date-time/form-date-time.d.ts +2 -1
- package/dist/types/components/form/form-recurrence/form-recurrence.d.ts +18 -2
- package/dist/types/components/form/form-recurrence/options/frequency.d.ts +1 -0
- package/dist/types/components/form/form-recurrence/options/month.d.ts +1 -1
- package/dist/types/components/form/form-recurrence/options/schedule/end.d.ts +2 -0
- package/dist/types/components/form/form-recurrence/options/schedule/index.d.ts +3 -0
- package/dist/types/components/form/form-recurrence/options/schedule/start.d.ts +1 -0
- package/dist/types/components/form/form-recurrence/options/week.d.ts +1 -1
- package/dist/types/components/form/form-recurrence/validation/options.d.ts +1 -1
- package/dist/types/components/form/form-recurrence/validation/schedule.d.ts +1 -1
- package/dist/types/components/form/form-recurrence-preview/form-recurrence-preview.d.ts +1 -1
- package/dist/types/components/grid/grid/grid.d.ts +2 -2
- package/dist/types/components/grid/grid-calendar/grid-calendar.d.ts +7 -4
- package/dist/types/components.d.ts +61 -27
- package/dist/types/feature-communicate/chat/chat/chat.d.ts +4 -7
- package/dist/types/feature-communicate/chat/chat-message/chat-message.d.ts +1 -6
- package/dist/types/feature-platform/calendar/card-calendar/card-calendar.d.ts +6 -2
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/calendar/calendar.interface.d.ts +22 -5
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/condition/condition.interface.d.ts +1 -1
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/entity/entity.interface.d.ts +1 -1
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/event/event.interface.d.ts +7 -0
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/form-field/form-field.interface.d.ts +6 -0
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/index.d.ts +2 -0
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/location/location.interface.d.ts +2 -1
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/mission-description/mission-description.interface.d.ts +2 -1
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/shift/shift.interface.d.ts +13 -0
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/timezone/timezone.interface.d.ts +2 -0
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/user/user.interface.d.ts +3 -2
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/ui/app/app.interface.d.ts +1 -1
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/utils/src/date/index.d.ts +7 -4
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/utils/src/helpers/event-helpers.d.ts +2 -1
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/utils/src/login/index.d.ts +1 -1
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/utils/src/recurrence/index.d.ts +5 -4
- package/dist/types/interfaces/entities/geolocation.interface.d.ts +2 -1
- package/package.json +1 -1
- package/dist/cjs/index-cab22f71.js +0 -4
- package/dist/cjs/index-e5cee82f.js +0 -4
- package/dist/design-system/index-33c58bd7.js +0 -1
- package/dist/design-system/index-974e20d8.js +0 -1
- package/dist/design-system/swiper-57bb8296.js +0 -12
- package/dist/esm/index-33c58bd7.js +0 -1
- package/dist/esm/index-974e20d8.js +0 -1
- package/dist/esm/swiper-57bb8296.js +0 -12
- package/dist/types/components/form/image-cropper-dialog/pintura/pintura.d.ts +0 -1236
@@ -1,7 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
const lodash = require('./lodash-72d493b9.js');
|
4
|
-
const index = require('./index-
|
4
|
+
const index = require('./index-a1aee400.js');
|
5
5
|
const _commonjsHelpers = require('./_commonjsHelpers-94df2ea7.js');
|
6
6
|
|
7
7
|
/*
|
@@ -2608,7 +2608,7 @@ distribute = function distribute(v) {
|
|
2608
2608
|
return func(parseFloat(value)) + (unit || getUnit(value));
|
2609
2609
|
};
|
2610
2610
|
},
|
2611
|
-
normalize$
|
2611
|
+
normalize$4 = function normalize(min, max, value) {
|
2612
2612
|
return mapRange(min, max, 0, 1, value);
|
2613
2613
|
},
|
2614
2614
|
_wrapArray = function _wrapArray(a, wrapper, value) {
|
@@ -5994,7 +5994,7 @@ var _gsap = {
|
|
5994
5994
|
distribute: distribute,
|
5995
5995
|
random: random,
|
5996
5996
|
snap: snap,
|
5997
|
-
normalize: normalize$
|
5997
|
+
normalize: normalize$4,
|
5998
5998
|
getUnit: getUnit,
|
5999
5999
|
clamp: clamp,
|
6000
6000
|
splitColor: splitColor,
|
@@ -21391,9 +21391,9 @@ function map$1(project, thisArg) {
|
|
21391
21391
|
});
|
21392
21392
|
}
|
21393
21393
|
|
21394
|
-
const { isArray: isArray$
|
21394
|
+
const { isArray: isArray$4 } = Array;
|
21395
21395
|
function callOrApply(fn, args) {
|
21396
|
-
return isArray$
|
21396
|
+
return isArray$4(args) ? fn(...args) : fn(args);
|
21397
21397
|
}
|
21398
21398
|
function mapOneOrManyArgs(fn) {
|
21399
21399
|
return map$1(args => callOrApply(fn, args));
|
@@ -21463,12 +21463,12 @@ function bindNodeCallback(callbackFunc, resultSelector, scheduler) {
|
|
21463
21463
|
return bindCallbackInternals(true, callbackFunc, resultSelector, scheduler);
|
21464
21464
|
}
|
21465
21465
|
|
21466
|
-
const { isArray: isArray$
|
21466
|
+
const { isArray: isArray$3 } = Array;
|
21467
21467
|
const { getPrototypeOf, prototype: objectProto, keys: getKeys$1 } = Object;
|
21468
21468
|
function argsArgArrayOrObject(args) {
|
21469
21469
|
if (args.length === 1) {
|
21470
21470
|
const first = args[0];
|
21471
|
-
if (isArray$
|
21471
|
+
if (isArray$3(first)) {
|
21472
21472
|
return { args: first, keys: null };
|
21473
21473
|
}
|
21474
21474
|
if (isPOJO(first)) {
|
@@ -21832,9 +21832,9 @@ function never() {
|
|
21832
21832
|
return NEVER;
|
21833
21833
|
}
|
21834
21834
|
|
21835
|
-
const { isArray: isArray$
|
21835
|
+
const { isArray: isArray$2 } = Array;
|
21836
21836
|
function argsOrArgArray(args) {
|
21837
|
-
return args.length === 1 && isArray$
|
21837
|
+
return args.length === 1 && isArray$2(args[0]) ? args[0] : args;
|
21838
21838
|
}
|
21839
21839
|
|
21840
21840
|
function onErrorResumeNext$1(...sources) {
|
@@ -22488,7 +22488,7 @@ function endWith(...values) {
|
|
22488
22488
|
return (source) => concat$2(source, of(...values));
|
22489
22489
|
}
|
22490
22490
|
|
22491
|
-
function every(predicate, thisArg) {
|
22491
|
+
function every$1(predicate, thisArg) {
|
22492
22492
|
return operate((source, subscriber) => {
|
22493
22493
|
let index = 0;
|
22494
22494
|
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
|
@@ -25074,7 +25074,7 @@ const HapticsNotificationType = exports.NotificationType;
|
|
25074
25074
|
const HapticsImpactStyle = exports.ImpactStyle;
|
25075
25075
|
|
25076
25076
|
const Haptics = registerPlugin('Haptics', {
|
25077
|
-
web: () => Promise.resolve().then(function () { return require('./web-
|
25077
|
+
web: () => Promise.resolve().then(function () { return require('./web-ef236319.js'); }).then(m => new m.HapticsWeb()),
|
25078
25078
|
});
|
25079
25079
|
|
25080
25080
|
/// <reference types="@capacitor/cli" />
|
@@ -25138,7 +25138,7 @@ const Keyboard = registerPlugin('Keyboard');
|
|
25138
25138
|
/// <reference types="@capacitor/cli" />
|
25139
25139
|
|
25140
25140
|
const SplashScreen = registerPlugin('SplashScreen', {
|
25141
|
-
web: () => Promise.resolve().then(function () { return require('./web-
|
25141
|
+
web: () => Promise.resolve().then(function () { return require('./web-24fe918c.js'); }).then(m => new m.SplashScreenWeb()),
|
25142
25142
|
});
|
25143
25143
|
|
25144
25144
|
var Style;
|
@@ -28270,7 +28270,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
28270
28270
|
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
|
28271
28271
|
if (typeof depth === 'undefined') { depth = 0; }
|
28272
28272
|
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
|
28273
|
-
return isArray(obj) ? '[Array]' : '[Object]';
|
28273
|
+
return isArray$1(obj) ? '[Array]' : '[Object]';
|
28274
28274
|
}
|
28275
28275
|
|
28276
28276
|
var indent = getIndent(opts, depth);
|
@@ -28318,7 +28318,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
28318
28318
|
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
|
28319
28319
|
return s;
|
28320
28320
|
}
|
28321
|
-
if (isArray(obj)) {
|
28321
|
+
if (isArray$1(obj)) {
|
28322
28322
|
if (obj.length === 0) { return '[]'; }
|
28323
28323
|
var xs = arrObjKeys(obj, inspect);
|
28324
28324
|
if (indent && !singleLineValues(xs)) {
|
@@ -28364,19 +28364,19 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
28364
28364
|
if (isWeakRef(obj)) {
|
28365
28365
|
return weakCollectionOf('WeakRef');
|
28366
28366
|
}
|
28367
|
-
if (isNumber(obj)) {
|
28367
|
+
if (isNumber$1(obj)) {
|
28368
28368
|
return markBoxed(inspect(Number(obj)));
|
28369
28369
|
}
|
28370
28370
|
if (isBigInt(obj)) {
|
28371
28371
|
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
28372
28372
|
}
|
28373
|
-
if (isBoolean(obj)) {
|
28373
|
+
if (isBoolean$1(obj)) {
|
28374
28374
|
return markBoxed(booleanValueOf.call(obj));
|
28375
28375
|
}
|
28376
28376
|
if (isString$2(obj)) {
|
28377
28377
|
return markBoxed(inspect(String(obj)));
|
28378
28378
|
}
|
28379
|
-
if (!isDate(obj) && !isRegExp$1(obj)) {
|
28379
|
+
if (!isDate$1(obj) && !isRegExp$1(obj)) {
|
28380
28380
|
var ys = arrObjKeys(obj, inspect);
|
28381
28381
|
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
28382
28382
|
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
@@ -28401,13 +28401,13 @@ function quote(s) {
|
|
28401
28401
|
return $replace$2.call(String(s), /"/g, '"');
|
28402
28402
|
}
|
28403
28403
|
|
28404
|
-
function isArray(obj) { return toStr$3(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
28405
|
-
function isDate(obj) { return toStr$3(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
28404
|
+
function isArray$1(obj) { return toStr$3(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
28405
|
+
function isDate$1(obj) { return toStr$3(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
28406
28406
|
function isRegExp$1(obj) { return toStr$3(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
28407
28407
|
function isError(obj) { return toStr$3(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
28408
28408
|
function isString$2(obj) { return toStr$3(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
28409
|
-
function isNumber(obj) { return toStr$3(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
28410
|
-
function isBoolean(obj) { return toStr$3(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
28409
|
+
function isNumber$1(obj) { return toStr$3(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
28410
|
+
function isBoolean$1(obj) { return toStr$3(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
28411
28411
|
|
28412
28412
|
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
|
28413
28413
|
function isSymbol$1(obj) {
|
@@ -28613,7 +28613,7 @@ function indentedJoin(xs, indent) {
|
|
28613
28613
|
}
|
28614
28614
|
|
28615
28615
|
function arrObjKeys(obj, inspect) {
|
28616
|
-
var isArr = isArray(obj);
|
28616
|
+
var isArr = isArray$1(obj);
|
28617
28617
|
var xs = [];
|
28618
28618
|
if (isArr) {
|
28619
28619
|
xs.length = obj.length;
|
@@ -32547,6 +32547,4016 @@ var jstz_min = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
32547
32547
|
!function(e){var a=function(){"use strict";var e="s",s={DAY:864e5,HOUR:36e5,MINUTE:6e4,SECOND:1e3,BASELINE_YEAR:2014,MAX_SCORE:864e6,AMBIGUITIES:{"America/Denver":["America/Mazatlan"],"America/Chicago":["America/Mexico_City"],"America/Asuncion":["America/Campo_Grande","America/Santiago"],"America/Montevideo":["America/Sao_Paulo","America/Santiago"],"Asia/Beirut":["Asia/Amman","Asia/Jerusalem","Europe/Helsinki","Asia/Damascus","Africa/Cairo","Asia/Gaza","Europe/Minsk","Africa/Windhoek"],"Pacific/Auckland":["Pacific/Fiji"],"America/Los_Angeles":["America/Santa_Isabel"],"America/New_York":["America/Havana"],"America/Halifax":["America/Goose_Bay"],"America/Godthab":["America/Miquelon"],"Asia/Dubai":["Asia/Yerevan"],"Asia/Jakarta":["Asia/Krasnoyarsk"],"Asia/Shanghai":["Asia/Irkutsk","Australia/Perth"],"Australia/Sydney":["Australia/Lord_Howe"],"Asia/Tokyo":["Asia/Yakutsk"],"Asia/Dhaka":["Asia/Omsk"],"Asia/Baku":["Asia/Yerevan"],"Australia/Brisbane":["Asia/Vladivostok"],"Pacific/Noumea":["Asia/Vladivostok"],"Pacific/Majuro":["Asia/Kamchatka","Pacific/Fiji"],"Pacific/Tongatapu":["Pacific/Apia"],"Asia/Baghdad":["Europe/Minsk","Europe/Moscow"],"Asia/Karachi":["Asia/Yekaterinburg"],"Africa/Johannesburg":["Asia/Gaza","Africa/Cairo"]}},i=function(e){var a=-e.getTimezoneOffset();return null!==a?a:0},r=function(){for(var e=[],a=0;a<=11;a++)for(var r=1;r<=28;r++){var n=i(new Date(s.BASELINE_YEAR,a,r));e?e&&e[e.length-1]!==n&&e.push(n):e.push();}return e},n=function(){var a=0,s=r();return s.length>1&&(a=s[0]-s[1]),s.length>3?s[0]+",1,weird":a<0?s[0]+",1":a>0?s[1]+",1,"+e:s[0]+",0"},o=function(){var e,a;if(Intl&&"undefined"!=typeof Intl&&"undefined"!=typeof Intl.DateTimeFormat&&(e=Intl.DateTimeFormat(),"undefined"!=typeof e&&"undefined"!=typeof e.resolvedOptions))return a=e.resolvedOptions().timeZone,a&&(a.indexOf("/")>-1||"UTC"===a)?a:void 0},t=function(e){for(var a=new Date(e,0,1,0,0,1,0).getTime(),s=new Date(e,12,31,23,59,59).getTime(),i=a,r=new Date(i).getTimezoneOffset(),n=null,o=null;i<s-864e5;){var t=new Date(i),A=t.getTimezoneOffset();A!==r&&(A<r&&(n=t),A>r&&(o=t),r=A),i+=864e5;}return !(!n||!o)&&{s:u(n).getTime(),e:u(o).getTime()}},u=function f(e,a,i){"undefined"==typeof a&&(a=s.DAY,i=s.HOUR);for(var r=new Date(e.getTime()-a).getTime(),n=e.getTime()+a,o=new Date(r).getTimezoneOffset(),t=r,u=null;t<n-i;){var A=new Date(t),c=A.getTimezoneOffset();if(c!==o){u=A;break}t+=i;}return a===s.DAY?f(u,s.HOUR,s.MINUTE):a===s.HOUR?f(u,s.MINUTE,s.SECOND):u},A=function(e,a,s,i){if("N/A"!==s)return s;if("Asia/Beirut"===a){if("Africa/Cairo"===i.name&&13983768e5===e[6].s&&14116788e5===e[6].e)return 0;if("Asia/Jerusalem"===i.name&&13959648e5===e[6].s&&14118588e5===e[6].e)return 0}else if("America/Santiago"===a){if("America/Asuncion"===i.name&&14124816e5===e[6].s&&1397358e6===e[6].e)return 0;if("America/Campo_Grande"===i.name&&14136912e5===e[6].s&&13925196e5===e[6].e)return 0}else if("America/Montevideo"===a){if("America/Sao_Paulo"===i.name&&14136876e5===e[6].s&&1392516e6===e[6].e)return 0}else if("Pacific/Auckland"===a&&"Pacific/Fiji"===i.name&&14142456e5===e[6].s&&13961016e5===e[6].e)return 0;return s},c=function(e,i){for(var r=function(a){for(var r=0,n=0;n<e.length;n++)if(a.rules[n]&&e[n]){if(!(e[n].s>=a.rules[n].s&&e[n].e<=a.rules[n].e)){r="N/A";break}if(r=0,r+=Math.abs(e[n].s-a.rules[n].s),r+=Math.abs(a.rules[n].e-e[n].e),r>s.MAX_SCORE){r="N/A";break}}return r=A(e,i,r,a)},n={},o=a.olson.dst_rules.zones,t=o.length,u=s.AMBIGUITIES[i],c=0;c<t;c++){var m=o[c],l=r(o[c]);"N/A"!==l&&(n[m.name]=l);}for(var f in n)if(n.hasOwnProperty(f))for(var d=0;d<u.length;d++)if(u[d]===f)return f;return i},m=function(e){var s=function(){for(var e=[],s=0;s<a.olson.dst_rules.years.length;s++){var i=t(a.olson.dst_rules.years[s]);e.push(i);}return e},i=function(e){for(var a=0;a<e.length;a++)if(e[a]!==!1)return !0;return !1},r=s(),n=i(r);return n?c(r,e):e},l=function(e){var i=!1,t=n();return (e||"undefined"==typeof e)&&(i=o()),i||(i=a.olson.timezones[t],"undefined"!=typeof s.AMBIGUITIES[i]&&(i=m(i))),{name:function(){return i},using_intl:e||"undefined"==typeof e,needle:t,offsets:r()}};return {determine:l}}();a.olson=a.olson||{},a.olson.timezones={"-720,0":"Etc/GMT+12","-660,0":"Pacific/Pago_Pago","-660,1,s":"Pacific/Apia","-600,1":"America/Adak","-600,0":"Pacific/Honolulu","-570,0":"Pacific/Marquesas","-540,0":"Pacific/Gambier","-540,1":"America/Anchorage","-480,1":"America/Los_Angeles","-480,0":"Pacific/Pitcairn","-420,0":"America/Phoenix","-420,1":"America/Denver","-360,0":"America/Guatemala","-360,1":"America/Chicago","-360,1,s":"Pacific/Easter","-300,0":"America/Bogota","-300,1":"America/New_York","-270,0":"America/Caracas","-240,1":"America/Halifax","-240,0":"America/Santo_Domingo","-240,1,s":"America/Asuncion","-210,1":"America/St_Johns","-180,1":"America/Godthab","-180,0":"America/Buenos_Aires","-180,1,s":"America/Montevideo","-120,0":"America/Noronha","-120,1":"America/Noronha","-60,1":"Atlantic/Azores","-60,0":"Atlantic/Cape_Verde","0,0":"UTC","0,1":"Europe/London","0,1,weird":"Africa/Casablanca","60,1":"Europe/Berlin","60,0":"Africa/Lagos","60,1,weird":"Africa/Casablanca","120,1":"Asia/Beirut","120,1,weird":"Africa/Cairo","120,0":"Africa/Johannesburg","180,0":"Asia/Baghdad","180,1":"Europe/Moscow","210,1":"Asia/Tehran","240,0":"Asia/Dubai","240,1":"Asia/Baku","270,0":"Asia/Kabul","300,1":"Asia/Yekaterinburg","300,0":"Asia/Karachi","330,0":"Asia/Calcutta","345,0":"Asia/Katmandu","360,0":"Asia/Dhaka","360,1":"Asia/Omsk","390,0":"Asia/Rangoon","420,1":"Asia/Krasnoyarsk","420,0":"Asia/Jakarta","480,0":"Asia/Shanghai","480,1":"Asia/Irkutsk","525,0":"Australia/Eucla","525,1,s":"Australia/Eucla","540,1":"Asia/Yakutsk","540,0":"Asia/Tokyo","570,0":"Australia/Darwin","570,1,s":"Australia/Adelaide","600,0":"Australia/Brisbane","600,1":"Asia/Vladivostok","600,1,s":"Australia/Sydney","630,1,s":"Australia/Lord_Howe","660,1":"Asia/Kamchatka","660,0":"Pacific/Noumea","690,0":"Pacific/Norfolk","720,1,s":"Pacific/Auckland","720,0":"Pacific/Majuro","765,1,s":"Pacific/Chatham","780,0":"Pacific/Tongatapu","780,1,s":"Pacific/Apia","840,0":"Pacific/Kiritimati"},a.olson.dst_rules={years:[2008,2009,2010,2011,2012,2013,2014],zones:[{name:"Africa/Cairo",rules:[{e:12199572e5,s:12090744e5},{e:1250802e6,s:1240524e6},{e:12858804e5,s:12840696e5},!1,!1,!1,{e:14116788e5,s:1406844e6}]},{name:"America/Asuncion",rules:[{e:12050316e5,s:12243888e5},{e:12364812e5,s:12558384e5},{e:12709548e5,s:12860784e5},{e:13024044e5,s:1317528e6},{e:1333854e6,s:13495824e5},{e:1364094e6,s:1381032e6},{e:13955436e5,s:14124816e5}]},{name:"America/Campo_Grande",rules:[{e:12032172e5,s:12243888e5},{e:12346668e5,s:12558384e5},{e:12667212e5,s:1287288e6},{e:12981708e5,s:13187376e5},{e:13302252e5,s:1350792e6},{e:136107e7,s:13822416e5},{e:13925196e5,s:14136912e5}]},{name:"America/Goose_Bay",rules:[{e:122559486e4,s:120503526e4},{e:125704446e4,s:123648486e4},{e:128909886e4,s:126853926e4},{e:13205556e5,s:129998886e4},{e:13520052e5,s:13314456e5},{e:13834548e5,s:13628952e5},{e:14149044e5,s:13943448e5}]},{name:"America/Havana",rules:[{e:12249972e5,s:12056436e5},{e:12564468e5,s:12364884e5},{e:12885012e5,s:12685428e5},{e:13211604e5,s:13005972e5},{e:13520052e5,s:13332564e5},{e:13834548e5,s:13628916e5},{e:14149044e5,s:13943412e5}]},{name:"America/Mazatlan",rules:[{e:1225008e6,s:12074724e5},{e:12564576e5,s:1238922e6},{e:1288512e6,s:12703716e5},{e:13199616e5,s:13018212e5},{e:13514112e5,s:13332708e5},{e:13828608e5,s:13653252e5},{e:14143104e5,s:13967748e5}]},{name:"America/Mexico_City",rules:[{e:12250044e5,s:12074688e5},{e:1256454e6,s:12389184e5},{e:12885084e5,s:1270368e6},{e:1319958e6,s:13018176e5},{e:13514076e5,s:13332672e5},{e:13828572e5,s:13653216e5},{e:14143068e5,s:13967712e5}]},{name:"America/Miquelon",rules:[{e:12255984e5,s:12050388e5},{e:1257048e6,s:12364884e5},{e:12891024e5,s:12685428e5},{e:1320552e6,s:12999924e5},{e:13520016e5,s:1331442e6},{e:13834512e5,s:13628916e5},{e:14149008e5,s:13943412e5}]},{name:"America/Santa_Isabel",rules:[{e:12250116e5,s:1207476e6},{e:12564612e5,s:12389256e5},{e:12891204e5,s:12685608e5},{e:132057e7,s:13000104e5},{e:13520196e5,s:133146e7},{e:13834692e5,s:13629096e5},{e:14149188e5,s:13943592e5}]},{name:"America/Santiago",rules:[{e:1206846e6,s:1223784e6},{e:1237086e6,s:12552336e5},{e:127035e7,s:12866832e5},{e:13048236e5,s:13138992e5},{e:13356684e5,s:13465584e5},{e:1367118e6,s:13786128e5},{e:13985676e5,s:14100624e5}]},{name:"America/Sao_Paulo",rules:[{e:12032136e5,s:12243852e5},{e:12346632e5,s:12558348e5},{e:12667176e5,s:12872844e5},{e:12981672e5,s:1318734e6},{e:13302216e5,s:13507884e5},{e:13610664e5,s:1382238e6},{e:1392516e6,s:14136876e5}]},{name:"Asia/Amman",rules:[{e:1225404e6,s:12066552e5},{e:12568536e5,s:12381048e5},{e:12883032e5,s:12695544e5},{e:13197528e5,s:13016088e5},!1,!1,{e:14147064e5,s:13959576e5}]},{name:"Asia/Damascus",rules:[{e:12254868e5,s:120726e7},{e:125685e7,s:12381048e5},{e:12882996e5,s:12701592e5},{e:13197492e5,s:13016088e5},{e:13511988e5,s:13330584e5},{e:13826484e5,s:1364508e6},{e:14147028e5,s:13959576e5}]},{name:"Asia/Dubai",rules:[!1,!1,!1,!1,!1,!1,!1]},{name:"Asia/Gaza",rules:[{e:12199572e5,s:12066552e5},{e:12520152e5,s:12381048e5},{e:1281474e6,s:126964086e4},{e:1312146e6,s:130160886e4},{e:13481784e5,s:13330584e5},{e:13802292e5,s:1364508e6},{e:1414098e6,s:13959576e5}]},{name:"Asia/Irkutsk",rules:[{e:12249576e5,s:12068136e5},{e:12564072e5,s:12382632e5},{e:12884616e5,s:12697128e5},!1,!1,!1,!1]},{name:"Asia/Jerusalem",rules:[{e:12231612e5,s:12066624e5},{e:1254006e6,s:1238112e6},{e:1284246e6,s:12695616e5},{e:131751e7,s:1301616e6},{e:13483548e5,s:13330656e5},{e:13828284e5,s:13645152e5},{e:1414278e6,s:13959648e5}]},{name:"Asia/Kamchatka",rules:[{e:12249432e5,s:12067992e5},{e:12563928e5,s:12382488e5},{e:12884508e5,s:12696984e5},!1,!1,!1,!1]},{name:"Asia/Krasnoyarsk",rules:[{e:12249612e5,s:12068172e5},{e:12564108e5,s:12382668e5},{e:12884652e5,s:12697164e5},!1,!1,!1,!1]},{name:"Asia/Omsk",rules:[{e:12249648e5,s:12068208e5},{e:12564144e5,s:12382704e5},{e:12884688e5,s:126972e7},!1,!1,!1,!1]},{name:"Asia/Vladivostok",rules:[{e:12249504e5,s:12068064e5},{e:12564e8,s:1238256e6},{e:12884544e5,s:12697056e5},!1,!1,!1,!1]},{name:"Asia/Yakutsk",rules:[{e:1224954e6,s:120681e7},{e:12564036e5,s:12382596e5},{e:1288458e6,s:12697092e5},!1,!1,!1,!1]},{name:"Asia/Yekaterinburg",rules:[{e:12249684e5,s:12068244e5},{e:1256418e6,s:1238274e6},{e:12884724e5,s:12697236e5},!1,!1,!1,!1]},{name:"Asia/Yerevan",rules:[{e:1224972e6,s:1206828e6},{e:12564216e5,s:12382776e5},{e:1288476e6,s:12697272e5},{e:13199256e5,s:13011768e5},!1,!1,!1]},{name:"Australia/Lord_Howe",rules:[{e:12074076e5,s:12231342e5},{e:12388572e5,s:12545838e5},{e:12703068e5,s:12860334e5},{e:13017564e5,s:1317483e6},{e:1333206e6,s:13495374e5},{e:13652604e5,s:1380987e6},{e:139671e7,s:14124366e5}]},{name:"Australia/Perth",rules:[{e:12068136e5,s:12249576e5},!1,!1,!1,!1,!1,!1]},{name:"Europe/Helsinki",rules:[{e:12249828e5,s:12068388e5},{e:12564324e5,s:12382884e5},{e:12884868e5,s:1269738e6},{e:13199364e5,s:13011876e5},{e:1351386e6,s:13326372e5},{e:13828356e5,s:13646916e5},{e:14142852e5,s:13961412e5}]},{name:"Europe/Minsk",rules:[{e:12249792e5,s:12068352e5},{e:12564288e5,s:12382848e5},{e:12884832e5,s:12697344e5},!1,!1,!1,!1]},{name:"Europe/Moscow",rules:[{e:12249756e5,s:12068316e5},{e:12564252e5,s:12382812e5},{e:12884796e5,s:12697308e5},!1,!1,!1,!1]},{name:"Pacific/Apia",rules:[!1,!1,!1,{e:13017528e5,s:13168728e5},{e:13332024e5,s:13489272e5},{e:13652568e5,s:13803768e5},{e:13967064e5,s:14118264e5}]},{name:"Pacific/Fiji",rules:[!1,!1,{e:12696984e5,s:12878424e5},{e:13271544e5,s:1319292e6},{e:1358604e6,s:13507416e5},{e:139005e7,s:1382796e6},{e:14215032e5,s:14148504e5}]},{name:"Europe/London",rules:[{e:12249828e5,s:12068388e5},{e:12564324e5,s:12382884e5},{e:12884868e5,s:1269738e6},{e:13199364e5,s:13011876e5},{e:1351386e6,s:13326372e5},{e:13828356e5,s:13646916e5},{e:14142852e5,s:13961412e5}]},{name:"Africa/Windhoek",rules:[{e:12207492e5,s:120744e7},{e:12521988e5,s:12388896e5},{e:12836484e5,s:12703392e5},{e:1315098e6,s:13017888e5},{e:13465476e5,s:13332384e5},{e:13779972e5,s:13652928e5},{e:14100516e5,s:13967424e5}]}]},"undefined"!='object'&&"undefined"!='object'?module.exports=a:"undefined"!=typeof undefined&&null!==undefined&&null!=undefined.amd?undefined([],function(){return a}):"undefined"==typeof e?window.jstz=a:e.jstz=a;}();
|
32548
32548
|
});
|
32549
32549
|
|
32550
|
+
const MSEC_IN_HOUR = 60 * 60 * 1000;
|
32551
|
+
|
32552
|
+
//convert our local date syntax a javascript UTC date
|
32553
|
+
const toUtc = (dstChange, offset, year) => {
|
32554
|
+
const [month, rest] = dstChange.split('/');
|
32555
|
+
const [day, hour] = rest.split(':');
|
32556
|
+
return Date.UTC(year, month - 1, day, hour) - offset * MSEC_IN_HOUR
|
32557
|
+
};
|
32558
|
+
|
32559
|
+
// compare epoch with dst change events (in utc)
|
32560
|
+
const inSummerTime = (epoch, start, end, summerOffset, winterOffset) => {
|
32561
|
+
const year = new Date(epoch).getUTCFullYear();
|
32562
|
+
const startUtc = toUtc(start, winterOffset, year);
|
32563
|
+
const endUtc = toUtc(end, summerOffset, year);
|
32564
|
+
// simple number comparison now
|
32565
|
+
return epoch >= startUtc && epoch < endUtc
|
32566
|
+
};
|
32567
|
+
|
32568
|
+
// this method avoids having to do a full dst-calculation on every operation
|
32569
|
+
// it reproduces some things in ./index.js, but speeds up spacetime considerably
|
32570
|
+
const quickOffset = s => {
|
32571
|
+
let zones = s.timezones;
|
32572
|
+
let obj = zones[s.tz];
|
32573
|
+
if (obj === undefined) {
|
32574
|
+
console.warn("Warning: couldn't find timezone " + s.tz);
|
32575
|
+
return 0
|
32576
|
+
}
|
32577
|
+
if (obj.dst === undefined) {
|
32578
|
+
return obj.offset
|
32579
|
+
}
|
32580
|
+
|
32581
|
+
//get our two possible offsets
|
32582
|
+
let jul = obj.offset;
|
32583
|
+
let dec = obj.offset + 1; // assume it's the same for now
|
32584
|
+
if (obj.hem === 'n') {
|
32585
|
+
dec = jul - 1;
|
32586
|
+
}
|
32587
|
+
let split = obj.dst.split('->');
|
32588
|
+
let inSummer = inSummerTime(s.epoch, split[0], split[1], jul, dec);
|
32589
|
+
if (inSummer === true) {
|
32590
|
+
return jul
|
32591
|
+
}
|
32592
|
+
return dec
|
32593
|
+
};
|
32594
|
+
|
32595
|
+
const data = {
|
32596
|
+
"9|s": "2/dili,2/jayapura",
|
32597
|
+
"9|n": "2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,11/palau,japan,rok",
|
32598
|
+
"9.5|s|04/03:03->10/02:02": "4/adelaide,4/broken_hill,4/south,4/yancowinna",
|
32599
|
+
"9.5|s": "4/darwin,4/north",
|
32600
|
+
"8|s|03/13:01->10/02:00": "12/casey",
|
32601
|
+
"8|s": "2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west,singapore",
|
32602
|
+
"8|n": "2/brunei,2/choibalsan,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator,hongkong,prc,roc",
|
32603
|
+
"8.75|s": "4/eucla",
|
32604
|
+
"7|s": "12/davis,2/jakarta,9/christmas",
|
32605
|
+
"7|n": "2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/ho_chi_minh,2/tomsk,2/vientiane,2/saigon",
|
32606
|
+
"6|s": "12/vostok",
|
32607
|
+
"6|n": "2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu",
|
32608
|
+
"6.5|n": "2/yangon,9/cocos,2/rangoon",
|
32609
|
+
"5|s": "12/mawson,9/kerguelen",
|
32610
|
+
"5|n": "2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad",
|
32611
|
+
"5.75|n": "2/kathmandu,2/katmandu",
|
32612
|
+
"5.5|n": "2/kolkata,2/colombo,2/calcutta",
|
32613
|
+
"4|s": "9/reunion",
|
32614
|
+
"4|n": "2/baku,2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,9/mahe,9/mauritius,2/volgograd",
|
32615
|
+
"4.5|n|03/22:00->09/21:24": "2/tehran,iran",
|
32616
|
+
"4.5|n": "2/kabul",
|
32617
|
+
"3|s": "12/syowa,9/antananarivo",
|
32618
|
+
"3|n|03/27:03->10/30:04": "2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kyiv,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,8/kiev",
|
32619
|
+
"3|n|03/27:02->10/30:03": "8/chisinau,8/tiraspol",
|
32620
|
+
"3|n|03/27:00->10/29:24": "2/beirut",
|
32621
|
+
"3|n|03/27:00->10/28:01": "2/gaza,2/hebron",
|
32622
|
+
"3|n|03/25:02->10/30:02": "2/jerusalem,2/tel_aviv,israel",
|
32623
|
+
"3|n|03/25:00->10/27:24": "2/damascus",
|
32624
|
+
"3|n|02/25:00->10/28:01": "2/amman",
|
32625
|
+
"3|n": "0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/baghdad,2/bahrain,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su",
|
32626
|
+
"2|s|03/20:01->10/30:03": "12/troll",
|
32627
|
+
"2|s": "0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane",
|
32628
|
+
"2|n|03/27:02->10/30:03": "0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland",
|
32629
|
+
"2|n": "0/blantyre,0/bujumbura,0/cairo,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,egypt,libya",
|
32630
|
+
"1|s": "0/brazzaville,0/kinshasa,0/luanda,0/windhoek",
|
32631
|
+
"1|n|03/27:03->05/08:02": "0/casablanca,0/el_aaiun",
|
32632
|
+
"1|n|03/27:01->10/30:02": "3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal",
|
32633
|
+
"1|n": "0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis",
|
32634
|
+
"14|n": "11/kiritimati",
|
32635
|
+
"13|s": "11/apia,11/tongatapu",
|
32636
|
+
"13|n": "11/enderbury,11/kanton,11/fakaofo",
|
32637
|
+
"12|s|04/03:03->09/25:02": "12/mcmurdo,11/auckland,12/south_pole,nz",
|
32638
|
+
"12|s|01/17:03->11/14:02": "11/fiji",
|
32639
|
+
"12|n": "2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis,kwajalein",
|
32640
|
+
"12.75|s|04/03:03->09/24:02": "11/chatham,nz-chat",
|
32641
|
+
"11|s|04/03:03->10/02:02": "12/macquarie",
|
32642
|
+
"11|s": "11/bougainville",
|
32643
|
+
"11|n": "2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape",
|
32644
|
+
"11.5|n|04/03:03->10/02:02": "11/norfolk",
|
32645
|
+
"10|s|04/03:03->10/02:02": "4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria",
|
32646
|
+
"10|s": "12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland",
|
32647
|
+
"10|n": "2/ust-nera,2/vladivostok,2/yakutsk,11/guam,11/saipan,11/chuuk,11/truk,11/yap",
|
32648
|
+
"10.5|s|04/03:01->10/02:02": "4/lord_howe,4/lhi",
|
32649
|
+
"0|n|03/27:00->10/30:01": "1/scoresbysund,3/azores",
|
32650
|
+
"0|n": "0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu",
|
32651
|
+
"-9|n|03/13:02->11/06:02": "1/adak,1/atka,us/aleutian",
|
32652
|
+
"-9|n": "11/gambier",
|
32653
|
+
"-9.5|n": "11/marquesas",
|
32654
|
+
"-8|n|03/13:02->11/06:02": "1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska",
|
32655
|
+
"-8|n": "11/pitcairn",
|
32656
|
+
"-7|n|03/13:02->11/06:02": "1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific",
|
32657
|
+
"-7|n": "1/creston,1/dawson,1/dawson_creek,1/fort_nelson,1/hermosillo,1/phoenix,1/whitehorse,6/yukon,us/arizona",
|
32658
|
+
"-6|s|04/02:22->09/10:22": "11/easter,7/easterisland",
|
32659
|
+
"-6|n|04/03:02->10/30:02": "1/chihuahua,1/mazatlan,10/bajasur",
|
32660
|
+
"-6|n|03/13:02->11/06:02": "1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain",
|
32661
|
+
"-6|n": "1/belize,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan",
|
32662
|
+
"-5|s": "1/lima,1/rio_branco,1/porto_acre,5/acre",
|
32663
|
+
"-5|n|04/03:02->10/30:02": "1/bahia_banderas,1/merida,1/mexico_city,1/monterrey,10/general",
|
32664
|
+
"-5|n|03/13:02->11/06:02": "1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke",
|
32665
|
+
"-5|n": "1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan,jamaica",
|
32666
|
+
"-4|s|04/02:24->09/11:00": "1/santiago,7/continental",
|
32667
|
+
"-4|s|03/26:24->10/02:00": "1/asuncion",
|
32668
|
+
"-4|s": "1/campo_grande,1/cuiaba,1/la_paz,1/manaus,5/west",
|
32669
|
+
"-4|n|03/13:02->11/06:02": "1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan",
|
32670
|
+
"-4|n|03/13:00->11/06:01": "1/havana,cuba",
|
32671
|
+
"-4|n": "1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin",
|
32672
|
+
"-3|s": "1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/palmer,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/comodrivadavia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/argentina/rosario,1/rosario,5/east",
|
32673
|
+
"-3|n|03/13:02->11/06:02": "1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic",
|
32674
|
+
"-3|n": "1/araguaina,1/bahia,1/belem,1/cayenne,1/maceio,1/paramaribo,1/recife,1/santarem",
|
32675
|
+
"-2|n|03/26:22->10/29:23": "1/nuuk,1/godthab",
|
32676
|
+
"-2|n|03/13:02->11/06:02": "1/miquelon",
|
32677
|
+
"-2|n": "1/noronha,3/south_georgia,5/denoronha",
|
32678
|
+
"-2.5|n|03/13:02->11/06:02": "1/st_johns,6/newfoundland",
|
32679
|
+
"-1|n": "3/cape_verde",
|
32680
|
+
"-11|n": "11/midway,11/niue,11/pago_pago,11/samoa,us/samoa",
|
32681
|
+
"-10|n": "11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii"
|
32682
|
+
};
|
32683
|
+
|
32684
|
+
//prefixes for iana names..
|
32685
|
+
const prefixes = [
|
32686
|
+
'africa',
|
32687
|
+
'america',
|
32688
|
+
'asia',
|
32689
|
+
'atlantic',
|
32690
|
+
'australia',
|
32691
|
+
'brazil',
|
32692
|
+
'canada',
|
32693
|
+
'chile',
|
32694
|
+
'europe',
|
32695
|
+
'indian',
|
32696
|
+
'mexico',
|
32697
|
+
'pacific',
|
32698
|
+
'antarctica',
|
32699
|
+
'etc'
|
32700
|
+
];
|
32701
|
+
|
32702
|
+
let all = {};
|
32703
|
+
Object.keys(data).forEach((k) => {
|
32704
|
+
let split = k.split('|');
|
32705
|
+
let obj = {
|
32706
|
+
offset: Number(split[0]),
|
32707
|
+
hem: split[1]
|
32708
|
+
};
|
32709
|
+
if (split[2]) {
|
32710
|
+
obj.dst = split[2];
|
32711
|
+
}
|
32712
|
+
let names = data[k].split(',');
|
32713
|
+
names.forEach((str) => {
|
32714
|
+
str = str.replace(/(^[0-9]+)\//, (before, num) => {
|
32715
|
+
num = Number(num);
|
32716
|
+
return prefixes[num] + '/'
|
32717
|
+
});
|
32718
|
+
all[str] = obj;
|
32719
|
+
});
|
32720
|
+
});
|
32721
|
+
|
32722
|
+
all.utc = {
|
32723
|
+
offset: 0,
|
32724
|
+
hem: 'n' //default to northern hemisphere - (sorry!)
|
32725
|
+
};
|
32726
|
+
|
32727
|
+
//add etc/gmt+n
|
32728
|
+
for (let i = -14; i <= 14; i += 0.5) {
|
32729
|
+
let num = i;
|
32730
|
+
if (num > 0) {
|
32731
|
+
num = '+' + num;
|
32732
|
+
}
|
32733
|
+
let name = 'etc/gmt' + num;
|
32734
|
+
all[name] = {
|
32735
|
+
offset: i * -1, //they're negative!
|
32736
|
+
hem: 'n' //(sorry)
|
32737
|
+
};
|
32738
|
+
name = 'utc/gmt' + num; //this one too, why not.
|
32739
|
+
all[name] = {
|
32740
|
+
offset: i * -1,
|
32741
|
+
hem: 'n'
|
32742
|
+
};
|
32743
|
+
}
|
32744
|
+
|
32745
|
+
//find the implicit iana code for this machine.
|
32746
|
+
//safely query the Intl object
|
32747
|
+
//based on - https://bitbucket.org/pellepim/jstimezonedetect/src
|
32748
|
+
const fallbackTZ = 'utc'; //
|
32749
|
+
|
32750
|
+
//this Intl object is not supported often, yet
|
32751
|
+
const safeIntl = () => {
|
32752
|
+
if (typeof Intl === 'undefined' || typeof Intl.DateTimeFormat === 'undefined') {
|
32753
|
+
return null
|
32754
|
+
}
|
32755
|
+
let format = Intl.DateTimeFormat();
|
32756
|
+
if (typeof format === 'undefined' || typeof format.resolvedOptions === 'undefined') {
|
32757
|
+
return null
|
32758
|
+
}
|
32759
|
+
let timezone = format.resolvedOptions().timeZone;
|
32760
|
+
if (!timezone) {
|
32761
|
+
return null
|
32762
|
+
}
|
32763
|
+
return timezone.toLowerCase()
|
32764
|
+
};
|
32765
|
+
|
32766
|
+
const guessTz = () => {
|
32767
|
+
let timezone = safeIntl();
|
32768
|
+
if (timezone === null) {
|
32769
|
+
return fallbackTZ
|
32770
|
+
}
|
32771
|
+
return timezone
|
32772
|
+
};
|
32773
|
+
|
32774
|
+
const isOffset = /(\-?[0-9]+)h(rs)?/i;
|
32775
|
+
const isNumber = /(\-?[0-9]+)/;
|
32776
|
+
const utcOffset = /utc([\-+]?[0-9]+)/i;
|
32777
|
+
const gmtOffset = /gmt([\-+]?[0-9]+)/i;
|
32778
|
+
|
32779
|
+
const toIana = function (num) {
|
32780
|
+
num = Number(num);
|
32781
|
+
if (num >= -13 && num <= 13) {
|
32782
|
+
num = num * -1; //it's opposite!
|
32783
|
+
num = (num > 0 ? '+' : '') + num; //add plus sign
|
32784
|
+
return 'etc/gmt' + num
|
32785
|
+
}
|
32786
|
+
return null
|
32787
|
+
};
|
32788
|
+
|
32789
|
+
const parseOffset$1 = function (tz) {
|
32790
|
+
// '+5hrs'
|
32791
|
+
let m = tz.match(isOffset);
|
32792
|
+
if (m !== null) {
|
32793
|
+
return toIana(m[1])
|
32794
|
+
}
|
32795
|
+
// 'utc+5'
|
32796
|
+
m = tz.match(utcOffset);
|
32797
|
+
if (m !== null) {
|
32798
|
+
return toIana(m[1])
|
32799
|
+
}
|
32800
|
+
// 'GMT-5' (not opposite)
|
32801
|
+
m = tz.match(gmtOffset);
|
32802
|
+
if (m !== null) {
|
32803
|
+
let num = Number(m[1]) * -1;
|
32804
|
+
return toIana(num)
|
32805
|
+
}
|
32806
|
+
// '+5'
|
32807
|
+
m = tz.match(isNumber);
|
32808
|
+
if (m !== null) {
|
32809
|
+
return toIana(m[1])
|
32810
|
+
}
|
32811
|
+
return null
|
32812
|
+
};
|
32813
|
+
|
32814
|
+
const local = guessTz();
|
32815
|
+
|
32816
|
+
//add all the city names by themselves
|
32817
|
+
const cities = Object.keys(all).reduce((h, k) => {
|
32818
|
+
let city = k.split('/')[1] || '';
|
32819
|
+
city = city.replace(/_/g, ' ');
|
32820
|
+
h[city] = k;
|
32821
|
+
return h
|
32822
|
+
}, {});
|
32823
|
+
|
32824
|
+
//try to match these against iana form
|
32825
|
+
const normalize$3 = (tz) => {
|
32826
|
+
tz = tz.replace(/ time/g, '');
|
32827
|
+
tz = tz.replace(/ (standard|daylight|summer)/g, '');
|
32828
|
+
tz = tz.replace(/\b(east|west|north|south)ern/g, '$1');
|
32829
|
+
tz = tz.replace(/\b(africa|america|australia)n/g, '$1');
|
32830
|
+
tz = tz.replace(/\beuropean/g, 'europe');
|
32831
|
+
tz = tz.replace(/\islands/g, 'island');
|
32832
|
+
return tz
|
32833
|
+
};
|
32834
|
+
|
32835
|
+
// try our best to reconcile the timzone to this given string
|
32836
|
+
const lookupTz = (str, zones) => {
|
32837
|
+
if (!str) {
|
32838
|
+
return local
|
32839
|
+
}
|
32840
|
+
if (typeof str !== 'string') {
|
32841
|
+
console.error("Timezone must be a string - recieved: '", str, "'\n");
|
32842
|
+
}
|
32843
|
+
let tz = str.trim();
|
32844
|
+
// let split = str.split('/')
|
32845
|
+
//support long timezones like 'America/Argentina/Rio_Gallegos'
|
32846
|
+
// if (split.length > 2 && zones.hasOwnProperty(tz) === false) {
|
32847
|
+
// tz = split[0] + '/' + split[1]
|
32848
|
+
// }
|
32849
|
+
tz = tz.toLowerCase();
|
32850
|
+
if (zones.hasOwnProperty(tz) === true) {
|
32851
|
+
return tz
|
32852
|
+
}
|
32853
|
+
//lookup more loosely..
|
32854
|
+
tz = normalize$3(tz);
|
32855
|
+
if (zones.hasOwnProperty(tz) === true) {
|
32856
|
+
return tz
|
32857
|
+
}
|
32858
|
+
//try city-names
|
32859
|
+
if (cities.hasOwnProperty(tz) === true) {
|
32860
|
+
return cities[tz]
|
32861
|
+
}
|
32862
|
+
// //try to parse '-5h'
|
32863
|
+
if (/[0-9]/.test(tz) === true) {
|
32864
|
+
let id = parseOffset$1(tz);
|
32865
|
+
if (id) {
|
32866
|
+
return id
|
32867
|
+
}
|
32868
|
+
}
|
32869
|
+
|
32870
|
+
throw new Error(
|
32871
|
+
"Spacetime: Cannot find timezone named: '" + str + "'. Please enter an IANA timezone id."
|
32872
|
+
)
|
32873
|
+
};
|
32874
|
+
|
32875
|
+
//git:blame @JuliasCaesar https://www.timeanddate.com/date/leapyear.html
|
32876
|
+
function isLeapYear(year) { return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0 }
|
32877
|
+
// unsurprisingly-nasty `typeof date` call
|
32878
|
+
function isDate(d) { return Object.prototype.toString.call(d) === '[object Date]' && !isNaN(d.valueOf()) }
|
32879
|
+
function isArray(input) { return Object.prototype.toString.call(input) === '[object Array]' }
|
32880
|
+
function isObject$1(input) { return Object.prototype.toString.call(input) === '[object Object]' }
|
32881
|
+
function isBoolean(input) { return Object.prototype.toString.call(input) === '[object Boolean]' }
|
32882
|
+
|
32883
|
+
function zeroPad(str, len = 2) {
|
32884
|
+
let pad = '0';
|
32885
|
+
str = str + '';
|
32886
|
+
return str.length >= len ? str : new Array(len - str.length + 1).join(pad) + str
|
32887
|
+
}
|
32888
|
+
|
32889
|
+
function titleCase$1(str) {
|
32890
|
+
if (!str) {
|
32891
|
+
return ''
|
32892
|
+
}
|
32893
|
+
return str[0].toUpperCase() + str.substr(1)
|
32894
|
+
}
|
32895
|
+
|
32896
|
+
function ordinal(i) {
|
32897
|
+
let j = i % 10;
|
32898
|
+
let k = i % 100;
|
32899
|
+
if (j === 1 && k !== 11) {
|
32900
|
+
return i + 'st'
|
32901
|
+
}
|
32902
|
+
if (j === 2 && k !== 12) {
|
32903
|
+
return i + 'nd'
|
32904
|
+
}
|
32905
|
+
if (j === 3 && k !== 13) {
|
32906
|
+
return i + 'rd'
|
32907
|
+
}
|
32908
|
+
return i + 'th'
|
32909
|
+
}
|
32910
|
+
|
32911
|
+
//strip 'st' off '1st'..
|
32912
|
+
function toCardinal(str) {
|
32913
|
+
str = String(str);
|
32914
|
+
str = str.replace(/([0-9])(st|nd|rd|th)$/i, '$1');
|
32915
|
+
return parseInt(str, 10)
|
32916
|
+
}
|
32917
|
+
|
32918
|
+
//used mostly for cleanup of unit names, like 'months'
|
32919
|
+
function normalize$2(str = '') {
|
32920
|
+
str = str.toLowerCase().trim();
|
32921
|
+
str = str.replace(/ies$/, 'y'); //'centuries'
|
32922
|
+
str = str.replace(/s$/, '');
|
32923
|
+
str = str.replace(/-/g, '');
|
32924
|
+
if (str === 'day' || str === 'days') {
|
32925
|
+
return 'date'
|
32926
|
+
}
|
32927
|
+
if (str === 'min' || str === 'mins') {
|
32928
|
+
return 'minute'
|
32929
|
+
}
|
32930
|
+
return str
|
32931
|
+
}
|
32932
|
+
|
32933
|
+
function getEpoch(tmp) {
|
32934
|
+
//support epoch
|
32935
|
+
if (typeof tmp === 'number') {
|
32936
|
+
return tmp
|
32937
|
+
}
|
32938
|
+
//suport date objects
|
32939
|
+
if (isDate(tmp)) {
|
32940
|
+
return tmp.getTime()
|
32941
|
+
}
|
32942
|
+
if (tmp.epoch) {
|
32943
|
+
return tmp.epoch
|
32944
|
+
}
|
32945
|
+
return null
|
32946
|
+
}
|
32947
|
+
|
32948
|
+
//make sure this input is a spacetime obj
|
32949
|
+
function beADate(d, s) {
|
32950
|
+
if (isObject$1(d) === false) {
|
32951
|
+
return s.clone().set(d)
|
32952
|
+
}
|
32953
|
+
return d
|
32954
|
+
}
|
32955
|
+
|
32956
|
+
function formatTimezone(offset, delimiter = '') {
|
32957
|
+
const sign = offset > 0 ? '+' : '-';
|
32958
|
+
const absOffset = Math.abs(offset);
|
32959
|
+
const hours = zeroPad(parseInt('' + absOffset, 10));
|
32960
|
+
const minutes = zeroPad((absOffset % 1) * 60);
|
32961
|
+
return `${sign}${hours}${delimiter}${minutes}`
|
32962
|
+
}
|
32963
|
+
|
32964
|
+
const defaults$1 = {
|
32965
|
+
year: new Date().getFullYear(),
|
32966
|
+
month: 0,
|
32967
|
+
date: 1
|
32968
|
+
};
|
32969
|
+
|
32970
|
+
//support [2016, 03, 01] format
|
32971
|
+
const parseArray$1 = (s, arr, today) => {
|
32972
|
+
if (arr.length === 0) {
|
32973
|
+
return s
|
32974
|
+
}
|
32975
|
+
let order = ['year', 'month', 'date', 'hour', 'minute', 'second', 'millisecond'];
|
32976
|
+
for (let i = 0; i < order.length; i++) {
|
32977
|
+
let num = arr[i] || today[order[i]] || defaults$1[order[i]] || 0;
|
32978
|
+
s = s[order[i]](num);
|
32979
|
+
}
|
32980
|
+
return s
|
32981
|
+
};
|
32982
|
+
|
32983
|
+
//support {year:2016, month:3} format
|
32984
|
+
const parseObject$1 = (s, obj, today) => {
|
32985
|
+
// if obj is empty, do nothing
|
32986
|
+
if (Object.keys(obj).length === 0) {
|
32987
|
+
return s
|
32988
|
+
}
|
32989
|
+
obj = Object.assign({}, defaults$1, today, obj);
|
32990
|
+
let keys = Object.keys(obj);
|
32991
|
+
for (let i = 0; i < keys.length; i++) {
|
32992
|
+
let unit = keys[i];
|
32993
|
+
//make sure we have this method
|
32994
|
+
if (s[unit] === undefined || typeof s[unit] !== 'function') {
|
32995
|
+
continue
|
32996
|
+
}
|
32997
|
+
//make sure the value is a number
|
32998
|
+
if (obj[unit] === null || obj[unit] === undefined || obj[unit] === '') {
|
32999
|
+
continue
|
33000
|
+
}
|
33001
|
+
let num = obj[unit] || today[unit] || defaults$1[unit] || 0;
|
33002
|
+
s = s[unit](num);
|
33003
|
+
}
|
33004
|
+
return s
|
33005
|
+
};
|
33006
|
+
|
33007
|
+
// this may seem like an arbitrary number, but it's 'within jan 1970'
|
33008
|
+
// this is only really ambiguous until 2054 or so
|
33009
|
+
const parseNumber$1 = function (s, input) {
|
33010
|
+
const minimumEpoch = 2500000000;
|
33011
|
+
// if the given epoch is really small, they've probably given seconds and not milliseconds
|
33012
|
+
// anything below this number is likely (but not necessarily) a mistaken input.
|
33013
|
+
if (input > 0 && input < minimumEpoch && s.silent === false) {
|
33014
|
+
console.warn(' - Warning: You are setting the date to January 1970.');
|
33015
|
+
console.warn(' - did input seconds instead of milliseconds?');
|
33016
|
+
}
|
33017
|
+
s.epoch = input;
|
33018
|
+
return s
|
33019
|
+
};
|
33020
|
+
|
33021
|
+
const fns = {
|
33022
|
+
parseArray: parseArray$1,
|
33023
|
+
parseObject: parseObject$1,
|
33024
|
+
parseNumber: parseNumber$1
|
33025
|
+
};
|
33026
|
+
|
33027
|
+
// pull in 'today' data for the baseline moment
|
33028
|
+
const getNow = function (s) {
|
33029
|
+
s.epoch = Date.now();
|
33030
|
+
Object.keys(s._today || {}).forEach((k) => {
|
33031
|
+
if (typeof s[k] === 'function') {
|
33032
|
+
s = s[k](s._today[k]);
|
33033
|
+
}
|
33034
|
+
});
|
33035
|
+
return s
|
33036
|
+
};
|
33037
|
+
|
33038
|
+
const dates = {
|
33039
|
+
now: (s) => {
|
33040
|
+
return getNow(s)
|
33041
|
+
},
|
33042
|
+
today: (s) => {
|
33043
|
+
return getNow(s)
|
33044
|
+
},
|
33045
|
+
tonight: (s) => {
|
33046
|
+
s = getNow(s);
|
33047
|
+
s = s.hour(18); //6pm
|
33048
|
+
return s
|
33049
|
+
},
|
33050
|
+
tomorrow: (s) => {
|
33051
|
+
s = getNow(s);
|
33052
|
+
s = s.add(1, 'day');
|
33053
|
+
s = s.startOf('day');
|
33054
|
+
return s
|
33055
|
+
},
|
33056
|
+
yesterday: (s) => {
|
33057
|
+
s = getNow(s);
|
33058
|
+
s = s.subtract(1, 'day');
|
33059
|
+
s = s.startOf('day');
|
33060
|
+
return s
|
33061
|
+
},
|
33062
|
+
christmas: (s) => {
|
33063
|
+
let year = getNow(s).year();
|
33064
|
+
s = s.set([year, 11, 25, 18, 0, 0]); // Dec 25
|
33065
|
+
return s
|
33066
|
+
},
|
33067
|
+
'new years': (s) => {
|
33068
|
+
let year = getNow(s).year();
|
33069
|
+
s = s.set([year, 11, 31, 18, 0, 0]); // Dec 31
|
33070
|
+
return s
|
33071
|
+
}
|
33072
|
+
};
|
33073
|
+
dates['new years eve'] = dates['new years'];
|
33074
|
+
|
33075
|
+
//little cleanup..
|
33076
|
+
const normalize$1 = function (str) {
|
33077
|
+
// remove all day-names
|
33078
|
+
str = str.replace(/\b(mon|tues?|wed|wednes|thur?s?|fri|sat|satur|sun)(day)?\b/i, '');
|
33079
|
+
//remove ordinal ending
|
33080
|
+
str = str.replace(/([0-9])(th|rd|st|nd)/, '$1');
|
33081
|
+
str = str.replace(/,/g, '');
|
33082
|
+
str = str.replace(/ +/g, ' ').trim();
|
33083
|
+
return str
|
33084
|
+
};
|
33085
|
+
|
33086
|
+
let o = {
|
33087
|
+
millisecond: 1
|
33088
|
+
};
|
33089
|
+
o.second = 1000;
|
33090
|
+
o.minute = 60000;
|
33091
|
+
o.hour = 3.6e6; // dst is supported post-hoc
|
33092
|
+
o.day = 8.64e7; //
|
33093
|
+
o.date = o.day;
|
33094
|
+
o.month = 8.64e7 * 29.5; //(average)
|
33095
|
+
o.week = 6.048e8;
|
33096
|
+
o.year = 3.154e10; // leap-years are supported post-hoc
|
33097
|
+
//add plurals
|
33098
|
+
Object.keys(o).forEach(k => {
|
33099
|
+
o[k + 's'] = o[k];
|
33100
|
+
});
|
33101
|
+
|
33102
|
+
//basically, step-forward/backward until js Date object says we're there.
|
33103
|
+
const walk = (s, n, fn, unit, previous) => {
|
33104
|
+
let current = s.d[fn]();
|
33105
|
+
if (current === n) {
|
33106
|
+
return //already there
|
33107
|
+
}
|
33108
|
+
let startUnit = previous === null ? null : s.d[previous]();
|
33109
|
+
let original = s.epoch;
|
33110
|
+
//try to get it as close as we can
|
33111
|
+
let diff = n - current;
|
33112
|
+
s.epoch += o[unit] * diff;
|
33113
|
+
//DST edge-case: if we are going many days, be a little conservative
|
33114
|
+
// console.log(unit, diff)
|
33115
|
+
if (unit === 'day') {
|
33116
|
+
// s.epoch -= ms.minute
|
33117
|
+
//but don't push it over a month
|
33118
|
+
if (Math.abs(diff) > 28 && n < 28) {
|
33119
|
+
s.epoch += o.hour;
|
33120
|
+
}
|
33121
|
+
}
|
33122
|
+
// 1st time: oops, did we change previous unit? revert it.
|
33123
|
+
if (previous !== null && startUnit !== s.d[previous]()) {
|
33124
|
+
// console.warn('spacetime warning: missed setting ' + unit)
|
33125
|
+
s.epoch = original;
|
33126
|
+
// s.epoch += ms[unit] * diff * 0.89 // maybe try and make it close...?
|
33127
|
+
}
|
33128
|
+
//repair it if we've gone too far or something
|
33129
|
+
//(go by half-steps, just in case)
|
33130
|
+
const halfStep = o[unit] / 2;
|
33131
|
+
while (s.d[fn]() < n) {
|
33132
|
+
s.epoch += halfStep;
|
33133
|
+
}
|
33134
|
+
|
33135
|
+
while (s.d[fn]() > n) {
|
33136
|
+
s.epoch -= halfStep;
|
33137
|
+
}
|
33138
|
+
// 2nd time: did we change previous unit? revert it.
|
33139
|
+
if (previous !== null && startUnit !== s.d[previous]()) {
|
33140
|
+
// console.warn('spacetime warning: missed setting ' + unit)
|
33141
|
+
s.epoch = original;
|
33142
|
+
}
|
33143
|
+
};
|
33144
|
+
//find the desired date by a increment/check while loop
|
33145
|
+
const units$3 = {
|
33146
|
+
year: {
|
33147
|
+
valid: (n) => n > -4000 && n < 4000,
|
33148
|
+
walkTo: (s, n) => walk(s, n, 'getFullYear', 'year', null)
|
33149
|
+
},
|
33150
|
+
month: {
|
33151
|
+
valid: (n) => n >= 0 && n <= 11,
|
33152
|
+
walkTo: (s, n) => {
|
33153
|
+
let d = s.d;
|
33154
|
+
let current = d.getMonth();
|
33155
|
+
let original = s.epoch;
|
33156
|
+
let startUnit = d.getFullYear();
|
33157
|
+
if (current === n) {
|
33158
|
+
return
|
33159
|
+
}
|
33160
|
+
//try to get it as close as we can..
|
33161
|
+
let diff = n - current;
|
33162
|
+
s.epoch += o.day * (diff * 28); //special case
|
33163
|
+
//oops, did we change the year? revert it.
|
33164
|
+
if (startUnit !== s.d.getFullYear()) {
|
33165
|
+
s.epoch = original;
|
33166
|
+
}
|
33167
|
+
//increment by day
|
33168
|
+
while (s.d.getMonth() < n) {
|
33169
|
+
s.epoch += o.day;
|
33170
|
+
}
|
33171
|
+
while (s.d.getMonth() > n) {
|
33172
|
+
s.epoch -= o.day;
|
33173
|
+
}
|
33174
|
+
}
|
33175
|
+
},
|
33176
|
+
date: {
|
33177
|
+
valid: (n) => n > 0 && n <= 31,
|
33178
|
+
walkTo: (s, n) => walk(s, n, 'getDate', 'day', 'getMonth')
|
33179
|
+
},
|
33180
|
+
hour: {
|
33181
|
+
valid: (n) => n >= 0 && n < 24,
|
33182
|
+
walkTo: (s, n) => walk(s, n, 'getHours', 'hour', 'getDate')
|
33183
|
+
},
|
33184
|
+
minute: {
|
33185
|
+
valid: (n) => n >= 0 && n < 60,
|
33186
|
+
walkTo: (s, n) => walk(s, n, 'getMinutes', 'minute', 'getHours')
|
33187
|
+
},
|
33188
|
+
second: {
|
33189
|
+
valid: (n) => n >= 0 && n < 60,
|
33190
|
+
walkTo: (s, n) => {
|
33191
|
+
//do this one directly
|
33192
|
+
s.epoch = s.seconds(n).epoch;
|
33193
|
+
}
|
33194
|
+
},
|
33195
|
+
millisecond: {
|
33196
|
+
valid: (n) => n >= 0 && n < 1000,
|
33197
|
+
walkTo: (s, n) => {
|
33198
|
+
//do this one directly
|
33199
|
+
s.epoch = s.milliseconds(n).epoch;
|
33200
|
+
}
|
33201
|
+
}
|
33202
|
+
};
|
33203
|
+
|
33204
|
+
const walkTo = (s, wants) => {
|
33205
|
+
let keys = Object.keys(units$3);
|
33206
|
+
let old = s.clone();
|
33207
|
+
for (let i = 0; i < keys.length; i++) {
|
33208
|
+
let k = keys[i];
|
33209
|
+
let n = wants[k];
|
33210
|
+
if (n === undefined) {
|
33211
|
+
n = old[k]();
|
33212
|
+
}
|
33213
|
+
if (typeof n === 'string') {
|
33214
|
+
n = parseInt(n, 10);
|
33215
|
+
}
|
33216
|
+
//make-sure it's valid
|
33217
|
+
if (!units$3[k].valid(n)) {
|
33218
|
+
s.epoch = null;
|
33219
|
+
if (s.silent === false) {
|
33220
|
+
console.warn('invalid ' + k + ': ' + n);
|
33221
|
+
}
|
33222
|
+
return
|
33223
|
+
}
|
33224
|
+
units$3[k].walkTo(s, n);
|
33225
|
+
}
|
33226
|
+
return
|
33227
|
+
};
|
33228
|
+
|
33229
|
+
const monthLengths = [
|
33230
|
+
31, // January - 31 days
|
33231
|
+
28, // February - 28 days in a common year and 29 days in leap years
|
33232
|
+
31, // March - 31 days
|
33233
|
+
30, // April - 30 days
|
33234
|
+
31, // May - 31 days
|
33235
|
+
30, // June - 30 days
|
33236
|
+
31, // July - 31 days
|
33237
|
+
31, // August - 31 days
|
33238
|
+
30, // September - 30 days
|
33239
|
+
31, // October - 31 days
|
33240
|
+
30, // November - 30 days
|
33241
|
+
31 // December - 31 days
|
33242
|
+
];
|
33243
|
+
|
33244
|
+
// 28 - feb
|
33245
|
+
// 30 - april, june, sept, nov
|
33246
|
+
// 31 - jan, march, may, july, aug, oct, dec
|
33247
|
+
|
33248
|
+
let shortMonths = [
|
33249
|
+
'jan',
|
33250
|
+
'feb',
|
33251
|
+
'mar',
|
33252
|
+
'apr',
|
33253
|
+
'may',
|
33254
|
+
'jun',
|
33255
|
+
'jul',
|
33256
|
+
'aug',
|
33257
|
+
'sep',
|
33258
|
+
'oct',
|
33259
|
+
'nov',
|
33260
|
+
'dec'
|
33261
|
+
];
|
33262
|
+
let longMonths = [
|
33263
|
+
'january',
|
33264
|
+
'february',
|
33265
|
+
'march',
|
33266
|
+
'april',
|
33267
|
+
'may',
|
33268
|
+
'june',
|
33269
|
+
'july',
|
33270
|
+
'august',
|
33271
|
+
'september',
|
33272
|
+
'october',
|
33273
|
+
'november',
|
33274
|
+
'december'
|
33275
|
+
];
|
33276
|
+
|
33277
|
+
function buildMapping() {
|
33278
|
+
const obj = {
|
33279
|
+
sep: 8 //support this format
|
33280
|
+
};
|
33281
|
+
for (let i = 0; i < shortMonths.length; i++) {
|
33282
|
+
obj[shortMonths[i]] = i;
|
33283
|
+
}
|
33284
|
+
for (let i = 0; i < longMonths.length; i++) {
|
33285
|
+
obj[longMonths[i]] = i;
|
33286
|
+
}
|
33287
|
+
return obj
|
33288
|
+
}
|
33289
|
+
|
33290
|
+
function short$1() { return shortMonths }
|
33291
|
+
function long$1() { return longMonths }
|
33292
|
+
function mapping$1() { return buildMapping() }
|
33293
|
+
function set$3(i18n) {
|
33294
|
+
shortMonths = i18n.short || shortMonths;
|
33295
|
+
longMonths = i18n.long || longMonths;
|
33296
|
+
}
|
33297
|
+
|
33298
|
+
//pull-apart ISO offsets, like "+0100"
|
33299
|
+
const parseOffset = (s, offset) => {
|
33300
|
+
if (!offset) {
|
33301
|
+
return s
|
33302
|
+
}
|
33303
|
+
|
33304
|
+
// according to ISO8601, tz could be hh:mm, hhmm or hh
|
33305
|
+
// so need few more steps before the calculation.
|
33306
|
+
let num = 0;
|
33307
|
+
|
33308
|
+
// for (+-)hh:mm
|
33309
|
+
if (/^[\+-]?[0-9]{2}:[0-9]{2}$/.test(offset)) {
|
33310
|
+
//support "+01:00"
|
33311
|
+
if (/:00/.test(offset) === true) {
|
33312
|
+
offset = offset.replace(/:00/, '');
|
33313
|
+
}
|
33314
|
+
//support "+01:30"
|
33315
|
+
if (/:30/.test(offset) === true) {
|
33316
|
+
offset = offset.replace(/:30/, '.5');
|
33317
|
+
}
|
33318
|
+
}
|
33319
|
+
|
33320
|
+
// for (+-)hhmm
|
33321
|
+
if (/^[\+-]?[0-9]{4}$/.test(offset)) {
|
33322
|
+
offset = offset.replace(/30$/, '.5');
|
33323
|
+
}
|
33324
|
+
num = parseFloat(offset);
|
33325
|
+
|
33326
|
+
//divide by 100 or 10 - , "+0100", "+01"
|
33327
|
+
if (Math.abs(num) > 100) {
|
33328
|
+
num = num / 100;
|
33329
|
+
}
|
33330
|
+
//this is a fancy-move
|
33331
|
+
if (num === 0 || offset === 'Z' || offset === 'z') {
|
33332
|
+
s.tz = 'etc/gmt';
|
33333
|
+
return s
|
33334
|
+
}
|
33335
|
+
//okay, try to match it to a utc timezone
|
33336
|
+
//remember - this is opposite! a -5 offset maps to Etc/GMT+5 ¯\_(:/)_/¯
|
33337
|
+
//https://askubuntu.com/questions/519550/why-is-the-8-timezone-called-gmt-8-in-the-filesystem
|
33338
|
+
num *= -1;
|
33339
|
+
|
33340
|
+
if (num >= 0) {
|
33341
|
+
num = '+' + num;
|
33342
|
+
}
|
33343
|
+
let tz = 'etc/gmt' + num;
|
33344
|
+
let zones = s.timezones;
|
33345
|
+
|
33346
|
+
if (zones[tz]) {
|
33347
|
+
// log a warning if we're over-writing a given timezone?
|
33348
|
+
// console.log('changing timezone to: ' + tz)
|
33349
|
+
s.tz = tz;
|
33350
|
+
}
|
33351
|
+
return s
|
33352
|
+
};
|
33353
|
+
|
33354
|
+
// truncate any sub-millisecond values
|
33355
|
+
const parseMs = function (str = '') {
|
33356
|
+
str = String(str);
|
33357
|
+
//js does not support sub-millisecond values
|
33358
|
+
// so truncate these - 2021-11-02T19:55:30.087772
|
33359
|
+
if (str.length > 3) {
|
33360
|
+
str = str.substr(0, 3);
|
33361
|
+
} else if (str.length === 1) {
|
33362
|
+
// assume ms are zero-padded on the left
|
33363
|
+
// but maybe not on the right.
|
33364
|
+
// turn '.10' into '.100'
|
33365
|
+
str = str + '00';
|
33366
|
+
} else if (str.length === 2) {
|
33367
|
+
str = str + '0';
|
33368
|
+
}
|
33369
|
+
return Number(str) || 0
|
33370
|
+
};
|
33371
|
+
|
33372
|
+
const parseTime = (s, str = '') => {
|
33373
|
+
// remove all whitespace
|
33374
|
+
str = str.replace(/^\s+/, '').toLowerCase();
|
33375
|
+
//formal time format - 04:30.23
|
33376
|
+
let arr = str.match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);
|
33377
|
+
if (arr !== null) {
|
33378
|
+
//validate it a little
|
33379
|
+
let h = Number(arr[1]);
|
33380
|
+
if (h < 0 || h > 24) {
|
33381
|
+
return s.startOf('day')
|
33382
|
+
}
|
33383
|
+
let m = Number(arr[2]); //don't accept '5:3pm'
|
33384
|
+
if (arr[2].length < 2 || m < 0 || m > 59) {
|
33385
|
+
return s.startOf('day')
|
33386
|
+
}
|
33387
|
+
s = s.hour(h);
|
33388
|
+
s = s.minute(m);
|
33389
|
+
s = s.seconds(arr[3] || 0);
|
33390
|
+
s = s.millisecond(parseMs(arr[4]));
|
33391
|
+
//parse-out am/pm
|
33392
|
+
let ampm = str.match(/[\b0-9] ?(am|pm)\b/);
|
33393
|
+
if (ampm !== null && ampm[1]) {
|
33394
|
+
s = s.ampm(ampm[1]);
|
33395
|
+
}
|
33396
|
+
return s
|
33397
|
+
}
|
33398
|
+
|
33399
|
+
//try an informal form - 5pm (no minutes)
|
33400
|
+
arr = str.match(/([0-9]+) ?(am|pm)/);
|
33401
|
+
if (arr !== null && arr[1]) {
|
33402
|
+
let h = Number(arr[1]);
|
33403
|
+
//validate it a little..
|
33404
|
+
if (h > 12 || h < 1) {
|
33405
|
+
return s.startOf('day')
|
33406
|
+
}
|
33407
|
+
s = s.hour(arr[1] || 0);
|
33408
|
+
s = s.ampm(arr[2]);
|
33409
|
+
s = s.startOf('hour');
|
33410
|
+
return s
|
33411
|
+
}
|
33412
|
+
|
33413
|
+
//no time info found, use start-of-day
|
33414
|
+
s = s.startOf('day');
|
33415
|
+
return s
|
33416
|
+
};
|
33417
|
+
|
33418
|
+
let months$1 = mapping$1();
|
33419
|
+
|
33420
|
+
//given a month, return whether day number exists in it
|
33421
|
+
const validate$2 = (obj) => {
|
33422
|
+
//invalid values
|
33423
|
+
if (monthLengths.hasOwnProperty(obj.month) !== true) {
|
33424
|
+
return false
|
33425
|
+
}
|
33426
|
+
//support leap-year in february
|
33427
|
+
if (obj.month === 1) {
|
33428
|
+
if (isLeapYear(obj.year) && obj.date <= 29) {
|
33429
|
+
return true
|
33430
|
+
} else {
|
33431
|
+
return obj.date <= 28
|
33432
|
+
}
|
33433
|
+
}
|
33434
|
+
//is this date too-big for this month?
|
33435
|
+
let max = monthLengths[obj.month] || 0;
|
33436
|
+
if (obj.date <= max) {
|
33437
|
+
return true
|
33438
|
+
}
|
33439
|
+
return false
|
33440
|
+
};
|
33441
|
+
|
33442
|
+
const parseYear = (str = '', today) => {
|
33443
|
+
str = str.trim();
|
33444
|
+
// parse '86 shorthand
|
33445
|
+
if (/^'[0-9][0-9]$/.test(str) === true) {
|
33446
|
+
let num = Number(str.replace(/'/, ''));
|
33447
|
+
if (num > 50) {
|
33448
|
+
return 1900 + num
|
33449
|
+
}
|
33450
|
+
return 2000 + num
|
33451
|
+
}
|
33452
|
+
let year = parseInt(str, 10);
|
33453
|
+
// use a given year from options.today
|
33454
|
+
if (!year && today) {
|
33455
|
+
year = today.year;
|
33456
|
+
}
|
33457
|
+
// fallback to this year
|
33458
|
+
year = year || new Date().getFullYear();
|
33459
|
+
return year
|
33460
|
+
};
|
33461
|
+
|
33462
|
+
const parseMonth = function (str) {
|
33463
|
+
str = str.toLowerCase().trim();
|
33464
|
+
if (str === 'sept') {
|
33465
|
+
return months$1.sep
|
33466
|
+
}
|
33467
|
+
return months$1[str]
|
33468
|
+
};
|
33469
|
+
|
33470
|
+
const ymd = [
|
33471
|
+
// =====
|
33472
|
+
// y-m-d
|
33473
|
+
// =====
|
33474
|
+
//iso-this 1998-05-30T22:00:00:000Z, iso-that 2017-04-03T08:00:00-0700
|
33475
|
+
{
|
33476
|
+
reg: /^(\-?0?0?[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/i,
|
33477
|
+
parse: (s, m) => {
|
33478
|
+
let obj = {
|
33479
|
+
year: m[1],
|
33480
|
+
month: parseInt(m[2], 10) - 1,
|
33481
|
+
date: m[3]
|
33482
|
+
};
|
33483
|
+
if (validate$2(obj) === false) {
|
33484
|
+
s.epoch = null;
|
33485
|
+
return s
|
33486
|
+
}
|
33487
|
+
parseOffset(s, m[5]);
|
33488
|
+
walkTo(s, obj);
|
33489
|
+
s = parseTime(s, m[4]);
|
33490
|
+
return s
|
33491
|
+
}
|
33492
|
+
},
|
33493
|
+
//short-iso "2015-03-25" or "2015/03/25" or "2015/03/25 12:26:14 PM"
|
33494
|
+
{
|
33495
|
+
reg: /^([0-9]{4})[\-\/\. ]([0-9]{1,2})[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,
|
33496
|
+
parse: (s, m) => {
|
33497
|
+
let obj = {
|
33498
|
+
year: m[1],
|
33499
|
+
month: parseInt(m[2], 10) - 1,
|
33500
|
+
date: parseInt(m[3], 10)
|
33501
|
+
};
|
33502
|
+
if (obj.month >= 12) {
|
33503
|
+
//support yyyy/dd/mm (weird, but ok)
|
33504
|
+
obj.date = parseInt(m[2], 10);
|
33505
|
+
obj.month = parseInt(m[3], 10) - 1;
|
33506
|
+
}
|
33507
|
+
if (validate$2(obj) === false) {
|
33508
|
+
s.epoch = null;
|
33509
|
+
return s
|
33510
|
+
}
|
33511
|
+
walkTo(s, obj);
|
33512
|
+
s = parseTime(s, m[4]);
|
33513
|
+
return s
|
33514
|
+
}
|
33515
|
+
},
|
33516
|
+
|
33517
|
+
//text-month "2015-feb-25"
|
33518
|
+
{
|
33519
|
+
reg: /^([0-9]{4})[\-\/\. ]([a-z]+)[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,
|
33520
|
+
parse: (s, m) => {
|
33521
|
+
let obj = {
|
33522
|
+
year: parseYear(m[1], s._today),
|
33523
|
+
month: parseMonth(m[2]),
|
33524
|
+
date: toCardinal(m[3] || '')
|
33525
|
+
};
|
33526
|
+
if (validate$2(obj) === false) {
|
33527
|
+
s.epoch = null;
|
33528
|
+
return s
|
33529
|
+
}
|
33530
|
+
walkTo(s, obj);
|
33531
|
+
s = parseTime(s, m[4]);
|
33532
|
+
return s
|
33533
|
+
}
|
33534
|
+
}
|
33535
|
+
];
|
33536
|
+
|
33537
|
+
const mdy = [
|
33538
|
+
// =====
|
33539
|
+
// m-d-y
|
33540
|
+
// =====
|
33541
|
+
//mm/dd/yyyy - uk/canada "6/28/2019, 12:26:14 PM"
|
33542
|
+
{
|
33543
|
+
reg: /^([0-9]{1,2})[\-\/.]([0-9]{1,2})[\-\/.]?([0-9]{4})?( [0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,
|
33544
|
+
parse: (s, arr) => {
|
33545
|
+
let month = parseInt(arr[1], 10) - 1;
|
33546
|
+
let date = parseInt(arr[2], 10);
|
33547
|
+
//support dd/mm/yyy
|
33548
|
+
if (s.british || month >= 12) {
|
33549
|
+
date = parseInt(arr[1], 10);
|
33550
|
+
month = parseInt(arr[2], 10) - 1;
|
33551
|
+
}
|
33552
|
+
let obj = {
|
33553
|
+
date,
|
33554
|
+
month,
|
33555
|
+
year: parseYear(arr[3], s._today) || new Date().getFullYear()
|
33556
|
+
};
|
33557
|
+
if (validate$2(obj) === false) {
|
33558
|
+
s.epoch = null;
|
33559
|
+
return s
|
33560
|
+
}
|
33561
|
+
walkTo(s, obj);
|
33562
|
+
s = parseTime(s, arr[4]);
|
33563
|
+
return s
|
33564
|
+
}
|
33565
|
+
},
|
33566
|
+
//alt short format - "feb-25-2015"
|
33567
|
+
{
|
33568
|
+
reg: /^([a-z]+)[\-\/\. ]([0-9]{1,2})[\-\/\. ]?([0-9]{4}|'[0-9]{2})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,
|
33569
|
+
parse: (s, arr) => {
|
33570
|
+
let obj = {
|
33571
|
+
year: parseYear(arr[3], s._today),
|
33572
|
+
month: parseMonth(arr[1]),
|
33573
|
+
date: toCardinal(arr[2] || '')
|
33574
|
+
};
|
33575
|
+
if (validate$2(obj) === false) {
|
33576
|
+
s.epoch = null;
|
33577
|
+
return s
|
33578
|
+
}
|
33579
|
+
walkTo(s, obj);
|
33580
|
+
s = parseTime(s, arr[4]);
|
33581
|
+
return s
|
33582
|
+
}
|
33583
|
+
},
|
33584
|
+
|
33585
|
+
//Long "Mar 25 2015"
|
33586
|
+
//February 22, 2017 15:30:00
|
33587
|
+
{
|
33588
|
+
reg: /^([a-z]+) ([0-9]{1,2})( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,
|
33589
|
+
parse: (s, arr) => {
|
33590
|
+
let obj = {
|
33591
|
+
year: parseYear(arr[3], s._today),
|
33592
|
+
month: parseMonth(arr[1]),
|
33593
|
+
date: toCardinal(arr[2] || '')
|
33594
|
+
};
|
33595
|
+
if (validate$2(obj) === false) {
|
33596
|
+
s.epoch = null;
|
33597
|
+
return s
|
33598
|
+
}
|
33599
|
+
walkTo(s, obj);
|
33600
|
+
s = parseTime(s, arr[4]);
|
33601
|
+
return s
|
33602
|
+
}
|
33603
|
+
},
|
33604
|
+
// 'Sun Mar 14 15:09:48 +0000 2021'
|
33605
|
+
{
|
33606
|
+
reg: /^([a-z]+) ([0-9]{1,2})( [0-9:]+)?( \+[0-9]{4})?( [0-9]{4})?$/i,
|
33607
|
+
parse: (s, arr) => {
|
33608
|
+
let obj = {
|
33609
|
+
year: parseYear(arr[5], s._today),
|
33610
|
+
month: parseMonth(arr[1]),
|
33611
|
+
date: toCardinal(arr[2] || '')
|
33612
|
+
};
|
33613
|
+
if (validate$2(obj) === false) {
|
33614
|
+
s.epoch = null;
|
33615
|
+
return s
|
33616
|
+
}
|
33617
|
+
walkTo(s, obj);
|
33618
|
+
s = parseTime(s, arr[3]);
|
33619
|
+
return s
|
33620
|
+
}
|
33621
|
+
}
|
33622
|
+
];
|
33623
|
+
|
33624
|
+
const dmy = [
|
33625
|
+
// =====
|
33626
|
+
// d-m-y
|
33627
|
+
// =====
|
33628
|
+
//common british format - "25-feb-2015"
|
33629
|
+
{
|
33630
|
+
reg: /^([0-9]{1,2})[\-\/]([a-z]+)[\-\/]?([0-9]{4})?$/i,
|
33631
|
+
parse: (s, m) => {
|
33632
|
+
let obj = {
|
33633
|
+
year: parseYear(m[3], s._today),
|
33634
|
+
month: parseMonth(m[2]),
|
33635
|
+
date: toCardinal(m[1] || '')
|
33636
|
+
};
|
33637
|
+
if (validate$2(obj) === false) {
|
33638
|
+
s.epoch = null;
|
33639
|
+
return s
|
33640
|
+
}
|
33641
|
+
walkTo(s, obj);
|
33642
|
+
s = parseTime(s, m[4]);
|
33643
|
+
return s
|
33644
|
+
}
|
33645
|
+
},
|
33646
|
+
// "25 Mar 2015"
|
33647
|
+
{
|
33648
|
+
reg: /^([0-9]{1,2})( [a-z]+)( [0-9]{4}| '[0-9]{2})? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,
|
33649
|
+
parse: (s, m) => {
|
33650
|
+
let obj = {
|
33651
|
+
year: parseYear(m[3], s._today),
|
33652
|
+
month: parseMonth(m[2]),
|
33653
|
+
date: toCardinal(m[1])
|
33654
|
+
};
|
33655
|
+
if (!obj.month || validate$2(obj) === false) {
|
33656
|
+
s.epoch = null;
|
33657
|
+
return s
|
33658
|
+
}
|
33659
|
+
walkTo(s, obj);
|
33660
|
+
s = parseTime(s, m[4]);
|
33661
|
+
return s
|
33662
|
+
}
|
33663
|
+
},
|
33664
|
+
// 01-jan-2020
|
33665
|
+
{
|
33666
|
+
reg: /^([0-9]{1,2})[\. -/]([a-z]+)[\. -/]([0-9]{4})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,
|
33667
|
+
parse: (s, m) => {
|
33668
|
+
let obj = {
|
33669
|
+
date: Number(m[1]),
|
33670
|
+
month: parseMonth(m[2]),
|
33671
|
+
year: Number(m[3])
|
33672
|
+
};
|
33673
|
+
if (validate$2(obj) === false) {
|
33674
|
+
s.epoch = null;
|
33675
|
+
return s
|
33676
|
+
}
|
33677
|
+
walkTo(s, obj);
|
33678
|
+
s = s.startOf('day');
|
33679
|
+
s = parseTime(s, m[4]);
|
33680
|
+
return s
|
33681
|
+
}
|
33682
|
+
}
|
33683
|
+
];
|
33684
|
+
|
33685
|
+
const misc = [
|
33686
|
+
// =====
|
33687
|
+
// no dates
|
33688
|
+
// =====
|
33689
|
+
|
33690
|
+
// '2012-06' month-only
|
33691
|
+
{
|
33692
|
+
reg: /^([0-9]{4})[\-\/]([0-9]{2})$/i,
|
33693
|
+
parse: (s, m) => {
|
33694
|
+
let obj = {
|
33695
|
+
year: m[1],
|
33696
|
+
month: parseInt(m[2], 10) - 1,
|
33697
|
+
date: 1
|
33698
|
+
};
|
33699
|
+
if (validate$2(obj) === false) {
|
33700
|
+
s.epoch = null;
|
33701
|
+
return s
|
33702
|
+
}
|
33703
|
+
walkTo(s, obj);
|
33704
|
+
s = parseTime(s, m[4]);
|
33705
|
+
return s
|
33706
|
+
}
|
33707
|
+
},
|
33708
|
+
|
33709
|
+
//February 2017 (implied date)
|
33710
|
+
{
|
33711
|
+
reg: /^([a-z]+) ([0-9]{4})$/i,
|
33712
|
+
parse: (s, arr) => {
|
33713
|
+
let obj = {
|
33714
|
+
year: parseYear(arr[2], s._today),
|
33715
|
+
month: parseMonth(arr[1]),
|
33716
|
+
date: s._today.date || 1
|
33717
|
+
};
|
33718
|
+
if (validate$2(obj) === false) {
|
33719
|
+
s.epoch = null;
|
33720
|
+
return s
|
33721
|
+
}
|
33722
|
+
walkTo(s, obj);
|
33723
|
+
s = parseTime(s, arr[4]);
|
33724
|
+
return s
|
33725
|
+
}
|
33726
|
+
},
|
33727
|
+
|
33728
|
+
{
|
33729
|
+
// 'q2 2002'
|
33730
|
+
reg: /^(q[0-9])( of)?( [0-9]{4})?/i,
|
33731
|
+
parse: (s, arr) => {
|
33732
|
+
let quarter = arr[1] || '';
|
33733
|
+
s = s.quarter(quarter);
|
33734
|
+
let year = arr[3] || '';
|
33735
|
+
if (year) {
|
33736
|
+
year = year.trim();
|
33737
|
+
s = s.year(year);
|
33738
|
+
}
|
33739
|
+
return s
|
33740
|
+
}
|
33741
|
+
},
|
33742
|
+
{
|
33743
|
+
// 'summer 2002'
|
33744
|
+
reg: /^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,
|
33745
|
+
parse: (s, arr) => {
|
33746
|
+
let season = arr[1] || '';
|
33747
|
+
s = s.season(season);
|
33748
|
+
let year = arr[3] || '';
|
33749
|
+
if (year) {
|
33750
|
+
year = year.trim();
|
33751
|
+
s = s.year(year);
|
33752
|
+
}
|
33753
|
+
return s
|
33754
|
+
}
|
33755
|
+
},
|
33756
|
+
{
|
33757
|
+
// '200bc'
|
33758
|
+
reg: /^[0-9,]+ ?b\.?c\.?$/i,
|
33759
|
+
parse: (s, arr) => {
|
33760
|
+
let str = arr[0] || '';
|
33761
|
+
//make year-negative
|
33762
|
+
str = str.replace(/^([0-9,]+) ?b\.?c\.?$/i, '-$1');
|
33763
|
+
let d = new Date();
|
33764
|
+
let obj = {
|
33765
|
+
year: parseInt(str.trim(), 10),
|
33766
|
+
month: d.getMonth(),
|
33767
|
+
date: d.getDate()
|
33768
|
+
};
|
33769
|
+
if (validate$2(obj) === false) {
|
33770
|
+
s.epoch = null;
|
33771
|
+
return s
|
33772
|
+
}
|
33773
|
+
walkTo(s, obj);
|
33774
|
+
s = parseTime(s);
|
33775
|
+
return s
|
33776
|
+
}
|
33777
|
+
},
|
33778
|
+
{
|
33779
|
+
// '200ad'
|
33780
|
+
reg: /^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,
|
33781
|
+
parse: (s, arr) => {
|
33782
|
+
let str = arr[0] || '';
|
33783
|
+
//remove commas
|
33784
|
+
str = str.replace(/,/g, '');
|
33785
|
+
let d = new Date();
|
33786
|
+
let obj = {
|
33787
|
+
year: parseInt(str.trim(), 10),
|
33788
|
+
month: d.getMonth(),
|
33789
|
+
date: d.getDate()
|
33790
|
+
};
|
33791
|
+
if (validate$2(obj) === false) {
|
33792
|
+
s.epoch = null;
|
33793
|
+
return s
|
33794
|
+
}
|
33795
|
+
walkTo(s, obj);
|
33796
|
+
s = parseTime(s);
|
33797
|
+
return s
|
33798
|
+
}
|
33799
|
+
},
|
33800
|
+
{
|
33801
|
+
// '1992'
|
33802
|
+
reg: /^[0-9]{4}( ?a\.?d\.?)?$/i,
|
33803
|
+
parse: (s, arr) => {
|
33804
|
+
let today = s._today;
|
33805
|
+
// using today's date, but a new month is awkward.
|
33806
|
+
if (today.month && !today.date) {
|
33807
|
+
today.date = 1;
|
33808
|
+
}
|
33809
|
+
let d = new Date();
|
33810
|
+
let obj = {
|
33811
|
+
year: parseYear(arr[0], today),
|
33812
|
+
month: today.month || d.getMonth(),
|
33813
|
+
date: today.date || d.getDate()
|
33814
|
+
};
|
33815
|
+
if (validate$2(obj) === false) {
|
33816
|
+
s.epoch = null;
|
33817
|
+
return s
|
33818
|
+
}
|
33819
|
+
walkTo(s, obj);
|
33820
|
+
s = parseTime(s);
|
33821
|
+
return s
|
33822
|
+
}
|
33823
|
+
}
|
33824
|
+
];
|
33825
|
+
|
33826
|
+
const parsers = [].concat(ymd, mdy, dmy, misc);
|
33827
|
+
|
33828
|
+
const parseString = function (s, input, givenTz) {
|
33829
|
+
// let parsers = s.parsers || []
|
33830
|
+
//try each text-parse template, use the first good result
|
33831
|
+
for (let i = 0; i < parsers.length; i++) {
|
33832
|
+
let m = input.match(parsers[i].reg);
|
33833
|
+
if (m) {
|
33834
|
+
// console.log(parsers[i].reg)
|
33835
|
+
let res = parsers[i].parse(s, m, givenTz);
|
33836
|
+
if (res !== null && res.isValid()) {
|
33837
|
+
return res
|
33838
|
+
}
|
33839
|
+
}
|
33840
|
+
}
|
33841
|
+
if (s.silent === false) {
|
33842
|
+
console.warn("Warning: couldn't parse date-string: '" + input + "'");
|
33843
|
+
}
|
33844
|
+
s.epoch = null;
|
33845
|
+
return s
|
33846
|
+
};
|
33847
|
+
|
33848
|
+
const { parseArray, parseObject, parseNumber } = fns;
|
33849
|
+
//we have to actually parse these inputs ourselves
|
33850
|
+
// - can't use built-in js parser ;(
|
33851
|
+
//=========================================
|
33852
|
+
// ISO Date "2015-03-25"
|
33853
|
+
// Short Date "03/25/2015" or "2015/03/25"
|
33854
|
+
// Long Date "Mar 25 2015" or "25 Mar 2015"
|
33855
|
+
// Full Date "Wednesday March 25 2015"
|
33856
|
+
//=========================================
|
33857
|
+
|
33858
|
+
const defaults = {
|
33859
|
+
year: new Date().getFullYear(),
|
33860
|
+
month: 0,
|
33861
|
+
date: 1
|
33862
|
+
};
|
33863
|
+
|
33864
|
+
//find the epoch from different input styles
|
33865
|
+
const parseInput = (s, input) => {
|
33866
|
+
let today = s._today || defaults;
|
33867
|
+
//if we've been given a epoch number, it's easy
|
33868
|
+
if (typeof input === 'number') {
|
33869
|
+
return parseNumber(s, input)
|
33870
|
+
}
|
33871
|
+
//set tmp time
|
33872
|
+
s.epoch = Date.now();
|
33873
|
+
// overwrite tmp time with 'today' value, if exists
|
33874
|
+
if (s._today && isObject$1(s._today) && Object.keys(s._today).length > 0) {
|
33875
|
+
let res = parseObject(s, today, defaults);
|
33876
|
+
if (res.isValid()) {
|
33877
|
+
s.epoch = res.epoch;
|
33878
|
+
}
|
33879
|
+
}
|
33880
|
+
// null input means 'now'
|
33881
|
+
if (input === null || input === undefined || input === '') {
|
33882
|
+
return s //k, we're good.
|
33883
|
+
}
|
33884
|
+
//support input of Date() object
|
33885
|
+
if (isDate(input) === true) {
|
33886
|
+
s.epoch = input.getTime();
|
33887
|
+
return s
|
33888
|
+
}
|
33889
|
+
//support [2016, 03, 01] format
|
33890
|
+
if (isArray(input) === true) {
|
33891
|
+
s = parseArray(s, input, today);
|
33892
|
+
return s
|
33893
|
+
}
|
33894
|
+
//support {year:2016, month:3} format
|
33895
|
+
if (isObject$1(input) === true) {
|
33896
|
+
//support spacetime object as input
|
33897
|
+
if (input.epoch) {
|
33898
|
+
s.epoch = input.epoch;
|
33899
|
+
s.tz = input.tz;
|
33900
|
+
return s
|
33901
|
+
}
|
33902
|
+
s = parseObject(s, input, today);
|
33903
|
+
return s
|
33904
|
+
}
|
33905
|
+
//input as a string..
|
33906
|
+
if (typeof input !== 'string') {
|
33907
|
+
return s
|
33908
|
+
}
|
33909
|
+
//little cleanup..
|
33910
|
+
input = normalize$1(input);
|
33911
|
+
//try some known-words, like 'now'
|
33912
|
+
if (dates.hasOwnProperty(input) === true) {
|
33913
|
+
s = dates[input](s);
|
33914
|
+
return s
|
33915
|
+
}
|
33916
|
+
//try each text-parse template, use the first good result
|
33917
|
+
return parseString(s, input)
|
33918
|
+
};
|
33919
|
+
|
33920
|
+
let shortDays = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
|
33921
|
+
let longDays = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];
|
33922
|
+
|
33923
|
+
function short() { return shortDays }
|
33924
|
+
function long() { return longDays }
|
33925
|
+
function set$2(i18n) {
|
33926
|
+
shortDays = i18n.short || shortDays;
|
33927
|
+
longDays = i18n.long || longDays;
|
33928
|
+
}
|
33929
|
+
const aliases$1 = {
|
33930
|
+
mo: 1,
|
33931
|
+
tu: 2,
|
33932
|
+
we: 3,
|
33933
|
+
th: 4,
|
33934
|
+
fr: 5,
|
33935
|
+
sa: 6,
|
33936
|
+
su: 7,
|
33937
|
+
tues: 2,
|
33938
|
+
weds: 3,
|
33939
|
+
wedn: 3,
|
33940
|
+
thur: 4,
|
33941
|
+
thurs: 4
|
33942
|
+
};
|
33943
|
+
|
33944
|
+
let titleCaseEnabled = true;
|
33945
|
+
|
33946
|
+
function useTitleCase() {
|
33947
|
+
return titleCaseEnabled
|
33948
|
+
}
|
33949
|
+
|
33950
|
+
function set$1(val) {
|
33951
|
+
titleCaseEnabled = val;
|
33952
|
+
}
|
33953
|
+
|
33954
|
+
// create the timezone offset part of an iso timestamp
|
33955
|
+
// it's kind of nuts how involved this is
|
33956
|
+
// "+01:00", "+0100", or simply "+01"
|
33957
|
+
const isoOffset = s => {
|
33958
|
+
let offset = s.timezone().current.offset;
|
33959
|
+
return !offset ? 'Z' : formatTimezone(offset, ':')
|
33960
|
+
};
|
33961
|
+
|
33962
|
+
const applyCaseFormat = (str) => {
|
33963
|
+
if (useTitleCase()) {
|
33964
|
+
return titleCase$1(str)
|
33965
|
+
}
|
33966
|
+
return str
|
33967
|
+
};
|
33968
|
+
|
33969
|
+
// iso-year padding
|
33970
|
+
const padYear = (num) => {
|
33971
|
+
if (num >= 0) {
|
33972
|
+
return zeroPad(num, 4)
|
33973
|
+
} else {
|
33974
|
+
num = Math.abs(num);
|
33975
|
+
return '-' + zeroPad(num, 4)
|
33976
|
+
}
|
33977
|
+
};
|
33978
|
+
|
33979
|
+
const format$2 = {
|
33980
|
+
day: (s) => applyCaseFormat(s.dayName()),
|
33981
|
+
'day-short': (s) => applyCaseFormat(short()[s.day()]),
|
33982
|
+
'day-number': (s) => s.day(),
|
33983
|
+
'day-ordinal': (s) => ordinal(s.day()),
|
33984
|
+
'day-pad': (s) => zeroPad(s.day()),
|
33985
|
+
|
33986
|
+
date: (s) => s.date(),
|
33987
|
+
'date-ordinal': (s) => ordinal(s.date()),
|
33988
|
+
'date-pad': (s) => zeroPad(s.date()),
|
33989
|
+
|
33990
|
+
month: (s) => applyCaseFormat(s.monthName()),
|
33991
|
+
'month-short': (s) => applyCaseFormat(short$1()[s.month()]),
|
33992
|
+
'month-number': (s) => s.month(),
|
33993
|
+
'month-ordinal': (s) => ordinal(s.month()),
|
33994
|
+
'month-pad': (s) => zeroPad(s.month()),
|
33995
|
+
'iso-month': (s) => zeroPad(s.month() + 1), //1-based months
|
33996
|
+
|
33997
|
+
year: (s) => {
|
33998
|
+
let year = s.year();
|
33999
|
+
if (year > 0) {
|
34000
|
+
return year
|
34001
|
+
}
|
34002
|
+
year = Math.abs(year);
|
34003
|
+
return year + ' BC'
|
34004
|
+
},
|
34005
|
+
'year-short': (s) => {
|
34006
|
+
let year = s.year();
|
34007
|
+
if (year > 0) {
|
34008
|
+
return `'${String(s.year()).substr(2, 4)}`
|
34009
|
+
}
|
34010
|
+
year = Math.abs(year);
|
34011
|
+
return year + ' BC'
|
34012
|
+
},
|
34013
|
+
'iso-year': (s) => {
|
34014
|
+
let year = s.year();
|
34015
|
+
let isNegative = year < 0;
|
34016
|
+
let str = zeroPad(Math.abs(year), 4); //0-padded
|
34017
|
+
if (isNegative) {
|
34018
|
+
//negative years are for some reason 6-digits ('-00008')
|
34019
|
+
str = zeroPad(str, 6);
|
34020
|
+
str = '-' + str;
|
34021
|
+
}
|
34022
|
+
return str
|
34023
|
+
},
|
34024
|
+
|
34025
|
+
time: (s) => s.time(),
|
34026
|
+
'time-24': (s) => `${s.hour24()}:${zeroPad(s.minute())}`,
|
34027
|
+
|
34028
|
+
hour: (s) => s.hour12(),
|
34029
|
+
'hour-pad': (s) => zeroPad(s.hour12()),
|
34030
|
+
'hour-24': (s) => s.hour24(),
|
34031
|
+
'hour-24-pad': (s) => zeroPad(s.hour24()),
|
34032
|
+
|
34033
|
+
minute: (s) => s.minute(),
|
34034
|
+
'minute-pad': (s) => zeroPad(s.minute()),
|
34035
|
+
second: (s) => s.second(),
|
34036
|
+
'second-pad': (s) => zeroPad(s.second()),
|
34037
|
+
millisecond: (s) => s.millisecond(),
|
34038
|
+
'millisecond-pad': (s) => zeroPad(s.millisecond(), 3),
|
34039
|
+
|
34040
|
+
ampm: (s) => s.ampm(),
|
34041
|
+
quarter: (s) => 'Q' + s.quarter(),
|
34042
|
+
season: (s) => s.season(),
|
34043
|
+
era: (s) => s.era(),
|
34044
|
+
json: (s) => s.json(),
|
34045
|
+
timezone: (s) => s.timezone().name,
|
34046
|
+
offset: (s) => isoOffset(s),
|
34047
|
+
|
34048
|
+
numeric: (s) => `${s.year()}/${zeroPad(s.month() + 1)}/${zeroPad(s.date())}`, // yyyy/mm/dd
|
34049
|
+
'numeric-us': (s) => `${zeroPad(s.month() + 1)}/${zeroPad(s.date())}/${s.year()}`, // mm/dd/yyyy
|
34050
|
+
'numeric-uk': (s) => `${zeroPad(s.date())}/${zeroPad(s.month() + 1)}/${s.year()}`, //dd/mm/yyyy
|
34051
|
+
'mm/dd': (s) => `${zeroPad(s.month() + 1)}/${zeroPad(s.date())}`, //mm/dd
|
34052
|
+
|
34053
|
+
// ... https://en.wikipedia.org/wiki/ISO_8601 ;(((
|
34054
|
+
iso: (s) => {
|
34055
|
+
let year = s.format('iso-year');
|
34056
|
+
let month = zeroPad(s.month() + 1); //1-based months
|
34057
|
+
let date = zeroPad(s.date());
|
34058
|
+
let hour = zeroPad(s.h24());
|
34059
|
+
let minute = zeroPad(s.minute());
|
34060
|
+
let second = zeroPad(s.second());
|
34061
|
+
let ms = zeroPad(s.millisecond(), 3);
|
34062
|
+
let offset = isoOffset(s);
|
34063
|
+
return `${year}-${month}-${date}T${hour}:${minute}:${second}.${ms}${offset}` //2018-03-09T08:50:00.000-05:00
|
34064
|
+
},
|
34065
|
+
'iso-short': (s) => {
|
34066
|
+
let month = zeroPad(s.month() + 1); //1-based months
|
34067
|
+
let date = zeroPad(s.date());
|
34068
|
+
let year = padYear(s.year());
|
34069
|
+
return `${year}-${month}-${date}` //2017-02-15
|
34070
|
+
},
|
34071
|
+
'iso-utc': (s) => {
|
34072
|
+
return new Date(s.epoch).toISOString() //2017-03-08T19:45:28.367Z
|
34073
|
+
},
|
34074
|
+
|
34075
|
+
//i made these up
|
34076
|
+
nice: (s) => `${short$1()[s.month()]} ${ordinal(s.date())}, ${s.time()}`,
|
34077
|
+
'nice-24': (s) =>
|
34078
|
+
`${short$1()[s.month()]} ${ordinal(s.date())}, ${s.hour24()}:${zeroPad(
|
34079
|
+
s.minute()
|
34080
|
+
)}`,
|
34081
|
+
'nice-year': (s) => `${short$1()[s.month()]} ${ordinal(s.date())}, ${s.year()}`,
|
34082
|
+
'nice-day': (s) =>
|
34083
|
+
`${short()[s.day()]} ${applyCaseFormat(short$1()[s.month()])} ${ordinal(
|
34084
|
+
s.date()
|
34085
|
+
)}`,
|
34086
|
+
'nice-full': (s) =>
|
34087
|
+
`${s.dayName()} ${applyCaseFormat(s.monthName())} ${ordinal(s.date())}, ${s.time()}`,
|
34088
|
+
'nice-full-24': (s) =>
|
34089
|
+
`${s.dayName()} ${applyCaseFormat(s.monthName())} ${ordinal(
|
34090
|
+
s.date()
|
34091
|
+
)}, ${s.hour24()}:${zeroPad(s.minute())}`
|
34092
|
+
};
|
34093
|
+
//aliases
|
34094
|
+
const aliases = {
|
34095
|
+
'day-name': 'day',
|
34096
|
+
'month-name': 'month',
|
34097
|
+
'iso 8601': 'iso',
|
34098
|
+
'time-h24': 'time-24',
|
34099
|
+
'time-12': 'time',
|
34100
|
+
'time-h12': 'time',
|
34101
|
+
tz: 'timezone',
|
34102
|
+
'day-num': 'day-number',
|
34103
|
+
'month-num': 'month-number',
|
34104
|
+
'month-iso': 'iso-month',
|
34105
|
+
'year-iso': 'iso-year',
|
34106
|
+
'nice-short': 'nice',
|
34107
|
+
'nice-short-24': 'nice-24',
|
34108
|
+
mdy: 'numeric-us',
|
34109
|
+
dmy: 'numeric-uk',
|
34110
|
+
ymd: 'numeric',
|
34111
|
+
'yyyy/mm/dd': 'numeric',
|
34112
|
+
'mm/dd/yyyy': 'numeric-us',
|
34113
|
+
'dd/mm/yyyy': 'numeric-us',
|
34114
|
+
'little-endian': 'numeric-uk',
|
34115
|
+
'big-endian': 'numeric',
|
34116
|
+
'day-nice': 'nice-day'
|
34117
|
+
};
|
34118
|
+
Object.keys(aliases).forEach((k) => (format$2[k] = format$2[aliases[k]]));
|
34119
|
+
|
34120
|
+
const printFormat = (s, str = '') => {
|
34121
|
+
//don't print anything if it's an invalid date
|
34122
|
+
if (s.isValid() !== true) {
|
34123
|
+
return ''
|
34124
|
+
}
|
34125
|
+
//support .format('month')
|
34126
|
+
if (format$2.hasOwnProperty(str)) {
|
34127
|
+
let out = format$2[str](s) || '';
|
34128
|
+
if (str !== 'json') {
|
34129
|
+
out = String(out);
|
34130
|
+
if (str !== 'ampm') {
|
34131
|
+
out = applyCaseFormat(out);
|
34132
|
+
}
|
34133
|
+
}
|
34134
|
+
return out
|
34135
|
+
}
|
34136
|
+
//support '{hour}:{minute}' notation
|
34137
|
+
if (str.indexOf('{') !== -1) {
|
34138
|
+
let sections = /\{(.+?)\}/g;
|
34139
|
+
str = str.replace(sections, (_, fmt) => {
|
34140
|
+
fmt = fmt.toLowerCase().trim();
|
34141
|
+
if (format$2.hasOwnProperty(fmt)) {
|
34142
|
+
let out = String(format$2[fmt](s));
|
34143
|
+
if (fmt !== 'ampm') {
|
34144
|
+
return applyCaseFormat(out)
|
34145
|
+
}
|
34146
|
+
return out
|
34147
|
+
}
|
34148
|
+
return ''
|
34149
|
+
});
|
34150
|
+
return str
|
34151
|
+
}
|
34152
|
+
|
34153
|
+
return s.format('iso-short')
|
34154
|
+
};
|
34155
|
+
|
34156
|
+
//parse this insane unix-time-templating thing, from the 19th century
|
34157
|
+
//http://unicode.org/reports/tr35/tr35-25.html#Date_Format_Patterns
|
34158
|
+
|
34159
|
+
//time-symbols we support
|
34160
|
+
const mapping = {
|
34161
|
+
G: (s) => s.era(),
|
34162
|
+
GG: (s) => s.era(),
|
34163
|
+
GGG: (s) => s.era(),
|
34164
|
+
GGGG: (s) => (s.era() === 'AD' ? 'Anno Domini' : 'Before Christ'),
|
34165
|
+
//year
|
34166
|
+
y: (s) => s.year(),
|
34167
|
+
yy: (s) => {
|
34168
|
+
//last two chars
|
34169
|
+
return zeroPad(Number(String(s.year()).substr(2, 4)))
|
34170
|
+
},
|
34171
|
+
yyy: (s) => s.year(),
|
34172
|
+
yyyy: (s) => s.year(),
|
34173
|
+
yyyyy: (s) => '0' + s.year(),
|
34174
|
+
// u: (s) => {},//extended non-gregorian years
|
34175
|
+
|
34176
|
+
//quarter
|
34177
|
+
Q: (s) => s.quarter(),
|
34178
|
+
QQ: (s) => s.quarter(),
|
34179
|
+
QQQ: (s) => s.quarter(),
|
34180
|
+
QQQQ: (s) => s.quarter(),
|
34181
|
+
|
34182
|
+
//month
|
34183
|
+
M: (s) => s.month() + 1,
|
34184
|
+
MM: (s) => zeroPad(s.month() + 1),
|
34185
|
+
MMM: (s) => s.format('month-short'),
|
34186
|
+
MMMM: (s) => s.format('month'),
|
34187
|
+
|
34188
|
+
//week
|
34189
|
+
w: (s) => s.week(),
|
34190
|
+
ww: (s) => zeroPad(s.week()),
|
34191
|
+
//week of month
|
34192
|
+
// W: (s) => s.week(),
|
34193
|
+
|
34194
|
+
//date of month
|
34195
|
+
d: (s) => s.date(),
|
34196
|
+
dd: (s) => zeroPad(s.date()),
|
34197
|
+
//date of year
|
34198
|
+
D: (s) => s.dayOfYear(),
|
34199
|
+
DD: (s) => zeroPad(s.dayOfYear()),
|
34200
|
+
DDD: (s) => zeroPad(s.dayOfYear(), 3),
|
34201
|
+
|
34202
|
+
// F: (s) => {},//date of week in month
|
34203
|
+
// g: (s) => {},//modified julian day
|
34204
|
+
|
34205
|
+
//day
|
34206
|
+
E: (s) => s.format('day-short'),
|
34207
|
+
EE: (s) => s.format('day-short'),
|
34208
|
+
EEE: (s) => s.format('day-short'),
|
34209
|
+
EEEE: (s) => s.format('day'),
|
34210
|
+
EEEEE: (s) => s.format('day')[0],
|
34211
|
+
e: (s) => s.day(),
|
34212
|
+
ee: (s) => s.day(),
|
34213
|
+
eee: (s) => s.format('day-short'),
|
34214
|
+
eeee: (s) => s.format('day'),
|
34215
|
+
eeeee: (s) => s.format('day')[0],
|
34216
|
+
|
34217
|
+
//am/pm
|
34218
|
+
a: (s) => s.ampm().toUpperCase(),
|
34219
|
+
aa: (s) => s.ampm().toUpperCase(),
|
34220
|
+
aaa: (s) => s.ampm().toUpperCase(),
|
34221
|
+
aaaa: (s) => s.ampm().toUpperCase(),
|
34222
|
+
|
34223
|
+
//hour
|
34224
|
+
h: (s) => s.h12(),
|
34225
|
+
hh: (s) => zeroPad(s.h12()),
|
34226
|
+
H: (s) => s.hour(),
|
34227
|
+
HH: (s) => zeroPad(s.hour()),
|
34228
|
+
// j: (s) => {},//weird hour format
|
34229
|
+
|
34230
|
+
m: (s) => s.minute(),
|
34231
|
+
mm: (s) => zeroPad(s.minute()),
|
34232
|
+
s: (s) => s.second(),
|
34233
|
+
ss: (s) => zeroPad(s.second()),
|
34234
|
+
|
34235
|
+
//milliseconds
|
34236
|
+
SSS: (s) => zeroPad(s.millisecond(), 3),
|
34237
|
+
//milliseconds in the day
|
34238
|
+
A: (s) => s.epoch - s.startOf('day').epoch,
|
34239
|
+
//timezone
|
34240
|
+
z: (s) => s.timezone().name,
|
34241
|
+
zz: (s) => s.timezone().name,
|
34242
|
+
zzz: (s) => s.timezone().name,
|
34243
|
+
zzzz: (s) => s.timezone().name,
|
34244
|
+
Z: (s) => formatTimezone(s.timezone().current.offset),
|
34245
|
+
ZZ: (s) => formatTimezone(s.timezone().current.offset),
|
34246
|
+
ZZZ: (s) => formatTimezone(s.timezone().current.offset),
|
34247
|
+
ZZZZ: (s) => formatTimezone(s.timezone().current.offset, ':')
|
34248
|
+
};
|
34249
|
+
|
34250
|
+
const addAlias = (char, to, n) => {
|
34251
|
+
let name = char;
|
34252
|
+
let toName = to;
|
34253
|
+
for (let i = 0; i < n; i += 1) {
|
34254
|
+
mapping[name] = mapping[toName];
|
34255
|
+
name += char;
|
34256
|
+
toName += to;
|
34257
|
+
}
|
34258
|
+
};
|
34259
|
+
addAlias('q', 'Q', 4);
|
34260
|
+
addAlias('L', 'M', 4);
|
34261
|
+
addAlias('Y', 'y', 4);
|
34262
|
+
addAlias('c', 'e', 4);
|
34263
|
+
addAlias('k', 'H', 2);
|
34264
|
+
addAlias('K', 'h', 2);
|
34265
|
+
addAlias('S', 's', 2);
|
34266
|
+
addAlias('v', 'z', 4);
|
34267
|
+
addAlias('V', 'Z', 4);
|
34268
|
+
|
34269
|
+
// support unix-style escaping with ' character
|
34270
|
+
const escapeChars = function (arr) {
|
34271
|
+
for (let i = 0; i < arr.length; i += 1) {
|
34272
|
+
if (arr[i] === `'`) {
|
34273
|
+
// greedy-search for next apostrophe
|
34274
|
+
for (let o = i + 1; o < arr.length; o += 1) {
|
34275
|
+
if (arr[o]) {
|
34276
|
+
arr[i] += arr[o];
|
34277
|
+
}
|
34278
|
+
if (arr[o] === `'`) {
|
34279
|
+
arr[o] = null;
|
34280
|
+
break
|
34281
|
+
}
|
34282
|
+
arr[o] = null;
|
34283
|
+
}
|
34284
|
+
}
|
34285
|
+
}
|
34286
|
+
return arr.filter((ch) => ch)
|
34287
|
+
};
|
34288
|
+
|
34289
|
+
//combine consecutive chars, like 'yyyy' as one.
|
34290
|
+
const combineRepeated = function (arr) {
|
34291
|
+
for (let i = 0; i < arr.length; i += 1) {
|
34292
|
+
let c = arr[i];
|
34293
|
+
// greedy-forward
|
34294
|
+
for (let o = i + 1; o < arr.length; o += 1) {
|
34295
|
+
if (arr[o] === c) {
|
34296
|
+
arr[i] += arr[o];
|
34297
|
+
arr[o] = null;
|
34298
|
+
} else {
|
34299
|
+
break
|
34300
|
+
}
|
34301
|
+
}
|
34302
|
+
}
|
34303
|
+
// '' means one apostrophe
|
34304
|
+
arr = arr.filter((ch) => ch);
|
34305
|
+
arr = arr.map((str) => {
|
34306
|
+
if (str === `''`) {
|
34307
|
+
str = `'`;
|
34308
|
+
}
|
34309
|
+
return str
|
34310
|
+
});
|
34311
|
+
return arr
|
34312
|
+
};
|
34313
|
+
|
34314
|
+
const unixFmt = (s, str) => {
|
34315
|
+
let arr = str.split('');
|
34316
|
+
// support character escaping
|
34317
|
+
arr = escapeChars(arr);
|
34318
|
+
//combine 'yyyy' as string.
|
34319
|
+
arr = combineRepeated(arr);
|
34320
|
+
return arr.reduce((txt, c) => {
|
34321
|
+
if (mapping[c] !== undefined) {
|
34322
|
+
txt += mapping[c](s) || '';
|
34323
|
+
} else {
|
34324
|
+
// 'unescape'
|
34325
|
+
if (/^'.{1,}'$/.test(c)) {
|
34326
|
+
c = c.replace(/'/g, '');
|
34327
|
+
}
|
34328
|
+
txt += c;
|
34329
|
+
}
|
34330
|
+
return txt
|
34331
|
+
}, '')
|
34332
|
+
};
|
34333
|
+
|
34334
|
+
const units$2 = ['year', 'season', 'quarter', 'month', 'week', 'day', 'quarterHour', 'hour', 'minute'];
|
34335
|
+
|
34336
|
+
const doUnit = function (s, k) {
|
34337
|
+
let start = s.clone().startOf(k);
|
34338
|
+
let end = s.clone().endOf(k);
|
34339
|
+
let duration = end.epoch - start.epoch;
|
34340
|
+
let percent = (s.epoch - start.epoch) / duration;
|
34341
|
+
return parseFloat(percent.toFixed(2))
|
34342
|
+
};
|
34343
|
+
|
34344
|
+
//how far it is along, from 0-1
|
34345
|
+
const progress = (s, unit) => {
|
34346
|
+
if (unit) {
|
34347
|
+
unit = normalize$2(unit);
|
34348
|
+
return doUnit(s, unit)
|
34349
|
+
}
|
34350
|
+
let obj = {};
|
34351
|
+
units$2.forEach(k => {
|
34352
|
+
obj[k] = doUnit(s, k);
|
34353
|
+
});
|
34354
|
+
return obj
|
34355
|
+
};
|
34356
|
+
|
34357
|
+
//round to either current, or +1 of this unit
|
34358
|
+
const nearest = (s, unit) => {
|
34359
|
+
//how far have we gone?
|
34360
|
+
let prog = s.progress();
|
34361
|
+
unit = normalize$2(unit);
|
34362
|
+
//fix camel-case for this one
|
34363
|
+
if (unit === 'quarterhour') {
|
34364
|
+
unit = 'quarterHour';
|
34365
|
+
}
|
34366
|
+
if (prog[unit] !== undefined) {
|
34367
|
+
// go forward one?
|
34368
|
+
if (prog[unit] > 0.5) {
|
34369
|
+
s = s.add(1, unit);
|
34370
|
+
}
|
34371
|
+
// go to start
|
34372
|
+
s = s.startOf(unit);
|
34373
|
+
} else if (s.silent === false) {
|
34374
|
+
console.warn("no known unit '" + unit + "'");
|
34375
|
+
}
|
34376
|
+
return s
|
34377
|
+
};
|
34378
|
+
|
34379
|
+
//increment until dates are the same
|
34380
|
+
const climb = (a, b, unit) => {
|
34381
|
+
let i = 0;
|
34382
|
+
a = a.clone();
|
34383
|
+
while (a.isBefore(b)) {
|
34384
|
+
//do proper, expensive increment to catch all-the-tricks
|
34385
|
+
a = a.add(1, unit);
|
34386
|
+
i += 1;
|
34387
|
+
}
|
34388
|
+
//oops, we went too-far..
|
34389
|
+
if (a.isAfter(b, unit)) {
|
34390
|
+
i -= 1;
|
34391
|
+
}
|
34392
|
+
return i
|
34393
|
+
};
|
34394
|
+
|
34395
|
+
// do a thurough +=1 on the unit, until they match
|
34396
|
+
// for speed-reasons, only used on day, month, week.
|
34397
|
+
const diffOne = (a, b, unit) => {
|
34398
|
+
if (a.isBefore(b)) {
|
34399
|
+
return climb(a, b, unit)
|
34400
|
+
} else {
|
34401
|
+
return climb(b, a, unit) * -1 //reverse it
|
34402
|
+
}
|
34403
|
+
};
|
34404
|
+
|
34405
|
+
// don't do anything too fancy here.
|
34406
|
+
// 2020 - 2019 may be 1 year, or 0 years
|
34407
|
+
// - '1 year difference' means 366 days during a leap year
|
34408
|
+
const fastYear = (a, b) => {
|
34409
|
+
let years = b.year() - a.year();
|
34410
|
+
// should we decrement it by 1?
|
34411
|
+
a = a.year(b.year());
|
34412
|
+
if (a.isAfter(b)) {
|
34413
|
+
years -= 1;
|
34414
|
+
}
|
34415
|
+
return years
|
34416
|
+
};
|
34417
|
+
|
34418
|
+
// use a waterfall-method for computing a diff of any 'pre-knowable' units
|
34419
|
+
// compute years, then compute months, etc..
|
34420
|
+
// ... then ms-math for any very-small units
|
34421
|
+
const diff = function (a, b) {
|
34422
|
+
// an hour is always the same # of milliseconds
|
34423
|
+
// so these units can be 'pre-calculated'
|
34424
|
+
let msDiff = b.epoch - a.epoch;
|
34425
|
+
let obj = {
|
34426
|
+
milliseconds: msDiff,
|
34427
|
+
seconds: parseInt(msDiff / 1000, 10)
|
34428
|
+
};
|
34429
|
+
obj.minutes = parseInt(obj.seconds / 60, 10);
|
34430
|
+
obj.hours = parseInt(obj.minutes / 60, 10);
|
34431
|
+
|
34432
|
+
//do the year
|
34433
|
+
let tmp = a.clone();
|
34434
|
+
obj.years = fastYear(tmp, b);
|
34435
|
+
tmp = a.add(obj.years, 'year');
|
34436
|
+
|
34437
|
+
//there's always 12 months in a year...
|
34438
|
+
obj.months = obj.years * 12;
|
34439
|
+
tmp = a.add(obj.months, 'month');
|
34440
|
+
obj.months += diffOne(tmp, b, 'month');
|
34441
|
+
|
34442
|
+
// there's always atleast 52 weeks in a year..
|
34443
|
+
// (month * 4) isn't as close
|
34444
|
+
obj.weeks = obj.years * 52;
|
34445
|
+
tmp = a.add(obj.weeks, 'week');
|
34446
|
+
obj.weeks += diffOne(tmp, b, 'week');
|
34447
|
+
|
34448
|
+
// there's always atleast 7 days in a week
|
34449
|
+
obj.days = obj.weeks * 7;
|
34450
|
+
tmp = a.add(obj.days, 'day');
|
34451
|
+
obj.days += diffOne(tmp, b, 'day');
|
34452
|
+
|
34453
|
+
return obj
|
34454
|
+
};
|
34455
|
+
|
34456
|
+
const reverseDiff = function (obj) {
|
34457
|
+
Object.keys(obj).forEach((k) => {
|
34458
|
+
obj[k] *= -1;
|
34459
|
+
});
|
34460
|
+
return obj
|
34461
|
+
};
|
34462
|
+
|
34463
|
+
// this method counts a total # of each unit, between a, b.
|
34464
|
+
// '1 month' means 28 days in february
|
34465
|
+
// '1 year' means 366 days in a leap year
|
34466
|
+
const main$1 = function (a, b, unit) {
|
34467
|
+
b = beADate(b, a);
|
34468
|
+
//reverse values, if necessary
|
34469
|
+
let reversed = false;
|
34470
|
+
if (a.isAfter(b)) {
|
34471
|
+
let tmp = a;
|
34472
|
+
a = b;
|
34473
|
+
b = tmp;
|
34474
|
+
reversed = true;
|
34475
|
+
}
|
34476
|
+
//compute them all (i know!)
|
34477
|
+
let obj = diff(a, b);
|
34478
|
+
if (reversed) {
|
34479
|
+
obj = reverseDiff(obj);
|
34480
|
+
}
|
34481
|
+
//return just the requested unit
|
34482
|
+
if (unit) {
|
34483
|
+
//make sure it's plural-form
|
34484
|
+
unit = normalize$2(unit);
|
34485
|
+
if (/s$/.test(unit) !== true) {
|
34486
|
+
unit += 's';
|
34487
|
+
}
|
34488
|
+
if (unit === 'dates') {
|
34489
|
+
unit = 'days';
|
34490
|
+
}
|
34491
|
+
return obj[unit]
|
34492
|
+
}
|
34493
|
+
return obj
|
34494
|
+
};
|
34495
|
+
|
34496
|
+
/*
|
34497
|
+
ISO 8601 duration format
|
34498
|
+
// https://en.wikipedia.org/wiki/ISO_8601#Durations
|
34499
|
+
"P3Y6M4DT12H30M5S"
|
34500
|
+
P the start of the duration representation.
|
34501
|
+
Y the number of years.
|
34502
|
+
M the number of months.
|
34503
|
+
W the number of weeks.
|
34504
|
+
D the number of days.
|
34505
|
+
T of the representation.
|
34506
|
+
H the number of hours.
|
34507
|
+
M the number of minutes.
|
34508
|
+
S the number of seconds.
|
34509
|
+
*/
|
34510
|
+
|
34511
|
+
const fmt = (n) => Math.abs(n) || 0;
|
34512
|
+
|
34513
|
+
const toISO = function (diff) {
|
34514
|
+
let iso = 'P';
|
34515
|
+
iso += fmt(diff.years) + 'Y';
|
34516
|
+
iso += fmt(diff.months) + 'M';
|
34517
|
+
iso += fmt(diff.days) + 'DT';
|
34518
|
+
iso += fmt(diff.hours) + 'H';
|
34519
|
+
iso += fmt(diff.minutes) + 'M';
|
34520
|
+
iso += fmt(diff.seconds) + 'S';
|
34521
|
+
return iso
|
34522
|
+
};
|
34523
|
+
|
34524
|
+
//get number of hours/minutes... between the two dates
|
34525
|
+
function getDiff(a, b) {
|
34526
|
+
const isBefore = a.isBefore(b);
|
34527
|
+
const later = isBefore ? b : a;
|
34528
|
+
let earlier = isBefore ? a : b;
|
34529
|
+
earlier = earlier.clone();
|
34530
|
+
const diff = {
|
34531
|
+
years: 0,
|
34532
|
+
months: 0,
|
34533
|
+
days: 0,
|
34534
|
+
hours: 0,
|
34535
|
+
minutes: 0,
|
34536
|
+
seconds: 0
|
34537
|
+
};
|
34538
|
+
Object.keys(diff).forEach((unit) => {
|
34539
|
+
if (earlier.isSame(later, unit)) {
|
34540
|
+
return
|
34541
|
+
}
|
34542
|
+
let max = earlier.diff(later, unit);
|
34543
|
+
earlier = earlier.add(max, unit);
|
34544
|
+
diff[unit] = max;
|
34545
|
+
});
|
34546
|
+
//reverse it, if necessary
|
34547
|
+
if (isBefore) {
|
34548
|
+
Object.keys(diff).forEach((u) => {
|
34549
|
+
if (diff[u] !== 0) {
|
34550
|
+
diff[u] *= -1;
|
34551
|
+
}
|
34552
|
+
});
|
34553
|
+
}
|
34554
|
+
return diff
|
34555
|
+
}
|
34556
|
+
|
34557
|
+
//our conceptual 'break-points' for each unit
|
34558
|
+
const qualifiers = {
|
34559
|
+
months: {
|
34560
|
+
almost: 10,
|
34561
|
+
over: 4
|
34562
|
+
},
|
34563
|
+
days: {
|
34564
|
+
almost: 25,
|
34565
|
+
over: 10
|
34566
|
+
},
|
34567
|
+
hours: {
|
34568
|
+
almost: 20,
|
34569
|
+
over: 8
|
34570
|
+
},
|
34571
|
+
minutes: {
|
34572
|
+
almost: 50,
|
34573
|
+
over: 20
|
34574
|
+
},
|
34575
|
+
seconds: {
|
34576
|
+
almost: 50,
|
34577
|
+
over: 20
|
34578
|
+
}
|
34579
|
+
};
|
34580
|
+
|
34581
|
+
// Expects a plural unit arg
|
34582
|
+
function pluralize(value, unit) {
|
34583
|
+
if (value === 1) {
|
34584
|
+
unit = unit.slice(0, -1);
|
34585
|
+
}
|
34586
|
+
return value + ' ' + unit
|
34587
|
+
}
|
34588
|
+
|
34589
|
+
const toSoft = function (diff) {
|
34590
|
+
let rounded = null;
|
34591
|
+
let qualified = null;
|
34592
|
+
let abbreviated = [];
|
34593
|
+
let englishValues = [];
|
34594
|
+
//go through each value and create its text-representation
|
34595
|
+
Object.keys(diff).forEach((unit, i, units) => {
|
34596
|
+
const value = Math.abs(diff[unit]);
|
34597
|
+
if (value === 0) {
|
34598
|
+
return
|
34599
|
+
}
|
34600
|
+
abbreviated.push(value + unit[0]);
|
34601
|
+
const englishValue = pluralize(value, unit);
|
34602
|
+
englishValues.push(englishValue);
|
34603
|
+
if (!rounded) {
|
34604
|
+
rounded = qualified = englishValue;
|
34605
|
+
if (i > 4) {
|
34606
|
+
return
|
34607
|
+
}
|
34608
|
+
//is it a 'almost' something, etc?
|
34609
|
+
const nextUnit = units[i + 1];
|
34610
|
+
const nextValue = Math.abs(diff[nextUnit]);
|
34611
|
+
if (nextValue > qualifiers[nextUnit].almost) {
|
34612
|
+
rounded = pluralize(value + 1, unit);
|
34613
|
+
qualified = 'almost ' + rounded;
|
34614
|
+
} else if (nextValue > qualifiers[nextUnit].over) {
|
34615
|
+
qualified = 'over ' + englishValue;
|
34616
|
+
}
|
34617
|
+
}
|
34618
|
+
});
|
34619
|
+
return { qualified, rounded, abbreviated, englishValues }
|
34620
|
+
};
|
34621
|
+
|
34622
|
+
//by spencermountain + Shaun Grady
|
34623
|
+
|
34624
|
+
//create the human-readable diff between the two dates
|
34625
|
+
const since = (start, end) => {
|
34626
|
+
end = beADate(end, start);
|
34627
|
+
const diff = getDiff(start, end);
|
34628
|
+
const isNow = Object.keys(diff).every((u) => !diff[u]);
|
34629
|
+
if (isNow === true) {
|
34630
|
+
return {
|
34631
|
+
diff,
|
34632
|
+
rounded: 'now',
|
34633
|
+
qualified: 'now',
|
34634
|
+
precise: 'now',
|
34635
|
+
abbreviated: [],
|
34636
|
+
iso: 'P0Y0M0DT0H0M0S',
|
34637
|
+
direction: 'present',
|
34638
|
+
}
|
34639
|
+
}
|
34640
|
+
let precise;
|
34641
|
+
let direction = 'future';
|
34642
|
+
|
34643
|
+
let { rounded, qualified, englishValues, abbreviated } = toSoft(diff);
|
34644
|
+
|
34645
|
+
//make them into a string
|
34646
|
+
precise = englishValues.splice(0, 2).join(', ');
|
34647
|
+
//handle before/after logic
|
34648
|
+
if (start.isAfter(end) === true) {
|
34649
|
+
rounded += ' ago';
|
34650
|
+
qualified += ' ago';
|
34651
|
+
precise += ' ago';
|
34652
|
+
direction = 'past';
|
34653
|
+
} else {
|
34654
|
+
rounded = 'in ' + rounded;
|
34655
|
+
qualified = 'in ' + qualified;
|
34656
|
+
precise = 'in ' + precise;
|
34657
|
+
}
|
34658
|
+
// https://en.wikipedia.org/wiki/ISO_8601#Durations
|
34659
|
+
// P[n]Y[n]M[n]DT[n]H[n]M[n]S
|
34660
|
+
let iso = toISO(diff);
|
34661
|
+
return {
|
34662
|
+
diff,
|
34663
|
+
rounded,
|
34664
|
+
qualified,
|
34665
|
+
precise,
|
34666
|
+
abbreviated,
|
34667
|
+
iso,
|
34668
|
+
direction,
|
34669
|
+
}
|
34670
|
+
};
|
34671
|
+
|
34672
|
+
//https://www.timeanddate.com/calendar/aboutseasons.html
|
34673
|
+
// Spring - from March 1 to May 31;
|
34674
|
+
// Summer - from June 1 to August 31;
|
34675
|
+
// Fall (autumn) - from September 1 to November 30; and,
|
34676
|
+
// Winter - from December 1 to February 28 (February 29 in a leap year).
|
34677
|
+
const north = [
|
34678
|
+
['spring', 2, 1],
|
34679
|
+
['summer', 5, 1],
|
34680
|
+
['fall', 8, 1],
|
34681
|
+
['autumn', 8, 1],
|
34682
|
+
['winter', 11, 1] //dec 1
|
34683
|
+
];
|
34684
|
+
const south = [
|
34685
|
+
['fall', 2, 1],
|
34686
|
+
['autumn', 2, 1],
|
34687
|
+
['winter', 5, 1],
|
34688
|
+
['spring', 8, 1],
|
34689
|
+
['summer', 11, 1] //dec 1
|
34690
|
+
];
|
34691
|
+
|
34692
|
+
const seasons = { north, south };
|
34693
|
+
|
34694
|
+
const quarters = [
|
34695
|
+
null,
|
34696
|
+
[0, 1], //jan 1
|
34697
|
+
[3, 1], //apr 1
|
34698
|
+
[6, 1], //july 1
|
34699
|
+
[9, 1] //oct 1
|
34700
|
+
];
|
34701
|
+
|
34702
|
+
const units$1 = {
|
34703
|
+
minute: (s) => {
|
34704
|
+
walkTo(s, {
|
34705
|
+
second: 0,
|
34706
|
+
millisecond: 0
|
34707
|
+
});
|
34708
|
+
return s
|
34709
|
+
},
|
34710
|
+
quarterhour: (s) => {
|
34711
|
+
let minute = s.minutes();
|
34712
|
+
if (minute >= 45) {
|
34713
|
+
s = s.minutes(45);
|
34714
|
+
} else if (minute >= 30) {
|
34715
|
+
s = s.minutes(30);
|
34716
|
+
} else if (minute >= 15) {
|
34717
|
+
s = s.minutes(15);
|
34718
|
+
} else {
|
34719
|
+
s = s.minutes(0);
|
34720
|
+
}
|
34721
|
+
walkTo(s, {
|
34722
|
+
second: 0,
|
34723
|
+
millisecond: 0
|
34724
|
+
});
|
34725
|
+
return s
|
34726
|
+
},
|
34727
|
+
hour: (s) => {
|
34728
|
+
walkTo(s, {
|
34729
|
+
minute: 0,
|
34730
|
+
second: 0,
|
34731
|
+
millisecond: 0
|
34732
|
+
});
|
34733
|
+
return s
|
34734
|
+
},
|
34735
|
+
day: (s) => {
|
34736
|
+
walkTo(s, {
|
34737
|
+
hour: 0,
|
34738
|
+
minute: 0,
|
34739
|
+
second: 0,
|
34740
|
+
millisecond: 0
|
34741
|
+
});
|
34742
|
+
return s
|
34743
|
+
},
|
34744
|
+
week: (s) => {
|
34745
|
+
let original = s.clone();
|
34746
|
+
s = s.day(s._weekStart); //monday
|
34747
|
+
if (s.isAfter(original)) {
|
34748
|
+
s = s.subtract(1, 'week');
|
34749
|
+
}
|
34750
|
+
walkTo(s, {
|
34751
|
+
hour: 0,
|
34752
|
+
minute: 0,
|
34753
|
+
second: 0,
|
34754
|
+
millisecond: 0
|
34755
|
+
});
|
34756
|
+
return s
|
34757
|
+
},
|
34758
|
+
month: (s) => {
|
34759
|
+
walkTo(s, {
|
34760
|
+
date: 1,
|
34761
|
+
hour: 0,
|
34762
|
+
minute: 0,
|
34763
|
+
second: 0,
|
34764
|
+
millisecond: 0
|
34765
|
+
});
|
34766
|
+
return s
|
34767
|
+
},
|
34768
|
+
quarter: (s) => {
|
34769
|
+
let q = s.quarter();
|
34770
|
+
if (quarters[q]) {
|
34771
|
+
walkTo(s, {
|
34772
|
+
month: quarters[q][0],
|
34773
|
+
date: quarters[q][1],
|
34774
|
+
hour: 0,
|
34775
|
+
minute: 0,
|
34776
|
+
second: 0,
|
34777
|
+
millisecond: 0
|
34778
|
+
});
|
34779
|
+
}
|
34780
|
+
return s
|
34781
|
+
},
|
34782
|
+
season: (s) => {
|
34783
|
+
let current = s.season();
|
34784
|
+
let hem = 'north';
|
34785
|
+
if (s.hemisphere() === 'South') {
|
34786
|
+
hem = 'south';
|
34787
|
+
}
|
34788
|
+
for (let i = 0; i < seasons[hem].length; i++) {
|
34789
|
+
if (seasons[hem][i][0] === current) {
|
34790
|
+
//winter goes between years
|
34791
|
+
let year = s.year();
|
34792
|
+
if (current === 'winter' && s.month() < 3) {
|
34793
|
+
year -= 1;
|
34794
|
+
}
|
34795
|
+
walkTo(s, {
|
34796
|
+
year,
|
34797
|
+
month: seasons[hem][i][1],
|
34798
|
+
date: seasons[hem][i][2],
|
34799
|
+
hour: 0,
|
34800
|
+
minute: 0,
|
34801
|
+
second: 0,
|
34802
|
+
millisecond: 0
|
34803
|
+
});
|
34804
|
+
return s
|
34805
|
+
}
|
34806
|
+
}
|
34807
|
+
return s
|
34808
|
+
},
|
34809
|
+
year: (s) => {
|
34810
|
+
walkTo(s, {
|
34811
|
+
month: 0,
|
34812
|
+
date: 1,
|
34813
|
+
hour: 0,
|
34814
|
+
minute: 0,
|
34815
|
+
second: 0,
|
34816
|
+
millisecond: 0
|
34817
|
+
});
|
34818
|
+
return s
|
34819
|
+
},
|
34820
|
+
decade: (s) => {
|
34821
|
+
s = s.startOf('year');
|
34822
|
+
let year = s.year();
|
34823
|
+
let decade = parseInt(year / 10, 10) * 10;
|
34824
|
+
s = s.year(decade);
|
34825
|
+
return s
|
34826
|
+
},
|
34827
|
+
century: (s) => {
|
34828
|
+
s = s.startOf('year');
|
34829
|
+
let year = s.year();
|
34830
|
+
// near 0AD goes '-1 | +1'
|
34831
|
+
let decade = parseInt(year / 100, 10) * 100;
|
34832
|
+
s = s.year(decade);
|
34833
|
+
return s
|
34834
|
+
}
|
34835
|
+
};
|
34836
|
+
units$1.date = units$1.day;
|
34837
|
+
|
34838
|
+
const startOf$1 = (a, unit) => {
|
34839
|
+
let s = a.clone();
|
34840
|
+
unit = normalize$2(unit);
|
34841
|
+
if (units$1[unit]) {
|
34842
|
+
return units$1[unit](s)
|
34843
|
+
}
|
34844
|
+
if (unit === 'summer' || unit === 'winter') {
|
34845
|
+
s = s.season(unit);
|
34846
|
+
return units$1.season(s)
|
34847
|
+
}
|
34848
|
+
return s
|
34849
|
+
};
|
34850
|
+
|
34851
|
+
//piggy-backs off startOf
|
34852
|
+
const endOf$1 = (a, unit) => {
|
34853
|
+
let s = a.clone();
|
34854
|
+
unit = normalize$2(unit);
|
34855
|
+
if (units$1[unit]) {
|
34856
|
+
// go to beginning, go to next one, step back 1ms
|
34857
|
+
s = units$1[unit](s); // startof
|
34858
|
+
s = s.add(1, unit);
|
34859
|
+
s = s.subtract(1, 'millisecond');
|
34860
|
+
return s
|
34861
|
+
}
|
34862
|
+
return s
|
34863
|
+
};
|
34864
|
+
|
34865
|
+
//is it 'wednesday'?
|
34866
|
+
const isDay = function (unit) {
|
34867
|
+
if (short().find((s) => s === unit)) {
|
34868
|
+
return true
|
34869
|
+
}
|
34870
|
+
if (long().find((s) => s === unit)) {
|
34871
|
+
return true
|
34872
|
+
}
|
34873
|
+
return false
|
34874
|
+
};
|
34875
|
+
|
34876
|
+
// return a list of the weeks/months/days between a -> b
|
34877
|
+
// returns spacetime objects in the timezone of the input
|
34878
|
+
const every = function (start, unit, end) {
|
34879
|
+
if (!unit || !end) {
|
34880
|
+
return []
|
34881
|
+
}
|
34882
|
+
//cleanup unit param
|
34883
|
+
unit = normalize$2(unit);
|
34884
|
+
//cleanup to param
|
34885
|
+
end = start.clone().set(end);
|
34886
|
+
//swap them, if they're backwards
|
34887
|
+
if (start.isAfter(end)) {
|
34888
|
+
let tmp = start;
|
34889
|
+
start = end;
|
34890
|
+
end = tmp;
|
34891
|
+
}
|
34892
|
+
|
34893
|
+
//support 'every wednesday'
|
34894
|
+
let d = start.clone();
|
34895
|
+
if (isDay(unit)) {
|
34896
|
+
d = d.next(unit);
|
34897
|
+
unit = 'week';
|
34898
|
+
} else {
|
34899
|
+
let first = d.startOf(unit);
|
34900
|
+
if (first.isBefore(start)) {
|
34901
|
+
d = d.next(unit);
|
34902
|
+
}
|
34903
|
+
}
|
34904
|
+
//okay, actually start doing it
|
34905
|
+
let result = [];
|
34906
|
+
while (d.isBefore(end)) {
|
34907
|
+
result.push(d);
|
34908
|
+
d = d.add(1, unit);
|
34909
|
+
}
|
34910
|
+
return result
|
34911
|
+
};
|
34912
|
+
|
34913
|
+
const parseDst = dst => {
|
34914
|
+
if (!dst) {
|
34915
|
+
return []
|
34916
|
+
}
|
34917
|
+
return dst.split('->')
|
34918
|
+
};
|
34919
|
+
|
34920
|
+
//iana codes are case-sensitive, technically
|
34921
|
+
const titleCase = str => {
|
34922
|
+
str = str[0].toUpperCase() + str.substr(1);
|
34923
|
+
str = str.replace(/[\/_-]([a-z])/gi, s => {
|
34924
|
+
return s.toUpperCase()
|
34925
|
+
});
|
34926
|
+
str = str.replace(/_(of|es)_/i, (s) => s.toLowerCase());
|
34927
|
+
str = str.replace(/\/gmt/i, '/GMT');
|
34928
|
+
str = str.replace(/\/Dumontdurville$/i, '/DumontDUrville');
|
34929
|
+
str = str.replace(/\/Mcmurdo$/i, '/McMurdo');
|
34930
|
+
str = str.replace(/\/Port-au-prince$/i, '/Port-au-Prince');
|
34931
|
+
return str
|
34932
|
+
};
|
34933
|
+
|
34934
|
+
//get metadata about this timezone
|
34935
|
+
const timezone$1 = s => {
|
34936
|
+
let zones = s.timezones;
|
34937
|
+
let tz = s.tz;
|
34938
|
+
if (zones.hasOwnProperty(tz) === false) {
|
34939
|
+
tz = lookupTz(s.tz, zones);
|
34940
|
+
}
|
34941
|
+
if (tz === null) {
|
34942
|
+
if (s.silent === false) {
|
34943
|
+
console.warn("Warn: could not find given or local timezone - '" + s.tz + "'");
|
34944
|
+
}
|
34945
|
+
return {
|
34946
|
+
current: {
|
34947
|
+
epochShift: 0
|
34948
|
+
}
|
34949
|
+
}
|
34950
|
+
}
|
34951
|
+
let found = zones[tz];
|
34952
|
+
let result = {
|
34953
|
+
name: titleCase(tz),
|
34954
|
+
hasDst: Boolean(found.dst),
|
34955
|
+
default_offset: found.offset,
|
34956
|
+
//do north-hemisphere version as default (sorry!)
|
34957
|
+
hemisphere: found.hem === 's' ? 'South' : 'North',
|
34958
|
+
current: {}
|
34959
|
+
};
|
34960
|
+
|
34961
|
+
if (result.hasDst) {
|
34962
|
+
let arr = parseDst(found.dst);
|
34963
|
+
result.change = {
|
34964
|
+
start: arr[0],
|
34965
|
+
back: arr[1]
|
34966
|
+
};
|
34967
|
+
}
|
34968
|
+
//find the offsets for summer/winter times
|
34969
|
+
//(these variable names are north-centric)
|
34970
|
+
let summer = found.offset; // (july)
|
34971
|
+
let winter = summer; // (january) assume it's the same for now
|
34972
|
+
if (result.hasDst === true) {
|
34973
|
+
if (result.hemisphere === 'North') {
|
34974
|
+
winter = summer - 1;
|
34975
|
+
} else {
|
34976
|
+
//southern hemisphere
|
34977
|
+
winter = found.offset + 1;
|
34978
|
+
}
|
34979
|
+
}
|
34980
|
+
|
34981
|
+
//find out which offset to use right now
|
34982
|
+
//use 'summer' time july-time
|
34983
|
+
if (result.hasDst === false) {
|
34984
|
+
result.current.offset = summer;
|
34985
|
+
result.current.isDST = false;
|
34986
|
+
} else if (inSummerTime(s.epoch, result.change.start, result.change.back, summer, winter) === true) {
|
34987
|
+
result.current.offset = summer;
|
34988
|
+
result.current.isDST = result.hemisphere === 'North'; //dst 'on' in winter in north
|
34989
|
+
} else {
|
34990
|
+
//use 'winter' january-time
|
34991
|
+
result.current.offset = winter;
|
34992
|
+
result.current.isDST = result.hemisphere === 'South'; //dst 'on' in summer in south
|
34993
|
+
}
|
34994
|
+
return result
|
34995
|
+
};
|
34996
|
+
|
34997
|
+
const units = [
|
34998
|
+
'century',
|
34999
|
+
'decade',
|
35000
|
+
'year',
|
35001
|
+
'month',
|
35002
|
+
'date',
|
35003
|
+
'day',
|
35004
|
+
'hour',
|
35005
|
+
'minute',
|
35006
|
+
'second',
|
35007
|
+
'millisecond'
|
35008
|
+
];
|
35009
|
+
|
35010
|
+
//the spacetime instance methods (also, the API)
|
35011
|
+
const methods$4 = {
|
35012
|
+
set: function (input, tz) {
|
35013
|
+
let s = this.clone();
|
35014
|
+
s = parseInput(s, input, null);
|
35015
|
+
if (tz) {
|
35016
|
+
this.tz = lookupTz(tz);
|
35017
|
+
}
|
35018
|
+
return s
|
35019
|
+
},
|
35020
|
+
timezone: function () {
|
35021
|
+
return timezone$1(this)
|
35022
|
+
},
|
35023
|
+
isDST: function () {
|
35024
|
+
return timezone$1(this).current.isDST
|
35025
|
+
},
|
35026
|
+
hasDST: function () {
|
35027
|
+
return timezone$1(this).hasDst
|
35028
|
+
},
|
35029
|
+
offset: function () {
|
35030
|
+
return timezone$1(this).current.offset * 60
|
35031
|
+
},
|
35032
|
+
hemisphere: function () {
|
35033
|
+
return timezone$1(this).hemisphere
|
35034
|
+
},
|
35035
|
+
format: function (fmt) {
|
35036
|
+
return printFormat(this, fmt)
|
35037
|
+
},
|
35038
|
+
unixFmt: function (fmt) {
|
35039
|
+
return unixFmt(this, fmt)
|
35040
|
+
},
|
35041
|
+
startOf: function (unit) {
|
35042
|
+
return startOf$1(this, unit)
|
35043
|
+
},
|
35044
|
+
endOf: function (unit) {
|
35045
|
+
return endOf$1(this, unit)
|
35046
|
+
},
|
35047
|
+
leapYear: function () {
|
35048
|
+
let year = this.year();
|
35049
|
+
return isLeapYear(year)
|
35050
|
+
},
|
35051
|
+
progress: function (unit) {
|
35052
|
+
return progress(this, unit)
|
35053
|
+
},
|
35054
|
+
nearest: function (unit) {
|
35055
|
+
return nearest(this, unit)
|
35056
|
+
},
|
35057
|
+
diff: function (d, unit) {
|
35058
|
+
return main$1(this, d, unit)
|
35059
|
+
},
|
35060
|
+
since: function (d) {
|
35061
|
+
if (!d) {
|
35062
|
+
d = this.clone().set();
|
35063
|
+
}
|
35064
|
+
return since(this, d)
|
35065
|
+
},
|
35066
|
+
next: function (unit) {
|
35067
|
+
let s = this.add(1, unit);
|
35068
|
+
return s.startOf(unit)
|
35069
|
+
},
|
35070
|
+
//the start of the previous year/week/century
|
35071
|
+
last: function (unit) {
|
35072
|
+
let s = this.subtract(1, unit);
|
35073
|
+
return s.startOf(unit)
|
35074
|
+
},
|
35075
|
+
isValid: function () {
|
35076
|
+
//null/undefined epochs
|
35077
|
+
if (!this.epoch && this.epoch !== 0) {
|
35078
|
+
return false
|
35079
|
+
}
|
35080
|
+
return !isNaN(this.d.getTime())
|
35081
|
+
},
|
35082
|
+
//travel to this timezone
|
35083
|
+
goto: function (tz) {
|
35084
|
+
let s = this.clone();
|
35085
|
+
s.tz = lookupTz(tz, s.timezones); //science!
|
35086
|
+
return s
|
35087
|
+
},
|
35088
|
+
//get each week/month/day between a -> b
|
35089
|
+
every: function (unit, to) {
|
35090
|
+
// allow swapping these params:
|
35091
|
+
if (typeof unit === 'object' && typeof to === 'string') {
|
35092
|
+
let tmp = to;
|
35093
|
+
to = unit;
|
35094
|
+
unit = tmp;
|
35095
|
+
}
|
35096
|
+
return every(this, unit, to)
|
35097
|
+
},
|
35098
|
+
isAwake: function () {
|
35099
|
+
let hour = this.hour();
|
35100
|
+
//10pm -> 8am
|
35101
|
+
if (hour < 8 || hour > 22) {
|
35102
|
+
return false
|
35103
|
+
}
|
35104
|
+
return true
|
35105
|
+
},
|
35106
|
+
isAsleep: function () {
|
35107
|
+
return !this.isAwake()
|
35108
|
+
},
|
35109
|
+
daysInMonth: function () {
|
35110
|
+
switch (this.month()) {
|
35111
|
+
case 0:
|
35112
|
+
return 31
|
35113
|
+
case 1:
|
35114
|
+
return this.leapYear() ? 29 : 28
|
35115
|
+
case 2:
|
35116
|
+
return 31
|
35117
|
+
case 3:
|
35118
|
+
return 30
|
35119
|
+
case 4:
|
35120
|
+
return 31
|
35121
|
+
case 5:
|
35122
|
+
return 30
|
35123
|
+
case 6:
|
35124
|
+
return 31
|
35125
|
+
case 7:
|
35126
|
+
return 31
|
35127
|
+
case 8:
|
35128
|
+
return 30
|
35129
|
+
case 9:
|
35130
|
+
return 31
|
35131
|
+
case 10:
|
35132
|
+
return 30
|
35133
|
+
case 11:
|
35134
|
+
return 31
|
35135
|
+
default:
|
35136
|
+
throw new Error('Invalid Month state.')
|
35137
|
+
}
|
35138
|
+
},
|
35139
|
+
//pretty-printing
|
35140
|
+
log: function () {
|
35141
|
+
console.log('');
|
35142
|
+
console.log(printFormat(this, 'nice-short'));
|
35143
|
+
return this
|
35144
|
+
},
|
35145
|
+
logYear: function () {
|
35146
|
+
console.log('');
|
35147
|
+
console.log(printFormat(this, 'full-short'));
|
35148
|
+
return this
|
35149
|
+
},
|
35150
|
+
json: function () {
|
35151
|
+
return units.reduce((h, unit) => {
|
35152
|
+
h[unit] = this[unit]();
|
35153
|
+
return h
|
35154
|
+
}, {})
|
35155
|
+
},
|
35156
|
+
debug: function () {
|
35157
|
+
let tz = this.timezone();
|
35158
|
+
let date = this.format('MM') + ' ' + this.format('date-ordinal') + ' ' + this.year();
|
35159
|
+
date += '\n - ' + this.format('time');
|
35160
|
+
console.log('\n\n', date + '\n - ' + tz.name + ' (' + tz.current.offset + ')');
|
35161
|
+
return this
|
35162
|
+
},
|
35163
|
+
//alias of 'since' but opposite - like moment.js
|
35164
|
+
from: function (d) {
|
35165
|
+
d = this.clone().set(d);
|
35166
|
+
return d.since(this)
|
35167
|
+
},
|
35168
|
+
fromNow: function () {
|
35169
|
+
let d = this.clone().set(Date.now());
|
35170
|
+
return d.since(this)
|
35171
|
+
},
|
35172
|
+
weekStart: function (input) {
|
35173
|
+
//accept a number directly
|
35174
|
+
if (typeof input === 'number') {
|
35175
|
+
this._weekStart = input;
|
35176
|
+
return this
|
35177
|
+
}
|
35178
|
+
if (typeof input === 'string') {
|
35179
|
+
// accept 'wednesday'
|
35180
|
+
input = input.toLowerCase().trim();
|
35181
|
+
let num = short().indexOf(input);
|
35182
|
+
if (num === -1) {
|
35183
|
+
num = long().indexOf(input);
|
35184
|
+
}
|
35185
|
+
if (num === -1) {
|
35186
|
+
num = 1; //go back to default
|
35187
|
+
}
|
35188
|
+
this._weekStart = num;
|
35189
|
+
} else {
|
35190
|
+
console.warn('Spacetime Error: Cannot understand .weekStart() input:', input);
|
35191
|
+
}
|
35192
|
+
return this
|
35193
|
+
}
|
35194
|
+
};
|
35195
|
+
// aliases
|
35196
|
+
methods$4.inDST = methods$4.isDST;
|
35197
|
+
methods$4.round = methods$4.nearest;
|
35198
|
+
methods$4.each = methods$4.every;
|
35199
|
+
|
35200
|
+
// javascript setX methods like setDate() can't be used because of the local bias
|
35201
|
+
|
35202
|
+
const validate$1 = (n) => {
|
35203
|
+
//handle number as a string
|
35204
|
+
if (typeof n === 'string') {
|
35205
|
+
n = parseInt(n, 10);
|
35206
|
+
}
|
35207
|
+
return n
|
35208
|
+
};
|
35209
|
+
|
35210
|
+
const order$2 = ['year', 'month', 'date', 'hour', 'minute', 'second', 'millisecond'];
|
35211
|
+
|
35212
|
+
//reduce hostile micro-changes when moving dates by millisecond
|
35213
|
+
const confirm$1 = (s, tmp, unit) => {
|
35214
|
+
let n = order$2.indexOf(unit);
|
35215
|
+
let arr = order$2.slice(n, order$2.length);
|
35216
|
+
for (let i = 0; i < arr.length; i++) {
|
35217
|
+
let want = tmp[arr[i]]();
|
35218
|
+
s[arr[i]](want);
|
35219
|
+
}
|
35220
|
+
return s
|
35221
|
+
};
|
35222
|
+
|
35223
|
+
// allow specifying setter direction
|
35224
|
+
const fwdBkwd = function (s, old, goFwd, unit) {
|
35225
|
+
if (goFwd === true && s.isBefore(old)) {
|
35226
|
+
s = s.add(1, unit);
|
35227
|
+
} else if (goFwd === false && s.isAfter(old)) {
|
35228
|
+
s = s.minus(1, unit);
|
35229
|
+
}
|
35230
|
+
return s
|
35231
|
+
};
|
35232
|
+
|
35233
|
+
const milliseconds = function (s, n) {
|
35234
|
+
n = validate$1(n);
|
35235
|
+
let current = s.millisecond();
|
35236
|
+
let diff = current - n; //milliseconds to shift by
|
35237
|
+
return s.epoch - diff
|
35238
|
+
};
|
35239
|
+
|
35240
|
+
const seconds = function (s, n, goFwd) {
|
35241
|
+
n = validate$1(n);
|
35242
|
+
let old = s.clone();
|
35243
|
+
let diff = s.second() - n;
|
35244
|
+
let shift = diff * o.second;
|
35245
|
+
s.epoch = s.epoch - shift;
|
35246
|
+
s = fwdBkwd(s, old, goFwd, 'minute'); // specify direction
|
35247
|
+
return s.epoch
|
35248
|
+
};
|
35249
|
+
|
35250
|
+
const minutes = function (s, n, goFwd) {
|
35251
|
+
n = validate$1(n);
|
35252
|
+
let old = s.clone();
|
35253
|
+
let diff = s.minute() - n;
|
35254
|
+
let shift = diff * o.minute;
|
35255
|
+
s.epoch -= shift;
|
35256
|
+
confirm$1(s, old, 'second');
|
35257
|
+
s = fwdBkwd(s, old, goFwd, 'hour'); // specify direction
|
35258
|
+
return s.epoch
|
35259
|
+
};
|
35260
|
+
|
35261
|
+
const hours = function (s, n, goFwd) {
|
35262
|
+
n = validate$1(n);
|
35263
|
+
if (n >= 24) {
|
35264
|
+
n = 24;
|
35265
|
+
} else if (n < 0) {
|
35266
|
+
n = 0;
|
35267
|
+
}
|
35268
|
+
let old = s.clone();
|
35269
|
+
let diff = s.hour() - n;
|
35270
|
+
let shift = diff * o.hour;
|
35271
|
+
s.epoch -= shift;
|
35272
|
+
// oops, did we change the day?
|
35273
|
+
if (s.date() !== old.date()) {
|
35274
|
+
s = old.clone();
|
35275
|
+
if (diff > 1) {
|
35276
|
+
diff -= 1;
|
35277
|
+
}
|
35278
|
+
if (diff < 1) {
|
35279
|
+
diff += 1;
|
35280
|
+
}
|
35281
|
+
shift = diff * o.hour;
|
35282
|
+
s.epoch -= shift;
|
35283
|
+
}
|
35284
|
+
walkTo(s, {
|
35285
|
+
hour: n
|
35286
|
+
});
|
35287
|
+
confirm$1(s, old, 'minute');
|
35288
|
+
s = fwdBkwd(s, old, goFwd, 'day'); // specify direction
|
35289
|
+
return s.epoch
|
35290
|
+
};
|
35291
|
+
|
35292
|
+
const time = function (s, str, goFwd) {
|
35293
|
+
let m = str.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);
|
35294
|
+
if (!m) {
|
35295
|
+
//fallback to support just '2am'
|
35296
|
+
m = str.match(/([0-9]{1,2}) ?(am|pm)/);
|
35297
|
+
if (!m) {
|
35298
|
+
return s.epoch
|
35299
|
+
}
|
35300
|
+
m.splice(2, 0, '0'); //add implicit 0 minutes
|
35301
|
+
m.splice(3, 0, ''); //add implicit seconds
|
35302
|
+
}
|
35303
|
+
let h24 = false;
|
35304
|
+
let hour = parseInt(m[1], 10);
|
35305
|
+
let minute = parseInt(m[2], 10);
|
35306
|
+
if (minute >= 60) {
|
35307
|
+
minute = 59;
|
35308
|
+
}
|
35309
|
+
if (hour > 12) {
|
35310
|
+
h24 = true;
|
35311
|
+
}
|
35312
|
+
//make the hour into proper 24h time
|
35313
|
+
if (h24 === false) {
|
35314
|
+
if (m[4] === 'am' && hour === 12) {
|
35315
|
+
//12am is midnight
|
35316
|
+
hour = 0;
|
35317
|
+
}
|
35318
|
+
if (m[4] === 'pm' && hour < 12) {
|
35319
|
+
//12pm is noon
|
35320
|
+
hour += 12;
|
35321
|
+
}
|
35322
|
+
}
|
35323
|
+
// handle seconds
|
35324
|
+
m[3] = m[3] || '';
|
35325
|
+
m[3] = m[3].replace(/:/, '');
|
35326
|
+
let sec = parseInt(m[3], 10) || 0;
|
35327
|
+
let old = s.clone();
|
35328
|
+
s = s.hour(hour);
|
35329
|
+
s = s.minute(minute);
|
35330
|
+
s = s.second(sec);
|
35331
|
+
s = s.millisecond(0);
|
35332
|
+
s = fwdBkwd(s, old, goFwd, 'day'); // specify direction
|
35333
|
+
return s.epoch
|
35334
|
+
};
|
35335
|
+
|
35336
|
+
const date = function (s, n, goFwd) {
|
35337
|
+
n = validate$1(n);
|
35338
|
+
//avoid setting february 31st
|
35339
|
+
if (n > 28) {
|
35340
|
+
let month = s.month();
|
35341
|
+
let max = monthLengths[month];
|
35342
|
+
// support leap day in february
|
35343
|
+
if (month === 1 && n === 29 && isLeapYear(s.year())) {
|
35344
|
+
max = 29;
|
35345
|
+
}
|
35346
|
+
if (n > max) {
|
35347
|
+
n = max;
|
35348
|
+
}
|
35349
|
+
}
|
35350
|
+
//avoid setting < 0
|
35351
|
+
if (n <= 0) {
|
35352
|
+
n = 1;
|
35353
|
+
}
|
35354
|
+
let old = s.clone();
|
35355
|
+
walkTo(s, {
|
35356
|
+
date: n
|
35357
|
+
});
|
35358
|
+
s = fwdBkwd(s, old, goFwd, 'month'); // specify direction
|
35359
|
+
return s.epoch
|
35360
|
+
};
|
35361
|
+
|
35362
|
+
const month = function (s, n, goFwd) {
|
35363
|
+
if (typeof n === 'string') {
|
35364
|
+
if (n === 'sept') {
|
35365
|
+
n = 'sep';
|
35366
|
+
}
|
35367
|
+
n = mapping$1()[n.toLowerCase()];
|
35368
|
+
}
|
35369
|
+
n = validate$1(n);
|
35370
|
+
//don't go past december
|
35371
|
+
if (n >= 12) {
|
35372
|
+
n = 11;
|
35373
|
+
}
|
35374
|
+
if (n <= 0) {
|
35375
|
+
n = 0;
|
35376
|
+
}
|
35377
|
+
|
35378
|
+
let d = s.date();
|
35379
|
+
//there's no 30th of february, etc.
|
35380
|
+
if (d > monthLengths[n]) {
|
35381
|
+
//make it as close as we can..
|
35382
|
+
d = monthLengths[n];
|
35383
|
+
}
|
35384
|
+
let old = s.clone();
|
35385
|
+
walkTo(s, {
|
35386
|
+
month: n,
|
35387
|
+
d
|
35388
|
+
});
|
35389
|
+
s = fwdBkwd(s, old, goFwd, 'year'); // specify direction
|
35390
|
+
return s.epoch
|
35391
|
+
};
|
35392
|
+
|
35393
|
+
const year = function (s, n) {
|
35394
|
+
// support '97
|
35395
|
+
if (typeof n === 'string' && /^'[0-9]{2}$/.test(n)) {
|
35396
|
+
n = n.replace(/'/, '').trim();
|
35397
|
+
n = Number(n);
|
35398
|
+
// '89 is 1989
|
35399
|
+
if (n > 30) {
|
35400
|
+
//change this in 10y
|
35401
|
+
n = 1900 + n;
|
35402
|
+
} else {
|
35403
|
+
// '12 is 2012
|
35404
|
+
n = 2000 + n;
|
35405
|
+
}
|
35406
|
+
}
|
35407
|
+
n = validate$1(n);
|
35408
|
+
walkTo(s, {
|
35409
|
+
year: n
|
35410
|
+
});
|
35411
|
+
return s.epoch
|
35412
|
+
};
|
35413
|
+
|
35414
|
+
const week = function (s, n, goFwd) {
|
35415
|
+
let old = s.clone();
|
35416
|
+
n = validate$1(n);
|
35417
|
+
s = s.month(0);
|
35418
|
+
s = s.date(1);
|
35419
|
+
s = s.day('monday');
|
35420
|
+
//first week starts first Thurs in Jan
|
35421
|
+
// so mon dec 28th is 1st week
|
35422
|
+
// so mon dec 29th is not the week
|
35423
|
+
if (s.monthName() === 'december' && s.date() >= 28) {
|
35424
|
+
s = s.add(1, 'week');
|
35425
|
+
}
|
35426
|
+
n -= 1; //1-based
|
35427
|
+
s = s.add(n, 'weeks');
|
35428
|
+
s = fwdBkwd(s, old, goFwd, 'year'); // specify direction
|
35429
|
+
return s.epoch
|
35430
|
+
};
|
35431
|
+
|
35432
|
+
const dayOfYear$1 = function (s, n, goFwd) {
|
35433
|
+
n = validate$1(n);
|
35434
|
+
let old = s.clone();
|
35435
|
+
n -= 1; //days are 1-based
|
35436
|
+
if (n <= 0) {
|
35437
|
+
n = 0;
|
35438
|
+
} else if (n >= 365) {
|
35439
|
+
n = 364;
|
35440
|
+
}
|
35441
|
+
s = s.startOf('year');
|
35442
|
+
s = s.add(n, 'day');
|
35443
|
+
confirm$1(s, old, 'hour');
|
35444
|
+
s = fwdBkwd(s, old, goFwd, 'year'); // specify direction
|
35445
|
+
return s.epoch
|
35446
|
+
};
|
35447
|
+
|
35448
|
+
let morning = 'am';
|
35449
|
+
let evening = 'pm';
|
35450
|
+
|
35451
|
+
function am() { return morning }
|
35452
|
+
function pm$1() { return evening }
|
35453
|
+
function set(i18n) {
|
35454
|
+
morning = i18n.am || morning;
|
35455
|
+
evening = i18n.pm || evening;
|
35456
|
+
}
|
35457
|
+
|
35458
|
+
const methods$3 = {
|
35459
|
+
millisecond: function (num) {
|
35460
|
+
if (num !== undefined) {
|
35461
|
+
let s = this.clone();
|
35462
|
+
s.epoch = milliseconds(s, num);
|
35463
|
+
return s
|
35464
|
+
}
|
35465
|
+
return this.d.getMilliseconds()
|
35466
|
+
},
|
35467
|
+
second: function (num, goFwd) {
|
35468
|
+
if (num !== undefined) {
|
35469
|
+
let s = this.clone();
|
35470
|
+
s.epoch = seconds(s, num, goFwd);
|
35471
|
+
return s
|
35472
|
+
}
|
35473
|
+
return this.d.getSeconds()
|
35474
|
+
},
|
35475
|
+
minute: function (num, goFwd) {
|
35476
|
+
if (num !== undefined) {
|
35477
|
+
let s = this.clone();
|
35478
|
+
s.epoch = minutes(s, num, goFwd);
|
35479
|
+
return s
|
35480
|
+
}
|
35481
|
+
return this.d.getMinutes()
|
35482
|
+
},
|
35483
|
+
hour: function (num, goFwd) {
|
35484
|
+
let d = this.d;
|
35485
|
+
if (num !== undefined) {
|
35486
|
+
let s = this.clone();
|
35487
|
+
s.epoch = hours(s, num, goFwd);
|
35488
|
+
return s
|
35489
|
+
}
|
35490
|
+
return d.getHours()
|
35491
|
+
},
|
35492
|
+
|
35493
|
+
//'3:30' is 3.5
|
35494
|
+
hourFloat: function (num, goFwd) {
|
35495
|
+
if (num !== undefined) {
|
35496
|
+
let s = this.clone();
|
35497
|
+
let minute = num % 1;
|
35498
|
+
minute = minute * 60;
|
35499
|
+
let hour = parseInt(num, 10);
|
35500
|
+
s.epoch = hours(s, hour, goFwd);
|
35501
|
+
s.epoch = minutes(s, minute, goFwd);
|
35502
|
+
return s
|
35503
|
+
}
|
35504
|
+
let d = this.d;
|
35505
|
+
let hour = d.getHours();
|
35506
|
+
let minute = d.getMinutes();
|
35507
|
+
minute = minute / 60;
|
35508
|
+
return hour + minute
|
35509
|
+
},
|
35510
|
+
|
35511
|
+
// hour in 12h format
|
35512
|
+
hour12: function (str, goFwd) {
|
35513
|
+
let d = this.d;
|
35514
|
+
if (str !== undefined) {
|
35515
|
+
let s = this.clone();
|
35516
|
+
str = '' + str;
|
35517
|
+
let m = str.match(/^([0-9]+)(am|pm)$/);
|
35518
|
+
if (m) {
|
35519
|
+
let hour = parseInt(m[1], 10);
|
35520
|
+
if (m[2] === 'pm') {
|
35521
|
+
hour += 12;
|
35522
|
+
}
|
35523
|
+
s.epoch = hours(s, hour, goFwd);
|
35524
|
+
}
|
35525
|
+
return s
|
35526
|
+
}
|
35527
|
+
//get the hour
|
35528
|
+
let hour12 = d.getHours();
|
35529
|
+
if (hour12 > 12) {
|
35530
|
+
hour12 = hour12 - 12;
|
35531
|
+
}
|
35532
|
+
if (hour12 === 0) {
|
35533
|
+
hour12 = 12;
|
35534
|
+
}
|
35535
|
+
return hour12
|
35536
|
+
},
|
35537
|
+
|
35538
|
+
//some ambiguity here with 12/24h
|
35539
|
+
time: function (str, goFwd) {
|
35540
|
+
if (str !== undefined) {
|
35541
|
+
let s = this.clone();
|
35542
|
+
str = str.toLowerCase().trim();
|
35543
|
+
s.epoch = time(s, str, goFwd);
|
35544
|
+
return s
|
35545
|
+
}
|
35546
|
+
return `${this.h12()}:${zeroPad(this.minute())}${this.ampm()}`
|
35547
|
+
},
|
35548
|
+
|
35549
|
+
// either 'am' or 'pm'
|
35550
|
+
ampm: function (input, goFwd) {
|
35551
|
+
// let which = 'am'
|
35552
|
+
let which = am();
|
35553
|
+
let hour = this.hour();
|
35554
|
+
if (hour >= 12) {
|
35555
|
+
// which = 'pm'
|
35556
|
+
which = pm$1();
|
35557
|
+
}
|
35558
|
+
if (typeof input !== 'string') {
|
35559
|
+
return which
|
35560
|
+
}
|
35561
|
+
//okay, we're doing a setter
|
35562
|
+
let s = this.clone();
|
35563
|
+
input = input.toLowerCase().trim();
|
35564
|
+
//ampm should never change the day
|
35565
|
+
// - so use `.hour(n)` instead of `.minus(12,'hour')`
|
35566
|
+
if (hour >= 12 && input === 'am') {
|
35567
|
+
//noon is 12pm
|
35568
|
+
hour -= 12;
|
35569
|
+
return s.hour(hour, goFwd)
|
35570
|
+
}
|
35571
|
+
if (hour < 12 && input === 'pm') {
|
35572
|
+
hour += 12;
|
35573
|
+
return s.hour(hour, goFwd)
|
35574
|
+
}
|
35575
|
+
return s
|
35576
|
+
},
|
35577
|
+
|
35578
|
+
//some hard-coded times of day, like 'noon'
|
35579
|
+
dayTime: function (str, goFwd) {
|
35580
|
+
if (str !== undefined) {
|
35581
|
+
const times = {
|
35582
|
+
morning: '7:00am',
|
35583
|
+
breakfast: '7:00am',
|
35584
|
+
noon: '12:00am',
|
35585
|
+
lunch: '12:00pm',
|
35586
|
+
afternoon: '2:00pm',
|
35587
|
+
evening: '6:00pm',
|
35588
|
+
dinner: '6:00pm',
|
35589
|
+
night: '11:00pm',
|
35590
|
+
midnight: '23:59pm'
|
35591
|
+
};
|
35592
|
+
let s = this.clone();
|
35593
|
+
str = str || '';
|
35594
|
+
str = str.toLowerCase();
|
35595
|
+
if (times.hasOwnProperty(str) === true) {
|
35596
|
+
s = s.time(times[str], goFwd);
|
35597
|
+
}
|
35598
|
+
return s
|
35599
|
+
}
|
35600
|
+
let h = this.hour();
|
35601
|
+
if (h < 6) {
|
35602
|
+
return 'night'
|
35603
|
+
}
|
35604
|
+
if (h < 12) {
|
35605
|
+
//until noon
|
35606
|
+
return 'morning'
|
35607
|
+
}
|
35608
|
+
if (h < 17) {
|
35609
|
+
//until 5pm
|
35610
|
+
return 'afternoon'
|
35611
|
+
}
|
35612
|
+
if (h < 22) {
|
35613
|
+
//until 10pm
|
35614
|
+
return 'evening'
|
35615
|
+
}
|
35616
|
+
return 'night'
|
35617
|
+
},
|
35618
|
+
|
35619
|
+
//parse a proper iso string
|
35620
|
+
iso: function (num) {
|
35621
|
+
if (num !== undefined) {
|
35622
|
+
return this.set(num)
|
35623
|
+
}
|
35624
|
+
return this.format('iso')
|
35625
|
+
}
|
35626
|
+
};
|
35627
|
+
|
35628
|
+
const methods$2 = {
|
35629
|
+
// # day in the month
|
35630
|
+
date: function (num, goFwd) {
|
35631
|
+
if (num !== undefined) {
|
35632
|
+
let s = this.clone();
|
35633
|
+
num = parseInt(num, 10);
|
35634
|
+
if (num) {
|
35635
|
+
s.epoch = date(s, num, goFwd);
|
35636
|
+
}
|
35637
|
+
return s
|
35638
|
+
}
|
35639
|
+
return this.d.getDate()
|
35640
|
+
},
|
35641
|
+
|
35642
|
+
//like 'wednesday' (hard!)
|
35643
|
+
day: function (input, goFwd) {
|
35644
|
+
if (input === undefined) {
|
35645
|
+
return this.d.getDay()
|
35646
|
+
}
|
35647
|
+
let original = this.clone();
|
35648
|
+
let want = input;
|
35649
|
+
// accept 'wednesday'
|
35650
|
+
if (typeof input === 'string') {
|
35651
|
+
input = input.toLowerCase();
|
35652
|
+
if (aliases$1.hasOwnProperty(input)) {
|
35653
|
+
want = aliases$1[input];
|
35654
|
+
} else {
|
35655
|
+
want = short().indexOf(input);
|
35656
|
+
if (want === -1) {
|
35657
|
+
want = long().indexOf(input);
|
35658
|
+
}
|
35659
|
+
}
|
35660
|
+
}
|
35661
|
+
//move approx
|
35662
|
+
let day = this.d.getDay();
|
35663
|
+
let diff = day - want;
|
35664
|
+
if (goFwd === true && diff > 0) {
|
35665
|
+
diff = diff - 7;
|
35666
|
+
}
|
35667
|
+
if (goFwd === false && diff < 0) {
|
35668
|
+
diff = diff + 7;
|
35669
|
+
}
|
35670
|
+
let s = this.subtract(diff, 'days');
|
35671
|
+
//tighten it back up
|
35672
|
+
walkTo(s, {
|
35673
|
+
hour: original.hour(),
|
35674
|
+
minute: original.minute(),
|
35675
|
+
second: original.second()
|
35676
|
+
});
|
35677
|
+
return s
|
35678
|
+
},
|
35679
|
+
|
35680
|
+
//these are helpful name-wrappers
|
35681
|
+
dayName: function (input, goFwd) {
|
35682
|
+
if (input === undefined) {
|
35683
|
+
return long()[this.day()]
|
35684
|
+
}
|
35685
|
+
let s = this.clone();
|
35686
|
+
s = s.day(input, goFwd);
|
35687
|
+
return s
|
35688
|
+
}
|
35689
|
+
};
|
35690
|
+
|
35691
|
+
const clearMinutes = (s) => {
|
35692
|
+
s = s.minute(0);
|
35693
|
+
s = s.second(0);
|
35694
|
+
s = s.millisecond(1);
|
35695
|
+
return s
|
35696
|
+
};
|
35697
|
+
|
35698
|
+
const methods$1 = {
|
35699
|
+
// day 0-366
|
35700
|
+
dayOfYear: function (num, goFwd) {
|
35701
|
+
if (num !== undefined) {
|
35702
|
+
let s = this.clone();
|
35703
|
+
s.epoch = dayOfYear$1(s, num, goFwd);
|
35704
|
+
return s
|
35705
|
+
}
|
35706
|
+
//days since newyears - jan 1st is 1, jan 2nd is 2...
|
35707
|
+
let sum = 0;
|
35708
|
+
let month = this.d.getMonth();
|
35709
|
+
let tmp;
|
35710
|
+
//count the num days in each month
|
35711
|
+
for (let i = 1; i <= month; i++) {
|
35712
|
+
tmp = new Date();
|
35713
|
+
tmp.setDate(1);
|
35714
|
+
tmp.setFullYear(this.d.getFullYear()); //the year matters, because leap-years
|
35715
|
+
tmp.setHours(1);
|
35716
|
+
tmp.setMinutes(1);
|
35717
|
+
tmp.setMonth(i);
|
35718
|
+
tmp.setHours(-2); //the last day of the month
|
35719
|
+
sum += tmp.getDate();
|
35720
|
+
}
|
35721
|
+
return sum + this.d.getDate()
|
35722
|
+
},
|
35723
|
+
|
35724
|
+
//since the start of the year
|
35725
|
+
week: function (num, goFwd) {
|
35726
|
+
// week-setter
|
35727
|
+
if (num !== undefined) {
|
35728
|
+
let s = this.clone();
|
35729
|
+
s.epoch = week(this, num, goFwd);
|
35730
|
+
s = clearMinutes(s);
|
35731
|
+
return s
|
35732
|
+
}
|
35733
|
+
//find-out which week it is
|
35734
|
+
let tmp = this.clone();
|
35735
|
+
tmp = tmp.month(0);
|
35736
|
+
tmp = tmp.date(1);
|
35737
|
+
tmp = clearMinutes(tmp);
|
35738
|
+
tmp = tmp.day('monday');
|
35739
|
+
//don't go into last-year
|
35740
|
+
if (tmp.monthName() === 'december' && tmp.date() >= 28) {
|
35741
|
+
tmp = tmp.add(1, 'week');
|
35742
|
+
}
|
35743
|
+
// is first monday the 1st?
|
35744
|
+
let toAdd = 1;
|
35745
|
+
if (tmp.date() === 1) {
|
35746
|
+
toAdd = 0;
|
35747
|
+
}
|
35748
|
+
tmp = tmp.minus(1, 'second');
|
35749
|
+
const thisOne = this.epoch;
|
35750
|
+
//if the week technically hasn't started yet
|
35751
|
+
if (tmp.epoch > thisOne) {
|
35752
|
+
return 1
|
35753
|
+
}
|
35754
|
+
//speed it up, if we can
|
35755
|
+
let i = 0;
|
35756
|
+
let skipWeeks = this.month() * 4;
|
35757
|
+
tmp.epoch += o.week * skipWeeks;
|
35758
|
+
i += skipWeeks;
|
35759
|
+
for (; i <= 52; i++) {
|
35760
|
+
if (tmp.epoch > thisOne) {
|
35761
|
+
return i + toAdd
|
35762
|
+
}
|
35763
|
+
tmp = tmp.add(1, 'week');
|
35764
|
+
}
|
35765
|
+
return 52
|
35766
|
+
},
|
35767
|
+
//either name or number
|
35768
|
+
month: function (input, goFwd) {
|
35769
|
+
if (input !== undefined) {
|
35770
|
+
let s = this.clone();
|
35771
|
+
s.epoch = month(s, input, goFwd);
|
35772
|
+
return s
|
35773
|
+
}
|
35774
|
+
return this.d.getMonth()
|
35775
|
+
},
|
35776
|
+
//'january'
|
35777
|
+
monthName: function (input, goFwd) {
|
35778
|
+
if (input !== undefined) {
|
35779
|
+
let s = this.clone();
|
35780
|
+
s = s.month(input, goFwd);
|
35781
|
+
return s
|
35782
|
+
}
|
35783
|
+
return long$1()[this.month()]
|
35784
|
+
},
|
35785
|
+
|
35786
|
+
//q1, q2, q3, q4
|
35787
|
+
quarter: function (num, goFwd) {
|
35788
|
+
if (num !== undefined) {
|
35789
|
+
if (typeof num === 'string') {
|
35790
|
+
num = num.replace(/^q/i, '');
|
35791
|
+
num = parseInt(num, 10);
|
35792
|
+
}
|
35793
|
+
if (quarters[num]) {
|
35794
|
+
let s = this.clone();
|
35795
|
+
let month = quarters[num][0];
|
35796
|
+
s = s.month(month, goFwd);
|
35797
|
+
s = s.date(1, goFwd);
|
35798
|
+
s = s.startOf('day');
|
35799
|
+
return s
|
35800
|
+
}
|
35801
|
+
}
|
35802
|
+
let month = this.d.getMonth();
|
35803
|
+
for (let i = 1; i < quarters.length; i++) {
|
35804
|
+
if (month < quarters[i][0]) {
|
35805
|
+
return i - 1
|
35806
|
+
}
|
35807
|
+
}
|
35808
|
+
return 4
|
35809
|
+
},
|
35810
|
+
|
35811
|
+
//spring, summer, winter, fall
|
35812
|
+
season: function (input, goFwd) {
|
35813
|
+
let hem = 'north';
|
35814
|
+
if (this.hemisphere() === 'South') {
|
35815
|
+
hem = 'south';
|
35816
|
+
}
|
35817
|
+
if (input !== undefined) {
|
35818
|
+
let s = this.clone();
|
35819
|
+
for (let i = 0; i < seasons[hem].length; i++) {
|
35820
|
+
if (input === seasons[hem][i][0]) {
|
35821
|
+
s = s.month(seasons[hem][i][1], goFwd);
|
35822
|
+
s = s.date(1);
|
35823
|
+
s = s.startOf('day');
|
35824
|
+
}
|
35825
|
+
}
|
35826
|
+
return s
|
35827
|
+
}
|
35828
|
+
let month = this.d.getMonth();
|
35829
|
+
for (let i = 0; i < seasons[hem].length - 1; i++) {
|
35830
|
+
if (month >= seasons[hem][i][1] && month < seasons[hem][i + 1][1]) {
|
35831
|
+
return seasons[hem][i][0]
|
35832
|
+
}
|
35833
|
+
}
|
35834
|
+
return 'winter'
|
35835
|
+
},
|
35836
|
+
|
35837
|
+
//the year number
|
35838
|
+
year: function (num) {
|
35839
|
+
if (num !== undefined) {
|
35840
|
+
let s = this.clone();
|
35841
|
+
s.epoch = year(s, num);
|
35842
|
+
return s
|
35843
|
+
}
|
35844
|
+
return this.d.getFullYear()
|
35845
|
+
},
|
35846
|
+
|
35847
|
+
//bc/ad years
|
35848
|
+
era: function (str) {
|
35849
|
+
if (str !== undefined) {
|
35850
|
+
let s = this.clone();
|
35851
|
+
str = str.toLowerCase();
|
35852
|
+
//TODO: there is no year-0AD i think. may have off-by-1 error here
|
35853
|
+
let year$1 = s.d.getFullYear();
|
35854
|
+
//make '1992' into 1992bc..
|
35855
|
+
if (str === 'bc' && year$1 > 0) {
|
35856
|
+
s.epoch = year(s, year$1 * -1);
|
35857
|
+
}
|
35858
|
+
//make '1992bc' into '1992'
|
35859
|
+
if (str === 'ad' && year$1 < 0) {
|
35860
|
+
s.epoch = year(s, year$1 * -1);
|
35861
|
+
}
|
35862
|
+
return s
|
35863
|
+
}
|
35864
|
+
if (this.d.getFullYear() < 0) {
|
35865
|
+
return 'BC'
|
35866
|
+
}
|
35867
|
+
return 'AD'
|
35868
|
+
},
|
35869
|
+
|
35870
|
+
// 2019 -> 2010
|
35871
|
+
decade: function (input) {
|
35872
|
+
if (input !== undefined) {
|
35873
|
+
input = String(input);
|
35874
|
+
input = input.replace(/([0-9])'?s$/, '$1'); //1950's
|
35875
|
+
input = input.replace(/([0-9])(th|rd|st|nd)/, '$1'); //fix ordinals
|
35876
|
+
if (!input) {
|
35877
|
+
console.warn('Spacetime: Invalid decade input');
|
35878
|
+
return this
|
35879
|
+
}
|
35880
|
+
// assume 20th century?? for '70s'.
|
35881
|
+
if (input.length === 2 && /[0-9][0-9]/.test(input)) {
|
35882
|
+
input = '19' + input;
|
35883
|
+
}
|
35884
|
+
let year = Number(input);
|
35885
|
+
if (isNaN(year)) {
|
35886
|
+
return this
|
35887
|
+
}
|
35888
|
+
// round it down to the decade
|
35889
|
+
year = Math.floor(year / 10) * 10;
|
35890
|
+
return this.year(year) //.startOf('decade')
|
35891
|
+
}
|
35892
|
+
return this.startOf('decade').year()
|
35893
|
+
},
|
35894
|
+
// 1950 -> 19+1
|
35895
|
+
century: function (input) {
|
35896
|
+
if (input !== undefined) {
|
35897
|
+
if (typeof input === 'string') {
|
35898
|
+
input = input.replace(/([0-9])(th|rd|st|nd)/, '$1'); //fix ordinals
|
35899
|
+
input = input.replace(/([0-9]+) ?(b\.?c\.?|a\.?d\.?)/i, (a, b, c) => {
|
35900
|
+
if (c.match(/b\.?c\.?/i)) {
|
35901
|
+
b = '-' + b;
|
35902
|
+
}
|
35903
|
+
return b
|
35904
|
+
});
|
35905
|
+
input = input.replace(/c$/, ''); //20thC
|
35906
|
+
}
|
35907
|
+
let year = Number(input);
|
35908
|
+
if (isNaN(input)) {
|
35909
|
+
console.warn('Spacetime: Invalid century input');
|
35910
|
+
return this
|
35911
|
+
}
|
35912
|
+
// there is no century 0
|
35913
|
+
if (year === 0) {
|
35914
|
+
year = 1;
|
35915
|
+
}
|
35916
|
+
if (year >= 0) {
|
35917
|
+
year = (year - 1) * 100;
|
35918
|
+
} else {
|
35919
|
+
year = (year + 1) * 100;
|
35920
|
+
}
|
35921
|
+
return this.year(year)
|
35922
|
+
}
|
35923
|
+
// century getter
|
35924
|
+
let num = this.startOf('century').year();
|
35925
|
+
num = Math.floor(num / 100);
|
35926
|
+
if (num < 0) {
|
35927
|
+
return num - 1
|
35928
|
+
}
|
35929
|
+
return num + 1
|
35930
|
+
},
|
35931
|
+
// 2019 -> 2+1
|
35932
|
+
millenium: function (input) {
|
35933
|
+
if (input !== undefined) {
|
35934
|
+
if (typeof input === 'string') {
|
35935
|
+
input = input.replace(/([0-9])(th|rd|st|nd)/, '$1'); //fix ordinals
|
35936
|
+
input = Number(input);
|
35937
|
+
if (isNaN(input)) {
|
35938
|
+
console.warn('Spacetime: Invalid millenium input');
|
35939
|
+
return this
|
35940
|
+
}
|
35941
|
+
}
|
35942
|
+
if (input > 0) {
|
35943
|
+
input -= 1;
|
35944
|
+
}
|
35945
|
+
let year = input * 1000;
|
35946
|
+
// there is no year 0
|
35947
|
+
if (year === 0) {
|
35948
|
+
year = 1;
|
35949
|
+
}
|
35950
|
+
return this.year(year)
|
35951
|
+
}
|
35952
|
+
// get the current millenium
|
35953
|
+
let num = Math.floor(this.year() / 1000);
|
35954
|
+
if (num >= 0) {
|
35955
|
+
num += 1;
|
35956
|
+
}
|
35957
|
+
return num
|
35958
|
+
}
|
35959
|
+
};
|
35960
|
+
|
35961
|
+
const methods = Object.assign({}, methods$3, methods$2, methods$1);
|
35962
|
+
|
35963
|
+
//aliases
|
35964
|
+
methods.milliseconds = methods.millisecond;
|
35965
|
+
methods.seconds = methods.second;
|
35966
|
+
methods.minutes = methods.minute;
|
35967
|
+
methods.hours = methods.hour;
|
35968
|
+
methods.hour24 = methods.hour;
|
35969
|
+
methods.h12 = methods.hour12;
|
35970
|
+
methods.h24 = methods.hour24;
|
35971
|
+
methods.days = methods.day;
|
35972
|
+
|
35973
|
+
const addMethods$4 = Space => {
|
35974
|
+
//hook the methods into prototype
|
35975
|
+
Object.keys(methods).forEach(k => {
|
35976
|
+
Space.prototype[k] = methods[k];
|
35977
|
+
});
|
35978
|
+
};
|
35979
|
+
|
35980
|
+
const getMonthLength = function (month, year) {
|
35981
|
+
if (month === 1 && isLeapYear(year)) {
|
35982
|
+
return 29
|
35983
|
+
}
|
35984
|
+
return monthLengths[month]
|
35985
|
+
};
|
35986
|
+
|
35987
|
+
//month is the one thing we 'model/compute'
|
35988
|
+
//- because ms-shifting can be off by enough
|
35989
|
+
const rollMonth = (want, old) => {
|
35990
|
+
//increment year
|
35991
|
+
if (want.month > 0) {
|
35992
|
+
let years = parseInt(want.month / 12, 10);
|
35993
|
+
want.year = old.year() + years;
|
35994
|
+
want.month = want.month % 12;
|
35995
|
+
} else if (want.month < 0) {
|
35996
|
+
let m = Math.abs(want.month);
|
35997
|
+
let years = parseInt(m / 12, 10);
|
35998
|
+
if (m % 12 !== 0) {
|
35999
|
+
years += 1;
|
36000
|
+
}
|
36001
|
+
want.year = old.year() - years;
|
36002
|
+
//ignore extras
|
36003
|
+
want.month = want.month % 12;
|
36004
|
+
want.month = want.month + 12;
|
36005
|
+
if (want.month === 12) {
|
36006
|
+
want.month = 0;
|
36007
|
+
}
|
36008
|
+
}
|
36009
|
+
return want
|
36010
|
+
};
|
36011
|
+
|
36012
|
+
// briefly support day=-2 (this does not need to be perfect.)
|
36013
|
+
const rollDaysDown = (want, old, sum) => {
|
36014
|
+
want.year = old.year();
|
36015
|
+
want.month = old.month();
|
36016
|
+
let date = old.date();
|
36017
|
+
want.date = date - Math.abs(sum);
|
36018
|
+
while (want.date < 1) {
|
36019
|
+
want.month -= 1;
|
36020
|
+
if (want.month < 0) {
|
36021
|
+
want.month = 11;
|
36022
|
+
want.year -= 1;
|
36023
|
+
}
|
36024
|
+
let max = getMonthLength(want.month, want.year);
|
36025
|
+
want.date += max;
|
36026
|
+
}
|
36027
|
+
return want
|
36028
|
+
};
|
36029
|
+
|
36030
|
+
// briefly support day=33 (this does not need to be perfect.)
|
36031
|
+
const rollDaysUp = (want, old, sum) => {
|
36032
|
+
let year = old.year();
|
36033
|
+
let month = old.month();
|
36034
|
+
let max = getMonthLength(month, year);
|
36035
|
+
while (sum > max) {
|
36036
|
+
sum -= max;
|
36037
|
+
month += 1;
|
36038
|
+
if (month >= 12) {
|
36039
|
+
month -= 12;
|
36040
|
+
year += 1;
|
36041
|
+
}
|
36042
|
+
max = getMonthLength(month, year);
|
36043
|
+
}
|
36044
|
+
want.month = month;
|
36045
|
+
want.date = sum;
|
36046
|
+
return want
|
36047
|
+
};
|
36048
|
+
|
36049
|
+
const months = rollMonth;
|
36050
|
+
const days = rollDaysUp;
|
36051
|
+
const daysBack = rollDaysDown;
|
36052
|
+
|
36053
|
+
// this logic is a bit of a mess,
|
36054
|
+
// but briefly:
|
36055
|
+
// millisecond-math, and some post-processing covers most-things
|
36056
|
+
// we 'model' the calendar here only a little bit
|
36057
|
+
// and that usually works-out...
|
36058
|
+
|
36059
|
+
const order$1 = ['millisecond', 'second', 'minute', 'hour', 'date', 'month'];
|
36060
|
+
let keep = {
|
36061
|
+
second: order$1.slice(0, 1),
|
36062
|
+
minute: order$1.slice(0, 2),
|
36063
|
+
quarterhour: order$1.slice(0, 2),
|
36064
|
+
hour: order$1.slice(0, 3),
|
36065
|
+
date: order$1.slice(0, 4),
|
36066
|
+
month: order$1.slice(0, 4),
|
36067
|
+
quarter: order$1.slice(0, 4),
|
36068
|
+
season: order$1.slice(0, 4),
|
36069
|
+
year: order$1,
|
36070
|
+
decade: order$1,
|
36071
|
+
century: order$1
|
36072
|
+
};
|
36073
|
+
keep.week = keep.hour;
|
36074
|
+
keep.season = keep.date;
|
36075
|
+
keep.quarter = keep.date;
|
36076
|
+
|
36077
|
+
// Units need to be dst adjuested
|
36078
|
+
const dstAwareUnits = {
|
36079
|
+
year: true,
|
36080
|
+
quarter: true,
|
36081
|
+
season: true,
|
36082
|
+
month: true,
|
36083
|
+
week: true,
|
36084
|
+
date: true
|
36085
|
+
};
|
36086
|
+
|
36087
|
+
const keepDate = {
|
36088
|
+
month: true,
|
36089
|
+
quarter: true,
|
36090
|
+
season: true,
|
36091
|
+
year: true
|
36092
|
+
};
|
36093
|
+
|
36094
|
+
const addMethods$3 = (SpaceTime) => {
|
36095
|
+
SpaceTime.prototype.add = function (num, unit) {
|
36096
|
+
let s = this.clone();
|
36097
|
+
|
36098
|
+
if (!unit || num === 0) {
|
36099
|
+
return s //don't bother
|
36100
|
+
}
|
36101
|
+
let old = this.clone();
|
36102
|
+
unit = normalize$2(unit);
|
36103
|
+
if (unit === 'millisecond') {
|
36104
|
+
s.epoch += num;
|
36105
|
+
return s
|
36106
|
+
}
|
36107
|
+
// support 'fortnight' alias
|
36108
|
+
if (unit === 'fortnight') {
|
36109
|
+
num *= 2;
|
36110
|
+
unit = 'week';
|
36111
|
+
}
|
36112
|
+
//move forward by the estimated milliseconds (rough)
|
36113
|
+
if (o[unit]) {
|
36114
|
+
s.epoch += o[unit] * num;
|
36115
|
+
} else if (unit === 'week' || unit === 'weekend') {
|
36116
|
+
s.epoch += o.day * (num * 7);
|
36117
|
+
} else if (unit === 'quarter' || unit === 'season') {
|
36118
|
+
s.epoch += o.month * (num * 3);
|
36119
|
+
} else if (unit === 'quarterhour') {
|
36120
|
+
s.epoch += o.minute * 15 * num;
|
36121
|
+
}
|
36122
|
+
//now ensure our milliseconds/etc are in-line
|
36123
|
+
let want = {};
|
36124
|
+
if (keep[unit]) {
|
36125
|
+
keep[unit].forEach((u) => {
|
36126
|
+
want[u] = old[u]();
|
36127
|
+
});
|
36128
|
+
}
|
36129
|
+
|
36130
|
+
if (dstAwareUnits[unit]) {
|
36131
|
+
const diff = old.timezone().current.offset - s.timezone().current.offset;
|
36132
|
+
s.epoch += diff * 3600 * 1000;
|
36133
|
+
}
|
36134
|
+
|
36135
|
+
//ensure month/year has ticked-over
|
36136
|
+
if (unit === 'month') {
|
36137
|
+
want.month = old.month() + num;
|
36138
|
+
//month is the one unit we 'model' directly
|
36139
|
+
want = months(want, old);
|
36140
|
+
}
|
36141
|
+
//support coercing a week, too
|
36142
|
+
if (unit === 'week') {
|
36143
|
+
let sum = old.date() + num * 7;
|
36144
|
+
if (sum <= 28 && sum > 1) {
|
36145
|
+
want.date = sum;
|
36146
|
+
}
|
36147
|
+
}
|
36148
|
+
if (unit === 'weekend' && s.dayName() !== 'saturday') {
|
36149
|
+
s = s.day('saturday', true); //ensure it's saturday
|
36150
|
+
}
|
36151
|
+
//support 25-hour day-changes on dst-changes
|
36152
|
+
else if (unit === 'date') {
|
36153
|
+
if (num < 0) {
|
36154
|
+
want = daysBack(want, old, num);
|
36155
|
+
} else {
|
36156
|
+
//specify a naive date number, if it's easy to do...
|
36157
|
+
let sum = old.date() + num;
|
36158
|
+
// ok, model this one too
|
36159
|
+
want = days(want, old, sum);
|
36160
|
+
}
|
36161
|
+
//manually punt it if we haven't moved at all..
|
36162
|
+
if (num !== 0 && old.isSame(s, 'day')) {
|
36163
|
+
want.date = old.date() + num;
|
36164
|
+
}
|
36165
|
+
}
|
36166
|
+
// ensure a quarter is 3 months over
|
36167
|
+
else if (unit === 'quarter') {
|
36168
|
+
want.month = old.month() + num * 3;
|
36169
|
+
want.year = old.year();
|
36170
|
+
// handle rollover
|
36171
|
+
if (want.month < 0) {
|
36172
|
+
let years = Math.floor(want.month / 12);
|
36173
|
+
let remainder = want.month + Math.abs(years) * 12;
|
36174
|
+
want.month = remainder;
|
36175
|
+
want.year += years;
|
36176
|
+
} else if (want.month >= 12) {
|
36177
|
+
let years = Math.floor(want.month / 12);
|
36178
|
+
want.month = want.month % 12;
|
36179
|
+
want.year += years;
|
36180
|
+
}
|
36181
|
+
want.date = old.date();
|
36182
|
+
}
|
36183
|
+
//ensure year has changed (leap-years)
|
36184
|
+
else if (unit === 'year') {
|
36185
|
+
let wantYear = old.year() + num;
|
36186
|
+
let haveYear = s.year();
|
36187
|
+
if (haveYear < wantYear) {
|
36188
|
+
let toAdd = Math.floor(num / 4) || 1; //approx num of leap-days
|
36189
|
+
s.epoch += Math.abs(o.day * toAdd);
|
36190
|
+
} else if (haveYear > wantYear) {
|
36191
|
+
let toAdd = Math.floor(num / 4) || 1; //approx num of leap-days
|
36192
|
+
s.epoch += o.day * toAdd;
|
36193
|
+
}
|
36194
|
+
}
|
36195
|
+
//these are easier
|
36196
|
+
else if (unit === 'decade') {
|
36197
|
+
want.year = s.year() + 10;
|
36198
|
+
} else if (unit === 'century') {
|
36199
|
+
want.year = s.year() + 100;
|
36200
|
+
}
|
36201
|
+
//keep current date, unless the month doesn't have it.
|
36202
|
+
if (keepDate[unit]) {
|
36203
|
+
let max = monthLengths[want.month];
|
36204
|
+
want.date = old.date();
|
36205
|
+
if (want.date > max) {
|
36206
|
+
want.date = max;
|
36207
|
+
}
|
36208
|
+
}
|
36209
|
+
if (Object.keys(want).length > 1) {
|
36210
|
+
walkTo(s, want);
|
36211
|
+
}
|
36212
|
+
return s
|
36213
|
+
};
|
36214
|
+
|
36215
|
+
//subtract is only add *-1
|
36216
|
+
SpaceTime.prototype.subtract = function (num, unit) {
|
36217
|
+
let s = this.clone();
|
36218
|
+
return s.add(num * -1, unit)
|
36219
|
+
};
|
36220
|
+
//add aliases
|
36221
|
+
SpaceTime.prototype.minus = SpaceTime.prototype.subtract;
|
36222
|
+
SpaceTime.prototype.plus = SpaceTime.prototype.add;
|
36223
|
+
};
|
36224
|
+
|
36225
|
+
//make a string, for easy comparison between dates
|
36226
|
+
const print = {
|
36227
|
+
millisecond: (s) => {
|
36228
|
+
return s.epoch
|
36229
|
+
},
|
36230
|
+
second: (s) => {
|
36231
|
+
return [s.year(), s.month(), s.date(), s.hour(), s.minute(), s.second()].join('-')
|
36232
|
+
},
|
36233
|
+
minute: (s) => {
|
36234
|
+
return [s.year(), s.month(), s.date(), s.hour(), s.minute()].join('-')
|
36235
|
+
},
|
36236
|
+
hour: (s) => {
|
36237
|
+
return [s.year(), s.month(), s.date(), s.hour()].join('-')
|
36238
|
+
},
|
36239
|
+
day: (s) => {
|
36240
|
+
return [s.year(), s.month(), s.date()].join('-')
|
36241
|
+
},
|
36242
|
+
week: (s) => {
|
36243
|
+
return [s.year(), s.week()].join('-')
|
36244
|
+
},
|
36245
|
+
month: (s) => {
|
36246
|
+
return [s.year(), s.month()].join('-')
|
36247
|
+
},
|
36248
|
+
quarter: (s) => {
|
36249
|
+
return [s.year(), s.quarter()].join('-')
|
36250
|
+
},
|
36251
|
+
year: (s) => {
|
36252
|
+
return s.year()
|
36253
|
+
}
|
36254
|
+
};
|
36255
|
+
print.date = print.day;
|
36256
|
+
|
36257
|
+
const addMethods$2 = (SpaceTime) => {
|
36258
|
+
SpaceTime.prototype.isSame = function (b, unit, tzAware = true) {
|
36259
|
+
let a = this;
|
36260
|
+
if (!unit) {
|
36261
|
+
return null
|
36262
|
+
}
|
36263
|
+
// support swapped params
|
36264
|
+
if (typeof b === 'string' && typeof unit === 'object') {
|
36265
|
+
let tmp = b;
|
36266
|
+
b = unit;
|
36267
|
+
unit = tmp;
|
36268
|
+
}
|
36269
|
+
if (typeof b === 'string' || typeof b === 'number') {
|
36270
|
+
b = new SpaceTime(b, this.timezone.name);
|
36271
|
+
}
|
36272
|
+
//support 'seconds' aswell as 'second'
|
36273
|
+
unit = unit.replace(/s$/, '');
|
36274
|
+
|
36275
|
+
// make them the same timezone for proper comparison
|
36276
|
+
if (tzAware === true && a.tz !== b.tz) {
|
36277
|
+
b = b.clone();
|
36278
|
+
b.tz = a.tz;
|
36279
|
+
}
|
36280
|
+
if (print[unit]) {
|
36281
|
+
return print[unit](a) === print[unit](b)
|
36282
|
+
}
|
36283
|
+
return null
|
36284
|
+
};
|
36285
|
+
};
|
36286
|
+
|
36287
|
+
const addMethods$1 = SpaceTime => {
|
36288
|
+
const methods = {
|
36289
|
+
isAfter: function (d) {
|
36290
|
+
d = beADate(d, this);
|
36291
|
+
let epoch = getEpoch(d);
|
36292
|
+
if (epoch === null) {
|
36293
|
+
return null
|
36294
|
+
}
|
36295
|
+
return this.epoch > epoch
|
36296
|
+
},
|
36297
|
+
isBefore: function (d) {
|
36298
|
+
d = beADate(d, this);
|
36299
|
+
let epoch = getEpoch(d);
|
36300
|
+
if (epoch === null) {
|
36301
|
+
return null
|
36302
|
+
}
|
36303
|
+
return this.epoch < epoch
|
36304
|
+
},
|
36305
|
+
isEqual: function (d) {
|
36306
|
+
d = beADate(d, this);
|
36307
|
+
let epoch = getEpoch(d);
|
36308
|
+
if (epoch === null) {
|
36309
|
+
return null
|
36310
|
+
}
|
36311
|
+
return this.epoch === epoch
|
36312
|
+
},
|
36313
|
+
isBetween: function (start, end, isInclusive = false) {
|
36314
|
+
start = beADate(start, this);
|
36315
|
+
end = beADate(end, this);
|
36316
|
+
let startEpoch = getEpoch(start);
|
36317
|
+
if (startEpoch === null) {
|
36318
|
+
return null
|
36319
|
+
}
|
36320
|
+
let endEpoch = getEpoch(end);
|
36321
|
+
if (endEpoch === null) {
|
36322
|
+
return null
|
36323
|
+
}
|
36324
|
+
if (isInclusive) {
|
36325
|
+
return this.isBetween(start, end) || this.isEqual(start) || this.isEqual(end);
|
36326
|
+
}
|
36327
|
+
return startEpoch < this.epoch && this.epoch < endEpoch
|
36328
|
+
}
|
36329
|
+
};
|
36330
|
+
|
36331
|
+
//hook them into proto
|
36332
|
+
Object.keys(methods).forEach(k => {
|
36333
|
+
SpaceTime.prototype[k] = methods[k];
|
36334
|
+
});
|
36335
|
+
};
|
36336
|
+
|
36337
|
+
const addMethods = SpaceTime => {
|
36338
|
+
const methods = {
|
36339
|
+
i18n: data => {
|
36340
|
+
//change the day names
|
36341
|
+
if (isObject$1(data.days)) {
|
36342
|
+
set$2(data.days);
|
36343
|
+
}
|
36344
|
+
//change the month names
|
36345
|
+
if (isObject$1(data.months)) {
|
36346
|
+
set$3(data.months);
|
36347
|
+
}
|
36348
|
+
|
36349
|
+
// change the the display style of the month / day names
|
36350
|
+
if (isBoolean(data.useTitleCase)) {
|
36351
|
+
set$1(data.useTitleCase);
|
36352
|
+
}
|
36353
|
+
|
36354
|
+
//change am and pm strings
|
36355
|
+
if (isObject$1(data.ampm)) {
|
36356
|
+
set(data.ampm);
|
36357
|
+
}
|
36358
|
+
}
|
36359
|
+
};
|
36360
|
+
|
36361
|
+
//hook them into proto
|
36362
|
+
Object.keys(methods).forEach(k => {
|
36363
|
+
SpaceTime.prototype[k] = methods[k];
|
36364
|
+
});
|
36365
|
+
};
|
36366
|
+
|
36367
|
+
let timezones = all;
|
36368
|
+
//fake timezone-support, for fakers (es5 class)
|
36369
|
+
const SpaceTime = function (input, tz, options = {}) {
|
36370
|
+
//the holy moment
|
36371
|
+
this.epoch = null;
|
36372
|
+
//the shift for the given timezone
|
36373
|
+
this.tz = lookupTz(tz, timezones);
|
36374
|
+
//whether to output warnings to console
|
36375
|
+
this.silent = typeof options.silent !== 'undefined' ? options.silent : true;
|
36376
|
+
// favour british interpretation of 02/02/2018, etc
|
36377
|
+
this.british = options.dmy || options.british;
|
36378
|
+
|
36379
|
+
//does the week start on sunday, or monday:
|
36380
|
+
this._weekStart = 1; //default to monday
|
36381
|
+
if (options.weekStart !== undefined) {
|
36382
|
+
this._weekStart = options.weekStart;
|
36383
|
+
}
|
36384
|
+
// the reference today date object, (for testing)
|
36385
|
+
this._today = {};
|
36386
|
+
if (options.today !== undefined) {
|
36387
|
+
this._today = options.today;
|
36388
|
+
}
|
36389
|
+
// dunno if this is a good idea, or not
|
36390
|
+
// Object.defineProperty(this, 'parsers', {
|
36391
|
+
// enumerable: false,
|
36392
|
+
// writable: true,
|
36393
|
+
// value: parsers
|
36394
|
+
// })
|
36395
|
+
//add getter/setters
|
36396
|
+
Object.defineProperty(this, 'd', {
|
36397
|
+
//return a js date object
|
36398
|
+
get: function () {
|
36399
|
+
let offset = quickOffset(this);
|
36400
|
+
//every computer is somewhere- get this computer's built-in offset
|
36401
|
+
let bias = new Date(this.epoch).getTimezoneOffset() || 0;
|
36402
|
+
//movement
|
36403
|
+
let shift = bias + offset * 60; //in minutes
|
36404
|
+
shift = shift * 60 * 1000; //in ms
|
36405
|
+
//remove this computer's offset
|
36406
|
+
let epoch = this.epoch + shift;
|
36407
|
+
let d = new Date(epoch);
|
36408
|
+
return d
|
36409
|
+
}
|
36410
|
+
});
|
36411
|
+
//add this data on the object, to allow adding new timezones
|
36412
|
+
Object.defineProperty(this, 'timezones', {
|
36413
|
+
get: () => timezones,
|
36414
|
+
set: (obj) => {
|
36415
|
+
timezones = obj;
|
36416
|
+
return obj
|
36417
|
+
}
|
36418
|
+
});
|
36419
|
+
//parse the various formats
|
36420
|
+
let tmp = parseInput(this, input);
|
36421
|
+
this.epoch = tmp.epoch;
|
36422
|
+
};
|
36423
|
+
|
36424
|
+
//(add instance methods to prototype)
|
36425
|
+
Object.keys(methods$4).forEach((k) => {
|
36426
|
+
SpaceTime.prototype[k] = methods$4[k];
|
36427
|
+
});
|
36428
|
+
|
36429
|
+
// ¯\_(ツ)_/¯
|
36430
|
+
SpaceTime.prototype.clone = function () {
|
36431
|
+
return new SpaceTime(this.epoch, this.tz, {
|
36432
|
+
silent: this.silent,
|
36433
|
+
weekStart: this._weekStart,
|
36434
|
+
today: this._today,
|
36435
|
+
parsers: this.parsers
|
36436
|
+
})
|
36437
|
+
};
|
36438
|
+
|
36439
|
+
/**
|
36440
|
+
* @deprecated use toNativeDate()
|
36441
|
+
* @returns native date object at the same epoch
|
36442
|
+
*/
|
36443
|
+
SpaceTime.prototype.toLocalDate = function () {
|
36444
|
+
return this.toNativeDate()
|
36445
|
+
};
|
36446
|
+
|
36447
|
+
/**
|
36448
|
+
* @returns native date object at the same epoch
|
36449
|
+
*/
|
36450
|
+
SpaceTime.prototype.toNativeDate = function () {
|
36451
|
+
return new Date(this.epoch)
|
36452
|
+
};
|
36453
|
+
|
36454
|
+
//append more methods
|
36455
|
+
addMethods$4(SpaceTime);
|
36456
|
+
addMethods$3(SpaceTime);
|
36457
|
+
addMethods$2(SpaceTime);
|
36458
|
+
addMethods$1(SpaceTime);
|
36459
|
+
addMethods(SpaceTime);
|
36460
|
+
|
36461
|
+
// const timezones = require('../data');
|
36462
|
+
|
36463
|
+
const whereIts = (a, b) => {
|
36464
|
+
let start = new SpaceTime(null);
|
36465
|
+
let end = new SpaceTime(null);
|
36466
|
+
start = start.time(a);
|
36467
|
+
//if b is undefined, use as 'within one hour'
|
36468
|
+
if (b) {
|
36469
|
+
end = end.time(b);
|
36470
|
+
} else {
|
36471
|
+
end = start.add(59, 'minutes');
|
36472
|
+
}
|
36473
|
+
|
36474
|
+
let startHour = start.hour();
|
36475
|
+
let endHour = end.hour();
|
36476
|
+
let tzs = Object.keys(start.timezones).filter((tz) => {
|
36477
|
+
if (tz.indexOf('/') === -1) {
|
36478
|
+
return false
|
36479
|
+
}
|
36480
|
+
let m = new SpaceTime(null, tz);
|
36481
|
+
let hour = m.hour();
|
36482
|
+
//do 'calendar-compare' not real-time-compare
|
36483
|
+
if (hour >= startHour && hour <= endHour) {
|
36484
|
+
//test minutes too, if applicable
|
36485
|
+
if (hour === startHour && m.minute() < start.minute()) {
|
36486
|
+
return false
|
36487
|
+
}
|
36488
|
+
if (hour === endHour && m.minute() > end.minute()) {
|
36489
|
+
return false
|
36490
|
+
}
|
36491
|
+
return true
|
36492
|
+
}
|
36493
|
+
return false
|
36494
|
+
});
|
36495
|
+
return tzs
|
36496
|
+
};
|
36497
|
+
|
36498
|
+
const version$2 = '7.2.0';
|
36499
|
+
|
36500
|
+
const main = (input, tz, options) => new SpaceTime(input, tz, options);
|
36501
|
+
|
36502
|
+
// set all properties of a given 'today' object
|
36503
|
+
const setToday = function (s) {
|
36504
|
+
let today = s._today || {};
|
36505
|
+
Object.keys(today).forEach((k) => {
|
36506
|
+
s = s[k](today[k]);
|
36507
|
+
});
|
36508
|
+
return s
|
36509
|
+
};
|
36510
|
+
|
36511
|
+
//some helper functions on the main method
|
36512
|
+
main.now = (tz, options) => {
|
36513
|
+
let s = new SpaceTime(new Date().getTime(), tz, options);
|
36514
|
+
s = setToday(s);
|
36515
|
+
return s
|
36516
|
+
};
|
36517
|
+
main.today = (tz, options) => {
|
36518
|
+
let s = new SpaceTime(new Date().getTime(), tz, options);
|
36519
|
+
s = setToday(s);
|
36520
|
+
return s.startOf('day')
|
36521
|
+
};
|
36522
|
+
main.tomorrow = (tz, options) => {
|
36523
|
+
let s = new SpaceTime(new Date().getTime(), tz, options);
|
36524
|
+
s = setToday(s);
|
36525
|
+
return s.add(1, 'day').startOf('day')
|
36526
|
+
};
|
36527
|
+
main.yesterday = (tz, options) => {
|
36528
|
+
let s = new SpaceTime(new Date().getTime(), tz, options);
|
36529
|
+
s = setToday(s);
|
36530
|
+
return s.subtract(1, 'day').startOf('day')
|
36531
|
+
};
|
36532
|
+
main.extend = function (obj = {}) {
|
36533
|
+
Object.keys(obj).forEach((k) => {
|
36534
|
+
SpaceTime.prototype[k] = obj[k];
|
36535
|
+
});
|
36536
|
+
return this
|
36537
|
+
};
|
36538
|
+
main.timezones = function () {
|
36539
|
+
let s = new SpaceTime();
|
36540
|
+
return s.timezones
|
36541
|
+
};
|
36542
|
+
main.max = function (tz, options) {
|
36543
|
+
let s = new SpaceTime(null, tz, options);
|
36544
|
+
s.epoch = 8640000000000000;
|
36545
|
+
return s
|
36546
|
+
};
|
36547
|
+
main.min = function (tz, options) {
|
36548
|
+
let s = new SpaceTime(null, tz, options);
|
36549
|
+
s.epoch = -8640000000000000;
|
36550
|
+
return s
|
36551
|
+
};
|
36552
|
+
|
36553
|
+
//find tz by time
|
36554
|
+
main.whereIts = whereIts;
|
36555
|
+
main.version = version$2;
|
36556
|
+
|
36557
|
+
//aliases:
|
36558
|
+
main.plugin = main.extend;
|
36559
|
+
|
32550
36560
|
class Pipe {
|
32551
36561
|
transform(_value, _options = {}) {
|
32552
36562
|
return null;
|
@@ -32980,6 +36990,10 @@ var updateLocale = _commonjsHelpers.createCommonjsModule(function (module, expor
|
|
32980
36990
|
!function(e,n){"object"=='object'&&"undefined"!='object'?module.exports=n():"function"==typeof undefined&&undefined.amd?undefined(n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_updateLocale=n();}(_commonjsHelpers.commonjsGlobal,(function(){"use strict";return function(e,n,t){t.updateLocale=function(e,n){var o=t.Ls[e];if(o)return (n?Object.keys(n):[]).forEach((function(e){o[e]=n[e];})),o};}}));
|
32981
36991
|
});
|
32982
36992
|
|
36993
|
+
var utc$1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
36994
|
+
!function(t,i){"object"=='object'&&"undefined"!='object'?module.exports=i():"function"==typeof undefined&&undefined.amd?undefined(i):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_utc=i();}(_commonjsHelpers.commonjsGlobal,(function(){"use strict";var t="minute",i=/[+-]\d\d(?::?\d\d)?/g,e=/([+-]|\d\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:!0,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:!0});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var o=u.parse;u.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t);};var r=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds();}else r.call(this);};var a=u.utcOffset;u.utcOffset=function(s,f){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if("string"==typeof s&&(s=function(t){void 0===t&&(t="");var s=t.match(i);if(!s)return null;var f=(""+s[0]).match(e)||["-",0,0],n=f[0],u=60*+f[1]+ +f[2];return 0===u?0:"+"===n?u:-u}(s),null===s))return this;var u=Math.abs(s)<=16?60*s:s,o=this;if(f)return o.$offset=u,o.$u=0===s,o;if(0!==s){var r=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(u+r,t)).$offset=u,o.$x.$localOffset=r;}else o=this.utc();return o};var h=u.format;u.format=function(t){var i=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,i)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return !!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var l=u.toDate;u.toDate=function(t){return "s"===t&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var c=u.diff;u.diff=function(t,i,e){if(t&&this.$u===t.$u)return c.call(this,t,i,e);var s=this.local(),f=n(t).local();return c.call(s,f,i,e)};}}));
|
36995
|
+
});
|
36996
|
+
|
32983
36997
|
var weekOfYear = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
32984
36998
|
!function(e,t){"object"=='object'&&"undefined"!='object'?module.exports=t():"function"==typeof undefined&&undefined.amd?undefined(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_weekOfYear=t();}(_commonjsHelpers.commonjsGlobal,(function(){"use strict";var e="week",t="year";return function(i,n,r){var f=n.prototype;f.week=function(i){if(void 0===i&&(i=null),null!==i)return this.add(7*(i-this.week()),"day");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,"millisecond"),o=this.diff(a,e,!0);return o<0?r(this).startOf("week").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)};}}));
|
32985
36999
|
});
|
@@ -32997,6 +37011,7 @@ dayjs_min.extend(relativeTime);
|
|
32997
37011
|
dayjs_min.extend(timezone);
|
32998
37012
|
dayjs_min.extend(updateLocale);
|
32999
37013
|
dayjs_min.extend(weekOfYear);
|
37014
|
+
dayjs_min.extend(utc$1);
|
33000
37015
|
const locales = {
|
33001
37016
|
ar,
|
33002
37017
|
bg,
|
@@ -33048,6 +37063,35 @@ function toDate(value) {
|
|
33048
37063
|
const retVal = dayjs_min(value).toDate();
|
33049
37064
|
return retVal;
|
33050
37065
|
}
|
37066
|
+
function toUTC(value) {
|
37067
|
+
return value ? dayjs_min(value).utc().toDate() : undefined;
|
37068
|
+
}
|
37069
|
+
function toTimezone(value, timezone) {
|
37070
|
+
if (value) {
|
37071
|
+
const date = dayjs_min(value).tz(timezone);
|
37072
|
+
const s = main(date.toDate()).goto(timezone);
|
37073
|
+
// eslint-disable-next-line no-console
|
37074
|
+
return new Date(s.iso().toString().substring(0, 19) + 'Z');
|
37075
|
+
}
|
37076
|
+
return null;
|
37077
|
+
}
|
37078
|
+
function fixRRuleLocalUTCtoUTC(value, timezone) {
|
37079
|
+
if (value) {
|
37080
|
+
const datestr = lodash.isString(value)
|
37081
|
+
? value.substring(0, 19)
|
37082
|
+
: value.toISOString().substring(0, 19);
|
37083
|
+
const date = dayjs_min.tz(datestr, timezone).utc();
|
37084
|
+
return date.toDate();
|
37085
|
+
}
|
37086
|
+
return null;
|
37087
|
+
}
|
37088
|
+
function toLocalDate(value, removeTimezone) {
|
37089
|
+
let retVal = dayjs_min(value).local().format();
|
37090
|
+
if (removeTimezone) {
|
37091
|
+
retVal = retVal.substring(0, 19);
|
37092
|
+
}
|
37093
|
+
return retVal;
|
37094
|
+
}
|
33051
37095
|
function dateParse(dateString, formatString) {
|
33052
37096
|
const retVal = dayjs_min(dateString, formatString).toDate();
|
33053
37097
|
return retVal;
|
@@ -33130,8 +37174,7 @@ function getMonths() {
|
|
33130
37174
|
months = localValues.months.map((i) => lodash.capitalize(i));
|
33131
37175
|
}
|
33132
37176
|
else if (localValues.name === 'ru') {
|
33133
|
-
months =
|
33134
|
-
'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_');
|
37177
|
+
months = 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_');
|
33135
37178
|
}
|
33136
37179
|
}
|
33137
37180
|
return months;
|
@@ -33257,6 +37300,10 @@ function dateAdd(date, type, amount = 0) {
|
|
33257
37300
|
case 'second':
|
33258
37301
|
case 's':
|
33259
37302
|
return dayjs_min(date).add(amount, 'second').toDate();
|
37303
|
+
case 'milliseconds':
|
37304
|
+
case 'millisecond':
|
37305
|
+
case 'ms':
|
37306
|
+
return dayjs_min(date).add(amount, 'millisecond').toDate();
|
33260
37307
|
case 'days':
|
33261
37308
|
case 'day':
|
33262
37309
|
case 'd':
|
@@ -33620,13 +37667,9 @@ function getFormattedCountDownToDisplay(numberSeconds, showUnit = true) {
|
|
33620
37667
|
// Format: 1 hour 35 minutes 20 seconds
|
33621
37668
|
function getTimeTextFormat(numberSeconds) {
|
33622
37669
|
const { hours, minutes, seconds } = convertSecondsToTimeUnits(numberSeconds);
|
33623
|
-
const getUnitWording = (unit, singularKey, pluralKey) => unit > 1 ? translate(pluralKey) : translate(singularKey);
|
33624
|
-
const dhours = hours > 0
|
33625
|
-
|
33626
|
-
: '';
|
33627
|
-
const dminutes = minutes > 0
|
33628
|
-
? `${minutes} ${getUnitWording(minutes, 'STORYMINUTE', 'STORYMINUTES')}${seconds > 0 ? ' ' : ''}`
|
33629
|
-
: '';
|
37670
|
+
const getUnitWording = (unit, singularKey, pluralKey) => (unit > 1 ? translate(pluralKey) : translate(singularKey));
|
37671
|
+
const dhours = hours > 0 ? `${hours} ${getUnitWording(hours, 'STORYHOUR', 'STORYHOURS')}${minutes > 0 ? ' ' : ''}` : '';
|
37672
|
+
const dminutes = minutes > 0 ? `${minutes} ${getUnitWording(minutes, 'STORYMINUTE', 'STORYMINUTES')}${seconds > 0 ? ' ' : ''}` : '';
|
33630
37673
|
const dseconds = seconds > 0 ? `${seconds} ${translate('STORYSECONDS')}` : '';
|
33631
37674
|
return `${dhours}${dminutes}${dseconds}`;
|
33632
37675
|
}
|
@@ -33634,9 +37677,7 @@ function getTimeTextFormat(numberSeconds) {
|
|
33634
37677
|
function getTimeOneLetterFormat(numberSeconds, optionalSeconds) {
|
33635
37678
|
const time = convertSecondsToTimeUnits(numberSeconds);
|
33636
37679
|
const hours = time.hours;
|
33637
|
-
const minutes = optionalSeconds && time.minutes > 0
|
33638
|
-
? Math.round(time.minutes + time.seconds / 60)
|
33639
|
-
: time.minutes;
|
37680
|
+
const minutes = optionalSeconds && time.minutes > 0 ? Math.round(time.minutes + time.seconds / 60) : time.minutes;
|
33640
37681
|
const seconds = time.seconds;
|
33641
37682
|
const dhours = hours > 0 ? `${hours}h${minutes > 0 ? ' ' : ''}` : '';
|
33642
37683
|
const dminutes = minutes > 0 ? `${minutes}m${seconds > 0 && !optionalSeconds ? ' ' : ''}` : '';
|
@@ -33805,39 +37846,19 @@ function getDateFilterValue(op, value) {
|
|
33805
37846
|
case index.FormFilterDateOperator.absoluteBefore:
|
33806
37847
|
return value ? startOf(toDate(value), 'day').toISOString() : null;
|
33807
37848
|
case index.FormFilterDateOperator.absoluteOn:
|
33808
|
-
return value
|
33809
|
-
? [
|
33810
|
-
startOf(toDate(value), 'day').toISOString(),
|
33811
|
-
endOf(toDate(value), 'day').toISOString()
|
33812
|
-
]
|
33813
|
-
: null;
|
37849
|
+
return value ? [startOf(toDate(value), 'day').toISOString(), endOf(toDate(value), 'day').toISOString()] : null;
|
33814
37850
|
case index.FormFilterDateOperator.absoluteRange:
|
33815
|
-
return lodash.isArray(value) && value.length > 1
|
33816
|
-
? [
|
33817
|
-
startOf(toDate(value[0]), 'day').toISOString(),
|
33818
|
-
endOf(toDate(value[1]), 'day').toISOString()
|
33819
|
-
]
|
33820
|
-
: null;
|
37851
|
+
return lodash.isArray(value) && value.length > 1 ? [startOf(toDate(value[0]), 'day').toISOString(), endOf(toDate(value[1]), 'day').toISOString()] : null;
|
33821
37852
|
case index.FormFilterDateOperator.relativeDay:
|
33822
|
-
return lodash.isNumber(value)
|
33823
|
-
? dateAdd(startOf(new Date(), 'day'), 'days', -value).toISOString()
|
33824
|
-
: null;
|
37853
|
+
return lodash.isNumber(value) ? dateAdd(startOf(new Date(), 'day'), 'days', -value).toISOString() : null;
|
33825
37854
|
case index.FormFilterDateOperator.relativeWeek:
|
33826
|
-
return lodash.isNumber(value)
|
33827
|
-
? dateAdd(startOf(new Date(), 'day'), 'weeks', -value).toISOString()
|
33828
|
-
: null;
|
37855
|
+
return lodash.isNumber(value) ? dateAdd(startOf(new Date(), 'day'), 'weeks', -value).toISOString() : null;
|
33829
37856
|
case index.FormFilterDateOperator.relativeMonth:
|
33830
|
-
return lodash.isNumber(value)
|
33831
|
-
? dateAdd(startOf(new Date(), 'day'), 'months', -value).toISOString()
|
33832
|
-
: null;
|
37857
|
+
return lodash.isNumber(value) ? dateAdd(startOf(new Date(), 'day'), 'months', -value).toISOString() : null;
|
33833
37858
|
case index.FormFilterDateOperator.relativeQuarter:
|
33834
|
-
return lodash.isNumber(value)
|
33835
|
-
? dateAdd(startOf(new Date(), 'day'), 'quarters', -value).toISOString()
|
33836
|
-
: null;
|
37859
|
+
return lodash.isNumber(value) ? dateAdd(startOf(new Date(), 'day'), 'quarters', -value).toISOString() : null;
|
33837
37860
|
case index.FormFilterDateOperator.relativeYear:
|
33838
|
-
return lodash.isNumber(value)
|
33839
|
-
? dateAdd(startOf(new Date(), 'day'), 'years', -value).toISOString()
|
33840
|
-
: null;
|
37861
|
+
return lodash.isNumber(value) ? dateAdd(startOf(new Date(), 'day'), 'years', -value).toISOString() : null;
|
33841
37862
|
}
|
33842
37863
|
}
|
33843
37864
|
function getDateRangeFromFilter(datefilters) {
|
@@ -33847,9 +37868,7 @@ function getDateRangeFromFilter(datefilters) {
|
|
33847
37868
|
finalDates = {
|
33848
37869
|
mode: 'calendar',
|
33849
37870
|
startDate: lodash.isArray(dates) && dates.length > 1 ? dates[0] : dates,
|
33850
|
-
endDate: lodash.isArray(dates) && dates.length > 1
|
33851
|
-
? dates[1]
|
33852
|
-
: endOf(new Date(), 'day').toISOString()
|
37871
|
+
endDate: lodash.isArray(dates) && dates.length > 1 ? dates[1] : endOf(new Date(), 'day').toISOString()
|
33853
37872
|
};
|
33854
37873
|
if (datefilters.operator === index.FormFilterDateOperator.absoluteBefore) {
|
33855
37874
|
finalDates = {
|
@@ -33894,395 +37913,6 @@ function getFilterFromDateRange(dates) {
|
|
33894
37913
|
return { operator: index.FormFilterDateOperator.absoluteBefore, value: dates.endDate };
|
33895
37914
|
}
|
33896
37915
|
}
|
33897
|
-
const TIMEZONES = [
|
33898
|
-
'Africa/Abidjan',
|
33899
|
-
'Africa/Accra',
|
33900
|
-
'Africa/Nairobi',
|
33901
|
-
'Africa/Algiers',
|
33902
|
-
'Africa/Lagos',
|
33903
|
-
'Africa/Bissau',
|
33904
|
-
'Africa/Maputo',
|
33905
|
-
'Africa/Cairo',
|
33906
|
-
'Africa/Casablanca',
|
33907
|
-
'Africa/Ceuta',
|
33908
|
-
'Africa/El_Aaiun',
|
33909
|
-
'Africa/Johannesburg',
|
33910
|
-
'Africa/Juba',
|
33911
|
-
'Africa/Khartoum',
|
33912
|
-
'Africa/Monrovia',
|
33913
|
-
'Africa/Ndjamena',
|
33914
|
-
'Africa/Sao_Tome',
|
33915
|
-
'Africa/Tripoli',
|
33916
|
-
'Africa/Tunis',
|
33917
|
-
'Africa/Windhoek',
|
33918
|
-
'America/Adak',
|
33919
|
-
'America/Anchorage',
|
33920
|
-
'America/Port_of_Spain',
|
33921
|
-
'America/Araguaina',
|
33922
|
-
'America/Argentina/Buenos_Aires',
|
33923
|
-
'America/Argentina/Catamarca',
|
33924
|
-
'America/Argentina/Cordoba',
|
33925
|
-
'America/Argentina/Jujuy',
|
33926
|
-
'America/Argentina/La_Rioja',
|
33927
|
-
'America/Argentina/Mendoza',
|
33928
|
-
'America/Argentina/Rio_Gallegos',
|
33929
|
-
'America/Argentina/Salta',
|
33930
|
-
'America/Argentina/San_Juan',
|
33931
|
-
'America/Argentina/San_Luis',
|
33932
|
-
'America/Argentina/Tucuman',
|
33933
|
-
'America/Argentina/Ushuaia',
|
33934
|
-
'America/Curacao',
|
33935
|
-
'America/Asuncion',
|
33936
|
-
'America/Atikokan',
|
33937
|
-
'America/Bahia_Banderas',
|
33938
|
-
'America/Bahia',
|
33939
|
-
'America/Barbados',
|
33940
|
-
'America/Belem',
|
33941
|
-
'America/Belize',
|
33942
|
-
'America/Blanc-Sablon',
|
33943
|
-
'America/Boa_Vista',
|
33944
|
-
'America/Bogota',
|
33945
|
-
'America/Boise',
|
33946
|
-
'America/Cambridge_Bay',
|
33947
|
-
'America/Campo_Grande',
|
33948
|
-
'America/Cancun',
|
33949
|
-
'America/Caracas',
|
33950
|
-
'America/Cayenne',
|
33951
|
-
'America/Panama',
|
33952
|
-
'America/Chicago',
|
33953
|
-
'America/Chihuahua',
|
33954
|
-
'America/Costa_Rica',
|
33955
|
-
'America/Creston',
|
33956
|
-
'America/Cuiaba',
|
33957
|
-
'America/Danmarkshavn',
|
33958
|
-
'America/Dawson_Creek',
|
33959
|
-
'America/Dawson',
|
33960
|
-
'America/Denver',
|
33961
|
-
'America/Detroit',
|
33962
|
-
'America/Edmonton',
|
33963
|
-
'America/Eirunepe',
|
33964
|
-
'America/El_Salvador',
|
33965
|
-
'America/Tijuana',
|
33966
|
-
'America/Fort_Nelson',
|
33967
|
-
'America/Fort_Wayne',
|
33968
|
-
'America/Fortaleza',
|
33969
|
-
'America/Glace_Bay',
|
33970
|
-
'America/Godthab',
|
33971
|
-
'America/Goose_Bay',
|
33972
|
-
'America/Grand_Turk',
|
33973
|
-
'America/Guatemala',
|
33974
|
-
'America/Guayaquil',
|
33975
|
-
'America/Guyana',
|
33976
|
-
'America/Halifax',
|
33977
|
-
'America/Havana',
|
33978
|
-
'America/Hermosillo',
|
33979
|
-
'America/Indiana/Knox',
|
33980
|
-
'America/Indiana/Marengo',
|
33981
|
-
'America/Indiana/Petersburg',
|
33982
|
-
'America/Indiana/Tell_City',
|
33983
|
-
'America/Indiana/Vevay',
|
33984
|
-
'America/Indiana/Vincennes',
|
33985
|
-
'America/Indiana/Winamac',
|
33986
|
-
'America/Inuvik',
|
33987
|
-
'America/Iqaluit',
|
33988
|
-
'America/Jamaica',
|
33989
|
-
'America/Juneau',
|
33990
|
-
'America/Kentucky/Louisville',
|
33991
|
-
'America/Kentucky/Monticello',
|
33992
|
-
'America/La_Paz',
|
33993
|
-
'America/Lima',
|
33994
|
-
'America/Los_Angeles',
|
33995
|
-
'America/Maceio',
|
33996
|
-
'America/Managua',
|
33997
|
-
'America/Manaus',
|
33998
|
-
'America/Martinique',
|
33999
|
-
'America/Matamoros',
|
34000
|
-
'America/Mazatlan',
|
34001
|
-
'America/Menominee',
|
34002
|
-
'America/Merida',
|
34003
|
-
'America/Metlakatla',
|
34004
|
-
'America/Mexico_City',
|
34005
|
-
'America/Miquelon',
|
34006
|
-
'America/Moncton',
|
34007
|
-
'America/Monterrey',
|
34008
|
-
'America/Montevideo',
|
34009
|
-
'America/Toronto',
|
34010
|
-
'America/Nassau',
|
34011
|
-
'America/New_York',
|
34012
|
-
'America/Nipigon',
|
34013
|
-
'America/Nome',
|
34014
|
-
'America/Noronha',
|
34015
|
-
'America/North_Dakota/Beulah',
|
34016
|
-
'America/North_Dakota/Center',
|
34017
|
-
'America/North_Dakota/New_Salem',
|
34018
|
-
'America/Ojinaga',
|
34019
|
-
'America/Pangnirtung',
|
34020
|
-
'America/Paramaribo',
|
34021
|
-
'America/Phoenix',
|
34022
|
-
'America/Port-au-Prince',
|
34023
|
-
'America/Rio_Branco',
|
34024
|
-
'America/Porto_Velho',
|
34025
|
-
'America/Puerto_Rico',
|
34026
|
-
'America/Punta_Arenas',
|
34027
|
-
'America/Rainy_River',
|
34028
|
-
'America/Rankin_Inlet',
|
34029
|
-
'America/Recife',
|
34030
|
-
'America/Regina',
|
34031
|
-
'America/Resolute',
|
34032
|
-
'America/Santarem',
|
34033
|
-
'America/Santiago',
|
34034
|
-
'America/Santo_Domingo',
|
34035
|
-
'America/Sao_Paulo',
|
34036
|
-
'America/Scoresbysund',
|
34037
|
-
'America/Sitka',
|
34038
|
-
'America/St_Johns',
|
34039
|
-
'America/Swift_Current',
|
34040
|
-
'America/Tegucigalpa',
|
34041
|
-
'America/Thule',
|
34042
|
-
'America/Thunder_Bay',
|
34043
|
-
'America/Vancouver',
|
34044
|
-
'America/Whitehorse',
|
34045
|
-
'America/Winnipeg',
|
34046
|
-
'America/Yakutat',
|
34047
|
-
'America/Yellowknife',
|
34048
|
-
'Antarctica/Casey',
|
34049
|
-
'Antarctica/Davis',
|
34050
|
-
'Antarctica/DumontDUrville',
|
34051
|
-
'Antarctica/Macquarie',
|
34052
|
-
'Antarctica/Mawson',
|
34053
|
-
'Pacific/Auckland',
|
34054
|
-
'Antarctica/Palmer',
|
34055
|
-
'Antarctica/Rothera',
|
34056
|
-
'Antarctica/Syowa',
|
34057
|
-
'Antarctica/Troll',
|
34058
|
-
'Antarctica/Vostok',
|
34059
|
-
'Europe/Oslo',
|
34060
|
-
'Asia/Riyadh',
|
34061
|
-
'Asia/Almaty',
|
34062
|
-
'Asia/Amman',
|
34063
|
-
'Asia/Anadyr',
|
34064
|
-
'Asia/Aqtau',
|
34065
|
-
'Asia/Aqtobe',
|
34066
|
-
'Asia/Ashgabat',
|
34067
|
-
'Asia/Atyrau',
|
34068
|
-
'Asia/Baghdad',
|
34069
|
-
'Asia/Qatar',
|
34070
|
-
'Asia/Baku',
|
34071
|
-
'Asia/Bangkok',
|
34072
|
-
'Asia/Barnaul',
|
34073
|
-
'Asia/Beirut',
|
34074
|
-
'Asia/Bishkek',
|
34075
|
-
'Asia/Brunei',
|
34076
|
-
'Asia/Kolkata',
|
34077
|
-
'Asia/Chita',
|
34078
|
-
'Asia/Choibalsan',
|
34079
|
-
'Asia/Shanghai',
|
34080
|
-
'Asia/Colombo',
|
34081
|
-
'Asia/Dhaka',
|
34082
|
-
'Asia/Damascus',
|
34083
|
-
'Asia/Dili',
|
34084
|
-
'Asia/Dubai',
|
34085
|
-
'Asia/Dushanbe',
|
34086
|
-
'Asia/Famagusta',
|
34087
|
-
'Asia/Gaza',
|
34088
|
-
'Asia/Hebron',
|
34089
|
-
'Asia/Ho_Chi_Minh',
|
34090
|
-
'Asia/Hong_Kong',
|
34091
|
-
'Asia/Hovd',
|
34092
|
-
'Asia/Irkutsk',
|
34093
|
-
'Europe/Istanbul',
|
34094
|
-
'Asia/Jakarta',
|
34095
|
-
'Asia/Jayapura',
|
34096
|
-
'Asia/Jerusalem',
|
34097
|
-
'Asia/Kabul',
|
34098
|
-
'Asia/Kamchatka',
|
34099
|
-
'Asia/Karachi',
|
34100
|
-
'Asia/Urumqi',
|
34101
|
-
'Asia/Kathmandu',
|
34102
|
-
'Asia/Khandyga',
|
34103
|
-
'Asia/Krasnoyarsk',
|
34104
|
-
'Asia/Kuala_Lumpur',
|
34105
|
-
'Asia/Kuching',
|
34106
|
-
'Asia/Macau',
|
34107
|
-
'Asia/Magadan',
|
34108
|
-
'Asia/Makassar',
|
34109
|
-
'Asia/Manila',
|
34110
|
-
'Asia/Nicosia',
|
34111
|
-
'Asia/Novokuznetsk',
|
34112
|
-
'Asia/Novosibirsk',
|
34113
|
-
'Asia/Omsk',
|
34114
|
-
'Asia/Oral',
|
34115
|
-
'Asia/Pontianak',
|
34116
|
-
'Asia/Pyongyang',
|
34117
|
-
'Asia/Qostanay',
|
34118
|
-
'Asia/Qyzylorda',
|
34119
|
-
'Asia/Rangoon',
|
34120
|
-
'Asia/Sakhalin',
|
34121
|
-
'Asia/Samarkand',
|
34122
|
-
'Asia/Seoul',
|
34123
|
-
'Asia/Singapore',
|
34124
|
-
'Asia/Srednekolymsk',
|
34125
|
-
'Asia/Taipei',
|
34126
|
-
'Asia/Tashkent',
|
34127
|
-
'Asia/Tbilisi',
|
34128
|
-
'Asia/Tehran',
|
34129
|
-
'Asia/Thimphu',
|
34130
|
-
'Asia/Tokyo',
|
34131
|
-
'Asia/Tomsk',
|
34132
|
-
'Asia/Ulaanbaatar',
|
34133
|
-
'Asia/Ust-Nera',
|
34134
|
-
'Asia/Vladivostok',
|
34135
|
-
'Asia/Yakutsk',
|
34136
|
-
'Asia/Yekaterinburg',
|
34137
|
-
'Asia/Yerevan',
|
34138
|
-
'Atlantic/Azores',
|
34139
|
-
'Atlantic/Bermuda',
|
34140
|
-
'Atlantic/Canary',
|
34141
|
-
'Atlantic/Cape_Verde',
|
34142
|
-
'Atlantic/Faroe',
|
34143
|
-
'Atlantic/Madeira',
|
34144
|
-
'Atlantic/Reykjavik',
|
34145
|
-
'Atlantic/South_Georgia',
|
34146
|
-
'Atlantic/Stanley',
|
34147
|
-
'Australia/Sydney',
|
34148
|
-
'Australia/Adelaide',
|
34149
|
-
'Australia/Brisbane',
|
34150
|
-
'Australia/Broken_Hill',
|
34151
|
-
'Australia/Currie',
|
34152
|
-
'Australia/Darwin',
|
34153
|
-
'Australia/Eucla',
|
34154
|
-
'Australia/Hobart',
|
34155
|
-
'Australia/Lord_Howe',
|
34156
|
-
'Australia/Lindeman',
|
34157
|
-
'Australia/Melbourne',
|
34158
|
-
'Australia/Perth',
|
34159
|
-
'CET',
|
34160
|
-
'Pacific/Easter',
|
34161
|
-
'CST6CDT',
|
34162
|
-
'EET',
|
34163
|
-
'Europe/Dublin',
|
34164
|
-
'EST',
|
34165
|
-
'EST5EDT',
|
34166
|
-
'Etc/GMT-0',
|
34167
|
-
'Etc/GMT-1',
|
34168
|
-
'Etc/GMT-10',
|
34169
|
-
'Etc/GMT-11',
|
34170
|
-
'Etc/GMT-12',
|
34171
|
-
'Etc/GMT-13',
|
34172
|
-
'Etc/GMT-14',
|
34173
|
-
'Etc/GMT-2',
|
34174
|
-
'Etc/GMT-3',
|
34175
|
-
'Etc/GMT-4',
|
34176
|
-
'Etc/GMT-5',
|
34177
|
-
'Etc/GMT-6',
|
34178
|
-
'Etc/GMT-7',
|
34179
|
-
'Etc/GMT-8',
|
34180
|
-
'Etc/GMT-9',
|
34181
|
-
'Etc/GMT+1',
|
34182
|
-
'Etc/GMT+10',
|
34183
|
-
'Etc/GMT+11',
|
34184
|
-
'Etc/GMT+12',
|
34185
|
-
'Etc/GMT+2',
|
34186
|
-
'Etc/GMT+3',
|
34187
|
-
'Etc/GMT+4',
|
34188
|
-
'Etc/GMT+5',
|
34189
|
-
'Etc/GMT+6',
|
34190
|
-
'Etc/GMT+7',
|
34191
|
-
'Etc/GMT+8',
|
34192
|
-
'Etc/GMT+9',
|
34193
|
-
'Etc/UTC',
|
34194
|
-
'Europe/Amsterdam',
|
34195
|
-
'Europe/Andorra',
|
34196
|
-
'Europe/Astrakhan',
|
34197
|
-
'Europe/Athens',
|
34198
|
-
'Europe/London',
|
34199
|
-
'Europe/Belgrade',
|
34200
|
-
'Europe/Berlin',
|
34201
|
-
'Europe/Prague',
|
34202
|
-
'Europe/Brussels',
|
34203
|
-
'Europe/Bucharest',
|
34204
|
-
'Europe/Budapest',
|
34205
|
-
'Europe/Zurich',
|
34206
|
-
'Europe/Chisinau',
|
34207
|
-
'Europe/Copenhagen',
|
34208
|
-
'Europe/Gibraltar',
|
34209
|
-
'Europe/Helsinki',
|
34210
|
-
'Europe/Kaliningrad',
|
34211
|
-
'Europe/Kiev',
|
34212
|
-
'Europe/Kirov',
|
34213
|
-
'Europe/Lisbon',
|
34214
|
-
'Europe/Luxembourg',
|
34215
|
-
'Europe/Madrid',
|
34216
|
-
'Europe/Malta',
|
34217
|
-
'Europe/Minsk',
|
34218
|
-
'Europe/Monaco',
|
34219
|
-
'Europe/Moscow',
|
34220
|
-
'Europe/Paris',
|
34221
|
-
'Europe/Riga',
|
34222
|
-
'Europe/Rome',
|
34223
|
-
'Europe/Samara',
|
34224
|
-
'Europe/Saratov',
|
34225
|
-
'Europe/Simferopol',
|
34226
|
-
'Europe/Sofia',
|
34227
|
-
'Europe/Stockholm',
|
34228
|
-
'Europe/Tallinn',
|
34229
|
-
'Europe/Tirane',
|
34230
|
-
'Europe/Ulyanovsk',
|
34231
|
-
'Europe/Uzhgorod',
|
34232
|
-
'Europe/Vienna',
|
34233
|
-
'Europe/Vilnius',
|
34234
|
-
'Europe/Volgograd',
|
34235
|
-
'Europe/Warsaw',
|
34236
|
-
'Europe/Zaporozhye',
|
34237
|
-
'HST',
|
34238
|
-
'Indian/Chagos',
|
34239
|
-
'Indian/Christmas',
|
34240
|
-
'Indian/Cocos',
|
34241
|
-
'Indian/Kerguelen',
|
34242
|
-
'Indian/Mahe',
|
34243
|
-
'Indian/Maldives',
|
34244
|
-
'Indian/Mauritius',
|
34245
|
-
'Indian/Reunion',
|
34246
|
-
'Pacific/Kwajalein',
|
34247
|
-
'MET',
|
34248
|
-
'MST',
|
34249
|
-
'MST7MDT',
|
34250
|
-
'Pacific/Chatham',
|
34251
|
-
'Pacific/Apia',
|
34252
|
-
'Pacific/Bougainville',
|
34253
|
-
'Pacific/Chuuk',
|
34254
|
-
'Pacific/Efate',
|
34255
|
-
'Pacific/Enderbury',
|
34256
|
-
'Pacific/Fakaofo',
|
34257
|
-
'Pacific/Fiji',
|
34258
|
-
'Pacific/Funafuti',
|
34259
|
-
'Pacific/Galapagos',
|
34260
|
-
'Pacific/Gambier',
|
34261
|
-
'Pacific/Guadalcanal',
|
34262
|
-
'Pacific/Guam',
|
34263
|
-
'Pacific/Honolulu',
|
34264
|
-
'Pacific/Kiritimati',
|
34265
|
-
'Pacific/Kosrae',
|
34266
|
-
'Pacific/Majuro',
|
34267
|
-
'Pacific/Marquesas',
|
34268
|
-
'Pacific/Pago_Pago',
|
34269
|
-
'Pacific/Nauru',
|
34270
|
-
'Pacific/Niue',
|
34271
|
-
'Pacific/Norfolk',
|
34272
|
-
'Pacific/Noumea',
|
34273
|
-
'Pacific/Palau',
|
34274
|
-
'Pacific/Pitcairn',
|
34275
|
-
'Pacific/Pohnpei',
|
34276
|
-
'Pacific/Port_Moresby',
|
34277
|
-
'Pacific/Rarotonga',
|
34278
|
-
'Pacific/Tahiti',
|
34279
|
-
'Pacific/Tarawa',
|
34280
|
-
'Pacific/Tongatapu',
|
34281
|
-
'Pacific/Wake',
|
34282
|
-
'Pacific/Wallis',
|
34283
|
-
'PST8PDT',
|
34284
|
-
'WET'
|
34285
|
-
];
|
34286
37916
|
/**
|
34287
37917
|
*
|
34288
37918
|
* @param timeZone the timezone you want to know the offset from
|
@@ -34296,9 +37926,7 @@ function getTimezoneOffset(timeZone = 'UTC', date = new Date()) {
|
|
34296
37926
|
}
|
34297
37927
|
function getStartDayOfWeek(language) {
|
34298
37928
|
var _a;
|
34299
|
-
const config = [
|
34300
|
-
{ day: 0, languages: ['ca', 'us', 'pt', 'ja', 'th', 'zhk', 'he'] }
|
34301
|
-
];
|
37929
|
+
const config = [{ day: 0, languages: ['ca', 'us', 'pt', 'ja', 'th', 'zhk', 'he'] }];
|
34302
37930
|
const retVal = (_a = config.find((c) => c.languages.indexOf(language) >= 0)) === null || _a === void 0 ? void 0 : _a.day;
|
34303
37931
|
if (lodash.isNumber(retVal)) {
|
34304
37932
|
return retVal;
|
@@ -34515,6 +38143,9 @@ function getEventConfigsFromEvent(event, actions, eventHandler) {
|
|
34515
38143
|
type: event.type,
|
34516
38144
|
location: event.location,
|
34517
38145
|
virtualRoomUrl: event.virtualRoomUrl,
|
38146
|
+
recurring: event.recurring,
|
38147
|
+
recurrenceStart: event.recurrenceStart,
|
38148
|
+
recurrenceEnd: event.recurrenceEnd,
|
34518
38149
|
eventHandler
|
34519
38150
|
};
|
34520
38151
|
}
|
@@ -34902,7 +38533,10 @@ async function getDefaultAudience({ mode, newAudience, defaultCount, audienceRef
|
|
34902
38533
|
* @param type Event Type
|
34903
38534
|
*/
|
34904
38535
|
function hasEventAction(info, type, userId) {
|
34905
|
-
return !!(info &&
|
38536
|
+
return !!(info &&
|
38537
|
+
info[type] &&
|
38538
|
+
info[type] &&
|
38539
|
+
info[type].findIndex((i) => i._id === (userId || getSession().userId)) >= 0);
|
34906
38540
|
}
|
34907
38541
|
/**
|
34908
38542
|
* ui configs for displaying event status in a stencil component
|
@@ -34943,7 +38577,12 @@ function getEventStatusInfo(event, userId) {
|
|
34943
38577
|
*/
|
34944
38578
|
function getCalendarActionType(info, userId) {
|
34945
38579
|
var _a;
|
34946
|
-
const TARGET_ACTIONS_TYPES = [
|
38580
|
+
const TARGET_ACTIONS_TYPES = [
|
38581
|
+
index.IEntityActionType.join,
|
38582
|
+
index.IEntityActionType.decline,
|
38583
|
+
index.IEntityActionType.maybe,
|
38584
|
+
index.IEntityActionType.notanswered
|
38585
|
+
];
|
34947
38586
|
if (info && userId) {
|
34948
38587
|
for (let i = 0; i < TARGET_ACTIONS_TYPES.length; i++) {
|
34949
38588
|
if ((_a = info[TARGET_ACTIONS_TYPES[i]]) === null || _a === void 0 ? void 0 : _a.find((item) => item._id === userId)) {
|
@@ -34955,20 +38594,29 @@ function getCalendarActionType(info, userId) {
|
|
34955
38594
|
}
|
34956
38595
|
function getEventTypeColor(type) {
|
34957
38596
|
switch (type) {
|
34958
|
-
|
34959
|
-
|
34960
|
-
|
34961
|
-
|
34962
|
-
|
34963
|
-
|
34964
|
-
|
34965
|
-
|
34966
|
-
|
34967
|
-
|
34968
|
-
|
34969
|
-
|
38597
|
+
default: {
|
38598
|
+
const entityColors = {
|
38599
|
+
todo: 'app-color',
|
38600
|
+
memos: 'warning',
|
38601
|
+
visits: 'info',
|
38602
|
+
feeds: 'wood',
|
38603
|
+
courses: 'accent',
|
38604
|
+
shift: 'anthracite',
|
38605
|
+
events: 'success'
|
38606
|
+
};
|
38607
|
+
return entityColors[type];
|
38608
|
+
}
|
34970
38609
|
}
|
34971
38610
|
}
|
38611
|
+
function getCalendarParticipantStatusColor(participantStatus) {
|
38612
|
+
const colors = {
|
38613
|
+
join: 'success',
|
38614
|
+
decline: 'danger',
|
38615
|
+
maybe: 'warning',
|
38616
|
+
notanswered: 'stable'
|
38617
|
+
};
|
38618
|
+
return colors[participantStatus || 'notanswered'];
|
38619
|
+
}
|
34972
38620
|
function getEventInfoCount(info, type) {
|
34973
38621
|
var _a;
|
34974
38622
|
return (info && info[type] && info[type] && ((_a = info[type]) === null || _a === void 0 ? void 0 : _a.length)) || 0;
|
@@ -39605,12 +43253,14 @@ function evalConditionsInContext(conditions, data, flattenContext, suffix = '',
|
|
39605
43253
|
value = condition.values;
|
39606
43254
|
}
|
39607
43255
|
if (condition.operator === '>=' || condition.operator === '<=' || condition.operator === 'greaterthan' || condition.operator === 'lessthan') {
|
39608
|
-
const op = condition.operator === 'greaterthan'
|
43256
|
+
const op = condition.operator === 'greaterthan' || condition.operator === '>=' ? '>' : condition.operator === 'lessthan' || condition.operator === '<=' ? '<' : condition.operator;
|
43257
|
+
const fieldValueAttr = 'getAttributeValue(' + '"' + condition.field.name + suffix + '")';
|
39609
43258
|
let separator = '';
|
39610
43259
|
if (condition.field.type === index.FormFieldType.date || condition.field.type === index.FormFieldType.datetime || condition.field.type === index.FormFieldType.time) {
|
39611
43260
|
separator = '"';
|
39612
43261
|
}
|
39613
|
-
|
43262
|
+
const comparate = separator + value + separator;
|
43263
|
+
expression = `${fieldValueAttr} ${op} ${comparate} or ${fieldValueAttr} == ${comparate}`;
|
39614
43264
|
}
|
39615
43265
|
else {
|
39616
43266
|
const op = condition.operator === 'equals' || condition.operator === '===' ? '==' : condition.operator === 'notequals' || condition.operator === '!==' ? '!=' : '==';
|
@@ -60002,7 +63652,6 @@ exports.ScreenOrientation = ScreenOrientation;
|
|
60002
63652
|
exports.StatusBar = StatusBar;
|
60003
63653
|
exports.Subject = Subject;
|
60004
63654
|
exports.Subscription = Subscription;
|
60005
|
-
exports.TIMEZONES = TIMEZONES;
|
60006
63655
|
exports.WebPlugin = WebPlugin;
|
60007
63656
|
exports.YOOBICON_ENTITIES_MAP = YOOBICON_ENTITIES_MAP;
|
60008
63657
|
exports.__extends = __extends$9;
|
@@ -60076,6 +63725,7 @@ exports.findField = findField;
|
|
60076
63725
|
exports.findMaxScore = findMaxScore;
|
60077
63726
|
exports.findMultiMaxScore = findMultiMaxScore;
|
60078
63727
|
exports.findParent = findParent;
|
63728
|
+
exports.fixRRuleLocalUTCtoUTC = fixRRuleLocalUTCtoUTC;
|
60079
63729
|
exports.floatingIconAnimation = floatingIconAnimation;
|
60080
63730
|
exports.formatDistanceFromNow = formatDistanceFromNow;
|
60081
63731
|
exports.formatScoringValuePairs = formatScoringValuePairs;
|
@@ -60089,6 +63739,7 @@ exports.generateYoobicQRCode = generateYoobicQRCode;
|
|
60089
63739
|
exports.getAsyncExtraData = getAsyncExtraData;
|
60090
63740
|
exports.getAudioDuration = getAudioDuration;
|
60091
63741
|
exports.getAuthentication = getAuthentication;
|
63742
|
+
exports.getCalendarParticipantStatusColor = getCalendarParticipantStatusColor;
|
60092
63743
|
exports.getCampaignColor = getCampaignColor;
|
60093
63744
|
exports.getCampaignConfigsForFeed = getCampaignConfigsForFeed;
|
60094
63745
|
exports.getCampaignIcon = getCampaignIcon;
|
@@ -60386,6 +64037,8 @@ exports.toDate = toDate;
|
|
60386
64037
|
exports.toHours = toHours;
|
60387
64038
|
exports.toPng = toPng;
|
60388
64039
|
exports.toSeconds = toSeconds;
|
64040
|
+
exports.toTimezone = toTimezone;
|
64041
|
+
exports.toUTC = toUTC;
|
60389
64042
|
exports.translate = translate;
|
60390
64043
|
exports.translateMulti = translateMulti;
|
60391
64044
|
exports.truncateMarkdown = truncateMarkdown;
|