@nextcloud/vue 8.12.0 → 8.14.0
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/CHANGELOG.md +68 -2
- package/README.md +5 -0
- package/dist/Components/NcActionButton.cjs +3 -3
- package/dist/Components/NcActionButton.cjs.map +1 -1
- package/dist/Components/NcActionButton.mjs +3 -3
- package/dist/Components/NcActionButton.mjs.map +1 -1
- package/dist/Components/NcActionButtonGroup.cjs +1 -1
- package/dist/Components/NcActionButtonGroup.mjs +1 -1
- package/dist/Components/NcActionCaption.cjs +2 -2
- package/dist/Components/NcActionCaption.cjs.map +1 -1
- package/dist/Components/NcActionCaption.mjs +2 -2
- package/dist/Components/NcActionCaption.mjs.map +1 -1
- package/dist/Components/NcActionCheckbox.cjs +6 -8
- package/dist/Components/NcActionCheckbox.cjs.map +1 -1
- package/dist/Components/NcActionCheckbox.mjs +6 -8
- package/dist/Components/NcActionCheckbox.mjs.map +1 -1
- package/dist/Components/NcActionInput.cjs +1 -1
- package/dist/Components/NcActionInput.mjs +1 -1
- package/dist/Components/NcActionLink.cjs +3 -3
- package/dist/Components/NcActionLink.cjs.map +1 -1
- package/dist/Components/NcActionLink.mjs +3 -3
- package/dist/Components/NcActionLink.mjs.map +1 -1
- package/dist/Components/NcActionRadio.cjs +6 -8
- package/dist/Components/NcActionRadio.cjs.map +1 -1
- package/dist/Components/NcActionRadio.mjs +6 -8
- package/dist/Components/NcActionRadio.mjs.map +1 -1
- package/dist/Components/NcActionRouter.cjs +3 -3
- package/dist/Components/NcActionRouter.cjs.map +1 -1
- package/dist/Components/NcActionRouter.mjs +3 -3
- package/dist/Components/NcActionRouter.mjs.map +1 -1
- package/dist/Components/NcActionSeparator.cjs +2 -2
- package/dist/Components/NcActionSeparator.cjs.map +1 -1
- package/dist/Components/NcActionSeparator.mjs +2 -2
- package/dist/Components/NcActionSeparator.mjs.map +1 -1
- package/dist/Components/NcActionText.cjs +3 -3
- package/dist/Components/NcActionText.cjs.map +1 -1
- package/dist/Components/NcActionText.mjs +3 -3
- package/dist/Components/NcActionText.mjs.map +1 -1
- package/dist/Components/NcActionTextEditable.cjs +4 -4
- package/dist/Components/NcActionTextEditable.cjs.map +1 -1
- package/dist/Components/NcActionTextEditable.mjs +4 -4
- package/dist/Components/NcActionTextEditable.mjs.map +1 -1
- package/dist/Components/NcActions.cjs +1 -1
- package/dist/Components/NcActions.mjs +1 -1
- package/dist/Components/NcAppContent.cjs +1 -1
- package/dist/Components/NcAppContent.mjs +1 -1
- package/dist/Components/NcAppContentDetails.cjs.map +1 -1
- package/dist/Components/NcAppContentDetails.mjs.map +1 -1
- package/dist/Components/NcAppContentList.cjs.map +1 -1
- package/dist/Components/NcAppContentList.mjs.map +1 -1
- package/dist/Components/NcAppNavigation.cjs +1 -1
- package/dist/Components/NcAppNavigation.mjs +1 -1
- package/dist/Components/NcAppNavigationCaption.cjs +1 -1
- package/dist/Components/NcAppNavigationCaption.mjs +1 -1
- package/dist/Components/NcAppNavigationIconBullet.cjs +2 -2
- package/dist/Components/NcAppNavigationIconBullet.cjs.map +1 -1
- package/dist/Components/NcAppNavigationIconBullet.mjs +2 -2
- package/dist/Components/NcAppNavigationIconBullet.mjs.map +1 -1
- package/dist/Components/NcAppNavigationItem.cjs +1 -1
- package/dist/Components/NcAppNavigationItem.mjs +1 -1
- package/dist/Components/NcAppNavigationList.cjs +2 -2
- package/dist/Components/NcAppNavigationList.cjs.map +1 -1
- package/dist/Components/NcAppNavigationList.mjs +2 -2
- package/dist/Components/NcAppNavigationList.mjs.map +1 -1
- package/dist/Components/NcAppNavigationNew.cjs +2 -2
- package/dist/Components/NcAppNavigationNew.cjs.map +1 -1
- package/dist/Components/NcAppNavigationNew.mjs +2 -2
- package/dist/Components/NcAppNavigationNew.mjs.map +1 -1
- package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
- package/dist/Components/NcAppNavigationSettings.cjs +1 -1
- package/dist/Components/NcAppNavigationSettings.mjs +1 -1
- package/dist/Components/NcAppNavigationSpacer.cjs +2 -2
- package/dist/Components/NcAppNavigationSpacer.cjs.map +1 -1
- package/dist/Components/NcAppNavigationSpacer.mjs +2 -2
- package/dist/Components/NcAppNavigationSpacer.mjs.map +1 -1
- package/dist/Components/NcAppNavigationToggle.cjs +1 -21
- package/dist/Components/NcAppNavigationToggle.cjs.map +1 -1
- package/dist/Components/NcAppNavigationToggle.mjs +1 -21
- package/dist/Components/NcAppNavigationToggle.mjs.map +1 -1
- package/dist/Components/NcAppSettingsDialog.cjs +1 -1
- package/dist/Components/NcAppSettingsDialog.mjs +1 -1
- package/dist/Components/NcAppSettingsSection.cjs +3 -3
- package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
- package/dist/Components/NcAppSettingsSection.mjs +3 -3
- package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
- package/dist/Components/NcAppSidebar.cjs +1 -1
- package/dist/Components/NcAppSidebar.mjs +1 -1
- package/dist/Components/NcAppSidebarTab.cjs +2 -2
- package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
- package/dist/Components/NcAppSidebarTab.mjs +2 -2
- package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
- package/dist/Components/NcAvatar.cjs +1 -1
- package/dist/Components/NcAvatar.mjs +1 -1
- package/dist/Components/NcBreadcrumb.cjs +1 -1
- package/dist/Components/NcBreadcrumb.mjs +1 -1
- package/dist/Components/NcBreadcrumbs.cjs +1 -1
- package/dist/Components/NcBreadcrumbs.mjs +1 -1
- package/dist/Components/NcButton.cjs +15 -3
- package/dist/Components/NcButton.cjs.map +1 -1
- package/dist/Components/NcButton.mjs +15 -3
- package/dist/Components/NcButton.mjs.map +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
- package/dist/Components/NcChip.cjs +111 -0
- package/dist/Components/NcChip.cjs.map +1 -0
- package/dist/Components/NcChip.mjs +112 -0
- package/dist/Components/NcChip.mjs.map +1 -0
- package/dist/Components/NcCollectionList.cjs +3 -0
- package/dist/Components/NcCollectionList.cjs.map +1 -0
- package/dist/Components/NcCollectionList.mjs +4 -0
- package/dist/Components/NcCollectionList.mjs.map +1 -0
- package/dist/Components/NcColorPicker.cjs +1 -1
- package/dist/Components/NcColorPicker.mjs +1 -1
- package/dist/Components/NcContent.cjs +1 -1
- package/dist/Components/NcContent.mjs +1 -1
- package/dist/Components/NcCounterBubble.cjs +2 -2
- package/dist/Components/NcCounterBubble.cjs.map +1 -1
- package/dist/Components/NcCounterBubble.mjs +2 -2
- package/dist/Components/NcCounterBubble.mjs.map +1 -1
- package/dist/Components/NcDashboardWidget.cjs +1 -1
- package/dist/Components/NcDashboardWidget.mjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
- package/dist/Components/NcDateTime.cjs +1 -1
- package/dist/Components/NcDateTime.mjs +1 -1
- package/dist/Components/NcDateTimePicker.cjs +8 -29
- package/dist/Components/NcDateTimePicker.cjs.map +1 -1
- package/dist/Components/NcDateTimePicker.mjs +8 -29
- package/dist/Components/NcDateTimePicker.mjs.map +1 -1
- package/dist/Components/NcDateTimePickerNative.cjs +3 -24
- package/dist/Components/NcDateTimePickerNative.cjs.map +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +3 -24
- package/dist/Components/NcDateTimePickerNative.mjs.map +1 -1
- package/dist/Components/NcDialog.cjs +1 -1
- package/dist/Components/NcDialog.mjs +1 -1
- package/dist/Components/NcDialogButton.cjs +1 -1
- package/dist/Components/NcDialogButton.mjs +1 -1
- package/dist/Components/NcEllipsisedOption.cjs +9 -3
- package/dist/Components/NcEllipsisedOption.cjs.map +1 -1
- package/dist/Components/NcEllipsisedOption.mjs +9 -3
- package/dist/Components/NcEllipsisedOption.mjs.map +1 -1
- package/dist/Components/NcEmojiPicker.cjs +1 -1
- package/dist/Components/NcEmojiPicker.mjs +1 -1
- package/dist/Components/NcEmptyContent.cjs +2 -2
- package/dist/Components/NcEmptyContent.cjs.map +1 -1
- package/dist/Components/NcEmptyContent.mjs +2 -2
- package/dist/Components/NcEmptyContent.mjs.map +1 -1
- package/dist/Components/NcGuestContent.cjs +2 -2
- package/dist/Components/NcGuestContent.cjs.map +1 -1
- package/dist/Components/NcGuestContent.mjs +2 -2
- package/dist/Components/NcGuestContent.mjs.map +1 -1
- package/dist/Components/NcHeaderMenu.cjs +1 -1
- package/dist/Components/NcHeaderMenu.mjs +1 -1
- package/dist/Components/NcHighlight.cjs +1 -1
- package/dist/Components/NcHighlight.mjs +1 -1
- package/dist/Components/NcIconSvgWrapper.cjs +1 -1
- package/dist/Components/NcIconSvgWrapper.mjs +1 -1
- package/dist/Components/NcInputField.cjs +3 -3
- package/dist/Components/NcInputField.cjs.map +1 -1
- package/dist/Components/NcInputField.mjs +3 -3
- package/dist/Components/NcInputField.mjs.map +1 -1
- package/dist/Components/NcListItem.cjs +1 -1
- package/dist/Components/NcListItem.mjs +1 -1
- package/dist/Components/NcListItemIcon.cjs +1 -1
- package/dist/Components/NcListItemIcon.mjs +1 -1
- package/dist/Components/NcLoadingIcon.cjs +2 -2
- package/dist/Components/NcLoadingIcon.cjs.map +1 -1
- package/dist/Components/NcLoadingIcon.mjs +2 -2
- package/dist/Components/NcLoadingIcon.mjs.map +1 -1
- package/dist/Components/NcModal.cjs +32 -55
- package/dist/Components/NcModal.cjs.map +1 -1
- package/dist/Components/NcModal.mjs +30 -55
- package/dist/Components/NcModal.mjs.map +1 -1
- package/dist/Components/NcNoteCard.cjs +2 -2
- package/dist/Components/NcNoteCard.cjs.map +1 -1
- package/dist/Components/NcNoteCard.mjs +2 -2
- package/dist/Components/NcNoteCard.mjs.map +1 -1
- package/dist/Components/NcPasswordField.cjs +1 -1
- package/dist/Components/NcPasswordField.mjs +1 -1
- package/dist/Components/NcPopover.cjs +1 -1
- package/dist/Components/NcPopover.mjs +1 -1
- package/dist/Components/NcProgressBar.cjs +1 -1
- package/dist/Components/NcProgressBar.mjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
- package/dist/Components/NcRichContenteditable.cjs +2 -2
- package/dist/Components/NcRichContenteditable.mjs +2 -2
- package/dist/Components/NcRichText.cjs +2 -23
- package/dist/Components/NcRichText.cjs.map +1 -1
- package/dist/Components/NcRichText.mjs +3 -24
- package/dist/Components/NcRichText.mjs.map +1 -1
- package/dist/Components/NcSelect.cjs +1 -1
- package/dist/Components/NcSelect.mjs +1 -1
- package/dist/Components/NcSelectTags.cjs +1 -1
- package/dist/Components/NcSelectTags.mjs +1 -1
- package/dist/Components/NcSettingsInputText.cjs +1 -1
- package/dist/Components/NcSettingsInputText.mjs +1 -1
- package/dist/Components/NcSettingsSection.cjs +1 -1
- package/dist/Components/NcSettingsSection.mjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.cjs +1 -22
- package/dist/Components/NcSettingsSelectGroup.cjs.map +1 -1
- package/dist/Components/NcSettingsSelectGroup.mjs +1 -22
- package/dist/Components/NcSettingsSelectGroup.mjs.map +1 -1
- package/dist/Components/NcTextArea.cjs +3 -3
- package/dist/Components/NcTextArea.cjs.map +1 -1
- package/dist/Components/NcTextArea.mjs +3 -3
- package/dist/Components/NcTextArea.mjs.map +1 -1
- package/dist/Components/NcTextField.cjs +1 -1
- package/dist/Components/NcTextField.mjs +1 -1
- package/dist/Components/NcTimezonePicker.cjs +1 -1
- package/dist/Components/NcTimezonePicker.mjs +1 -1
- package/dist/Components/NcUserBubble.cjs +1 -1
- package/dist/Components/NcUserBubble.mjs +1 -1
- package/dist/Components/NcUserStatusIcon.cjs +1 -1
- package/dist/Components/NcUserStatusIcon.mjs +1 -1
- package/dist/Components/NcVNodes.cjs.map +1 -1
- package/dist/Components/NcVNodes.mjs.map +1 -1
- package/dist/Composables/useIsFullscreen.cjs +0 -21
- package/dist/Composables/useIsFullscreen.cjs.map +1 -1
- package/dist/Composables/useIsFullscreen.mjs +0 -21
- package/dist/Composables/useIsFullscreen.mjs.map +1 -1
- package/dist/Composables/useIsMobile.cjs +0 -21
- package/dist/Composables/useIsMobile.cjs.map +1 -1
- package/dist/Composables/useIsMobile.mjs +0 -21
- package/dist/Composables/useIsMobile.mjs.map +1 -1
- package/dist/Directives/Focus.cjs +0 -21
- package/dist/Directives/Focus.cjs.map +1 -1
- package/dist/Directives/Focus.mjs +0 -21
- package/dist/Directives/Focus.mjs.map +1 -1
- package/dist/Directives/Linkify.cjs +1 -1
- package/dist/Directives/Linkify.cjs.map +1 -1
- package/dist/Directives/Linkify.mjs +1 -1
- package/dist/Directives/Linkify.mjs.map +1 -1
- package/dist/Directives/Tooltip.cjs +1 -23
- package/dist/Directives/Tooltip.cjs.map +1 -1
- package/dist/Directives/Tooltip.mjs +1 -23
- package/dist/Directives/Tooltip.mjs.map +1 -1
- package/dist/Functions/a11y.cjs +0 -21
- package/dist/Functions/a11y.cjs.map +1 -1
- package/dist/Functions/a11y.mjs +0 -21
- package/dist/Functions/a11y.mjs.map +1 -1
- package/dist/Functions/emoji.cjs +1 -1
- package/dist/Functions/emoji.mjs +1 -1
- package/dist/Functions/reference.cjs +1 -1
- package/dist/Functions/reference.mjs +1 -1
- package/dist/Functions/usernameToColor.cjs +1 -1
- package/dist/Functions/usernameToColor.mjs +1 -1
- package/dist/Mixins/clickOutsideOptions.cjs +0 -21
- package/dist/Mixins/clickOutsideOptions.cjs.map +1 -1
- package/dist/Mixins/clickOutsideOptions.mjs +0 -21
- package/dist/Mixins/clickOutsideOptions.mjs.map +1 -1
- package/dist/Mixins/isFullscreen.cjs +0 -21
- package/dist/Mixins/isFullscreen.cjs.map +1 -1
- package/dist/Mixins/isFullscreen.mjs +0 -21
- package/dist/Mixins/isFullscreen.mjs.map +1 -1
- package/dist/Mixins/isMobile.cjs +0 -21
- package/dist/Mixins/isMobile.cjs.map +1 -1
- package/dist/Mixins/isMobile.mjs +0 -21
- package/dist/Mixins/isMobile.mjs.map +1 -1
- package/dist/Mixins/richEditor.cjs +2 -2
- package/dist/Mixins/richEditor.mjs +2 -2
- package/dist/assets/NcActionButton-D90PTEA5.css +107 -0
- package/dist/assets/{NcActionButtonGroup-CvloX35s.css → NcActionButtonGroup-CQxLn2fv.css} +6 -20
- package/dist/assets/NcActionCaption-B7FZTc3Y.css +32 -0
- package/dist/assets/NcActionCheckbox-C-PJVvtb.css +78 -0
- package/dist/assets/NcActionInput-C_3Csa6A.css +220 -0
- package/dist/assets/NcActionLink-Db_ZlqWs.css +92 -0
- package/dist/assets/NcActionRadio-CpCvyMa_.css +78 -0
- package/dist/assets/NcActionRouter-DidTlbov.css +103 -0
- package/dist/assets/NcActionSeparator-CEbb5P6P.css +24 -0
- package/dist/assets/NcActionText-DCx1DWXe.css +107 -0
- package/dist/assets/NcActionTextEditable-Dud9NOdm.css +238 -0
- package/dist/assets/NcActions-JDMMURyt.css +83 -0
- package/dist/assets/NcAppContent-B1ZWQTUv.css +125 -0
- package/dist/assets/NcAppNavigation-DvCTUTpR.css +103 -0
- package/dist/assets/NcAppNavigationCaption-Cgexlz2n.css +48 -0
- package/dist/assets/NcAppNavigationIconBullet-By_0o2dG.css +30 -0
- package/dist/assets/NcAppNavigationItem-Cas1plMr.css +211 -0
- package/dist/assets/NcAppNavigationList-BIbyyT7b.css +29 -0
- package/dist/assets/NcAppNavigationNew-BKfawNII.css +27 -0
- package/dist/assets/{NcAppNavigationNewItem-DF3nldsK.css → NcAppNavigationNewItem-Dw2sHtEO.css} +58 -68
- package/dist/assets/NcAppNavigationSettings-DtCFYPKb.css +79 -0
- package/dist/assets/NcAppNavigationSpacer-CfNqmQeR.css +6 -0
- package/dist/assets/NcAppNavigationToggle-DvYpNzHv.css +27 -0
- package/dist/assets/NcAppSettingsDialog-YgAGku7I.css +74 -0
- package/dist/assets/NcAppSettingsSection-AUZ2NjMX.css +30 -0
- package/dist/assets/{NcAppSidebar-DixS4RLm.css → NcAppSidebar-GLK326IR.css} +126 -172
- package/dist/assets/NcAppSidebarTab-BieYhqvk.css +34 -0
- package/dist/assets/NcAvatar-m0lTnGXX.css +129 -0
- package/dist/assets/NcBreadcrumb-DOvK-XG1.css +68 -0
- package/dist/assets/NcBreadcrumbs-CPUAM38l.css +37 -0
- package/dist/assets/NcButton-BHxZm42y.css +210 -0
- package/dist/assets/{NcCheckboxRadioSwitch-DArK1Q95.css → NcCheckboxRadioSwitch-BkBep4wT.css} +58 -86
- package/dist/assets/NcChip-CQm1mq2C.css +61 -0
- package/dist/assets/NcCollectionList-ETQTqkqt.css +221 -0
- package/dist/assets/NcColorPicker-Ctv2cwt1.css +122 -0
- package/dist/assets/NcContent--2CGtswk.css +82 -0
- package/dist/assets/NcCounterBubble-BlAq2Vim.css +53 -0
- package/dist/assets/NcDashboardWidget-CpstyXok.css +73 -0
- package/dist/assets/NcDashboardWidgetItem-Qe5SSOhA.css +85 -0
- package/dist/assets/{NcDateTimePicker-3FfsWOh0.css → NcDateTimePicker-BR1KY59N.css} +39 -77
- package/dist/assets/NcDateTimePickerNative-BAcKr0B3.css +47 -0
- package/dist/assets/NcDialog-j6_6dpiF.css +132 -0
- package/dist/assets/NcEllipsisedOption-DZK2vWD1.css +34 -0
- package/dist/assets/{NcEmojiPicker-XL3oUsqE.css → NcEmojiPicker-ielwHIhs.css} +16 -44
- package/dist/assets/NcEmptyContent-BU0QVo3d.css +65 -0
- package/dist/assets/NcGuestContent-BLJ37yLM.css +50 -0
- package/dist/assets/NcHeaderMenu-CuAI7Fgb.css +77 -0
- package/dist/assets/NcIconSvgWrapper-BwsJ8wBM.css +39 -0
- package/dist/assets/NcInputConfirmCancel-SGr0-6w8.css +39 -0
- package/dist/assets/{NcInputField-CXoTqF9T.css → NcInputField-CrdP183e.css} +43 -56
- package/dist/assets/NcListItem-DTaecNLV.css +156 -0
- package/dist/assets/NcListItemIcon-DxPdaRV5.css +64 -0
- package/dist/assets/NcLoadingIcon-BSONDy7x.css +21 -0
- package/dist/assets/NcMentionBubble-C6t8od-_.css +73 -0
- package/dist/assets/NcModal-CYa2IEvm.css +282 -0
- package/dist/assets/NcNoteCard-BLPU1den.css +50 -0
- package/dist/assets/{NcPopover-BwI1hPzy.css → NcPopover-BDlL00qZ.css} +6 -20
- package/dist/assets/NcProgressBar-BsqdCn-x.css +56 -0
- package/dist/assets/NcRelatedResourcesPanel-BE9CQ8s8.css +158 -0
- package/dist/assets/{NcRichContenteditable-C-eZyVQM.css → NcRichContenteditable-CkvTrjfG.css} +58 -100
- package/dist/assets/NcRichText-BzeK2YTS.css +217 -0
- package/dist/assets/{NcSelect-Fmyu7qyl.css → NcSelect-BQt_SpyP.css} +10 -22
- package/dist/assets/NcSettingsInputText-DbTNj9E6.css +35 -0
- package/dist/assets/NcSettingsSection-DZwOPKg1.css +56 -0
- package/dist/assets/NcSettingsSelectGroup-CzD7YrGm.css +23 -0
- package/dist/assets/{NcTextArea-XCi8a16Y.css → NcTextArea-D8bZi2fT.css} +30 -42
- package/dist/assets/NcUserBubble-DMjZyrGY.css +48 -0
- package/dist/assets/NcUserStatusIcon-DMxcdM51.css +30 -0
- package/dist/assets/{Tooltip-jHgt4m-W.css → Tooltip-4CSl8xev.css} +10 -30
- package/dist/assets/referencePickerModal-9BcmmfUy.css +413 -0
- package/dist/chunks/{GenColors-CAUl-IDP.cjs → GenColors-Dt-3yZwf.cjs} +1 -23
- package/dist/chunks/GenColors-Dt-3yZwf.cjs.map +1 -0
- package/dist/chunks/{GenColors-DcjtQMk3.mjs → GenColors-DtEnxSd9.mjs} +1 -23
- package/dist/chunks/GenColors-DtEnxSd9.mjs.map +1 -0
- package/dist/chunks/GenRandomId-BQDud3d4.cjs +5 -0
- package/dist/chunks/GenRandomId-BQDud3d4.cjs.map +1 -0
- package/dist/chunks/GenRandomId-CMooMQt0.mjs +6 -0
- package/dist/chunks/GenRandomId-CMooMQt0.mjs.map +1 -0
- package/dist/chunks/Linkify-BtgR-dXX.mjs +14 -0
- package/dist/chunks/Linkify-BtgR-dXX.mjs.map +1 -0
- package/dist/chunks/Linkify-yeOn5L6T.cjs +15 -0
- package/dist/chunks/Linkify-yeOn5L6T.cjs.map +1 -0
- package/dist/chunks/{NcActionButtonGroup-D650-6zv.mjs → NcActionButtonGroup-B62_HajM.mjs} +3 -3
- package/dist/chunks/NcActionButtonGroup-B62_HajM.mjs.map +1 -0
- package/dist/chunks/{NcActionButtonGroup-D7hycpXY.cjs → NcActionButtonGroup-DKtkuRy5.cjs} +3 -3
- package/dist/chunks/NcActionButtonGroup-DKtkuRy5.cjs.map +1 -0
- package/dist/chunks/{NcActionInput-BqG7gSLn.mjs → NcActionInput-DvbN3P1D.mjs} +9 -9
- package/dist/chunks/NcActionInput-DvbN3P1D.mjs.map +1 -0
- package/dist/chunks/{NcActionInput-CHucaM0V.cjs → NcActionInput-Dw1TL9ig.cjs} +9 -9
- package/dist/chunks/NcActionInput-Dw1TL9ig.cjs.map +1 -0
- package/dist/chunks/{NcActions-CocYka0Y.mjs → NcActions-CL3YRRgz.mjs} +6 -6
- package/dist/chunks/NcActions-CL3YRRgz.mjs.map +1 -0
- package/dist/chunks/{NcActions-JX6wbAVA.cjs → NcActions-DRSoPS6a.cjs} +6 -6
- package/dist/chunks/NcActions-DRSoPS6a.cjs.map +1 -0
- package/dist/chunks/{NcAppContent-wlhVbyg0.mjs → NcAppContent-Cgay0O3i.mjs} +5 -5
- package/dist/chunks/NcAppContent-Cgay0O3i.mjs.map +1 -0
- package/dist/chunks/{NcAppContent-CkO1Y93z.cjs → NcAppContent-ibyvoVc4.cjs} +5 -5
- package/dist/chunks/NcAppContent-ibyvoVc4.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-Du3J8BTm.cjs → NcAppNavigation-Cw8qnf4l.cjs} +5 -6
- package/dist/chunks/NcAppNavigation-Cw8qnf4l.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-BKiDVBw7.mjs → NcAppNavigation-D15PXjlO.mjs} +5 -6
- package/dist/chunks/NcAppNavigation-D15PXjlO.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationCaption-BoN0P7tD.cjs → NcAppNavigationCaption-CO8Hwyrb.cjs} +3 -3
- package/dist/chunks/NcAppNavigationCaption-CO8Hwyrb.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationCaption-CKTQZ_u_.mjs → NcAppNavigationCaption-DsGPHQvj.mjs} +3 -3
- package/dist/chunks/NcAppNavigationCaption-DsGPHQvj.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationItem-D_lh17am.cjs → NcAppNavigationItem-BVLg_dnQ.cjs} +11 -13
- package/dist/chunks/NcAppNavigationItem-BVLg_dnQ.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationItem-qe8jnLow.mjs → NcAppNavigationItem-fKe0Oi-K.mjs} +11 -13
- package/dist/chunks/NcAppNavigationItem-fKe0Oi-K.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationNewItem-B107Beoc.mjs → NcAppNavigationNewItem-BEVsUTrd.mjs} +3 -3
- package/dist/chunks/NcAppNavigationNewItem-BEVsUTrd.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationNewItem-DyxVXE5t.cjs → NcAppNavigationNewItem-DlC2GWGK.cjs} +3 -3
- package/dist/chunks/NcAppNavigationNewItem-DlC2GWGK.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationSettings-CmP_tXFm.cjs → NcAppNavigationSettings-BidyunnY.cjs} +5 -5
- package/dist/chunks/NcAppNavigationSettings-BidyunnY.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationSettings-DZ1-Sbdz.mjs → NcAppNavigationSettings-CEHSXiJt.mjs} +5 -5
- package/dist/chunks/NcAppNavigationSettings-CEHSXiJt.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationToggle-zCGgvNDT.mjs → NcAppNavigationToggle-CdNG26lR.mjs} +4 -4
- package/dist/chunks/NcAppNavigationToggle-CdNG26lR.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationToggle-hmEUqxbP.cjs → NcAppNavigationToggle-DFhfV_Ic.cjs} +4 -4
- package/dist/chunks/NcAppNavigationToggle-DFhfV_Ic.cjs.map +1 -0
- package/dist/chunks/{NcAppSettingsDialog-D9cNYQ8b.mjs → NcAppSettingsDialog-BExa9wmg.mjs} +6 -7
- package/dist/chunks/NcAppSettingsDialog-BExa9wmg.mjs.map +1 -0
- package/dist/chunks/{NcAppSettingsDialog-YqNhco1P.cjs → NcAppSettingsDialog-Zy4akEYz.cjs} +6 -7
- package/dist/chunks/NcAppSettingsDialog-Zy4akEYz.cjs.map +1 -0
- package/dist/chunks/{NcAppSidebar-CQWODfsy.mjs → NcAppSidebar-CYd47NKe.mjs} +91 -67
- package/dist/chunks/NcAppSidebar-CYd47NKe.mjs.map +1 -0
- package/dist/chunks/{NcAppSidebar-J15zHyfq.cjs → NcAppSidebar-kuqm78Wl.cjs} +91 -67
- package/dist/chunks/NcAppSidebar-kuqm78Wl.cjs.map +1 -0
- package/dist/chunks/{NcAvatar-CX3OX2C4.mjs → NcAvatar-BC884DnC.mjs} +11 -32
- package/dist/chunks/NcAvatar-BC884DnC.mjs.map +1 -0
- package/dist/chunks/{NcAvatar-CYzikYku.cjs → NcAvatar-BX8J9gZF.cjs} +11 -32
- package/dist/chunks/NcAvatar-BX8J9gZF.cjs.map +1 -0
- package/dist/chunks/{NcBreadcrumb-DytGDsr8.mjs → NcBreadcrumb-BVLavjOe.mjs} +4 -4
- package/dist/chunks/NcBreadcrumb-BVLavjOe.mjs.map +1 -0
- package/dist/chunks/{NcBreadcrumb-jMJw2OQJ.cjs → NcBreadcrumb-DbuEPD5w.cjs} +4 -4
- package/dist/chunks/NcBreadcrumb-DbuEPD5w.cjs.map +1 -0
- package/dist/chunks/{NcBreadcrumbs-BqFPBZ-h.mjs → NcBreadcrumbs-BBO2DLP1.mjs} +8 -33
- package/dist/chunks/NcBreadcrumbs-BBO2DLP1.mjs.map +1 -0
- package/dist/chunks/{NcBreadcrumbs-CzObAKB-.cjs → NcBreadcrumbs-iIR1Tw0r.cjs} +8 -33
- package/dist/chunks/NcBreadcrumbs-iIR1Tw0r.cjs.map +1 -0
- package/dist/chunks/{NcCheckboxRadioSwitch-CIHl8lnP.cjs → NcCheckboxRadioSwitch-B0HYTOsR.cjs} +12 -6
- package/dist/chunks/NcCheckboxRadioSwitch-B0HYTOsR.cjs.map +1 -0
- package/dist/chunks/{NcCheckboxRadioSwitch-CpupDtee.mjs → NcCheckboxRadioSwitch-D2GbHtCS.mjs} +12 -6
- package/dist/chunks/NcCheckboxRadioSwitch-D2GbHtCS.mjs.map +1 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-CPc4BraS.cjs +4 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-CPc4BraS.cjs.map +1 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-ScT6WV__.mjs +3 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-ScT6WV__.mjs.map +1 -0
- package/dist/chunks/NcCollectionList-3O-OrcfS.mjs +428 -0
- package/dist/chunks/NcCollectionList-3O-OrcfS.mjs.map +1 -0
- package/dist/chunks/NcCollectionList-D4oNsvJ0.cjs +430 -0
- package/dist/chunks/NcCollectionList-D4oNsvJ0.cjs.map +1 -0
- package/dist/chunks/{NcColorPicker-BEs2B-HB.mjs → NcColorPicker-D7awy8o_.mjs} +6 -6
- package/dist/chunks/NcColorPicker-D7awy8o_.mjs.map +1 -0
- package/dist/chunks/{NcColorPicker-KrvDMhej.cjs → NcColorPicker-hOteJtis.cjs} +6 -6
- package/dist/chunks/NcColorPicker-hOteJtis.cjs.map +1 -0
- package/dist/chunks/NcContent-CQn8oXxp.mjs +105 -0
- package/dist/chunks/NcContent-CQn8oXxp.mjs.map +1 -0
- package/dist/chunks/NcContent-Dr9e_aYA.cjs +104 -0
- package/dist/chunks/NcContent-Dr9e_aYA.cjs.map +1 -0
- package/dist/chunks/{NcDashboardWidget-BvNtltPU.cjs → NcDashboardWidget-DnDLhRmV.cjs} +6 -6
- package/dist/chunks/NcDashboardWidget-DnDLhRmV.cjs.map +1 -0
- package/dist/chunks/{NcDashboardWidget-Da715DSB.mjs → NcDashboardWidget-hTBgsnwG.mjs} +6 -6
- package/dist/chunks/NcDashboardWidget-hTBgsnwG.mjs.map +1 -0
- package/dist/chunks/{NcDashboardWidgetItem-CKv_fb-1.cjs → NcDashboardWidgetItem-BorZC7ZL.cjs} +4 -4
- package/dist/chunks/NcDashboardWidgetItem-BorZC7ZL.cjs.map +1 -0
- package/dist/chunks/{NcDashboardWidgetItem-BkJTg3kj.mjs → NcDashboardWidgetItem-CorJJt6-.mjs} +4 -4
- package/dist/chunks/NcDashboardWidgetItem-CorJJt6-.mjs.map +1 -0
- package/dist/chunks/{NcDateTime-CpJDGhl7.mjs → NcDateTime-Eat0YWPN.mjs} +1 -22
- package/dist/chunks/NcDateTime-Eat0YWPN.mjs.map +1 -0
- package/dist/chunks/{NcDateTime-Cy5Bp0d2.cjs → NcDateTime-K3Rie9qv.cjs} +1 -22
- package/dist/chunks/NcDateTime-K3Rie9qv.cjs.map +1 -0
- package/dist/chunks/{NcDialog-C7KRNdTc.cjs → NcDialog-DGaf6Udc.cjs} +8 -6
- package/dist/chunks/NcDialog-DGaf6Udc.cjs.map +1 -0
- package/dist/chunks/{NcDialog-B3ZaXnpn.mjs → NcDialog-VincZ0XS.mjs} +8 -6
- package/dist/chunks/NcDialog-VincZ0XS.mjs.map +1 -0
- package/dist/chunks/{NcDialogButton-CLWLvwpm.cjs → NcDialogButton-CNWF4urB.cjs} +9 -2
- package/dist/chunks/NcDialogButton-CNWF4urB.cjs.map +1 -0
- package/dist/chunks/{NcDialogButton-BV3Kf9U7.mjs → NcDialogButton-JvyN3X6S.mjs} +9 -2
- package/dist/chunks/NcDialogButton-JvyN3X6S.mjs.map +1 -0
- package/dist/chunks/{NcEmojiPicker-LFuZ15M5.cjs → NcEmojiPicker-DCT0-SIC.cjs} +9 -9
- package/dist/chunks/NcEmojiPicker-DCT0-SIC.cjs.map +1 -0
- package/dist/chunks/{NcEmojiPicker-SqbRSwu2.mjs → NcEmojiPicker-ziqKge9K.mjs} +9 -9
- package/dist/chunks/NcEmojiPicker-ziqKge9K.mjs.map +1 -0
- package/dist/chunks/{NcHeaderMenu-830tFszI.cjs → NcHeaderMenu-D-Jo3l41.cjs} +6 -6
- package/dist/chunks/NcHeaderMenu-D-Jo3l41.cjs.map +1 -0
- package/dist/chunks/{NcHeaderMenu-2n5GDt37.mjs → NcHeaderMenu-Da6Ob-6t.mjs} +6 -6
- package/dist/chunks/NcHeaderMenu-Da6Ob-6t.mjs.map +1 -0
- package/dist/chunks/{NcIconSvgWrapper-KWEbPRC9.mjs → NcIconSvgWrapper-Ckqpz-vm.mjs} +3 -3
- package/dist/chunks/NcIconSvgWrapper-Ckqpz-vm.mjs.map +1 -0
- package/dist/chunks/{NcIconSvgWrapper-O61kZVNp.cjs → NcIconSvgWrapper-DaSgIT19.cjs} +3 -3
- package/dist/chunks/NcIconSvgWrapper-DaSgIT19.cjs.map +1 -0
- package/dist/chunks/{NcInputConfirmCancel-CJ7nPGEd.cjs → NcInputConfirmCancel-Bt_VDaTA.cjs} +7 -10
- package/dist/chunks/NcInputConfirmCancel-Bt_VDaTA.cjs.map +1 -0
- package/dist/chunks/{NcInputConfirmCancel-XXXgXoSw.mjs → NcInputConfirmCancel-BvsvyKxD.mjs} +7 -10
- package/dist/chunks/NcInputConfirmCancel-BvsvyKxD.mjs.map +1 -0
- package/dist/chunks/{NcListItem-CxpC4EKk.cjs → NcListItem-BwUN8FaS.cjs} +5 -6
- package/dist/chunks/{NcListItem-DrTIia88.mjs.map → NcListItem-BwUN8FaS.cjs.map} +1 -1
- package/dist/chunks/{NcListItem-DrTIia88.mjs → NcListItem-DwIZ95t7.mjs} +5 -6
- package/dist/chunks/{NcListItem-CxpC4EKk.cjs.map → NcListItem-DwIZ95t7.mjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-CTTJYWzN.mjs → NcListItemIcon-DhW1Fob8.mjs} +6 -6
- package/dist/chunks/NcListItemIcon-DhW1Fob8.mjs.map +1 -0
- package/dist/chunks/{NcListItemIcon-44A7fm62.cjs → NcListItemIcon-JeS1a2jI.cjs} +6 -6
- package/dist/chunks/NcListItemIcon-JeS1a2jI.cjs.map +1 -0
- package/dist/chunks/{NcPasswordField-DN-kdAfl.cjs → NcPasswordField-9h22h-sl.cjs} +5 -4
- package/dist/chunks/NcPasswordField-9h22h-sl.cjs.map +1 -0
- package/dist/chunks/{NcPasswordField-Z6BCKScy.mjs → NcPasswordField-xauR6801.mjs} +4 -3
- package/dist/chunks/NcPasswordField-xauR6801.mjs.map +1 -0
- package/dist/chunks/{NcPopover-BS1bBSkg.cjs → NcPopover-Cl1AvQ5o.cjs} +2 -2
- package/dist/chunks/NcPopover-Cl1AvQ5o.cjs.map +1 -0
- package/dist/chunks/{NcPopover-foxJPAfG.mjs → NcPopover-VxUr4c6P.mjs} +2 -2
- package/dist/chunks/NcPopover-VxUr4c6P.mjs.map +1 -0
- package/dist/chunks/{NcProgressBar-mFqoqB4L.cjs → NcProgressBar-BnKA91Pj.cjs} +3 -3
- package/dist/chunks/NcProgressBar-BnKA91Pj.cjs.map +1 -0
- package/dist/chunks/{NcProgressBar-BafFcKiu.mjs → NcProgressBar-CZtllSde.mjs} +3 -3
- package/dist/chunks/NcProgressBar-CZtllSde.mjs.map +1 -0
- package/dist/chunks/{NcRelatedResourcesPanel-Dcm2wvfd.cjs → NcRelatedResourcesPanel-Be1fGCiu.cjs} +10 -10
- package/dist/chunks/NcRelatedResourcesPanel-Be1fGCiu.cjs.map +1 -0
- package/dist/chunks/{NcRelatedResourcesPanel-D3QlWSNc.mjs → NcRelatedResourcesPanel-mSjo_nq5.mjs} +10 -10
- package/dist/chunks/NcRelatedResourcesPanel-mSjo_nq5.mjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-DljQv8gw.cjs → NcRichContenteditable-BbPOC-_I.cjs} +60 -48
- package/dist/chunks/NcRichContenteditable-BbPOC-_I.cjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-BB-qsHEm.mjs → NcRichContenteditable-CakN30zF.mjs} +60 -48
- package/dist/chunks/NcRichContenteditable-CakN30zF.mjs.map +1 -0
- package/dist/chunks/{NcRichText-BDVKgmY5.cjs → NcRichText-65CdQLUw.cjs} +9 -8
- package/dist/chunks/NcRichText-65CdQLUw.cjs.map +1 -0
- package/dist/chunks/{NcRichText-BT4VjvXi.mjs → NcRichText-CCM1HmZE.mjs} +9 -8
- package/dist/chunks/NcRichText-CCM1HmZE.mjs.map +1 -0
- package/dist/chunks/NcSavingIndicatorIcon-Bhy7wcoT.mjs.map +1 -1
- package/dist/chunks/NcSavingIndicatorIcon-BzKAIkhk.cjs.map +1 -1
- package/dist/chunks/{NcSelect-CNm4fmR6.mjs → NcSelect-CKgXIbQN.mjs} +5 -5
- package/dist/chunks/NcSelect-CKgXIbQN.mjs.map +1 -0
- package/dist/chunks/{NcSelect-DckQCxxX.cjs → NcSelect-CmV2Q0A0.cjs} +5 -5
- package/dist/chunks/NcSelect-CmV2Q0A0.cjs.map +1 -0
- package/dist/chunks/{NcSelectTags-nCqLANFH.mjs → NcSelectTags-BIha_vfa.mjs} +2 -23
- package/dist/chunks/NcSelectTags-BIha_vfa.mjs.map +1 -0
- package/dist/chunks/{NcSelectTags-CnkBJ3vP.cjs → NcSelectTags-eQRTXuQr.cjs} +2 -23
- package/dist/chunks/NcSelectTags-eQRTXuQr.cjs.map +1 -0
- package/dist/chunks/{NcSettingsInputText-Dd3wEwGy.cjs → NcSettingsInputText-Cdw4mTrp.cjs} +5 -5
- package/dist/chunks/NcSettingsInputText-Cdw4mTrp.cjs.map +1 -0
- package/dist/chunks/{NcSettingsInputText-D-S5LBmN.mjs → NcSettingsInputText-DDJdALzH.mjs} +5 -5
- package/dist/chunks/NcSettingsInputText-DDJdALzH.mjs.map +1 -0
- package/dist/chunks/{NcSettingsSection-B0-LmypW.mjs → NcSettingsSection-CFn4bRnA.mjs} +4 -4
- package/dist/chunks/NcSettingsSection-CFn4bRnA.mjs.map +1 -0
- package/dist/chunks/{NcSettingsSection-ayl3nvdL.cjs → NcSettingsSection-uZhZY4jp.cjs} +4 -4
- package/dist/chunks/NcSettingsSection-uZhZY4jp.cjs.map +1 -0
- package/dist/chunks/{NcSettingsSelectGroup-C51Km4wj.mjs → NcSettingsSelectGroup-BJIByip9.mjs} +6 -6
- package/dist/chunks/NcSettingsSelectGroup-BJIByip9.mjs.map +1 -0
- package/dist/chunks/{NcSettingsSelectGroup-Dc7oy0Jg.cjs → NcSettingsSelectGroup-fY7wG4iL.cjs} +6 -6
- package/dist/chunks/NcSettingsSelectGroup-fY7wG4iL.cjs.map +1 -0
- package/dist/chunks/{NcTextField-BmaDUUfq.mjs → NcTextField-CjEhJrIE.mjs} +2 -2
- package/dist/chunks/NcTextField-CjEhJrIE.mjs.map +1 -0
- package/dist/chunks/{NcTextField-BmOKGaQ4.cjs → NcTextField-DGywgzwv.cjs} +2 -2
- package/dist/chunks/NcTextField-DGywgzwv.cjs.map +1 -0
- package/dist/chunks/NcTimezonePicker-DLFrgfqk.cjs +184 -0
- package/dist/chunks/NcTimezonePicker-DLFrgfqk.cjs.map +1 -0
- package/dist/chunks/NcTimezonePicker-J8vQyRH8.mjs +185 -0
- package/dist/chunks/NcTimezonePicker-J8vQyRH8.mjs.map +1 -0
- package/dist/chunks/{NcUserBubble-BJp-ZBGW.mjs → NcUserBubble-C1ecV_fU.mjs} +4 -4
- package/dist/chunks/NcUserBubble-C1ecV_fU.mjs.map +1 -0
- package/dist/chunks/{NcUserBubble-BsQJPVXD.cjs → NcUserBubble-C4fdYO4b.cjs} +4 -4
- package/dist/chunks/NcUserBubble-C4fdYO4b.cjs.map +1 -0
- package/dist/chunks/{NcUserStatusIcon-Ba9ajMhK.cjs → NcUserStatusIcon-BqUz25xE.cjs} +9 -37
- package/dist/chunks/NcUserStatusIcon-BqUz25xE.cjs.map +1 -0
- package/dist/chunks/{NcUserStatusIcon-BkO1ZAdq.mjs → NcUserStatusIcon-DQyfBtYn.mjs} +9 -36
- package/dist/chunks/NcUserStatusIcon-DQyfBtYn.mjs.map +1 -0
- package/dist/chunks/ScopeComponent-00_hPc9T.mjs +13 -0
- package/dist/chunks/ScopeComponent-00_hPc9T.mjs.map +1 -0
- package/dist/chunks/ScopeComponent-ByTiGqjs.cjs +12 -0
- package/dist/chunks/ScopeComponent-ByTiGqjs.cjs.map +1 -0
- package/dist/chunks/_l10n-CWsOa8mM.cjs +125 -0
- package/dist/chunks/{_l10n-BYPqjHzt.cjs.map → _l10n-CWsOa8mM.cjs.map} +1 -1
- package/dist/chunks/_l10n-DDx8P-X1.mjs +126 -0
- package/dist/chunks/_l10n-DDx8P-X1.mjs.map +1 -0
- package/dist/chunks/actionGlobal-DqVa7c7G.mjs +25 -0
- package/dist/chunks/actionGlobal-DqVa7c7G.mjs.map +1 -0
- package/dist/chunks/actionGlobal-L0Ls8tPJ.cjs +24 -0
- package/dist/chunks/actionGlobal-L0Ls8tPJ.cjs.map +1 -0
- package/dist/chunks/{actionText-BnA6RS9I.cjs → actionText-BcrK4uH1.cjs} +1 -43
- package/dist/chunks/actionText-BcrK4uH1.cjs.map +1 -0
- package/dist/chunks/{actionText-BaGktsVf.mjs → actionText-fFcUPi2g.mjs} +1 -43
- package/dist/chunks/actionText-fFcUPi2g.mjs.map +1 -0
- package/dist/chunks/{autolink-Bgjz08wN.cjs → autolink-BAgL31EZ.cjs} +7 -24
- package/dist/chunks/autolink-BAgL31EZ.cjs.map +1 -0
- package/dist/chunks/{autolink-DA7VzS8Y.mjs → autolink-cbuFALXr.mjs} +7 -24
- package/dist/chunks/autolink-cbuFALXr.mjs.map +1 -0
- package/dist/chunks/{emoji-CWr00EYY.cjs → emoji-BCCCB3t3.cjs} +9 -30
- package/dist/chunks/emoji-BCCCB3t3.cjs.map +1 -0
- package/dist/chunks/{emoji-CbOkKZx5.mjs → emoji-V6ytyzoR.mjs} +9 -30
- package/dist/chunks/emoji-V6ytyzoR.mjs.map +1 -0
- package/dist/chunks/focusTrap-Cecv_gjR.mjs +7 -0
- package/dist/chunks/focusTrap-Cecv_gjR.mjs.map +1 -0
- package/dist/chunks/focusTrap-EeXFmjdI.cjs +6 -0
- package/dist/chunks/focusTrap-EeXFmjdI.cjs.map +1 -0
- package/dist/chunks/getAvatarUrl-6z9qRNH-.cjs +10 -0
- package/dist/chunks/getAvatarUrl-6z9qRNH-.cjs.map +1 -0
- package/dist/chunks/getAvatarUrl-DxvUjKMi.mjs +11 -0
- package/dist/chunks/getAvatarUrl-DxvUjKMi.mjs.map +1 -0
- package/dist/chunks/{index-Dl-SBuhJ.cjs → index-BANjku4q.cjs} +0 -21
- package/dist/chunks/index-BANjku4q.cjs.map +1 -0
- package/dist/chunks/index-BwyQ2N-M.mjs.map +1 -1
- package/dist/chunks/{index-DYccGIvD.mjs → index-CsogA-K5.mjs} +0 -21
- package/dist/chunks/index-CsogA-K5.mjs.map +1 -0
- package/dist/chunks/{index-BRQQ9NaL.mjs → index-DbA2OZyf.mjs} +4 -25
- package/dist/chunks/index-DbA2OZyf.mjs.map +1 -0
- package/dist/chunks/index-Dsgv-f-l.cjs.map +1 -1
- package/dist/chunks/{index-D0euettC.cjs → index-oIpl1nrk.cjs} +4 -25
- package/dist/chunks/index-oIpl1nrk.cjs.map +1 -0
- package/dist/chunks/referencePickerModal-Dab6KzWL.cjs +1115 -0
- package/dist/chunks/referencePickerModal-Dab6KzWL.cjs.map +1 -0
- package/dist/chunks/referencePickerModal-KbBRUf9r.mjs +1113 -0
- package/dist/chunks/referencePickerModal-KbBRUf9r.mjs.map +1 -0
- package/dist/chunks/usernameToColor-BzDTLedj.cjs +27 -0
- package/dist/chunks/usernameToColor-BzDTLedj.cjs.map +1 -0
- package/dist/chunks/usernameToColor-CB3rGdYw.mjs +26 -0
- package/dist/chunks/usernameToColor-CB3rGdYw.mjs.map +1 -0
- package/dist/components/NcCollectionList/service.d.ts +47 -0
- package/dist/composables/actions/useActionText.d.ts +14 -0
- package/dist/composables/useFormatDateTime.d.ts +6 -6
- package/dist/functions/a11y/index.d.ts +2 -19
- package/dist/functions/emoji/emoji.d.ts +23 -27
- package/dist/functions/emoji/index.d.ts +2 -19
- package/dist/functions/reference/widgets.d.ts +4 -0
- package/dist/index.cjs +63 -92
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +65 -94
- package/dist/index.mjs.map +1 -1
- package/dist/utils/UserStatus.d.ts +2 -19
- package/dist/utils/getAvatarUrl.d.ts +2 -19
- package/dist/vendor.LICENSE.txt +4 -4
- package/package.json +11 -9
- package/LICENSE +0 -661
- package/dist/assets/NcActionButton-D08gPtwM.css +0 -139
- package/dist/assets/NcActionCaption-sfcjBZnu.css +0 -46
- package/dist/assets/NcActionCheckbox-DTlI7y7p.css +0 -110
- package/dist/assets/NcActionInput-B8l22cnm.css +0 -271
- package/dist/assets/NcActionLink-ufhOZDI9.css +0 -124
- package/dist/assets/NcActionRadio-syUIsm9B.css +0 -110
- package/dist/assets/NcActionRouter-BbTCI4sn.css +0 -135
- package/dist/assets/NcActionSeparator-CB59y4di.css +0 -38
- package/dist/assets/NcActionText-Ceh88fy8.css +0 -139
- package/dist/assets/NcActionTextEditable-BoxziChR.css +0 -287
- package/dist/assets/NcActions-N_Y6Nzew.css +0 -111
- package/dist/assets/NcAppContent-C08OMmgh.css +0 -153
- package/dist/assets/NcAppNavigation-DlFgsfe2.css +0 -131
- package/dist/assets/NcAppNavigationCaption-DnApJ5OW.css +0 -62
- package/dist/assets/NcAppNavigationIconBullet-B8q3pUL5.css +0 -44
- package/dist/assets/NcAppNavigationItem-OJEHVyVk.css +0 -235
- package/dist/assets/NcAppNavigationList-DnIxrbVX.css +0 -43
- package/dist/assets/NcAppNavigationNew-BPZ1O8Xm.css +0 -41
- package/dist/assets/NcAppNavigationSettings-BCkvRAy8.css +0 -93
- package/dist/assets/NcAppNavigationSpacer-Cb4q1zb5.css +0 -6
- package/dist/assets/NcAppNavigationToggle-0yhQ9xse.css +0 -41
- package/dist/assets/NcAppSettingsDialog-CajWZJNV.css +0 -88
- package/dist/assets/NcAppSettingsSection-BDvzWKkd.css +0 -44
- package/dist/assets/NcAppSidebarTab-CBFET-hQ.css +0 -48
- package/dist/assets/NcAvatar-C2EFGp-3.css +0 -143
- package/dist/assets/NcBreadcrumb-AES5eSWo.css +0 -82
- package/dist/assets/NcBreadcrumbs-tYrp1DVs.css +0 -51
- package/dist/assets/NcButton-DZS360ia.css +0 -204
- package/dist/assets/NcColorPicker-CzKZjMxY.css +0 -136
- package/dist/assets/NcContent-Cuv2HvFH.css +0 -110
- package/dist/assets/NcCounterBubble-CWi_P1Tb.css +0 -67
- package/dist/assets/NcDashboardWidget-CGOA8X60.css +0 -87
- package/dist/assets/NcDashboardWidgetItem-BevETFRF.css +0 -99
- package/dist/assets/NcDateTimePickerNative-CV_VuzvQ.css +0 -61
- package/dist/assets/NcDialog-DFMxsFp5.css +0 -160
- package/dist/assets/NcEllipsisedOption-ClDzkIX6.css +0 -48
- package/dist/assets/NcEmptyContent-BY1-Gge4.css +0 -79
- package/dist/assets/NcGuestContent-CeRLfUEi.css +0 -78
- package/dist/assets/NcHeaderMenu-N5y8yFGd.css +0 -91
- package/dist/assets/NcIconSvgWrapper-DF9sBD2g.css +0 -53
- package/dist/assets/NcInputConfirmCancel-UcHrm0al.css +0 -53
- package/dist/assets/NcListItem-DMYcn1cc.css +0 -170
- package/dist/assets/NcListItemIcon-CuPMgXoB.css +0 -78
- package/dist/assets/NcLoadingIcon-gxK0ujO0.css +0 -35
- package/dist/assets/NcMentionBubble-DmzU72Mw.css +0 -84
- package/dist/assets/NcModal-Cof88czY.css +0 -299
- package/dist/assets/NcNoteCard-e7-Bxio8.css +0 -64
- package/dist/assets/NcProgressBar-D5VftcJm.css +0 -70
- package/dist/assets/NcRelatedResourcesPanel-BrXxbjgR.css +0 -200
- package/dist/assets/NcRichText-Cdp_2wEm.css +0 -240
- package/dist/assets/NcSettingsInputText-CU65Coab.css +0 -49
- package/dist/assets/NcSettingsSection-TX28tYCG.css +0 -70
- package/dist/assets/NcSettingsSelectGroup-CPauLI-o.css +0 -37
- package/dist/assets/NcUserBubble-D5ieZC-f.css +0 -62
- package/dist/assets/NcUserStatusIcon-BcLArDqV.css +0 -44
- package/dist/assets/referencePickerModal-BaGbKZky.css +0 -539
- package/dist/chunks/GenColors-CAUl-IDP.cjs.map +0 -1
- package/dist/chunks/GenColors-DcjtQMk3.mjs.map +0 -1
- package/dist/chunks/GenRandomId-CXkjMlAT.mjs +0 -27
- package/dist/chunks/GenRandomId-CXkjMlAT.mjs.map +0 -1
- package/dist/chunks/GenRandomId-kBCcgMJd.cjs +0 -26
- package/dist/chunks/GenRandomId-kBCcgMJd.cjs.map +0 -1
- package/dist/chunks/Linkify-BBPJHBma.mjs +0 -35
- package/dist/chunks/Linkify-BBPJHBma.mjs.map +0 -1
- package/dist/chunks/Linkify-CIO279AG.cjs +0 -36
- package/dist/chunks/Linkify-CIO279AG.cjs.map +0 -1
- package/dist/chunks/NcActionButtonGroup-D650-6zv.mjs.map +0 -1
- package/dist/chunks/NcActionButtonGroup-D7hycpXY.cjs.map +0 -1
- package/dist/chunks/NcActionInput-BqG7gSLn.mjs.map +0 -1
- package/dist/chunks/NcActionInput-CHucaM0V.cjs.map +0 -1
- package/dist/chunks/NcActions-CocYka0Y.mjs.map +0 -1
- package/dist/chunks/NcActions-JX6wbAVA.cjs.map +0 -1
- package/dist/chunks/NcAppContent-CkO1Y93z.cjs.map +0 -1
- package/dist/chunks/NcAppContent-wlhVbyg0.mjs.map +0 -1
- package/dist/chunks/NcAppNavigation-BKiDVBw7.mjs.map +0 -1
- package/dist/chunks/NcAppNavigation-Du3J8BTm.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationCaption-BoN0P7tD.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationCaption-CKTQZ_u_.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationItem-D_lh17am.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationItem-qe8jnLow.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationNewItem-B107Beoc.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationNewItem-DyxVXE5t.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationSettings-CmP_tXFm.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationSettings-DZ1-Sbdz.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationToggle-hmEUqxbP.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationToggle-zCGgvNDT.mjs.map +0 -1
- package/dist/chunks/NcAppSettingsDialog-D9cNYQ8b.mjs.map +0 -1
- package/dist/chunks/NcAppSettingsDialog-YqNhco1P.cjs.map +0 -1
- package/dist/chunks/NcAppSidebar-CQWODfsy.mjs.map +0 -1
- package/dist/chunks/NcAppSidebar-J15zHyfq.cjs.map +0 -1
- package/dist/chunks/NcAvatar-CX3OX2C4.mjs.map +0 -1
- package/dist/chunks/NcAvatar-CYzikYku.cjs.map +0 -1
- package/dist/chunks/NcBreadcrumb-DytGDsr8.mjs.map +0 -1
- package/dist/chunks/NcBreadcrumb-jMJw2OQJ.cjs.map +0 -1
- package/dist/chunks/NcBreadcrumbs-BqFPBZ-h.mjs.map +0 -1
- package/dist/chunks/NcBreadcrumbs-CzObAKB-.cjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch-CIHl8lnP.cjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch-CpupDtee.mjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_6d6e6a47_lang-CAFQAKcK.mjs +0 -3
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_6d6e6a47_lang-CAFQAKcK.mjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_6d6e6a47_lang-D2wGnjg7.cjs +0 -4
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_6d6e6a47_lang-D2wGnjg7.cjs.map +0 -1
- package/dist/chunks/NcColorPicker-BEs2B-HB.mjs.map +0 -1
- package/dist/chunks/NcColorPicker-KrvDMhej.cjs.map +0 -1
- package/dist/chunks/NcContent-CcrNrpVC.mjs +0 -104
- package/dist/chunks/NcContent-CcrNrpVC.mjs.map +0 -1
- package/dist/chunks/NcContent-DChC6Khv.cjs +0 -103
- package/dist/chunks/NcContent-DChC6Khv.cjs.map +0 -1
- package/dist/chunks/NcDashboardWidget-BvNtltPU.cjs.map +0 -1
- package/dist/chunks/NcDashboardWidget-Da715DSB.mjs.map +0 -1
- package/dist/chunks/NcDashboardWidgetItem-BkJTg3kj.mjs.map +0 -1
- package/dist/chunks/NcDashboardWidgetItem-CKv_fb-1.cjs.map +0 -1
- package/dist/chunks/NcDateTime-CpJDGhl7.mjs.map +0 -1
- package/dist/chunks/NcDateTime-Cy5Bp0d2.cjs.map +0 -1
- package/dist/chunks/NcDialog-B3ZaXnpn.mjs.map +0 -1
- package/dist/chunks/NcDialog-C7KRNdTc.cjs.map +0 -1
- package/dist/chunks/NcDialogButton-BV3Kf9U7.mjs.map +0 -1
- package/dist/chunks/NcDialogButton-CLWLvwpm.cjs.map +0 -1
- package/dist/chunks/NcEmojiPicker-LFuZ15M5.cjs.map +0 -1
- package/dist/chunks/NcEmojiPicker-SqbRSwu2.mjs.map +0 -1
- package/dist/chunks/NcHeaderMenu-2n5GDt37.mjs.map +0 -1
- package/dist/chunks/NcHeaderMenu-830tFszI.cjs.map +0 -1
- package/dist/chunks/NcIconSvgWrapper-KWEbPRC9.mjs.map +0 -1
- package/dist/chunks/NcIconSvgWrapper-O61kZVNp.cjs.map +0 -1
- package/dist/chunks/NcInputConfirmCancel-CJ7nPGEd.cjs.map +0 -1
- package/dist/chunks/NcInputConfirmCancel-XXXgXoSw.mjs.map +0 -1
- package/dist/chunks/NcListItemIcon-44A7fm62.cjs.map +0 -1
- package/dist/chunks/NcListItemIcon-CTTJYWzN.mjs.map +0 -1
- package/dist/chunks/NcPasswordField-DN-kdAfl.cjs.map +0 -1
- package/dist/chunks/NcPasswordField-Z6BCKScy.mjs.map +0 -1
- package/dist/chunks/NcPopover-BS1bBSkg.cjs.map +0 -1
- package/dist/chunks/NcPopover-foxJPAfG.mjs.map +0 -1
- package/dist/chunks/NcProgressBar-BafFcKiu.mjs.map +0 -1
- package/dist/chunks/NcProgressBar-mFqoqB4L.cjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-D3QlWSNc.mjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-Dcm2wvfd.cjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-BB-qsHEm.mjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-DljQv8gw.cjs.map +0 -1
- package/dist/chunks/NcRichText-BDVKgmY5.cjs.map +0 -1
- package/dist/chunks/NcRichText-BT4VjvXi.mjs.map +0 -1
- package/dist/chunks/NcSelect-CNm4fmR6.mjs.map +0 -1
- package/dist/chunks/NcSelect-DckQCxxX.cjs.map +0 -1
- package/dist/chunks/NcSelectTags-CnkBJ3vP.cjs.map +0 -1
- package/dist/chunks/NcSelectTags-nCqLANFH.mjs.map +0 -1
- package/dist/chunks/NcSettingsInputText-D-S5LBmN.mjs.map +0 -1
- package/dist/chunks/NcSettingsInputText-Dd3wEwGy.cjs.map +0 -1
- package/dist/chunks/NcSettingsSection-B0-LmypW.mjs.map +0 -1
- package/dist/chunks/NcSettingsSection-ayl3nvdL.cjs.map +0 -1
- package/dist/chunks/NcSettingsSelectGroup-C51Km4wj.mjs.map +0 -1
- package/dist/chunks/NcSettingsSelectGroup-Dc7oy0Jg.cjs.map +0 -1
- package/dist/chunks/NcTextField-BmOKGaQ4.cjs.map +0 -1
- package/dist/chunks/NcTextField-BmaDUUfq.mjs.map +0 -1
- package/dist/chunks/NcTimezonePicker-BSgT2QA5.mjs +0 -4049
- package/dist/chunks/NcTimezonePicker-BSgT2QA5.mjs.map +0 -1
- package/dist/chunks/NcTimezonePicker-iD8mrVb_.cjs +0 -4048
- package/dist/chunks/NcTimezonePicker-iD8mrVb_.cjs.map +0 -1
- package/dist/chunks/NcUserBubble-BJp-ZBGW.mjs.map +0 -1
- package/dist/chunks/NcUserBubble-BsQJPVXD.cjs.map +0 -1
- package/dist/chunks/NcUserStatusIcon-Ba9ajMhK.cjs.map +0 -1
- package/dist/chunks/NcUserStatusIcon-BkO1ZAdq.mjs.map +0 -1
- package/dist/chunks/ScopeComponent-BpyBuaF3.cjs +0 -33
- package/dist/chunks/ScopeComponent-BpyBuaF3.cjs.map +0 -1
- package/dist/chunks/ScopeComponent-Dy6ublmy.mjs +0 -34
- package/dist/chunks/ScopeComponent-Dy6ublmy.mjs.map +0 -1
- package/dist/chunks/_l10n-BYPqjHzt.cjs +0 -121
- package/dist/chunks/_l10n-hRR5zBTZ.mjs +0 -122
- package/dist/chunks/_l10n-hRR5zBTZ.mjs.map +0 -1
- package/dist/chunks/actionGlobal-BfK-CImU.cjs +0 -45
- package/dist/chunks/actionGlobal-BfK-CImU.cjs.map +0 -1
- package/dist/chunks/actionGlobal-DV5ZiuS0.mjs +0 -46
- package/dist/chunks/actionGlobal-DV5ZiuS0.mjs.map +0 -1
- package/dist/chunks/actionText-BaGktsVf.mjs.map +0 -1
- package/dist/chunks/actionText-BnA6RS9I.cjs.map +0 -1
- package/dist/chunks/autolink-Bgjz08wN.cjs.map +0 -1
- package/dist/chunks/autolink-DA7VzS8Y.mjs.map +0 -1
- package/dist/chunks/emoji-CWr00EYY.cjs.map +0 -1
- package/dist/chunks/emoji-CbOkKZx5.mjs.map +0 -1
- package/dist/chunks/focusTrap-Dsmd28wG.cjs +0 -27
- package/dist/chunks/focusTrap-Dsmd28wG.cjs.map +0 -1
- package/dist/chunks/focusTrap-hWDNhn4t.mjs +0 -28
- package/dist/chunks/focusTrap-hWDNhn4t.mjs.map +0 -1
- package/dist/chunks/getAvatarUrl-BBvqBOJD.mjs +0 -32
- package/dist/chunks/getAvatarUrl-BBvqBOJD.mjs.map +0 -1
- package/dist/chunks/getAvatarUrl-C40xfr4C.cjs +0 -31
- package/dist/chunks/getAvatarUrl-C40xfr4C.cjs.map +0 -1
- package/dist/chunks/index-BRQQ9NaL.mjs.map +0 -1
- package/dist/chunks/index-D0euettC.cjs.map +0 -1
- package/dist/chunks/index-DYccGIvD.mjs.map +0 -1
- package/dist/chunks/index-Dl-SBuhJ.cjs.map +0 -1
- package/dist/chunks/logger-BcZGm6Un.cjs +0 -24
- package/dist/chunks/logger-BcZGm6Un.cjs.map +0 -1
- package/dist/chunks/logger-C7ZZ6zFQ.mjs +0 -25
- package/dist/chunks/logger-C7ZZ6zFQ.mjs.map +0 -1
- package/dist/chunks/referencePickerModal-CFPdv-m1.mjs +0 -3469
- package/dist/chunks/referencePickerModal-CFPdv-m1.mjs.map +0 -1
- package/dist/chunks/referencePickerModal-m0FcnvxK.cjs +0 -3471
- package/dist/chunks/referencePickerModal-m0FcnvxK.cjs.map +0 -1
- package/dist/chunks/usernameToColor-CLlyFMmy.mjs +0 -47
- package/dist/chunks/usernameToColor-CLlyFMmy.mjs.map +0 -1
- package/dist/chunks/usernameToColor-cfXKb46d.cjs +0 -48
- package/dist/chunks/usernameToColor-cfXKb46d.cjs.map +0 -1
|
@@ -1,3469 +0,0 @@
|
|
|
1
|
-
import '../assets/referencePickerModal-BaGbKZky.css';
|
|
2
|
-
import { e as hasFullWidth, i as isWidgetRegistered, h as hasInteractiveView, a as renderWidget, f as destroyWidget, d as isCustomPickerElementRegistered, g as destroyCustomPickerElement, c as renderCustomPickerElement, j as getCustomPickerElementSize } from "./index-BwyQ2N-M.mjs";
|
|
3
|
-
import { n as normalizeComponent } from "./_plugin-vue2_normalizer-D637Qkok.mjs";
|
|
4
|
-
import { r as register, P as t20, a as t, Q as t7, R as t38, S as t34, T as t21, u as t36, U as t27, E as t16, V as t11 } from "./_l10n-hRR5zBTZ.mjs";
|
|
5
|
-
import axios from "@nextcloud/axios";
|
|
6
|
-
import { loadState } from "@nextcloud/initial-state";
|
|
7
|
-
import { imagePath, generateOcsUrl } from "@nextcloud/router";
|
|
8
|
-
import NcEmptyContent from "../Components/NcEmptyContent.mjs";
|
|
9
|
-
import { N as NcHighlight } from "./index-DYccGIvD.mjs";
|
|
10
|
-
import { N as NcSelect } from "./NcSelect-CNm4fmR6.mjs";
|
|
11
|
-
import { useElementSize, useIntersectionObserver } from "@vueuse/core";
|
|
12
|
-
import Vue, { ref, nextTick } from "vue";
|
|
13
|
-
import { g as getRoute } from "./autolink-DA7VzS8Y.mjs";
|
|
14
|
-
import NcButton from "../Components/NcButton.mjs";
|
|
15
|
-
import NcLoadingIcon from "../Components/NcLoadingIcon.mjs";
|
|
16
|
-
import { N as NcTextField } from "./NcTextField-BmaDUUfq.mjs";
|
|
17
|
-
import { D as DotsHorizontal } from "./DotsHorizontal-C0STD_HU.mjs";
|
|
18
|
-
import NcModal from "../Components/NcModal.mjs";
|
|
19
|
-
import { emit } from "@nextcloud/event-bus";
|
|
20
|
-
import { A as ArrowLeft } from "./ArrowLeft-B9iGweTd.mjs";
|
|
21
|
-
import { C as Close } from "./Close-1V1F2F-M.mjs";
|
|
22
|
-
/*!
|
|
23
|
-
* vue-router v3.6.5
|
|
24
|
-
* (c) 2022 Evan You
|
|
25
|
-
* @license MIT
|
|
26
|
-
*/
|
|
27
|
-
function assert(condition, message) {
|
|
28
|
-
if (!condition) {
|
|
29
|
-
throw new Error("[vue-router] " + message);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function warn(condition, message) {
|
|
33
|
-
if (!condition) {
|
|
34
|
-
typeof console !== "undefined" && console.warn("[vue-router] " + message);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
function extend(a, b) {
|
|
38
|
-
for (var key in b) {
|
|
39
|
-
a[key] = b[key];
|
|
40
|
-
}
|
|
41
|
-
return a;
|
|
42
|
-
}
|
|
43
|
-
var encodeReserveRE = /[!'()*]/g;
|
|
44
|
-
var encodeReserveReplacer = function(c) {
|
|
45
|
-
return "%" + c.charCodeAt(0).toString(16);
|
|
46
|
-
};
|
|
47
|
-
var commaRE = /%2C/g;
|
|
48
|
-
var encode = function(str) {
|
|
49
|
-
return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ",");
|
|
50
|
-
};
|
|
51
|
-
function decode(str) {
|
|
52
|
-
try {
|
|
53
|
-
return decodeURIComponent(str);
|
|
54
|
-
} catch (err) {
|
|
55
|
-
if (process.env.NODE_ENV !== "production") {
|
|
56
|
-
warn(false, 'Error decoding "' + str + '". Leaving it intact.');
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return str;
|
|
60
|
-
}
|
|
61
|
-
function resolveQuery(query, extraQuery, _parseQuery) {
|
|
62
|
-
if (extraQuery === void 0)
|
|
63
|
-
extraQuery = {};
|
|
64
|
-
var parse2 = _parseQuery || parseQuery;
|
|
65
|
-
var parsedQuery;
|
|
66
|
-
try {
|
|
67
|
-
parsedQuery = parse2(query || "");
|
|
68
|
-
} catch (e) {
|
|
69
|
-
process.env.NODE_ENV !== "production" && warn(false, e.message);
|
|
70
|
-
parsedQuery = {};
|
|
71
|
-
}
|
|
72
|
-
for (var key in extraQuery) {
|
|
73
|
-
var value = extraQuery[key];
|
|
74
|
-
parsedQuery[key] = Array.isArray(value) ? value.map(castQueryParamValue) : castQueryParamValue(value);
|
|
75
|
-
}
|
|
76
|
-
return parsedQuery;
|
|
77
|
-
}
|
|
78
|
-
var castQueryParamValue = function(value) {
|
|
79
|
-
return value == null || typeof value === "object" ? value : String(value);
|
|
80
|
-
};
|
|
81
|
-
function parseQuery(query) {
|
|
82
|
-
var res = {};
|
|
83
|
-
query = query.trim().replace(/^(\?|#|&)/, "");
|
|
84
|
-
if (!query) {
|
|
85
|
-
return res;
|
|
86
|
-
}
|
|
87
|
-
query.split("&").forEach(function(param) {
|
|
88
|
-
var parts = param.replace(/\+/g, " ").split("=");
|
|
89
|
-
var key = decode(parts.shift());
|
|
90
|
-
var val = parts.length > 0 ? decode(parts.join("=")) : null;
|
|
91
|
-
if (res[key] === void 0) {
|
|
92
|
-
res[key] = val;
|
|
93
|
-
} else if (Array.isArray(res[key])) {
|
|
94
|
-
res[key].push(val);
|
|
95
|
-
} else {
|
|
96
|
-
res[key] = [res[key], val];
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
return res;
|
|
100
|
-
}
|
|
101
|
-
function stringifyQuery(obj) {
|
|
102
|
-
var res = obj ? Object.keys(obj).map(function(key) {
|
|
103
|
-
var val = obj[key];
|
|
104
|
-
if (val === void 0) {
|
|
105
|
-
return "";
|
|
106
|
-
}
|
|
107
|
-
if (val === null) {
|
|
108
|
-
return encode(key);
|
|
109
|
-
}
|
|
110
|
-
if (Array.isArray(val)) {
|
|
111
|
-
var result = [];
|
|
112
|
-
val.forEach(function(val2) {
|
|
113
|
-
if (val2 === void 0) {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
if (val2 === null) {
|
|
117
|
-
result.push(encode(key));
|
|
118
|
-
} else {
|
|
119
|
-
result.push(encode(key) + "=" + encode(val2));
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
return result.join("&");
|
|
123
|
-
}
|
|
124
|
-
return encode(key) + "=" + encode(val);
|
|
125
|
-
}).filter(function(x) {
|
|
126
|
-
return x.length > 0;
|
|
127
|
-
}).join("&") : null;
|
|
128
|
-
return res ? "?" + res : "";
|
|
129
|
-
}
|
|
130
|
-
var trailingSlashRE = /\/?$/;
|
|
131
|
-
function createRoute(record, location, redirectedFrom, router) {
|
|
132
|
-
var stringifyQuery2 = router && router.options.stringifyQuery;
|
|
133
|
-
var query = location.query || {};
|
|
134
|
-
try {
|
|
135
|
-
query = clone(query);
|
|
136
|
-
} catch (e) {
|
|
137
|
-
}
|
|
138
|
-
var route = {
|
|
139
|
-
name: location.name || record && record.name,
|
|
140
|
-
meta: record && record.meta || {},
|
|
141
|
-
path: location.path || "/",
|
|
142
|
-
hash: location.hash || "",
|
|
143
|
-
query,
|
|
144
|
-
params: location.params || {},
|
|
145
|
-
fullPath: getFullPath(location, stringifyQuery2),
|
|
146
|
-
matched: record ? formatMatch(record) : []
|
|
147
|
-
};
|
|
148
|
-
if (redirectedFrom) {
|
|
149
|
-
route.redirectedFrom = getFullPath(redirectedFrom, stringifyQuery2);
|
|
150
|
-
}
|
|
151
|
-
return Object.freeze(route);
|
|
152
|
-
}
|
|
153
|
-
function clone(value) {
|
|
154
|
-
if (Array.isArray(value)) {
|
|
155
|
-
return value.map(clone);
|
|
156
|
-
} else if (value && typeof value === "object") {
|
|
157
|
-
var res = {};
|
|
158
|
-
for (var key in value) {
|
|
159
|
-
res[key] = clone(value[key]);
|
|
160
|
-
}
|
|
161
|
-
return res;
|
|
162
|
-
} else {
|
|
163
|
-
return value;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
var START = createRoute(null, {
|
|
167
|
-
path: "/"
|
|
168
|
-
});
|
|
169
|
-
function formatMatch(record) {
|
|
170
|
-
var res = [];
|
|
171
|
-
while (record) {
|
|
172
|
-
res.unshift(record);
|
|
173
|
-
record = record.parent;
|
|
174
|
-
}
|
|
175
|
-
return res;
|
|
176
|
-
}
|
|
177
|
-
function getFullPath(ref2, _stringifyQuery) {
|
|
178
|
-
var path = ref2.path;
|
|
179
|
-
var query = ref2.query;
|
|
180
|
-
if (query === void 0)
|
|
181
|
-
query = {};
|
|
182
|
-
var hash = ref2.hash;
|
|
183
|
-
if (hash === void 0)
|
|
184
|
-
hash = "";
|
|
185
|
-
var stringify = _stringifyQuery || stringifyQuery;
|
|
186
|
-
return (path || "/") + stringify(query) + hash;
|
|
187
|
-
}
|
|
188
|
-
function isSameRoute(a, b, onlyPath) {
|
|
189
|
-
if (b === START) {
|
|
190
|
-
return a === b;
|
|
191
|
-
} else if (!b) {
|
|
192
|
-
return false;
|
|
193
|
-
} else if (a.path && b.path) {
|
|
194
|
-
return a.path.replace(trailingSlashRE, "") === b.path.replace(trailingSlashRE, "") && (onlyPath || a.hash === b.hash && isObjectEqual(a.query, b.query));
|
|
195
|
-
} else if (a.name && b.name) {
|
|
196
|
-
return a.name === b.name && (onlyPath || a.hash === b.hash && isObjectEqual(a.query, b.query) && isObjectEqual(a.params, b.params));
|
|
197
|
-
} else {
|
|
198
|
-
return false;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
function isObjectEqual(a, b) {
|
|
202
|
-
if (a === void 0)
|
|
203
|
-
a = {};
|
|
204
|
-
if (b === void 0)
|
|
205
|
-
b = {};
|
|
206
|
-
if (!a || !b) {
|
|
207
|
-
return a === b;
|
|
208
|
-
}
|
|
209
|
-
var aKeys = Object.keys(a).sort();
|
|
210
|
-
var bKeys = Object.keys(b).sort();
|
|
211
|
-
if (aKeys.length !== bKeys.length) {
|
|
212
|
-
return false;
|
|
213
|
-
}
|
|
214
|
-
return aKeys.every(function(key, i) {
|
|
215
|
-
var aVal = a[key];
|
|
216
|
-
var bKey = bKeys[i];
|
|
217
|
-
if (bKey !== key) {
|
|
218
|
-
return false;
|
|
219
|
-
}
|
|
220
|
-
var bVal = b[key];
|
|
221
|
-
if (aVal == null || bVal == null) {
|
|
222
|
-
return aVal === bVal;
|
|
223
|
-
}
|
|
224
|
-
if (typeof aVal === "object" && typeof bVal === "object") {
|
|
225
|
-
return isObjectEqual(aVal, bVal);
|
|
226
|
-
}
|
|
227
|
-
return String(aVal) === String(bVal);
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
function isIncludedRoute(current, target) {
|
|
231
|
-
return current.path.replace(trailingSlashRE, "/").indexOf(
|
|
232
|
-
target.path.replace(trailingSlashRE, "/")
|
|
233
|
-
) === 0 && (!target.hash || current.hash === target.hash) && queryIncludes(current.query, target.query);
|
|
234
|
-
}
|
|
235
|
-
function queryIncludes(current, target) {
|
|
236
|
-
for (var key in target) {
|
|
237
|
-
if (!(key in current)) {
|
|
238
|
-
return false;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
return true;
|
|
242
|
-
}
|
|
243
|
-
function handleRouteEntered(route) {
|
|
244
|
-
for (var i = 0; i < route.matched.length; i++) {
|
|
245
|
-
var record = route.matched[i];
|
|
246
|
-
for (var name in record.instances) {
|
|
247
|
-
var instance = record.instances[name];
|
|
248
|
-
var cbs = record.enteredCbs[name];
|
|
249
|
-
if (!instance || !cbs) {
|
|
250
|
-
continue;
|
|
251
|
-
}
|
|
252
|
-
delete record.enteredCbs[name];
|
|
253
|
-
for (var i$1 = 0; i$1 < cbs.length; i$1++) {
|
|
254
|
-
if (!instance._isBeingDestroyed) {
|
|
255
|
-
cbs[i$1](instance);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
var View = {
|
|
262
|
-
name: "RouterView",
|
|
263
|
-
functional: true,
|
|
264
|
-
props: {
|
|
265
|
-
name: {
|
|
266
|
-
type: String,
|
|
267
|
-
default: "default"
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
render: function render(_, ref2) {
|
|
271
|
-
var props = ref2.props;
|
|
272
|
-
var children = ref2.children;
|
|
273
|
-
var parent = ref2.parent;
|
|
274
|
-
var data = ref2.data;
|
|
275
|
-
data.routerView = true;
|
|
276
|
-
var h = parent.$createElement;
|
|
277
|
-
var name = props.name;
|
|
278
|
-
var route = parent.$route;
|
|
279
|
-
var cache = parent._routerViewCache || (parent._routerViewCache = {});
|
|
280
|
-
var depth = 0;
|
|
281
|
-
var inactive = false;
|
|
282
|
-
while (parent && parent._routerRoot !== parent) {
|
|
283
|
-
var vnodeData = parent.$vnode ? parent.$vnode.data : {};
|
|
284
|
-
if (vnodeData.routerView) {
|
|
285
|
-
depth++;
|
|
286
|
-
}
|
|
287
|
-
if (vnodeData.keepAlive && parent._directInactive && parent._inactive) {
|
|
288
|
-
inactive = true;
|
|
289
|
-
}
|
|
290
|
-
parent = parent.$parent;
|
|
291
|
-
}
|
|
292
|
-
data.routerViewDepth = depth;
|
|
293
|
-
if (inactive) {
|
|
294
|
-
var cachedData = cache[name];
|
|
295
|
-
var cachedComponent = cachedData && cachedData.component;
|
|
296
|
-
if (cachedComponent) {
|
|
297
|
-
if (cachedData.configProps) {
|
|
298
|
-
fillPropsinData(cachedComponent, data, cachedData.route, cachedData.configProps);
|
|
299
|
-
}
|
|
300
|
-
return h(cachedComponent, data, children);
|
|
301
|
-
} else {
|
|
302
|
-
return h();
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
var matched = route.matched[depth];
|
|
306
|
-
var component = matched && matched.components[name];
|
|
307
|
-
if (!matched || !component) {
|
|
308
|
-
cache[name] = null;
|
|
309
|
-
return h();
|
|
310
|
-
}
|
|
311
|
-
cache[name] = { component };
|
|
312
|
-
data.registerRouteInstance = function(vm, val) {
|
|
313
|
-
var current = matched.instances[name];
|
|
314
|
-
if (val && current !== vm || !val && current === vm) {
|
|
315
|
-
matched.instances[name] = val;
|
|
316
|
-
}
|
|
317
|
-
};
|
|
318
|
-
(data.hook || (data.hook = {})).prepatch = function(_2, vnode) {
|
|
319
|
-
matched.instances[name] = vnode.componentInstance;
|
|
320
|
-
};
|
|
321
|
-
data.hook.init = function(vnode) {
|
|
322
|
-
if (vnode.data.keepAlive && vnode.componentInstance && vnode.componentInstance !== matched.instances[name]) {
|
|
323
|
-
matched.instances[name] = vnode.componentInstance;
|
|
324
|
-
}
|
|
325
|
-
handleRouteEntered(route);
|
|
326
|
-
};
|
|
327
|
-
var configProps = matched.props && matched.props[name];
|
|
328
|
-
if (configProps) {
|
|
329
|
-
extend(cache[name], {
|
|
330
|
-
route,
|
|
331
|
-
configProps
|
|
332
|
-
});
|
|
333
|
-
fillPropsinData(component, data, route, configProps);
|
|
334
|
-
}
|
|
335
|
-
return h(component, data, children);
|
|
336
|
-
}
|
|
337
|
-
};
|
|
338
|
-
function fillPropsinData(component, data, route, configProps) {
|
|
339
|
-
var propsToPass = data.props = resolveProps(route, configProps);
|
|
340
|
-
if (propsToPass) {
|
|
341
|
-
propsToPass = data.props = extend({}, propsToPass);
|
|
342
|
-
var attrs = data.attrs = data.attrs || {};
|
|
343
|
-
for (var key in propsToPass) {
|
|
344
|
-
if (!component.props || !(key in component.props)) {
|
|
345
|
-
attrs[key] = propsToPass[key];
|
|
346
|
-
delete propsToPass[key];
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
function resolveProps(route, config) {
|
|
352
|
-
switch (typeof config) {
|
|
353
|
-
case "undefined":
|
|
354
|
-
return;
|
|
355
|
-
case "object":
|
|
356
|
-
return config;
|
|
357
|
-
case "function":
|
|
358
|
-
return config(route);
|
|
359
|
-
case "boolean":
|
|
360
|
-
return config ? route.params : void 0;
|
|
361
|
-
default:
|
|
362
|
-
if (process.env.NODE_ENV !== "production") {
|
|
363
|
-
warn(
|
|
364
|
-
false,
|
|
365
|
-
'props in "' + route.path + '" is a ' + typeof config + ", expecting an object, function or boolean."
|
|
366
|
-
);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
function resolvePath(relative, base, append) {
|
|
371
|
-
var firstChar = relative.charAt(0);
|
|
372
|
-
if (firstChar === "/") {
|
|
373
|
-
return relative;
|
|
374
|
-
}
|
|
375
|
-
if (firstChar === "?" || firstChar === "#") {
|
|
376
|
-
return base + relative;
|
|
377
|
-
}
|
|
378
|
-
var stack = base.split("/");
|
|
379
|
-
if (!append || !stack[stack.length - 1]) {
|
|
380
|
-
stack.pop();
|
|
381
|
-
}
|
|
382
|
-
var segments = relative.replace(/^\//, "").split("/");
|
|
383
|
-
for (var i = 0; i < segments.length; i++) {
|
|
384
|
-
var segment = segments[i];
|
|
385
|
-
if (segment === "..") {
|
|
386
|
-
stack.pop();
|
|
387
|
-
} else if (segment !== ".") {
|
|
388
|
-
stack.push(segment);
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
if (stack[0] !== "") {
|
|
392
|
-
stack.unshift("");
|
|
393
|
-
}
|
|
394
|
-
return stack.join("/");
|
|
395
|
-
}
|
|
396
|
-
function parsePath(path) {
|
|
397
|
-
var hash = "";
|
|
398
|
-
var query = "";
|
|
399
|
-
var hashIndex = path.indexOf("#");
|
|
400
|
-
if (hashIndex >= 0) {
|
|
401
|
-
hash = path.slice(hashIndex);
|
|
402
|
-
path = path.slice(0, hashIndex);
|
|
403
|
-
}
|
|
404
|
-
var queryIndex = path.indexOf("?");
|
|
405
|
-
if (queryIndex >= 0) {
|
|
406
|
-
query = path.slice(queryIndex + 1);
|
|
407
|
-
path = path.slice(0, queryIndex);
|
|
408
|
-
}
|
|
409
|
-
return {
|
|
410
|
-
path,
|
|
411
|
-
query,
|
|
412
|
-
hash
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
function cleanPath(path) {
|
|
416
|
-
return path.replace(/\/(?:\s*\/)+/g, "/");
|
|
417
|
-
}
|
|
418
|
-
var isarray = Array.isArray || function(arr) {
|
|
419
|
-
return Object.prototype.toString.call(arr) == "[object Array]";
|
|
420
|
-
};
|
|
421
|
-
var pathToRegexp_1 = pathToRegexp;
|
|
422
|
-
var parse_1 = parse;
|
|
423
|
-
var compile_1 = compile;
|
|
424
|
-
var tokensToFunction_1 = tokensToFunction;
|
|
425
|
-
var tokensToRegExp_1 = tokensToRegExp;
|
|
426
|
-
var PATH_REGEXP = new RegExp([
|
|
427
|
-
// Match escaped characters that would otherwise appear in future matches.
|
|
428
|
-
// This allows the user to escape special characters that won't transform.
|
|
429
|
-
"(\\\\.)",
|
|
430
|
-
// Match Express-style parameters and un-named parameters with a prefix
|
|
431
|
-
// and optional suffixes. Matches appear as:
|
|
432
|
-
//
|
|
433
|
-
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
|
|
434
|
-
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
|
|
435
|
-
// "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
|
|
436
|
-
"([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"
|
|
437
|
-
].join("|"), "g");
|
|
438
|
-
function parse(str, options) {
|
|
439
|
-
var tokens = [];
|
|
440
|
-
var key = 0;
|
|
441
|
-
var index = 0;
|
|
442
|
-
var path = "";
|
|
443
|
-
var defaultDelimiter = options && options.delimiter || "/";
|
|
444
|
-
var res;
|
|
445
|
-
while ((res = PATH_REGEXP.exec(str)) != null) {
|
|
446
|
-
var m = res[0];
|
|
447
|
-
var escaped = res[1];
|
|
448
|
-
var offset = res.index;
|
|
449
|
-
path += str.slice(index, offset);
|
|
450
|
-
index = offset + m.length;
|
|
451
|
-
if (escaped) {
|
|
452
|
-
path += escaped[1];
|
|
453
|
-
continue;
|
|
454
|
-
}
|
|
455
|
-
var next = str[index];
|
|
456
|
-
var prefix = res[2];
|
|
457
|
-
var name = res[3];
|
|
458
|
-
var capture = res[4];
|
|
459
|
-
var group = res[5];
|
|
460
|
-
var modifier = res[6];
|
|
461
|
-
var asterisk = res[7];
|
|
462
|
-
if (path) {
|
|
463
|
-
tokens.push(path);
|
|
464
|
-
path = "";
|
|
465
|
-
}
|
|
466
|
-
var partial = prefix != null && next != null && next !== prefix;
|
|
467
|
-
var repeat = modifier === "+" || modifier === "*";
|
|
468
|
-
var optional = modifier === "?" || modifier === "*";
|
|
469
|
-
var delimiter = res[2] || defaultDelimiter;
|
|
470
|
-
var pattern = capture || group;
|
|
471
|
-
tokens.push({
|
|
472
|
-
name: name || key++,
|
|
473
|
-
prefix: prefix || "",
|
|
474
|
-
delimiter,
|
|
475
|
-
optional,
|
|
476
|
-
repeat,
|
|
477
|
-
partial,
|
|
478
|
-
asterisk: !!asterisk,
|
|
479
|
-
pattern: pattern ? escapeGroup(pattern) : asterisk ? ".*" : "[^" + escapeString(delimiter) + "]+?"
|
|
480
|
-
});
|
|
481
|
-
}
|
|
482
|
-
if (index < str.length) {
|
|
483
|
-
path += str.substr(index);
|
|
484
|
-
}
|
|
485
|
-
if (path) {
|
|
486
|
-
tokens.push(path);
|
|
487
|
-
}
|
|
488
|
-
return tokens;
|
|
489
|
-
}
|
|
490
|
-
function compile(str, options) {
|
|
491
|
-
return tokensToFunction(parse(str, options), options);
|
|
492
|
-
}
|
|
493
|
-
function encodeURIComponentPretty(str) {
|
|
494
|
-
return encodeURI(str).replace(/[\/?#]/g, function(c) {
|
|
495
|
-
return "%" + c.charCodeAt(0).toString(16).toUpperCase();
|
|
496
|
-
});
|
|
497
|
-
}
|
|
498
|
-
function encodeAsterisk(str) {
|
|
499
|
-
return encodeURI(str).replace(/[?#]/g, function(c) {
|
|
500
|
-
return "%" + c.charCodeAt(0).toString(16).toUpperCase();
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
function tokensToFunction(tokens, options) {
|
|
504
|
-
var matches = new Array(tokens.length);
|
|
505
|
-
for (var i = 0; i < tokens.length; i++) {
|
|
506
|
-
if (typeof tokens[i] === "object") {
|
|
507
|
-
matches[i] = new RegExp("^(?:" + tokens[i].pattern + ")$", flags(options));
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
return function(obj, opts) {
|
|
511
|
-
var path = "";
|
|
512
|
-
var data = obj || {};
|
|
513
|
-
var options2 = opts || {};
|
|
514
|
-
var encode2 = options2.pretty ? encodeURIComponentPretty : encodeURIComponent;
|
|
515
|
-
for (var i2 = 0; i2 < tokens.length; i2++) {
|
|
516
|
-
var token = tokens[i2];
|
|
517
|
-
if (typeof token === "string") {
|
|
518
|
-
path += token;
|
|
519
|
-
continue;
|
|
520
|
-
}
|
|
521
|
-
var value = data[token.name];
|
|
522
|
-
var segment;
|
|
523
|
-
if (value == null) {
|
|
524
|
-
if (token.optional) {
|
|
525
|
-
if (token.partial) {
|
|
526
|
-
path += token.prefix;
|
|
527
|
-
}
|
|
528
|
-
continue;
|
|
529
|
-
} else {
|
|
530
|
-
throw new TypeError('Expected "' + token.name + '" to be defined');
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
if (isarray(value)) {
|
|
534
|
-
if (!token.repeat) {
|
|
535
|
-
throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + "`");
|
|
536
|
-
}
|
|
537
|
-
if (value.length === 0) {
|
|
538
|
-
if (token.optional) {
|
|
539
|
-
continue;
|
|
540
|
-
} else {
|
|
541
|
-
throw new TypeError('Expected "' + token.name + '" to not be empty');
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
for (var j = 0; j < value.length; j++) {
|
|
545
|
-
segment = encode2(value[j]);
|
|
546
|
-
if (!matches[i2].test(segment)) {
|
|
547
|
-
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + "`");
|
|
548
|
-
}
|
|
549
|
-
path += (j === 0 ? token.prefix : token.delimiter) + segment;
|
|
550
|
-
}
|
|
551
|
-
continue;
|
|
552
|
-
}
|
|
553
|
-
segment = token.asterisk ? encodeAsterisk(value) : encode2(value);
|
|
554
|
-
if (!matches[i2].test(segment)) {
|
|
555
|
-
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"');
|
|
556
|
-
}
|
|
557
|
-
path += token.prefix + segment;
|
|
558
|
-
}
|
|
559
|
-
return path;
|
|
560
|
-
};
|
|
561
|
-
}
|
|
562
|
-
function escapeString(str) {
|
|
563
|
-
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, "\\$1");
|
|
564
|
-
}
|
|
565
|
-
function escapeGroup(group) {
|
|
566
|
-
return group.replace(/([=!:$\/()])/g, "\\$1");
|
|
567
|
-
}
|
|
568
|
-
function attachKeys(re, keys) {
|
|
569
|
-
re.keys = keys;
|
|
570
|
-
return re;
|
|
571
|
-
}
|
|
572
|
-
function flags(options) {
|
|
573
|
-
return options && options.sensitive ? "" : "i";
|
|
574
|
-
}
|
|
575
|
-
function regexpToRegexp(path, keys) {
|
|
576
|
-
var groups = path.source.match(/\((?!\?)/g);
|
|
577
|
-
if (groups) {
|
|
578
|
-
for (var i = 0; i < groups.length; i++) {
|
|
579
|
-
keys.push({
|
|
580
|
-
name: i,
|
|
581
|
-
prefix: null,
|
|
582
|
-
delimiter: null,
|
|
583
|
-
optional: false,
|
|
584
|
-
repeat: false,
|
|
585
|
-
partial: false,
|
|
586
|
-
asterisk: false,
|
|
587
|
-
pattern: null
|
|
588
|
-
});
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
return attachKeys(path, keys);
|
|
592
|
-
}
|
|
593
|
-
function arrayToRegexp(path, keys, options) {
|
|
594
|
-
var parts = [];
|
|
595
|
-
for (var i = 0; i < path.length; i++) {
|
|
596
|
-
parts.push(pathToRegexp(path[i], keys, options).source);
|
|
597
|
-
}
|
|
598
|
-
var regexp = new RegExp("(?:" + parts.join("|") + ")", flags(options));
|
|
599
|
-
return attachKeys(regexp, keys);
|
|
600
|
-
}
|
|
601
|
-
function stringToRegexp(path, keys, options) {
|
|
602
|
-
return tokensToRegExp(parse(path, options), keys, options);
|
|
603
|
-
}
|
|
604
|
-
function tokensToRegExp(tokens, keys, options) {
|
|
605
|
-
if (!isarray(keys)) {
|
|
606
|
-
options = /** @type {!Object} */
|
|
607
|
-
keys || options;
|
|
608
|
-
keys = [];
|
|
609
|
-
}
|
|
610
|
-
options = options || {};
|
|
611
|
-
var strict = options.strict;
|
|
612
|
-
var end = options.end !== false;
|
|
613
|
-
var route = "";
|
|
614
|
-
for (var i = 0; i < tokens.length; i++) {
|
|
615
|
-
var token = tokens[i];
|
|
616
|
-
if (typeof token === "string") {
|
|
617
|
-
route += escapeString(token);
|
|
618
|
-
} else {
|
|
619
|
-
var prefix = escapeString(token.prefix);
|
|
620
|
-
var capture = "(?:" + token.pattern + ")";
|
|
621
|
-
keys.push(token);
|
|
622
|
-
if (token.repeat) {
|
|
623
|
-
capture += "(?:" + prefix + capture + ")*";
|
|
624
|
-
}
|
|
625
|
-
if (token.optional) {
|
|
626
|
-
if (!token.partial) {
|
|
627
|
-
capture = "(?:" + prefix + "(" + capture + "))?";
|
|
628
|
-
} else {
|
|
629
|
-
capture = prefix + "(" + capture + ")?";
|
|
630
|
-
}
|
|
631
|
-
} else {
|
|
632
|
-
capture = prefix + "(" + capture + ")";
|
|
633
|
-
}
|
|
634
|
-
route += capture;
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
var delimiter = escapeString(options.delimiter || "/");
|
|
638
|
-
var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;
|
|
639
|
-
if (!strict) {
|
|
640
|
-
route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + "(?:" + delimiter + "(?=$))?";
|
|
641
|
-
}
|
|
642
|
-
if (end) {
|
|
643
|
-
route += "$";
|
|
644
|
-
} else {
|
|
645
|
-
route += strict && endsWithDelimiter ? "" : "(?=" + delimiter + "|$)";
|
|
646
|
-
}
|
|
647
|
-
return attachKeys(new RegExp("^" + route, flags(options)), keys);
|
|
648
|
-
}
|
|
649
|
-
function pathToRegexp(path, keys, options) {
|
|
650
|
-
if (!isarray(keys)) {
|
|
651
|
-
options = /** @type {!Object} */
|
|
652
|
-
keys || options;
|
|
653
|
-
keys = [];
|
|
654
|
-
}
|
|
655
|
-
options = options || {};
|
|
656
|
-
if (path instanceof RegExp) {
|
|
657
|
-
return regexpToRegexp(
|
|
658
|
-
path,
|
|
659
|
-
/** @type {!Array} */
|
|
660
|
-
keys
|
|
661
|
-
);
|
|
662
|
-
}
|
|
663
|
-
if (isarray(path)) {
|
|
664
|
-
return arrayToRegexp(
|
|
665
|
-
/** @type {!Array} */
|
|
666
|
-
path,
|
|
667
|
-
/** @type {!Array} */
|
|
668
|
-
keys,
|
|
669
|
-
options
|
|
670
|
-
);
|
|
671
|
-
}
|
|
672
|
-
return stringToRegexp(
|
|
673
|
-
/** @type {string} */
|
|
674
|
-
path,
|
|
675
|
-
/** @type {!Array} */
|
|
676
|
-
keys,
|
|
677
|
-
options
|
|
678
|
-
);
|
|
679
|
-
}
|
|
680
|
-
pathToRegexp_1.parse = parse_1;
|
|
681
|
-
pathToRegexp_1.compile = compile_1;
|
|
682
|
-
pathToRegexp_1.tokensToFunction = tokensToFunction_1;
|
|
683
|
-
pathToRegexp_1.tokensToRegExp = tokensToRegExp_1;
|
|
684
|
-
var regexpCompileCache = /* @__PURE__ */ Object.create(null);
|
|
685
|
-
function fillParams(path, params, routeMsg) {
|
|
686
|
-
params = params || {};
|
|
687
|
-
try {
|
|
688
|
-
var filler = regexpCompileCache[path] || (regexpCompileCache[path] = pathToRegexp_1.compile(path));
|
|
689
|
-
if (typeof params.pathMatch === "string") {
|
|
690
|
-
params[0] = params.pathMatch;
|
|
691
|
-
}
|
|
692
|
-
return filler(params, { pretty: true });
|
|
693
|
-
} catch (e) {
|
|
694
|
-
if (process.env.NODE_ENV !== "production") {
|
|
695
|
-
warn(typeof params.pathMatch === "string", "missing param for " + routeMsg + ": " + e.message);
|
|
696
|
-
}
|
|
697
|
-
return "";
|
|
698
|
-
} finally {
|
|
699
|
-
delete params[0];
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
function normalizeLocation(raw, current, append, router) {
|
|
703
|
-
var next = typeof raw === "string" ? { path: raw } : raw;
|
|
704
|
-
if (next._normalized) {
|
|
705
|
-
return next;
|
|
706
|
-
} else if (next.name) {
|
|
707
|
-
next = extend({}, raw);
|
|
708
|
-
var params = next.params;
|
|
709
|
-
if (params && typeof params === "object") {
|
|
710
|
-
next.params = extend({}, params);
|
|
711
|
-
}
|
|
712
|
-
return next;
|
|
713
|
-
}
|
|
714
|
-
if (!next.path && next.params && current) {
|
|
715
|
-
next = extend({}, next);
|
|
716
|
-
next._normalized = true;
|
|
717
|
-
var params$1 = extend(extend({}, current.params), next.params);
|
|
718
|
-
if (current.name) {
|
|
719
|
-
next.name = current.name;
|
|
720
|
-
next.params = params$1;
|
|
721
|
-
} else if (current.matched.length) {
|
|
722
|
-
var rawPath = current.matched[current.matched.length - 1].path;
|
|
723
|
-
next.path = fillParams(rawPath, params$1, "path " + current.path);
|
|
724
|
-
} else if (process.env.NODE_ENV !== "production") {
|
|
725
|
-
warn(false, "relative params navigation requires a current route.");
|
|
726
|
-
}
|
|
727
|
-
return next;
|
|
728
|
-
}
|
|
729
|
-
var parsedPath = parsePath(next.path || "");
|
|
730
|
-
var basePath = current && current.path || "/";
|
|
731
|
-
var path = parsedPath.path ? resolvePath(parsedPath.path, basePath, append || next.append) : basePath;
|
|
732
|
-
var query = resolveQuery(
|
|
733
|
-
parsedPath.query,
|
|
734
|
-
next.query,
|
|
735
|
-
router && router.options.parseQuery
|
|
736
|
-
);
|
|
737
|
-
var hash = next.hash || parsedPath.hash;
|
|
738
|
-
if (hash && hash.charAt(0) !== "#") {
|
|
739
|
-
hash = "#" + hash;
|
|
740
|
-
}
|
|
741
|
-
return {
|
|
742
|
-
_normalized: true,
|
|
743
|
-
path,
|
|
744
|
-
query,
|
|
745
|
-
hash
|
|
746
|
-
};
|
|
747
|
-
}
|
|
748
|
-
var toTypes = [String, Object];
|
|
749
|
-
var eventTypes = [String, Array];
|
|
750
|
-
var noop = function() {
|
|
751
|
-
};
|
|
752
|
-
var warnedCustomSlot;
|
|
753
|
-
var warnedTagProp;
|
|
754
|
-
var warnedEventProp;
|
|
755
|
-
var Link = {
|
|
756
|
-
name: "RouterLink",
|
|
757
|
-
props: {
|
|
758
|
-
to: {
|
|
759
|
-
type: toTypes,
|
|
760
|
-
required: true
|
|
761
|
-
},
|
|
762
|
-
tag: {
|
|
763
|
-
type: String,
|
|
764
|
-
default: "a"
|
|
765
|
-
},
|
|
766
|
-
custom: Boolean,
|
|
767
|
-
exact: Boolean,
|
|
768
|
-
exactPath: Boolean,
|
|
769
|
-
append: Boolean,
|
|
770
|
-
replace: Boolean,
|
|
771
|
-
activeClass: String,
|
|
772
|
-
exactActiveClass: String,
|
|
773
|
-
ariaCurrentValue: {
|
|
774
|
-
type: String,
|
|
775
|
-
default: "page"
|
|
776
|
-
},
|
|
777
|
-
event: {
|
|
778
|
-
type: eventTypes,
|
|
779
|
-
default: "click"
|
|
780
|
-
}
|
|
781
|
-
},
|
|
782
|
-
render: function render2(h) {
|
|
783
|
-
var this$1$1 = this;
|
|
784
|
-
var router = this.$router;
|
|
785
|
-
var current = this.$route;
|
|
786
|
-
var ref2 = router.resolve(
|
|
787
|
-
this.to,
|
|
788
|
-
current,
|
|
789
|
-
this.append
|
|
790
|
-
);
|
|
791
|
-
var location = ref2.location;
|
|
792
|
-
var route = ref2.route;
|
|
793
|
-
var href = ref2.href;
|
|
794
|
-
var classes = {};
|
|
795
|
-
var globalActiveClass = router.options.linkActiveClass;
|
|
796
|
-
var globalExactActiveClass = router.options.linkExactActiveClass;
|
|
797
|
-
var activeClassFallback = globalActiveClass == null ? "router-link-active" : globalActiveClass;
|
|
798
|
-
var exactActiveClassFallback = globalExactActiveClass == null ? "router-link-exact-active" : globalExactActiveClass;
|
|
799
|
-
var activeClass = this.activeClass == null ? activeClassFallback : this.activeClass;
|
|
800
|
-
var exactActiveClass = this.exactActiveClass == null ? exactActiveClassFallback : this.exactActiveClass;
|
|
801
|
-
var compareTarget = route.redirectedFrom ? createRoute(null, normalizeLocation(route.redirectedFrom), null, router) : route;
|
|
802
|
-
classes[exactActiveClass] = isSameRoute(current, compareTarget, this.exactPath);
|
|
803
|
-
classes[activeClass] = this.exact || this.exactPath ? classes[exactActiveClass] : isIncludedRoute(current, compareTarget);
|
|
804
|
-
var ariaCurrentValue = classes[exactActiveClass] ? this.ariaCurrentValue : null;
|
|
805
|
-
var handler = function(e) {
|
|
806
|
-
if (guardEvent(e)) {
|
|
807
|
-
if (this$1$1.replace) {
|
|
808
|
-
router.replace(location, noop);
|
|
809
|
-
} else {
|
|
810
|
-
router.push(location, noop);
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
};
|
|
814
|
-
var on = { click: guardEvent };
|
|
815
|
-
if (Array.isArray(this.event)) {
|
|
816
|
-
this.event.forEach(function(e) {
|
|
817
|
-
on[e] = handler;
|
|
818
|
-
});
|
|
819
|
-
} else {
|
|
820
|
-
on[this.event] = handler;
|
|
821
|
-
}
|
|
822
|
-
var data = { class: classes };
|
|
823
|
-
var scopedSlot = !this.$scopedSlots.$hasNormal && this.$scopedSlots.default && this.$scopedSlots.default({
|
|
824
|
-
href,
|
|
825
|
-
route,
|
|
826
|
-
navigate: handler,
|
|
827
|
-
isActive: classes[activeClass],
|
|
828
|
-
isExactActive: classes[exactActiveClass]
|
|
829
|
-
});
|
|
830
|
-
if (scopedSlot) {
|
|
831
|
-
if (process.env.NODE_ENV !== "production" && !this.custom) {
|
|
832
|
-
!warnedCustomSlot && warn(false, 'In Vue Router 4, the v-slot API will by default wrap its content with an <a> element. Use the custom prop to remove this warning:\n<router-link v-slot="{ navigate, href }" custom></router-link>\n');
|
|
833
|
-
warnedCustomSlot = true;
|
|
834
|
-
}
|
|
835
|
-
if (scopedSlot.length === 1) {
|
|
836
|
-
return scopedSlot[0];
|
|
837
|
-
} else if (scopedSlot.length > 1 || !scopedSlot.length) {
|
|
838
|
-
if (process.env.NODE_ENV !== "production") {
|
|
839
|
-
warn(
|
|
840
|
-
false,
|
|
841
|
-
'<router-link> with to="' + this.to + "\" is trying to use a scoped slot but it didn't provide exactly one child. Wrapping the content with a span element."
|
|
842
|
-
);
|
|
843
|
-
}
|
|
844
|
-
return scopedSlot.length === 0 ? h() : h("span", {}, scopedSlot);
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
if (process.env.NODE_ENV !== "production") {
|
|
848
|
-
if ("tag" in this.$options.propsData && !warnedTagProp) {
|
|
849
|
-
warn(
|
|
850
|
-
false,
|
|
851
|
-
"<router-link>'s tag prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link."
|
|
852
|
-
);
|
|
853
|
-
warnedTagProp = true;
|
|
854
|
-
}
|
|
855
|
-
if ("event" in this.$options.propsData && !warnedEventProp) {
|
|
856
|
-
warn(
|
|
857
|
-
false,
|
|
858
|
-
"<router-link>'s event prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link."
|
|
859
|
-
);
|
|
860
|
-
warnedEventProp = true;
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
if (this.tag === "a") {
|
|
864
|
-
data.on = on;
|
|
865
|
-
data.attrs = { href, "aria-current": ariaCurrentValue };
|
|
866
|
-
} else {
|
|
867
|
-
var a = findAnchor(this.$slots.default);
|
|
868
|
-
if (a) {
|
|
869
|
-
a.isStatic = false;
|
|
870
|
-
var aData = a.data = extend({}, a.data);
|
|
871
|
-
aData.on = aData.on || {};
|
|
872
|
-
for (var event in aData.on) {
|
|
873
|
-
var handler$1 = aData.on[event];
|
|
874
|
-
if (event in on) {
|
|
875
|
-
aData.on[event] = Array.isArray(handler$1) ? handler$1 : [handler$1];
|
|
876
|
-
}
|
|
877
|
-
}
|
|
878
|
-
for (var event$1 in on) {
|
|
879
|
-
if (event$1 in aData.on) {
|
|
880
|
-
aData.on[event$1].push(on[event$1]);
|
|
881
|
-
} else {
|
|
882
|
-
aData.on[event$1] = handler;
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
var aAttrs = a.data.attrs = extend({}, a.data.attrs);
|
|
886
|
-
aAttrs.href = href;
|
|
887
|
-
aAttrs["aria-current"] = ariaCurrentValue;
|
|
888
|
-
} else {
|
|
889
|
-
data.on = on;
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
return h(this.tag, data, this.$slots.default);
|
|
893
|
-
}
|
|
894
|
-
};
|
|
895
|
-
function guardEvent(e) {
|
|
896
|
-
if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) {
|
|
897
|
-
return;
|
|
898
|
-
}
|
|
899
|
-
if (e.defaultPrevented) {
|
|
900
|
-
return;
|
|
901
|
-
}
|
|
902
|
-
if (e.button !== void 0 && e.button !== 0) {
|
|
903
|
-
return;
|
|
904
|
-
}
|
|
905
|
-
if (e.currentTarget && e.currentTarget.getAttribute) {
|
|
906
|
-
var target = e.currentTarget.getAttribute("target");
|
|
907
|
-
if (/\b_blank\b/i.test(target)) {
|
|
908
|
-
return;
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
if (e.preventDefault) {
|
|
912
|
-
e.preventDefault();
|
|
913
|
-
}
|
|
914
|
-
return true;
|
|
915
|
-
}
|
|
916
|
-
function findAnchor(children) {
|
|
917
|
-
if (children) {
|
|
918
|
-
var child;
|
|
919
|
-
for (var i = 0; i < children.length; i++) {
|
|
920
|
-
child = children[i];
|
|
921
|
-
if (child.tag === "a") {
|
|
922
|
-
return child;
|
|
923
|
-
}
|
|
924
|
-
if (child.children && (child = findAnchor(child.children))) {
|
|
925
|
-
return child;
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
var _Vue;
|
|
931
|
-
function install(Vue2) {
|
|
932
|
-
if (install.installed && _Vue === Vue2) {
|
|
933
|
-
return;
|
|
934
|
-
}
|
|
935
|
-
install.installed = true;
|
|
936
|
-
_Vue = Vue2;
|
|
937
|
-
var isDef = function(v) {
|
|
938
|
-
return v !== void 0;
|
|
939
|
-
};
|
|
940
|
-
var registerInstance = function(vm, callVal) {
|
|
941
|
-
var i = vm.$options._parentVnode;
|
|
942
|
-
if (isDef(i) && isDef(i = i.data) && isDef(i = i.registerRouteInstance)) {
|
|
943
|
-
i(vm, callVal);
|
|
944
|
-
}
|
|
945
|
-
};
|
|
946
|
-
Vue2.mixin({
|
|
947
|
-
beforeCreate: function beforeCreate() {
|
|
948
|
-
if (isDef(this.$options.router)) {
|
|
949
|
-
this._routerRoot = this;
|
|
950
|
-
this._router = this.$options.router;
|
|
951
|
-
this._router.init(this);
|
|
952
|
-
Vue2.util.defineReactive(this, "_route", this._router.history.current);
|
|
953
|
-
} else {
|
|
954
|
-
this._routerRoot = this.$parent && this.$parent._routerRoot || this;
|
|
955
|
-
}
|
|
956
|
-
registerInstance(this, this);
|
|
957
|
-
},
|
|
958
|
-
destroyed: function destroyed() {
|
|
959
|
-
registerInstance(this);
|
|
960
|
-
}
|
|
961
|
-
});
|
|
962
|
-
Object.defineProperty(Vue2.prototype, "$router", {
|
|
963
|
-
get: function get() {
|
|
964
|
-
return this._routerRoot._router;
|
|
965
|
-
}
|
|
966
|
-
});
|
|
967
|
-
Object.defineProperty(Vue2.prototype, "$route", {
|
|
968
|
-
get: function get() {
|
|
969
|
-
return this._routerRoot._route;
|
|
970
|
-
}
|
|
971
|
-
});
|
|
972
|
-
Vue2.component("RouterView", View);
|
|
973
|
-
Vue2.component("RouterLink", Link);
|
|
974
|
-
var strats = Vue2.config.optionMergeStrategies;
|
|
975
|
-
strats.beforeRouteEnter = strats.beforeRouteLeave = strats.beforeRouteUpdate = strats.created;
|
|
976
|
-
}
|
|
977
|
-
var inBrowser = typeof window !== "undefined";
|
|
978
|
-
function createRouteMap(routes, oldPathList, oldPathMap, oldNameMap, parentRoute) {
|
|
979
|
-
var pathList = oldPathList || [];
|
|
980
|
-
var pathMap = oldPathMap || /* @__PURE__ */ Object.create(null);
|
|
981
|
-
var nameMap = oldNameMap || /* @__PURE__ */ Object.create(null);
|
|
982
|
-
routes.forEach(function(route) {
|
|
983
|
-
addRouteRecord(pathList, pathMap, nameMap, route, parentRoute);
|
|
984
|
-
});
|
|
985
|
-
for (var i = 0, l = pathList.length; i < l; i++) {
|
|
986
|
-
if (pathList[i] === "*") {
|
|
987
|
-
pathList.push(pathList.splice(i, 1)[0]);
|
|
988
|
-
l--;
|
|
989
|
-
i--;
|
|
990
|
-
}
|
|
991
|
-
}
|
|
992
|
-
if (process.env.NODE_ENV === "development") {
|
|
993
|
-
var found = pathList.filter(function(path) {
|
|
994
|
-
return path && path.charAt(0) !== "*" && path.charAt(0) !== "/";
|
|
995
|
-
});
|
|
996
|
-
if (found.length > 0) {
|
|
997
|
-
var pathNames = found.map(function(path) {
|
|
998
|
-
return "- " + path;
|
|
999
|
-
}).join("\n");
|
|
1000
|
-
warn(false, "Non-nested routes must include a leading slash character. Fix the following routes: \n" + pathNames);
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
-
return {
|
|
1004
|
-
pathList,
|
|
1005
|
-
pathMap,
|
|
1006
|
-
nameMap
|
|
1007
|
-
};
|
|
1008
|
-
}
|
|
1009
|
-
function addRouteRecord(pathList, pathMap, nameMap, route, parent, matchAs) {
|
|
1010
|
-
var path = route.path;
|
|
1011
|
-
var name = route.name;
|
|
1012
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1013
|
-
assert(path != null, '"path" is required in a route configuration.');
|
|
1014
|
-
assert(
|
|
1015
|
-
typeof route.component !== "string",
|
|
1016
|
-
'route config "component" for path: ' + String(
|
|
1017
|
-
path || name
|
|
1018
|
-
) + " cannot be a string id. Use an actual component instead."
|
|
1019
|
-
);
|
|
1020
|
-
warn(
|
|
1021
|
-
// eslint-disable-next-line no-control-regex
|
|
1022
|
-
!/[^\u0000-\u007F]+/.test(path),
|
|
1023
|
-
'Route with path "' + path + '" contains unencoded characters, make sure your path is correctly encoded before passing it to the router. Use encodeURI to encode static segments of your path.'
|
|
1024
|
-
);
|
|
1025
|
-
}
|
|
1026
|
-
var pathToRegexpOptions = route.pathToRegexpOptions || {};
|
|
1027
|
-
var normalizedPath = normalizePath(path, parent, pathToRegexpOptions.strict);
|
|
1028
|
-
if (typeof route.caseSensitive === "boolean") {
|
|
1029
|
-
pathToRegexpOptions.sensitive = route.caseSensitive;
|
|
1030
|
-
}
|
|
1031
|
-
var record = {
|
|
1032
|
-
path: normalizedPath,
|
|
1033
|
-
regex: compileRouteRegex(normalizedPath, pathToRegexpOptions),
|
|
1034
|
-
components: route.components || { default: route.component },
|
|
1035
|
-
alias: route.alias ? typeof route.alias === "string" ? [route.alias] : route.alias : [],
|
|
1036
|
-
instances: {},
|
|
1037
|
-
enteredCbs: {},
|
|
1038
|
-
name,
|
|
1039
|
-
parent,
|
|
1040
|
-
matchAs,
|
|
1041
|
-
redirect: route.redirect,
|
|
1042
|
-
beforeEnter: route.beforeEnter,
|
|
1043
|
-
meta: route.meta || {},
|
|
1044
|
-
props: route.props == null ? {} : route.components ? route.props : { default: route.props }
|
|
1045
|
-
};
|
|
1046
|
-
if (route.children) {
|
|
1047
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1048
|
-
if (route.name && !route.redirect && route.children.some(function(child) {
|
|
1049
|
-
return /^\/?$/.test(child.path);
|
|
1050
|
-
})) {
|
|
1051
|
-
warn(
|
|
1052
|
-
false,
|
|
1053
|
-
"Named Route '" + route.name + "' has a default child route. When navigating to this named route (:to=\"{name: '" + route.name + "'}\"), the default child route will not be rendered. Remove the name from this route and use the name of the default child route for named links instead."
|
|
1054
|
-
);
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
route.children.forEach(function(child) {
|
|
1058
|
-
var childMatchAs = matchAs ? cleanPath(matchAs + "/" + child.path) : void 0;
|
|
1059
|
-
addRouteRecord(pathList, pathMap, nameMap, child, record, childMatchAs);
|
|
1060
|
-
});
|
|
1061
|
-
}
|
|
1062
|
-
if (!pathMap[record.path]) {
|
|
1063
|
-
pathList.push(record.path);
|
|
1064
|
-
pathMap[record.path] = record;
|
|
1065
|
-
}
|
|
1066
|
-
if (route.alias !== void 0) {
|
|
1067
|
-
var aliases = Array.isArray(route.alias) ? route.alias : [route.alias];
|
|
1068
|
-
for (var i = 0; i < aliases.length; ++i) {
|
|
1069
|
-
var alias = aliases[i];
|
|
1070
|
-
if (process.env.NODE_ENV !== "production" && alias === path) {
|
|
1071
|
-
warn(
|
|
1072
|
-
false,
|
|
1073
|
-
'Found an alias with the same value as the path: "' + path + '". You have to remove that alias. It will be ignored in development.'
|
|
1074
|
-
);
|
|
1075
|
-
continue;
|
|
1076
|
-
}
|
|
1077
|
-
var aliasRoute = {
|
|
1078
|
-
path: alias,
|
|
1079
|
-
children: route.children
|
|
1080
|
-
};
|
|
1081
|
-
addRouteRecord(
|
|
1082
|
-
pathList,
|
|
1083
|
-
pathMap,
|
|
1084
|
-
nameMap,
|
|
1085
|
-
aliasRoute,
|
|
1086
|
-
parent,
|
|
1087
|
-
record.path || "/"
|
|
1088
|
-
// matchAs
|
|
1089
|
-
);
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
if (name) {
|
|
1093
|
-
if (!nameMap[name]) {
|
|
1094
|
-
nameMap[name] = record;
|
|
1095
|
-
} else if (process.env.NODE_ENV !== "production" && !matchAs) {
|
|
1096
|
-
warn(
|
|
1097
|
-
false,
|
|
1098
|
-
'Duplicate named routes definition: { name: "' + name + '", path: "' + record.path + '" }'
|
|
1099
|
-
);
|
|
1100
|
-
}
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
function compileRouteRegex(path, pathToRegexpOptions) {
|
|
1104
|
-
var regex = pathToRegexp_1(path, [], pathToRegexpOptions);
|
|
1105
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1106
|
-
var keys = /* @__PURE__ */ Object.create(null);
|
|
1107
|
-
regex.keys.forEach(function(key) {
|
|
1108
|
-
warn(
|
|
1109
|
-
!keys[key.name],
|
|
1110
|
-
'Duplicate param keys in route with path: "' + path + '"'
|
|
1111
|
-
);
|
|
1112
|
-
keys[key.name] = true;
|
|
1113
|
-
});
|
|
1114
|
-
}
|
|
1115
|
-
return regex;
|
|
1116
|
-
}
|
|
1117
|
-
function normalizePath(path, parent, strict) {
|
|
1118
|
-
if (!strict) {
|
|
1119
|
-
path = path.replace(/\/$/, "");
|
|
1120
|
-
}
|
|
1121
|
-
if (path[0] === "/") {
|
|
1122
|
-
return path;
|
|
1123
|
-
}
|
|
1124
|
-
if (parent == null) {
|
|
1125
|
-
return path;
|
|
1126
|
-
}
|
|
1127
|
-
return cleanPath(parent.path + "/" + path);
|
|
1128
|
-
}
|
|
1129
|
-
function createMatcher(routes, router) {
|
|
1130
|
-
var ref2 = createRouteMap(routes);
|
|
1131
|
-
var pathList = ref2.pathList;
|
|
1132
|
-
var pathMap = ref2.pathMap;
|
|
1133
|
-
var nameMap = ref2.nameMap;
|
|
1134
|
-
function addRoutes2(routes2) {
|
|
1135
|
-
createRouteMap(routes2, pathList, pathMap, nameMap);
|
|
1136
|
-
}
|
|
1137
|
-
function addRoute2(parentOrRoute, route) {
|
|
1138
|
-
var parent = typeof parentOrRoute !== "object" ? nameMap[parentOrRoute] : void 0;
|
|
1139
|
-
createRouteMap([route || parentOrRoute], pathList, pathMap, nameMap, parent);
|
|
1140
|
-
if (parent && parent.alias.length) {
|
|
1141
|
-
createRouteMap(
|
|
1142
|
-
// $flow-disable-line route is defined if parent is
|
|
1143
|
-
parent.alias.map(function(alias2) {
|
|
1144
|
-
return { path: alias2, children: [route] };
|
|
1145
|
-
}),
|
|
1146
|
-
pathList,
|
|
1147
|
-
pathMap,
|
|
1148
|
-
nameMap,
|
|
1149
|
-
parent
|
|
1150
|
-
);
|
|
1151
|
-
}
|
|
1152
|
-
}
|
|
1153
|
-
function getRoutes2() {
|
|
1154
|
-
return pathList.map(function(path) {
|
|
1155
|
-
return pathMap[path];
|
|
1156
|
-
});
|
|
1157
|
-
}
|
|
1158
|
-
function match2(raw, currentRoute, redirectedFrom) {
|
|
1159
|
-
var location = normalizeLocation(raw, currentRoute, false, router);
|
|
1160
|
-
var name = location.name;
|
|
1161
|
-
if (name) {
|
|
1162
|
-
var record = nameMap[name];
|
|
1163
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1164
|
-
warn(record, "Route with name '" + name + "' does not exist");
|
|
1165
|
-
}
|
|
1166
|
-
if (!record) {
|
|
1167
|
-
return _createRoute(null, location);
|
|
1168
|
-
}
|
|
1169
|
-
var paramNames = record.regex.keys.filter(function(key2) {
|
|
1170
|
-
return !key2.optional;
|
|
1171
|
-
}).map(function(key2) {
|
|
1172
|
-
return key2.name;
|
|
1173
|
-
});
|
|
1174
|
-
if (typeof location.params !== "object") {
|
|
1175
|
-
location.params = {};
|
|
1176
|
-
}
|
|
1177
|
-
if (currentRoute && typeof currentRoute.params === "object") {
|
|
1178
|
-
for (var key in currentRoute.params) {
|
|
1179
|
-
if (!(key in location.params) && paramNames.indexOf(key) > -1) {
|
|
1180
|
-
location.params[key] = currentRoute.params[key];
|
|
1181
|
-
}
|
|
1182
|
-
}
|
|
1183
|
-
}
|
|
1184
|
-
location.path = fillParams(record.path, location.params, 'named route "' + name + '"');
|
|
1185
|
-
return _createRoute(record, location, redirectedFrom);
|
|
1186
|
-
} else if (location.path) {
|
|
1187
|
-
location.params = {};
|
|
1188
|
-
for (var i = 0; i < pathList.length; i++) {
|
|
1189
|
-
var path = pathList[i];
|
|
1190
|
-
var record$1 = pathMap[path];
|
|
1191
|
-
if (matchRoute(record$1.regex, location.path, location.params)) {
|
|
1192
|
-
return _createRoute(record$1, location, redirectedFrom);
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
return _createRoute(null, location);
|
|
1197
|
-
}
|
|
1198
|
-
function redirect(record, location) {
|
|
1199
|
-
var originalRedirect = record.redirect;
|
|
1200
|
-
var redirect2 = typeof originalRedirect === "function" ? originalRedirect(createRoute(record, location, null, router)) : originalRedirect;
|
|
1201
|
-
if (typeof redirect2 === "string") {
|
|
1202
|
-
redirect2 = { path: redirect2 };
|
|
1203
|
-
}
|
|
1204
|
-
if (!redirect2 || typeof redirect2 !== "object") {
|
|
1205
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1206
|
-
warn(
|
|
1207
|
-
false,
|
|
1208
|
-
"invalid redirect option: " + JSON.stringify(redirect2)
|
|
1209
|
-
);
|
|
1210
|
-
}
|
|
1211
|
-
return _createRoute(null, location);
|
|
1212
|
-
}
|
|
1213
|
-
var re = redirect2;
|
|
1214
|
-
var name = re.name;
|
|
1215
|
-
var path = re.path;
|
|
1216
|
-
var query = location.query;
|
|
1217
|
-
var hash = location.hash;
|
|
1218
|
-
var params = location.params;
|
|
1219
|
-
query = re.hasOwnProperty("query") ? re.query : query;
|
|
1220
|
-
hash = re.hasOwnProperty("hash") ? re.hash : hash;
|
|
1221
|
-
params = re.hasOwnProperty("params") ? re.params : params;
|
|
1222
|
-
if (name) {
|
|
1223
|
-
var targetRecord = nameMap[name];
|
|
1224
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1225
|
-
assert(targetRecord, 'redirect failed: named route "' + name + '" not found.');
|
|
1226
|
-
}
|
|
1227
|
-
return match2({
|
|
1228
|
-
_normalized: true,
|
|
1229
|
-
name,
|
|
1230
|
-
query,
|
|
1231
|
-
hash,
|
|
1232
|
-
params
|
|
1233
|
-
}, void 0, location);
|
|
1234
|
-
} else if (path) {
|
|
1235
|
-
var rawPath = resolveRecordPath(path, record);
|
|
1236
|
-
var resolvedPath = fillParams(rawPath, params, 'redirect route with path "' + rawPath + '"');
|
|
1237
|
-
return match2({
|
|
1238
|
-
_normalized: true,
|
|
1239
|
-
path: resolvedPath,
|
|
1240
|
-
query,
|
|
1241
|
-
hash
|
|
1242
|
-
}, void 0, location);
|
|
1243
|
-
} else {
|
|
1244
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1245
|
-
warn(false, "invalid redirect option: " + JSON.stringify(redirect2));
|
|
1246
|
-
}
|
|
1247
|
-
return _createRoute(null, location);
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
function alias(record, location, matchAs) {
|
|
1251
|
-
var aliasedPath = fillParams(matchAs, location.params, 'aliased route with path "' + matchAs + '"');
|
|
1252
|
-
var aliasedMatch = match2({
|
|
1253
|
-
_normalized: true,
|
|
1254
|
-
path: aliasedPath
|
|
1255
|
-
});
|
|
1256
|
-
if (aliasedMatch) {
|
|
1257
|
-
var matched = aliasedMatch.matched;
|
|
1258
|
-
var aliasedRecord = matched[matched.length - 1];
|
|
1259
|
-
location.params = aliasedMatch.params;
|
|
1260
|
-
return _createRoute(aliasedRecord, location);
|
|
1261
|
-
}
|
|
1262
|
-
return _createRoute(null, location);
|
|
1263
|
-
}
|
|
1264
|
-
function _createRoute(record, location, redirectedFrom) {
|
|
1265
|
-
if (record && record.redirect) {
|
|
1266
|
-
return redirect(record, redirectedFrom || location);
|
|
1267
|
-
}
|
|
1268
|
-
if (record && record.matchAs) {
|
|
1269
|
-
return alias(record, location, record.matchAs);
|
|
1270
|
-
}
|
|
1271
|
-
return createRoute(record, location, redirectedFrom, router);
|
|
1272
|
-
}
|
|
1273
|
-
return {
|
|
1274
|
-
match: match2,
|
|
1275
|
-
addRoute: addRoute2,
|
|
1276
|
-
getRoutes: getRoutes2,
|
|
1277
|
-
addRoutes: addRoutes2
|
|
1278
|
-
};
|
|
1279
|
-
}
|
|
1280
|
-
function matchRoute(regex, path, params) {
|
|
1281
|
-
var m = path.match(regex);
|
|
1282
|
-
if (!m) {
|
|
1283
|
-
return false;
|
|
1284
|
-
} else if (!params) {
|
|
1285
|
-
return true;
|
|
1286
|
-
}
|
|
1287
|
-
for (var i = 1, len = m.length; i < len; ++i) {
|
|
1288
|
-
var key = regex.keys[i - 1];
|
|
1289
|
-
if (key) {
|
|
1290
|
-
params[key.name || "pathMatch"] = typeof m[i] === "string" ? decode(m[i]) : m[i];
|
|
1291
|
-
}
|
|
1292
|
-
}
|
|
1293
|
-
return true;
|
|
1294
|
-
}
|
|
1295
|
-
function resolveRecordPath(path, record) {
|
|
1296
|
-
return resolvePath(path, record.parent ? record.parent.path : "/", true);
|
|
1297
|
-
}
|
|
1298
|
-
var Time = inBrowser && window.performance && window.performance.now ? window.performance : Date;
|
|
1299
|
-
function genStateKey() {
|
|
1300
|
-
return Time.now().toFixed(3);
|
|
1301
|
-
}
|
|
1302
|
-
var _key = genStateKey();
|
|
1303
|
-
function getStateKey() {
|
|
1304
|
-
return _key;
|
|
1305
|
-
}
|
|
1306
|
-
function setStateKey(key) {
|
|
1307
|
-
return _key = key;
|
|
1308
|
-
}
|
|
1309
|
-
var positionStore = /* @__PURE__ */ Object.create(null);
|
|
1310
|
-
function setupScroll() {
|
|
1311
|
-
if ("scrollRestoration" in window.history) {
|
|
1312
|
-
window.history.scrollRestoration = "manual";
|
|
1313
|
-
}
|
|
1314
|
-
var protocolAndPath = window.location.protocol + "//" + window.location.host;
|
|
1315
|
-
var absolutePath = window.location.href.replace(protocolAndPath, "");
|
|
1316
|
-
var stateCopy = extend({}, window.history.state);
|
|
1317
|
-
stateCopy.key = getStateKey();
|
|
1318
|
-
window.history.replaceState(stateCopy, "", absolutePath);
|
|
1319
|
-
window.addEventListener("popstate", handlePopState);
|
|
1320
|
-
return function() {
|
|
1321
|
-
window.removeEventListener("popstate", handlePopState);
|
|
1322
|
-
};
|
|
1323
|
-
}
|
|
1324
|
-
function handleScroll(router, to, from, isPop) {
|
|
1325
|
-
if (!router.app) {
|
|
1326
|
-
return;
|
|
1327
|
-
}
|
|
1328
|
-
var behavior = router.options.scrollBehavior;
|
|
1329
|
-
if (!behavior) {
|
|
1330
|
-
return;
|
|
1331
|
-
}
|
|
1332
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1333
|
-
assert(typeof behavior === "function", "scrollBehavior must be a function");
|
|
1334
|
-
}
|
|
1335
|
-
router.app.$nextTick(function() {
|
|
1336
|
-
var position = getScrollPosition();
|
|
1337
|
-
var shouldScroll = behavior.call(
|
|
1338
|
-
router,
|
|
1339
|
-
to,
|
|
1340
|
-
from,
|
|
1341
|
-
isPop ? position : null
|
|
1342
|
-
);
|
|
1343
|
-
if (!shouldScroll) {
|
|
1344
|
-
return;
|
|
1345
|
-
}
|
|
1346
|
-
if (typeof shouldScroll.then === "function") {
|
|
1347
|
-
shouldScroll.then(function(shouldScroll2) {
|
|
1348
|
-
scrollToPosition(shouldScroll2, position);
|
|
1349
|
-
}).catch(function(err) {
|
|
1350
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1351
|
-
assert(false, err.toString());
|
|
1352
|
-
}
|
|
1353
|
-
});
|
|
1354
|
-
} else {
|
|
1355
|
-
scrollToPosition(shouldScroll, position);
|
|
1356
|
-
}
|
|
1357
|
-
});
|
|
1358
|
-
}
|
|
1359
|
-
function saveScrollPosition() {
|
|
1360
|
-
var key = getStateKey();
|
|
1361
|
-
if (key) {
|
|
1362
|
-
positionStore[key] = {
|
|
1363
|
-
x: window.pageXOffset,
|
|
1364
|
-
y: window.pageYOffset
|
|
1365
|
-
};
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
function handlePopState(e) {
|
|
1369
|
-
saveScrollPosition();
|
|
1370
|
-
if (e.state && e.state.key) {
|
|
1371
|
-
setStateKey(e.state.key);
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
function getScrollPosition() {
|
|
1375
|
-
var key = getStateKey();
|
|
1376
|
-
if (key) {
|
|
1377
|
-
return positionStore[key];
|
|
1378
|
-
}
|
|
1379
|
-
}
|
|
1380
|
-
function getElementPosition(el, offset) {
|
|
1381
|
-
var docEl = document.documentElement;
|
|
1382
|
-
var docRect = docEl.getBoundingClientRect();
|
|
1383
|
-
var elRect = el.getBoundingClientRect();
|
|
1384
|
-
return {
|
|
1385
|
-
x: elRect.left - docRect.left - offset.x,
|
|
1386
|
-
y: elRect.top - docRect.top - offset.y
|
|
1387
|
-
};
|
|
1388
|
-
}
|
|
1389
|
-
function isValidPosition(obj) {
|
|
1390
|
-
return isNumber(obj.x) || isNumber(obj.y);
|
|
1391
|
-
}
|
|
1392
|
-
function normalizePosition(obj) {
|
|
1393
|
-
return {
|
|
1394
|
-
x: isNumber(obj.x) ? obj.x : window.pageXOffset,
|
|
1395
|
-
y: isNumber(obj.y) ? obj.y : window.pageYOffset
|
|
1396
|
-
};
|
|
1397
|
-
}
|
|
1398
|
-
function normalizeOffset(obj) {
|
|
1399
|
-
return {
|
|
1400
|
-
x: isNumber(obj.x) ? obj.x : 0,
|
|
1401
|
-
y: isNumber(obj.y) ? obj.y : 0
|
|
1402
|
-
};
|
|
1403
|
-
}
|
|
1404
|
-
function isNumber(v) {
|
|
1405
|
-
return typeof v === "number";
|
|
1406
|
-
}
|
|
1407
|
-
var hashStartsWithNumberRE = /^#\d/;
|
|
1408
|
-
function scrollToPosition(shouldScroll, position) {
|
|
1409
|
-
var isObject = typeof shouldScroll === "object";
|
|
1410
|
-
if (isObject && typeof shouldScroll.selector === "string") {
|
|
1411
|
-
var el = hashStartsWithNumberRE.test(shouldScroll.selector) ? document.getElementById(shouldScroll.selector.slice(1)) : document.querySelector(shouldScroll.selector);
|
|
1412
|
-
if (el) {
|
|
1413
|
-
var offset = shouldScroll.offset && typeof shouldScroll.offset === "object" ? shouldScroll.offset : {};
|
|
1414
|
-
offset = normalizeOffset(offset);
|
|
1415
|
-
position = getElementPosition(el, offset);
|
|
1416
|
-
} else if (isValidPosition(shouldScroll)) {
|
|
1417
|
-
position = normalizePosition(shouldScroll);
|
|
1418
|
-
}
|
|
1419
|
-
} else if (isObject && isValidPosition(shouldScroll)) {
|
|
1420
|
-
position = normalizePosition(shouldScroll);
|
|
1421
|
-
}
|
|
1422
|
-
if (position) {
|
|
1423
|
-
if ("scrollBehavior" in document.documentElement.style) {
|
|
1424
|
-
window.scrollTo({
|
|
1425
|
-
left: position.x,
|
|
1426
|
-
top: position.y,
|
|
1427
|
-
// $flow-disable-line
|
|
1428
|
-
behavior: shouldScroll.behavior
|
|
1429
|
-
});
|
|
1430
|
-
} else {
|
|
1431
|
-
window.scrollTo(position.x, position.y);
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
var supportsPushState = inBrowser && function() {
|
|
1436
|
-
var ua = window.navigator.userAgent;
|
|
1437
|
-
if ((ua.indexOf("Android 2.") !== -1 || ua.indexOf("Android 4.0") !== -1) && ua.indexOf("Mobile Safari") !== -1 && ua.indexOf("Chrome") === -1 && ua.indexOf("Windows Phone") === -1) {
|
|
1438
|
-
return false;
|
|
1439
|
-
}
|
|
1440
|
-
return window.history && typeof window.history.pushState === "function";
|
|
1441
|
-
}();
|
|
1442
|
-
function pushState(url, replace2) {
|
|
1443
|
-
saveScrollPosition();
|
|
1444
|
-
var history = window.history;
|
|
1445
|
-
try {
|
|
1446
|
-
if (replace2) {
|
|
1447
|
-
var stateCopy = extend({}, history.state);
|
|
1448
|
-
stateCopy.key = getStateKey();
|
|
1449
|
-
history.replaceState(stateCopy, "", url);
|
|
1450
|
-
} else {
|
|
1451
|
-
history.pushState({ key: setStateKey(genStateKey()) }, "", url);
|
|
1452
|
-
}
|
|
1453
|
-
} catch (e) {
|
|
1454
|
-
window.location[replace2 ? "replace" : "assign"](url);
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
function replaceState(url) {
|
|
1458
|
-
pushState(url, true);
|
|
1459
|
-
}
|
|
1460
|
-
var NavigationFailureType = {
|
|
1461
|
-
redirected: 2,
|
|
1462
|
-
aborted: 4,
|
|
1463
|
-
cancelled: 8,
|
|
1464
|
-
duplicated: 16
|
|
1465
|
-
};
|
|
1466
|
-
function createNavigationRedirectedError(from, to) {
|
|
1467
|
-
return createRouterError(
|
|
1468
|
-
from,
|
|
1469
|
-
to,
|
|
1470
|
-
NavigationFailureType.redirected,
|
|
1471
|
-
'Redirected when going from "' + from.fullPath + '" to "' + stringifyRoute(
|
|
1472
|
-
to
|
|
1473
|
-
) + '" via a navigation guard.'
|
|
1474
|
-
);
|
|
1475
|
-
}
|
|
1476
|
-
function createNavigationDuplicatedError(from, to) {
|
|
1477
|
-
var error = createRouterError(
|
|
1478
|
-
from,
|
|
1479
|
-
to,
|
|
1480
|
-
NavigationFailureType.duplicated,
|
|
1481
|
-
'Avoided redundant navigation to current location: "' + from.fullPath + '".'
|
|
1482
|
-
);
|
|
1483
|
-
error.name = "NavigationDuplicated";
|
|
1484
|
-
return error;
|
|
1485
|
-
}
|
|
1486
|
-
function createNavigationCancelledError(from, to) {
|
|
1487
|
-
return createRouterError(
|
|
1488
|
-
from,
|
|
1489
|
-
to,
|
|
1490
|
-
NavigationFailureType.cancelled,
|
|
1491
|
-
'Navigation cancelled from "' + from.fullPath + '" to "' + to.fullPath + '" with a new navigation.'
|
|
1492
|
-
);
|
|
1493
|
-
}
|
|
1494
|
-
function createNavigationAbortedError(from, to) {
|
|
1495
|
-
return createRouterError(
|
|
1496
|
-
from,
|
|
1497
|
-
to,
|
|
1498
|
-
NavigationFailureType.aborted,
|
|
1499
|
-
'Navigation aborted from "' + from.fullPath + '" to "' + to.fullPath + '" via a navigation guard.'
|
|
1500
|
-
);
|
|
1501
|
-
}
|
|
1502
|
-
function createRouterError(from, to, type, message) {
|
|
1503
|
-
var error = new Error(message);
|
|
1504
|
-
error._isRouter = true;
|
|
1505
|
-
error.from = from;
|
|
1506
|
-
error.to = to;
|
|
1507
|
-
error.type = type;
|
|
1508
|
-
return error;
|
|
1509
|
-
}
|
|
1510
|
-
var propertiesToLog = ["params", "query", "hash"];
|
|
1511
|
-
function stringifyRoute(to) {
|
|
1512
|
-
if (typeof to === "string") {
|
|
1513
|
-
return to;
|
|
1514
|
-
}
|
|
1515
|
-
if ("path" in to) {
|
|
1516
|
-
return to.path;
|
|
1517
|
-
}
|
|
1518
|
-
var location = {};
|
|
1519
|
-
propertiesToLog.forEach(function(key) {
|
|
1520
|
-
if (key in to) {
|
|
1521
|
-
location[key] = to[key];
|
|
1522
|
-
}
|
|
1523
|
-
});
|
|
1524
|
-
return JSON.stringify(location, null, 2);
|
|
1525
|
-
}
|
|
1526
|
-
function isError(err) {
|
|
1527
|
-
return Object.prototype.toString.call(err).indexOf("Error") > -1;
|
|
1528
|
-
}
|
|
1529
|
-
function isNavigationFailure(err, errorType) {
|
|
1530
|
-
return isError(err) && err._isRouter && (errorType == null || err.type === errorType);
|
|
1531
|
-
}
|
|
1532
|
-
function runQueue(queue, fn, cb) {
|
|
1533
|
-
var step = function(index) {
|
|
1534
|
-
if (index >= queue.length) {
|
|
1535
|
-
cb();
|
|
1536
|
-
} else {
|
|
1537
|
-
if (queue[index]) {
|
|
1538
|
-
fn(queue[index], function() {
|
|
1539
|
-
step(index + 1);
|
|
1540
|
-
});
|
|
1541
|
-
} else {
|
|
1542
|
-
step(index + 1);
|
|
1543
|
-
}
|
|
1544
|
-
}
|
|
1545
|
-
};
|
|
1546
|
-
step(0);
|
|
1547
|
-
}
|
|
1548
|
-
function resolveAsyncComponents(matched) {
|
|
1549
|
-
return function(to, from, next) {
|
|
1550
|
-
var hasAsync = false;
|
|
1551
|
-
var pending = 0;
|
|
1552
|
-
var error = null;
|
|
1553
|
-
flatMapComponents(matched, function(def, _, match2, key) {
|
|
1554
|
-
if (typeof def === "function" && def.cid === void 0) {
|
|
1555
|
-
hasAsync = true;
|
|
1556
|
-
pending++;
|
|
1557
|
-
var resolve2 = once(function(resolvedDef) {
|
|
1558
|
-
if (isESModule(resolvedDef)) {
|
|
1559
|
-
resolvedDef = resolvedDef.default;
|
|
1560
|
-
}
|
|
1561
|
-
def.resolved = typeof resolvedDef === "function" ? resolvedDef : _Vue.extend(resolvedDef);
|
|
1562
|
-
match2.components[key] = resolvedDef;
|
|
1563
|
-
pending--;
|
|
1564
|
-
if (pending <= 0) {
|
|
1565
|
-
next();
|
|
1566
|
-
}
|
|
1567
|
-
});
|
|
1568
|
-
var reject = once(function(reason) {
|
|
1569
|
-
var msg = "Failed to resolve async component " + key + ": " + reason;
|
|
1570
|
-
process.env.NODE_ENV !== "production" && warn(false, msg);
|
|
1571
|
-
if (!error) {
|
|
1572
|
-
error = isError(reason) ? reason : new Error(msg);
|
|
1573
|
-
next(error);
|
|
1574
|
-
}
|
|
1575
|
-
});
|
|
1576
|
-
var res;
|
|
1577
|
-
try {
|
|
1578
|
-
res = def(resolve2, reject);
|
|
1579
|
-
} catch (e) {
|
|
1580
|
-
reject(e);
|
|
1581
|
-
}
|
|
1582
|
-
if (res) {
|
|
1583
|
-
if (typeof res.then === "function") {
|
|
1584
|
-
res.then(resolve2, reject);
|
|
1585
|
-
} else {
|
|
1586
|
-
var comp = res.component;
|
|
1587
|
-
if (comp && typeof comp.then === "function") {
|
|
1588
|
-
comp.then(resolve2, reject);
|
|
1589
|
-
}
|
|
1590
|
-
}
|
|
1591
|
-
}
|
|
1592
|
-
}
|
|
1593
|
-
});
|
|
1594
|
-
if (!hasAsync) {
|
|
1595
|
-
next();
|
|
1596
|
-
}
|
|
1597
|
-
};
|
|
1598
|
-
}
|
|
1599
|
-
function flatMapComponents(matched, fn) {
|
|
1600
|
-
return flatten(matched.map(function(m) {
|
|
1601
|
-
return Object.keys(m.components).map(function(key) {
|
|
1602
|
-
return fn(
|
|
1603
|
-
m.components[key],
|
|
1604
|
-
m.instances[key],
|
|
1605
|
-
m,
|
|
1606
|
-
key
|
|
1607
|
-
);
|
|
1608
|
-
});
|
|
1609
|
-
}));
|
|
1610
|
-
}
|
|
1611
|
-
function flatten(arr) {
|
|
1612
|
-
return Array.prototype.concat.apply([], arr);
|
|
1613
|
-
}
|
|
1614
|
-
var hasSymbol = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol";
|
|
1615
|
-
function isESModule(obj) {
|
|
1616
|
-
return obj.__esModule || hasSymbol && obj[Symbol.toStringTag] === "Module";
|
|
1617
|
-
}
|
|
1618
|
-
function once(fn) {
|
|
1619
|
-
var called = false;
|
|
1620
|
-
return function() {
|
|
1621
|
-
var args = [], len = arguments.length;
|
|
1622
|
-
while (len--)
|
|
1623
|
-
args[len] = arguments[len];
|
|
1624
|
-
if (called) {
|
|
1625
|
-
return;
|
|
1626
|
-
}
|
|
1627
|
-
called = true;
|
|
1628
|
-
return fn.apply(this, args);
|
|
1629
|
-
};
|
|
1630
|
-
}
|
|
1631
|
-
var History = function History2(router, base) {
|
|
1632
|
-
this.router = router;
|
|
1633
|
-
this.base = normalizeBase(base);
|
|
1634
|
-
this.current = START;
|
|
1635
|
-
this.pending = null;
|
|
1636
|
-
this.ready = false;
|
|
1637
|
-
this.readyCbs = [];
|
|
1638
|
-
this.readyErrorCbs = [];
|
|
1639
|
-
this.errorCbs = [];
|
|
1640
|
-
this.listeners = [];
|
|
1641
|
-
};
|
|
1642
|
-
History.prototype.listen = function listen(cb) {
|
|
1643
|
-
this.cb = cb;
|
|
1644
|
-
};
|
|
1645
|
-
History.prototype.onReady = function onReady(cb, errorCb) {
|
|
1646
|
-
if (this.ready) {
|
|
1647
|
-
cb();
|
|
1648
|
-
} else {
|
|
1649
|
-
this.readyCbs.push(cb);
|
|
1650
|
-
if (errorCb) {
|
|
1651
|
-
this.readyErrorCbs.push(errorCb);
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
|
-
};
|
|
1655
|
-
History.prototype.onError = function onError(errorCb) {
|
|
1656
|
-
this.errorCbs.push(errorCb);
|
|
1657
|
-
};
|
|
1658
|
-
History.prototype.transitionTo = function transitionTo(location, onComplete, onAbort) {
|
|
1659
|
-
var this$1$1 = this;
|
|
1660
|
-
var route;
|
|
1661
|
-
try {
|
|
1662
|
-
route = this.router.match(location, this.current);
|
|
1663
|
-
} catch (e) {
|
|
1664
|
-
this.errorCbs.forEach(function(cb) {
|
|
1665
|
-
cb(e);
|
|
1666
|
-
});
|
|
1667
|
-
throw e;
|
|
1668
|
-
}
|
|
1669
|
-
var prev = this.current;
|
|
1670
|
-
this.confirmTransition(
|
|
1671
|
-
route,
|
|
1672
|
-
function() {
|
|
1673
|
-
this$1$1.updateRoute(route);
|
|
1674
|
-
onComplete && onComplete(route);
|
|
1675
|
-
this$1$1.ensureURL();
|
|
1676
|
-
this$1$1.router.afterHooks.forEach(function(hook) {
|
|
1677
|
-
hook && hook(route, prev);
|
|
1678
|
-
});
|
|
1679
|
-
if (!this$1$1.ready) {
|
|
1680
|
-
this$1$1.ready = true;
|
|
1681
|
-
this$1$1.readyCbs.forEach(function(cb) {
|
|
1682
|
-
cb(route);
|
|
1683
|
-
});
|
|
1684
|
-
}
|
|
1685
|
-
},
|
|
1686
|
-
function(err) {
|
|
1687
|
-
if (onAbort) {
|
|
1688
|
-
onAbort(err);
|
|
1689
|
-
}
|
|
1690
|
-
if (err && !this$1$1.ready) {
|
|
1691
|
-
if (!isNavigationFailure(err, NavigationFailureType.redirected) || prev !== START) {
|
|
1692
|
-
this$1$1.ready = true;
|
|
1693
|
-
this$1$1.readyErrorCbs.forEach(function(cb) {
|
|
1694
|
-
cb(err);
|
|
1695
|
-
});
|
|
1696
|
-
}
|
|
1697
|
-
}
|
|
1698
|
-
}
|
|
1699
|
-
);
|
|
1700
|
-
};
|
|
1701
|
-
History.prototype.confirmTransition = function confirmTransition(route, onComplete, onAbort) {
|
|
1702
|
-
var this$1$1 = this;
|
|
1703
|
-
var current = this.current;
|
|
1704
|
-
this.pending = route;
|
|
1705
|
-
var abort = function(err) {
|
|
1706
|
-
if (!isNavigationFailure(err) && isError(err)) {
|
|
1707
|
-
if (this$1$1.errorCbs.length) {
|
|
1708
|
-
this$1$1.errorCbs.forEach(function(cb) {
|
|
1709
|
-
cb(err);
|
|
1710
|
-
});
|
|
1711
|
-
} else {
|
|
1712
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1713
|
-
warn(false, "uncaught error during route navigation:");
|
|
1714
|
-
}
|
|
1715
|
-
console.error(err);
|
|
1716
|
-
}
|
|
1717
|
-
}
|
|
1718
|
-
onAbort && onAbort(err);
|
|
1719
|
-
};
|
|
1720
|
-
var lastRouteIndex = route.matched.length - 1;
|
|
1721
|
-
var lastCurrentIndex = current.matched.length - 1;
|
|
1722
|
-
if (isSameRoute(route, current) && // in the case the route map has been dynamically appended to
|
|
1723
|
-
lastRouteIndex === lastCurrentIndex && route.matched[lastRouteIndex] === current.matched[lastCurrentIndex]) {
|
|
1724
|
-
this.ensureURL();
|
|
1725
|
-
if (route.hash) {
|
|
1726
|
-
handleScroll(this.router, current, route, false);
|
|
1727
|
-
}
|
|
1728
|
-
return abort(createNavigationDuplicatedError(current, route));
|
|
1729
|
-
}
|
|
1730
|
-
var ref2 = resolveQueue(
|
|
1731
|
-
this.current.matched,
|
|
1732
|
-
route.matched
|
|
1733
|
-
);
|
|
1734
|
-
var updated = ref2.updated;
|
|
1735
|
-
var deactivated = ref2.deactivated;
|
|
1736
|
-
var activated = ref2.activated;
|
|
1737
|
-
var queue = [].concat(
|
|
1738
|
-
// in-component leave guards
|
|
1739
|
-
extractLeaveGuards(deactivated),
|
|
1740
|
-
// global before hooks
|
|
1741
|
-
this.router.beforeHooks,
|
|
1742
|
-
// in-component update hooks
|
|
1743
|
-
extractUpdateHooks(updated),
|
|
1744
|
-
// in-config enter guards
|
|
1745
|
-
activated.map(function(m) {
|
|
1746
|
-
return m.beforeEnter;
|
|
1747
|
-
}),
|
|
1748
|
-
// async components
|
|
1749
|
-
resolveAsyncComponents(activated)
|
|
1750
|
-
);
|
|
1751
|
-
var iterator = function(hook, next) {
|
|
1752
|
-
if (this$1$1.pending !== route) {
|
|
1753
|
-
return abort(createNavigationCancelledError(current, route));
|
|
1754
|
-
}
|
|
1755
|
-
try {
|
|
1756
|
-
hook(route, current, function(to) {
|
|
1757
|
-
if (to === false) {
|
|
1758
|
-
this$1$1.ensureURL(true);
|
|
1759
|
-
abort(createNavigationAbortedError(current, route));
|
|
1760
|
-
} else if (isError(to)) {
|
|
1761
|
-
this$1$1.ensureURL(true);
|
|
1762
|
-
abort(to);
|
|
1763
|
-
} else if (typeof to === "string" || typeof to === "object" && (typeof to.path === "string" || typeof to.name === "string")) {
|
|
1764
|
-
abort(createNavigationRedirectedError(current, route));
|
|
1765
|
-
if (typeof to === "object" && to.replace) {
|
|
1766
|
-
this$1$1.replace(to);
|
|
1767
|
-
} else {
|
|
1768
|
-
this$1$1.push(to);
|
|
1769
|
-
}
|
|
1770
|
-
} else {
|
|
1771
|
-
next(to);
|
|
1772
|
-
}
|
|
1773
|
-
});
|
|
1774
|
-
} catch (e) {
|
|
1775
|
-
abort(e);
|
|
1776
|
-
}
|
|
1777
|
-
};
|
|
1778
|
-
runQueue(queue, iterator, function() {
|
|
1779
|
-
var enterGuards = extractEnterGuards(activated);
|
|
1780
|
-
var queue2 = enterGuards.concat(this$1$1.router.resolveHooks);
|
|
1781
|
-
runQueue(queue2, iterator, function() {
|
|
1782
|
-
if (this$1$1.pending !== route) {
|
|
1783
|
-
return abort(createNavigationCancelledError(current, route));
|
|
1784
|
-
}
|
|
1785
|
-
this$1$1.pending = null;
|
|
1786
|
-
onComplete(route);
|
|
1787
|
-
if (this$1$1.router.app) {
|
|
1788
|
-
this$1$1.router.app.$nextTick(function() {
|
|
1789
|
-
handleRouteEntered(route);
|
|
1790
|
-
});
|
|
1791
|
-
}
|
|
1792
|
-
});
|
|
1793
|
-
});
|
|
1794
|
-
};
|
|
1795
|
-
History.prototype.updateRoute = function updateRoute(route) {
|
|
1796
|
-
this.current = route;
|
|
1797
|
-
this.cb && this.cb(route);
|
|
1798
|
-
};
|
|
1799
|
-
History.prototype.setupListeners = function setupListeners() {
|
|
1800
|
-
};
|
|
1801
|
-
History.prototype.teardown = function teardown() {
|
|
1802
|
-
this.listeners.forEach(function(cleanupListener) {
|
|
1803
|
-
cleanupListener();
|
|
1804
|
-
});
|
|
1805
|
-
this.listeners = [];
|
|
1806
|
-
this.current = START;
|
|
1807
|
-
this.pending = null;
|
|
1808
|
-
};
|
|
1809
|
-
function normalizeBase(base) {
|
|
1810
|
-
if (!base) {
|
|
1811
|
-
if (inBrowser) {
|
|
1812
|
-
var baseEl = document.querySelector("base");
|
|
1813
|
-
base = baseEl && baseEl.getAttribute("href") || "/";
|
|
1814
|
-
base = base.replace(/^https?:\/\/[^\/]+/, "");
|
|
1815
|
-
} else {
|
|
1816
|
-
base = "/";
|
|
1817
|
-
}
|
|
1818
|
-
}
|
|
1819
|
-
if (base.charAt(0) !== "/") {
|
|
1820
|
-
base = "/" + base;
|
|
1821
|
-
}
|
|
1822
|
-
return base.replace(/\/$/, "");
|
|
1823
|
-
}
|
|
1824
|
-
function resolveQueue(current, next) {
|
|
1825
|
-
var i;
|
|
1826
|
-
var max = Math.max(current.length, next.length);
|
|
1827
|
-
for (i = 0; i < max; i++) {
|
|
1828
|
-
if (current[i] !== next[i]) {
|
|
1829
|
-
break;
|
|
1830
|
-
}
|
|
1831
|
-
}
|
|
1832
|
-
return {
|
|
1833
|
-
updated: next.slice(0, i),
|
|
1834
|
-
activated: next.slice(i),
|
|
1835
|
-
deactivated: current.slice(i)
|
|
1836
|
-
};
|
|
1837
|
-
}
|
|
1838
|
-
function extractGuards(records, name, bind, reverse) {
|
|
1839
|
-
var guards = flatMapComponents(records, function(def, instance, match2, key) {
|
|
1840
|
-
var guard = extractGuard(def, name);
|
|
1841
|
-
if (guard) {
|
|
1842
|
-
return Array.isArray(guard) ? guard.map(function(guard2) {
|
|
1843
|
-
return bind(guard2, instance, match2, key);
|
|
1844
|
-
}) : bind(guard, instance, match2, key);
|
|
1845
|
-
}
|
|
1846
|
-
});
|
|
1847
|
-
return flatten(reverse ? guards.reverse() : guards);
|
|
1848
|
-
}
|
|
1849
|
-
function extractGuard(def, key) {
|
|
1850
|
-
if (typeof def !== "function") {
|
|
1851
|
-
def = _Vue.extend(def);
|
|
1852
|
-
}
|
|
1853
|
-
return def.options[key];
|
|
1854
|
-
}
|
|
1855
|
-
function extractLeaveGuards(deactivated) {
|
|
1856
|
-
return extractGuards(deactivated, "beforeRouteLeave", bindGuard, true);
|
|
1857
|
-
}
|
|
1858
|
-
function extractUpdateHooks(updated) {
|
|
1859
|
-
return extractGuards(updated, "beforeRouteUpdate", bindGuard);
|
|
1860
|
-
}
|
|
1861
|
-
function bindGuard(guard, instance) {
|
|
1862
|
-
if (instance) {
|
|
1863
|
-
return function boundRouteGuard() {
|
|
1864
|
-
return guard.apply(instance, arguments);
|
|
1865
|
-
};
|
|
1866
|
-
}
|
|
1867
|
-
}
|
|
1868
|
-
function extractEnterGuards(activated) {
|
|
1869
|
-
return extractGuards(
|
|
1870
|
-
activated,
|
|
1871
|
-
"beforeRouteEnter",
|
|
1872
|
-
function(guard, _, match2, key) {
|
|
1873
|
-
return bindEnterGuard(guard, match2, key);
|
|
1874
|
-
}
|
|
1875
|
-
);
|
|
1876
|
-
}
|
|
1877
|
-
function bindEnterGuard(guard, match2, key) {
|
|
1878
|
-
return function routeEnterGuard(to, from, next) {
|
|
1879
|
-
return guard(to, from, function(cb) {
|
|
1880
|
-
if (typeof cb === "function") {
|
|
1881
|
-
if (!match2.enteredCbs[key]) {
|
|
1882
|
-
match2.enteredCbs[key] = [];
|
|
1883
|
-
}
|
|
1884
|
-
match2.enteredCbs[key].push(cb);
|
|
1885
|
-
}
|
|
1886
|
-
next(cb);
|
|
1887
|
-
});
|
|
1888
|
-
};
|
|
1889
|
-
}
|
|
1890
|
-
var HTML5History = /* @__PURE__ */ function(History3) {
|
|
1891
|
-
function HTML5History2(router, base) {
|
|
1892
|
-
History3.call(this, router, base);
|
|
1893
|
-
this._startLocation = getLocation(this.base);
|
|
1894
|
-
}
|
|
1895
|
-
if (History3)
|
|
1896
|
-
HTML5History2.__proto__ = History3;
|
|
1897
|
-
HTML5History2.prototype = Object.create(History3 && History3.prototype);
|
|
1898
|
-
HTML5History2.prototype.constructor = HTML5History2;
|
|
1899
|
-
HTML5History2.prototype.setupListeners = function setupListeners2() {
|
|
1900
|
-
var this$1$1 = this;
|
|
1901
|
-
if (this.listeners.length > 0) {
|
|
1902
|
-
return;
|
|
1903
|
-
}
|
|
1904
|
-
var router = this.router;
|
|
1905
|
-
var expectScroll = router.options.scrollBehavior;
|
|
1906
|
-
var supportsScroll = supportsPushState && expectScroll;
|
|
1907
|
-
if (supportsScroll) {
|
|
1908
|
-
this.listeners.push(setupScroll());
|
|
1909
|
-
}
|
|
1910
|
-
var handleRoutingEvent = function() {
|
|
1911
|
-
var current = this$1$1.current;
|
|
1912
|
-
var location = getLocation(this$1$1.base);
|
|
1913
|
-
if (this$1$1.current === START && location === this$1$1._startLocation) {
|
|
1914
|
-
return;
|
|
1915
|
-
}
|
|
1916
|
-
this$1$1.transitionTo(location, function(route) {
|
|
1917
|
-
if (supportsScroll) {
|
|
1918
|
-
handleScroll(router, route, current, true);
|
|
1919
|
-
}
|
|
1920
|
-
});
|
|
1921
|
-
};
|
|
1922
|
-
window.addEventListener("popstate", handleRoutingEvent);
|
|
1923
|
-
this.listeners.push(function() {
|
|
1924
|
-
window.removeEventListener("popstate", handleRoutingEvent);
|
|
1925
|
-
});
|
|
1926
|
-
};
|
|
1927
|
-
HTML5History2.prototype.go = function go2(n) {
|
|
1928
|
-
window.history.go(n);
|
|
1929
|
-
};
|
|
1930
|
-
HTML5History2.prototype.push = function push2(location, onComplete, onAbort) {
|
|
1931
|
-
var this$1$1 = this;
|
|
1932
|
-
var ref2 = this;
|
|
1933
|
-
var fromRoute = ref2.current;
|
|
1934
|
-
this.transitionTo(location, function(route) {
|
|
1935
|
-
pushState(cleanPath(this$1$1.base + route.fullPath));
|
|
1936
|
-
handleScroll(this$1$1.router, route, fromRoute, false);
|
|
1937
|
-
onComplete && onComplete(route);
|
|
1938
|
-
}, onAbort);
|
|
1939
|
-
};
|
|
1940
|
-
HTML5History2.prototype.replace = function replace2(location, onComplete, onAbort) {
|
|
1941
|
-
var this$1$1 = this;
|
|
1942
|
-
var ref2 = this;
|
|
1943
|
-
var fromRoute = ref2.current;
|
|
1944
|
-
this.transitionTo(location, function(route) {
|
|
1945
|
-
replaceState(cleanPath(this$1$1.base + route.fullPath));
|
|
1946
|
-
handleScroll(this$1$1.router, route, fromRoute, false);
|
|
1947
|
-
onComplete && onComplete(route);
|
|
1948
|
-
}, onAbort);
|
|
1949
|
-
};
|
|
1950
|
-
HTML5History2.prototype.ensureURL = function ensureURL(push2) {
|
|
1951
|
-
if (getLocation(this.base) !== this.current.fullPath) {
|
|
1952
|
-
var current = cleanPath(this.base + this.current.fullPath);
|
|
1953
|
-
push2 ? pushState(current) : replaceState(current);
|
|
1954
|
-
}
|
|
1955
|
-
};
|
|
1956
|
-
HTML5History2.prototype.getCurrentLocation = function getCurrentLocation() {
|
|
1957
|
-
return getLocation(this.base);
|
|
1958
|
-
};
|
|
1959
|
-
return HTML5History2;
|
|
1960
|
-
}(History);
|
|
1961
|
-
function getLocation(base) {
|
|
1962
|
-
var path = window.location.pathname;
|
|
1963
|
-
var pathLowerCase = path.toLowerCase();
|
|
1964
|
-
var baseLowerCase = base.toLowerCase();
|
|
1965
|
-
if (base && (pathLowerCase === baseLowerCase || pathLowerCase.indexOf(cleanPath(baseLowerCase + "/")) === 0)) {
|
|
1966
|
-
path = path.slice(base.length);
|
|
1967
|
-
}
|
|
1968
|
-
return (path || "/") + window.location.search + window.location.hash;
|
|
1969
|
-
}
|
|
1970
|
-
var HashHistory = /* @__PURE__ */ function(History3) {
|
|
1971
|
-
function HashHistory2(router, base, fallback) {
|
|
1972
|
-
History3.call(this, router, base);
|
|
1973
|
-
if (fallback && checkFallback(this.base)) {
|
|
1974
|
-
return;
|
|
1975
|
-
}
|
|
1976
|
-
ensureSlash();
|
|
1977
|
-
}
|
|
1978
|
-
if (History3)
|
|
1979
|
-
HashHistory2.__proto__ = History3;
|
|
1980
|
-
HashHistory2.prototype = Object.create(History3 && History3.prototype);
|
|
1981
|
-
HashHistory2.prototype.constructor = HashHistory2;
|
|
1982
|
-
HashHistory2.prototype.setupListeners = function setupListeners2() {
|
|
1983
|
-
var this$1$1 = this;
|
|
1984
|
-
if (this.listeners.length > 0) {
|
|
1985
|
-
return;
|
|
1986
|
-
}
|
|
1987
|
-
var router = this.router;
|
|
1988
|
-
var expectScroll = router.options.scrollBehavior;
|
|
1989
|
-
var supportsScroll = supportsPushState && expectScroll;
|
|
1990
|
-
if (supportsScroll) {
|
|
1991
|
-
this.listeners.push(setupScroll());
|
|
1992
|
-
}
|
|
1993
|
-
var handleRoutingEvent = function() {
|
|
1994
|
-
var current = this$1$1.current;
|
|
1995
|
-
if (!ensureSlash()) {
|
|
1996
|
-
return;
|
|
1997
|
-
}
|
|
1998
|
-
this$1$1.transitionTo(getHash(), function(route) {
|
|
1999
|
-
if (supportsScroll) {
|
|
2000
|
-
handleScroll(this$1$1.router, route, current, true);
|
|
2001
|
-
}
|
|
2002
|
-
if (!supportsPushState) {
|
|
2003
|
-
replaceHash(route.fullPath);
|
|
2004
|
-
}
|
|
2005
|
-
});
|
|
2006
|
-
};
|
|
2007
|
-
var eventType = supportsPushState ? "popstate" : "hashchange";
|
|
2008
|
-
window.addEventListener(
|
|
2009
|
-
eventType,
|
|
2010
|
-
handleRoutingEvent
|
|
2011
|
-
);
|
|
2012
|
-
this.listeners.push(function() {
|
|
2013
|
-
window.removeEventListener(eventType, handleRoutingEvent);
|
|
2014
|
-
});
|
|
2015
|
-
};
|
|
2016
|
-
HashHistory2.prototype.push = function push2(location, onComplete, onAbort) {
|
|
2017
|
-
var this$1$1 = this;
|
|
2018
|
-
var ref2 = this;
|
|
2019
|
-
var fromRoute = ref2.current;
|
|
2020
|
-
this.transitionTo(
|
|
2021
|
-
location,
|
|
2022
|
-
function(route) {
|
|
2023
|
-
pushHash(route.fullPath);
|
|
2024
|
-
handleScroll(this$1$1.router, route, fromRoute, false);
|
|
2025
|
-
onComplete && onComplete(route);
|
|
2026
|
-
},
|
|
2027
|
-
onAbort
|
|
2028
|
-
);
|
|
2029
|
-
};
|
|
2030
|
-
HashHistory2.prototype.replace = function replace2(location, onComplete, onAbort) {
|
|
2031
|
-
var this$1$1 = this;
|
|
2032
|
-
var ref2 = this;
|
|
2033
|
-
var fromRoute = ref2.current;
|
|
2034
|
-
this.transitionTo(
|
|
2035
|
-
location,
|
|
2036
|
-
function(route) {
|
|
2037
|
-
replaceHash(route.fullPath);
|
|
2038
|
-
handleScroll(this$1$1.router, route, fromRoute, false);
|
|
2039
|
-
onComplete && onComplete(route);
|
|
2040
|
-
},
|
|
2041
|
-
onAbort
|
|
2042
|
-
);
|
|
2043
|
-
};
|
|
2044
|
-
HashHistory2.prototype.go = function go2(n) {
|
|
2045
|
-
window.history.go(n);
|
|
2046
|
-
};
|
|
2047
|
-
HashHistory2.prototype.ensureURL = function ensureURL(push2) {
|
|
2048
|
-
var current = this.current.fullPath;
|
|
2049
|
-
if (getHash() !== current) {
|
|
2050
|
-
push2 ? pushHash(current) : replaceHash(current);
|
|
2051
|
-
}
|
|
2052
|
-
};
|
|
2053
|
-
HashHistory2.prototype.getCurrentLocation = function getCurrentLocation() {
|
|
2054
|
-
return getHash();
|
|
2055
|
-
};
|
|
2056
|
-
return HashHistory2;
|
|
2057
|
-
}(History);
|
|
2058
|
-
function checkFallback(base) {
|
|
2059
|
-
var location = getLocation(base);
|
|
2060
|
-
if (!/^\/#/.test(location)) {
|
|
2061
|
-
window.location.replace(cleanPath(base + "/#" + location));
|
|
2062
|
-
return true;
|
|
2063
|
-
}
|
|
2064
|
-
}
|
|
2065
|
-
function ensureSlash() {
|
|
2066
|
-
var path = getHash();
|
|
2067
|
-
if (path.charAt(0) === "/") {
|
|
2068
|
-
return true;
|
|
2069
|
-
}
|
|
2070
|
-
replaceHash("/" + path);
|
|
2071
|
-
return false;
|
|
2072
|
-
}
|
|
2073
|
-
function getHash() {
|
|
2074
|
-
var href = window.location.href;
|
|
2075
|
-
var index = href.indexOf("#");
|
|
2076
|
-
if (index < 0) {
|
|
2077
|
-
return "";
|
|
2078
|
-
}
|
|
2079
|
-
href = href.slice(index + 1);
|
|
2080
|
-
return href;
|
|
2081
|
-
}
|
|
2082
|
-
function getUrl(path) {
|
|
2083
|
-
var href = window.location.href;
|
|
2084
|
-
var i = href.indexOf("#");
|
|
2085
|
-
var base = i >= 0 ? href.slice(0, i) : href;
|
|
2086
|
-
return base + "#" + path;
|
|
2087
|
-
}
|
|
2088
|
-
function pushHash(path) {
|
|
2089
|
-
if (supportsPushState) {
|
|
2090
|
-
pushState(getUrl(path));
|
|
2091
|
-
} else {
|
|
2092
|
-
window.location.hash = path;
|
|
2093
|
-
}
|
|
2094
|
-
}
|
|
2095
|
-
function replaceHash(path) {
|
|
2096
|
-
if (supportsPushState) {
|
|
2097
|
-
replaceState(getUrl(path));
|
|
2098
|
-
} else {
|
|
2099
|
-
window.location.replace(getUrl(path));
|
|
2100
|
-
}
|
|
2101
|
-
}
|
|
2102
|
-
var AbstractHistory = /* @__PURE__ */ function(History3) {
|
|
2103
|
-
function AbstractHistory2(router, base) {
|
|
2104
|
-
History3.call(this, router, base);
|
|
2105
|
-
this.stack = [];
|
|
2106
|
-
this.index = -1;
|
|
2107
|
-
}
|
|
2108
|
-
if (History3)
|
|
2109
|
-
AbstractHistory2.__proto__ = History3;
|
|
2110
|
-
AbstractHistory2.prototype = Object.create(History3 && History3.prototype);
|
|
2111
|
-
AbstractHistory2.prototype.constructor = AbstractHistory2;
|
|
2112
|
-
AbstractHistory2.prototype.push = function push2(location, onComplete, onAbort) {
|
|
2113
|
-
var this$1$1 = this;
|
|
2114
|
-
this.transitionTo(
|
|
2115
|
-
location,
|
|
2116
|
-
function(route) {
|
|
2117
|
-
this$1$1.stack = this$1$1.stack.slice(0, this$1$1.index + 1).concat(route);
|
|
2118
|
-
this$1$1.index++;
|
|
2119
|
-
onComplete && onComplete(route);
|
|
2120
|
-
},
|
|
2121
|
-
onAbort
|
|
2122
|
-
);
|
|
2123
|
-
};
|
|
2124
|
-
AbstractHistory2.prototype.replace = function replace2(location, onComplete, onAbort) {
|
|
2125
|
-
var this$1$1 = this;
|
|
2126
|
-
this.transitionTo(
|
|
2127
|
-
location,
|
|
2128
|
-
function(route) {
|
|
2129
|
-
this$1$1.stack = this$1$1.stack.slice(0, this$1$1.index).concat(route);
|
|
2130
|
-
onComplete && onComplete(route);
|
|
2131
|
-
},
|
|
2132
|
-
onAbort
|
|
2133
|
-
);
|
|
2134
|
-
};
|
|
2135
|
-
AbstractHistory2.prototype.go = function go2(n) {
|
|
2136
|
-
var this$1$1 = this;
|
|
2137
|
-
var targetIndex = this.index + n;
|
|
2138
|
-
if (targetIndex < 0 || targetIndex >= this.stack.length) {
|
|
2139
|
-
return;
|
|
2140
|
-
}
|
|
2141
|
-
var route = this.stack[targetIndex];
|
|
2142
|
-
this.confirmTransition(
|
|
2143
|
-
route,
|
|
2144
|
-
function() {
|
|
2145
|
-
var prev = this$1$1.current;
|
|
2146
|
-
this$1$1.index = targetIndex;
|
|
2147
|
-
this$1$1.updateRoute(route);
|
|
2148
|
-
this$1$1.router.afterHooks.forEach(function(hook) {
|
|
2149
|
-
hook && hook(route, prev);
|
|
2150
|
-
});
|
|
2151
|
-
},
|
|
2152
|
-
function(err) {
|
|
2153
|
-
if (isNavigationFailure(err, NavigationFailureType.duplicated)) {
|
|
2154
|
-
this$1$1.index = targetIndex;
|
|
2155
|
-
}
|
|
2156
|
-
}
|
|
2157
|
-
);
|
|
2158
|
-
};
|
|
2159
|
-
AbstractHistory2.prototype.getCurrentLocation = function getCurrentLocation() {
|
|
2160
|
-
var current = this.stack[this.stack.length - 1];
|
|
2161
|
-
return current ? current.fullPath : "/";
|
|
2162
|
-
};
|
|
2163
|
-
AbstractHistory2.prototype.ensureURL = function ensureURL() {
|
|
2164
|
-
};
|
|
2165
|
-
return AbstractHistory2;
|
|
2166
|
-
}(History);
|
|
2167
|
-
var VueRouter = function VueRouter2(options) {
|
|
2168
|
-
if (options === void 0)
|
|
2169
|
-
options = {};
|
|
2170
|
-
if (process.env.NODE_ENV !== "production") {
|
|
2171
|
-
warn(this instanceof VueRouter2, "Router must be called with the new operator.");
|
|
2172
|
-
}
|
|
2173
|
-
this.app = null;
|
|
2174
|
-
this.apps = [];
|
|
2175
|
-
this.options = options;
|
|
2176
|
-
this.beforeHooks = [];
|
|
2177
|
-
this.resolveHooks = [];
|
|
2178
|
-
this.afterHooks = [];
|
|
2179
|
-
this.matcher = createMatcher(options.routes || [], this);
|
|
2180
|
-
var mode = options.mode || "hash";
|
|
2181
|
-
this.fallback = mode === "history" && !supportsPushState && options.fallback !== false;
|
|
2182
|
-
if (this.fallback) {
|
|
2183
|
-
mode = "hash";
|
|
2184
|
-
}
|
|
2185
|
-
if (!inBrowser) {
|
|
2186
|
-
mode = "abstract";
|
|
2187
|
-
}
|
|
2188
|
-
this.mode = mode;
|
|
2189
|
-
switch (mode) {
|
|
2190
|
-
case "history":
|
|
2191
|
-
this.history = new HTML5History(this, options.base);
|
|
2192
|
-
break;
|
|
2193
|
-
case "hash":
|
|
2194
|
-
this.history = new HashHistory(this, options.base, this.fallback);
|
|
2195
|
-
break;
|
|
2196
|
-
case "abstract":
|
|
2197
|
-
this.history = new AbstractHistory(this, options.base);
|
|
2198
|
-
break;
|
|
2199
|
-
default:
|
|
2200
|
-
if (process.env.NODE_ENV !== "production") {
|
|
2201
|
-
assert(false, "invalid mode: " + mode);
|
|
2202
|
-
}
|
|
2203
|
-
}
|
|
2204
|
-
};
|
|
2205
|
-
var prototypeAccessors = { currentRoute: { configurable: true } };
|
|
2206
|
-
VueRouter.prototype.match = function match(raw, current, redirectedFrom) {
|
|
2207
|
-
return this.matcher.match(raw, current, redirectedFrom);
|
|
2208
|
-
};
|
|
2209
|
-
prototypeAccessors.currentRoute.get = function() {
|
|
2210
|
-
return this.history && this.history.current;
|
|
2211
|
-
};
|
|
2212
|
-
VueRouter.prototype.init = function init(app) {
|
|
2213
|
-
var this$1$1 = this;
|
|
2214
|
-
process.env.NODE_ENV !== "production" && assert(
|
|
2215
|
-
install.installed,
|
|
2216
|
-
"not installed. Make sure to call `Vue.use(VueRouter)` before creating root instance."
|
|
2217
|
-
);
|
|
2218
|
-
this.apps.push(app);
|
|
2219
|
-
app.$once("hook:destroyed", function() {
|
|
2220
|
-
var index = this$1$1.apps.indexOf(app);
|
|
2221
|
-
if (index > -1) {
|
|
2222
|
-
this$1$1.apps.splice(index, 1);
|
|
2223
|
-
}
|
|
2224
|
-
if (this$1$1.app === app) {
|
|
2225
|
-
this$1$1.app = this$1$1.apps[0] || null;
|
|
2226
|
-
}
|
|
2227
|
-
if (!this$1$1.app) {
|
|
2228
|
-
this$1$1.history.teardown();
|
|
2229
|
-
}
|
|
2230
|
-
});
|
|
2231
|
-
if (this.app) {
|
|
2232
|
-
return;
|
|
2233
|
-
}
|
|
2234
|
-
this.app = app;
|
|
2235
|
-
var history = this.history;
|
|
2236
|
-
if (history instanceof HTML5History || history instanceof HashHistory) {
|
|
2237
|
-
var handleInitialScroll = function(routeOrError) {
|
|
2238
|
-
var from = history.current;
|
|
2239
|
-
var expectScroll = this$1$1.options.scrollBehavior;
|
|
2240
|
-
var supportsScroll = supportsPushState && expectScroll;
|
|
2241
|
-
if (supportsScroll && "fullPath" in routeOrError) {
|
|
2242
|
-
handleScroll(this$1$1, routeOrError, from, false);
|
|
2243
|
-
}
|
|
2244
|
-
};
|
|
2245
|
-
var setupListeners2 = function(routeOrError) {
|
|
2246
|
-
history.setupListeners();
|
|
2247
|
-
handleInitialScroll(routeOrError);
|
|
2248
|
-
};
|
|
2249
|
-
history.transitionTo(
|
|
2250
|
-
history.getCurrentLocation(),
|
|
2251
|
-
setupListeners2,
|
|
2252
|
-
setupListeners2
|
|
2253
|
-
);
|
|
2254
|
-
}
|
|
2255
|
-
history.listen(function(route) {
|
|
2256
|
-
this$1$1.apps.forEach(function(app2) {
|
|
2257
|
-
app2._route = route;
|
|
2258
|
-
});
|
|
2259
|
-
});
|
|
2260
|
-
};
|
|
2261
|
-
VueRouter.prototype.beforeEach = function beforeEach(fn) {
|
|
2262
|
-
return registerHook(this.beforeHooks, fn);
|
|
2263
|
-
};
|
|
2264
|
-
VueRouter.prototype.beforeResolve = function beforeResolve(fn) {
|
|
2265
|
-
return registerHook(this.resolveHooks, fn);
|
|
2266
|
-
};
|
|
2267
|
-
VueRouter.prototype.afterEach = function afterEach(fn) {
|
|
2268
|
-
return registerHook(this.afterHooks, fn);
|
|
2269
|
-
};
|
|
2270
|
-
VueRouter.prototype.onReady = function onReady2(cb, errorCb) {
|
|
2271
|
-
this.history.onReady(cb, errorCb);
|
|
2272
|
-
};
|
|
2273
|
-
VueRouter.prototype.onError = function onError2(errorCb) {
|
|
2274
|
-
this.history.onError(errorCb);
|
|
2275
|
-
};
|
|
2276
|
-
VueRouter.prototype.push = function push(location, onComplete, onAbort) {
|
|
2277
|
-
var this$1$1 = this;
|
|
2278
|
-
if (!onComplete && !onAbort && typeof Promise !== "undefined") {
|
|
2279
|
-
return new Promise(function(resolve2, reject) {
|
|
2280
|
-
this$1$1.history.push(location, resolve2, reject);
|
|
2281
|
-
});
|
|
2282
|
-
} else {
|
|
2283
|
-
this.history.push(location, onComplete, onAbort);
|
|
2284
|
-
}
|
|
2285
|
-
};
|
|
2286
|
-
VueRouter.prototype.replace = function replace(location, onComplete, onAbort) {
|
|
2287
|
-
var this$1$1 = this;
|
|
2288
|
-
if (!onComplete && !onAbort && typeof Promise !== "undefined") {
|
|
2289
|
-
return new Promise(function(resolve2, reject) {
|
|
2290
|
-
this$1$1.history.replace(location, resolve2, reject);
|
|
2291
|
-
});
|
|
2292
|
-
} else {
|
|
2293
|
-
this.history.replace(location, onComplete, onAbort);
|
|
2294
|
-
}
|
|
2295
|
-
};
|
|
2296
|
-
VueRouter.prototype.go = function go(n) {
|
|
2297
|
-
this.history.go(n);
|
|
2298
|
-
};
|
|
2299
|
-
VueRouter.prototype.back = function back() {
|
|
2300
|
-
this.go(-1);
|
|
2301
|
-
};
|
|
2302
|
-
VueRouter.prototype.forward = function forward() {
|
|
2303
|
-
this.go(1);
|
|
2304
|
-
};
|
|
2305
|
-
VueRouter.prototype.getMatchedComponents = function getMatchedComponents(to) {
|
|
2306
|
-
var route = to ? to.matched ? to : this.resolve(to).route : this.currentRoute;
|
|
2307
|
-
if (!route) {
|
|
2308
|
-
return [];
|
|
2309
|
-
}
|
|
2310
|
-
return [].concat.apply(
|
|
2311
|
-
[],
|
|
2312
|
-
route.matched.map(function(m) {
|
|
2313
|
-
return Object.keys(m.components).map(function(key) {
|
|
2314
|
-
return m.components[key];
|
|
2315
|
-
});
|
|
2316
|
-
})
|
|
2317
|
-
);
|
|
2318
|
-
};
|
|
2319
|
-
VueRouter.prototype.resolve = function resolve(to, current, append) {
|
|
2320
|
-
current = current || this.history.current;
|
|
2321
|
-
var location = normalizeLocation(to, current, append, this);
|
|
2322
|
-
var route = this.match(location, current);
|
|
2323
|
-
var fullPath = route.redirectedFrom || route.fullPath;
|
|
2324
|
-
var base = this.history.base;
|
|
2325
|
-
var href = createHref(base, fullPath, this.mode);
|
|
2326
|
-
return {
|
|
2327
|
-
location,
|
|
2328
|
-
route,
|
|
2329
|
-
href,
|
|
2330
|
-
// for backwards compat
|
|
2331
|
-
normalizedTo: location,
|
|
2332
|
-
resolved: route
|
|
2333
|
-
};
|
|
2334
|
-
};
|
|
2335
|
-
VueRouter.prototype.getRoutes = function getRoutes() {
|
|
2336
|
-
return this.matcher.getRoutes();
|
|
2337
|
-
};
|
|
2338
|
-
VueRouter.prototype.addRoute = function addRoute(parentOrRoute, route) {
|
|
2339
|
-
this.matcher.addRoute(parentOrRoute, route);
|
|
2340
|
-
if (this.history.current !== START) {
|
|
2341
|
-
this.history.transitionTo(this.history.getCurrentLocation());
|
|
2342
|
-
}
|
|
2343
|
-
};
|
|
2344
|
-
VueRouter.prototype.addRoutes = function addRoutes(routes) {
|
|
2345
|
-
if (process.env.NODE_ENV !== "production") {
|
|
2346
|
-
warn(false, "router.addRoutes() is deprecated and has been removed in Vue Router 4. Use router.addRoute() instead.");
|
|
2347
|
-
}
|
|
2348
|
-
this.matcher.addRoutes(routes);
|
|
2349
|
-
if (this.history.current !== START) {
|
|
2350
|
-
this.history.transitionTo(this.history.getCurrentLocation());
|
|
2351
|
-
}
|
|
2352
|
-
};
|
|
2353
|
-
Object.defineProperties(VueRouter.prototype, prototypeAccessors);
|
|
2354
|
-
function registerHook(list, fn) {
|
|
2355
|
-
list.push(fn);
|
|
2356
|
-
return function() {
|
|
2357
|
-
var i = list.indexOf(fn);
|
|
2358
|
-
if (i > -1) {
|
|
2359
|
-
list.splice(i, 1);
|
|
2360
|
-
}
|
|
2361
|
-
};
|
|
2362
|
-
}
|
|
2363
|
-
function createHref(base, fullPath, mode) {
|
|
2364
|
-
var path = mode === "hash" ? "#" + fullPath : fullPath;
|
|
2365
|
-
return base ? cleanPath(base + "/" + path) : path;
|
|
2366
|
-
}
|
|
2367
|
-
VueRouter.install = install;
|
|
2368
|
-
VueRouter.version = "3.6.5";
|
|
2369
|
-
VueRouter.isNavigationFailure = isNavigationFailure;
|
|
2370
|
-
VueRouter.NavigationFailureType = NavigationFailureType;
|
|
2371
|
-
VueRouter.START_LOCATION = START;
|
|
2372
|
-
if (inBrowser && window.Vue) {
|
|
2373
|
-
window.Vue.use(VueRouter);
|
|
2374
|
-
}
|
|
2375
|
-
register(t20);
|
|
2376
|
-
const IDLE_TIMEOUT = 3 * 60 * 1e3;
|
|
2377
|
-
const _sfc_main$8 = {
|
|
2378
|
-
name: "NcReferenceWidget",
|
|
2379
|
-
components: {
|
|
2380
|
-
NcButton
|
|
2381
|
-
},
|
|
2382
|
-
props: {
|
|
2383
|
-
reference: {
|
|
2384
|
-
type: Object,
|
|
2385
|
-
required: true
|
|
2386
|
-
},
|
|
2387
|
-
interactive: {
|
|
2388
|
-
type: Boolean,
|
|
2389
|
-
default: true
|
|
2390
|
-
},
|
|
2391
|
-
interactiveOptIn: {
|
|
2392
|
-
type: Boolean,
|
|
2393
|
-
default: false
|
|
2394
|
-
}
|
|
2395
|
-
},
|
|
2396
|
-
setup() {
|
|
2397
|
-
const isVisible = ref(false);
|
|
2398
|
-
const widgetRoot = ref();
|
|
2399
|
-
const { width } = useElementSize(widgetRoot);
|
|
2400
|
-
useIntersectionObserver(widgetRoot, () => {
|
|
2401
|
-
nextTick(() => {
|
|
2402
|
-
var _a, _b;
|
|
2403
|
-
isVisible.value = (_b = (_a = widgetRoot.value) == null ? void 0 : _a.isIntersecting) != null ? _b : false;
|
|
2404
|
-
});
|
|
2405
|
-
});
|
|
2406
|
-
return {
|
|
2407
|
-
width,
|
|
2408
|
-
isVisible,
|
|
2409
|
-
widgetRoot
|
|
2410
|
-
};
|
|
2411
|
-
},
|
|
2412
|
-
data() {
|
|
2413
|
-
return {
|
|
2414
|
-
showInteractive: false,
|
|
2415
|
-
rendered: false,
|
|
2416
|
-
idleTimeout: null
|
|
2417
|
-
};
|
|
2418
|
-
},
|
|
2419
|
-
computed: {
|
|
2420
|
-
isInteractive() {
|
|
2421
|
-
return !this.interactiveOptIn && this.interactive || this.showInteractive;
|
|
2422
|
-
},
|
|
2423
|
-
hasFullWidth() {
|
|
2424
|
-
return hasFullWidth(this.reference.richObjectType);
|
|
2425
|
-
},
|
|
2426
|
-
hasCustomWidget() {
|
|
2427
|
-
return isWidgetRegistered(this.reference.richObjectType);
|
|
2428
|
-
},
|
|
2429
|
-
hasInteractiveView() {
|
|
2430
|
-
return isWidgetRegistered(this.reference.richObjectType) && hasInteractiveView(this.reference.richObjectType);
|
|
2431
|
-
},
|
|
2432
|
-
noAccess() {
|
|
2433
|
-
return this.reference && !this.reference.accessible;
|
|
2434
|
-
},
|
|
2435
|
-
descriptionStyle() {
|
|
2436
|
-
if (this.numberOfLines === 0) {
|
|
2437
|
-
return {
|
|
2438
|
-
display: "none"
|
|
2439
|
-
};
|
|
2440
|
-
}
|
|
2441
|
-
const lineClamp = this.numberOfLines;
|
|
2442
|
-
return {
|
|
2443
|
-
lineClamp,
|
|
2444
|
-
webkitLineClamp: lineClamp
|
|
2445
|
-
};
|
|
2446
|
-
},
|
|
2447
|
-
numberOfLines() {
|
|
2448
|
-
const lineCountOffsets = [450, 550, 650, Infinity];
|
|
2449
|
-
return lineCountOffsets.findIndex((max) => this.width < max);
|
|
2450
|
-
},
|
|
2451
|
-
compactLink() {
|
|
2452
|
-
const link = this.reference.openGraphObject.link;
|
|
2453
|
-
if (!link) {
|
|
2454
|
-
return "";
|
|
2455
|
-
}
|
|
2456
|
-
if (link.startsWith("https://")) {
|
|
2457
|
-
return link.substring(8);
|
|
2458
|
-
}
|
|
2459
|
-
if (link.startsWith("http://")) {
|
|
2460
|
-
return link.substring(7);
|
|
2461
|
-
}
|
|
2462
|
-
return link;
|
|
2463
|
-
},
|
|
2464
|
-
route() {
|
|
2465
|
-
return getRoute(this.$router, this.reference.openGraphObject.link);
|
|
2466
|
-
},
|
|
2467
|
-
referenceWidgetLinkComponent() {
|
|
2468
|
-
return this.route ? Link : "a";
|
|
2469
|
-
},
|
|
2470
|
-
referenceWidgetLinkProps() {
|
|
2471
|
-
return this.route ? { to: this.route } : { href: this.reference.openGraphObject.link, target: "_blank" };
|
|
2472
|
-
}
|
|
2473
|
-
},
|
|
2474
|
-
watch: {
|
|
2475
|
-
isVisible: {
|
|
2476
|
-
handler(val) {
|
|
2477
|
-
if (!val) {
|
|
2478
|
-
this.idleTimeout = setTimeout(() => {
|
|
2479
|
-
if (!this.isVisible) {
|
|
2480
|
-
this.destroyWidget();
|
|
2481
|
-
}
|
|
2482
|
-
}, IDLE_TIMEOUT);
|
|
2483
|
-
return;
|
|
2484
|
-
}
|
|
2485
|
-
if (this.idleTimeout) {
|
|
2486
|
-
clearTimeout(this.idleTimeout);
|
|
2487
|
-
this.idleTimeout = null;
|
|
2488
|
-
}
|
|
2489
|
-
if (!this.rendered) {
|
|
2490
|
-
this.renderWidget();
|
|
2491
|
-
}
|
|
2492
|
-
},
|
|
2493
|
-
immediate: true
|
|
2494
|
-
}
|
|
2495
|
-
},
|
|
2496
|
-
beforeDestroy() {
|
|
2497
|
-
this.destroyWidget();
|
|
2498
|
-
},
|
|
2499
|
-
methods: {
|
|
2500
|
-
t,
|
|
2501
|
-
enableInteractive() {
|
|
2502
|
-
this.showInteractive = true;
|
|
2503
|
-
this.renderWidget();
|
|
2504
|
-
},
|
|
2505
|
-
renderWidget() {
|
|
2506
|
-
var _a;
|
|
2507
|
-
if (!this.$refs.customWidget) {
|
|
2508
|
-
return;
|
|
2509
|
-
}
|
|
2510
|
-
if (((_a = this == null ? void 0 : this.reference) == null ? void 0 : _a.richObjectType) === "open-graph") {
|
|
2511
|
-
return;
|
|
2512
|
-
}
|
|
2513
|
-
this.$refs.customWidget.innerHTML = "";
|
|
2514
|
-
const widget = document.createElement("div");
|
|
2515
|
-
this.$refs.customWidget.appendChild(widget);
|
|
2516
|
-
this.$nextTick(() => {
|
|
2517
|
-
renderWidget(widget, {
|
|
2518
|
-
...this.reference,
|
|
2519
|
-
interactive: this.isInteractive
|
|
2520
|
-
});
|
|
2521
|
-
this.rendered = true;
|
|
2522
|
-
});
|
|
2523
|
-
},
|
|
2524
|
-
destroyWidget() {
|
|
2525
|
-
if (this.rendered) {
|
|
2526
|
-
destroyWidget(this.reference.richObjectType, this.$el);
|
|
2527
|
-
this.rendered = false;
|
|
2528
|
-
}
|
|
2529
|
-
}
|
|
2530
|
-
}
|
|
2531
|
-
};
|
|
2532
|
-
var _sfc_render$8 = function render3() {
|
|
2533
|
-
var _vm = this, _c = _vm._self._c;
|
|
2534
|
-
return _c("div", { ref: "widgetRoot", class: { "toggle-interactive": _vm.hasInteractiveView && !_vm.isInteractive } }, [_vm.reference && _vm.hasCustomWidget ? _c("div", { ref: "customWidget", staticClass: "widget-custom", class: { "full-width": _vm.hasFullWidth } }) : !_vm.noAccess && _vm.reference && _vm.reference.openGraphObject && !_vm.hasCustomWidget ? _c(_vm.referenceWidgetLinkComponent, _vm._b({ tag: "component", staticClass: "widget-default", attrs: { "rel": "noopener noreferrer" } }, "component", _vm.referenceWidgetLinkProps, false), [_vm.reference.openGraphObject.thumb ? _c("img", { staticClass: "widget-default--image", attrs: { "src": _vm.reference.openGraphObject.thumb } }) : _vm._e(), _c("div", { staticClass: "widget-default--details" }, [_c("p", { staticClass: "widget-default--name" }, [_vm._v(" " + _vm._s(_vm.reference.openGraphObject.name) + " ")]), _c("p", { staticClass: "widget-default--description", style: _vm.descriptionStyle }, [_vm._v(" " + _vm._s(_vm.reference.openGraphObject.description) + " ")]), _c("p", { staticClass: "widget-default--link" }, [_vm._v(" " + _vm._s(_vm.compactLink) + " ")])])]) : _vm._e(), _vm.interactiveOptIn && _vm.hasInteractiveView && !_vm.isInteractive ? _c("NcButton", { staticClass: "toggle-interactive--button", on: { "click": _vm.enableInteractive } }, [_vm._v(" " + _vm._s(_vm.t("Enable interactive view")) + " ")]) : _vm._e()], 1);
|
|
2535
|
-
};
|
|
2536
|
-
var _sfc_staticRenderFns$8 = [];
|
|
2537
|
-
var __component__$8 = /* @__PURE__ */ normalizeComponent(
|
|
2538
|
-
_sfc_main$8,
|
|
2539
|
-
_sfc_render$8,
|
|
2540
|
-
_sfc_staticRenderFns$8,
|
|
2541
|
-
false,
|
|
2542
|
-
null,
|
|
2543
|
-
"48a2ac1d",
|
|
2544
|
-
null,
|
|
2545
|
-
null
|
|
2546
|
-
);
|
|
2547
|
-
const NcReferenceWidget = __component__$8.exports;
|
|
2548
|
-
const _sfc_main$7 = {
|
|
2549
|
-
name: "NcCustomPickerElement",
|
|
2550
|
-
props: {
|
|
2551
|
-
/**
|
|
2552
|
-
* The reference provider
|
|
2553
|
-
*/
|
|
2554
|
-
provider: {
|
|
2555
|
-
type: Object,
|
|
2556
|
-
required: true
|
|
2557
|
-
}
|
|
2558
|
-
},
|
|
2559
|
-
emits: [
|
|
2560
|
-
"cancel",
|
|
2561
|
-
"submit"
|
|
2562
|
-
],
|
|
2563
|
-
data() {
|
|
2564
|
-
return {
|
|
2565
|
-
isRegistered: isCustomPickerElementRegistered(this.provider.id),
|
|
2566
|
-
renderResult: null
|
|
2567
|
-
};
|
|
2568
|
-
},
|
|
2569
|
-
mounted() {
|
|
2570
|
-
if (this.isRegistered) {
|
|
2571
|
-
this.renderElement();
|
|
2572
|
-
}
|
|
2573
|
-
},
|
|
2574
|
-
beforeDestroy() {
|
|
2575
|
-
if (this.isRegistered) {
|
|
2576
|
-
destroyCustomPickerElement(this.provider.id, this.$el, this.renderResult);
|
|
2577
|
-
}
|
|
2578
|
-
},
|
|
2579
|
-
methods: {
|
|
2580
|
-
renderElement() {
|
|
2581
|
-
if (this.$refs.domElement) {
|
|
2582
|
-
this.$refs.domElement.innerHTML = "";
|
|
2583
|
-
}
|
|
2584
|
-
const renderFunctionResult = renderCustomPickerElement(this.$refs.domElement, { providerId: this.provider.id, accessible: false });
|
|
2585
|
-
Promise.resolve(renderFunctionResult).then((result) => {
|
|
2586
|
-
var _a, _b;
|
|
2587
|
-
this.renderResult = result;
|
|
2588
|
-
if (((_a = this.renderResult.object) == null ? void 0 : _a._isVue) && ((_b = this.renderResult.object) == null ? void 0 : _b.$on)) {
|
|
2589
|
-
this.renderResult.object.$on("submit", this.onSubmit);
|
|
2590
|
-
this.renderResult.object.$on("cancel", this.onCancel);
|
|
2591
|
-
}
|
|
2592
|
-
this.renderResult.element.addEventListener("submit", (e) => {
|
|
2593
|
-
this.onSubmit(e.detail);
|
|
2594
|
-
});
|
|
2595
|
-
this.renderResult.element.addEventListener("cancel", this.onCancel);
|
|
2596
|
-
});
|
|
2597
|
-
},
|
|
2598
|
-
onSubmit(value) {
|
|
2599
|
-
this.$emit("submit", value);
|
|
2600
|
-
},
|
|
2601
|
-
onCancel() {
|
|
2602
|
-
this.$emit("cancel");
|
|
2603
|
-
}
|
|
2604
|
-
}
|
|
2605
|
-
};
|
|
2606
|
-
var _sfc_render$7 = function render4() {
|
|
2607
|
-
var _vm = this, _c = _vm._self._c;
|
|
2608
|
-
return _c("div", { ref: "domElement" });
|
|
2609
|
-
};
|
|
2610
|
-
var _sfc_staticRenderFns$7 = [];
|
|
2611
|
-
var __component__$7 = /* @__PURE__ */ normalizeComponent(
|
|
2612
|
-
_sfc_main$7,
|
|
2613
|
-
_sfc_render$7,
|
|
2614
|
-
_sfc_staticRenderFns$7,
|
|
2615
|
-
false,
|
|
2616
|
-
null,
|
|
2617
|
-
"25f1cef8",
|
|
2618
|
-
null,
|
|
2619
|
-
null
|
|
2620
|
-
);
|
|
2621
|
-
const NcCustomPickerElement = __component__$7.exports;
|
|
2622
|
-
register(t7);
|
|
2623
|
-
const anyLinkProviderId = "any-link";
|
|
2624
|
-
const anyLinkProvider = {
|
|
2625
|
-
id: anyLinkProviderId,
|
|
2626
|
-
title: t("Any link"),
|
|
2627
|
-
icon_url: imagePath("core", "filetypes/link.svg")
|
|
2628
|
-
};
|
|
2629
|
-
if (!window._vue_richtext_reference_providers) {
|
|
2630
|
-
window._vue_richtext_reference_providers = loadState("core", "reference-provider-list", []);
|
|
2631
|
-
}
|
|
2632
|
-
if (!window._vue_richtext_reference_provider_timestamps) {
|
|
2633
|
-
window._vue_richtext_reference_provider_timestamps = loadState("core", "reference-provider-timestamps", {});
|
|
2634
|
-
}
|
|
2635
|
-
function getProvider(providerId) {
|
|
2636
|
-
if (providerId === anyLinkProviderId) {
|
|
2637
|
-
return anyLinkProvider;
|
|
2638
|
-
}
|
|
2639
|
-
return getProviders().find((p) => p.id === providerId);
|
|
2640
|
-
}
|
|
2641
|
-
function getProviders() {
|
|
2642
|
-
return window._vue_richtext_reference_providers.filter((p) => {
|
|
2643
|
-
const keep = !!p.search_providers_ids && p.search_providers_ids.length > 0 || isCustomPickerElementRegistered(p.id);
|
|
2644
|
-
if (!keep) {
|
|
2645
|
-
console.debug("[smart picker]", p.id, "reference provider is discoverable but does not have any related search provider or custom picker component registered");
|
|
2646
|
-
}
|
|
2647
|
-
return keep;
|
|
2648
|
-
});
|
|
2649
|
-
}
|
|
2650
|
-
function sortProviders(providerList) {
|
|
2651
|
-
const timestamps = window._vue_richtext_reference_provider_timestamps;
|
|
2652
|
-
return providerList.sort((a, b) => {
|
|
2653
|
-
return a.order === b.order ? 0 : a.order > b.order ? 1 : -1;
|
|
2654
|
-
}).sort((a, b) => {
|
|
2655
|
-
const ta = timestamps[a.id];
|
|
2656
|
-
const tb = timestamps[b.id];
|
|
2657
|
-
return ta === tb ? 0 : tb === void 0 ? -1 : ta === void 0 ? 1 : ta > tb ? -1 : 1;
|
|
2658
|
-
});
|
|
2659
|
-
}
|
|
2660
|
-
function searchProvider(query, limit = null) {
|
|
2661
|
-
const providers = getProviders();
|
|
2662
|
-
const escapedQuery = query.replace(/[/\-\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
2663
|
-
const regexp = new RegExp(escapedQuery, "i");
|
|
2664
|
-
const sortedProviders = sortProviders(providers);
|
|
2665
|
-
const filteredSortedProviders = sortedProviders.filter((p) => {
|
|
2666
|
-
return p.title.match(regexp);
|
|
2667
|
-
});
|
|
2668
|
-
const searchResult = limit ? filteredSortedProviders.slice(0, limit) : filteredSortedProviders;
|
|
2669
|
-
if (query === "" || searchResult.length === 0) {
|
|
2670
|
-
searchResult.push(anyLinkProvider);
|
|
2671
|
-
}
|
|
2672
|
-
return searchResult;
|
|
2673
|
-
}
|
|
2674
|
-
function touchProvider(providerId) {
|
|
2675
|
-
const timestamp = Math.floor(Date.now() / 1e3);
|
|
2676
|
-
const params = {
|
|
2677
|
-
timestamp
|
|
2678
|
-
};
|
|
2679
|
-
const url = generateOcsUrl("references/provider/{providerId}", { providerId });
|
|
2680
|
-
axios.put(url, params).then((response) => {
|
|
2681
|
-
window._vue_richtext_reference_provider_timestamps[providerId] = timestamp;
|
|
2682
|
-
});
|
|
2683
|
-
}
|
|
2684
|
-
let mytimer = 0;
|
|
2685
|
-
function delay(callback, ms) {
|
|
2686
|
-
return function() {
|
|
2687
|
-
const context = this;
|
|
2688
|
-
const args = arguments;
|
|
2689
|
-
clearTimeout(mytimer);
|
|
2690
|
-
mytimer = setTimeout(function() {
|
|
2691
|
-
callback.apply(context, args);
|
|
2692
|
-
}, ms || 0);
|
|
2693
|
-
};
|
|
2694
|
-
}
|
|
2695
|
-
function isUrl(str) {
|
|
2696
|
-
try {
|
|
2697
|
-
return Boolean(new URL(str));
|
|
2698
|
-
} catch (error) {
|
|
2699
|
-
return false;
|
|
2700
|
-
}
|
|
2701
|
-
}
|
|
2702
|
-
register(t34, t38);
|
|
2703
|
-
const _sfc_main$6 = {
|
|
2704
|
-
name: "LinkVariantIcon",
|
|
2705
|
-
emits: ["click"],
|
|
2706
|
-
props: {
|
|
2707
|
-
title: {
|
|
2708
|
-
type: String
|
|
2709
|
-
},
|
|
2710
|
-
fillColor: {
|
|
2711
|
-
type: String,
|
|
2712
|
-
default: "currentColor"
|
|
2713
|
-
},
|
|
2714
|
-
size: {
|
|
2715
|
-
type: Number,
|
|
2716
|
-
default: 24
|
|
2717
|
-
}
|
|
2718
|
-
}
|
|
2719
|
-
};
|
|
2720
|
-
var _sfc_render$6 = function render5() {
|
|
2721
|
-
var _vm = this, _c = _vm._self._c;
|
|
2722
|
-
return _c("span", _vm._b({ staticClass: "material-design-icon link-variant-icon", attrs: { "aria-hidden": _vm.title ? null : true, "aria-label": _vm.title, "role": "img" }, on: { "click": function($event) {
|
|
2723
|
-
return _vm.$emit("click", $event);
|
|
2724
|
-
} } }, "span", _vm.$attrs, false), [_c("svg", { staticClass: "material-design-icon__svg", attrs: { "fill": _vm.fillColor, "width": _vm.size, "height": _vm.size, "viewBox": "0 0 24 24" } }, [_c("path", { attrs: { "d": "M10.59,13.41C11,13.8 11,14.44 10.59,14.83C10.2,15.22 9.56,15.22 9.17,14.83C7.22,12.88 7.22,9.71 9.17,7.76V7.76L12.71,4.22C14.66,2.27 17.83,2.27 19.78,4.22C21.73,6.17 21.73,9.34 19.78,11.29L18.29,12.78C18.3,11.96 18.17,11.14 17.89,10.36L18.36,9.88C19.54,8.71 19.54,6.81 18.36,5.64C17.19,4.46 15.29,4.46 14.12,5.64L10.59,9.17C9.41,10.34 9.41,12.24 10.59,13.41M13.41,9.17C13.8,8.78 14.44,8.78 14.83,9.17C16.78,11.12 16.78,14.29 14.83,16.24V16.24L11.29,19.78C9.34,21.73 6.17,21.73 4.22,19.78C2.27,17.83 2.27,14.66 4.22,12.71L5.71,11.22C5.7,12.04 5.83,12.86 6.11,13.65L5.64,14.12C4.46,15.29 4.46,17.19 5.64,18.36C6.81,19.54 8.71,19.54 9.88,18.36L13.41,14.83C14.59,13.66 14.59,11.76 13.41,10.59C13,10.2 13,9.56 13.41,9.17Z" } }, [_vm.title ? _c("title", [_vm._v(_vm._s(_vm.title))]) : _vm._e()])])]);
|
|
2725
|
-
};
|
|
2726
|
-
var _sfc_staticRenderFns$6 = [];
|
|
2727
|
-
var __component__$6 = /* @__PURE__ */ normalizeComponent(
|
|
2728
|
-
_sfc_main$6,
|
|
2729
|
-
_sfc_render$6,
|
|
2730
|
-
_sfc_staticRenderFns$6,
|
|
2731
|
-
false,
|
|
2732
|
-
null,
|
|
2733
|
-
null,
|
|
2734
|
-
null,
|
|
2735
|
-
null
|
|
2736
|
-
);
|
|
2737
|
-
const LinkVariantIcon = __component__$6.exports;
|
|
2738
|
-
const _sfc_main$5 = {
|
|
2739
|
-
name: "NcProviderList",
|
|
2740
|
-
components: {
|
|
2741
|
-
NcSelect,
|
|
2742
|
-
NcHighlight,
|
|
2743
|
-
NcEmptyContent,
|
|
2744
|
-
LinkVariantIcon
|
|
2745
|
-
},
|
|
2746
|
-
emits: [
|
|
2747
|
-
"select-provider",
|
|
2748
|
-
"submit"
|
|
2749
|
-
],
|
|
2750
|
-
data() {
|
|
2751
|
-
return {
|
|
2752
|
-
selectedProvider: null,
|
|
2753
|
-
query: "",
|
|
2754
|
-
multiselectPlaceholder: t("Select provider"),
|
|
2755
|
-
providerIconAlt: t("Provider icon")
|
|
2756
|
-
};
|
|
2757
|
-
},
|
|
2758
|
-
computed: {
|
|
2759
|
-
options() {
|
|
2760
|
-
const result = [];
|
|
2761
|
-
if (this.query !== "" && isUrl(this.query)) {
|
|
2762
|
-
result.push({
|
|
2763
|
-
id: this.query,
|
|
2764
|
-
title: this.query,
|
|
2765
|
-
isLink: true
|
|
2766
|
-
});
|
|
2767
|
-
}
|
|
2768
|
-
result.push(...searchProvider(this.query));
|
|
2769
|
-
return result;
|
|
2770
|
-
}
|
|
2771
|
-
},
|
|
2772
|
-
methods: {
|
|
2773
|
-
focus() {
|
|
2774
|
-
setTimeout(() => {
|
|
2775
|
-
var _a, _b, _c;
|
|
2776
|
-
(_c = (_b = (_a = this.$refs["provider-select"]) == null ? void 0 : _a.$el) == null ? void 0 : _b.querySelector("#provider-select-input")) == null ? void 0 : _c.focus();
|
|
2777
|
-
}, 300);
|
|
2778
|
-
},
|
|
2779
|
-
onProviderSelected(p) {
|
|
2780
|
-
if (p !== null) {
|
|
2781
|
-
if (p.isLink) {
|
|
2782
|
-
this.$emit("submit", p.title);
|
|
2783
|
-
} else {
|
|
2784
|
-
this.$emit("select-provider", p);
|
|
2785
|
-
}
|
|
2786
|
-
this.selectedProvider = null;
|
|
2787
|
-
}
|
|
2788
|
-
},
|
|
2789
|
-
onSearch(query, loading) {
|
|
2790
|
-
this.query = query;
|
|
2791
|
-
}
|
|
2792
|
-
}
|
|
2793
|
-
};
|
|
2794
|
-
var _sfc_render$5 = function render6() {
|
|
2795
|
-
var _vm = this, _c = _vm._self._c;
|
|
2796
|
-
return _c("div", { staticClass: "provider-list" }, [_c("NcSelect", { ref: "provider-select", staticClass: "provider-list--select", attrs: { "input-id": "provider-select-input", "label": "title", "placeholder": _vm.multiselectPlaceholder, "options": _vm.options, "append-to-body": false, "clear-search-on-select": true, "clear-search-on-blur": () => false, "filterable": false }, on: { "search": _vm.onSearch, "input": _vm.onProviderSelected }, scopedSlots: _vm._u([{ key: "option", fn: function(option) {
|
|
2797
|
-
return [option.isLink ? _c("div", { staticClass: "provider" }, [_c("LinkVariantIcon", { staticClass: "link-icon", attrs: { "size": 20 } }), _c("span", [_vm._v(_vm._s(option.title))])], 1) : _c("div", { staticClass: "provider" }, [_c("img", { staticClass: "provider-icon", attrs: { "src": option.icon_url, "alt": _vm.providerIconAlt } }), _c("NcHighlight", { staticClass: "option-text", attrs: { "search": _vm.query, "text": option.title } })], 1)];
|
|
2798
|
-
} }]), model: { value: _vm.selectedProvider, callback: function($$v) {
|
|
2799
|
-
_vm.selectedProvider = $$v;
|
|
2800
|
-
}, expression: "selectedProvider" } }), _c("NcEmptyContent", { staticClass: "provider-list--empty-content", scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
2801
|
-
return [_c("LinkVariantIcon")];
|
|
2802
|
-
}, proxy: true }]) })], 1);
|
|
2803
|
-
};
|
|
2804
|
-
var _sfc_staticRenderFns$5 = [];
|
|
2805
|
-
var __component__$5 = /* @__PURE__ */ normalizeComponent(
|
|
2806
|
-
_sfc_main$5,
|
|
2807
|
-
_sfc_render$5,
|
|
2808
|
-
_sfc_staticRenderFns$5,
|
|
2809
|
-
false,
|
|
2810
|
-
null,
|
|
2811
|
-
"e880790e",
|
|
2812
|
-
null,
|
|
2813
|
-
null
|
|
2814
|
-
);
|
|
2815
|
-
const NcProviderList = __component__$5.exports;
|
|
2816
|
-
register(t21);
|
|
2817
|
-
const _sfc_main$4 = {
|
|
2818
|
-
name: "NcRawLinkInput",
|
|
2819
|
-
components: {
|
|
2820
|
-
LinkVariantIcon,
|
|
2821
|
-
NcEmptyContent,
|
|
2822
|
-
NcLoadingIcon,
|
|
2823
|
-
NcReferenceWidget,
|
|
2824
|
-
NcTextField
|
|
2825
|
-
},
|
|
2826
|
-
props: {
|
|
2827
|
-
/**
|
|
2828
|
-
* The reference provider
|
|
2829
|
-
*/
|
|
2830
|
-
provider: {
|
|
2831
|
-
type: Object,
|
|
2832
|
-
required: true
|
|
2833
|
-
}
|
|
2834
|
-
},
|
|
2835
|
-
emits: [
|
|
2836
|
-
"submit"
|
|
2837
|
-
],
|
|
2838
|
-
data() {
|
|
2839
|
-
return {
|
|
2840
|
-
inputValue: "",
|
|
2841
|
-
loading: false,
|
|
2842
|
-
reference: null,
|
|
2843
|
-
abortController: null,
|
|
2844
|
-
inputPlaceholder: t("Enter link")
|
|
2845
|
-
};
|
|
2846
|
-
},
|
|
2847
|
-
computed: {
|
|
2848
|
-
isLinkValid() {
|
|
2849
|
-
return isUrl(this.inputValue);
|
|
2850
|
-
}
|
|
2851
|
-
},
|
|
2852
|
-
methods: {
|
|
2853
|
-
focus() {
|
|
2854
|
-
var _a;
|
|
2855
|
-
(_a = this.$refs["url-input"].$el.getElementsByTagName("input")[0]) == null ? void 0 : _a.focus();
|
|
2856
|
-
},
|
|
2857
|
-
onSubmit(e) {
|
|
2858
|
-
const value = e.target.value;
|
|
2859
|
-
if (this.isLinkValid) {
|
|
2860
|
-
this.$emit("submit", value);
|
|
2861
|
-
}
|
|
2862
|
-
},
|
|
2863
|
-
onClear() {
|
|
2864
|
-
this.inputValue = "";
|
|
2865
|
-
this.reference = null;
|
|
2866
|
-
},
|
|
2867
|
-
onInput() {
|
|
2868
|
-
this.reference = null;
|
|
2869
|
-
if (this.abortController) {
|
|
2870
|
-
this.abortController.abort();
|
|
2871
|
-
}
|
|
2872
|
-
if (this.isLinkValid) {
|
|
2873
|
-
delay(() => {
|
|
2874
|
-
this.updateReference();
|
|
2875
|
-
}, 500)();
|
|
2876
|
-
}
|
|
2877
|
-
},
|
|
2878
|
-
updateReference() {
|
|
2879
|
-
this.loading = true;
|
|
2880
|
-
this.abortController = new AbortController();
|
|
2881
|
-
axios.get(generateOcsUrl("references/resolve", 2) + "?reference=" + encodeURIComponent(this.inputValue), {
|
|
2882
|
-
signal: this.abortController.signal
|
|
2883
|
-
}).then((response) => {
|
|
2884
|
-
this.reference = response.data.ocs.data.references[this.inputValue];
|
|
2885
|
-
}).catch((error) => {
|
|
2886
|
-
console.error(error);
|
|
2887
|
-
}).then(() => {
|
|
2888
|
-
this.loading = false;
|
|
2889
|
-
});
|
|
2890
|
-
}
|
|
2891
|
-
}
|
|
2892
|
-
};
|
|
2893
|
-
var _sfc_render$4 = function render7() {
|
|
2894
|
-
var _vm = this, _c = _vm._self._c;
|
|
2895
|
-
return _c("div", { staticClass: "raw-link" }, [_c("div", { staticClass: "input-wrapper" }, [_c("NcTextField", { ref: "url-input", attrs: { "value": _vm.inputValue, "show-trailing-button": _vm.inputValue !== "", "label": _vm.inputPlaceholder }, on: { "update:value": [function($event) {
|
|
2896
|
-
_vm.inputValue = $event;
|
|
2897
|
-
}, _vm.onInput], "trailing-button-click": _vm.onClear }, nativeOn: { "keyup": function($event) {
|
|
2898
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter"))
|
|
2899
|
-
return null;
|
|
2900
|
-
return _vm.onSubmit.apply(null, arguments);
|
|
2901
|
-
} } }, [_vm.loading ? _c("NcLoadingIcon", { attrs: { "size": 16 } }) : _c("LinkVariantIcon", { attrs: { "size": 16 } })], 1)], 1), _vm.reference !== null ? _c("NcReferenceWidget", { staticClass: "reference-widget", attrs: { "reference": _vm.reference } }) : _c("NcEmptyContent", { staticClass: "raw-link--empty-content", scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
2902
|
-
return [_vm.provider.icon_url ? _c("img", { staticClass: "provider-icon", attrs: { "src": _vm.provider.icon_url } }) : _c("LinkVariantIcon")];
|
|
2903
|
-
}, proxy: true }]) })], 1);
|
|
2904
|
-
};
|
|
2905
|
-
var _sfc_staticRenderFns$4 = [];
|
|
2906
|
-
var __component__$4 = /* @__PURE__ */ normalizeComponent(
|
|
2907
|
-
_sfc_main$4,
|
|
2908
|
-
_sfc_render$4,
|
|
2909
|
-
_sfc_staticRenderFns$4,
|
|
2910
|
-
false,
|
|
2911
|
-
null,
|
|
2912
|
-
"d0ba247a",
|
|
2913
|
-
null,
|
|
2914
|
-
null
|
|
2915
|
-
);
|
|
2916
|
-
const NcRawLinkInput = __component__$4.exports;
|
|
2917
|
-
const _sfc_main$3 = {
|
|
2918
|
-
name: "NcSearchResult",
|
|
2919
|
-
components: {
|
|
2920
|
-
NcHighlight
|
|
2921
|
-
},
|
|
2922
|
-
props: {
|
|
2923
|
-
/**
|
|
2924
|
-
* Unified search result entry
|
|
2925
|
-
*/
|
|
2926
|
-
entry: {
|
|
2927
|
-
type: Object,
|
|
2928
|
-
required: true
|
|
2929
|
-
},
|
|
2930
|
-
/**
|
|
2931
|
-
* The query that led to getting this result
|
|
2932
|
-
* Used to highlight the entry text
|
|
2933
|
-
*/
|
|
2934
|
-
query: {
|
|
2935
|
-
type: String,
|
|
2936
|
-
required: true
|
|
2937
|
-
}
|
|
2938
|
-
}
|
|
2939
|
-
};
|
|
2940
|
-
var _sfc_render$3 = function render8() {
|
|
2941
|
-
var _vm = this, _c = _vm._self._c;
|
|
2942
|
-
return _c("div", { staticClass: "result" }, [_vm.entry.icon ? _c("div", { staticClass: "result--icon-class", class: { [_vm.entry.icon]: true, rounded: _vm.entry.rounded } }) : _c("img", { staticClass: "result--image", class: { rounded: _vm.entry.rounded }, attrs: { "src": _vm.entry.thumbnailUrl } }), _c("div", { staticClass: "result--content" }, [_c("span", { staticClass: "result--content--name" }, [_c("NcHighlight", { attrs: { "search": _vm.query, "text": _vm.entry.title } })], 1), _c("span", { staticClass: "result--content--subline" }, [_c("NcHighlight", { attrs: { "search": _vm.query, "text": _vm.entry.subline } })], 1)])]);
|
|
2943
|
-
};
|
|
2944
|
-
var _sfc_staticRenderFns$3 = [];
|
|
2945
|
-
var __component__$3 = /* @__PURE__ */ normalizeComponent(
|
|
2946
|
-
_sfc_main$3,
|
|
2947
|
-
_sfc_render$3,
|
|
2948
|
-
_sfc_staticRenderFns$3,
|
|
2949
|
-
false,
|
|
2950
|
-
null,
|
|
2951
|
-
"7a394a58",
|
|
2952
|
-
null,
|
|
2953
|
-
null
|
|
2954
|
-
);
|
|
2955
|
-
const NcSearchResult = __component__$3.exports;
|
|
2956
|
-
register(t27, t34, t36);
|
|
2957
|
-
const LIMIT = 5;
|
|
2958
|
-
const _sfc_main$2 = {
|
|
2959
|
-
name: "NcSearch",
|
|
2960
|
-
components: {
|
|
2961
|
-
LinkVariantIcon,
|
|
2962
|
-
DotsHorizontalIcon: DotsHorizontal,
|
|
2963
|
-
NcEmptyContent,
|
|
2964
|
-
NcSelect,
|
|
2965
|
-
NcSearchResult
|
|
2966
|
-
},
|
|
2967
|
-
props: {
|
|
2968
|
-
/**
|
|
2969
|
-
* The selected reference provider
|
|
2970
|
-
*/
|
|
2971
|
-
provider: {
|
|
2972
|
-
type: Object,
|
|
2973
|
-
required: true
|
|
2974
|
-
},
|
|
2975
|
-
showEmptyContent: {
|
|
2976
|
-
type: Boolean,
|
|
2977
|
-
default: true
|
|
2978
|
-
},
|
|
2979
|
-
searchPlaceholder: {
|
|
2980
|
-
type: String,
|
|
2981
|
-
default: null
|
|
2982
|
-
}
|
|
2983
|
-
},
|
|
2984
|
-
emits: [
|
|
2985
|
-
"submit"
|
|
2986
|
-
],
|
|
2987
|
-
data() {
|
|
2988
|
-
return {
|
|
2989
|
-
searchQuery: "",
|
|
2990
|
-
selectedResult: null,
|
|
2991
|
-
resultsBySearchProvider: {},
|
|
2992
|
-
searching: false,
|
|
2993
|
-
searchingMoreOf: null,
|
|
2994
|
-
abortController: null,
|
|
2995
|
-
noOptionsText: t("Start typing to search"),
|
|
2996
|
-
providerIconAlt: t("Provider icon")
|
|
2997
|
-
};
|
|
2998
|
-
},
|
|
2999
|
-
computed: {
|
|
3000
|
-
mySearchPlaceholder() {
|
|
3001
|
-
return this.searchPlaceholder || t("Search");
|
|
3002
|
-
},
|
|
3003
|
-
searchProviderIds() {
|
|
3004
|
-
return this.provider.search_providers_ids;
|
|
3005
|
-
},
|
|
3006
|
-
options() {
|
|
3007
|
-
if (this.searchQuery === "") {
|
|
3008
|
-
return [];
|
|
3009
|
-
}
|
|
3010
|
-
const options = [];
|
|
3011
|
-
if (isUrl(this.searchQuery)) {
|
|
3012
|
-
options.push(this.rawLinkEntry);
|
|
3013
|
-
}
|
|
3014
|
-
options.push(...this.formattedSearchResults);
|
|
3015
|
-
return options;
|
|
3016
|
-
},
|
|
3017
|
-
rawLinkEntry() {
|
|
3018
|
-
return {
|
|
3019
|
-
id: "rawLinkEntry",
|
|
3020
|
-
resourceUrl: this.searchQuery,
|
|
3021
|
-
isRawLink: true
|
|
3022
|
-
};
|
|
3023
|
-
},
|
|
3024
|
-
formattedSearchResults() {
|
|
3025
|
-
const results = [];
|
|
3026
|
-
this.searchProviderIds.forEach((pid) => {
|
|
3027
|
-
if (this.resultsBySearchProvider[pid].entries.length > 0) {
|
|
3028
|
-
if (this.searchProviderIds.length > 1 || this.resultsBySearchProvider[pid].entries.length > 1) {
|
|
3029
|
-
results.push({
|
|
3030
|
-
id: "groupTitle-" + pid,
|
|
3031
|
-
name: this.resultsBySearchProvider[pid].name,
|
|
3032
|
-
isCustomGroupTitle: true,
|
|
3033
|
-
providerId: pid
|
|
3034
|
-
});
|
|
3035
|
-
}
|
|
3036
|
-
const providerEntriesWithId = this.resultsBySearchProvider[pid].entries.map((entry, index) => {
|
|
3037
|
-
return {
|
|
3038
|
-
id: "provider-" + pid + "-entry-" + index,
|
|
3039
|
-
...entry
|
|
3040
|
-
};
|
|
3041
|
-
});
|
|
3042
|
-
results.push(...providerEntriesWithId);
|
|
3043
|
-
if (this.resultsBySearchProvider[pid].isPaginated) {
|
|
3044
|
-
results.push({
|
|
3045
|
-
id: "moreOf-" + pid,
|
|
3046
|
-
name: this.resultsBySearchProvider[pid].name,
|
|
3047
|
-
isMore: true,
|
|
3048
|
-
providerId: pid,
|
|
3049
|
-
isLoading: this.searchingMoreOf === pid
|
|
3050
|
-
});
|
|
3051
|
-
}
|
|
3052
|
-
}
|
|
3053
|
-
});
|
|
3054
|
-
return results;
|
|
3055
|
-
}
|
|
3056
|
-
},
|
|
3057
|
-
mounted() {
|
|
3058
|
-
this.resetResults();
|
|
3059
|
-
},
|
|
3060
|
-
beforeDestroy() {
|
|
3061
|
-
this.cancelSearchRequests();
|
|
3062
|
-
},
|
|
3063
|
-
methods: {
|
|
3064
|
-
t,
|
|
3065
|
-
resetResults() {
|
|
3066
|
-
const resultsBySearchProvider = {};
|
|
3067
|
-
this.searchProviderIds.forEach((pid) => {
|
|
3068
|
-
resultsBySearchProvider[pid] = {
|
|
3069
|
-
entries: []
|
|
3070
|
-
};
|
|
3071
|
-
});
|
|
3072
|
-
this.resultsBySearchProvider = resultsBySearchProvider;
|
|
3073
|
-
},
|
|
3074
|
-
focus() {
|
|
3075
|
-
setTimeout(() => {
|
|
3076
|
-
var _a, _b, _c;
|
|
3077
|
-
(_c = (_b = (_a = this.$refs["search-select"]) == null ? void 0 : _a.$el) == null ? void 0 : _b.querySelector("#search-select-input")) == null ? void 0 : _c.focus();
|
|
3078
|
-
}, 300);
|
|
3079
|
-
},
|
|
3080
|
-
cancelSearchRequests() {
|
|
3081
|
-
if (this.abortController) {
|
|
3082
|
-
this.abortController.abort();
|
|
3083
|
-
}
|
|
3084
|
-
},
|
|
3085
|
-
onSearchInput(query, loading) {
|
|
3086
|
-
this.searchQuery = query;
|
|
3087
|
-
delay(() => {
|
|
3088
|
-
this.updateSearch();
|
|
3089
|
-
}, 500)();
|
|
3090
|
-
},
|
|
3091
|
-
onSelectResultSelected(item) {
|
|
3092
|
-
if (item !== null) {
|
|
3093
|
-
if (item.resourceUrl) {
|
|
3094
|
-
this.cancelSearchRequests();
|
|
3095
|
-
this.$emit("submit", item.resourceUrl);
|
|
3096
|
-
} else if (item.isMore) {
|
|
3097
|
-
this.searchMoreOf(item.providerId).then(() => {
|
|
3098
|
-
this.selectedResult = null;
|
|
3099
|
-
});
|
|
3100
|
-
}
|
|
3101
|
-
}
|
|
3102
|
-
},
|
|
3103
|
-
searchMoreOf(searchProviderId) {
|
|
3104
|
-
this.searchingMoreOf = searchProviderId;
|
|
3105
|
-
this.cancelSearchRequests();
|
|
3106
|
-
return this.searchProviders(searchProviderId);
|
|
3107
|
-
},
|
|
3108
|
-
updateSearch() {
|
|
3109
|
-
this.cancelSearchRequests();
|
|
3110
|
-
this.resetResults();
|
|
3111
|
-
if (this.searchQuery === "") {
|
|
3112
|
-
this.searching = false;
|
|
3113
|
-
return;
|
|
3114
|
-
}
|
|
3115
|
-
return this.searchProviders();
|
|
3116
|
-
},
|
|
3117
|
-
searchProviders(searchProviderId = null) {
|
|
3118
|
-
var _a, _b;
|
|
3119
|
-
this.abortController = new AbortController();
|
|
3120
|
-
this.searching = true;
|
|
3121
|
-
const searchPromises = searchProviderId === null ? [...this.searchProviderIds].map((pid) => {
|
|
3122
|
-
return this.searchOneProvider(pid);
|
|
3123
|
-
}) : [this.searchOneProvider(searchProviderId, (_b = (_a = this.resultsBySearchProvider[searchProviderId]) == null ? void 0 : _a.cursor) != null ? _b : null)];
|
|
3124
|
-
return Promise.allSettled(searchPromises).then((promises) => {
|
|
3125
|
-
const isOneCanceled = !!promises.find((p) => {
|
|
3126
|
-
return p.status === "rejected" && (p.reason.name === "CanceledError" || p.reason.code === "ERR_CANCELED");
|
|
3127
|
-
});
|
|
3128
|
-
if (!isOneCanceled) {
|
|
3129
|
-
this.searching = false;
|
|
3130
|
-
this.searchingMoreOf = null;
|
|
3131
|
-
}
|
|
3132
|
-
});
|
|
3133
|
-
},
|
|
3134
|
-
searchOneProvider(providerId, cursor = null) {
|
|
3135
|
-
const url = cursor === null ? generateOcsUrl("search/providers/{providerId}/search?term={term}&limit={limit}", { providerId, term: this.searchQuery, limit: LIMIT }) : generateOcsUrl("search/providers/{providerId}/search?term={term}&limit={limit}&cursor={cursor}", { providerId, term: this.searchQuery, limit: LIMIT, cursor });
|
|
3136
|
-
return axios.get(url, {
|
|
3137
|
-
signal: this.abortController.signal
|
|
3138
|
-
}).then((response) => {
|
|
3139
|
-
const data = response.data.ocs.data;
|
|
3140
|
-
this.resultsBySearchProvider[providerId].name = data.name;
|
|
3141
|
-
this.resultsBySearchProvider[providerId].cursor = data.cursor;
|
|
3142
|
-
this.resultsBySearchProvider[providerId].isPaginated = data.isPaginated;
|
|
3143
|
-
this.resultsBySearchProvider[providerId].entries.push(...data.entries);
|
|
3144
|
-
});
|
|
3145
|
-
}
|
|
3146
|
-
}
|
|
3147
|
-
};
|
|
3148
|
-
var _sfc_render$2 = function render9() {
|
|
3149
|
-
var _vm = this, _c = _vm._self._c;
|
|
3150
|
-
return _c("div", { staticClass: "smart-picker-search", class: { "with-empty-content": _vm.showEmptyContent } }, [_c("NcSelect", { ref: "search-select", staticClass: "smart-picker-search--select", attrs: { "input-id": "search-select-input", "label": "name", "placeholder": _vm.mySearchPlaceholder, "options": _vm.options, "append-to-body": false, "close-on-select": false, "clear-search-on-select": false, "clear-search-on-blur": () => false, "reset-focus-on-options-change": false, "filterable": false, "autoscroll": true, "reset-on-options-change": false, "loading": _vm.searching }, on: { "search": _vm.onSearchInput, "input": _vm.onSelectResultSelected }, scopedSlots: _vm._u([{ key: "option", fn: function(option) {
|
|
3151
|
-
return [option.isRawLink ? _c("div", { staticClass: "custom-option" }, [_c("LinkVariantIcon", { staticClass: "option-simple-icon", attrs: { "size": 20 } }), _c("span", { staticClass: "option-text" }, [_vm._v(" " + _vm._s(_vm.t("Raw link {options}", { options: option.resourceUrl })) + " ")])], 1) : option.resourceUrl ? _c("NcSearchResult", { staticClass: "search-result", attrs: { "entry": option, "query": _vm.searchQuery } }) : option.isCustomGroupTitle ? _c("span", { staticClass: "custom-option group-name" }, [_vm.provider.icon_url ? _c("img", { staticClass: "provider-icon group-name-icon", attrs: { "src": _vm.provider.icon_url } }) : _vm._e(), _c("span", { staticClass: "option-text" }, [_c("strong", [_vm._v(_vm._s(option.name))])])]) : option.isMore ? _c("span", { class: { "custom-option": true } }, [option.isLoading ? _c("span", { staticClass: "option-simple-icon icon-loading-small" }) : _c("DotsHorizontalIcon", { staticClass: "option-simple-icon", attrs: { "size": 20 } }), _c("span", { staticClass: "option-text" }, [_vm._v(" " + _vm._s(_vm.t('Load more "{options}"', { options: option.name })) + " ")])], 1) : _vm._e()];
|
|
3152
|
-
} }, { key: "no-options", fn: function() {
|
|
3153
|
-
return [_vm._v(" " + _vm._s(_vm.noOptionsText) + " ")];
|
|
3154
|
-
}, proxy: true }]), model: { value: _vm.selectedResult, callback: function($$v) {
|
|
3155
|
-
_vm.selectedResult = $$v;
|
|
3156
|
-
}, expression: "selectedResult" } }), _vm.showEmptyContent ? _c("NcEmptyContent", { staticClass: "smart-picker-search--empty-content", scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
3157
|
-
return [_vm.provider.icon_url ? _c("img", { staticClass: "provider-icon", attrs: { "alt": _vm.providerIconAlt, "src": _vm.provider.icon_url } }) : _c("LinkVariantIcon")];
|
|
3158
|
-
}, proxy: true }], null, false, 2922132592) }) : _vm._e()], 1);
|
|
3159
|
-
};
|
|
3160
|
-
var _sfc_staticRenderFns$2 = [];
|
|
3161
|
-
var __component__$2 = /* @__PURE__ */ normalizeComponent(
|
|
3162
|
-
_sfc_main$2,
|
|
3163
|
-
_sfc_render$2,
|
|
3164
|
-
_sfc_staticRenderFns$2,
|
|
3165
|
-
false,
|
|
3166
|
-
null,
|
|
3167
|
-
"97d196f0",
|
|
3168
|
-
null,
|
|
3169
|
-
null
|
|
3170
|
-
);
|
|
3171
|
-
const NcSearch = __component__$2.exports;
|
|
3172
|
-
const MODES = {
|
|
3173
|
-
providerList: 1,
|
|
3174
|
-
standardLinkInput: 2,
|
|
3175
|
-
searchInput: 3,
|
|
3176
|
-
customElement: 4
|
|
3177
|
-
};
|
|
3178
|
-
const _sfc_main$1 = {
|
|
3179
|
-
name: "NcReferencePicker",
|
|
3180
|
-
components: {
|
|
3181
|
-
NcCustomPickerElement,
|
|
3182
|
-
NcProviderList,
|
|
3183
|
-
NcRawLinkInput,
|
|
3184
|
-
NcSearch
|
|
3185
|
-
},
|
|
3186
|
-
props: {
|
|
3187
|
-
/**
|
|
3188
|
-
* Provider to select on creation
|
|
3189
|
-
* Default: null. Show the provider list
|
|
3190
|
-
*/
|
|
3191
|
-
initialProvider: {
|
|
3192
|
-
type: Object,
|
|
3193
|
-
default: () => null
|
|
3194
|
-
},
|
|
3195
|
-
/**
|
|
3196
|
-
* Optional width in pixels
|
|
3197
|
-
* Default: 100%
|
|
3198
|
-
*/
|
|
3199
|
-
width: {
|
|
3200
|
-
type: Number,
|
|
3201
|
-
default: null
|
|
3202
|
-
},
|
|
3203
|
-
/**
|
|
3204
|
-
* Focus on the provider list select input on creation
|
|
3205
|
-
* Default: true
|
|
3206
|
-
*/
|
|
3207
|
-
focusOnCreate: {
|
|
3208
|
-
type: Boolean,
|
|
3209
|
-
default: true
|
|
3210
|
-
}
|
|
3211
|
-
},
|
|
3212
|
-
emits: [
|
|
3213
|
-
"cancel",
|
|
3214
|
-
"cancel-raw-link",
|
|
3215
|
-
"cancel-search",
|
|
3216
|
-
"provider-selected",
|
|
3217
|
-
"submit"
|
|
3218
|
-
],
|
|
3219
|
-
data() {
|
|
3220
|
-
return {
|
|
3221
|
-
MODES,
|
|
3222
|
-
selectedProvider: this.initialProvider
|
|
3223
|
-
};
|
|
3224
|
-
},
|
|
3225
|
-
computed: {
|
|
3226
|
-
mode() {
|
|
3227
|
-
return this.selectedProvider === null ? MODES.providerList : isCustomPickerElementRegistered(this.selectedProvider.id) ? MODES.customElement : this.selectedProvider.search_providers_ids ? MODES.searchInput : MODES.standardLinkInput;
|
|
3228
|
-
},
|
|
3229
|
-
pickerWrapperStyle() {
|
|
3230
|
-
return {
|
|
3231
|
-
width: this.width ? this.width + "px" : void 0
|
|
3232
|
-
};
|
|
3233
|
-
}
|
|
3234
|
-
},
|
|
3235
|
-
mounted() {
|
|
3236
|
-
if (this.focusOnCreate) {
|
|
3237
|
-
if (this.initialProvider) {
|
|
3238
|
-
setTimeout(() => {
|
|
3239
|
-
var _a;
|
|
3240
|
-
(_a = this.$refs["url-input"]) == null ? void 0 : _a.focus();
|
|
3241
|
-
}, 300);
|
|
3242
|
-
} else {
|
|
3243
|
-
this.$nextTick(() => {
|
|
3244
|
-
var _a;
|
|
3245
|
-
(_a = this.$refs["provider-list"]) == null ? void 0 : _a.focus();
|
|
3246
|
-
});
|
|
3247
|
-
}
|
|
3248
|
-
}
|
|
3249
|
-
},
|
|
3250
|
-
methods: {
|
|
3251
|
-
onEscapePressed() {
|
|
3252
|
-
if (this.selectedProvider !== null) {
|
|
3253
|
-
this.deselectProvider();
|
|
3254
|
-
} else {
|
|
3255
|
-
this.cancelProviderSelection();
|
|
3256
|
-
}
|
|
3257
|
-
},
|
|
3258
|
-
onProviderSelected(provider) {
|
|
3259
|
-
this.selectedProvider = provider;
|
|
3260
|
-
this.$emit("provider-selected", provider);
|
|
3261
|
-
this.$nextTick(() => {
|
|
3262
|
-
var _a;
|
|
3263
|
-
(_a = this.$refs["url-input"]) == null ? void 0 : _a.focus();
|
|
3264
|
-
});
|
|
3265
|
-
},
|
|
3266
|
-
cancelCustomElement() {
|
|
3267
|
-
this.deselectProvider();
|
|
3268
|
-
},
|
|
3269
|
-
cancelSearch() {
|
|
3270
|
-
var _a;
|
|
3271
|
-
this.$emit("cancel-search", (_a = this.selectedProvider) == null ? void 0 : _a.title);
|
|
3272
|
-
this.deselectProvider();
|
|
3273
|
-
},
|
|
3274
|
-
cancelRawLinkInput() {
|
|
3275
|
-
var _a;
|
|
3276
|
-
this.$emit("cancel-raw-link", (_a = this.selectedProvider) == null ? void 0 : _a.title);
|
|
3277
|
-
this.deselectProvider();
|
|
3278
|
-
},
|
|
3279
|
-
cancelProviderSelection() {
|
|
3280
|
-
this.$emit("cancel");
|
|
3281
|
-
},
|
|
3282
|
-
submitLink(link) {
|
|
3283
|
-
if (this.selectedProvider !== null) {
|
|
3284
|
-
touchProvider(this.selectedProvider.id);
|
|
3285
|
-
}
|
|
3286
|
-
this.$emit("submit", link);
|
|
3287
|
-
this.deselectProvider();
|
|
3288
|
-
},
|
|
3289
|
-
deselectProvider() {
|
|
3290
|
-
this.selectedProvider = null;
|
|
3291
|
-
this.$emit("provider-selected", null);
|
|
3292
|
-
setTimeout(() => {
|
|
3293
|
-
var _a;
|
|
3294
|
-
(_a = this.$refs["provider-list"]) == null ? void 0 : _a.focus();
|
|
3295
|
-
}, 300);
|
|
3296
|
-
}
|
|
3297
|
-
}
|
|
3298
|
-
};
|
|
3299
|
-
var _sfc_render$1 = function render10() {
|
|
3300
|
-
var _vm = this, _c = _vm._self._c;
|
|
3301
|
-
return _c("div", { staticClass: "reference-picker", style: _vm.pickerWrapperStyle, attrs: { "tabindex": "-1" }, on: { "keydown": function($event) {
|
|
3302
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"]))
|
|
3303
|
-
return null;
|
|
3304
|
-
$event.stopPropagation();
|
|
3305
|
-
$event.preventDefault();
|
|
3306
|
-
return _vm.onEscapePressed.apply(null, arguments);
|
|
3307
|
-
} } }, [_vm.mode === _vm.MODES.providerList ? _c("NcProviderList", { ref: "provider-list", on: { "select-provider": _vm.onProviderSelected, "submit": _vm.submitLink, "cancel": _vm.cancelProviderSelection } }) : _vm.mode === _vm.MODES.standardLinkInput ? _c("NcRawLinkInput", { ref: "url-input", attrs: { "provider": _vm.selectedProvider }, on: { "submit": _vm.submitLink, "cancel": _vm.cancelRawLinkInput } }) : _vm.mode === _vm.MODES.searchInput ? _c("NcSearch", { ref: "url-input", attrs: { "provider": _vm.selectedProvider }, on: { "cancel": _vm.cancelSearch, "submit": _vm.submitLink } }) : _vm.mode === _vm.MODES.customElement ? _c("div", { staticClass: "custom-element-wrapper" }, [_c("NcCustomPickerElement", { attrs: { "provider": _vm.selectedProvider }, on: { "submit": _vm.submitLink, "cancel": _vm.cancelCustomElement } })], 1) : _vm._e()], 1);
|
|
3308
|
-
};
|
|
3309
|
-
var _sfc_staticRenderFns$1 = [];
|
|
3310
|
-
var __component__$1 = /* @__PURE__ */ normalizeComponent(
|
|
3311
|
-
_sfc_main$1,
|
|
3312
|
-
_sfc_render$1,
|
|
3313
|
-
_sfc_staticRenderFns$1,
|
|
3314
|
-
false,
|
|
3315
|
-
null,
|
|
3316
|
-
"12c38c93",
|
|
3317
|
-
null,
|
|
3318
|
-
null
|
|
3319
|
-
);
|
|
3320
|
-
const NcReferencePicker = __component__$1.exports;
|
|
3321
|
-
register(t11, t16);
|
|
3322
|
-
const _sfc_main = {
|
|
3323
|
-
name: "NcReferencePickerModal",
|
|
3324
|
-
components: {
|
|
3325
|
-
NcReferencePicker,
|
|
3326
|
-
NcModal,
|
|
3327
|
-
NcButton,
|
|
3328
|
-
ArrowLeftIcon: ArrowLeft,
|
|
3329
|
-
CloseIcon: Close
|
|
3330
|
-
},
|
|
3331
|
-
props: {
|
|
3332
|
-
/**
|
|
3333
|
-
* Provider to select on creation
|
|
3334
|
-
* Show the provider list if no initial one is provided
|
|
3335
|
-
*/
|
|
3336
|
-
initialProvider: {
|
|
3337
|
-
type: Object,
|
|
3338
|
-
default: () => null
|
|
3339
|
-
},
|
|
3340
|
-
/**
|
|
3341
|
-
* Focus on the input item on create
|
|
3342
|
-
*/
|
|
3343
|
-
focusOnCreate: {
|
|
3344
|
-
type: Boolean,
|
|
3345
|
-
default: true
|
|
3346
|
-
},
|
|
3347
|
-
/**
|
|
3348
|
-
* If true, add the modal content to the Viewer trap elements via the event-bus
|
|
3349
|
-
*/
|
|
3350
|
-
isInsideViewer: {
|
|
3351
|
-
type: Boolean,
|
|
3352
|
-
default: false
|
|
3353
|
-
}
|
|
3354
|
-
},
|
|
3355
|
-
emits: [
|
|
3356
|
-
"cancel",
|
|
3357
|
-
"submit"
|
|
3358
|
-
],
|
|
3359
|
-
data() {
|
|
3360
|
-
return {
|
|
3361
|
-
show: true,
|
|
3362
|
-
selectedProvider: this.initialProvider,
|
|
3363
|
-
backButtonTitle: t("Back to provider selection"),
|
|
3364
|
-
closeButtonTitle: t("Close"),
|
|
3365
|
-
closeButtonLabel: t("Close Smart Picker")
|
|
3366
|
-
};
|
|
3367
|
-
},
|
|
3368
|
-
computed: {
|
|
3369
|
-
isProviderSelected() {
|
|
3370
|
-
return this.selectedProvider !== null;
|
|
3371
|
-
},
|
|
3372
|
-
showBackButton() {
|
|
3373
|
-
return this.initialProvider === null && this.isProviderSelected;
|
|
3374
|
-
},
|
|
3375
|
-
modalSize() {
|
|
3376
|
-
var _a;
|
|
3377
|
-
return this.isProviderSelected && isCustomPickerElementRegistered(this.selectedProvider.id) ? (_a = getCustomPickerElementSize(this.selectedProvider.id)) != null ? _a : "large" : "normal";
|
|
3378
|
-
},
|
|
3379
|
-
showModalName() {
|
|
3380
|
-
return !this.isProviderSelected || !isCustomPickerElementRegistered(this.selectedProvider.id);
|
|
3381
|
-
},
|
|
3382
|
-
modalName() {
|
|
3383
|
-
return this.isProviderSelected ? this.selectedProvider.title : t("Smart Picker");
|
|
3384
|
-
}
|
|
3385
|
-
},
|
|
3386
|
-
mounted() {
|
|
3387
|
-
if (this.isInsideViewer) {
|
|
3388
|
-
const elem = this.$refs.modal_content;
|
|
3389
|
-
emit("viewer:trapElements:changed", elem);
|
|
3390
|
-
}
|
|
3391
|
-
},
|
|
3392
|
-
methods: {
|
|
3393
|
-
onCancel() {
|
|
3394
|
-
this.show = false;
|
|
3395
|
-
this.$emit("cancel");
|
|
3396
|
-
},
|
|
3397
|
-
onSubmit(value) {
|
|
3398
|
-
this.show = false;
|
|
3399
|
-
this.$emit("submit", value);
|
|
3400
|
-
},
|
|
3401
|
-
onProviderSelect(provider) {
|
|
3402
|
-
this.selectedProvider = provider;
|
|
3403
|
-
if (provider === null && this.initialProvider !== null) {
|
|
3404
|
-
this.onCancel();
|
|
3405
|
-
}
|
|
3406
|
-
},
|
|
3407
|
-
onBackClicked() {
|
|
3408
|
-
this.$refs.referencePicker.deselectProvider();
|
|
3409
|
-
}
|
|
3410
|
-
}
|
|
3411
|
-
};
|
|
3412
|
-
var _sfc_render = function render11() {
|
|
3413
|
-
var _vm = this, _c = _vm._self._c;
|
|
3414
|
-
return _vm.show ? _c("NcModal", { staticClass: "reference-picker-modal", attrs: { "size": _vm.modalSize, "can-close": false }, on: { "close": _vm.onCancel } }, [_c("div", { ref: "modal_content", staticClass: "reference-picker-modal--content" }, [_vm.showBackButton ? _c("NcButton", { staticClass: "back-button", attrs: { "aria-label": _vm.backButtonTitle, "title": _vm.backButtonTitle }, on: { "click": _vm.onBackClicked }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
3415
|
-
return [_c("ArrowLeftIcon")];
|
|
3416
|
-
}, proxy: true }], null, false, 3001860362) }) : _vm._e(), _c("NcButton", { staticClass: "close-button", attrs: { "aria-label": _vm.closeButtonLabel, "title": _vm.closeButtonTitle, "type": "tertiary" }, on: { "click": _vm.onCancel }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
3417
|
-
return [_c("CloseIcon")];
|
|
3418
|
-
}, proxy: true }], null, false, 2491825086) }), _vm.showModalName ? _c("h2", [_vm._v(" " + _vm._s(_vm.modalName) + " ")]) : _vm._e(), _c("NcReferencePicker", { ref: "referencePicker", attrs: { "initial-provider": _vm.initialProvider, "focus-on-create": _vm.focusOnCreate }, on: { "provider-selected": _vm.onProviderSelect, "submit": _vm.onSubmit, "cancel": _vm.onCancel } })], 1)]) : _vm._e();
|
|
3419
|
-
};
|
|
3420
|
-
var _sfc_staticRenderFns = [];
|
|
3421
|
-
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
3422
|
-
_sfc_main,
|
|
3423
|
-
_sfc_render,
|
|
3424
|
-
_sfc_staticRenderFns,
|
|
3425
|
-
false,
|
|
3426
|
-
null,
|
|
3427
|
-
"ab09ebaa",
|
|
3428
|
-
null,
|
|
3429
|
-
null
|
|
3430
|
-
);
|
|
3431
|
-
const NcReferencePickerModal = __component__.exports;
|
|
3432
|
-
async function getLinkWithPicker(providerId = null, isInsideViewer = void 0) {
|
|
3433
|
-
return await new Promise((resolve2, reject) => {
|
|
3434
|
-
var _a;
|
|
3435
|
-
const modalId = "referencePickerModal";
|
|
3436
|
-
const modalElement = document.createElement("div");
|
|
3437
|
-
modalElement.id = modalId;
|
|
3438
|
-
document.body.append(modalElement);
|
|
3439
|
-
const initialProvider = providerId === null ? null : (_a = getProvider(providerId)) != null ? _a : null;
|
|
3440
|
-
const View2 = Vue.extend(NcReferencePickerModal);
|
|
3441
|
-
const view = new View2({
|
|
3442
|
-
propsData: {
|
|
3443
|
-
initialProvider,
|
|
3444
|
-
isInsideViewer
|
|
3445
|
-
}
|
|
3446
|
-
}).$mount(modalElement);
|
|
3447
|
-
view.$on("cancel", () => {
|
|
3448
|
-
view.$destroy();
|
|
3449
|
-
reject(new Error("User cancellation"));
|
|
3450
|
-
});
|
|
3451
|
-
view.$on("submit", (link) => {
|
|
3452
|
-
view.$destroy();
|
|
3453
|
-
resolve2(link);
|
|
3454
|
-
});
|
|
3455
|
-
});
|
|
3456
|
-
}
|
|
3457
|
-
export {
|
|
3458
|
-
Link as L,
|
|
3459
|
-
NcReferenceWidget as N,
|
|
3460
|
-
anyLinkProviderId as a,
|
|
3461
|
-
getProvider as b,
|
|
3462
|
-
getProviders as c,
|
|
3463
|
-
searchProvider as d,
|
|
3464
|
-
NcReferencePicker as e,
|
|
3465
|
-
NcReferencePickerModal as f,
|
|
3466
|
-
getLinkWithPicker as g,
|
|
3467
|
-
NcSearch as h,
|
|
3468
|
-
sortProviders as s
|
|
3469
|
-
};
|