tuikit-atomicx-vue3 0.1.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/README.md +0 -0
- package/dist/AttachmentPicker.module-0_DWsAtr.js +11 -0
- package/dist/AttachmentPicker.vue_vue_type_script_setup_true_lang-B9tVChd9.js +89 -0
- package/dist/AudioRequestDialog.vue_vue_type_script_setup_true_lang-BmX-qsat.js +108 -0
- package/dist/CustomMessage.vue_vue_type_script_setup_true_lang-By3MsAd0.js +12 -0
- package/dist/CustomMessage.vue_vue_type_script_setup_true_lang-CoK94Qxs.js +12 -0
- package/dist/DialogPortal-8bLejP4P.js +496 -0
- package/dist/FilePicker.vue_vue_type_script_setup_true_lang-D0cP-aFi.js +71 -0
- package/dist/GroupTipMessage.vue_vue_type_style_index_0_lang-BqyPcZln.js +30 -0
- package/dist/GroupTipMessage.vue_vue_type_style_index_0_lang-Dw2-5Ner.js +30 -0
- package/dist/ImagePicker.vue_vue_type_script_setup_true_lang-DzBHwcSi.js +71 -0
- package/dist/MaterialRenameDialog.vue_vue_type_script_setup_true_lang-Cmhf2QX4.js +43 -0
- package/dist/Message.vue_vue_type_script_setup_true_lang-BV0PxtjX.js +32 -0
- package/dist/Message.vue_vue_type_script_setup_true_lang-mEw2syBo.js +23 -0
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Ca6-JH93.js +123 -0
- package/dist/PopoverTrigger-BhQt39dx.js +679 -0
- package/dist/PopperContent-C59duB_H.js +2219 -0
- package/dist/QuotedMessagePreview.vue_vue_type_script_setup_true_lang-C8lXN2Qm.js +91 -0
- package/dist/SendButton.vue_vue_type_script_setup_true_lang-BqIeqUyN.js +35 -0
- package/dist/Teleport-BnT1MTUO.js +1366 -0
- package/dist/TextEditor.vue_vue_type_script_setup_true_lang-w_I4bsmJ.js +126 -0
- package/dist/TextEditor.vue_vue_type_script_setup_true_lang-yXW1iVZ1.js +98 -0
- package/dist/VideoPicker.vue_vue_type_script_setup_true_lang-DAv8_NWh.js +71 -0
- package/dist/VideoRequestDialog.vue_vue_type_script_setup_true_lang-CnE-LwNh.js +108 -0
- package/dist/_commonjsHelpers-CUmg6egw.js +6 -0
- package/dist/_plugin-vue_export-helper-1tPrXgE0.js +10 -0
- package/dist/baseComp/ActionSheep.js +92 -0
- package/dist/baseComp/ActionSheep.vue.d.ts +65 -0
- package/dist/baseComp/AudioIcon.js +48 -0
- package/dist/baseComp/AudioIcon.vue.d.ts +18 -0
- package/dist/baseComp/Avatar.js +36 -0
- package/dist/baseComp/Avatar.vue.d.ts +14 -0
- package/dist/baseComp/Dialog/DialogH5.js +99 -0
- package/dist/baseComp/Dialog/DialogH5.vue.d.ts +75 -0
- package/dist/baseComp/Dialog/DialogPC.js +148 -0
- package/dist/baseComp/Dialog/DialogPC.vue.d.ts +95 -0
- package/dist/baseComp/Dialog/index.d.ts +3 -0
- package/dist/baseComp/Dialog/index.js +4 -0
- package/dist/baseComp/IconButton.js +71 -0
- package/dist/baseComp/IconButton.vue.d.ts +78 -0
- package/dist/baseComp/Input/InputH5.js +163 -0
- package/dist/baseComp/Input/InputH5.vue.d.ts +83 -0
- package/dist/baseComp/Input/InputPC.js +163 -0
- package/dist/baseComp/Input/InputPC.vue.d.ts +83 -0
- package/dist/baseComp/Input/InputWX.js +166 -0
- package/dist/baseComp/Input/InputWX.vue.d.ts +83 -0
- package/dist/baseComp/Input/index.d.ts +207 -0
- package/dist/baseComp/Input/index.js +7 -0
- package/dist/baseComp/MessageBox/index.d.ts +12 -0
- package/dist/baseComp/MessageBox/index.js +187 -0
- package/dist/baseComp/MessageBox/index.vue.d.ts +58 -0
- package/dist/baseComp/Modal/Modal.js +54 -0
- package/dist/baseComp/Modal/Modal.vue.d.ts +52 -0
- package/dist/baseComp/Modal/index.d.ts +4 -0
- package/dist/baseComp/Modal/index.js +5 -0
- package/dist/baseComp/ObserverView/ObserverView.js +111 -0
- package/dist/baseComp/ObserverView/ObserverView.vue.d.ts +77 -0
- package/dist/baseComp/ObserverView/index.d.ts +3 -0
- package/dist/baseComp/ObserverView/index.js +4 -0
- package/dist/baseComp/Option/OptionH5.js +59 -0
- package/dist/baseComp/Option/OptionH5.vue.d.ts +30 -0
- package/dist/baseComp/Option/OptionPC.js +59 -0
- package/dist/baseComp/Option/OptionPC.vue.d.ts +27 -0
- package/dist/baseComp/Option/OptionWX.js +60 -0
- package/dist/baseComp/Option/OptionWX.vue.d.ts +30 -0
- package/dist/baseComp/Option/index.d.ts +3 -0
- package/dist/baseComp/Option/index.js +4 -0
- package/dist/baseComp/Select/SelectH5.js +100 -0
- package/dist/baseComp/Select/SelectPC.js +143 -0
- package/dist/baseComp/Select/SelectPC.vue.d.ts +35 -0
- package/dist/baseComp/Select/SelectWX.js +109 -0
- package/dist/baseComp/Select/index.d.ts +3 -0
- package/dist/baseComp/Select/index.js +4 -0
- package/dist/baseComp/SvgIcon.js +34 -0
- package/dist/baseComp/SvgIcon.vue.d.ts +32 -0
- package/dist/baseComp/TuiSwitch.js +28 -0
- package/dist/baseComp/TuiSwitch.vue.d.ts +18 -0
- package/dist/baseComp/View/View.js +42 -0
- package/dist/baseComp/View/View.vue.d.ts +55 -0
- package/dist/baseComp/View/index.d.ts +3 -0
- package/dist/baseComp/View/index.js +4 -0
- package/dist/baseComp/useZIndex.d.ts +4 -0
- package/dist/baseComp/useZIndex.js +17 -0
- package/dist/components/AudioSetting/AudioMediaControl.js +99 -0
- package/dist/components/AudioSetting/AudioMediaControl.vue.d.ts +6 -0
- package/dist/components/AudioSetting/AudioRequestDialog.js +4 -0
- package/dist/components/AudioSetting/AudioRequestDialog.vue.d.ts +2 -0
- package/dist/components/AudioSetting/AudioSettingTab.js +130 -0
- package/dist/components/AudioSetting/AudioSettingTab.vue.d.ts +2 -0
- package/dist/components/AudioSetting/MicrophoneSelect.js +71 -0
- package/dist/components/AudioSetting/MicrophoneSelect.vue.d.ts +29 -0
- package/dist/components/AudioSetting/SpeakerSelect.js +71 -0
- package/dist/components/AudioSetting/SpeakerSelect.vue.d.ts +29 -0
- package/dist/components/AudioSetting/index.d.ts +4 -0
- package/dist/components/AudioSetting/index.js +37 -0
- package/dist/components/AudioSetting/index.vue.d.ts +37 -0
- package/dist/components/AudioSettingPanel/i18n/en-US/index.d.ts +7 -0
- package/dist/components/AudioSettingPanel/i18n/en-US/index.js +10 -0
- package/dist/components/AudioSettingPanel/i18n/index.d.ts +4 -0
- package/dist/components/AudioSettingPanel/i18n/index.js +6 -0
- package/dist/components/AudioSettingPanel/i18n/zh-CN/index.d.ts +7 -0
- package/dist/components/AudioSettingPanel/i18n/zh-CN/index.js +10 -0
- package/dist/components/AudioSettingPanel/index.d.ts +3 -0
- package/dist/components/AudioSettingPanel/index.js +139 -0
- package/dist/components/AudioSettingPanel/index.vue.d.ts +2 -0
- package/dist/components/Avatar/Avatar.js +167 -0
- package/dist/components/Avatar/Avatar.vue.d.ts +95 -0
- package/dist/components/Avatar/AvatarBadge/AvatarBadge.js +40 -0
- package/dist/components/Avatar/AvatarBadge/AvatarBadge.vue.d.ts +51 -0
- package/dist/components/Avatar/AvatarBadge/index.d.ts +3 -0
- package/dist/components/Avatar/AvatarBadge/index.js +4 -0
- package/dist/components/Avatar/index.d.ts +4 -0
- package/dist/components/Avatar/index.js +4 -0
- package/dist/components/BarrageInput/BarrageInput.js +81 -0
- package/dist/components/BarrageInput/BarrageInput.vue.d.ts +59 -0
- package/dist/components/BarrageInput/BarrageInputH5.js +80 -0
- package/dist/components/BarrageInput/BarrageInputH5.vue.d.ts +53 -0
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +110 -0
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.vue.d.ts +17 -0
- package/dist/components/BarrageInput/EmojiPicker/index.d.ts +3 -0
- package/dist/components/BarrageInput/EmojiPicker/index.js +4 -0
- package/dist/components/BarrageInput/TextEditor/EditorCore.d.ts +16 -0
- package/dist/components/BarrageInput/TextEditor/EditorCore.js +148 -0
- package/dist/components/BarrageInput/TextEditor/TextEditor.js +4 -0
- package/dist/components/BarrageInput/TextEditor/TextEditor.vue.d.ts +52 -0
- package/dist/components/BarrageInput/TextEditor/index.d.ts +3 -0
- package/dist/components/BarrageInput/TextEditor/index.js +4 -0
- package/dist/components/BarrageInput/i18n/en-US/index.d.ts +5 -0
- package/dist/components/BarrageInput/i18n/en-US/index.js +8 -0
- package/dist/components/BarrageInput/i18n/index.d.ts +4 -0
- package/dist/components/BarrageInput/i18n/index.js +6 -0
- package/dist/components/BarrageInput/i18n/zh-CN/index.d.ts +5 -0
- package/dist/components/BarrageInput/i18n/zh-CN/index.js +8 -0
- package/dist/components/BarrageInput/index.d.ts +154 -0
- package/dist/components/BarrageInput/index.js +13 -0
- package/dist/components/BarrageList/BarrageList.js +231 -0
- package/dist/components/BarrageList/BarrageList.vue.d.ts +63 -0
- package/dist/components/BarrageList/BarrageListH5.js +227 -0
- package/dist/components/BarrageList/BarrageListH5.vue.d.ts +63 -0
- package/dist/components/BarrageList/ClickAction/UserActionMenu.js +113 -0
- package/dist/components/BarrageList/ClickAction/UserActionMenu.vue.d.ts +21 -0
- package/dist/components/BarrageList/Message/CustomMessage/CustomMessage.js +4 -0
- package/dist/components/BarrageList/Message/CustomMessage/CustomMessage.vue.d.ts +2 -0
- package/dist/components/BarrageList/Message/CustomMessage/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/CustomMessage/index.js +4 -0
- package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.js +28 -0
- package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.vue.d.ts +30 -0
- package/dist/components/BarrageList/Message/FaceMessage/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/FaceMessage/index.js +4 -0
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.js +4 -0
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +16 -0
- package/dist/components/BarrageList/Message/GroupTipMessage/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/GroupTipMessage/index.js +4 -0
- package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.js +95 -0
- package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.vue.d.ts +34 -0
- package/dist/components/BarrageList/Message/ImageMessage/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/ImageMessage/index.js +4 -0
- package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.js +9 -0
- package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.vue.d.ts +2 -0
- package/dist/components/BarrageList/Message/MergerMessage/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/MergerMessage/index.js +4 -0
- package/dist/components/BarrageList/Message/Message.js +4 -0
- package/dist/components/BarrageList/Message/Message.vue.d.ts +34 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.js +48 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue.d.ts +43 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/index.js +4 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.js +116 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.vue.d.ts +44 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.js +45 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue.d.ts +54 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +26 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue.d.ts +15 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.js +4 -0
- package/dist/components/BarrageList/Message/MessageLayout/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/MessageLayout/index.js +4 -0
- package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.js +49 -0
- package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue.d.ts +35 -0
- package/dist/components/BarrageList/Message/RecalledMessage/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/RecalledMessage/index.js +4 -0
- package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +120 -0
- package/dist/components/BarrageList/Message/TextMessage/TextMessage.vue.d.ts +36 -0
- package/dist/components/BarrageList/Message/TextMessage/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/TextMessage/index.js +4 -0
- package/dist/components/BarrageList/Message/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/index.js +4 -0
- package/dist/components/BarrageList/MessageForward/ForwardListItem.js +54 -0
- package/dist/components/BarrageList/MessageForward/ForwardListItem.vue.d.ts +17 -0
- package/dist/components/BarrageList/MessageForward/MessageForward.js +255 -0
- package/dist/components/BarrageList/MessageForward/MessageForward.vue.d.ts +2 -0
- package/dist/components/BarrageList/MessageForward/index.d.ts +3 -0
- package/dist/components/BarrageList/MessageForward/index.js +4 -0
- package/dist/components/BarrageList/MessageListContext.d.ts +3 -0
- package/dist/components/BarrageList/MessageListContext.js +13 -0
- package/dist/components/BarrageList/MessageTimeDivider/MessageTimeDivider.js +38 -0
- package/dist/components/BarrageList/MessageTimeDivider/MessageTimeDivider.vue.d.ts +34 -0
- package/dist/components/BarrageList/MessageTimeDivider/index.d.ts +3 -0
- package/dist/components/BarrageList/MessageTimeDivider/index.js +4 -0
- package/dist/components/BarrageList/i18n/en-US/index.d.ts +10 -0
- package/dist/components/BarrageList/i18n/en-US/index.js +13 -0
- package/dist/components/BarrageList/i18n/index.d.ts +4 -0
- package/dist/components/BarrageList/i18n/index.js +6 -0
- package/dist/components/BarrageList/i18n/zh-CN/index.d.ts +12 -0
- package/dist/components/BarrageList/i18n/zh-CN/index.js +15 -0
- package/dist/components/BarrageList/index.d.ts +74 -0
- package/dist/components/BarrageList/index.js +12 -0
- package/dist/components/CameraButton/index.d.ts +3 -0
- package/dist/components/CameraButton/index.js +4 -0
- package/dist/components/CameraButton/index.vue.d.ts +2 -0
- package/dist/components/CoGuestPanel/CoGuestPanel.js +285 -0
- package/dist/components/CoGuestPanel/CoGuestPanel.vue.d.ts +2 -0
- package/dist/components/CoGuestPanel/i18n/en-US/index.d.ts +16 -0
- package/dist/components/CoGuestPanel/i18n/en-US/index.js +19 -0
- package/dist/components/CoGuestPanel/i18n/index.d.ts +4 -0
- package/dist/components/CoGuestPanel/i18n/index.js +6 -0
- package/dist/components/CoGuestPanel/i18n/zh-CN/index.d.ts +16 -0
- package/dist/components/CoGuestPanel/i18n/zh-CN/index.js +19 -0
- package/dist/components/CoGuestPanel/index.d.ts +3 -0
- package/dist/components/CoGuestPanel/index.js +9 -0
- package/dist/components/ConversationList/ConversationList.js +36 -0
- package/dist/components/ConversationList/ConversationList.vue.d.ts +2 -0
- package/dist/components/ConversationList/index.d.ts +3 -0
- package/dist/components/ConversationList/index.js +4 -0
- package/dist/components/LiveAudienceList/LiveAudienceList.js +167 -0
- package/dist/components/LiveAudienceList/LiveAudienceList.vue.d.ts +31 -0
- package/dist/components/LiveAudienceList/LiveAudienceListH5.js +88 -0
- package/dist/components/LiveAudienceList/LiveAudienceListH5.vue.d.ts +31 -0
- package/dist/components/LiveAudienceList/UserActionMenu.js +177 -0
- package/dist/components/LiveAudienceList/UserActionMenu.vue.d.ts +21 -0
- package/dist/components/LiveAudienceList/i18n/en-US/index.d.ts +18 -0
- package/dist/components/LiveAudienceList/i18n/en-US/index.js +21 -0
- package/dist/components/LiveAudienceList/i18n/index.d.ts +4 -0
- package/dist/components/LiveAudienceList/i18n/index.js +6 -0
- package/dist/components/LiveAudienceList/i18n/zh-CN/index.d.ts +22 -0
- package/dist/components/LiveAudienceList/i18n/zh-CN/index.js +25 -0
- package/dist/components/LiveAudienceList/index.d.ts +41 -0
- package/dist/components/LiveAudienceList/index.js +12 -0
- package/dist/components/LiveList/LiveList.js +152 -0
- package/dist/components/LiveList/LiveList.vue.d.ts +8 -0
- package/dist/components/LiveList/LiveListH5.js +175 -0
- package/dist/components/LiveList/LiveListH5.vue.d.ts +8 -0
- package/dist/components/LiveList/i18n/en-US/index.d.ts +8 -0
- package/dist/components/LiveList/i18n/en-US/index.js +11 -0
- package/dist/components/LiveList/i18n/index.d.ts +4 -0
- package/dist/components/LiveList/i18n/index.js +6 -0
- package/dist/components/LiveList/i18n/zh-CN/index.d.ts +8 -0
- package/dist/components/LiveList/i18n/zh-CN/index.js +11 -0
- package/dist/components/LiveList/index.d.ts +6 -0
- package/dist/components/LiveList/index.js +12 -0
- package/dist/components/LiveMonitorView/LiveMonitorView.js +113 -0
- package/dist/components/LiveMonitorView/LiveMonitorView.vue.d.ts +16 -0
- package/dist/components/LiveMonitorView/i18n/en-US/index.d.ts +7 -0
- package/dist/components/LiveMonitorView/i18n/en-US/index.js +10 -0
- package/dist/components/LiveMonitorView/i18n/index.d.ts +4 -0
- package/dist/components/LiveMonitorView/i18n/index.js +6 -0
- package/dist/components/LiveMonitorView/i18n/zh-CN/index.d.ts +7 -0
- package/dist/components/LiveMonitorView/i18n/zh-CN/index.js +10 -0
- package/dist/components/LiveMonitorView/index.d.ts +3 -0
- package/dist/components/LiveMonitorView/index.js +9 -0
- package/dist/components/LiveScenePanel/CameraSettingDialog.js +215 -0
- package/dist/components/LiveScenePanel/CameraSettingDialog.vue.d.ts +25 -0
- package/dist/components/LiveScenePanel/LiveSceneSelect.js +120 -0
- package/dist/components/LiveScenePanel/LiveSceneSelect.vue.d.ts +19 -0
- package/dist/components/LiveScenePanel/MaterialDialog.js +114 -0
- package/dist/components/LiveScenePanel/MaterialDialog.vue.d.ts +20 -0
- package/dist/components/LiveScenePanel/MaterialItem.js +168 -0
- package/dist/components/LiveScenePanel/MaterialItem.vue.d.ts +23 -0
- package/dist/components/LiveScenePanel/MaterialRenameDialog.js +4 -0
- package/dist/components/LiveScenePanel/MaterialRenameDialog.vue.d.ts +23 -0
- package/dist/components/LiveScenePanel/i18n/en-US/index.d.ts +35 -0
- package/dist/components/LiveScenePanel/i18n/en-US/index.js +45 -0
- package/dist/components/LiveScenePanel/i18n/index.d.ts +4 -0
- package/dist/components/LiveScenePanel/i18n/index.js +6 -0
- package/dist/components/LiveScenePanel/i18n/zh-CN/index.d.ts +35 -0
- package/dist/components/LiveScenePanel/i18n/zh-CN/index.js +45 -0
- package/dist/components/LiveScenePanel/icons/AddIcon.js +35 -0
- package/dist/components/LiveScenePanel/icons/AddIcon.vue.d.ts +2 -0
- package/dist/components/LiveScenePanel/icons/CameraIcon.js +28 -0
- package/dist/components/LiveScenePanel/icons/CameraIcon.vue.d.ts +2 -0
- package/dist/components/LiveScenePanel/icons/CameraMirror.js +36 -0
- package/dist/components/LiveScenePanel/icons/CameraMirror.vue.d.ts +2 -0
- package/dist/components/LiveScenePanel/icons/CameraUnmirror.js +29 -0
- package/dist/components/LiveScenePanel/icons/CameraUnmirror.vue.d.ts +2 -0
- package/dist/components/LiveScenePanel/icons/ImageIcon.js +26 -0
- package/dist/components/LiveScenePanel/icons/ImageIcon.vue.d.ts +2 -0
- package/dist/components/LiveScenePanel/icons/MoreIcon.js +36 -0
- package/dist/components/LiveScenePanel/icons/MoreIcon.vue.d.ts +2 -0
- package/dist/components/LiveScenePanel/icons/ScreenIcon.js +19 -0
- package/dist/components/LiveScenePanel/icons/ScreenIcon.vue.d.ts +2 -0
- package/dist/components/LiveScenePanel/index.d.ts +3 -0
- package/dist/components/LiveScenePanel/index.js +231 -0
- package/dist/components/LiveScenePanel/index.vue.d.ts +2 -0
- package/dist/components/LiveStreamView/DefaultStreamViewUI.js +90 -0
- package/dist/components/LiveStreamView/DefaultStreamViewUI.vue.d.ts +51 -0
- package/dist/components/LiveStreamView/i18n/en-US/index.d.ts +4 -0
- package/dist/components/LiveStreamView/i18n/en-US/index.js +7 -0
- package/dist/components/LiveStreamView/i18n/index.d.ts +2 -0
- package/dist/components/LiveStreamView/i18n/index.js +6 -0
- package/dist/components/LiveStreamView/i18n/zh-CN/index.d.ts +4 -0
- package/dist/components/LiveStreamView/i18n/zh-CN/index.js +7 -0
- package/dist/components/LiveStreamView/index.d.ts +4 -0
- package/dist/components/LiveStreamView/index.js +291 -0
- package/dist/components/LiveStreamView/index.vue.d.ts +23 -0
- package/dist/components/MessageInput/AttachmentPicker/AttachmentPicker.js +4 -0
- package/dist/components/MessageInput/AttachmentPicker/AttachmentPicker.vue.d.ts +32 -0
- package/dist/components/MessageInput/AttachmentPicker/FilePicker.js +4 -0
- package/dist/components/MessageInput/AttachmentPicker/FilePicker.vue.d.ts +44 -0
- package/dist/components/MessageInput/AttachmentPicker/ImagePicker.js +4 -0
- package/dist/components/MessageInput/AttachmentPicker/ImagePicker.vue.d.ts +44 -0
- package/dist/components/MessageInput/AttachmentPicker/VideoPicker.js +4 -0
- package/dist/components/MessageInput/AttachmentPicker/VideoPicker.vue.d.ts +44 -0
- package/dist/components/MessageInput/AttachmentPicker/index.d.ts +6 -0
- package/dist/components/MessageInput/AttachmentPicker/index.js +10 -0
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +106 -0
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.vue.d.ts +17 -0
- package/dist/components/MessageInput/EmojiPicker/index.d.ts +3 -0
- package/dist/components/MessageInput/EmojiPicker/index.js +4 -0
- package/dist/components/MessageInput/MessageInput.js +4 -0
- package/dist/components/MessageInput/MessageInput.vue.d.ts +60 -0
- package/dist/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.js +4 -0
- package/dist/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.vue.d.ts +2 -0
- package/dist/components/MessageInput/QuotedMessagePreview/index.d.ts +3 -0
- package/dist/components/MessageInput/QuotedMessagePreview/index.js +4 -0
- package/dist/components/MessageInput/SendButton/SendButton.js +4 -0
- package/dist/components/MessageInput/SendButton/SendButton.vue.d.ts +15 -0
- package/dist/components/MessageInput/SendButton/index.d.ts +3 -0
- package/dist/components/MessageInput/SendButton/index.js +4 -0
- package/dist/components/MessageInput/TextEditor/EditorCore.d.ts +16 -0
- package/dist/components/MessageInput/TextEditor/EditorCore.js +134 -0
- package/dist/components/MessageInput/TextEditor/TextEditor.js +4 -0
- package/dist/components/MessageInput/TextEditor/TextEditor.vue.d.ts +46 -0
- package/dist/components/MessageInput/TextEditor/index.d.ts +3 -0
- package/dist/components/MessageInput/TextEditor/index.js +4 -0
- package/dist/components/MessageInput/index.d.ts +6 -0
- package/dist/components/MessageInput/index.js +16 -0
- package/dist/components/MessageInput/types.d.js +1 -0
- package/dist/components/MessageList/Message/AudioMessage/AudioMessage.js +73 -0
- package/dist/components/MessageList/Message/AudioMessage/AudioMessage.vue.d.ts +16 -0
- package/dist/components/MessageList/Message/AudioMessage/PlayButton.js +67 -0
- package/dist/components/MessageList/Message/AudioMessage/PlayButton.vue.d.ts +19 -0
- package/dist/components/MessageList/Message/AudioMessage/WaveForm.js +64 -0
- package/dist/components/MessageList/Message/AudioMessage/WaveForm.vue.d.ts +37 -0
- package/dist/components/MessageList/Message/AudioMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/AudioMessage/index.js +4 -0
- package/dist/components/MessageList/Message/CustomMessage/CustomMessage.js +4 -0
- package/dist/components/MessageList/Message/CustomMessage/CustomMessage.vue.d.ts +2 -0
- package/dist/components/MessageList/Message/CustomMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/CustomMessage/index.js +4 -0
- package/dist/components/MessageList/Message/FaceMessage/FaceMessage.js +28 -0
- package/dist/components/MessageList/Message/FaceMessage/FaceMessage.vue.d.ts +30 -0
- package/dist/components/MessageList/Message/FaceMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/FaceMessage/index.js +4 -0
- package/dist/components/MessageList/Message/FileMessage/FileMessage.js +83 -0
- package/dist/components/MessageList/Message/FileMessage/FileMessage.vue.d.ts +30 -0
- package/dist/components/MessageList/Message/FileMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/FileMessage/index.js +4 -0
- package/dist/components/MessageList/Message/GroupTipMessage/GroupTipMessage.js +4 -0
- package/dist/components/MessageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +16 -0
- package/dist/components/MessageList/Message/GroupTipMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/GroupTipMessage/index.js +4 -0
- package/dist/components/MessageList/Message/ImageMessage/ImageMessage.js +194 -0
- package/dist/components/MessageList/Message/ImageMessage/ImageMessage.vue.d.ts +31 -0
- package/dist/components/MessageList/Message/ImageMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/ImageMessage/index.js +4 -0
- package/dist/components/MessageList/Message/LocationMessage/LocationMessage.js +9 -0
- package/dist/components/MessageList/Message/LocationMessage/LocationMessage.vue.d.ts +2 -0
- package/dist/components/MessageList/Message/LocationMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/LocationMessage/index.js +4 -0
- package/dist/components/MessageList/Message/MergerMessage/MergerMessage.js +9 -0
- package/dist/components/MessageList/Message/MergerMessage/MergerMessage.vue.d.ts +2 -0
- package/dist/components/MessageList/Message/MergerMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/MergerMessage/index.js +4 -0
- package/dist/components/MessageList/Message/Message.js +4 -0
- package/dist/components/MessageList/Message/Message.vue.d.ts +56 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +1704 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.vue.d.ts +44 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/index.d.ts +3 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/index.js +4 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageBubble/MessageBubble.js +55 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageBubble/MessageBubble.vue.d.ts +52 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageBubble/index.d.ts +3 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageBubble/index.js +4 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageLayout.js +138 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageLayout.vue.d.ts +67 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.js +86 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.vue.d.ts +63 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +34 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue.d.ts +15 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/index.d.ts +3 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/index.js +4 -0
- package/dist/components/MessageList/Message/MessageLayout/index.d.ts +3 -0
- package/dist/components/MessageList/Message/MessageLayout/index.js +4 -0
- package/dist/components/MessageList/Message/MessageLayout/useMessageLayoutClasses.d.ts +11 -0
- package/dist/components/MessageList/Message/MessageLayout/useMessageLayoutClasses.js +40 -0
- package/dist/components/MessageList/Message/RecalledMessage/RecalledMessage.js +58 -0
- package/dist/components/MessageList/Message/RecalledMessage/RecalledMessage.vue.d.ts +35 -0
- package/dist/components/MessageList/Message/RecalledMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/RecalledMessage/index.js +4 -0
- package/dist/components/MessageList/Message/TextMessage/TextMessage.js +122 -0
- package/dist/components/MessageList/Message/TextMessage/TextMessage.vue.d.ts +31 -0
- package/dist/components/MessageList/Message/TextMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/TextMessage/index.js +4 -0
- package/dist/components/MessageList/Message/VideoMessage/VideoMessage.js +107 -0
- package/dist/components/MessageList/Message/VideoMessage/VideoMessage.vue.d.ts +34 -0
- package/dist/components/MessageList/Message/VideoMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/VideoMessage/index.js +4 -0
- package/dist/components/MessageList/Message/index.d.ts +3 -0
- package/dist/components/MessageList/Message/index.js +4 -0
- package/dist/components/MessageList/MessageForward/ForwardListItem.js +62 -0
- package/dist/components/MessageList/MessageForward/ForwardListItem.vue.d.ts +17 -0
- package/dist/components/MessageList/MessageForward/MessageForward.js +134 -0
- package/dist/components/MessageList/MessageForward/MessageForward.vue.d.ts +2 -0
- package/dist/components/MessageList/MessageForward/index.d.ts +3 -0
- package/dist/components/MessageList/MessageForward/index.js +4 -0
- package/dist/components/MessageList/MessageList.js +212 -0
- package/dist/components/MessageList/MessageList.vue.d.ts +66 -0
- package/dist/components/MessageList/MessageListContext.d.ts +3 -0
- package/dist/components/MessageList/MessageListContext.js +13 -0
- package/dist/components/MessageList/MessageTimeDivider/MessageTimeDivider.js +38 -0
- package/dist/components/MessageList/MessageTimeDivider/MessageTimeDivider.vue.d.ts +34 -0
- package/dist/components/MessageList/MessageTimeDivider/index.d.ts +3 -0
- package/dist/components/MessageList/MessageTimeDivider/index.js +4 -0
- package/dist/components/MessageList/ReadReceiptInfo/ReadReceiptInfo.js +411 -0
- package/dist/components/MessageList/ReadReceiptInfo/ReadReceiptInfo.vue.d.ts +58 -0
- package/dist/components/MessageList/ReadReceiptInfo/index.d.ts +3 -0
- package/dist/components/MessageList/ReadReceiptInfo/index.js +4 -0
- package/dist/components/MessageList/index.d.ts +5 -0
- package/dist/components/MessageList/index.js +8 -0
- package/dist/components/MicButton/AudioIcon.js +48 -0
- package/dist/components/MicButton/AudioIcon.vue.d.ts +18 -0
- package/dist/components/MicButton/index.d.ts +3 -0
- package/dist/components/MicButton/index.js +4 -0
- package/dist/components/MicButton/index.vue.d.ts +2 -0
- package/dist/components/StreamMixer/LocalMixer/MixerControl.js +132 -0
- package/dist/components/StreamMixer/LocalMixer/MixerControl.vue.d.ts +2 -0
- package/dist/components/StreamMixer/LocalMixer/index.js +163 -0
- package/dist/components/StreamMixer/LocalMixer/index.vue.d.ts +2 -0
- package/dist/components/StreamMixer/i18n/en-US/index.d.ts +10 -0
- package/dist/components/StreamMixer/i18n/en-US/index.js +15 -0
- package/dist/components/StreamMixer/i18n/index.d.ts +2 -0
- package/dist/components/StreamMixer/i18n/index.js +6 -0
- package/dist/components/StreamMixer/i18n/zh-CN/index.d.ts +10 -0
- package/dist/components/StreamMixer/i18n/zh-CN/index.js +15 -0
- package/dist/components/StreamMixer/icons/CameraMirror.js +36 -0
- package/dist/components/StreamMixer/icons/CameraMirror.vue.d.ts +2 -0
- package/dist/components/StreamMixer/icons/Delete.js +33 -0
- package/dist/components/StreamMixer/icons/Delete.vue.d.ts +2 -0
- package/dist/components/StreamMixer/icons/Down.js +39 -0
- package/dist/components/StreamMixer/icons/Down.vue.d.ts +2 -0
- package/dist/components/StreamMixer/icons/Rotation.js +30 -0
- package/dist/components/StreamMixer/icons/Rotation.vue.d.ts +2 -0
- package/dist/components/StreamMixer/icons/Up.js +39 -0
- package/dist/components/StreamMixer/icons/Up.vue.d.ts +2 -0
- package/dist/components/StreamMixer/index.d.ts +3 -0
- package/dist/components/StreamMixer/index.js +26 -0
- package/dist/components/StreamMixer/index.vue.d.ts +2 -0
- package/dist/components/StreamView/Layout/CustomLayout.js +246 -0
- package/dist/components/StreamView/Layout/CustomLayout.vue.d.ts +55 -0
- package/dist/components/StreamView/Layout/FloatLayout.js +251 -0
- package/dist/components/StreamView/Layout/FloatLayout.vue.d.ts +54 -0
- package/dist/components/StreamView/Layout/GridLayout.js +235 -0
- package/dist/components/StreamView/Layout/GridLayout.vue.d.ts +55 -0
- package/dist/components/StreamView/Layout/MeetingLayout.js +280 -0
- package/dist/components/StreamView/Layout/MeetingLayout.vue.d.ts +55 -0
- package/dist/components/StreamView/Layout/MixLayout.js +117 -0
- package/dist/components/StreamView/Layout/MixLayout.vue.d.ts +31 -0
- package/dist/components/StreamView/common/ArrowStroke.js +53 -0
- package/dist/components/StreamView/common/ArrowStroke.vue.d.ts +20 -0
- package/dist/components/StreamView/common/LocalScreenView/index.js +101 -0
- package/dist/components/StreamView/common/LocalScreenView/index.vue.d.ts +2 -0
- package/dist/components/StreamView/common/StreamCover/index.js +74 -0
- package/dist/components/StreamView/common/StreamCover/index.vue.d.ts +20 -0
- package/dist/components/StreamView/common/StreamList/index.js +209 -0
- package/dist/components/StreamView/common/StreamList/index.vue.d.ts +56 -0
- package/dist/components/StreamView/common/StreamPlay/index.js +116 -0
- package/dist/components/StreamView/common/StreamPlay/index.vue.d.ts +38 -0
- package/dist/components/StreamView/common/StreamRegion/StreamRegionPC.js +110 -0
- package/dist/components/StreamView/common/StreamRegion/StreamRegionPC.vue.d.ts +43 -0
- package/dist/components/StreamView/common/StreamRegion/index.d.ts +3 -0
- package/dist/components/StreamView/common/StreamRegion/index.js +4 -0
- package/dist/components/StreamView/index.d.ts +3 -0
- package/dist/components/StreamView/index.js +76 -0
- package/dist/components/StreamView/index.vue.d.ts +54 -0
- package/dist/components/StreamView/manager/mediaManager.d.ts +46 -0
- package/dist/components/StreamView/manager/mediaManager.js +294 -0
- package/dist/components/UserList/AllUserActions/index.d.ts +3 -0
- package/dist/components/UserList/AllUserActions/index.js +4 -0
- package/dist/components/UserList/AllUserActions/indexH5.js +91 -0
- package/dist/components/UserList/AllUserActions/indexH5.vue.d.ts +15 -0
- package/dist/components/UserList/AllUserActions/indexPC.js +122 -0
- package/dist/components/UserList/AllUserActions/indexPC.vue.d.ts +15 -0
- package/dist/components/UserList/AllUserActions/useIndexHooks.d.ts +12 -0
- package/dist/components/UserList/AllUserActions/useIndexHooks.js +49 -0
- package/dist/components/UserList/UserItem/UserAction/index.d.ts +3 -0
- package/dist/components/UserList/UserItem/UserAction/index.js +4 -0
- package/dist/components/UserList/UserItem/UserAction/indexH5.js +72 -0
- package/dist/components/UserList/UserItem/UserAction/indexH5.vue.d.ts +20 -0
- package/dist/components/UserList/UserItem/UserAction/indexPC.js +150 -0
- package/dist/components/UserList/UserItem/UserAction/indexPC.vue.d.ts +16 -0
- package/dist/components/UserList/UserItem/UserInfo/index.js +130 -0
- package/dist/components/UserList/UserItem/UserInfo/index.vue.d.ts +31 -0
- package/dist/components/UserList/UserItem/UserInvite/index.js +39 -0
- package/dist/components/UserList/UserItem/UserInvite/index.vue.d.ts +16 -0
- package/dist/components/UserList/UserItem/index.d.ts +3 -0
- package/dist/components/UserList/UserItem/index.js +4 -0
- package/dist/components/UserList/UserItem/indexH5.js +64 -0
- package/dist/components/UserList/UserItem/indexH5.vue.d.ts +16 -0
- package/dist/components/UserList/UserItem/indexPC.js +47 -0
- package/dist/components/UserList/UserItem/indexPC.vue.d.ts +16 -0
- package/dist/components/UserList/UserListContent/index.js +56 -0
- package/dist/components/UserList/UserListContent/index.vue.d.ts +44 -0
- package/dist/components/UserList/UserListSearch/index.js +30 -0
- package/dist/components/UserList/UserListSearch/index.vue.d.ts +2 -0
- package/dist/components/UserList/index.js +92 -0
- package/dist/components/UserList/index.vue.d.ts +34 -0
- package/dist/components/UserPicker/UserPicker.js +187 -0
- package/dist/components/UserPicker/UserPicker.vue.d.ts +53 -0
- package/dist/components/UserPicker/components/ListMode/ListMode.js +122 -0
- package/dist/components/UserPicker/components/ListMode/ListMode.vue.d.ts +21 -0
- package/dist/components/UserPicker/components/ListMode/index.d.ts +3 -0
- package/dist/components/UserPicker/components/ListMode/index.js +4 -0
- package/dist/components/UserPicker/components/SearchBar/SearchBar.js +71 -0
- package/dist/components/UserPicker/components/SearchBar/SearchBar.vue.d.ts +15 -0
- package/dist/components/UserPicker/components/SearchBar/index.d.ts +3 -0
- package/dist/components/UserPicker/components/SearchBar/index.js +4 -0
- package/dist/components/UserPicker/components/SelectedPanel/SelectedPanel.js +112 -0
- package/dist/components/UserPicker/components/SelectedPanel/SelectedPanel.vue.d.ts +34 -0
- package/dist/components/UserPicker/components/SelectedPanel/index.d.ts +3 -0
- package/dist/components/UserPicker/components/SelectedPanel/index.js +4 -0
- package/dist/components/UserPicker/components/TreeMode/TreeMode.js +57 -0
- package/dist/components/UserPicker/components/TreeMode/TreeMode.vue.d.ts +24 -0
- package/dist/components/UserPicker/components/TreeMode/TreeNode.js +173 -0
- package/dist/components/UserPicker/components/TreeMode/TreeNode.vue.d.ts +29 -0
- package/dist/components/UserPicker/components/TreeMode/index.d.ts +3 -0
- package/dist/components/UserPicker/components/TreeMode/index.js +4 -0
- package/dist/components/UserPicker/hooks/useSearchFilter.d.ts +20 -0
- package/dist/components/UserPicker/hooks/useSearchFilter.js +91 -0
- package/dist/components/UserPicker/hooks/useSelection.d.ts +32 -0
- package/dist/components/UserPicker/hooks/useSelection.js +351 -0
- package/dist/components/UserPicker/hooks/useTreeState.d.ts +16 -0
- package/dist/components/UserPicker/hooks/useTreeState.js +43 -0
- package/dist/components/UserPicker/index.d.ts +6 -0
- package/dist/components/UserPicker/index.js +5 -0
- package/dist/components/UserPicker/type.d.ts +60 -0
- package/dist/components/UserPicker/type.js +1 -0
- package/dist/components/VideoSetting/CameraSelect.js +73 -0
- package/dist/components/VideoSetting/CameraSelect.vue.d.ts +29 -0
- package/dist/components/VideoSetting/VideoMediaControl.js +94 -0
- package/dist/components/VideoSetting/VideoMediaControl.vue.d.ts +6 -0
- package/dist/components/VideoSetting/VideoPreview.js +47 -0
- package/dist/components/VideoSetting/VideoPreview.vue.d.ts +2 -0
- package/dist/components/VideoSetting/VideoProfile.js +54 -0
- package/dist/components/VideoSetting/VideoProfile.vue.d.ts +2 -0
- package/dist/components/VideoSetting/VideoRequestDialog.js +4 -0
- package/dist/components/VideoSetting/VideoRequestDialog.vue.d.ts +2 -0
- package/dist/components/VideoSetting/VideoSettingTab.js +71 -0
- package/dist/components/VideoSetting/VideoSettingTab.vue.d.ts +2 -0
- package/dist/components/VideoSetting/index.d.ts +4 -0
- package/dist/components/VideoSetting/index.js +39 -0
- package/dist/components/VideoSetting/index.vue.d.ts +40 -0
- package/dist/components/VideoSettingPanel/CameraSelect.js +72 -0
- package/dist/components/VideoSettingPanel/CameraSelect.vue.d.ts +29 -0
- package/dist/components/VideoSettingPanel/VideoPreview.js +47 -0
- package/dist/components/VideoSettingPanel/VideoPreview.vue.d.ts +2 -0
- package/dist/components/VideoSettingPanel/VideoProfile.js +53 -0
- package/dist/components/VideoSettingPanel/VideoProfile.vue.d.ts +2 -0
- package/dist/components/VideoSettingPanel/i18n/en-US/index.d.ts +7 -0
- package/dist/components/VideoSettingPanel/i18n/en-US/index.js +10 -0
- package/dist/components/VideoSettingPanel/i18n/index.d.ts +4 -0
- package/dist/components/VideoSettingPanel/i18n/index.js +6 -0
- package/dist/components/VideoSettingPanel/i18n/zh-CN/index.d.ts +7 -0
- package/dist/components/VideoSettingPanel/i18n/zh-CN/index.js +10 -0
- package/dist/components/VideoSettingPanel/index.d.ts +3 -0
- package/dist/components/VideoSettingPanel/index.js +80 -0
- package/dist/components/VideoSettingPanel/index.vue.d.ts +32 -0
- package/dist/constants/emoji.d.ts +6 -0
- package/dist/constants/emoji.js +69 -0
- package/dist/directives/vClickOutside.d.ts +5 -0
- package/dist/directives/vClickOutside.js +30 -0
- package/dist/directives/vDblTouch.d.ts +12 -0
- package/dist/directives/vDblTouch.js +61 -0
- package/dist/directives/vTap.d.ts +15 -0
- package/dist/directives/vTap.js +79 -0
- package/dist/directives/vTouchScale.d.ts +9 -0
- package/dist/directives/vTouchScale.js +200 -0
- package/dist/handler/index.d.ts +2 -0
- package/dist/handler/index.js +6 -0
- package/dist/handler/translator.d.ts +27 -0
- package/dist/handler/translator.js +140 -0
- package/dist/handler/voiceConverter.d.ts +8 -0
- package/dist/handler/voiceConverter.js +37 -0
- package/dist/hooks/useAudioControl.d.ts +26 -0
- package/dist/hooks/useAudioControl.js +135 -0
- package/dist/hooks/useMessageActions.d.ts +33 -0
- package/dist/hooks/useMessageActions.js +91 -0
- package/dist/hooks/useReadReceipt/useReadReceipt.d.ts +47 -0
- package/dist/hooks/useReadReceipt/useReadReceipt.js +150 -0
- package/dist/hooks/useRoomActions/index.d.ts +5 -0
- package/dist/hooks/useRoomActions/index.js +18 -0
- package/dist/hooks/useRoomActions/useRoomAudioAction.d.ts +8 -0
- package/dist/hooks/useRoomActions/useRoomAudioAction.js +60 -0
- package/dist/hooks/useRoomActions/useRoomScreenAction.d.ts +3 -0
- package/dist/hooks/useRoomActions/useRoomScreenAction.js +70 -0
- package/dist/hooks/useRoomActions/useRoomVideoAction.d.ts +8 -0
- package/dist/hooks/useRoomActions/useRoomVideoAction.js +60 -0
- package/dist/hooks/useRoomEngine.d.ts +7 -0
- package/dist/hooks/useRoomEngine.js +29 -0
- package/dist/hooks/useScroll.d.ts +34 -0
- package/dist/hooks/useScroll.js +108 -0
- package/dist/hooks/useUserActions/index.d.ts +40 -0
- package/dist/hooks/useUserActions/index.js +130 -0
- package/dist/hooks/useUserActions/useAdminAction.d.ts +3 -0
- package/dist/hooks/useUserActions/useAdminAction.js +43 -0
- package/dist/hooks/useUserActions/useAudioAction.d.ts +3 -0
- package/dist/hooks/useUserActions/useAudioAction.js +56 -0
- package/dist/hooks/useUserActions/useChangeNameCardAction/changeNameCardDialog.js +79 -0
- package/dist/hooks/useUserActions/useChangeNameCardAction/changeNameCardDialog.vue.d.ts +17 -0
- package/dist/hooks/useUserActions/useChangeNameCardAction/changeNameCardInput.js +64 -0
- package/dist/hooks/useUserActions/useChangeNameCardAction/changeNameCardInput.vue.d.ts +17 -0
- package/dist/hooks/useUserActions/useChangeNameCardAction/index.d.ts +16 -0
- package/dist/hooks/useUserActions/useChangeNameCardAction/index.js +66 -0
- package/dist/hooks/useUserActions/useChatAction.d.ts +3 -0
- package/dist/hooks/useUserActions/useChatAction.js +37 -0
- package/dist/hooks/useUserActions/useKickUserAction.d.ts +16 -0
- package/dist/hooks/useUserActions/useKickUserAction.js +40 -0
- package/dist/hooks/useUserActions/useMemberInviteAction.d.ts +3 -0
- package/dist/hooks/useUserActions/useMemberInviteAction.js +48 -0
- package/dist/hooks/useUserActions/useSeatAction.d.ts +12 -0
- package/dist/hooks/useUserActions/useSeatAction.js +166 -0
- package/dist/hooks/useUserActions/useTransferOwnerAction.d.ts +16 -0
- package/dist/hooks/useUserActions/useTransferOwnerAction.js +70 -0
- package/dist/hooks/useUserActions/useVideoAction.d.ts +16 -0
- package/dist/hooks/useUserActions/useVideoAction.js +53 -0
- package/dist/hooks/useZIndex.d.ts +4 -0
- package/dist/hooks/useZIndex.js +17 -0
- package/dist/i18n/index.d.ts +1 -0
- package/dist/i18n/index.js +7 -0
- package/dist/index-BF6QB9jF.js +63 -0
- package/dist/index-BREVQgBq.js +46 -0
- package/dist/index-BlyS4ObG.js +50 -0
- package/dist/index-NFANFVi5.js +58 -0
- package/dist/index-oR-rgHxX.js +21345 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +164 -0
- package/dist/locales/en-US.d.ts +427 -0
- package/dist/locales/en-US.js +438 -0
- package/dist/locales/index.d.ts +41 -0
- package/dist/locales/index.js +50 -0
- package/dist/locales/zh-CN.d.ts +431 -0
- package/dist/locales/zh-CN.js +442 -0
- package/dist/states/BarrageListState/BarrageListState.d.ts +26 -0
- package/dist/states/BarrageListState/BarrageListState.js +208 -0
- package/dist/states/BarrageListState/index.d.ts +1 -0
- package/dist/states/BarrageListState/index.js +4 -0
- package/dist/states/CoGuestState.d.ts +106 -0
- package/dist/states/CoGuestState.js +329 -0
- package/dist/states/CoHostState.d.ts +22 -0
- package/dist/states/CoHostState.js +181 -0
- package/dist/states/ConversationListState/ConversationListState.d.ts +13 -0
- package/dist/states/ConversationListState/ConversationListState.js +40 -0
- package/dist/states/ConversationListState/index.d.ts +1 -0
- package/dist/states/ConversationListState/index.js +4 -0
- package/dist/states/DeviceState.d.ts +191 -0
- package/dist/states/DeviceState.js +438 -0
- package/dist/states/LiveAudienceState.d.ts +20 -0
- package/dist/states/LiveAudienceState.js +156 -0
- package/dist/states/LiveMonitorState/api/http.d.ts +13 -0
- package/dist/states/LiveMonitorState/api/http.js +2432 -0
- package/dist/states/LiveMonitorState/index.d.ts +39 -0
- package/dist/states/LiveMonitorState/index.js +167 -0
- package/dist/states/LiveMonitorState/player/adapters/trtc.d.ts +27 -0
- package/dist/states/LiveMonitorState/player/adapters/trtc.js +158 -0
- package/dist/states/LiveMonitorState/player/base/basePlayer.d.ts +24 -0
- package/dist/states/LiveMonitorState/player/base/basePlayer.js +218 -0
- package/dist/states/LiveMonitorState/player/index.d.ts +4 -0
- package/dist/states/LiveMonitorState/player/index.js +12 -0
- package/dist/states/LiveMonitorState/player/manager/playerManager.d.ts +13 -0
- package/dist/states/LiveMonitorState/player/manager/playerManager.js +47 -0
- package/dist/states/LiveMonitorState/player/types/index.d.ts +2 -0
- package/dist/states/LiveMonitorState/player/types/index.js +10 -0
- package/dist/states/LiveMonitorState/player/types/player.d.ts +26 -0
- package/dist/states/LiveMonitorState/player/types/player.js +15 -0
- package/dist/states/LiveMonitorState/player/types/trtc.d.ts +18 -0
- package/dist/states/LiveMonitorState/player/types/trtc.js +22 -0
- package/dist/states/LiveMonitorState/types/index.d.ts +43 -0
- package/dist/states/LiveMonitorState/types/index.js +1 -0
- package/dist/states/LiveMonitorState/utils/index.d.ts +6 -0
- package/dist/states/LiveMonitorState/utils/index.js +24 -0
- package/dist/states/LiveSeatState/index.d.ts +37 -0
- package/dist/states/LiveSeatState/index.js +21 -0
- package/dist/states/LiveSeatState/seatEventManager.d.ts +12 -0
- package/dist/states/LiveSeatState/seatEventManager.js +103 -0
- package/dist/states/LiveSeatState/seatManager.d.ts +16 -0
- package/dist/states/LiveSeatState/seatManager.js +47 -0
- package/dist/states/LiveSeatState/store.d.ts +29 -0
- package/dist/states/LiveSeatState/store.js +33 -0
- package/dist/states/LiveSeatState/usePlayStream/MixStreamPlayer.d.ts +17 -0
- package/dist/states/LiveSeatState/usePlayStream/MixStreamPlayer.js +67 -0
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.d.ts +28 -0
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.js +105 -0
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.d.ts +29 -0
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.js +111 -0
- package/dist/states/LiveSeatState/usePlayStream/index.d.ts +6 -0
- package/dist/states/LiveSeatState/usePlayStream/index.js +123 -0
- package/dist/states/LiveSeatState/usePlayStream/useStreamPostion.d.ts +17 -0
- package/dist/states/LiveSeatState/usePlayStream/useStreamPostion.js +71 -0
- package/dist/states/LiveState/index.d.ts +131 -0
- package/dist/states/LiveState/index.js +361 -0
- package/dist/states/LoginState.d.ts +31 -0
- package/dist/states/LoginState.js +64 -0
- package/dist/states/MessageActionState/MessageActionState.d.ts +96 -0
- package/dist/states/MessageActionState/MessageActionState.js +133 -0
- package/dist/states/MessageActionState/index.d.ts +1 -0
- package/dist/states/MessageActionState/index.js +4 -0
- package/dist/states/MessageInputState/MessageInputState.d.ts +46 -0
- package/dist/states/MessageInputState/MessageInputState.js +190 -0
- package/dist/states/MessageInputState/index.d.ts +1 -0
- package/dist/states/MessageInputState/index.js +5 -0
- package/dist/states/MessageListState/MessageListState.d.ts +24 -0
- package/dist/states/MessageListState/MessageListState.js +114 -0
- package/dist/states/MessageListState/index.d.ts +1 -0
- package/dist/states/MessageListState/index.js +4 -0
- package/dist/states/RoomState.d.ts +173 -0
- package/dist/states/RoomState.js +379 -0
- package/dist/states/SeatStore.d.ts +80 -0
- package/dist/states/SeatStore.js +252 -0
- package/dist/states/UserState/index.d.ts +5 -0
- package/dist/states/UserState/index.js +55 -0
- package/dist/states/UserState/store.d.ts +272 -0
- package/dist/states/UserState/store.js +182 -0
- package/dist/states/UserState/userEventManager.d.ts +23 -0
- package/dist/states/UserState/userEventManager.js +174 -0
- package/dist/states/UserState/userManager.d.ts +119 -0
- package/dist/states/UserState/userManager.js +300 -0
- package/dist/states/VideoMixerState.d.ts +19 -0
- package/dist/states/VideoMixerState.js +297 -0
- package/dist/styles/index.css +6636 -0
- package/dist/styles/scss.d.js +1 -0
- package/dist/types/audience.d.ts +11 -0
- package/dist/types/audience.js +1 -0
- package/dist/types/coGuest.d.ts +14 -0
- package/dist/types/coGuest.js +10 -0
- package/dist/types/coHost.d.ts +6 -0
- package/dist/types/coHost.js +10 -0
- package/dist/types/device.d.ts +44 -0
- package/dist/types/device.js +45 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.js +67 -0
- package/dist/types/live.d.ts +97 -0
- package/dist/types/live.js +23 -0
- package/dist/types/message.d.ts +113 -0
- package/dist/types/message.js +31 -0
- package/dist/types/monitor.d.ts +47 -0
- package/dist/types/monitor.js +8 -0
- package/dist/types/room.d.ts +66 -0
- package/dist/types/room.js +18 -0
- package/dist/types/seat.d.ts +30 -0
- package/dist/types/seat.js +1 -0
- package/dist/types/stream.d.ts +10 -0
- package/dist/types/stream.js +16 -0
- package/dist/types/types.d.ts +1143 -0
- package/dist/types/types.js +331 -0
- package/dist/types/user.d.ts +88 -0
- package/dist/types/user.js +67 -0
- package/dist/types/videoMixer.d.ts +12 -0
- package/dist/types/videoMixer.js +1 -0
- package/dist/useId-DlA8vN1W.js +13 -0
- package/dist/utils/call.d.ts +4 -0
- package/dist/utils/call.js +18 -0
- package/dist/utils/copyText.d.ts +2 -0
- package/dist/utils/copyText.js +41 -0
- package/dist/utils/documentLink.d.ts +23 -0
- package/dist/utils/documentLink.js +25 -0
- package/dist/utils/domOperation.d.ts +45 -0
- package/dist/utils/domOperation.js +183 -0
- package/dist/utils/downFile.d.ts +2 -0
- package/dist/utils/downFile.js +27 -0
- package/dist/utils/emoji.d.ts +16 -0
- package/dist/utils/emoji.js +40 -0
- package/dist/utils/enableSampleTaskStatus.d.ts +1 -0
- package/dist/utils/enableSampleTaskStatus.js +11 -0
- package/dist/utils/env.d.ts +6 -0
- package/dist/utils/env.js +15 -0
- package/dist/utils/environment.d.ts +8 -0
- package/dist/utils/environment.js +20 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.js +34 -0
- package/dist/utils/json.d.ts +13 -0
- package/dist/utils/json.js +28 -0
- package/dist/utils/lodash.d.ts +17 -0
- package/dist/utils/lodash.js +105 -0
- package/dist/utils/riseInput.d.ts +1 -0
- package/dist/utils/riseInput.js +45 -0
- package/dist/utils/time.d.ts +19 -0
- package/dist/utils/time.js +3176 -0
- package/dist/utils/type-check.d.ts +12 -0
- package/dist/utils/type-check.js +50 -0
- package/dist/utils/utils.d.ts +80 -0
- package/dist/utils/utils.js +258 -0
- package/dist/utils-CnPWv_hZ.js +63 -0
- package/dist/vite-env.d.js +1 -0
- package/package.json +41 -0
- package/src/baseComp/ActionSheep.vue +98 -0
- package/src/baseComp/AudioIcon.vue +68 -0
- package/src/baseComp/Avatar.vue +42 -0
- package/src/baseComp/Dialog/DialogH5.vue +178 -0
- package/src/baseComp/Dialog/DialogPC.vue +263 -0
- package/src/baseComp/Dialog/index.ts +6 -0
- package/src/baseComp/IconButton.vue +186 -0
- package/src/baseComp/Input/InputH5.vue +251 -0
- package/src/baseComp/Input/InputPC.vue +250 -0
- package/src/baseComp/Input/InputWX.vue +252 -0
- package/src/baseComp/Input/index.ts +6 -0
- package/src/baseComp/MessageBox/index.ts +47 -0
- package/src/baseComp/MessageBox/index.vue +290 -0
- package/src/baseComp/Modal/Modal.vue +136 -0
- package/src/baseComp/Modal/index.ts +4 -0
- package/src/baseComp/ObserverView/ObserverView.vue +162 -0
- package/src/baseComp/ObserverView/index.ts +3 -0
- package/src/baseComp/Option/OptionH5.vue +66 -0
- package/src/baseComp/Option/OptionPC.vue +105 -0
- package/src/baseComp/Option/OptionWX.vue +66 -0
- package/src/baseComp/Option/index.ts +5 -0
- package/src/baseComp/Select/SelectH5.vue +119 -0
- package/src/baseComp/Select/SelectPC.vue +255 -0
- package/src/baseComp/Select/SelectWX.vue +122 -0
- package/src/baseComp/Select/index.ts +5 -0
- package/src/baseComp/SvgIcon.vue +38 -0
- package/src/baseComp/TuiSwitch.vue +55 -0
- package/src/baseComp/View/View.vue +116 -0
- package/src/baseComp/View/index.ts +3 -0
- package/src/baseComp/useZIndex.ts +18 -0
- package/src/components/AudioSetting/AudioMediaControl.vue +132 -0
- package/src/components/AudioSetting/AudioRequestDialog.vue +105 -0
- package/src/components/AudioSetting/AudioSettingTab.vue +172 -0
- package/src/components/AudioSetting/MicrophoneSelect.vue +74 -0
- package/src/components/AudioSetting/SpeakerSelect.vue +75 -0
- package/src/components/AudioSetting/index.ts +4 -0
- package/src/components/AudioSetting/index.vue +38 -0
- package/src/components/AudioSettingPanel/i18n/en-US/index.ts +7 -0
- package/src/components/AudioSettingPanel/i18n/index.ts +4 -0
- package/src/components/AudioSettingPanel/i18n/zh-CN/index.ts +7 -0
- package/src/components/AudioSettingPanel/index.ts +8 -0
- package/src/components/AudioSettingPanel/index.vue +151 -0
- package/src/components/Avatar/Avatar.vue +384 -0
- package/src/components/Avatar/AvatarBadge/AvatarBadge.vue +152 -0
- package/src/components/Avatar/AvatarBadge/index.ts +3 -0
- package/src/components/Avatar/index.ts +4 -0
- package/src/components/BarrageInput/BarrageInput.vue +147 -0
- package/src/components/BarrageInput/BarrageInputH5.vue +94 -0
- package/src/components/BarrageInput/EmojiPicker/EmojiPicker.module.scss +41 -0
- package/src/components/BarrageInput/EmojiPicker/EmojiPicker.vue +80 -0
- package/src/components/BarrageInput/EmojiPicker/index.ts +5 -0
- package/src/components/BarrageInput/TextEditor/Editor.scss +83 -0
- package/src/components/BarrageInput/TextEditor/EditorCore.ts +171 -0
- package/src/components/BarrageInput/TextEditor/TextEditor.module.scss +45 -0
- package/src/components/BarrageInput/TextEditor/TextEditor.vue +115 -0
- package/src/components/BarrageInput/TextEditor/index.ts +5 -0
- package/src/components/BarrageInput/i18n/en-US/index.ts +5 -0
- package/src/components/BarrageInput/i18n/index.ts +4 -0
- package/src/components/BarrageInput/i18n/zh-CN/index.ts +5 -0
- package/src/components/BarrageInput/index.ts +11 -0
- package/src/components/BarrageList/BarrageList.vue +373 -0
- package/src/components/BarrageList/BarrageListH5.vue +381 -0
- package/src/components/BarrageList/ClickAction/UserActionMenu.vue +164 -0
- package/src/components/BarrageList/Message/CustomMessage/CustomMessage.vue +7 -0
- package/src/components/BarrageList/Message/CustomMessage/index.ts +3 -0
- package/src/components/BarrageList/Message/FaceMessage/FaceMessage.vue +43 -0
- package/src/components/BarrageList/Message/FaceMessage/index.ts +3 -0
- package/src/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue +55 -0
- package/src/components/BarrageList/Message/GroupTipMessage/index.ts +3 -0
- package/src/components/BarrageList/Message/ImageMessage/ImageMessage.vue +181 -0
- package/src/components/BarrageList/Message/ImageMessage/index.ts +3 -0
- package/src/components/BarrageList/Message/MergerMessage/MergerMessage.vue +6 -0
- package/src/components/BarrageList/Message/MergerMessage/index.ts +3 -0
- package/src/components/BarrageList/Message/Message.vue +28 -0
- package/src/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +103 -0
- package/src/components/BarrageList/Message/MessageLayout/MessageBubble/index.ts +3 -0
- package/src/components/BarrageList/Message/MessageLayout/MessageLayout.vue +197 -0
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +67 -0
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue +36 -0
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/index.ts +3 -0
- package/src/components/BarrageList/Message/MessageLayout/index.ts +3 -0
- package/src/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue +82 -0
- package/src/components/BarrageList/Message/RecalledMessage/index.ts +3 -0
- package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +256 -0
- package/src/components/BarrageList/Message/TextMessage/index.ts +3 -0
- package/src/components/BarrageList/Message/index.ts +5 -0
- package/src/components/BarrageList/MessageForward/ForwardListItem.vue +67 -0
- package/src/components/BarrageList/MessageForward/MessageForward.vue +388 -0
- package/src/components/BarrageList/MessageForward/index.ts +3 -0
- package/src/components/BarrageList/MessageListContext.ts +16 -0
- package/src/components/BarrageList/MessageTimeDivider/MessageTimeDivider.vue +51 -0
- package/src/components/BarrageList/MessageTimeDivider/index.ts +3 -0
- package/src/components/BarrageList/i18n/en-US/index.ts +10 -0
- package/src/components/BarrageList/i18n/index.ts +4 -0
- package/src/components/BarrageList/i18n/zh-CN/index.ts +12 -0
- package/src/components/BarrageList/index.ts +11 -0
- package/src/components/CameraButton/index.ts +3 -0
- package/src/components/CameraButton/index.vue +54 -0
- package/src/components/CoGuestPanel/CoGuestPanel.vue +362 -0
- package/src/components/CoGuestPanel/i18n/en-US/index.ts +16 -0
- package/src/components/CoGuestPanel/i18n/index.ts +4 -0
- package/src/components/CoGuestPanel/i18n/zh-CN/index.ts +16 -0
- package/src/components/CoGuestPanel/index.ts +7 -0
- package/src/components/ConversationList/ConversationList.vue +45 -0
- package/src/components/ConversationList/index.ts +5 -0
- package/src/components/LiveAudienceList/LiveAudienceList.vue +334 -0
- package/src/components/LiveAudienceList/LiveAudienceListH5.vue +196 -0
- package/src/components/LiveAudienceList/UserActionMenu.vue +238 -0
- package/src/components/LiveAudienceList/i18n/en-US/index.ts +18 -0
- package/src/components/LiveAudienceList/i18n/index.ts +4 -0
- package/src/components/LiveAudienceList/i18n/zh-CN/index.ts +22 -0
- package/src/components/LiveAudienceList/index.ts +11 -0
- package/src/components/LiveList/LiveList.vue +300 -0
- package/src/components/LiveList/LiveListH5.vue +323 -0
- package/src/components/LiveList/i18n/en-US/index.ts +8 -0
- package/src/components/LiveList/i18n/index.ts +4 -0
- package/src/components/LiveList/i18n/zh-CN/index.ts +8 -0
- package/src/components/LiveList/index.ts +12 -0
- package/src/components/LiveMonitorView/LiveMonitorView.vue +172 -0
- package/src/components/LiveMonitorView/i18n/en-US/index.ts +7 -0
- package/src/components/LiveMonitorView/i18n/index.ts +4 -0
- package/src/components/LiveMonitorView/i18n/zh-CN/index.ts +7 -0
- package/src/components/LiveMonitorView/index.ts +6 -0
- package/src/components/LiveScenePanel/CameraSettingDialog.vue +249 -0
- package/src/components/LiveScenePanel/LiveSceneSelect.vue +217 -0
- package/src/components/LiveScenePanel/MaterialDialog.vue +226 -0
- package/src/components/LiveScenePanel/MaterialItem.vue +331 -0
- package/src/components/LiveScenePanel/MaterialRenameDialog.vue +38 -0
- package/src/components/LiveScenePanel/i18n/en-US/index.ts +47 -0
- package/src/components/LiveScenePanel/i18n/index.ts +4 -0
- package/src/components/LiveScenePanel/i18n/zh-CN/index.ts +47 -0
- package/src/components/LiveScenePanel/icons/AddIcon.vue +7 -0
- package/src/components/LiveScenePanel/icons/CameraIcon.vue +11 -0
- package/src/components/LiveScenePanel/icons/CameraMirror.vue +17 -0
- package/src/components/LiveScenePanel/icons/CameraUnmirror.vue +11 -0
- package/src/components/LiveScenePanel/icons/ImageIcon.vue +9 -0
- package/src/components/LiveScenePanel/icons/MoreIcon.vue +22 -0
- package/src/components/LiveScenePanel/icons/ScreenIcon.vue +37 -0
- package/src/components/LiveScenePanel/index.ts +7 -0
- package/src/components/LiveScenePanel/index.vue +300 -0
- package/src/components/LiveStreamView/DefaultStreamViewUI.vue +145 -0
- package/src/components/LiveStreamView/i18n/en-US/index.ts +4 -0
- package/src/components/LiveStreamView/i18n/index.ts +2 -0
- package/src/components/LiveStreamView/i18n/zh-CN/index.ts +4 -0
- package/src/components/LiveStreamView/index.ts +8 -0
- package/src/components/LiveStreamView/index.vue +332 -0
- package/src/components/MessageInput/AttachmentPicker/AttachmentPicker.module.scss +54 -0
- package/src/components/MessageInput/AttachmentPicker/AttachmentPicker.vue +83 -0
- package/src/components/MessageInput/AttachmentPicker/FilePicker.vue +77 -0
- package/src/components/MessageInput/AttachmentPicker/ImagePicker.vue +77 -0
- package/src/components/MessageInput/AttachmentPicker/VideoPicker.vue +77 -0
- package/src/components/MessageInput/AttachmentPicker/index.ts +11 -0
- package/src/components/MessageInput/EmojiPicker/EmojiPicker.module.scss +27 -0
- package/src/components/MessageInput/EmojiPicker/EmojiPicker.vue +77 -0
- package/src/components/MessageInput/EmojiPicker/index.ts +5 -0
- package/src/components/MessageInput/MessageInput.module.scss +43 -0
- package/src/components/MessageInput/MessageInput.vue +114 -0
- package/src/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.module.scss +71 -0
- package/src/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.vue +78 -0
- package/src/components/MessageInput/QuotedMessagePreview/index.ts +5 -0
- package/src/components/MessageInput/SendButton/SendButton.vue +28 -0
- package/src/components/MessageInput/SendButton/index.ts +5 -0
- package/src/components/MessageInput/TextEditor/Editor.scss +57 -0
- package/src/components/MessageInput/TextEditor/EditorCore.ts +162 -0
- package/src/components/MessageInput/TextEditor/TextEditor.module.scss +25 -0
- package/src/components/MessageInput/TextEditor/TextEditor.vue +90 -0
- package/src/components/MessageInput/TextEditor/index.ts +5 -0
- package/src/components/MessageInput/index.ts +14 -0
- package/src/components/MessageInput/types.d.ts +42 -0
- package/src/components/MessageList/Message/AudioMessage/AudioMessage.vue +92 -0
- package/src/components/MessageList/Message/AudioMessage/PlayButton.vue +83 -0
- package/src/components/MessageList/Message/AudioMessage/WaveForm.vue +114 -0
- package/src/components/MessageList/Message/AudioMessage/index.ts +3 -0
- package/src/components/MessageList/Message/CustomMessage/CustomMessage.vue +7 -0
- package/src/components/MessageList/Message/CustomMessage/index.ts +3 -0
- package/src/components/MessageList/Message/FaceMessage/FaceMessage.vue +43 -0
- package/src/components/MessageList/Message/FaceMessage/index.ts +3 -0
- package/src/components/MessageList/Message/FileMessage/FileMessage.vue +145 -0
- package/src/components/MessageList/Message/FileMessage/index.ts +3 -0
- package/src/components/MessageList/Message/GroupTipMessage/GroupTipMessage.vue +55 -0
- package/src/components/MessageList/Message/GroupTipMessage/index.ts +3 -0
- package/src/components/MessageList/Message/ImageMessage/ImageMessage.vue +360 -0
- package/src/components/MessageList/Message/ImageMessage/index.ts +3 -0
- package/src/components/MessageList/Message/LocationMessage/LocationMessage.vue +6 -0
- package/src/components/MessageList/Message/LocationMessage/index.ts +3 -0
- package/src/components/MessageList/Message/MergerMessage/MergerMessage.vue +6 -0
- package/src/components/MessageList/Message/MergerMessage/index.ts +3 -0
- package/src/components/MessageList/Message/Message.vue +41 -0
- package/src/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.module.scss +44 -0
- package/src/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.vue +117 -0
- package/src/components/MessageList/Message/MessageLayout/MessageActionDropdown/index.ts +3 -0
- package/src/components/MessageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +118 -0
- package/src/components/MessageList/Message/MessageLayout/MessageBubble/index.ts +3 -0
- package/src/components/MessageList/Message/MessageLayout/MessageLayout.vue +237 -0
- package/src/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +143 -0
- package/src/components/MessageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue +42 -0
- package/src/components/MessageList/Message/MessageLayout/MessageMeta/index.ts +3 -0
- package/src/components/MessageList/Message/MessageLayout/index.ts +3 -0
- package/src/components/MessageList/Message/MessageLayout/useMessageLayoutClasses.ts +50 -0
- package/src/components/MessageList/Message/RecalledMessage/RecalledMessage.vue +83 -0
- package/src/components/MessageList/Message/RecalledMessage/index.ts +3 -0
- package/src/components/MessageList/Message/TextMessage/TextMessage.vue +209 -0
- package/src/components/MessageList/Message/TextMessage/index.ts +3 -0
- package/src/components/MessageList/Message/VideoMessage/VideoMessage.vue +191 -0
- package/src/components/MessageList/Message/VideoMessage/index.ts +3 -0
- package/src/components/MessageList/Message/index.ts +5 -0
- package/src/components/MessageList/MessageForward/ForwardListItem.vue +74 -0
- package/src/components/MessageList/MessageForward/MessageForward.vue +209 -0
- package/src/components/MessageList/MessageForward/index.ts +3 -0
- package/src/components/MessageList/MessageList.vue +382 -0
- package/src/components/MessageList/MessageListContext.ts +16 -0
- package/src/components/MessageList/MessageTimeDivider/MessageTimeDivider.vue +51 -0
- package/src/components/MessageList/MessageTimeDivider/index.ts +3 -0
- package/src/components/MessageList/ReadReceiptInfo/ReadReceiptInfo.vue +638 -0
- package/src/components/MessageList/ReadReceiptInfo/index.ts +3 -0
- package/src/components/MessageList/index.ts +9 -0
- package/src/components/MicButton/AudioIcon.vue +68 -0
- package/src/components/MicButton/index.ts +3 -0
- package/src/components/MicButton/index.vue +63 -0
- package/src/components/StreamMixer/LocalMixer/MixerControl.vue +170 -0
- package/src/components/StreamMixer/LocalMixer/index.vue +198 -0
- package/src/components/StreamMixer/i18n/en-US/index.ts +12 -0
- package/src/components/StreamMixer/i18n/index.ts +2 -0
- package/src/components/StreamMixer/i18n/zh-CN/index.ts +12 -0
- package/src/components/StreamMixer/icons/CameraMirror.vue +17 -0
- package/src/components/StreamMixer/icons/Delete.vue +11 -0
- package/src/components/StreamMixer/icons/Down.vue +25 -0
- package/src/components/StreamMixer/icons/Rotation.vue +16 -0
- package/src/components/StreamMixer/icons/Up.vue +25 -0
- package/src/components/StreamMixer/index.ts +7 -0
- package/src/components/StreamMixer/index.vue +14 -0
- package/src/components/StreamView/Layout/CustomLayout.vue +329 -0
- package/src/components/StreamView/Layout/FloatLayout.vue +344 -0
- package/src/components/StreamView/Layout/GridLayout.vue +347 -0
- package/src/components/StreamView/Layout/MeetingLayout.vue +436 -0
- package/src/components/StreamView/Layout/MixLayout.vue +144 -0
- package/src/components/StreamView/common/ArrowStroke.vue +264 -0
- package/src/components/StreamView/common/LocalScreenView/index.vue +127 -0
- package/src/components/StreamView/common/StreamCover/index.vue +152 -0
- package/src/components/StreamView/common/StreamList/index.vue +322 -0
- package/src/components/StreamView/common/StreamPlay/index.vue +164 -0
- package/src/components/StreamView/common/StreamRegion/StreamRegionPC.vue +134 -0
- package/src/components/StreamView/common/StreamRegion/index.ts +3 -0
- package/src/components/StreamView/index.ts +5 -0
- package/src/components/StreamView/index.vue +55 -0
- package/src/components/StreamView/manager/mediaManager.ts +434 -0
- package/src/components/UserList/AllUserActions/index.ts +8 -0
- package/src/components/UserList/AllUserActions/indexH5.vue +165 -0
- package/src/components/UserList/AllUserActions/indexPC.vue +147 -0
- package/src/components/UserList/AllUserActions/useIndexHooks.ts +54 -0
- package/src/components/UserList/UserItem/UserAction/index.ts +8 -0
- package/src/components/UserList/UserItem/UserAction/indexH5.vue +125 -0
- package/src/components/UserList/UserItem/UserAction/indexPC.vue +245 -0
- package/src/components/UserList/UserItem/UserInfo/index.vue +228 -0
- package/src/components/UserList/UserItem/UserInvite/index.vue +51 -0
- package/src/components/UserList/UserItem/index.ts +8 -0
- package/src/components/UserList/UserItem/indexH5.vue +67 -0
- package/src/components/UserList/UserItem/indexPC.vue +60 -0
- package/src/components/UserList/UserListContent/index.vue +56 -0
- package/src/components/UserList/UserListSearch/index.vue +42 -0
- package/src/components/UserList/index.vue +142 -0
- package/src/components/UserPicker/UserPicker.vue +243 -0
- package/src/components/UserPicker/components/ListMode/ListMode.vue +208 -0
- package/src/components/UserPicker/components/ListMode/index.ts +3 -0
- package/src/components/UserPicker/components/SearchBar/SearchBar.vue +97 -0
- package/src/components/UserPicker/components/SearchBar/index.ts +3 -0
- package/src/components/UserPicker/components/SelectedPanel/SelectedPanel.vue +181 -0
- package/src/components/UserPicker/components/SelectedPanel/index.ts +3 -0
- package/src/components/UserPicker/components/TreeMode/TreeMode.vue +61 -0
- package/src/components/UserPicker/components/TreeMode/TreeNode.vue +272 -0
- package/src/components/UserPicker/components/TreeMode/index.ts +3 -0
- package/src/components/UserPicker/hooks/useSearchFilter.ts +140 -0
- package/src/components/UserPicker/hooks/useSelection.ts +524 -0
- package/src/components/UserPicker/hooks/useTreeState.ts +75 -0
- package/src/components/UserPicker/index.ts +21 -0
- package/src/components/UserPicker/type.ts +80 -0
- package/src/components/VideoSetting/CameraSelect.vue +76 -0
- package/src/components/VideoSetting/VideoMediaControl.vue +125 -0
- package/src/components/VideoSetting/VideoPreview.vue +86 -0
- package/src/components/VideoSetting/VideoProfile.vue +57 -0
- package/src/components/VideoSetting/VideoRequestDialog.vue +111 -0
- package/src/components/VideoSetting/VideoSettingTab.vue +94 -0
- package/src/components/VideoSetting/index.ts +7 -0
- package/src/components/VideoSetting/index.vue +49 -0
- package/src/components/VideoSettingPanel/CameraSelect.vue +75 -0
- package/src/components/VideoSettingPanel/VideoPreview.vue +86 -0
- package/src/components/VideoSettingPanel/VideoProfile.vue +54 -0
- package/src/components/VideoSettingPanel/i18n/en-US/index.ts +7 -0
- package/src/components/VideoSettingPanel/i18n/index.ts +4 -0
- package/src/components/VideoSettingPanel/i18n/zh-CN/index.ts +7 -0
- package/src/components/VideoSettingPanel/index.ts +8 -0
- package/src/components/VideoSettingPanel/index.vue +107 -0
- package/src/constants/emoji.ts +71 -0
- package/src/directives/vClickOutside.ts +30 -0
- package/src/directives/vDblTouch.ts +67 -0
- package/src/directives/vTap.ts +86 -0
- package/src/directives/vTouchScale.ts +230 -0
- package/src/handler/index.ts +2 -0
- package/src/handler/translator.ts +159 -0
- package/src/handler/voiceConverter.ts +42 -0
- package/src/hooks/useAudioControl.ts +231 -0
- package/src/hooks/useMessageActions.ts +161 -0
- package/src/hooks/useReadReceipt/useReadReceipt.ts +223 -0
- package/src/hooks/useRoomActions/index.ts +18 -0
- package/src/hooks/useRoomActions/useRoomAudioAction.ts +68 -0
- package/src/hooks/useRoomActions/useRoomScreenAction.ts +68 -0
- package/src/hooks/useRoomActions/useRoomVideoAction.ts +67 -0
- package/src/hooks/useRoomEngine.ts +30 -0
- package/src/hooks/useScroll.ts +202 -0
- package/src/hooks/useUserActions/index.ts +166 -0
- package/src/hooks/useUserActions/useAdminAction.ts +53 -0
- package/src/hooks/useUserActions/useAudioAction.ts +64 -0
- package/src/hooks/useUserActions/useChangeNameCardAction/changeNameCardDialog.vue +76 -0
- package/src/hooks/useUserActions/useChangeNameCardAction/changeNameCardInput.vue +92 -0
- package/src/hooks/useUserActions/useChangeNameCardAction/index.ts +68 -0
- package/src/hooks/useUserActions/useChatAction.ts +39 -0
- package/src/hooks/useUserActions/useKickUserAction.ts +37 -0
- package/src/hooks/useUserActions/useMemberInviteAction.ts +55 -0
- package/src/hooks/useUserActions/useSeatAction.ts +191 -0
- package/src/hooks/useUserActions/useTransferOwnerAction.ts +79 -0
- package/src/hooks/useUserActions/useVideoAction.ts +53 -0
- package/src/hooks/useZIndex.ts +18 -0
- package/src/i18n/index.ts +5 -0
- package/src/index.ts +74 -0
- package/src/locales/en-US.ts +548 -0
- package/src/locales/index.ts +78 -0
- package/src/locales/zh-CN.ts +526 -0
- package/src/styles/common/normalize.scss +405 -0
- package/src/styles/index.scss +1 -0
- package/src/styles/mixins/_responsive.scss +212 -0
- package/src/styles/mixins/_scrollbar.scss +66 -0
- package/src/styles/mixins/_text.scss +25 -0
- package/src/styles/mixins/index.scss +3 -0
- package/src/styles/mixins/responsive-usage.md +282 -0
- package/src/styles/scss.d.ts +4 -0
- package/src/types/audience.ts +11 -0
- package/src/types/coGuest.ts +15 -0
- package/src/types/coHost.ts +6 -0
- package/src/types/device.ts +51 -0
- package/src/types/index.ts +12 -0
- package/src/types/live.ts +107 -0
- package/src/types/message.ts +141 -0
- package/src/types/monitor.ts +52 -0
- package/src/types/room.ts +73 -0
- package/src/types/seat.ts +33 -0
- package/src/types/stream.ts +12 -0
- package/src/types/types.ts +1888 -0
- package/src/types/user.ts +106 -0
- package/src/types/videoMixer.ts +12 -0
- package/src/utils/__tests__/time.test.js +82 -0
- package/src/utils/call.ts +21 -0
- package/src/utils/copyText.ts +52 -0
- package/src/utils/documentLink.ts +23 -0
- package/src/utils/domOperation.ts +281 -0
- package/src/utils/downFile.ts +32 -0
- package/src/utils/emoji.ts +50 -0
- package/src/utils/enableSampleTaskStatus.ts +8 -0
- package/src/utils/env.ts +17 -0
- package/src/utils/environment.ts +24 -0
- package/src/utils/index.ts +7 -0
- package/src/utils/json.ts +50 -0
- package/src/utils/lodash.ts +169 -0
- package/src/utils/riseInput.ts +53 -0
- package/src/utils/time.ts +87 -0
- package/src/utils/type-check.ts +44 -0
- package/src/utils/utils.ts +321 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.json +37 -0
- package/tsconfig.node.json +11 -0
|
@@ -0,0 +1,3176 @@
|
|
|
1
|
+
import { i18next, useUIKit } from "@tencentcloud/uikit-base-component-vue3";
|
|
2
|
+
const millisecondsInWeek = 6048e5;
|
|
3
|
+
const millisecondsInDay = 864e5;
|
|
4
|
+
const constructFromSymbol = Symbol.for("constructDateFrom");
|
|
5
|
+
function constructFrom(date, value) {
|
|
6
|
+
if (typeof date === "function") return date(value);
|
|
7
|
+
if (date && typeof date === "object" && constructFromSymbol in date)
|
|
8
|
+
return date[constructFromSymbol](value);
|
|
9
|
+
if (date instanceof Date) return new date.constructor(value);
|
|
10
|
+
return new Date(value);
|
|
11
|
+
}
|
|
12
|
+
function toDate(argument, context) {
|
|
13
|
+
return constructFrom(context || argument, argument);
|
|
14
|
+
}
|
|
15
|
+
function addDays(date, amount, options) {
|
|
16
|
+
const _date = toDate(date, options == null ? void 0 : options.in);
|
|
17
|
+
if (isNaN(amount)) return constructFrom(date, NaN);
|
|
18
|
+
_date.setDate(_date.getDate() + amount);
|
|
19
|
+
return _date;
|
|
20
|
+
}
|
|
21
|
+
let defaultOptions = {};
|
|
22
|
+
function getDefaultOptions() {
|
|
23
|
+
return defaultOptions;
|
|
24
|
+
}
|
|
25
|
+
function startOfWeek(date, options) {
|
|
26
|
+
var _a, _b, _c, _d;
|
|
27
|
+
const defaultOptions2 = getDefaultOptions();
|
|
28
|
+
const weekStartsOn = (options == null ? void 0 : options.weekStartsOn) ?? ((_b = (_a = options == null ? void 0 : options.locale) == null ? void 0 : _a.options) == null ? void 0 : _b.weekStartsOn) ?? defaultOptions2.weekStartsOn ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.weekStartsOn) ?? 0;
|
|
29
|
+
const _date = toDate(date, options == null ? void 0 : options.in);
|
|
30
|
+
const day = _date.getDay();
|
|
31
|
+
const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
32
|
+
_date.setDate(_date.getDate() - diff);
|
|
33
|
+
_date.setHours(0, 0, 0, 0);
|
|
34
|
+
return _date;
|
|
35
|
+
}
|
|
36
|
+
function startOfISOWeek(date, options) {
|
|
37
|
+
return startOfWeek(date, { ...options, weekStartsOn: 1 });
|
|
38
|
+
}
|
|
39
|
+
function getISOWeekYear(date, options) {
|
|
40
|
+
const _date = toDate(date, options == null ? void 0 : options.in);
|
|
41
|
+
const year = _date.getFullYear();
|
|
42
|
+
const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
|
|
43
|
+
fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
|
|
44
|
+
fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
|
|
45
|
+
const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
|
|
46
|
+
const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
|
|
47
|
+
fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
|
|
48
|
+
fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
|
|
49
|
+
const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
|
|
50
|
+
if (_date.getTime() >= startOfNextYear.getTime()) {
|
|
51
|
+
return year + 1;
|
|
52
|
+
} else if (_date.getTime() >= startOfThisYear.getTime()) {
|
|
53
|
+
return year;
|
|
54
|
+
} else {
|
|
55
|
+
return year - 1;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function getTimezoneOffsetInMilliseconds(date) {
|
|
59
|
+
const _date = toDate(date);
|
|
60
|
+
const utcDate = new Date(
|
|
61
|
+
Date.UTC(
|
|
62
|
+
_date.getFullYear(),
|
|
63
|
+
_date.getMonth(),
|
|
64
|
+
_date.getDate(),
|
|
65
|
+
_date.getHours(),
|
|
66
|
+
_date.getMinutes(),
|
|
67
|
+
_date.getSeconds(),
|
|
68
|
+
_date.getMilliseconds()
|
|
69
|
+
)
|
|
70
|
+
);
|
|
71
|
+
utcDate.setUTCFullYear(_date.getFullYear());
|
|
72
|
+
return +date - +utcDate;
|
|
73
|
+
}
|
|
74
|
+
function normalizeDates(context, ...dates) {
|
|
75
|
+
const normalize = constructFrom.bind(
|
|
76
|
+
null,
|
|
77
|
+
context || dates.find((date) => typeof date === "object")
|
|
78
|
+
);
|
|
79
|
+
return dates.map(normalize);
|
|
80
|
+
}
|
|
81
|
+
function startOfDay(date, options) {
|
|
82
|
+
const _date = toDate(date, options == null ? void 0 : options.in);
|
|
83
|
+
_date.setHours(0, 0, 0, 0);
|
|
84
|
+
return _date;
|
|
85
|
+
}
|
|
86
|
+
function differenceInCalendarDays(laterDate, earlierDate, options) {
|
|
87
|
+
const [laterDate_, earlierDate_] = normalizeDates(
|
|
88
|
+
options == null ? void 0 : options.in,
|
|
89
|
+
laterDate,
|
|
90
|
+
earlierDate
|
|
91
|
+
);
|
|
92
|
+
const laterStartOfDay = startOfDay(laterDate_);
|
|
93
|
+
const earlierStartOfDay = startOfDay(earlierDate_);
|
|
94
|
+
const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
|
|
95
|
+
const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
|
|
96
|
+
return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
|
|
97
|
+
}
|
|
98
|
+
function startOfISOWeekYear(date, options) {
|
|
99
|
+
const year = getISOWeekYear(date, options);
|
|
100
|
+
const fourthOfJanuary = constructFrom(date, 0);
|
|
101
|
+
fourthOfJanuary.setFullYear(year, 0, 4);
|
|
102
|
+
fourthOfJanuary.setHours(0, 0, 0, 0);
|
|
103
|
+
return startOfISOWeek(fourthOfJanuary);
|
|
104
|
+
}
|
|
105
|
+
function constructNow(date) {
|
|
106
|
+
return constructFrom(date, Date.now());
|
|
107
|
+
}
|
|
108
|
+
function isSameDay(laterDate, earlierDate, options) {
|
|
109
|
+
const [dateLeft_, dateRight_] = normalizeDates(
|
|
110
|
+
options == null ? void 0 : options.in,
|
|
111
|
+
laterDate,
|
|
112
|
+
earlierDate
|
|
113
|
+
);
|
|
114
|
+
return +startOfDay(dateLeft_) === +startOfDay(dateRight_);
|
|
115
|
+
}
|
|
116
|
+
function isDate(value) {
|
|
117
|
+
return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
|
|
118
|
+
}
|
|
119
|
+
function isValid(date) {
|
|
120
|
+
return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate(date)));
|
|
121
|
+
}
|
|
122
|
+
function startOfYear(date, options) {
|
|
123
|
+
const date_ = toDate(date, options == null ? void 0 : options.in);
|
|
124
|
+
date_.setFullYear(date_.getFullYear(), 0, 1);
|
|
125
|
+
date_.setHours(0, 0, 0, 0);
|
|
126
|
+
return date_;
|
|
127
|
+
}
|
|
128
|
+
const formatDistanceLocale$4 = {
|
|
129
|
+
lessThanXSeconds: {
|
|
130
|
+
one: "less than a second",
|
|
131
|
+
other: "less than {{count}} seconds"
|
|
132
|
+
},
|
|
133
|
+
xSeconds: {
|
|
134
|
+
one: "1 second",
|
|
135
|
+
other: "{{count}} seconds"
|
|
136
|
+
},
|
|
137
|
+
halfAMinute: "half a minute",
|
|
138
|
+
lessThanXMinutes: {
|
|
139
|
+
one: "less than a minute",
|
|
140
|
+
other: "less than {{count}} minutes"
|
|
141
|
+
},
|
|
142
|
+
xMinutes: {
|
|
143
|
+
one: "1 minute",
|
|
144
|
+
other: "{{count}} minutes"
|
|
145
|
+
},
|
|
146
|
+
aboutXHours: {
|
|
147
|
+
one: "about 1 hour",
|
|
148
|
+
other: "about {{count}} hours"
|
|
149
|
+
},
|
|
150
|
+
xHours: {
|
|
151
|
+
one: "1 hour",
|
|
152
|
+
other: "{{count}} hours"
|
|
153
|
+
},
|
|
154
|
+
xDays: {
|
|
155
|
+
one: "1 day",
|
|
156
|
+
other: "{{count}} days"
|
|
157
|
+
},
|
|
158
|
+
aboutXWeeks: {
|
|
159
|
+
one: "about 1 week",
|
|
160
|
+
other: "about {{count}} weeks"
|
|
161
|
+
},
|
|
162
|
+
xWeeks: {
|
|
163
|
+
one: "1 week",
|
|
164
|
+
other: "{{count}} weeks"
|
|
165
|
+
},
|
|
166
|
+
aboutXMonths: {
|
|
167
|
+
one: "about 1 month",
|
|
168
|
+
other: "about {{count}} months"
|
|
169
|
+
},
|
|
170
|
+
xMonths: {
|
|
171
|
+
one: "1 month",
|
|
172
|
+
other: "{{count}} months"
|
|
173
|
+
},
|
|
174
|
+
aboutXYears: {
|
|
175
|
+
one: "about 1 year",
|
|
176
|
+
other: "about {{count}} years"
|
|
177
|
+
},
|
|
178
|
+
xYears: {
|
|
179
|
+
one: "1 year",
|
|
180
|
+
other: "{{count}} years"
|
|
181
|
+
},
|
|
182
|
+
overXYears: {
|
|
183
|
+
one: "over 1 year",
|
|
184
|
+
other: "over {{count}} years"
|
|
185
|
+
},
|
|
186
|
+
almostXYears: {
|
|
187
|
+
one: "almost 1 year",
|
|
188
|
+
other: "almost {{count}} years"
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
const formatDistance$4 = (token, count, options) => {
|
|
192
|
+
let result;
|
|
193
|
+
const tokenValue = formatDistanceLocale$4[token];
|
|
194
|
+
if (typeof tokenValue === "string") {
|
|
195
|
+
result = tokenValue;
|
|
196
|
+
} else if (count === 1) {
|
|
197
|
+
result = tokenValue.one;
|
|
198
|
+
} else {
|
|
199
|
+
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
200
|
+
}
|
|
201
|
+
if (options == null ? void 0 : options.addSuffix) {
|
|
202
|
+
if (options.comparison && options.comparison > 0) {
|
|
203
|
+
return "in " + result;
|
|
204
|
+
} else {
|
|
205
|
+
return result + " ago";
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return result;
|
|
209
|
+
};
|
|
210
|
+
function buildFormatLongFn(args) {
|
|
211
|
+
return (options = {}) => {
|
|
212
|
+
const width = options.width ? String(options.width) : args.defaultWidth;
|
|
213
|
+
const format2 = args.formats[width] || args.formats[args.defaultWidth];
|
|
214
|
+
return format2;
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
const dateFormats$4 = {
|
|
218
|
+
full: "EEEE, MMMM do, y",
|
|
219
|
+
long: "MMMM do, y",
|
|
220
|
+
medium: "MMM d, y",
|
|
221
|
+
short: "MM/dd/yyyy"
|
|
222
|
+
};
|
|
223
|
+
const timeFormats$4 = {
|
|
224
|
+
full: "h:mm:ss a zzzz",
|
|
225
|
+
long: "h:mm:ss a z",
|
|
226
|
+
medium: "h:mm:ss a",
|
|
227
|
+
short: "h:mm a"
|
|
228
|
+
};
|
|
229
|
+
const dateTimeFormats$4 = {
|
|
230
|
+
full: "{{date}} 'at' {{time}}",
|
|
231
|
+
long: "{{date}} 'at' {{time}}",
|
|
232
|
+
medium: "{{date}}, {{time}}",
|
|
233
|
+
short: "{{date}}, {{time}}"
|
|
234
|
+
};
|
|
235
|
+
const formatLong$4 = {
|
|
236
|
+
date: buildFormatLongFn({
|
|
237
|
+
formats: dateFormats$4,
|
|
238
|
+
defaultWidth: "full"
|
|
239
|
+
}),
|
|
240
|
+
time: buildFormatLongFn({
|
|
241
|
+
formats: timeFormats$4,
|
|
242
|
+
defaultWidth: "full"
|
|
243
|
+
}),
|
|
244
|
+
dateTime: buildFormatLongFn({
|
|
245
|
+
formats: dateTimeFormats$4,
|
|
246
|
+
defaultWidth: "full"
|
|
247
|
+
})
|
|
248
|
+
};
|
|
249
|
+
const formatRelativeLocale$4 = {
|
|
250
|
+
lastWeek: "'last' eeee 'at' p",
|
|
251
|
+
yesterday: "'yesterday at' p",
|
|
252
|
+
today: "'today at' p",
|
|
253
|
+
tomorrow: "'tomorrow at' p",
|
|
254
|
+
nextWeek: "eeee 'at' p",
|
|
255
|
+
other: "P"
|
|
256
|
+
};
|
|
257
|
+
const formatRelative$4 = (token, _date, _baseDate, _options) => formatRelativeLocale$4[token];
|
|
258
|
+
function buildLocalizeFn(args) {
|
|
259
|
+
return (value, options) => {
|
|
260
|
+
const context = (options == null ? void 0 : options.context) ? String(options.context) : "standalone";
|
|
261
|
+
let valuesArray;
|
|
262
|
+
if (context === "formatting" && args.formattingValues) {
|
|
263
|
+
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
264
|
+
const width = (options == null ? void 0 : options.width) ? String(options.width) : defaultWidth;
|
|
265
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
266
|
+
} else {
|
|
267
|
+
const defaultWidth = args.defaultWidth;
|
|
268
|
+
const width = (options == null ? void 0 : options.width) ? String(options.width) : args.defaultWidth;
|
|
269
|
+
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
270
|
+
}
|
|
271
|
+
const index = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
272
|
+
return valuesArray[index];
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
const eraValues$4 = {
|
|
276
|
+
narrow: ["B", "A"],
|
|
277
|
+
abbreviated: ["BC", "AD"],
|
|
278
|
+
wide: ["Before Christ", "Anno Domini"]
|
|
279
|
+
};
|
|
280
|
+
const quarterValues$4 = {
|
|
281
|
+
narrow: ["1", "2", "3", "4"],
|
|
282
|
+
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
283
|
+
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
284
|
+
};
|
|
285
|
+
const monthValues$4 = {
|
|
286
|
+
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
287
|
+
abbreviated: [
|
|
288
|
+
"Jan",
|
|
289
|
+
"Feb",
|
|
290
|
+
"Mar",
|
|
291
|
+
"Apr",
|
|
292
|
+
"May",
|
|
293
|
+
"Jun",
|
|
294
|
+
"Jul",
|
|
295
|
+
"Aug",
|
|
296
|
+
"Sep",
|
|
297
|
+
"Oct",
|
|
298
|
+
"Nov",
|
|
299
|
+
"Dec"
|
|
300
|
+
],
|
|
301
|
+
wide: [
|
|
302
|
+
"January",
|
|
303
|
+
"February",
|
|
304
|
+
"March",
|
|
305
|
+
"April",
|
|
306
|
+
"May",
|
|
307
|
+
"June",
|
|
308
|
+
"July",
|
|
309
|
+
"August",
|
|
310
|
+
"September",
|
|
311
|
+
"October",
|
|
312
|
+
"November",
|
|
313
|
+
"December"
|
|
314
|
+
]
|
|
315
|
+
};
|
|
316
|
+
const dayValues$4 = {
|
|
317
|
+
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
318
|
+
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
319
|
+
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
320
|
+
wide: [
|
|
321
|
+
"Sunday",
|
|
322
|
+
"Monday",
|
|
323
|
+
"Tuesday",
|
|
324
|
+
"Wednesday",
|
|
325
|
+
"Thursday",
|
|
326
|
+
"Friday",
|
|
327
|
+
"Saturday"
|
|
328
|
+
]
|
|
329
|
+
};
|
|
330
|
+
const dayPeriodValues$4 = {
|
|
331
|
+
narrow: {
|
|
332
|
+
am: "a",
|
|
333
|
+
pm: "p",
|
|
334
|
+
midnight: "mi",
|
|
335
|
+
noon: "n",
|
|
336
|
+
morning: "morning",
|
|
337
|
+
afternoon: "afternoon",
|
|
338
|
+
evening: "evening",
|
|
339
|
+
night: "night"
|
|
340
|
+
},
|
|
341
|
+
abbreviated: {
|
|
342
|
+
am: "AM",
|
|
343
|
+
pm: "PM",
|
|
344
|
+
midnight: "midnight",
|
|
345
|
+
noon: "noon",
|
|
346
|
+
morning: "morning",
|
|
347
|
+
afternoon: "afternoon",
|
|
348
|
+
evening: "evening",
|
|
349
|
+
night: "night"
|
|
350
|
+
},
|
|
351
|
+
wide: {
|
|
352
|
+
am: "a.m.",
|
|
353
|
+
pm: "p.m.",
|
|
354
|
+
midnight: "midnight",
|
|
355
|
+
noon: "noon",
|
|
356
|
+
morning: "morning",
|
|
357
|
+
afternoon: "afternoon",
|
|
358
|
+
evening: "evening",
|
|
359
|
+
night: "night"
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
const formattingDayPeriodValues$4 = {
|
|
363
|
+
narrow: {
|
|
364
|
+
am: "a",
|
|
365
|
+
pm: "p",
|
|
366
|
+
midnight: "mi",
|
|
367
|
+
noon: "n",
|
|
368
|
+
morning: "in the morning",
|
|
369
|
+
afternoon: "in the afternoon",
|
|
370
|
+
evening: "in the evening",
|
|
371
|
+
night: "at night"
|
|
372
|
+
},
|
|
373
|
+
abbreviated: {
|
|
374
|
+
am: "AM",
|
|
375
|
+
pm: "PM",
|
|
376
|
+
midnight: "midnight",
|
|
377
|
+
noon: "noon",
|
|
378
|
+
morning: "in the morning",
|
|
379
|
+
afternoon: "in the afternoon",
|
|
380
|
+
evening: "in the evening",
|
|
381
|
+
night: "at night"
|
|
382
|
+
},
|
|
383
|
+
wide: {
|
|
384
|
+
am: "a.m.",
|
|
385
|
+
pm: "p.m.",
|
|
386
|
+
midnight: "midnight",
|
|
387
|
+
noon: "noon",
|
|
388
|
+
morning: "in the morning",
|
|
389
|
+
afternoon: "in the afternoon",
|
|
390
|
+
evening: "in the evening",
|
|
391
|
+
night: "at night"
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
const ordinalNumber$4 = (dirtyNumber, _options) => {
|
|
395
|
+
const number = Number(dirtyNumber);
|
|
396
|
+
const rem100 = number % 100;
|
|
397
|
+
if (rem100 > 20 || rem100 < 10) {
|
|
398
|
+
switch (rem100 % 10) {
|
|
399
|
+
case 1:
|
|
400
|
+
return number + "st";
|
|
401
|
+
case 2:
|
|
402
|
+
return number + "nd";
|
|
403
|
+
case 3:
|
|
404
|
+
return number + "rd";
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
return number + "th";
|
|
408
|
+
};
|
|
409
|
+
const localize$4 = {
|
|
410
|
+
ordinalNumber: ordinalNumber$4,
|
|
411
|
+
era: buildLocalizeFn({
|
|
412
|
+
values: eraValues$4,
|
|
413
|
+
defaultWidth: "wide"
|
|
414
|
+
}),
|
|
415
|
+
quarter: buildLocalizeFn({
|
|
416
|
+
values: quarterValues$4,
|
|
417
|
+
defaultWidth: "wide",
|
|
418
|
+
argumentCallback: (quarter) => quarter - 1
|
|
419
|
+
}),
|
|
420
|
+
month: buildLocalizeFn({
|
|
421
|
+
values: monthValues$4,
|
|
422
|
+
defaultWidth: "wide"
|
|
423
|
+
}),
|
|
424
|
+
day: buildLocalizeFn({
|
|
425
|
+
values: dayValues$4,
|
|
426
|
+
defaultWidth: "wide"
|
|
427
|
+
}),
|
|
428
|
+
dayPeriod: buildLocalizeFn({
|
|
429
|
+
values: dayPeriodValues$4,
|
|
430
|
+
defaultWidth: "wide",
|
|
431
|
+
formattingValues: formattingDayPeriodValues$4,
|
|
432
|
+
defaultFormattingWidth: "wide"
|
|
433
|
+
})
|
|
434
|
+
};
|
|
435
|
+
function buildMatchFn(args) {
|
|
436
|
+
return (string, options = {}) => {
|
|
437
|
+
const width = options.width;
|
|
438
|
+
const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
439
|
+
const matchResult = string.match(matchPattern);
|
|
440
|
+
if (!matchResult) {
|
|
441
|
+
return null;
|
|
442
|
+
}
|
|
443
|
+
const matchedString = matchResult[0];
|
|
444
|
+
const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
445
|
+
const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
|
|
446
|
+
// [TODO] -- I challenge you to fix the type
|
|
447
|
+
findKey(parsePatterns, (pattern) => pattern.test(matchedString))
|
|
448
|
+
);
|
|
449
|
+
let value;
|
|
450
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
451
|
+
value = options.valueCallback ? (
|
|
452
|
+
// [TODO] -- I challenge you to fix the type
|
|
453
|
+
options.valueCallback(value)
|
|
454
|
+
) : value;
|
|
455
|
+
const rest = string.slice(matchedString.length);
|
|
456
|
+
return { value, rest };
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
function findKey(object, predicate) {
|
|
460
|
+
for (const key in object) {
|
|
461
|
+
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
|
|
462
|
+
return key;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
return void 0;
|
|
466
|
+
}
|
|
467
|
+
function findIndex(array, predicate) {
|
|
468
|
+
for (let key = 0; key < array.length; key++) {
|
|
469
|
+
if (predicate(array[key])) {
|
|
470
|
+
return key;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
return void 0;
|
|
474
|
+
}
|
|
475
|
+
function buildMatchPatternFn(args) {
|
|
476
|
+
return (string, options = {}) => {
|
|
477
|
+
const matchResult = string.match(args.matchPattern);
|
|
478
|
+
if (!matchResult) return null;
|
|
479
|
+
const matchedString = matchResult[0];
|
|
480
|
+
const parseResult = string.match(args.parsePattern);
|
|
481
|
+
if (!parseResult) return null;
|
|
482
|
+
let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
483
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
484
|
+
const rest = string.slice(matchedString.length);
|
|
485
|
+
return { value, rest };
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
const matchOrdinalNumberPattern$4 = /^(\d+)(th|st|nd|rd)?/i;
|
|
489
|
+
const parseOrdinalNumberPattern$4 = /\d+/i;
|
|
490
|
+
const matchEraPatterns$4 = {
|
|
491
|
+
narrow: /^(b|a)/i,
|
|
492
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
493
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
494
|
+
};
|
|
495
|
+
const parseEraPatterns$4 = {
|
|
496
|
+
any: [/^b/i, /^(a|c)/i]
|
|
497
|
+
};
|
|
498
|
+
const matchQuarterPatterns$4 = {
|
|
499
|
+
narrow: /^[1234]/i,
|
|
500
|
+
abbreviated: /^q[1234]/i,
|
|
501
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
502
|
+
};
|
|
503
|
+
const parseQuarterPatterns$4 = {
|
|
504
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
505
|
+
};
|
|
506
|
+
const matchMonthPatterns$4 = {
|
|
507
|
+
narrow: /^[jfmasond]/i,
|
|
508
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
509
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
510
|
+
};
|
|
511
|
+
const parseMonthPatterns$4 = {
|
|
512
|
+
narrow: [
|
|
513
|
+
/^j/i,
|
|
514
|
+
/^f/i,
|
|
515
|
+
/^m/i,
|
|
516
|
+
/^a/i,
|
|
517
|
+
/^m/i,
|
|
518
|
+
/^j/i,
|
|
519
|
+
/^j/i,
|
|
520
|
+
/^a/i,
|
|
521
|
+
/^s/i,
|
|
522
|
+
/^o/i,
|
|
523
|
+
/^n/i,
|
|
524
|
+
/^d/i
|
|
525
|
+
],
|
|
526
|
+
any: [
|
|
527
|
+
/^ja/i,
|
|
528
|
+
/^f/i,
|
|
529
|
+
/^mar/i,
|
|
530
|
+
/^ap/i,
|
|
531
|
+
/^may/i,
|
|
532
|
+
/^jun/i,
|
|
533
|
+
/^jul/i,
|
|
534
|
+
/^au/i,
|
|
535
|
+
/^s/i,
|
|
536
|
+
/^o/i,
|
|
537
|
+
/^n/i,
|
|
538
|
+
/^d/i
|
|
539
|
+
]
|
|
540
|
+
};
|
|
541
|
+
const matchDayPatterns$4 = {
|
|
542
|
+
narrow: /^[smtwf]/i,
|
|
543
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
544
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
545
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
546
|
+
};
|
|
547
|
+
const parseDayPatterns$4 = {
|
|
548
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
549
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
550
|
+
};
|
|
551
|
+
const matchDayPeriodPatterns$4 = {
|
|
552
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
553
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
554
|
+
};
|
|
555
|
+
const parseDayPeriodPatterns$4 = {
|
|
556
|
+
any: {
|
|
557
|
+
am: /^a/i,
|
|
558
|
+
pm: /^p/i,
|
|
559
|
+
midnight: /^mi/i,
|
|
560
|
+
noon: /^no/i,
|
|
561
|
+
morning: /morning/i,
|
|
562
|
+
afternoon: /afternoon/i,
|
|
563
|
+
evening: /evening/i,
|
|
564
|
+
night: /night/i
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
const match$4 = {
|
|
568
|
+
ordinalNumber: buildMatchPatternFn({
|
|
569
|
+
matchPattern: matchOrdinalNumberPattern$4,
|
|
570
|
+
parsePattern: parseOrdinalNumberPattern$4,
|
|
571
|
+
valueCallback: (value) => parseInt(value, 10)
|
|
572
|
+
}),
|
|
573
|
+
era: buildMatchFn({
|
|
574
|
+
matchPatterns: matchEraPatterns$4,
|
|
575
|
+
defaultMatchWidth: "wide",
|
|
576
|
+
parsePatterns: parseEraPatterns$4,
|
|
577
|
+
defaultParseWidth: "any"
|
|
578
|
+
}),
|
|
579
|
+
quarter: buildMatchFn({
|
|
580
|
+
matchPatterns: matchQuarterPatterns$4,
|
|
581
|
+
defaultMatchWidth: "wide",
|
|
582
|
+
parsePatterns: parseQuarterPatterns$4,
|
|
583
|
+
defaultParseWidth: "any",
|
|
584
|
+
valueCallback: (index) => index + 1
|
|
585
|
+
}),
|
|
586
|
+
month: buildMatchFn({
|
|
587
|
+
matchPatterns: matchMonthPatterns$4,
|
|
588
|
+
defaultMatchWidth: "wide",
|
|
589
|
+
parsePatterns: parseMonthPatterns$4,
|
|
590
|
+
defaultParseWidth: "any"
|
|
591
|
+
}),
|
|
592
|
+
day: buildMatchFn({
|
|
593
|
+
matchPatterns: matchDayPatterns$4,
|
|
594
|
+
defaultMatchWidth: "wide",
|
|
595
|
+
parsePatterns: parseDayPatterns$4,
|
|
596
|
+
defaultParseWidth: "any"
|
|
597
|
+
}),
|
|
598
|
+
dayPeriod: buildMatchFn({
|
|
599
|
+
matchPatterns: matchDayPeriodPatterns$4,
|
|
600
|
+
defaultMatchWidth: "any",
|
|
601
|
+
parsePatterns: parseDayPeriodPatterns$4,
|
|
602
|
+
defaultParseWidth: "any"
|
|
603
|
+
})
|
|
604
|
+
};
|
|
605
|
+
const enUS = {
|
|
606
|
+
code: "en-US",
|
|
607
|
+
formatDistance: formatDistance$4,
|
|
608
|
+
formatLong: formatLong$4,
|
|
609
|
+
formatRelative: formatRelative$4,
|
|
610
|
+
localize: localize$4,
|
|
611
|
+
match: match$4,
|
|
612
|
+
options: {
|
|
613
|
+
weekStartsOn: 0,
|
|
614
|
+
firstWeekContainsDate: 1
|
|
615
|
+
}
|
|
616
|
+
};
|
|
617
|
+
function getDayOfYear(date, options) {
|
|
618
|
+
const _date = toDate(date, options == null ? void 0 : options.in);
|
|
619
|
+
const diff = differenceInCalendarDays(_date, startOfYear(_date));
|
|
620
|
+
const dayOfYear = diff + 1;
|
|
621
|
+
return dayOfYear;
|
|
622
|
+
}
|
|
623
|
+
function getISOWeek(date, options) {
|
|
624
|
+
const _date = toDate(date, options == null ? void 0 : options.in);
|
|
625
|
+
const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
|
|
626
|
+
return Math.round(diff / millisecondsInWeek) + 1;
|
|
627
|
+
}
|
|
628
|
+
function getWeekYear(date, options) {
|
|
629
|
+
var _a, _b, _c, _d;
|
|
630
|
+
const _date = toDate(date, options == null ? void 0 : options.in);
|
|
631
|
+
const year = _date.getFullYear();
|
|
632
|
+
const defaultOptions2 = getDefaultOptions();
|
|
633
|
+
const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b = (_a = options == null ? void 0 : options.locale) == null ? void 0 : _a.options) == null ? void 0 : _b.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.firstWeekContainsDate) ?? 1;
|
|
634
|
+
const firstWeekOfNextYear = constructFrom((options == null ? void 0 : options.in) || date, 0);
|
|
635
|
+
firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
|
|
636
|
+
firstWeekOfNextYear.setHours(0, 0, 0, 0);
|
|
637
|
+
const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
|
|
638
|
+
const firstWeekOfThisYear = constructFrom((options == null ? void 0 : options.in) || date, 0);
|
|
639
|
+
firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
|
|
640
|
+
firstWeekOfThisYear.setHours(0, 0, 0, 0);
|
|
641
|
+
const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
|
|
642
|
+
if (+_date >= +startOfNextYear) {
|
|
643
|
+
return year + 1;
|
|
644
|
+
} else if (+_date >= +startOfThisYear) {
|
|
645
|
+
return year;
|
|
646
|
+
} else {
|
|
647
|
+
return year - 1;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
function startOfWeekYear(date, options) {
|
|
651
|
+
var _a, _b, _c, _d;
|
|
652
|
+
const defaultOptions2 = getDefaultOptions();
|
|
653
|
+
const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b = (_a = options == null ? void 0 : options.locale) == null ? void 0 : _a.options) == null ? void 0 : _b.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.firstWeekContainsDate) ?? 1;
|
|
654
|
+
const year = getWeekYear(date, options);
|
|
655
|
+
const firstWeek = constructFrom((options == null ? void 0 : options.in) || date, 0);
|
|
656
|
+
firstWeek.setFullYear(year, 0, firstWeekContainsDate);
|
|
657
|
+
firstWeek.setHours(0, 0, 0, 0);
|
|
658
|
+
const _date = startOfWeek(firstWeek, options);
|
|
659
|
+
return _date;
|
|
660
|
+
}
|
|
661
|
+
function getWeek(date, options) {
|
|
662
|
+
const _date = toDate(date, options == null ? void 0 : options.in);
|
|
663
|
+
const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
|
|
664
|
+
return Math.round(diff / millisecondsInWeek) + 1;
|
|
665
|
+
}
|
|
666
|
+
function addLeadingZeros(number, targetLength) {
|
|
667
|
+
const sign = number < 0 ? "-" : "";
|
|
668
|
+
const output = Math.abs(number).toString().padStart(targetLength, "0");
|
|
669
|
+
return sign + output;
|
|
670
|
+
}
|
|
671
|
+
const lightFormatters = {
|
|
672
|
+
// Year
|
|
673
|
+
y(date, token) {
|
|
674
|
+
const signedYear = date.getFullYear();
|
|
675
|
+
const year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
676
|
+
return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
|
|
677
|
+
},
|
|
678
|
+
// Month
|
|
679
|
+
M(date, token) {
|
|
680
|
+
const month = date.getMonth();
|
|
681
|
+
return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
682
|
+
},
|
|
683
|
+
// Day of the month
|
|
684
|
+
d(date, token) {
|
|
685
|
+
return addLeadingZeros(date.getDate(), token.length);
|
|
686
|
+
},
|
|
687
|
+
// AM or PM
|
|
688
|
+
a(date, token) {
|
|
689
|
+
const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
|
|
690
|
+
switch (token) {
|
|
691
|
+
case "a":
|
|
692
|
+
case "aa":
|
|
693
|
+
return dayPeriodEnumValue.toUpperCase();
|
|
694
|
+
case "aaa":
|
|
695
|
+
return dayPeriodEnumValue;
|
|
696
|
+
case "aaaaa":
|
|
697
|
+
return dayPeriodEnumValue[0];
|
|
698
|
+
case "aaaa":
|
|
699
|
+
default:
|
|
700
|
+
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
|
|
701
|
+
}
|
|
702
|
+
},
|
|
703
|
+
// Hour [1-12]
|
|
704
|
+
h(date, token) {
|
|
705
|
+
return addLeadingZeros(date.getHours() % 12 || 12, token.length);
|
|
706
|
+
},
|
|
707
|
+
// Hour [0-23]
|
|
708
|
+
H(date, token) {
|
|
709
|
+
return addLeadingZeros(date.getHours(), token.length);
|
|
710
|
+
},
|
|
711
|
+
// Minute
|
|
712
|
+
m(date, token) {
|
|
713
|
+
return addLeadingZeros(date.getMinutes(), token.length);
|
|
714
|
+
},
|
|
715
|
+
// Second
|
|
716
|
+
s(date, token) {
|
|
717
|
+
return addLeadingZeros(date.getSeconds(), token.length);
|
|
718
|
+
},
|
|
719
|
+
// Fraction of second
|
|
720
|
+
S(date, token) {
|
|
721
|
+
const numberOfDigits = token.length;
|
|
722
|
+
const milliseconds = date.getMilliseconds();
|
|
723
|
+
const fractionalSeconds = Math.trunc(
|
|
724
|
+
milliseconds * Math.pow(10, numberOfDigits - 3)
|
|
725
|
+
);
|
|
726
|
+
return addLeadingZeros(fractionalSeconds, token.length);
|
|
727
|
+
}
|
|
728
|
+
};
|
|
729
|
+
const dayPeriodEnum = {
|
|
730
|
+
midnight: "midnight",
|
|
731
|
+
noon: "noon",
|
|
732
|
+
morning: "morning",
|
|
733
|
+
afternoon: "afternoon",
|
|
734
|
+
evening: "evening",
|
|
735
|
+
night: "night"
|
|
736
|
+
};
|
|
737
|
+
const formatters = {
|
|
738
|
+
// Era
|
|
739
|
+
G: function(date, token, localize2) {
|
|
740
|
+
const era = date.getFullYear() > 0 ? 1 : 0;
|
|
741
|
+
switch (token) {
|
|
742
|
+
case "G":
|
|
743
|
+
case "GG":
|
|
744
|
+
case "GGG":
|
|
745
|
+
return localize2.era(era, { width: "abbreviated" });
|
|
746
|
+
case "GGGGG":
|
|
747
|
+
return localize2.era(era, { width: "narrow" });
|
|
748
|
+
case "GGGG":
|
|
749
|
+
default:
|
|
750
|
+
return localize2.era(era, { width: "wide" });
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
// Year
|
|
754
|
+
y: function(date, token, localize2) {
|
|
755
|
+
if (token === "yo") {
|
|
756
|
+
const signedYear = date.getFullYear();
|
|
757
|
+
const year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
758
|
+
return localize2.ordinalNumber(year, { unit: "year" });
|
|
759
|
+
}
|
|
760
|
+
return lightFormatters.y(date, token);
|
|
761
|
+
},
|
|
762
|
+
// Local week-numbering year
|
|
763
|
+
Y: function(date, token, localize2, options) {
|
|
764
|
+
const signedWeekYear = getWeekYear(date, options);
|
|
765
|
+
const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
766
|
+
if (token === "YY") {
|
|
767
|
+
const twoDigitYear = weekYear % 100;
|
|
768
|
+
return addLeadingZeros(twoDigitYear, 2);
|
|
769
|
+
}
|
|
770
|
+
if (token === "Yo") {
|
|
771
|
+
return localize2.ordinalNumber(weekYear, { unit: "year" });
|
|
772
|
+
}
|
|
773
|
+
return addLeadingZeros(weekYear, token.length);
|
|
774
|
+
},
|
|
775
|
+
// ISO week-numbering year
|
|
776
|
+
R: function(date, token) {
|
|
777
|
+
const isoWeekYear = getISOWeekYear(date);
|
|
778
|
+
return addLeadingZeros(isoWeekYear, token.length);
|
|
779
|
+
},
|
|
780
|
+
// Extended year. This is a single number designating the year of this calendar system.
|
|
781
|
+
// The main difference between `y` and `u` localizers are B.C. years:
|
|
782
|
+
// | Year | `y` | `u` |
|
|
783
|
+
// |------|-----|-----|
|
|
784
|
+
// | AC 1 | 1 | 1 |
|
|
785
|
+
// | BC 1 | 1 | 0 |
|
|
786
|
+
// | BC 2 | 2 | -1 |
|
|
787
|
+
// Also `yy` always returns the last two digits of a year,
|
|
788
|
+
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
789
|
+
u: function(date, token) {
|
|
790
|
+
const year = date.getFullYear();
|
|
791
|
+
return addLeadingZeros(year, token.length);
|
|
792
|
+
},
|
|
793
|
+
// Quarter
|
|
794
|
+
Q: function(date, token, localize2) {
|
|
795
|
+
const quarter = Math.ceil((date.getMonth() + 1) / 3);
|
|
796
|
+
switch (token) {
|
|
797
|
+
case "Q":
|
|
798
|
+
return String(quarter);
|
|
799
|
+
case "QQ":
|
|
800
|
+
return addLeadingZeros(quarter, 2);
|
|
801
|
+
case "Qo":
|
|
802
|
+
return localize2.ordinalNumber(quarter, { unit: "quarter" });
|
|
803
|
+
case "QQQ":
|
|
804
|
+
return localize2.quarter(quarter, {
|
|
805
|
+
width: "abbreviated",
|
|
806
|
+
context: "formatting"
|
|
807
|
+
});
|
|
808
|
+
case "QQQQQ":
|
|
809
|
+
return localize2.quarter(quarter, {
|
|
810
|
+
width: "narrow",
|
|
811
|
+
context: "formatting"
|
|
812
|
+
});
|
|
813
|
+
case "QQQQ":
|
|
814
|
+
default:
|
|
815
|
+
return localize2.quarter(quarter, {
|
|
816
|
+
width: "wide",
|
|
817
|
+
context: "formatting"
|
|
818
|
+
});
|
|
819
|
+
}
|
|
820
|
+
},
|
|
821
|
+
// Stand-alone quarter
|
|
822
|
+
q: function(date, token, localize2) {
|
|
823
|
+
const quarter = Math.ceil((date.getMonth() + 1) / 3);
|
|
824
|
+
switch (token) {
|
|
825
|
+
case "q":
|
|
826
|
+
return String(quarter);
|
|
827
|
+
case "qq":
|
|
828
|
+
return addLeadingZeros(quarter, 2);
|
|
829
|
+
case "qo":
|
|
830
|
+
return localize2.ordinalNumber(quarter, { unit: "quarter" });
|
|
831
|
+
case "qqq":
|
|
832
|
+
return localize2.quarter(quarter, {
|
|
833
|
+
width: "abbreviated",
|
|
834
|
+
context: "standalone"
|
|
835
|
+
});
|
|
836
|
+
case "qqqqq":
|
|
837
|
+
return localize2.quarter(quarter, {
|
|
838
|
+
width: "narrow",
|
|
839
|
+
context: "standalone"
|
|
840
|
+
});
|
|
841
|
+
case "qqqq":
|
|
842
|
+
default:
|
|
843
|
+
return localize2.quarter(quarter, {
|
|
844
|
+
width: "wide",
|
|
845
|
+
context: "standalone"
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
// Month
|
|
850
|
+
M: function(date, token, localize2) {
|
|
851
|
+
const month = date.getMonth();
|
|
852
|
+
switch (token) {
|
|
853
|
+
case "M":
|
|
854
|
+
case "MM":
|
|
855
|
+
return lightFormatters.M(date, token);
|
|
856
|
+
case "Mo":
|
|
857
|
+
return localize2.ordinalNumber(month + 1, { unit: "month" });
|
|
858
|
+
case "MMM":
|
|
859
|
+
return localize2.month(month, {
|
|
860
|
+
width: "abbreviated",
|
|
861
|
+
context: "formatting"
|
|
862
|
+
});
|
|
863
|
+
case "MMMMM":
|
|
864
|
+
return localize2.month(month, {
|
|
865
|
+
width: "narrow",
|
|
866
|
+
context: "formatting"
|
|
867
|
+
});
|
|
868
|
+
case "MMMM":
|
|
869
|
+
default:
|
|
870
|
+
return localize2.month(month, { width: "wide", context: "formatting" });
|
|
871
|
+
}
|
|
872
|
+
},
|
|
873
|
+
// Stand-alone month
|
|
874
|
+
L: function(date, token, localize2) {
|
|
875
|
+
const month = date.getMonth();
|
|
876
|
+
switch (token) {
|
|
877
|
+
case "L":
|
|
878
|
+
return String(month + 1);
|
|
879
|
+
case "LL":
|
|
880
|
+
return addLeadingZeros(month + 1, 2);
|
|
881
|
+
case "Lo":
|
|
882
|
+
return localize2.ordinalNumber(month + 1, { unit: "month" });
|
|
883
|
+
case "LLL":
|
|
884
|
+
return localize2.month(month, {
|
|
885
|
+
width: "abbreviated",
|
|
886
|
+
context: "standalone"
|
|
887
|
+
});
|
|
888
|
+
case "LLLLL":
|
|
889
|
+
return localize2.month(month, {
|
|
890
|
+
width: "narrow",
|
|
891
|
+
context: "standalone"
|
|
892
|
+
});
|
|
893
|
+
case "LLLL":
|
|
894
|
+
default:
|
|
895
|
+
return localize2.month(month, { width: "wide", context: "standalone" });
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
// Local week of year
|
|
899
|
+
w: function(date, token, localize2, options) {
|
|
900
|
+
const week = getWeek(date, options);
|
|
901
|
+
if (token === "wo") {
|
|
902
|
+
return localize2.ordinalNumber(week, { unit: "week" });
|
|
903
|
+
}
|
|
904
|
+
return addLeadingZeros(week, token.length);
|
|
905
|
+
},
|
|
906
|
+
// ISO week of year
|
|
907
|
+
I: function(date, token, localize2) {
|
|
908
|
+
const isoWeek = getISOWeek(date);
|
|
909
|
+
if (token === "Io") {
|
|
910
|
+
return localize2.ordinalNumber(isoWeek, { unit: "week" });
|
|
911
|
+
}
|
|
912
|
+
return addLeadingZeros(isoWeek, token.length);
|
|
913
|
+
},
|
|
914
|
+
// Day of the month
|
|
915
|
+
d: function(date, token, localize2) {
|
|
916
|
+
if (token === "do") {
|
|
917
|
+
return localize2.ordinalNumber(date.getDate(), { unit: "date" });
|
|
918
|
+
}
|
|
919
|
+
return lightFormatters.d(date, token);
|
|
920
|
+
},
|
|
921
|
+
// Day of year
|
|
922
|
+
D: function(date, token, localize2) {
|
|
923
|
+
const dayOfYear = getDayOfYear(date);
|
|
924
|
+
if (token === "Do") {
|
|
925
|
+
return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
|
|
926
|
+
}
|
|
927
|
+
return addLeadingZeros(dayOfYear, token.length);
|
|
928
|
+
},
|
|
929
|
+
// Day of week
|
|
930
|
+
E: function(date, token, localize2) {
|
|
931
|
+
const dayOfWeek = date.getDay();
|
|
932
|
+
switch (token) {
|
|
933
|
+
case "E":
|
|
934
|
+
case "EE":
|
|
935
|
+
case "EEE":
|
|
936
|
+
return localize2.day(dayOfWeek, {
|
|
937
|
+
width: "abbreviated",
|
|
938
|
+
context: "formatting"
|
|
939
|
+
});
|
|
940
|
+
case "EEEEE":
|
|
941
|
+
return localize2.day(dayOfWeek, {
|
|
942
|
+
width: "narrow",
|
|
943
|
+
context: "formatting"
|
|
944
|
+
});
|
|
945
|
+
case "EEEEEE":
|
|
946
|
+
return localize2.day(dayOfWeek, {
|
|
947
|
+
width: "short",
|
|
948
|
+
context: "formatting"
|
|
949
|
+
});
|
|
950
|
+
case "EEEE":
|
|
951
|
+
default:
|
|
952
|
+
return localize2.day(dayOfWeek, {
|
|
953
|
+
width: "wide",
|
|
954
|
+
context: "formatting"
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
},
|
|
958
|
+
// Local day of week
|
|
959
|
+
e: function(date, token, localize2, options) {
|
|
960
|
+
const dayOfWeek = date.getDay();
|
|
961
|
+
const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
962
|
+
switch (token) {
|
|
963
|
+
case "e":
|
|
964
|
+
return String(localDayOfWeek);
|
|
965
|
+
case "ee":
|
|
966
|
+
return addLeadingZeros(localDayOfWeek, 2);
|
|
967
|
+
case "eo":
|
|
968
|
+
return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
|
|
969
|
+
case "eee":
|
|
970
|
+
return localize2.day(dayOfWeek, {
|
|
971
|
+
width: "abbreviated",
|
|
972
|
+
context: "formatting"
|
|
973
|
+
});
|
|
974
|
+
case "eeeee":
|
|
975
|
+
return localize2.day(dayOfWeek, {
|
|
976
|
+
width: "narrow",
|
|
977
|
+
context: "formatting"
|
|
978
|
+
});
|
|
979
|
+
case "eeeeee":
|
|
980
|
+
return localize2.day(dayOfWeek, {
|
|
981
|
+
width: "short",
|
|
982
|
+
context: "formatting"
|
|
983
|
+
});
|
|
984
|
+
case "eeee":
|
|
985
|
+
default:
|
|
986
|
+
return localize2.day(dayOfWeek, {
|
|
987
|
+
width: "wide",
|
|
988
|
+
context: "formatting"
|
|
989
|
+
});
|
|
990
|
+
}
|
|
991
|
+
},
|
|
992
|
+
// Stand-alone local day of week
|
|
993
|
+
c: function(date, token, localize2, options) {
|
|
994
|
+
const dayOfWeek = date.getDay();
|
|
995
|
+
const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
996
|
+
switch (token) {
|
|
997
|
+
case "c":
|
|
998
|
+
return String(localDayOfWeek);
|
|
999
|
+
case "cc":
|
|
1000
|
+
return addLeadingZeros(localDayOfWeek, token.length);
|
|
1001
|
+
case "co":
|
|
1002
|
+
return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
|
|
1003
|
+
case "ccc":
|
|
1004
|
+
return localize2.day(dayOfWeek, {
|
|
1005
|
+
width: "abbreviated",
|
|
1006
|
+
context: "standalone"
|
|
1007
|
+
});
|
|
1008
|
+
case "ccccc":
|
|
1009
|
+
return localize2.day(dayOfWeek, {
|
|
1010
|
+
width: "narrow",
|
|
1011
|
+
context: "standalone"
|
|
1012
|
+
});
|
|
1013
|
+
case "cccccc":
|
|
1014
|
+
return localize2.day(dayOfWeek, {
|
|
1015
|
+
width: "short",
|
|
1016
|
+
context: "standalone"
|
|
1017
|
+
});
|
|
1018
|
+
case "cccc":
|
|
1019
|
+
default:
|
|
1020
|
+
return localize2.day(dayOfWeek, {
|
|
1021
|
+
width: "wide",
|
|
1022
|
+
context: "standalone"
|
|
1023
|
+
});
|
|
1024
|
+
}
|
|
1025
|
+
},
|
|
1026
|
+
// ISO day of week
|
|
1027
|
+
i: function(date, token, localize2) {
|
|
1028
|
+
const dayOfWeek = date.getDay();
|
|
1029
|
+
const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
1030
|
+
switch (token) {
|
|
1031
|
+
case "i":
|
|
1032
|
+
return String(isoDayOfWeek);
|
|
1033
|
+
case "ii":
|
|
1034
|
+
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
1035
|
+
case "io":
|
|
1036
|
+
return localize2.ordinalNumber(isoDayOfWeek, { unit: "day" });
|
|
1037
|
+
case "iii":
|
|
1038
|
+
return localize2.day(dayOfWeek, {
|
|
1039
|
+
width: "abbreviated",
|
|
1040
|
+
context: "formatting"
|
|
1041
|
+
});
|
|
1042
|
+
case "iiiii":
|
|
1043
|
+
return localize2.day(dayOfWeek, {
|
|
1044
|
+
width: "narrow",
|
|
1045
|
+
context: "formatting"
|
|
1046
|
+
});
|
|
1047
|
+
case "iiiiii":
|
|
1048
|
+
return localize2.day(dayOfWeek, {
|
|
1049
|
+
width: "short",
|
|
1050
|
+
context: "formatting"
|
|
1051
|
+
});
|
|
1052
|
+
case "iiii":
|
|
1053
|
+
default:
|
|
1054
|
+
return localize2.day(dayOfWeek, {
|
|
1055
|
+
width: "wide",
|
|
1056
|
+
context: "formatting"
|
|
1057
|
+
});
|
|
1058
|
+
}
|
|
1059
|
+
},
|
|
1060
|
+
// AM or PM
|
|
1061
|
+
a: function(date, token, localize2) {
|
|
1062
|
+
const hours = date.getHours();
|
|
1063
|
+
const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
1064
|
+
switch (token) {
|
|
1065
|
+
case "a":
|
|
1066
|
+
case "aa":
|
|
1067
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1068
|
+
width: "abbreviated",
|
|
1069
|
+
context: "formatting"
|
|
1070
|
+
});
|
|
1071
|
+
case "aaa":
|
|
1072
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1073
|
+
width: "abbreviated",
|
|
1074
|
+
context: "formatting"
|
|
1075
|
+
}).toLowerCase();
|
|
1076
|
+
case "aaaaa":
|
|
1077
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1078
|
+
width: "narrow",
|
|
1079
|
+
context: "formatting"
|
|
1080
|
+
});
|
|
1081
|
+
case "aaaa":
|
|
1082
|
+
default:
|
|
1083
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1084
|
+
width: "wide",
|
|
1085
|
+
context: "formatting"
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
},
|
|
1089
|
+
// AM, PM, midnight, noon
|
|
1090
|
+
b: function(date, token, localize2) {
|
|
1091
|
+
const hours = date.getHours();
|
|
1092
|
+
let dayPeriodEnumValue;
|
|
1093
|
+
if (hours === 12) {
|
|
1094
|
+
dayPeriodEnumValue = dayPeriodEnum.noon;
|
|
1095
|
+
} else if (hours === 0) {
|
|
1096
|
+
dayPeriodEnumValue = dayPeriodEnum.midnight;
|
|
1097
|
+
} else {
|
|
1098
|
+
dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
1099
|
+
}
|
|
1100
|
+
switch (token) {
|
|
1101
|
+
case "b":
|
|
1102
|
+
case "bb":
|
|
1103
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1104
|
+
width: "abbreviated",
|
|
1105
|
+
context: "formatting"
|
|
1106
|
+
});
|
|
1107
|
+
case "bbb":
|
|
1108
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1109
|
+
width: "abbreviated",
|
|
1110
|
+
context: "formatting"
|
|
1111
|
+
}).toLowerCase();
|
|
1112
|
+
case "bbbbb":
|
|
1113
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1114
|
+
width: "narrow",
|
|
1115
|
+
context: "formatting"
|
|
1116
|
+
});
|
|
1117
|
+
case "bbbb":
|
|
1118
|
+
default:
|
|
1119
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1120
|
+
width: "wide",
|
|
1121
|
+
context: "formatting"
|
|
1122
|
+
});
|
|
1123
|
+
}
|
|
1124
|
+
},
|
|
1125
|
+
// in the morning, in the afternoon, in the evening, at night
|
|
1126
|
+
B: function(date, token, localize2) {
|
|
1127
|
+
const hours = date.getHours();
|
|
1128
|
+
let dayPeriodEnumValue;
|
|
1129
|
+
if (hours >= 17) {
|
|
1130
|
+
dayPeriodEnumValue = dayPeriodEnum.evening;
|
|
1131
|
+
} else if (hours >= 12) {
|
|
1132
|
+
dayPeriodEnumValue = dayPeriodEnum.afternoon;
|
|
1133
|
+
} else if (hours >= 4) {
|
|
1134
|
+
dayPeriodEnumValue = dayPeriodEnum.morning;
|
|
1135
|
+
} else {
|
|
1136
|
+
dayPeriodEnumValue = dayPeriodEnum.night;
|
|
1137
|
+
}
|
|
1138
|
+
switch (token) {
|
|
1139
|
+
case "B":
|
|
1140
|
+
case "BB":
|
|
1141
|
+
case "BBB":
|
|
1142
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1143
|
+
width: "abbreviated",
|
|
1144
|
+
context: "formatting"
|
|
1145
|
+
});
|
|
1146
|
+
case "BBBBB":
|
|
1147
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1148
|
+
width: "narrow",
|
|
1149
|
+
context: "formatting"
|
|
1150
|
+
});
|
|
1151
|
+
case "BBBB":
|
|
1152
|
+
default:
|
|
1153
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1154
|
+
width: "wide",
|
|
1155
|
+
context: "formatting"
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
},
|
|
1159
|
+
// Hour [1-12]
|
|
1160
|
+
h: function(date, token, localize2) {
|
|
1161
|
+
if (token === "ho") {
|
|
1162
|
+
let hours = date.getHours() % 12;
|
|
1163
|
+
if (hours === 0) hours = 12;
|
|
1164
|
+
return localize2.ordinalNumber(hours, { unit: "hour" });
|
|
1165
|
+
}
|
|
1166
|
+
return lightFormatters.h(date, token);
|
|
1167
|
+
},
|
|
1168
|
+
// Hour [0-23]
|
|
1169
|
+
H: function(date, token, localize2) {
|
|
1170
|
+
if (token === "Ho") {
|
|
1171
|
+
return localize2.ordinalNumber(date.getHours(), { unit: "hour" });
|
|
1172
|
+
}
|
|
1173
|
+
return lightFormatters.H(date, token);
|
|
1174
|
+
},
|
|
1175
|
+
// Hour [0-11]
|
|
1176
|
+
K: function(date, token, localize2) {
|
|
1177
|
+
const hours = date.getHours() % 12;
|
|
1178
|
+
if (token === "Ko") {
|
|
1179
|
+
return localize2.ordinalNumber(hours, { unit: "hour" });
|
|
1180
|
+
}
|
|
1181
|
+
return addLeadingZeros(hours, token.length);
|
|
1182
|
+
},
|
|
1183
|
+
// Hour [1-24]
|
|
1184
|
+
k: function(date, token, localize2) {
|
|
1185
|
+
let hours = date.getHours();
|
|
1186
|
+
if (hours === 0) hours = 24;
|
|
1187
|
+
if (token === "ko") {
|
|
1188
|
+
return localize2.ordinalNumber(hours, { unit: "hour" });
|
|
1189
|
+
}
|
|
1190
|
+
return addLeadingZeros(hours, token.length);
|
|
1191
|
+
},
|
|
1192
|
+
// Minute
|
|
1193
|
+
m: function(date, token, localize2) {
|
|
1194
|
+
if (token === "mo") {
|
|
1195
|
+
return localize2.ordinalNumber(date.getMinutes(), { unit: "minute" });
|
|
1196
|
+
}
|
|
1197
|
+
return lightFormatters.m(date, token);
|
|
1198
|
+
},
|
|
1199
|
+
// Second
|
|
1200
|
+
s: function(date, token, localize2) {
|
|
1201
|
+
if (token === "so") {
|
|
1202
|
+
return localize2.ordinalNumber(date.getSeconds(), { unit: "second" });
|
|
1203
|
+
}
|
|
1204
|
+
return lightFormatters.s(date, token);
|
|
1205
|
+
},
|
|
1206
|
+
// Fraction of second
|
|
1207
|
+
S: function(date, token) {
|
|
1208
|
+
return lightFormatters.S(date, token);
|
|
1209
|
+
},
|
|
1210
|
+
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1211
|
+
X: function(date, token, _localize) {
|
|
1212
|
+
const timezoneOffset = date.getTimezoneOffset();
|
|
1213
|
+
if (timezoneOffset === 0) {
|
|
1214
|
+
return "Z";
|
|
1215
|
+
}
|
|
1216
|
+
switch (token) {
|
|
1217
|
+
case "X":
|
|
1218
|
+
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
1219
|
+
case "XXXX":
|
|
1220
|
+
case "XX":
|
|
1221
|
+
return formatTimezone(timezoneOffset);
|
|
1222
|
+
case "XXXXX":
|
|
1223
|
+
case "XXX":
|
|
1224
|
+
default:
|
|
1225
|
+
return formatTimezone(timezoneOffset, ":");
|
|
1226
|
+
}
|
|
1227
|
+
},
|
|
1228
|
+
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
1229
|
+
x: function(date, token, _localize) {
|
|
1230
|
+
const timezoneOffset = date.getTimezoneOffset();
|
|
1231
|
+
switch (token) {
|
|
1232
|
+
case "x":
|
|
1233
|
+
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
1234
|
+
case "xxxx":
|
|
1235
|
+
case "xx":
|
|
1236
|
+
return formatTimezone(timezoneOffset);
|
|
1237
|
+
case "xxxxx":
|
|
1238
|
+
case "xxx":
|
|
1239
|
+
default:
|
|
1240
|
+
return formatTimezone(timezoneOffset, ":");
|
|
1241
|
+
}
|
|
1242
|
+
},
|
|
1243
|
+
// Timezone (GMT)
|
|
1244
|
+
O: function(date, token, _localize) {
|
|
1245
|
+
const timezoneOffset = date.getTimezoneOffset();
|
|
1246
|
+
switch (token) {
|
|
1247
|
+
case "O":
|
|
1248
|
+
case "OO":
|
|
1249
|
+
case "OOO":
|
|
1250
|
+
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
1251
|
+
case "OOOO":
|
|
1252
|
+
default:
|
|
1253
|
+
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
1254
|
+
}
|
|
1255
|
+
},
|
|
1256
|
+
// Timezone (specific non-location)
|
|
1257
|
+
z: function(date, token, _localize) {
|
|
1258
|
+
const timezoneOffset = date.getTimezoneOffset();
|
|
1259
|
+
switch (token) {
|
|
1260
|
+
case "z":
|
|
1261
|
+
case "zz":
|
|
1262
|
+
case "zzz":
|
|
1263
|
+
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
1264
|
+
case "zzzz":
|
|
1265
|
+
default:
|
|
1266
|
+
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
1267
|
+
}
|
|
1268
|
+
},
|
|
1269
|
+
// Seconds timestamp
|
|
1270
|
+
t: function(date, token, _localize) {
|
|
1271
|
+
const timestamp = Math.trunc(+date / 1e3);
|
|
1272
|
+
return addLeadingZeros(timestamp, token.length);
|
|
1273
|
+
},
|
|
1274
|
+
// Milliseconds timestamp
|
|
1275
|
+
T: function(date, token, _localize) {
|
|
1276
|
+
return addLeadingZeros(+date, token.length);
|
|
1277
|
+
}
|
|
1278
|
+
};
|
|
1279
|
+
function formatTimezoneShort(offset, delimiter = "") {
|
|
1280
|
+
const sign = offset > 0 ? "-" : "+";
|
|
1281
|
+
const absOffset = Math.abs(offset);
|
|
1282
|
+
const hours = Math.trunc(absOffset / 60);
|
|
1283
|
+
const minutes = absOffset % 60;
|
|
1284
|
+
if (minutes === 0) {
|
|
1285
|
+
return sign + String(hours);
|
|
1286
|
+
}
|
|
1287
|
+
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
1288
|
+
}
|
|
1289
|
+
function formatTimezoneWithOptionalMinutes(offset, delimiter) {
|
|
1290
|
+
if (offset % 60 === 0) {
|
|
1291
|
+
const sign = offset > 0 ? "-" : "+";
|
|
1292
|
+
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
1293
|
+
}
|
|
1294
|
+
return formatTimezone(offset, delimiter);
|
|
1295
|
+
}
|
|
1296
|
+
function formatTimezone(offset, delimiter = "") {
|
|
1297
|
+
const sign = offset > 0 ? "-" : "+";
|
|
1298
|
+
const absOffset = Math.abs(offset);
|
|
1299
|
+
const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
|
|
1300
|
+
const minutes = addLeadingZeros(absOffset % 60, 2);
|
|
1301
|
+
return sign + hours + delimiter + minutes;
|
|
1302
|
+
}
|
|
1303
|
+
const dateLongFormatter = (pattern, formatLong2) => {
|
|
1304
|
+
switch (pattern) {
|
|
1305
|
+
case "P":
|
|
1306
|
+
return formatLong2.date({ width: "short" });
|
|
1307
|
+
case "PP":
|
|
1308
|
+
return formatLong2.date({ width: "medium" });
|
|
1309
|
+
case "PPP":
|
|
1310
|
+
return formatLong2.date({ width: "long" });
|
|
1311
|
+
case "PPPP":
|
|
1312
|
+
default:
|
|
1313
|
+
return formatLong2.date({ width: "full" });
|
|
1314
|
+
}
|
|
1315
|
+
};
|
|
1316
|
+
const timeLongFormatter = (pattern, formatLong2) => {
|
|
1317
|
+
switch (pattern) {
|
|
1318
|
+
case "p":
|
|
1319
|
+
return formatLong2.time({ width: "short" });
|
|
1320
|
+
case "pp":
|
|
1321
|
+
return formatLong2.time({ width: "medium" });
|
|
1322
|
+
case "ppp":
|
|
1323
|
+
return formatLong2.time({ width: "long" });
|
|
1324
|
+
case "pppp":
|
|
1325
|
+
default:
|
|
1326
|
+
return formatLong2.time({ width: "full" });
|
|
1327
|
+
}
|
|
1328
|
+
};
|
|
1329
|
+
const dateTimeLongFormatter = (pattern, formatLong2) => {
|
|
1330
|
+
const matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
1331
|
+
const datePattern = matchResult[1];
|
|
1332
|
+
const timePattern = matchResult[2];
|
|
1333
|
+
if (!timePattern) {
|
|
1334
|
+
return dateLongFormatter(pattern, formatLong2);
|
|
1335
|
+
}
|
|
1336
|
+
let dateTimeFormat;
|
|
1337
|
+
switch (datePattern) {
|
|
1338
|
+
case "P":
|
|
1339
|
+
dateTimeFormat = formatLong2.dateTime({ width: "short" });
|
|
1340
|
+
break;
|
|
1341
|
+
case "PP":
|
|
1342
|
+
dateTimeFormat = formatLong2.dateTime({ width: "medium" });
|
|
1343
|
+
break;
|
|
1344
|
+
case "PPP":
|
|
1345
|
+
dateTimeFormat = formatLong2.dateTime({ width: "long" });
|
|
1346
|
+
break;
|
|
1347
|
+
case "PPPP":
|
|
1348
|
+
default:
|
|
1349
|
+
dateTimeFormat = formatLong2.dateTime({ width: "full" });
|
|
1350
|
+
break;
|
|
1351
|
+
}
|
|
1352
|
+
return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
|
|
1353
|
+
};
|
|
1354
|
+
const longFormatters = {
|
|
1355
|
+
p: timeLongFormatter,
|
|
1356
|
+
P: dateTimeLongFormatter
|
|
1357
|
+
};
|
|
1358
|
+
const dayOfYearTokenRE = /^D+$/;
|
|
1359
|
+
const weekYearTokenRE = /^Y+$/;
|
|
1360
|
+
const throwTokens = ["D", "DD", "YY", "YYYY"];
|
|
1361
|
+
function isProtectedDayOfYearToken(token) {
|
|
1362
|
+
return dayOfYearTokenRE.test(token);
|
|
1363
|
+
}
|
|
1364
|
+
function isProtectedWeekYearToken(token) {
|
|
1365
|
+
return weekYearTokenRE.test(token);
|
|
1366
|
+
}
|
|
1367
|
+
function warnOrThrowProtectedError(token, format2, input) {
|
|
1368
|
+
const _message = message(token, format2, input);
|
|
1369
|
+
console.warn(_message);
|
|
1370
|
+
if (throwTokens.includes(token)) throw new RangeError(_message);
|
|
1371
|
+
}
|
|
1372
|
+
function message(token, format2, input) {
|
|
1373
|
+
const subject = token[0] === "Y" ? "years" : "days of the month";
|
|
1374
|
+
return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format2}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1375
|
+
}
|
|
1376
|
+
const formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
1377
|
+
const longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
1378
|
+
const escapedStringRegExp = /^'([^]*?)'?$/;
|
|
1379
|
+
const doubleQuoteRegExp = /''/g;
|
|
1380
|
+
const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
1381
|
+
function format(date, formatStr, options) {
|
|
1382
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1383
|
+
const defaultOptions2 = getDefaultOptions();
|
|
1384
|
+
const locale = (options == null ? void 0 : options.locale) ?? defaultOptions2.locale ?? enUS;
|
|
1385
|
+
const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b = (_a = options == null ? void 0 : options.locale) == null ? void 0 : _a.options) == null ? void 0 : _b.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.firstWeekContainsDate) ?? 1;
|
|
1386
|
+
const weekStartsOn = (options == null ? void 0 : options.weekStartsOn) ?? ((_f = (_e = options == null ? void 0 : options.locale) == null ? void 0 : _e.options) == null ? void 0 : _f.weekStartsOn) ?? defaultOptions2.weekStartsOn ?? ((_h = (_g = defaultOptions2.locale) == null ? void 0 : _g.options) == null ? void 0 : _h.weekStartsOn) ?? 0;
|
|
1387
|
+
const originalDate = toDate(date, options == null ? void 0 : options.in);
|
|
1388
|
+
if (!isValid(originalDate)) {
|
|
1389
|
+
throw new RangeError("Invalid time value");
|
|
1390
|
+
}
|
|
1391
|
+
let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => {
|
|
1392
|
+
const firstCharacter = substring[0];
|
|
1393
|
+
if (firstCharacter === "p" || firstCharacter === "P") {
|
|
1394
|
+
const longFormatter = longFormatters[firstCharacter];
|
|
1395
|
+
return longFormatter(substring, locale.formatLong);
|
|
1396
|
+
}
|
|
1397
|
+
return substring;
|
|
1398
|
+
}).join("").match(formattingTokensRegExp).map((substring) => {
|
|
1399
|
+
if (substring === "''") {
|
|
1400
|
+
return { isToken: false, value: "'" };
|
|
1401
|
+
}
|
|
1402
|
+
const firstCharacter = substring[0];
|
|
1403
|
+
if (firstCharacter === "'") {
|
|
1404
|
+
return { isToken: false, value: cleanEscapedString(substring) };
|
|
1405
|
+
}
|
|
1406
|
+
if (formatters[firstCharacter]) {
|
|
1407
|
+
return { isToken: true, value: substring };
|
|
1408
|
+
}
|
|
1409
|
+
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
1410
|
+
throw new RangeError(
|
|
1411
|
+
"Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
|
|
1412
|
+
);
|
|
1413
|
+
}
|
|
1414
|
+
return { isToken: false, value: substring };
|
|
1415
|
+
});
|
|
1416
|
+
if (locale.localize.preprocessor) {
|
|
1417
|
+
parts = locale.localize.preprocessor(originalDate, parts);
|
|
1418
|
+
}
|
|
1419
|
+
const formatterOptions = {
|
|
1420
|
+
firstWeekContainsDate,
|
|
1421
|
+
weekStartsOn,
|
|
1422
|
+
locale
|
|
1423
|
+
};
|
|
1424
|
+
return parts.map((part) => {
|
|
1425
|
+
if (!part.isToken) return part.value;
|
|
1426
|
+
const token = part.value;
|
|
1427
|
+
if (!(options == null ? void 0 : options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(token) || !(options == null ? void 0 : options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(token)) {
|
|
1428
|
+
warnOrThrowProtectedError(token, formatStr, String(date));
|
|
1429
|
+
}
|
|
1430
|
+
const formatter = formatters[token[0]];
|
|
1431
|
+
return formatter(originalDate, token, locale.localize, formatterOptions);
|
|
1432
|
+
}).join("");
|
|
1433
|
+
}
|
|
1434
|
+
function cleanEscapedString(input) {
|
|
1435
|
+
const matched = input.match(escapedStringRegExp);
|
|
1436
|
+
if (!matched) {
|
|
1437
|
+
return input;
|
|
1438
|
+
}
|
|
1439
|
+
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
1440
|
+
}
|
|
1441
|
+
function isSameWeek(laterDate, earlierDate, options) {
|
|
1442
|
+
const [laterDate_, earlierDate_] = normalizeDates(
|
|
1443
|
+
options == null ? void 0 : options.in,
|
|
1444
|
+
laterDate,
|
|
1445
|
+
earlierDate
|
|
1446
|
+
);
|
|
1447
|
+
return +startOfWeek(laterDate_, options) === +startOfWeek(earlierDate_, options);
|
|
1448
|
+
}
|
|
1449
|
+
function isSameYear(laterDate, earlierDate, options) {
|
|
1450
|
+
const [laterDate_, earlierDate_] = normalizeDates(
|
|
1451
|
+
options == null ? void 0 : options.in,
|
|
1452
|
+
laterDate,
|
|
1453
|
+
earlierDate
|
|
1454
|
+
);
|
|
1455
|
+
return laterDate_.getFullYear() === earlierDate_.getFullYear();
|
|
1456
|
+
}
|
|
1457
|
+
function isThisYear(date, options) {
|
|
1458
|
+
return isSameYear(
|
|
1459
|
+
constructFrom(date, date),
|
|
1460
|
+
constructNow(date)
|
|
1461
|
+
);
|
|
1462
|
+
}
|
|
1463
|
+
function isToday(date, options) {
|
|
1464
|
+
return isSameDay(
|
|
1465
|
+
constructFrom(date, date),
|
|
1466
|
+
constructNow(date)
|
|
1467
|
+
);
|
|
1468
|
+
}
|
|
1469
|
+
function subDays(date, amount, options) {
|
|
1470
|
+
return addDays(date, -1, options);
|
|
1471
|
+
}
|
|
1472
|
+
function isYesterday(date, options) {
|
|
1473
|
+
return isSameDay(
|
|
1474
|
+
constructFrom(date, date),
|
|
1475
|
+
subDays(constructNow(date))
|
|
1476
|
+
);
|
|
1477
|
+
}
|
|
1478
|
+
const formatDistanceLocale$3 = {
|
|
1479
|
+
lessThanXSeconds: {
|
|
1480
|
+
one: "1秒未満",
|
|
1481
|
+
other: "{{count}}秒未満",
|
|
1482
|
+
oneWithSuffix: "約1秒",
|
|
1483
|
+
otherWithSuffix: "約{{count}}秒"
|
|
1484
|
+
},
|
|
1485
|
+
xSeconds: {
|
|
1486
|
+
one: "1秒",
|
|
1487
|
+
other: "{{count}}秒"
|
|
1488
|
+
},
|
|
1489
|
+
halfAMinute: "30秒",
|
|
1490
|
+
lessThanXMinutes: {
|
|
1491
|
+
one: "1分未満",
|
|
1492
|
+
other: "{{count}}分未満",
|
|
1493
|
+
oneWithSuffix: "約1分",
|
|
1494
|
+
otherWithSuffix: "約{{count}}分"
|
|
1495
|
+
},
|
|
1496
|
+
xMinutes: {
|
|
1497
|
+
one: "1分",
|
|
1498
|
+
other: "{{count}}分"
|
|
1499
|
+
},
|
|
1500
|
+
aboutXHours: {
|
|
1501
|
+
one: "約1時間",
|
|
1502
|
+
other: "約{{count}}時間"
|
|
1503
|
+
},
|
|
1504
|
+
xHours: {
|
|
1505
|
+
one: "1時間",
|
|
1506
|
+
other: "{{count}}時間"
|
|
1507
|
+
},
|
|
1508
|
+
xDays: {
|
|
1509
|
+
one: "1日",
|
|
1510
|
+
other: "{{count}}日"
|
|
1511
|
+
},
|
|
1512
|
+
aboutXWeeks: {
|
|
1513
|
+
one: "約1週間",
|
|
1514
|
+
other: "約{{count}}週間"
|
|
1515
|
+
},
|
|
1516
|
+
xWeeks: {
|
|
1517
|
+
one: "1週間",
|
|
1518
|
+
other: "{{count}}週間"
|
|
1519
|
+
},
|
|
1520
|
+
aboutXMonths: {
|
|
1521
|
+
one: "約1か月",
|
|
1522
|
+
other: "約{{count}}か月"
|
|
1523
|
+
},
|
|
1524
|
+
xMonths: {
|
|
1525
|
+
one: "1か月",
|
|
1526
|
+
other: "{{count}}か月"
|
|
1527
|
+
},
|
|
1528
|
+
aboutXYears: {
|
|
1529
|
+
one: "約1年",
|
|
1530
|
+
other: "約{{count}}年"
|
|
1531
|
+
},
|
|
1532
|
+
xYears: {
|
|
1533
|
+
one: "1年",
|
|
1534
|
+
other: "{{count}}年"
|
|
1535
|
+
},
|
|
1536
|
+
overXYears: {
|
|
1537
|
+
one: "1年以上",
|
|
1538
|
+
other: "{{count}}年以上"
|
|
1539
|
+
},
|
|
1540
|
+
almostXYears: {
|
|
1541
|
+
one: "1年近く",
|
|
1542
|
+
other: "{{count}}年近く"
|
|
1543
|
+
}
|
|
1544
|
+
};
|
|
1545
|
+
const formatDistance$3 = (token, count, options) => {
|
|
1546
|
+
options = options || {};
|
|
1547
|
+
let result;
|
|
1548
|
+
const tokenValue = formatDistanceLocale$3[token];
|
|
1549
|
+
if (typeof tokenValue === "string") {
|
|
1550
|
+
result = tokenValue;
|
|
1551
|
+
} else if (count === 1) {
|
|
1552
|
+
if (options.addSuffix && tokenValue.oneWithSuffix) {
|
|
1553
|
+
result = tokenValue.oneWithSuffix;
|
|
1554
|
+
} else {
|
|
1555
|
+
result = tokenValue.one;
|
|
1556
|
+
}
|
|
1557
|
+
} else {
|
|
1558
|
+
if (options.addSuffix && tokenValue.otherWithSuffix) {
|
|
1559
|
+
result = tokenValue.otherWithSuffix.replace("{{count}}", String(count));
|
|
1560
|
+
} else {
|
|
1561
|
+
result = tokenValue.other.replace("{{count}}", String(count));
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
if (options.addSuffix) {
|
|
1565
|
+
if (options.comparison && options.comparison > 0) {
|
|
1566
|
+
return result + "後";
|
|
1567
|
+
} else {
|
|
1568
|
+
return result + "前";
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
return result;
|
|
1572
|
+
};
|
|
1573
|
+
const dateFormats$3 = {
|
|
1574
|
+
full: "y年M月d日EEEE",
|
|
1575
|
+
long: "y年M月d日",
|
|
1576
|
+
medium: "y/MM/dd",
|
|
1577
|
+
short: "y/MM/dd"
|
|
1578
|
+
};
|
|
1579
|
+
const timeFormats$3 = {
|
|
1580
|
+
full: "H時mm分ss秒 zzzz",
|
|
1581
|
+
long: "H:mm:ss z",
|
|
1582
|
+
medium: "H:mm:ss",
|
|
1583
|
+
short: "H:mm"
|
|
1584
|
+
};
|
|
1585
|
+
const dateTimeFormats$3 = {
|
|
1586
|
+
full: "{{date}} {{time}}",
|
|
1587
|
+
long: "{{date}} {{time}}",
|
|
1588
|
+
medium: "{{date}} {{time}}",
|
|
1589
|
+
short: "{{date}} {{time}}"
|
|
1590
|
+
};
|
|
1591
|
+
const formatLong$3 = {
|
|
1592
|
+
date: buildFormatLongFn({
|
|
1593
|
+
formats: dateFormats$3,
|
|
1594
|
+
defaultWidth: "full"
|
|
1595
|
+
}),
|
|
1596
|
+
time: buildFormatLongFn({
|
|
1597
|
+
formats: timeFormats$3,
|
|
1598
|
+
defaultWidth: "full"
|
|
1599
|
+
}),
|
|
1600
|
+
dateTime: buildFormatLongFn({
|
|
1601
|
+
formats: dateTimeFormats$3,
|
|
1602
|
+
defaultWidth: "full"
|
|
1603
|
+
})
|
|
1604
|
+
};
|
|
1605
|
+
const formatRelativeLocale$3 = {
|
|
1606
|
+
lastWeek: "先週のeeeeのp",
|
|
1607
|
+
yesterday: "昨日のp",
|
|
1608
|
+
today: "今日のp",
|
|
1609
|
+
tomorrow: "明日のp",
|
|
1610
|
+
nextWeek: "翌週のeeeeのp",
|
|
1611
|
+
other: "P"
|
|
1612
|
+
};
|
|
1613
|
+
const formatRelative$3 = (token, _date, _baseDate, _options) => {
|
|
1614
|
+
return formatRelativeLocale$3[token];
|
|
1615
|
+
};
|
|
1616
|
+
const eraValues$3 = {
|
|
1617
|
+
narrow: ["BC", "AC"],
|
|
1618
|
+
abbreviated: ["紀元前", "西暦"],
|
|
1619
|
+
wide: ["紀元前", "西暦"]
|
|
1620
|
+
};
|
|
1621
|
+
const quarterValues$3 = {
|
|
1622
|
+
narrow: ["1", "2", "3", "4"],
|
|
1623
|
+
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
1624
|
+
wide: ["第1四半期", "第2四半期", "第3四半期", "第4四半期"]
|
|
1625
|
+
};
|
|
1626
|
+
const monthValues$3 = {
|
|
1627
|
+
narrow: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
|
|
1628
|
+
abbreviated: [
|
|
1629
|
+
"1月",
|
|
1630
|
+
"2月",
|
|
1631
|
+
"3月",
|
|
1632
|
+
"4月",
|
|
1633
|
+
"5月",
|
|
1634
|
+
"6月",
|
|
1635
|
+
"7月",
|
|
1636
|
+
"8月",
|
|
1637
|
+
"9月",
|
|
1638
|
+
"10月",
|
|
1639
|
+
"11月",
|
|
1640
|
+
"12月"
|
|
1641
|
+
],
|
|
1642
|
+
wide: [
|
|
1643
|
+
"1月",
|
|
1644
|
+
"2月",
|
|
1645
|
+
"3月",
|
|
1646
|
+
"4月",
|
|
1647
|
+
"5月",
|
|
1648
|
+
"6月",
|
|
1649
|
+
"7月",
|
|
1650
|
+
"8月",
|
|
1651
|
+
"9月",
|
|
1652
|
+
"10月",
|
|
1653
|
+
"11月",
|
|
1654
|
+
"12月"
|
|
1655
|
+
]
|
|
1656
|
+
};
|
|
1657
|
+
const dayValues$3 = {
|
|
1658
|
+
narrow: ["日", "月", "火", "水", "木", "金", "土"],
|
|
1659
|
+
short: ["日", "月", "火", "水", "木", "金", "土"],
|
|
1660
|
+
abbreviated: ["日", "月", "火", "水", "木", "金", "土"],
|
|
1661
|
+
wide: ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"]
|
|
1662
|
+
};
|
|
1663
|
+
const dayPeriodValues$3 = {
|
|
1664
|
+
narrow: {
|
|
1665
|
+
am: "午前",
|
|
1666
|
+
pm: "午後",
|
|
1667
|
+
midnight: "深夜",
|
|
1668
|
+
noon: "正午",
|
|
1669
|
+
morning: "朝",
|
|
1670
|
+
afternoon: "午後",
|
|
1671
|
+
evening: "夜",
|
|
1672
|
+
night: "深夜"
|
|
1673
|
+
},
|
|
1674
|
+
abbreviated: {
|
|
1675
|
+
am: "午前",
|
|
1676
|
+
pm: "午後",
|
|
1677
|
+
midnight: "深夜",
|
|
1678
|
+
noon: "正午",
|
|
1679
|
+
morning: "朝",
|
|
1680
|
+
afternoon: "午後",
|
|
1681
|
+
evening: "夜",
|
|
1682
|
+
night: "深夜"
|
|
1683
|
+
},
|
|
1684
|
+
wide: {
|
|
1685
|
+
am: "午前",
|
|
1686
|
+
pm: "午後",
|
|
1687
|
+
midnight: "深夜",
|
|
1688
|
+
noon: "正午",
|
|
1689
|
+
morning: "朝",
|
|
1690
|
+
afternoon: "午後",
|
|
1691
|
+
evening: "夜",
|
|
1692
|
+
night: "深夜"
|
|
1693
|
+
}
|
|
1694
|
+
};
|
|
1695
|
+
const formattingDayPeriodValues$3 = {
|
|
1696
|
+
narrow: {
|
|
1697
|
+
am: "午前",
|
|
1698
|
+
pm: "午後",
|
|
1699
|
+
midnight: "深夜",
|
|
1700
|
+
noon: "正午",
|
|
1701
|
+
morning: "朝",
|
|
1702
|
+
afternoon: "午後",
|
|
1703
|
+
evening: "夜",
|
|
1704
|
+
night: "深夜"
|
|
1705
|
+
},
|
|
1706
|
+
abbreviated: {
|
|
1707
|
+
am: "午前",
|
|
1708
|
+
pm: "午後",
|
|
1709
|
+
midnight: "深夜",
|
|
1710
|
+
noon: "正午",
|
|
1711
|
+
morning: "朝",
|
|
1712
|
+
afternoon: "午後",
|
|
1713
|
+
evening: "夜",
|
|
1714
|
+
night: "深夜"
|
|
1715
|
+
},
|
|
1716
|
+
wide: {
|
|
1717
|
+
am: "午前",
|
|
1718
|
+
pm: "午後",
|
|
1719
|
+
midnight: "深夜",
|
|
1720
|
+
noon: "正午",
|
|
1721
|
+
morning: "朝",
|
|
1722
|
+
afternoon: "午後",
|
|
1723
|
+
evening: "夜",
|
|
1724
|
+
night: "深夜"
|
|
1725
|
+
}
|
|
1726
|
+
};
|
|
1727
|
+
const ordinalNumber$3 = (dirtyNumber, options) => {
|
|
1728
|
+
const number = Number(dirtyNumber);
|
|
1729
|
+
const unit = String(options == null ? void 0 : options.unit);
|
|
1730
|
+
switch (unit) {
|
|
1731
|
+
case "year":
|
|
1732
|
+
return `${number}年`;
|
|
1733
|
+
case "quarter":
|
|
1734
|
+
return `第${number}四半期`;
|
|
1735
|
+
case "month":
|
|
1736
|
+
return `${number}月`;
|
|
1737
|
+
case "week":
|
|
1738
|
+
return `第${number}週`;
|
|
1739
|
+
case "date":
|
|
1740
|
+
return `${number}日`;
|
|
1741
|
+
case "hour":
|
|
1742
|
+
return `${number}時`;
|
|
1743
|
+
case "minute":
|
|
1744
|
+
return `${number}分`;
|
|
1745
|
+
case "second":
|
|
1746
|
+
return `${number}秒`;
|
|
1747
|
+
default:
|
|
1748
|
+
return `${number}`;
|
|
1749
|
+
}
|
|
1750
|
+
};
|
|
1751
|
+
const localize$3 = {
|
|
1752
|
+
ordinalNumber: ordinalNumber$3,
|
|
1753
|
+
era: buildLocalizeFn({
|
|
1754
|
+
values: eraValues$3,
|
|
1755
|
+
defaultWidth: "wide"
|
|
1756
|
+
}),
|
|
1757
|
+
quarter: buildLocalizeFn({
|
|
1758
|
+
values: quarterValues$3,
|
|
1759
|
+
defaultWidth: "wide",
|
|
1760
|
+
argumentCallback: (quarter) => Number(quarter) - 1
|
|
1761
|
+
}),
|
|
1762
|
+
month: buildLocalizeFn({
|
|
1763
|
+
values: monthValues$3,
|
|
1764
|
+
defaultWidth: "wide"
|
|
1765
|
+
}),
|
|
1766
|
+
day: buildLocalizeFn({
|
|
1767
|
+
values: dayValues$3,
|
|
1768
|
+
defaultWidth: "wide"
|
|
1769
|
+
}),
|
|
1770
|
+
dayPeriod: buildLocalizeFn({
|
|
1771
|
+
values: dayPeriodValues$3,
|
|
1772
|
+
defaultWidth: "wide",
|
|
1773
|
+
formattingValues: formattingDayPeriodValues$3,
|
|
1774
|
+
defaultFormattingWidth: "wide"
|
|
1775
|
+
})
|
|
1776
|
+
};
|
|
1777
|
+
const matchOrdinalNumberPattern$3 = /^第?\d+(年|四半期|月|週|日|時|分|秒)?/i;
|
|
1778
|
+
const parseOrdinalNumberPattern$3 = /\d+/i;
|
|
1779
|
+
const matchEraPatterns$3 = {
|
|
1780
|
+
narrow: /^(B\.?C\.?|A\.?D\.?)/i,
|
|
1781
|
+
abbreviated: /^(紀元[前後]|西暦)/i,
|
|
1782
|
+
wide: /^(紀元[前後]|西暦)/i
|
|
1783
|
+
};
|
|
1784
|
+
const parseEraPatterns$3 = {
|
|
1785
|
+
narrow: [/^B/i, /^A/i],
|
|
1786
|
+
any: [/^(紀元前)/i, /^(西暦|紀元後)/i]
|
|
1787
|
+
};
|
|
1788
|
+
const matchQuarterPatterns$3 = {
|
|
1789
|
+
narrow: /^[1234]/i,
|
|
1790
|
+
abbreviated: /^Q[1234]/i,
|
|
1791
|
+
wide: /^第[1234一二三四1234]四半期/i
|
|
1792
|
+
};
|
|
1793
|
+
const parseQuarterPatterns$3 = {
|
|
1794
|
+
any: [/(1|一|1)/i, /(2|二|2)/i, /(3|三|3)/i, /(4|四|4)/i]
|
|
1795
|
+
};
|
|
1796
|
+
const matchMonthPatterns$3 = {
|
|
1797
|
+
narrow: /^([123456789]|1[012])/,
|
|
1798
|
+
abbreviated: /^([123456789]|1[012])月/i,
|
|
1799
|
+
wide: /^([123456789]|1[012])月/i
|
|
1800
|
+
};
|
|
1801
|
+
const parseMonthPatterns$3 = {
|
|
1802
|
+
any: [
|
|
1803
|
+
/^1\D/,
|
|
1804
|
+
/^2/,
|
|
1805
|
+
/^3/,
|
|
1806
|
+
/^4/,
|
|
1807
|
+
/^5/,
|
|
1808
|
+
/^6/,
|
|
1809
|
+
/^7/,
|
|
1810
|
+
/^8/,
|
|
1811
|
+
/^9/,
|
|
1812
|
+
/^10/,
|
|
1813
|
+
/^11/,
|
|
1814
|
+
/^12/
|
|
1815
|
+
]
|
|
1816
|
+
};
|
|
1817
|
+
const matchDayPatterns$3 = {
|
|
1818
|
+
narrow: /^[日月火水木金土]/,
|
|
1819
|
+
short: /^[日月火水木金土]/,
|
|
1820
|
+
abbreviated: /^[日月火水木金土]/,
|
|
1821
|
+
wide: /^[日月火水木金土]曜日/
|
|
1822
|
+
};
|
|
1823
|
+
const parseDayPatterns$3 = {
|
|
1824
|
+
any: [/^日/, /^月/, /^火/, /^水/, /^木/, /^金/, /^土/]
|
|
1825
|
+
};
|
|
1826
|
+
const matchDayPeriodPatterns$3 = {
|
|
1827
|
+
any: /^(AM|PM|午前|午後|正午|深夜|真夜中|夜|朝)/i
|
|
1828
|
+
};
|
|
1829
|
+
const parseDayPeriodPatterns$3 = {
|
|
1830
|
+
any: {
|
|
1831
|
+
am: /^(A|午前)/i,
|
|
1832
|
+
pm: /^(P|午後)/i,
|
|
1833
|
+
midnight: /^深夜|真夜中/i,
|
|
1834
|
+
noon: /^正午/i,
|
|
1835
|
+
morning: /^朝/i,
|
|
1836
|
+
afternoon: /^午後/i,
|
|
1837
|
+
evening: /^夜/i,
|
|
1838
|
+
night: /^深夜/i
|
|
1839
|
+
}
|
|
1840
|
+
};
|
|
1841
|
+
const match$3 = {
|
|
1842
|
+
ordinalNumber: buildMatchPatternFn({
|
|
1843
|
+
matchPattern: matchOrdinalNumberPattern$3,
|
|
1844
|
+
parsePattern: parseOrdinalNumberPattern$3,
|
|
1845
|
+
valueCallback: function(value) {
|
|
1846
|
+
return parseInt(value, 10);
|
|
1847
|
+
}
|
|
1848
|
+
}),
|
|
1849
|
+
era: buildMatchFn({
|
|
1850
|
+
matchPatterns: matchEraPatterns$3,
|
|
1851
|
+
defaultMatchWidth: "wide",
|
|
1852
|
+
parsePatterns: parseEraPatterns$3,
|
|
1853
|
+
defaultParseWidth: "any"
|
|
1854
|
+
}),
|
|
1855
|
+
quarter: buildMatchFn({
|
|
1856
|
+
matchPatterns: matchQuarterPatterns$3,
|
|
1857
|
+
defaultMatchWidth: "wide",
|
|
1858
|
+
parsePatterns: parseQuarterPatterns$3,
|
|
1859
|
+
defaultParseWidth: "any",
|
|
1860
|
+
valueCallback: (index) => index + 1
|
|
1861
|
+
}),
|
|
1862
|
+
month: buildMatchFn({
|
|
1863
|
+
matchPatterns: matchMonthPatterns$3,
|
|
1864
|
+
defaultMatchWidth: "wide",
|
|
1865
|
+
parsePatterns: parseMonthPatterns$3,
|
|
1866
|
+
defaultParseWidth: "any"
|
|
1867
|
+
}),
|
|
1868
|
+
day: buildMatchFn({
|
|
1869
|
+
matchPatterns: matchDayPatterns$3,
|
|
1870
|
+
defaultMatchWidth: "wide",
|
|
1871
|
+
parsePatterns: parseDayPatterns$3,
|
|
1872
|
+
defaultParseWidth: "any"
|
|
1873
|
+
}),
|
|
1874
|
+
dayPeriod: buildMatchFn({
|
|
1875
|
+
matchPatterns: matchDayPeriodPatterns$3,
|
|
1876
|
+
defaultMatchWidth: "any",
|
|
1877
|
+
parsePatterns: parseDayPeriodPatterns$3,
|
|
1878
|
+
defaultParseWidth: "any"
|
|
1879
|
+
})
|
|
1880
|
+
};
|
|
1881
|
+
const ja = {
|
|
1882
|
+
code: "ja",
|
|
1883
|
+
formatDistance: formatDistance$3,
|
|
1884
|
+
formatLong: formatLong$3,
|
|
1885
|
+
formatRelative: formatRelative$3,
|
|
1886
|
+
localize: localize$3,
|
|
1887
|
+
match: match$3,
|
|
1888
|
+
options: {
|
|
1889
|
+
weekStartsOn: 0,
|
|
1890
|
+
firstWeekContainsDate: 1
|
|
1891
|
+
}
|
|
1892
|
+
};
|
|
1893
|
+
const formatDistanceLocale$2 = {
|
|
1894
|
+
lessThanXSeconds: {
|
|
1895
|
+
one: "1초 미만",
|
|
1896
|
+
other: "{{count}}초 미만"
|
|
1897
|
+
},
|
|
1898
|
+
xSeconds: {
|
|
1899
|
+
one: "1초",
|
|
1900
|
+
other: "{{count}}초"
|
|
1901
|
+
},
|
|
1902
|
+
halfAMinute: "30초",
|
|
1903
|
+
lessThanXMinutes: {
|
|
1904
|
+
one: "1분 미만",
|
|
1905
|
+
other: "{{count}}분 미만"
|
|
1906
|
+
},
|
|
1907
|
+
xMinutes: {
|
|
1908
|
+
one: "1분",
|
|
1909
|
+
other: "{{count}}분"
|
|
1910
|
+
},
|
|
1911
|
+
aboutXHours: {
|
|
1912
|
+
one: "약 1시간",
|
|
1913
|
+
other: "약 {{count}}시간"
|
|
1914
|
+
},
|
|
1915
|
+
xHours: {
|
|
1916
|
+
one: "1시간",
|
|
1917
|
+
other: "{{count}}시간"
|
|
1918
|
+
},
|
|
1919
|
+
xDays: {
|
|
1920
|
+
one: "1일",
|
|
1921
|
+
other: "{{count}}일"
|
|
1922
|
+
},
|
|
1923
|
+
aboutXWeeks: {
|
|
1924
|
+
one: "약 1주",
|
|
1925
|
+
other: "약 {{count}}주"
|
|
1926
|
+
},
|
|
1927
|
+
xWeeks: {
|
|
1928
|
+
one: "1주",
|
|
1929
|
+
other: "{{count}}주"
|
|
1930
|
+
},
|
|
1931
|
+
aboutXMonths: {
|
|
1932
|
+
one: "약 1개월",
|
|
1933
|
+
other: "약 {{count}}개월"
|
|
1934
|
+
},
|
|
1935
|
+
xMonths: {
|
|
1936
|
+
one: "1개월",
|
|
1937
|
+
other: "{{count}}개월"
|
|
1938
|
+
},
|
|
1939
|
+
aboutXYears: {
|
|
1940
|
+
one: "약 1년",
|
|
1941
|
+
other: "약 {{count}}년"
|
|
1942
|
+
},
|
|
1943
|
+
xYears: {
|
|
1944
|
+
one: "1년",
|
|
1945
|
+
other: "{{count}}년"
|
|
1946
|
+
},
|
|
1947
|
+
overXYears: {
|
|
1948
|
+
one: "1년 이상",
|
|
1949
|
+
other: "{{count}}년 이상"
|
|
1950
|
+
},
|
|
1951
|
+
almostXYears: {
|
|
1952
|
+
one: "거의 1년",
|
|
1953
|
+
other: "거의 {{count}}년"
|
|
1954
|
+
}
|
|
1955
|
+
};
|
|
1956
|
+
const formatDistance$2 = (token, count, options) => {
|
|
1957
|
+
let result;
|
|
1958
|
+
const tokenValue = formatDistanceLocale$2[token];
|
|
1959
|
+
if (typeof tokenValue === "string") {
|
|
1960
|
+
result = tokenValue;
|
|
1961
|
+
} else if (count === 1) {
|
|
1962
|
+
result = tokenValue.one;
|
|
1963
|
+
} else {
|
|
1964
|
+
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
1965
|
+
}
|
|
1966
|
+
if (options == null ? void 0 : options.addSuffix) {
|
|
1967
|
+
if (options.comparison && options.comparison > 0) {
|
|
1968
|
+
return result + " 후";
|
|
1969
|
+
} else {
|
|
1970
|
+
return result + " 전";
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
return result;
|
|
1974
|
+
};
|
|
1975
|
+
const dateFormats$2 = {
|
|
1976
|
+
full: "y년 M월 d일 EEEE",
|
|
1977
|
+
long: "y년 M월 d일",
|
|
1978
|
+
medium: "y.MM.dd",
|
|
1979
|
+
short: "y.MM.dd"
|
|
1980
|
+
};
|
|
1981
|
+
const timeFormats$2 = {
|
|
1982
|
+
full: "a H시 mm분 ss초 zzzz",
|
|
1983
|
+
long: "a H:mm:ss z",
|
|
1984
|
+
medium: "HH:mm:ss",
|
|
1985
|
+
short: "HH:mm"
|
|
1986
|
+
};
|
|
1987
|
+
const dateTimeFormats$2 = {
|
|
1988
|
+
full: "{{date}} {{time}}",
|
|
1989
|
+
long: "{{date}} {{time}}",
|
|
1990
|
+
medium: "{{date}} {{time}}",
|
|
1991
|
+
short: "{{date}} {{time}}"
|
|
1992
|
+
};
|
|
1993
|
+
const formatLong$2 = {
|
|
1994
|
+
date: buildFormatLongFn({
|
|
1995
|
+
formats: dateFormats$2,
|
|
1996
|
+
defaultWidth: "full"
|
|
1997
|
+
}),
|
|
1998
|
+
time: buildFormatLongFn({
|
|
1999
|
+
formats: timeFormats$2,
|
|
2000
|
+
defaultWidth: "full"
|
|
2001
|
+
}),
|
|
2002
|
+
dateTime: buildFormatLongFn({
|
|
2003
|
+
formats: dateTimeFormats$2,
|
|
2004
|
+
defaultWidth: "full"
|
|
2005
|
+
})
|
|
2006
|
+
};
|
|
2007
|
+
const formatRelativeLocale$2 = {
|
|
2008
|
+
lastWeek: "'지난' eeee p",
|
|
2009
|
+
yesterday: "'어제' p",
|
|
2010
|
+
today: "'오늘' p",
|
|
2011
|
+
tomorrow: "'내일' p",
|
|
2012
|
+
nextWeek: "'다음' eeee p",
|
|
2013
|
+
other: "P"
|
|
2014
|
+
};
|
|
2015
|
+
const formatRelative$2 = (token, _date, _baseDate, _options) => formatRelativeLocale$2[token];
|
|
2016
|
+
const eraValues$2 = {
|
|
2017
|
+
narrow: ["BC", "AD"],
|
|
2018
|
+
abbreviated: ["BC", "AD"],
|
|
2019
|
+
wide: ["기원전", "서기"]
|
|
2020
|
+
};
|
|
2021
|
+
const quarterValues$2 = {
|
|
2022
|
+
narrow: ["1", "2", "3", "4"],
|
|
2023
|
+
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
2024
|
+
wide: ["1분기", "2분기", "3분기", "4분기"]
|
|
2025
|
+
};
|
|
2026
|
+
const monthValues$2 = {
|
|
2027
|
+
narrow: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
|
|
2028
|
+
abbreviated: [
|
|
2029
|
+
"1월",
|
|
2030
|
+
"2월",
|
|
2031
|
+
"3월",
|
|
2032
|
+
"4월",
|
|
2033
|
+
"5월",
|
|
2034
|
+
"6월",
|
|
2035
|
+
"7월",
|
|
2036
|
+
"8월",
|
|
2037
|
+
"9월",
|
|
2038
|
+
"10월",
|
|
2039
|
+
"11월",
|
|
2040
|
+
"12월"
|
|
2041
|
+
],
|
|
2042
|
+
wide: [
|
|
2043
|
+
"1월",
|
|
2044
|
+
"2월",
|
|
2045
|
+
"3월",
|
|
2046
|
+
"4월",
|
|
2047
|
+
"5월",
|
|
2048
|
+
"6월",
|
|
2049
|
+
"7월",
|
|
2050
|
+
"8월",
|
|
2051
|
+
"9월",
|
|
2052
|
+
"10월",
|
|
2053
|
+
"11월",
|
|
2054
|
+
"12월"
|
|
2055
|
+
]
|
|
2056
|
+
};
|
|
2057
|
+
const dayValues$2 = {
|
|
2058
|
+
narrow: ["일", "월", "화", "수", "목", "금", "토"],
|
|
2059
|
+
short: ["일", "월", "화", "수", "목", "금", "토"],
|
|
2060
|
+
abbreviated: ["일", "월", "화", "수", "목", "금", "토"],
|
|
2061
|
+
wide: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"]
|
|
2062
|
+
};
|
|
2063
|
+
const dayPeriodValues$2 = {
|
|
2064
|
+
narrow: {
|
|
2065
|
+
am: "오전",
|
|
2066
|
+
pm: "오후",
|
|
2067
|
+
midnight: "자정",
|
|
2068
|
+
noon: "정오",
|
|
2069
|
+
morning: "아침",
|
|
2070
|
+
afternoon: "오후",
|
|
2071
|
+
evening: "저녁",
|
|
2072
|
+
night: "밤"
|
|
2073
|
+
},
|
|
2074
|
+
abbreviated: {
|
|
2075
|
+
am: "오전",
|
|
2076
|
+
pm: "오후",
|
|
2077
|
+
midnight: "자정",
|
|
2078
|
+
noon: "정오",
|
|
2079
|
+
morning: "아침",
|
|
2080
|
+
afternoon: "오후",
|
|
2081
|
+
evening: "저녁",
|
|
2082
|
+
night: "밤"
|
|
2083
|
+
},
|
|
2084
|
+
wide: {
|
|
2085
|
+
am: "오전",
|
|
2086
|
+
pm: "오후",
|
|
2087
|
+
midnight: "자정",
|
|
2088
|
+
noon: "정오",
|
|
2089
|
+
morning: "아침",
|
|
2090
|
+
afternoon: "오후",
|
|
2091
|
+
evening: "저녁",
|
|
2092
|
+
night: "밤"
|
|
2093
|
+
}
|
|
2094
|
+
};
|
|
2095
|
+
const formattingDayPeriodValues$2 = {
|
|
2096
|
+
narrow: {
|
|
2097
|
+
am: "오전",
|
|
2098
|
+
pm: "오후",
|
|
2099
|
+
midnight: "자정",
|
|
2100
|
+
noon: "정오",
|
|
2101
|
+
morning: "아침",
|
|
2102
|
+
afternoon: "오후",
|
|
2103
|
+
evening: "저녁",
|
|
2104
|
+
night: "밤"
|
|
2105
|
+
},
|
|
2106
|
+
abbreviated: {
|
|
2107
|
+
am: "오전",
|
|
2108
|
+
pm: "오후",
|
|
2109
|
+
midnight: "자정",
|
|
2110
|
+
noon: "정오",
|
|
2111
|
+
morning: "아침",
|
|
2112
|
+
afternoon: "오후",
|
|
2113
|
+
evening: "저녁",
|
|
2114
|
+
night: "밤"
|
|
2115
|
+
},
|
|
2116
|
+
wide: {
|
|
2117
|
+
am: "오전",
|
|
2118
|
+
pm: "오후",
|
|
2119
|
+
midnight: "자정",
|
|
2120
|
+
noon: "정오",
|
|
2121
|
+
morning: "아침",
|
|
2122
|
+
afternoon: "오후",
|
|
2123
|
+
evening: "저녁",
|
|
2124
|
+
night: "밤"
|
|
2125
|
+
}
|
|
2126
|
+
};
|
|
2127
|
+
const ordinalNumber$2 = (dirtyNumber, options) => {
|
|
2128
|
+
const number = Number(dirtyNumber);
|
|
2129
|
+
const unit = String(options == null ? void 0 : options.unit);
|
|
2130
|
+
switch (unit) {
|
|
2131
|
+
case "minute":
|
|
2132
|
+
case "second":
|
|
2133
|
+
return String(number);
|
|
2134
|
+
case "date":
|
|
2135
|
+
return number + "일";
|
|
2136
|
+
default:
|
|
2137
|
+
return number + "번째";
|
|
2138
|
+
}
|
|
2139
|
+
};
|
|
2140
|
+
const localize$2 = {
|
|
2141
|
+
ordinalNumber: ordinalNumber$2,
|
|
2142
|
+
era: buildLocalizeFn({
|
|
2143
|
+
values: eraValues$2,
|
|
2144
|
+
defaultWidth: "wide"
|
|
2145
|
+
}),
|
|
2146
|
+
quarter: buildLocalizeFn({
|
|
2147
|
+
values: quarterValues$2,
|
|
2148
|
+
defaultWidth: "wide",
|
|
2149
|
+
argumentCallback: (quarter) => quarter - 1
|
|
2150
|
+
}),
|
|
2151
|
+
month: buildLocalizeFn({
|
|
2152
|
+
values: monthValues$2,
|
|
2153
|
+
defaultWidth: "wide"
|
|
2154
|
+
}),
|
|
2155
|
+
day: buildLocalizeFn({
|
|
2156
|
+
values: dayValues$2,
|
|
2157
|
+
defaultWidth: "wide"
|
|
2158
|
+
}),
|
|
2159
|
+
dayPeriod: buildLocalizeFn({
|
|
2160
|
+
values: dayPeriodValues$2,
|
|
2161
|
+
defaultWidth: "wide",
|
|
2162
|
+
formattingValues: formattingDayPeriodValues$2,
|
|
2163
|
+
defaultFormattingWidth: "wide"
|
|
2164
|
+
})
|
|
2165
|
+
};
|
|
2166
|
+
const matchOrdinalNumberPattern$2 = /^(\d+)(일|번째)?/i;
|
|
2167
|
+
const parseOrdinalNumberPattern$2 = /\d+/i;
|
|
2168
|
+
const matchEraPatterns$2 = {
|
|
2169
|
+
narrow: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
2170
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
2171
|
+
wide: /^(기원전|서기)/i
|
|
2172
|
+
};
|
|
2173
|
+
const parseEraPatterns$2 = {
|
|
2174
|
+
any: [/^(bc|기원전)/i, /^(ad|서기)/i]
|
|
2175
|
+
};
|
|
2176
|
+
const matchQuarterPatterns$2 = {
|
|
2177
|
+
narrow: /^[1234]/i,
|
|
2178
|
+
abbreviated: /^q[1234]/i,
|
|
2179
|
+
wide: /^[1234]사?분기/i
|
|
2180
|
+
};
|
|
2181
|
+
const parseQuarterPatterns$2 = {
|
|
2182
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
2183
|
+
};
|
|
2184
|
+
const matchMonthPatterns$2 = {
|
|
2185
|
+
narrow: /^(1[012]|[123456789])/,
|
|
2186
|
+
abbreviated: /^(1[012]|[123456789])월/i,
|
|
2187
|
+
wide: /^(1[012]|[123456789])월/i
|
|
2188
|
+
};
|
|
2189
|
+
const parseMonthPatterns$2 = {
|
|
2190
|
+
any: [
|
|
2191
|
+
/^1월?$/,
|
|
2192
|
+
/^2/,
|
|
2193
|
+
/^3/,
|
|
2194
|
+
/^4/,
|
|
2195
|
+
/^5/,
|
|
2196
|
+
/^6/,
|
|
2197
|
+
/^7/,
|
|
2198
|
+
/^8/,
|
|
2199
|
+
/^9/,
|
|
2200
|
+
/^10/,
|
|
2201
|
+
/^11/,
|
|
2202
|
+
/^12/
|
|
2203
|
+
]
|
|
2204
|
+
};
|
|
2205
|
+
const matchDayPatterns$2 = {
|
|
2206
|
+
narrow: /^[일월화수목금토]/,
|
|
2207
|
+
short: /^[일월화수목금토]/,
|
|
2208
|
+
abbreviated: /^[일월화수목금토]/,
|
|
2209
|
+
wide: /^[일월화수목금토]요일/
|
|
2210
|
+
};
|
|
2211
|
+
const parseDayPatterns$2 = {
|
|
2212
|
+
any: [/^일/, /^월/, /^화/, /^수/, /^목/, /^금/, /^토/]
|
|
2213
|
+
};
|
|
2214
|
+
const matchDayPeriodPatterns$2 = {
|
|
2215
|
+
any: /^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i
|
|
2216
|
+
};
|
|
2217
|
+
const parseDayPeriodPatterns$2 = {
|
|
2218
|
+
any: {
|
|
2219
|
+
am: /^(am|오전)/i,
|
|
2220
|
+
pm: /^(pm|오후)/i,
|
|
2221
|
+
midnight: /^자정/i,
|
|
2222
|
+
noon: /^정오/i,
|
|
2223
|
+
morning: /^아침/i,
|
|
2224
|
+
afternoon: /^오후/i,
|
|
2225
|
+
evening: /^저녁/i,
|
|
2226
|
+
night: /^밤/i
|
|
2227
|
+
}
|
|
2228
|
+
};
|
|
2229
|
+
const match$2 = {
|
|
2230
|
+
ordinalNumber: buildMatchPatternFn({
|
|
2231
|
+
matchPattern: matchOrdinalNumberPattern$2,
|
|
2232
|
+
parsePattern: parseOrdinalNumberPattern$2,
|
|
2233
|
+
valueCallback: (value) => parseInt(value, 10)
|
|
2234
|
+
}),
|
|
2235
|
+
era: buildMatchFn({
|
|
2236
|
+
matchPatterns: matchEraPatterns$2,
|
|
2237
|
+
defaultMatchWidth: "wide",
|
|
2238
|
+
parsePatterns: parseEraPatterns$2,
|
|
2239
|
+
defaultParseWidth: "any"
|
|
2240
|
+
}),
|
|
2241
|
+
quarter: buildMatchFn({
|
|
2242
|
+
matchPatterns: matchQuarterPatterns$2,
|
|
2243
|
+
defaultMatchWidth: "wide",
|
|
2244
|
+
parsePatterns: parseQuarterPatterns$2,
|
|
2245
|
+
defaultParseWidth: "any",
|
|
2246
|
+
valueCallback: (index) => index + 1
|
|
2247
|
+
}),
|
|
2248
|
+
month: buildMatchFn({
|
|
2249
|
+
matchPatterns: matchMonthPatterns$2,
|
|
2250
|
+
defaultMatchWidth: "wide",
|
|
2251
|
+
parsePatterns: parseMonthPatterns$2,
|
|
2252
|
+
defaultParseWidth: "any"
|
|
2253
|
+
}),
|
|
2254
|
+
day: buildMatchFn({
|
|
2255
|
+
matchPatterns: matchDayPatterns$2,
|
|
2256
|
+
defaultMatchWidth: "wide",
|
|
2257
|
+
parsePatterns: parseDayPatterns$2,
|
|
2258
|
+
defaultParseWidth: "any"
|
|
2259
|
+
}),
|
|
2260
|
+
dayPeriod: buildMatchFn({
|
|
2261
|
+
matchPatterns: matchDayPeriodPatterns$2,
|
|
2262
|
+
defaultMatchWidth: "any",
|
|
2263
|
+
parsePatterns: parseDayPeriodPatterns$2,
|
|
2264
|
+
defaultParseWidth: "any"
|
|
2265
|
+
})
|
|
2266
|
+
};
|
|
2267
|
+
const ko = {
|
|
2268
|
+
code: "ko",
|
|
2269
|
+
formatDistance: formatDistance$2,
|
|
2270
|
+
formatLong: formatLong$2,
|
|
2271
|
+
formatRelative: formatRelative$2,
|
|
2272
|
+
localize: localize$2,
|
|
2273
|
+
match: match$2,
|
|
2274
|
+
options: {
|
|
2275
|
+
weekStartsOn: 0,
|
|
2276
|
+
firstWeekContainsDate: 1
|
|
2277
|
+
}
|
|
2278
|
+
};
|
|
2279
|
+
const formatDistanceLocale$1 = {
|
|
2280
|
+
lessThanXSeconds: {
|
|
2281
|
+
one: "不到 1 秒",
|
|
2282
|
+
other: "不到 {{count}} 秒"
|
|
2283
|
+
},
|
|
2284
|
+
xSeconds: {
|
|
2285
|
+
one: "1 秒",
|
|
2286
|
+
other: "{{count}} 秒"
|
|
2287
|
+
},
|
|
2288
|
+
halfAMinute: "半分钟",
|
|
2289
|
+
lessThanXMinutes: {
|
|
2290
|
+
one: "不到 1 分钟",
|
|
2291
|
+
other: "不到 {{count}} 分钟"
|
|
2292
|
+
},
|
|
2293
|
+
xMinutes: {
|
|
2294
|
+
one: "1 分钟",
|
|
2295
|
+
other: "{{count}} 分钟"
|
|
2296
|
+
},
|
|
2297
|
+
xHours: {
|
|
2298
|
+
one: "1 小时",
|
|
2299
|
+
other: "{{count}} 小时"
|
|
2300
|
+
},
|
|
2301
|
+
aboutXHours: {
|
|
2302
|
+
one: "大约 1 小时",
|
|
2303
|
+
other: "大约 {{count}} 小时"
|
|
2304
|
+
},
|
|
2305
|
+
xDays: {
|
|
2306
|
+
one: "1 天",
|
|
2307
|
+
other: "{{count}} 天"
|
|
2308
|
+
},
|
|
2309
|
+
aboutXWeeks: {
|
|
2310
|
+
one: "大约 1 个星期",
|
|
2311
|
+
other: "大约 {{count}} 个星期"
|
|
2312
|
+
},
|
|
2313
|
+
xWeeks: {
|
|
2314
|
+
one: "1 个星期",
|
|
2315
|
+
other: "{{count}} 个星期"
|
|
2316
|
+
},
|
|
2317
|
+
aboutXMonths: {
|
|
2318
|
+
one: "大约 1 个月",
|
|
2319
|
+
other: "大约 {{count}} 个月"
|
|
2320
|
+
},
|
|
2321
|
+
xMonths: {
|
|
2322
|
+
one: "1 个月",
|
|
2323
|
+
other: "{{count}} 个月"
|
|
2324
|
+
},
|
|
2325
|
+
aboutXYears: {
|
|
2326
|
+
one: "大约 1 年",
|
|
2327
|
+
other: "大约 {{count}} 年"
|
|
2328
|
+
},
|
|
2329
|
+
xYears: {
|
|
2330
|
+
one: "1 年",
|
|
2331
|
+
other: "{{count}} 年"
|
|
2332
|
+
},
|
|
2333
|
+
overXYears: {
|
|
2334
|
+
one: "超过 1 年",
|
|
2335
|
+
other: "超过 {{count}} 年"
|
|
2336
|
+
},
|
|
2337
|
+
almostXYears: {
|
|
2338
|
+
one: "将近 1 年",
|
|
2339
|
+
other: "将近 {{count}} 年"
|
|
2340
|
+
}
|
|
2341
|
+
};
|
|
2342
|
+
const formatDistance$1 = (token, count, options) => {
|
|
2343
|
+
let result;
|
|
2344
|
+
const tokenValue = formatDistanceLocale$1[token];
|
|
2345
|
+
if (typeof tokenValue === "string") {
|
|
2346
|
+
result = tokenValue;
|
|
2347
|
+
} else if (count === 1) {
|
|
2348
|
+
result = tokenValue.one;
|
|
2349
|
+
} else {
|
|
2350
|
+
result = tokenValue.other.replace("{{count}}", String(count));
|
|
2351
|
+
}
|
|
2352
|
+
if (options == null ? void 0 : options.addSuffix) {
|
|
2353
|
+
if (options.comparison && options.comparison > 0) {
|
|
2354
|
+
return result + "内";
|
|
2355
|
+
} else {
|
|
2356
|
+
return result + "前";
|
|
2357
|
+
}
|
|
2358
|
+
}
|
|
2359
|
+
return result;
|
|
2360
|
+
};
|
|
2361
|
+
const dateFormats$1 = {
|
|
2362
|
+
full: "y'年'M'月'd'日' EEEE",
|
|
2363
|
+
long: "y'年'M'月'd'日'",
|
|
2364
|
+
medium: "yyyy-MM-dd",
|
|
2365
|
+
short: "yy-MM-dd"
|
|
2366
|
+
};
|
|
2367
|
+
const timeFormats$1 = {
|
|
2368
|
+
full: "zzzz a h:mm:ss",
|
|
2369
|
+
long: "z a h:mm:ss",
|
|
2370
|
+
medium: "a h:mm:ss",
|
|
2371
|
+
short: "a h:mm"
|
|
2372
|
+
};
|
|
2373
|
+
const dateTimeFormats$1 = {
|
|
2374
|
+
full: "{{date}} {{time}}",
|
|
2375
|
+
long: "{{date}} {{time}}",
|
|
2376
|
+
medium: "{{date}} {{time}}",
|
|
2377
|
+
short: "{{date}} {{time}}"
|
|
2378
|
+
};
|
|
2379
|
+
const formatLong$1 = {
|
|
2380
|
+
date: buildFormatLongFn({
|
|
2381
|
+
formats: dateFormats$1,
|
|
2382
|
+
defaultWidth: "full"
|
|
2383
|
+
}),
|
|
2384
|
+
time: buildFormatLongFn({
|
|
2385
|
+
formats: timeFormats$1,
|
|
2386
|
+
defaultWidth: "full"
|
|
2387
|
+
}),
|
|
2388
|
+
dateTime: buildFormatLongFn({
|
|
2389
|
+
formats: dateTimeFormats$1,
|
|
2390
|
+
defaultWidth: "full"
|
|
2391
|
+
})
|
|
2392
|
+
};
|
|
2393
|
+
function checkWeek(date, baseDate, options) {
|
|
2394
|
+
const baseFormat = "eeee p";
|
|
2395
|
+
if (isSameWeek(date, baseDate, options)) {
|
|
2396
|
+
return baseFormat;
|
|
2397
|
+
} else if (date.getTime() > baseDate.getTime()) {
|
|
2398
|
+
return "'下个'" + baseFormat;
|
|
2399
|
+
}
|
|
2400
|
+
return "'上个'" + baseFormat;
|
|
2401
|
+
}
|
|
2402
|
+
const formatRelativeLocale$1 = {
|
|
2403
|
+
lastWeek: checkWeek,
|
|
2404
|
+
// days before yesterday, maybe in this week or last week
|
|
2405
|
+
yesterday: "'昨天' p",
|
|
2406
|
+
today: "'今天' p",
|
|
2407
|
+
tomorrow: "'明天' p",
|
|
2408
|
+
nextWeek: checkWeek,
|
|
2409
|
+
// days after tomorrow, maybe in this week or next week
|
|
2410
|
+
other: "PP p"
|
|
2411
|
+
};
|
|
2412
|
+
const formatRelative$1 = (token, date, baseDate, options) => {
|
|
2413
|
+
const format2 = formatRelativeLocale$1[token];
|
|
2414
|
+
if (typeof format2 === "function") {
|
|
2415
|
+
return format2(date, baseDate, options);
|
|
2416
|
+
}
|
|
2417
|
+
return format2;
|
|
2418
|
+
};
|
|
2419
|
+
const eraValues$1 = {
|
|
2420
|
+
narrow: ["前", "公元"],
|
|
2421
|
+
abbreviated: ["前", "公元"],
|
|
2422
|
+
wide: ["公元前", "公元"]
|
|
2423
|
+
};
|
|
2424
|
+
const quarterValues$1 = {
|
|
2425
|
+
narrow: ["1", "2", "3", "4"],
|
|
2426
|
+
abbreviated: ["第一季", "第二季", "第三季", "第四季"],
|
|
2427
|
+
wide: ["第一季度", "第二季度", "第三季度", "第四季度"]
|
|
2428
|
+
};
|
|
2429
|
+
const monthValues$1 = {
|
|
2430
|
+
narrow: [
|
|
2431
|
+
"一",
|
|
2432
|
+
"二",
|
|
2433
|
+
"三",
|
|
2434
|
+
"四",
|
|
2435
|
+
"五",
|
|
2436
|
+
"六",
|
|
2437
|
+
"七",
|
|
2438
|
+
"八",
|
|
2439
|
+
"九",
|
|
2440
|
+
"十",
|
|
2441
|
+
"十一",
|
|
2442
|
+
"十二"
|
|
2443
|
+
],
|
|
2444
|
+
abbreviated: [
|
|
2445
|
+
"1月",
|
|
2446
|
+
"2月",
|
|
2447
|
+
"3月",
|
|
2448
|
+
"4月",
|
|
2449
|
+
"5月",
|
|
2450
|
+
"6月",
|
|
2451
|
+
"7月",
|
|
2452
|
+
"8月",
|
|
2453
|
+
"9月",
|
|
2454
|
+
"10月",
|
|
2455
|
+
"11月",
|
|
2456
|
+
"12月"
|
|
2457
|
+
],
|
|
2458
|
+
wide: [
|
|
2459
|
+
"一月",
|
|
2460
|
+
"二月",
|
|
2461
|
+
"三月",
|
|
2462
|
+
"四月",
|
|
2463
|
+
"五月",
|
|
2464
|
+
"六月",
|
|
2465
|
+
"七月",
|
|
2466
|
+
"八月",
|
|
2467
|
+
"九月",
|
|
2468
|
+
"十月",
|
|
2469
|
+
"十一月",
|
|
2470
|
+
"十二月"
|
|
2471
|
+
]
|
|
2472
|
+
};
|
|
2473
|
+
const dayValues$1 = {
|
|
2474
|
+
narrow: ["日", "一", "二", "三", "四", "五", "六"],
|
|
2475
|
+
short: ["日", "一", "二", "三", "四", "五", "六"],
|
|
2476
|
+
abbreviated: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
|
2477
|
+
wide: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
|
|
2478
|
+
};
|
|
2479
|
+
const dayPeriodValues$1 = {
|
|
2480
|
+
narrow: {
|
|
2481
|
+
am: "上",
|
|
2482
|
+
pm: "下",
|
|
2483
|
+
midnight: "凌晨",
|
|
2484
|
+
noon: "午",
|
|
2485
|
+
morning: "早",
|
|
2486
|
+
afternoon: "下午",
|
|
2487
|
+
evening: "晚",
|
|
2488
|
+
night: "夜"
|
|
2489
|
+
},
|
|
2490
|
+
abbreviated: {
|
|
2491
|
+
am: "上午",
|
|
2492
|
+
pm: "下午",
|
|
2493
|
+
midnight: "凌晨",
|
|
2494
|
+
noon: "中午",
|
|
2495
|
+
morning: "早晨",
|
|
2496
|
+
afternoon: "中午",
|
|
2497
|
+
evening: "晚上",
|
|
2498
|
+
night: "夜间"
|
|
2499
|
+
},
|
|
2500
|
+
wide: {
|
|
2501
|
+
am: "上午",
|
|
2502
|
+
pm: "下午",
|
|
2503
|
+
midnight: "凌晨",
|
|
2504
|
+
noon: "中午",
|
|
2505
|
+
morning: "早晨",
|
|
2506
|
+
afternoon: "中午",
|
|
2507
|
+
evening: "晚上",
|
|
2508
|
+
night: "夜间"
|
|
2509
|
+
}
|
|
2510
|
+
};
|
|
2511
|
+
const formattingDayPeriodValues$1 = {
|
|
2512
|
+
narrow: {
|
|
2513
|
+
am: "上",
|
|
2514
|
+
pm: "下",
|
|
2515
|
+
midnight: "凌晨",
|
|
2516
|
+
noon: "午",
|
|
2517
|
+
morning: "早",
|
|
2518
|
+
afternoon: "下午",
|
|
2519
|
+
evening: "晚",
|
|
2520
|
+
night: "夜"
|
|
2521
|
+
},
|
|
2522
|
+
abbreviated: {
|
|
2523
|
+
am: "上午",
|
|
2524
|
+
pm: "下午",
|
|
2525
|
+
midnight: "凌晨",
|
|
2526
|
+
noon: "中午",
|
|
2527
|
+
morning: "早晨",
|
|
2528
|
+
afternoon: "中午",
|
|
2529
|
+
evening: "晚上",
|
|
2530
|
+
night: "夜间"
|
|
2531
|
+
},
|
|
2532
|
+
wide: {
|
|
2533
|
+
am: "上午",
|
|
2534
|
+
pm: "下午",
|
|
2535
|
+
midnight: "凌晨",
|
|
2536
|
+
noon: "中午",
|
|
2537
|
+
morning: "早晨",
|
|
2538
|
+
afternoon: "中午",
|
|
2539
|
+
evening: "晚上",
|
|
2540
|
+
night: "夜间"
|
|
2541
|
+
}
|
|
2542
|
+
};
|
|
2543
|
+
const ordinalNumber$1 = (dirtyNumber, options) => {
|
|
2544
|
+
const number = Number(dirtyNumber);
|
|
2545
|
+
switch (options == null ? void 0 : options.unit) {
|
|
2546
|
+
case "date":
|
|
2547
|
+
return number.toString() + "日";
|
|
2548
|
+
case "hour":
|
|
2549
|
+
return number.toString() + "时";
|
|
2550
|
+
case "minute":
|
|
2551
|
+
return number.toString() + "分";
|
|
2552
|
+
case "second":
|
|
2553
|
+
return number.toString() + "秒";
|
|
2554
|
+
default:
|
|
2555
|
+
return "第 " + number.toString();
|
|
2556
|
+
}
|
|
2557
|
+
};
|
|
2558
|
+
const localize$1 = {
|
|
2559
|
+
ordinalNumber: ordinalNumber$1,
|
|
2560
|
+
era: buildLocalizeFn({
|
|
2561
|
+
values: eraValues$1,
|
|
2562
|
+
defaultWidth: "wide"
|
|
2563
|
+
}),
|
|
2564
|
+
quarter: buildLocalizeFn({
|
|
2565
|
+
values: quarterValues$1,
|
|
2566
|
+
defaultWidth: "wide",
|
|
2567
|
+
argumentCallback: (quarter) => quarter - 1
|
|
2568
|
+
}),
|
|
2569
|
+
month: buildLocalizeFn({
|
|
2570
|
+
values: monthValues$1,
|
|
2571
|
+
defaultWidth: "wide"
|
|
2572
|
+
}),
|
|
2573
|
+
day: buildLocalizeFn({
|
|
2574
|
+
values: dayValues$1,
|
|
2575
|
+
defaultWidth: "wide"
|
|
2576
|
+
}),
|
|
2577
|
+
dayPeriod: buildLocalizeFn({
|
|
2578
|
+
values: dayPeriodValues$1,
|
|
2579
|
+
defaultWidth: "wide",
|
|
2580
|
+
formattingValues: formattingDayPeriodValues$1,
|
|
2581
|
+
defaultFormattingWidth: "wide"
|
|
2582
|
+
})
|
|
2583
|
+
};
|
|
2584
|
+
const matchOrdinalNumberPattern$1 = /^(第\s*)?\d+(日|时|分|秒)?/i;
|
|
2585
|
+
const parseOrdinalNumberPattern$1 = /\d+/i;
|
|
2586
|
+
const matchEraPatterns$1 = {
|
|
2587
|
+
narrow: /^(前)/i,
|
|
2588
|
+
abbreviated: /^(前)/i,
|
|
2589
|
+
wide: /^(公元前|公元)/i
|
|
2590
|
+
};
|
|
2591
|
+
const parseEraPatterns$1 = {
|
|
2592
|
+
any: [/^(前)/i, /^(公元)/i]
|
|
2593
|
+
};
|
|
2594
|
+
const matchQuarterPatterns$1 = {
|
|
2595
|
+
narrow: /^[1234]/i,
|
|
2596
|
+
abbreviated: /^第[一二三四]刻/i,
|
|
2597
|
+
wide: /^第[一二三四]刻钟/i
|
|
2598
|
+
};
|
|
2599
|
+
const parseQuarterPatterns$1 = {
|
|
2600
|
+
any: [/(1|一)/i, /(2|二)/i, /(3|三)/i, /(4|四)/i]
|
|
2601
|
+
};
|
|
2602
|
+
const matchMonthPatterns$1 = {
|
|
2603
|
+
narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
|
|
2604
|
+
abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
|
|
2605
|
+
wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i
|
|
2606
|
+
};
|
|
2607
|
+
const parseMonthPatterns$1 = {
|
|
2608
|
+
narrow: [
|
|
2609
|
+
/^一/i,
|
|
2610
|
+
/^二/i,
|
|
2611
|
+
/^三/i,
|
|
2612
|
+
/^四/i,
|
|
2613
|
+
/^五/i,
|
|
2614
|
+
/^六/i,
|
|
2615
|
+
/^七/i,
|
|
2616
|
+
/^八/i,
|
|
2617
|
+
/^九/i,
|
|
2618
|
+
/^十(?!(一|二))/i,
|
|
2619
|
+
/^十一/i,
|
|
2620
|
+
/^十二/i
|
|
2621
|
+
],
|
|
2622
|
+
any: [
|
|
2623
|
+
/^一|1/i,
|
|
2624
|
+
/^二|2/i,
|
|
2625
|
+
/^三|3/i,
|
|
2626
|
+
/^四|4/i,
|
|
2627
|
+
/^五|5/i,
|
|
2628
|
+
/^六|6/i,
|
|
2629
|
+
/^七|7/i,
|
|
2630
|
+
/^八|8/i,
|
|
2631
|
+
/^九|9/i,
|
|
2632
|
+
/^十(?!(一|二))|10/i,
|
|
2633
|
+
/^十一|11/i,
|
|
2634
|
+
/^十二|12/i
|
|
2635
|
+
]
|
|
2636
|
+
};
|
|
2637
|
+
const matchDayPatterns$1 = {
|
|
2638
|
+
narrow: /^[一二三四五六日]/i,
|
|
2639
|
+
short: /^[一二三四五六日]/i,
|
|
2640
|
+
abbreviated: /^周[一二三四五六日]/i,
|
|
2641
|
+
wide: /^星期[一二三四五六日]/i
|
|
2642
|
+
};
|
|
2643
|
+
const parseDayPatterns$1 = {
|
|
2644
|
+
any: [/日/i, /一/i, /二/i, /三/i, /四/i, /五/i, /六/i]
|
|
2645
|
+
};
|
|
2646
|
+
const matchDayPeriodPatterns$1 = {
|
|
2647
|
+
any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i
|
|
2648
|
+
};
|
|
2649
|
+
const parseDayPeriodPatterns$1 = {
|
|
2650
|
+
any: {
|
|
2651
|
+
am: /^上午?/i,
|
|
2652
|
+
pm: /^下午?/i,
|
|
2653
|
+
midnight: /^午夜/i,
|
|
2654
|
+
noon: /^[中正]午/i,
|
|
2655
|
+
morning: /^早上/i,
|
|
2656
|
+
afternoon: /^下午/i,
|
|
2657
|
+
evening: /^晚上?/i,
|
|
2658
|
+
night: /^凌晨/i
|
|
2659
|
+
}
|
|
2660
|
+
};
|
|
2661
|
+
const match$1 = {
|
|
2662
|
+
ordinalNumber: buildMatchPatternFn({
|
|
2663
|
+
matchPattern: matchOrdinalNumberPattern$1,
|
|
2664
|
+
parsePattern: parseOrdinalNumberPattern$1,
|
|
2665
|
+
valueCallback: (value) => parseInt(value, 10)
|
|
2666
|
+
}),
|
|
2667
|
+
era: buildMatchFn({
|
|
2668
|
+
matchPatterns: matchEraPatterns$1,
|
|
2669
|
+
defaultMatchWidth: "wide",
|
|
2670
|
+
parsePatterns: parseEraPatterns$1,
|
|
2671
|
+
defaultParseWidth: "any"
|
|
2672
|
+
}),
|
|
2673
|
+
quarter: buildMatchFn({
|
|
2674
|
+
matchPatterns: matchQuarterPatterns$1,
|
|
2675
|
+
defaultMatchWidth: "wide",
|
|
2676
|
+
parsePatterns: parseQuarterPatterns$1,
|
|
2677
|
+
defaultParseWidth: "any",
|
|
2678
|
+
valueCallback: (index) => index + 1
|
|
2679
|
+
}),
|
|
2680
|
+
month: buildMatchFn({
|
|
2681
|
+
matchPatterns: matchMonthPatterns$1,
|
|
2682
|
+
defaultMatchWidth: "wide",
|
|
2683
|
+
parsePatterns: parseMonthPatterns$1,
|
|
2684
|
+
defaultParseWidth: "any"
|
|
2685
|
+
}),
|
|
2686
|
+
day: buildMatchFn({
|
|
2687
|
+
matchPatterns: matchDayPatterns$1,
|
|
2688
|
+
defaultMatchWidth: "wide",
|
|
2689
|
+
parsePatterns: parseDayPatterns$1,
|
|
2690
|
+
defaultParseWidth: "any"
|
|
2691
|
+
}),
|
|
2692
|
+
dayPeriod: buildMatchFn({
|
|
2693
|
+
matchPatterns: matchDayPeriodPatterns$1,
|
|
2694
|
+
defaultMatchWidth: "any",
|
|
2695
|
+
parsePatterns: parseDayPeriodPatterns$1,
|
|
2696
|
+
defaultParseWidth: "any"
|
|
2697
|
+
})
|
|
2698
|
+
};
|
|
2699
|
+
const zhCN = {
|
|
2700
|
+
code: "zh-CN",
|
|
2701
|
+
formatDistance: formatDistance$1,
|
|
2702
|
+
formatLong: formatLong$1,
|
|
2703
|
+
formatRelative: formatRelative$1,
|
|
2704
|
+
localize: localize$1,
|
|
2705
|
+
match: match$1,
|
|
2706
|
+
options: {
|
|
2707
|
+
weekStartsOn: 1,
|
|
2708
|
+
firstWeekContainsDate: 4
|
|
2709
|
+
}
|
|
2710
|
+
};
|
|
2711
|
+
const formatDistanceLocale = {
|
|
2712
|
+
lessThanXSeconds: {
|
|
2713
|
+
one: "少於 1 秒",
|
|
2714
|
+
other: "少於 {{count}} 秒"
|
|
2715
|
+
},
|
|
2716
|
+
xSeconds: {
|
|
2717
|
+
one: "1 秒",
|
|
2718
|
+
other: "{{count}} 秒"
|
|
2719
|
+
},
|
|
2720
|
+
halfAMinute: "半分鐘",
|
|
2721
|
+
lessThanXMinutes: {
|
|
2722
|
+
one: "少於 1 分鐘",
|
|
2723
|
+
other: "少於 {{count}} 分鐘"
|
|
2724
|
+
},
|
|
2725
|
+
xMinutes: {
|
|
2726
|
+
one: "1 分鐘",
|
|
2727
|
+
other: "{{count}} 分鐘"
|
|
2728
|
+
},
|
|
2729
|
+
xHours: {
|
|
2730
|
+
one: "1 小時",
|
|
2731
|
+
other: "{{count}} 小時"
|
|
2732
|
+
},
|
|
2733
|
+
aboutXHours: {
|
|
2734
|
+
one: "大約 1 小時",
|
|
2735
|
+
other: "大約 {{count}} 小時"
|
|
2736
|
+
},
|
|
2737
|
+
xDays: {
|
|
2738
|
+
one: "1 天",
|
|
2739
|
+
other: "{{count}} 天"
|
|
2740
|
+
},
|
|
2741
|
+
aboutXWeeks: {
|
|
2742
|
+
one: "大約 1 個星期",
|
|
2743
|
+
other: "大約 {{count}} 個星期"
|
|
2744
|
+
},
|
|
2745
|
+
xWeeks: {
|
|
2746
|
+
one: "1 個星期",
|
|
2747
|
+
other: "{{count}} 個星期"
|
|
2748
|
+
},
|
|
2749
|
+
aboutXMonths: {
|
|
2750
|
+
one: "大約 1 個月",
|
|
2751
|
+
other: "大約 {{count}} 個月"
|
|
2752
|
+
},
|
|
2753
|
+
xMonths: {
|
|
2754
|
+
one: "1 個月",
|
|
2755
|
+
other: "{{count}} 個月"
|
|
2756
|
+
},
|
|
2757
|
+
aboutXYears: {
|
|
2758
|
+
one: "大約 1 年",
|
|
2759
|
+
other: "大約 {{count}} 年"
|
|
2760
|
+
},
|
|
2761
|
+
xYears: {
|
|
2762
|
+
one: "1 年",
|
|
2763
|
+
other: "{{count}} 年"
|
|
2764
|
+
},
|
|
2765
|
+
overXYears: {
|
|
2766
|
+
one: "超過 1 年",
|
|
2767
|
+
other: "超過 {{count}} 年"
|
|
2768
|
+
},
|
|
2769
|
+
almostXYears: {
|
|
2770
|
+
one: "將近 1 年",
|
|
2771
|
+
other: "將近 {{count}} 年"
|
|
2772
|
+
}
|
|
2773
|
+
};
|
|
2774
|
+
const formatDistance = (token, count, options) => {
|
|
2775
|
+
let result;
|
|
2776
|
+
const tokenValue = formatDistanceLocale[token];
|
|
2777
|
+
if (typeof tokenValue === "string") {
|
|
2778
|
+
result = tokenValue;
|
|
2779
|
+
} else if (count === 1) {
|
|
2780
|
+
result = tokenValue.one;
|
|
2781
|
+
} else {
|
|
2782
|
+
result = tokenValue.other.replace("{{count}}", String(count));
|
|
2783
|
+
}
|
|
2784
|
+
if (options == null ? void 0 : options.addSuffix) {
|
|
2785
|
+
if (options.comparison && options.comparison > 0) {
|
|
2786
|
+
return result + "內";
|
|
2787
|
+
} else {
|
|
2788
|
+
return result + "前";
|
|
2789
|
+
}
|
|
2790
|
+
}
|
|
2791
|
+
return result;
|
|
2792
|
+
};
|
|
2793
|
+
const dateFormats = {
|
|
2794
|
+
full: "y'年'M'月'd'日' EEEE",
|
|
2795
|
+
long: "y'年'M'月'd'日'",
|
|
2796
|
+
medium: "yyyy-MM-dd",
|
|
2797
|
+
short: "yy-MM-dd"
|
|
2798
|
+
};
|
|
2799
|
+
const timeFormats = {
|
|
2800
|
+
full: "zzzz a h:mm:ss",
|
|
2801
|
+
long: "z a h:mm:ss",
|
|
2802
|
+
medium: "a h:mm:ss",
|
|
2803
|
+
short: "a h:mm"
|
|
2804
|
+
};
|
|
2805
|
+
const dateTimeFormats = {
|
|
2806
|
+
full: "{{date}} {{time}}",
|
|
2807
|
+
long: "{{date}} {{time}}",
|
|
2808
|
+
medium: "{{date}} {{time}}",
|
|
2809
|
+
short: "{{date}} {{time}}"
|
|
2810
|
+
};
|
|
2811
|
+
const formatLong = {
|
|
2812
|
+
date: buildFormatLongFn({
|
|
2813
|
+
formats: dateFormats,
|
|
2814
|
+
defaultWidth: "full"
|
|
2815
|
+
}),
|
|
2816
|
+
time: buildFormatLongFn({
|
|
2817
|
+
formats: timeFormats,
|
|
2818
|
+
defaultWidth: "full"
|
|
2819
|
+
}),
|
|
2820
|
+
dateTime: buildFormatLongFn({
|
|
2821
|
+
formats: dateTimeFormats,
|
|
2822
|
+
defaultWidth: "full"
|
|
2823
|
+
})
|
|
2824
|
+
};
|
|
2825
|
+
const formatRelativeLocale = {
|
|
2826
|
+
lastWeek: "'上個'eeee p",
|
|
2827
|
+
yesterday: "'昨天' p",
|
|
2828
|
+
today: "'今天' p",
|
|
2829
|
+
tomorrow: "'明天' p",
|
|
2830
|
+
nextWeek: "'下個'eeee p",
|
|
2831
|
+
other: "P"
|
|
2832
|
+
};
|
|
2833
|
+
const formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
|
|
2834
|
+
const eraValues = {
|
|
2835
|
+
narrow: ["前", "公元"],
|
|
2836
|
+
abbreviated: ["前", "公元"],
|
|
2837
|
+
wide: ["公元前", "公元"]
|
|
2838
|
+
};
|
|
2839
|
+
const quarterValues = {
|
|
2840
|
+
narrow: ["1", "2", "3", "4"],
|
|
2841
|
+
abbreviated: ["第一刻", "第二刻", "第三刻", "第四刻"],
|
|
2842
|
+
wide: ["第一刻鐘", "第二刻鐘", "第三刻鐘", "第四刻鐘"]
|
|
2843
|
+
};
|
|
2844
|
+
const monthValues = {
|
|
2845
|
+
narrow: [
|
|
2846
|
+
"一",
|
|
2847
|
+
"二",
|
|
2848
|
+
"三",
|
|
2849
|
+
"四",
|
|
2850
|
+
"五",
|
|
2851
|
+
"六",
|
|
2852
|
+
"七",
|
|
2853
|
+
"八",
|
|
2854
|
+
"九",
|
|
2855
|
+
"十",
|
|
2856
|
+
"十一",
|
|
2857
|
+
"十二"
|
|
2858
|
+
],
|
|
2859
|
+
abbreviated: [
|
|
2860
|
+
"1月",
|
|
2861
|
+
"2月",
|
|
2862
|
+
"3月",
|
|
2863
|
+
"4月",
|
|
2864
|
+
"5月",
|
|
2865
|
+
"6月",
|
|
2866
|
+
"7月",
|
|
2867
|
+
"8月",
|
|
2868
|
+
"9月",
|
|
2869
|
+
"10月",
|
|
2870
|
+
"11月",
|
|
2871
|
+
"12月"
|
|
2872
|
+
],
|
|
2873
|
+
wide: [
|
|
2874
|
+
"一月",
|
|
2875
|
+
"二月",
|
|
2876
|
+
"三月",
|
|
2877
|
+
"四月",
|
|
2878
|
+
"五月",
|
|
2879
|
+
"六月",
|
|
2880
|
+
"七月",
|
|
2881
|
+
"八月",
|
|
2882
|
+
"九月",
|
|
2883
|
+
"十月",
|
|
2884
|
+
"十一月",
|
|
2885
|
+
"十二月"
|
|
2886
|
+
]
|
|
2887
|
+
};
|
|
2888
|
+
const dayValues = {
|
|
2889
|
+
narrow: ["日", "一", "二", "三", "四", "五", "六"],
|
|
2890
|
+
short: ["日", "一", "二", "三", "四", "五", "六"],
|
|
2891
|
+
abbreviated: ["週日", "週一", "週二", "週三", "週四", "週五", "週六"],
|
|
2892
|
+
wide: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
|
|
2893
|
+
};
|
|
2894
|
+
const dayPeriodValues = {
|
|
2895
|
+
narrow: {
|
|
2896
|
+
am: "上",
|
|
2897
|
+
pm: "下",
|
|
2898
|
+
midnight: "凌晨",
|
|
2899
|
+
noon: "午",
|
|
2900
|
+
morning: "早",
|
|
2901
|
+
afternoon: "下午",
|
|
2902
|
+
evening: "晚",
|
|
2903
|
+
night: "夜"
|
|
2904
|
+
},
|
|
2905
|
+
abbreviated: {
|
|
2906
|
+
am: "上午",
|
|
2907
|
+
pm: "下午",
|
|
2908
|
+
midnight: "凌晨",
|
|
2909
|
+
noon: "中午",
|
|
2910
|
+
morning: "早晨",
|
|
2911
|
+
afternoon: "中午",
|
|
2912
|
+
evening: "晚上",
|
|
2913
|
+
night: "夜間"
|
|
2914
|
+
},
|
|
2915
|
+
wide: {
|
|
2916
|
+
am: "上午",
|
|
2917
|
+
pm: "下午",
|
|
2918
|
+
midnight: "凌晨",
|
|
2919
|
+
noon: "中午",
|
|
2920
|
+
morning: "早晨",
|
|
2921
|
+
afternoon: "中午",
|
|
2922
|
+
evening: "晚上",
|
|
2923
|
+
night: "夜間"
|
|
2924
|
+
}
|
|
2925
|
+
};
|
|
2926
|
+
const formattingDayPeriodValues = {
|
|
2927
|
+
narrow: {
|
|
2928
|
+
am: "上",
|
|
2929
|
+
pm: "下",
|
|
2930
|
+
midnight: "凌晨",
|
|
2931
|
+
noon: "午",
|
|
2932
|
+
morning: "早",
|
|
2933
|
+
afternoon: "下午",
|
|
2934
|
+
evening: "晚",
|
|
2935
|
+
night: "夜"
|
|
2936
|
+
},
|
|
2937
|
+
abbreviated: {
|
|
2938
|
+
am: "上午",
|
|
2939
|
+
pm: "下午",
|
|
2940
|
+
midnight: "凌晨",
|
|
2941
|
+
noon: "中午",
|
|
2942
|
+
morning: "早晨",
|
|
2943
|
+
afternoon: "中午",
|
|
2944
|
+
evening: "晚上",
|
|
2945
|
+
night: "夜間"
|
|
2946
|
+
},
|
|
2947
|
+
wide: {
|
|
2948
|
+
am: "上午",
|
|
2949
|
+
pm: "下午",
|
|
2950
|
+
midnight: "凌晨",
|
|
2951
|
+
noon: "中午",
|
|
2952
|
+
morning: "早晨",
|
|
2953
|
+
afternoon: "中午",
|
|
2954
|
+
evening: "晚上",
|
|
2955
|
+
night: "夜間"
|
|
2956
|
+
}
|
|
2957
|
+
};
|
|
2958
|
+
const ordinalNumber = (dirtyNumber, options) => {
|
|
2959
|
+
const number = Number(dirtyNumber);
|
|
2960
|
+
switch (options == null ? void 0 : options.unit) {
|
|
2961
|
+
case "date":
|
|
2962
|
+
return number + "日";
|
|
2963
|
+
case "hour":
|
|
2964
|
+
return number + "時";
|
|
2965
|
+
case "minute":
|
|
2966
|
+
return number + "分";
|
|
2967
|
+
case "second":
|
|
2968
|
+
return number + "秒";
|
|
2969
|
+
default:
|
|
2970
|
+
return "第 " + number;
|
|
2971
|
+
}
|
|
2972
|
+
};
|
|
2973
|
+
const localize = {
|
|
2974
|
+
ordinalNumber,
|
|
2975
|
+
era: buildLocalizeFn({
|
|
2976
|
+
values: eraValues,
|
|
2977
|
+
defaultWidth: "wide"
|
|
2978
|
+
}),
|
|
2979
|
+
quarter: buildLocalizeFn({
|
|
2980
|
+
values: quarterValues,
|
|
2981
|
+
defaultWidth: "wide",
|
|
2982
|
+
argumentCallback: (quarter) => quarter - 1
|
|
2983
|
+
}),
|
|
2984
|
+
month: buildLocalizeFn({
|
|
2985
|
+
values: monthValues,
|
|
2986
|
+
defaultWidth: "wide"
|
|
2987
|
+
}),
|
|
2988
|
+
day: buildLocalizeFn({
|
|
2989
|
+
values: dayValues,
|
|
2990
|
+
defaultWidth: "wide"
|
|
2991
|
+
}),
|
|
2992
|
+
dayPeriod: buildLocalizeFn({
|
|
2993
|
+
values: dayPeriodValues,
|
|
2994
|
+
defaultWidth: "wide",
|
|
2995
|
+
formattingValues: formattingDayPeriodValues,
|
|
2996
|
+
defaultFormattingWidth: "wide"
|
|
2997
|
+
})
|
|
2998
|
+
};
|
|
2999
|
+
const matchOrdinalNumberPattern = /^(第\s*)?\d+(日|時|分|秒)?/i;
|
|
3000
|
+
const parseOrdinalNumberPattern = /\d+/i;
|
|
3001
|
+
const matchEraPatterns = {
|
|
3002
|
+
narrow: /^(前)/i,
|
|
3003
|
+
abbreviated: /^(前)/i,
|
|
3004
|
+
wide: /^(公元前|公元)/i
|
|
3005
|
+
};
|
|
3006
|
+
const parseEraPatterns = {
|
|
3007
|
+
any: [/^(前)/i, /^(公元)/i]
|
|
3008
|
+
};
|
|
3009
|
+
const matchQuarterPatterns = {
|
|
3010
|
+
narrow: /^[1234]/i,
|
|
3011
|
+
abbreviated: /^第[一二三四]刻/i,
|
|
3012
|
+
wide: /^第[一二三四]刻鐘/i
|
|
3013
|
+
};
|
|
3014
|
+
const parseQuarterPatterns = {
|
|
3015
|
+
any: [/(1|一)/i, /(2|二)/i, /(3|三)/i, /(4|四)/i]
|
|
3016
|
+
};
|
|
3017
|
+
const matchMonthPatterns = {
|
|
3018
|
+
narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
|
|
3019
|
+
abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
|
|
3020
|
+
wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i
|
|
3021
|
+
};
|
|
3022
|
+
const parseMonthPatterns = {
|
|
3023
|
+
narrow: [
|
|
3024
|
+
/^一/i,
|
|
3025
|
+
/^二/i,
|
|
3026
|
+
/^三/i,
|
|
3027
|
+
/^四/i,
|
|
3028
|
+
/^五/i,
|
|
3029
|
+
/^六/i,
|
|
3030
|
+
/^七/i,
|
|
3031
|
+
/^八/i,
|
|
3032
|
+
/^九/i,
|
|
3033
|
+
/^十(?!(一|二))/i,
|
|
3034
|
+
/^十一/i,
|
|
3035
|
+
/^十二/i
|
|
3036
|
+
],
|
|
3037
|
+
any: [
|
|
3038
|
+
/^一|1/i,
|
|
3039
|
+
/^二|2/i,
|
|
3040
|
+
/^三|3/i,
|
|
3041
|
+
/^四|4/i,
|
|
3042
|
+
/^五|5/i,
|
|
3043
|
+
/^六|6/i,
|
|
3044
|
+
/^七|7/i,
|
|
3045
|
+
/^八|8/i,
|
|
3046
|
+
/^九|9/i,
|
|
3047
|
+
/^十(?!(一|二))|10/i,
|
|
3048
|
+
/^十一|11/i,
|
|
3049
|
+
/^十二|12/i
|
|
3050
|
+
]
|
|
3051
|
+
};
|
|
3052
|
+
const matchDayPatterns = {
|
|
3053
|
+
narrow: /^[一二三四五六日]/i,
|
|
3054
|
+
short: /^[一二三四五六日]/i,
|
|
3055
|
+
abbreviated: /^週[一二三四五六日]/i,
|
|
3056
|
+
wide: /^星期[一二三四五六日]/i
|
|
3057
|
+
};
|
|
3058
|
+
const parseDayPatterns = {
|
|
3059
|
+
any: [/日/i, /一/i, /二/i, /三/i, /四/i, /五/i, /六/i]
|
|
3060
|
+
};
|
|
3061
|
+
const matchDayPeriodPatterns = {
|
|
3062
|
+
any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨)/i
|
|
3063
|
+
};
|
|
3064
|
+
const parseDayPeriodPatterns = {
|
|
3065
|
+
any: {
|
|
3066
|
+
am: /^上午?/i,
|
|
3067
|
+
pm: /^下午?/i,
|
|
3068
|
+
midnight: /^午夜/i,
|
|
3069
|
+
noon: /^[中正]午/i,
|
|
3070
|
+
morning: /^早上/i,
|
|
3071
|
+
afternoon: /^下午/i,
|
|
3072
|
+
evening: /^晚上?/i,
|
|
3073
|
+
night: /^凌晨/i
|
|
3074
|
+
}
|
|
3075
|
+
};
|
|
3076
|
+
const match = {
|
|
3077
|
+
ordinalNumber: buildMatchPatternFn({
|
|
3078
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
3079
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
3080
|
+
valueCallback: (value) => parseInt(value, 10)
|
|
3081
|
+
}),
|
|
3082
|
+
era: buildMatchFn({
|
|
3083
|
+
matchPatterns: matchEraPatterns,
|
|
3084
|
+
defaultMatchWidth: "wide",
|
|
3085
|
+
parsePatterns: parseEraPatterns,
|
|
3086
|
+
defaultParseWidth: "any"
|
|
3087
|
+
}),
|
|
3088
|
+
quarter: buildMatchFn({
|
|
3089
|
+
matchPatterns: matchQuarterPatterns,
|
|
3090
|
+
defaultMatchWidth: "wide",
|
|
3091
|
+
parsePatterns: parseQuarterPatterns,
|
|
3092
|
+
defaultParseWidth: "any",
|
|
3093
|
+
valueCallback: (index) => index + 1
|
|
3094
|
+
}),
|
|
3095
|
+
month: buildMatchFn({
|
|
3096
|
+
matchPatterns: matchMonthPatterns,
|
|
3097
|
+
defaultMatchWidth: "wide",
|
|
3098
|
+
parsePatterns: parseMonthPatterns,
|
|
3099
|
+
defaultParseWidth: "any"
|
|
3100
|
+
}),
|
|
3101
|
+
day: buildMatchFn({
|
|
3102
|
+
matchPatterns: matchDayPatterns,
|
|
3103
|
+
defaultMatchWidth: "wide",
|
|
3104
|
+
parsePatterns: parseDayPatterns,
|
|
3105
|
+
defaultParseWidth: "any"
|
|
3106
|
+
}),
|
|
3107
|
+
dayPeriod: buildMatchFn({
|
|
3108
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
3109
|
+
defaultMatchWidth: "any",
|
|
3110
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
3111
|
+
defaultParseWidth: "any"
|
|
3112
|
+
})
|
|
3113
|
+
};
|
|
3114
|
+
const zhTW = {
|
|
3115
|
+
code: "zh-TW",
|
|
3116
|
+
formatDistance,
|
|
3117
|
+
formatLong,
|
|
3118
|
+
formatRelative,
|
|
3119
|
+
localize,
|
|
3120
|
+
match,
|
|
3121
|
+
options: {
|
|
3122
|
+
weekStartsOn: 1,
|
|
3123
|
+
firstWeekContainsDate: 4
|
|
3124
|
+
}
|
|
3125
|
+
};
|
|
3126
|
+
function getTimeStamp({ time, language = "en-US" }) {
|
|
3127
|
+
const locales = {
|
|
3128
|
+
"zh-CN": zhCN,
|
|
3129
|
+
"zh-TW": zhTW,
|
|
3130
|
+
"en-US": enUS,
|
|
3131
|
+
"ja-JP": ja,
|
|
3132
|
+
"ko-KR": ko
|
|
3133
|
+
};
|
|
3134
|
+
const timeFormat = "HH:mm";
|
|
3135
|
+
const locale = locales[language] || locales["en-US"];
|
|
3136
|
+
const { t } = useUIKit();
|
|
3137
|
+
const yesterdayText = t("TUIChat.Yesterday", {
|
|
3138
|
+
defaultValue: "Yesterday"
|
|
3139
|
+
});
|
|
3140
|
+
if (!time) {
|
|
3141
|
+
return "";
|
|
3142
|
+
}
|
|
3143
|
+
if (isToday(time)) {
|
|
3144
|
+
return format(time, timeFormat, {
|
|
3145
|
+
locale
|
|
3146
|
+
});
|
|
3147
|
+
}
|
|
3148
|
+
if (isYesterday(time)) {
|
|
3149
|
+
return `${yesterdayText} ${format(time, timeFormat, {
|
|
3150
|
+
locale
|
|
3151
|
+
})}`;
|
|
3152
|
+
}
|
|
3153
|
+
if (isSameWeek(time, /* @__PURE__ */ new Date(), { weekStartsOn: 1 })) {
|
|
3154
|
+
return `${format(time, "EEEE", { locale })} ${format(time, timeFormat)}`;
|
|
3155
|
+
}
|
|
3156
|
+
if (isThisYear(time)) {
|
|
3157
|
+
if (language.startsWith("zh")) {
|
|
3158
|
+
return format(time, "M月d日 HH:mm", {
|
|
3159
|
+
locale
|
|
3160
|
+
});
|
|
3161
|
+
}
|
|
3162
|
+
return format(time, "MMMM d HH:mm", {
|
|
3163
|
+
locale
|
|
3164
|
+
});
|
|
3165
|
+
}
|
|
3166
|
+
return format(time, "yyyy/MM/dd HH:mm", {
|
|
3167
|
+
locale
|
|
3168
|
+
});
|
|
3169
|
+
}
|
|
3170
|
+
function getTimeStampAuto(time) {
|
|
3171
|
+
return getTimeStamp({ time, language: i18next.language });
|
|
3172
|
+
}
|
|
3173
|
+
export {
|
|
3174
|
+
getTimeStamp,
|
|
3175
|
+
getTimeStampAuto
|
|
3176
|
+
};
|