tuikit-atomicx-vue3 3.3.4 → 3.4.2
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/.eslintrc.cjs +33 -0
- package/dist/AudioRequestDialog.vue_vue_type_script_setup_true_lang-DESfuJPj.js +89 -0
- package/dist/DialogPortal-CvJcEAsn.js +417 -0
- package/dist/MaterialRenameDialog.vue_vue_type_script_setup_true_lang-C8oUv-KF.js +36 -0
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D1G-LitO.js +116 -0
- package/dist/PopoverTrigger-L8abAry7.js +607 -0
- package/dist/PopperContent-XdhqL8Y2.js +1603 -0
- package/dist/Teleport-CSEuZbpM.js +913 -0
- package/dist/VideoRequestDialog.vue_vue_type_script_setup_true_lang-DlROoquV.js +89 -0
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/baseComp/ActionSheep.js +41 -51
- package/dist/baseComp/AudioIcon.js +27 -37
- package/dist/baseComp/Avatar.js +16 -28
- package/dist/baseComp/Dialog/DialogH5.js +56 -82
- package/dist/baseComp/Dialog/DialogPC.js +76 -118
- package/dist/baseComp/Dialog/index.js +2 -2
- package/dist/baseComp/IconButton.js +43 -56
- package/dist/baseComp/Input/InputH5.js +85 -128
- package/dist/baseComp/Input/InputPC.js +85 -128
- package/dist/baseComp/Input/InputWX.js +88 -131
- package/dist/baseComp/Input/index.js +5 -5
- package/dist/baseComp/MessageBox/index.js +120 -150
- package/dist/baseComp/Modal/Modal.js +38 -45
- package/dist/baseComp/Modal/index.js +3 -3
- package/dist/baseComp/ObserverView/ObserverView.js +50 -86
- package/dist/baseComp/ObserverView/index.js +2 -2
- package/dist/baseComp/Option/OptionH5.js +29 -40
- package/dist/baseComp/Option/OptionPC.js +34 -46
- package/dist/baseComp/Option/OptionWX.js +30 -41
- package/dist/baseComp/Option/index.js +2 -2
- package/dist/baseComp/Select/SelectH5.js +54 -86
- package/dist/baseComp/Select/SelectPC.js +78 -120
- package/dist/baseComp/Select/SelectWX.js +48 -79
- package/dist/baseComp/Select/index.js +2 -2
- package/dist/baseComp/SvgIcon.js +17 -22
- package/dist/baseComp/TuiSwitch.js +15 -19
- package/dist/baseComp/View/View.js +2 -2
- package/dist/baseComp/View/index.js +19 -24
- package/dist/baseComp/index.js +2 -2
- package/dist/baseComp/useZIndex.js +7 -12
- package/dist/chat/index.d.ts +1421 -990
- package/dist/chat/index.js +57 -82
- package/dist/chat/server.js +60 -84
- package/dist/components/AudioSetting/AudioMediaControl.js +52 -78
- package/dist/components/AudioSetting/AudioRequestDialog.js +2 -2
- package/dist/components/AudioSetting/AudioSettingTab.js +72 -102
- package/dist/components/AudioSetting/MicrophoneSelect.js +45 -57
- package/dist/components/AudioSetting/SpeakerSelect.js +45 -57
- package/dist/components/AudioSetting/index.js +3 -3
- package/dist/components/AudioSettingPanel/i18n/en-US/index.js +2 -2
- package/dist/components/AudioSettingPanel/i18n/index.js +4 -4
- package/dist/components/AudioSettingPanel/i18n/zh-CN/index.js +2 -2
- package/dist/components/AudioSettingPanel/index.js +102 -147
- package/dist/components/Avatar/Avatar.js +88 -140
- package/dist/components/Avatar/Avatar.vue.d.ts +1 -1
- package/dist/components/Avatar/AvatarBadge/AvatarBadge.js +25 -31
- package/dist/components/Avatar/AvatarBadge/index.js +2 -2
- package/dist/components/Avatar/constants/avatar.js +7 -12
- package/dist/components/Avatar/index.js +9 -9
- package/dist/components/BarrageInput/BarrageInput.js +50 -67
- package/dist/components/BarrageInput/BarrageInputH5.js +80 -111
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +84 -97
- package/dist/components/BarrageInput/EmojiPicker/index.js +2 -2
- package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +34 -62
- package/dist/components/BarrageInput/TextEditor/EditorCore.js +79 -90
- package/dist/components/BarrageInput/TextEditor/TextEditor.js +2 -2
- package/dist/components/BarrageInput/TextEditor/index.js +81 -125
- package/dist/components/BarrageInput/constants.js +2 -2
- package/dist/components/BarrageInput/i18n/en-US/index.js +2 -2
- package/dist/components/BarrageInput/i18n/index.js +4 -4
- package/dist/components/BarrageInput/i18n/zh-CN/index.js +2 -2
- package/dist/components/BarrageInput/index.js +11 -11
- package/dist/components/BarrageList/BarrageList.js +97 -173
- package/dist/components/BarrageList/BarrageListH5.js +96 -171
- package/dist/components/BarrageList/ClickAction/UserActionMenu.js +64 -94
- package/dist/components/BarrageList/Message/CustomMessage/CustomMessage.js +2 -2
- package/dist/components/BarrageList/Message/CustomMessage/index.js +5 -7
- package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.js +16 -21
- package/dist/components/BarrageList/Message/FaceMessage/index.js +2 -2
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.js +2 -2
- package/dist/components/BarrageList/Message/GroupTipMessage/index.js +13 -18
- package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.js +56 -80
- package/dist/components/BarrageList/Message/ImageMessage/index.js +2 -2
- package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.js +5 -5
- package/dist/components/BarrageList/Message/MergerMessage/index.js +2 -2
- package/dist/components/BarrageList/Message/Message.js +2 -2
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.js +28 -39
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/index.js +2 -2
- package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.js +93 -101
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.js +26 -32
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +19 -22
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.js +2 -2
- package/dist/components/BarrageList/Message/MessageLayout/index.js +2 -2
- package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.js +31 -39
- package/dist/components/BarrageList/Message/RecalledMessage/index.js +2 -2
- package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +67 -96
- package/dist/components/BarrageList/Message/TextMessage/index.js +2 -2
- package/dist/components/BarrageList/Message/index.js +11 -15
- package/dist/components/BarrageList/MessageForward/ForwardListItem.js +34 -43
- package/dist/components/BarrageList/MessageForward/MessageForward.js +158 -210
- package/dist/components/BarrageList/MessageForward/index.js +2 -2
- package/dist/components/BarrageList/MessageListContext.js +9 -10
- package/dist/components/BarrageList/MessageTimeDivider/MessageTimeDivider.js +20 -28
- package/dist/components/BarrageList/MessageTimeDivider/index.js +2 -2
- package/dist/components/BarrageList/i18n/en-US/index.js +3 -3
- package/dist/components/BarrageList/i18n/index.js +4 -4
- package/dist/components/BarrageList/i18n/zh-CN/index.js +3 -3
- package/dist/components/BarrageList/index.js +10 -10
- package/dist/components/CameraButton/index.js +34 -44
- package/dist/components/ChatSetting/C2CChatSetting/C2CChatSetting.js +92 -108
- package/dist/components/ChatSetting/C2CChatSetting/index.js +3 -3
- package/dist/components/ChatSetting/ChatSetting.js +17 -23
- package/dist/components/ChatSetting/GroupChatSetting/GroupActions/GroupActions.js +133 -163
- package/dist/components/ChatSetting/GroupChatSetting/GroupActions/index.js +2 -2
- package/dist/components/ChatSetting/GroupChatSetting/GroupChatSetting.js +179 -245
- package/dist/components/ChatSetting/GroupChatSetting/GroupInfo/GroupInfo.js +124 -181
- package/dist/components/ChatSetting/GroupChatSetting/GroupInfo/index.js +2 -2
- package/dist/components/ChatSetting/GroupChatSetting/GroupManagement/GroupManagement.js +195 -259
- package/dist/components/ChatSetting/GroupChatSetting/GroupManagement/index.js +2 -2
- package/dist/components/ChatSetting/GroupChatSetting/GroupManagementEntry/GroupManagementEntry.js +23 -32
- package/dist/components/ChatSetting/GroupChatSetting/GroupManagementEntry/index.js +2 -2
- package/dist/components/ChatSetting/GroupChatSetting/GroupMembers/GroupMembers.js +149 -212
- package/dist/components/ChatSetting/GroupChatSetting/GroupMembers/index.js +2 -2
- package/dist/components/ChatSetting/GroupChatSetting/PersonalSettings/PersonalSettings.js +35 -40
- package/dist/components/ChatSetting/GroupChatSetting/PersonalSettings/index.js +2 -2
- package/dist/components/ChatSetting/GroupChatSetting/index.js +2 -2
- package/dist/components/ChatSetting/SettingItem/SettingItem.js +201 -247
- package/dist/components/ChatSetting/SettingItem/index.js +2 -2
- package/dist/components/ChatSetting/i18n/en-US.js +2 -2
- package/dist/components/ChatSetting/i18n/index.js +6 -6
- package/dist/components/ChatSetting/i18n/zh-CN.js +2 -2
- package/dist/components/ChatSetting/index.js +7 -7
- package/dist/components/CoGuestPanel/CoGuestPanel.js +139 -180
- package/dist/components/CoGuestPanel/constants.js +2 -2
- package/dist/components/CoGuestPanel/i18n/en-US/index.js +9 -9
- package/dist/components/CoGuestPanel/i18n/index.js +4 -4
- package/dist/components/CoGuestPanel/i18n/zh-CN/index.js +9 -9
- package/dist/components/CoGuestPanel/index.js +8 -8
- package/dist/components/CoHostPanel/BattlePanel.js +196 -0
- package/dist/components/CoHostPanel/BattlePanel.vue.d.ts +19 -0
- package/dist/components/CoHostPanel/CoHostPanel.js +114 -0
- package/dist/components/CoHostPanel/CoHostPanel.vue.d.ts +19 -0
- package/dist/components/CoHostPanel/ConfigSettingPanel.js +110 -0
- package/dist/components/CoHostPanel/ConfigSettingPanel.vue.d.ts +33 -0
- package/dist/components/CoHostPanel/ConnectionPanel.js +273 -0
- package/dist/components/CoHostPanel/ConnectionPanel.vue.d.ts +19 -0
- package/dist/components/CoHostPanel/RecommendHostList.js +113 -0
- package/dist/components/CoHostPanel/RecommendHostList.vue.d.ts +13 -0
- package/dist/components/CoHostPanel/UserList.js +34 -0
- package/dist/components/CoHostPanel/UserList.vue.d.ts +28 -0
- package/dist/components/CoHostPanel/i18n/en-US/index.d.ts +74 -0
- package/dist/components/CoHostPanel/i18n/en-US/index.js +81 -0
- package/dist/components/CoHostPanel/i18n/index.d.ts +4 -0
- package/dist/components/CoHostPanel/i18n/index.js +6 -0
- package/dist/components/CoHostPanel/i18n/zh-CN/index.d.ts +75 -0
- package/dist/components/CoHostPanel/i18n/zh-CN/index.js +82 -0
- package/dist/components/CoHostPanel/index.d.ts +16 -0
- package/dist/components/CoHostPanel/index.js +10 -0
- package/dist/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.js +36 -51
- package/dist/components/ContactList/ContactInfo/BlacklistInfo/index.js +2 -2
- package/dist/components/ContactList/ContactInfo/ContactInfo.js +141 -196
- package/dist/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.js +39 -61
- package/dist/components/ContactList/ContactInfo/FriendApplicationInfo/index.js +2 -2
- package/dist/components/ContactList/ContactInfo/FriendInfo/FriendInfo.js +109 -160
- package/dist/components/ContactList/ContactInfo/FriendInfo/index.js +2 -2
- package/dist/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.js +58 -86
- package/dist/components/ContactList/ContactInfo/GroupApplicationInfo/index.js +2 -2
- package/dist/components/ContactList/ContactInfo/GroupInfo/GroupInfo.js +99 -133
- package/dist/components/ContactList/ContactInfo/GroupInfo/index.js +2 -2
- package/dist/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.js +86 -118
- package/dist/components/ContactList/ContactInfo/SearchGroupInfo/index.js +2 -2
- package/dist/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.js +72 -101
- package/dist/components/ContactList/ContactInfo/SearchUserInfo/index.js +2 -2
- package/dist/components/ContactList/ContactInfo/index.js +16 -16
- package/dist/components/ContactList/ContactList.js +164 -235
- package/dist/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.js +29 -38
- package/dist/components/ContactList/ContactListItem/BlacklistItem/index.js +2 -2
- package/dist/components/ContactList/ContactListItem/ContactListItem.js +2 -2
- package/dist/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.js +46 -61
- package/dist/components/ContactList/ContactListItem/FriendApplicationItem/index.js +2 -2
- package/dist/components/ContactList/ContactListItem/FriendItem/FriendItem.js +24 -31
- package/dist/components/ContactList/ContactListItem/FriendItem/index.js +2 -2
- package/dist/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.js +45 -64
- package/dist/components/ContactList/ContactListItem/GroupApplicationItem/index.js +2 -2
- package/dist/components/ContactList/ContactListItem/GroupItem/GroupItem.js +29 -38
- package/dist/components/ContactList/ContactListItem/GroupItem/index.js +2 -2
- package/dist/components/ContactList/ContactListItem/index.js +57 -66
- package/dist/components/ContactList/ContactSearch/ContactSearch.js +53 -73
- package/dist/components/ContactList/ContactSearch/index.js +2 -2
- package/dist/components/ContactList/constants/const.js +3 -4
- package/dist/components/ContactList/hooks/index.js +2 -2
- package/dist/components/ContactList/hooks/useContactList.js +11 -15
- package/dist/components/ContactList/i18n/en-US.js +21 -21
- package/dist/components/ContactList/i18n/index.js +4 -4
- package/dist/components/ContactList/i18n/zh-CN.js +21 -21
- package/dist/components/ContactList/index.js +12 -14
- package/dist/components/ConversationList/ConversationActions/ConversationActions.js +107 -150
- package/dist/components/ConversationList/ConversationActions/index.js +2 -2
- package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +116 -193
- package/dist/components/ConversationList/ConversationCreate/ConversationCreateButton/ConversationCreateButton.js +65 -80
- package/dist/components/ConversationList/ConversationCreate/ConversationCreateGroupDetail/ConversationCreateGroupDetail.js +108 -126
- package/dist/components/ConversationList/ConversationCreate/ConversationCreateUserSelectList/ConversationCreateUserSelectList.js +40 -52
- package/dist/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/ConversationGroupTypeInfo.js +61 -79
- package/dist/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/index.js +4 -4
- package/dist/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/type.js +8 -8
- package/dist/components/ConversationList/ConversationCreate/index.js +12 -12
- package/dist/components/ConversationList/ConversationList.js +112 -154
- package/dist/components/ConversationList/ConversationList.vue.d.ts +72 -72
- package/dist/components/ConversationList/ConversationListContent/ConversationListContent.js +27 -33
- package/dist/components/ConversationList/ConversationListContent/index.js +2 -2
- package/dist/components/ConversationList/ConversationListHeader/ConversationListHeader.js +30 -39
- package/dist/components/ConversationList/ConversationListHeader/index.js +2 -2
- package/dist/components/ConversationList/ConversationPlaceHolder/ConversationPlaceHolder.js +65 -81
- package/dist/components/ConversationList/ConversationPlaceHolder/index.js +2 -2
- package/dist/components/ConversationList/ConversationPreview/ConversationPreview.js +2 -2
- package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +72 -72
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +40 -59
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +29 -47
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +25 -42
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +84 -111
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +18 -18
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +36 -51
- package/dist/components/ConversationList/ConversationPreview/index.js +55 -63
- package/dist/components/ConversationList/ConversationPreview/utils.js +36 -42
- package/dist/components/ConversationList/ConversationSearch/ConversationSearch.js +114 -160
- package/dist/components/ConversationList/ConversationSearch/index.js +2 -2
- package/dist/components/ConversationList/hooks/useConversation.js +12 -18
- package/dist/components/ConversationList/hooks/useConversationCreate.js +17 -18
- package/dist/components/ConversationList/i18n/en-US.js +32 -32
- package/dist/components/ConversationList/i18n/index.js +4 -4
- package/dist/components/ConversationList/i18n/zh-CN.js +32 -32
- package/dist/components/ConversationList/index.d.ts +989 -989
- package/dist/components/ConversationList/index.js +24 -32
- package/dist/components/LiveAudienceList/LiveAudienceList.js +85 -120
- package/dist/components/LiveAudienceList/LiveAudienceListH5.js +50 -72
- package/dist/components/LiveAudienceList/UserActionMenu.js +82 -124
- package/dist/components/LiveAudienceList/i18n/en-US/index.js +2 -2
- package/dist/components/LiveAudienceList/i18n/index.js +4 -4
- package/dist/components/LiveAudienceList/i18n/zh-CN/index.js +2 -2
- package/dist/components/LiveAudienceList/index.js +10 -10
- package/dist/components/LiveList/LiveList.js +109 -165
- package/dist/components/LiveList/LiveList.vue.d.ts +15 -3
- package/dist/components/LiveList/LiveListH5.js +109 -169
- package/dist/components/LiveList/i18n/en-US/index.d.ts +1 -1
- package/dist/components/LiveList/i18n/en-US/index.js +4 -4
- package/dist/components/LiveList/i18n/index.js +4 -4
- package/dist/components/LiveList/i18n/zh-CN/index.d.ts +1 -1
- package/dist/components/LiveList/i18n/zh-CN/index.js +4 -4
- package/dist/components/LiveList/index.d.ts +17 -1
- package/dist/components/LiveList/index.js +10 -10
- package/dist/components/LiveList/pullToRefresh.js +88 -163
- package/dist/components/LiveMonitorView/LiveMonitorView.js +72 -110
- package/dist/components/LiveMonitorView/i18n/en-US/index.js +2 -2
- package/dist/components/LiveMonitorView/i18n/index.js +4 -4
- package/dist/components/LiveMonitorView/i18n/zh-CN/index.js +2 -2
- package/dist/components/LiveMonitorView/index.js +7 -7
- package/dist/components/LiveScenePanel/CameraSettingDialog.js +126 -188
- package/dist/components/LiveScenePanel/LiveSceneSelect.js +79 -106
- package/dist/components/LiveScenePanel/MaterialDialog.js +78 -98
- package/dist/components/LiveScenePanel/MaterialItem.js +105 -142
- package/dist/components/LiveScenePanel/MaterialRenameDialog.js +2 -2
- package/dist/components/LiveScenePanel/i18n/en-US/index.js +2 -2
- package/dist/components/LiveScenePanel/i18n/index.js +4 -4
- package/dist/components/LiveScenePanel/i18n/zh-CN/index.js +2 -2
- package/dist/components/LiveScenePanel/icons/AddIcon.js +10 -11
- package/dist/components/LiveScenePanel/icons/CameraIcon.js +9 -10
- package/dist/components/LiveScenePanel/icons/CameraMirror.js +13 -14
- package/dist/components/LiveScenePanel/icons/CameraUnmirror.js +11 -12
- package/dist/components/LiveScenePanel/icons/ImageIcon.js +8 -9
- package/dist/components/LiveScenePanel/icons/MoreIcon.js +13 -14
- package/dist/components/LiveScenePanel/icons/ScreenIcon.js +8 -9
- package/dist/components/LiveScenePanel/index.js +142 -190
- package/dist/components/LiveView/CoreViewDecorate/BattleDecorate.js +152 -0
- package/dist/components/LiveView/CoreViewDecorate/BattleDecorate.vue.d.ts +2 -0
- package/dist/components/LiveView/CoreViewDecorate/BattleUserDecorate.js +73 -0
- package/dist/components/LiveView/CoreViewDecorate/BattleUserDecorate.vue.d.ts +35 -0
- package/dist/components/LiveView/CoreViewDecorate/CoHostDecorate.js +54 -0
- package/dist/components/LiveView/CoreViewDecorate/CoHostDecorate.vue.d.ts +2 -0
- package/dist/components/LiveView/CoreViewDecorate/LiveCoreDecorate.js +35 -0
- package/dist/components/LiveView/CoreViewDecorate/LiveCoreDecorate.vue.d.ts +35 -0
- package/dist/components/LiveView/DefaultStreamViewUI.js +124 -0
- package/dist/components/LiveView/PlayerControl/AudioControl.js +129 -0
- package/dist/components/LiveView/PlayerControl/MultiResolution.js +78 -0
- package/dist/components/LiveView/PlayerControl/MultiResolution.vue.d.ts +2 -0
- package/dist/components/LiveView/PlayerControl/PlayerControl.js +168 -0
- package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControlState.d.ts +11 -0
- package/dist/components/LiveView/PlayerControl/PlayerControlState.js +267 -0
- package/dist/components/LiveView/PlayerControl/index.js +8 -0
- package/dist/components/LiveView/PlayerControl/utils/deviceDetection.js +45 -0
- package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +99 -0
- package/dist/components/LiveView/PlayerControl/utils/fullscreenManager.js +241 -0
- package/dist/components/{LiveCoreView/i18n/zh-CN → LiveView/i18n/en-US}/index.d.ts +7 -0
- package/dist/components/LiveView/i18n/en-US/index.js +23 -0
- package/dist/components/LiveView/i18n/index.js +6 -0
- package/dist/components/{LiveCoreView/i18n/en-US → LiveView/i18n/zh-CN}/index.d.ts +7 -0
- package/dist/components/LiveView/i18n/zh-CN/index.js +23 -0
- package/dist/components/LiveView/index.d.ts +79 -0
- package/dist/components/LiveView/index.js +243 -0
- package/dist/components/MessageInput/AttachmentPicker/AttachmentPicker.js +2 -2
- package/dist/components/MessageInput/AttachmentPicker/AttachmentPicker.vue.d.ts +10 -1
- package/dist/components/MessageInput/AttachmentPicker/FilePicker.js +63 -2
- package/dist/components/MessageInput/AttachmentPicker/FilePicker.vue.d.ts +14 -13
- package/dist/components/MessageInput/AttachmentPicker/ImagePicker.js +63 -2
- package/dist/components/MessageInput/AttachmentPicker/ImagePicker.vue.d.ts +14 -13
- package/dist/components/MessageInput/AttachmentPicker/VideoPicker.js +63 -2
- package/dist/components/MessageInput/AttachmentPicker/VideoPicker.vue.d.ts +14 -13
- package/dist/components/MessageInput/AttachmentPicker/index.js +70 -72
- package/dist/components/MessageInput/AudioCallPicker/AudioCallPicker.js +155 -0
- package/dist/components/MessageInput/AudioCallPicker/AudioCallPicker.vue.d.ts +45 -0
- package/dist/components/MessageInput/AudioCallPicker/index.d.ts +3 -0
- package/dist/components/MessageInput/AudioCallPicker/index.js +4 -0
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +108 -96
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.vue.d.ts +34 -6
- package/dist/components/MessageInput/EmojiPicker/index.js +2 -2
- package/dist/components/MessageInput/MessageInput.js +2 -2
- package/dist/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.js +2 -2
- package/dist/components/MessageInput/QuotedMessagePreview/index.js +60 -74
- package/dist/components/MessageInput/SendButton/SendButton.js +2 -2
- package/dist/components/MessageInput/SendButton/index.js +20 -25
- package/dist/components/MessageInput/TextEditor/EditorCore.js +72 -79
- package/dist/components/MessageInput/TextEditor/TextEditor.js +2 -2
- package/dist/components/MessageInput/TextEditor/index.js +60 -95
- package/dist/components/MessageInput/VideoCallPicker/VideoCallPicker.js +158 -0
- package/dist/components/MessageInput/VideoCallPicker/VideoCallPicker.vue.d.ts +45 -0
- package/dist/components/MessageInput/VideoCallPicker/index.d.ts +3 -0
- package/dist/components/MessageInput/VideoCallPicker/index.js +4 -0
- package/dist/components/MessageInput/i18n/en-US.d.ts +4 -0
- package/dist/components/MessageInput/i18n/en-US.js +7 -3
- package/dist/components/MessageInput/i18n/index.d.ts +4 -0
- package/dist/components/MessageInput/i18n/index.js +6 -6
- package/dist/components/MessageInput/i18n/zh-CN.js +2 -2
- package/dist/components/MessageInput/index.d.ts +462 -191
- package/dist/components/MessageInput/index.js +23 -25
- package/dist/components/MessageList/Message/AudioMessage/AudioMessage.js +50 -65
- package/dist/components/MessageList/Message/AudioMessage/PlayButton.js +31 -37
- package/dist/components/MessageList/Message/AudioMessage/WaveForm.js +37 -52
- package/dist/components/MessageList/Message/AudioMessage/index.js +2 -2
- package/dist/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.js +60 -0
- package/dist/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.vue.d.ts +16 -0
- package/dist/components/MessageList/Message/CustomMessage/CallMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/CustomMessage/CallMessage/index.js +4 -0
- package/dist/components/MessageList/Message/CustomMessage/CustomMessage.js +49 -2
- package/dist/components/MessageList/Message/CustomMessage/CustomMessage.vue.d.ts +15 -1
- package/dist/components/MessageList/Message/CustomMessage/index.js +2 -10
- package/dist/components/MessageList/Message/FaceMessage/FaceMessage.js +16 -20
- package/dist/components/MessageList/Message/FaceMessage/index.js +2 -2
- package/dist/components/MessageList/Message/FileMessage/FileMessage.js +57 -70
- package/dist/components/MessageList/Message/FileMessage/index.js +2 -2
- package/dist/components/MessageList/Message/GroupTipMessage/GroupTipMessage.js +2 -2
- package/dist/components/MessageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +1 -1
- package/dist/components/MessageList/Message/GroupTipMessage/index.js +13 -23
- package/dist/components/MessageList/Message/GroupTipMessage/resolveGroupTipMessage.d.ts +1 -1
- package/dist/components/MessageList/Message/GroupTipMessage/resolveGroupTipMessage.js +41 -59
- package/dist/components/MessageList/Message/ImageMessage/ImageMessage.js +106 -169
- package/dist/components/MessageList/Message/ImageMessage/index.js +2 -2
- package/dist/components/MessageList/Message/LocationMessage/LocationMessage.js +7 -7
- package/dist/components/MessageList/Message/LocationMessage/index.js +2 -2
- package/dist/components/MessageList/Message/MergerMessage/MergerMessage.js +7 -7
- package/dist/components/MessageList/Message/MergerMessage/index.js +2 -2
- package/dist/components/MessageList/Message/Message.js +2 -2
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +800 -1074
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.vue.d.ts +1 -1
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/index.js +2 -2
- package/dist/components/MessageList/Message/MessageLayout/MessageBubble/MessageBubble.js +36 -44
- package/dist/components/MessageList/Message/MessageLayout/MessageBubble/MessageBubble.vue.d.ts +1 -1
- package/dist/components/MessageList/Message/MessageLayout/MessageBubble/index.js +2 -2
- package/dist/components/MessageList/Message/MessageLayout/MessageLayout.js +116 -123
- package/dist/components/MessageList/Message/MessageLayout/MessageLayout.vue.d.ts +1 -1
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.js +47 -73
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +24 -27
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/index.js +2 -2
- package/dist/components/MessageList/Message/MessageLayout/index.js +2 -2
- package/dist/components/MessageList/Message/MessageLayout/useMessageLayoutClasses.js +23 -28
- package/dist/components/MessageList/Message/RecalledMessage/RecalledMessage.js +39 -48
- package/dist/components/MessageList/Message/RecalledMessage/index.js +2 -2
- package/dist/components/MessageList/Message/TextMessage/TextMessage.js +80 -102
- package/dist/components/MessageList/Message/TextMessage/index.js +2 -2
- package/dist/components/MessageList/Message/VideoMessage/VideoMessage.js +68 -92
- package/dist/components/MessageList/Message/VideoMessage/index.js +2 -2
- package/dist/components/MessageList/Message/index.js +18 -20
- package/dist/components/MessageList/MessageForward/ForwardListItem.js +46 -53
- package/dist/components/MessageList/MessageForward/MessageForward.js +102 -124
- package/dist/components/MessageList/MessageForward/index.js +2 -2
- package/dist/components/MessageList/MessageList.js +129 -204
- package/dist/components/MessageList/MessageListContext.js +9 -10
- package/dist/components/MessageList/MessageTimeDivider/MessageTimeDivider.js +20 -28
- package/dist/components/MessageList/MessageTimeDivider/index.js +2 -2
- package/dist/components/MessageList/ReadReceiptInfo/ReadReceiptInfo.js +294 -379
- package/dist/components/MessageList/ReadReceiptInfo/index.js +2 -2
- package/dist/components/MessageList/ScrollToBottom/ScrollToBottom.js +20 -25
- package/dist/components/MessageList/ScrollToBottom/index.js +2 -2
- package/dist/components/MessageList/i18n/en-US.d.ts +20 -1
- package/dist/components/MessageList/i18n/en-US.js +21 -2
- package/dist/components/MessageList/i18n/index.d.ts +134 -92
- package/dist/components/MessageList/i18n/index.js +6 -6
- package/dist/components/MessageList/i18n/zh-CN.d.ts +20 -1
- package/dist/components/MessageList/i18n/zh-CN.js +21 -2
- package/dist/components/MessageList/index.js +9 -10
- package/dist/components/MicButton/AudioIcon.js +27 -37
- package/dist/components/MicButton/index.js +37 -52
- package/dist/components/Search/Search.js +117 -156
- package/dist/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.js +378 -505
- package/dist/components/Search/SearchAdvanced/DateRangePicker/index.js +2 -2
- package/dist/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.js +147 -211
- package/dist/components/Search/SearchAdvanced/MessageAdvanced/index.js +2 -2
- package/dist/components/Search/SearchAdvanced/SearchAdvanced.js +46 -60
- package/dist/components/Search/SearchAdvanced/SearchTab/SearchTab.js +39 -51
- package/dist/components/Search/SearchAdvanced/SearchTab/index.js +2 -2
- package/dist/components/Search/SearchAdvanced/Slider/Slider.js +53 -82
- package/dist/components/Search/SearchAdvanced/Slider/index.js +2 -2
- package/dist/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.js +247 -317
- package/dist/components/Search/SearchAdvanced/UserAdvanced/index.js +2 -2
- package/dist/components/Search/SearchAdvanced/index.js +12 -12
- package/dist/components/Search/SearchBar/SearchBar.js +98 -122
- package/dist/components/Search/SearchBar/index.js +2 -2
- package/dist/components/Search/SearchResults/EmptyResult/EmptyResult.js +26 -37
- package/dist/components/Search/SearchResults/EmptyResult/index.js +2 -2
- package/dist/components/Search/SearchResults/Loading/Loading.js +13 -19
- package/dist/components/Search/SearchResults/Loading/index.js +2 -2
- package/dist/components/Search/SearchResults/SearchResults.js +233 -339
- package/dist/components/Search/SearchResults/SearchResultsItem/Conversation/Conversation.js +61 -83
- package/dist/components/Search/SearchResults/SearchResultsItem/Conversation/index.js +2 -2
- package/dist/components/Search/SearchResults/SearchResultsItem/Group/Group.js +40 -52
- package/dist/components/Search/SearchResults/SearchResultsItem/Group/index.js +2 -2
- package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.js +134 -181
- package/dist/components/Search/SearchResults/SearchResultsItem/Message/index.js +2 -2
- package/dist/components/Search/SearchResults/SearchResultsItem/SearchResultsItem.js +40 -46
- package/dist/components/Search/SearchResults/SearchResultsItem/User/User.js +56 -75
- package/dist/components/Search/SearchResults/SearchResultsItem/User/index.js +2 -2
- package/dist/components/Search/SearchResults/SearchResultsItem/index.js +11 -11
- package/dist/components/Search/SearchResults/SearchResultsItem/utils/highlightText.js +17 -36
- package/dist/components/Search/SearchResults/SearchResultsItem/utils/index.js +2 -2
- package/dist/components/Search/SearchResults/index.js +16 -16
- package/dist/components/Search/i18n/en-US/DateRangePicker.js +3 -3
- package/dist/components/Search/i18n/en-US/Search.js +3 -3
- package/dist/components/Search/i18n/en-US/index.js +7 -7
- package/dist/components/Search/i18n/index.js +4 -4
- package/dist/components/Search/i18n/zh-CN/DateRangePicker.js +3 -3
- package/dist/components/Search/i18n/zh-CN/Search.js +3 -3
- package/dist/components/Search/i18n/zh-CN/index.js +7 -7
- package/dist/components/Search/index.js +20 -26
- package/dist/components/StreamMixer/LocalMixer/MixerControl.js +68 -100
- package/dist/components/StreamMixer/LocalMixer/index.js +103 -171
- package/dist/components/StreamMixer/i18n/en-US/index.js +2 -2
- package/dist/components/StreamMixer/i18n/index.js +4 -4
- package/dist/components/StreamMixer/i18n/zh-CN/index.js +2 -2
- package/dist/components/StreamMixer/icons/CameraMirror.js +13 -14
- package/dist/components/StreamMixer/icons/Delete.js +13 -14
- package/dist/components/StreamMixer/icons/Down.js +10 -11
- package/dist/components/StreamMixer/icons/Rotation.js +11 -12
- package/dist/components/StreamMixer/icons/Up.js +10 -11
- package/dist/components/StreamMixer/index.js +19 -21
- package/dist/components/StreamView/Layout/CustomLayout.js +132 -209
- package/dist/components/StreamView/Layout/FloatLayout.js +136 -199
- package/dist/components/StreamView/Layout/GridLayout.js +117 -197
- package/dist/components/StreamView/Layout/MeetingLayout.js +129 -231
- package/dist/components/StreamView/Layout/MixLayout.js +70 -98
- package/dist/components/StreamView/common/ArrowStroke.js +26 -29
- package/dist/components/StreamView/common/LocalScreenView/index.js +82 -92
- package/dist/components/StreamView/common/StreamCover/index.js +33 -62
- package/dist/components/StreamView/common/StreamList/index.js +103 -163
- package/dist/components/StreamView/common/StreamPlay/index.js +58 -98
- package/dist/components/StreamView/common/StreamRegion/StreamRegionPC.js +58 -90
- package/dist/components/StreamView/common/StreamRegion/index.js +2 -2
- package/dist/components/StreamView/index.js +64 -66
- package/dist/components/StreamView/manager/mediaManager.js +125 -236
- package/dist/components/UserList/AllUserActions/index.js +2 -2
- package/dist/components/UserList/AllUserActions/indexH5.js +59 -69
- package/dist/components/UserList/AllUserActions/indexPC.js +61 -73
- package/dist/components/UserList/AllUserActions/useIndexHooks.js +32 -39
- package/dist/components/UserList/UserItem/UserAction/index.js +2 -2
- package/dist/components/UserList/UserItem/UserAction/indexH5.js +47 -61
- package/dist/components/UserList/UserItem/UserAction/indexPC.js +86 -130
- package/dist/components/UserList/UserItem/UserInfo/index.js +67 -117
- package/dist/components/UserList/UserItem/UserInvite/index.js +18 -21
- package/dist/components/UserList/UserItem/index.js +2 -2
- package/dist/components/UserList/UserItem/indexH5.js +42 -54
- package/dist/components/UserList/UserItem/indexPC.js +32 -37
- package/dist/components/UserList/UserListContent/index.js +30 -44
- package/dist/components/UserList/UserListSearch/index.js +20 -26
- package/dist/components/UserList/index.js +50 -63
- package/dist/components/UserPicker/UserPicker.js +110 -148
- package/dist/components/UserPicker/components/ListMode/ListMode.js +70 -96
- package/dist/components/UserPicker/components/ListMode/index.js +2 -2
- package/dist/components/UserPicker/components/SearchBar/SearchBar.js +43 -58
- package/dist/components/UserPicker/components/SearchBar/index.js +2 -2
- package/dist/components/UserPicker/components/SelectedPanel/SelectedPanel.js +69 -94
- package/dist/components/UserPicker/components/SelectedPanel/index.js +2 -2
- package/dist/components/UserPicker/components/TreeMode/TreeMode.js +33 -42
- package/dist/components/UserPicker/components/TreeMode/TreeNode.js +81 -106
- package/dist/components/UserPicker/components/TreeMode/index.js +2 -2
- package/dist/components/UserPicker/hooks/useSearchFilter.js +39 -80
- package/dist/components/UserPicker/hooks/useSelection.js +155 -313
- package/dist/components/UserPicker/hooks/useTreeState.js +17 -37
- package/dist/components/UserPicker/i18n/en-US.js +2 -2
- package/dist/components/UserPicker/i18n/index.js +6 -6
- package/dist/components/UserPicker/i18n/zh-CN.js +2 -2
- package/dist/components/UserPicker/index.js +7 -7
- package/dist/components/VideoSetting/CameraSelect.js +46 -58
- package/dist/components/VideoSetting/VideoMediaControl.js +45 -65
- package/dist/components/VideoSetting/VideoPreview.js +31 -40
- package/dist/components/VideoSetting/VideoProfile.js +38 -46
- package/dist/components/VideoSetting/VideoRequestDialog.js +2 -2
- package/dist/components/VideoSetting/VideoSettingTab.js +43 -55
- package/dist/components/VideoSetting/index.js +3 -3
- package/dist/components/VideoSettingPanel/CameraSelect.js +45 -57
- package/dist/components/VideoSettingPanel/VideoPreview.js +30 -39
- package/dist/components/VideoSettingPanel/VideoProfile.js +36 -44
- package/dist/components/VideoSettingPanel/i18n/en-US/index.js +5 -5
- package/dist/components/VideoSettingPanel/i18n/index.js +4 -4
- package/dist/components/VideoSettingPanel/i18n/zh-CN/index.js +5 -5
- package/dist/components/VideoSettingPanel/index.js +48 -63
- package/dist/constants/emoji.js +3 -4
- package/dist/directives/vClickOutside.js +9 -23
- package/dist/directives/vDblTouch.js +26 -51
- package/dist/directives/vTap.js +37 -68
- package/dist/directives/vTouchScale.js +83 -155
- package/dist/handler/index.js +4 -4
- package/dist/handler/translator.js +65 -97
- package/dist/handler/voiceConverter.js +21 -30
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +4 -4
- package/dist/hooks/useAudioControl.js +44 -128
- package/dist/hooks/useLongPress.js +41 -75
- package/dist/hooks/useMessageActions.d.ts +1 -1
- package/dist/hooks/useMessageActions.js +46 -57
- package/dist/hooks/useMouseHover.js +16 -26
- package/dist/hooks/useReadReceipt/useReadReceipt.js +66 -114
- package/dist/hooks/useRoomActions/index.js +11 -14
- package/dist/hooks/useRoomActions/useRoomAudioAction.js +39 -44
- package/dist/hooks/useRoomActions/useRoomScreenAction.js +41 -48
- package/dist/hooks/useRoomActions/useRoomVideoAction.js +38 -44
- package/dist/hooks/useRoomEngine.js +14 -17
- package/dist/hooks/useScroll.js +52 -89
- package/dist/hooks/useUserActions/index.js +81 -117
- package/dist/hooks/useUserActions/useAdminAction.js +29 -35
- package/dist/hooks/useUserActions/useAudioAction.js +36 -40
- package/dist/hooks/useUserActions/useChangeNameCardAction/changeNameCardDialog.js +59 -69
- package/dist/hooks/useUserActions/useChangeNameCardAction/changeNameCardInput.js +40 -49
- package/dist/hooks/useUserActions/useChangeNameCardAction/index.js +43 -51
- package/dist/hooks/useUserActions/useChatAction.js +23 -25
- package/dist/hooks/useUserActions/useKickUserAction.js +27 -32
- package/dist/hooks/useUserActions/useMemberInviteAction.js +24 -40
- package/dist/hooks/useUserActions/useSeatAction.js +96 -108
- package/dist/hooks/useUserActions/useTransferOwnerAction.js +40 -47
- package/dist/hooks/useUserActions/useVideoAction.js +35 -38
- package/dist/hooks/useZIndex.js +7 -12
- package/dist/i18n/index.js +4 -4
- package/dist/index-Bm-QfV5o.js +5125 -0
- package/dist/index-CeQ4nl87.js +44 -0
- package/dist/index-D2OVtqc8.js +12047 -0
- package/dist/index-DPczIrgX.js +42 -0
- package/dist/index-DTq2ybsB.js +33 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +180 -159
- package/dist/index.vue_vue_type_script_setup_true_lang-DZIBxSQ7.js +32 -0
- package/dist/locales/en-US.js +31 -31
- package/dist/locales/index.js +29 -34
- package/dist/locales/zh-CN.js +31 -31
- package/dist/rtc/index.d.ts +35 -40
- package/dist/rtc/index.js +64 -86
- package/dist/rtc/server.js +62 -85
- package/dist/states/BarrageListState/BarrageListState.js +98 -183
- package/dist/states/BarrageListState/index.js +2 -2
- package/dist/states/BattleState.d.ts +46 -0
- package/dist/states/BattleState.js +117 -0
- package/dist/states/C2CSettingState/C2CSettingState.js +52 -92
- package/dist/states/C2CSettingState/index.js +2 -2
- package/dist/states/CoGuestState.d.ts +1 -1
- package/dist/states/CoGuestState.js +191 -291
- package/dist/states/CoHostState/CoHostState.d.ts +30 -0
- package/dist/states/CoHostState/CoHostState.js +209 -0
- package/dist/states/CoHostState/index.d.ts +1 -0
- package/dist/states/CoHostState/index.js +4 -0
- package/dist/states/ContactListState/ContactListState.js +175 -271
- package/dist/states/ContactListState/index.js +2 -2
- package/dist/states/ConversationListState/ConversationListState.js +61 -112
- package/dist/states/ConversationListState/index.js +2 -2
- package/dist/states/DeviceState.js +240 -389
- package/dist/states/GroupSettingState/GroupSettingState.js +220 -378
- package/dist/states/GroupSettingState/index.js +7 -7
- package/dist/states/GroupSettingState/permissions.js +240 -250
- package/dist/states/GroupSettingState/types.js +5 -41
- package/dist/states/LiveAudienceState.js +100 -132
- package/dist/states/LiveMonitorState/api/http.js +1245 -1910
- package/dist/states/LiveMonitorState/index.js +92 -148
- package/dist/states/LiveMonitorState/player/adapters/trtc.js +54 -106
- package/dist/states/LiveMonitorState/player/base/basePlayer.js +111 -169
- package/dist/states/LiveMonitorState/player/index.js +10 -10
- package/dist/states/LiveMonitorState/player/manager/playerManager.js +27 -33
- package/dist/states/LiveMonitorState/player/types/index.js +8 -8
- package/dist/states/LiveMonitorState/player/types/player.js +3 -13
- package/dist/states/LiveMonitorState/player/types/trtc.js +6 -20
- package/dist/states/LiveMonitorState/utils/index.js +17 -22
- package/dist/states/LiveSeatState/index.js +16 -16
- package/dist/states/LiveSeatState/seatEventManager.js +54 -75
- package/dist/states/LiveSeatState/seatManager.js +29 -36
- package/dist/states/LiveSeatState/store.js +18 -25
- package/dist/states/LiveSeatState/usePlayStream/MixStreamPlayer.js +43 -65
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.js +55 -83
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.js +59 -97
- package/dist/states/LiveSeatState/usePlayStream/index.js +44 -96
- package/dist/states/LiveSeatState/usePlayStream/useStreamPostion.js +43 -55
- package/dist/states/LiveState/index.js +190 -275
- package/dist/states/LoginState.js +48 -62
- package/dist/states/MessageActionState/MessageActionState.d.ts +6 -6
- package/dist/states/MessageActionState/MessageActionState.js +45 -56
- package/dist/states/MessageActionState/index.js +2 -2
- package/dist/states/MessageInputState/MessageInputState.js +90 -139
- package/dist/states/MessageInputState/index.js +4 -4
- package/dist/states/MessageInputState/type.js +2 -10
- package/dist/states/MessageInputState/utils.js +20 -21
- package/dist/states/MessageListState/MessageListState.js +65 -89
- package/dist/states/MessageListState/index.js +2 -2
- package/dist/states/RoomState.js +223 -332
- package/dist/states/SearchState.d.ts +2 -2
- package/dist/states/SearchState.js +229 -356
- package/dist/states/SeatStore.js +140 -213
- package/dist/states/UserState/index.js +31 -51
- package/dist/states/UserState/store.js +95 -147
- package/dist/states/UserState/userEventManager.js +85 -134
- package/dist/states/UserState/userManager.js +184 -232
- package/dist/states/VideoMixerState.js +181 -228
- package/dist/statistical/const.js +2 -6
- package/dist/statistical/index.js +4 -4
- package/dist/statistical/statistical.js +12 -12
- package/dist/styles/index.css +1 -13145
- package/dist/types/battle.d.ts +11 -0
- package/dist/types/battle.js +1 -0
- package/dist/types/call.d.ts +55 -0
- package/dist/types/call.js +4 -0
- package/dist/types/chatSetting.js +4 -4
- package/dist/types/coGuest.js +2 -8
- package/dist/types/coHost.d.ts +44 -4
- package/dist/types/coHost.js +4 -8
- package/dist/types/contact.js +3 -17
- package/dist/types/conversation.js +6 -36
- package/dist/types/device.d.ts +4 -0
- package/dist/types/device.js +8 -45
- package/dist/types/engine.d.ts +23 -7
- package/dist/types/engine.js +5 -23
- package/dist/types/index.d.ts +9 -6
- package/dist/types/index.js +92 -84
- package/dist/types/live.js +4 -21
- package/dist/types/message.js +4 -29
- package/dist/types/monitor.js +2 -6
- package/dist/types/room.js +3 -16
- package/dist/types/search.js +9 -15
- package/dist/types/seat.d.ts +4 -4
- package/dist/types/stream.js +3 -14
- package/dist/types/types.js +32 -329
- package/dist/types/user.d.ts +0 -3
- package/dist/types/user.js +8 -65
- package/dist/useId-CtirfF0W.js +12 -0
- package/dist/utils/call.d.ts +6 -2
- package/dist/utils/call.js +126 -11
- package/dist/utils/copyText.js +20 -33
- package/dist/utils/documentLink.js +2 -2
- package/dist/utils/domOperation.js +99 -122
- package/dist/utils/downFile.js +11 -19
- package/dist/utils/emoji.js +24 -31
- package/dist/utils/enableSampleTaskStatus.js +5 -8
- package/dist/utils/env.js +8 -13
- package/dist/utils/environment.js +14 -18
- package/dist/utils/index.js +36 -36
- package/dist/utils/json.js +34 -58
- package/dist/utils/lodash.js +63 -109
- package/dist/utils/riseInput.js +19 -36
- package/dist/utils/time.js +640 -934
- package/dist/utils/type-check.js +21 -46
- package/dist/utils/utils.js +131 -235
- package/dist/utils-DaB7eSu5.js +48 -0
- package/package.json +5 -4
- package/src/chat/index.ts +18 -0
- package/src/components/BarrageInput/TextEditor/Editor.scss +2 -2
- package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +1 -1
- package/src/components/ChatSetting/ChatSetting.vue +3 -3
- package/src/components/ChatSetting/GroupChatSetting/GroupActions/GroupActions.vue +3 -0
- package/src/components/ChatSetting/GroupChatSetting/GroupChatSetting.vue +1 -0
- package/src/components/ChatSetting/GroupChatSetting/GroupManagement/GroupManagement.vue +1 -0
- package/src/components/CoGuestPanel/CoGuestPanel.vue +2 -1
- package/src/components/CoHostPanel/BattlePanel.vue +271 -0
- package/src/components/CoHostPanel/CoHostPanel.vue +226 -0
- package/src/components/CoHostPanel/ConfigSettingPanel.vue +264 -0
- package/src/components/CoHostPanel/ConnectionPanel.vue +549 -0
- package/src/components/CoHostPanel/RecommendHostList.vue +306 -0
- package/src/components/CoHostPanel/UserList.vue +93 -0
- package/src/components/CoHostPanel/i18n/en-US/index.ts +78 -0
- package/src/components/CoHostPanel/i18n/index.ts +4 -0
- package/src/components/CoHostPanel/i18n/zh-CN/index.ts +79 -0
- package/src/components/CoHostPanel/index.ts +7 -0
- package/src/components/ContactList/ContactInfo/GroupInfo/GroupInfo.vue +1 -0
- package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +1 -0
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.vue +1 -1
- package/src/components/ConversationList/ConversationSearch/ConversationSearch.vue +1 -0
- package/src/components/LiveList/LiveList.vue +61 -106
- package/src/components/LiveList/LiveListH5.vue +1 -1
- package/src/components/LiveList/i18n/en-US/index.ts +1 -1
- package/src/components/LiveList/i18n/zh-CN/index.ts +1 -1
- package/src/components/LiveView/CoreViewDecorate/BattleDecorate.vue +420 -0
- package/src/components/LiveView/CoreViewDecorate/BattleUserDecorate.vue +140 -0
- package/src/components/LiveView/CoreViewDecorate/CoHostDecorate.vue +116 -0
- package/src/components/LiveView/CoreViewDecorate/LiveCoreDecorate.vue +70 -0
- package/src/components/LiveView/PlayerControl/MultiResolution.vue +130 -0
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.vue +10 -8
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControlState.ts +117 -1
- package/src/components/LiveView/assets/img/defeat.png +0 -0
- package/src/components/LiveView/assets/img/draw.png +0 -0
- package/src/components/LiveView/assets/img/victory.png +0 -0
- package/src/components/LiveView/assets/svg/BattleOrdinaryBadge.svg +20 -0
- package/src/components/LiveView/assets/svg/BattleTopBadge.svg +16 -0
- package/src/components/LiveView/assets/svg/blueBkg.svg +9 -0
- package/src/components/LiveView/assets/svg/redBkg.svg +9 -0
- package/src/components/LiveView/assets/svg/s.svg +17 -0
- package/src/components/LiveView/assets/svg/v.svg +17 -0
- package/src/components/{LiveCoreView → LiveView}/i18n/en-US/index.ts +7 -0
- package/src/components/{LiveCoreView → LiveView}/i18n/zh-CN/index.ts +7 -0
- package/src/components/{LiveCoreView → LiveView}/index.ts +5 -2
- package/src/components/{LiveCoreView → LiveView}/index.vue +5 -2
- package/src/components/MessageInput/AttachmentPicker/AttachmentPicker.vue +10 -8
- package/src/components/MessageInput/AttachmentPicker/FilePicker.vue +59 -31
- package/src/components/MessageInput/AttachmentPicker/ImagePicker.vue +58 -31
- package/src/components/MessageInput/AttachmentPicker/VideoPicker.vue +58 -31
- package/src/components/MessageInput/AudioCallPicker/AudioCallPicker.vue +240 -0
- package/src/components/MessageInput/AudioCallPicker/index.ts +3 -0
- package/src/components/MessageInput/EmojiPicker/EmojiPicker.vue +107 -18
- package/src/components/MessageInput/MessageInput.module.scss +1 -1
- package/src/components/MessageInput/MessageInput.vue +6 -2
- package/src/components/MessageInput/VideoCallPicker/VideoCallPicker.vue +246 -0
- package/src/components/MessageInput/VideoCallPicker/index.ts +3 -0
- package/src/components/MessageInput/i18n/en-US.ts +4 -0
- package/src/components/MessageInput/index.ts +10 -4
- package/src/components/MessageInput/types.d.ts +3 -1
- package/src/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.vue +67 -0
- package/src/components/MessageList/Message/CustomMessage/CallMessage/index.ts +3 -0
- package/src/components/MessageList/Message/CustomMessage/CustomMessage.vue +59 -2
- package/src/components/MessageList/Message/CustomMessage/index.ts +1 -1
- package/src/components/MessageList/Message/GroupTipMessage/GroupTipMessage.vue +9 -10
- package/src/components/MessageList/Message/GroupTipMessage/resolveGroupTipMessage.ts +1 -1
- package/src/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.vue +1 -1
- package/src/components/MessageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +1 -1
- package/src/components/MessageList/Message/MessageLayout/MessageLayout.vue +30 -18
- package/src/components/MessageList/i18n/en-US.ts +24 -1
- package/src/components/MessageList/i18n/index.ts +4 -4
- package/src/components/MessageList/i18n/zh-CN.ts +24 -1
- package/src/components/MessageList/index.ts +2 -2
- package/src/components/StreamMixer/index.vue +1 -1
- package/src/components/UserPicker/UserPicker.vue +0 -2
- package/src/hooks/index.ts +1 -2
- package/src/hooks/useMessageActions.ts +3 -3
- package/src/index.ts +2 -1
- package/src/rtc/index.ts +7 -2
- package/src/types/battle.ts +12 -0
- package/src/types/call.ts +62 -0
- package/src/types/coHost.ts +46 -4
- package/src/types/device.ts +5 -0
- package/src/types/engine.ts +45 -21
- package/src/types/index.ts +12 -6
- package/src/types/seat.ts +5 -5
- package/src/types/user.ts +0 -4
- package/src/utils/call.ts +233 -5
- package/src/utils/time.ts +1 -1
- package/dist/AttachmentPicker.module-BesmtGyl.js +0 -11
- package/dist/AudioRequestDialog.vue_vue_type_script_setup_true_lang-BmX-qsat.js +0 -108
- package/dist/DialogPortal-DWeT-J6v.js +0 -496
- package/dist/FilePicker.vue_vue_type_script_setup_true_lang-CdJ4DUzE.js +0 -76
- package/dist/ImagePicker.vue_vue_type_script_setup_true_lang-CbNUofpK.js +0 -76
- package/dist/MaterialRenameDialog.vue_vue_type_script_setup_true_lang-CVh4Regz.js +0 -43
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-wUJPjWbx.js +0 -128
- package/dist/PopoverTrigger-BKOIHfdS.js +0 -679
- package/dist/PopperContent-DtL7HVWz.js +0 -2227
- package/dist/Teleport-CMvGsENT.js +0 -1365
- package/dist/VideoPicker.vue_vue_type_script_setup_true_lang-CmxjbNDJ.js +0 -76
- package/dist/VideoRequestDialog.vue_vue_type_script_setup_true_lang-CnE-LwNh.js +0 -108
- package/dist/_commonjsHelpers-CUmg6egw.js +0 -6
- package/dist/_plugin-vue_export-helper-1tPrXgE0.js +0 -10
- package/dist/components/LiveCoreView/DefaultStreamViewUI.js +0 -177
- package/dist/components/LiveCoreView/PlayerControl/AudioControl.js +0 -252
- package/dist/components/LiveCoreView/PlayerControl/PlayerControl.js +0 -279
- package/dist/components/LiveCoreView/PlayerControl/PlayerControlState.js +0 -412
- package/dist/components/LiveCoreView/PlayerControl/index.js +0 -8
- package/dist/components/LiveCoreView/PlayerControl/utils/deviceDetection.js +0 -129
- package/dist/components/LiveCoreView/PlayerControl/utils/domHelpers.js +0 -120
- package/dist/components/LiveCoreView/PlayerControl/utils/fullscreenManager.js +0 -311
- package/dist/components/LiveCoreView/i18n/en-US/index.js +0 -16
- package/dist/components/LiveCoreView/i18n/index.js +0 -6
- package/dist/components/LiveCoreView/i18n/zh-CN/index.js +0 -16
- package/dist/components/LiveCoreView/index.d.ts +0 -4
- package/dist/components/LiveCoreView/index.js +0 -366
- package/dist/index-BF6QB9jF.js +0 -63
- package/dist/index-BPFJrNlA.js +0 -15915
- package/dist/index-CX1Zs9En.js +0 -44
- package/dist/index-DRcLhqhU.js +0 -38
- package/dist/index-v15JHz0-.js +0 -7655
- package/dist/index.vue_vue_type_script_setup_true_lang-EcKm3pYY.js +0 -36
- package/dist/states/CoHostState.d.ts +0 -22
- package/dist/states/CoHostState.js +0 -178
- package/dist/useId-CsgLY8y3.js +0 -13
- package/dist/utils-KP1QpeUS.js +0 -59
- package/src/components/MessageInput/EmojiPicker/EmojiPicker.module.scss +0 -28
- /package/dist/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/index.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/i18n/index.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/index.vue.d.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.vue +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.vue +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.module.scss +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/index.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/i18n/index.ts +0 -0
package/dist/utils/time.js
CHANGED
|
@@ -1,131 +1,94 @@
|
|
|
1
|
-
import { useUIKit } from "@tencentcloud/uikit-base-component-vue3";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
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);
|
|
1
|
+
import { useUIKit as A } from "@tencentcloud/uikit-base-component-vue3";
|
|
2
|
+
const G = 6048e5, p = 864e5, X = Symbol.for("constructDateFrom");
|
|
3
|
+
function l(e, t) {
|
|
4
|
+
return typeof e == "function" ? e(t) : e && typeof e == "object" && X in e ? e[X](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
11
5
|
}
|
|
12
|
-
function
|
|
13
|
-
return
|
|
6
|
+
function g(e, t) {
|
|
7
|
+
return l(t || e, e);
|
|
14
8
|
}
|
|
15
|
-
function
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
_date.setDate(_date.getDate() + amount);
|
|
19
|
-
return _date;
|
|
9
|
+
function ee(e, t, n) {
|
|
10
|
+
const r = g(e, n == null ? void 0 : n.in);
|
|
11
|
+
return isNaN(t) ? l(e, NaN) : (r.setDate(r.getDate() + t), r);
|
|
20
12
|
}
|
|
21
|
-
let
|
|
22
|
-
function
|
|
23
|
-
return
|
|
13
|
+
let te = {};
|
|
14
|
+
function T() {
|
|
15
|
+
return te;
|
|
24
16
|
}
|
|
25
|
-
function
|
|
26
|
-
var
|
|
27
|
-
const
|
|
28
|
-
|
|
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;
|
|
17
|
+
function v(e, t) {
|
|
18
|
+
var s, c, d, f;
|
|
19
|
+
const n = T(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((c = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((f = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : f.weekStartsOn) ?? 0, a = g(e, t == null ? void 0 : t.in), i = a.getDay(), o = (i < r ? 7 : 0) + i - r;
|
|
20
|
+
return a.setDate(a.getDate() - o), a.setHours(0, 0, 0, 0), a;
|
|
35
21
|
}
|
|
36
|
-
function
|
|
37
|
-
return
|
|
22
|
+
function S(e, t) {
|
|
23
|
+
return v(e, { ...t, weekStartsOn: 1 });
|
|
38
24
|
}
|
|
39
|
-
function
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
}
|
|
25
|
+
function B(e, t) {
|
|
26
|
+
const n = g(e, t == null ? void 0 : t.in), r = n.getFullYear(), a = l(n, 0);
|
|
27
|
+
a.setFullYear(r + 1, 0, 4), a.setHours(0, 0, 0, 0);
|
|
28
|
+
const i = S(a), o = l(n, 0);
|
|
29
|
+
o.setFullYear(r, 0, 4), o.setHours(0, 0, 0, 0);
|
|
30
|
+
const s = S(o);
|
|
31
|
+
return n.getTime() >= i.getTime() ? r + 1 : n.getTime() >= s.getTime() ? r : r - 1;
|
|
57
32
|
}
|
|
58
|
-
function
|
|
59
|
-
const
|
|
60
|
-
const utcDate = new Date(
|
|
33
|
+
function _(e) {
|
|
34
|
+
const t = g(e), n = new Date(
|
|
61
35
|
Date.UTC(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
36
|
+
t.getFullYear(),
|
|
37
|
+
t.getMonth(),
|
|
38
|
+
t.getDate(),
|
|
39
|
+
t.getHours(),
|
|
40
|
+
t.getMinutes(),
|
|
41
|
+
t.getSeconds(),
|
|
42
|
+
t.getMilliseconds()
|
|
69
43
|
)
|
|
70
44
|
);
|
|
71
|
-
|
|
72
|
-
return +date - +utcDate;
|
|
45
|
+
return n.setUTCFullYear(t.getFullYear()), +e - +n;
|
|
73
46
|
}
|
|
74
|
-
function
|
|
75
|
-
const
|
|
47
|
+
function E(e, ...t) {
|
|
48
|
+
const n = l.bind(
|
|
76
49
|
null,
|
|
77
|
-
|
|
50
|
+
e || t.find((r) => typeof r == "object")
|
|
78
51
|
);
|
|
79
|
-
return
|
|
52
|
+
return t.map(n);
|
|
80
53
|
}
|
|
81
|
-
function
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
return _date;
|
|
54
|
+
function Y(e, t) {
|
|
55
|
+
const n = g(e, t == null ? void 0 : t.in);
|
|
56
|
+
return n.setHours(0, 0, 0, 0), n;
|
|
85
57
|
}
|
|
86
|
-
function
|
|
87
|
-
const [
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
const earlierStartOfDay = startOfDay(earlierDate_);
|
|
94
|
-
const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
|
|
95
|
-
const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
|
|
96
|
-
return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
|
|
58
|
+
function ne(e, t, n) {
|
|
59
|
+
const [r, a] = E(
|
|
60
|
+
n == null ? void 0 : n.in,
|
|
61
|
+
e,
|
|
62
|
+
t
|
|
63
|
+
), i = Y(r), o = Y(a), s = +i - _(i), c = +o - _(o);
|
|
64
|
+
return Math.round((s - c) / p);
|
|
97
65
|
}
|
|
98
|
-
function
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
fourthOfJanuary.setFullYear(year, 0, 4);
|
|
102
|
-
fourthOfJanuary.setHours(0, 0, 0, 0);
|
|
103
|
-
return startOfISOWeek(fourthOfJanuary);
|
|
66
|
+
function re(e, t) {
|
|
67
|
+
const n = B(e, t), r = l(e, 0);
|
|
68
|
+
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), S(r);
|
|
104
69
|
}
|
|
105
|
-
function
|
|
106
|
-
return
|
|
70
|
+
function C(e) {
|
|
71
|
+
return l(e, Date.now());
|
|
107
72
|
}
|
|
108
|
-
function
|
|
109
|
-
const [
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
73
|
+
function z(e, t, n) {
|
|
74
|
+
const [r, a] = E(
|
|
75
|
+
n == null ? void 0 : n.in,
|
|
76
|
+
e,
|
|
77
|
+
t
|
|
113
78
|
);
|
|
114
|
-
return +
|
|
79
|
+
return +Y(r) == +Y(a);
|
|
115
80
|
}
|
|
116
|
-
function
|
|
117
|
-
return
|
|
81
|
+
function ae(e) {
|
|
82
|
+
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
118
83
|
}
|
|
119
|
-
function
|
|
120
|
-
return !(!
|
|
84
|
+
function ie(e) {
|
|
85
|
+
return !(!ae(e) && typeof e != "number" || isNaN(+g(e)));
|
|
121
86
|
}
|
|
122
|
-
function
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
date_.setHours(0, 0, 0, 0);
|
|
126
|
-
return date_;
|
|
87
|
+
function oe(e, t) {
|
|
88
|
+
const n = g(e, t == null ? void 0 : t.in);
|
|
89
|
+
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
127
90
|
}
|
|
128
|
-
const
|
|
91
|
+
const ue = {
|
|
129
92
|
lessThanXSeconds: {
|
|
130
93
|
one: "less than a second",
|
|
131
94
|
other: "less than {{count}} seconds"
|
|
@@ -187,102 +150,77 @@ const formatDistanceLocale$1 = {
|
|
|
187
150
|
one: "almost 1 year",
|
|
188
151
|
other: "almost {{count}} years"
|
|
189
152
|
}
|
|
153
|
+
}, se = (e, t, n) => {
|
|
154
|
+
let r;
|
|
155
|
+
const a = ue[e];
|
|
156
|
+
return typeof a == "string" ? r = a : t === 1 ? r = a.one : r = a.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
190
157
|
};
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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;
|
|
158
|
+
function D(e) {
|
|
159
|
+
return (t = {}) => {
|
|
160
|
+
const n = t.width ? String(t.width) : e.defaultWidth;
|
|
161
|
+
return e.formats[n] || e.formats[e.defaultWidth];
|
|
215
162
|
};
|
|
216
163
|
}
|
|
217
|
-
const
|
|
164
|
+
const ce = {
|
|
218
165
|
full: "EEEE, MMMM do, y",
|
|
219
166
|
long: "MMMM do, y",
|
|
220
167
|
medium: "MMM d, y",
|
|
221
168
|
short: "MM/dd/yyyy"
|
|
222
|
-
}
|
|
223
|
-
const timeFormats$1 = {
|
|
169
|
+
}, de = {
|
|
224
170
|
full: "h:mm:ss a zzzz",
|
|
225
171
|
long: "h:mm:ss a z",
|
|
226
172
|
medium: "h:mm:ss a",
|
|
227
173
|
short: "h:mm a"
|
|
228
|
-
}
|
|
229
|
-
const dateTimeFormats$1 = {
|
|
174
|
+
}, he = {
|
|
230
175
|
full: "{{date}} 'at' {{time}}",
|
|
231
176
|
long: "{{date}} 'at' {{time}}",
|
|
232
177
|
medium: "{{date}}, {{time}}",
|
|
233
178
|
short: "{{date}}, {{time}}"
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
formats: dateFormats$1,
|
|
179
|
+
}, fe = {
|
|
180
|
+
date: D({
|
|
181
|
+
formats: ce,
|
|
238
182
|
defaultWidth: "full"
|
|
239
183
|
}),
|
|
240
|
-
time:
|
|
241
|
-
formats:
|
|
184
|
+
time: D({
|
|
185
|
+
formats: de,
|
|
242
186
|
defaultWidth: "full"
|
|
243
187
|
}),
|
|
244
|
-
dateTime:
|
|
245
|
-
formats:
|
|
188
|
+
dateTime: D({
|
|
189
|
+
formats: he,
|
|
246
190
|
defaultWidth: "full"
|
|
247
191
|
})
|
|
248
|
-
}
|
|
249
|
-
const formatRelativeLocale$1 = {
|
|
192
|
+
}, me = {
|
|
250
193
|
lastWeek: "'last' eeee 'at' p",
|
|
251
194
|
yesterday: "'yesterday at' p",
|
|
252
195
|
today: "'today at' p",
|
|
253
196
|
tomorrow: "'tomorrow at' p",
|
|
254
197
|
nextWeek: "eeee 'at' p",
|
|
255
198
|
other: "P"
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
const width = (options == null ? void 0 : options.width) ? String(options.width) : defaultWidth;
|
|
265
|
-
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
199
|
+
}, le = (e, t, n, r) => me[e];
|
|
200
|
+
function w(e) {
|
|
201
|
+
return (t, n) => {
|
|
202
|
+
const r = n != null && n.context ? String(n.context) : "standalone";
|
|
203
|
+
let a;
|
|
204
|
+
if (r === "formatting" && e.formattingValues) {
|
|
205
|
+
const o = e.defaultFormattingWidth || e.defaultWidth, s = n != null && n.width ? String(n.width) : o;
|
|
206
|
+
a = e.formattingValues[s] || e.formattingValues[o];
|
|
266
207
|
} else {
|
|
267
|
-
const defaultWidth =
|
|
268
|
-
|
|
269
|
-
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
208
|
+
const o = e.defaultWidth, s = n != null && n.width ? String(n.width) : e.defaultWidth;
|
|
209
|
+
a = e.values[s] || e.values[o];
|
|
270
210
|
}
|
|
271
|
-
const
|
|
272
|
-
return
|
|
211
|
+
const i = e.argumentCallback ? e.argumentCallback(t) : t;
|
|
212
|
+
return a[i];
|
|
273
213
|
};
|
|
274
214
|
}
|
|
275
|
-
const
|
|
215
|
+
const ge = {
|
|
276
216
|
narrow: ["B", "A"],
|
|
277
217
|
abbreviated: ["BC", "AD"],
|
|
278
218
|
wide: ["Before Christ", "Anno Domini"]
|
|
279
|
-
}
|
|
280
|
-
const quarterValues$1 = {
|
|
219
|
+
}, we = {
|
|
281
220
|
narrow: ["1", "2", "3", "4"],
|
|
282
221
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
283
222
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
284
|
-
}
|
|
285
|
-
const monthValues$1 = {
|
|
223
|
+
}, ye = {
|
|
286
224
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
287
225
|
abbreviated: [
|
|
288
226
|
"Jan",
|
|
@@ -312,8 +250,7 @@ const monthValues$1 = {
|
|
|
312
250
|
"November",
|
|
313
251
|
"December"
|
|
314
252
|
]
|
|
315
|
-
}
|
|
316
|
-
const dayValues$1 = {
|
|
253
|
+
}, be = {
|
|
317
254
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
318
255
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
319
256
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -326,8 +263,7 @@ const dayValues$1 = {
|
|
|
326
263
|
"Friday",
|
|
327
264
|
"Saturday"
|
|
328
265
|
]
|
|
329
|
-
}
|
|
330
|
-
const dayPeriodValues$1 = {
|
|
266
|
+
}, Pe = {
|
|
331
267
|
narrow: {
|
|
332
268
|
am: "a",
|
|
333
269
|
pm: "p",
|
|
@@ -358,8 +294,7 @@ const dayPeriodValues$1 = {
|
|
|
358
294
|
evening: "evening",
|
|
359
295
|
night: "night"
|
|
360
296
|
}
|
|
361
|
-
}
|
|
362
|
-
const formattingDayPeriodValues$1 = {
|
|
297
|
+
}, Me = {
|
|
363
298
|
narrow: {
|
|
364
299
|
am: "a",
|
|
365
300
|
pm: "p",
|
|
@@ -390,125 +325,101 @@ const formattingDayPeriodValues$1 = {
|
|
|
390
325
|
evening: "in the evening",
|
|
391
326
|
night: "at night"
|
|
392
327
|
}
|
|
393
|
-
}
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
if (rem100 > 20 || rem100 < 10) {
|
|
398
|
-
switch (rem100 % 10) {
|
|
328
|
+
}, We = (e, t) => {
|
|
329
|
+
const n = Number(e), r = n % 100;
|
|
330
|
+
if (r > 20 || r < 10)
|
|
331
|
+
switch (r % 10) {
|
|
399
332
|
case 1:
|
|
400
|
-
return
|
|
333
|
+
return n + "st";
|
|
401
334
|
case 2:
|
|
402
|
-
return
|
|
335
|
+
return n + "nd";
|
|
403
336
|
case 3:
|
|
404
|
-
return
|
|
337
|
+
return n + "rd";
|
|
405
338
|
}
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
era: buildLocalizeFn({
|
|
412
|
-
values: eraValues$1,
|
|
339
|
+
return n + "th";
|
|
340
|
+
}, ve = {
|
|
341
|
+
ordinalNumber: We,
|
|
342
|
+
era: w({
|
|
343
|
+
values: ge,
|
|
413
344
|
defaultWidth: "wide"
|
|
414
345
|
}),
|
|
415
|
-
quarter:
|
|
416
|
-
values:
|
|
346
|
+
quarter: w({
|
|
347
|
+
values: we,
|
|
417
348
|
defaultWidth: "wide",
|
|
418
|
-
argumentCallback: (
|
|
349
|
+
argumentCallback: (e) => e - 1
|
|
419
350
|
}),
|
|
420
|
-
month:
|
|
421
|
-
values:
|
|
351
|
+
month: w({
|
|
352
|
+
values: ye,
|
|
422
353
|
defaultWidth: "wide"
|
|
423
354
|
}),
|
|
424
|
-
day:
|
|
425
|
-
values:
|
|
355
|
+
day: w({
|
|
356
|
+
values: be,
|
|
426
357
|
defaultWidth: "wide"
|
|
427
358
|
}),
|
|
428
|
-
dayPeriod:
|
|
429
|
-
values:
|
|
359
|
+
dayPeriod: w({
|
|
360
|
+
values: Pe,
|
|
430
361
|
defaultWidth: "wide",
|
|
431
|
-
formattingValues:
|
|
362
|
+
formattingValues: Me,
|
|
432
363
|
defaultFormattingWidth: "wide"
|
|
433
364
|
})
|
|
434
365
|
};
|
|
435
|
-
function
|
|
436
|
-
return (
|
|
437
|
-
const width =
|
|
438
|
-
|
|
439
|
-
const matchResult = string.match(matchPattern);
|
|
440
|
-
if (!matchResult) {
|
|
366
|
+
function y(e) {
|
|
367
|
+
return (t, n = {}) => {
|
|
368
|
+
const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], i = t.match(a);
|
|
369
|
+
if (!i)
|
|
441
370
|
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)) : (
|
|
371
|
+
const o = i[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? De(s, (b) => b.test(o)) : (
|
|
446
372
|
// [TODO] -- I challenge you to fix the type
|
|
447
|
-
|
|
373
|
+
ke(s, (b) => b.test(o))
|
|
448
374
|
);
|
|
449
|
-
let
|
|
450
|
-
|
|
451
|
-
value = options.valueCallback ? (
|
|
375
|
+
let d;
|
|
376
|
+
d = e.valueCallback ? e.valueCallback(c) : c, d = n.valueCallback ? (
|
|
452
377
|
// [TODO] -- I challenge you to fix the type
|
|
453
|
-
|
|
454
|
-
) :
|
|
455
|
-
const
|
|
456
|
-
return { value, rest };
|
|
378
|
+
n.valueCallback(d)
|
|
379
|
+
) : d;
|
|
380
|
+
const f = t.slice(o.length);
|
|
381
|
+
return { value: d, rest: f };
|
|
457
382
|
};
|
|
458
383
|
}
|
|
459
|
-
function
|
|
460
|
-
for (const
|
|
461
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
462
|
-
return
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
return void 0;
|
|
384
|
+
function ke(e, t) {
|
|
385
|
+
for (const n in e)
|
|
386
|
+
if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
|
|
387
|
+
return n;
|
|
466
388
|
}
|
|
467
|
-
function
|
|
468
|
-
for (let
|
|
469
|
-
if (
|
|
470
|
-
return
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
return void 0;
|
|
389
|
+
function De(e, t) {
|
|
390
|
+
for (let n = 0; n < e.length; n++)
|
|
391
|
+
if (t(e[n]))
|
|
392
|
+
return n;
|
|
474
393
|
}
|
|
475
|
-
function
|
|
476
|
-
return (
|
|
477
|
-
const
|
|
478
|
-
if (!
|
|
479
|
-
const
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
return { value, rest };
|
|
394
|
+
function I(e) {
|
|
395
|
+
return (t, n = {}) => {
|
|
396
|
+
const r = t.match(e.matchPattern);
|
|
397
|
+
if (!r) return null;
|
|
398
|
+
const a = r[0], i = t.match(e.parsePattern);
|
|
399
|
+
if (!i) return null;
|
|
400
|
+
let o = e.valueCallback ? e.valueCallback(i[0]) : i[0];
|
|
401
|
+
o = n.valueCallback ? n.valueCallback(o) : o;
|
|
402
|
+
const s = t.slice(a.length);
|
|
403
|
+
return { value: o, rest: s };
|
|
486
404
|
};
|
|
487
405
|
}
|
|
488
|
-
const
|
|
489
|
-
const parseOrdinalNumberPattern$1 = /\d+/i;
|
|
490
|
-
const matchEraPatterns$1 = {
|
|
406
|
+
const Oe = /^(\d+)(th|st|nd|rd)?/i, xe = /\d+/i, Se = {
|
|
491
407
|
narrow: /^(b|a)/i,
|
|
492
408
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
493
409
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
494
|
-
}
|
|
495
|
-
const parseEraPatterns$1 = {
|
|
410
|
+
}, Ye = {
|
|
496
411
|
any: [/^b/i, /^(a|c)/i]
|
|
497
|
-
}
|
|
498
|
-
const matchQuarterPatterns$1 = {
|
|
412
|
+
}, Te = {
|
|
499
413
|
narrow: /^[1234]/i,
|
|
500
414
|
abbreviated: /^q[1234]/i,
|
|
501
415
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
502
|
-
}
|
|
503
|
-
const parseQuarterPatterns$1 = {
|
|
416
|
+
}, Ee = {
|
|
504
417
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
505
|
-
}
|
|
506
|
-
const matchMonthPatterns$1 = {
|
|
418
|
+
}, Fe = {
|
|
507
419
|
narrow: /^[jfmasond]/i,
|
|
508
420
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
509
421
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
510
|
-
}
|
|
511
|
-
const parseMonthPatterns$1 = {
|
|
422
|
+
}, Ce = {
|
|
512
423
|
narrow: [
|
|
513
424
|
/^j/i,
|
|
514
425
|
/^f/i,
|
|
@@ -537,22 +448,18 @@ const parseMonthPatterns$1 = {
|
|
|
537
448
|
/^n/i,
|
|
538
449
|
/^d/i
|
|
539
450
|
]
|
|
540
|
-
}
|
|
541
|
-
const matchDayPatterns$1 = {
|
|
451
|
+
}, Ne = {
|
|
542
452
|
narrow: /^[smtwf]/i,
|
|
543
453
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
544
454
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
545
455
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
546
|
-
}
|
|
547
|
-
const parseDayPatterns$1 = {
|
|
456
|
+
}, $e = {
|
|
548
457
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
549
458
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
550
|
-
}
|
|
551
|
-
const matchDayPeriodPatterns$1 = {
|
|
459
|
+
}, qe = {
|
|
552
460
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
553
461
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
554
|
-
}
|
|
555
|
-
const parseDayPeriodPatterns$1 = {
|
|
462
|
+
}, He = {
|
|
556
463
|
any: {
|
|
557
464
|
am: /^a/i,
|
|
558
465
|
pm: /^p/i,
|
|
@@ -563,219 +470,183 @@ const parseDayPeriodPatterns$1 = {
|
|
|
563
470
|
evening: /evening/i,
|
|
564
471
|
night: /night/i
|
|
565
472
|
}
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
valueCallback: (value) => parseInt(value, 10)
|
|
473
|
+
}, Xe = {
|
|
474
|
+
ordinalNumber: I({
|
|
475
|
+
matchPattern: Oe,
|
|
476
|
+
parsePattern: xe,
|
|
477
|
+
valueCallback: (e) => parseInt(e, 10)
|
|
572
478
|
}),
|
|
573
|
-
era:
|
|
574
|
-
matchPatterns:
|
|
479
|
+
era: y({
|
|
480
|
+
matchPatterns: Se,
|
|
575
481
|
defaultMatchWidth: "wide",
|
|
576
|
-
parsePatterns:
|
|
482
|
+
parsePatterns: Ye,
|
|
577
483
|
defaultParseWidth: "any"
|
|
578
484
|
}),
|
|
579
|
-
quarter:
|
|
580
|
-
matchPatterns:
|
|
485
|
+
quarter: y({
|
|
486
|
+
matchPatterns: Te,
|
|
581
487
|
defaultMatchWidth: "wide",
|
|
582
|
-
parsePatterns:
|
|
488
|
+
parsePatterns: Ee,
|
|
583
489
|
defaultParseWidth: "any",
|
|
584
|
-
valueCallback: (
|
|
490
|
+
valueCallback: (e) => e + 1
|
|
585
491
|
}),
|
|
586
|
-
month:
|
|
587
|
-
matchPatterns:
|
|
492
|
+
month: y({
|
|
493
|
+
matchPatterns: Fe,
|
|
588
494
|
defaultMatchWidth: "wide",
|
|
589
|
-
parsePatterns:
|
|
495
|
+
parsePatterns: Ce,
|
|
590
496
|
defaultParseWidth: "any"
|
|
591
497
|
}),
|
|
592
|
-
day:
|
|
593
|
-
matchPatterns:
|
|
498
|
+
day: y({
|
|
499
|
+
matchPatterns: Ne,
|
|
594
500
|
defaultMatchWidth: "wide",
|
|
595
|
-
parsePatterns:
|
|
501
|
+
parsePatterns: $e,
|
|
596
502
|
defaultParseWidth: "any"
|
|
597
503
|
}),
|
|
598
|
-
dayPeriod:
|
|
599
|
-
matchPatterns:
|
|
504
|
+
dayPeriod: y({
|
|
505
|
+
matchPatterns: qe,
|
|
600
506
|
defaultMatchWidth: "any",
|
|
601
|
-
parsePatterns:
|
|
507
|
+
parsePatterns: He,
|
|
602
508
|
defaultParseWidth: "any"
|
|
603
509
|
})
|
|
604
|
-
}
|
|
605
|
-
const enUS = {
|
|
510
|
+
}, J = {
|
|
606
511
|
code: "en-US",
|
|
607
|
-
formatDistance:
|
|
608
|
-
formatLong:
|
|
609
|
-
formatRelative:
|
|
610
|
-
localize:
|
|
611
|
-
match:
|
|
512
|
+
formatDistance: se,
|
|
513
|
+
formatLong: fe,
|
|
514
|
+
formatRelative: le,
|
|
515
|
+
localize: ve,
|
|
516
|
+
match: Xe,
|
|
612
517
|
options: {
|
|
613
518
|
weekStartsOn: 0,
|
|
614
519
|
firstWeekContainsDate: 1
|
|
615
520
|
}
|
|
616
521
|
};
|
|
617
|
-
function
|
|
618
|
-
const
|
|
619
|
-
|
|
620
|
-
const dayOfYear = diff + 1;
|
|
621
|
-
return dayOfYear;
|
|
522
|
+
function _e(e, t) {
|
|
523
|
+
const n = g(e, t == null ? void 0 : t.in);
|
|
524
|
+
return ne(n, oe(n)) + 1;
|
|
622
525
|
}
|
|
623
|
-
function
|
|
624
|
-
const
|
|
625
|
-
|
|
626
|
-
return Math.round(diff / millisecondsInWeek) + 1;
|
|
526
|
+
function Le(e, t) {
|
|
527
|
+
const n = g(e, t == null ? void 0 : t.in), r = +S(n) - +re(n);
|
|
528
|
+
return Math.round(r / G) + 1;
|
|
627
529
|
}
|
|
628
|
-
function
|
|
629
|
-
var
|
|
630
|
-
const
|
|
631
|
-
|
|
632
|
-
const
|
|
633
|
-
|
|
634
|
-
const
|
|
635
|
-
|
|
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
|
-
}
|
|
530
|
+
function U(e, t) {
|
|
531
|
+
var f, b, O, x;
|
|
532
|
+
const n = g(e, t == null ? void 0 : t.in), r = n.getFullYear(), a = T(), i = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((b = (f = t == null ? void 0 : t.locale) == null ? void 0 : f.options) == null ? void 0 : b.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((x = (O = a.locale) == null ? void 0 : O.options) == null ? void 0 : x.firstWeekContainsDate) ?? 1, o = l((t == null ? void 0 : t.in) || e, 0);
|
|
533
|
+
o.setFullYear(r + 1, 0, i), o.setHours(0, 0, 0, 0);
|
|
534
|
+
const s = v(o, t), c = l((t == null ? void 0 : t.in) || e, 0);
|
|
535
|
+
c.setFullYear(r, 0, i), c.setHours(0, 0, 0, 0);
|
|
536
|
+
const d = v(c, t);
|
|
537
|
+
return +n >= +s ? r + 1 : +n >= +d ? r : r - 1;
|
|
649
538
|
}
|
|
650
|
-
function
|
|
651
|
-
var
|
|
652
|
-
const
|
|
653
|
-
|
|
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;
|
|
539
|
+
function Qe(e, t) {
|
|
540
|
+
var s, c, d, f;
|
|
541
|
+
const n = T(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((c = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : c.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((f = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1, a = U(e, t), i = l((t == null ? void 0 : t.in) || e, 0);
|
|
542
|
+
return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), v(i, t);
|
|
660
543
|
}
|
|
661
|
-
function
|
|
662
|
-
const
|
|
663
|
-
|
|
664
|
-
return Math.round(diff / millisecondsInWeek) + 1;
|
|
544
|
+
function Ve(e, t) {
|
|
545
|
+
const n = g(e, t == null ? void 0 : t.in), r = +v(n, t) - +Qe(n, t);
|
|
546
|
+
return Math.round(r / G) + 1;
|
|
665
547
|
}
|
|
666
|
-
function
|
|
667
|
-
const
|
|
668
|
-
|
|
669
|
-
return sign + output;
|
|
548
|
+
function u(e, t) {
|
|
549
|
+
const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
|
|
550
|
+
return n + r;
|
|
670
551
|
}
|
|
671
|
-
const
|
|
552
|
+
const P = {
|
|
672
553
|
// Year
|
|
673
|
-
y(
|
|
674
|
-
const
|
|
675
|
-
|
|
676
|
-
return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
|
|
554
|
+
y(e, t) {
|
|
555
|
+
const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
556
|
+
return u(t === "yy" ? r % 100 : r, t.length);
|
|
677
557
|
},
|
|
678
558
|
// Month
|
|
679
|
-
M(
|
|
680
|
-
const
|
|
681
|
-
return
|
|
559
|
+
M(e, t) {
|
|
560
|
+
const n = e.getMonth();
|
|
561
|
+
return t === "M" ? String(n + 1) : u(n + 1, 2);
|
|
682
562
|
},
|
|
683
563
|
// Day of the month
|
|
684
|
-
d(
|
|
685
|
-
return
|
|
564
|
+
d(e, t) {
|
|
565
|
+
return u(e.getDate(), t.length);
|
|
686
566
|
},
|
|
687
567
|
// AM or PM
|
|
688
|
-
a(
|
|
689
|
-
const
|
|
690
|
-
switch (
|
|
568
|
+
a(e, t) {
|
|
569
|
+
const n = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
570
|
+
switch (t) {
|
|
691
571
|
case "a":
|
|
692
572
|
case "aa":
|
|
693
|
-
return
|
|
573
|
+
return n.toUpperCase();
|
|
694
574
|
case "aaa":
|
|
695
|
-
return
|
|
575
|
+
return n;
|
|
696
576
|
case "aaaaa":
|
|
697
|
-
return
|
|
577
|
+
return n[0];
|
|
698
578
|
case "aaaa":
|
|
699
579
|
default:
|
|
700
|
-
return
|
|
580
|
+
return n === "am" ? "a.m." : "p.m.";
|
|
701
581
|
}
|
|
702
582
|
},
|
|
703
583
|
// Hour [1-12]
|
|
704
|
-
h(
|
|
705
|
-
return
|
|
584
|
+
h(e, t) {
|
|
585
|
+
return u(e.getHours() % 12 || 12, t.length);
|
|
706
586
|
},
|
|
707
587
|
// Hour [0-23]
|
|
708
|
-
H(
|
|
709
|
-
return
|
|
588
|
+
H(e, t) {
|
|
589
|
+
return u(e.getHours(), t.length);
|
|
710
590
|
},
|
|
711
591
|
// Minute
|
|
712
|
-
m(
|
|
713
|
-
return
|
|
592
|
+
m(e, t) {
|
|
593
|
+
return u(e.getMinutes(), t.length);
|
|
714
594
|
},
|
|
715
595
|
// Second
|
|
716
|
-
s(
|
|
717
|
-
return
|
|
596
|
+
s(e, t) {
|
|
597
|
+
return u(e.getSeconds(), t.length);
|
|
718
598
|
},
|
|
719
599
|
// Fraction of second
|
|
720
|
-
S(
|
|
721
|
-
const
|
|
722
|
-
|
|
723
|
-
const fractionalSeconds = Math.trunc(
|
|
724
|
-
milliseconds * Math.pow(10, numberOfDigits - 3)
|
|
600
|
+
S(e, t) {
|
|
601
|
+
const n = t.length, r = e.getMilliseconds(), a = Math.trunc(
|
|
602
|
+
r * Math.pow(10, n - 3)
|
|
725
603
|
);
|
|
726
|
-
return
|
|
604
|
+
return u(a, t.length);
|
|
727
605
|
}
|
|
728
|
-
}
|
|
729
|
-
const dayPeriodEnum = {
|
|
606
|
+
}, k = {
|
|
730
607
|
midnight: "midnight",
|
|
731
608
|
noon: "noon",
|
|
732
609
|
morning: "morning",
|
|
733
610
|
afternoon: "afternoon",
|
|
734
611
|
evening: "evening",
|
|
735
612
|
night: "night"
|
|
736
|
-
}
|
|
737
|
-
const formatters = {
|
|
613
|
+
}, L = {
|
|
738
614
|
// Era
|
|
739
|
-
G: function(
|
|
740
|
-
const
|
|
741
|
-
switch (
|
|
615
|
+
G: function(e, t, n) {
|
|
616
|
+
const r = e.getFullYear() > 0 ? 1 : 0;
|
|
617
|
+
switch (t) {
|
|
742
618
|
case "G":
|
|
743
619
|
case "GG":
|
|
744
620
|
case "GGG":
|
|
745
|
-
return
|
|
621
|
+
return n.era(r, { width: "abbreviated" });
|
|
746
622
|
case "GGGGG":
|
|
747
|
-
return
|
|
623
|
+
return n.era(r, { width: "narrow" });
|
|
748
624
|
case "GGGG":
|
|
749
625
|
default:
|
|
750
|
-
return
|
|
626
|
+
return n.era(r, { width: "wide" });
|
|
751
627
|
}
|
|
752
628
|
},
|
|
753
629
|
// Year
|
|
754
|
-
y: function(
|
|
755
|
-
if (
|
|
756
|
-
const
|
|
757
|
-
|
|
758
|
-
return localize2.ordinalNumber(year, { unit: "year" });
|
|
630
|
+
y: function(e, t, n) {
|
|
631
|
+
if (t === "yo") {
|
|
632
|
+
const r = e.getFullYear(), a = r > 0 ? r : 1 - r;
|
|
633
|
+
return n.ordinalNumber(a, { unit: "year" });
|
|
759
634
|
}
|
|
760
|
-
return
|
|
635
|
+
return P.y(e, t);
|
|
761
636
|
},
|
|
762
637
|
// Local week-numbering year
|
|
763
|
-
Y: function(
|
|
764
|
-
const
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
return addLeadingZeros(twoDigitYear, 2);
|
|
638
|
+
Y: function(e, t, n, r) {
|
|
639
|
+
const a = U(e, r), i = a > 0 ? a : 1 - a;
|
|
640
|
+
if (t === "YY") {
|
|
641
|
+
const o = i % 100;
|
|
642
|
+
return u(o, 2);
|
|
769
643
|
}
|
|
770
|
-
|
|
771
|
-
return localize2.ordinalNumber(weekYear, { unit: "year" });
|
|
772
|
-
}
|
|
773
|
-
return addLeadingZeros(weekYear, token.length);
|
|
644
|
+
return t === "Yo" ? n.ordinalNumber(i, { unit: "year" }) : u(i, t.length);
|
|
774
645
|
},
|
|
775
646
|
// ISO week-numbering year
|
|
776
|
-
R: function(
|
|
777
|
-
const
|
|
778
|
-
return
|
|
647
|
+
R: function(e, t) {
|
|
648
|
+
const n = B(e);
|
|
649
|
+
return u(n, t.length);
|
|
779
650
|
},
|
|
780
651
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
781
652
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -786,696 +657,603 @@ const formatters = {
|
|
|
786
657
|
// | BC 2 | 2 | -1 |
|
|
787
658
|
// Also `yy` always returns the last two digits of a year,
|
|
788
659
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
789
|
-
u: function(
|
|
790
|
-
const
|
|
791
|
-
return
|
|
660
|
+
u: function(e, t) {
|
|
661
|
+
const n = e.getFullYear();
|
|
662
|
+
return u(n, t.length);
|
|
792
663
|
},
|
|
793
664
|
// Quarter
|
|
794
|
-
Q: function(
|
|
795
|
-
const
|
|
796
|
-
switch (
|
|
665
|
+
Q: function(e, t, n) {
|
|
666
|
+
const r = Math.ceil((e.getMonth() + 1) / 3);
|
|
667
|
+
switch (t) {
|
|
797
668
|
case "Q":
|
|
798
|
-
return String(
|
|
669
|
+
return String(r);
|
|
799
670
|
case "QQ":
|
|
800
|
-
return
|
|
671
|
+
return u(r, 2);
|
|
801
672
|
case "Qo":
|
|
802
|
-
return
|
|
673
|
+
return n.ordinalNumber(r, { unit: "quarter" });
|
|
803
674
|
case "QQQ":
|
|
804
|
-
return
|
|
675
|
+
return n.quarter(r, {
|
|
805
676
|
width: "abbreviated",
|
|
806
677
|
context: "formatting"
|
|
807
678
|
});
|
|
808
679
|
case "QQQQQ":
|
|
809
|
-
return
|
|
680
|
+
return n.quarter(r, {
|
|
810
681
|
width: "narrow",
|
|
811
682
|
context: "formatting"
|
|
812
683
|
});
|
|
813
684
|
case "QQQQ":
|
|
814
685
|
default:
|
|
815
|
-
return
|
|
686
|
+
return n.quarter(r, {
|
|
816
687
|
width: "wide",
|
|
817
688
|
context: "formatting"
|
|
818
689
|
});
|
|
819
690
|
}
|
|
820
691
|
},
|
|
821
692
|
// Stand-alone quarter
|
|
822
|
-
q: function(
|
|
823
|
-
const
|
|
824
|
-
switch (
|
|
693
|
+
q: function(e, t, n) {
|
|
694
|
+
const r = Math.ceil((e.getMonth() + 1) / 3);
|
|
695
|
+
switch (t) {
|
|
825
696
|
case "q":
|
|
826
|
-
return String(
|
|
697
|
+
return String(r);
|
|
827
698
|
case "qq":
|
|
828
|
-
return
|
|
699
|
+
return u(r, 2);
|
|
829
700
|
case "qo":
|
|
830
|
-
return
|
|
701
|
+
return n.ordinalNumber(r, { unit: "quarter" });
|
|
831
702
|
case "qqq":
|
|
832
|
-
return
|
|
703
|
+
return n.quarter(r, {
|
|
833
704
|
width: "abbreviated",
|
|
834
705
|
context: "standalone"
|
|
835
706
|
});
|
|
836
707
|
case "qqqqq":
|
|
837
|
-
return
|
|
708
|
+
return n.quarter(r, {
|
|
838
709
|
width: "narrow",
|
|
839
710
|
context: "standalone"
|
|
840
711
|
});
|
|
841
712
|
case "qqqq":
|
|
842
713
|
default:
|
|
843
|
-
return
|
|
714
|
+
return n.quarter(r, {
|
|
844
715
|
width: "wide",
|
|
845
716
|
context: "standalone"
|
|
846
717
|
});
|
|
847
718
|
}
|
|
848
719
|
},
|
|
849
720
|
// Month
|
|
850
|
-
M: function(
|
|
851
|
-
const
|
|
852
|
-
switch (
|
|
721
|
+
M: function(e, t, n) {
|
|
722
|
+
const r = e.getMonth();
|
|
723
|
+
switch (t) {
|
|
853
724
|
case "M":
|
|
854
725
|
case "MM":
|
|
855
|
-
return
|
|
726
|
+
return P.M(e, t);
|
|
856
727
|
case "Mo":
|
|
857
|
-
return
|
|
728
|
+
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
858
729
|
case "MMM":
|
|
859
|
-
return
|
|
730
|
+
return n.month(r, {
|
|
860
731
|
width: "abbreviated",
|
|
861
732
|
context: "formatting"
|
|
862
733
|
});
|
|
863
734
|
case "MMMMM":
|
|
864
|
-
return
|
|
735
|
+
return n.month(r, {
|
|
865
736
|
width: "narrow",
|
|
866
737
|
context: "formatting"
|
|
867
738
|
});
|
|
868
739
|
case "MMMM":
|
|
869
740
|
default:
|
|
870
|
-
return
|
|
741
|
+
return n.month(r, { width: "wide", context: "formatting" });
|
|
871
742
|
}
|
|
872
743
|
},
|
|
873
744
|
// Stand-alone month
|
|
874
|
-
L: function(
|
|
875
|
-
const
|
|
876
|
-
switch (
|
|
745
|
+
L: function(e, t, n) {
|
|
746
|
+
const r = e.getMonth();
|
|
747
|
+
switch (t) {
|
|
877
748
|
case "L":
|
|
878
|
-
return String(
|
|
749
|
+
return String(r + 1);
|
|
879
750
|
case "LL":
|
|
880
|
-
return
|
|
751
|
+
return u(r + 1, 2);
|
|
881
752
|
case "Lo":
|
|
882
|
-
return
|
|
753
|
+
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
883
754
|
case "LLL":
|
|
884
|
-
return
|
|
755
|
+
return n.month(r, {
|
|
885
756
|
width: "abbreviated",
|
|
886
757
|
context: "standalone"
|
|
887
758
|
});
|
|
888
759
|
case "LLLLL":
|
|
889
|
-
return
|
|
760
|
+
return n.month(r, {
|
|
890
761
|
width: "narrow",
|
|
891
762
|
context: "standalone"
|
|
892
763
|
});
|
|
893
764
|
case "LLLL":
|
|
894
765
|
default:
|
|
895
|
-
return
|
|
766
|
+
return n.month(r, { width: "wide", context: "standalone" });
|
|
896
767
|
}
|
|
897
768
|
},
|
|
898
769
|
// Local week of year
|
|
899
|
-
w: function(
|
|
900
|
-
const
|
|
901
|
-
|
|
902
|
-
return localize2.ordinalNumber(week, { unit: "week" });
|
|
903
|
-
}
|
|
904
|
-
return addLeadingZeros(week, token.length);
|
|
770
|
+
w: function(e, t, n, r) {
|
|
771
|
+
const a = Ve(e, r);
|
|
772
|
+
return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : u(a, t.length);
|
|
905
773
|
},
|
|
906
774
|
// ISO week of year
|
|
907
|
-
I: function(
|
|
908
|
-
const
|
|
909
|
-
|
|
910
|
-
return localize2.ordinalNumber(isoWeek, { unit: "week" });
|
|
911
|
-
}
|
|
912
|
-
return addLeadingZeros(isoWeek, token.length);
|
|
775
|
+
I: function(e, t, n) {
|
|
776
|
+
const r = Le(e);
|
|
777
|
+
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : u(r, t.length);
|
|
913
778
|
},
|
|
914
779
|
// Day of the month
|
|
915
|
-
d: function(
|
|
916
|
-
|
|
917
|
-
return localize2.ordinalNumber(date.getDate(), { unit: "date" });
|
|
918
|
-
}
|
|
919
|
-
return lightFormatters.d(date, token);
|
|
780
|
+
d: function(e, t, n) {
|
|
781
|
+
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : P.d(e, t);
|
|
920
782
|
},
|
|
921
783
|
// Day of year
|
|
922
|
-
D: function(
|
|
923
|
-
const
|
|
924
|
-
|
|
925
|
-
return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
|
|
926
|
-
}
|
|
927
|
-
return addLeadingZeros(dayOfYear, token.length);
|
|
784
|
+
D: function(e, t, n) {
|
|
785
|
+
const r = _e(e);
|
|
786
|
+
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : u(r, t.length);
|
|
928
787
|
},
|
|
929
788
|
// Day of week
|
|
930
|
-
E: function(
|
|
931
|
-
const
|
|
932
|
-
switch (
|
|
789
|
+
E: function(e, t, n) {
|
|
790
|
+
const r = e.getDay();
|
|
791
|
+
switch (t) {
|
|
933
792
|
case "E":
|
|
934
793
|
case "EE":
|
|
935
794
|
case "EEE":
|
|
936
|
-
return
|
|
795
|
+
return n.day(r, {
|
|
937
796
|
width: "abbreviated",
|
|
938
797
|
context: "formatting"
|
|
939
798
|
});
|
|
940
799
|
case "EEEEE":
|
|
941
|
-
return
|
|
800
|
+
return n.day(r, {
|
|
942
801
|
width: "narrow",
|
|
943
802
|
context: "formatting"
|
|
944
803
|
});
|
|
945
804
|
case "EEEEEE":
|
|
946
|
-
return
|
|
805
|
+
return n.day(r, {
|
|
947
806
|
width: "short",
|
|
948
807
|
context: "formatting"
|
|
949
808
|
});
|
|
950
809
|
case "EEEE":
|
|
951
810
|
default:
|
|
952
|
-
return
|
|
811
|
+
return n.day(r, {
|
|
953
812
|
width: "wide",
|
|
954
813
|
context: "formatting"
|
|
955
814
|
});
|
|
956
815
|
}
|
|
957
816
|
},
|
|
958
817
|
// Local day of week
|
|
959
|
-
e: function(
|
|
960
|
-
const
|
|
961
|
-
|
|
962
|
-
switch (token) {
|
|
818
|
+
e: function(e, t, n, r) {
|
|
819
|
+
const a = e.getDay(), i = (a - r.weekStartsOn + 8) % 7 || 7;
|
|
820
|
+
switch (t) {
|
|
963
821
|
case "e":
|
|
964
|
-
return String(
|
|
822
|
+
return String(i);
|
|
965
823
|
case "ee":
|
|
966
|
-
return
|
|
824
|
+
return u(i, 2);
|
|
967
825
|
case "eo":
|
|
968
|
-
return
|
|
826
|
+
return n.ordinalNumber(i, { unit: "day" });
|
|
969
827
|
case "eee":
|
|
970
|
-
return
|
|
828
|
+
return n.day(a, {
|
|
971
829
|
width: "abbreviated",
|
|
972
830
|
context: "formatting"
|
|
973
831
|
});
|
|
974
832
|
case "eeeee":
|
|
975
|
-
return
|
|
833
|
+
return n.day(a, {
|
|
976
834
|
width: "narrow",
|
|
977
835
|
context: "formatting"
|
|
978
836
|
});
|
|
979
837
|
case "eeeeee":
|
|
980
|
-
return
|
|
838
|
+
return n.day(a, {
|
|
981
839
|
width: "short",
|
|
982
840
|
context: "formatting"
|
|
983
841
|
});
|
|
984
842
|
case "eeee":
|
|
985
843
|
default:
|
|
986
|
-
return
|
|
844
|
+
return n.day(a, {
|
|
987
845
|
width: "wide",
|
|
988
846
|
context: "formatting"
|
|
989
847
|
});
|
|
990
848
|
}
|
|
991
849
|
},
|
|
992
850
|
// Stand-alone local day of week
|
|
993
|
-
c: function(
|
|
994
|
-
const
|
|
995
|
-
|
|
996
|
-
switch (token) {
|
|
851
|
+
c: function(e, t, n, r) {
|
|
852
|
+
const a = e.getDay(), i = (a - r.weekStartsOn + 8) % 7 || 7;
|
|
853
|
+
switch (t) {
|
|
997
854
|
case "c":
|
|
998
|
-
return String(
|
|
855
|
+
return String(i);
|
|
999
856
|
case "cc":
|
|
1000
|
-
return
|
|
857
|
+
return u(i, t.length);
|
|
1001
858
|
case "co":
|
|
1002
|
-
return
|
|
859
|
+
return n.ordinalNumber(i, { unit: "day" });
|
|
1003
860
|
case "ccc":
|
|
1004
|
-
return
|
|
861
|
+
return n.day(a, {
|
|
1005
862
|
width: "abbreviated",
|
|
1006
863
|
context: "standalone"
|
|
1007
864
|
});
|
|
1008
865
|
case "ccccc":
|
|
1009
|
-
return
|
|
866
|
+
return n.day(a, {
|
|
1010
867
|
width: "narrow",
|
|
1011
868
|
context: "standalone"
|
|
1012
869
|
});
|
|
1013
870
|
case "cccccc":
|
|
1014
|
-
return
|
|
871
|
+
return n.day(a, {
|
|
1015
872
|
width: "short",
|
|
1016
873
|
context: "standalone"
|
|
1017
874
|
});
|
|
1018
875
|
case "cccc":
|
|
1019
876
|
default:
|
|
1020
|
-
return
|
|
877
|
+
return n.day(a, {
|
|
1021
878
|
width: "wide",
|
|
1022
879
|
context: "standalone"
|
|
1023
880
|
});
|
|
1024
881
|
}
|
|
1025
882
|
},
|
|
1026
883
|
// ISO day of week
|
|
1027
|
-
i: function(
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1030
|
-
switch (token) {
|
|
884
|
+
i: function(e, t, n) {
|
|
885
|
+
const r = e.getDay(), a = r === 0 ? 7 : r;
|
|
886
|
+
switch (t) {
|
|
1031
887
|
case "i":
|
|
1032
|
-
return String(
|
|
888
|
+
return String(a);
|
|
1033
889
|
case "ii":
|
|
1034
|
-
return
|
|
890
|
+
return u(a, t.length);
|
|
1035
891
|
case "io":
|
|
1036
|
-
return
|
|
892
|
+
return n.ordinalNumber(a, { unit: "day" });
|
|
1037
893
|
case "iii":
|
|
1038
|
-
return
|
|
894
|
+
return n.day(r, {
|
|
1039
895
|
width: "abbreviated",
|
|
1040
896
|
context: "formatting"
|
|
1041
897
|
});
|
|
1042
898
|
case "iiiii":
|
|
1043
|
-
return
|
|
899
|
+
return n.day(r, {
|
|
1044
900
|
width: "narrow",
|
|
1045
901
|
context: "formatting"
|
|
1046
902
|
});
|
|
1047
903
|
case "iiiiii":
|
|
1048
|
-
return
|
|
904
|
+
return n.day(r, {
|
|
1049
905
|
width: "short",
|
|
1050
906
|
context: "formatting"
|
|
1051
907
|
});
|
|
1052
908
|
case "iiii":
|
|
1053
909
|
default:
|
|
1054
|
-
return
|
|
910
|
+
return n.day(r, {
|
|
1055
911
|
width: "wide",
|
|
1056
912
|
context: "formatting"
|
|
1057
913
|
});
|
|
1058
914
|
}
|
|
1059
915
|
},
|
|
1060
916
|
// AM or PM
|
|
1061
|
-
a: function(
|
|
1062
|
-
const
|
|
1063
|
-
|
|
1064
|
-
switch (token) {
|
|
917
|
+
a: function(e, t, n) {
|
|
918
|
+
const a = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
919
|
+
switch (t) {
|
|
1065
920
|
case "a":
|
|
1066
921
|
case "aa":
|
|
1067
|
-
return
|
|
922
|
+
return n.dayPeriod(a, {
|
|
1068
923
|
width: "abbreviated",
|
|
1069
924
|
context: "formatting"
|
|
1070
925
|
});
|
|
1071
926
|
case "aaa":
|
|
1072
|
-
return
|
|
927
|
+
return n.dayPeriod(a, {
|
|
1073
928
|
width: "abbreviated",
|
|
1074
929
|
context: "formatting"
|
|
1075
930
|
}).toLowerCase();
|
|
1076
931
|
case "aaaaa":
|
|
1077
|
-
return
|
|
932
|
+
return n.dayPeriod(a, {
|
|
1078
933
|
width: "narrow",
|
|
1079
934
|
context: "formatting"
|
|
1080
935
|
});
|
|
1081
936
|
case "aaaa":
|
|
1082
937
|
default:
|
|
1083
|
-
return
|
|
938
|
+
return n.dayPeriod(a, {
|
|
1084
939
|
width: "wide",
|
|
1085
940
|
context: "formatting"
|
|
1086
941
|
});
|
|
1087
942
|
}
|
|
1088
943
|
},
|
|
1089
944
|
// AM, PM, midnight, noon
|
|
1090
|
-
b: function(
|
|
1091
|
-
const
|
|
1092
|
-
let
|
|
1093
|
-
|
|
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) {
|
|
945
|
+
b: function(e, t, n) {
|
|
946
|
+
const r = e.getHours();
|
|
947
|
+
let a;
|
|
948
|
+
switch (r === 12 ? a = k.noon : r === 0 ? a = k.midnight : a = r / 12 >= 1 ? "pm" : "am", t) {
|
|
1101
949
|
case "b":
|
|
1102
950
|
case "bb":
|
|
1103
|
-
return
|
|
951
|
+
return n.dayPeriod(a, {
|
|
1104
952
|
width: "abbreviated",
|
|
1105
953
|
context: "formatting"
|
|
1106
954
|
});
|
|
1107
955
|
case "bbb":
|
|
1108
|
-
return
|
|
956
|
+
return n.dayPeriod(a, {
|
|
1109
957
|
width: "abbreviated",
|
|
1110
958
|
context: "formatting"
|
|
1111
959
|
}).toLowerCase();
|
|
1112
960
|
case "bbbbb":
|
|
1113
|
-
return
|
|
961
|
+
return n.dayPeriod(a, {
|
|
1114
962
|
width: "narrow",
|
|
1115
963
|
context: "formatting"
|
|
1116
964
|
});
|
|
1117
965
|
case "bbbb":
|
|
1118
966
|
default:
|
|
1119
|
-
return
|
|
967
|
+
return n.dayPeriod(a, {
|
|
1120
968
|
width: "wide",
|
|
1121
969
|
context: "formatting"
|
|
1122
970
|
});
|
|
1123
971
|
}
|
|
1124
972
|
},
|
|
1125
973
|
// in the morning, in the afternoon, in the evening, at night
|
|
1126
|
-
B: function(
|
|
1127
|
-
const
|
|
1128
|
-
let
|
|
1129
|
-
|
|
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) {
|
|
974
|
+
B: function(e, t, n) {
|
|
975
|
+
const r = e.getHours();
|
|
976
|
+
let a;
|
|
977
|
+
switch (r >= 17 ? a = k.evening : r >= 12 ? a = k.afternoon : r >= 4 ? a = k.morning : a = k.night, t) {
|
|
1139
978
|
case "B":
|
|
1140
979
|
case "BB":
|
|
1141
980
|
case "BBB":
|
|
1142
|
-
return
|
|
981
|
+
return n.dayPeriod(a, {
|
|
1143
982
|
width: "abbreviated",
|
|
1144
983
|
context: "formatting"
|
|
1145
984
|
});
|
|
1146
985
|
case "BBBBB":
|
|
1147
|
-
return
|
|
986
|
+
return n.dayPeriod(a, {
|
|
1148
987
|
width: "narrow",
|
|
1149
988
|
context: "formatting"
|
|
1150
989
|
});
|
|
1151
990
|
case "BBBB":
|
|
1152
991
|
default:
|
|
1153
|
-
return
|
|
992
|
+
return n.dayPeriod(a, {
|
|
1154
993
|
width: "wide",
|
|
1155
994
|
context: "formatting"
|
|
1156
995
|
});
|
|
1157
996
|
}
|
|
1158
997
|
},
|
|
1159
998
|
// Hour [1-12]
|
|
1160
|
-
h: function(
|
|
1161
|
-
if (
|
|
1162
|
-
let
|
|
1163
|
-
|
|
1164
|
-
return localize2.ordinalNumber(hours, { unit: "hour" });
|
|
999
|
+
h: function(e, t, n) {
|
|
1000
|
+
if (t === "ho") {
|
|
1001
|
+
let r = e.getHours() % 12;
|
|
1002
|
+
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
1165
1003
|
}
|
|
1166
|
-
return
|
|
1004
|
+
return P.h(e, t);
|
|
1167
1005
|
},
|
|
1168
1006
|
// Hour [0-23]
|
|
1169
|
-
H: function(
|
|
1170
|
-
|
|
1171
|
-
return localize2.ordinalNumber(date.getHours(), { unit: "hour" });
|
|
1172
|
-
}
|
|
1173
|
-
return lightFormatters.H(date, token);
|
|
1007
|
+
H: function(e, t, n) {
|
|
1008
|
+
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : P.H(e, t);
|
|
1174
1009
|
},
|
|
1175
1010
|
// Hour [0-11]
|
|
1176
|
-
K: function(
|
|
1177
|
-
const
|
|
1178
|
-
|
|
1179
|
-
return localize2.ordinalNumber(hours, { unit: "hour" });
|
|
1180
|
-
}
|
|
1181
|
-
return addLeadingZeros(hours, token.length);
|
|
1011
|
+
K: function(e, t, n) {
|
|
1012
|
+
const r = e.getHours() % 12;
|
|
1013
|
+
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : u(r, t.length);
|
|
1182
1014
|
},
|
|
1183
1015
|
// Hour [1-24]
|
|
1184
|
-
k: function(
|
|
1185
|
-
let
|
|
1186
|
-
|
|
1187
|
-
if (token === "ko") {
|
|
1188
|
-
return localize2.ordinalNumber(hours, { unit: "hour" });
|
|
1189
|
-
}
|
|
1190
|
-
return addLeadingZeros(hours, token.length);
|
|
1016
|
+
k: function(e, t, n) {
|
|
1017
|
+
let r = e.getHours();
|
|
1018
|
+
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : u(r, t.length);
|
|
1191
1019
|
},
|
|
1192
1020
|
// Minute
|
|
1193
|
-
m: function(
|
|
1194
|
-
|
|
1195
|
-
return localize2.ordinalNumber(date.getMinutes(), { unit: "minute" });
|
|
1196
|
-
}
|
|
1197
|
-
return lightFormatters.m(date, token);
|
|
1021
|
+
m: function(e, t, n) {
|
|
1022
|
+
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : P.m(e, t);
|
|
1198
1023
|
},
|
|
1199
1024
|
// Second
|
|
1200
|
-
s: function(
|
|
1201
|
-
|
|
1202
|
-
return localize2.ordinalNumber(date.getSeconds(), { unit: "second" });
|
|
1203
|
-
}
|
|
1204
|
-
return lightFormatters.s(date, token);
|
|
1025
|
+
s: function(e, t, n) {
|
|
1026
|
+
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : P.s(e, t);
|
|
1205
1027
|
},
|
|
1206
1028
|
// Fraction of second
|
|
1207
|
-
S: function(
|
|
1208
|
-
return
|
|
1029
|
+
S: function(e, t) {
|
|
1030
|
+
return P.S(e, t);
|
|
1209
1031
|
},
|
|
1210
1032
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1211
|
-
X: function(
|
|
1212
|
-
const
|
|
1213
|
-
if (
|
|
1033
|
+
X: function(e, t, n) {
|
|
1034
|
+
const r = e.getTimezoneOffset();
|
|
1035
|
+
if (r === 0)
|
|
1214
1036
|
return "Z";
|
|
1215
|
-
|
|
1216
|
-
switch (token) {
|
|
1037
|
+
switch (t) {
|
|
1217
1038
|
case "X":
|
|
1218
|
-
return
|
|
1039
|
+
return V(r);
|
|
1219
1040
|
case "XXXX":
|
|
1220
1041
|
case "XX":
|
|
1221
|
-
return
|
|
1042
|
+
return W(r);
|
|
1222
1043
|
case "XXXXX":
|
|
1223
1044
|
case "XXX":
|
|
1224
1045
|
default:
|
|
1225
|
-
return
|
|
1046
|
+
return W(r, ":");
|
|
1226
1047
|
}
|
|
1227
1048
|
},
|
|
1228
1049
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
1229
|
-
x: function(
|
|
1230
|
-
const
|
|
1231
|
-
switch (
|
|
1050
|
+
x: function(e, t, n) {
|
|
1051
|
+
const r = e.getTimezoneOffset();
|
|
1052
|
+
switch (t) {
|
|
1232
1053
|
case "x":
|
|
1233
|
-
return
|
|
1054
|
+
return V(r);
|
|
1234
1055
|
case "xxxx":
|
|
1235
1056
|
case "xx":
|
|
1236
|
-
return
|
|
1057
|
+
return W(r);
|
|
1237
1058
|
case "xxxxx":
|
|
1238
1059
|
case "xxx":
|
|
1239
1060
|
default:
|
|
1240
|
-
return
|
|
1061
|
+
return W(r, ":");
|
|
1241
1062
|
}
|
|
1242
1063
|
},
|
|
1243
1064
|
// Timezone (GMT)
|
|
1244
|
-
O: function(
|
|
1245
|
-
const
|
|
1246
|
-
switch (
|
|
1065
|
+
O: function(e, t, n) {
|
|
1066
|
+
const r = e.getTimezoneOffset();
|
|
1067
|
+
switch (t) {
|
|
1247
1068
|
case "O":
|
|
1248
1069
|
case "OO":
|
|
1249
1070
|
case "OOO":
|
|
1250
|
-
return "GMT" +
|
|
1071
|
+
return "GMT" + Q(r, ":");
|
|
1251
1072
|
case "OOOO":
|
|
1252
1073
|
default:
|
|
1253
|
-
return "GMT" +
|
|
1074
|
+
return "GMT" + W(r, ":");
|
|
1254
1075
|
}
|
|
1255
1076
|
},
|
|
1256
1077
|
// Timezone (specific non-location)
|
|
1257
|
-
z: function(
|
|
1258
|
-
const
|
|
1259
|
-
switch (
|
|
1078
|
+
z: function(e, t, n) {
|
|
1079
|
+
const r = e.getTimezoneOffset();
|
|
1080
|
+
switch (t) {
|
|
1260
1081
|
case "z":
|
|
1261
1082
|
case "zz":
|
|
1262
1083
|
case "zzz":
|
|
1263
|
-
return "GMT" +
|
|
1084
|
+
return "GMT" + Q(r, ":");
|
|
1264
1085
|
case "zzzz":
|
|
1265
1086
|
default:
|
|
1266
|
-
return "GMT" +
|
|
1087
|
+
return "GMT" + W(r, ":");
|
|
1267
1088
|
}
|
|
1268
1089
|
},
|
|
1269
1090
|
// Seconds timestamp
|
|
1270
|
-
t: function(
|
|
1271
|
-
const
|
|
1272
|
-
return
|
|
1091
|
+
t: function(e, t, n) {
|
|
1092
|
+
const r = Math.trunc(+e / 1e3);
|
|
1093
|
+
return u(r, t.length);
|
|
1273
1094
|
},
|
|
1274
1095
|
// Milliseconds timestamp
|
|
1275
|
-
T: function(
|
|
1276
|
-
return
|
|
1096
|
+
T: function(e, t, n) {
|
|
1097
|
+
return u(+e, t.length);
|
|
1277
1098
|
}
|
|
1278
1099
|
};
|
|
1279
|
-
function
|
|
1280
|
-
const
|
|
1281
|
-
|
|
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);
|
|
1100
|
+
function Q(e, t = "") {
|
|
1101
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), i = r % 60;
|
|
1102
|
+
return i === 0 ? n + String(a) : n + String(a) + t + u(i, 2);
|
|
1288
1103
|
}
|
|
1289
|
-
function
|
|
1290
|
-
|
|
1291
|
-
const sign = offset > 0 ? "-" : "+";
|
|
1292
|
-
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
1293
|
-
}
|
|
1294
|
-
return formatTimezone(offset, delimiter);
|
|
1104
|
+
function V(e, t) {
|
|
1105
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + u(Math.abs(e) / 60, 2) : W(e, t);
|
|
1295
1106
|
}
|
|
1296
|
-
function
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1299
|
-
const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
|
|
1300
|
-
const minutes = addLeadingZeros(absOffset % 60, 2);
|
|
1301
|
-
return sign + hours + delimiter + minutes;
|
|
1107
|
+
function W(e, t = "") {
|
|
1108
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = u(Math.trunc(r / 60), 2), i = u(r % 60, 2);
|
|
1109
|
+
return n + a + t + i;
|
|
1302
1110
|
}
|
|
1303
|
-
const
|
|
1304
|
-
switch (
|
|
1111
|
+
const R = (e, t) => {
|
|
1112
|
+
switch (e) {
|
|
1305
1113
|
case "P":
|
|
1306
|
-
return
|
|
1114
|
+
return t.date({ width: "short" });
|
|
1307
1115
|
case "PP":
|
|
1308
|
-
return
|
|
1116
|
+
return t.date({ width: "medium" });
|
|
1309
1117
|
case "PPP":
|
|
1310
|
-
return
|
|
1118
|
+
return t.date({ width: "long" });
|
|
1311
1119
|
case "PPPP":
|
|
1312
1120
|
default:
|
|
1313
|
-
return
|
|
1121
|
+
return t.date({ width: "full" });
|
|
1314
1122
|
}
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
switch (pattern) {
|
|
1123
|
+
}, K = (e, t) => {
|
|
1124
|
+
switch (e) {
|
|
1318
1125
|
case "p":
|
|
1319
|
-
return
|
|
1126
|
+
return t.time({ width: "short" });
|
|
1320
1127
|
case "pp":
|
|
1321
|
-
return
|
|
1128
|
+
return t.time({ width: "medium" });
|
|
1322
1129
|
case "ppp":
|
|
1323
|
-
return
|
|
1130
|
+
return t.time({ width: "long" });
|
|
1324
1131
|
case "pppp":
|
|
1325
1132
|
default:
|
|
1326
|
-
return
|
|
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);
|
|
1133
|
+
return t.time({ width: "full" });
|
|
1335
1134
|
}
|
|
1336
|
-
|
|
1337
|
-
|
|
1135
|
+
}, Re = (e, t) => {
|
|
1136
|
+
const n = e.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
|
|
1137
|
+
if (!a)
|
|
1138
|
+
return R(e, t);
|
|
1139
|
+
let i;
|
|
1140
|
+
switch (r) {
|
|
1338
1141
|
case "P":
|
|
1339
|
-
|
|
1142
|
+
i = t.dateTime({ width: "short" });
|
|
1340
1143
|
break;
|
|
1341
1144
|
case "PP":
|
|
1342
|
-
|
|
1145
|
+
i = t.dateTime({ width: "medium" });
|
|
1343
1146
|
break;
|
|
1344
1147
|
case "PPP":
|
|
1345
|
-
|
|
1148
|
+
i = t.dateTime({ width: "long" });
|
|
1346
1149
|
break;
|
|
1347
1150
|
case "PPPP":
|
|
1348
1151
|
default:
|
|
1349
|
-
|
|
1152
|
+
i = t.dateTime({ width: "full" });
|
|
1350
1153
|
break;
|
|
1351
1154
|
}
|
|
1352
|
-
return
|
|
1353
|
-
}
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
const weekYearTokenRE = /^Y+$/;
|
|
1360
|
-
const throwTokens = ["D", "DD", "YY", "YYYY"];
|
|
1361
|
-
function isProtectedDayOfYearToken(token) {
|
|
1362
|
-
return dayOfYearTokenRE.test(token);
|
|
1155
|
+
return i.replace("{{date}}", R(r, t)).replace("{{time}}", K(a, t));
|
|
1156
|
+
}, je = {
|
|
1157
|
+
p: K,
|
|
1158
|
+
P: Re
|
|
1159
|
+
}, Ae = /^D+$/, Ge = /^Y+$/, Be = ["D", "DD", "YY", "YYYY"];
|
|
1160
|
+
function ze(e) {
|
|
1161
|
+
return Ae.test(e);
|
|
1363
1162
|
}
|
|
1364
|
-
function
|
|
1365
|
-
return
|
|
1163
|
+
function Ie(e) {
|
|
1164
|
+
return Ge.test(e);
|
|
1366
1165
|
}
|
|
1367
|
-
function
|
|
1368
|
-
const
|
|
1369
|
-
console.warn(
|
|
1370
|
-
if (throwTokens.includes(token)) throw new RangeError(_message);
|
|
1166
|
+
function Je(e, t, n) {
|
|
1167
|
+
const r = Ue(e, t, n);
|
|
1168
|
+
if (console.warn(r), Be.includes(e)) throw new RangeError(r);
|
|
1371
1169
|
}
|
|
1372
|
-
function
|
|
1373
|
-
const
|
|
1374
|
-
return `Use \`${
|
|
1170
|
+
function Ue(e, t, n) {
|
|
1171
|
+
const r = e[0] === "Y" ? "years" : "days of the month";
|
|
1172
|
+
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1375
1173
|
}
|
|
1376
|
-
const
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
const
|
|
1380
|
-
|
|
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)) {
|
|
1174
|
+
const Ke = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Ze = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, pe = /^'([^]*?)'?$/, et = /''/g, tt = /[a-zA-Z]/;
|
|
1175
|
+
function M(e, t, n) {
|
|
1176
|
+
var f, b, O, x, N, $, q, H;
|
|
1177
|
+
const r = T(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? J, i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((b = (f = n == null ? void 0 : n.locale) == null ? void 0 : f.options) == null ? void 0 : b.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((x = (O = r.locale) == null ? void 0 : O.options) == null ? void 0 : x.firstWeekContainsDate) ?? 1, o = (n == null ? void 0 : n.weekStartsOn) ?? (($ = (N = n == null ? void 0 : n.locale) == null ? void 0 : N.options) == null ? void 0 : $.weekStartsOn) ?? r.weekStartsOn ?? ((H = (q = r.locale) == null ? void 0 : q.options) == null ? void 0 : H.weekStartsOn) ?? 0, s = g(e, n == null ? void 0 : n.in);
|
|
1178
|
+
if (!ie(s))
|
|
1389
1179
|
throw new RangeError("Invalid time value");
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
return longFormatter(substring, locale.formatLong);
|
|
1180
|
+
let c = t.match(Ze).map((m) => {
|
|
1181
|
+
const h = m[0];
|
|
1182
|
+
if (h === "p" || h === "P") {
|
|
1183
|
+
const F = je[h];
|
|
1184
|
+
return F(m, a.formatLong);
|
|
1396
1185
|
}
|
|
1397
|
-
return
|
|
1398
|
-
}).join("").match(
|
|
1399
|
-
if (
|
|
1400
|
-
return { isToken:
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
if (
|
|
1407
|
-
return { isToken: true, value: substring };
|
|
1408
|
-
}
|
|
1409
|
-
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
1186
|
+
return m;
|
|
1187
|
+
}).join("").match(Ke).map((m) => {
|
|
1188
|
+
if (m === "''")
|
|
1189
|
+
return { isToken: !1, value: "'" };
|
|
1190
|
+
const h = m[0];
|
|
1191
|
+
if (h === "'")
|
|
1192
|
+
return { isToken: !1, value: nt(m) };
|
|
1193
|
+
if (L[h])
|
|
1194
|
+
return { isToken: !0, value: m };
|
|
1195
|
+
if (h.match(tt))
|
|
1410
1196
|
throw new RangeError(
|
|
1411
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
1197
|
+
"Format string contains an unescaped latin alphabet character `" + h + "`"
|
|
1412
1198
|
);
|
|
1413
|
-
}
|
|
1414
|
-
return { isToken: false, value: substring };
|
|
1199
|
+
return { isToken: !1, value: m };
|
|
1415
1200
|
});
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
weekStartsOn,
|
|
1422
|
-
locale
|
|
1201
|
+
a.localize.preprocessor && (c = a.localize.preprocessor(s, c));
|
|
1202
|
+
const d = {
|
|
1203
|
+
firstWeekContainsDate: i,
|
|
1204
|
+
weekStartsOn: o,
|
|
1205
|
+
locale: a
|
|
1423
1206
|
};
|
|
1424
|
-
return
|
|
1425
|
-
if (!
|
|
1426
|
-
const
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
const formatter = formatters[token[0]];
|
|
1431
|
-
return formatter(originalDate, token, locale.localize, formatterOptions);
|
|
1207
|
+
return c.map((m) => {
|
|
1208
|
+
if (!m.isToken) return m.value;
|
|
1209
|
+
const h = m.value;
|
|
1210
|
+
(!(n != null && n.useAdditionalWeekYearTokens) && Ie(h) || !(n != null && n.useAdditionalDayOfYearTokens) && ze(h)) && Je(h, t, String(e));
|
|
1211
|
+
const F = L[h[0]];
|
|
1212
|
+
return F(s, h, a.localize, d);
|
|
1432
1213
|
}).join("");
|
|
1433
1214
|
}
|
|
1434
|
-
function
|
|
1435
|
-
const
|
|
1436
|
-
|
|
1437
|
-
return input;
|
|
1438
|
-
}
|
|
1439
|
-
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
1215
|
+
function nt(e) {
|
|
1216
|
+
const t = e.match(pe);
|
|
1217
|
+
return t ? t[1].replace(et, "'") : e;
|
|
1440
1218
|
}
|
|
1441
|
-
function
|
|
1442
|
-
const [
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1219
|
+
function Z(e, t, n) {
|
|
1220
|
+
const [r, a] = E(
|
|
1221
|
+
n == null ? void 0 : n.in,
|
|
1222
|
+
e,
|
|
1223
|
+
t
|
|
1446
1224
|
);
|
|
1447
|
-
return +
|
|
1225
|
+
return +v(r, n) == +v(a, n);
|
|
1448
1226
|
}
|
|
1449
|
-
function
|
|
1450
|
-
const [
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1227
|
+
function rt(e, t, n) {
|
|
1228
|
+
const [r, a] = E(
|
|
1229
|
+
n == null ? void 0 : n.in,
|
|
1230
|
+
e,
|
|
1231
|
+
t
|
|
1454
1232
|
);
|
|
1455
|
-
return
|
|
1233
|
+
return r.getFullYear() === a.getFullYear();
|
|
1456
1234
|
}
|
|
1457
|
-
function
|
|
1458
|
-
return
|
|
1459
|
-
|
|
1460
|
-
|
|
1235
|
+
function at(e, t) {
|
|
1236
|
+
return rt(
|
|
1237
|
+
l(e, e),
|
|
1238
|
+
C(e)
|
|
1461
1239
|
);
|
|
1462
1240
|
}
|
|
1463
|
-
function
|
|
1464
|
-
return
|
|
1465
|
-
|
|
1466
|
-
|
|
1241
|
+
function it(e, t) {
|
|
1242
|
+
return z(
|
|
1243
|
+
l(e, e),
|
|
1244
|
+
C(e)
|
|
1467
1245
|
);
|
|
1468
1246
|
}
|
|
1469
|
-
function
|
|
1470
|
-
return
|
|
1247
|
+
function ot(e, t, n) {
|
|
1248
|
+
return ee(e, -1, n);
|
|
1471
1249
|
}
|
|
1472
|
-
function
|
|
1473
|
-
return
|
|
1474
|
-
|
|
1475
|
-
|
|
1250
|
+
function ut(e, t) {
|
|
1251
|
+
return z(
|
|
1252
|
+
l(e, e),
|
|
1253
|
+
ot(C(e))
|
|
1476
1254
|
);
|
|
1477
1255
|
}
|
|
1478
|
-
const
|
|
1256
|
+
const st = {
|
|
1479
1257
|
lessThanXSeconds: {
|
|
1480
1258
|
one: "不到 1 秒",
|
|
1481
1259
|
other: "不到 {{count}} 秒"
|
|
@@ -1537,95 +1315,64 @@ const formatDistanceLocale = {
|
|
|
1537
1315
|
one: "将近 1 年",
|
|
1538
1316
|
other: "将近 {{count}} 年"
|
|
1539
1317
|
}
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
result = tokenValue;
|
|
1546
|
-
} else if (count === 1) {
|
|
1547
|
-
result = tokenValue.one;
|
|
1548
|
-
} else {
|
|
1549
|
-
result = tokenValue.other.replace("{{count}}", String(count));
|
|
1550
|
-
}
|
|
1551
|
-
if (options == null ? void 0 : options.addSuffix) {
|
|
1552
|
-
if (options.comparison && options.comparison > 0) {
|
|
1553
|
-
return result + "内";
|
|
1554
|
-
} else {
|
|
1555
|
-
return result + "前";
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
return result;
|
|
1559
|
-
};
|
|
1560
|
-
const dateFormats = {
|
|
1318
|
+
}, ct = (e, t, n) => {
|
|
1319
|
+
let r;
|
|
1320
|
+
const a = st[e];
|
|
1321
|
+
return typeof a == "string" ? r = a : t === 1 ? r = a.one : r = a.other.replace("{{count}}", String(t)), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? r + "内" : r + "前" : r;
|
|
1322
|
+
}, dt = {
|
|
1561
1323
|
full: "y'年'M'月'd'日' EEEE",
|
|
1562
1324
|
long: "y'年'M'月'd'日'",
|
|
1563
1325
|
medium: "yyyy-MM-dd",
|
|
1564
1326
|
short: "yy-MM-dd"
|
|
1565
|
-
}
|
|
1566
|
-
const timeFormats = {
|
|
1327
|
+
}, ht = {
|
|
1567
1328
|
full: "zzzz a h:mm:ss",
|
|
1568
1329
|
long: "z a h:mm:ss",
|
|
1569
1330
|
medium: "a h:mm:ss",
|
|
1570
1331
|
short: "a h:mm"
|
|
1571
|
-
}
|
|
1572
|
-
const dateTimeFormats = {
|
|
1332
|
+
}, ft = {
|
|
1573
1333
|
full: "{{date}} {{time}}",
|
|
1574
1334
|
long: "{{date}} {{time}}",
|
|
1575
1335
|
medium: "{{date}} {{time}}",
|
|
1576
1336
|
short: "{{date}} {{time}}"
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
formats: dateFormats,
|
|
1337
|
+
}, mt = {
|
|
1338
|
+
date: D({
|
|
1339
|
+
formats: dt,
|
|
1581
1340
|
defaultWidth: "full"
|
|
1582
1341
|
}),
|
|
1583
|
-
time:
|
|
1584
|
-
formats:
|
|
1342
|
+
time: D({
|
|
1343
|
+
formats: ht,
|
|
1585
1344
|
defaultWidth: "full"
|
|
1586
1345
|
}),
|
|
1587
|
-
dateTime:
|
|
1588
|
-
formats:
|
|
1346
|
+
dateTime: D({
|
|
1347
|
+
formats: ft,
|
|
1589
1348
|
defaultWidth: "full"
|
|
1590
1349
|
})
|
|
1591
1350
|
};
|
|
1592
|
-
function
|
|
1593
|
-
const
|
|
1594
|
-
|
|
1595
|
-
return baseFormat;
|
|
1596
|
-
} else if (date.getTime() > baseDate.getTime()) {
|
|
1597
|
-
return "'下个'" + baseFormat;
|
|
1598
|
-
}
|
|
1599
|
-
return "'上个'" + baseFormat;
|
|
1351
|
+
function j(e, t, n) {
|
|
1352
|
+
const r = "eeee p";
|
|
1353
|
+
return Z(e, t, n) ? r : e.getTime() > t.getTime() ? "'下个'" + r : "'上个'" + r;
|
|
1600
1354
|
}
|
|
1601
|
-
const
|
|
1602
|
-
lastWeek:
|
|
1355
|
+
const lt = {
|
|
1356
|
+
lastWeek: j,
|
|
1603
1357
|
// days before yesterday, maybe in this week or last week
|
|
1604
1358
|
yesterday: "'昨天' p",
|
|
1605
1359
|
today: "'今天' p",
|
|
1606
1360
|
tomorrow: "'明天' p",
|
|
1607
|
-
nextWeek:
|
|
1361
|
+
nextWeek: j,
|
|
1608
1362
|
// days after tomorrow, maybe in this week or next week
|
|
1609
1363
|
other: "PP p"
|
|
1610
|
-
}
|
|
1611
|
-
const
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
return format2(date, baseDate, options);
|
|
1615
|
-
}
|
|
1616
|
-
return format2;
|
|
1617
|
-
};
|
|
1618
|
-
const eraValues = {
|
|
1364
|
+
}, gt = (e, t, n, r) => {
|
|
1365
|
+
const a = lt[e];
|
|
1366
|
+
return typeof a == "function" ? a(t, n, r) : a;
|
|
1367
|
+
}, wt = {
|
|
1619
1368
|
narrow: ["前", "公元"],
|
|
1620
1369
|
abbreviated: ["前", "公元"],
|
|
1621
1370
|
wide: ["公元前", "公元"]
|
|
1622
|
-
}
|
|
1623
|
-
const quarterValues = {
|
|
1371
|
+
}, yt = {
|
|
1624
1372
|
narrow: ["1", "2", "3", "4"],
|
|
1625
1373
|
abbreviated: ["第一季", "第二季", "第三季", "第四季"],
|
|
1626
1374
|
wide: ["第一季度", "第二季度", "第三季度", "第四季度"]
|
|
1627
|
-
}
|
|
1628
|
-
const monthValues = {
|
|
1375
|
+
}, bt = {
|
|
1629
1376
|
narrow: [
|
|
1630
1377
|
"一",
|
|
1631
1378
|
"二",
|
|
@@ -1668,14 +1415,12 @@ const monthValues = {
|
|
|
1668
1415
|
"十一月",
|
|
1669
1416
|
"十二月"
|
|
1670
1417
|
]
|
|
1671
|
-
}
|
|
1672
|
-
const dayValues = {
|
|
1418
|
+
}, Pt = {
|
|
1673
1419
|
narrow: ["日", "一", "二", "三", "四", "五", "六"],
|
|
1674
1420
|
short: ["日", "一", "二", "三", "四", "五", "六"],
|
|
1675
1421
|
abbreviated: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
|
1676
1422
|
wide: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
|
|
1677
|
-
}
|
|
1678
|
-
const dayPeriodValues = {
|
|
1423
|
+
}, Mt = {
|
|
1679
1424
|
narrow: {
|
|
1680
1425
|
am: "上",
|
|
1681
1426
|
pm: "下",
|
|
@@ -1706,8 +1451,7 @@ const dayPeriodValues = {
|
|
|
1706
1451
|
evening: "晚上",
|
|
1707
1452
|
night: "夜间"
|
|
1708
1453
|
}
|
|
1709
|
-
}
|
|
1710
|
-
const formattingDayPeriodValues = {
|
|
1454
|
+
}, Wt = {
|
|
1711
1455
|
narrow: {
|
|
1712
1456
|
am: "上",
|
|
1713
1457
|
pm: "下",
|
|
@@ -1738,72 +1482,62 @@ const formattingDayPeriodValues = {
|
|
|
1738
1482
|
evening: "晚上",
|
|
1739
1483
|
night: "夜间"
|
|
1740
1484
|
}
|
|
1741
|
-
}
|
|
1742
|
-
const
|
|
1743
|
-
|
|
1744
|
-
switch (options == null ? void 0 : options.unit) {
|
|
1485
|
+
}, vt = (e, t) => {
|
|
1486
|
+
const n = Number(e);
|
|
1487
|
+
switch (t == null ? void 0 : t.unit) {
|
|
1745
1488
|
case "date":
|
|
1746
|
-
return
|
|
1489
|
+
return n.toString() + "日";
|
|
1747
1490
|
case "hour":
|
|
1748
|
-
return
|
|
1491
|
+
return n.toString() + "时";
|
|
1749
1492
|
case "minute":
|
|
1750
|
-
return
|
|
1493
|
+
return n.toString() + "分";
|
|
1751
1494
|
case "second":
|
|
1752
|
-
return
|
|
1495
|
+
return n.toString() + "秒";
|
|
1753
1496
|
default:
|
|
1754
|
-
return "第 " +
|
|
1497
|
+
return "第 " + n.toString();
|
|
1755
1498
|
}
|
|
1756
|
-
}
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
values: eraValues,
|
|
1499
|
+
}, kt = {
|
|
1500
|
+
ordinalNumber: vt,
|
|
1501
|
+
era: w({
|
|
1502
|
+
values: wt,
|
|
1761
1503
|
defaultWidth: "wide"
|
|
1762
1504
|
}),
|
|
1763
|
-
quarter:
|
|
1764
|
-
values:
|
|
1505
|
+
quarter: w({
|
|
1506
|
+
values: yt,
|
|
1765
1507
|
defaultWidth: "wide",
|
|
1766
|
-
argumentCallback: (
|
|
1508
|
+
argumentCallback: (e) => e - 1
|
|
1767
1509
|
}),
|
|
1768
|
-
month:
|
|
1769
|
-
values:
|
|
1510
|
+
month: w({
|
|
1511
|
+
values: bt,
|
|
1770
1512
|
defaultWidth: "wide"
|
|
1771
1513
|
}),
|
|
1772
|
-
day:
|
|
1773
|
-
values:
|
|
1514
|
+
day: w({
|
|
1515
|
+
values: Pt,
|
|
1774
1516
|
defaultWidth: "wide"
|
|
1775
1517
|
}),
|
|
1776
|
-
dayPeriod:
|
|
1777
|
-
values:
|
|
1518
|
+
dayPeriod: w({
|
|
1519
|
+
values: Mt,
|
|
1778
1520
|
defaultWidth: "wide",
|
|
1779
|
-
formattingValues:
|
|
1521
|
+
formattingValues: Wt,
|
|
1780
1522
|
defaultFormattingWidth: "wide"
|
|
1781
1523
|
})
|
|
1782
|
-
}
|
|
1783
|
-
const matchOrdinalNumberPattern = /^(第\s*)?\d+(日|时|分|秒)?/i;
|
|
1784
|
-
const parseOrdinalNumberPattern = /\d+/i;
|
|
1785
|
-
const matchEraPatterns = {
|
|
1524
|
+
}, Dt = /^(第\s*)?\d+(日|时|分|秒)?/i, Ot = /\d+/i, xt = {
|
|
1786
1525
|
narrow: /^(前)/i,
|
|
1787
1526
|
abbreviated: /^(前)/i,
|
|
1788
1527
|
wide: /^(公元前|公元)/i
|
|
1789
|
-
}
|
|
1790
|
-
const parseEraPatterns = {
|
|
1528
|
+
}, St = {
|
|
1791
1529
|
any: [/^(前)/i, /^(公元)/i]
|
|
1792
|
-
}
|
|
1793
|
-
const matchQuarterPatterns = {
|
|
1530
|
+
}, Yt = {
|
|
1794
1531
|
narrow: /^[1234]/i,
|
|
1795
1532
|
abbreviated: /^第[一二三四]刻/i,
|
|
1796
1533
|
wide: /^第[一二三四]刻钟/i
|
|
1797
|
-
}
|
|
1798
|
-
const parseQuarterPatterns = {
|
|
1534
|
+
}, Tt = {
|
|
1799
1535
|
any: [/(1|一)/i, /(2|二)/i, /(3|三)/i, /(4|四)/i]
|
|
1800
|
-
}
|
|
1801
|
-
const matchMonthPatterns = {
|
|
1536
|
+
}, Et = {
|
|
1802
1537
|
narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
|
|
1803
1538
|
abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
|
|
1804
1539
|
wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i
|
|
1805
|
-
}
|
|
1806
|
-
const parseMonthPatterns = {
|
|
1540
|
+
}, Ft = {
|
|
1807
1541
|
narrow: [
|
|
1808
1542
|
/^一/i,
|
|
1809
1543
|
/^二/i,
|
|
@@ -1832,20 +1566,16 @@ const parseMonthPatterns = {
|
|
|
1832
1566
|
/^十一|11/i,
|
|
1833
1567
|
/^十二|12/i
|
|
1834
1568
|
]
|
|
1835
|
-
}
|
|
1836
|
-
const matchDayPatterns = {
|
|
1569
|
+
}, Ct = {
|
|
1837
1570
|
narrow: /^[一二三四五六日]/i,
|
|
1838
1571
|
short: /^[一二三四五六日]/i,
|
|
1839
1572
|
abbreviated: /^周[一二三四五六日]/i,
|
|
1840
1573
|
wide: /^星期[一二三四五六日]/i
|
|
1841
|
-
}
|
|
1842
|
-
const parseDayPatterns = {
|
|
1574
|
+
}, Nt = {
|
|
1843
1575
|
any: [/日/i, /一/i, /二/i, /三/i, /四/i, /五/i, /六/i]
|
|
1844
|
-
}
|
|
1845
|
-
const matchDayPeriodPatterns = {
|
|
1576
|
+
}, $t = {
|
|
1846
1577
|
any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i
|
|
1847
|
-
}
|
|
1848
|
-
const parseDayPeriodPatterns = {
|
|
1578
|
+
}, qt = {
|
|
1849
1579
|
any: {
|
|
1850
1580
|
am: /^上午?/i,
|
|
1851
1581
|
pm: /^下午?/i,
|
|
@@ -1856,103 +1586,79 @@ const parseDayPeriodPatterns = {
|
|
|
1856
1586
|
evening: /^晚上?/i,
|
|
1857
1587
|
night: /^凌晨/i
|
|
1858
1588
|
}
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
valueCallback: (value) => parseInt(value, 10)
|
|
1589
|
+
}, Ht = {
|
|
1590
|
+
ordinalNumber: I({
|
|
1591
|
+
matchPattern: Dt,
|
|
1592
|
+
parsePattern: Ot,
|
|
1593
|
+
valueCallback: (e) => parseInt(e, 10)
|
|
1865
1594
|
}),
|
|
1866
|
-
era:
|
|
1867
|
-
matchPatterns:
|
|
1595
|
+
era: y({
|
|
1596
|
+
matchPatterns: xt,
|
|
1868
1597
|
defaultMatchWidth: "wide",
|
|
1869
|
-
parsePatterns:
|
|
1598
|
+
parsePatterns: St,
|
|
1870
1599
|
defaultParseWidth: "any"
|
|
1871
1600
|
}),
|
|
1872
|
-
quarter:
|
|
1873
|
-
matchPatterns:
|
|
1601
|
+
quarter: y({
|
|
1602
|
+
matchPatterns: Yt,
|
|
1874
1603
|
defaultMatchWidth: "wide",
|
|
1875
|
-
parsePatterns:
|
|
1604
|
+
parsePatterns: Tt,
|
|
1876
1605
|
defaultParseWidth: "any",
|
|
1877
|
-
valueCallback: (
|
|
1606
|
+
valueCallback: (e) => e + 1
|
|
1878
1607
|
}),
|
|
1879
|
-
month:
|
|
1880
|
-
matchPatterns:
|
|
1608
|
+
month: y({
|
|
1609
|
+
matchPatterns: Et,
|
|
1881
1610
|
defaultMatchWidth: "wide",
|
|
1882
|
-
parsePatterns:
|
|
1611
|
+
parsePatterns: Ft,
|
|
1883
1612
|
defaultParseWidth: "any"
|
|
1884
1613
|
}),
|
|
1885
|
-
day:
|
|
1886
|
-
matchPatterns:
|
|
1614
|
+
day: y({
|
|
1615
|
+
matchPatterns: Ct,
|
|
1887
1616
|
defaultMatchWidth: "wide",
|
|
1888
|
-
parsePatterns:
|
|
1617
|
+
parsePatterns: Nt,
|
|
1889
1618
|
defaultParseWidth: "any"
|
|
1890
1619
|
}),
|
|
1891
|
-
dayPeriod:
|
|
1892
|
-
matchPatterns:
|
|
1620
|
+
dayPeriod: y({
|
|
1621
|
+
matchPatterns: $t,
|
|
1893
1622
|
defaultMatchWidth: "any",
|
|
1894
|
-
parsePatterns:
|
|
1623
|
+
parsePatterns: qt,
|
|
1895
1624
|
defaultParseWidth: "any"
|
|
1896
1625
|
})
|
|
1897
|
-
}
|
|
1898
|
-
const zhCN = {
|
|
1626
|
+
}, Xt = {
|
|
1899
1627
|
code: "zh-CN",
|
|
1900
|
-
formatDistance,
|
|
1901
|
-
formatLong,
|
|
1902
|
-
formatRelative,
|
|
1903
|
-
localize,
|
|
1904
|
-
match,
|
|
1628
|
+
formatDistance: ct,
|
|
1629
|
+
formatLong: mt,
|
|
1630
|
+
formatRelative: gt,
|
|
1631
|
+
localize: kt,
|
|
1632
|
+
match: Ht,
|
|
1905
1633
|
options: {
|
|
1906
1634
|
weekStartsOn: 1,
|
|
1907
1635
|
firstWeekContainsDate: 4
|
|
1908
1636
|
}
|
|
1909
1637
|
};
|
|
1910
|
-
function
|
|
1911
|
-
const { t } =
|
|
1912
|
-
|
|
1913
|
-
"
|
|
1914
|
-
|
|
1915
|
-
};
|
|
1916
|
-
const timeFormat = "HH:mm";
|
|
1917
|
-
const locale = locales[language] || locales["en-US"];
|
|
1918
|
-
const yesterdayText = t("MessageList.yesterday", {
|
|
1638
|
+
function _t({ time: e, language: t = "en-US" }) {
|
|
1639
|
+
const { t: n } = A(), r = {
|
|
1640
|
+
"zh-CN": Xt,
|
|
1641
|
+
"en-US": J
|
|
1642
|
+
}, a = "HH:mm", i = r[t] || r["en-US"], o = n("MessageList.yesterday", {
|
|
1919
1643
|
defaultValue: "Yesterday"
|
|
1920
1644
|
});
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
}
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
})}`;
|
|
1933
|
-
}
|
|
1934
|
-
if (isSameWeek(time, /* @__PURE__ */ new Date(), { weekStartsOn: 1 })) {
|
|
1935
|
-
return `${format(time, "EEEE", { locale })} ${format(time, timeFormat)}`;
|
|
1936
|
-
}
|
|
1937
|
-
if (isThisYear(time)) {
|
|
1938
|
-
if (language.startsWith("zh")) {
|
|
1939
|
-
return format(time, "M月d日 HH:mm", {
|
|
1940
|
-
locale
|
|
1941
|
-
});
|
|
1942
|
-
}
|
|
1943
|
-
return format(time, "MMMM d HH:mm", {
|
|
1944
|
-
locale
|
|
1945
|
-
});
|
|
1946
|
-
}
|
|
1947
|
-
return format(time, "yyyy/MM/dd HH:mm", {
|
|
1948
|
-
locale
|
|
1949
|
-
});
|
|
1645
|
+
return e ? it(e) ? M(e, a, {
|
|
1646
|
+
locale: i
|
|
1647
|
+
}) : ut(e) ? `${o} ${M(e, a, {
|
|
1648
|
+
locale: i
|
|
1649
|
+
})}` : Z(e, /* @__PURE__ */ new Date(), { weekStartsOn: 1 }) ? `${M(e, "EEEE", { locale: i })} ${M(e, a)}` : at(e) ? t.startsWith("zh") ? M(e, "M月d日 HH:mm", {
|
|
1650
|
+
locale: i
|
|
1651
|
+
}) : M(e, "MMMM d HH:mm", {
|
|
1652
|
+
locale: i
|
|
1653
|
+
}) : M(e, "yyyy/MM/dd HH:mm", {
|
|
1654
|
+
locale: i
|
|
1655
|
+
}) : "";
|
|
1950
1656
|
}
|
|
1951
|
-
function
|
|
1952
|
-
const { language } =
|
|
1953
|
-
return
|
|
1657
|
+
function Qt(e) {
|
|
1658
|
+
const { language: t } = A();
|
|
1659
|
+
return _t({ time: e, language: t.value });
|
|
1954
1660
|
}
|
|
1955
1661
|
export {
|
|
1956
|
-
getTimeStamp,
|
|
1957
|
-
getTimeStampAuto
|
|
1662
|
+
_t as getTimeStamp,
|
|
1663
|
+
Qt as getTimeStampAuto
|
|
1958
1664
|
};
|