@urbiport/js 0.0.19-alpha.8 → 1.0.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/createConversation.d.ts +10 -0
- package/dist/api/createConversation.d.ts.map +1 -0
- package/dist/api/createConversationPreview.d.ts +11 -0
- package/dist/api/createConversationPreview.d.ts.map +1 -0
- package/dist/api/saveClientLogs.d.ts +6 -0
- package/dist/api/saveClientLogs.d.ts.map +1 -0
- package/dist/api/sendMessage.d.ts +10 -0
- package/dist/api/sendMessage.d.ts.map +1 -0
- package/dist/api/utils/detectDevice.d.ts +2 -0
- package/dist/api/utils/detectDevice.d.ts.map +1 -0
- package/dist/api/utils/handlePaymentInProgress.d.ts +3 -0
- package/dist/api/utils/handlePaymentInProgress.d.ts.map +1 -0
- package/dist/components/Bot.d.ts +30 -0
- package/dist/components/Bot.d.ts.map +1 -0
- package/dist/components/Button.d.ts +9 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/ButtonSubmit.d.ts +9 -0
- package/dist/components/ButtonSubmit.d.ts.map +1 -0
- package/dist/components/ChatInputFooter.d.ts +5 -0
- package/dist/components/ChatInputFooter.d.ts.map +1 -0
- package/dist/components/ConversationContainer/ConversationContainer.d.ts +22 -0
- package/dist/components/ConversationContainer/ConversationContainer.d.ts.map +1 -0
- package/dist/components/ConversationContainer/ConversationContainerBody.d.ts +14 -0
- package/dist/components/ConversationContainer/ConversationContainerBody.d.ts.map +1 -0
- package/dist/components/ConversationContainer/ConversationContainerFooter.d.ts +17 -0
- package/dist/components/ConversationContainer/ConversationContainerFooter.d.ts.map +1 -0
- package/dist/components/ConversationContainer/ConversationMessageChunk.d.ts +17 -0
- package/dist/components/ConversationContainer/ConversationMessageChunk.d.ts.map +1 -0
- package/dist/components/ConversationContainer/ConversationPopupBlockedToast.d.ts +7 -0
- package/dist/components/ConversationContainer/ConversationPopupBlockedToast.d.ts.map +1 -0
- package/dist/components/ConversationContainer/ConversationProgressBar.d.ts +6 -0
- package/dist/components/ConversationContainer/ConversationProgressBar.d.ts.map +1 -0
- package/dist/components/ConversationContainer/HostAvatar.d.ts +8 -0
- package/dist/components/ConversationContainer/HostAvatar.d.ts.map +1 -0
- package/dist/components/ConversationContainer/InputAnswer.d.ts +7 -0
- package/dist/components/ConversationContainer/InputAnswer.d.ts.map +1 -0
- package/dist/components/ConversationContainer/helpers.d.ts +6 -0
- package/dist/components/ConversationContainer/helpers.d.ts.map +1 -0
- package/dist/components/ConversationContainer/index.d.ts +2 -0
- package/dist/components/ConversationContainer/index.d.ts.map +1 -0
- package/dist/components/ConversationContext.d.ts +42 -0
- package/dist/components/ConversationContext.d.ts.map +1 -0
- package/dist/components/ErrorMessage.d.ts +6 -0
- package/dist/components/ErrorMessage.d.ts.map +1 -0
- package/dist/components/FooterEndConversation.d.ts +2 -0
- package/dist/components/FooterEndConversation.d.ts.map +1 -0
- package/dist/components/FooterLiteBadge.d.ts +6 -0
- package/dist/components/FooterLiteBadge.d.ts.map +1 -0
- package/dist/components/FormLayout.d.ts +18 -0
- package/dist/components/FormLayout.d.ts.map +1 -0
- package/dist/components/InputAnswerContext.d.ts +46 -0
- package/dist/components/InputAnswerContext.d.ts.map +1 -0
- package/dist/components/InputBlockDispatcher.d.ts +5 -0
- package/dist/components/InputBlockDispatcher.d.ts.map +1 -0
- package/dist/components/InputErrorMessage.d.ts +8 -0
- package/dist/components/InputErrorMessage.d.ts.map +1 -0
- package/dist/components/InputFormLayout.d.ts +15 -0
- package/dist/components/InputFormLayout.d.ts.map +1 -0
- package/dist/components/Modal.d.ts +9 -0
- package/dist/components/Modal.d.ts.map +1 -0
- package/dist/components/Spinner.d.ts +3 -0
- package/dist/components/Spinner.d.ts.map +1 -0
- package/dist/components/TextInputAddFileButton.d.ts +7 -0
- package/dist/components/TextInputAddFileButton.d.ts.map +1 -0
- package/dist/components/TypingBubble.d.ts +2 -0
- package/dist/components/TypingBubble.d.ts.map +1 -0
- package/dist/components/avatars/Avatar.d.ts +4 -0
- package/dist/components/avatars/Avatar.d.ts.map +1 -0
- package/dist/components/avatars/AvatarPlaceholder.d.ts +7 -0
- package/dist/components/avatars/AvatarPlaceholder.d.ts.map +1 -0
- package/dist/components/bubbles/GuestBubble.d.ts +10 -0
- package/dist/components/bubbles/GuestBubble.d.ts.map +1 -0
- package/dist/components/bubbles/HostBubble.d.ts +12 -0
- package/dist/components/bubbles/HostBubble.d.ts.map +1 -0
- package/dist/components/bubbles/HostBubbleStreaming.d.ts +8 -0
- package/dist/components/bubbles/HostBubbleStreaming.d.ts.map +1 -0
- package/dist/components/icons/CheckIcon.d.ts +3 -0
- package/dist/components/icons/CheckIcon.d.ts.map +1 -0
- package/dist/components/icons/ChevronDownIcon.d.ts +3 -0
- package/dist/components/icons/ChevronDownIcon.d.ts.map +1 -0
- package/dist/components/icons/CloseIcon.d.ts +3 -0
- package/dist/components/icons/CloseIcon.d.ts.map +1 -0
- package/dist/components/icons/FileIcon.d.ts +3 -0
- package/dist/components/icons/FileIcon.d.ts.map +1 -0
- package/dist/components/icons/FileIconUpload.d.ts +3 -0
- package/dist/components/icons/FileIconUpload.d.ts.map +1 -0
- package/dist/components/icons/LogoIcon.d.ts +2 -0
- package/dist/components/icons/LogoIcon.d.ts.map +1 -0
- package/dist/components/icons/MicrophoneIcon.d.ts +3 -0
- package/dist/components/icons/MicrophoneIcon.d.ts.map +1 -0
- package/dist/components/icons/PaperClipIcon.d.ts +3 -0
- package/dist/components/icons/PaperClipIcon.d.ts.map +1 -0
- package/dist/components/icons/PictureIcon.d.ts +3 -0
- package/dist/components/icons/PictureIcon.d.ts.map +1 -0
- package/dist/components/icons/SendIcon.d.ts +3 -0
- package/dist/components/icons/SendIcon.d.ts.map +1 -0
- package/dist/components/icons/index.d.ts +2 -0
- package/dist/components/icons/index.d.ts.map +1 -0
- package/dist/components/inputs/FileAttached.d.ts +6 -0
- package/dist/components/inputs/FileAttached.d.ts.map +1 -0
- package/dist/components/inputs/Input.d.ts +8 -0
- package/dist/components/inputs/Input.d.ts.map +1 -0
- package/dist/components/inputs/Textarea.d.ts +9 -0
- package/dist/components/inputs/Textarea.d.ts.map +1 -0
- package/dist/components/primitives/Dialog.d.ts +35 -0
- package/dist/components/primitives/Dialog.d.ts.map +1 -0
- package/dist/components/primitives/Environment.d.ts +8 -0
- package/dist/components/primitives/Environment.d.ts.map +1 -0
- package/dist/components/primitives/Menu.d.ts +35 -0
- package/dist/components/primitives/Menu.d.ts.map +1 -0
- package/dist/components/primitives/Progress.d.ts +25 -0
- package/dist/components/primitives/Progress.d.ts.map +1 -0
- package/dist/components/primitives/Toast.d.ts +52 -0
- package/dist/components/primitives/Toast.d.ts.map +1 -0
- package/dist/components/primitives/index.d.ts +6 -0
- package/dist/components/primitives/index.d.ts.map +1 -0
- package/dist/constants.d.ts +7 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/context/ConversationContext.d.ts +42 -0
- package/dist/context/ConversationContext.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/GuestBubble.d.ts +10 -0
- package/dist/features/blocks/bubbles/GuestBubble.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/HostBubble.d.ts +12 -0
- package/dist/features/blocks/bubbles/HostBubble.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/HostBubbleStreaming.d.ts +8 -0
- package/dist/features/blocks/bubbles/HostBubbleStreaming.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/audio/components/AudioBubble.d.ts +8 -0
- package/dist/features/blocks/bubbles/audio/components/AudioBubble.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/audio/components/index.d.ts +2 -0
- package/dist/features/blocks/bubbles/audio/components/index.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/audio/index.d.ts +2 -0
- package/dist/features/blocks/bubbles/audio/index.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/embed/components/EmbedBubble.d.ts +10 -0
- package/dist/features/blocks/bubbles/embed/components/EmbedBubble.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/embed/components/index.d.ts +2 -0
- package/dist/features/blocks/bubbles/embed/components/index.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/embed/index.d.ts +2 -0
- package/dist/features/blocks/bubbles/embed/index.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/image/components/ImageBubble.d.ts +8 -0
- package/dist/features/blocks/bubbles/image/components/ImageBubble.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/image/index.d.ts +2 -0
- package/dist/features/blocks/bubbles/image/index.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/textBubble/components/TextBubble.d.ts +10 -0
- package/dist/features/blocks/bubbles/textBubble/components/TextBubble.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/textBubble/components/plate/PlateBlock.d.ts +9 -0
- package/dist/features/blocks/bubbles/textBubble/components/plate/PlateBlock.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/textBubble/components/plate/PlateText.d.ts +8 -0
- package/dist/features/blocks/bubbles/textBubble/components/plate/PlateText.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/textBubble/index.d.ts +2 -0
- package/dist/features/blocks/bubbles/textBubble/index.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/video/components/VideoBubble.d.ts +8 -0
- package/dist/features/blocks/bubbles/video/components/VideoBubble.d.ts.map +1 -0
- package/dist/features/blocks/bubbles/video/index.d.ts +2 -0
- package/dist/features/blocks/bubbles/video/index.d.ts.map +1 -0
- package/dist/features/blocks/inputs/buttons/components/Buttons.d.ts +13 -0
- package/dist/features/blocks/inputs/buttons/components/Buttons.d.ts.map +1 -0
- package/dist/features/blocks/inputs/buttons/components/ButtonsSearch.d.ts +9 -0
- package/dist/features/blocks/inputs/buttons/components/ButtonsSearch.d.ts.map +1 -0
- package/dist/features/blocks/inputs/buttons/index.d.ts +2 -0
- package/dist/features/blocks/inputs/buttons/index.d.ts.map +1 -0
- package/dist/features/blocks/inputs/date/components/DateForm.d.ts +10 -0
- package/dist/features/blocks/inputs/date/components/DateForm.d.ts.map +1 -0
- package/dist/features/blocks/inputs/date/index.d.ts +2 -0
- package/dist/features/blocks/inputs/date/index.d.ts.map +1 -0
- package/dist/features/blocks/inputs/email/components/EmailInput.d.ts +12 -0
- package/dist/features/blocks/inputs/email/components/EmailInput.d.ts.map +1 -0
- package/dist/features/blocks/inputs/email/index.d.ts +2 -0
- package/dist/features/blocks/inputs/email/index.d.ts.map +1 -0
- package/dist/features/blocks/inputs/fileUpload/components/FilePreview.d.ts +8 -0
- package/dist/features/blocks/inputs/fileUpload/components/FilePreview.d.ts.map +1 -0
- package/dist/features/blocks/inputs/fileUpload/components/FileUploadForm.d.ts +11 -0
- package/dist/features/blocks/inputs/fileUpload/components/FileUploadForm.d.ts.map +1 -0
- package/dist/features/blocks/inputs/fileUpload/index.d.ts +2 -0
- package/dist/features/blocks/inputs/fileUpload/index.d.ts.map +1 -0
- package/dist/features/blocks/inputs/fileUpload/utils/sanitizeSelectedFiles.d.ts +12 -0
- package/dist/features/blocks/inputs/fileUpload/utils/sanitizeSelectedFiles.d.ts.map +1 -0
- package/dist/features/blocks/inputs/fileUpload/utils/uploadFiles.d.ts +20 -0
- package/dist/features/blocks/inputs/fileUpload/utils/uploadFiles.d.ts.map +1 -0
- package/dist/features/blocks/inputs/number/components/NumberInput.d.ts +12 -0
- package/dist/features/blocks/inputs/number/components/NumberInput.d.ts.map +1 -0
- package/dist/features/blocks/inputs/number/index.d.ts +2 -0
- package/dist/features/blocks/inputs/number/index.d.ts.map +1 -0
- package/dist/features/blocks/inputs/number/utils/numberInputHelper.d.ts +2 -0
- package/dist/features/blocks/inputs/number/utils/numberInputHelper.d.ts.map +1 -0
- package/dist/features/blocks/inputs/payment/components/PaymentForm.d.ts +11 -0
- package/dist/features/blocks/inputs/payment/components/PaymentForm.d.ts.map +1 -0
- package/dist/features/blocks/inputs/payment/components/StripePaymentForm.d.ts +11 -0
- package/dist/features/blocks/inputs/payment/components/StripePaymentForm.d.ts.map +1 -0
- package/dist/features/blocks/inputs/payment/components/index.d.ts +2 -0
- package/dist/features/blocks/inputs/payment/components/index.d.ts.map +1 -0
- package/dist/features/blocks/inputs/payment/index.d.ts +2 -0
- package/dist/features/blocks/inputs/payment/index.d.ts.map +1 -0
- package/dist/features/blocks/inputs/payment/utils/paymentInProgressStorage.d.ts +5 -0
- package/dist/features/blocks/inputs/payment/utils/paymentInProgressStorage.d.ts.map +1 -0
- package/dist/features/blocks/inputs/phone/components/PhoneInput.d.ts +11 -0
- package/dist/features/blocks/inputs/phone/components/PhoneInput.d.ts.map +1 -0
- package/dist/features/blocks/inputs/phone/index.d.ts +2 -0
- package/dist/features/blocks/inputs/phone/index.d.ts.map +1 -0
- package/dist/features/blocks/inputs/phone/utils/phoneCountries.d.ts +1247 -0
- package/dist/features/blocks/inputs/phone/utils/phoneCountries.d.ts.map +1 -0
- package/dist/features/blocks/inputs/rating/components/RatingForm.d.ts +10 -0
- package/dist/features/blocks/inputs/rating/components/RatingForm.d.ts.map +1 -0
- package/dist/features/blocks/inputs/rating/index.d.ts +2 -0
- package/dist/features/blocks/inputs/rating/index.d.ts.map +1 -0
- package/dist/features/blocks/inputs/text/components/TextInput.d.ts +13 -0
- package/dist/features/blocks/inputs/text/components/TextInput.d.ts.map +1 -0
- package/dist/features/blocks/inputs/text/components/VoiceRecorder.d.ts +10 -0
- package/dist/features/blocks/inputs/text/components/VoiceRecorder.d.ts.map +1 -0
- package/dist/features/blocks/inputs/text/components/VolumeProcessor.d.ts +2 -0
- package/dist/features/blocks/inputs/text/components/VolumeProcessor.d.ts.map +1 -0
- package/dist/features/blocks/inputs/text/index.d.ts +2 -0
- package/dist/features/blocks/inputs/text/index.d.ts.map +1 -0
- package/dist/features/blocks/inputs/url/components/UrlInput.d.ts +12 -0
- package/dist/features/blocks/inputs/url/components/UrlInput.d.ts.map +1 -0
- package/dist/features/blocks/inputs/url/index.d.ts +2 -0
- package/dist/features/blocks/inputs/url/index.d.ts.map +1 -0
- package/dist/features/blocks/integrations/pixel/executePixel.d.ts +3 -0
- package/dist/features/blocks/integrations/pixel/executePixel.d.ts.map +1 -0
- package/dist/features/blocks/logic/redirect/index.d.ts +2 -0
- package/dist/features/blocks/logic/redirect/index.d.ts.map +1 -0
- package/dist/features/blocks/logic/redirect/utils/executeRedirect.d.ts +5 -0
- package/dist/features/blocks/logic/redirect/utils/executeRedirect.d.ts.map +1 -0
- package/dist/features/blocks/logic/redirect/utils/index.d.ts +2 -0
- package/dist/features/blocks/logic/redirect/utils/index.d.ts.map +1 -0
- package/dist/features/blocks/logic/script/executeScript.d.ts +9 -0
- package/dist/features/blocks/logic/script/executeScript.d.ts.map +1 -0
- package/dist/features/blocks/logic/variable/executeVariable.d.ts +6 -0
- package/dist/features/blocks/logic/variable/executeVariable.d.ts.map +1 -0
- package/dist/features/blocks/logic/wait/utils/executeWait.d.ts +6 -0
- package/dist/features/blocks/logic/wait/utils/executeWait.d.ts.map +1 -0
- package/dist/features/bubble/components/Bubble.d.ts +10 -0
- package/dist/features/bubble/components/Bubble.d.ts.map +1 -0
- package/dist/features/bubble/components/BubbleButton.d.ts +9 -0
- package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -0
- package/dist/features/bubble/components/BubbleMessage.d.ts +9 -0
- package/dist/features/bubble/components/BubbleMessage.d.ts.map +1 -0
- package/dist/features/bubble/components/index.d.ts +2 -0
- package/dist/features/bubble/components/index.d.ts.map +1 -0
- package/dist/features/bubble/index.d.ts +2 -0
- package/dist/features/bubble/index.d.ts.map +1 -0
- package/dist/features/bubble/types.d.ts +35 -0
- package/dist/features/bubble/types.d.ts.map +1 -0
- package/dist/features/commands/index.d.ts +3 -0
- package/dist/features/commands/index.d.ts.map +1 -0
- package/dist/features/commands/types.d.ts +19 -0
- package/dist/features/commands/types.d.ts.map +1 -0
- package/dist/features/commands/utils/close.d.ts +2 -0
- package/dist/features/commands/utils/close.d.ts.map +1 -0
- package/dist/features/commands/utils/hidePreviewMessage.d.ts +2 -0
- package/dist/features/commands/utils/hidePreviewMessage.d.ts.map +1 -0
- package/dist/features/commands/utils/index.d.ts +9 -0
- package/dist/features/commands/utils/index.d.ts.map +1 -0
- package/dist/features/commands/utils/open.d.ts +2 -0
- package/dist/features/commands/utils/open.d.ts.map +1 -0
- package/dist/features/commands/utils/setInputValue.d.ts +2 -0
- package/dist/features/commands/utils/setInputValue.d.ts.map +1 -0
- package/dist/features/commands/utils/setPrefilledVariables.d.ts +2 -0
- package/dist/features/commands/utils/setPrefilledVariables.d.ts.map +1 -0
- package/dist/features/commands/utils/showPreviewMessage.d.ts +3 -0
- package/dist/features/commands/utils/showPreviewMessage.d.ts.map +1 -0
- package/dist/features/commands/utils/toggle.d.ts +2 -0
- package/dist/features/commands/utils/toggle.d.ts.map +1 -0
- package/dist/features/commands/utils/unmount.d.ts +2 -0
- package/dist/features/commands/utils/unmount.d.ts.map +1 -0
- package/dist/features/popup/components/Popup.d.ts +11 -0
- package/dist/features/popup/components/Popup.d.ts.map +1 -0
- package/dist/features/popup/components/index.d.ts +2 -0
- package/dist/features/popup/components/index.d.ts.map +1 -0
- package/dist/features/popup/index.d.ts +2 -0
- package/dist/features/popup/index.d.ts.map +1 -0
- package/dist/features/popup/types.d.ts +9 -0
- package/dist/features/popup/types.d.ts.map +1 -0
- package/dist/features/standard/components/Standard.d.ts +6 -0
- package/dist/features/standard/components/Standard.d.ts.map +1 -0
- package/dist/features/standard/components/index.d.ts +2 -0
- package/dist/features/standard/components/index.d.ts.map +1 -0
- package/dist/features/standard/index.d.ts +2 -0
- package/dist/features/standard/index.d.ts.map +1 -0
- package/dist/features/streaming/streamChat.d.ts +17 -0
- package/dist/features/streaming/streamChat.d.ts.map +1 -0
- package/dist/features/widget/components/Bubble.d.ts +10 -0
- package/dist/features/widget/components/Bubble.d.ts.map +1 -0
- package/dist/features/widget/components/BubbleButton.d.ts +9 -0
- package/dist/features/widget/components/BubbleButton.d.ts.map +1 -0
- package/dist/features/widget/components/BubbleMessage.d.ts +9 -0
- package/dist/features/widget/components/BubbleMessage.d.ts.map +1 -0
- package/dist/features/widget/components/index.d.ts +2 -0
- package/dist/features/widget/components/index.d.ts.map +1 -0
- package/dist/features/widget/index.d.ts +2 -0
- package/dist/features/widget/index.d.ts.map +1 -0
- package/dist/features/widget/types.d.ts +35 -0
- package/dist/features/widget/types.d.ts.map +1 -0
- package/dist/hooks/useMessageListener.d.ts +11 -0
- package/dist/hooks/useMessageListener.d.ts.map +1 -0
- package/dist/index.d.ts +7 -125
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -127
- package/dist/lib/gtm.d.ts +2 -0
- package/dist/lib/gtm.d.ts.map +1 -0
- package/dist/lib/pixel.d.ts +4 -0
- package/dist/lib/pixel.d.ts.map +1 -0
- package/dist/lib/stripe.d.ts +3 -0
- package/dist/lib/stripe.d.ts.map +1 -0
- package/dist/queries/continueChatQuery.d.ts +403 -0
- package/dist/queries/continueChatQuery.d.ts.map +1 -0
- package/dist/queries/saveClientLogsQuery.d.ts +6 -0
- package/dist/queries/saveClientLogsQuery.d.ts.map +1 -0
- package/dist/queries/startChatQuery.d.ts +583 -0
- package/dist/queries/startChatQuery.d.ts.map +1 -0
- package/dist/register.d.ts +2 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/types.d.ts +51 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/CorsError.d.ts +4 -0
- package/dist/utils/CorsError.d.ts.map +1 -0
- package/dist/utils/botContainerHeightSignal.d.ts +2 -0
- package/dist/utils/botContainerHeightSignal.d.ts.map +1 -0
- package/dist/utils/botContainerSignal.d.ts +2 -0
- package/dist/utils/botContainerSignal.d.ts.map +1 -0
- package/dist/utils/executeClientSideActions.d.ts +20 -0
- package/dist/utils/executeClientSideActions.d.ts.map +1 -0
- package/dist/utils/formattedMessagesSignal.d.ts +8 -0
- package/dist/utils/formattedMessagesSignal.d.ts.map +1 -0
- package/dist/utils/getAnswerContent.d.ts +3 -0
- package/dist/utils/getAnswerContent.d.ts.map +1 -0
- package/dist/utils/getApiUrl.d.ts +2 -0
- package/dist/utils/getApiUrl.d.ts.map +1 -0
- package/dist/utils/injectFont.d.ts +3 -0
- package/dist/utils/injectFont.d.ts.map +1 -0
- package/dist/utils/injectStartProps.d.ts +3 -0
- package/dist/utils/injectStartProps.d.ts.map +1 -0
- package/dist/utils/isMobileSignal.d.ts +2 -0
- package/dist/utils/isMobileSignal.d.ts.map +1 -0
- package/dist/utils/markdown.d.ts +3 -0
- package/dist/utils/markdown.d.ts.map +1 -0
- package/dist/utils/persist.d.ts +9 -0
- package/dist/utils/persist.d.ts.map +1 -0
- package/dist/utils/setCssVariablesValue.d.ts +3 -0
- package/dist/utils/setCssVariablesValue.d.ts.map +1 -0
- package/dist/utils/storage.d.ts +535 -0
- package/dist/utils/storage.d.ts.map +1 -0
- package/dist/utils/streamingMessageSignal.d.ts +8 -0
- package/dist/utils/streamingMessageSignal.d.ts.map +1 -0
- package/dist/utils/toaster.d.ts +21 -0
- package/dist/utils/toaster.d.ts.map +1 -0
- package/dist/web.d.ts +2 -0
- package/dist/web.d.ts.map +1 -0
- package/dist/web.js +3 -264
- package/dist/window.d.ts +40 -0
- package/dist/window.d.ts.map +1 -0
- package/package.json +30 -27
- package/dist/web.css +0 -1
package/dist/web.js
CHANGED
|
@@ -1,264 +1,3 @@
|
|
|
1
|
-
//
|
|
2
|
-
var Yie=Object.create;var bv=Object.defineProperty;var Xie=Object.getOwnPropertyDescriptor;var Zie=Object.getOwnPropertyNames;var Qie=Object.getPrototypeOf,Jie=Object.prototype.hasOwnProperty;var eae=(e,t)=>()=>(e&&(t=e(e=0)),t);var _=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),jI=(e,t)=>{for(var r in t)bv(e,r,{get:t[r],enumerable:!0})},qI=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Zie(t))!Jie.call(e,o)&&o!==r&&bv(e,o,{get:()=>t[o],enumerable:!(n=Xie(t,o))||n.enumerable});return e};var de=(e,t,r)=>(r=e!=null?Yie(Qie(e)):{},qI(t||!e||!e.__esModule?bv(r,"default",{value:e,enumerable:!0}):r,e)),Ev=e=>qI(bv({},"__esModule",{value:!0}),e);var QR=_((Qet,Pc)=>{"use strict";var fse=typeof Buffer<"u",KR=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,YR=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function XR(e,t,r){r==null&&t!==null&&typeof t=="object"&&(r=t,t=void 0),fse&&Buffer.isBuffer(e)&&(e=e.toString()),e&&e.charCodeAt(0)===65279&&(e=e.slice(1));let n=JSON.parse(e,t);if(n===null||typeof n!="object")return n;let o=r&&r.protoAction||"error",i=r&&r.constructorAction||"error";if(o==="ignore"&&i==="ignore")return n;if(o!=="ignore"&&i!=="ignore"){if(KR.test(e)===!1&&YR.test(e)===!1)return n}else if(o!=="ignore"&&i==="ignore"){if(KR.test(e)===!1)return n}else if(YR.test(e)===!1)return n;return ZR(n,{protoAction:o,constructorAction:i,safe:r&&r.safe})}function ZR(e,{protoAction:t="error",constructorAction:r="error",safe:n}={}){let o=[e];for(;o.length;){let i=o;o=[];for(let a of i){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(a,"__proto__")){if(n===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete a.__proto__}if(r!=="ignore"&&Object.prototype.hasOwnProperty.call(a,"constructor")&&Object.prototype.hasOwnProperty.call(a.constructor,"prototype")){if(n===!0)return null;if(r==="error")throw new SyntaxError("Object contains forbidden prototype property");delete a.constructor}for(let s in a){let l=a[s];l&&typeof l=="object"&&o.push(l)}}}return e}function T_(e,t,r){let n=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return XR(e,t,r)}finally{Error.stackTraceLimit=n}}function pse(e,t){let r=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return XR(e,t,{safe:!0})}catch{return null}finally{Error.stackTraceLimit=r}}Pc.exports=T_;Pc.exports.default=T_;Pc.exports.parse=T_;Pc.exports.safeParse=pse;Pc.exports.scan=ZR});var qN=_(bt=>{"use strict";var Jp=Symbol.for("react.element"),iue=Symbol.for("react.portal"),aue=Symbol.for("react.fragment"),sue=Symbol.for("react.strict_mode"),lue=Symbol.for("react.profiler"),uue=Symbol.for("react.provider"),cue=Symbol.for("react.context"),due=Symbol.for("react.forward_ref"),fue=Symbol.for("react.suspense"),pue=Symbol.for("react.memo"),mue=Symbol.for("react.lazy"),IN=Symbol.iterator;function gue(e){return e===null||typeof e!="object"?null:(e=IN&&e[IN]||e["@@iterator"],typeof e=="function"?e:null)}var LN={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},BN=Object.assign,FN={};function Bc(e,t,r){this.props=e,this.context=t,this.refs=FN,this.updater=r||LN}Bc.prototype.isReactComponent={};Bc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Bc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function MN(){}MN.prototype=Bc.prototype;function U_(e,t,r){this.props=e,this.context=t,this.refs=FN,this.updater=r||LN}var j_=U_.prototype=new MN;j_.constructor=U_;BN(j_,Bc.prototype);j_.isPureReactComponent=!0;var RN=Array.isArray,$N=Object.prototype.hasOwnProperty,q_={current:null},UN={key:!0,ref:!0,__self:!0,__source:!0};function jN(e,t,r){var n,o={},i=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)$N.call(t,n)&&!UN.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)o[n]===void 0&&(o[n]=s[n]);return{$$typeof:Jp,type:e,key:i,ref:a,props:o,_owner:q_.current}}function hue(e,t){return{$$typeof:Jp,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function z_(e){return typeof e=="object"&&e!==null&&e.$$typeof===Jp}function vue(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var NN=/\/+/g;function $_(e,t){return typeof e=="object"&&e!==null&&e.key!=null?vue(""+e.key):t.toString(36)}function Qv(e,t,r,n,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Jp:case iue:a=!0}}if(a)return a=e,o=o(a),e=n===""?"."+$_(a,0):n,RN(o)?(r="",e!=null&&(r=e.replace(NN,"$&/")+"/"),Qv(o,t,r,"",function(u){return u})):o!=null&&(z_(o)&&(o=hue(o,r+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(NN,"$&/")+"/")+e)),t.push(o)),1;if(a=0,n=n===""?".":n+":",RN(e))for(var s=0;s<e.length;s++){i=e[s];var l=n+$_(i,s);a+=Qv(i,t,r,l,o)}else if(l=gue(e),typeof l=="function")for(e=l.call(e),s=0;!(i=e.next()).done;)i=i.value,l=n+$_(i,s++),a+=Qv(i,t,r,l,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Zv(e,t,r){if(e==null)return e;var n=[],o=0;return Qv(e,n,"","",function(i){return t.call(r,i,o++)}),n}function yue(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Dn={current:null},Jv={transition:null},bue={ReactCurrentDispatcher:Dn,ReactCurrentBatchConfig:Jv,ReactCurrentOwner:q_};bt.Children={map:Zv,forEach:function(e,t,r){Zv(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Zv(e,function(){t++}),t},toArray:function(e){return Zv(e,function(t){return t})||[]},only:function(e){if(!z_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};bt.Component=Bc;bt.Fragment=aue;bt.Profiler=lue;bt.PureComponent=U_;bt.StrictMode=sue;bt.Suspense=fue;bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=bue;bt.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=BN({},e.props),o=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=q_.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)$N.call(t,l)&&!UN.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];n.children=s}return{$$typeof:Jp,type:e.type,key:o,ref:i,props:n,_owner:a}};bt.createContext=function(e){return e={$$typeof:cue,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:uue,_context:e},e.Consumer=e};bt.createElement=jN;bt.createFactory=function(e){var t=jN.bind(null,e);return t.type=e,t};bt.createRef=function(){return{current:null}};bt.forwardRef=function(e){return{$$typeof:due,render:e}};bt.isValidElement=z_;bt.lazy=function(e){return{$$typeof:mue,_payload:{_status:-1,_result:e},_init:yue}};bt.memo=function(e,t){return{$$typeof:pue,type:e,compare:t===void 0?null:t}};bt.startTransition=function(e){var t=Jv.transition;Jv.transition={};try{e()}finally{Jv.transition=t}};bt.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};bt.useCallback=function(e,t){return Dn.current.useCallback(e,t)};bt.useContext=function(e){return Dn.current.useContext(e)};bt.useDebugValue=function(){};bt.useDeferredValue=function(e){return Dn.current.useDeferredValue(e)};bt.useEffect=function(e,t){return Dn.current.useEffect(e,t)};bt.useId=function(){return Dn.current.useId()};bt.useImperativeHandle=function(e,t,r){return Dn.current.useImperativeHandle(e,t,r)};bt.useInsertionEffect=function(e,t){return Dn.current.useInsertionEffect(e,t)};bt.useLayoutEffect=function(e,t){return Dn.current.useLayoutEffect(e,t)};bt.useMemo=function(e,t){return Dn.current.useMemo(e,t)};bt.useReducer=function(e,t,r){return Dn.current.useReducer(e,t,r)};bt.useRef=function(e){return Dn.current.useRef(e)};bt.useState=function(e){return Dn.current.useState(e)};bt.useSyncExternalStore=function(e,t,r){return Dn.current.useSyncExternalStore(e,t,r)};bt.useTransition=function(){return Dn.current.useTransition()};bt.version="18.2.0"});var Re=_((Oat,zN)=>{"use strict";zN.exports=qN()});var dL=_(ly=>{"use strict";var oce=Re(),ice=Symbol.for("react.element"),ace=Symbol.for("react.fragment"),sce=Object.prototype.hasOwnProperty,lce=oce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uce={key:!0,ref:!0,__self:!0,__source:!0};function cL(e,t,r){var n,o={},i=null,a=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)sce.call(t,n)&&!uce.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:ice,type:e,key:i,ref:a,props:o,_owner:lce.current}}ly.Fragment=ace;ly.jsx=cL;ly.jsxs=cL});var tC=_((Gat,fL)=>{"use strict";fL.exports=dL()});var zL=_(qt=>{"use strict";function bC(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(0<vy(o,t))e[n]=t,e[r]=o,r=n;else break e}}function wi(e){return e.length===0?null:e[0]}function by(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length,i=o>>>1;n<i;){var a=2*(n+1)-1,s=e[a],l=a+1,u=e[l];if(0>vy(s,r))l<o&&0>vy(u,s)?(e[n]=u,e[l]=r,n=l):(e[n]=s,e[a]=r,n=a);else if(l<o&&0>vy(u,r))e[n]=u,e[l]=r,n=l;else break e}}return t}function vy(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(NL=performance,qt.unstable_now=function(){return NL.now()}):(hC=Date,LL=hC.now(),qt.unstable_now=function(){return hC.now()-LL});var NL,hC,LL,Qi=[],Ns=[],Lce=1,Wo=null,gn=3,Ey=!1,ru=!1,lm=!1,ML=typeof setTimeout=="function"?setTimeout:null,$L=typeof clearTimeout=="function"?clearTimeout:null,BL=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function EC(e){for(var t=wi(Ns);t!==null;){if(t.callback===null)by(Ns);else if(t.startTime<=e)by(Ns),t.sortIndex=t.expirationTime,bC(Qi,t);else break;t=wi(Ns)}}function xC(e){if(lm=!1,EC(e),!ru)if(wi(Qi)!==null)ru=!0,_C(wC);else{var t=wi(Ns);t!==null&&CC(xC,t.startTime-e)}}function wC(e,t){ru=!1,lm&&(lm=!1,$L(um),um=-1),Ey=!0;var r=gn;try{for(EC(t),Wo=wi(Qi);Wo!==null&&(!(Wo.expirationTime>t)||e&&!qL());){var n=Wo.callback;if(typeof n=="function"){Wo.callback=null,gn=Wo.priorityLevel;var o=n(Wo.expirationTime<=t);t=qt.unstable_now(),typeof o=="function"?Wo.callback=o:Wo===wi(Qi)&&by(Qi),EC(t)}else by(Qi);Wo=wi(Qi)}if(Wo!==null)var i=!0;else{var a=wi(Ns);a!==null&&CC(xC,a.startTime-t),i=!1}return i}finally{Wo=null,gn=r,Ey=!1}}var xy=!1,yy=null,um=-1,UL=5,jL=-1;function qL(){return!(qt.unstable_now()-jL<UL)}function vC(){if(yy!==null){var e=qt.unstable_now();jL=e;var t=!0;try{t=yy(!0,e)}finally{t?sm():(xy=!1,yy=null)}}else xy=!1}var sm;typeof BL=="function"?sm=function(){BL(vC)}:typeof MessageChannel<"u"?(yC=new MessageChannel,FL=yC.port2,yC.port1.onmessage=vC,sm=function(){FL.postMessage(null)}):sm=function(){ML(vC,0)};var yC,FL;function _C(e){yy=e,xy||(xy=!0,sm())}function CC(e,t){um=ML(function(){e(qt.unstable_now())},t)}qt.unstable_IdlePriority=5;qt.unstable_ImmediatePriority=1;qt.unstable_LowPriority=4;qt.unstable_NormalPriority=3;qt.unstable_Profiling=null;qt.unstable_UserBlockingPriority=2;qt.unstable_cancelCallback=function(e){e.callback=null};qt.unstable_continueExecution=function(){ru||Ey||(ru=!0,_C(wC))};qt.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):UL=0<e?Math.floor(1e3/e):5};qt.unstable_getCurrentPriorityLevel=function(){return gn};qt.unstable_getFirstCallbackNode=function(){return wi(Qi)};qt.unstable_next=function(e){switch(gn){case 1:case 2:case 3:var t=3;break;default:t=gn}var r=gn;gn=t;try{return e()}finally{gn=r}};qt.unstable_pauseExecution=function(){};qt.unstable_requestPaint=function(){};qt.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=gn;gn=e;try{return t()}finally{gn=r}};qt.unstable_scheduleCallback=function(e,t,r){var n=qt.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=r+o,e={id:Lce++,callback:t,priorityLevel:e,startTime:r,expirationTime:o,sortIndex:-1},r>n?(e.sortIndex=r,bC(Ns,e),wi(Qi)===null&&e===wi(Ns)&&(lm?($L(um),um=-1):lm=!0,CC(xC,r-n))):(e.sortIndex=o,bC(Qi,e),ru||Ey||(ru=!0,_C(wC))),e};qt.unstable_shouldYield=qL;qt.unstable_wrapCallback=function(e){var t=gn;return function(){var r=gn;gn=t;try{return e.apply(this,arguments)}finally{gn=r}}}});var HL=_((Qat,VL)=>{"use strict";VL.exports=zL()});var ZM=_(Co=>{"use strict";var QB=Re(),wo=HL();function pe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var JB=new Set,Om={};function gu(e,t){id(e,t),id(e+"Capture",t)}function id(e,t){for(Om[e]=t,e=0;e<t.length;e++)JB.add(t[e])}var Ua=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),GC=Object.prototype.hasOwnProperty,Bce=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,WL={},GL={};function Fce(e){return GC.call(GL,e)?!0:GC.call(WL,e)?!1:Bce.test(e)?GL[e]=!0:(WL[e]=!0,!1)}function Mce(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $ce(e,t,r,n){if(t===null||typeof t>"u"||Mce(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function In(e,t,r,n,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var en={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){en[e]=new In(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];en[t]=new In(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){en[e]=new In(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){en[e]=new In(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){en[e]=new In(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){en[e]=new In(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){en[e]=new In(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){en[e]=new In(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){en[e]=new In(e,5,!1,e.toLowerCase(),null,!1,!1)});var $S=/[\-:]([a-z])/g;function US(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace($S,US);en[t]=new In(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace($S,US);en[t]=new In(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace($S,US);en[t]=new In(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){en[e]=new In(e,1,!1,e.toLowerCase(),null,!1,!1)});en.xlinkHref=new In("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){en[e]=new In(e,1,!1,e.toLowerCase(),null,!0,!0)});function jS(e,t,r,n){var o=en.hasOwnProperty(t)?en[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&($ce(t,r,o,n)&&(r=null),n||o===null?Fce(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Va=QB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,wy=Symbol.for("react.element"),jc=Symbol.for("react.portal"),qc=Symbol.for("react.fragment"),qS=Symbol.for("react.strict_mode"),KC=Symbol.for("react.profiler"),eF=Symbol.for("react.provider"),tF=Symbol.for("react.context"),zS=Symbol.for("react.forward_ref"),YC=Symbol.for("react.suspense"),XC=Symbol.for("react.suspense_list"),VS=Symbol.for("react.memo"),Bs=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var rF=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var KL=Symbol.iterator;function cm(e){return e===null||typeof e!="object"?null:(e=KL&&e[KL]||e["@@iterator"],typeof e=="function"?e:null)}var fr=Object.assign,SC;function ym(e){if(SC===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);SC=t&&t[1]||""}return`
|
|
3
|
-
`+SC+e}var TC=!1;function PC(e,t){if(!e||TC)return"";TC=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var o=u.stack.split(`
|
|
4
|
-
`),i=n.stack.split(`
|
|
5
|
-
`),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(a!==1||s!==1)do if(a--,s--,0>s||o[a]!==i[s]){var l=`
|
|
6
|
-
`+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{TC=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?ym(e):""}function Uce(e){switch(e.tag){case 5:return ym(e.type);case 16:return ym("Lazy");case 13:return ym("Suspense");case 19:return ym("SuspenseList");case 0:case 2:case 15:return e=PC(e.type,!1),e;case 11:return e=PC(e.type.render,!1),e;case 1:return e=PC(e.type,!0),e;default:return""}}function ZC(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case qc:return"Fragment";case jc:return"Portal";case KC:return"Profiler";case qS:return"StrictMode";case YC:return"Suspense";case XC:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case tF:return(e.displayName||"Context")+".Consumer";case eF:return(e._context.displayName||"Context")+".Provider";case zS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case VS:return t=e.displayName||null,t!==null?t:ZC(e.type)||"Memo";case Bs:t=e._payload,e=e._init;try{return ZC(e(t))}catch{}}return null}function jce(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ZC(t);case 8:return t===qS?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Xs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function nF(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qce(e){var t=nF(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _y(e){e._valueTracker||(e._valueTracker=qce(e))}function oF(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=nF(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Zy(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function QC(e,t){var r=t.checked;return fr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function YL(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Xs(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function iF(e,t){t=t.checked,t!=null&&jS(e,"checked",t,!1)}function JC(e,t){iF(e,t);var r=Xs(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?eS(e,t.type,r):t.hasOwnProperty("defaultValue")&&eS(e,t.type,Xs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function XL(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function eS(e,t,r){(t!=="number"||Zy(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var bm=Array.isArray;function Jc(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Xs(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function tS(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(pe(91));return fr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ZL(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(pe(92));if(bm(r)){if(1<r.length)throw Error(pe(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Xs(r)}}function aF(e,t){var r=Xs(t.value),n=Xs(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function QL(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function sF(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function rS(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?sF(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Cy,lF=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Cy=Cy||document.createElement("div"),Cy.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Cy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Im(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var wm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},zce=["Webkit","ms","Moz","O"];Object.keys(wm).forEach(function(e){zce.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wm[t]=wm[e]})});function uF(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||wm.hasOwnProperty(e)&&wm[e]?(""+t).trim():t+"px"}function cF(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=uF(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var Vce=fr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function nS(e,t){if(t){if(Vce[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(pe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(pe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(pe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(pe(62))}}function oS(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var iS=null;function HS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var aS=null,ed=null,td=null;function JL(e){if(e=Xm(e)){if(typeof aS!="function")throw Error(pe(280));var t=e.stateNode;t&&(t=Sb(t),aS(e.stateNode,e.type,t))}}function dF(e){ed?td?td.push(e):td=[e]:ed=e}function fF(){if(ed){var e=ed,t=td;if(td=ed=null,JL(e),t)for(e=0;e<t.length;e++)JL(t[e])}}function pF(e,t){return e(t)}function mF(){}var AC=!1;function gF(e,t,r){if(AC)return e(t,r);AC=!0;try{return pF(e,t,r)}finally{AC=!1,(ed!==null||td!==null)&&(mF(),fF())}}function Rm(e,t){var r=e.stateNode;if(r===null)return null;var n=Sb(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(pe(231,t,typeof r));return r}var sS=!1;if(Ua)try{$c={},Object.defineProperty($c,"passive",{get:function(){sS=!0}}),window.addEventListener("test",$c,$c),window.removeEventListener("test",$c,$c)}catch{sS=!1}var $c;function Hce(e,t,r,n,o,i,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var _m=!1,Qy=null,Jy=!1,lS=null,Wce={onError:function(e){_m=!0,Qy=e}};function Gce(e,t,r,n,o,i,a,s,l){_m=!1,Qy=null,Hce.apply(Wce,arguments)}function Kce(e,t,r,n,o,i,a,s,l){if(Gce.apply(this,arguments),_m){if(_m){var u=Qy;_m=!1,Qy=null}else throw Error(pe(198));Jy||(Jy=!0,lS=u)}}function hu(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function hF(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function eB(e){if(hu(e)!==e)throw Error(pe(188))}function Yce(e){var t=e.alternate;if(!t){if(t=hu(e),t===null)throw Error(pe(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(o===null)break;var i=o.alternate;if(i===null){if(n=o.return,n!==null){r=n;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===r)return eB(o),e;if(i===n)return eB(o),t;i=i.sibling}throw Error(pe(188))}if(r.return!==n.return)r=o,n=i;else{for(var a=!1,s=o.child;s;){if(s===r){a=!0,r=o,n=i;break}if(s===n){a=!0,n=o,r=i;break}s=s.sibling}if(!a){for(s=i.child;s;){if(s===r){a=!0,r=i,n=o;break}if(s===n){a=!0,n=i,r=o;break}s=s.sibling}if(!a)throw Error(pe(189))}}if(r.alternate!==n)throw Error(pe(190))}if(r.tag!==3)throw Error(pe(188));return r.stateNode.current===r?e:t}function vF(e){return e=Yce(e),e!==null?yF(e):null}function yF(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=yF(e);if(t!==null)return t;e=e.sibling}return null}var bF=wo.unstable_scheduleCallback,tB=wo.unstable_cancelCallback,Xce=wo.unstable_shouldYield,Zce=wo.unstable_requestPaint,br=wo.unstable_now,Qce=wo.unstable_getCurrentPriorityLevel,WS=wo.unstable_ImmediatePriority,EF=wo.unstable_UserBlockingPriority,eb=wo.unstable_NormalPriority,Jce=wo.unstable_LowPriority,xF=wo.unstable_IdlePriority,xb=null,ra=null;function ede(e){if(ra&&typeof ra.onCommitFiberRoot=="function")try{ra.onCommitFiberRoot(xb,e,void 0,(e.current.flags&128)===128)}catch{}}var Pi=Math.clz32?Math.clz32:nde,tde=Math.log,rde=Math.LN2;function nde(e){return e>>>=0,e===0?32:31-(tde(e)/rde|0)|0}var Sy=64,Ty=4194304;function Em(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function tb(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~o;s!==0?n=Em(s):(i&=a,i!==0&&(n=Em(i)))}else a=r&~o,a!==0?n=Em(a):i!==0&&(n=Em(i));if(n===0)return 0;if(t!==0&&t!==n&&(t&o)===0&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Pi(t),o=1<<r,n|=e[r],t&=~o;return n}function ode(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ide(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-Pi(i),s=1<<a,l=o[a];l===-1?((s&r)===0||(s&n)!==0)&&(o[a]=ode(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}function uS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function wF(){var e=Sy;return Sy<<=1,(Sy&4194240)===0&&(Sy=64),e}function DC(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Km(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Pi(t),e[t]=r}function ade(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-Pi(r),i=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~i}}function GS(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Pi(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var Ft=0;function _F(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var CF,KS,SF,TF,PF,cS=!1,Py=[],qs=null,zs=null,Vs=null,Nm=new Map,Lm=new Map,Ms=[],sde="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function rB(e,t){switch(e){case"focusin":case"focusout":qs=null;break;case"dragenter":case"dragleave":zs=null;break;case"mouseover":case"mouseout":Vs=null;break;case"pointerover":case"pointerout":Nm.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lm.delete(t.pointerId)}}function dm(e,t,r,n,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Xm(t),t!==null&&KS(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function lde(e,t,r,n,o){switch(t){case"focusin":return qs=dm(qs,e,t,r,n,o),!0;case"dragenter":return zs=dm(zs,e,t,r,n,o),!0;case"mouseover":return Vs=dm(Vs,e,t,r,n,o),!0;case"pointerover":var i=o.pointerId;return Nm.set(i,dm(Nm.get(i)||null,e,t,r,n,o)),!0;case"gotpointercapture":return i=o.pointerId,Lm.set(i,dm(Lm.get(i)||null,e,t,r,n,o)),!0}return!1}function AF(e){var t=iu(e.target);if(t!==null){var r=hu(t);if(r!==null){if(t=r.tag,t===13){if(t=hF(r),t!==null){e.blockedOn=t,PF(e.priority,function(){SF(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function jy(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=dS(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);iS=n,r.target.dispatchEvent(n),iS=null}else return t=Xm(r),t!==null&&KS(t),e.blockedOn=r,!1;t.shift()}return!0}function nB(e,t,r){jy(e)&&r.delete(t)}function ude(){cS=!1,qs!==null&&jy(qs)&&(qs=null),zs!==null&&jy(zs)&&(zs=null),Vs!==null&&jy(Vs)&&(Vs=null),Nm.forEach(nB),Lm.forEach(nB)}function fm(e,t){e.blockedOn===t&&(e.blockedOn=null,cS||(cS=!0,wo.unstable_scheduleCallback(wo.unstable_NormalPriority,ude)))}function Bm(e){function t(o){return fm(o,e)}if(0<Py.length){fm(Py[0],e);for(var r=1;r<Py.length;r++){var n=Py[r];n.blockedOn===e&&(n.blockedOn=null)}}for(qs!==null&&fm(qs,e),zs!==null&&fm(zs,e),Vs!==null&&fm(Vs,e),Nm.forEach(t),Lm.forEach(t),r=0;r<Ms.length;r++)n=Ms[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Ms.length&&(r=Ms[0],r.blockedOn===null);)AF(r),r.blockedOn===null&&Ms.shift()}var rd=Va.ReactCurrentBatchConfig,rb=!0;function cde(e,t,r,n){var o=Ft,i=rd.transition;rd.transition=null;try{Ft=1,YS(e,t,r,n)}finally{Ft=o,rd.transition=i}}function dde(e,t,r,n){var o=Ft,i=rd.transition;rd.transition=null;try{Ft=4,YS(e,t,r,n)}finally{Ft=o,rd.transition=i}}function YS(e,t,r,n){if(rb){var o=dS(e,t,r,n);if(o===null)BC(e,t,n,nb,r),rB(e,n);else if(lde(o,e,t,r,n))n.stopPropagation();else if(rB(e,n),t&4&&-1<sde.indexOf(e)){for(;o!==null;){var i=Xm(o);if(i!==null&&CF(i),i=dS(e,t,r,n),i===null&&BC(e,t,n,nb,r),i===o)break;o=i}o!==null&&n.stopPropagation()}else BC(e,t,n,null,r)}}var nb=null;function dS(e,t,r,n){if(nb=null,e=HS(n),e=iu(e),e!==null)if(t=hu(e),t===null)e=null;else if(r=t.tag,r===13){if(e=hF(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return nb=e,null}function DF(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qce()){case WS:return 1;case EF:return 4;case eb:case Jce:return 16;case xF:return 536870912;default:return 16}default:return 16}}var Us=null,XS=null,qy=null;function kF(){if(qy)return qy;var e,t=XS,r=t.length,n,o="value"in Us?Us.value:Us.textContent,i=o.length;for(e=0;e<r&&t[e]===o[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===o[i-n];n++);return qy=o.slice(e,1<n?1-n:void 0)}function zy(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ay(){return!0}function oB(){return!1}function _o(e){function t(r,n,o,i,a){this._reactName=r,this._targetInst=o,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ay:oB,this.isPropagationStopped=oB,this}return fr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ay)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ay)},persist:function(){},isPersistent:Ay}),t}var fd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ZS=_o(fd),Ym=fr({},fd,{view:0,detail:0}),fde=_o(Ym),kC,OC,pm,wb=fr({},Ym,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:QS,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==pm&&(pm&&e.type==="mousemove"?(kC=e.screenX-pm.screenX,OC=e.screenY-pm.screenY):OC=kC=0,pm=e),kC)},movementY:function(e){return"movementY"in e?e.movementY:OC}}),iB=_o(wb),pde=fr({},wb,{dataTransfer:0}),mde=_o(pde),gde=fr({},Ym,{relatedTarget:0}),IC=_o(gde),hde=fr({},fd,{animationName:0,elapsedTime:0,pseudoElement:0}),vde=_o(hde),yde=fr({},fd,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bde=_o(yde),Ede=fr({},fd,{data:0}),aB=_o(Ede),xde={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wde={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_de={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cde(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_de[e])?!!t[e]:!1}function QS(){return Cde}var Sde=fr({},Ym,{key:function(e){if(e.key){var t=xde[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=zy(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?wde[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:QS,charCode:function(e){return e.type==="keypress"?zy(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?zy(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Tde=_o(Sde),Pde=fr({},wb,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sB=_o(Pde),Ade=fr({},Ym,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:QS}),Dde=_o(Ade),kde=fr({},fd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ode=_o(kde),Ide=fr({},wb,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rde=_o(Ide),Nde=[9,13,27,32],JS=Ua&&"CompositionEvent"in window,Cm=null;Ua&&"documentMode"in document&&(Cm=document.documentMode);var Lde=Ua&&"TextEvent"in window&&!Cm,OF=Ua&&(!JS||Cm&&8<Cm&&11>=Cm),lB=" ",uB=!1;function IF(e,t){switch(e){case"keyup":return Nde.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function RF(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zc=!1;function Bde(e,t){switch(e){case"compositionend":return RF(t);case"keypress":return t.which!==32?null:(uB=!0,lB);case"textInput":return e=t.data,e===lB&&uB?null:e;default:return null}}function Fde(e,t){if(zc)return e==="compositionend"||!JS&&IF(e,t)?(e=kF(),qy=XS=Us=null,zc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return OF&&t.locale!=="ko"?null:t.data;default:return null}}var Mde={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function cB(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Mde[e.type]:t==="textarea"}function NF(e,t,r,n){dF(n),t=ob(t,"onChange"),0<t.length&&(r=new ZS("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Sm=null,Fm=null;function $de(e){HF(e,0)}function _b(e){var t=Wc(e);if(oF(t))return e}function Ude(e,t){if(e==="change")return t}var LF=!1;Ua&&(Ua?(ky="oninput"in document,ky||(RC=document.createElement("div"),RC.setAttribute("oninput","return;"),ky=typeof RC.oninput=="function"),Dy=ky):Dy=!1,LF=Dy&&(!document.documentMode||9<document.documentMode));var Dy,ky,RC;function dB(){Sm&&(Sm.detachEvent("onpropertychange",BF),Fm=Sm=null)}function BF(e){if(e.propertyName==="value"&&_b(Fm)){var t=[];NF(t,Fm,e,HS(e)),gF($de,t)}}function jde(e,t,r){e==="focusin"?(dB(),Sm=t,Fm=r,Sm.attachEvent("onpropertychange",BF)):e==="focusout"&&dB()}function qde(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _b(Fm)}function zde(e,t){if(e==="click")return _b(t)}function Vde(e,t){if(e==="input"||e==="change")return _b(t)}function Hde(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Di=typeof Object.is=="function"?Object.is:Hde;function Mm(e,t){if(Di(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!GC.call(t,o)||!Di(e[o],t[o]))return!1}return!0}function fB(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pB(e,t){var r=fB(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=fB(r)}}function FF(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?FF(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function MF(){for(var e=window,t=Zy();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Zy(e.document)}return t}function eT(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Wde(e){var t=MF(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&FF(r.ownerDocument.documentElement,r)){if(n!==null&&eT(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=pB(r,i);var a=pB(r,n);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Gde=Ua&&"documentMode"in document&&11>=document.documentMode,Vc=null,fS=null,Tm=null,pS=!1;function mB(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;pS||Vc==null||Vc!==Zy(n)||(n=Vc,"selectionStart"in n&&eT(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Tm&&Mm(Tm,n)||(Tm=n,n=ob(fS,"onSelect"),0<n.length&&(t=new ZS("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Vc)))}function Oy(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Hc={animationend:Oy("Animation","AnimationEnd"),animationiteration:Oy("Animation","AnimationIteration"),animationstart:Oy("Animation","AnimationStart"),transitionend:Oy("Transition","TransitionEnd")},NC={},$F={};Ua&&($F=document.createElement("div").style,"AnimationEvent"in window||(delete Hc.animationend.animation,delete Hc.animationiteration.animation,delete Hc.animationstart.animation),"TransitionEvent"in window||delete Hc.transitionend.transition);function Cb(e){if(NC[e])return NC[e];if(!Hc[e])return e;var t=Hc[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in $F)return NC[e]=t[r];return e}var UF=Cb("animationend"),jF=Cb("animationiteration"),qF=Cb("animationstart"),zF=Cb("transitionend"),VF=new Map,gB="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Qs(e,t){VF.set(e,t),gu(t,[e])}for(Iy=0;Iy<gB.length;Iy++)Ry=gB[Iy],hB=Ry.toLowerCase(),vB=Ry[0].toUpperCase()+Ry.slice(1),Qs(hB,"on"+vB);var Ry,hB,vB,Iy;Qs(UF,"onAnimationEnd");Qs(jF,"onAnimationIteration");Qs(qF,"onAnimationStart");Qs("dblclick","onDoubleClick");Qs("focusin","onFocus");Qs("focusout","onBlur");Qs(zF,"onTransitionEnd");id("onMouseEnter",["mouseout","mouseover"]);id("onMouseLeave",["mouseout","mouseover"]);id("onPointerEnter",["pointerout","pointerover"]);id("onPointerLeave",["pointerout","pointerover"]);gu("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));gu("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));gu("onBeforeInput",["compositionend","keypress","textInput","paste"]);gu("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));gu("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));gu("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xm="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Kde=new Set("cancel close invalid load scroll toggle".split(" ").concat(xm));function yB(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,Kce(n,t,void 0,e),e.currentTarget=null}function HF(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var a=n.length-1;0<=a;a--){var s=n[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;yB(o,s,u),i=l}else for(a=0;a<n.length;a++){if(s=n[a],l=s.instance,u=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;yB(o,s,u),i=l}}}if(Jy)throw e=lS,Jy=!1,lS=null,e}function Gt(e,t){var r=t[yS];r===void 0&&(r=t[yS]=new Set);var n=e+"__bubble";r.has(n)||(WF(t,e,2,!1),r.add(n))}function LC(e,t,r){var n=0;t&&(n|=4),WF(r,e,n,t)}var Ny="_reactListening"+Math.random().toString(36).slice(2);function $m(e){if(!e[Ny]){e[Ny]=!0,JB.forEach(function(r){r!=="selectionchange"&&(Kde.has(r)||LC(r,!1,e),LC(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ny]||(t[Ny]=!0,LC("selectionchange",!1,t))}}function WF(e,t,r,n){switch(DF(t)){case 1:var o=cde;break;case 4:o=dde;break;default:o=YS}r=o.bind(null,t,r,e),o=void 0,!sS||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function BC(e,t,r,n,o){var i=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var s=n.stateNode.containerInfo;if(s===o||s.nodeType===8&&s.parentNode===o)break;if(a===4)for(a=n.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;a=a.return}for(;s!==null;){if(a=iu(s),a===null)return;if(l=a.tag,l===5||l===6){n=i=a;continue e}s=s.parentNode}}n=n.return}gF(function(){var u=i,c=HS(r),f=[];e:{var d=VF.get(e);if(d!==void 0){var p=ZS,v=e;switch(e){case"keypress":if(zy(r)===0)break e;case"keydown":case"keyup":p=Tde;break;case"focusin":v="focus",p=IC;break;case"focusout":v="blur",p=IC;break;case"beforeblur":case"afterblur":p=IC;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=iB;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=mde;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=Dde;break;case UF:case jF:case qF:p=vde;break;case zF:p=Ode;break;case"scroll":p=fde;break;case"wheel":p=Rde;break;case"copy":case"cut":case"paste":p=bde;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=sB}var h=(t&4)!==0,y=!h&&e==="scroll",g=h?d!==null?d+"Capture":null:d;h=[];for(var m=u,b;m!==null;){b=m;var E=b.stateNode;if(b.tag===5&&E!==null&&(b=E,g!==null&&(E=Rm(m,g),E!=null&&h.push(Um(m,E,b)))),y)break;m=m.return}0<h.length&&(d=new p(d,v,null,r,c),f.push({event:d,listeners:h}))}}if((t&7)===0){e:{if(d=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",d&&r!==iS&&(v=r.relatedTarget||r.fromElement)&&(iu(v)||v[ja]))break e;if((p||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,p?(v=r.relatedTarget||r.toElement,p=u,v=v?iu(v):null,v!==null&&(y=hu(v),v!==y||v.tag!==5&&v.tag!==6)&&(v=null)):(p=null,v=u),p!==v)){if(h=iB,E="onMouseLeave",g="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(h=sB,E="onPointerLeave",g="onPointerEnter",m="pointer"),y=p==null?d:Wc(p),b=v==null?d:Wc(v),d=new h(E,m+"leave",p,r,c),d.target=y,d.relatedTarget=b,E=null,iu(c)===u&&(h=new h(g,m+"enter",v,r,c),h.target=b,h.relatedTarget=y,E=h),y=E,p&&v)t:{for(h=p,g=v,m=0,b=h;b;b=Uc(b))m++;for(b=0,E=g;E;E=Uc(E))b++;for(;0<m-b;)h=Uc(h),m--;for(;0<b-m;)g=Uc(g),b--;for(;m--;){if(h===g||g!==null&&h===g.alternate)break t;h=Uc(h),g=Uc(g)}h=null}else h=null;p!==null&&bB(f,d,p,h,!1),v!==null&&y!==null&&bB(f,y,v,h,!0)}}e:{if(d=u?Wc(u):window,p=d.nodeName&&d.nodeName.toLowerCase(),p==="select"||p==="input"&&d.type==="file")var C=Ude;else if(cB(d))if(LF)C=Vde;else{C=qde;var x=jde}else(p=d.nodeName)&&p.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=zde);if(C&&(C=C(e,u))){NF(f,C,r,c);break e}x&&x(e,d,u),e==="focusout"&&(x=d._wrapperState)&&x.controlled&&d.type==="number"&&eS(d,"number",d.value)}switch(x=u?Wc(u):window,e){case"focusin":(cB(x)||x.contentEditable==="true")&&(Vc=x,fS=u,Tm=null);break;case"focusout":Tm=fS=Vc=null;break;case"mousedown":pS=!0;break;case"contextmenu":case"mouseup":case"dragend":pS=!1,mB(f,r,c);break;case"selectionchange":if(Gde)break;case"keydown":case"keyup":mB(f,r,c)}var P;if(JS)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else zc?IF(e,r)&&(N="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(N="onCompositionStart");N&&(OF&&r.locale!=="ko"&&(zc||N!=="onCompositionStart"?N==="onCompositionEnd"&&zc&&(P=kF()):(Us=c,XS="value"in Us?Us.value:Us.textContent,zc=!0)),x=ob(u,N),0<x.length&&(N=new aB(N,e,null,r,c),f.push({event:N,listeners:x}),P?N.data=P:(P=RF(r),P!==null&&(N.data=P)))),(P=Lde?Bde(e,r):Fde(e,r))&&(u=ob(u,"onBeforeInput"),0<u.length&&(c=new aB("onBeforeInput","beforeinput",null,r,c),f.push({event:c,listeners:u}),c.data=P))}HF(f,t)})}function Um(e,t,r){return{instance:e,listener:t,currentTarget:r}}function ob(e,t){for(var r=t+"Capture",n=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Rm(e,r),i!=null&&n.unshift(Um(e,i,o)),i=Rm(e,t),i!=null&&n.push(Um(e,i,o))),e=e.return}return n}function Uc(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function bB(e,t,r,n,o){for(var i=t._reactName,a=[];r!==null&&r!==n;){var s=r,l=s.alternate,u=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&u!==null&&(s=u,o?(l=Rm(r,i),l!=null&&a.unshift(Um(r,l,s))):o||(l=Rm(r,i),l!=null&&a.push(Um(r,l,s)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var Yde=/\r\n?/g,Xde=/\u0000|\uFFFD/g;function EB(e){return(typeof e=="string"?e:""+e).replace(Yde,`
|
|
7
|
-
`).replace(Xde,"")}function Ly(e,t,r){if(t=EB(t),EB(e)!==t&&r)throw Error(pe(425))}function ib(){}var mS=null,gS=null;function hS(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var vS=typeof setTimeout=="function"?setTimeout:void 0,Zde=typeof clearTimeout=="function"?clearTimeout:void 0,xB=typeof Promise=="function"?Promise:void 0,Qde=typeof queueMicrotask=="function"?queueMicrotask:typeof xB<"u"?function(e){return xB.resolve(null).then(e).catch(Jde)}:vS;function Jde(e){setTimeout(function(){throw e})}function FC(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),Bm(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);Bm(t)}function Hs(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function wB(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var pd=Math.random().toString(36).slice(2),ta="__reactFiber$"+pd,jm="__reactProps$"+pd,ja="__reactContainer$"+pd,yS="__reactEvents$"+pd,efe="__reactListeners$"+pd,tfe="__reactHandles$"+pd;function iu(e){var t=e[ta];if(t)return t;for(var r=e.parentNode;r;){if(t=r[ja]||r[ta]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=wB(e);e!==null;){if(r=e[ta])return r;e=wB(e)}return t}e=r,r=e.parentNode}return null}function Xm(e){return e=e[ta]||e[ja],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wc(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(pe(33))}function Sb(e){return e[jm]||null}var bS=[],Gc=-1;function Js(e){return{current:e}}function Kt(e){0>Gc||(e.current=bS[Gc],bS[Gc]=null,Gc--)}function zt(e,t){Gc++,bS[Gc]=e.current,e.current=t}var Zs={},bn=Js(Zs),Qn=Js(!1),cu=Zs;function ad(e,t){var r=e.type.contextTypes;if(!r)return Zs;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Jn(e){return e=e.childContextTypes,e!=null}function ab(){Kt(Qn),Kt(bn)}function _B(e,t,r){if(bn.current!==Zs)throw Error(pe(168));zt(bn,t),zt(Qn,r)}function GF(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(pe(108,jce(e)||"Unknown",o));return fr({},r,n)}function sb(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zs,cu=bn.current,zt(bn,e),zt(Qn,Qn.current),!0}function CB(e,t,r){var n=e.stateNode;if(!n)throw Error(pe(169));r?(e=GF(e,t,cu),n.__reactInternalMemoizedMergedChildContext=e,Kt(Qn),Kt(bn),zt(bn,e)):Kt(Qn),zt(Qn,r)}var Ba=null,Tb=!1,MC=!1;function KF(e){Ba===null?Ba=[e]:Ba.push(e)}function rfe(e){Tb=!0,KF(e)}function el(){if(!MC&&Ba!==null){MC=!0;var e=0,t=Ft;try{var r=Ba;for(Ft=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Ba=null,Tb=!1}catch(o){throw Ba!==null&&(Ba=Ba.slice(e+1)),bF(WS,el),o}finally{Ft=t,MC=!1}}return null}var Kc=[],Yc=0,lb=null,ub=0,Go=[],Ko=0,du=null,Fa=1,Ma="";function nu(e,t){Kc[Yc++]=ub,Kc[Yc++]=lb,lb=e,ub=t}function YF(e,t,r){Go[Ko++]=Fa,Go[Ko++]=Ma,Go[Ko++]=du,du=e;var n=Fa;e=Ma;var o=32-Pi(n)-1;n&=~(1<<o),r+=1;var i=32-Pi(t)+o;if(30<i){var a=o-o%5;i=(n&(1<<a)-1).toString(32),n>>=a,o-=a,Fa=1<<32-Pi(t)+o|r<<o|n,Ma=i+e}else Fa=1<<i|r<<o|n,Ma=e}function tT(e){e.return!==null&&(nu(e,1),YF(e,1,0))}function rT(e){for(;e===lb;)lb=Kc[--Yc],Kc[Yc]=null,ub=Kc[--Yc],Kc[Yc]=null;for(;e===du;)du=Go[--Ko],Go[Ko]=null,Ma=Go[--Ko],Go[Ko]=null,Fa=Go[--Ko],Go[Ko]=null}var xo=null,Eo=null,nr=!1,Ti=null;function XF(e,t){var r=Yo(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function SB(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,xo=e,Eo=Hs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,xo=e,Eo=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=du!==null?{id:Fa,overflow:Ma}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Yo(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,xo=e,Eo=null,!0):!1;default:return!1}}function ES(e){return(e.mode&1)!==0&&(e.flags&128)===0}function xS(e){if(nr){var t=Eo;if(t){var r=t;if(!SB(e,t)){if(ES(e))throw Error(pe(418));t=Hs(r.nextSibling);var n=xo;t&&SB(e,t)?XF(n,r):(e.flags=e.flags&-4097|2,nr=!1,xo=e)}}else{if(ES(e))throw Error(pe(418));e.flags=e.flags&-4097|2,nr=!1,xo=e}}}function TB(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;xo=e}function By(e){if(e!==xo)return!1;if(!nr)return TB(e),nr=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!hS(e.type,e.memoizedProps)),t&&(t=Eo)){if(ES(e))throw ZF(),Error(pe(418));for(;t;)XF(e,t),t=Hs(t.nextSibling)}if(TB(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(pe(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Eo=Hs(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Eo=null}}else Eo=xo?Hs(e.stateNode.nextSibling):null;return!0}function ZF(){for(var e=Eo;e;)e=Hs(e.nextSibling)}function sd(){Eo=xo=null,nr=!1}function nT(e){Ti===null?Ti=[e]:Ti.push(e)}var nfe=Va.ReactCurrentBatchConfig;function Ci(e,t){if(e&&e.defaultProps){t=fr({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}var cb=Js(null),db=null,Xc=null,oT=null;function iT(){oT=Xc=db=null}function aT(e){var t=cb.current;Kt(cb),e._currentValue=t}function wS(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function nd(e,t){db=e,oT=Xc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Zn=!0),e.firstContext=null)}function Zo(e){var t=e._currentValue;if(oT!==e)if(e={context:e,memoizedValue:t,next:null},Xc===null){if(db===null)throw Error(pe(308));Xc=e,db.dependencies={lanes:0,firstContext:e}}else Xc=Xc.next=e;return t}var au=null;function sT(e){au===null?au=[e]:au.push(e)}function QF(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,sT(t)):(r.next=o.next,o.next=r),t.interleaved=r,qa(e,n)}function qa(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Fs=!1;function lT(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function JF(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function $a(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ws(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Tt&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,qa(e,r)}return o=n.interleaved,o===null?(t.next=t,sT(n)):(t.next=o.next,o.next=t),n.interleaved=t,qa(e,r)}function Vy(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,GS(e,r)}}function PB(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?o=i=a:i=i.next=a,r=r.next}while(r!==null);i===null?o=i=t:i=i.next=t}else o=i=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function fb(e,t,r,n){var o=e.updateQueue;Fs=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,u=l.next;l.next=null,a===null?i=u:a.next=u,a=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==a&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(i!==null){var f=o.baseState;a=0,c=u=l=null,s=i;do{var d=s.lane,p=s.eventTime;if((n&d)===d){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,h=s;switch(d=t,p=r,h.tag){case 1:if(v=h.payload,typeof v=="function"){f=v.call(p,f,d);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=h.payload,d=typeof v=="function"?v.call(p,f,d):v,d==null)break e;f=fr({},f,d);break e;case 2:Fs=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=o.effects,d===null?o.effects=[s]:d.push(s))}else p={eventTime:p,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,l=f):c=c.next=p,a|=d;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;d=s,s=d.next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}while(!0);if(c===null&&(l=f),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);pu|=a,e.lanes=a,e.memoizedState=f}}function AB(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(o!==null){if(n.callback=null,n=r,typeof o!="function")throw Error(pe(191,o));o.call(n)}}}var eM=new QB.Component().refs;function _S(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:fr({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Pb={isMounted:function(e){return(e=e._reactInternals)?hu(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=On(),o=Ks(e),i=$a(n,o);i.payload=t,r!=null&&(i.callback=r),t=Ws(e,i,o),t!==null&&(Ai(t,e,o,n),Vy(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=On(),o=Ks(e),i=$a(n,o);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Ws(e,i,o),t!==null&&(Ai(t,e,o,n),Vy(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=On(),n=Ks(e),o=$a(r,n);o.tag=2,t!=null&&(o.callback=t),t=Ws(e,o,n),t!==null&&(Ai(t,e,n,r),Vy(t,e,n))}};function DB(e,t,r,n,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,a):t.prototype&&t.prototype.isPureReactComponent?!Mm(r,n)||!Mm(o,i):!0}function tM(e,t,r){var n=!1,o=Zs,i=t.contextType;return typeof i=="object"&&i!==null?i=Zo(i):(o=Jn(t)?cu:bn.current,n=t.contextTypes,i=(n=n!=null)?ad(e,o):Zs),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Pb,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function kB(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Pb.enqueueReplaceState(t,t.state,null)}function CS(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs=eM,lT(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Zo(i):(i=Jn(t)?cu:bn.current,o.context=ad(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(_S(e,t,i,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Pb.enqueueReplaceState(o,o.state,null),fb(e,r,o,n),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function mm(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(pe(309));var n=r.stateNode}if(!n)throw Error(pe(147,e));var o=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var s=o.refs;s===eM&&(s=o.refs={}),a===null?delete s[i]:s[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(pe(284));if(!r._owner)throw Error(pe(290,e))}return e}function Fy(e,t){throw e=Object.prototype.toString.call(t),Error(pe(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function OB(e){var t=e._init;return t(e._payload)}function rM(e){function t(g,m){if(e){var b=g.deletions;b===null?(g.deletions=[m],g.flags|=16):b.push(m)}}function r(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function n(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function o(g,m){return g=Ys(g,m),g.index=0,g.sibling=null,g}function i(g,m,b){return g.index=b,e?(b=g.alternate,b!==null?(b=b.index,b<m?(g.flags|=2,m):b):(g.flags|=2,m)):(g.flags|=1048576,m)}function a(g){return e&&g.alternate===null&&(g.flags|=2),g}function s(g,m,b,E){return m===null||m.tag!==6?(m=HC(b,g.mode,E),m.return=g,m):(m=o(m,b),m.return=g,m)}function l(g,m,b,E){var C=b.type;return C===qc?c(g,m,b.props.children,E,b.key):m!==null&&(m.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Bs&&OB(C)===m.type)?(E=o(m,b.props),E.ref=mm(g,m,b),E.return=g,E):(E=Xy(b.type,b.key,b.props,null,g.mode,E),E.ref=mm(g,m,b),E.return=g,E)}function u(g,m,b,E){return m===null||m.tag!==4||m.stateNode.containerInfo!==b.containerInfo||m.stateNode.implementation!==b.implementation?(m=WC(b,g.mode,E),m.return=g,m):(m=o(m,b.children||[]),m.return=g,m)}function c(g,m,b,E,C){return m===null||m.tag!==7?(m=uu(b,g.mode,E,C),m.return=g,m):(m=o(m,b),m.return=g,m)}function f(g,m,b){if(typeof m=="string"&&m!==""||typeof m=="number")return m=HC(""+m,g.mode,b),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case wy:return b=Xy(m.type,m.key,m.props,null,g.mode,b),b.ref=mm(g,null,m),b.return=g,b;case jc:return m=WC(m,g.mode,b),m.return=g,m;case Bs:var E=m._init;return f(g,E(m._payload),b)}if(bm(m)||cm(m))return m=uu(m,g.mode,b,null),m.return=g,m;Fy(g,m)}return null}function d(g,m,b,E){var C=m!==null?m.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return C!==null?null:s(g,m,""+b,E);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case wy:return b.key===C?l(g,m,b,E):null;case jc:return b.key===C?u(g,m,b,E):null;case Bs:return C=b._init,d(g,m,C(b._payload),E)}if(bm(b)||cm(b))return C!==null?null:c(g,m,b,E,null);Fy(g,b)}return null}function p(g,m,b,E,C){if(typeof E=="string"&&E!==""||typeof E=="number")return g=g.get(b)||null,s(m,g,""+E,C);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case wy:return g=g.get(E.key===null?b:E.key)||null,l(m,g,E,C);case jc:return g=g.get(E.key===null?b:E.key)||null,u(m,g,E,C);case Bs:var x=E._init;return p(g,m,b,x(E._payload),C)}if(bm(E)||cm(E))return g=g.get(b)||null,c(m,g,E,C,null);Fy(m,E)}return null}function v(g,m,b,E){for(var C=null,x=null,P=m,N=m=0,D=null;P!==null&&N<b.length;N++){P.index>N?(D=P,P=null):D=P.sibling;var R=d(g,P,b[N],E);if(R===null){P===null&&(P=D);break}e&&P&&R.alternate===null&&t(g,P),m=i(R,m,N),x===null?C=R:x.sibling=R,x=R,P=D}if(N===b.length)return r(g,P),nr&&nu(g,N),C;if(P===null){for(;N<b.length;N++)P=f(g,b[N],E),P!==null&&(m=i(P,m,N),x===null?C=P:x.sibling=P,x=P);return nr&&nu(g,N),C}for(P=n(g,P);N<b.length;N++)D=p(P,g,N,b[N],E),D!==null&&(e&&D.alternate!==null&&P.delete(D.key===null?N:D.key),m=i(D,m,N),x===null?C=D:x.sibling=D,x=D);return e&&P.forEach(function(M){return t(g,M)}),nr&&nu(g,N),C}function h(g,m,b,E){var C=cm(b);if(typeof C!="function")throw Error(pe(150));if(b=C.call(b),b==null)throw Error(pe(151));for(var x=C=null,P=m,N=m=0,D=null,R=b.next();P!==null&&!R.done;N++,R=b.next()){P.index>N?(D=P,P=null):D=P.sibling;var M=d(g,P,R.value,E);if(M===null){P===null&&(P=D);break}e&&P&&M.alternate===null&&t(g,P),m=i(M,m,N),x===null?C=M:x.sibling=M,x=M,P=D}if(R.done)return r(g,P),nr&&nu(g,N),C;if(P===null){for(;!R.done;N++,R=b.next())R=f(g,R.value,E),R!==null&&(m=i(R,m,N),x===null?C=R:x.sibling=R,x=R);return nr&&nu(g,N),C}for(P=n(g,P);!R.done;N++,R=b.next())R=p(P,g,N,R.value,E),R!==null&&(e&&R.alternate!==null&&P.delete(R.key===null?N:R.key),m=i(R,m,N),x===null?C=R:x.sibling=R,x=R);return e&&P.forEach(function(I){return t(g,I)}),nr&&nu(g,N),C}function y(g,m,b,E){if(typeof b=="object"&&b!==null&&b.type===qc&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case wy:e:{for(var C=b.key,x=m;x!==null;){if(x.key===C){if(C=b.type,C===qc){if(x.tag===7){r(g,x.sibling),m=o(x,b.props.children),m.return=g,g=m;break e}}else if(x.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Bs&&OB(C)===x.type){r(g,x.sibling),m=o(x,b.props),m.ref=mm(g,x,b),m.return=g,g=m;break e}r(g,x);break}else t(g,x);x=x.sibling}b.type===qc?(m=uu(b.props.children,g.mode,E,b.key),m.return=g,g=m):(E=Xy(b.type,b.key,b.props,null,g.mode,E),E.ref=mm(g,m,b),E.return=g,g=E)}return a(g);case jc:e:{for(x=b.key;m!==null;){if(m.key===x)if(m.tag===4&&m.stateNode.containerInfo===b.containerInfo&&m.stateNode.implementation===b.implementation){r(g,m.sibling),m=o(m,b.children||[]),m.return=g,g=m;break e}else{r(g,m);break}else t(g,m);m=m.sibling}m=WC(b,g.mode,E),m.return=g,g=m}return a(g);case Bs:return x=b._init,y(g,m,x(b._payload),E)}if(bm(b))return v(g,m,b,E);if(cm(b))return h(g,m,b,E);Fy(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,m!==null&&m.tag===6?(r(g,m.sibling),m=o(m,b),m.return=g,g=m):(r(g,m),m=HC(b,g.mode,E),m.return=g,g=m),a(g)):r(g,m)}return y}var ld=rM(!0),nM=rM(!1),Zm={},na=Js(Zm),qm=Js(Zm),zm=Js(Zm);function su(e){if(e===Zm)throw Error(pe(174));return e}function uT(e,t){switch(zt(zm,t),zt(qm,e),zt(na,Zm),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:rS(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=rS(t,e)}Kt(na),zt(na,t)}function ud(){Kt(na),Kt(qm),Kt(zm)}function oM(e){su(zm.current);var t=su(na.current),r=rS(t,e.type);t!==r&&(zt(qm,e),zt(na,r))}function cT(e){qm.current===e&&(Kt(na),Kt(qm))}var cr=Js(0);function pb(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $C=[];function dT(){for(var e=0;e<$C.length;e++)$C[e]._workInProgressVersionPrimary=null;$C.length=0}var Hy=Va.ReactCurrentDispatcher,UC=Va.ReactCurrentBatchConfig,fu=0,dr=null,kr=null,qr=null,mb=!1,Pm=!1,Vm=0,ofe=0;function hn(){throw Error(pe(321))}function fT(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Di(e[r],t[r]))return!1;return!0}function pT(e,t,r,n,o,i){if(fu=i,dr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Hy.current=e===null||e.memoizedState===null?lfe:ufe,e=r(n,o),Pm){i=0;do{if(Pm=!1,Vm=0,25<=i)throw Error(pe(301));i+=1,qr=kr=null,t.updateQueue=null,Hy.current=cfe,e=r(n,o)}while(Pm)}if(Hy.current=gb,t=kr!==null&&kr.next!==null,fu=0,qr=kr=dr=null,mb=!1,t)throw Error(pe(300));return e}function mT(){var e=Vm!==0;return Vm=0,e}function ea(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qr===null?dr.memoizedState=qr=e:qr=qr.next=e,qr}function Qo(){if(kr===null){var e=dr.alternate;e=e!==null?e.memoizedState:null}else e=kr.next;var t=qr===null?dr.memoizedState:qr.next;if(t!==null)qr=t,kr=e;else{if(e===null)throw Error(pe(310));kr=e,e={memoizedState:kr.memoizedState,baseState:kr.baseState,baseQueue:kr.baseQueue,queue:kr.queue,next:null},qr===null?dr.memoizedState=qr=e:qr=qr.next=e}return qr}function Hm(e,t){return typeof t=="function"?t(e):t}function jC(e){var t=Qo(),r=t.queue;if(r===null)throw Error(pe(311));r.lastRenderedReducer=e;var n=kr,o=n.baseQueue,i=r.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}n.baseQueue=o=i,r.pending=null}if(o!==null){i=o.next,n=n.baseState;var s=a=null,l=null,u=i;do{var c=u.lane;if((fu&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=f,a=n):l=l.next=f,dr.lanes|=c,pu|=c}u=u.next}while(u!==null&&u!==i);l===null?a=n:l.next=s,Di(n,t.memoizedState)||(Zn=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){o=e;do i=o.lane,dr.lanes|=i,pu|=i,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function qC(e){var t=Qo(),r=t.queue;if(r===null)throw Error(pe(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,i=t.memoizedState;if(o!==null){r.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);Di(i,t.memoizedState)||(Zn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function iM(){}function aM(e,t){var r=dr,n=Qo(),o=t(),i=!Di(n.memoizedState,o);if(i&&(n.memoizedState=o,Zn=!0),n=n.queue,gT(uM.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||qr!==null&&qr.memoizedState.tag&1){if(r.flags|=2048,Wm(9,lM.bind(null,r,n,o,t),void 0,null),zr===null)throw Error(pe(349));(fu&30)!==0||sM(r,t,o)}return o}function sM(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=dr.updateQueue,t===null?(t={lastEffect:null,stores:null},dr.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function lM(e,t,r,n){t.value=r,t.getSnapshot=n,cM(t)&&dM(e)}function uM(e,t,r){return r(function(){cM(t)&&dM(e)})}function cM(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Di(e,r)}catch{return!0}}function dM(e){var t=qa(e,1);t!==null&&Ai(t,e,1,-1)}function IB(e){var t=ea();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hm,lastRenderedState:e},t.queue=e,e=e.dispatch=sfe.bind(null,dr,e),[t.memoizedState,e]}function Wm(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=dr.updateQueue,t===null?(t={lastEffect:null,stores:null},dr.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function fM(){return Qo().memoizedState}function Wy(e,t,r,n){var o=ea();dr.flags|=e,o.memoizedState=Wm(1|t,r,void 0,n===void 0?null:n)}function Ab(e,t,r,n){var o=Qo();n=n===void 0?null:n;var i=void 0;if(kr!==null){var a=kr.memoizedState;if(i=a.destroy,n!==null&&fT(n,a.deps)){o.memoizedState=Wm(t,r,i,n);return}}dr.flags|=e,o.memoizedState=Wm(1|t,r,i,n)}function RB(e,t){return Wy(8390656,8,e,t)}function gT(e,t){return Ab(2048,8,e,t)}function pM(e,t){return Ab(4,2,e,t)}function mM(e,t){return Ab(4,4,e,t)}function gM(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function hM(e,t,r){return r=r!=null?r.concat([e]):null,Ab(4,4,gM.bind(null,t,e),r)}function hT(){}function vM(e,t){var r=Qo();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&fT(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function yM(e,t){var r=Qo();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&fT(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function bM(e,t,r){return(fu&21)===0?(e.baseState&&(e.baseState=!1,Zn=!0),e.memoizedState=r):(Di(r,t)||(r=wF(),dr.lanes|=r,pu|=r,e.baseState=!0),t)}function ife(e,t){var r=Ft;Ft=r!==0&&4>r?r:4,e(!0);var n=UC.transition;UC.transition={};try{e(!1),t()}finally{Ft=r,UC.transition=n}}function EM(){return Qo().memoizedState}function afe(e,t,r){var n=Ks(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},xM(e))wM(t,r);else if(r=QF(e,t,r,n),r!==null){var o=On();Ai(r,e,n,o),_M(r,t,n)}}function sfe(e,t,r){var n=Ks(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(xM(e))wM(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,r);if(o.hasEagerState=!0,o.eagerState=s,Di(s,a)){var l=t.interleaved;l===null?(o.next=o,sT(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}r=QF(e,t,o,n),r!==null&&(o=On(),Ai(r,e,n,o),_M(r,t,n))}}function xM(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function wM(e,t){Pm=mb=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function _M(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,GS(e,r)}}var gb={readContext:Zo,useCallback:hn,useContext:hn,useEffect:hn,useImperativeHandle:hn,useInsertionEffect:hn,useLayoutEffect:hn,useMemo:hn,useReducer:hn,useRef:hn,useState:hn,useDebugValue:hn,useDeferredValue:hn,useTransition:hn,useMutableSource:hn,useSyncExternalStore:hn,useId:hn,unstable_isNewReconciler:!1},lfe={readContext:Zo,useCallback:function(e,t){return ea().memoizedState=[e,t===void 0?null:t],e},useContext:Zo,useEffect:RB,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Wy(4194308,4,gM.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Wy(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wy(4,2,e,t)},useMemo:function(e,t){var r=ea();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=ea();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=afe.bind(null,dr,e),[n.memoizedState,e]},useRef:function(e){var t=ea();return e={current:e},t.memoizedState=e},useState:IB,useDebugValue:hT,useDeferredValue:function(e){return ea().memoizedState=e},useTransition:function(){var e=IB(!1),t=e[0];return e=ife.bind(null,e[1]),ea().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=dr,o=ea();if(nr){if(r===void 0)throw Error(pe(407));r=r()}else{if(r=t(),zr===null)throw Error(pe(349));(fu&30)!==0||sM(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,RB(uM.bind(null,n,i,e),[e]),n.flags|=2048,Wm(9,lM.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=ea(),t=zr.identifierPrefix;if(nr){var r=Ma,n=Fa;r=(n&~(1<<32-Pi(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Vm++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=ofe++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ufe={readContext:Zo,useCallback:vM,useContext:Zo,useEffect:gT,useImperativeHandle:hM,useInsertionEffect:pM,useLayoutEffect:mM,useMemo:yM,useReducer:jC,useRef:fM,useState:function(){return jC(Hm)},useDebugValue:hT,useDeferredValue:function(e){var t=Qo();return bM(t,kr.memoizedState,e)},useTransition:function(){var e=jC(Hm)[0],t=Qo().memoizedState;return[e,t]},useMutableSource:iM,useSyncExternalStore:aM,useId:EM,unstable_isNewReconciler:!1},cfe={readContext:Zo,useCallback:vM,useContext:Zo,useEffect:gT,useImperativeHandle:hM,useInsertionEffect:pM,useLayoutEffect:mM,useMemo:yM,useReducer:qC,useRef:fM,useState:function(){return qC(Hm)},useDebugValue:hT,useDeferredValue:function(e){var t=Qo();return kr===null?t.memoizedState=e:bM(t,kr.memoizedState,e)},useTransition:function(){var e=qC(Hm)[0],t=Qo().memoizedState;return[e,t]},useMutableSource:iM,useSyncExternalStore:aM,useId:EM,unstable_isNewReconciler:!1};function cd(e,t){try{var r="",n=t;do r+=Uce(n),n=n.return;while(n);var o=r}catch(i){o=`
|
|
8
|
-
Error generating stack: `+i.message+`
|
|
9
|
-
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function zC(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function SS(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var dfe=typeof WeakMap=="function"?WeakMap:Map;function CM(e,t,r){r=$a(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){vb||(vb=!0,LS=n),SS(e,t)},r}function SM(e,t,r){r=$a(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){SS(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){SS(e,t),typeof n!="function"&&(Gs===null?Gs=new Set([this]):Gs.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function NB(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new dfe;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=Sfe.bind(null,e,t,r),t.then(e,e))}function LB(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function BB(e,t,r,n,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=$a(-1,1),t.tag=2,Ws(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var ffe=Va.ReactCurrentOwner,Zn=!1;function kn(e,t,r,n){t.child=e===null?nM(t,null,r,n):ld(t,e.child,r,n)}function FB(e,t,r,n,o){r=r.render;var i=t.ref;return nd(t,o),n=pT(e,t,r,n,i,o),r=mT(),e!==null&&!Zn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,za(e,t,o)):(nr&&r&&tT(t),t.flags|=1,kn(e,t,n,o),t.child)}function MB(e,t,r,n,o){if(e===null){var i=r.type;return typeof i=="function"&&!CT(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,TM(e,t,i,n,o)):(e=Xy(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var a=i.memoizedProps;if(r=r.compare,r=r!==null?r:Mm,r(a,n)&&e.ref===t.ref)return za(e,t,o)}return t.flags|=1,e=Ys(i,n),e.ref=t.ref,e.return=t,t.child=e}function TM(e,t,r,n,o){if(e!==null){var i=e.memoizedProps;if(Mm(i,n)&&e.ref===t.ref)if(Zn=!1,t.pendingProps=n=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(Zn=!0);else return t.lanes=e.lanes,za(e,t,o)}return TS(e,t,r,n,o)}function PM(e,t,r){var n=t.pendingProps,o=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},zt(Qc,bo),bo|=r;else{if((r&1073741824)===0)return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,zt(Qc,bo),bo|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,zt(Qc,bo),bo|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,zt(Qc,bo),bo|=n;return kn(e,t,o,r),t.child}function AM(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function TS(e,t,r,n,o){var i=Jn(r)?cu:bn.current;return i=ad(t,i),nd(t,o),r=pT(e,t,r,n,i,o),n=mT(),e!==null&&!Zn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,za(e,t,o)):(nr&&n&&tT(t),t.flags|=1,kn(e,t,r,o),t.child)}function $B(e,t,r,n,o){if(Jn(r)){var i=!0;sb(t)}else i=!1;if(nd(t,o),t.stateNode===null)Gy(e,t),tM(t,r,n),CS(t,r,n,o),n=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=r.contextType;typeof u=="object"&&u!==null?u=Zo(u):(u=Jn(r)?cu:bn.current,u=ad(t,u));var c=r.getDerivedStateFromProps,f=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==n||l!==u)&&kB(t,a,n,u),Fs=!1;var d=t.memoizedState;a.state=d,fb(t,n,a,o),l=t.memoizedState,s!==n||d!==l||Qn.current||Fs?(typeof c=="function"&&(_S(t,r,c,n),l=t.memoizedState),(s=Fs||DB(t,r,s,n,d,l,u))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),a.props=n,a.state=l,a.context=u,n=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,JF(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Ci(t.type,s),a.props=u,f=t.pendingProps,d=a.context,l=r.contextType,typeof l=="object"&&l!==null?l=Zo(l):(l=Jn(r)?cu:bn.current,l=ad(t,l));var p=r.getDerivedStateFromProps;(c=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==f||d!==l)&&kB(t,a,n,l),Fs=!1,d=t.memoizedState,a.state=d,fb(t,n,a,o);var v=t.memoizedState;s!==f||d!==v||Qn.current||Fs?(typeof p=="function"&&(_S(t,r,p,n),v=t.memoizedState),(u=Fs||DB(t,r,u,n,d,v,l)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,v,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,v,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=v),a.props=n,a.state=v,a.context=l,n=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),n=!1)}return PS(e,t,r,n,i,o)}function PS(e,t,r,n,o,i){AM(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return o&&CB(t,r,!1),za(e,t,i);n=t.stateNode,ffe.current=t;var s=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=ld(t,e.child,null,i),t.child=ld(t,null,s,i)):kn(e,t,s,i),t.memoizedState=n.state,o&&CB(t,r,!0),t.child}function DM(e){var t=e.stateNode;t.pendingContext?_B(e,t.pendingContext,t.pendingContext!==t.context):t.context&&_B(e,t.context,!1),uT(e,t.containerInfo)}function UB(e,t,r,n,o){return sd(),nT(o),t.flags|=256,kn(e,t,r,n),t.child}var AS={dehydrated:null,treeContext:null,retryLane:0};function DS(e){return{baseLanes:e,cachePool:null,transitions:null}}function kM(e,t,r){var n=t.pendingProps,o=cr.current,i=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),zt(cr,o&1),e===null)return xS(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=n.children,e=n.fallback,i?(n=t.mode,i=t.child,a={mode:"hidden",children:a},(n&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=a):i=Ob(a,n,0,null),e=uu(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=DS(r),t.memoizedState=AS,e):vT(t,a));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return pfe(e,t,a,n,s,o,r);if(i){i=n.fallback,a=t.mode,o=e.child,s=o.sibling;var l={mode:"hidden",children:n.children};return(a&1)===0&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Ys(o,l),n.subtreeFlags=o.subtreeFlags&14680064),s!==null?i=Ys(s,i):(i=uu(i,a,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,a=e.child.memoizedState,a=a===null?DS(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~r,t.memoizedState=AS,n}return i=e.child,e=i.sibling,n=Ys(i,{mode:"visible",children:n.children}),(t.mode&1)===0&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function vT(e,t){return t=Ob({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function My(e,t,r,n){return n!==null&&nT(n),ld(t,e.child,null,r),e=vT(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pfe(e,t,r,n,o,i,a){if(r)return t.flags&256?(t.flags&=-257,n=zC(Error(pe(422))),My(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,o=t.mode,n=Ob({mode:"visible",children:n.children},o,0,null),i=uu(i,o,a,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,(t.mode&1)!==0&&ld(t,e.child,null,a),t.child.memoizedState=DS(a),t.memoizedState=AS,i);if((t.mode&1)===0)return My(e,t,a,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var s=n.dgst;return n=s,i=Error(pe(419)),n=zC(i,n,void 0),My(e,t,a,n)}if(s=(a&e.childLanes)!==0,Zn||s){if(n=zr,n!==null){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(n.suspendedLanes|a))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,qa(e,o),Ai(n,e,o,-1))}return _T(),n=zC(Error(pe(421))),My(e,t,a,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Tfe.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Eo=Hs(o.nextSibling),xo=t,nr=!0,Ti=null,e!==null&&(Go[Ko++]=Fa,Go[Ko++]=Ma,Go[Ko++]=du,Fa=e.id,Ma=e.overflow,du=t),t=vT(t,n.children),t.flags|=4096,t)}function jB(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),wS(e.return,t,r)}function VC(e,t,r,n,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=o)}function OM(e,t,r){var n=t.pendingProps,o=n.revealOrder,i=n.tail;if(kn(e,t,n.children,r),n=cr.current,(n&2)!==0)n=n&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jB(e,r,t);else if(e.tag===19)jB(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(zt(cr,n),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&pb(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),VC(t,!1,o,r,i);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&pb(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}VC(t,!0,r,null,i);break;case"together":VC(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Gy(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function za(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),pu|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(pe(153));if(t.child!==null){for(e=t.child,r=Ys(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Ys(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function mfe(e,t,r){switch(t.tag){case 3:DM(t),sd();break;case 5:oM(t);break;case 1:Jn(t.type)&&sb(t);break;case 4:uT(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;zt(cb,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(zt(cr,cr.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?kM(e,t,r):(zt(cr,cr.current&1),e=za(e,t,r),e!==null?e.sibling:null);zt(cr,cr.current&1);break;case 19:if(n=(r&t.childLanes)!==0,(e.flags&128)!==0){if(n)return OM(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),zt(cr,cr.current),n)break;return null;case 22:case 23:return t.lanes=0,PM(e,t,r)}return za(e,t,r)}var IM,kS,RM,NM;IM=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};kS=function(){};RM=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,su(na.current);var i=null;switch(r){case"input":o=QC(e,o),n=QC(e,n),i=[];break;case"select":o=fr({},o,{value:void 0}),n=fr({},n,{value:void 0}),i=[];break;case"textarea":o=tS(e,o),n=tS(e,n),i=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=ib)}nS(r,n);var a;r=null;for(u in o)if(!n.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var s=o[u];for(a in s)s.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Om.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var l=n[u];if(s=o!=null?o[u]:void 0,n.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(r||(r={}),r[a]=l[a])}else r||(i||(i=[]),i.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Om.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Gt("scroll",e),i||s===l||(i=[])):(i=i||[]).push(u,l))}r&&(i=i||[]).push("style",r);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};NM=function(e,t,r,n){r!==n&&(t.flags|=4)};function gm(e,t){if(!nr)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function vn(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags&14680064,n|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function gfe(e,t,r){var n=t.pendingProps;switch(rT(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vn(t),null;case 1:return Jn(t.type)&&ab(),vn(t),null;case 3:return n=t.stateNode,ud(),Kt(Qn),Kt(bn),dT(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(By(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ti!==null&&(MS(Ti),Ti=null))),kS(e,t),vn(t),null;case 5:cT(t);var o=su(zm.current);if(r=t.type,e!==null&&t.stateNode!=null)RM(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(pe(166));return vn(t),null}if(e=su(na.current),By(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[ta]=t,n[jm]=i,e=(t.mode&1)!==0,r){case"dialog":Gt("cancel",n),Gt("close",n);break;case"iframe":case"object":case"embed":Gt("load",n);break;case"video":case"audio":for(o=0;o<xm.length;o++)Gt(xm[o],n);break;case"source":Gt("error",n);break;case"img":case"image":case"link":Gt("error",n),Gt("load",n);break;case"details":Gt("toggle",n);break;case"input":YL(n,i),Gt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Gt("invalid",n);break;case"textarea":ZL(n,i),Gt("invalid",n)}nS(r,i),o=null;for(var a in i)if(i.hasOwnProperty(a)){var s=i[a];a==="children"?typeof s=="string"?n.textContent!==s&&(i.suppressHydrationWarning!==!0&&Ly(n.textContent,s,e),o=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(i.suppressHydrationWarning!==!0&&Ly(n.textContent,s,e),o=["children",""+s]):Om.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&Gt("scroll",n)}switch(r){case"input":_y(n),XL(n,i,!0);break;case"textarea":_y(n),QL(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=ib)}n=o,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=sF(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[ta]=t,e[jm]=n,IM(e,t,!1,!1),t.stateNode=e;e:{switch(a=oS(r,n),r){case"dialog":Gt("cancel",e),Gt("close",e),o=n;break;case"iframe":case"object":case"embed":Gt("load",e),o=n;break;case"video":case"audio":for(o=0;o<xm.length;o++)Gt(xm[o],e);o=n;break;case"source":Gt("error",e),o=n;break;case"img":case"image":case"link":Gt("error",e),Gt("load",e),o=n;break;case"details":Gt("toggle",e),o=n;break;case"input":YL(e,n),o=QC(e,n),Gt("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=fr({},n,{value:void 0}),Gt("invalid",e);break;case"textarea":ZL(e,n),o=tS(e,n),Gt("invalid",e);break;default:o=n}nS(r,o),s=o;for(i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="style"?cF(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&lF(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Im(e,l):typeof l=="number"&&Im(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Om.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Gt("scroll",e):l!=null&&jS(e,i,l,a))}switch(r){case"input":_y(e),XL(e,n,!1);break;case"textarea":_y(e),QL(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Xs(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Jc(e,!!n.multiple,i,!1):n.defaultValue!=null&&Jc(e,!!n.multiple,n.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ib)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return vn(t),null;case 6:if(e&&t.stateNode!=null)NM(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(pe(166));if(r=su(zm.current),su(na.current),By(t)){if(n=t.stateNode,r=t.memoizedProps,n[ta]=t,(i=n.nodeValue!==r)&&(e=xo,e!==null))switch(e.tag){case 3:Ly(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ly(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[ta]=t,t.stateNode=n}return vn(t),null;case 13:if(Kt(cr),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(nr&&Eo!==null&&(t.mode&1)!==0&&(t.flags&128)===0)ZF(),sd(),t.flags|=98560,i=!1;else if(i=By(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(pe(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(pe(317));i[ta]=t}else sd(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vn(t),i=!1}else Ti!==null&&(MS(Ti),Ti=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(cr.current&1)!==0?Or===0&&(Or=3):_T())),t.updateQueue!==null&&(t.flags|=4),vn(t),null);case 4:return ud(),kS(e,t),e===null&&$m(t.stateNode.containerInfo),vn(t),null;case 10:return aT(t.type._context),vn(t),null;case 17:return Jn(t.type)&&ab(),vn(t),null;case 19:if(Kt(cr),i=t.memoizedState,i===null)return vn(t),null;if(n=(t.flags&128)!==0,a=i.rendering,a===null)if(n)gm(i,!1);else{if(Or!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=pb(e),a!==null){for(t.flags|=128,gm(i,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return zt(cr,cr.current&1|2),t.child}e=e.sibling}i.tail!==null&&br()>dd&&(t.flags|=128,n=!0,gm(i,!1),t.lanes=4194304)}else{if(!n)if(e=pb(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),gm(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!nr)return vn(t),null}else 2*br()-i.renderingStartTime>dd&&r!==1073741824&&(t.flags|=128,n=!0,gm(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(r=i.last,r!==null?r.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=br(),t.sibling=null,r=cr.current,zt(cr,n?r&1|2:r&1),t):(vn(t),null);case 22:case 23:return wT(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?(bo&1073741824)!==0&&(vn(t),t.subtreeFlags&6&&(t.flags|=8192)):vn(t),null;case 24:return null;case 25:return null}throw Error(pe(156,t.tag))}function hfe(e,t){switch(rT(t),t.tag){case 1:return Jn(t.type)&&ab(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ud(),Kt(Qn),Kt(bn),dT(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return cT(t),null;case 13:if(Kt(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(pe(340));sd()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Kt(cr),null;case 4:return ud(),null;case 10:return aT(t.type._context),null;case 22:case 23:return wT(),null;case 24:return null;default:return null}}var $y=!1,yn=!1,vfe=typeof WeakSet=="function"?WeakSet:Set,De=null;function Zc(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){gr(e,t,n)}else r.current=null}function OS(e,t,r){try{r()}catch(n){gr(e,t,n)}}var qB=!1;function yfe(e,t){if(mS=rb,e=MF(),eT(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,s=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==r||o!==0&&f.nodeType!==3||(s=a+o),f!==i||n!==0&&f.nodeType!==3||(l=a+n),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===r&&++u===o&&(s=a),d===i&&++c===n&&(l=a),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(gS={focusedElem:e,selectionRange:r},rb=!1,De=t;De!==null;)if(t=De,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,De=e;else for(;De!==null;){t=De;try{var v=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var h=v.memoizedProps,y=v.memoizedState,g=t.stateNode,m=g.getSnapshotBeforeUpdate(t.elementType===t.type?h:Ci(t.type,h),y);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(pe(163))}}catch(E){gr(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,De=e;break}De=t.return}return v=qB,qB=!1,v}function Am(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&OS(t,r,i)}o=o.next}while(o!==n)}}function Db(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function IS(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function LM(e){var t=e.alternate;t!==null&&(e.alternate=null,LM(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ta],delete t[jm],delete t[yS],delete t[efe],delete t[tfe])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function BM(e){return e.tag===5||e.tag===3||e.tag===4}function zB(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||BM(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function RS(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ib));else if(n!==4&&(e=e.child,e!==null))for(RS(e,t,r),e=e.sibling;e!==null;)RS(e,t,r),e=e.sibling}function NS(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(NS(e,t,r),e=e.sibling;e!==null;)NS(e,t,r),e=e.sibling}var Qr=null,Si=!1;function Ls(e,t,r){for(r=r.child;r!==null;)FM(e,t,r),r=r.sibling}function FM(e,t,r){if(ra&&typeof ra.onCommitFiberUnmount=="function")try{ra.onCommitFiberUnmount(xb,r)}catch{}switch(r.tag){case 5:yn||Zc(r,t);case 6:var n=Qr,o=Si;Qr=null,Ls(e,t,r),Qr=n,Si=o,Qr!==null&&(Si?(e=Qr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Qr.removeChild(r.stateNode));break;case 18:Qr!==null&&(Si?(e=Qr,r=r.stateNode,e.nodeType===8?FC(e.parentNode,r):e.nodeType===1&&FC(e,r),Bm(e)):FC(Qr,r.stateNode));break;case 4:n=Qr,o=Si,Qr=r.stateNode.containerInfo,Si=!0,Ls(e,t,r),Qr=n,Si=o;break;case 0:case 11:case 14:case 15:if(!yn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&OS(r,t,a),o=o.next}while(o!==n)}Ls(e,t,r);break;case 1:if(!yn&&(Zc(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){gr(r,t,s)}Ls(e,t,r);break;case 21:Ls(e,t,r);break;case 22:r.mode&1?(yn=(n=yn)||r.memoizedState!==null,Ls(e,t,r),yn=n):Ls(e,t,r);break;default:Ls(e,t,r)}}function VB(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new vfe),t.forEach(function(n){var o=Pfe.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function _i(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];try{var i=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:Qr=s.stateNode,Si=!1;break e;case 3:Qr=s.stateNode.containerInfo,Si=!0;break e;case 4:Qr=s.stateNode.containerInfo,Si=!0;break e}s=s.return}if(Qr===null)throw Error(pe(160));FM(i,a,o),Qr=null,Si=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(u){gr(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)MM(t,e),t=t.sibling}function MM(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(_i(t,e),Ji(e),n&4){try{Am(3,e,e.return),Db(3,e)}catch(h){gr(e,e.return,h)}try{Am(5,e,e.return)}catch(h){gr(e,e.return,h)}}break;case 1:_i(t,e),Ji(e),n&512&&r!==null&&Zc(r,r.return);break;case 5:if(_i(t,e),Ji(e),n&512&&r!==null&&Zc(r,r.return),e.flags&32){var o=e.stateNode;try{Im(o,"")}catch(h){gr(e,e.return,h)}}if(n&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,a=r!==null?r.memoizedProps:i,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&i.type==="radio"&&i.name!=null&&iF(o,i),oS(s,a);var u=oS(s,i);for(a=0;a<l.length;a+=2){var c=l[a],f=l[a+1];c==="style"?cF(o,f):c==="dangerouslySetInnerHTML"?lF(o,f):c==="children"?Im(o,f):jS(o,c,f,u)}switch(s){case"input":JC(o,i);break;case"textarea":aF(o,i);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Jc(o,!!i.multiple,p,!1):d!==!!i.multiple&&(i.defaultValue!=null?Jc(o,!!i.multiple,i.defaultValue,!0):Jc(o,!!i.multiple,i.multiple?[]:"",!1))}o[jm]=i}catch(h){gr(e,e.return,h)}}break;case 6:if(_i(t,e),Ji(e),n&4){if(e.stateNode===null)throw Error(pe(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(h){gr(e,e.return,h)}}break;case 3:if(_i(t,e),Ji(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Bm(t.containerInfo)}catch(h){gr(e,e.return,h)}break;case 4:_i(t,e),Ji(e);break;case 13:_i(t,e),Ji(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(ET=br())),n&4&&VB(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(yn=(u=yn)||c,_i(t,e),yn=u):_i(t,e),Ji(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&(e.mode&1)!==0)for(De=e,c=e.child;c!==null;){for(f=De=c;De!==null;){switch(d=De,p=d.child,d.tag){case 0:case 11:case 14:case 15:Am(4,d,d.return);break;case 1:Zc(d,d.return);var v=d.stateNode;if(typeof v.componentWillUnmount=="function"){n=d,r=d.return;try{t=n,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(h){gr(n,r,h)}}break;case 5:Zc(d,d.return);break;case 22:if(d.memoizedState!==null){WB(f);continue}}p!==null?(p.return=d,De=p):WB(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{o=f.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(s=f.stateNode,l=f.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=uF("display",a))}catch(h){gr(e,e.return,h)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(h){gr(e,e.return,h)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:_i(t,e),Ji(e),n&4&&VB(e);break;case 21:break;default:_i(t,e),Ji(e)}}function Ji(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(BM(r)){var n=r;break e}r=r.return}throw Error(pe(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(Im(o,""),n.flags&=-33);var i=zB(e);NS(e,i,o);break;case 3:case 4:var a=n.stateNode.containerInfo,s=zB(e);RS(e,s,a);break;default:throw Error(pe(161))}}catch(l){gr(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bfe(e,t,r){De=e,$M(e,t,r)}function $M(e,t,r){for(var n=(e.mode&1)!==0;De!==null;){var o=De,i=o.child;if(o.tag===22&&n){var a=o.memoizedState!==null||$y;if(!a){var s=o.alternate,l=s!==null&&s.memoizedState!==null||yn;s=$y;var u=yn;if($y=a,(yn=l)&&!u)for(De=o;De!==null;)a=De,l=a.child,a.tag===22&&a.memoizedState!==null?GB(o):l!==null?(l.return=a,De=l):GB(o);for(;i!==null;)De=i,$M(i,t,r),i=i.sibling;De=o,$y=s,yn=u}HB(e,t,r)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,De=i):HB(e,t,r)}}function HB(e){for(;De!==null;){var t=De;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:yn||Db(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!yn)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:Ci(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&AB(t,i,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}AB(t,a,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&Bm(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(pe(163))}yn||t.flags&512&&IS(t)}catch(d){gr(t,t.return,d)}}if(t===e){De=null;break}if(r=t.sibling,r!==null){r.return=t.return,De=r;break}De=t.return}}function WB(e){for(;De!==null;){var t=De;if(t===e){De=null;break}var r=t.sibling;if(r!==null){r.return=t.return,De=r;break}De=t.return}}function GB(e){for(;De!==null;){var t=De;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Db(4,t)}catch(l){gr(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(l){gr(t,o,l)}}var i=t.return;try{IS(t)}catch(l){gr(t,i,l)}break;case 5:var a=t.return;try{IS(t)}catch(l){gr(t,a,l)}}}catch(l){gr(t,t.return,l)}if(t===e){De=null;break}var s=t.sibling;if(s!==null){s.return=t.return,De=s;break}De=t.return}}var Efe=Math.ceil,hb=Va.ReactCurrentDispatcher,yT=Va.ReactCurrentOwner,Xo=Va.ReactCurrentBatchConfig,Tt=0,zr=null,Tr=null,Jr=0,bo=0,Qc=Js(0),Or=0,Gm=null,pu=0,kb=0,bT=0,Dm=null,Xn=null,ET=0,dd=1/0,La=null,vb=!1,LS=null,Gs=null,Uy=!1,js=null,yb=0,km=0,BS=null,Ky=-1,Yy=0;function On(){return(Tt&6)!==0?br():Ky!==-1?Ky:Ky=br()}function Ks(e){return(e.mode&1)===0?1:(Tt&2)!==0&&Jr!==0?Jr&-Jr:nfe.transition!==null?(Yy===0&&(Yy=wF()),Yy):(e=Ft,e!==0||(e=window.event,e=e===void 0?16:DF(e.type)),e)}function Ai(e,t,r,n){if(50<km)throw km=0,BS=null,Error(pe(185));Km(e,r,n),((Tt&2)===0||e!==zr)&&(e===zr&&((Tt&2)===0&&(kb|=r),Or===4&&$s(e,Jr)),eo(e,n),r===1&&Tt===0&&(t.mode&1)===0&&(dd=br()+500,Tb&&el()))}function eo(e,t){var r=e.callbackNode;ide(e,t);var n=tb(e,e===zr?Jr:0);if(n===0)r!==null&&tB(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&tB(r),t===1)e.tag===0?rfe(KB.bind(null,e)):KF(KB.bind(null,e)),Qde(function(){(Tt&6)===0&&el()}),r=null;else{switch(_F(n)){case 1:r=WS;break;case 4:r=EF;break;case 16:r=eb;break;case 536870912:r=xF;break;default:r=eb}r=GM(r,UM.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function UM(e,t){if(Ky=-1,Yy=0,(Tt&6)!==0)throw Error(pe(327));var r=e.callbackNode;if(od()&&e.callbackNode!==r)return null;var n=tb(e,e===zr?Jr:0);if(n===0)return null;if((n&30)!==0||(n&e.expiredLanes)!==0||t)t=bb(e,n);else{t=n;var o=Tt;Tt|=2;var i=qM();(zr!==e||Jr!==t)&&(La=null,dd=br()+500,lu(e,t));do try{_fe();break}catch(s){jM(e,s)}while(!0);iT(),hb.current=i,Tt=o,Tr!==null?t=0:(zr=null,Jr=0,t=Or)}if(t!==0){if(t===2&&(o=uS(e),o!==0&&(n=o,t=FS(e,o))),t===1)throw r=Gm,lu(e,0),$s(e,n),eo(e,br()),r;if(t===6)$s(e,n);else{if(o=e.current.alternate,(n&30)===0&&!xfe(o)&&(t=bb(e,n),t===2&&(i=uS(e),i!==0&&(n=i,t=FS(e,i))),t===1))throw r=Gm,lu(e,0),$s(e,n),eo(e,br()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(pe(345));case 2:ou(e,Xn,La);break;case 3:if($s(e,n),(n&130023424)===n&&(t=ET+500-br(),10<t)){if(tb(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){On(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=vS(ou.bind(null,e,Xn,La),t);break}ou(e,Xn,La);break;case 4:if($s(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var a=31-Pi(n);i=1<<a,a=t[a],a>o&&(o=a),n&=~i}if(n=o,n=br()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Efe(n/1960))-n,10<n){e.timeoutHandle=vS(ou.bind(null,e,Xn,La),n);break}ou(e,Xn,La);break;case 5:ou(e,Xn,La);break;default:throw Error(pe(329))}}}return eo(e,br()),e.callbackNode===r?UM.bind(null,e):null}function FS(e,t){var r=Dm;return e.current.memoizedState.isDehydrated&&(lu(e,t).flags|=256),e=bb(e,t),e!==2&&(t=Xn,Xn=r,t!==null&&MS(t)),e}function MS(e){Xn===null?Xn=e:Xn.push.apply(Xn,e)}function xfe(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var o=r[n],i=o.getSnapshot;o=o.value;try{if(!Di(i(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function $s(e,t){for(t&=~bT,t&=~kb,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Pi(t),n=1<<r;e[r]=-1,t&=~n}}function KB(e){if((Tt&6)!==0)throw Error(pe(327));od();var t=tb(e,0);if((t&1)===0)return eo(e,br()),null;var r=bb(e,t);if(e.tag!==0&&r===2){var n=uS(e);n!==0&&(t=n,r=FS(e,n))}if(r===1)throw r=Gm,lu(e,0),$s(e,t),eo(e,br()),r;if(r===6)throw Error(pe(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ou(e,Xn,La),eo(e,br()),null}function xT(e,t){var r=Tt;Tt|=1;try{return e(t)}finally{Tt=r,Tt===0&&(dd=br()+500,Tb&&el())}}function mu(e){js!==null&&js.tag===0&&(Tt&6)===0&&od();var t=Tt;Tt|=1;var r=Xo.transition,n=Ft;try{if(Xo.transition=null,Ft=1,e)return e()}finally{Ft=n,Xo.transition=r,Tt=t,(Tt&6)===0&&el()}}function wT(){bo=Qc.current,Kt(Qc)}function lu(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Zde(r)),Tr!==null)for(r=Tr.return;r!==null;){var n=r;switch(rT(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&ab();break;case 3:ud(),Kt(Qn),Kt(bn),dT();break;case 5:cT(n);break;case 4:ud();break;case 13:Kt(cr);break;case 19:Kt(cr);break;case 10:aT(n.type._context);break;case 22:case 23:wT()}r=r.return}if(zr=e,Tr=e=Ys(e.current,null),Jr=bo=t,Or=0,Gm=null,bT=kb=pu=0,Xn=Dm=null,au!==null){for(t=0;t<au.length;t++)if(r=au[t],n=r.interleaved,n!==null){r.interleaved=null;var o=n.next,i=r.pending;if(i!==null){var a=i.next;i.next=o,n.next=a}r.pending=n}au=null}return e}function jM(e,t){do{var r=Tr;try{if(iT(),Hy.current=gb,mb){for(var n=dr.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}mb=!1}if(fu=0,qr=kr=dr=null,Pm=!1,Vm=0,yT.current=null,r===null||r.return===null){Or=1,Gm=t,Tr=null;break}e:{var i=e,a=r.return,s=r,l=t;if(t=Jr,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=s,f=c.tag;if((c.mode&1)===0&&(f===0||f===11||f===15)){var d=c.alternate;d?(c.updateQueue=d.updateQueue,c.memoizedState=d.memoizedState,c.lanes=d.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=LB(a);if(p!==null){p.flags&=-257,BB(p,a,s,i,t),p.mode&1&&NB(i,u,t),t=p,l=u;var v=t.updateQueue;if(v===null){var h=new Set;h.add(l),t.updateQueue=h}else v.add(l);break e}else{if((t&1)===0){NB(i,u,t),_T();break e}l=Error(pe(426))}}else if(nr&&s.mode&1){var y=LB(a);if(y!==null){(y.flags&65536)===0&&(y.flags|=256),BB(y,a,s,i,t),nT(cd(l,s));break e}}i=l=cd(l,s),Or!==4&&(Or=2),Dm===null?Dm=[i]:Dm.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var g=CM(i,l,t);PB(i,g);break e;case 1:s=l;var m=i.type,b=i.stateNode;if((i.flags&128)===0&&(typeof m.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Gs===null||!Gs.has(b)))){i.flags|=65536,t&=-t,i.lanes|=t;var E=SM(i,s,t);PB(i,E);break e}}i=i.return}while(i!==null)}VM(r)}catch(C){t=C,Tr===r&&r!==null&&(Tr=r=r.return);continue}break}while(!0)}function qM(){var e=hb.current;return hb.current=gb,e===null?gb:e}function _T(){(Or===0||Or===3||Or===2)&&(Or=4),zr===null||(pu&268435455)===0&&(kb&268435455)===0||$s(zr,Jr)}function bb(e,t){var r=Tt;Tt|=2;var n=qM();(zr!==e||Jr!==t)&&(La=null,lu(e,t));do try{wfe();break}catch(o){jM(e,o)}while(!0);if(iT(),Tt=r,hb.current=n,Tr!==null)throw Error(pe(261));return zr=null,Jr=0,Or}function wfe(){for(;Tr!==null;)zM(Tr)}function _fe(){for(;Tr!==null&&!Xce();)zM(Tr)}function zM(e){var t=WM(e.alternate,e,bo);e.memoizedProps=e.pendingProps,t===null?VM(e):Tr=t,yT.current=null}function VM(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=gfe(r,t,bo),r!==null){Tr=r;return}}else{if(r=hfe(r,t),r!==null){r.flags&=32767,Tr=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Or=6,Tr=null;return}}if(t=t.sibling,t!==null){Tr=t;return}Tr=t=e}while(t!==null);Or===0&&(Or=5)}function ou(e,t,r){var n=Ft,o=Xo.transition;try{Xo.transition=null,Ft=1,Cfe(e,t,r,n)}finally{Xo.transition=o,Ft=n}return null}function Cfe(e,t,r,n){do od();while(js!==null);if((Tt&6)!==0)throw Error(pe(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(pe(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(ade(e,i),e===zr&&(Tr=zr=null,Jr=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Uy||(Uy=!0,GM(eb,function(){return od(),null})),i=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||i){i=Xo.transition,Xo.transition=null;var a=Ft;Ft=1;var s=Tt;Tt|=4,yT.current=null,yfe(e,r),MM(r,e),Wde(gS),rb=!!mS,gS=mS=null,e.current=r,bfe(r,e,o),Zce(),Tt=s,Ft=a,Xo.transition=i}else e.current=r;if(Uy&&(Uy=!1,js=e,yb=o),i=e.pendingLanes,i===0&&(Gs=null),ede(r.stateNode,n),eo(e,br()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],n(o.value,{componentStack:o.stack,digest:o.digest});if(vb)throw vb=!1,e=LS,LS=null,e;return(yb&1)!==0&&e.tag!==0&&od(),i=e.pendingLanes,(i&1)!==0?e===BS?km++:(km=0,BS=e):km=0,el(),null}function od(){if(js!==null){var e=_F(yb),t=Xo.transition,r=Ft;try{if(Xo.transition=null,Ft=16>e?16:e,js===null)var n=!1;else{if(e=js,js=null,yb=0,(Tt&6)!==0)throw Error(pe(331));var o=Tt;for(Tt|=4,De=e.current;De!==null;){var i=De,a=i.child;if((De.flags&16)!==0){var s=i.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(De=u;De!==null;){var c=De;switch(c.tag){case 0:case 11:case 15:Am(8,c,i)}var f=c.child;if(f!==null)f.return=c,De=f;else for(;De!==null;){c=De;var d=c.sibling,p=c.return;if(LM(c),c===u){De=null;break}if(d!==null){d.return=p,De=d;break}De=p}}}var v=i.alternate;if(v!==null){var h=v.child;if(h!==null){v.child=null;do{var y=h.sibling;h.sibling=null,h=y}while(h!==null)}}De=i}}if((i.subtreeFlags&2064)!==0&&a!==null)a.return=i,De=a;else e:for(;De!==null;){if(i=De,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:Am(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,De=g;break e}De=i.return}}var m=e.current;for(De=m;De!==null;){a=De;var b=a.child;if((a.subtreeFlags&2064)!==0&&b!==null)b.return=a,De=b;else e:for(a=m;De!==null;){if(s=De,(s.flags&2048)!==0)try{switch(s.tag){case 0:case 11:case 15:Db(9,s)}}catch(C){gr(s,s.return,C)}if(s===a){De=null;break e}var E=s.sibling;if(E!==null){E.return=s.return,De=E;break e}De=s.return}}if(Tt=o,el(),ra&&typeof ra.onPostCommitFiberRoot=="function")try{ra.onPostCommitFiberRoot(xb,e)}catch{}n=!0}return n}finally{Ft=r,Xo.transition=t}}return!1}function YB(e,t,r){t=cd(r,t),t=CM(e,t,1),e=Ws(e,t,1),t=On(),e!==null&&(Km(e,1,t),eo(e,t))}function gr(e,t,r){if(e.tag===3)YB(e,e,r);else for(;t!==null;){if(t.tag===3){YB(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Gs===null||!Gs.has(n))){e=cd(r,e),e=SM(t,e,1),t=Ws(t,e,1),e=On(),t!==null&&(Km(t,1,e),eo(t,e));break}}t=t.return}}function Sfe(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=On(),e.pingedLanes|=e.suspendedLanes&r,zr===e&&(Jr&r)===r&&(Or===4||Or===3&&(Jr&130023424)===Jr&&500>br()-ET?lu(e,0):bT|=r),eo(e,t)}function HM(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ty,Ty<<=1,(Ty&130023424)===0&&(Ty=4194304)));var r=On();e=qa(e,t),e!==null&&(Km(e,t,r),eo(e,r))}function Tfe(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),HM(e,r)}function Pfe(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(pe(314))}n!==null&&n.delete(t),HM(e,r)}var WM;WM=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qn.current)Zn=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return Zn=!1,mfe(e,t,r);Zn=(e.flags&131072)!==0}else Zn=!1,nr&&(t.flags&1048576)!==0&&YF(t,ub,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Gy(e,t),e=t.pendingProps;var o=ad(t,bn.current);nd(t,r),o=pT(null,t,n,e,o,r);var i=mT();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Jn(n)?(i=!0,sb(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,lT(t),o.updater=Pb,t.stateNode=o,o._reactInternals=t,CS(t,n,e,r),t=PS(null,t,n,!0,i,r)):(t.tag=0,nr&&i&&tT(t),kn(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Gy(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=Dfe(n),e=Ci(n,e),o){case 0:t=TS(null,t,n,e,r);break e;case 1:t=$B(null,t,n,e,r);break e;case 11:t=FB(null,t,n,e,r);break e;case 14:t=MB(null,t,n,Ci(n.type,e),r);break e}throw Error(pe(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ci(n,o),TS(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ci(n,o),$B(e,t,n,o,r);case 3:e:{if(DM(t),e===null)throw Error(pe(387));n=t.pendingProps,i=t.memoizedState,o=i.element,JF(e,t),fb(t,n,null,r);var a=t.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=cd(Error(pe(423)),t),t=UB(e,t,n,r,o);break e}else if(n!==o){o=cd(Error(pe(424)),t),t=UB(e,t,n,r,o);break e}else for(Eo=Hs(t.stateNode.containerInfo.firstChild),xo=t,nr=!0,Ti=null,r=nM(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(sd(),n===o){t=za(e,t,r);break e}kn(e,t,n,r)}t=t.child}return t;case 5:return oM(t),e===null&&xS(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,hS(n,o)?a=null:i!==null&&hS(n,i)&&(t.flags|=32),AM(e,t),kn(e,t,a,r),t.child;case 6:return e===null&&xS(t),null;case 13:return kM(e,t,r);case 4:return uT(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ld(t,null,n,r):kn(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ci(n,o),FB(e,t,n,o,r);case 7:return kn(e,t,t.pendingProps,r),t.child;case 8:return kn(e,t,t.pendingProps.children,r),t.child;case 12:return kn(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,zt(cb,n._currentValue),n._currentValue=a,i!==null)if(Di(i.value,a)){if(i.children===o.children&&!Qn.current){t=za(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=$a(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),wS(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(pe(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),wS(a,r,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}kn(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,nd(t,r),o=Zo(o),n=n(o),t.flags|=1,kn(e,t,n,r),t.child;case 14:return n=t.type,o=Ci(n,t.pendingProps),o=Ci(n.type,o),MB(e,t,n,o,r);case 15:return TM(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ci(n,o),Gy(e,t),t.tag=1,Jn(n)?(e=!0,sb(t)):e=!1,nd(t,r),tM(t,n,o),CS(t,n,o,r),PS(null,t,n,!0,e,r);case 19:return OM(e,t,r);case 22:return PM(e,t,r)}throw Error(pe(156,t.tag))};function GM(e,t){return bF(e,t)}function Afe(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yo(e,t,r,n){return new Afe(e,t,r,n)}function CT(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Dfe(e){if(typeof e=="function")return CT(e)?1:0;if(e!=null){if(e=e.$$typeof,e===zS)return 11;if(e===VS)return 14}return 2}function Ys(e,t){var r=e.alternate;return r===null?(r=Yo(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Xy(e,t,r,n,o,i){var a=2;if(n=e,typeof e=="function")CT(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case qc:return uu(r.children,o,i,t);case qS:a=8,o|=8;break;case KC:return e=Yo(12,r,t,o|2),e.elementType=KC,e.lanes=i,e;case YC:return e=Yo(13,r,t,o),e.elementType=YC,e.lanes=i,e;case XC:return e=Yo(19,r,t,o),e.elementType=XC,e.lanes=i,e;case rF:return Ob(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case eF:a=10;break e;case tF:a=9;break e;case zS:a=11;break e;case VS:a=14;break e;case Bs:a=16,n=null;break e}throw Error(pe(130,e==null?e:typeof e,""))}return t=Yo(a,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function uu(e,t,r,n){return e=Yo(7,e,n,t),e.lanes=r,e}function Ob(e,t,r,n){return e=Yo(22,e,n,t),e.elementType=rF,e.lanes=r,e.stateNode={isHidden:!1},e}function HC(e,t,r){return e=Yo(6,e,null,t),e.lanes=r,e}function WC(e,t,r){return t=Yo(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function kfe(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=DC(0),this.expirationTimes=DC(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=DC(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ST(e,t,r,n,o,i,a,s,l){return e=new kfe(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Yo(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},lT(i),e}function Ofe(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:jc,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function KM(e){if(!e)return Zs;e=e._reactInternals;e:{if(hu(e)!==e||e.tag!==1)throw Error(pe(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Jn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(pe(171))}if(e.tag===1){var r=e.type;if(Jn(r))return GF(e,r,t)}return t}function YM(e,t,r,n,o,i,a,s,l){return e=ST(r,n,!0,e,o,i,a,s,l),e.context=KM(null),r=e.current,n=On(),o=Ks(r),i=$a(n,o),i.callback=t??null,Ws(r,i,o),e.current.lanes=o,Km(e,o,n),eo(e,n),e}function Ib(e,t,r,n){var o=t.current,i=On(),a=Ks(o);return r=KM(r),t.context===null?t.context=r:t.pendingContext=r,t=$a(i,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Ws(o,t,a),e!==null&&(Ai(e,o,a,i),Vy(e,o,a)),a}function Eb(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function XB(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function TT(e,t){XB(e,t),(e=e.alternate)&&XB(e,t)}function Ife(){return null}var XM=typeof reportError=="function"?reportError:function(e){console.error(e)};function PT(e){this._internalRoot=e}Rb.prototype.render=PT.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(pe(409));Ib(e,t,null,null)};Rb.prototype.unmount=PT.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mu(function(){Ib(null,e,null,null)}),t[ja]=null}};function Rb(e){this._internalRoot=e}Rb.prototype.unstable_scheduleHydration=function(e){if(e){var t=TF();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ms.length&&t!==0&&t<Ms[r].priority;r++);Ms.splice(r,0,e),r===0&&AF(e)}};function AT(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Nb(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ZB(){}function Rfe(e,t,r,n,o){if(o){if(typeof n=="function"){var i=n;n=function(){var u=Eb(a);i.call(u)}}var a=YM(t,n,e,0,null,!1,!1,"",ZB);return e._reactRootContainer=a,e[ja]=a.current,$m(e.nodeType===8?e.parentNode:e),mu(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var s=n;n=function(){var u=Eb(l);s.call(u)}}var l=ST(e,0,!1,null,null,!1,!1,"",ZB);return e._reactRootContainer=l,e[ja]=l.current,$m(e.nodeType===8?e.parentNode:e),mu(function(){Ib(t,l,r,n)}),l}function Lb(e,t,r,n,o){var i=r._reactRootContainer;if(i){var a=i;if(typeof o=="function"){var s=o;o=function(){var l=Eb(a);s.call(l)}}Ib(t,a,e,o)}else a=Rfe(r,t,e,o,n);return Eb(a)}CF=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Em(t.pendingLanes);r!==0&&(GS(t,r|1),eo(t,br()),(Tt&6)===0&&(dd=br()+500,el()))}break;case 13:mu(function(){var n=qa(e,1);if(n!==null){var o=On();Ai(n,e,1,o)}}),TT(e,1)}};KS=function(e){if(e.tag===13){var t=qa(e,134217728);if(t!==null){var r=On();Ai(t,e,134217728,r)}TT(e,134217728)}};SF=function(e){if(e.tag===13){var t=Ks(e),r=qa(e,t);if(r!==null){var n=On();Ai(r,e,t,n)}TT(e,t)}};TF=function(){return Ft};PF=function(e,t){var r=Ft;try{return Ft=e,t()}finally{Ft=r}};aS=function(e,t,r){switch(t){case"input":if(JC(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=Sb(n);if(!o)throw Error(pe(90));oF(n),JC(n,o)}}}break;case"textarea":aF(e,r);break;case"select":t=r.value,t!=null&&Jc(e,!!r.multiple,t,!1)}};pF=xT;mF=mu;var Nfe={usingClientEntryPoint:!1,Events:[Xm,Wc,Sb,dF,fF,xT]},hm={findFiberByHostInstance:iu,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Lfe={bundleType:hm.bundleType,version:hm.version,rendererPackageName:hm.rendererPackageName,rendererConfig:hm.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Va.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=vF(e),e===null?null:e.stateNode},findFiberByHostInstance:hm.findFiberByHostInstance||Ife,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(vm=__REACT_DEVTOOLS_GLOBAL_HOOK__,!vm.isDisabled&&vm.supportsFiber))try{xb=vm.inject(Lfe),ra=vm}catch{}var vm;Co.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Nfe;Co.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!AT(t))throw Error(pe(200));return Ofe(e,t,null,r)};Co.createRoot=function(e,t){if(!AT(e))throw Error(pe(299));var r=!1,n="",o=XM;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=ST(e,1,!1,null,null,r,!1,n,o),e[ja]=t.current,$m(e.nodeType===8?e.parentNode:e),new PT(t)};Co.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(pe(188)):(e=Object.keys(e).join(","),Error(pe(268,e)));return e=vF(t),e=e===null?null:e.stateNode,e};Co.flushSync=function(e){return mu(e)};Co.hydrate=function(e,t,r){if(!Nb(t))throw Error(pe(200));return Lb(null,e,t,!0,r)};Co.hydrateRoot=function(e,t,r){if(!AT(e))throw Error(pe(405));var n=r!=null&&r.hydratedSources||null,o=!1,i="",a=XM;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=YM(t,null,e,1,r??null,o,!1,i,a),e[ja]=t.current,$m(e),n)for(e=0;e<n.length;e++)r=n[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new Rb(t)};Co.render=function(e,t,r){if(!Nb(t))throw Error(pe(200));return Lb(null,e,t,!1,r)};Co.unmountComponentAtNode=function(e){if(!Nb(e))throw Error(pe(40));return e._reactRootContainer?(mu(function(){Lb(null,null,e,!1,function(){e._reactRootContainer=null,e[ja]=null})}),!0):!1};Co.unstable_batchedUpdates=xT;Co.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Nb(r))throw Error(pe(200));if(e==null||e._reactInternals===void 0)throw Error(pe(38));return Lb(e,t,r,!1,n)};Co.version="18.2.0-next-9e3b772b8-20220608"});var DT=_((est,JM)=>{"use strict";function QM(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(QM)}catch(e){console.error(e)}}QM(),JM.exports=ZM()});var g2=_(m2=>{"use strict";var md=Re();function Kfe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Yfe=typeof Object.is=="function"?Object.is:Kfe,Xfe=md.useState,Zfe=md.useEffect,Qfe=md.useLayoutEffect,Jfe=md.useDebugValue;function epe(e,t){var r=t(),n=Xfe({inst:{value:r,getSnapshot:t}}),o=n[0].inst,i=n[1];return Qfe(function(){o.value=r,o.getSnapshot=t,$T(o)&&i({inst:o})},[e,r,t]),Zfe(function(){return $T(o)&&i({inst:o}),e(function(){$T(o)&&i({inst:o})})},[e]),Jfe(r),r}function $T(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Yfe(e,r)}catch{return!0}}function tpe(e,t){return t()}var rpe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?tpe:epe;m2.useSyncExternalStore=md.useSyncExternalStore!==void 0?md.useSyncExternalStore:rpe});var v2=_((lst,h2)=>{"use strict";h2.exports=g2()});var b2=_(y2=>{"use strict";var $b=Re(),npe=v2();function ope(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ipe=typeof Object.is=="function"?Object.is:ope,ape=npe.useSyncExternalStore,spe=$b.useRef,lpe=$b.useEffect,upe=$b.useMemo,cpe=$b.useDebugValue;y2.useSyncExternalStoreWithSelector=function(e,t,r,n,o){var i=spe(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=upe(function(){function l(p){if(!u){if(u=!0,c=p,p=n(p),o!==void 0&&a.hasValue){var v=a.value;if(o(v,p))return f=v}return f=p}if(v=f,ipe(c,p))return v;var h=n(p);return o!==void 0&&o(v,h)?(c=p,v):(c=p,f=h)}var u=!1,c,f,d=r===void 0?null:r;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,r,n,o]);var s=ape(e,i[0],i[1]);return lpe(function(){a.hasValue=!0,a.value=s},[s]),cpe(s),s}});var x2=_((cst,E2)=>{"use strict";E2.exports=b2()});var a$=_((eg,hd)=>{"use strict";var mpe=200,gpe="Expected a function",YT="__lodash_hash_undefined__",Gb=1,vd=2,B2=1/0,F2=9007199254740991,Ub="[object Arguments]",qT="[object Array]",M2="[object Boolean]",$2="[object Date]",U2="[object Error]",j2="[object Function]",hpe="[object GeneratorFunction]",jb="[object Map]",q2="[object Number]",gd="[object Object]",P2="[object Promise]",z2="[object RegExp]",qb="[object Set]",V2="[object String]",H2="[object Symbol]",zT="[object WeakMap]",W2="[object ArrayBuffer]",zb="[object DataView]",vpe="[object Float32Array]",ype="[object Float64Array]",bpe="[object Int8Array]",Epe="[object Int16Array]",xpe="[object Int32Array]",wpe="[object Uint8Array]",_pe="[object Uint8ClampedArray]",Cpe="[object Uint16Array]",Spe="[object Uint32Array]",Tpe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ppe=/^\w*$/,Ape=/^\./,Dpe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kpe=/[\\^$.*+?()[\]{}|]/g,Ope=/\\(\\)?/g,Ipe=/^\[object .+?Constructor\]$/,Rpe=/^(?:0|[1-9]\d*)$/,Yt={};Yt[vpe]=Yt[ype]=Yt[bpe]=Yt[Epe]=Yt[xpe]=Yt[wpe]=Yt[_pe]=Yt[Cpe]=Yt[Spe]=!0;Yt[Ub]=Yt[qT]=Yt[W2]=Yt[M2]=Yt[zb]=Yt[$2]=Yt[U2]=Yt[j2]=Yt[jb]=Yt[q2]=Yt[gd]=Yt[z2]=Yt[qb]=Yt[V2]=Yt[zT]=!1;var G2=typeof global=="object"&&global&&global.Object===Object&&global,Npe=typeof self=="object"&&self&&self.Object===Object&&self,rl=G2||Npe||Function("return this")(),K2=typeof eg=="object"&&eg&&!eg.nodeType&&eg,A2=K2&&typeof hd=="object"&&hd&&!hd.nodeType&&hd,Lpe=A2&&A2.exports===K2,D2=Lpe&&G2.process,k2=(function(){try{return D2&&D2.binding("util")}catch{}})(),O2=k2&&k2.isTypedArray;function Bpe(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0;return!1}function Fpe(e){return function(t){return t==null?void 0:t[e]}}function Mpe(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function $pe(e){return function(t){return e(t)}}function Upe(e,t){return e==null?void 0:e[t]}function VT(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function jpe(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function qpe(e,t){return function(r){return e(t(r))}}function zpe(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Vpe=Array.prototype,Hpe=Function.prototype,Kb=Object.prototype,UT=rl["__core-js_shared__"],I2=(function(){var e=/[^.]+$/.exec(UT&&UT.keys&&UT.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),Y2=Hpe.toString,Wa=Kb.hasOwnProperty,yd=Kb.toString,Wpe=RegExp("^"+Y2.call(Wa).replace(kpe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R2=rl.Symbol,N2=rl.Uint8Array,Gpe=Kb.propertyIsEnumerable,Kpe=Vpe.splice,Ype=qpe(Object.keys,Object),HT=bd(rl,"DataView"),tg=bd(rl,"Map"),WT=bd(rl,"Promise"),GT=bd(rl,"Set"),KT=bd(rl,"WeakMap"),rg=bd(Object,"create"),Xpe=bu(HT),Zpe=bu(tg),Qpe=bu(WT),Jpe=bu(GT),eme=bu(KT),Vb=R2?R2.prototype:void 0,jT=Vb?Vb.valueOf:void 0,L2=Vb?Vb.toString:void 0;function vu(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function tme(){this.__data__=rg?rg(null):{}}function rme(e){return this.has(e)&&delete this.__data__[e]}function nme(e){var t=this.__data__;if(rg){var r=t[e];return r===YT?void 0:r}return Wa.call(t,e)?t[e]:void 0}function ome(e){var t=this.__data__;return rg?t[e]!==void 0:Wa.call(t,e)}function ime(e,t){var r=this.__data__;return r[e]=rg&&t===void 0?YT:t,this}vu.prototype.clear=tme;vu.prototype.delete=rme;vu.prototype.get=nme;vu.prototype.has=ome;vu.prototype.set=ime;function Ga(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ame(){this.__data__=[]}function sme(e){var t=this.__data__,r=Yb(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Kpe.call(t,r,1),!0}function lme(e){var t=this.__data__,r=Yb(t,e);return r<0?void 0:t[r][1]}function ume(e){return Yb(this.__data__,e)>-1}function cme(e,t){var r=this.__data__,n=Yb(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Ga.prototype.clear=ame;Ga.prototype.delete=sme;Ga.prototype.get=lme;Ga.prototype.has=ume;Ga.prototype.set=cme;function Ka(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function dme(){this.__data__={hash:new vu,map:new(tg||Ga),string:new vu}}function fme(e){return Xb(this,e).delete(e)}function pme(e){return Xb(this,e).get(e)}function mme(e){return Xb(this,e).has(e)}function gme(e,t){return Xb(this,e).set(e,t),this}Ka.prototype.clear=dme;Ka.prototype.delete=fme;Ka.prototype.get=pme;Ka.prototype.has=mme;Ka.prototype.set=gme;function Hb(e){var t=-1,r=e?e.length:0;for(this.__data__=new Ka;++t<r;)this.add(e[t])}function hme(e){return this.__data__.set(e,YT),this}function vme(e){return this.__data__.has(e)}Hb.prototype.add=Hb.prototype.push=hme;Hb.prototype.has=vme;function Ha(e){this.__data__=new Ga(e)}function yme(){this.__data__=new Ga}function bme(e){return this.__data__.delete(e)}function Eme(e){return this.__data__.get(e)}function xme(e){return this.__data__.has(e)}function wme(e,t){var r=this.__data__;if(r instanceof Ga){var n=r.__data__;if(!tg||n.length<mpe-1)return n.push([e,t]),this;r=this.__data__=new Ka(n)}return r.set(e,t),this}Ha.prototype.clear=yme;Ha.prototype.delete=bme;Ha.prototype.get=Eme;Ha.prototype.has=xme;Ha.prototype.set=wme;function _me(e,t){var r=yu(e)||n$(e)?Mpe(e.length,String):[],n=r.length,o=!!n;for(var i in e)(t||Wa.call(e,i))&&!(o&&(i=="length"||J2(i,n)))&&r.push(i);return r}function Yb(e,t){for(var r=e.length;r--;)if(r$(e[r][0],t))return r;return-1}var Cme=Mme();function Sme(e,t){return e&&Cme(e,t,Wb)}function X2(e,t){t=Zb(t,e)?[t]:Z2(t);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Qb(t[r++])];return r&&r==n?e:void 0}function Tme(e){return yd.call(e)}function Pme(e,t){return e!=null&&t in Object(e)}function XT(e,t,r,n,o){return e===t?!0:e==null||t==null||!Jb(e)&&!eE(t)?e!==e&&t!==t:Ame(e,t,XT,r,n,o)}function Ame(e,t,r,n,o,i){var a=yu(e),s=yu(t),l=qT,u=qT;a||(l=tl(e),l=l==Ub?gd:l),s||(u=tl(t),u=u==Ub?gd:u);var c=l==gd&&!VT(e),f=u==gd&&!VT(t),d=l==u;if(d&&!c)return i||(i=new Ha),a||Kme(e)?Q2(e,t,r,n,o,i):$me(e,t,l,r,n,o,i);if(!(o&vd)){var p=c&&Wa.call(e,"__wrapped__"),v=f&&Wa.call(t,"__wrapped__");if(p||v){var h=p?e.value():e,y=v?t.value():t;return i||(i=new Ha),r(h,y,n,o,i)}}return d?(i||(i=new Ha),Ume(e,t,r,n,o,i)):!1}function Dme(e,t,r,n){var o=r.length,i=o,a=!n;if(e==null)return!i;for(e=Object(e);o--;){var s=r[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){s=r[o];var l=s[0],u=e[l],c=s[1];if(a&&s[2]){if(u===void 0&&!(l in e))return!1}else{var f=new Ha;if(n)var d=n(u,c,l,e,t,f);if(!(d===void 0?XT(c,u,n,Gb|vd,f):d))return!1}}return!0}function kme(e){if(!Jb(e)||Vme(e))return!1;var t=i$(e)||VT(e)?Wpe:Ipe;return t.test(bu(e))}function Ome(e){return eE(e)&&QT(e.length)&&!!Yt[yd.call(e)]}function Ime(e){return typeof e=="function"?e:e==null?Jme:typeof e=="object"?yu(e)?Lme(e[0],e[1]):Nme(e):ege(e)}function Rme(e){if(!Hme(e))return Ype(e);var t=[];for(var r in Object(e))Wa.call(e,r)&&r!="constructor"&&t.push(r);return t}function Nme(e){var t=jme(e);return t.length==1&&t[0][2]?t$(t[0][0],t[0][1]):function(r){return r===e||Dme(r,e,t)}}function Lme(e,t){return Zb(e)&&e$(t)?t$(Qb(e),t):function(r){var n=Xme(r,e);return n===void 0&&n===t?Zme(r,e):XT(t,n,void 0,Gb|vd)}}function Bme(e){return function(t){return X2(t,e)}}function Fme(e){if(typeof e=="string")return e;if(JT(e))return L2?L2.call(e):"";var t=e+"";return t=="0"&&1/e==-B2?"-0":t}function Z2(e){return yu(e)?e:Wme(e)}function Mme(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var l=a[e?s:++o];if(r(i[l],l,i)===!1)break}return t}}function Q2(e,t,r,n,o,i){var a=o&vd,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var c=-1,f=!0,d=o&Gb?new Hb:void 0;for(i.set(e,t),i.set(t,e);++c<s;){var p=e[c],v=t[c];if(n)var h=a?n(v,p,c,t,e,i):n(p,v,c,e,t,i);if(h!==void 0){if(h)continue;f=!1;break}if(d){if(!Bpe(t,function(y,g){if(!d.has(g)&&(p===y||r(p,y,n,o,i)))return d.add(g)})){f=!1;break}}else if(!(p===v||r(p,v,n,o,i))){f=!1;break}}return i.delete(e),i.delete(t),f}function $me(e,t,r,n,o,i,a){switch(r){case zb:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case W2:return!(e.byteLength!=t.byteLength||!n(new N2(e),new N2(t)));case M2:case $2:case q2:return r$(+e,+t);case U2:return e.name==t.name&&e.message==t.message;case z2:case V2:return e==t+"";case jb:var s=jpe;case qb:var l=i&vd;if(s||(s=zpe),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;i|=Gb,a.set(e,t);var c=Q2(s(e),s(t),n,o,i,a);return a.delete(e),c;case H2:if(jT)return jT.call(e)==jT.call(t)}return!1}function Ume(e,t,r,n,o,i){var a=o&vd,s=Wb(e),l=s.length,u=Wb(t),c=u.length;if(l!=c&&!a)return!1;for(var f=l;f--;){var d=s[f];if(!(a?d in t:Wa.call(t,d)))return!1}var p=i.get(e);if(p&&i.get(t))return p==t;var v=!0;i.set(e,t),i.set(t,e);for(var h=a;++f<l;){d=s[f];var y=e[d],g=t[d];if(n)var m=a?n(g,y,d,t,e,i):n(y,g,d,e,t,i);if(!(m===void 0?y===g||r(y,g,n,o,i):m)){v=!1;break}h||(h=d=="constructor")}if(v&&!h){var b=e.constructor,E=t.constructor;b!=E&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof E=="function"&&E instanceof E)&&(v=!1)}return i.delete(e),i.delete(t),v}function Xb(e,t){var r=e.__data__;return zme(t)?r[typeof t=="string"?"string":"hash"]:r.map}function jme(e){for(var t=Wb(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,e$(o)]}return t}function bd(e,t){var r=Upe(e,t);return kme(r)?r:void 0}var tl=Tme;(HT&&tl(new HT(new ArrayBuffer(1)))!=zb||tg&&tl(new tg)!=jb||WT&&tl(WT.resolve())!=P2||GT&&tl(new GT)!=qb||KT&&tl(new KT)!=zT)&&(tl=function(e){var t=yd.call(e),r=t==gd?e.constructor:void 0,n=r?bu(r):void 0;if(n)switch(n){case Xpe:return zb;case Zpe:return jb;case Qpe:return P2;case Jpe:return qb;case eme:return zT}return t});function qme(e,t,r){t=Zb(t,e)?[t]:Z2(t);for(var n,o=-1,a=t.length;++o<a;){var i=Qb(t[o]);if(!(n=e!=null&&r(e,i)))break;e=e[i]}if(n)return n;var a=e?e.length:0;return!!a&&QT(a)&&J2(i,a)&&(yu(e)||n$(e))}function J2(e,t){return t=t??F2,!!t&&(typeof e=="number"||Rpe.test(e))&&e>-1&&e%1==0&&e<t}function Zb(e,t){if(yu(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||JT(e)?!0:Ppe.test(e)||!Tpe.test(e)||t!=null&&e in Object(t)}function zme(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Vme(e){return!!I2&&I2 in e}function Hme(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Kb;return e===r}function e$(e){return e===e&&!Jb(e)}function t$(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var Wme=ZT(function(e){e=Yme(e);var t=[];return Ape.test(e)&&t.push(""),e.replace(Dpe,function(r,n,o,i){t.push(o?i.replace(Ope,"$1"):n||r)}),t});function Qb(e){if(typeof e=="string"||JT(e))return e;var t=e+"";return t=="0"&&1/e==-B2?"-0":t}function bu(e){if(e!=null){try{return Y2.call(e)}catch{}try{return e+""}catch{}}return""}function ZT(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(gpe);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(ZT.Cache||Ka),r}ZT.Cache=Ka;function r$(e,t){return e===t||e!==e&&t!==t}function n$(e){return Gme(e)&&Wa.call(e,"callee")&&(!Gpe.call(e,"callee")||yd.call(e)==Ub)}var yu=Array.isArray;function o$(e){return e!=null&&QT(e.length)&&!i$(e)}function Gme(e){return eE(e)&&o$(e)}function i$(e){var t=Jb(e)?yd.call(e):"";return t==j2||t==hpe}function QT(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=F2}function Jb(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function eE(e){return!!e&&typeof e=="object"}function JT(e){return typeof e=="symbol"||eE(e)&&yd.call(e)==H2}var Kme=O2?$pe(O2):Ome;function Yme(e){return e==null?"":Fme(e)}function Xme(e,t,r){var n=e==null?void 0:X2(e,t);return n===void 0?r:n}function Zme(e,t){return e!=null&&qme(e,t,Pme)}function Wb(e){return o$(e)?_me(e):Rme(e)}function Qme(e,t){var r={};return t=Ime(t,3),Sme(e,function(n,o,i){r[o]=t(n,o,i)}),r}function Jme(e){return e}function ege(e){return Zb(e)?Fpe(Qb(e)):Bme(e)}hd.exports=Qme});var p3=_((klt,f3)=>{"use strict";f3.exports=Vve;var c3="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",d3="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",qve=new RegExp("^[^"+d3+"]*["+c3+"]"),zve=new RegExp("^[^"+c3+"]*["+d3+"]");function Vve(e){return e=String(e||""),qve.test(e)?"rtl":zve.test(e)?"ltr":"neutral"}});var bE=_((Olt,m3)=>{"use strict";function Hve(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}m3.exports=Hve});var h3=_((Ilt,g3)=>{"use strict";var Wve=typeof global=="object"&&global&&global.Object===Object&&global;g3.exports=Wve});var bP=_((Rlt,v3)=>{"use strict";var Gve=h3(),Kve=typeof self=="object"&&self&&self.Object===Object&&self,Yve=Gve||Kve||Function("return this")();v3.exports=Yve});var b3=_((Nlt,y3)=>{"use strict";var Xve=bP(),Zve=function(){return Xve.Date.now()};y3.exports=Zve});var x3=_((Llt,E3)=>{"use strict";var Qve=/\s/;function Jve(e){for(var t=e.length;t--&&Qve.test(e.charAt(t)););return t}E3.exports=Jve});var _3=_((Blt,w3)=>{"use strict";var eye=x3(),tye=/^\s+/;function rye(e){return e&&e.slice(0,eye(e)+1).replace(tye,"")}w3.exports=rye});var EP=_((Flt,C3)=>{"use strict";var nye=bP(),oye=nye.Symbol;C3.exports=oye});var A3=_((Mlt,P3)=>{"use strict";var S3=EP(),T3=Object.prototype,iye=T3.hasOwnProperty,aye=T3.toString,lg=S3?S3.toStringTag:void 0;function sye(e){var t=iye.call(e,lg),r=e[lg];try{e[lg]=void 0;var n=!0}catch{}var o=aye.call(e);return n&&(t?e[lg]=r:delete e[lg]),o}P3.exports=sye});var k3=_(($lt,D3)=>{"use strict";var lye=Object.prototype,uye=lye.toString;function cye(e){return uye.call(e)}D3.exports=cye});var N3=_((Ult,R3)=>{"use strict";var O3=EP(),dye=A3(),fye=k3(),pye="[object Null]",mye="[object Undefined]",I3=O3?O3.toStringTag:void 0;function gye(e){return e==null?e===void 0?mye:pye:I3&&I3 in Object(e)?dye(e):fye(e)}R3.exports=gye});var B3=_((jlt,L3)=>{"use strict";function hye(e){return e!=null&&typeof e=="object"}L3.exports=hye});var M3=_((qlt,F3)=>{"use strict";var vye=N3(),yye=B3(),bye="[object Symbol]";function Eye(e){return typeof e=="symbol"||yye(e)&&vye(e)==bye}F3.exports=Eye});var q3=_((zlt,j3)=>{"use strict";var xye=_3(),$3=bE(),wye=M3(),U3=NaN,_ye=/^[-+]0x[0-9a-f]+$/i,Cye=/^0b[01]+$/i,Sye=/^0o[0-7]+$/i,Tye=parseInt;function Pye(e){if(typeof e=="number")return e;if(wye(e))return U3;if($3(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=$3(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=xye(e);var r=Cye.test(e);return r||Sye.test(e)?Tye(e.slice(2),r?2:8):_ye.test(e)?U3:+e}j3.exports=Pye});var wP=_((Vlt,V3)=>{"use strict";var Aye=bE(),xP=b3(),z3=q3(),Dye="Expected a function",kye=Math.max,Oye=Math.min;function Iye(e,t,r){var n,o,i,a,s,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(Dye);t=z3(t)||0,Aye(r)&&(c=!!r.leading,f="maxWait"in r,i=f?kye(z3(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d);function p(x){var P=n,N=o;return n=o=void 0,u=x,a=e.apply(N,P),a}function v(x){return u=x,s=setTimeout(g,t),c?p(x):a}function h(x){var P=x-l,N=x-u,D=t-P;return f?Oye(D,i-N):D}function y(x){var P=x-l,N=x-u;return l===void 0||P>=t||P<0||f&&N>=i}function g(){var x=xP();if(y(x))return m(x);s=setTimeout(g,h(x))}function m(x){return s=void 0,d&&n?p(x):(n=o=void 0,a)}function b(){s!==void 0&&clearTimeout(s),u=0,n=l=o=s=void 0}function E(){return s===void 0?a:m(xP())}function C(){var x=xP(),P=y(x);if(n=arguments,o=this,l=x,P){if(s===void 0)return v(l);if(f)return clearTimeout(s),s=setTimeout(g,t),p(l)}return s===void 0&&(s=setTimeout(g,t)),a}return C.cancel=b,C.flush=E,C}V3.exports=Iye});var W3=_((Hlt,H3)=>{"use strict";var Rye=wP(),Nye=bE(),Lye="Expected a function";function Bye(e,t,r){var n=!0,o=!0;if(typeof e!="function")throw new TypeError(Lye);return Nye(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Rye(e,t,{leading:n,maxWait:t,trailing:o})}H3.exports=Bye});var _E=_(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});var $ye=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),CP={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},X3={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:$ye?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},SP={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222};for(ug=1;ug<20;ug++)SP["f"+ug]=111+ug;var ug;function wE(e,t,r){t&&!("byKey"in t)&&(r=t,t=null),Array.isArray(e)||(e=[e]);var n=e.map(function(a){return Z3(a,t)}),o=function(s){return n.some(function(l){return Q3(l,s)})},i=r==null?o:o(r);return i}function Uye(e,t){return wE(e,t)}function jye(e,t){return wE(e,{byKey:!0},t)}function Z3(e,t){var r=t&&t.byKey,n={};e=e.replace("++","+add");var o=e.split("+"),i=o.length;for(var a in CP)n[CP[a]]=!1;var s=!0,l=!1,u=void 0;try{for(var c=o[Symbol.iterator](),f;!(s=(f=c.next()).done);s=!0){var d=f.value,p=d.endsWith("?")&&d.length>1;p&&(d=d.slice(0,-1));var v=TP(d),h=CP[v];if(d.length>1&&!h&&!X3[d]&&!SP[v])throw new TypeError('Unknown modifier: "'+d+'"');(i===1||!h)&&(r?n.key=v:n.which=J3(d)),h&&(n[h]=p?null:!0)}}catch(y){l=!0,u=y}finally{try{!s&&c.return&&c.return()}finally{if(l)throw u}}return n}function Q3(e,t){for(var r in e){var n=e[r],o=void 0;if(n!=null&&(r==="key"&&t.key!=null?o=t.key.toLowerCase():r==="which"?o=n===91&&t.which===93?91:t.which:o=t[r],!(o==null&&n===!1)&&o!==n))return!1}return!0}function J3(e){e=TP(e);var t=SP[e]||e.toUpperCase().charCodeAt(0);return t}function TP(e){return e=e.toLowerCase(),e=X3[e]||e,e}ca.default=wE;ca.isHotkey=wE;ca.isCodeHotkey=Uye;ca.isKeyHotkey=jye;ca.parseHotkey=Z3;ca.compareHotkey=Q3;ca.toKeyCode=J3;ca.toKeyName=TP});var Li=_((_ct,T4)=>{"use strict";var wEe=Array.isArray;T4.exports=wEe});var Rd=_((Cct,P4)=>{"use strict";var _Ee=Li();function CEe(){if(!arguments.length)return[];var e=arguments[0];return _Ee(e)?e:[e]}P4.exports=CEe});var r1=_((Sct,A4)=>{"use strict";function SEe(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}A4.exports=SEe});var k4=_((Tct,D4)=>{"use strict";function TEe(){this.__data__=[],this.size=0}D4.exports=TEe});var n1=_((Pct,O4)=>{"use strict";function PEe(e,t){return e===t||e!==e&&t!==t}O4.exports=PEe});var Eg=_((Act,I4)=>{"use strict";var AEe=n1();function DEe(e,t){for(var r=e.length;r--;)if(AEe(e[r][0],t))return r;return-1}I4.exports=DEe});var N4=_((Dct,R4)=>{"use strict";var kEe=Eg(),OEe=Array.prototype,IEe=OEe.splice;function REe(e){var t=this.__data__,r=kEe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():IEe.call(t,r,1),--this.size,!0}R4.exports=REe});var B4=_((kct,L4)=>{"use strict";var NEe=Eg();function LEe(e){var t=this.__data__,r=NEe(t,e);return r<0?void 0:t[r][1]}L4.exports=LEe});var M4=_((Oct,F4)=>{"use strict";var BEe=Eg();function FEe(e){return BEe(this.__data__,e)>-1}F4.exports=FEe});var U4=_((Ict,$4)=>{"use strict";var MEe=Eg();function $Ee(e,t){var r=this.__data__,n=MEe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}$4.exports=$Ee});var xg=_((Rct,j4)=>{"use strict";var UEe=k4(),jEe=N4(),qEe=B4(),zEe=M4(),VEe=U4();function Nd(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Nd.prototype.clear=UEe;Nd.prototype.delete=jEe;Nd.prototype.get=qEe;Nd.prototype.has=zEe;Nd.prototype.set=VEe;j4.exports=Nd});var z4=_((Nct,q4)=>{"use strict";var HEe=xg();function WEe(){this.__data__=new HEe,this.size=0}q4.exports=WEe});var H4=_((Lct,V4)=>{"use strict";function GEe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}V4.exports=GEe});var G4=_((Bct,W4)=>{"use strict";function KEe(e){return this.__data__.get(e)}W4.exports=KEe});var Y4=_((Fct,K4)=>{"use strict";function YEe(e){return this.__data__.has(e)}K4.exports=YEe});var o1=_((Mct,X4)=>{"use strict";var XEe=typeof global=="object"&&global&&global.Object===Object&&global;X4.exports=XEe});var ha=_(($ct,Z4)=>{"use strict";var ZEe=o1(),QEe=typeof self=="object"&&self&&self.Object===Object&&self,JEe=ZEe||QEe||Function("return this")();Z4.exports=JEe});var wg=_((Uct,Q4)=>{"use strict";var e0e=ha(),t0e=e0e.Symbol;Q4.exports=t0e});var rj=_((jct,tj)=>{"use strict";var J4=wg(),ej=Object.prototype,r0e=ej.hasOwnProperty,n0e=ej.toString,_g=J4?J4.toStringTag:void 0;function o0e(e){var t=r0e.call(e,_g),r=e[_g];try{e[_g]=void 0;var n=!0}catch{}var o=n0e.call(e);return n&&(t?e[_g]=r:delete e[_g]),o}tj.exports=o0e});var oj=_((qct,nj)=>{"use strict";var i0e=Object.prototype,a0e=i0e.toString;function s0e(e){return a0e.call(e)}nj.exports=s0e});var Ld=_((zct,sj)=>{"use strict";var ij=wg(),l0e=rj(),u0e=oj(),c0e="[object Null]",d0e="[object Undefined]",aj=ij?ij.toStringTag:void 0;function f0e(e){return e==null?e===void 0?d0e:c0e:aj&&aj in Object(e)?l0e(e):u0e(e)}sj.exports=f0e});var WE=_((Vct,lj)=>{"use strict";function p0e(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}lj.exports=p0e});var i1=_((Hct,uj)=>{"use strict";var m0e=Ld(),g0e=WE(),h0e="[object AsyncFunction]",v0e="[object Function]",y0e="[object GeneratorFunction]",b0e="[object Proxy]";function E0e(e){if(!g0e(e))return!1;var t=m0e(e);return t==v0e||t==y0e||t==h0e||t==b0e}uj.exports=E0e});var dj=_((Wct,cj)=>{"use strict";var x0e=ha(),w0e=x0e["__core-js_shared__"];cj.exports=w0e});var mj=_((Gct,pj)=>{"use strict";var a1=dj(),fj=(function(){var e=/[^.]+$/.exec(a1&&a1.keys&&a1.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function _0e(e){return!!fj&&fj in e}pj.exports=_0e});var s1=_((Kct,gj)=>{"use strict";var C0e=Function.prototype,S0e=C0e.toString;function T0e(e){if(e!=null){try{return S0e.call(e)}catch{}try{return e+""}catch{}}return""}gj.exports=T0e});var vj=_((Yct,hj)=>{"use strict";var P0e=i1(),A0e=mj(),D0e=WE(),k0e=s1(),O0e=/[\\^$.*+?()[\]{}|]/g,I0e=/^\[object .+?Constructor\]$/,R0e=Function.prototype,N0e=Object.prototype,L0e=R0e.toString,B0e=N0e.hasOwnProperty,F0e=RegExp("^"+L0e.call(B0e).replace(O0e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function M0e(e){if(!D0e(e)||A0e(e))return!1;var t=P0e(e)?F0e:I0e;return t.test(k0e(e))}hj.exports=M0e});var bj=_((Xct,yj)=>{"use strict";function $0e(e,t){return e==null?void 0:e[t]}yj.exports=$0e});var ku=_((Zct,Ej)=>{"use strict";var U0e=vj(),j0e=bj();function q0e(e,t){var r=j0e(e,t);return U0e(r)?r:void 0}Ej.exports=q0e});var GE=_((Qct,xj)=>{"use strict";var z0e=ku(),V0e=ha(),H0e=z0e(V0e,"Map");xj.exports=H0e});var Cg=_((Jct,wj)=>{"use strict";var W0e=ku(),G0e=W0e(Object,"create");wj.exports=G0e});var Sj=_((edt,Cj)=>{"use strict";var _j=Cg();function K0e(){this.__data__=_j?_j(null):{},this.size=0}Cj.exports=K0e});var Pj=_((tdt,Tj)=>{"use strict";function Y0e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}Tj.exports=Y0e});var Dj=_((rdt,Aj)=>{"use strict";var X0e=Cg(),Z0e="__lodash_hash_undefined__",Q0e=Object.prototype,J0e=Q0e.hasOwnProperty;function exe(e){var t=this.__data__;if(X0e){var r=t[e];return r===Z0e?void 0:r}return J0e.call(t,e)?t[e]:void 0}Aj.exports=exe});var Oj=_((ndt,kj)=>{"use strict";var txe=Cg(),rxe=Object.prototype,nxe=rxe.hasOwnProperty;function oxe(e){var t=this.__data__;return txe?t[e]!==void 0:nxe.call(t,e)}kj.exports=oxe});var Rj=_((odt,Ij)=>{"use strict";var ixe=Cg(),axe="__lodash_hash_undefined__";function sxe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ixe&&t===void 0?axe:t,this}Ij.exports=sxe});var Lj=_((idt,Nj)=>{"use strict";var lxe=Sj(),uxe=Pj(),cxe=Dj(),dxe=Oj(),fxe=Rj();function Bd(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Bd.prototype.clear=lxe;Bd.prototype.delete=uxe;Bd.prototype.get=cxe;Bd.prototype.has=dxe;Bd.prototype.set=fxe;Nj.exports=Bd});var Mj=_((adt,Fj)=>{"use strict";var Bj=Lj(),pxe=xg(),mxe=GE();function gxe(){this.size=0,this.__data__={hash:new Bj,map:new(mxe||pxe),string:new Bj}}Fj.exports=gxe});var Uj=_((sdt,$j)=>{"use strict";function hxe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}$j.exports=hxe});var Sg=_((ldt,jj)=>{"use strict";var vxe=Uj();function yxe(e,t){var r=e.__data__;return vxe(t)?r[typeof t=="string"?"string":"hash"]:r.map}jj.exports=yxe});var zj=_((udt,qj)=>{"use strict";var bxe=Sg();function Exe(e){var t=bxe(this,e).delete(e);return this.size-=t?1:0,t}qj.exports=Exe});var Hj=_((cdt,Vj)=>{"use strict";var xxe=Sg();function wxe(e){return xxe(this,e).get(e)}Vj.exports=wxe});var Gj=_((ddt,Wj)=>{"use strict";var _xe=Sg();function Cxe(e){return _xe(this,e).has(e)}Wj.exports=Cxe});var Yj=_((fdt,Kj)=>{"use strict";var Sxe=Sg();function Txe(e,t){var r=Sxe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}Kj.exports=Txe});var KE=_((pdt,Xj)=>{"use strict";var Pxe=Mj(),Axe=zj(),Dxe=Hj(),kxe=Gj(),Oxe=Yj();function Fd(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Fd.prototype.clear=Pxe;Fd.prototype.delete=Axe;Fd.prototype.get=Dxe;Fd.prototype.has=kxe;Fd.prototype.set=Oxe;Xj.exports=Fd});var Qj=_((mdt,Zj)=>{"use strict";var Ixe=xg(),Rxe=GE(),Nxe=KE(),Lxe=200;function Bxe(e,t){var r=this.__data__;if(r instanceof Ixe){var n=r.__data__;if(!Rxe||n.length<Lxe-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Nxe(n)}return r.set(e,t),this.size=r.size,this}Zj.exports=Bxe});var l1=_((gdt,Jj)=>{"use strict";var Fxe=xg(),Mxe=z4(),$xe=H4(),Uxe=G4(),jxe=Y4(),qxe=Qj();function Md(e){var t=this.__data__=new Fxe(e);this.size=t.size}Md.prototype.clear=Mxe;Md.prototype.delete=$xe;Md.prototype.get=Uxe;Md.prototype.has=jxe;Md.prototype.set=qxe;Jj.exports=Md});var tq=_((hdt,eq)=>{"use strict";var zxe="__lodash_hash_undefined__";function Vxe(e){return this.__data__.set(e,zxe),this}eq.exports=Vxe});var nq=_((vdt,rq)=>{"use strict";function Hxe(e){return this.__data__.has(e)}rq.exports=Hxe});var iq=_((ydt,oq)=>{"use strict";var Wxe=KE(),Gxe=tq(),Kxe=nq();function YE(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Wxe;++t<r;)this.add(e[t])}YE.prototype.add=YE.prototype.push=Gxe;YE.prototype.has=Kxe;oq.exports=YE});var sq=_((bdt,aq)=>{"use strict";function Yxe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}aq.exports=Yxe});var uq=_((Edt,lq)=>{"use strict";function Xxe(e,t){return e.has(t)}lq.exports=Xxe});var u1=_((xdt,cq)=>{"use strict";var Zxe=iq(),Qxe=sq(),Jxe=uq(),ewe=1,twe=2;function rwe(e,t,r,n,o,i){var a=r&ewe,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,p=r&twe?new Zxe:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var v=e[f],h=t[f];if(n)var y=a?n(h,v,f,t,e,i):n(v,h,f,e,t,i);if(y!==void 0){if(y)continue;d=!1;break}if(p){if(!Qxe(t,function(g,m){if(!Jxe(p,m)&&(v===g||o(v,g,r,n,i)))return p.push(m)})){d=!1;break}}else if(!(v===h||o(v,h,r,n,i))){d=!1;break}}return i.delete(e),i.delete(t),d}cq.exports=rwe});var fq=_((wdt,dq)=>{"use strict";var nwe=ha(),owe=nwe.Uint8Array;dq.exports=owe});var mq=_((_dt,pq)=>{"use strict";function iwe(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}pq.exports=iwe});var hq=_((Cdt,gq)=>{"use strict";function awe(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}gq.exports=awe});var xq=_((Sdt,Eq)=>{"use strict";var vq=wg(),yq=fq(),swe=n1(),lwe=u1(),uwe=mq(),cwe=hq(),dwe=1,fwe=2,pwe="[object Boolean]",mwe="[object Date]",gwe="[object Error]",hwe="[object Map]",vwe="[object Number]",ywe="[object RegExp]",bwe="[object Set]",Ewe="[object String]",xwe="[object Symbol]",wwe="[object ArrayBuffer]",_we="[object DataView]",bq=vq?vq.prototype:void 0,c1=bq?bq.valueOf:void 0;function Cwe(e,t,r,n,o,i,a){switch(r){case _we:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case wwe:return!(e.byteLength!=t.byteLength||!i(new yq(e),new yq(t)));case pwe:case mwe:case vwe:return swe(+e,+t);case gwe:return e.name==t.name&&e.message==t.message;case ywe:case Ewe:return e==t+"";case hwe:var s=uwe;case bwe:var l=n&dwe;if(s||(s=cwe),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;n|=fwe,a.set(e,t);var c=lwe(s(e),s(t),n,o,i,a);return a.delete(e),c;case xwe:if(c1)return c1.call(e)==c1.call(t)}return!1}Eq.exports=Cwe});var _q=_((Tdt,wq)=>{"use strict";function Swe(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}wq.exports=Swe});var Sq=_((Pdt,Cq)=>{"use strict";var Twe=_q(),Pwe=Li();function Awe(e,t,r){var n=t(e);return Pwe(e)?n:Twe(n,r(e))}Cq.exports=Awe});var Pq=_((Adt,Tq)=>{"use strict";function Dwe(e,t){for(var r=-1,n=e==null?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}Tq.exports=Dwe});var Dq=_((Ddt,Aq)=>{"use strict";function kwe(){return[]}Aq.exports=kwe});var Iq=_((kdt,Oq)=>{"use strict";var Owe=Pq(),Iwe=Dq(),Rwe=Object.prototype,Nwe=Rwe.propertyIsEnumerable,kq=Object.getOwnPropertySymbols,Lwe=kq?function(e){return e==null?[]:(e=Object(e),Owe(kq(e),function(t){return Nwe.call(e,t)}))}:Iwe;Oq.exports=Lwe});var Nq=_((Odt,Rq)=>{"use strict";function Bwe(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}Rq.exports=Bwe});var $d=_((Idt,Lq)=>{"use strict";function Fwe(e){return e!=null&&typeof e=="object"}Lq.exports=Fwe});var Fq=_((Rdt,Bq)=>{"use strict";var Mwe=Ld(),$we=$d(),Uwe="[object Arguments]";function jwe(e){return $we(e)&&Mwe(e)==Uwe}Bq.exports=jwe});var d1=_((Ndt,Uq)=>{"use strict";var Mq=Fq(),qwe=$d(),$q=Object.prototype,zwe=$q.hasOwnProperty,Vwe=$q.propertyIsEnumerable,Hwe=Mq((function(){return arguments})())?Mq:function(e){return qwe(e)&&zwe.call(e,"callee")&&!Vwe.call(e,"callee")};Uq.exports=Hwe});var qq=_((Ldt,jq)=>{"use strict";function Wwe(){return!1}jq.exports=Wwe});var f1=_((Tg,Ud)=>{"use strict";var Gwe=ha(),Kwe=qq(),Hq=typeof Tg=="object"&&Tg&&!Tg.nodeType&&Tg,zq=Hq&&typeof Ud=="object"&&Ud&&!Ud.nodeType&&Ud,Ywe=zq&&zq.exports===Hq,Vq=Ywe?Gwe.Buffer:void 0,Xwe=Vq?Vq.isBuffer:void 0,Zwe=Xwe||Kwe;Ud.exports=Zwe});var p1=_((Bdt,Wq)=>{"use strict";var Qwe=9007199254740991,Jwe=/^(?:0|[1-9]\d*)$/;function e_e(e,t){var r=typeof e;return t=t??Qwe,!!t&&(r=="number"||r!="symbol"&&Jwe.test(e))&&e>-1&&e%1==0&&e<t}Wq.exports=e_e});var XE=_((Fdt,Gq)=>{"use strict";var t_e=9007199254740991;function r_e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=t_e}Gq.exports=r_e});var Yq=_((Mdt,Kq)=>{"use strict";var n_e=Ld(),o_e=XE(),i_e=$d(),a_e="[object Arguments]",s_e="[object Array]",l_e="[object Boolean]",u_e="[object Date]",c_e="[object Error]",d_e="[object Function]",f_e="[object Map]",p_e="[object Number]",m_e="[object Object]",g_e="[object RegExp]",h_e="[object Set]",v_e="[object String]",y_e="[object WeakMap]",b_e="[object ArrayBuffer]",E_e="[object DataView]",x_e="[object Float32Array]",w_e="[object Float64Array]",__e="[object Int8Array]",C_e="[object Int16Array]",S_e="[object Int32Array]",T_e="[object Uint8Array]",P_e="[object Uint8ClampedArray]",A_e="[object Uint16Array]",D_e="[object Uint32Array]",Zt={};Zt[x_e]=Zt[w_e]=Zt[__e]=Zt[C_e]=Zt[S_e]=Zt[T_e]=Zt[P_e]=Zt[A_e]=Zt[D_e]=!0;Zt[a_e]=Zt[s_e]=Zt[b_e]=Zt[l_e]=Zt[E_e]=Zt[u_e]=Zt[c_e]=Zt[d_e]=Zt[f_e]=Zt[p_e]=Zt[m_e]=Zt[g_e]=Zt[h_e]=Zt[v_e]=Zt[y_e]=!1;function k_e(e){return i_e(e)&&o_e(e.length)&&!!Zt[n_e(e)]}Kq.exports=k_e});var Zq=_(($dt,Xq)=>{"use strict";function O_e(e){return function(t){return e(t)}}Xq.exports=O_e});var Jq=_((Pg,jd)=>{"use strict";var I_e=o1(),Qq=typeof Pg=="object"&&Pg&&!Pg.nodeType&&Pg,Ag=Qq&&typeof jd=="object"&&jd&&!jd.nodeType&&jd,R_e=Ag&&Ag.exports===Qq,m1=R_e&&I_e.process,N_e=(function(){try{var e=Ag&&Ag.require&&Ag.require("util").types;return e||m1&&m1.binding&&m1.binding("util")}catch{}})();jd.exports=N_e});var g1=_((Udt,r9)=>{"use strict";var L_e=Yq(),B_e=Zq(),e9=Jq(),t9=e9&&e9.isTypedArray,F_e=t9?B_e(t9):L_e;r9.exports=F_e});var o9=_((jdt,n9)=>{"use strict";var M_e=Nq(),$_e=d1(),U_e=Li(),j_e=f1(),q_e=p1(),z_e=g1(),V_e=Object.prototype,H_e=V_e.hasOwnProperty;function W_e(e,t){var r=U_e(e),n=!r&&$_e(e),o=!r&&!n&&j_e(e),i=!r&&!n&&!o&&z_e(e),a=r||n||o||i,s=a?M_e(e.length,String):[],l=s.length;for(var u in e)(t||H_e.call(e,u))&&!(a&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||q_e(u,l)))&&s.push(u);return s}n9.exports=W_e});var a9=_((qdt,i9)=>{"use strict";var G_e=Object.prototype;function K_e(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||G_e;return e===r}i9.exports=K_e});var l9=_((zdt,s9)=>{"use strict";function Y_e(e,t){return function(r){return e(t(r))}}s9.exports=Y_e});var c9=_((Vdt,u9)=>{"use strict";var X_e=l9(),Z_e=X_e(Object.keys,Object);u9.exports=Z_e});var f9=_((Hdt,d9)=>{"use strict";var Q_e=a9(),J_e=c9(),eCe=Object.prototype,tCe=eCe.hasOwnProperty;function rCe(e){if(!Q_e(e))return J_e(e);var t=[];for(var r in Object(e))tCe.call(e,r)&&r!="constructor"&&t.push(r);return t}d9.exports=rCe});var ZE=_((Wdt,p9)=>{"use strict";var nCe=i1(),oCe=XE();function iCe(e){return e!=null&&oCe(e.length)&&!nCe(e)}p9.exports=iCe});var QE=_((Gdt,m9)=>{"use strict";var aCe=o9(),sCe=f9(),lCe=ZE();function uCe(e){return lCe(e)?aCe(e):sCe(e)}m9.exports=uCe});var h9=_((Kdt,g9)=>{"use strict";var cCe=Sq(),dCe=Iq(),fCe=QE();function pCe(e){return cCe(e,fCe,dCe)}g9.exports=pCe});var b9=_((Ydt,y9)=>{"use strict";var v9=h9(),mCe=1,gCe=Object.prototype,hCe=gCe.hasOwnProperty;function vCe(e,t,r,n,o,i){var a=r&mCe,s=v9(e),l=s.length,u=v9(t),c=u.length;if(l!=c&&!a)return!1;for(var f=l;f--;){var d=s[f];if(!(a?d in t:hCe.call(t,d)))return!1}var p=i.get(e),v=i.get(t);if(p&&v)return p==t&&v==e;var h=!0;i.set(e,t),i.set(t,e);for(var y=a;++f<l;){d=s[f];var g=e[d],m=t[d];if(n)var b=a?n(m,g,d,t,e,i):n(g,m,d,e,t,i);if(!(b===void 0?g===m||o(g,m,r,n,i):b)){h=!1;break}y||(y=d=="constructor")}if(h&&!y){var E=e.constructor,C=t.constructor;E!=C&&"constructor"in e&&"constructor"in t&&!(typeof E=="function"&&E instanceof E&&typeof C=="function"&&C instanceof C)&&(h=!1)}return i.delete(e),i.delete(t),h}y9.exports=vCe});var x9=_((Xdt,E9)=>{"use strict";var yCe=ku(),bCe=ha(),ECe=yCe(bCe,"DataView");E9.exports=ECe});var _9=_((Zdt,w9)=>{"use strict";var xCe=ku(),wCe=ha(),_Ce=xCe(wCe,"Promise");w9.exports=_Ce});var S9=_((Qdt,C9)=>{"use strict";var CCe=ku(),SCe=ha(),TCe=CCe(SCe,"Set");C9.exports=TCe});var P9=_((Jdt,T9)=>{"use strict";var PCe=ku(),ACe=ha(),DCe=PCe(ACe,"WeakMap");T9.exports=DCe});var L9=_((eft,N9)=>{"use strict";var h1=x9(),v1=GE(),y1=_9(),b1=S9(),E1=P9(),R9=Ld(),qd=s1(),A9="[object Map]",kCe="[object Object]",D9="[object Promise]",k9="[object Set]",O9="[object WeakMap]",I9="[object DataView]",OCe=qd(h1),ICe=qd(v1),RCe=qd(y1),NCe=qd(b1),LCe=qd(E1),Ou=R9;(h1&&Ou(new h1(new ArrayBuffer(1)))!=I9||v1&&Ou(new v1)!=A9||y1&&Ou(y1.resolve())!=D9||b1&&Ou(new b1)!=k9||E1&&Ou(new E1)!=O9)&&(Ou=function(e){var t=R9(e),r=t==kCe?e.constructor:void 0,n=r?qd(r):"";if(n)switch(n){case OCe:return I9;case ICe:return A9;case RCe:return D9;case NCe:return k9;case LCe:return O9}return t});N9.exports=Ou});var z9=_((tft,q9)=>{"use strict";var x1=l1(),BCe=u1(),FCe=xq(),MCe=b9(),B9=L9(),F9=Li(),M9=f1(),$Ce=g1(),UCe=1,$9="[object Arguments]",U9="[object Array]",JE="[object Object]",jCe=Object.prototype,j9=jCe.hasOwnProperty;function qCe(e,t,r,n,o,i){var a=F9(e),s=F9(t),l=a?U9:B9(e),u=s?U9:B9(t);l=l==$9?JE:l,u=u==$9?JE:u;var c=l==JE,f=u==JE,d=l==u;if(d&&M9(e)){if(!M9(t))return!1;a=!0,c=!1}if(d&&!c)return i||(i=new x1),a||$Ce(e)?BCe(e,t,r,n,o,i):FCe(e,t,l,r,n,o,i);if(!(r&UCe)){var p=c&&j9.call(e,"__wrapped__"),v=f&&j9.call(t,"__wrapped__");if(p||v){var h=p?e.value():e,y=v?t.value():t;return i||(i=new x1),o(h,y,r,n,i)}}return d?(i||(i=new x1),MCe(e,t,r,n,o,i)):!1}q9.exports=qCe});var w1=_((rft,W9)=>{"use strict";var zCe=z9(),V9=$d();function H9(e,t,r,n,o){return e===t?!0:e==null||t==null||!V9(e)&&!V9(t)?e!==e&&t!==t:zCe(e,t,r,n,H9,o)}W9.exports=H9});var K9=_((nft,G9)=>{"use strict";var VCe=l1(),HCe=w1(),WCe=1,GCe=2;function KCe(e,t,r,n){var o=r.length,i=o,a=!n;if(e==null)return!i;for(e=Object(e);o--;){var s=r[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){s=r[o];var l=s[0],u=e[l],c=s[1];if(a&&s[2]){if(u===void 0&&!(l in e))return!1}else{var f=new VCe;if(n)var d=n(u,c,l,e,t,f);if(!(d===void 0?HCe(c,u,WCe|GCe,n,f):d))return!1}}return!0}G9.exports=KCe});var _1=_((oft,Y9)=>{"use strict";var YCe=WE();function XCe(e){return e===e&&!YCe(e)}Y9.exports=XCe});var Z9=_((ift,X9)=>{"use strict";var ZCe=_1(),QCe=QE();function JCe(e){for(var t=QCe(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,ZCe(o)]}return t}X9.exports=JCe});var C1=_((aft,Q9)=>{"use strict";function eSe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}Q9.exports=eSe});var ez=_((sft,J9)=>{"use strict";var tSe=K9(),rSe=Z9(),nSe=C1();function oSe(e){var t=rSe(e);return t.length==1&&t[0][2]?nSe(t[0][0],t[0][1]):function(r){return r===e||tSe(r,e,t)}}J9.exports=oSe});var e0=_((lft,tz)=>{"use strict";var iSe=Ld(),aSe=$d(),sSe="[object Symbol]";function lSe(e){return typeof e=="symbol"||aSe(e)&&iSe(e)==sSe}tz.exports=lSe});var t0=_((uft,rz)=>{"use strict";var uSe=Li(),cSe=e0(),dSe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fSe=/^\w*$/;function pSe(e,t){if(uSe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||cSe(e)?!0:fSe.test(e)||!dSe.test(e)||t!=null&&e in Object(t)}rz.exports=pSe});var iz=_((cft,oz)=>{"use strict";var nz=KE(),mSe="Expected a function";function S1(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(mSe);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(S1.Cache||nz),r}S1.Cache=nz;oz.exports=S1});var sz=_((dft,az)=>{"use strict";var gSe=iz(),hSe=500;function vSe(e){var t=gSe(e,function(n){return r.size===hSe&&r.clear(),n}),r=t.cache;return t}az.exports=vSe});var uz=_((fft,lz)=>{"use strict";var ySe=sz(),bSe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ESe=/\\(\\)?/g,xSe=ySe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(bSe,function(r,n,o,i){t.push(o?i.replace(ESe,"$1"):n||r)}),t});lz.exports=xSe});var gz=_((pft,mz)=>{"use strict";var cz=wg(),wSe=r1(),_Se=Li(),CSe=e0(),SSe=1/0,dz=cz?cz.prototype:void 0,fz=dz?dz.toString:void 0;function pz(e){if(typeof e=="string")return e;if(_Se(e))return wSe(e,pz)+"";if(CSe(e))return fz?fz.call(e):"";var t=e+"";return t=="0"&&1/e==-SSe?"-0":t}mz.exports=pz});var vz=_((mft,hz)=>{"use strict";var TSe=gz();function PSe(e){return e==null?"":TSe(e)}hz.exports=PSe});var T1=_((gft,yz)=>{"use strict";var ASe=Li(),DSe=t0(),kSe=uz(),OSe=vz();function ISe(e,t){return ASe(e)?e:DSe(e,t)?[e]:kSe(OSe(e))}yz.exports=ISe});var Dg=_((hft,bz)=>{"use strict";var RSe=e0(),NSe=1/0;function LSe(e){if(typeof e=="string"||RSe(e))return e;var t=e+"";return t=="0"&&1/e==-NSe?"-0":t}bz.exports=LSe});var P1=_((vft,Ez)=>{"use strict";var BSe=T1(),FSe=Dg();function MSe(e,t){t=BSe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[FSe(t[r++])];return r&&r==n?e:void 0}Ez.exports=MSe});var wz=_((yft,xz)=>{"use strict";var $Se=P1();function USe(e,t,r){var n=e==null?void 0:$Se(e,t);return n===void 0?r:n}xz.exports=USe});var Cz=_((bft,_z)=>{"use strict";function jSe(e,t){return e!=null&&t in Object(e)}_z.exports=jSe});var Tz=_((Eft,Sz)=>{"use strict";var qSe=T1(),zSe=d1(),VSe=Li(),HSe=p1(),WSe=XE(),GSe=Dg();function KSe(e,t,r){t=qSe(t,e);for(var n=-1,o=t.length,i=!1;++n<o;){var a=GSe(t[n]);if(!(i=e!=null&&r(e,a)))break;e=e[a]}return i||++n!=o?i:(o=e==null?0:e.length,!!o&&WSe(o)&&HSe(a,o)&&(VSe(e)||zSe(e)))}Sz.exports=KSe});var Az=_((xft,Pz)=>{"use strict";var YSe=Cz(),XSe=Tz();function ZSe(e,t){return e!=null&&XSe(e,t,YSe)}Pz.exports=ZSe});var kz=_((wft,Dz)=>{"use strict";var QSe=w1(),JSe=wz(),eTe=Az(),tTe=t0(),rTe=_1(),nTe=C1(),oTe=Dg(),iTe=1,aTe=2;function sTe(e,t){return tTe(e)&&rTe(t)?nTe(oTe(e),t):function(r){var n=JSe(r,e);return n===void 0&&n===t?eTe(r,e):QSe(t,n,iTe|aTe)}}Dz.exports=sTe});var Iz=_((_ft,Oz)=>{"use strict";function lTe(e){return e}Oz.exports=lTe});var Nz=_((Cft,Rz)=>{"use strict";function uTe(e){return function(t){return t==null?void 0:t[e]}}Rz.exports=uTe});var Bz=_((Sft,Lz)=>{"use strict";var cTe=P1();function dTe(e){return function(t){return cTe(t,e)}}Lz.exports=dTe});var Mz=_((Tft,Fz)=>{"use strict";var fTe=Nz(),pTe=Bz(),mTe=t0(),gTe=Dg();function hTe(e){return mTe(e)?fTe(gTe(e)):pTe(e)}Fz.exports=hTe});var Uz=_((Pft,$z)=>{"use strict";var vTe=ez(),yTe=kz(),bTe=Iz(),ETe=Li(),xTe=Mz();function wTe(e){return typeof e=="function"?e:e==null?bTe:typeof e=="object"?ETe(e)?yTe(e[0],e[1]):vTe(e):xTe(e)}$z.exports=wTe});var qz=_((Aft,jz)=>{"use strict";function _Te(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var l=a[e?s:++o];if(r(i[l],l,i)===!1)break}return t}}jz.exports=_Te});var Vz=_((Dft,zz)=>{"use strict";var CTe=qz(),STe=CTe();zz.exports=STe});var Wz=_((kft,Hz)=>{"use strict";var TTe=Vz(),PTe=QE();function ATe(e,t){return e&&TTe(e,t,PTe)}Hz.exports=ATe});var Kz=_((Oft,Gz)=>{"use strict";var DTe=ZE();function kTe(e,t){return function(r,n){if(r==null)return r;if(!DTe(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=Object(r);(t?i--:++i<o)&&n(a[i],i,a)!==!1;);return r}}Gz.exports=kTe});var Xz=_((Ift,Yz)=>{"use strict";var OTe=Wz(),ITe=Kz(),RTe=ITe(OTe);Yz.exports=RTe});var Qz=_((Rft,Zz)=>{"use strict";var NTe=Xz(),LTe=ZE();function BTe(e,t){var r=-1,n=LTe(e)?Array(e.length):[];return NTe(e,function(o,i,a){n[++r]=t(o,i,a)}),n}Zz.exports=BTe});var e6=_((Nft,Jz)=>{"use strict";var FTe=r1(),MTe=Uz(),$Te=Qz(),UTe=Li();function jTe(e,t){var r=UTe(e)?FTe:$Te;return r(e,MTe(t,3))}Jz.exports=jTe});var r6=_((Lft,t6)=>{"use strict";function qTe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}t6.exports=qTe});var N1=_((fpt,b6)=>{"use strict";function cPe(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}b6.exports=cPe});var u0=_((ppt,E6)=>{"use strict";function dPe(e){return e}E6.exports=dPe});var L1=_((mpt,w6)=>{"use strict";var fPe=N1(),x6=Math.max;function pPe(e,t,r){return t=x6(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=x6(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),fPe(e,this,s)}}w6.exports=pPe});var C6=_((gpt,_6)=>{"use strict";function mPe(e){return function(){return e}}_6.exports=mPe});var B1=_((hpt,S6)=>{"use strict";var gPe=typeof global=="object"&&global&&global.Object===Object&&global;S6.exports=gPe});var Bi=_((vpt,T6)=>{"use strict";var hPe=B1(),vPe=typeof self=="object"&&self&&self.Object===Object&&self,yPe=hPe||vPe||Function("return this")();T6.exports=yPe});var Iu=_((ypt,P6)=>{"use strict";var bPe=Bi(),EPe=bPe.Symbol;P6.exports=EPe});var O6=_((bpt,k6)=>{"use strict";var A6=Iu(),D6=Object.prototype,xPe=D6.hasOwnProperty,wPe=D6.toString,Rg=A6?A6.toStringTag:void 0;function _Pe(e){var t=xPe.call(e,Rg),r=e[Rg];try{e[Rg]=void 0;var n=!0}catch{}var o=wPe.call(e);return n&&(t?e[Rg]=r:delete e[Rg]),o}k6.exports=_Pe});var R6=_((Ept,I6)=>{"use strict";var CPe=Object.prototype,SPe=CPe.toString;function TPe(e){return SPe.call(e)}I6.exports=TPe});var Ru=_((xpt,B6)=>{"use strict";var N6=Iu(),PPe=O6(),APe=R6(),DPe="[object Null]",kPe="[object Undefined]",L6=N6?N6.toStringTag:void 0;function OPe(e){return e==null?e===void 0?kPe:DPe:L6&&L6 in Object(e)?PPe(e):APe(e)}B6.exports=OPe});var Fi=_((wpt,F6)=>{"use strict";function IPe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}F6.exports=IPe});var c0=_((_pt,M6)=>{"use strict";var RPe=Ru(),NPe=Fi(),LPe="[object AsyncFunction]",BPe="[object Function]",FPe="[object GeneratorFunction]",MPe="[object Proxy]";function $Pe(e){if(!NPe(e))return!1;var t=RPe(e);return t==BPe||t==FPe||t==LPe||t==MPe}M6.exports=$Pe});var U6=_((Cpt,$6)=>{"use strict";var UPe=Bi(),jPe=UPe["__core-js_shared__"];$6.exports=jPe});var z6=_((Spt,q6)=>{"use strict";var F1=U6(),j6=(function(){var e=/[^.]+$/.exec(F1&&F1.keys&&F1.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function qPe(e){return!!j6&&j6 in e}q6.exports=qPe});var M1=_((Tpt,V6)=>{"use strict";var zPe=Function.prototype,VPe=zPe.toString;function HPe(e){if(e!=null){try{return VPe.call(e)}catch{}try{return e+""}catch{}}return""}V6.exports=HPe});var W6=_((Ppt,H6)=>{"use strict";var WPe=c0(),GPe=z6(),KPe=Fi(),YPe=M1(),XPe=/[\\^$.*+?()[\]{}|]/g,ZPe=/^\[object .+?Constructor\]$/,QPe=Function.prototype,JPe=Object.prototype,e1e=QPe.toString,t1e=JPe.hasOwnProperty,r1e=RegExp("^"+e1e.call(t1e).replace(XPe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function n1e(e){if(!KPe(e)||GPe(e))return!1;var t=WPe(e)?r1e:ZPe;return t.test(YPe(e))}H6.exports=n1e});var K6=_((Apt,G6)=>{"use strict";function o1e(e,t){return e==null?void 0:e[t]}G6.exports=o1e});var cl=_((Dpt,Y6)=>{"use strict";var i1e=W6(),a1e=K6();function s1e(e,t){var r=a1e(e,t);return i1e(r)?r:void 0}Y6.exports=s1e});var $1=_((kpt,X6)=>{"use strict";var l1e=cl(),u1e=(function(){try{var e=l1e(Object,"defineProperty");return e({},"",{}),e}catch{}})();X6.exports=u1e});var J6=_((Opt,Q6)=>{"use strict";var c1e=C6(),Z6=$1(),d1e=u0(),f1e=Z6?function(e,t){return Z6(e,"toString",{configurable:!0,enumerable:!1,value:c1e(t),writable:!0})}:d1e;Q6.exports=f1e});var t5=_((Ipt,e5)=>{"use strict";var p1e=800,m1e=16,g1e=Date.now;function h1e(e){var t=0,r=0;return function(){var n=g1e(),o=m1e-(n-r);if(r=n,o>0){if(++t>=p1e)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}e5.exports=h1e});var U1=_((Rpt,r5)=>{"use strict";var v1e=J6(),y1e=t5(),b1e=y1e(v1e);r5.exports=b1e});var j1=_((Npt,n5)=>{"use strict";var E1e=u0(),x1e=L1(),w1e=U1();function _1e(e,t){return w1e(x1e(e,t,E1e),e+"")}n5.exports=_1e});var i5=_((Lpt,o5)=>{"use strict";function C1e(){this.__data__=[],this.size=0}o5.exports=C1e});var Vd=_((Bpt,a5)=>{"use strict";function S1e(e,t){return e===t||e!==e&&t!==t}a5.exports=S1e});var Ng=_((Fpt,s5)=>{"use strict";var T1e=Vd();function P1e(e,t){for(var r=e.length;r--;)if(T1e(e[r][0],t))return r;return-1}s5.exports=P1e});var u5=_((Mpt,l5)=>{"use strict";var A1e=Ng(),D1e=Array.prototype,k1e=D1e.splice;function O1e(e){var t=this.__data__,r=A1e(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():k1e.call(t,r,1),--this.size,!0}l5.exports=O1e});var d5=_(($pt,c5)=>{"use strict";var I1e=Ng();function R1e(e){var t=this.__data__,r=I1e(t,e);return r<0?void 0:t[r][1]}c5.exports=R1e});var p5=_((Upt,f5)=>{"use strict";var N1e=Ng();function L1e(e){return N1e(this.__data__,e)>-1}f5.exports=L1e});var g5=_((jpt,m5)=>{"use strict";var B1e=Ng();function F1e(e,t){var r=this.__data__,n=B1e(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}m5.exports=F1e});var Lg=_((qpt,h5)=>{"use strict";var M1e=i5(),$1e=u5(),U1e=d5(),j1e=p5(),q1e=g5();function Hd(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hd.prototype.clear=M1e;Hd.prototype.delete=$1e;Hd.prototype.get=U1e;Hd.prototype.has=j1e;Hd.prototype.set=q1e;h5.exports=Hd});var y5=_((zpt,v5)=>{"use strict";var z1e=Lg();function V1e(){this.__data__=new z1e,this.size=0}v5.exports=V1e});var E5=_((Vpt,b5)=>{"use strict";function H1e(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}b5.exports=H1e});var w5=_((Hpt,x5)=>{"use strict";function W1e(e){return this.__data__.get(e)}x5.exports=W1e});var C5=_((Wpt,_5)=>{"use strict";function G1e(e){return this.__data__.has(e)}_5.exports=G1e});var d0=_((Gpt,S5)=>{"use strict";var K1e=cl(),Y1e=Bi(),X1e=K1e(Y1e,"Map");S5.exports=X1e});var Bg=_((Kpt,T5)=>{"use strict";var Z1e=cl(),Q1e=Z1e(Object,"create");T5.exports=Q1e});var D5=_((Ypt,A5)=>{"use strict";var P5=Bg();function J1e(){this.__data__=P5?P5(null):{},this.size=0}A5.exports=J1e});var O5=_((Xpt,k5)=>{"use strict";function eAe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}k5.exports=eAe});var R5=_((Zpt,I5)=>{"use strict";var tAe=Bg(),rAe="__lodash_hash_undefined__",nAe=Object.prototype,oAe=nAe.hasOwnProperty;function iAe(e){var t=this.__data__;if(tAe){var r=t[e];return r===rAe?void 0:r}return oAe.call(t,e)?t[e]:void 0}I5.exports=iAe});var L5=_((Qpt,N5)=>{"use strict";var aAe=Bg(),sAe=Object.prototype,lAe=sAe.hasOwnProperty;function uAe(e){var t=this.__data__;return aAe?t[e]!==void 0:lAe.call(t,e)}N5.exports=uAe});var F5=_((Jpt,B5)=>{"use strict";var cAe=Bg(),dAe="__lodash_hash_undefined__";function fAe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=cAe&&t===void 0?dAe:t,this}B5.exports=fAe});var $5=_((emt,M5)=>{"use strict";var pAe=D5(),mAe=O5(),gAe=R5(),hAe=L5(),vAe=F5();function Wd(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Wd.prototype.clear=pAe;Wd.prototype.delete=mAe;Wd.prototype.get=gAe;Wd.prototype.has=hAe;Wd.prototype.set=vAe;M5.exports=Wd});var q5=_((tmt,j5)=>{"use strict";var U5=$5(),yAe=Lg(),bAe=d0();function EAe(){this.size=0,this.__data__={hash:new U5,map:new(bAe||yAe),string:new U5}}j5.exports=EAe});var V5=_((rmt,z5)=>{"use strict";function xAe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}z5.exports=xAe});var Fg=_((nmt,H5)=>{"use strict";var wAe=V5();function _Ae(e,t){var r=e.__data__;return wAe(t)?r[typeof t=="string"?"string":"hash"]:r.map}H5.exports=_Ae});var G5=_((omt,W5)=>{"use strict";var CAe=Fg();function SAe(e){var t=CAe(this,e).delete(e);return this.size-=t?1:0,t}W5.exports=SAe});var Y5=_((imt,K5)=>{"use strict";var TAe=Fg();function PAe(e){return TAe(this,e).get(e)}K5.exports=PAe});var Z5=_((amt,X5)=>{"use strict";var AAe=Fg();function DAe(e){return AAe(this,e).has(e)}X5.exports=DAe});var J5=_((smt,Q5)=>{"use strict";var kAe=Fg();function OAe(e,t){var r=kAe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}Q5.exports=OAe});var f0=_((lmt,eV)=>{"use strict";var IAe=q5(),RAe=G5(),NAe=Y5(),LAe=Z5(),BAe=J5();function Gd(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Gd.prototype.clear=IAe;Gd.prototype.delete=RAe;Gd.prototype.get=NAe;Gd.prototype.has=LAe;Gd.prototype.set=BAe;eV.exports=Gd});var rV=_((umt,tV)=>{"use strict";var FAe=Lg(),MAe=d0(),$Ae=f0(),UAe=200;function jAe(e,t){var r=this.__data__;if(r instanceof FAe){var n=r.__data__;if(!MAe||n.length<UAe-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new $Ae(n)}return r.set(e,t),this.size=r.size,this}tV.exports=jAe});var Mg=_((cmt,nV)=>{"use strict";var qAe=Lg(),zAe=y5(),VAe=E5(),HAe=w5(),WAe=C5(),GAe=rV();function Kd(e){var t=this.__data__=new qAe(e);this.size=t.size}Kd.prototype.clear=zAe;Kd.prototype.delete=VAe;Kd.prototype.get=HAe;Kd.prototype.has=WAe;Kd.prototype.set=GAe;nV.exports=Kd});var $g=_((dmt,iV)=>{"use strict";var oV=$1();function KAe(e,t,r){t=="__proto__"&&oV?oV(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}iV.exports=KAe});var q1=_((fmt,aV)=>{"use strict";var YAe=$g(),XAe=Vd();function ZAe(e,t,r){(r!==void 0&&!XAe(e[t],r)||r===void 0&&!(t in e))&&YAe(e,t,r)}aV.exports=ZAe});var lV=_((pmt,sV)=>{"use strict";function QAe(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var l=a[e?s:++o];if(r(i[l],l,i)===!1)break}return t}}sV.exports=QAe});var z1=_((mmt,uV)=>{"use strict";var JAe=lV(),eDe=JAe();uV.exports=eDe});var V1=_((Ug,Yd)=>{"use strict";var tDe=Bi(),pV=typeof Ug=="object"&&Ug&&!Ug.nodeType&&Ug,cV=pV&&typeof Yd=="object"&&Yd&&!Yd.nodeType&&Yd,rDe=cV&&cV.exports===pV,dV=rDe?tDe.Buffer:void 0,fV=dV?dV.allocUnsafe:void 0;function nDe(e,t){if(t)return e.slice();var r=e.length,n=fV?fV(r):new e.constructor(r);return e.copy(n),n}Yd.exports=nDe});var H1=_((gmt,mV)=>{"use strict";var oDe=Bi(),iDe=oDe.Uint8Array;mV.exports=iDe});var p0=_((hmt,hV)=>{"use strict";var gV=H1();function aDe(e){var t=new e.constructor(e.byteLength);return new gV(t).set(new gV(e)),t}hV.exports=aDe});var W1=_((vmt,vV)=>{"use strict";var sDe=p0();function lDe(e,t){var r=t?sDe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}vV.exports=lDe});var G1=_((ymt,yV)=>{"use strict";function uDe(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}yV.exports=uDe});var xV=_((bmt,EV)=>{"use strict";var cDe=Fi(),bV=Object.create,dDe=(function(){function e(){}return function(t){if(!cDe(t))return{};if(bV)return bV(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();EV.exports=dDe});var K1=_((Emt,wV)=>{"use strict";function fDe(e,t){return function(r){return e(t(r))}}wV.exports=fDe});var m0=_((xmt,_V)=>{"use strict";var pDe=K1(),mDe=pDe(Object.getPrototypeOf,Object);_V.exports=mDe});var g0=_((wmt,CV)=>{"use strict";var gDe=Object.prototype;function hDe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||gDe;return e===r}CV.exports=hDe});var Y1=_((_mt,SV)=>{"use strict";var vDe=xV(),yDe=m0(),bDe=g0();function EDe(e){return typeof e.constructor=="function"&&!bDe(e)?vDe(yDe(e)):{}}SV.exports=EDe});var va=_((Cmt,TV)=>{"use strict";function xDe(e){return e!=null&&typeof e=="object"}TV.exports=xDe});var AV=_((Smt,PV)=>{"use strict";var wDe=Ru(),_De=va(),CDe="[object Arguments]";function SDe(e){return _De(e)&&wDe(e)==CDe}PV.exports=SDe});var jg=_((Tmt,OV)=>{"use strict";var DV=AV(),TDe=va(),kV=Object.prototype,PDe=kV.hasOwnProperty,ADe=kV.propertyIsEnumerable,DDe=DV((function(){return arguments})())?DV:function(e){return TDe(e)&&PDe.call(e,"callee")&&!ADe.call(e,"callee")};OV.exports=DDe});var no=_((Pmt,IV)=>{"use strict";var kDe=Array.isArray;IV.exports=kDe});var h0=_((Amt,RV)=>{"use strict";var ODe=9007199254740991;function IDe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ODe}RV.exports=IDe});var Xd=_((Dmt,NV)=>{"use strict";var RDe=c0(),NDe=h0();function LDe(e){return e!=null&&NDe(e.length)&&!RDe(e)}NV.exports=LDe});var BV=_((kmt,LV)=>{"use strict";var BDe=Xd(),FDe=va();function MDe(e){return FDe(e)&&BDe(e)}LV.exports=MDe});var MV=_((Omt,FV)=>{"use strict";function $De(){return!1}FV.exports=$De});var zg=_((qg,Zd)=>{"use strict";var UDe=Bi(),jDe=MV(),jV=typeof qg=="object"&&qg&&!qg.nodeType&&qg,$V=jV&&typeof Zd=="object"&&Zd&&!Zd.nodeType&&Zd,qDe=$V&&$V.exports===jV,UV=qDe?UDe.Buffer:void 0,zDe=UV?UV.isBuffer:void 0,VDe=zDe||jDe;Zd.exports=VDe});var X1=_((Imt,zV)=>{"use strict";var HDe=Ru(),WDe=m0(),GDe=va(),KDe="[object Object]",YDe=Function.prototype,XDe=Object.prototype,qV=YDe.toString,ZDe=XDe.hasOwnProperty,QDe=qV.call(Object);function JDe(e){if(!GDe(e)||HDe(e)!=KDe)return!1;var t=WDe(e);if(t===null)return!0;var r=ZDe.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&qV.call(r)==QDe}zV.exports=JDe});var HV=_((Rmt,VV)=>{"use strict";var eke=Ru(),tke=h0(),rke=va(),nke="[object Arguments]",oke="[object Array]",ike="[object Boolean]",ake="[object Date]",ske="[object Error]",lke="[object Function]",uke="[object Map]",cke="[object Number]",dke="[object Object]",fke="[object RegExp]",pke="[object Set]",mke="[object String]",gke="[object WeakMap]",hke="[object ArrayBuffer]",vke="[object DataView]",yke="[object Float32Array]",bke="[object Float64Array]",Eke="[object Int8Array]",xke="[object Int16Array]",wke="[object Int32Array]",_ke="[object Uint8Array]",Cke="[object Uint8ClampedArray]",Ske="[object Uint16Array]",Tke="[object Uint32Array]",Qt={};Qt[yke]=Qt[bke]=Qt[Eke]=Qt[xke]=Qt[wke]=Qt[_ke]=Qt[Cke]=Qt[Ske]=Qt[Tke]=!0;Qt[nke]=Qt[oke]=Qt[hke]=Qt[ike]=Qt[vke]=Qt[ake]=Qt[ske]=Qt[lke]=Qt[uke]=Qt[cke]=Qt[dke]=Qt[fke]=Qt[pke]=Qt[mke]=Qt[gke]=!1;function Pke(e){return rke(e)&&tke(e.length)&&!!Qt[eke(e)]}VV.exports=Pke});var v0=_((Nmt,WV)=>{"use strict";function Ake(e){return function(t){return e(t)}}WV.exports=Ake});var y0=_((Vg,Qd)=>{"use strict";var Dke=B1(),GV=typeof Vg=="object"&&Vg&&!Vg.nodeType&&Vg,Hg=GV&&typeof Qd=="object"&&Qd&&!Qd.nodeType&&Qd,kke=Hg&&Hg.exports===GV,Z1=kke&&Dke.process,Oke=(function(){try{var e=Hg&&Hg.require&&Hg.require("util").types;return e||Z1&&Z1.binding&&Z1.binding("util")}catch{}})();Qd.exports=Oke});var b0=_((Lmt,XV)=>{"use strict";var Ike=HV(),Rke=v0(),KV=y0(),YV=KV&&KV.isTypedArray,Nke=YV?Rke(YV):Ike;XV.exports=Nke});var Q1=_((Bmt,ZV)=>{"use strict";function Lke(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}ZV.exports=Lke});var J1=_((Fmt,QV)=>{"use strict";var Bke=$g(),Fke=Vd(),Mke=Object.prototype,$ke=Mke.hasOwnProperty;function Uke(e,t,r){var n=e[t];(!($ke.call(e,t)&&Fke(n,r))||r===void 0&&!(t in e))&&Bke(e,t,r)}QV.exports=Uke});var Nu=_((Mmt,JV)=>{"use strict";var jke=J1(),qke=$g();function zke(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=n?n(r[s],e[s],s,r,e):void 0;l===void 0&&(l=e[s]),o?qke(r,s,l):jke(r,s,l)}return r}JV.exports=zke});var t8=_(($mt,e8)=>{"use strict";function Vke(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}e8.exports=Vke});var E0=_((Umt,r8)=>{"use strict";var Hke=9007199254740991,Wke=/^(?:0|[1-9]\d*)$/;function Gke(e,t){var r=typeof e;return t=t??Hke,!!t&&(r=="number"||r!="symbol"&&Wke.test(e))&&e>-1&&e%1==0&&e<t}r8.exports=Gke});var eA=_((jmt,n8)=>{"use strict";var Kke=t8(),Yke=jg(),Xke=no(),Zke=zg(),Qke=E0(),Jke=b0(),eOe=Object.prototype,tOe=eOe.hasOwnProperty;function rOe(e,t){var r=Xke(e),n=!r&&Yke(e),o=!r&&!n&&Zke(e),i=!r&&!n&&!o&&Jke(e),a=r||n||o||i,s=a?Kke(e.length,String):[],l=s.length;for(var u in e)(t||tOe.call(e,u))&&!(a&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Qke(u,l)))&&s.push(u);return s}n8.exports=rOe});var i8=_((qmt,o8)=>{"use strict";function nOe(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}o8.exports=nOe});var s8=_((zmt,a8)=>{"use strict";var oOe=Fi(),iOe=g0(),aOe=i8(),sOe=Object.prototype,lOe=sOe.hasOwnProperty;function uOe(e){if(!oOe(e))return aOe(e);var t=iOe(e),r=[];for(var n in e)n=="constructor"&&(t||!lOe.call(e,n))||r.push(n);return r}a8.exports=uOe});var Jd=_((Vmt,l8)=>{"use strict";var cOe=eA(),dOe=s8(),fOe=Xd();function pOe(e){return fOe(e)?cOe(e,!0):dOe(e)}l8.exports=pOe});var c8=_((Hmt,u8)=>{"use strict";var mOe=Nu(),gOe=Jd();function hOe(e){return mOe(e,gOe(e))}u8.exports=hOe});var h8=_((Wmt,g8)=>{"use strict";var d8=q1(),vOe=V1(),yOe=W1(),bOe=G1(),EOe=Y1(),f8=jg(),p8=no(),xOe=BV(),wOe=zg(),_Oe=c0(),COe=Fi(),SOe=X1(),TOe=b0(),m8=Q1(),POe=c8();function AOe(e,t,r,n,o,i,a){var s=m8(e,r),l=m8(t,r),u=a.get(l);if(u){d8(e,r,u);return}var c=i?i(s,l,r+"",e,t,a):void 0,f=c===void 0;if(f){var d=p8(l),p=!d&&wOe(l),v=!d&&!p&&TOe(l);c=l,d||p||v?p8(s)?c=s:xOe(s)?c=bOe(s):p?(f=!1,c=vOe(l,!0)):v?(f=!1,c=yOe(l,!0)):c=[]:SOe(l)||f8(l)?(c=s,f8(s)?c=POe(s):(!COe(s)||_Oe(s))&&(c=EOe(l))):f=!1}f&&(a.set(l,c),o(c,l,n,i,a),a.delete(l)),d8(e,r,c)}g8.exports=AOe});var x0=_((Gmt,y8)=>{"use strict";var DOe=Mg(),kOe=q1(),OOe=z1(),IOe=h8(),ROe=Fi(),NOe=Jd(),LOe=Q1();function v8(e,t,r,n,o){e!==t&&OOe(t,function(i,a){if(o||(o=new DOe),ROe(i))IOe(e,t,a,r,v8,n,o);else{var s=n?n(LOe(e,a),i,a+"",e,t,o):void 0;s===void 0&&(s=i),kOe(e,a,s)}},NOe)}y8.exports=v8});var w8=_((Kmt,x8)=>{"use strict";var BOe=x0(),b8=Fi();function E8(e,t,r,n,o,i){return b8(e)&&b8(t)&&(i.set(t,e),BOe(e,t,void 0,E8,i),i.delete(t)),e}x8.exports=E8});var C8=_((Ymt,_8)=>{"use strict";var FOe=Vd(),MOe=Xd(),$Oe=E0(),UOe=Fi();function jOe(e,t,r){if(!UOe(r))return!1;var n=typeof t;return(n=="number"?MOe(r)&&$Oe(t,r.length):n=="string"&&t in r)?FOe(r[t],e):!1}_8.exports=jOe});var tA=_((Xmt,S8)=>{"use strict";var qOe=j1(),zOe=C8();function VOe(e){return qOe(function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,a&&zOe(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t})}S8.exports=VOe});var P8=_((Zmt,T8)=>{"use strict";var HOe=x0(),WOe=tA(),GOe=WOe(function(e,t,r,n){HOe(e,t,r,n)});T8.exports=GOe});var w0=_((Qmt,A8)=>{"use strict";var KOe=N1(),YOe=j1(),XOe=w8(),ZOe=P8(),QOe=YOe(function(e){return e.push(void 0,XOe),KOe(ZOe,void 0,e)});A8.exports=QOe});var nA=_((rgt,N8)=>{"use strict";var hIe=no();function vIe(){if(!arguments.length)return[];var e=arguments[0];return hIe(e)?e:[e]}N8.exports=vIe});var B8=_((ngt,L8)=>{"use strict";function yIe(e,t,r,n){for(var o=-1,i=e==null?0:e.length;++o<i;){var a=e[o];t(n,a,r(a),e)}return n}L8.exports=yIe});var M8=_((ogt,F8)=>{"use strict";var bIe=K1(),EIe=bIe(Object.keys,Object);F8.exports=EIe});var U8=_((igt,$8)=>{"use strict";var xIe=g0(),wIe=M8(),_Ie=Object.prototype,CIe=_Ie.hasOwnProperty;function SIe(e){if(!xIe(e))return wIe(e);var t=[];for(var r in Object(e))CIe.call(e,r)&&r!="constructor"&&t.push(r);return t}$8.exports=SIe});var Lu=_((agt,j8)=>{"use strict";var TIe=eA(),PIe=U8(),AIe=Xd();function DIe(e){return AIe(e)?TIe(e):PIe(e)}j8.exports=DIe});var z8=_((sgt,q8)=>{"use strict";var kIe=z1(),OIe=Lu();function IIe(e,t){return e&&kIe(e,t,OIe)}q8.exports=IIe});var H8=_((lgt,V8)=>{"use strict";var RIe=Xd();function NIe(e,t){return function(r,n){if(r==null)return r;if(!RIe(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=Object(r);(t?i--:++i<o)&&n(a[i],i,a)!==!1;);return r}}V8.exports=NIe});var G8=_((ugt,W8)=>{"use strict";var LIe=z8(),BIe=H8(),FIe=BIe(LIe);W8.exports=FIe});var Y8=_((cgt,K8)=>{"use strict";var MIe=G8();function $Ie(e,t,r,n){return MIe(e,function(o,i,a){t(n,o,r(o),a)}),n}K8.exports=$Ie});var Z8=_((dgt,X8)=>{"use strict";var UIe="__lodash_hash_undefined__";function jIe(e){return this.__data__.set(e,UIe),this}X8.exports=jIe});var J8=_((fgt,Q8)=>{"use strict";function qIe(e){return this.__data__.has(e)}Q8.exports=qIe});var tH=_((pgt,eH)=>{"use strict";var zIe=f0(),VIe=Z8(),HIe=J8();function S0(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new zIe;++t<r;)this.add(e[t])}S0.prototype.add=S0.prototype.push=VIe;S0.prototype.has=HIe;eH.exports=S0});var nH=_((mgt,rH)=>{"use strict";function WIe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}rH.exports=WIe});var iH=_((ggt,oH)=>{"use strict";function GIe(e,t){return e.has(t)}oH.exports=GIe});var oA=_((hgt,aH)=>{"use strict";var KIe=tH(),YIe=nH(),XIe=iH(),ZIe=1,QIe=2;function JIe(e,t,r,n,o,i){var a=r&ZIe,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,p=r&QIe?new KIe:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var v=e[f],h=t[f];if(n)var y=a?n(h,v,f,t,e,i):n(v,h,f,e,t,i);if(y!==void 0){if(y)continue;d=!1;break}if(p){if(!YIe(t,function(g,m){if(!XIe(p,m)&&(v===g||o(v,g,r,n,i)))return p.push(m)})){d=!1;break}}else if(!(v===h||o(v,h,r,n,i))){d=!1;break}}return i.delete(e),i.delete(t),d}aH.exports=JIe});var lH=_((vgt,sH)=>{"use strict";function eRe(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}sH.exports=eRe});var cH=_((ygt,uH)=>{"use strict";function tRe(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}uH.exports=tRe});var gH=_((bgt,mH)=>{"use strict";var dH=Iu(),fH=H1(),rRe=Vd(),nRe=oA(),oRe=lH(),iRe=cH(),aRe=1,sRe=2,lRe="[object Boolean]",uRe="[object Date]",cRe="[object Error]",dRe="[object Map]",fRe="[object Number]",pRe="[object RegExp]",mRe="[object Set]",gRe="[object String]",hRe="[object Symbol]",vRe="[object ArrayBuffer]",yRe="[object DataView]",pH=dH?dH.prototype:void 0,iA=pH?pH.valueOf:void 0;function bRe(e,t,r,n,o,i,a){switch(r){case yRe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case vRe:return!(e.byteLength!=t.byteLength||!i(new fH(e),new fH(t)));case lRe:case uRe:case fRe:return rRe(+e,+t);case cRe:return e.name==t.name&&e.message==t.message;case pRe:case gRe:return e==t+"";case dRe:var s=oRe;case mRe:var l=n&aRe;if(s||(s=iRe),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;n|=sRe,a.set(e,t);var c=nRe(s(e),s(t),n,o,i,a);return a.delete(e),c;case hRe:if(iA)return iA.call(e)==iA.call(t)}return!1}mH.exports=bRe});var T0=_((Egt,hH)=>{"use strict";function ERe(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}hH.exports=ERe});var aA=_((xgt,vH)=>{"use strict";var xRe=T0(),wRe=no();function _Re(e,t,r){var n=t(e);return wRe(e)?n:xRe(n,r(e))}vH.exports=_Re});var bH=_((wgt,yH)=>{"use strict";function CRe(e,t){for(var r=-1,n=e==null?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}yH.exports=CRe});var sA=_((_gt,EH)=>{"use strict";function SRe(){return[]}EH.exports=SRe});var P0=_((Cgt,wH)=>{"use strict";var TRe=bH(),PRe=sA(),ARe=Object.prototype,DRe=ARe.propertyIsEnumerable,xH=Object.getOwnPropertySymbols,kRe=xH?function(e){return e==null?[]:(e=Object(e),TRe(xH(e),function(t){return DRe.call(e,t)}))}:PRe;wH.exports=kRe});var lA=_((Sgt,_H)=>{"use strict";var ORe=aA(),IRe=P0(),RRe=Lu();function NRe(e){return ORe(e,RRe,IRe)}_H.exports=NRe});var TH=_((Tgt,SH)=>{"use strict";var CH=lA(),LRe=1,BRe=Object.prototype,FRe=BRe.hasOwnProperty;function MRe(e,t,r,n,o,i){var a=r&LRe,s=CH(e),l=s.length,u=CH(t),c=u.length;if(l!=c&&!a)return!1;for(var f=l;f--;){var d=s[f];if(!(a?d in t:FRe.call(t,d)))return!1}var p=i.get(e),v=i.get(t);if(p&&v)return p==t&&v==e;var h=!0;i.set(e,t),i.set(t,e);for(var y=a;++f<l;){d=s[f];var g=e[d],m=t[d];if(n)var b=a?n(m,g,d,t,e,i):n(g,m,d,e,t,i);if(!(b===void 0?g===m||o(g,m,r,n,i):b)){h=!1;break}y||(y=d=="constructor")}if(h&&!y){var E=e.constructor,C=t.constructor;E!=C&&"constructor"in e&&"constructor"in t&&!(typeof E=="function"&&E instanceof E&&typeof C=="function"&&C instanceof C)&&(h=!1)}return i.delete(e),i.delete(t),h}SH.exports=MRe});var AH=_((Pgt,PH)=>{"use strict";var $Re=cl(),URe=Bi(),jRe=$Re(URe,"DataView");PH.exports=jRe});var kH=_((Agt,DH)=>{"use strict";var qRe=cl(),zRe=Bi(),VRe=qRe(zRe,"Promise");DH.exports=VRe});var IH=_((Dgt,OH)=>{"use strict";var HRe=cl(),WRe=Bi(),GRe=HRe(WRe,"Set");OH.exports=GRe});var NH=_((kgt,RH)=>{"use strict";var KRe=cl(),YRe=Bi(),XRe=KRe(YRe,"WeakMap");RH.exports=XRe});var Yg=_((Ogt,jH)=>{"use strict";var uA=AH(),cA=d0(),dA=kH(),fA=IH(),pA=NH(),UH=Ru(),of=M1(),LH="[object Map]",ZRe="[object Object]",BH="[object Promise]",FH="[object Set]",MH="[object WeakMap]",$H="[object DataView]",QRe=of(uA),JRe=of(cA),eNe=of(dA),tNe=of(fA),rNe=of(pA),Bu=UH;(uA&&Bu(new uA(new ArrayBuffer(1)))!=$H||cA&&Bu(new cA)!=LH||dA&&Bu(dA.resolve())!=BH||fA&&Bu(new fA)!=FH||pA&&Bu(new pA)!=MH)&&(Bu=function(e){var t=UH(e),r=t==ZRe?e.constructor:void 0,n=r?of(r):"";if(n)switch(n){case QRe:return $H;case JRe:return LH;case eNe:return BH;case tNe:return FH;case rNe:return MH}return t});jH.exports=Bu});var YH=_((Igt,KH)=>{"use strict";var mA=Mg(),nNe=oA(),oNe=gH(),iNe=TH(),qH=Yg(),zH=no(),VH=zg(),aNe=b0(),sNe=1,HH="[object Arguments]",WH="[object Array]",A0="[object Object]",lNe=Object.prototype,GH=lNe.hasOwnProperty;function uNe(e,t,r,n,o,i){var a=zH(e),s=zH(t),l=a?WH:qH(e),u=s?WH:qH(t);l=l==HH?A0:l,u=u==HH?A0:u;var c=l==A0,f=u==A0,d=l==u;if(d&&VH(e)){if(!VH(t))return!1;a=!0,c=!1}if(d&&!c)return i||(i=new mA),a||aNe(e)?nNe(e,t,r,n,o,i):oNe(e,t,l,r,n,o,i);if(!(r&sNe)){var p=c&&GH.call(e,"__wrapped__"),v=f&&GH.call(t,"__wrapped__");if(p||v){var h=p?e.value():e,y=v?t.value():t;return i||(i=new mA),o(h,y,r,n,i)}}return d?(i||(i=new mA),iNe(e,t,r,n,o,i)):!1}KH.exports=uNe});var D0=_((Rgt,QH)=>{"use strict";var cNe=YH(),XH=va();function ZH(e,t,r,n,o){return e===t?!0:e==null||t==null||!XH(e)&&!XH(t)?e!==e&&t!==t:cNe(e,t,r,n,ZH,o)}QH.exports=ZH});var e7=_((Ngt,JH)=>{"use strict";var dNe=Mg(),fNe=D0(),pNe=1,mNe=2;function gNe(e,t,r,n){var o=r.length,i=o,a=!n;if(e==null)return!i;for(e=Object(e);o--;){var s=r[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){s=r[o];var l=s[0],u=e[l],c=s[1];if(a&&s[2]){if(u===void 0&&!(l in e))return!1}else{var f=new dNe;if(n)var d=n(u,c,l,e,t,f);if(!(d===void 0?fNe(c,u,pNe|mNe,n,f):d))return!1}}return!0}JH.exports=gNe});var gA=_((Lgt,t7)=>{"use strict";var hNe=Fi();function vNe(e){return e===e&&!hNe(e)}t7.exports=vNe});var n7=_((Bgt,r7)=>{"use strict";var yNe=gA(),bNe=Lu();function ENe(e){for(var t=bNe(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,yNe(o)]}return t}r7.exports=ENe});var hA=_((Fgt,o7)=>{"use strict";function xNe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}o7.exports=xNe});var a7=_((Mgt,i7)=>{"use strict";var wNe=e7(),_Ne=n7(),CNe=hA();function SNe(e){var t=_Ne(e);return t.length==1&&t[0][2]?CNe(t[0][0],t[0][1]):function(r){return r===e||wNe(r,e,t)}}i7.exports=SNe});var k0=_(($gt,s7)=>{"use strict";var TNe=Ru(),PNe=va(),ANe="[object Symbol]";function DNe(e){return typeof e=="symbol"||PNe(e)&&TNe(e)==ANe}s7.exports=DNe});var O0=_((Ugt,l7)=>{"use strict";var kNe=no(),ONe=k0(),INe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,RNe=/^\w*$/;function NNe(e,t){if(kNe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ONe(e)?!0:RNe.test(e)||!INe.test(e)||t!=null&&e in Object(t)}l7.exports=NNe});var d7=_((jgt,c7)=>{"use strict";var u7=f0(),LNe="Expected a function";function vA(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(LNe);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(vA.Cache||u7),r}vA.Cache=u7;c7.exports=vA});var p7=_((qgt,f7)=>{"use strict";var BNe=d7(),FNe=500;function MNe(e){var t=BNe(e,function(n){return r.size===FNe&&r.clear(),n}),r=t.cache;return t}f7.exports=MNe});var g7=_((zgt,m7)=>{"use strict";var $Ne=p7(),UNe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jNe=/\\(\\)?/g,qNe=$Ne(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(UNe,function(r,n,o,i){t.push(o?i.replace(jNe,"$1"):n||r)}),t});m7.exports=qNe});var I0=_((Vgt,h7)=>{"use strict";function zNe(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}h7.exports=zNe});var w7=_((Hgt,x7)=>{"use strict";var v7=Iu(),VNe=I0(),HNe=no(),WNe=k0(),GNe=1/0,y7=v7?v7.prototype:void 0,b7=y7?y7.toString:void 0;function E7(e){if(typeof e=="string")return e;if(HNe(e))return VNe(e,E7)+"";if(WNe(e))return b7?b7.call(e):"";var t=e+"";return t=="0"&&1/e==-GNe?"-0":t}x7.exports=E7});var C7=_((Wgt,_7)=>{"use strict";var KNe=w7();function YNe(e){return e==null?"":KNe(e)}_7.exports=YNe});var Xg=_((Ggt,S7)=>{"use strict";var XNe=no(),ZNe=O0(),QNe=g7(),JNe=C7();function eLe(e,t){return XNe(e)?e:ZNe(e,t)?[e]:QNe(JNe(e))}S7.exports=eLe});var af=_((Kgt,T7)=>{"use strict";var tLe=k0(),rLe=1/0;function nLe(e){if(typeof e=="string"||tLe(e))return e;var t=e+"";return t=="0"&&1/e==-rLe?"-0":t}T7.exports=nLe});var R0=_((Ygt,P7)=>{"use strict";var oLe=Xg(),iLe=af();function aLe(e,t){t=oLe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[iLe(t[r++])];return r&&r==n?e:void 0}P7.exports=aLe});var D7=_((Xgt,A7)=>{"use strict";var sLe=R0();function lLe(e,t,r){var n=e==null?void 0:sLe(e,t);return n===void 0?r:n}A7.exports=lLe});var O7=_((Zgt,k7)=>{"use strict";function uLe(e,t){return e!=null&&t in Object(e)}k7.exports=uLe});var R7=_((Qgt,I7)=>{"use strict";var cLe=Xg(),dLe=jg(),fLe=no(),pLe=E0(),mLe=h0(),gLe=af();function hLe(e,t,r){t=cLe(t,e);for(var n=-1,o=t.length,i=!1;++n<o;){var a=gLe(t[n]);if(!(i=e!=null&&r(e,a)))break;e=e[a]}return i||++n!=o?i:(o=e==null?0:e.length,!!o&&mLe(o)&&pLe(a,o)&&(fLe(e)||dLe(e)))}I7.exports=hLe});var L7=_((Jgt,N7)=>{"use strict";var vLe=O7(),yLe=R7();function bLe(e,t){return e!=null&&yLe(e,t,vLe)}N7.exports=bLe});var F7=_((eht,B7)=>{"use strict";var ELe=D0(),xLe=D7(),wLe=L7(),_Le=O0(),CLe=gA(),SLe=hA(),TLe=af(),PLe=1,ALe=2;function DLe(e,t){return _Le(e)&&CLe(t)?SLe(TLe(e),t):function(r){var n=xLe(r,e);return n===void 0&&n===t?wLe(r,e):ELe(t,n,PLe|ALe)}}B7.exports=DLe});var $7=_((tht,M7)=>{"use strict";function kLe(e){return function(t){return t==null?void 0:t[e]}}M7.exports=kLe});var j7=_((rht,U7)=>{"use strict";var OLe=R0();function ILe(e){return function(t){return OLe(t,e)}}U7.exports=ILe});var z7=_((nht,q7)=>{"use strict";var RLe=$7(),NLe=j7(),LLe=O0(),BLe=af();function FLe(e){return LLe(e)?RLe(BLe(e)):NLe(e)}q7.exports=FLe});var H7=_((oht,V7)=>{"use strict";var MLe=a7(),$Le=F7(),ULe=u0(),jLe=no(),qLe=z7();function zLe(e){return typeof e=="function"?e:e==null?ULe:typeof e=="object"?jLe(e)?$Le(e[0],e[1]):MLe(e):qLe(e)}V7.exports=zLe});var G7=_((iht,W7)=>{"use strict";var VLe=B8(),HLe=Y8(),WLe=H7(),GLe=no();function KLe(e,t){return function(r,n){var o=GLe(r)?VLe:HLe,i=t?t():{};return o(r,e,WLe(n,2),i)}}W7.exports=KLe});var Y7=_((aht,K7)=>{"use strict";var YLe=$g(),XLe=G7(),ZLe=XLe(function(e,t,r){YLe(e,r,t)});K7.exports=ZLe});var yA=_((sht,X7)=>{"use strict";var QLe=x0(),JLe=tA(),eBe=JLe(function(e,t,r){QLe(e,t,r)});X7.exports=eBe});var Q7=_((lht,Z7)=>{"use strict";var tBe=I0();function rBe(e,t){return tBe(t,function(r){return e[r]})}Z7.exports=rBe});var eW=_((uht,J7)=>{"use strict";var nBe=Q7(),oBe=Lu();function iBe(e){return e==null?[]:nBe(e,oBe(e))}J7.exports=iBe});var rW=_((cht,tW)=>{"use strict";function aBe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}tW.exports=aBe});var oW=_((dht,nW)=>{"use strict";var sBe=Nu(),lBe=Lu();function uBe(e,t){return e&&sBe(t,lBe(t),e)}nW.exports=uBe});var aW=_((fht,iW)=>{"use strict";var cBe=Nu(),dBe=Jd();function fBe(e,t){return e&&cBe(t,dBe(t),e)}iW.exports=fBe});var lW=_((pht,sW)=>{"use strict";var pBe=Nu(),mBe=P0();function gBe(e,t){return pBe(e,mBe(e),t)}sW.exports=gBe});var bA=_((mht,uW)=>{"use strict";var hBe=T0(),vBe=m0(),yBe=P0(),bBe=sA(),EBe=Object.getOwnPropertySymbols,xBe=EBe?function(e){for(var t=[];e;)hBe(t,yBe(e)),e=vBe(e);return t}:bBe;uW.exports=xBe});var dW=_((ght,cW)=>{"use strict";var wBe=Nu(),_Be=bA();function CBe(e,t){return wBe(e,_Be(e),t)}cW.exports=CBe});var EA=_((hht,fW)=>{"use strict";var SBe=aA(),TBe=bA(),PBe=Jd();function ABe(e){return SBe(e,PBe,TBe)}fW.exports=ABe});var mW=_((vht,pW)=>{"use strict";var DBe=Object.prototype,kBe=DBe.hasOwnProperty;function OBe(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&kBe.call(e,"index")&&(r.index=e.index,r.input=e.input),r}pW.exports=OBe});var hW=_((yht,gW)=>{"use strict";var IBe=p0();function RBe(e,t){var r=t?IBe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}gW.exports=RBe});var yW=_((bht,vW)=>{"use strict";var NBe=/\w*$/;function LBe(e){var t=new e.constructor(e.source,NBe.exec(e));return t.lastIndex=e.lastIndex,t}vW.exports=LBe});var _W=_((Eht,wW)=>{"use strict";var bW=Iu(),EW=bW?bW.prototype:void 0,xW=EW?EW.valueOf:void 0;function BBe(e){return xW?Object(xW.call(e)):{}}wW.exports=BBe});var SW=_((xht,CW)=>{"use strict";var FBe=p0(),MBe=hW(),$Be=yW(),UBe=_W(),jBe=W1(),qBe="[object Boolean]",zBe="[object Date]",VBe="[object Map]",HBe="[object Number]",WBe="[object RegExp]",GBe="[object Set]",KBe="[object String]",YBe="[object Symbol]",XBe="[object ArrayBuffer]",ZBe="[object DataView]",QBe="[object Float32Array]",JBe="[object Float64Array]",eFe="[object Int8Array]",tFe="[object Int16Array]",rFe="[object Int32Array]",nFe="[object Uint8Array]",oFe="[object Uint8ClampedArray]",iFe="[object Uint16Array]",aFe="[object Uint32Array]";function sFe(e,t,r){var n=e.constructor;switch(t){case XBe:return FBe(e);case qBe:case zBe:return new n(+e);case ZBe:return MBe(e,r);case QBe:case JBe:case eFe:case tFe:case rFe:case nFe:case oFe:case iFe:case aFe:return jBe(e,r);case VBe:return new n;case HBe:case KBe:return new n(e);case WBe:return $Be(e);case GBe:return new n;case YBe:return UBe(e)}}CW.exports=sFe});var PW=_((wht,TW)=>{"use strict";var lFe=Yg(),uFe=va(),cFe="[object Map]";function dFe(e){return uFe(e)&&lFe(e)==cFe}TW.exports=dFe});var OW=_((_ht,kW)=>{"use strict";var fFe=PW(),pFe=v0(),AW=y0(),DW=AW&&AW.isMap,mFe=DW?pFe(DW):fFe;kW.exports=mFe});var RW=_((Cht,IW)=>{"use strict";var gFe=Yg(),hFe=va(),vFe="[object Set]";function yFe(e){return hFe(e)&&gFe(e)==vFe}IW.exports=yFe});var FW=_((Sht,BW)=>{"use strict";var bFe=RW(),EFe=v0(),NW=y0(),LW=NW&&NW.isSet,xFe=LW?EFe(LW):bFe;BW.exports=xFe});var xA=_((Tht,jW)=>{"use strict";var wFe=Mg(),_Fe=rW(),CFe=J1(),SFe=oW(),TFe=aW(),PFe=V1(),AFe=G1(),DFe=lW(),kFe=dW(),OFe=lA(),IFe=EA(),RFe=Yg(),NFe=mW(),LFe=SW(),BFe=Y1(),FFe=no(),MFe=zg(),$Fe=OW(),UFe=Fi(),jFe=FW(),qFe=Lu(),zFe=Jd(),VFe=1,HFe=2,WFe=4,MW="[object Arguments]",GFe="[object Array]",KFe="[object Boolean]",YFe="[object Date]",XFe="[object Error]",$W="[object Function]",ZFe="[object GeneratorFunction]",QFe="[object Map]",JFe="[object Number]",UW="[object Object]",eMe="[object RegExp]",tMe="[object Set]",rMe="[object String]",nMe="[object Symbol]",oMe="[object WeakMap]",iMe="[object ArrayBuffer]",aMe="[object DataView]",sMe="[object Float32Array]",lMe="[object Float64Array]",uMe="[object Int8Array]",cMe="[object Int16Array]",dMe="[object Int32Array]",fMe="[object Uint8Array]",pMe="[object Uint8ClampedArray]",mMe="[object Uint16Array]",gMe="[object Uint32Array]",Ht={};Ht[MW]=Ht[GFe]=Ht[iMe]=Ht[aMe]=Ht[KFe]=Ht[YFe]=Ht[sMe]=Ht[lMe]=Ht[uMe]=Ht[cMe]=Ht[dMe]=Ht[QFe]=Ht[JFe]=Ht[UW]=Ht[eMe]=Ht[tMe]=Ht[rMe]=Ht[nMe]=Ht[fMe]=Ht[pMe]=Ht[mMe]=Ht[gMe]=!0;Ht[XFe]=Ht[$W]=Ht[oMe]=!1;function N0(e,t,r,n,o,i){var a,s=t&VFe,l=t&HFe,u=t&WFe;if(r&&(a=o?r(e,n,o,i):r(e)),a!==void 0)return a;if(!UFe(e))return e;var c=FFe(e);if(c){if(a=NFe(e),!s)return AFe(e,a)}else{var f=RFe(e),d=f==$W||f==ZFe;if(MFe(e))return PFe(e,s);if(f==UW||f==MW||d&&!o){if(a=l||d?{}:BFe(e),!s)return l?kFe(e,TFe(a,e)):DFe(e,SFe(a,e))}else{if(!Ht[f])return o?e:{};a=LFe(e,f,s)}}i||(i=new wFe);var p=i.get(e);if(p)return p;i.set(e,a),jFe(e)?e.forEach(function(y){a.add(N0(y,t,r,y,e,i))}):$Fe(e)&&e.forEach(function(y,g){a.set(g,N0(y,t,r,g,e,i))});var v=u?l?IFe:OFe:l?zFe:qFe,h=c?void 0:v(e);return _Fe(h||e,function(y,g){h&&(g=y,y=e[g]),CFe(a,g,N0(y,t,r,g,e,i))}),a}jW.exports=N0});var wA=_((Pht,qW)=>{"use strict";var hMe=xA(),vMe=1,yMe=4;function bMe(e){return hMe(e,vMe|yMe)}qW.exports=bMe});var HW=_((Dht,VW)=>{"use strict";var EMe=D0();function xMe(e,t){return EMe(e,t)}VW.exports=xMe});var GW=_((Oht,WW)=>{"use strict";function wMe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}WW.exports=wMe});var YW=_((Iht,KW)=>{"use strict";function _Me(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}KW.exports=_Me});var ZW=_((Rht,XW)=>{"use strict";var CMe=R0(),SMe=YW();function TMe(e,t){return t.length<2?e:CMe(e,SMe(t,0,-1))}XW.exports=TMe});var JW=_((Nht,QW)=>{"use strict";var PMe=Xg(),AMe=GW(),DMe=ZW(),kMe=af(),OMe=Object.prototype,IMe=OMe.hasOwnProperty;function RMe(e,t){t=PMe(t,e);var r=-1,n=t.length;if(!n)return!0;for(var o=e==null||typeof e!="object"&&typeof e!="function";++r<n;){var i=t[r];if(typeof i=="string"){if(i==="__proto__"&&!IMe.call(e,"__proto__"))return!1;if(i==="constructor"&&r+1<n&&typeof t[r+1]=="string"&&t[r+1]==="prototype"){if(o&&r===0)continue;return!1}}}var a=DMe(e,t);return a==null||delete a[kMe(AMe(t))]}QW.exports=RMe});var tG=_((Lht,eG)=>{"use strict";var NMe=X1();function LMe(e){return NMe(e)?void 0:e}eG.exports=LMe});var iG=_((Bht,oG)=>{"use strict";var rG=Iu(),BMe=jg(),FMe=no(),nG=rG?rG.isConcatSpreadable:void 0;function MMe(e){return FMe(e)||BMe(e)||!!(nG&&e&&e[nG])}oG.exports=MMe});var lG=_((Fht,sG)=>{"use strict";var $Me=T0(),UMe=iG();function aG(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=UMe),o||(o=[]);++i<a;){var s=e[i];t>0&&r(s)?t>1?aG(s,t-1,r,n,o):$Me(o,s):n||(o[o.length]=s)}return o}sG.exports=aG});var cG=_((Mht,uG)=>{"use strict";var jMe=lG();function qMe(e){var t=e==null?0:e.length;return t?jMe(e,1):[]}uG.exports=qMe});var fG=_(($ht,dG)=>{"use strict";var zMe=cG(),VMe=L1(),HMe=U1();function WMe(e){return HMe(VMe(e,void 0,zMe),e+"")}dG.exports=WMe});var mG=_((Uht,pG)=>{"use strict";var GMe=I0(),KMe=xA(),YMe=JW(),XMe=Xg(),ZMe=Nu(),QMe=tG(),JMe=fG(),e2e=EA(),t2e=1,r2e=2,n2e=4,o2e=JMe(function(e,t){var r={};if(e==null)return r;var n=!1;t=GMe(t,function(i){return i=XMe(i,e),n||(n=i.length>1),i}),ZMe(e,e2e(e),r),n&&(r=KMe(r,t2e|r2e|n2e,QMe));for(var o=t.length;o--;)YMe(r,t[o]);return r});pG.exports=o2e});var W0=_((Qvt,UK)=>{"use strict";var Y3e=Array.isArray;UK.exports=Y3e});var G0=_((Jvt,jK)=>{"use strict";var X3e=W0();function Z3e(){if(!arguments.length)return[];var e=arguments[0];return X3e(e)?e:[e]}jK.exports=Z3e});var zK=_((eyt,qK)=>{"use strict";function Q3e(){this.__data__=[],this.size=0}qK.exports=Q3e});var gf=_((tyt,VK)=>{"use strict";function J3e(e,t){return e===t||e!==e&&t!==t}VK.exports=J3e});var sh=_((ryt,HK)=>{"use strict";var eUe=gf();function tUe(e,t){for(var r=e.length;r--;)if(eUe(e[r][0],t))return r;return-1}HK.exports=tUe});var GK=_((nyt,WK)=>{"use strict";var rUe=sh(),nUe=Array.prototype,oUe=nUe.splice;function iUe(e){var t=this.__data__,r=rUe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():oUe.call(t,r,1),--this.size,!0}WK.exports=iUe});var YK=_((oyt,KK)=>{"use strict";var aUe=sh();function sUe(e){var t=this.__data__,r=aUe(t,e);return r<0?void 0:t[r][1]}KK.exports=sUe});var ZK=_((iyt,XK)=>{"use strict";var lUe=sh();function uUe(e){return lUe(this.__data__,e)>-1}XK.exports=uUe});var JK=_((ayt,QK)=>{"use strict";var cUe=sh();function dUe(e,t){var r=this.__data__,n=cUe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}QK.exports=dUe});var lh=_((syt,eY)=>{"use strict";var fUe=zK(),pUe=GK(),mUe=YK(),gUe=ZK(),hUe=JK();function hf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}hf.prototype.clear=fUe;hf.prototype.delete=pUe;hf.prototype.get=mUe;hf.prototype.has=gUe;hf.prototype.set=hUe;eY.exports=hf});var rY=_((lyt,tY)=>{"use strict";var vUe=lh();function yUe(){this.__data__=new vUe,this.size=0}tY.exports=yUe});var oY=_((uyt,nY)=>{"use strict";function bUe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}nY.exports=bUe});var aY=_((cyt,iY)=>{"use strict";function EUe(e){return this.__data__.get(e)}iY.exports=EUe});var lY=_((dyt,sY)=>{"use strict";function xUe(e){return this.__data__.has(e)}sY.exports=xUe});var aD=_((fyt,uY)=>{"use strict";var wUe=typeof global=="object"&&global&&global.Object===Object&&global;uY.exports=wUe});var Mu=_((pyt,cY)=>{"use strict";var _Ue=aD(),CUe=typeof self=="object"&&self&&self.Object===Object&&self,SUe=_Ue||CUe||Function("return this")();cY.exports=SUe});var sD=_((myt,dY)=>{"use strict";var TUe=Mu(),PUe=TUe.Symbol;dY.exports=PUe});var gY=_((gyt,mY)=>{"use strict";var fY=sD(),pY=Object.prototype,AUe=pY.hasOwnProperty,DUe=pY.toString,uh=fY?fY.toStringTag:void 0;function kUe(e){var t=AUe.call(e,uh),r=e[uh];try{e[uh]=void 0;var n=!0}catch{}var o=DUe.call(e);return n&&(t?e[uh]=r:delete e[uh]),o}mY.exports=kUe});var vY=_((hyt,hY)=>{"use strict";var OUe=Object.prototype,IUe=OUe.toString;function RUe(e){return IUe.call(e)}hY.exports=RUe});var ch=_((vyt,EY)=>{"use strict";var yY=sD(),NUe=gY(),LUe=vY(),BUe="[object Null]",FUe="[object Undefined]",bY=yY?yY.toStringTag:void 0;function MUe(e){return e==null?e===void 0?FUe:BUe:bY&&bY in Object(e)?NUe(e):LUe(e)}EY.exports=MUe});var fl=_((yyt,xY)=>{"use strict";function $Ue(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}xY.exports=$Ue});var K0=_((byt,wY)=>{"use strict";var UUe=ch(),jUe=fl(),qUe="[object AsyncFunction]",zUe="[object Function]",VUe="[object GeneratorFunction]",HUe="[object Proxy]";function WUe(e){if(!jUe(e))return!1;var t=UUe(e);return t==zUe||t==VUe||t==qUe||t==HUe}wY.exports=WUe});var CY=_((Eyt,_Y)=>{"use strict";var GUe=Mu(),KUe=GUe["__core-js_shared__"];_Y.exports=KUe});var PY=_((xyt,TY)=>{"use strict";var lD=CY(),SY=(function(){var e=/[^.]+$/.exec(lD&&lD.keys&&lD.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function YUe(e){return!!SY&&SY in e}TY.exports=YUe});var DY=_((wyt,AY)=>{"use strict";var XUe=Function.prototype,ZUe=XUe.toString;function QUe(e){if(e!=null){try{return ZUe.call(e)}catch{}try{return e+""}catch{}}return""}AY.exports=QUe});var OY=_((_yt,kY)=>{"use strict";var JUe=K0(),e4e=PY(),t4e=fl(),r4e=DY(),n4e=/[\\^$.*+?()[\]{}|]/g,o4e=/^\[object .+?Constructor\]$/,i4e=Function.prototype,a4e=Object.prototype,s4e=i4e.toString,l4e=a4e.hasOwnProperty,u4e=RegExp("^"+s4e.call(l4e).replace(n4e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function c4e(e){if(!t4e(e)||e4e(e))return!1;var t=JUe(e)?u4e:o4e;return t.test(r4e(e))}kY.exports=c4e});var RY=_((Cyt,IY)=>{"use strict";function d4e(e,t){return e==null?void 0:e[t]}IY.exports=d4e});var Y0=_((Syt,NY)=>{"use strict";var f4e=OY(),p4e=RY();function m4e(e,t){var r=p4e(e,t);return f4e(r)?r:void 0}NY.exports=m4e});var uD=_((Tyt,LY)=>{"use strict";var g4e=Y0(),h4e=Mu(),v4e=g4e(h4e,"Map");LY.exports=v4e});var dh=_((Pyt,BY)=>{"use strict";var y4e=Y0(),b4e=y4e(Object,"create");BY.exports=b4e});var $Y=_((Ayt,MY)=>{"use strict";var FY=dh();function E4e(){this.__data__=FY?FY(null):{},this.size=0}MY.exports=E4e});var jY=_((Dyt,UY)=>{"use strict";function x4e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}UY.exports=x4e});var zY=_((kyt,qY)=>{"use strict";var w4e=dh(),_4e="__lodash_hash_undefined__",C4e=Object.prototype,S4e=C4e.hasOwnProperty;function T4e(e){var t=this.__data__;if(w4e){var r=t[e];return r===_4e?void 0:r}return S4e.call(t,e)?t[e]:void 0}qY.exports=T4e});var HY=_((Oyt,VY)=>{"use strict";var P4e=dh(),A4e=Object.prototype,D4e=A4e.hasOwnProperty;function k4e(e){var t=this.__data__;return P4e?t[e]!==void 0:D4e.call(t,e)}VY.exports=k4e});var GY=_((Iyt,WY)=>{"use strict";var O4e=dh(),I4e="__lodash_hash_undefined__";function R4e(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=O4e&&t===void 0?I4e:t,this}WY.exports=R4e});var YY=_((Ryt,KY)=>{"use strict";var N4e=$Y(),L4e=jY(),B4e=zY(),F4e=HY(),M4e=GY();function vf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}vf.prototype.clear=N4e;vf.prototype.delete=L4e;vf.prototype.get=B4e;vf.prototype.has=F4e;vf.prototype.set=M4e;KY.exports=vf});var QY=_((Nyt,ZY)=>{"use strict";var XY=YY(),$4e=lh(),U4e=uD();function j4e(){this.size=0,this.__data__={hash:new XY,map:new(U4e||$4e),string:new XY}}ZY.exports=j4e});var eX=_((Lyt,JY)=>{"use strict";function q4e(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}JY.exports=q4e});var fh=_((Byt,tX)=>{"use strict";var z4e=eX();function V4e(e,t){var r=e.__data__;return z4e(t)?r[typeof t=="string"?"string":"hash"]:r.map}tX.exports=V4e});var nX=_((Fyt,rX)=>{"use strict";var H4e=fh();function W4e(e){var t=H4e(this,e).delete(e);return this.size-=t?1:0,t}rX.exports=W4e});var iX=_((Myt,oX)=>{"use strict";var G4e=fh();function K4e(e){return G4e(this,e).get(e)}oX.exports=K4e});var sX=_(($yt,aX)=>{"use strict";var Y4e=fh();function X4e(e){return Y4e(this,e).has(e)}aX.exports=X4e});var uX=_((Uyt,lX)=>{"use strict";var Z4e=fh();function Q4e(e,t){var r=Z4e(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}lX.exports=Q4e});var dX=_((jyt,cX)=>{"use strict";var J4e=QY(),eje=nX(),tje=iX(),rje=sX(),nje=uX();function yf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}yf.prototype.clear=J4e;yf.prototype.delete=eje;yf.prototype.get=tje;yf.prototype.has=rje;yf.prototype.set=nje;cX.exports=yf});var pX=_((qyt,fX)=>{"use strict";var oje=lh(),ije=uD(),aje=dX(),sje=200;function lje(e,t){var r=this.__data__;if(r instanceof oje){var n=r.__data__;if(!ije||n.length<sje-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new aje(n)}return r.set(e,t),this.size=r.size,this}fX.exports=lje});var gX=_((zyt,mX)=>{"use strict";var uje=lh(),cje=rY(),dje=oY(),fje=aY(),pje=lY(),mje=pX();function bf(e){var t=this.__data__=new uje(e);this.size=t.size}bf.prototype.clear=cje;bf.prototype.delete=dje;bf.prototype.get=fje;bf.prototype.has=pje;bf.prototype.set=mje;mX.exports=bf});var cD=_((Vyt,hX)=>{"use strict";var gje=Y0(),hje=(function(){try{var e=gje(Object,"defineProperty");return e({},"",{}),e}catch{}})();hX.exports=hje});var X0=_((Hyt,yX)=>{"use strict";var vX=cD();function vje(e,t,r){t=="__proto__"&&vX?vX(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}yX.exports=vje});var dD=_((Wyt,bX)=>{"use strict";var yje=X0(),bje=gf();function Eje(e,t,r){(r!==void 0&&!bje(e[t],r)||r===void 0&&!(t in e))&&yje(e,t,r)}bX.exports=Eje});var xX=_((Gyt,EX)=>{"use strict";function xje(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var l=a[e?s:++o];if(r(i[l],l,i)===!1)break}return t}}EX.exports=xje});var _X=_((Kyt,wX)=>{"use strict";var wje=xX(),_je=wje();wX.exports=_je});var AX=_((ph,Ef)=>{"use strict";var Cje=Mu(),PX=typeof ph=="object"&&ph&&!ph.nodeType&&ph,CX=PX&&typeof Ef=="object"&&Ef&&!Ef.nodeType&&Ef,Sje=CX&&CX.exports===PX,SX=Sje?Cje.Buffer:void 0,TX=SX?SX.allocUnsafe:void 0;function Tje(e,t){if(t)return e.slice();var r=e.length,n=TX?TX(r):new e.constructor(r);return e.copy(n),n}Ef.exports=Tje});var kX=_((Yyt,DX)=>{"use strict";var Pje=Mu(),Aje=Pje.Uint8Array;DX.exports=Aje});var RX=_((Xyt,IX)=>{"use strict";var OX=kX();function Dje(e){var t=new e.constructor(e.byteLength);return new OX(t).set(new OX(e)),t}IX.exports=Dje});var LX=_((Zyt,NX)=>{"use strict";var kje=RX();function Oje(e,t){var r=t?kje(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}NX.exports=Oje});var FX=_((Qyt,BX)=>{"use strict";function Ije(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}BX.exports=Ije});var UX=_((Jyt,$X)=>{"use strict";var Rje=fl(),MX=Object.create,Nje=(function(){function e(){}return function(t){if(!Rje(t))return{};if(MX)return MX(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();$X.exports=Nje});var qX=_((ebt,jX)=>{"use strict";function Lje(e,t){return function(r){return e(t(r))}}jX.exports=Lje});var fD=_((tbt,zX)=>{"use strict";var Bje=qX(),Fje=Bje(Object.getPrototypeOf,Object);zX.exports=Fje});var pD=_((rbt,VX)=>{"use strict";var Mje=Object.prototype;function $je(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Mje;return e===r}VX.exports=$je});var WX=_((nbt,HX)=>{"use strict";var Uje=UX(),jje=fD(),qje=pD();function zje(e){return typeof e.constructor=="function"&&!qje(e)?Uje(jje(e)):{}}HX.exports=zje});var xf=_((obt,GX)=>{"use strict";function Vje(e){return e!=null&&typeof e=="object"}GX.exports=Vje});var YX=_((ibt,KX)=>{"use strict";var Hje=ch(),Wje=xf(),Gje="[object Arguments]";function Kje(e){return Wje(e)&&Hje(e)==Gje}KX.exports=Kje});var mD=_((abt,QX)=>{"use strict";var XX=YX(),Yje=xf(),ZX=Object.prototype,Xje=ZX.hasOwnProperty,Zje=ZX.propertyIsEnumerable,Qje=XX((function(){return arguments})())?XX:function(e){return Yje(e)&&Xje.call(e,"callee")&&!Zje.call(e,"callee")};QX.exports=Qje});var gD=_((sbt,JX)=>{"use strict";var Jje=9007199254740991;function eqe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Jje}JX.exports=eqe});var Z0=_((lbt,eZ)=>{"use strict";var tqe=K0(),rqe=gD();function nqe(e){return e!=null&&rqe(e.length)&&!tqe(e)}eZ.exports=nqe});var rZ=_((ubt,tZ)=>{"use strict";var oqe=Z0(),iqe=xf();function aqe(e){return iqe(e)&&oqe(e)}tZ.exports=aqe});var oZ=_((cbt,nZ)=>{"use strict";function sqe(){return!1}nZ.exports=sqe});var hD=_((mh,wf)=>{"use strict";var lqe=Mu(),uqe=oZ(),sZ=typeof mh=="object"&&mh&&!mh.nodeType&&mh,iZ=sZ&&typeof wf=="object"&&wf&&!wf.nodeType&&wf,cqe=iZ&&iZ.exports===sZ,aZ=cqe?lqe.Buffer:void 0,dqe=aZ?aZ.isBuffer:void 0,fqe=dqe||uqe;wf.exports=fqe});var cZ=_((dbt,uZ)=>{"use strict";var pqe=ch(),mqe=fD(),gqe=xf(),hqe="[object Object]",vqe=Function.prototype,yqe=Object.prototype,lZ=vqe.toString,bqe=yqe.hasOwnProperty,Eqe=lZ.call(Object);function xqe(e){if(!gqe(e)||pqe(e)!=hqe)return!1;var t=mqe(e);if(t===null)return!0;var r=bqe.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&lZ.call(r)==Eqe}uZ.exports=xqe});var fZ=_((fbt,dZ)=>{"use strict";var wqe=ch(),_qe=gD(),Cqe=xf(),Sqe="[object Arguments]",Tqe="[object Array]",Pqe="[object Boolean]",Aqe="[object Date]",Dqe="[object Error]",kqe="[object Function]",Oqe="[object Map]",Iqe="[object Number]",Rqe="[object Object]",Nqe="[object RegExp]",Lqe="[object Set]",Bqe="[object String]",Fqe="[object WeakMap]",Mqe="[object ArrayBuffer]",$qe="[object DataView]",Uqe="[object Float32Array]",jqe="[object Float64Array]",qqe="[object Int8Array]",zqe="[object Int16Array]",Vqe="[object Int32Array]",Hqe="[object Uint8Array]",Wqe="[object Uint8ClampedArray]",Gqe="[object Uint16Array]",Kqe="[object Uint32Array]",er={};er[Uqe]=er[jqe]=er[qqe]=er[zqe]=er[Vqe]=er[Hqe]=er[Wqe]=er[Gqe]=er[Kqe]=!0;er[Sqe]=er[Tqe]=er[Mqe]=er[Pqe]=er[$qe]=er[Aqe]=er[Dqe]=er[kqe]=er[Oqe]=er[Iqe]=er[Rqe]=er[Nqe]=er[Lqe]=er[Bqe]=er[Fqe]=!1;function Yqe(e){return Cqe(e)&&_qe(e.length)&&!!er[wqe(e)]}dZ.exports=Yqe});var mZ=_((pbt,pZ)=>{"use strict";function Xqe(e){return function(t){return e(t)}}pZ.exports=Xqe});var hZ=_((gh,_f)=>{"use strict";var Zqe=aD(),gZ=typeof gh=="object"&&gh&&!gh.nodeType&&gh,hh=gZ&&typeof _f=="object"&&_f&&!_f.nodeType&&_f,Qqe=hh&&hh.exports===gZ,vD=Qqe&&Zqe.process,Jqe=(function(){try{var e=hh&&hh.require&&hh.require("util").types;return e||vD&&vD.binding&&vD.binding("util")}catch{}})();_f.exports=Jqe});var yD=_((mbt,bZ)=>{"use strict";var e9e=fZ(),t9e=mZ(),vZ=hZ(),yZ=vZ&&vZ.isTypedArray,r9e=yZ?t9e(yZ):e9e;bZ.exports=r9e});var bD=_((gbt,EZ)=>{"use strict";function n9e(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}EZ.exports=n9e});var wZ=_((hbt,xZ)=>{"use strict";var o9e=X0(),i9e=gf(),a9e=Object.prototype,s9e=a9e.hasOwnProperty;function l9e(e,t,r){var n=e[t];(!(s9e.call(e,t)&&i9e(n,r))||r===void 0&&!(t in e))&&o9e(e,t,r)}xZ.exports=l9e});var CZ=_((vbt,_Z)=>{"use strict";var u9e=wZ(),c9e=X0();function d9e(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=n?n(r[s],e[s],s,r,e):void 0;l===void 0&&(l=e[s]),o?c9e(r,s,l):u9e(r,s,l)}return r}_Z.exports=d9e});var TZ=_((ybt,SZ)=>{"use strict";function f9e(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}SZ.exports=f9e});var ED=_((bbt,PZ)=>{"use strict";var p9e=9007199254740991,m9e=/^(?:0|[1-9]\d*)$/;function g9e(e,t){var r=typeof e;return t=t??p9e,!!t&&(r=="number"||r!="symbol"&&m9e.test(e))&&e>-1&&e%1==0&&e<t}PZ.exports=g9e});var DZ=_((Ebt,AZ)=>{"use strict";var h9e=TZ(),v9e=mD(),y9e=W0(),b9e=hD(),E9e=ED(),x9e=yD(),w9e=Object.prototype,_9e=w9e.hasOwnProperty;function C9e(e,t){var r=y9e(e),n=!r&&v9e(e),o=!r&&!n&&b9e(e),i=!r&&!n&&!o&&x9e(e),a=r||n||o||i,s=a?h9e(e.length,String):[],l=s.length;for(var u in e)(t||_9e.call(e,u))&&!(a&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||E9e(u,l)))&&s.push(u);return s}AZ.exports=C9e});var OZ=_((xbt,kZ)=>{"use strict";function S9e(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}kZ.exports=S9e});var RZ=_((wbt,IZ)=>{"use strict";var T9e=fl(),P9e=pD(),A9e=OZ(),D9e=Object.prototype,k9e=D9e.hasOwnProperty;function O9e(e){if(!T9e(e))return A9e(e);var t=P9e(e),r=[];for(var n in e)n=="constructor"&&(t||!k9e.call(e,n))||r.push(n);return r}IZ.exports=O9e});var Q0=_((_bt,NZ)=>{"use strict";var I9e=DZ(),R9e=RZ(),N9e=Z0();function L9e(e){return N9e(e)?I9e(e,!0):R9e(e)}NZ.exports=L9e});var BZ=_((Cbt,LZ)=>{"use strict";var B9e=CZ(),F9e=Q0();function M9e(e){return B9e(e,F9e(e))}LZ.exports=M9e});var qZ=_((Sbt,jZ)=>{"use strict";var FZ=dD(),$9e=AX(),U9e=LX(),j9e=FX(),q9e=WX(),MZ=mD(),$Z=W0(),z9e=rZ(),V9e=hD(),H9e=K0(),W9e=fl(),G9e=cZ(),K9e=yD(),UZ=bD(),Y9e=BZ();function X9e(e,t,r,n,o,i,a){var s=UZ(e,r),l=UZ(t,r),u=a.get(l);if(u){FZ(e,r,u);return}var c=i?i(s,l,r+"",e,t,a):void 0,f=c===void 0;if(f){var d=$Z(l),p=!d&&V9e(l),v=!d&&!p&&K9e(l);c=l,d||p||v?$Z(s)?c=s:z9e(s)?c=j9e(s):p?(f=!1,c=$9e(l,!0)):v?(f=!1,c=U9e(l,!0)):c=[]:G9e(l)||MZ(l)?(c=s,MZ(s)?c=Y9e(s):(!W9e(s)||H9e(s))&&(c=q9e(l))):f=!1}f&&(a.set(l,c),o(c,l,n,i,a),a.delete(l)),FZ(e,r,c)}jZ.exports=X9e});var HZ=_((Tbt,VZ)=>{"use strict";var Z9e=gX(),Q9e=dD(),J9e=_X(),eze=qZ(),tze=fl(),rze=Q0(),nze=bD();function zZ(e,t,r,n,o){e!==t&&J9e(t,function(i,a){if(o||(o=new Z9e),tze(i))eze(e,t,a,r,zZ,n,o);else{var s=n?n(nze(e,a),i,a+"",e,t,o):void 0;s===void 0&&(s=i),Q9e(e,a,s)}},rze)}VZ.exports=zZ});var xD=_((Pbt,WZ)=>{"use strict";function oze(e){return e}WZ.exports=oze});var KZ=_((Abt,GZ)=>{"use strict";function ize(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}GZ.exports=ize});var ZZ=_((Dbt,XZ)=>{"use strict";var aze=KZ(),YZ=Math.max;function sze(e,t,r){return t=YZ(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=YZ(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),aze(e,this,s)}}XZ.exports=sze});var JZ=_((kbt,QZ)=>{"use strict";function lze(e){return function(){return e}}QZ.exports=lze});var rQ=_((Obt,tQ)=>{"use strict";var uze=JZ(),eQ=cD(),cze=xD(),dze=eQ?function(e,t){return eQ(e,"toString",{configurable:!0,enumerable:!1,value:uze(t),writable:!0})}:cze;tQ.exports=dze});var oQ=_((Ibt,nQ)=>{"use strict";var fze=800,pze=16,mze=Date.now;function gze(e){var t=0,r=0;return function(){var n=mze(),o=pze-(n-r);if(r=n,o>0){if(++t>=fze)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}nQ.exports=gze});var aQ=_((Rbt,iQ)=>{"use strict";var hze=rQ(),vze=oQ(),yze=vze(hze);iQ.exports=yze});var wD=_((Nbt,sQ)=>{"use strict";var bze=xD(),Eze=ZZ(),xze=aQ();function wze(e,t){return xze(Eze(e,t,bze),e+"")}sQ.exports=wze});var _D=_((Lbt,lQ)=>{"use strict";var _ze=gf(),Cze=Z0(),Sze=ED(),Tze=fl();function Pze(e,t,r){if(!Tze(r))return!1;var n=typeof t;return(n=="number"?Cze(r)&&Sze(t,r.length):n=="string"&&t in r)?_ze(r[t],e):!1}lQ.exports=Pze});var cQ=_((Bbt,uQ)=>{"use strict";var Aze=wD(),Dze=_D();function kze(e){return Aze(function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,a&&Dze(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t})}uQ.exports=kze});var fQ=_((Fbt,dQ)=>{"use strict";var Oze=HZ(),Ize=cQ(),Rze=Ize(function(e,t,r){Oze(e,t,r)});dQ.exports=Rze});var gQ=_((Mbt,mQ)=>{"use strict";var Nze=wD(),Lze=gf(),Bze=_D(),Fze=Q0(),pQ=Object.prototype,Mze=pQ.hasOwnProperty,$ze=Nze(function(e,t){e=Object(e);var r=-1,n=t.length,o=n>2?t[2]:void 0;for(o&&Bze(t[0],t[1],o)&&(n=1);++r<n;)for(var i=t[r],a=Fze(i),s=-1,l=a.length;++s<l;){var u=a[s],c=e[u];(c===void 0||Lze(c,pQ[u])&&!Mze.call(e,u))&&(e[u]=i[u])}return e});mQ.exports=$ze});var iJ=_((pwt,oJ)=>{"use strict";var dx=Object.prototype.hasOwnProperty,nJ=Object.prototype.toString,ZQ=Object.defineProperty,QQ=Object.getOwnPropertyDescriptor,JQ=function(t){return typeof Array.isArray=="function"?Array.isArray(t):nJ.call(t)==="[object Array]"},eJ=function(t){if(!t||nJ.call(t)!=="[object Object]")return!1;var r=dx.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&dx.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var o;for(o in t);return typeof o>"u"||dx.call(t,o)},tJ=function(t,r){ZQ&&r.name==="__proto__"?ZQ(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},rJ=function(t,r){if(r==="__proto__")if(dx.call(t,r)){if(QQ)return QQ(t,r).value}else return;return t[r]};oJ.exports=function e(){var t,r,n,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<u;++l)if(t=arguments[l],t!=null)for(r in t)n=rJ(s,r),o=rJ(t,r),s!==o&&(c&&o&&(eJ(o)||(i=JQ(o)))?(i?(i=!1,a=n&&JQ(n)?n:[]):a=n&&eJ(n)?n:{},tJ(s,{name:r,newValue:e(c,a,o)})):typeof o<"u"&&tJ(s,{name:r,newValue:o}));return s}});var gJ=_((v_t,vx)=>{"use strict";var Z5e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var Be=(function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,r=0,n={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function h(y){return y instanceof i?new i(y.type,h(y.content),y.alias):Array.isArray(y)?y.map(h):y.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(h){return Object.prototype.toString.call(h).slice(8,-1)},objId:function(h){return h.__id||Object.defineProperty(h,"__id",{value:++r}),h.__id},clone:function h(y,g){g=g||{};var m,b;switch(o.util.type(y)){case"Object":if(b=o.util.objId(y),g[b])return g[b];m={},g[b]=m;for(var E in y)y.hasOwnProperty(E)&&(m[E]=h(y[E],g));return m;case"Array":return b=o.util.objId(y),g[b]?g[b]:(m=[],g[b]=m,y.forEach(function(C,x){m[x]=h(C,g)}),m);default:return y}},getLanguage:function(h){for(;h;){var y=t.exec(h.className);if(y)return y[1].toLowerCase();h=h.parentElement}return"none"},setLanguage:function(h,y){h.className=h.className.replace(RegExp(t,"gi"),""),h.classList.add("language-"+y)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(m){var h=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(m.stack)||[])[1];if(h){var y=document.getElementsByTagName("script");for(var g in y)if(y[g].src==h)return y[g]}return null}},isActive:function(h,y,g){for(var m="no-"+y;h;){var b=h.classList;if(b.contains(y))return!0;if(b.contains(m))return!1;h=h.parentElement}return!!g}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(h,y){var g=o.util.clone(o.languages[h]);for(var m in y)g[m]=y[m];return g},insertBefore:function(h,y,g,m){m=m||o.languages;var b=m[h],E={};for(var C in b)if(b.hasOwnProperty(C)){if(C==y)for(var x in g)g.hasOwnProperty(x)&&(E[x]=g[x]);g.hasOwnProperty(C)||(E[C]=b[C])}var P=m[h];return m[h]=E,o.languages.DFS(o.languages,function(N,D){D===P&&N!=h&&(this[N]=E)}),E},DFS:function h(y,g,m,b){b=b||{};var E=o.util.objId;for(var C in y)if(y.hasOwnProperty(C)){g.call(y,C,y[C],m||C);var x=y[C],P=o.util.type(x);P==="Object"&&!b[E(x)]?(b[E(x)]=!0,h(x,g,null,b)):P==="Array"&&!b[E(x)]&&(b[E(x)]=!0,h(x,g,C,b))}}},plugins:{},highlightAll:function(h,y){o.highlightAllUnder(document,h,y)},highlightAllUnder:function(h,y,g){var m={callback:g,container:h,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",m),m.elements=Array.prototype.slice.apply(m.container.querySelectorAll(m.selector)),o.hooks.run("before-all-elements-highlight",m);for(var b=0,E;E=m.elements[b++];)o.highlightElement(E,y===!0,m.callback)},highlightElement:function(h,y,g){var m=o.util.getLanguage(h),b=o.languages[m];o.util.setLanguage(h,m);var E=h.parentElement;E&&E.nodeName.toLowerCase()==="pre"&&o.util.setLanguage(E,m);var C=h.textContent,x={element:h,language:m,grammar:b,code:C};function P(D){x.highlightedCode=D,o.hooks.run("before-insert",x),x.element.innerHTML=x.highlightedCode,o.hooks.run("after-highlight",x),o.hooks.run("complete",x),g&&g.call(x.element)}if(o.hooks.run("before-sanity-check",x),E=x.element.parentElement,E&&E.nodeName.toLowerCase()==="pre"&&!E.hasAttribute("tabindex")&&E.setAttribute("tabindex","0"),!x.code){o.hooks.run("complete",x),g&&g.call(x.element);return}if(o.hooks.run("before-highlight",x),!x.grammar){P(o.util.encode(x.code));return}if(y&&e.Worker){var N=new Worker(o.filename);N.onmessage=function(D){P(D.data)},N.postMessage(JSON.stringify({language:x.language,code:x.code,immediateClose:!0}))}else P(o.highlight(x.code,x.grammar,x.language))},highlight:function(h,y,g){var m={code:h,grammar:y,language:g};if(o.hooks.run("before-tokenize",m),!m.grammar)throw new Error('The language "'+m.language+'" has no grammar.');return m.tokens=o.tokenize(m.code,m.grammar),o.hooks.run("after-tokenize",m),i.stringify(o.util.encode(m.tokens),m.language)},tokenize:function(h,y){var g=y.rest;if(g){for(var m in g)y[m]=g[m];delete y.rest}var b=new l;return u(b,b.head,h),s(h,b,y,b.head,0),f(b)},hooks:{all:{},add:function(h,y){var g=o.hooks.all;g[h]=g[h]||[],g[h].push(y)},run:function(h,y){var g=o.hooks.all[h];if(!(!g||!g.length))for(var m=0,b;b=g[m++];)b(y)}},Token:i};e.Prism=o;function i(h,y,g,m){this.type=h,this.content=y,this.alias=g,this.length=(m||"").length|0}i.stringify=function h(y,g){if(typeof y=="string")return y;if(Array.isArray(y)){var m="";return y.forEach(function(P){m+=h(P,g)}),m}var b={type:y.type,content:h(y.content,g),tag:"span",classes:["token",y.type],attributes:{},language:g},E=y.alias;E&&(Array.isArray(E)?Array.prototype.push.apply(b.classes,E):b.classes.push(E)),o.hooks.run("wrap",b);var C="";for(var x in b.attributes)C+=" "+x+'="'+(b.attributes[x]||"").replace(/"/g,""")+'"';return"<"+b.tag+' class="'+b.classes.join(" ")+'"'+C+">"+b.content+"</"+b.tag+">"};function a(h,y,g,m){h.lastIndex=y;var b=h.exec(g);if(b&&m&&b[1]){var E=b[1].length;b.index+=E,b[0]=b[0].slice(E)}return b}function s(h,y,g,m,b,E){for(var C in g)if(!(!g.hasOwnProperty(C)||!g[C])){var x=g[C];x=Array.isArray(x)?x:[x];for(var P=0;P<x.length;++P){if(E&&E.cause==C+","+P)return;var N=x[P],D=N.inside,R=!!N.lookbehind,M=!!N.greedy,I=N.alias;if(M&&!N.pattern.global){var B=N.pattern.toString().match(/[imsuy]*$/)[0];N.pattern=RegExp(N.pattern.source,B+"g")}for(var L=N.pattern||N,U=m.next,K=b;U!==y.tail&&!(E&&K>=E.reach);K+=U.value.length,U=U.next){var z=U.value;if(y.length>h.length)return;if(!(z instanceof i)){var ae=1,ie;if(M){if(ie=a(L,K,h,R),!ie||ie.index>=h.length)break;var k=ie.index,O=ie.index+ie[0].length,J=K;for(J+=U.value.length;k>=J;)U=U.next,J+=U.value.length;if(J-=U.value.length,K=J,U.value instanceof i)continue;for(var ue=U;ue!==y.tail&&(J<O||typeof ue.value=="string");ue=ue.next)ae++,J+=ue.value.length;ae--,z=h.slice(K,J),ie.index-=K}else if(ie=a(L,0,z,R),!ie)continue;var k=ie.index,be=ie[0],Oe=z.slice(0,k),Te=z.slice(k+be.length),Ke=K+z.length;E&&Ke>E.reach&&(E.reach=Ke);var je=U.prev;Oe&&(je=u(y,je,Oe),K+=Oe.length),c(y,je,ae);var G=new i(C,D?o.tokenize(be,D):be,I,be);if(U=u(y,je,G),Te&&u(y,U,Te),ae>1){var ne={cause:C+","+P,reach:Ke};s(h,y,g,U.prev,K,ne),E&&ne.reach>E.reach&&(E.reach=ne.reach)}}}}}}function l(){var h={value:null,prev:null,next:null},y={value:null,prev:h,next:null};h.next=y,this.head=h,this.tail=y,this.length=0}function u(h,y,g){var m=y.next,b={value:g,prev:y,next:m};return y.next=b,m.prev=b,h.length++,b}function c(h,y,g){for(var m=y.next,b=0;b<g&&m!==h.tail;b++)m=m.next;y.next=m,m.prev=y,h.length-=b}function f(h){for(var y=[],g=h.head.next;g!==h.tail;)y.push(g.value),g=g.next;return y}if(!e.document)return e.addEventListener&&(o.disableWorkerMessageHandler||e.addEventListener("message",function(h){var y=JSON.parse(h.data),g=y.language,m=y.code,b=y.immediateClose;e.postMessage(o.highlight(m,o.languages[g],g)),b&&e.close()},!1)),o;var d=o.util.currentScript();d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0));function p(){o.manual||o.highlightAll()}if(!o.manual){var v=document.readyState;v==="loading"||v==="interactive"&&d&&d.defer?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return o})(Z5e);typeof vx<"u"&&vx.exports&&(vx.exports=Be);typeof global<"u"&&(global.Prism=Be);Be.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Be.languages.markup.tag.inside["attr-value"].inside.entity=Be.languages.markup.entity;Be.languages.markup.doctype.inside["internal-subset"].inside=Be.languages.markup;Be.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))});Object.defineProperty(Be.languages.markup.tag,"addInlined",{value:function(t,r){var n={};n["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Be.languages[r]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};o["language-"+r]={pattern:/[\s\S]+/,inside:Be.languages[r]};var i={};i[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:o},Be.languages.insertBefore("markup","cdata",i)}});Object.defineProperty(Be.languages.markup.tag,"addAttribute",{value:function(e,t){Be.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Be.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Be.languages.html=Be.languages.markup;Be.languages.mathml=Be.languages.markup;Be.languages.svg=Be.languages.markup;Be.languages.xml=Be.languages.extend("markup",{});Be.languages.ssml=Be.languages.xml;Be.languages.atom=Be.languages.xml;Be.languages.rss=Be.languages.xml;(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(Be);Be.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Be.languages.javascript=Be.languages.extend("clike",{"class-name":[Be.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Be.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Be.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Be.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Be.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Be.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Be.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Be.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Be.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Be.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Be.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Be.languages.markup&&(Be.languages.markup.tag.addInlined("script","javascript"),Be.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Be.languages.js=Be.languages.javascript;(function(){if(typeof Be>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e="Loading\u2026",t=function(d,p){return"\u2716 Error "+d+" while fetching file: "+p},r="\u2716 Error: File does not exist or is empty",n={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},o="data-src-status",i="loading",a="loaded",s="failed",l="pre[data-src]:not(["+o+'="'+a+'"]):not(['+o+'="'+i+'"])';function u(d,p,v){var h=new XMLHttpRequest;h.open("GET",d,!0),h.onreadystatechange=function(){h.readyState==4&&(h.status<400&&h.responseText?p(h.responseText):h.status>=400?v(t(h.status,h.statusText)):v(r))},h.send(null)}function c(d){var p=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(d||"");if(p){var v=Number(p[1]),h=p[2],y=p[3];return h?y?[v,Number(y)]:[v,void 0]:[v,v]}}Be.hooks.add("before-highlightall",function(d){d.selector+=", "+l}),Be.hooks.add("before-sanity-check",function(d){var p=d.element;if(p.matches(l)){d.code="",p.setAttribute(o,i);var v=p.appendChild(document.createElement("CODE"));v.textContent=e;var h=p.getAttribute("data-src"),y=d.language;if(y==="none"){var g=(/\.(\w+)$/.exec(h)||[,"none"])[1];y=n[g]||g}Be.util.setLanguage(v,y),Be.util.setLanguage(p,y);var m=Be.plugins.autoloader;m&&m.loadLanguages(y),u(h,function(b){p.setAttribute(o,a);var E=c(p.getAttribute("data-range"));if(E){var C=b.split(/\r\n?|\n/g),x=E[0],P=E[1]==null?C.length:E[1];x<0&&(x+=C.length),x=Math.max(0,Math.min(x-1,C.length)),P<0&&(P+=C.length),P=Math.max(0,Math.min(P,C.length)),b=C.slice(x,P).join(`
|
|
10
|
-
`),p.hasAttribute("data-start")||p.setAttribute("data-start",String(x+1))}v.textContent=b,Be.highlightElement(v)},function(b){p.setAttribute(o,s),v.textContent=b})}}),Be.plugins.fileHighlight={highlight:function(p){for(var v=(p||document).querySelectorAll(l),h=0,y;y=v[h++];)Be.highlightElement(y)}};var f=!1;Be.fileHighlight=function(){f||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),f=!0),Be.plugins.fileHighlight.highlight.apply(this,arguments)}})()});var ZJ=_((NCt,XJ)=>{"use strict";var VVe=Array.isArray;XJ.exports=VVe});var JJ=_((LCt,QJ)=>{"use strict";var HVe=ZJ();function WVe(){if(!arguments.length)return[];var e=arguments[0];return HVe(e)?e:[e]}QJ.exports=WVe});var pee=_((cSt,fee)=>{"use strict";var d8e=Array.isArray;fee.exports=d8e});var gee=_((dSt,mee)=>{"use strict";var f8e=pee();function p8e(){if(!arguments.length)return[];var e=arguments[0];return f8e(e)?e:[e]}mee.exports=p8e});var Pee=_((xk,wk)=>{"use strict";(function(e,t){typeof xk=="object"&&typeof wk<"u"?wk.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.urlParser=t())})(xk,(function(){"use strict";function e(w){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(A){return typeof A}:e=function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},e(w)}var t=function(A){if(typeof A!="string")return{};A=A.split("+").join(" ");var $={},H=A.match(/(?:[?](?:[^=]+)=(?:[^&#]*)(?:[&](?:[^=]+)=(?:[^&#]*))*(?:[#].*)?)|(?:[#].*)/),he;if(H===null)return{};he=H[0].substr(1).split(/[&#=]/);for(var Ae=0;Ae<he.length;Ae+=2)$[decodeURIComponent(he[Ae])]=decodeURIComponent(he[Ae+1]||"");return $},r=function(A,$){if(e(A)!=="object")return"";var H="",he=0,Ae=Object.keys(A);if(Ae.length===0)return"";for(Ae.sort(),$||(H+="?"+Ae[0]+"="+A[Ae[0]],he+=1);he<Ae.length;he+=1)H+="&"+Ae[he]+"="+A[Ae[he]];return H};function n(w){var A=0,$={s:1,m:60,h:3600,d:3600*24,w:3600*24*7},H;w=w.replace(/([smhdw])/g," $1 ").trim(),H=w.split(" ");for(var he=0;he<H.length;he+=2)A+=parseInt(H[he],10)*$[H[he+1]||"s"];return A}function o(w){for(var A=0,$=[1,60,3600,3600*24,3600*24*7],H=w.split(":"),he=0;he<H.length;he++)A+=parseInt(H[he],10)*$[H.length-he-1];return A}var i=function(A){return typeof A>"u"?0:A.match(/^(\d+[smhdw]?)+$/)?n(A):A.match(/^(\d+:?)+$/)?o(A):0},a={getQueryParams:t,combineParams:r,getTime:i},s=a.getQueryParams;function l(){for(var w=0,A=["parseProvider","parse","bind","create"];w<A.length;w++){var $=A[w];this[$]=this[$].bind(this)}this.plugins={}}var u=l;l.prototype.parseProvider=function(w){var A=w.match(/(?:(?:https?:)?\/\/)?(?:[^.]+\.)?(\w+)\./i);return A?A[1]:void 0},l.prototype.parse=function(w){if(!(typeof w>"u")){var A=this.parseProvider(w),$,H=this.plugins[A];if(!(!A||!H||!H.parse))return $=H.parse.call(H,w,s(w)),$&&($=c($),$.provider=H.provider),$}},l.prototype.bind=function(w){if(this.plugins[w.provider]=w,w.alternatives)for(var A=0;A<w.alternatives.length;A+=1)this.plugins[w.alternatives[A]]=w},l.prototype.create=function(w){if(!(e(w)!=="object"||e(w.videoInfo)!=="object")){var A=w.videoInfo,$=w.params,H=this.plugins[A.provider];if($=$==="internal"?A.params:$||{},H&&(w.format=w.format||H.defaultFormat,H.formats.hasOwnProperty(w.format)))return H.formats[w.format].apply(H,[A,Object.assign({},$)])}};function c(w){return w.params&&Object.keys(w.params).length===0&&delete w.params,w}var f=new u,d=f;function p(){this.provider="allocine",this.alternatives=[],this.defaultFormat="embed",this.formats={embed:this.createEmbedUrl},this.mediaTypes={VIDEO:"video"}}p.prototype.parseUrl=function(w){var A=w.match(/(?:\/video\/player_gen_cmedia=)([A-Za-z0-9]+)/i);return A?A[1]:void 0},p.prototype.parse=function(w){var A={mediaType:this.mediaTypes.VIDEO,id:this.parseUrl(w)};return A.id?A:void 0},p.prototype.createEmbedUrl=function(w){if(!(!w.id||w.mediaType!==this.mediaTypes.VIDEO))return"https://player.allocine.fr/"+w.id+".html"},d.bind(new p);var v=a.combineParams;function h(){this.provider="canalplus",this.defaultFormat="embed",this.formats={embed:this.createEmbedUrl},this.mediaTypes={VIDEO:"video"}}h.prototype.parseParameters=function(w){return delete w.vid,w},h.prototype.parse=function(w,A){var $=this,H={mediaType:this.mediaTypes.VIDEO,id:A.vid};if(H.params=$.parseParameters(A),!!H.id)return H},h.prototype.createEmbedUrl=function(w,A){if(!(!w.id||w.mediaType!==this.mediaTypes.VIDEO)){var $="http://player.canalplus.fr/embed/";return A.vid=w.id,$+=v(A),$}},d.bind(new h);var y=a.combineParams;function g(){this.provider="coub",this.defaultFormat="long",this.formats={long:this.createLongUrl,embed:this.createEmbedUrl},this.mediaTypes={VIDEO:"video"}}g.prototype.parseUrl=function(w){var A=w.match(/(?:embed|view)\/([a-zA-Z\d]+)/i);return A?A[1]:void 0},g.prototype.parse=function(w,A){var $={mediaType:this.mediaTypes.VIDEO,params:A,id:this.parseUrl(w)};if($.id)return $},g.prototype.createUrl=function(w,A,$){if(!(!A.id||A.mediaType!==this.mediaTypes.VIDEO)){var H=w+A.id;return H+=y($),H}},g.prototype.createLongUrl=function(w,A){return this.createUrl("https://coub.com/view/",w,A)},g.prototype.createEmbedUrl=function(w,A){return this.createUrl("//coub.com/embed/",w,A)},d.bind(new g);var m=a.combineParams,b=a.getTime;function E(){this.provider="dailymotion",this.alternatives=["dai"],this.defaultFormat="long",this.formats={short:this.createShortUrl,long:this.createLongUrl,embed:this.createEmbedUrl,image:this.createImageUrl},this.mediaTypes={VIDEO:"video"}}E.prototype.parseParameters=function(w){return this.parseTime(w)},E.prototype.parseTime=function(w){return w.start&&(w.start=b(w.start)),w},E.prototype.parseUrl=function(w){var A=w.match(/(?:\/video|ly)\/([A-Za-z0-9]+)/i);return A?A[1]:void 0},E.prototype.parse=function(w,A){var $=this,H={mediaType:this.mediaTypes.VIDEO,params:$.parseParameters(A),id:$.parseUrl(w)};return H.id?H:void 0},E.prototype.createUrl=function(w,A,$){if(!(!A.id||A.mediaType!==this.mediaTypes.VIDEO))return w+A.id+m($)},E.prototype.createShortUrl=function(w,A){return this.createUrl("https://dai.ly/",w,A)},E.prototype.createLongUrl=function(w,A){return this.createUrl("https://dailymotion.com/video/",w,A)},E.prototype.createEmbedUrl=function(w,A){return this.createUrl("https://www.dailymotion.com/embed/video/",w,A)},E.prototype.createImageUrl=function(w,A){return delete A.start,this.createUrl("https://www.dailymotion.com/thumbnail/video/",w,A)},d.bind(new E);var C=a.combineParams;function x(){this.provider="loom",this.defaultFormat="long",this.formats={long:this.createLongUrl,embed:this.createEmbedUrl},this.mediaTypes={VIDEO:"video"}}x.prototype.parseUrl=function(w){var A=w.match(/(?:share|embed)\/([a-zA-Z\d]+)/i);return A?A[1]:void 0},x.prototype.parse=function(w,A){var $={mediaType:this.mediaTypes.VIDEO,params:A,id:this.parseUrl(w)};return $.id?$:void 0},x.prototype.createUrl=function(w,A,$){if(!(!A.id||A.mediaType!==this.mediaTypes.VIDEO)){var H=w+A.id;return H+=C($),H}},x.prototype.createLongUrl=function(w,A){return this.createUrl("https://loom.com/share/",w,A)},x.prototype.createEmbedUrl=function(w,A){return this.createUrl("//loom.com/embed/",w,A)},d.bind(new x);var P=a.combineParams,N=a.getTime;function D(){this.provider="twitch",this.defaultFormat="long",this.formats={long:this.createLongUrl,embed:this.createEmbedUrl},this.mediaTypes={VIDEO:"video",STREAM:"stream",CLIP:"clip"}}D.prototype.seperateId=function(w){return{pre:w[0],id:w.substr(1)}},D.prototype.parseChannel=function(w,A){var $=A.channel||A.utm_content||w.channel;return delete A.utm_content,delete A.channel,$},D.prototype.parseUrl=function(w,A,$){var H;return H=w.match(/(clips\.)?twitch\.tv\/(?:(?:videos\/(\d+))|(\w+(?:-[\w\d-]+)?)(?:\/clip\/(\w+))?)/i),H&&H[2]?A.id="v"+H[2]:$.video?(A.id=$.video,delete $.video):$.clip?(A.id=$.clip,A.isClip=!0,delete $.clip):H&&H[1]&&H[3]?(A.id=H[3],A.isClip=!0):H&&H[3]&&H[4]?(A.channel=H[3],A.id=H[4],A.isClip=!0):H&&H[3]&&(A.channel=H[3]),A},D.prototype.parseMediaType=function(w){var A;return w.id?w.isClip?(A=this.mediaTypes.CLIP,delete w.isClip):A=this.mediaTypes.VIDEO:w.channel&&(A=this.mediaTypes.STREAM),A},D.prototype.parseParameters=function(w){return w.t&&(w.start=N(w.t),delete w.t),w},D.prototype.parse=function(w,A){var $=this,H={};return H=$.parseUrl(w,H,A),H.channel=$.parseChannel(H,A),H.mediaType=$.parseMediaType(H),H.params=$.parseParameters(A),H.channel||H.id?H:void 0},D.prototype.createLongUrl=function(w,A){var $="";if(w.mediaType===this.mediaTypes.STREAM&&w.channel)$="https://twitch.tv/"+w.channel;else if(w.mediaType===this.mediaTypes.VIDEO&&w.id){var H=this.seperateId(w.id);$="https://twitch.tv/videos/"+H.id,A.start&&(A.t=A.start+"s",delete A.start)}else if(w.mediaType===this.mediaTypes.CLIP&&w.id)w.channel?$="https://www.twitch.tv/"+w.channel+"/clip/"+w.id:$="https://clips.twitch.tv/"+w.id;else return;return $+=P(A),$},D.prototype.createEmbedUrl=function(w,A){var $="https://player.twitch.tv/";if(w.mediaType===this.mediaTypes.STREAM&&w.channel)A.channel=w.channel;else if(w.mediaType===this.mediaTypes.VIDEO&&w.id)A.video=w.id,A.start&&(A.t=A.start+"s",delete A.start);else if(w.mediaType===this.mediaTypes.CLIP&&w.id)$="https://clips.twitch.tv/embed",A.clip=w.id;else return;return $+=P(A),$},d.bind(new D);var R=a.combineParams,M=a.getTime;function I(){this.provider="vimeo",this.alternatives=["vimeopro"],this.defaultFormat="long",this.formats={long:this.createLongUrl,embed:this.createEmbedUrl},this.mediaTypes={VIDEO:"video"}}I.prototype.parseUrl=function(w){var A=w.match(/(?:\/showcase\/\d+)?(?:\/(?:channels\/[\w]+|(?:(?:album\/\d+|groups\/[\w]+)\/)?videos?))?\/(\d+)/i);return A?A[1]:void 0},I.prototype.parseHash=function(w){var A=w.match(/\/\d+\/(\w+)$/i);return A?A[1]:void 0},I.prototype.parseParameters=function(w){return w.t&&(w.start=M(w.t),delete w.t),w.h&&(w.hash=w.h,delete w.h),w},I.prototype.parse=function(w,A){var $={mediaType:this.mediaTypes.VIDEO,params:this.parseParameters(A),id:this.parseUrl(w)},H=this.parseHash(w,A);return H&&($.params.hash=H),$.id?$:void 0},I.prototype.createUrl=function(w,A,$,H){if(!(!A.id||A.mediaType!==this.mediaTypes.VIDEO)){var he=w+A.id,Ae=$.start;return delete $.start,$.hash&&(H==="embed"?$.h=$.hash:H==="long"&&(he+="/"+$.hash),delete $.hash),he+=R($),Ae&&(he+="#t="+Ae),he}},I.prototype.createLongUrl=function(w,A){return this.createUrl("https://vimeo.com/",w,A,"long")},I.prototype.createEmbedUrl=function(w,A){return this.createUrl("//player.vimeo.com/video/",w,A,"embed")},d.bind(new I);var B=a.combineParams,L=a.getTime;function U(){this.provider="wistia",this.alternatives=[],this.defaultFormat="long",this.formats={long:this.createLongUrl,embed:this.createEmbedUrl,embedjsonp:this.createEmbedJsonpUrl},this.mediaTypes={VIDEO:"video",EMBEDVIDEO:"embedvideo"}}U.prototype.parseUrl=function(w){var A=w.match(/(?:(?:medias|iframe)\/|wvideo=)([\w-]+)/);return A?A[1]:void 0},U.prototype.parseChannel=function(w){var A=w.match(/(?:(?:https?:)?\/\/)?([^.]*)\.wistia\./),$=A?A[1]:void 0;if(!($==="fast"||$==="content"))return $},U.prototype.parseParameters=function(w,A){return w.wtime&&(w.start=L(w.wtime),delete w.wtime),w.wvideo===A.id&&delete w.wvideo,w},U.prototype.parseMediaType=function(w){return w.id&&w.channel?this.mediaTypes.VIDEO:w.id?(delete w.channel,this.mediaTypes.EMBEDVIDEO):void 0},U.prototype.parse=function(w,A){var $={id:this.parseUrl(w),channel:this.parseChannel(w)};if($.params=this.parseParameters(A,$),$.mediaType=this.parseMediaType($),!!$.id)return $},U.prototype.createUrl=function(w,A,$){return A.start&&(A.wtime=A.start,delete A.start),$+=B(A),$},U.prototype.createLongUrl=function(w,A){if(!(!w.id||w.mediaType!==this.mediaTypes.VIDEO)){var $="https://"+w.channel+".wistia.com/medias/"+w.id;return this.createUrl(w,A,$)}},U.prototype.createEmbedUrl=function(w,A){if(!(!w.id||!(w.mediaType===this.mediaTypes.VIDEO||w.mediaType===this.mediaTypes.EMBEDVIDEO))){var $="https://fast.wistia.com/embed/iframe/"+w.id;return this.createUrl(w,A,$)}},U.prototype.createEmbedJsonpUrl=function(w){if(!(!w.id||!(w.mediaType===this.mediaTypes.VIDEO||w.mediaType===this.mediaTypes.EMBEDVIDEO)))return"https://fast.wistia.com/embed/medias/"+w.id+".jsonp"},d.bind(new U);var K=a.combineParams;function z(){this.provider="youku",this.defaultFormat="long",this.formats={embed:this.createEmbedUrl,long:this.createLongUrl,flash:this.createFlashUrl,static:this.createStaticUrl},this.mediaTypes={VIDEO:"video"}}z.prototype.parseUrl=function(w){var A=w.match(/(?:(?:embed|sid)\/|v_show\/id_|VideoIDS=)([a-zA-Z0-9]+)/);return A?A[1]:void 0},z.prototype.parseParameters=function(w){return w.VideoIDS&&delete w.VideoIDS,w},z.prototype.parse=function(w,A){var $=this,H={mediaType:this.mediaTypes.VIDEO,id:$.parseUrl(w),params:$.parseParameters(A)};if(H.id)return H},z.prototype.createUrl=function(w,A,$){if(!(!A.id||A.mediaType!==this.mediaTypes.VIDEO)){var H=w+A.id;return H+=K($),H}},z.prototype.createEmbedUrl=function(w,A){return this.createUrl("http://player.youku.com/embed/",w,A)},z.prototype.createLongUrl=function(w,A){return this.createUrl("http://v.youku.com/v_show/id_",w,A)},z.prototype.createStaticUrl=function(w,A){return this.createUrl("http://static.youku.com/v1.0.0638/v/swf/loader.swf?VideoIDS=",w,A)},z.prototype.createFlashUrl=function(w,A){if(!(!w.id||w.mediaType!==this.mediaTypes.VIDEO)){var $="http://player.youku.com/player.php/sid/"+w.id+"/v.swf";return $+=K(A),$}},d.bind(new z);var ae=a.combineParams,ie=a.getTime;function O(){this.provider="youtube",this.alternatives=["youtu","ytimg"],this.defaultFormat="long",this.formats={short:this.createShortUrl,long:this.createLongUrl,embed:this.createEmbedUrl,shortImage:this.createShortImageUrl,longImage:this.createLongImageUrl},this.imageQualities={0:"0",1:"1",2:"2",3:"3",DEFAULT:"default",HQDEFAULT:"hqdefault",SDDEFAULT:"sddefault",MQDEFAULT:"mqdefault",MAXRESDEFAULT:"maxresdefault"},this.defaultImageQuality=this.imageQualities.HQDEFAULT,this.mediaTypes={VIDEO:"video",PLAYLIST:"playlist",SHARE:"share",CHANNEL:"channel"}}O.prototype.parseVideoUrl=function(w){var A=w.match(/(?:(?:v|vi|be|videos|embed)\/(?!videoseries)|(?:v|ci)=)([\w-]{11})/i);return A?A[1]:void 0},O.prototype.parseChannelUrl=function(w){var A=w.match(/\/channel\/([\w-]+)/);if(A)return{id:A[1],mediaType:this.mediaTypes.CHANNEL};if(A=w.match(/\/(?:c|user)\/([\w-]+)/),A)return{name:A[1],mediaType:this.mediaTypes.CHANNEL}},O.prototype.parseParameters=function(w,A){return(w.start||w.t)&&(w.start=ie(w.start||w.t),delete w.t),w.v===A.id&&delete w.v,w.list===A.id&&delete w.list,w},O.prototype.parseMediaType=function(w){if(w.params.list&&(w.list=w.params.list,delete w.params.list),w.id&&!w.params.ci)w.mediaType=this.mediaTypes.VIDEO;else if(w.list)delete w.id,w.mediaType=this.mediaTypes.PLAYLIST;else if(w.params.ci)delete w.params.ci,w.mediaType=this.mediaTypes.SHARE;else return;return w},O.prototype.parse=function(w,A){var $=this.parseChannelUrl(w);if($)return $;var H={params:A,id:this.parseVideoUrl(w)};return H.params=this.parseParameters(A,H),H=this.parseMediaType(H),H},O.prototype.createShortUrl=function(w,A){if(!(!w.id||w.mediaType!==this.mediaTypes.VIDEO)){var $="https://youtu.be/"+w.id;return A.start&&($+="#t="+A.start),$}},O.prototype.createLongUrl=function(w,A){var $="",H=A.start;if(delete A.start,w.mediaType===this.mediaTypes.CHANNEL)if(w.id)$+="https://www.youtube.com/channel/"+w.id;else if(w.name)$+="https://www.youtube.com/c/"+w.name;else return;else if(w.mediaType===this.mediaTypes.PLAYLIST&&w.list)A.feature="share",$+="https://www.youtube.com/playlist";else if(w.mediaType===this.mediaTypes.VIDEO&&w.id)A.v=w.id,$+="https://www.youtube.com/watch";else if(w.mediaType===this.mediaTypes.SHARE&&w.id)A.ci=w.id,$+="https://www.youtube.com/shared";else return;return w.list&&(A.list=w.list),$+=ae(A),w.mediaType!==this.mediaTypes.PLAYLIST&&H&&($+="#t="+H),$},O.prototype.createEmbedUrl=function(w,A){var $="https://www.youtube.com/embed";if(w.mediaType===this.mediaTypes.PLAYLIST&&w.list)A.listType="playlist";else if(w.mediaType===this.mediaTypes.VIDEO&&w.id)$+="/"+w.id,A.loop==="1"&&(A.playlist=w.id);else return;return w.list&&(A.list=w.list),$+=ae(A),$},O.prototype.createImageUrl=function(w,A,$){if(!(!A.id||A.mediaType!==this.mediaTypes.VIDEO)){var H=w+A.id+"/",he=$.imageQuality||this.defaultImageQuality;return H+he+".jpg"}},O.prototype.createShortImageUrl=function(w,A){return this.createImageUrl("https://i.ytimg.com/vi/",w,A)},O.prototype.createLongImageUrl=function(w,A){return this.createImageUrl("https://img.youtube.com/vi/",w,A)},d.bind(new O);var J=a.combineParams,ue=a.getTime;function k(){this.provider="soundcloud",this.defaultFormat="long",this.formats={long:this.createLongUrl,embed:this.createEmbedUrl},this.mediaTypes={TRACK:"track",PLAYLIST:"playlist",APITRACK:"apitrack",APIPLAYLIST:"apiplaylist"}}k.prototype.parseUrl=function(w,A){var $=w.match(/(?:m\.)?soundcloud\.com\/(?:([\w-]+)\/(sets\/)?)([\w-]+)/i);return $&&(A.channel=$[1],$[1]==="playlists"||$[2]?A.list=$[3]:A.id=$[3]),A},k.prototype.parseParameters=function(w){return w.t&&(w.start=ue(w.t),delete w.t),w},k.prototype.parseMediaType=function(w){return w.id&&(w.channel==="tracks"?(delete w.channel,delete w.params.url,w.mediaType=this.mediaTypes.APITRACK):w.mediaType=this.mediaTypes.TRACK),w.list&&(w.channel==="playlists"?(delete w.channel,delete w.params.url,w.mediaType=this.mediaTypes.APIPLAYLIST):w.mediaType=this.mediaTypes.PLAYLIST),w},k.prototype.parse=function(w,A){var $={};if($=this.parseUrl(w,$),$.params=this.parseParameters(A),$=this.parseMediaType($),!(!$.id&&!$.list))return $},k.prototype.createLongUrl=function(w,A){var $="",H=A.start;if(delete A.start,w.mediaType===this.mediaTypes.TRACK&&w.id&&w.channel)$="https://soundcloud.com/"+w.channel+"/"+w.id;else if(w.mediaType===this.mediaTypes.PLAYLIST&&w.list&&w.channel)$="https://soundcloud.com/"+w.channel+"/sets/"+w.list;else if(w.mediaType===this.mediaTypes.APITRACK&&w.id)$="https://api.soundcloud.com/tracks/"+w.id;else if(w.mediaType===this.mediaTypes.APIPLAYLIST&&w.list)$="https://api.soundcloud.com/playlists/"+w.list;else return;return $+=J(A),H&&($+="#t="+H),$},k.prototype.createEmbedUrl=function(w,A){var $="https://w.soundcloud.com/player/";if(delete A.start,w.mediaType===this.mediaTypes.APITRACK&&w.id)A.url="https%3A//api.soundcloud.com/tracks/"+w.id;else if(w.mediaType===this.mediaTypes.APIPLAYLIST&&w.list)A.url="https%3A//api.soundcloud.com/playlists/"+w.list;else return;return $+=J(A),$},d.bind(new k);var be=a.combineParams;function Oe(){this.provider="teachertube",this.alternatives=[],this.defaultFormat="long",this.formats={long:this.createLongUrl,embed:this.createEmbedUrl},this.mediaTypes={VIDEO:"video",AUDIO:"audio",DOCUMENT:"document",CHANNEL:"channel",COLLECTION:"collection",GROUP:"group"}}Oe.prototype.parse=function(w,A){var $={};$.list=this.parsePlaylist(A),$.params=A;var H=w.match(/\/(audio|video|document|user\/channel|collection|group)\/(?:[\w-]+-)?(\w+)/);if(H)return $.mediaType=this.parseMediaType(H[1]),$.id=H[2],$},Oe.prototype.parsePlaylist=function(w){if(w["playlist-id"]){var A=w["playlist-id"];return delete w["playlist-id"],A}},Oe.prototype.parseMediaType=function(w){switch(w){case"audio":return this.mediaTypes.AUDIO;case"video":return this.mediaTypes.VIDEO;case"document":return this.mediaTypes.DOCUMENT;case"user/channel":return this.mediaTypes.CHANNEL;case"collection":return this.mediaTypes.COLLECTION;case"group":return this.mediaTypes.GROUP}},Oe.prototype.createLongUrl=function(w,A){if(w.id){var $="https://www.teachertube.com/";return w.list&&(A["playlist-id"]=w.list),w.mediaType===this.mediaTypes.CHANNEL?$+="user/channel/":$+=w.mediaType+"/",$+=w.id,$+=be(A),$}},Oe.prototype.createEmbedUrl=function(w,A){if(w.id){var $="https://www.teachertube.com/embed/";if(w.mediaType===this.mediaTypes.VIDEO||w.mediaType===this.mediaTypes.AUDIO)$+=w.mediaType+"/"+w.id;else return;return $+=be(A),$}},d.bind(new Oe);var Te=a.combineParams;function Ke(){this.provider="tiktok",this.defaultFormat="long",this.formats={long:this.createLongUrl},this.mediaTypes={VIDEO:"video"}}Ke.prototype.parse=function(w,A){var $={params:A,mediaType:this.mediaTypes.VIDEO},H=w.match(/@([^/]+)\/video\/(\d{19})/);if(H)return $.channel=H[1],$.id=H[2],$},Ke.prototype.createLongUrl=function(w,A){var $="";if(w.mediaType===this.mediaTypes.VIDEO&&w.id&&w.channel)$+="https://www.tiktok.com/@".concat(w.channel,"/video/").concat(w.id);else return;return $+=Te(A),$},d.bind(new Ke);var je=a.combineParams;function G(){this.provider="ted",this.formats={long:this.createLongUrl,embed:this.createEmbedUrl},this.mediaTypes={VIDEO:"video",PLAYLIST:"playlist"}}G.prototype.parseUrl=function(w,A){var $=w.match(/\/(talks|playlists\/(\d+))\/([\w-]+)/i),H=$?$[1]:void 0;return H&&(A.channel=H.split("/")[0],A.id=$[3],A.channel==="playlists"&&(A.list=$[2])),A},G.prototype.parseMediaType=function(w){return w.id&&w.channel==="playlists"&&(delete w.channel,w.mediaType=this.mediaTypes.PLAYLIST),w.id&&w.channel==="talks"&&(delete w.channel,w.mediaType=this.mediaTypes.VIDEO),w},G.prototype.parse=function(w,A){var $={params:A};if($=this.parseUrl(w,$),$=this.parseMediaType($),!!$.id)return $},G.prototype.createLongUrl=function(w,A){var $="";if(w.mediaType===this.mediaTypes.VIDEO&&w.id)$+="https://ted.com/talks/"+w.id;else if(w.mediaType===this.mediaTypes.PLAYLIST&&w.id)$+="https://ted.com/playlists/"+w.list+"/"+w.id;else return;return $+=je(A),$},G.prototype.createEmbedUrl=function(w,A){var $="https://embed.ted.com/";if(w.mediaType===this.mediaTypes.PLAYLIST&&w.id)$+="playlists/"+w.list+"/"+w.id;else if(w.mediaType===this.mediaTypes.VIDEO&&w.id)$+="talks/"+w.id;else return;return $+=je(A),$},d.bind(new G);var ne=a.combineParams;function te(){this.provider="facebook",this.alternatives=[],this.defaultFormat="long",this.formats={long:this.createLongUrl,watch:this.createWatchUrl},this.mediaTypes={VIDEO:"video"}}te.prototype.parse=function(w,A){var $={params:A,mediaType:this.mediaTypes.VIDEO},H=w.match(/(?:\/(\d+))?\/videos(?:\/.*?)?\/(\d+)/i);if(H&&(H[1]&&($.pageId=H[1]),$.id=H[2]),A.v&&!$.id&&($.id=A.v,delete A.v,$.params=A),!!$.id)return $},te.prototype.createWatchUrl=function(w,A){var $="https://facebook.com/watch/";if(!(w.mediaType!==this.mediaTypes.VIDEO||!w.id))return A={v:w.id},$+=ne(A),$},te.prototype.createLongUrl=function(w,A){var $="https://facebook.com/";if(w.pageId)$+=w.pageId;else return;if(w.mediaType===this.mediaTypes.VIDEO&&w.id)$+="/videos/"+w.id;else return;return $+=ne(A),$},d.bind(new te);var ce=d;return ce}))});var Mee=_((yPt,Fee)=>{"use strict";var fHe=/["'&<>]/;Fee.exports=pHe;function pHe(e){var t=""+e,r=fHe.exec(t);if(!r)return t;var n,o="",i=0,a=0;for(i=r.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:n=""";break;case 38:n="&";break;case 39:n="'";break;case 60:n="<";break;case 62:n=">";break;default:continue}a!==i&&(o+=t.substring(a,i)),a=i+1,o+=n}return a!==i?o+t.substring(a,i):o}});var Yee=_((Ak,Dk)=>{"use strict";(function(e,t){typeof Ak=="object"&&typeof Dk<"u"?Dk.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.DOMPurify=t())})(Ak,(function(){"use strict";let{entries:e,setPrototypeOf:t,isFrozen:r,getPrototypeOf:n,getOwnPropertyDescriptor:o}=Object,{freeze:i,seal:a,create:s}=Object,{apply:l,construct:u}=typeof Reflect<"u"&&Reflect;i||(i=function(H){return H}),a||(a=function(H){return H}),l||(l=function(H,he,Ae){return H.apply(he,Ae)}),u||(u=function(H,he){return new H(...he)});let c=C(Array.prototype.forEach),f=C(Array.prototype.pop),d=C(Array.prototype.push),p=C(String.prototype.toLowerCase),v=C(String.prototype.toString),h=C(String.prototype.match),y=C(String.prototype.replace),g=C(String.prototype.indexOf),m=C(String.prototype.trim),b=C(RegExp.prototype.test),E=x(TypeError);function C($){return function(H){for(var he=arguments.length,Ae=new Array(he>1?he-1:0),Ye=1;Ye<he;Ye++)Ae[Ye-1]=arguments[Ye];return l($,H,Ae)}}function x($){return function(){for(var H=arguments.length,he=new Array(H),Ae=0;Ae<H;Ae++)he[Ae]=arguments[Ae];return u($,he)}}function P($,H){let he=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p;t&&t($,null);let Ae=H.length;for(;Ae--;){let Ye=H[Ae];if(typeof Ye=="string"){let At=he(Ye);At!==Ye&&(r(H)||(H[Ae]=At),Ye=At)}$[Ye]=!0}return $}function N($){let H=s(null);for(let[he,Ae]of e($))o($,he)!==void 0&&(H[he]=Ae);return H}function D($,H){for(;$!==null;){let Ae=o($,H);if(Ae){if(Ae.get)return C(Ae.get);if(typeof Ae.value=="function")return C(Ae.value)}$=n($)}function he(Ae){return console.warn("fallback value for",Ae),null}return he}let R=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),M=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),I=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),B=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),U=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),K=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),ae=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ie=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),O=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),J=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ue=a(/<%[\w\W]*|[\w\W]*%>/gm),k=a(/\${[\w\W]*}/gm),be=a(/^data-[\-\w.\u00B7-\uFFFF]/),Oe=a(/^aria-[\-\w]+$/),Te=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ke=a(/^(?:\w+script|data):/i),je=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G=a(/^html$/i);var ne=Object.freeze({__proto__:null,MUSTACHE_EXPR:J,ERB_EXPR:ue,TMPLIT_EXPR:k,DATA_ATTR:be,ARIA_ATTR:Oe,IS_ALLOWED_URI:Te,IS_SCRIPT_OR_DATA:Ke,ATTR_WHITESPACE:je,DOCTYPE_NAME:G});let te=function(){return typeof window>"u"?null:window},ce=function(H,he){if(typeof H!="object"||typeof H.createPolicy!="function")return null;let Ae=null,Ye="data-tt-policy-suffix";he&&he.hasAttribute(Ye)&&(Ae=he.getAttribute(Ye));let At="dompurify"+(Ae?"#"+Ae:"");try{return H.createPolicy(At,{createHTML(Dt){return Dt},createScriptURL(Dt){return Dt}})}catch{return console.warn("TrustedTypes policy "+At+" could not be created."),null}};function w(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:te(),H=Ve=>w(Ve);if(H.version="3.0.6",H.removed=[],!$||!$.document||$.document.nodeType!==9)return H.isSupported=!1,H;let{document:he}=$,Ae=he,Ye=Ae.currentScript,{DocumentFragment:At,HTMLTemplateElement:Dt,Node:lr,Element:fo,NodeFilter:Bo,NamedNodeMap:po=$.NamedNodeMap||$.MozNamedAttrMap,HTMLFormElement:ee,DOMParser:fe,trustedTypes:Ie}=$,Me=fo.prototype,Ct=D(Me,"cloneNode"),ln=D(Me,"nextSibling"),Fo=D(Me,"childNodes"),un=D(Me,"parentNode");if(typeof Dt=="function"){let Ve=he.createElement("template");Ve.content&&Ve.content.ownerDocument&&(he=Ve.content.ownerDocument)}let rr,mo="",{implementation:hr,createNodeIterator:vi,createDocumentFragment:yi,getElementsByTagName:Lie}=he,{importNode:Bie}=Ae,Wi={};H.isSupported=typeof e=="function"&&typeof un=="function"&&hr&&hr.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Vw,ERB_EXPR:Hw,TMPLIT_EXPR:Ww,DATA_ATTR:Fie,ARIA_ATTR:Mie,IS_SCRIPT_OR_DATA:$ie,ATTR_WHITESPACE:hI}=ne,{IS_ALLOWED_URI:vI}=ne,Br=null,yI=P({},[...R,...M,...I,...L,...K]),Fr=null,bI=P({},[...z,...ae,...ie,...O]),vr=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),gp=null,Gw=null,EI=!0,Kw=!0,xI=!1,wI=!0,pc=!1,Rl=!1,Yw=!1,Xw=!1,mc=!1,mv=!1,gv=!1,_I=!0,CI=!1,Uie="user-content-",Zw=!0,hp=!1,gc={},hc=null,SI=P({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),TI=null,PI=P({},["audio","video","img","source","image","track"]),Qw=null,AI=P({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),hv="http://www.w3.org/1998/Math/MathML",vv="http://www.w3.org/2000/svg",Pa="http://www.w3.org/1999/xhtml",vc=Pa,Jw=!1,e_=null,jie=P({},[hv,vv,Pa],v),Nl=null,qie=["application/xhtml+xml","text/html"],zie="text/html",Mr=null,yc=null,Vie=he.createElement("form"),DI=function(Y){return Y instanceof RegExp||Y instanceof Function},t_=function(){let Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(yc&&yc===Y)){if((!Y||typeof Y!="object")&&(Y={}),Y=N(Y),Nl=qie.indexOf(Y.PARSER_MEDIA_TYPE)===-1?Nl=zie:Nl=Y.PARSER_MEDIA_TYPE,Mr=Nl==="application/xhtml+xml"?v:p,Br="ALLOWED_TAGS"in Y?P({},Y.ALLOWED_TAGS,Mr):yI,Fr="ALLOWED_ATTR"in Y?P({},Y.ALLOWED_ATTR,Mr):bI,e_="ALLOWED_NAMESPACES"in Y?P({},Y.ALLOWED_NAMESPACES,v):jie,Qw="ADD_URI_SAFE_ATTR"in Y?P(N(AI),Y.ADD_URI_SAFE_ATTR,Mr):AI,TI="ADD_DATA_URI_TAGS"in Y?P(N(PI),Y.ADD_DATA_URI_TAGS,Mr):PI,hc="FORBID_CONTENTS"in Y?P({},Y.FORBID_CONTENTS,Mr):SI,gp="FORBID_TAGS"in Y?P({},Y.FORBID_TAGS,Mr):{},Gw="FORBID_ATTR"in Y?P({},Y.FORBID_ATTR,Mr):{},gc="USE_PROFILES"in Y?Y.USE_PROFILES:!1,EI=Y.ALLOW_ARIA_ATTR!==!1,Kw=Y.ALLOW_DATA_ATTR!==!1,xI=Y.ALLOW_UNKNOWN_PROTOCOLS||!1,wI=Y.ALLOW_SELF_CLOSE_IN_ATTR!==!1,pc=Y.SAFE_FOR_TEMPLATES||!1,Rl=Y.WHOLE_DOCUMENT||!1,mc=Y.RETURN_DOM||!1,mv=Y.RETURN_DOM_FRAGMENT||!1,gv=Y.RETURN_TRUSTED_TYPE||!1,Xw=Y.FORCE_BODY||!1,_I=Y.SANITIZE_DOM!==!1,CI=Y.SANITIZE_NAMED_PROPS||!1,Zw=Y.KEEP_CONTENT!==!1,hp=Y.IN_PLACE||!1,vI=Y.ALLOWED_URI_REGEXP||Te,vc=Y.NAMESPACE||Pa,vr=Y.CUSTOM_ELEMENT_HANDLING||{},Y.CUSTOM_ELEMENT_HANDLING&&DI(Y.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(vr.tagNameCheck=Y.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Y.CUSTOM_ELEMENT_HANDLING&&DI(Y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(vr.attributeNameCheck=Y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Y.CUSTOM_ELEMENT_HANDLING&&typeof Y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(vr.allowCustomizedBuiltInElements=Y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),pc&&(Kw=!1),mv&&(mc=!0),gc&&(Br=P({},[...K]),Fr=[],gc.html===!0&&(P(Br,R),P(Fr,z)),gc.svg===!0&&(P(Br,M),P(Fr,ae),P(Fr,O)),gc.svgFilters===!0&&(P(Br,I),P(Fr,ae),P(Fr,O)),gc.mathMl===!0&&(P(Br,L),P(Fr,ie),P(Fr,O))),Y.ADD_TAGS&&(Br===yI&&(Br=N(Br)),P(Br,Y.ADD_TAGS,Mr)),Y.ADD_ATTR&&(Fr===bI&&(Fr=N(Fr)),P(Fr,Y.ADD_ATTR,Mr)),Y.ADD_URI_SAFE_ATTR&&P(Qw,Y.ADD_URI_SAFE_ATTR,Mr),Y.FORBID_CONTENTS&&(hc===SI&&(hc=N(hc)),P(hc,Y.FORBID_CONTENTS,Mr)),Zw&&(Br["#text"]=!0),Rl&&P(Br,["html","head","body"]),Br.table&&(P(Br,["tbody"]),delete gp.tbody),Y.TRUSTED_TYPES_POLICY){if(typeof Y.TRUSTED_TYPES_POLICY.createHTML!="function")throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Y.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');rr=Y.TRUSTED_TYPES_POLICY,mo=rr.createHTML("")}else rr===void 0&&(rr=ce(Ie,Ye)),rr!==null&&typeof mo=="string"&&(mo=rr.createHTML(""));i&&i(Y),yc=Y}},kI=P({},["mi","mo","mn","ms","mtext"]),OI=P({},["foreignobject","desc","title","annotation-xml"]),Hie=P({},["title","style","font","a","script"]),yv=P({},M);P(yv,I),P(yv,B);let r_=P({},L);P(r_,U);let Wie=function(Y){let ye=un(Y);(!ye||!ye.tagName)&&(ye={namespaceURI:vc,tagName:"template"});let Le=p(Y.tagName),jt=p(ye.tagName);return e_[Y.namespaceURI]?Y.namespaceURI===vv?ye.namespaceURI===Pa?Le==="svg":ye.namespaceURI===hv?Le==="svg"&&(jt==="annotation-xml"||kI[jt]):!!yv[Le]:Y.namespaceURI===hv?ye.namespaceURI===Pa?Le==="math":ye.namespaceURI===vv?Le==="math"&&OI[jt]:!!r_[Le]:Y.namespaceURI===Pa?ye.namespaceURI===vv&&!OI[jt]||ye.namespaceURI===hv&&!kI[jt]?!1:!r_[Le]&&(Hie[Le]||!yv[Le]):!!(Nl==="application/xhtml+xml"&&e_[Y.namespaceURI]):!1},Ll=function(Y){d(H.removed,{element:Y});try{Y.parentNode.removeChild(Y)}catch{Y.remove()}},n_=function(Y,ye){try{d(H.removed,{attribute:ye.getAttributeNode(Y),from:ye})}catch{d(H.removed,{attribute:null,from:ye})}if(ye.removeAttribute(Y),Y==="is"&&!Fr[Y])if(mc||mv)try{Ll(ye)}catch{}else try{ye.setAttribute(Y,"")}catch{}},II=function(Y){let ye=null,Le=null;if(Xw)Y="<remove></remove>"+Y;else{let dn=h(Y,/^[\r\n\t ]+/);Le=dn&&dn[0]}Nl==="application/xhtml+xml"&&vc===Pa&&(Y='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Y+"</body></html>");let jt=rr?rr.createHTML(Y):Y;if(vc===Pa)try{ye=new fe().parseFromString(jt,Nl)}catch{}if(!ye||!ye.documentElement){ye=hr.createDocument(vc,"template",null);try{ye.documentElement.innerHTML=Jw?mo:jt}catch{}}let cn=ye.body||ye.documentElement;return Y&&Le&&cn.insertBefore(he.createTextNode(Le),cn.childNodes[0]||null),vc===Pa?Lie.call(ye,Rl?"html":"body")[0]:Rl?ye.documentElement:cn},RI=function(Y){return vi.call(Y.ownerDocument||Y,Y,Bo.SHOW_ELEMENT|Bo.SHOW_COMMENT|Bo.SHOW_TEXT,null)},Gie=function(Y){return Y instanceof ee&&(typeof Y.nodeName!="string"||typeof Y.textContent!="string"||typeof Y.removeChild!="function"||!(Y.attributes instanceof po)||typeof Y.removeAttribute!="function"||typeof Y.setAttribute!="function"||typeof Y.namespaceURI!="string"||typeof Y.insertBefore!="function"||typeof Y.hasChildNodes!="function")},NI=function(Y){return typeof lr=="function"&&Y instanceof lr},Aa=function(Y,ye,Le){Wi[Y]&&c(Wi[Y],jt=>{jt.call(H,ye,Le,yc)})},LI=function(Y){let ye=null;if(Aa("beforeSanitizeElements",Y,null),Gie(Y))return Ll(Y),!0;let Le=Mr(Y.nodeName);if(Aa("uponSanitizeElement",Y,{tagName:Le,allowedTags:Br}),Y.hasChildNodes()&&!NI(Y.firstElementChild)&&b(/<[/\w]/g,Y.innerHTML)&&b(/<[/\w]/g,Y.textContent))return Ll(Y),!0;if(!Br[Le]||gp[Le]){if(!gp[Le]&&FI(Le)&&(vr.tagNameCheck instanceof RegExp&&b(vr.tagNameCheck,Le)||vr.tagNameCheck instanceof Function&&vr.tagNameCheck(Le)))return!1;if(Zw&&!hc[Le]){let jt=un(Y)||Y.parentNode,cn=Fo(Y)||Y.childNodes;if(cn&&jt){let dn=cn.length;for(let Hn=dn-1;Hn>=0;--Hn)jt.insertBefore(Ct(cn[Hn],!0),ln(Y))}}return Ll(Y),!0}return Y instanceof fo&&!Wie(Y)||(Le==="noscript"||Le==="noembed"||Le==="noframes")&&b(/<\/no(script|embed|frames)/i,Y.innerHTML)?(Ll(Y),!0):(pc&&Y.nodeType===3&&(ye=Y.textContent,c([Vw,Hw,Ww],jt=>{ye=y(ye,jt," ")}),Y.textContent!==ye&&(d(H.removed,{element:Y.cloneNode()}),Y.textContent=ye)),Aa("afterSanitizeElements",Y,null),!1)},BI=function(Y,ye,Le){if(_I&&(ye==="id"||ye==="name")&&(Le in he||Le in Vie))return!1;if(!(Kw&&!Gw[ye]&&b(Fie,ye))){if(!(EI&&b(Mie,ye))){if(!Fr[ye]||Gw[ye]){if(!(FI(Y)&&(vr.tagNameCheck instanceof RegExp&&b(vr.tagNameCheck,Y)||vr.tagNameCheck instanceof Function&&vr.tagNameCheck(Y))&&(vr.attributeNameCheck instanceof RegExp&&b(vr.attributeNameCheck,ye)||vr.attributeNameCheck instanceof Function&&vr.attributeNameCheck(ye))||ye==="is"&&vr.allowCustomizedBuiltInElements&&(vr.tagNameCheck instanceof RegExp&&b(vr.tagNameCheck,Le)||vr.tagNameCheck instanceof Function&&vr.tagNameCheck(Le))))return!1}else if(!Qw[ye]){if(!b(vI,y(Le,hI,""))){if(!((ye==="src"||ye==="xlink:href"||ye==="href")&&Y!=="script"&&g(Le,"data:")===0&&TI[Y])){if(!(xI&&!b($ie,y(Le,hI,"")))){if(Le)return!1}}}}}}return!0},FI=function(Y){return Y.indexOf("-")>0},MI=function(Y){Aa("beforeSanitizeAttributes",Y,null);let{attributes:ye}=Y;if(!ye)return;let Le={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Fr},jt=ye.length;for(;jt--;){let cn=ye[jt],{name:dn,namespaceURI:Hn,value:Bl}=cn,vp=Mr(dn),Wn=dn==="value"?Bl:m(Bl);if(Le.attrName=vp,Le.attrValue=Wn,Le.keepAttr=!0,Le.forceKeepAttr=void 0,Aa("uponSanitizeAttribute",Y,Le),Wn=Le.attrValue,Le.forceKeepAttr||(n_(dn,Y),!Le.keepAttr))continue;if(!wI&&b(/\/>/i,Wn)){n_(dn,Y);continue}pc&&c([Vw,Hw,Ww],UI=>{Wn=y(Wn,UI," ")});let $I=Mr(Y.nodeName);if(BI($I,vp,Wn)){if(CI&&(vp==="id"||vp==="name")&&(n_(dn,Y),Wn=Uie+Wn),rr&&typeof Ie=="object"&&typeof Ie.getAttributeType=="function"&&!Hn)switch(Ie.getAttributeType($I,vp)){case"TrustedHTML":{Wn=rr.createHTML(Wn);break}case"TrustedScriptURL":{Wn=rr.createScriptURL(Wn);break}}try{Hn?Y.setAttributeNS(Hn,dn,Wn):Y.setAttribute(dn,Wn),f(H.removed)}catch{}}}Aa("afterSanitizeAttributes",Y,null)},Kie=function Ve(Y){let ye=null,Le=RI(Y);for(Aa("beforeSanitizeShadowDOM",Y,null);ye=Le.nextNode();)Aa("uponSanitizeShadowNode",ye,null),!LI(ye)&&(ye.content instanceof At&&Ve(ye.content),MI(ye));Aa("afterSanitizeShadowDOM",Y,null)};return H.sanitize=function(Ve){let Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ye=null,Le=null,jt=null,cn=null;if(Jw=!Ve,Jw&&(Ve="<!-->"),typeof Ve!="string"&&!NI(Ve))if(typeof Ve.toString=="function"){if(Ve=Ve.toString(),typeof Ve!="string")throw E("dirty is not a string, aborting")}else throw E("toString is not a function");if(!H.isSupported)return Ve;if(Yw||t_(Y),H.removed=[],typeof Ve=="string"&&(hp=!1),hp){if(Ve.nodeName){let Bl=Mr(Ve.nodeName);if(!Br[Bl]||gp[Bl])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(Ve instanceof lr)ye=II("<!---->"),Le=ye.ownerDocument.importNode(Ve,!0),Le.nodeType===1&&Le.nodeName==="BODY"||Le.nodeName==="HTML"?ye=Le:ye.appendChild(Le);else{if(!mc&&!pc&&!Rl&&Ve.indexOf("<")===-1)return rr&&gv?rr.createHTML(Ve):Ve;if(ye=II(Ve),!ye)return mc?null:gv?mo:""}ye&&Xw&&Ll(ye.firstChild);let dn=RI(hp?Ve:ye);for(;jt=dn.nextNode();)LI(jt)||(jt.content instanceof At&&Kie(jt.content),MI(jt));if(hp)return Ve;if(mc){if(mv)for(cn=yi.call(ye.ownerDocument);ye.firstChild;)cn.appendChild(ye.firstChild);else cn=ye;return(Fr.shadowroot||Fr.shadowrootmode)&&(cn=Bie.call(Ae,cn,!0)),cn}let Hn=Rl?ye.outerHTML:ye.innerHTML;return Rl&&Br["!doctype"]&&ye.ownerDocument&&ye.ownerDocument.doctype&&ye.ownerDocument.doctype.name&&b(G,ye.ownerDocument.doctype.name)&&(Hn="<!DOCTYPE "+ye.ownerDocument.doctype.name+`>
|
|
11
|
-
`+Hn),pc&&c([Vw,Hw,Ww],Bl=>{Hn=y(Hn,Bl," ")}),rr&&gv?rr.createHTML(Hn):Hn},H.setConfig=function(){let Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t_(Ve),Yw=!0},H.clearConfig=function(){yc=null,Yw=!1},H.isValidAttribute=function(Ve,Y,ye){yc||t_({});let Le=Mr(Ve),jt=Mr(Y);return BI(Le,jt,ye)},H.addHook=function(Ve,Y){typeof Y=="function"&&(Wi[Ve]=Wi[Ve]||[],d(Wi[Ve],Y))},H.removeHook=function(Ve){if(Wi[Ve])return f(Wi[Ve])},H.removeHooks=function(Ve){Wi[Ve]&&(Wi[Ve]=[])},H.removeAllHooks=function(){Wi={}},H}var A=w();return A}))});var iv={};jI(iv,{__addDisposableResource:()=>boe,__assign:()=>yw,__asyncDelegator:()=>doe,__asyncGenerator:()=>coe,__asyncValues:()=>foe,__await:()=>sp,__awaiter:()=>ooe,__classPrivateFieldGet:()=>hoe,__classPrivateFieldIn:()=>yoe,__classPrivateFieldSet:()=>voe,__createBinding:()=>Ew,__decorate:()=>toe,__disposeResources:()=>Eoe,__esDecorate:()=>dXe,__exportStar:()=>aoe,__extends:()=>Jne,__generator:()=>ioe,__importDefault:()=>goe,__importStar:()=>moe,__makeTemplateObject:()=>poe,__metadata:()=>noe,__param:()=>roe,__propKey:()=>pXe,__read:()=>DO,__rest:()=>eoe,__runInitializers:()=>fXe,__setFunctionName:()=>mXe,__spread:()=>soe,__spreadArray:()=>uoe,__spreadArrays:()=>loe,__values:()=>bw,default:()=>vXe});function Jne(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");AO(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function eoe(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function toe(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function roe(e,t){return function(r,n){t(r,n,e)}}function dXe(e,t,r,n,o,i){function a(g){if(g!==void 0&&typeof g!="function")throw new TypeError("Function expected");return g}for(var s=n.kind,l=s==="getter"?"get":s==="setter"?"set":"value",u=!t&&e?n.static?e:e.prototype:null,c=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f,d=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]=h==="access"?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(g){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(g||null))};var y=(0,r[p])(s==="accessor"?{get:c.get,set:c.set}:c[l],v);if(s==="accessor"){if(y===void 0)continue;if(y===null||typeof y!="object")throw new TypeError("Object expected");(f=a(y.get))&&(c.get=f),(f=a(y.set))&&(c.set=f),(f=a(y.init))&&o.unshift(f)}else(f=a(y))&&(s==="field"?o.unshift(f):c[l]=f)}u&&Object.defineProperty(u,n.name,c),d=!0}function fXe(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function pXe(e){return typeof e=="symbol"?e:"".concat(e)}function mXe(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function noe(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function ooe(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(c){try{u(n.next(c))}catch(f){a(f)}}function l(c){try{u(n.throw(c))}catch(f){a(f)}}function u(c){c.done?i(c.value):o(c.value).then(s,l)}u((n=n.apply(e,t||[])).next())})}function ioe(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(r=0)),r;)try{if(n=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;switch(o=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,o=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(c){u=[6,c],o=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function aoe(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Ew(t,e,r)}function bw(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function DO(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function soe(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(DO(arguments[t]));return e}function loe(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}function uoe(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function sp(e){return this instanceof sp?(this.v=e,this):new sp(e)}function coe(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,i=[];return o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o;function a(d){n[d]&&(o[d]=function(p){return new Promise(function(v,h){i.push([d,p,v,h])>1||s(d,p)})})}function s(d,p){try{l(n[d](p))}catch(v){f(i[0][3],v)}}function l(d){d.value instanceof sp?Promise.resolve(d.value.v).then(u,c):f(i[0][2],d)}function u(d){s("next",d)}function c(d){s("throw",d)}function f(d,p){d(p),i.shift(),i.length&&s(i[0][0],i[0][1])}}function doe(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=e[o]?function(a){return(r=!r)?{value:sp(e[o](a)),done:!1}:i?i(a):a}:i}}function foe(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof bw=="function"?bw(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(a){return new Promise(function(s,l){a=e[i](a),o(s,l,a.done,a.value)})}}function o(i,a,s,l){Promise.resolve(l).then(function(u){i({value:u,done:s})},a)}}function poe(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function moe(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Ew(t,e,r);return gXe(t,e),t}function goe(e){return e&&e.__esModule?e:{default:e}}function hoe(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function voe(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r}function yoe(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function boe(e,t,r){if(t!=null){if(typeof t!="object")throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if(typeof n!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function Eoe(e){function t(n){e.error=e.hasError?new hXe(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,function(i){return t(i),r()})}catch(i){t(i)}}if(e.hasError)throw e.error}return r()}var AO,yw,Ew,gXe,hXe,vXe,av=eae(()=>{"use strict";AO=function(e,t){return AO=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},AO(e,t)};yw=function(){return yw=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},yw.apply(this,arguments)};Ew=Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});gXe=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t};hXe=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};vXe={__extends:Jne,__assign:yw,__rest:eoe,__decorate:toe,__param:roe,__metadata:noe,__awaiter:ooe,__generator:ioe,__createBinding:Ew,__exportStar:aoe,__values:bw,__read:DO,__spread:soe,__spreadArrays:loe,__spreadArray:uoe,__await:sp,__asyncGenerator:coe,__asyncDelegator:doe,__asyncValues:foe,__makeTemplateObject:poe,__importStar:moe,__importDefault:goe,__classPrivateFieldGet:hoe,__classPrivateFieldSet:voe,__classPrivateFieldIn:yoe,__addDisposableResource:boe,__disposeResources:Eoe}});var lp=_(xw=>{"use strict";Object.defineProperty(xw,"__esModule",{value:!0});xw.WebmBase=void 0;var kO=class{constructor(t="Unknown",r=0){this.name=t,this.start=r}getType(){return"Unknown"}updateBySource(){}setSource(t){this.source=t,this.updateBySource()}updateByData(){}setData(t){this.data=t,this.updateByData()}getValue(){return this.data}setValue(t){this.setData(t)}};xw.WebmBase=kO});var _w=_(ww=>{"use strict";Object.defineProperty(ww,"__esModule",{value:!0});ww.SectionType=void 0;var xoe;(function(e){e.Container="Container",e.Uint="Uint",e.Int="Int",e.Float="Float",e.String="String",e.Date="Date",e.Binary="Binary"})(xoe||(ww.SectionType=xoe={}))});var OO=_(Cw=>{"use strict";Object.defineProperty(Cw,"__esModule",{value:!0});Cw.sections=void 0;var j=_w();Cw.sections={172351395:{name:"EBML",type:j.SectionType.Container},646:{name:"EBMLVersion",type:j.SectionType.Uint},759:{name:"EBMLReadVersion",type:j.SectionType.Uint},754:{name:"EBMLMaxIDLength",type:j.SectionType.Uint},755:{name:"EBMLMaxSizeLength",type:j.SectionType.Uint},642:{name:"DocType",type:j.SectionType.String},647:{name:"DocTypeVersion",type:j.SectionType.Uint},645:{name:"DocTypeReadVersion",type:j.SectionType.Uint},108:{name:"Void",type:j.SectionType.Binary},63:{name:"CRC-32",type:j.SectionType.Binary},190023271:{name:"SignatureSlot",type:j.SectionType.Container},16010:{name:"SignatureAlgo",type:j.SectionType.Uint},16026:{name:"SignatureHash",type:j.SectionType.Uint},16037:{name:"SignaturePublicKey",type:j.SectionType.Binary},16053:{name:"Signature",type:j.SectionType.Binary},15963:{name:"SignatureElements",type:j.SectionType.Container},15995:{name:"SignatureElementList",type:j.SectionType.Container},9522:{name:"SignedElement",type:j.SectionType.Binary},139690087:{name:"Segment",type:j.SectionType.Container},21863284:{name:"SeekHead",type:j.SectionType.Container},3515:{name:"Seek",type:j.SectionType.Container},5035:{name:"SeekID",type:j.SectionType.Binary},5036:{name:"SeekPosition",type:j.SectionType.Uint},88713574:{name:"Info",type:j.SectionType.Container},13220:{name:"SegmentUID",type:j.SectionType.Binary},13188:{name:"SegmentFilename",type:j.SectionType.String},1882403:{name:"PrevUID",type:j.SectionType.Binary},1868715:{name:"PrevFilename",type:j.SectionType.String},2013475:{name:"NextUID",type:j.SectionType.Binary},1999803:{name:"NextFilename",type:j.SectionType.String},1092:{name:"SegmentFamily",type:j.SectionType.Binary},10532:{name:"ChapterTranslate",type:j.SectionType.Container},10748:{name:"ChapterTranslateEditionUID",type:j.SectionType.Uint},10687:{name:"ChapterTranslateCodec",type:j.SectionType.Uint},10661:{name:"ChapterTranslateID",type:j.SectionType.Binary},710577:{name:"TimecodeScale",type:j.SectionType.Uint},1161:{name:"Duration",type:j.SectionType.Float},1121:{name:"DateUTC",type:j.SectionType.Date},15273:{name:"Title",type:j.SectionType.String},3456:{name:"MuxingApp",type:j.SectionType.String},5953:{name:"WritingApp",type:j.SectionType.String},103:{name:"Timecode",type:j.SectionType.Uint},6228:{name:"SilentTracks",type:j.SectionType.Container},6359:{name:"SilentTrackNumber",type:j.SectionType.Uint},39:{name:"Position",type:j.SectionType.Uint},43:{name:"PrevSize",type:j.SectionType.Uint},35:{name:"SimpleBlock",type:j.SectionType.Binary},32:{name:"BlockGroup",type:j.SectionType.Container},33:{name:"Block",type:j.SectionType.Binary},34:{name:"BlockVirtual",type:j.SectionType.Binary},13729:{name:"BlockAdditions",type:j.SectionType.Container},38:{name:"BlockMore",type:j.SectionType.Container},110:{name:"BlockAddID",type:j.SectionType.Uint},37:{name:"BlockAdditional",type:j.SectionType.Binary},27:{name:"BlockDuration",type:j.SectionType.Uint},122:{name:"ReferencePriority",type:j.SectionType.Uint},123:{name:"ReferenceBlock",type:j.SectionType.Int},125:{name:"ReferenceVirtual",type:j.SectionType.Int},36:{name:"CodecState",type:j.SectionType.Binary},13730:{name:"DiscardPadding",type:j.SectionType.Int},14:{name:"Slices",type:j.SectionType.Container},104:{name:"TimeSlice",type:j.SectionType.Container},76:{name:"LaceNumber",type:j.SectionType.Uint},77:{name:"FrameNumber",type:j.SectionType.Uint},75:{name:"BlockAdditionID",type:j.SectionType.Uint},78:{name:"Delay",type:j.SectionType.Uint},79:{name:"SliceDuration",type:j.SectionType.Uint},72:{name:"ReferenceFrame",type:j.SectionType.Container},73:{name:"ReferenceOffset",type:j.SectionType.Uint},74:{name:"ReferenceTimeCode",type:j.SectionType.Uint},47:{name:"EncryptedBlock",type:j.SectionType.Binary},106212971:{name:"Tracks",type:j.SectionType.Container},46:{name:"TrackEntry",type:j.SectionType.Container},87:{name:"TrackNumber",type:j.SectionType.Uint},13253:{name:"TrackUID",type:j.SectionType.Uint},3:{name:"TrackType",type:j.SectionType.Uint},57:{name:"FlagEnabled",type:j.SectionType.Uint},8:{name:"FlagDefault",type:j.SectionType.Uint},5546:{name:"FlagForced",type:j.SectionType.Uint},28:{name:"FlagLacing",type:j.SectionType.Uint},11751:{name:"MinCache",type:j.SectionType.Uint},11768:{name:"MaxCache",type:j.SectionType.Uint},254851:{name:"DefaultDuration",type:j.SectionType.Uint},216698:{name:"DefaultDecodedFieldDuration",type:j.SectionType.Uint},209231:{name:"TrackTimecodeScale",type:j.SectionType.Float},4991:{name:"TrackOffset",type:j.SectionType.Int},5614:{name:"MaxBlockAdditionID",type:j.SectionType.Uint},4974:{name:"Name",type:j.SectionType.String},177564:{name:"Language",type:j.SectionType.String},6:{name:"CodecID",type:j.SectionType.String},9122:{name:"CodecPrivate",type:j.SectionType.Binary},362120:{name:"CodecName",type:j.SectionType.String},13382:{name:"AttachmentLink",type:j.SectionType.Uint},1742487:{name:"CodecSettings",type:j.SectionType.String},1785920:{name:"CodecInfoURL",type:j.SectionType.String},438848:{name:"CodecDownloadURL",type:j.SectionType.String},42:{name:"CodecDecodeAll",type:j.SectionType.Uint},12203:{name:"TrackOverlay",type:j.SectionType.Uint},5802:{name:"CodecDelay",type:j.SectionType.Uint},5819:{name:"SeekPreRoll",type:j.SectionType.Uint},9764:{name:"TrackTranslate",type:j.SectionType.Container},9980:{name:"TrackTranslateEditionUID",type:j.SectionType.Uint},9919:{name:"TrackTranslateCodec",type:j.SectionType.Uint},9893:{name:"TrackTranslateTrackID",type:j.SectionType.Binary},96:{name:"Video",type:j.SectionType.Container},26:{name:"FlagInterlaced",type:j.SectionType.Uint},5048:{name:"StereoMode",type:j.SectionType.Uint},5056:{name:"AlphaMode",type:j.SectionType.Uint},5049:{name:"OldStereoMode",type:j.SectionType.Uint},48:{name:"PixelWidth",type:j.SectionType.Uint},58:{name:"PixelHeight",type:j.SectionType.Uint},5290:{name:"PixelCropBottom",type:j.SectionType.Uint},5307:{name:"PixelCropTop",type:j.SectionType.Uint},5324:{name:"PixelCropLeft",type:j.SectionType.Uint},5341:{name:"PixelCropRight",type:j.SectionType.Uint},5296:{name:"DisplayWidth",type:j.SectionType.Uint},5306:{name:"DisplayHeight",type:j.SectionType.Uint},5298:{name:"DisplayUnit",type:j.SectionType.Uint},5299:{name:"AspectRatioType",type:j.SectionType.Uint},963876:{name:"ColourSpace",type:j.SectionType.Binary},1029411:{name:"GammaValue",type:j.SectionType.Float},230371:{name:"FrameRate",type:j.SectionType.Float},97:{name:"Audio",type:j.SectionType.Container},53:{name:"SamplingFrequency",type:j.SectionType.Float},14517:{name:"OutputSamplingFrequency",type:j.SectionType.Float},31:{name:"Channels",type:j.SectionType.Uint},15739:{name:"ChannelPositions",type:j.SectionType.Binary},8804:{name:"BitDepth",type:j.SectionType.Uint},98:{name:"TrackOperation",type:j.SectionType.Container},99:{name:"TrackCombinePlanes",type:j.SectionType.Container},100:{name:"TrackPlane",type:j.SectionType.Container},101:{name:"TrackPlaneUID",type:j.SectionType.Uint},102:{name:"TrackPlaneType",type:j.SectionType.Uint},105:{name:"TrackJoinBlocks",type:j.SectionType.Container},109:{name:"TrackJoinUID",type:j.SectionType.Uint},64:{name:"TrickTrackUID",type:j.SectionType.Uint},65:{name:"TrickTrackSegmentUID",type:j.SectionType.Binary},70:{name:"TrickTrackFlag",type:j.SectionType.Uint},71:{name:"TrickMasterTrackUID",type:j.SectionType.Uint},68:{name:"TrickMasterTrackSegmentUID",type:j.SectionType.Binary},11648:{name:"ContentEncodings",type:j.SectionType.Container},8768:{name:"ContentEncoding",type:j.SectionType.Container},4145:{name:"ContentEncodingOrder",type:j.SectionType.Uint},4146:{name:"ContentEncodingScope",type:j.SectionType.Uint},4147:{name:"ContentEncodingType",type:j.SectionType.Uint},4148:{name:"ContentCompression",type:j.SectionType.Container},596:{name:"ContentCompAlgo",type:j.SectionType.Uint},597:{name:"ContentCompSettings",type:j.SectionType.Binary},4149:{name:"ContentEncryption",type:j.SectionType.Container},2017:{name:"ContentEncAlgo",type:j.SectionType.Uint},2018:{name:"ContentEncKeyID",type:j.SectionType.Binary},2019:{name:"ContentSignature",type:j.SectionType.Binary},2020:{name:"ContentSigKeyID",type:j.SectionType.Binary},2021:{name:"ContentSigAlgo",type:j.SectionType.Uint},2022:{name:"ContentSigHashAlgo",type:j.SectionType.Uint},206814059:{name:"Cues",type:j.SectionType.Container},59:{name:"CuePoint",type:j.SectionType.Container},51:{name:"CueTime",type:j.SectionType.Uint},55:{name:"CueTrackPositions",type:j.SectionType.Container},119:{name:"CueTrack",type:j.SectionType.Uint},113:{name:"CueClusterPosition",type:j.SectionType.Uint},112:{name:"CueRelativePosition",type:j.SectionType.Uint},50:{name:"CueDuration",type:j.SectionType.Uint},4984:{name:"CueBlockNumber",type:j.SectionType.Uint},106:{name:"CueCodecState",type:j.SectionType.Uint},91:{name:"CueReference",type:j.SectionType.Container},22:{name:"CueRefTime",type:j.SectionType.Uint},23:{name:"CueRefCluster",type:j.SectionType.Uint},4959:{name:"CueRefNumber",type:j.SectionType.Uint},107:{name:"CueRefCodecState",type:j.SectionType.Uint},155296873:{name:"Attachments",type:j.SectionType.Container},8615:{name:"AttachedFile",type:j.SectionType.Container},1662:{name:"FileDescription",type:j.SectionType.String},1646:{name:"FileName",type:j.SectionType.String},1632:{name:"FileMimeType",type:j.SectionType.String},1628:{name:"FileData",type:j.SectionType.Binary},1710:{name:"FileUID",type:j.SectionType.Uint},1653:{name:"FileReferral",type:j.SectionType.Binary},1633:{name:"FileUsedStartTime",type:j.SectionType.Uint},1634:{name:"FileUsedEndTime",type:j.SectionType.Uint},4433776:{name:"Chapters",type:j.SectionType.Container},1465:{name:"EditionEntry",type:j.SectionType.Container},1468:{name:"EditionUID",type:j.SectionType.Uint},1469:{name:"EditionFlagHidden",type:j.SectionType.Uint},1499:{name:"EditionFlagDefault",type:j.SectionType.Uint},1501:{name:"EditionFlagOrdered",type:j.SectionType.Uint},54:{name:"ChapterAtom",type:j.SectionType.Container},13252:{name:"ChapterUID",type:j.SectionType.Uint},5716:{name:"ChapterStringUID",type:j.SectionType.String},17:{name:"ChapterTimeStart",type:j.SectionType.Uint},18:{name:"ChapterTimeEnd",type:j.SectionType.Uint},24:{name:"ChapterFlagHidden",type:j.SectionType.Uint},1432:{name:"ChapterFlagEnabled",type:j.SectionType.Uint},11879:{name:"ChapterSegmentUID",type:j.SectionType.Binary},11964:{name:"ChapterSegmentEditionUID",type:j.SectionType.Uint},9155:{name:"ChapterPhysicalEquiv",type:j.SectionType.Uint},15:{name:"ChapterTrack",type:j.SectionType.Container},9:{name:"ChapterTrackNumber",type:j.SectionType.Uint},0:{name:"ChapterDisplay",type:j.SectionType.Container},5:{name:"ChapString",type:j.SectionType.String},892:{name:"ChapLanguage",type:j.SectionType.String},894:{name:"ChapCountry",type:j.SectionType.String},10564:{name:"ChapProcess",type:j.SectionType.Container},10581:{name:"ChapProcessCodecID",type:j.SectionType.Uint},1293:{name:"ChapProcessPrivate",type:j.SectionType.Binary},10513:{name:"ChapProcessCommand",type:j.SectionType.Container},10530:{name:"ChapProcessTime",type:j.SectionType.Uint},10547:{name:"ChapProcessData",type:j.SectionType.Binary},39109479:{name:"Tags",type:j.SectionType.Container},13171:{name:"Tag",type:j.SectionType.Container},9152:{name:"Targets",type:j.SectionType.Container},10442:{name:"TargetTypeValue",type:j.SectionType.Uint},9162:{name:"TargetType",type:j.SectionType.String},9157:{name:"TagTrackUID",type:j.SectionType.Uint},9161:{name:"TagEditionUID",type:j.SectionType.Uint},9156:{name:"TagChapterUID",type:j.SectionType.Uint},9158:{name:"TagAttachmentUID",type:j.SectionType.Uint},10184:{name:"SimpleTag",type:j.SectionType.Container},1443:{name:"TagName",type:j.SectionType.String},1146:{name:"TagLanguage",type:j.SectionType.String},1156:{name:"TagDefault",type:j.SectionType.Uint},1159:{name:"TagString",type:j.SectionType.String},1157:{name:"TagBinary",type:j.SectionType.Binary},5552:{name:"Colour",type:j.SectionType.Container},5553:{name:"MatrixCoefficients",type:j.SectionType.Uint},5554:{name:"BitsPerChannel",type:j.SectionType.Uint},5555:{name:"ChromaSubsamplingHorz",type:j.SectionType.Uint},5556:{name:"ChromaSubsamplingVert",type:j.SectionType.Uint},5557:{name:"CbSubsamplingHorz",type:j.SectionType.Uint},5558:{name:"CbSubsamplingVert",type:j.SectionType.Uint},5559:{name:"ChromaSitingHorz",type:j.SectionType.Uint},5560:{name:"ChromaSitingVert",type:j.SectionType.Uint},5561:{name:"Range",type:j.SectionType.Uint},5562:{name:"TransferCharacteristics",type:j.SectionType.Uint},5563:{name:"Primaries",type:j.SectionType.Uint},5564:{name:"MaxCLL",type:j.SectionType.Uint},5565:{name:"MaxFALL",type:j.SectionType.Uint}}});var RO=_(Sw=>{"use strict";Object.defineProperty(Sw,"__esModule",{value:!0});Sw.WebmUint=void 0;var yXe=lp();function woe(e){return e.length%2===1?"0"+e:e}var IO=class extends yXe.WebmBase{constructor(t,r=0){super(t,r)}getType(){return"Uint"}updateBySource(){this.data="";for(let t=0;t<this.source.length;t++){let r=this.source[t].toString(16);this.data+=woe(r)}}updateByData(){let t=this.data.length/2;this.source=new Uint8Array(t);for(let r=0;r<t;r++){let n=this.data.substring(r*2,r*2+2);this.source[r]=parseInt(n,16)}}getValue(){return parseInt(this.data,16)}setValue(t){this.setData(woe(t.toString(16)))}};Sw.WebmUint=IO});var LO=_(Tw=>{"use strict";Object.defineProperty(Tw,"__esModule",{value:!0});Tw.WebmFloat=void 0;var bXe=lp(),NO=class extends bXe.WebmBase{constructor(t,r=0){super(t,r)}getType(){return"Float"}getFloatArrayType(){return this.source&&this.source.length===4?Float32Array:Float64Array}updateBySource(){let t=this.source.reverse(),r=this.getFloatArrayType(),n=new r(t.buffer);this.data=n[0]}updateByData(){let t=this.getFloatArrayType(),r=new t([this.data]),n=new Uint8Array(r.buffer);this.source=n.reverse()}};Tw.WebmFloat=NO});var FO=_(Pw=>{"use strict";Object.defineProperty(Pw,"__esModule",{value:!0});Pw.WebmString=void 0;var EXe=lp(),BO=class extends EXe.WebmBase{constructor(t,r=0){super(t,r)}getType(){return"String"}updateBySource(){this.data=this.source}updateByData(){this.source=this.data}getValue(){let t="";return this.source.forEach(r=>{t+=String.fromCharCode(r)}),t}};Pw.WebmString=BO});var $O=_(Dw=>{"use strict";Object.defineProperty(Dw,"__esModule",{value:!0});Dw.WebmContainer=void 0;var _oe=lp(),xXe=OO(),Aw=_w(),wXe=RO(),_Xe=LO(),CXe=FO(),MO=class e extends _oe.WebmBase{constructor(t,r=!1,n=0){super(t,n),this.isInfinite=r,this.offset=0}getType(){return"Container"}readByte(){return this.source[this.offset++]}readUint(){let t=this.readByte(),r=8-t.toString(2).length,n=t-(1<<7-r);for(let o=0;o<r;o++)n<<=8,n|=this.readByte();return n}updateBySource(){var t;this.data=[];let r;for(this.offset=0;this.offset<this.source.length;this.offset=r){let n=this.offset,o=this.readUint(),{name:i,type:a}=(t=xXe.sections[o])!==null&&t!==void 0?t:{},s=this.readUint();r=this.source.length,s>=0&&(r=Math.min(this.offset+s,r));let l=this.source.slice(this.offset,r),u;switch(a){case Aw.SectionType.Container:u=new e(i,s<0,n);break;case Aw.SectionType.Uint:u=new wXe.WebmUint(i,n);break;case Aw.SectionType.Float:u=new _Xe.WebmFloat(i,n);break;case Aw.SectionType.String:u=new CXe.WebmString(i,n);break;default:u=new _oe.WebmBase(i,n);break}u.setSource(l),this.data.push({id:o,idHex:o.toString(16),data:u})}}writeUint(t,r=!1){let n;for(n=1;(t<0||t>=1<<7*n)&&n<8;n++);if(!r){for(let o=0;o<n;o++)this.source[this.offset+o]=t>>8*(n-1-o)&255;this.source[this.offset]&=(1<<8-n)-1,this.source[this.offset]|=1<<8-n}this.offset+=n}writeSections(t=!1){this.offset=0;for(let r=0;r<this.data.length;r++){let n=this.data[r],o=n.data.source,i=o.length;this.writeUint(n.id,t),this.writeUint(n.data instanceof e&&n.data.isInfinite?-1:i,t),t||this.source.set(o,this.offset),this.offset+=i}return this.offset}updateByData(){let t=this.writeSections(!0);this.source=new Uint8Array(t),this.writeSections()}getSectionById(t){for(let r=0;r<this.data.length;r++){let n=this.data[r];if(n.id===t)return n.data}return null}};Dw.WebmContainer=MO});var Coe=_(kw=>{"use strict";Object.defineProperty(kw,"__esModule",{value:!0});kw.WebmFile=void 0;var SXe=(av(),Ev(iv)),TXe=$O(),UO=class e extends TXe.WebmContainer{constructor(t){super("File"),this.setSource(t)}getType(){return"File"}toBlob(t="video/webm"){return new Blob([this.source.buffer],{type:t})}static blobToArray(t){return new Promise((r,n)=>{try{let o=new FileReader;o.onloadend=()=>{try{r(new Uint8Array(o.result))}catch(i){n(i)}},o.readAsArrayBuffer(t)}catch(o){n(o)}})}static fromBlob(t){return SXe.__awaiter(this,void 0,void 0,function*(){let r=yield e.blobToArray(t);return new e(r)})}};kw.WebmFile=UO});var Toe=_(Soe=>{"use strict";Object.defineProperty(Soe,"__esModule",{value:!0})});var jO=_(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});var Es=(av(),Ev(iv));Es.__exportStar(lp(),Vi);Es.__exportStar($O(),Vi);Es.__exportStar(Coe(),Vi);Es.__exportStar(LO(),Vi);Es.__exportStar(FO(),Vi);Es.__exportStar(RO(),Vi);Es.__exportStar(_w(),Vi);Es.__exportStar(Toe(),Vi);Es.__exportStar(OO(),Vi)});var qO=_(Ow=>{"use strict";Object.defineProperty(Ow,"__esModule",{value:!0});Ow.fixParsedWebmDuration=void 0;var PXe=jO(),AXe=(e,t,r={})=>{let n=r.logger;n===void 0?n=l=>console.debug(l):n||(n=()=>{});let o=e.getSectionById(139690087);if(!o)return n("[fix-webm-duration] Segment section is missing"),!1;let i=o.getSectionById(88713574);if(!i)return n("[fix-webm-duration] Info section is missing"),!1;let a=i.getSectionById(710577);if(!a)return n("[fix-webm-duration] TimecodeScale section is missing"),!1;let s=i.getSectionById(1161);if(s)if(s.getValue()<=0)n(`[fix-webm-duration] Duration section is present, but the value is ${s.getValue()}`),s.setValue(t);else return n(`[fix-webm-duration] Duration section is present, and the value is ${s.getValue()}`),!1;else n("[fix-webm-duration] Duration section is missing"),s=new PXe.WebmFloat("Duration"),s.setValue(t),i.data.push({id:1161,data:s});return a.setValue(1e6),i.updateByData(),o.updateByData(),e.updateByData(),!0};Ow.fixParsedWebmDuration=AXe});var Poe=_(Iw=>{"use strict";Object.defineProperty(Iw,"__esModule",{value:!0});Iw.fixWebmDuration=void 0;var DXe=(av(),Ev(iv)),kXe=jO(),OXe=qO(),IXe=(e,t,r)=>DXe.__awaiter(void 0,void 0,void 0,function*(){try{let n=yield kXe.WebmFile.fromBlob(e);if((0,OXe.fixParsedWebmDuration)(n,t,r))return n.toBlob(e.type)}catch{}return e});Iw.fixWebmDuration=IXe});var Doe=_(Rw=>{"use strict";Object.defineProperty(Rw,"__esModule",{value:!0});var Aoe=(av(),Ev(iv));Aoe.__exportStar(Poe(),Rw);Aoe.__exportStar(qO(),Rw)});function tae(e){return Object.keys(e).reduce((r,n)=>{let o=e[n];return r[n]=Object.assign({},o),HI(o.value)&&!aae(o.value)&&!Array.isArray(o.value)&&(r[n].value=Object.assign({},o.value)),Array.isArray(o.value)&&(r[n].value=o.value.slice(0)),r},{})}function rae(e){return e?Object.keys(e).reduce((r,n)=>{let o=e[n];return r[n]=HI(o)&&"value"in o?o:{value:o},r[n].attribute||(r[n].attribute=iae(n)),r[n].parse="parse"in r[n]?r[n].parse:typeof r[n].value!="string",r},{}):{}}function nae(e){return Object.keys(e).reduce((r,n)=>(r[n]=e[n].value,r),{})}function oae(e,t){let r=tae(t);return Object.keys(t).forEach(o=>{let i=r[o],a=e.getAttribute(i.attribute),s=e[o];a!=null&&(i.value=i.parse?VI(a):a),s!=null&&(i.value=Array.isArray(s)?s.slice(0):s),i.reflect&&zI(e,i.attribute,i.value,!!i.parse),Object.defineProperty(e,o,{get(){return i.value},set(l){let u=i.value;i.value=l,i.reflect&&zI(this,i.attribute,i.value,!!i.parse);for(let c=0,f=this.__propertyChangedCallbacks.length;c<f;c++)this.__propertyChangedCallbacks[c](o,l,u)},enumerable:!0,configurable:!0})}),r}function VI(e){if(e)try{return JSON.parse(e)}catch{return e}}function zI(e,t,r,n){if(r==null||r===!1)return e.removeAttribute(t);let o=n?JSON.stringify(r):r;e.__updating[t]=!0,o==="true"&&(o=""),e.setAttribute(t,o),Promise.resolve().then(()=>delete e.__updating[t])}function iae(e){return e.replace(/\.?([A-Z]+)/g,(t,r)=>"-"+r.toLowerCase()).replace("_","-").replace(/^-/,"")}function HI(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function aae(e){return Object.prototype.toString.call(e)==="[object Function]"}function sae(e){return typeof e=="function"&&e.toString().indexOf("class")===0}var o_;function lae(e,t){let r=Object.keys(t);return class extends e{static get observedAttributes(){return r.map(o=>t[o].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={};for(let o of r)this[o]=void 0}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=oae(this,t);let o=nae(this.props),i=this.Component,a=o_;try{o_=this,this.__initialized=!0,sae(i)?new i(o,{element:this}):i(o,{element:this})}finally{o_=a}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let o=null;for(;o=this.__releaseCallbacks.pop();)o(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(o,i,a){if(this.__initialized&&!this.__updating[o]&&(o=this.lookupProp(o),o in t)){if(a==null&&!this[o])return;this[o]=t[o].parse?VI(a):a}}lookupProp(o){if(t)return r.find(i=>o===i||o===t[i].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(o){this.__releaseCallbacks.push(o)}addPropertyChangedCallback(o){this.__propertyChangedCallbacks.push(o)}}}var YQe=Symbol("element-context");function WI(e,t={},r={}){let{BaseElement:n=HTMLElement,extension:o,customElements:i=window.customElements}=r;return a=>{if(!e)throw new Error("tag is required to register a Component");let s=i.get(e);return s?(s.prototype.Component=a,s):(s=lae(n,rae(t)),s.prototype.Component=a,s.prototype.registeredTag=e,i.define(e,s,o),s)}}var Et={context:void 0,registry:void 0};function s_(e){Et.context=e}function uae(){return{...Et.context,id:`${Et.context.id}${Et.context.count++}-`,count:0}}var cae=(e,t)=>e===t,Mo=Symbol("solid-proxy"),Ep=Symbol("solid-track"),ZI=Symbol("solid-dev-component"),wv={equals:cae},GI=null,QI=oR,$o=1,yp=2,JI={owned:null,cleanups:null,context:null,owner:null};var St=null,xe=null,xp=null,i_=null,Bt=null,Ar=null,fn=null,Sv=0,[ZQe,KI]=oe(!1);function Da(e,t){let r=Bt,n=St,o=e.length===0,i=o?JI:{owned:null,cleanups:null,context:null,owner:t===void 0?n:t},a=o?e:()=>e(()=>mr(()=>_s(i)));St=i,Bt=null;try{return bi(a,!0)}finally{Bt=r,St=n}}function oe(e,t){t=t?Object.assign({},wv,t):wv;let r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=o=>(typeof o=="function"&&(xe&&xe.running&&xe.sources.has(r)?o=o(r.tValue):o=o(r.value)),nR(r,o));return[rR.bind(r),n]}function le(e,t,r){let n=p_(e,t,!1,$o);xp&&xe&&xe.running?Ar.push(n):Cp(n)}function mt(e,t,r){QI=mae;let n=p_(e,t,!1,$o),o=l_&&Av(St,l_.id);o&&(n.suspense=o),(!r||!r.render)&&(n.user=!0),fn?fn.push(n):Cp(n)}function Ee(e,t,r){r=r?Object.assign({},wv,r):wv;let n=p_(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,xp&&xe&&xe.running?(n.tState=$o,Ar.push(n)):Cp(n),rR.bind(n)}function eR(e){return bi(e,!1)}function mr(e){if(Bt===null)return e();let t=Bt;Bt=null;try{return e()}finally{Bt=t}}function et(e){mt(()=>mr(e))}function dt(e){return St===null||(St.cleanups===null?St.cleanups=[e]:St.cleanups.push(e)),e}function f_(){return Bt}function bc(){return St}function tR(e,t){let r=St,n=Bt;St=e,Bt=null;try{return bi(t,!0)}catch(o){Pv(o)}finally{St=r,Bt=n}}function dae(e){if(xe&&xe.running)return e(),xe.done;let t=Bt,r=St;return Promise.resolve().then(()=>{Bt=t,St=r;let n;return(xp||l_)&&(n=xe||(xe={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),n.done||(n.done=new Promise(o=>n.resolve=o)),n.running=!0),bi(e,!1),Bt=St=null,n?n.done:void 0})}function wp(e,t){let r=Symbol("context");return{id:r,Provider:hae(r),defaultValue:e}}function Tv(e){let t;return(t=Av(St,e.id))!==void 0?t:e.defaultValue}function _p(e){let t=Ee(e),r=Ee(()=>u_(t()));return r.toArray=()=>{let n=r();return Array.isArray(n)?n:n!=null?[n]:[]},r}var l_;function rR(){let e=xe&&xe.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===$o)Cp(this);else{let t=Ar;Ar=null,bi(()=>_v(this),!1),Ar=t}if(Bt){let t=this.observers?this.observers.length:0;Bt.sources?(Bt.sources.push(this),Bt.sourceSlots.push(t)):(Bt.sources=[this],Bt.sourceSlots=[t]),this.observers?(this.observers.push(Bt),this.observerSlots.push(Bt.sources.length-1)):(this.observers=[Bt],this.observerSlots=[Bt.sources.length-1])}return e&&xe.sources.has(this)?this.tValue:this.value}function nR(e,t,r){let n=xe&&xe.running&&xe.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(n,t)){if(xe){let o=xe.running;(o||!r&&xe.sources.has(e))&&(xe.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&bi(()=>{for(let o=0;o<e.observers.length;o+=1){let i=e.observers[o],a=xe&&xe.running;a&&xe.disposed.has(i)||((a?!i.tState:!i.state)&&(i.pure?Ar.push(i):fn.push(i),i.observers&&iR(i)),a?i.tState=$o:i.state=$o)}if(Ar.length>1e6)throw Ar=[],new Error},!1)}return t}function Cp(e){if(!e.fn)return;_s(e);let t=St,r=Bt,n=Sv;Bt=St=e,YI(e,xe&&xe.running&&xe.sources.has(e)?e.tValue:e.value,n),xe&&!xe.running&&xe.sources.has(e)&&queueMicrotask(()=>{bi(()=>{xe&&(xe.running=!0),Bt=St=e,YI(e,e.tValue,n),Bt=St=null},!1)}),Bt=r,St=t}function YI(e,t,r){let n;try{n=e.fn(t)}catch(o){return e.pure&&(xe&&xe.running?(e.tState=$o,e.tOwned&&e.tOwned.forEach(_s),e.tOwned=void 0):(e.state=$o,e.owned&&e.owned.forEach(_s),e.owned=null)),e.updatedAt=r+1,Pv(o)}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?nR(e,n,!0):xe&&xe.running&&e.pure?(xe.sources.add(e),e.tValue=n):e.value=n,e.updatedAt=r)}function p_(e,t,r,n=$o,o){let i={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:St,context:null,pure:r};if(xe&&xe.running&&(i.state=0,i.tState=n),St===null||St!==JI&&(xe&&xe.running&&St.pure?St.tOwned?St.tOwned.push(i):St.tOwned=[i]:St.owned?St.owned.push(i):St.owned=[i]),i_){let[a,s]=oe(void 0,{equals:!1}),l=i_(i.fn,s);dt(()=>l.dispose());let u=()=>dae(s).then(()=>c.dispose()),c=i_(i.fn,u);i.fn=f=>(a(),xe&&xe.running?c.track(f):l.track(f))}return i}function bp(e){let t=xe&&xe.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===yp)return _v(e);if(e.suspense&&mr(e.suspense.inFallback))return e.suspense.effects.push(e);let r=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Sv);){if(t&&xe.disposed.has(e))return;(t?e.tState:e.state)&&r.push(e)}for(let n=r.length-1;n>=0;n--){if(e=r[n],t){let o=e,i=r[n+1];for(;(o=o.owner)&&o!==i;)if(xe.disposed.has(o))return}if((t?e.tState:e.state)===$o)Cp(e);else if((t?e.tState:e.state)===yp){let o=Ar;Ar=null,bi(()=>_v(e,r[0]),!1),Ar=o}}}function bi(e,t){if(Ar)return e();let r=!1;t||(Ar=[]),fn?r=!0:fn=[],Sv++;try{let n=e();return fae(r),n}catch(n){r||(fn=null),Ar=null,Pv(n)}}function fae(e){if(Ar&&(xp&&xe&&xe.running?pae(Ar):oR(Ar),Ar=null),e)return;let t;if(xe){if(!xe.promises.size&&!xe.queue.size){let n=xe.sources,o=xe.disposed;fn.push.apply(fn,xe.effects),t=xe.resolve;for(let i of fn)"tState"in i&&(i.state=i.tState),delete i.tState;xe=null,bi(()=>{for(let i of o)_s(i);for(let i of n){if(i.value=i.tValue,i.owned)for(let a=0,s=i.owned.length;a<s;a++)_s(i.owned[a]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}KI(!1)},!1)}else if(xe.running){xe.running=!1,xe.effects.push.apply(xe.effects,fn),fn=null,KI(!0);return}}let r=fn;fn=null,r.length&&bi(()=>QI(r),!1),t&&t()}function oR(e){for(let t=0;t<e.length;t++)bp(e[t])}function pae(e){for(let t=0;t<e.length;t++){let r=e[t],n=xe.queue;n.has(r)||(n.add(r),xp(()=>{n.delete(r),bi(()=>{xe.running=!0,bp(r)},!1),xe&&(xe.running=!1)}))}}function mae(e){let t,r=0;for(t=0;t<e.length;t++){let n=e[t];n.user?e[r++]=n:bp(n)}if(Et.context){if(Et.count){Et.effects||(Et.effects=[]),Et.effects.push(...e.slice(0,r));return}else Et.effects&&(e=[...Et.effects,...e],r+=Et.effects.length,delete Et.effects);s_()}for(t=0;t<r;t++)bp(e[t])}function _v(e,t){let r=xe&&xe.running;r?e.tState=0:e.state=0;for(let n=0;n<e.sources.length;n+=1){let o=e.sources[n];if(o.sources){let i=r?o.tState:o.state;i===$o?o!==t&&(!o.updatedAt||o.updatedAt<Sv)&&bp(o):i===yp&&_v(o,t)}}}function iR(e){let t=xe&&xe.running;for(let r=0;r<e.observers.length;r+=1){let n=e.observers[r];(t?!n.tState:!n.state)&&(t?n.tState=yp:n.state=yp,n.pure?Ar.push(n):fn.push(n),n.observers&&iR(n))}}function _s(e){let t;if(e.sources)for(;e.sources.length;){let r=e.sources.pop(),n=e.sourceSlots.pop(),o=r.observers;if(o&&o.length){let i=o.pop(),a=r.observerSlots.pop();n<o.length&&(i.sourceSlots[a]=n,o[n]=i,r.observerSlots[n]=a)}}if(xe&&xe.running&&e.pure){if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)_s(e.tOwned[t]);delete e.tOwned}aR(e,!0)}else if(e.owned){for(t=e.owned.length-1;t>=0;t--)_s(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}xe&&xe.running?e.tState=0:e.state=0,e.context=null}function aR(e,t){if(t||(e.tState=0,xe.disposed.add(e)),e.owned)for(let r=0;r<e.owned.length;r++)aR(e.owned[r])}function gae(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function XI(e,t,r){try{for(let n of t)n(e)}catch(n){Pv(n,r&&r.owner||null)}}function Pv(e,t=St){let r=GI&&Av(t,GI),n=gae(e);if(!r)throw n;fn?fn.push({fn(){XI(n,r,t)},state:$o}):XI(n,r,t)}function Av(e,t){return e?e.context&&e.context[t]!==void 0?e.context[t]:Av(e.owner,t):void 0}function u_(e){if(typeof e=="function"&&!e.length)return u_(e());if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let n=u_(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function hae(e,t){return function(n){let o;return le(()=>o=mr(()=>(St.context={[e]:n.value},_p(()=>n.children))),void 0),o}}var c_=Symbol("fallback");function Cv(e){for(let t=0;t<e.length;t++)e[t]()}function vae(e,t,r={}){let n=[],o=[],i=[],a=0,s=t.length>1?[]:null;return dt(()=>Cv(i)),()=>{let l=e()||[],u,c;return l[Ep],mr(()=>{let d=l.length,p,v,h,y,g,m,b,E,C;if(d===0)a!==0&&(Cv(i),i=[],n=[],o=[],a=0,s&&(s=[])),r.fallback&&(n=[c_],o[0]=Da(x=>(i[0]=x,r.fallback())),a=1);else if(a===0){for(o=new Array(d),c=0;c<d;c++)n[c]=l[c],o[c]=Da(f);a=d}else{for(h=new Array(d),y=new Array(d),s&&(g=new Array(d)),m=0,b=Math.min(a,d);m<b&&n[m]===l[m];m++);for(b=a-1,E=d-1;b>=m&&E>=m&&n[b]===l[E];b--,E--)h[E]=o[b],y[E]=i[b],s&&(g[E]=s[b]);for(p=new Map,v=new Array(E+1),c=E;c>=m;c--)C=l[c],u=p.get(C),v[c]=u===void 0?-1:u,p.set(C,c);for(u=m;u<=b;u++)C=n[u],c=p.get(C),c!==void 0&&c!==-1?(h[c]=o[u],y[c]=i[u],s&&(g[c]=s[u]),c=v[c],p.set(C,c)):i[u]();for(c=m;c<d;c++)c in h?(o[c]=h[c],i[c]=y[c],s&&(s[c]=g[c],s[c](c))):o[c]=Da(f);o=o.slice(0,a=d),n=l.slice(0)}return o});function f(d){if(i[c]=d,s){let[p,v]=oe(c);return s[c]=v,t(l[c],p)}return t(l[c])}}}function yae(e,t,r={}){let n=[],o=[],i=[],a=[],s=0,l;return dt(()=>Cv(i)),()=>{let u=e()||[];return u[Ep],mr(()=>{if(u.length===0)return s!==0&&(Cv(i),i=[],n=[],o=[],s=0,a=[]),r.fallback&&(n=[c_],o[0]=Da(f=>(i[0]=f,r.fallback())),s=1),o;for(n[0]===c_&&(i[0](),i=[],n=[],o=[],s=0),l=0;l<u.length;l++)l<n.length&&n[l]!==u[l]?a[l](()=>u[l]):l>=n.length&&(o[l]=Da(c));for(;l<n.length;l++)i[l]();return s=a.length=i.length=u.length,n=u.slice(0),o=o.slice(0,s)});function c(f){i[l]=f;let[d,p]=oe(u[l]);return a[l]=p,t(d,l)}}}var bae=!1;function T(e,t){if(bae&&Et.context){let r=Et.context;s_(uae());let n=mr(()=>e(t||{}));return s_(r),n}return mr(()=>e(t||{}))}function xv(){return!0}var d_={get(e,t,r){return t===Mo?r:e.get(t)},has(e,t){return t===Mo?!0:e.has(t)},set:xv,deleteProperty:xv,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:xv,deleteProperty:xv}},ownKeys(e){return e.keys()}};function a_(e){return(e=typeof e=="function"?e():e)?e:{}}function Eae(){for(let e=0,t=this.length;e<t;++e){let r=this[e]();if(r!==void 0)return r}}function kt(...e){let t=!1;for(let i=0;i<e.length;i++){let a=e[i];t=t||!!a&&Mo in a,e[i]=typeof a=="function"?(t=!0,Ee(a)):a}if(t)return new Proxy({get(i){for(let a=e.length-1;a>=0;a--){let s=a_(e[a])[i];if(s!==void 0)return s}},has(i){for(let a=e.length-1;a>=0;a--)if(i in a_(e[a]))return!0;return!1},keys(){let i=[];for(let a=0;a<e.length;a++)i.push(...Object.keys(a_(e[a])));return[...new Set(i)]}},d_);let r={},n={},o=new Set;for(let i=e.length-1;i>=0;i--){let a=e[i];if(!a)continue;let s=Object.getOwnPropertyNames(a);for(let l=0,u=s.length;l<u;l++){let c=s[l];if(c==="__proto__"||c==="constructor")continue;let f=Object.getOwnPropertyDescriptor(a,c);if(!o.has(c))f.get?(o.add(c),Object.defineProperty(r,c,{enumerable:!0,configurable:!0,get:Eae.bind(n[c]=[f.get.bind(a)])})):(f.value!==void 0&&o.add(c),r[c]=f.value);else{let d=n[c];d?f.get?d.push(f.get.bind(a)):f.value!==void 0&&d.push(()=>f.value):r[c]===void 0&&(r[c]=f.value)}}}return r}function Dr(e,...t){if(Mo in e){let o=new Set(t.length>1?t.flat():t[0]),i=t.map(a=>new Proxy({get(s){return a.includes(s)?e[s]:void 0},has(s){return a.includes(s)&&s in e},keys(){return a.filter(s=>s in e)}},d_));return i.push(new Proxy({get(a){return o.has(a)?void 0:e[a]},has(a){return o.has(a)?!1:a in e},keys(){return Object.keys(e).filter(a=>!o.has(a))}},d_)),i}let r={},n=t.map(()=>({}));for(let o of Object.getOwnPropertyNames(e)){let i=Object.getOwnPropertyDescriptor(e,o),a=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable,s=!1,l=0;for(let u of t)u.includes(o)&&(s=!0,a?n[l][o]=i.value:Object.defineProperty(n[l],o,i)),++l;s||(a?r[o]=i.value:Object.defineProperty(r,o,i))}return[...n,r]}var xae=0;function Cs(){let e=Et.context;return e?`${e.id}${e.count++}`:`cl-${xae++}`}var sR=e=>`Stale read from <${e}>.`;function Mt(e){let t="fallback"in e&&{fallback:()=>e.fallback};return Ee(vae(()=>e.each,e.children,t||void 0))}function Dv(e){let t="fallback"in e&&{fallback:()=>e.fallback};return Ee(yae(()=>e.each,e.children,t||void 0))}function ve(e){let t=e.keyed,r=Ee(()=>e.when,void 0,{equals:(n,o)=>t?n===o:!n==!o});return Ee(()=>{let n=r();if(n){let o=e.children;return typeof o=="function"&&o.length>0?mr(()=>o(t?n:()=>{if(!mr(r))throw sR("Show");return e.when})):o}return e.fallback},void 0,void 0)}function $t(e){let t=!1,r=(i,a)=>i[0]===a[0]&&(t?i[1]===a[1]:!i[1]==!a[1])&&i[2]===a[2],n=_p(()=>e.children),o=Ee(()=>{let i=n();Array.isArray(i)||(i=[i]);for(let a=0;a<i.length;a++){let s=i[a].when;if(s)return t=!!i[a].keyed,[a,s,i[a]]}return[-1]},void 0,{equals:r});return Ee(()=>{let[i,a,s]=o();if(i<0)return e.fallback;let l=s.children;return typeof l=="function"&&l.length>0?mr(()=>l(t?a:()=>{if(mr(o)[0]!==i)throw sR("Match");return s.when})):l},void 0,void 0)}function $e(e){return e}var QQe=wp();var wae=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],_ae=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...wae]),Cae=new Set(["innerHTML","textContent","innerText","children"]),Sae=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Tae=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function Pae(e,t){let r=Tae[e];return typeof r=="object"?r[t]?r.$:void 0:r}var Aae=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Dae=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),kae={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Oae(e,t,r){let n=r.length,o=t.length,i=n,a=0,s=0,l=t[o-1].nextSibling,u=null;for(;a<o||s<i;){if(t[a]===r[s]){a++,s++;continue}for(;t[o-1]===r[i-1];)o--,i--;if(o===a){let c=i<n?s?r[s-1].nextSibling:r[i-s]:l;for(;s<i;)e.insertBefore(r[s++],c)}else if(i===s)for(;a<o;)(!u||!u.has(t[a]))&&t[a].remove(),a++;else if(t[a]===r[i-1]&&r[s]===t[o-1]){let c=t[--o].nextSibling;e.insertBefore(r[s++],t[a++].nextSibling),e.insertBefore(r[--i],c),t[o]=r[i]}else{if(!u){u=new Map;let f=s;for(;f<i;)u.set(r[f],f++)}let c=u.get(t[a]);if(c!=null)if(s<c&&c<i){let f=a,d=1,p;for(;++f<o&&f<i&&!((p=u.get(t[f]))==null||p!==c+d);)d++;if(d>c-s){let v=t[a];for(;s<c;)e.insertBefore(r[s++],v)}else e.replaceChild(r[s++],t[a++])}else a++;else t[a++].remove()}}}var lR="_$DX_DELEGATE";function V(e,t,r){let n,o=()=>{let a=document.createElement("template");return a.innerHTML=e,r?a.content.firstChild.firstChild:a.content.firstChild},i=t?()=>mr(()=>document.importNode(n||(n=o()),!0)):()=>(n||(n=o())).cloneNode(!0);return i.cloneNode=i,i}function Yr(e,t=window.document){let r=t[lR]||(t[lR]=new Set);for(let n=0,o=e.length;n<o;n++){let i=e[n];r.has(i)||(r.add(i),t.addEventListener(i,Mae))}}function qe(e,t,r){r==null?e.removeAttribute(t):e.setAttribute(t,r)}function Iae(e,t,r,n){n==null?e.removeAttributeNS(t,r):e.setAttributeNS(t,r,n)}function we(e,t){t==null?e.removeAttribute("class"):e.className=t}function g_(e,t,r,n){if(n)Array.isArray(r)?(e[`$$${t}`]=r[0],e[`$$${t}Data`]=r[1]):e[`$$${t}`]=r;else if(Array.isArray(r)){let o=r[0];e.addEventListener(t,r[0]=i=>o.call(e,r[1],i))}else e.addEventListener(t,r)}function Rae(e,t,r={}){let n=Object.keys(t||{}),o=Object.keys(r),i,a;for(i=0,a=o.length;i<a;i++){let s=o[i];!s||s==="undefined"||t[s]||(uR(e,s,!1),delete r[s])}for(i=0,a=n.length;i<a;i++){let s=n[i],l=!!t[s];!s||s==="undefined"||r[s]===l||!l||(uR(e,s,!0),r[s]=l)}return r}function Nae(e,t,r){if(!t)return r?qe(e,"style"):t;let n=e.style;if(typeof t=="string")return n.cssText=t;typeof r=="string"&&(n.cssText=r=void 0),r||(r={}),t||(t={});let o,i;for(i in r)t[i]==null&&n.removeProperty(i),delete r[i];for(i in t)o=t[i],o!==r[i]&&(n.setProperty(i,o),r[i]=o);return r}function yt(e,t={},r,n){let o={};return n||le(()=>o.children=xc(e,t.children,o.children)),le(()=>t.ref&&t.ref(e)),le(()=>Lae(e,t,r,!0,o,!0)),o}function lt(e,t,r){return mr(()=>e(t,r))}function W(e,t,r,n){if(r!==void 0&&!n&&(n=[]),typeof t!="function")return xc(e,t,n,r);le(o=>xc(e,t(),o,r),n)}function Lae(e,t,r,n,o={},i=!1){t||(t={});for(let a in o)if(!(a in t)){if(a==="children")continue;o[a]=cR(e,a,null,o[a],r,i)}for(let a in t){if(a==="children"){n||xc(e,t.children);continue}let s=t[a];o[a]=cR(e,a,s,o[a],r,i)}}function Bae(e){let t,r;if(!Et.context||!(t=Et.registry.get(r=$ae()))){if(Et.context&&console.warn("Unable to find DOM nodes for hydration key:",r),!e)throw new Error("Unrecoverable Hydration Mismatch. No template for key: "+r);return e()}return Et.completed&&Et.completed.add(t),Et.registry.delete(r),t}function Fae(e){return e.toLowerCase().replace(/-([a-z])/g,(t,r)=>r.toUpperCase())}function uR(e,t,r){let n=t.trim().split(/\s+/);for(let o=0,i=n.length;o<i;o++)e.classList.toggle(n[o],r)}function cR(e,t,r,n,o,i){let a,s,l,u,c;if(t==="style")return Nae(e,r,n);if(t==="classList")return Rae(e,r,n);if(r===n)return n;if(t==="ref")i||r(e);else if(t.slice(0,3)==="on:"){let f=t.slice(3);n&&e.removeEventListener(f,n),r&&e.addEventListener(f,r)}else if(t.slice(0,10)==="oncapture:"){let f=t.slice(10);n&&e.removeEventListener(f,n,!0),r&&e.addEventListener(f,r,!0)}else if(t.slice(0,2)==="on"){let f=t.slice(2).toLowerCase(),d=Aae.has(f);if(!d&&n){let p=Array.isArray(n)?n[0]:n;e.removeEventListener(f,p)}(d||r)&&(g_(e,f,r,d),d&&Yr([f]))}else if(t.slice(0,5)==="attr:")qe(e,t.slice(5),r);else if((c=t.slice(0,5)==="prop:")||(l=Cae.has(t))||!o&&((u=Pae(t,e.tagName))||(s=_ae.has(t)))||(a=e.nodeName.includes("-")))c&&(t=t.slice(5),s=!0),t==="class"||t==="className"?we(e,r):a&&!s&&!l?e[Fae(t)]=r:e[u||t]=r;else{let f=o&&t.indexOf(":")>-1&&kae[t.split(":")[0]];f?Iae(e,f,t,r):qe(e,Sae[t]||t,r)}return r}function Mae(e){let t=`$$${e.type}`,r=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==r&&Object.defineProperty(e,"target",{configurable:!0,value:r}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return r||document}}),Et.registry&&!Et.done&&(Et.done=_$HY.done=!0);r;){let n=r[t];if(n&&!r.disabled){let o=r[`${t}Data`];if(o!==void 0?n.call(r,o,e):n.call(r,e),e.cancelBubble)return}r=r._$host||r.parentNode||r.host}}function xc(e,t,r,n,o){if(Et.context){!r&&(r=[...e.childNodes]);let s=[];for(let l=0;l<r.length;l++){let u=r[l];u.nodeType===8&&u.data.slice(0,2)==="!$"?u.remove():s.push(u)}r=s}for(;typeof r=="function";)r=r();if(t===r)return r;let i=typeof t,a=n!==void 0;if(e=a&&r[0]&&r[0].parentNode||e,i==="string"||i==="number"){if(Et.context)return r;if(i==="number"&&(t=t.toString()),a){let s=r[0];s&&s.nodeType===3?s.data=t:s=document.createTextNode(t),r=Ec(e,r,n,s)}else r!==""&&typeof r=="string"?r=e.firstChild.data=t:r=e.textContent=t}else if(t==null||i==="boolean"){if(Et.context)return r;r=Ec(e,r,n)}else{if(i==="function")return le(()=>{let s=t();for(;typeof s=="function";)s=s();r=xc(e,s,r,n)}),()=>r;if(Array.isArray(t)){let s=[],l=r&&Array.isArray(r);if(m_(s,t,r,o))return le(()=>r=xc(e,s,r,n,!0)),()=>r;if(Et.context){if(!s.length)return r;for(let u=0;u<s.length;u++)if(s[u].parentNode)return r=s}if(s.length===0){if(r=Ec(e,r,n),a)return r}else l?r.length===0?dR(e,s,n):Oae(e,r,s):(r&&Ec(e),dR(e,s));r=s}else if(t.nodeType){if(Et.context&&t.parentNode)return r=a?[t]:t;if(Array.isArray(r)){if(a)return r=Ec(e,r,n,t);Ec(e,r,null,t)}else r==null||r===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);r=t}else console.warn("Unrecognized value. Skipped inserting",t)}return r}function m_(e,t,r,n){let o=!1;for(let i=0,a=t.length;i<a;i++){let s=t[i],l=r&&r[i],u;if(!(s==null||s===!0||s===!1))if((u=typeof s)=="object"&&s.nodeType)e.push(s);else if(Array.isArray(s))o=m_(e,s,l)||o;else if(u==="function")if(n){for(;typeof s=="function";)s=s();o=m_(e,Array.isArray(s)?s:[s],Array.isArray(l)?l:[l])||o}else e.push(s),o=!0;else{let c=String(s);l&&l.nodeType===3&&l.data===c?e.push(l):e.push(document.createTextNode(c))}}return o}function dR(e,t,r=null){for(let n=0,o=t.length;n<o;n++)e.insertBefore(t[n],r)}function Ec(e,t,r,n){if(r===void 0)return e.textContent="";let o=n||document.createTextNode("");if(t.length){let i=!1;for(let a=t.length-1;a>=0;a--){let s=t[a];if(o!==s){let l=s.parentNode===e;!i&&!a?l?e.replaceChild(o,s):e.insertBefore(o,r):l&&s.remove()}else i=!0}}else e.insertBefore(o,r);return[o]}function $ae(){let e=Et.context;return`${e.id}${e.count++}`}var Uae="http://www.w3.org/2000/svg";function fR(e,t=!1){return t?document.createElementNS(Uae,e):document.createElement(e)}function pR(e){let{useShadow:t}=e,r=document.createTextNode(""),n=()=>e.mount||document.body,o=bc(),i,a=!!Et.context;return mt(()=>{a&&(bc().user=a=!1),i||(i=tR(o,()=>Ee(()=>e.children)));let s=n();if(s instanceof HTMLHeadElement){let[l,u]=oe(!1),c=()=>u(!0);Da(f=>W(s,()=>l()?f():i(),null)),dt(c)}else{let l=fR(e.isSVG?"g":"div",e.isSVG),u=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return r.parentNode},configurable:!0}),W(u,i),s.appendChild(l),e.ref&&e.ref(l),dt(()=>s.removeChild(l))}},void 0,{render:!a}),r}function mR(e){let[t,r]=Dr(e,["component"]),n=Ee(()=>t.component);return Ee(()=>{let o=n();switch(typeof o){case"function":return Object.assign(o,{[ZI]:!0}),mr(()=>o(r));case"string":let i=Dae.has(o),a=Et.context?Bae():fR(o,i);return yt(a,r,i),a}})}function jae(e){let t=Object.keys(e),r={};for(let n=0;n<t.length;n++){let[o,i]=oe(e[t[n]]);Object.defineProperty(r,t[n],{get:o,set(a){i(()=>a)}})}return r}function qae(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function zae(e){return(t,r)=>{let{element:n}=r;return Da(o=>{let i=jae(t);n.addPropertyChangedCallback((s,l)=>i[s]=l),n.addReleaseCallback(()=>{n.renderRoot.textContent="",o()});let a=e(i,r);return W(n.renderRoot,a)},qae(n))}}function kv(e,t,r){return arguments.length===2&&(r=t,t={}),WI(e,t)(zae(r))}var Ov={bot:void 0,onNewBlock:void 0,onAnswer:void 0,onEnd:void 0,onInit:void 0,onNewLogs:void 0,isPreview:void 0,startFrom:void 0,prefilledVariables:void 0,resultId:void 0,sessionId:void 0},gR={...Ov,onClose:void 0,onOpen:void 0,theme:void 0,autoShowDelay:void 0,isOpen:void 0,defaultOpen:void 0},hR={...Ov,onClose:void 0,onOpen:void 0,theme:void 0,previewMessage:void 0,onPreviewMessageClick:void 0,autoShowDelay:void 0};var Fl={};var tt=e=>e!=null,ur=e=>e==null,Ei=e=>e==null||e==="",yr=e=>e!=null&&e!=="";var vR=e=>{e.split("</noscript>").forEach(r=>{let[n,o]=r.split("<noscript>"),i=document.createRange().createContextualFragment(n);if(document.head.append(i),ur(o))return;let a=document.createElement("noscript"),s=document.createRange().createContextualFragment(o);a.append(s),document.head.append(a)})};var Ss=e=>(e==null?void 0:e.startsWith("data:image/svg"))||(e==null?void 0:e.endsWith(".svg"));function yR(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=yR(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function nt(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=yR(e))&&(n&&(n+=" "),n+=t);return n}var Wt=nt;var Hae=V('<svg part="button-icon" viewBox="0 0 24 24"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z">'),Wae=V('<img part="button-icon" alt="Bubble button icon">'),bR=V('<span part="button-icon">'),Gae=V('<svg part="button-icon" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.601 8.39897C18.269 8.06702 17.7309 8.06702 17.3989 8.39897L12 13.7979L6.60099 8.39897C6.26904 8.06702 5.73086 8.06702 5.39891 8.39897C5.06696 8.73091 5.06696 9.2691 5.39891 9.60105L11.3989 15.601C11.7309 15.933 12.269 15.933 12.601 15.601L18.601 9.60105C18.9329 9.2691 18.9329 8.73091 18.601 8.39897Z">'),Kae=V('<img part="button-icon" alt="Bubble button close icon">'),Yae=V('<button part="button" aria-label="Open chatbot">'),Xae="#01a952",ER="#fff",Iv=e=>e.startsWith("http")||e.startsWith("data:image/svg+xml"),xR=e=>(()=>{let t=Yae();return t.$$click=()=>e.toggleBot(),t.style.setProperty("z-index","42424242"),W(t,T(ve,{get when(){return ur(e.customIconSrc)},keyed:!0,get children(){let r=Hae();return le(n=>{let o=e.iconColor??ER,i=nt("stroke-2 fill-transparent absolute duration-200 transition w-[60%]",e.isBotOpened?"scale-0 opacity-0":"scale-100 opacity-100");return o!==n._v$&&((n._v$=o)!=null?r.style.setProperty("stroke",o):r.style.removeProperty("stroke")),i!==n._v$2&&qe(r,"class",n._v$2=i),n},{_v$:void 0,_v$2:void 0}),r}}),null),W(t,T(ve,{get when(){return Ee(()=>!!e.customIconSrc)()&&Iv(e.customIconSrc)},get children(){let r=Wae();return le(n=>{let o=e.customIconSrc,i=nt("duration-200 transition",e.isBotOpened?"scale-0 opacity-0":"scale-100 opacity-100",Ss(e.customIconSrc)?"w-[60%]":"w-full h-full",Ss(e.customIconSrc)?"":"object-cover rounded-full");return o!==n._v$3&&qe(r,"src",n._v$3=o),i!==n._v$4&&we(r,n._v$4=i),n},{_v$3:void 0,_v$4:void 0}),r}}),null),W(t,T(ve,{get when(){return Ee(()=>!!e.customIconSrc)()&&!Iv(e.customIconSrc)},get children(){let r=bR();return r.style.setProperty("font-family","-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'"),W(r,()=>e.customIconSrc),le(()=>we(r,nt("text-4xl duration-200 transition",e.isBotOpened?"scale-0 opacity-0":"scale-100 opacity-100"))),r}}),null),W(t,T(ve,{get when(){return ur(e.customCloseIconSrc)},get children(){let r=Gae();return le(n=>{let o=e.iconColor??ER,i=nt("absolute duration-200 transition w-[60%]",e.isBotOpened?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-180 opacity-0");return o!==n._v$5&&((n._v$5=o)!=null?r.style.setProperty("fill",o):r.style.removeProperty("fill")),i!==n._v$6&&qe(r,"class",n._v$6=i),n},{_v$5:void 0,_v$6:void 0}),r}}),null),W(t,T(ve,{get when(){return Ee(()=>!!e.customCloseIconSrc)()&&Iv(e.customCloseIconSrc)},get children(){let r=Kae();return le(n=>{let o=e.customCloseIconSrc,i=nt("absolute duration-200 transition",e.isBotOpened?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-180 opacity-0",Ss(e.customCloseIconSrc)?"w-[60%]":"w-full h-full",Ss(e.customCloseIconSrc)?"":"object-cover rounded-full");return o!==n._v$7&&qe(r,"src",n._v$7=o),i!==n._v$8&&we(r,n._v$8=i),n},{_v$7:void 0,_v$8:void 0}),r}}),null),W(t,T(ve,{get when(){return Ee(()=>!!e.customCloseIconSrc)()&&!Iv(e.customCloseIconSrc)},get children(){let r=bR();return r.style.setProperty("font-family","-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'"),W(r,()=>e.customCloseIconSrc),le(()=>we(r,nt("absolute text-4xl duration-200 transition",e.isBotOpened?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-180 opacity-0"))),r}}),null),le(r=>{let n=nt("fixed bottom-5 shadow-md rounded-full hover:scale-110 active:scale-95 transition-transform duration-200 flex justify-center items-center animate-fade-in",e.placement==="left"?" left-5":" right-5"),o=e.backgroundColor??Xae,i=e.buttonSize,a=e.buttonSize;return n!==r._v$9&&we(t,r._v$9=n),o!==r._v$0&&((r._v$0=o)!=null?t.style.setProperty("background-color",o):t.style.removeProperty("background-color")),i!==r._v$1&&((r._v$1=i)!=null?t.style.setProperty("width",i):t.style.removeProperty("width")),a!==r._v$10&&((r._v$10=a)!=null?t.style.setProperty("height",a):t.style.removeProperty("height")),r},{_v$9:void 0,_v$0:void 0,_v$1:void 0,_v$10:void 0}),t})();Yr(["click"]);var Zae=V('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2px" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18">'),Gn=e=>(()=>{let t=Zae();return yt(t,e,!0,!0),t})();var Qae=V('<div part="bubble-message"><p>'),Jae=V('<img class="rounded-full w-8 h-8 object-cover" alt="Bot avatar" elementtiming="Bot avatar" fetchpriority="high">'),ese=V('<button part="bubble-message-close-button" aria-label="Close">'),wR="#F7F8FF",_R="#303235",CR=e=>{let[t,r]=oe(!1),[n,o]=oe({x:0,y:0}),i=s=>{o({x:s.touches[0].clientX,y:s.touches[0].clientY})},a=s=>{let l=s.changedTouches[0].clientX,u=s.changedTouches[0].clientY;(Math.abs(l-n().x)>10||u-n().y>10)&&e.onCloseClick(),o({x:0,y:0})};return(()=>{let s=Qae(),l=s.firstChild;return s.$$touchend=a,s.$$touchstart=i,s.addEventListener("mouseleave",()=>r(!1)),s.addEventListener("mouseenter",()=>r(!0)),s.$$click=()=>e.onClick(),s.style.setProperty("z-index","42424242"),W(s,T(tse,{get isHovered(){return t()},get previewMessageTheme(){return e.previewMessageTheme},get onClick(){return e.onCloseClick}}),l),W(s,T(ve,{get when(){return e.avatarUrl},keyed:!0,children:u=>(()=>{let c=Jae();return qe(c,"src",u),c})()}),l),W(l,()=>e.message),le(u=>{var v,h;let c="fixed max-w-[256px] rounded-md duration-200 flex items-center gap-4 shadow-md animate-fade-in cursor-pointer hover:shadow-lg p-4"+(e.placement==="left"?" left-5":" right-5"),f=((v=e.previewMessageTheme)==null?void 0:v.backgroundColor)??wR,d=((h=e.previewMessageTheme)==null?void 0:h.textColor)??_R,p=`calc(${e.buttonSize} + 32px)`;return c!==u._v$&&we(s,u._v$=c),f!==u._v$2&&((u._v$2=f)!=null?s.style.setProperty("background-color",f):s.style.removeProperty("background-color")),d!==u._v$3&&((u._v$3=d)!=null?s.style.setProperty("color",d):s.style.removeProperty("color")),p!==u._v$4&&((u._v$4=p)!=null?s.style.setProperty("bottom",p):s.style.removeProperty("bottom")),u},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),s})()},tse=e=>(()=>{let t=ese();return t.$$click=r=>(r.stopPropagation(),e.onClick()),W(t,T(Gn,{class:"w-4"})),le(r=>{var a,s;let n="absolute -top-2 -right-2 rounded-full w-6 h-6 p-1 hover:brightness-95 active:brightness-90 transition-all border "+(e.isHovered?"opacity-100":"opacity-0"),o=((a=e.previewMessageTheme)==null?void 0:a.closeButtonBackgroundColor)??wR,i=((s=e.previewMessageTheme)==null?void 0:s.closeButtonIconColor)??_R;return n!==r._v$5&&we(t,r._v$5=n),o!==r._v$6&&((r._v$6=o)!=null?t.style.setProperty("background-color",o):t.style.removeProperty("background-color")),i!==r._v$7&&((r._v$7=i)!=null?t.style.setProperty("color",i):t.style.removeProperty("color")),r},{_v$5:void 0,_v$6:void 0,_v$7:void 0}),t})();Yr(["click","touchstart","touchend"]);var Ut=(e,t)=>{if(typeof window<"u")return window.__ENV?window.__ENV[e]??t:void 0;if(!(typeof process>"u"))return process.env[e]??t};var Uo=e=>{var o;let t=(o=Ut("NEXT_PUBLIC_VIEWER_URL"))==null?void 0:o.split(","),n=((t==null?void 0:t[0])??"https://quick.bot")+e;return process.env.NEXT_PUBLIC_VERCEL_ENV==="preview"&&process.env.NEXT_PUBLIC_VERCEL_AUTOMATION_BYPASS_SECRET&&(n=n+`?x-vercel-protection-bypass=${process.env.NEXT_PUBLIC_VERCEL_AUTOMATION_BYPASS_SECRET}`),n};var SR=e=>{sessionStorage.setItem("botPaymentInProgress",JSON.stringify(e))},wc=()=>sessionStorage.getItem("botPaymentInProgress"),Rv=()=>{sessionStorage.removeItem("botPaymentInProgress")};var Gi=class extends Error{constructor(t,r,n){let o=t.status||t.status===0?t.status:"",i=t.statusText||"",a=`${o} ${i}`.trim(),s=a?`status code ${a}`:"an unknown error";super(`Request failed with ${s}`),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="HTTPError",this.response=t,this.request=r,this.options=n}};var _c=class extends Error{constructor(t){super("Request timed out"),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.request=t}};var Sp=e=>e!==null&&typeof e=="object";var Tp=(...e)=>{for(let t of e)if((!Sp(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return Nv({},...e)},h_=(e={},t={})=>{let r=new globalThis.Headers(e),n=t instanceof globalThis.Headers,o=new globalThis.Headers(t);for(let[i,a]of o.entries())n&&a==="undefined"||a===void 0?r.delete(i):r.set(i,a);return r},Nv=(...e)=>{let t={},r={};for(let n of e)if(Array.isArray(n))Array.isArray(t)||(t=[]),t=[...t,...n];else if(Sp(n)){for(let[o,i]of Object.entries(n))Sp(i)&&o in t&&(i=Nv(t[o],i)),t={...t,[o]:i};Sp(n.headers)&&(r=h_(r,n.headers),t.headers=r)}return t};var TR=(()=>{let e=!1,t=!1,r=typeof globalThis.ReadableStream=="function",n=typeof globalThis.Request=="function";return r&&n&&(t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")),e&&!t})(),PR=typeof globalThis.AbortController=="function",AR=typeof globalThis.ReadableStream=="function",DR=typeof globalThis.FormData=="function",Lv=["get","post","put","patch","head","delete"],rse=()=>{};rse();var kR={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Bv=2147483647,Fv=Symbol("stop"),OR={json:!0,parseJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,fetch:!0},IR={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0};var NR=e=>Lv.includes(e)?e.toUpperCase():e,nse=["get","put","head","delete","options","trace"],ose=[408,413,429,500,502,503,504],LR=[413,429,503],RR={limit:2,methods:nse,statusCodes:ose,afterStatusCodes:LR,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},BR=(e={})=>{if(typeof e=="number")return{...RR,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...RR,...e,afterStatusCodes:LR}};async function v_(e,t,r,n){return new Promise((o,i)=>{let a=setTimeout(()=>{r&&r.abort(),i(new _c(e))},n.timeout);n.fetch(e,t).then(o).catch(i).then(()=>{clearTimeout(a)})})}async function y_(e,{signal:t}){return new Promise((r,n)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));function o(){clearTimeout(i),n(t.reason)}let i=setTimeout(()=>{t==null||t.removeEventListener("abort",o),r()},e)})}var FR=(e,t)=>{let r={};for(let n in t)!(n in IR)&&!(n in OR)&&!(n in e)&&(r[n]=t[n]);return r};var Pp=class e{static create(t,r){let n=new e(t,r),o=async()=>{if(typeof n._options.timeout=="number"&&n._options.timeout>Bv)throw new RangeError(`The \`timeout\` option cannot be greater than ${Bv}`);await Promise.resolve();let s=await n._fetch();for(let l of n._options.hooks.afterResponse){let u=await l(n.request,n._options,n._decorateResponse(s.clone()));u instanceof globalThis.Response&&(s=u)}if(n._decorateResponse(s),!s.ok&&n._options.throwHttpErrors){let l=new Gi(s,n.request,n._options);for(let u of n._options.hooks.beforeError)l=await u(l);throw l}if(n._options.onDownloadProgress){if(typeof n._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!AR)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return n._stream(s.clone(),n._options.onDownloadProgress)}return s},a=n._options.retry.methods.includes(n.request.method.toLowerCase())?n._retry(o):o();for(let[s,l]of Object.entries(kR))a[s]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||l);let c=(await a).clone();if(s==="json"){if(c.status===204||(await c.clone().arrayBuffer()).byteLength===0)return"";if(r.parseJson)return r.parseJson(await c.text())}return c[s]()};return a}constructor(t,r={}){Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"abortController",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_retryCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._input=t;let n=this._input instanceof Request&&"credentials"in Request.prototype?this._input.credentials:void 0;if(this._options={...n&&{credentials:n},...r,headers:h_(this._input.headers,r.headers),hooks:Nv({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:NR(r.method??this._input.method),prefixUrl:String(r.prefixUrl||""),retry:BR(r.retry),throwHttpErrors:r.throwHttpErrors!==!1,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(PR){if(this.abortController=new globalThis.AbortController,this._options.signal){let o=this._options.signal;this._options.signal.addEventListener("abort",()=>{this.abortController.abort(o.reason)})}this._options.signal=this.abortController.signal}if(TR&&(this._options.duplex="half"),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){let i="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),a=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,i);(DR&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(a,{...this.request}),this._options)}this._options.json!==void 0&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type",this._options.headers.get("content-type")??"application/json"),this.request=new globalThis.Request(this.request,{body:this._options.body}))}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount<=this._options.retry.limit&&!(t instanceof _c)){if(t instanceof Gi){if(!this._options.retry.statusCodes.includes(t.response.status))return 0;let n=t.response.headers.get("Retry-After");if(n&&this._options.retry.afterStatusCodes.includes(t.response.status)){let o=Number(n);return Number.isNaN(o)?o=Date.parse(n)-Date.now():o*=1e3,this._options.retry.maxRetryAfter!==void 0&&o>this._options.retry.maxRetryAfter?0:o}if(t.response.status===413)return 0}let r=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,r)}return 0}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(r){let n=Math.min(this._calculateRetryDelay(r),Bv);if(n!==0&&this._retryCount>0){await y_(n,{signal:this._options.signal});for(let o of this._options.hooks.beforeRetry)if(await o({request:this.request,options:this._options,error:r,retryCount:this._retryCount})===Fv)return;return this._retry(t)}throw r}}async _fetch(){for(let r of this._options.hooks.beforeRequest){let n=await r(this.request,this._options);if(n instanceof Request){this.request=n;break}if(n instanceof Response)return n}let t=FR(this.request,this._options);return this._options.timeout===!1?this._options.fetch(this.request.clone(),t):v_(this.request.clone(),t,this.abortController,this._options)}_stream(t,r){let n=Number(t.headers.get("content-length"))||0,o=0;return t.status===204?(r&&r({percent:1,totalBytes:n,transferredBytes:o},new Uint8Array),new globalThis.Response(null,{status:t.status,statusText:t.statusText,headers:t.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(i){let a=t.body.getReader();r&&r({percent:0,transferredBytes:0,totalBytes:n},new Uint8Array);async function s(){let{done:l,value:u}=await a.read();if(l){i.close();return}if(r){o+=u.byteLength;let c=n===0?0:o/n;r({percent:c,transferredBytes:o,totalBytes:n},u)}i.enqueue(u),await s()}await s()}}),{status:t.status,statusText:t.statusText,headers:t.headers})}};var b_=e=>{let t=(r,n)=>Pp.create(r,Tp(e,n));for(let r of Lv)t[r]=(n,o)=>Pp.create(n,Tp(e,o,{method:r}));return t.create=r=>b_(Tp(r)),t.extend=r=>b_(Tp(e,r)),t.stop=Fv,t},ise=b_(),go=ise;var Cc=class extends Error{constructor(t){super("This bot can only be executed on "+t)}};function Mv(e){let t=(e||"").toLowerCase(),r=/ipad|tablet|kindle|silk|playbook/.test(t)||/android/.test(t)&&!/mobile/.test(t),n=/mobi|iphone|ipod|android.*mobile|blackberry|phone|windows phone/.test(t);return r?"tablet":n?"mobile":/macintosh|windows nt|linux|x11|cros/.test(t)?"desktop":"unknown"}async function MR({bot:e,isPreview:t,prefilledVariables:r,resultId:n,stripeRedirectStatus:o,startFrom:i,sessionId:a}){if(ur(e))throw new Error("Bot ID is required to get initial messages");let s=wc()??void 0,l=s?JSON.parse(s):void 0;if(l){Rv();try{return{data:{...await go.post(Uo(`/api/v1/sessions/${l.sessionId}/continueChat`),{json:{message:l?o==="failed"?"fail":"Success":void 0},timeout:!1}).json(),...l}}}catch(c){return{error:c}}}let u=typeof e=="string"?e:e.id;if(t)try{return{data:await go.post(Uo(`/api/v1/bots/${u}/preview/startChat`),{json:{isStreamEnabled:!0,startFrom:i,bot:e,prefilledVariables:{...r,system_device:Mv(navigator.userAgent),"Device type":Mv(navigator.userAgent)},sessionId:a},timeout:!1}).json()}}catch(c){return{error:c}}try{let c=parent!==window&&yr(document.referrer)?new URL(document.referrer).origin:void 0,f=await go.post(Uo(`/api/v1/bots/${u}/startChat`),{headers:{"x-quickbot-iframe-referrer-origin":c},json:{isStreamEnabled:!0,prefilledVariables:{...r,system_device:Mv(navigator.userAgent),"Device type":Mv(navigator.userAgent)},resultId:n,isOnlyRegistering:!1},timeout:!1}),d=f.headers.get("access-control-allow-origin");if(c&&d&&d!=="*"&&!c.includes(d))throw new Cc(d);return{data:await f.json()}}catch(c){return{error:c}}}var $R=e=>e.type==="text"?e.label??e.value:e.url;var E_=async({sessionId:e,clientLogs:t})=>{try{await go.post(Uo(`/api/v1/sessions/${e}/clientLogs`),{json:{clientLogs:t}})}catch(r){console.log(r)}};var UR=async({message:e,sessionId:t,messageMetadata:r})=>{try{return{data:await go.post(Uo(`/api/v1/sessions/${t}/continueChat`),{json:{message:e,messageMetadata:r},timeout:!1}).json()}}catch(n){return{error:n}}};var[$v,x_]=oe([]);var jR=e=>{var t;if(e){if(e.type==="text")return{type:"text",text:e.value,attachedFileUrls:(t=e.attachments)==null?void 0:t.map(r=>r.url)};if(e.type==="recording")return{type:"audio",url:e.url}}},Uv=(e,t,r=0,n=.6,o=128)=>{if(!e)return;let i=e.clientHeight*n-o;e.scrollTop+e.clientHeight>=e.scrollHeight-i&&setTimeout(()=>{e==null||e.scrollTo(0,t?t.offsetTop-r:e.scrollHeight)},50)},qR=(e,t)=>{var r,n,o,i;return{...e,chat:{...e.chat,hostAvatar:(r=e.chat)!=null&&r.hostAvatar&&(t!=null&&t.hostAvatarUrl)?{...e.chat.hostAvatar,url:t.hostAvatarUrl}:(n=e.chat)==null?void 0:n.hostAvatar,guestAvatar:(o=e.chat)!=null&&o.guestAvatar&&(t!=null&&t.guestAvatarUrl)?{...e.chat.guestAvatar,url:t==null?void 0:t.guestAvatarUrl}:(i=e.chat)==null?void 0:i.guestAvatar}}};var Sr={general:{isInputPrefillEnabled:!1,isHideQueryParamsEnabled:!0,isNewResultOnRefreshEnabled:!0,rememberUser:{isEnabled:!1,storage:"session"},isBrandingEnabled:!1,isTypingEmulationEnabled:!0},typingEmulation:{enabled:!0,speed:400,maxDelay:3,delayBetweenBubbles:0,isDisabledOnFirstMessage:!0},metadata:{description:"Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form.",favIconUrl:e=>e+"/favicon.png",imageUrl:e=>""}},ase=[{value:"session",label:"Session"},{value:"local",label:"Local"}],Vet=ase.map(e=>e.value);var w_=Symbol("store-raw"),Dp=Symbol("store-node");function zR(e){let t=e[Mo];if(!t&&(Object.defineProperty(e,Mo,{value:t=new Proxy(e,use)}),!Array.isArray(e))){let r=Object.keys(e),n=Object.getOwnPropertyDescriptors(e);for(let o=0,i=r.length;o<i;o++){let a=r[o];n[a].get&&Object.defineProperty(e,a,{enumerable:n[a].enumerable,get:n[a].get.bind(t)})}}return t}function Ts(e){let t;return e!=null&&typeof e=="object"&&(e[Mo]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Tc(e,t=new Set){let r,n,o,i;if(r=e!=null&&e[w_])return r;if(!Ts(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let a=0,s=e.length;a<s;a++)o=e[a],(n=Tc(o,t))!==o&&(e[a]=n)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let a=Object.keys(e),s=Object.getOwnPropertyDescriptors(e);for(let l=0,u=a.length;l<u;l++)i=a[l],!s[i].get&&(o=e[i],(n=Tc(o,t))!==o&&(e[i]=n))}return e}function S_(e){let t=e[Dp];return t||Object.defineProperty(e,Dp,{value:t=Object.create(null)}),t}function __(e,t,r){return e[t]||(e[t]=HR(r))}function sse(e,t){let r=Reflect.getOwnPropertyDescriptor(e,t);return!r||r.get||!r.configurable||t===Mo||t===Dp||(delete r.value,delete r.writable,r.get=()=>e[Mo][t]),r}function VR(e){if(f_()){let t=S_(e);(t._||(t._=HR()))()}}function lse(e){return VR(e),Reflect.ownKeys(e)}function HR(e){let[t,r]=oe(e,{equals:!1,internal:!0});return t.$=r,t}var use={get(e,t,r){if(t===w_)return e;if(t===Mo)return r;if(t===Ep)return VR(e),r;let n=S_(e),o=n[t],i=o?o():e[t];if(t===Dp||t==="__proto__")return i;if(!o){let a=Object.getOwnPropertyDescriptor(e,t);f_()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(a&&a.get)&&(i=__(n,t,i)())}return Ts(i)?zR(i):i},has(e,t){return t===w_||t===Mo||t===Ep||t===Dp||t==="__proto__"?!0:(this.get(e,t,e),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:lse,getOwnPropertyDescriptor:sse};function jo(e,t,r,n=!1){if(!n&&e[t]===r)return;let o=e[t],i=e.length;r===void 0?delete e[t]:e[t]=r;let a=S_(e),s;if((s=__(a,t,o))&&s.$(()=>r),Array.isArray(e)&&e.length!==i){for(let l=e.length;l<i;l++)(s=a[l])&&s.$();(s=__(a,"length",i))&&s.$(e.length)}(s=a._)&&s.$()}function WR(e,t){let r=Object.keys(t);for(let n=0;n<r.length;n+=1){let o=r[n];jo(e,o,t[o])}}function cse(e,t){if(typeof t=="function"&&(t=t(e)),t=Tc(t),Array.isArray(t)){if(e===t)return;let r=0,n=t.length;for(;r<n;r++){let o=t[r];e[r]!==o&&jo(e,r,o)}jo(e,"length",n)}else WR(e,t)}function Ap(e,t,r=[]){let n,o=e;if(t.length>1){n=t.shift();let a=typeof n,s=Array.isArray(e);if(Array.isArray(n)){for(let l=0;l<n.length;l++)Ap(e,[n[l]].concat(t),r);return}else if(s&&a==="function"){for(let l=0;l<e.length;l++)n(e[l],l)&&Ap(e,[l].concat(t),r);return}else if(s&&a==="object"){let{from:l=0,to:u=e.length-1,by:c=1}=n;for(let f=l;f<=u;f+=c)Ap(e,[f].concat(t),r);return}else if(t.length>1){Ap(e[n],t,[n].concat(r));return}o=e[n],r=[n].concat(r)}let i=t[0];typeof i=="function"&&(i=i(o,r),i===o)||n===void 0&&i==null||(i=Tc(i),n===void 0||Ts(o)&&Ts(i)&&!Array.isArray(i)?WR(o,i):jo(e,n,i))}function GR(...[e,t]){let r=Tc(e||{}),n=Array.isArray(r),o=zR(r);function i(...a){eR(()=>{n&&a.length===1?cse(r,a[0]):Ap(r,a)})}return[o,i]}var C_=Symbol("store-root");function Sc(e,t,r,n,o){let i=t[r];if(e===i)return;if(r!==C_&&(!Ts(e)||!Ts(i)||o&&e[o]!==i[o])){jo(t,r,e);return}if(Array.isArray(e)){if(e.length&&i.length&&(!n||o&&e[0]&&e[0][o]!=null)){let l,u,c,f,d,p,v,h;for(c=0,f=Math.min(i.length,e.length);c<f&&(i[c]===e[c]||o&&i[c]&&e[c]&&i[c][o]===e[c][o]);c++)Sc(e[c],i,c,n,o);let y=new Array(e.length),g=new Map;for(f=i.length-1,d=e.length-1;f>=c&&d>=c&&(i[f]===e[d]||o&&i[c]&&e[c]&&i[f][o]===e[d][o]);f--,d--)y[d]=i[f];if(c>d||c>f){for(u=c;u<=d;u++)jo(i,u,e[u]);for(;u<e.length;u++)jo(i,u,y[u]),Sc(e[u],i,u,n,o);i.length>e.length&&jo(i,"length",e.length);return}for(v=new Array(d+1),u=d;u>=c;u--)p=e[u],h=o&&p?p[o]:p,l=g.get(h),v[u]=l===void 0?-1:l,g.set(h,u);for(l=c;l<=f;l++)p=i[l],h=o&&p?p[o]:p,u=g.get(h),u!==void 0&&u!==-1&&(y[u]=i[l],u=v[u],g.set(h,u));for(u=c;u<e.length;u++)u in y?(jo(i,u,y[u]),Sc(e[u],i,u,n,o)):jo(i,u,e[u])}else for(let l=0,u=e.length;l<u;l++)Sc(e[l],i,l,n,o);i.length>e.length&&jo(i,"length",e.length);return}let a=Object.keys(e);for(let l=0,u=a.length;l<u;l++)Sc(e[a[l]],i,a[l],n,o);let s=Object.keys(i);for(let l=0,u=s.length;l<u;l++)e[s[l]]===void 0&&jo(i,s[l],void 0)}function jv(e,t={}){let{merge:r,key:n="id"}=t,o=Tc(e);return i=>{if(!Ts(i)||!Ts(o))return o;let a=Sc(o,{[C_]:i},C_,r,n);return a===void 0?i:a}}function Ps(e,t){var u;let[r,n]=oe(!1);if(!t.storage)return[...e,r,n];let o=dse(t.storage||Sr.general.rememberUser.storage),i=JSON.stringify.bind(JSON),a=JSON.parse.bind(JSON),s=o.getItem(t.key),l=typeof e[0]=="function"?c=>e[1](()=>a(c)):c=>e[1](jv(a(c)));return s&&(l(s),n(!0),(u=t.onRecovered)==null||u.call(t)),[e[0],typeof e[0]=="function"?c=>{n(!1);let f=e[1](c);return c?o.setItem(t.key,i(f)):o.removeItem(t.key),f}:(...c)=>{n(!1),e[1](...c);let f=i(mr(()=>e[0]));o.setItem(t.key,f)},r,n]}var dse=e=>(e??Sr.general.rememberUser.storage)==="session"?sessionStorage:localStorage;var Ele=de(QR(),1);var mse=Symbol("Let zodToJsonSchema decide on which parser to use");var xt;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{let i={};for(let a of o)i[a]=a;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(let s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(let a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function n(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(xt||(xt={}));var A_;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(A_||(A_={}));var Pe=xt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),As=e=>{switch(typeof e){case"undefined":return Pe.undefined;case"string":return Pe.string;case"number":return isNaN(e)?Pe.nan:Pe.number;case"boolean":return Pe.boolean;case"function":return Pe.function;case"bigint":return Pe.bigint;case"symbol":return Pe.symbol;case"object":return Array.isArray(e)?Pe.array:e===null?Pe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Pe.promise:typeof Map<"u"&&e instanceof Map?Pe.map:typeof Set<"u"&&e instanceof Set?Pe.set:typeof Date<"u"&&e instanceof Date?Pe.date:Pe.object;default:return Pe.unknown}},me=xt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),gse=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ho=class e extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,l=0;for(;l<a.path.length;){let u=a.path[l];l===a.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(a))):s[u]=s[u]||{_errors:[]},s=s[u],l++}}};return o(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,xt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let o of this.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};ho.create=e=>new ho(e);var kc=(e,t)=>{let r;switch(e.code){case me.invalid_type:e.received===Pe.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case me.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,xt.jsonStringifyReplacer)}`;break;case me.unrecognized_keys:r=`Unrecognized key(s) in object: ${xt.joinValues(e.keys,", ")}`;break;case me.invalid_union:r="Invalid input";break;case me.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${xt.joinValues(e.options)}`;break;case me.invalid_enum_value:r=`Invalid enum value. Expected ${xt.joinValues(e.options)}, received '${e.received}'`;break;case me.invalid_arguments:r="Invalid function arguments";break;case me.invalid_return_type:r="Invalid function return type";break;case me.invalid_date:r="Invalid date";break;case me.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:xt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case me.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case me.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case me.custom:r="Invalid input";break;case me.invalid_intersection_types:r="Intersection results could not be merged";break;case me.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case me.not_finite:r="Number must be finite";break;default:r=t.defaultError,xt.assertNever(e)}return{message:r}},tN=kc;function hse(e){tN=e}function qv(){return tN}var zv=e=>{let{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="",l=n.filter(u=>!!u).slice().reverse();for(let u of l)s=u(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}},vse=[];function _e(e,t){let r=qv(),n=zv({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===kc?void 0:kc].filter(o=>!!o)});e.common.issues.push(n)}var pn=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let o of r){if(o.status==="aborted")return Je;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let o of r){let i=await o.key,a=await o.value;n.push({key:i,value:a})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let o of r){let{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return Je;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(n[i.value]=a.value)}return{status:t.value,value:n}}},Je=Object.freeze({status:"aborted"}),Dc=e=>({status:"dirty",value:e}),An=e=>({status:"valid",value:e}),D_=e=>e.status==="aborted",k_=e=>e.status==="dirty",Ip=e=>e.status==="valid",Rp=e=>typeof Promise<"u"&&e instanceof Promise;function Vv(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function rN(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r}var ze;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ze||(ze={}));var kp,Op,zo=class{constructor(t,r,n,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},JR=(e,t)=>{if(Ip(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new ho(e.common.issues);return this._error=r,this._error}}};function ut(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{var l,u;let{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(u=c??r)!==null&&u!==void 0?u:s.defaultError}},description:o}}var ct=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return As(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:As(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new pn,ctx:{common:t.parent.common,data:t.data,parsedType:As(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Rp(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;let o={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:As(t)},i=this._parseSync({data:t,path:o.path,parent:o});return JR(o,i)}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:As(t)},o=this._parse({data:t,path:n.path,parent:n}),i=await(Rp(o)?o:Promise.resolve(o));return JR(n,i)}refine(t,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,i)=>{let a=t(o),s=()=>i.addIssue({code:me.custom,...n(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,o)=>t(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(t){return new vo({schema:this,typeName:Ze.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return qo.create(this,this._def)}nullable(){return Yi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ia.create(this,this._def)}promise(){return Os.create(this,this._def)}or(t){return Vl.create([this,t],this._def)}and(t){return Hl.create(this,t,this._def)}transform(t){return new vo({...ut(this._def),schema:this,typeName:Ze.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Xl({...ut(this._def),innerType:this,defaultValue:r,typeName:Ze.ZodDefault})}brand(){return new Np({typeName:Ze.ZodBranded,type:this,...ut(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Zl({...ut(this._def),innerType:this,catchValue:r,typeName:Ze.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Lp.create(this,t)}readonly(){return Ql.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},yse=/^c[^\s-]{8,}$/i,bse=/^[0-9a-z]+$/,Ese=/^[0-9A-HJKMNP-TV-Z]{26}$/,xse=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,wse=/^[a-z0-9_-]{21}$/i,_se=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Cse=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Sse="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",P_,Tse=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Pse=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Ase=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,nN="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Dse=new RegExp(`^${nN}$`);function oN(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function kse(e){return new RegExp(`^${oN(e)}$`)}function iN(e){let t=`${nN}T${oN(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Ose(e,t){return!!((t==="v4"||!t)&&Tse.test(e)||(t==="v6"||!t)&&Pse.test(e))}var Ds=class e extends ct{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Pe.string){let i=this._getOrReturnCtx(t);return _e(i,{code:me.invalid_type,expected:Pe.string,received:i.parsedType}),Je}let n=new pn,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),_e(o,{code:me.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),_e(o,{code:me.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?_e(o,{code:me.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&_e(o,{code:me.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")Cse.test(t.data)||(o=this._getOrReturnCtx(t,o),_e(o,{validation:"email",code:me.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")P_||(P_=new RegExp(Sse,"u")),P_.test(t.data)||(o=this._getOrReturnCtx(t,o),_e(o,{validation:"emoji",code:me.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")xse.test(t.data)||(o=this._getOrReturnCtx(t,o),_e(o,{validation:"uuid",code:me.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")wse.test(t.data)||(o=this._getOrReturnCtx(t,o),_e(o,{validation:"nanoid",code:me.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")yse.test(t.data)||(o=this._getOrReturnCtx(t,o),_e(o,{validation:"cuid",code:me.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")bse.test(t.data)||(o=this._getOrReturnCtx(t,o),_e(o,{validation:"cuid2",code:me.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")Ese.test(t.data)||(o=this._getOrReturnCtx(t,o),_e(o,{validation:"ulid",code:me.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),_e(o,{validation:"url",code:me.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),_e(o,{validation:"regex",code:me.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),_e(o,{code:me.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),_e(o,{code:me.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),_e(o,{code:me.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?iN(i).test(t.data)||(o=this._getOrReturnCtx(t,o),_e(o,{code:me.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?Dse.test(t.data)||(o=this._getOrReturnCtx(t,o),_e(o,{code:me.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?kse(i).test(t.data)||(o=this._getOrReturnCtx(t,o),_e(o,{code:me.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?_se.test(t.data)||(o=this._getOrReturnCtx(t,o),_e(o,{validation:"duration",code:me.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?Ose(t.data,i.version)||(o=this._getOrReturnCtx(t,o),_e(o,{validation:"ip",code:me.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?Ase.test(t.data)||(o=this._getOrReturnCtx(t,o),_e(o,{validation:"base64",code:me.invalid_string,message:i.message}),n.dirty()):xt.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:me.invalid_string,...ze.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ze.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ze.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ze.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ze.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ze.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ze.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ze.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ze.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ze.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ze.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,...ze.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ze.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ze.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...ze.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...ze.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...ze.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...ze.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...ze.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...ze.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...ze.errToObj(r)})}nonempty(t){return this.min(1,ze.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Ds.create=e=>{var t;return new Ds({checks:[],typeName:Ze.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ut(e)})};function Ise(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}var Ml=class e extends ct{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Pe.number){let i=this._getOrReturnCtx(t);return _e(i,{code:me.invalid_type,expected:Pe.number,received:i.parsedType}),Je}let n,o=new pn;for(let i of this._def.checks)i.kind==="int"?xt.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),_e(n,{code:me.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),_e(n,{code:me.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),_e(n,{code:me.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Ise(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),_e(n,{code:me.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),_e(n,{code:me.not_finite,message:i.message}),o.dirty()):xt.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,ze.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ze.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ze.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ze.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:ze.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ze.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ze.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ze.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ze.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ze.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ze.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:ze.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ze.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ze.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&xt.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Ml.create=e=>new Ml({checks:[],typeName:Ze.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ut(e)});var $l=class e extends ct{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Pe.bigint){let i=this._getOrReturnCtx(t);return _e(i,{code:me.invalid_type,expected:Pe.bigint,received:i.parsedType}),Je}let n,o=new pn;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),_e(n,{code:me.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),_e(n,{code:me.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),_e(n,{code:me.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):xt.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,ze.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ze.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ze.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ze.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:ze.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ze.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ze.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ze.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ze.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ze.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};$l.create=e=>{var t;return new $l({checks:[],typeName:Ze.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ut(e)})};var Ul=class extends ct{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Pe.boolean){let n=this._getOrReturnCtx(t);return _e(n,{code:me.invalid_type,expected:Pe.boolean,received:n.parsedType}),Je}return An(t.data)}};Ul.create=e=>new Ul({typeName:Ze.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ut(e)});var jl=class e extends ct{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Pe.date){let i=this._getOrReturnCtx(t);return _e(i,{code:me.invalid_type,expected:Pe.date,received:i.parsedType}),Je}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return _e(i,{code:me.invalid_date}),Je}let n=new pn,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),_e(o,{code:me.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),_e(o,{code:me.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):xt.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:ze.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:ze.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};jl.create=e=>new jl({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ze.ZodDate,...ut(e)});var Oc=class extends ct{_parse(t){if(this._getType(t)!==Pe.symbol){let n=this._getOrReturnCtx(t);return _e(n,{code:me.invalid_type,expected:Pe.symbol,received:n.parsedType}),Je}return An(t.data)}};Oc.create=e=>new Oc({typeName:Ze.ZodSymbol,...ut(e)});var ql=class extends ct{_parse(t){if(this._getType(t)!==Pe.undefined){let n=this._getOrReturnCtx(t);return _e(n,{code:me.invalid_type,expected:Pe.undefined,received:n.parsedType}),Je}return An(t.data)}};ql.create=e=>new ql({typeName:Ze.ZodUndefined,...ut(e)});var zl=class extends ct{_parse(t){if(this._getType(t)!==Pe.null){let n=this._getOrReturnCtx(t);return _e(n,{code:me.invalid_type,expected:Pe.null,received:n.parsedType}),Je}return An(t.data)}};zl.create=e=>new zl({typeName:Ze.ZodNull,...ut(e)});var ks=class extends ct{constructor(){super(...arguments),this._any=!0}_parse(t){return An(t.data)}};ks.create=e=>new ks({typeName:Ze.ZodAny,...ut(e)});var Oa=class extends ct{constructor(){super(...arguments),this._unknown=!0}_parse(t){return An(t.data)}};Oa.create=e=>new Oa({typeName:Ze.ZodUnknown,...ut(e)});var xi=class extends ct{_parse(t){let r=this._getOrReturnCtx(t);return _e(r,{code:me.invalid_type,expected:Pe.never,received:r.parsedType}),Je}};xi.create=e=>new xi({typeName:Ze.ZodNever,...ut(e)});var Ic=class extends ct{_parse(t){if(this._getType(t)!==Pe.undefined){let n=this._getOrReturnCtx(t);return _e(n,{code:me.invalid_type,expected:Pe.void,received:n.parsedType}),Je}return An(t.data)}};Ic.create=e=>new Ic({typeName:Ze.ZodVoid,...ut(e)});var Ia=class e extends ct{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==Pe.array)return _e(r,{code:me.invalid_type,expected:Pe.array,received:r.parsedType}),Je;if(o.exactLength!==null){let a=r.data.length>o.exactLength.value,s=r.data.length<o.exactLength.value;(a||s)&&(_e(r,{code:a?me.too_big:me.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(_e(r,{code:me.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(_e(r,{code:me.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>o.type._parseAsync(new zo(r,a,r.path,s)))).then(a=>pn.mergeArray(n,a));let i=[...r.data].map((a,s)=>o.type._parseSync(new zo(r,a,r.path,s)));return pn.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:ze.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:ze.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:ze.toString(r)}})}nonempty(t){return this.min(1,t)}};Ia.create=(e,t)=>new Ia({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ze.ZodArray,...ut(t)});function Ac(e){if(e instanceof Kn){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=qo.create(Ac(n))}return new Kn({...e._def,shape:()=>t})}else return e instanceof Ia?new Ia({...e._def,type:Ac(e.element)}):e instanceof qo?qo.create(Ac(e.unwrap())):e instanceof Yi?Yi.create(Ac(e.unwrap())):e instanceof Ki?Ki.create(e.items.map(t=>Ac(t))):e}var Kn=class e extends ct{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=xt.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==Pe.object){let u=this._getOrReturnCtx(t);return _e(u,{code:me.invalid_type,expected:Pe.object,received:u.parsedType}),Je}let{status:n,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof xi&&this._def.unknownKeys==="strip"))for(let u in o.data)a.includes(u)||s.push(u);let l=[];for(let u of a){let c=i[u],f=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new zo(o,f,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof xi){let u=this._def.unknownKeys;if(u==="passthrough")for(let c of s)l.push({key:{status:"valid",value:c},value:{status:"valid",value:o.data[c]}});else if(u==="strict")s.length>0&&(_e(o,{code:me.unrecognized_keys,keys:s}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let c of s){let f=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new zo(o,f,o.path,c)),alwaysSet:c in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let u=[];for(let c of l){let f=await c.key,d=await c.value;u.push({key:f,value:d,alwaysSet:c.alwaysSet})}return u}).then(u=>pn.mergeObjectSync(n,u)):pn.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return ze.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var o,i,a,s;let l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=ze.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ze.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};return xt.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new e({...this._def,shape:()=>r})}omit(t){let r={};return xt.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new e({...this._def,shape:()=>r})}deepPartial(){return Ac(this)}partial(t){let r={};return xt.objectKeys(this.shape).forEach(n=>{let o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}),new e({...this._def,shape:()=>r})}required(t){let r={};return xt.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof qo;)i=i._def.innerType;r[n]=i}}),new e({...this._def,shape:()=>r})}keyof(){return aN(xt.objectKeys(this.shape))}};Kn.create=(e,t)=>new Kn({shape:()=>e,unknownKeys:"strip",catchall:xi.create(),typeName:Ze.ZodObject,...ut(t)});Kn.strictCreate=(e,t)=>new Kn({shape:()=>e,unknownKeys:"strict",catchall:xi.create(),typeName:Ze.ZodObject,...ut(t)});Kn.lazycreate=(e,t)=>new Kn({shape:e,unknownKeys:"strip",catchall:xi.create(),typeName:Ze.ZodObject,...ut(t)});var Vl=class extends ct{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function o(i){for(let s of i)if(s.result.status==="valid")return s.result;for(let s of i)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(s=>new ho(s.ctx.common.issues));return _e(r,{code:me.invalid_union,unionErrors:a}),Je}if(r.common.async)return Promise.all(n.map(async i=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(o);{let i,a=[];for(let l of n){let u={...r,common:{...r.common,issues:[]},parent:null},c=l._parseSync({data:r.data,path:r.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!i&&(i={result:c,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let s=a.map(l=>new ho(l));return _e(r,{code:me.invalid_union,unionErrors:s}),Je}}get options(){return this._def.options}};Vl.create=(e,t)=>new Vl({options:e,typeName:Ze.ZodUnion,...ut(t)});var ka=e=>e instanceof Wl?ka(e.schema):e instanceof vo?ka(e.innerType()):e instanceof Gl?[e.value]:e instanceof Kl?e.options:e instanceof Yl?xt.objectValues(e.enum):e instanceof Xl?ka(e._def.innerType):e instanceof ql?[void 0]:e instanceof zl?[null]:e instanceof qo?[void 0,...ka(e.unwrap())]:e instanceof Yi?[null,...ka(e.unwrap())]:e instanceof Np||e instanceof Ql?ka(e.unwrap()):e instanceof Zl?ka(e._def.innerType):[],Hv=class e extends ct{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==Pe.object)return _e(r,{code:me.invalid_type,expected:Pe.object,received:r.parsedType}),Je;let n=this.discriminator,o=r.data[n],i=this.optionsMap.get(o);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(_e(r,{code:me.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Je)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let o=new Map;for(let i of r){let a=ka(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new e({typeName:Ze.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...ut(n)})}};function O_(e,t){let r=As(e),n=As(t);if(e===t)return{valid:!0,data:e};if(r===Pe.object&&n===Pe.object){let o=xt.objectKeys(t),i=xt.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(let s of i){let l=O_(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(r===Pe.array&&n===Pe.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let a=e[i],s=t[i],l=O_(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return r===Pe.date&&n===Pe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Hl=class extends ct{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=(i,a)=>{if(D_(i)||D_(a))return Je;let s=O_(i.value,a.value);return s.valid?((k_(i)||k_(a))&&r.dirty(),{status:r.value,value:s.data}):(_e(n,{code:me.invalid_intersection_types}),Je)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Hl.create=(e,t,r)=>new Hl({left:e,right:t,typeName:Ze.ZodIntersection,...ut(r)});var Ki=class e extends ct{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Pe.array)return _e(n,{code:me.invalid_type,expected:Pe.array,received:n.parsedType}),Je;if(n.data.length<this._def.items.length)return _e(n,{code:me.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Je;!this._def.rest&&n.data.length>this._def.items.length&&(_e(n,{code:me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((a,s)=>{let l=this._def.items[s]||this._def.rest;return l?l._parse(new zo(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(i).then(a=>pn.mergeArray(r,a)):pn.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Ki.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ki({items:e,typeName:Ze.ZodTuple,rest:null,...ut(t)})};var Wv=class e extends ct{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Pe.object)return _e(n,{code:me.invalid_type,expected:Pe.object,received:n.parsedType}),Je;let o=[],i=this._def.keyType,a=this._def.valueType;for(let s in n.data)o.push({key:i._parse(new zo(n,s,n.path,s)),value:a._parse(new zo(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?pn.mergeObjectAsync(r,o):pn.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof ct?new e({keyType:t,valueType:r,typeName:Ze.ZodRecord,...ut(n)}):new e({keyType:Ds.create(),valueType:t,typeName:Ze.ZodRecord,...ut(r)})}},Rc=class extends ct{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Pe.map)return _e(n,{code:me.invalid_type,expected:Pe.map,received:n.parsedType}),Je;let o=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([s,l],u)=>({key:o._parse(new zo(n,s,n.path,[u,"key"])),value:i._parse(new zo(n,l,n.path,[u,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let l of a){let u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return Je;(u.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(u.value,c.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let l of a){let u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return Je;(u.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(u.value,c.value)}return{status:r.value,value:s}}}};Rc.create=(e,t,r)=>new Rc({valueType:t,keyType:e,typeName:Ze.ZodMap,...ut(r)});var Nc=class e extends ct{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Pe.set)return _e(n,{code:me.invalid_type,expected:Pe.set,received:n.parsedType}),Je;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(_e(n,{code:me.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(_e(n,{code:me.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let i=this._def.valueType;function a(l){let u=new Set;for(let c of l){if(c.status==="aborted")return Je;c.status==="dirty"&&r.dirty(),u.add(c.value)}return{status:r.value,value:u}}let s=[...n.data.values()].map((l,u)=>i._parse(new zo(n,l,n.path,u)));return n.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,r){return new e({...this._def,minSize:{value:t,message:ze.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:ze.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Nc.create=(e,t)=>new Nc({valueType:e,minSize:null,maxSize:null,typeName:Ze.ZodSet,...ut(t)});var Gv=class e extends ct{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==Pe.function)return _e(r,{code:me.invalid_type,expected:Pe.function,received:r.parsedType}),Je;function n(s,l){return zv({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,qv(),kc].filter(u=>!!u),issueData:{code:me.invalid_arguments,argumentsError:l}})}function o(s,l){return zv({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,qv(),kc].filter(u=>!!u),issueData:{code:me.invalid_return_type,returnTypeError:l}})}let i={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof Os){let s=this;return An(async function(...l){let u=new ho([]),c=await s._def.args.parseAsync(l,i).catch(p=>{throw u.addIssue(n(l,p)),u}),f=await Reflect.apply(a,this,c);return await s._def.returns._def.type.parseAsync(f,i).catch(p=>{throw u.addIssue(o(f,p)),u})})}else{let s=this;return An(function(...l){let u=s._def.args.safeParse(l,i);if(!u.success)throw new ho([n(l,u.error)]);let c=Reflect.apply(a,this,u.data),f=s._def.returns.safeParse(c,i);if(!f.success)throw new ho([o(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Ki.create(t).rest(Oa.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||Ki.create([]).rest(Oa.create()),returns:r||Oa.create(),typeName:Ze.ZodFunction,...ut(n)})}},Wl=class extends ct{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Wl.create=(e,t)=>new Wl({getter:e,typeName:Ze.ZodLazy,...ut(t)});var Gl=class extends ct{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return _e(r,{received:r.data,code:me.invalid_literal,expected:this._def.value}),Je}return{status:"valid",value:t.data}}get value(){return this._def.value}};Gl.create=(e,t)=>new Gl({value:e,typeName:Ze.ZodLiteral,...ut(t)});function aN(e,t){return new Kl({values:e,typeName:Ze.ZodEnum,...ut(t)})}var Kl=class e extends ct{constructor(){super(...arguments),kp.set(this,void 0)}_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return _e(r,{expected:xt.joinValues(n),received:r.parsedType,code:me.invalid_type}),Je}if(Vv(this,kp,"f")||rN(this,kp,new Set(this._def.values),"f"),!Vv(this,kp,"f").has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return _e(r,{received:r.data,code:me.invalid_enum_value,options:n}),Je}return An(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};kp=new WeakMap;Kl.create=aN;var Yl=class extends ct{constructor(){super(...arguments),Op.set(this,void 0)}_parse(t){let r=xt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==Pe.string&&n.parsedType!==Pe.number){let o=xt.objectValues(r);return _e(n,{expected:xt.joinValues(o),received:n.parsedType,code:me.invalid_type}),Je}if(Vv(this,Op,"f")||rN(this,Op,new Set(xt.getValidEnumValues(this._def.values)),"f"),!Vv(this,Op,"f").has(t.data)){let o=xt.objectValues(r);return _e(n,{received:n.data,code:me.invalid_enum_value,options:o}),Je}return An(t.data)}get enum(){return this._def.values}};Op=new WeakMap;Yl.create=(e,t)=>new Yl({values:e,typeName:Ze.ZodNativeEnum,...ut(t)});var Os=class extends ct{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==Pe.promise&&r.common.async===!1)return _e(r,{code:me.invalid_type,expected:Pe.promise,received:r.parsedType}),Je;let n=r.parsedType===Pe.promise?r.data:Promise.resolve(r.data);return An(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Os.create=(e,t)=>new Os({type:e,typeName:Ze.ZodPromise,...ut(t)});var vo=class extends ct{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{_e(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let a=o.transform(n.data,i);if(n.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return Je;let l=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return l.status==="aborted"?Je:l.status==="dirty"||r.value==="dirty"?Dc(l.value):l});{if(r.value==="aborted")return Je;let s=this._def.schema._parseSync({data:a,path:n.path,parent:n});return s.status==="aborted"?Je:s.status==="dirty"||r.value==="dirty"?Dc(s.value):s}}if(o.type==="refinement"){let a=s=>{let l=o.refinement(s,i);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Je:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?Je:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(o.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ip(a))return a;let s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>Ip(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:r.value,value:s})):a);xt.assertNever(o)}};vo.create=(e,t,r)=>new vo({schema:e,typeName:Ze.ZodEffects,effect:t,...ut(r)});vo.createWithPreprocess=(e,t,r)=>new vo({schema:t,effect:{type:"preprocess",transform:e},typeName:Ze.ZodEffects,...ut(r)});var qo=class extends ct{_parse(t){return this._getType(t)===Pe.undefined?An(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};qo.create=(e,t)=>new qo({innerType:e,typeName:Ze.ZodOptional,...ut(t)});var Yi=class extends ct{_parse(t){return this._getType(t)===Pe.null?An(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Yi.create=(e,t)=>new Yi({innerType:e,typeName:Ze.ZodNullable,...ut(t)});var Xl=class extends ct{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===Pe.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Xl.create=(e,t)=>new Xl({innerType:e,typeName:Ze.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ut(t)});var Zl=class extends ct{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Rp(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ho(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ho(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Zl.create=(e,t)=>new Zl({innerType:e,typeName:Ze.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ut(t)});var Lc=class extends ct{_parse(t){if(this._getType(t)!==Pe.nan){let n=this._getOrReturnCtx(t);return _e(n,{code:me.invalid_type,expected:Pe.nan,received:n.parsedType}),Je}return{status:"valid",value:t.data}}};Lc.create=e=>new Lc({typeName:Ze.ZodNaN,...ut(e)});var Rse=Symbol("zod_brand"),Np=class extends ct{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Lp=class e extends ct{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Je:i.status==="dirty"?(r.dirty(),Dc(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Je:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:Ze.ZodPipeline})}},Ql=class extends ct{_parse(t){let r=this._def.innerType._parse(t),n=o=>(Ip(o)&&(o.value=Object.freeze(o.value)),o);return Rp(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};Ql.create=(e,t)=>new Ql({innerType:e,typeName:Ze.ZodReadonly,...ut(t)});function sN(e,t={},r){return e?ks.create().superRefine((n,o)=>{var i,a;if(!e(n)){let s=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,l=(a=(i=s.fatal)!==null&&i!==void 0?i:r)!==null&&a!==void 0?a:!0,u=typeof s=="string"?{message:s}:s;o.addIssue({code:"custom",...u,fatal:l})}}):ks.create()}var Nse={object:Kn.lazycreate},Ze;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ze||(Ze={}));var Lse=(e,t={message:`Input not instance of ${e.name}`})=>sN(r=>r instanceof e,t),lN=Ds.create,uN=Ml.create,Bse=Lc.create,Fse=$l.create,cN=Ul.create,Mse=jl.create,$se=Oc.create,Use=ql.create,jse=zl.create,qse=ks.create,zse=Oa.create,Vse=xi.create,Hse=Ic.create,Wse=Ia.create,Gse=Kn.create,Kse=Kn.strictCreate,Yse=Vl.create,Xse=Hv.create,Zse=Hl.create,Qse=Ki.create,Jse=Wv.create,ele=Rc.create,tle=Nc.create,rle=Gv.create,nle=Wl.create,ole=Gl.create,ile=Kl.create,ale=Yl.create,sle=Os.create,eN=vo.create,lle=qo.create,ule=Yi.create,cle=vo.createWithPreprocess,dle=Lp.create,fle=()=>lN().optional(),ple=()=>uN().optional(),mle=()=>cN().optional(),gle={string:(e=>Ds.create({...e,coerce:!0})),number:(e=>Ml.create({...e,coerce:!0})),boolean:(e=>Ul.create({...e,coerce:!0})),bigint:(e=>$l.create({...e,coerce:!0})),date:(e=>jl.create({...e,coerce:!0}))},hle=Je,se=Object.freeze({__proto__:null,defaultErrorMap:kc,setErrorMap:hse,getErrorMap:qv,makeIssue:zv,EMPTY_PATH:vse,addIssueToContext:_e,ParseStatus:pn,INVALID:Je,DIRTY:Dc,OK:An,isAborted:D_,isDirty:k_,isValid:Ip,isAsync:Rp,get util(){return xt},get objectUtil(){return A_},ZodParsedType:Pe,getParsedType:As,ZodType:ct,datetimeRegex:iN,ZodString:Ds,ZodNumber:Ml,ZodBigInt:$l,ZodBoolean:Ul,ZodDate:jl,ZodSymbol:Oc,ZodUndefined:ql,ZodNull:zl,ZodAny:ks,ZodUnknown:Oa,ZodNever:xi,ZodVoid:Ic,ZodArray:Ia,ZodObject:Kn,ZodUnion:Vl,ZodDiscriminatedUnion:Hv,ZodIntersection:Hl,ZodTuple:Ki,ZodRecord:Wv,ZodMap:Rc,ZodSet:Nc,ZodFunction:Gv,ZodLazy:Wl,ZodLiteral:Gl,ZodEnum:Kl,ZodNativeEnum:Yl,ZodPromise:Os,ZodEffects:vo,ZodTransformer:vo,ZodOptional:qo,ZodNullable:Yi,ZodDefault:Xl,ZodCatch:Zl,ZodNaN:Lc,BRAND:Rse,ZodBranded:Np,ZodPipeline:Lp,ZodReadonly:Ql,custom:sN,Schema:ct,ZodSchema:ct,late:Nse,get ZodFirstPartyTypeKind(){return Ze},coerce:gle,any:qse,array:Wse,bigint:Fse,boolean:cN,date:Mse,discriminatedUnion:Xse,effect:eN,enum:ile,function:rle,instanceof:Lse,intersection:Zse,lazy:nle,literal:ole,map:ele,nan:Bse,nativeEnum:ale,never:Vse,null:jse,nullable:ule,number:uN,object:Gse,oboolean:mle,onumber:ple,optional:lle,ostring:fle,pipeline:dle,preprocess:cle,promise:sle,record:Jse,set:tle,strictObject:Kse,string:lN,symbol:$se,transformer:eN,tuple:Qse,undefined:Use,union:Yse,unknown:zse,void:Hse,NEVER:hle,ZodIssueCode:me,quotelessJson:gse,ZodError:ho});var Ptt=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");var Fp={code:"0",name:"text",parse:e=>{if(typeof e!="string")throw new Error('"text" parts expect a string value.');return{type:"text",value:e}}},Mp={code:"1",name:"function_call",parse:e=>{if(e==null||typeof e!="object"||!("function_call"in e)||typeof e.function_call!="object"||e.function_call==null||!("name"in e.function_call)||!("arguments"in e.function_call)||typeof e.function_call.name!="string"||typeof e.function_call.arguments!="string")throw new Error('"function_call" parts expect an object with a "function_call" property.');return{type:"function_call",value:e}}},$p={code:"2",name:"data",parse:e=>{if(!Array.isArray(e))throw new Error('"data" parts expect an array value.');return{type:"data",value:e}}},Up={code:"3",name:"error",parse:e=>{if(typeof e!="string")throw new Error('"error" parts expect a string value.');return{type:"error",value:e}}},jp={code:"4",name:"assistant_message",parse:e=>{if(e==null||typeof e!="object"||!("id"in e)||!("role"in e)||!("content"in e)||typeof e.id!="string"||typeof e.role!="string"||e.role!=="assistant"||!Array.isArray(e.content)||!e.content.every(t=>t!=null&&typeof t=="object"&&"type"in t&&t.type==="text"&&"text"in t&&t.text!=null&&typeof t.text=="object"&&"value"in t.text&&typeof t.text.value=="string"))throw new Error('"assistant_message" parts expect an object with an "id", "role", and "content" property.');return{type:"assistant_message",value:e}}},qp={code:"5",name:"assistant_control_data",parse:e=>{if(e==null||typeof e!="object"||!("threadId"in e)||!("messageId"in e)||typeof e.threadId!="string"||typeof e.messageId!="string")throw new Error('"assistant_control_data" parts expect an object with a "threadId" and "messageId" property.');return{type:"assistant_control_data",value:{threadId:e.threadId,messageId:e.messageId}}}},zp={code:"6",name:"data_message",parse:e=>{if(e==null||typeof e!="object"||!("role"in e)||!("data"in e)||typeof e.role!="string"||e.role!=="data")throw new Error('"data_message" parts expect an object with a "role" and "data" property.');return{type:"data_message",value:e}}},Vp={code:"7",name:"tool_calls",parse:e=>{if(e==null||typeof e!="object"||!("tool_calls"in e)||typeof e.tool_calls!="object"||e.tool_calls==null||!Array.isArray(e.tool_calls)||e.tool_calls.some(t=>t==null||typeof t!="object"||!("id"in t)||typeof t.id!="string"||!("type"in t)||typeof t.type!="string"||!("function"in t)||t.function==null||typeof t.function!="object"||!("arguments"in t.function)||typeof t.function.name!="string"||typeof t.function.arguments!="string"))throw new Error('"tool_calls" parts expect an object with a ToolCallPayload.');return{type:"tool_calls",value:e}}},Hp={code:"8",name:"message_annotations",parse:e=>{if(!Array.isArray(e))throw new Error('"message_annotations" parts expect an array value.');return{type:"message_annotations",value:e}}},Wp={code:"9",name:"tool_call",parse:e=>{if(e==null||typeof e!="object"||!("toolCallId"in e)||typeof e.toolCallId!="string"||!("toolName"in e)||typeof e.toolName!="string"||!("args"in e)||typeof e.args!="object")throw new Error('"tool_call" parts expect an object with a "toolCallId", "toolName", and "args" property.');return{type:"tool_call",value:e}}},Gp={code:"a",name:"tool_result",parse:e=>{if(e==null||typeof e!="object"||!("toolCallId"in e)||typeof e.toolCallId!="string"||!("result"in e))throw new Error('"tool_result" parts expect an object with a "toolCallId" and a "result" property.');return{type:"tool_result",value:e}}},Kp={code:"b",name:"tool_call_streaming_start",parse:e=>{if(e==null||typeof e!="object"||!("toolCallId"in e)||typeof e.toolCallId!="string"||!("toolName"in e)||typeof e.toolName!="string")throw new Error('"tool_call_streaming_start" parts expect an object with a "toolCallId" and "toolName" property.');return{type:"tool_call_streaming_start",value:e}}},Yp={code:"c",name:"tool_call_delta",parse:e=>{if(e==null||typeof e!="object"||!("toolCallId"in e)||typeof e.toolCallId!="string"||!("argsTextDelta"in e)||typeof e.argsTextDelta!="string")throw new Error('"tool_call_delta" parts expect an object with a "toolCallId" and "argsTextDelta" property.');return{type:"tool_call_delta",value:e}}},Xp={code:"d",name:"finish_message",parse:e=>{if(e==null||typeof e!="object"||!("finishReason"in e)||typeof e.finishReason!="string"||!("usage"in e)||e.usage==null||typeof e.usage!="object"||!("promptTokens"in e.usage)||!("completionTokens"in e.usage))throw new Error('"finish_message" parts expect an object with a "finishReason" and "usage" property.');return typeof e.usage.promptTokens!="number"&&(e.usage.promptTokens=Number.NaN),typeof e.usage.completionTokens!="number"&&(e.usage.completionTokens=Number.NaN),{type:"finish_message",value:e}}},xle=[Fp,Mp,$p,Up,jp,qp,zp,Vp,Hp,Wp,Gp,Kp,Yp,Xp],wle={[Fp.code]:Fp,[Mp.code]:Mp,[$p.code]:$p,[Up.code]:Up,[jp.code]:jp,[qp.code]:qp,[zp.code]:zp,[Vp.code]:Vp,[Hp.code]:Hp,[Wp.code]:Wp,[Gp.code]:Gp,[Kp.code]:Kp,[Yp.code]:Yp,[Xp.code]:Xp},iot={[Fp.name]:Fp.code,[Mp.name]:Mp.code,[$p.name]:$p.code,[Up.name]:Up.code,[jp.name]:jp.code,[qp.name]:qp.code,[zp.name]:zp.code,[Vp.name]:Vp.code,[Hp.name]:Hp.code,[Wp.name]:Wp.code,[Gp.name]:Gp.code,[Kp.name]:Kp.code,[Yp.name]:Yp.code,[Xp.name]:Xp.code},_le=xle.map(e=>e.code),Cle=e=>{let t=e.indexOf(":");if(t===-1)throw new Error("Failed to parse stream string. No separator found.");let r=e.slice(0,t);if(!_le.includes(r))throw new Error(`Failed to parse stream string. Invalid code ${r}.`);let n=r,o=e.slice(t+1),i=JSON.parse(o);return wle[n].parse(i)};var Sle=10;function Tle(e,t){let r=new Uint8Array(t),n=0;for(let o of e)r.set(o,n),n+=o.length;return e.length=0,r}async function*dN(e,{isAborted:t}={}){let r=new TextDecoder,n=[],o=0;for(;;){let{value:i}=await e.read();if(i&&(n.push(i),o+=i.length,i[i.length-1]!==Sle))continue;if(n.length===0)break;let a=Tle(n,o);o=0;let s=r.decode(a,{stream:!0}).split(`
|
|
12
|
-
`).filter(l=>l!=="").map(Cle);for(let l of s)yield l;if(t!=null&&t()){e.cancel();break}}}var sot=Symbol.for("vercel.ai.schema");var Zp=null,Ple=3,Ale=1,I_=e=>async({messages:t,onMessageStream:r})=>{try{Zp=new AbortController;let n=await go.post(Uo(`/api/v2/sessions/${e.sessionId}/streamMessage`),{json:{messages:t},signal:Zp.signal,timeout:!1});if(!n.ok){if((e.retryAttempt??0)<Ale&&(n.status===403||n.status===500||n.status===503))return await new Promise(s=>setTimeout(s,Ple*1e3)),I_({...e,retryAttempt:(e.retryAttempt??0)+1})({messages:t,onMessageStream:r});try{return{error:await n.json()||"Failed to fetch the chat response."}}catch{return{error:{message:"Failed to fetch the chat response."}}}}if(!n.body)throw new Error("The response body is empty.");let o="",i=n.body.getReader(),a=Cs();for await(let{type:s,value:l}of dN(i,{isAborted:()=>Zp===null}))if(s==="text")o+=l,r&&r({id:a,message:o});else if(s==="error")return{error:{message:l}};return Zp=null,{message:o}}catch(n){return console.error(n),n.name==="AbortError"?(Zp=null,{error:{message:"Request aborted"}}):n instanceof Error?{error:{message:n.message}}:{error:{message:"Failed to fetch the chat response."}}}};var fN=({url:e,isNewTab:t}={})=>{if(!e)return;if(!t){window.location.href=e;return}let r=window.open(e,"_blank");if(!r)return{blockedPopupUrl:e};try{if(r.closed)return{blockedPopupUrl:e};if(!r.opener)return r.close(),{blockedPopupUrl:e}}catch{return{blockedPopupUrl:e}}};var Kv=e=>typeof e=="string"?e:e instanceof Error?e.name+": "+e.message:JSON.stringify(e);var pN=Object.getPrototypeOf(async function(){}).constructor,mN=async({content:e,args:t})=>{try{await pN(...t.map(n=>n.id),Dle(e))(...t.map(n=>n.value))}catch(r){return{logs:[{status:"error",description:"Script block failed to execute",details:Kv(r)}]}}},Dle=e=>e.replace(/<script>/g,"").replace(/<\/script>/g,""),Qp=async({args:e,content:t})=>{try{await pN(...Object.keys(e),t)(...Object.keys(e).map(n=>e[n]))}catch(r){console.warn("Script threw an error:",r)}};var Yv=e=>{if(!ur(e)){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{console.warn("Failed to safely stringify variable value",e)}}};var kle=Object.getPrototypeOf(async function(){}).constructor,gN=async({content:e,args:t,isCode:r})=>{try{if(!isNaN(e)&&/0[^.].+/.test(e))return{replyToSend:e};let o=await kle(...t.map(i=>i.id),e.includes("return ")?e:`return ${e}`)(...t.map(i=>i.value));return{replyToSend:Yv(o)??void 0}}catch(n){return console.error(n),{replyToSend:Yv(e)??void 0,logs:r?[{status:"error",description:"Failed to execute Variable code",details:Kv(n)}]:void 0}}};var hN=async({secondsToWaitFor:e})=>{await new Promise(t=>setTimeout(t,e*1e3))};var vN=e=>{let t=document.createElement("script");t.innerHTML=`!function(f,b,e,v,n,t,s)
|
|
13
|
-
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
|
14
|
-
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
|
|
15
|
-
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
|
|
16
|
-
n.queue=[];t=b.createElement(e);t.async=!0;
|
|
17
|
-
t.src=v;s=b.getElementsByTagName(e)[0];
|
|
18
|
-
s.parentNode.insertBefore(t,s)}(window, document,'script',
|
|
19
|
-
'https://connect.facebook.net/en_US/fbevents.js');
|
|
20
|
-
${e.map(r=>`fbq('init', '${r}');`).join(`
|
|
21
|
-
`)}
|
|
22
|
-
fbq('track', 'PageView');`,document.head.appendChild(t)},yN=e=>{var r;if(!(e!=null&&e.eventType)||!e.pixelId)return;if(!window.fbq){console.error("Facebook Pixel was not properly initialized");return}let t=(r=e.params)!=null&&r.length?e.params.reduce((n,o)=>!o.key||!o.value?n:{...n,[o.key]:o.value},{}):void 0;if(e.eventType==="Custom"){if(!e.name)return;window.fbq("trackSingleCustom",e.pixelId,e.name,t)}window.fbq("trackSingle",e.pixelId,e.eventType,t)};var bN=async e=>{Ei(e==null?void 0:e.pixelId)||yN(e)};var EN=e=>{if(document.getElementById("gtm-noscript"))return"";let t=document.createElement("noscript");t.id="gtm-noscript";let r=document.createElement("iframe");return r.src=`https://www.googletagmanager.com/ns.html?id=${e}`,r.height="0",r.width="0",r.style.display="none",r.style.visibility="hidden",t.appendChild(r),t};var xN=async e=>{let t=e.customHeadCode;yr(t)&&vR(t);let r=e.gtmId;yr(r)&&document.body.prepend(EN(r));let n=e.pixelIds;tt(n)&&vN(n)};var wN=async({clientSideAction:e,context:t,onMessageStream:r})=>{var n;if("scriptToExecute"in e)return mN(e.scriptToExecute);if("redirect"in e)return fN(e.redirect);if("wait"in e)return await hN(e.wait),e.expectsDedicatedReply?{replyToSend:void 0}:void 0;if("setVariable"in e)return gN(e.setVariable.scriptToExecute);if("streamOpenAiChatCompletion"in e||"stream"in e){let{error:o,message:i}=await I_(t)({messages:"streamOpenAiChatCompletion"in e?(n=e.streamOpenAiChatCompletion)==null?void 0:n.messages:void 0,onMessageStream:r});return o?{replyToSend:void 0,logs:[{status:"error",description:"Message streaming returned an error",details:JSON.stringify(o,null,2)}]}:{replyToSend:i}}if("startPropsToInject"in e)return xN(e.startPropsToInject);if("pixel"in e)return bN(e.pixel);if("codeToExecute"in e)return Qp(e.codeToExecute)};var[R_,N_]=oe();var Ole=1e3,_N=wp(),CN=e=>{let[t,r]=oe({}),[n,o]=oe(e.initialChatReply.bot.theme),[i,a]=oe(!1),[s,l]=oe(!1),[u,c]=oe(),[f,d]=oe(e.initialChatReply.dynamicTheme),[p,v]=oe([]),h,[y,g,m,b]=Ps(oe([{input:e.initialChatReply.input,messages:e.initialChatReply.messages,clientSideActions:e.initialChatReply.clientSideActions}]),{key:`bot-${e.context.bot.id}-chatChunks`,storage:e.context.storage,onRecovered:()=>{}}),E=(K,z)=>{r(ae=>({...ae,[K]:z}))},C=K=>t()[K];mt(()=>{if(m()){let K=[...y()].reverse().find(z=>z.input);K!=null&&K.input&&v([K.input])}else e.initialChatReply.input&&v([e.initialChatReply.input])});let[x,P]=oe({}),N=(K,z)=>{P(ae=>({...ae,[K]:z}))},D=K=>x()[K]??0,R=()=>[...y()].pop(),M=()=>{var z;let K=p();if(K.length>0){let[ae,...ie]=K;(z=e.onNewBlock)==null||z.call(e,{id:ae.id,type:ae.type}),v(ie)}},I=async K=>{var ue,k,be,Oe;b(!1),a(!1);let z=(ue=R())==null?void 0:ue.input;K&&g(Te=>{let Ke=Te.length-1;if(Ke<0)return Te;let je=Te[Ke];return je.input?[...Te.slice(0,Ke),{...je,input:{...je.input,answer:K}}]:Te}),z!=null&&z.id&&e.onAnswer&&K&&e.onAnswer({message:$R(K),blockId:z.id});let ae=z!=null&&z.id&&K?{inputBlockId:z.id,inputType:z.type}:void 0,ie=setTimeout(()=>{l(!0)},Ole),{data:O,error:J}=await UR({sessionId:e.initialChatReply.sessionId,message:jR(K),messageMetadata:ae});if(clearTimeout(ie),l(!1),J){a(!0);let Te=[{description:"Failed to send the reply",details:J instanceof Gi?{status:J.response.status,body:await J.response.json()}:J,status:"error"}];await E_({sessionId:e.initialChatReply.sessionId,clientLogs:Te}),(k=e.onNewLogs)==null||k.call(e,Te);return}if(O){if(O.progress&&((be=e.onProgressUpdate)==null||be.call(e,O.progress)),O.lastMessageNewFormat&&(x_([...$v(),{inputIndex:[...y()].length-1,formattedMessage:O.lastMessageNewFormat}]),g(Te=>{var G;let Ke=Te.length-1;if(Ke<0)return Te;let je=Te[Ke];return!((G=je.input)!=null&&G.answer)||je.input.answer.type!=="text"?Te:[...Te.slice(0,Ke),{...je,input:{...je.input,answer:{...je.input.answer,label:O.lastMessageNewFormat}}}]})),O.logs&&((Oe=e.onNewLogs)==null||Oe.call(e,O.logs)),O.dynamicTheme&&d(O.dynamicTheme),O.input&&v([...p(),O.input]),O.clientSideActions){let Te=O.clientSideActions.filter(Ke=>ur(Ke.lastBubbleBlockId));if(await U(Te),O.clientSideActions.length===1&&O.clientSideActions[0].type==="stream"&&O.messages.length===0&&O.input===void 0)return}g(Te=>[...Te,{input:O.input,messages:O.messages,clientSideActions:O.clientSideActions}])}},B=({id:K,message:z})=>{l(!1);let ae=[...y()].pop();ae&&(ae.streamingMessageId!==K&&g(ie=>[...ie,{messages:[],streamingMessageId:K}]),N_({id:K,content:z}))},L=async K=>{var z;K&&((z=e.onNewLogs)==null||z.call(e,K),!e.context.isPreview&&await E_({sessionId:e.initialChatReply.sessionId,clientLogs:K}))},U=async K=>{if(!m())for(let z of K){("streamOpenAiChatCompletion"in z||"stream"in z)&&l(!0);let ae=await wN({clientSideAction:z,context:{sessionId:e.initialChatReply.sessionId},onMessageStream:B});if(ae&&"logs"in ae&&L(ae.logs),ae&&"replyToSend"in ae){l(!1),I(ae.replyToSend?{type:"text",value:ae.replyToSend}:void 0);return}ae&&"blockedPopupUrl"in ae&&c(ae.blockedPopupUrl)}};return mt(()=>{o(qR(e.initialChatReply.bot.theme,f()))}),dt(()=>{N_(void 0),x_([])}),T(_N.Provider,{value:{chatChunks:y,theme:n,dynamicTheme:f,setTheme:o,answers:t,setAnswer:E,getAnswer:C,hasError:i,setHasError:a,blockRef:h,currentBlock:R,blockedPopupUrl:u,setBlockedPopupUrl:c,isSending:s,displayedMessageIndexes:x,setDisplayedMessageIndex:N,getDisplayedMessageIndex:D,sendMessage:I,processClientSideActions:U,onBubblesDisplayed:M},get children(){return e.children}})},Xi=()=>{let e=Tv(_N);if(!e)throw new Error("useInputAnswer must be used within an InputAnswerProvider");return e};var[wt,SN]=oe();var Ile=V('<div class="flex items-center gap-1"><div class="w-2 h-2 rounded-full bubble__dot--1"></div><div class="w-2 h-2 rounded-full bubble__dot--2"></div><div class="w-2 h-2 rounded-full bubble__dot--3">'),Zi=()=>Ile();var TN={isAutoplayEnabled:!0};var Rle=V('<div><div class="flex w-full items-center"><div class="flex z-10 items-start w-full max-w-full"><div>'),Nle=V('<audio class="w-full animate-fade-in" controls>'),Lle=400,Ble=100,L_,PN=e=>{let t=!1,r,n,[o,i]=oe(!!e.onTransitionEnd);return et(()=>{L_=setTimeout(()=>{t||(t=!0,i(!1),setTimeout(()=>{var a;return(a=e.onTransitionEnd)==null?void 0:a.call(e,r)},Lle))},Ble)}),dt(()=>{L_&&clearTimeout(L_)}),(()=>{let a=Rle(),s=a.firstChild,l=s.firstChild,u=l.firstChild,c=r;return typeof c=="function"?lt(c,a):r=a,W(u,(()=>{let f=Ee(()=>!!o());return()=>f()?T(Zi,{}):(()=>{let d=Nle(),p=n;return typeof p=="function"?lt(p,d):n=d,le(v=>{var g,m;let h=(g=e.content)==null?void 0:g.url,y=e.onTransitionEnd?((m=e.content)==null?void 0:m.isAutoplayEnabled)??TN.isAutoplayEnabled:!1;return h!==v._v$3&&qe(d,"src",v._v$3=h),y!==v._v$4&&(d.autoplay=v._v$4=y),v},{_v$3:void 0,_v$4:void 0}),d})()})()),le(f=>{let d=Wt("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),p=Wt("bubble bubble--host relative transition-all duration-300",o()&&"bubble--typing");return d!==f._v$&&we(a,f._v$=d),p!==f._v$2&&we(u,f._v$2=p),f},{_v$:void 0,_v$2:void 0}),a})()};var[B_,AN]=oe("100%");var Fle=V('<div><div class="flex w-full items-center"><div class="flex z-10 items-start w-full max-w-full"><div>'),Mle=V('<div class="w-full overflow-y-auto">'),$le=V('<div class="animate-fade-in w-full">'),Ule=V('<iframe id="bubble--embed" class="w-full h-full rounded-md">'),F_,jle=400,DN=e=>{var s;let t,r,[n,o]=oe(!!e.onTransitionEnd),i=(s=e.content)==null?void 0:s.initFunction,a=l=>{var u,c,f,d;(c=(u=e.content)==null?void 0:u.waitForEvent)!=null&&c.isEnabled&&yr(l.data.name)&&l.data.name===((f=e.content)==null?void 0:f.waitForEvent.name)&&((d=e.onCompleted)==null||d.call(e,e.content.waitForEvent.saveDataInVariableId&&l.data.data?{type:"text",value:l.data.data}:void 0),window.removeEventListener("message",a))};return et(()=>{var l;if(i){Qp({args:{...i.args,botElement:r},content:i.content});let u=(l=e.content)==null?void 0:l.waitForEventFunction;u&&Qp({args:{...u.args,continueFlow:c=>{var f;return(f=e.onCompleted)==null?void 0:f.call(e,c?{type:"text",value:c}:void 0)}},content:u.content})}F_=setTimeout(()=>{var u,c;o(!1),!i&&((c=(u=e.content)==null?void 0:u.waitForEvent)!=null&&c.isEnabled)&&window.addEventListener("message",a),setTimeout(()=>{var f;(f=e.onTransitionEnd)==null||f.call(e,t)},jle)},2e3)}),dt(()=>{F_&&clearTimeout(F_),window.removeEventListener("message",a)}),(()=>{let l=Fle(),u=l.firstChild,c=u.firstChild,f=c.firstChild,d=t;return typeof d=="function"?lt(d,l):t=l,W(f,(()=>{let p=Ee(()=>!!n());return()=>p()?T(Zi,{}):(()=>{let v=$le();return W(v,T(ve,{when:i,get fallback(){return(()=>{let h=Ule();return le(()=>{var y;return qe(h,"src",(y=e.content)==null?void 0:y.url)}),h})()},get children(){let h=Mle(),y=r;return typeof y=="function"?lt(y,h):r=h,le(()=>`calc(${B_()} - 100px)`!=null?h.style.setProperty("max-height",`calc(${B_()} - 100px)`):h.style.removeProperty("max-height")),h}})),v})()})()),le(p=>{let v=nt("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),h=nt("bubble bubble--host relative transition-all duration-300 z-20 w-full",n()&&"bubble--typing");return v!==p._v$&&we(l,p._v$=v),h!==p._v$2&&we(f,p._v$2=h),p},{_v$:void 0,_v$2:void 0}),l})()};var kN={clickLink:{alt:"Bubble image"}};var qle=V('<img elementtiming="Bubble image" fetchpriority="high">'),zle=V('<div><div class="flex w-full items-center"><div class="flex z-10 items-start max-w-full"><div>'),Vle=V('<div class="animate-fade-in w-full">'),Hle=V('<a target="_blank" class="z-10 bubble">'),Wle=V('<figure class="z-10 w-full">'),Gle=400,Kle=5e3,Xv,M_=e=>{let t,r,[n,o]=oe(!!e.onTransitionEnd),i=()=>{n()&&(o(!1),setTimeout(()=>{var s;(s=e.onTransitionEnd)==null||s.call(e,t)},Gle))};et(()=>{r&&(Xv=setTimeout(i,Kle),r.onload=()=>{clearTimeout(Xv),i()})}),dt(()=>{Xv&&clearTimeout(Xv)});let a=(()=>{let s=qle(),l=r;return typeof l=="function"?lt(l,s):r=s,s.style.setProperty("max-height","512px"),le(u=>{var p,v,h,y,g;let c=(p=e.content)==null?void 0:p.url,f=((h=(v=e.content)==null?void 0:v.clickLink)==null?void 0:h.alt)??kN.clickLink.alt,d=nt(e.onTransitionEnd?"transition-opacity duration-[400ms] ease-in delay-200":void 0,(g=(y=e.content)==null?void 0:y.url)!=null&&g.endsWith(".svg")?"w-full":void 0,"rounded-md");return c!==u._v$&&qe(s,"src",u._v$=c),f!==u._v$2&&qe(s,"alt",u._v$2=f),d!==u._v$3&&we(s,u._v$3=d),u},{_v$:void 0,_v$2:void 0,_v$3:void 0}),s})();return(()=>{let s=zle(),l=s.firstChild,u=l.firstChild,c=u.firstChild,f=t;return typeof f=="function"?lt(f,s):t=s,W(c,(()=>{let d=Ee(()=>!!n());return()=>d()?T(Zi,{}):(()=>{let p=Vle();return W(p,(()=>{let v=Ee(()=>{var h;return!!((h=e.content)!=null&&h.clickLink)});return()=>v()?(()=>{let h=Hle();return W(h,a),le(()=>qe(h,"href",e.content.clickLink.url)),h})():(()=>{let h=Wle();return W(h,a),h})()})()),p})()})()),le(d=>{let p=nt("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),v=nt("bubble bubble--host relative transition-all duration-300",n()&&"bubble--typing");return p!==d._v$4&&we(s,d._v$4=p),v!==d._v$5&&we(c,d._v$5=v),d},{_v$4:void 0,_v$5:void 0}),s})()};var Yle=V("<br>"),Xle=V("<span>"),Zle=(e,t,r)=>{let n="";return e&&(n+="slate-bold"),t&&(n+=" slate-italic"),r&&(n+=" slate-underline"),n},ON=e=>(()=>{let t=Xle();return W(t,()=>e.text,null),W(t,T(ve,{get when(){return Ee(()=>!!e.isUniqueChild)()&&Ei(e.text)},get children(){return Yle()}}),null),le(()=>we(t,Zle(e.bold,e.italic,e.underline))),t})();var Qle=V('<a target="_blank" rel="noopener noreferrer">'),Jle=V("<ol>"),eue=V("<ul>"),tue=V("<li>"),rue=V("<span>"),nue=V("<div>"),Jl=e=>T($t,{get children(){return[T($e,{get when(){return tt(e.element.text)},get children(){return T(ON,kt(()=>e.element,{get isUniqueChild(){return e.isUniqueChild??!1}}))}}),T($e,{when:!0,get children(){return T($t,{get children(){return[T($e,{get when(){return e.element.type==="a"},get children(){let t=Qle();return W(t,T(Mt,{get each(){return e.element.children},children:r=>T(Jl,{element:r,get isUniqueChild(){var n;return((n=e.element.children)==null?void 0:n.length)===1}})})),le(()=>qe(t,"href",e.element.url)),t}}),T($e,{get when(){return e.element.type==="ol"},get children(){let t=Jle();return W(t,T(Mt,{get each(){return e.element.children},children:r=>T(Jl,{element:r,get isUniqueChild(){var n;return((n=e.element.children)==null?void 0:n.length)===1}})})),t}}),T($e,{get when(){return e.element.type==="ul"},get children(){let t=eue();return W(t,T(Mt,{get each(){return e.element.children},children:r=>T(Jl,{element:r,get isUniqueChild(){var n;return((n=e.element.children)==null?void 0:n.length)===1}})})),t}}),T($e,{get when(){return e.element.type==="li"},get children(){let t=tue();return W(t,T(Mt,{get each(){return e.element.children},children:r=>T(Jl,{element:r,get isUniqueChild(){var n;return((n=e.element.children)==null?void 0:n.length)===1}})})),t}}),T($e,{when:!0,get children(){return T(oue,{get element(){return e.element},get insideInlineVariable(){return e.insideInlineVariable??!1},get children(){return T(Mt,{get each(){return e.element.children},children:t=>T(Jl,{element:t,get isUniqueChild(){var r;return((r=e.element.children)==null?void 0:r.length)===1},get insideInlineVariable(){return e.element.type==="inline-variable"}})})}})}})]}})}})]}}),oue=e=>T($t,{get children(){return[T($e,{get when(){return e.element.type==="inline-variable"||e.insideInlineVariable},get children(){let t=rue();return W(t,()=>e.children),le(()=>qe(t,"data-element-type",e.element.type)),t}}),T($e,{when:!0,get children(){let t=nue();return W(t,()=>e.children),le(()=>qe(t,"data-element-type",e.element.type)),t}})]}});var VG=de(Re(),1),MA=de(Re(),1);function HN(e){return"init"in e}function V_(e){return!!e.write}function VN(e){return"v"in e||"e"in e}function ey(e){if("e"in e)throw e.e;if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}var ty=new WeakMap;function WN(e){var t;return ry(e)&&!!((t=ty.get(e))!=null&&t[0])}function Eue(e){let t=ty.get(e);t!=null&&t[0]&&(t[0]=!1,t[1].forEach(r=>r()))}function ny(e,t){let r=ty.get(e);if(!r){r=[!0,new Set],ty.set(e,r);let n=()=>{r[0]=!1};e.then(n,n)}r[1].add(t)}function ry(e){return typeof(e==null?void 0:e.then)=="function"}function GN(e,t,r){if(!r.p.has(e)){r.p.add(e);let n=()=>r.p.delete(e);t.then(n,n)}}function KN(e,t,r){var n;let o=new Set;for(let i of((n=r.get(e))==null?void 0:n.t)||[])o.add(i);for(let i of t.p)o.add(i);return o}var xue=(e,t,...r)=>t.read(...r),wue=(e,t,...r)=>t.write(...r),_ue=(e,t)=>{var r;return(r=t.INTERNAL_onInit)==null?void 0:r.call(t,e)},Cue=(e,t,r)=>{var n;return(n=t.onMount)==null?void 0:n.call(t,r)},Sue=(e,t)=>{var r;let n=mn(e),o=n[0],i=n[6],a=n[9];if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let s=o.get(t);return s||(s={d:new Map,p:new Set,n:0},o.set(t,s),(r=i.i)==null||r.call(i,t),a==null||a(e,t)),s},Tue=e=>{let t=mn(e),r=t[1],n=t[3],o=t[4],i=t[5],a=t[6],s=t[13],l=[],u=c=>{try{c()}catch(f){l.push(f)}};do{a.f&&u(a.f);let c=new Set,f=c.add.bind(c);n.forEach(d=>{var p;return(p=r.get(d))==null?void 0:p.l.forEach(f)}),n.clear(),i.forEach(f),i.clear(),o.forEach(f),o.clear(),c.forEach(u),n.size&&s(e)}while(n.size||i.size||o.size);if(l.length)throw new AggregateError(l)},Pue=e=>{let t=mn(e),r=t[1],n=t[2],o=t[3],i=t[11],a=t[14],s=t[17],l=[],u=new WeakSet,c=new WeakSet,f=Array.from(o);for(;f.length;){let d=f[f.length-1],p=i(e,d);if(c.has(d)){f.pop();continue}if(u.has(d)){if(n.get(d)===p.n)l.push([d,p]);else if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&n.has(d))throw new Error("[Bug] invalidated atom exists");c.add(d),f.pop();continue}u.add(d);for(let v of KN(d,p,r))u.has(v)||f.push(v)}for(let d=l.length-1;d>=0;--d){let[p,v]=l[d],h=!1;for(let y of v.d.keys())if(y!==p&&o.has(y)){h=!0;break}h&&(a(e,p),s(e,p)),n.delete(p)}},H_=new WeakSet,Aue=(e,t)=>{var r,n;let o=mn(e),i=o[1],a=o[2],s=o[3],l=o[6],u=o[7],c=o[11],f=o[12],d=o[13],p=o[14],v=o[16],h=o[17],y=o[20],g=c(e,t);if(VN(g)){if(i.has(t)&&a.get(t)!==g.n)return g;let D=!1;for(let[R,M]of g.d)if(p(e,R).n!==M){D=!0;break}if(!D)return g}g.d.clear();let m=!0;function b(){i.has(t)&&(h(e,t),d(e),f(e))}function E(D){var R;if(D===t){let I=c(e,D);if(!VN(I))if(HN(D))y(e,D,D.init);else throw new Error("no atom init");return ey(I)}let M=p(e,D);try{return ey(M)}finally{g.d.set(D,M.n),WN(g.v)&&GN(t,g.v,M),i.has(t)&&((R=i.get(D))==null||R.t.add(t)),m||b()}}let C,x,P={get signal(){return C||(C=new AbortController),C.signal},get setSelf(){return(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&console.warn("[DEPRECATED] setSelf is deprecated and will be removed in v3."),(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!V_(t)&&console.warn("setSelf function cannot be used with read-only atom"),!x&&V_(t)&&(x=(...D)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&m&&console.warn("setSelf function cannot be called in sync"),!m)try{return v(e,t,...D)}finally{d(e),f(e)}}),x}},N=g.n;try{(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&H_.delete(e);let D=u(e,t,E,P);return(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&H_.has(e)&&console.warn("Detected store mutation during atom read. This is not supported."),y(e,t,D),ry(D)&&(ny(D,()=>C==null?void 0:C.abort()),D.then(b,b)),(r=l.r)==null||r.call(l,t),g}catch(D){return delete g.v,g.e=D,++g.n,g}finally{m=!1,N!==g.n&&a.get(t)===N&&(a.set(t,g.n),s.add(t),(n=l.c)==null||n.call(l,t))}},Due=(e,t)=>{let r=mn(e),n=r[1],o=r[2],i=r[11],a=[t];for(;a.length;){let s=a.pop(),l=i(e,s);for(let u of KN(s,l,n)){let c=i(e,u);o.set(u,c.n),a.push(u)}}},kue=(e,t,...r)=>{let n=mn(e),o=n[3],i=n[6],a=n[8],s=n[11],l=n[12],u=n[13],c=n[14],f=n[15],d=n[16],p=n[17],v=n[20],h=!0,y=m=>ey(c(e,m)),g=(m,...b)=>{var E;let C=s(e,m);try{if(m===t){if(!HN(m))throw new Error("atom not writable");(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&H_.add(e);let x=C.n,P=b[0];v(e,m,P),p(e,m),x!==C.n&&(o.add(m),f(e,m),(E=i.c)==null||E.call(i,m));return}else return d(e,m,...b)}finally{h||(u(e),l(e))}};try{return a(e,t,y,g,...r)}finally{h=!1}},Oue=(e,t)=>{var r;let n=mn(e),o=n[1],i=n[3],a=n[6],s=n[11],l=n[15],u=n[18],c=n[19],f=s(e,t),d=o.get(t);if(d&&!WN(f.v)){for(let[p,v]of f.d)if(!d.d.has(p)){let h=s(e,p);u(e,p).t.add(t),d.d.add(p),v!==h.n&&(i.add(p),l(e,p),(r=a.c)==null||r.call(a,p))}for(let p of d.d)if(!f.d.has(p)){d.d.delete(p);let v=c(e,p);v==null||v.t.delete(t)}}},Iue=(e,t)=>{var r;let n=mn(e),o=n[1],i=n[4],a=n[6],s=n[10],l=n[11],u=n[12],c=n[13],f=n[14],d=n[16],p=n[18],v=l(e,t),h=o.get(t);if(!h){f(e,t);for(let y of v.d.keys())p(e,y).t.add(t);if(h={l:new Set,d:new Set(v.d.keys()),t:new Set},o.set(t,h),V_(t)){let y=()=>{let g=!0,m=(...b)=>{try{return d(e,t,...b)}finally{g||(c(e),u(e))}};try{let b=s(e,t,m);b&&(h.u=()=>{g=!0;try{b()}finally{g=!1}})}finally{g=!1}};i.add(y)}(r=a.m)==null||r.call(a,t)}return h},Rue=(e,t)=>{var r,n;let o=mn(e),i=o[1],a=o[5],s=o[6],l=o[11],u=o[19],c=l(e,t),f=i.get(t);if(!f||f.l.size)return f;let d=!1;for(let p of f.t)if((r=i.get(p))!=null&&r.d.has(t)){d=!0;break}if(!d){f.u&&a.add(f.u),f=void 0,i.delete(t);for(let p of c.d.keys()){let v=u(e,p);v==null||v.t.delete(t)}(n=s.u)==null||n.call(s,t);return}return f},Nue=(e,t,r)=>{let n=mn(e)[11],o=n(e,t),i="v"in o,a=o.v;if(ry(r))for(let s of o.d.keys())GN(t,r,n(e,s));o.v=r,delete o.e,(!i||!Object.is(a,o.v))&&(++o.n,ry(a)&&Eue(a))},Lue=(e,t)=>{let r=mn(e)[14];return ey(r(e,t))},Bue=(e,t,...r)=>{let n=mn(e),o=n[12],i=n[13],a=n[16];try{return a(e,t,...r)}finally{i(e),o(e)}},Fue=(e,t,r)=>{let n=mn(e),o=n[12],i=n[18],a=n[19],l=i(e,t).l;return l.add(r),o(e),()=>{l.delete(r),a(e,t),o(e)}},YN=new WeakMap,mn=e=>{let t=YN.get(e);if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!t)throw new Error("Store must be created by buildStore to read its building blocks");return t};function XN(...e){let t={get(n){let o=mn(t)[21];return o(t,n)},set(n,...o){let i=mn(t)[22];return i(t,n,...o)},sub(n,o){let i=mn(t)[23];return i(t,n,o)}},r=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},xue,wue,_ue,Cue,Sue,Tue,Pue,Aue,Due,kue,Oue,Iue,Rue,Nue,Lue,Bue,Fue,void 0].map((n,o)=>e[o]||n);return YN.set(t,Object.freeze(r)),t}var Mue=0;function yo(e,t){let r=`atom${++Mue}`,n={toString(){return(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&this.debugLabel?r+":"+this.debugLabel:r}};return typeof e=="function"?n.read=e:(n.init=e,n.read=$ue,n.write=Uue),t&&(n.write=t),n}function $ue(e){return e(this)}function Uue(e,t,r){return t(this,typeof r=="function"?r(e(this)):r)}var ZN;function eu(){return ZN?ZN():XN()}var em;function QN(){return em||(em=eu(),(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=em),globalThis.__JOTAI_DEFAULT_STORE__!==em&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),em}var Zr=de(Re(),1);var jue=(0,Zr.createContext)(void 0);function oy(e){let t=(0,Zr.useContext)(jue);return(e==null?void 0:e.store)||t||QN()}var G_=e=>typeof(e==null?void 0:e.then)=="function",K_=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},que=Zr.default.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(K_(e),e)}),W_=new WeakMap,JN=(e,t)=>{let r=W_.get(e);return r||(r=new Promise((n,o)=>{let i=e,a=u=>c=>{i===u&&n(c)},s=u=>c=>{i===u&&o(c)},l=()=>{try{let u=t();G_(u)?(W_.set(u,r),i=u,u.then(a(u),s(u)),ny(u,l)):n(u)}catch(u){o(u)}};e.then(a(e),s(e)),ny(e,l)}),W_.set(e,r)),r};function Y_(e,t){let{delay:r,unstable_promiseStatus:n=!Zr.default.use}=t||{},o=oy(t),[[i,a,s],l]=(0,Zr.useReducer)(c=>{let f=o.get(e);return Object.is(c[0],f)&&c[1]===o&&c[2]===e?c:[f,o,e]},void 0,()=>[o.get(e),o,e]),u=i;if((a!==o||s!==e)&&(l(),u=o.get(e)),(0,Zr.useEffect)(()=>{let c=o.sub(e,()=>{if(n)try{let f=o.get(e);G_(f)&&K_(JN(f,()=>o.get(e)))}catch{}if(typeof r=="number"){setTimeout(l,r);return}l()});return l(),c},[o,e,r,n]),(0,Zr.useDebugValue)(u),G_(u)){let c=JN(u,()=>o.get(e));return n&&K_(c),que(c)}return u}function Fc(e,t){let r=oy(t);return(0,Zr.useCallback)((...o)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return r.set(e,...o)},[r,e])}function X_(e,t){return[Y_(e,t),Fc(e,t)]}var Vo=de(Re(),1);var lL=de(Re(),1);var tL=de(Re(),1);var eL=new WeakMap;function rL(e,t){let r=oy(t),n=zue(r);for(let[o,...i]of e)(!n.has(o)||t!=null&&t.dangerouslyForceHydrate)&&(n.add(o),r.set(o,...i))}var zue=e=>{let t=eL.get(e);return t||(t=new WeakSet,eL.set(e,t)),t};var Vue=Object.defineProperty,Hue=Object.defineProperties,Wue=Object.getOwnPropertyDescriptors,iy=Object.getOwnPropertySymbols,iL=Object.prototype.hasOwnProperty,aL=Object.prototype.propertyIsEnumerable,nL=(e,t,r)=>t in e?Vue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$r=(e,t)=>{for(var r in t||(t={}))iL.call(t,r)&&nL(e,r,t[r]);if(iy)for(var r of iy(t))aL.call(t,r)&&nL(e,r,t[r]);return e},Z_=(e,t)=>Hue(e,Wue(t)),sL=(e,t)=>{var r={};for(var n in e)iL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&iy)for(var n of iy(e))t.indexOf(n)<0&&aL.call(e,n)&&(r[n]=e[n]);return r},oL=e=>typeof e=="function"?{__fn:e}:e,Gue=e=>e&&typeof e=="object"&&"__fn"in e?e.__fn:e,Kue=e=>{let t=yo(oL(e));return yo(r=>Gue(r(t)),(r,n,o)=>n(t,oL(o)))},Yue=(e,t,r={})=>{let n=[];for(let o of Object.keys(e)){let i=t[o];i!==void 0&&n.push([e[o],i])}rL(n,r)},Xue=(e,t,{store:r}={})=>{for(let n of Object.keys(e)){let o=t[n],i=e[n],a=Fc(i,{store:r});lL.default.useEffect(()=>{o!=null&&a(o)},[a,o])}},ay=(e,t)=>`${e}:${t}`,J_="provider",eC=Vo.default.createContext(new Map),Zue=(e,t=J_,r=!0)=>{var n;let o=Vo.default.useContext(eC),i=(n=o.get(ay(e,t)))!=null?n:o.get(ay(e,J_));return!i&&r&&console.warn(`Tried to access jotai store '${e}' outside of a matching provider.`),i},Que=e=>{var t=e,{initialValues:r,children:n,store:o,atoms:i}=t,a=sL(t,["initialValues","children","store","atoms"]);return Yue(i,$r($r({},r),a),{store:o}),Xue(i,a,{store:o}),Vo.default.createElement(Vo.default.Fragment,null,n)},Jue=(e,t,r={})=>{let n=r.effect;return o=>{var i=o,{store:a,scope:s,children:l,resetKey:u}=i,c=sL(i,["store","scope","children","resetKey"]);let[f,d]=Vo.default.useState(eu());Vo.default.useEffect(()=>{u&&d(eu())},[u]);let p=Vo.default.useContext(eC),v=Vo.default.useMemo(()=>{let h=new Map(p);return s&&h.set(ay(e,s),f),h.set(ay(e,J_),f),h},[p,s,f]);return Vo.default.createElement(eC.Provider,{value:v},Vo.default.createElement(Que,$r({store:f,atoms:t},c),!!n&&Vo.default.createElement(n,null),l))}},uL=(e="")=>e.length>0?e[0].toUpperCase()+e.slice(1):"",ece=(e="")=>`${uL(e)}Provider`,tce=(e="")=>e.length>0?`${e}Store`:"store",rce=(e="")=>`use${uL(e)}Store`,nce=e=>!!e&&typeof e=="object"&&"read"in e&&typeof e.read=="function",Q_=(e,t)=>Object.fromEntries(Object.entries(e).map(([r,n])=>[r,(o={})=>n($r($r({},t),o))])),Yn=(e={})=>typeof e=="string"?{scope:e}:e,sy=(e,{name:t,delay:r,effect:n,extend:o})=>{let i=ece(t),a=rce(t),s=tce(t),l={},u={},c={};for(let[x,P]of Object.entries(e)){let N=nce(P)?P:Kue(P);l[x]=N;let D="write"in N;c[x]=D,D&&(u[x]=N)}let f=$r({},l);if(o){let x=o(l);for(let[P,N]of Object.entries(x))f[P]=N,c[P]="write"in N}let d={},p={},v={},h=(x={})=>{let{scope:P,store:N,warnIfNoStore:D=!0}=Yn(x),R=Zue(t,P,!N&&D);return N??R},y=(x,P)=>{var N;let D=Yn(P),R=h($r({warnIfNoStore:!1},D));return Y_(x,{store:R,delay:(N=D.delay)!=null?N:r})},g=(x,P)=>{let N=h(P);return Fc(x,{store:N})},m=(x,P)=>{let N=h(P),{delay:D=r}=Yn(P);return X_(x,{store:N,delay:D})};for(let x of Object.keys(f)){let P=f[x],N=c[x];d[x]=(D={})=>y(P,D),N&&(p[x]=(D={})=>g(P,D),v[x]=(D={})=>m(P,D))}let b=Jue(t,u,{effect:n}),E={atom:f,name:t},C=(x={})=>({get:Z_($r({},Q_(d,Yn(x))),{atom:(P,N)=>y(P,$r($r({},Yn(x)),Yn(N)))}),set:Z_($r({},Q_(p,Yn(x))),{atom:(P,N)=>g(P,$r($r({},Yn(x)),Yn(N)))}),use:Z_($r({},Q_(v,Yn(x))),{atom:(P,N)=>m(P,$r($r({},Yn(x)),Yn(N)))}),store:P=>h($r($r({},Yn(x)),Yn(P)))});return{[i]:b,[a]:C,[s]:E,name:t}};var Ur=de(Re()),cce=de(tC());function oC(){return oC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},oC.apply(null,arguments)}var mL=["shift","alt","meta","mod","ctrl"],dce={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function Is(e){return(e&&dce[e]||e||"").trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function fce(e){return mL.includes(e)}function rC(e,t){return t===void 0&&(t=","),e.split(t)}function nC(e,t,r){t===void 0&&(t="+");var n=e.toLocaleLowerCase().split(t).map(function(a){return Is(a)}),o={alt:n.includes("alt"),ctrl:n.includes("ctrl")||n.includes("control"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(function(a){return!mL.includes(a)});return oC({},o,{keys:i,description:r,hotkey:e})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(e){e.key!==void 0&&hL([Is(e.key),Is(e.code)])}),document.addEventListener("keyup",function(e){e.key!==void 0&&vL([Is(e.key),Is(e.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){Rs.clear()})})();var Rs=new Set;function iC(e){return Array.isArray(e)}function gL(e,t){t===void 0&&(t=",");var r=iC(e)?e:e.split(t);return r.every(function(n){return Rs.has(n.trim().toLowerCase())})}function hL(e){var t=Array.isArray(e)?e:[e];Rs.has("meta")&&Rs.forEach(function(r){return!fce(r)&&Rs.delete(r.toLowerCase())}),t.forEach(function(r){return Rs.add(r.toLowerCase())})}function vL(e){var t=Array.isArray(e)?e:[e];e==="meta"?Rs.clear():t.forEach(function(r){return Rs.delete(r.toLowerCase())})}function pce(e,t,r){(typeof r=="function"&&r(e,t)||r===!0)&&e.preventDefault()}function mce(e,t,r){return typeof r=="function"?r(e,t):r===!0||r===void 0}function gce(e){return yL(e,["input","textarea","select"])}function yL(e,t){t===void 0&&(t=!1);var r=e.target,n=e.composed,o=null;return hce(r)&&n?o=e.composedPath()[0]&&e.composedPath()[0].tagName:o=r&&r.tagName,iC(t)?!!(o&&t&&t.some(function(i){var a;return i.toLowerCase()===((a=o)==null?void 0:a.toLowerCase())})):!!(o&&t&&t)}function hce(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function vce(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):t?e.some(function(r){return t.includes(r)})||e.includes("*"):!0}var yce=function(t,r,n){n===void 0&&(n=!1);var o=r.alt,i=r.meta,a=r.mod,s=r.shift,l=r.ctrl,u=r.keys,c=t.key,f=t.code,d=t.ctrlKey,p=t.metaKey,v=t.shiftKey,h=t.altKey,y=Is(f),g=c.toLowerCase();if(!(u!=null&&u.includes(y))&&!(u!=null&&u.includes(g))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(y))return!1;if(!n){if(o===!h&&g!=="alt"||s===!v&&g!=="shift")return!1;if(a){if(!p&&!d)return!1}else if(i===!p&&g!=="meta"&&g!=="os"||l===!d&&g!=="ctrl"&&g!=="control")return!1}return u&&u.length===1&&(u.includes(g)||u.includes(y))?!0:u?gL(u):!u},bce=(0,Ur.createContext)(void 0),Ece=function(){return(0,Ur.useContext)(bce)};function bL(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(r,n){return r&&bL(e[n],t[n])},!0):e===t}var xce=(0,Ur.createContext)({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),wce=function(){return(0,Ur.useContext)(xce)};function _ce(e){var t=(0,Ur.useRef)(void 0);return bL(t.current,e)||(t.current=e),t.current}var pL=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},Cce=typeof window<"u"?Ur.useLayoutEffect:Ur.useEffect;function uy(e,t,r,n){var o=(0,Ur.useState)(null),i=o[0],a=o[1],s=(0,Ur.useRef)(!1),l=r instanceof Array?n instanceof Array?void 0:n:r,u=iC(e)?e.join(l==null?void 0:l.splitKey):e,c=r instanceof Array?r:n instanceof Array?n:void 0,f=(0,Ur.useCallback)(t,c??[]),d=(0,Ur.useRef)(f);c?d.current=f:d.current=t;var p=_ce(l),v=wce(),h=v.enabledScopes,y=Ece();return Cce(function(){if(!((p==null?void 0:p.enabled)===!1||!vce(h,p==null?void 0:p.scopes))){var g=function(x,P){var N;if(P===void 0&&(P=!1),!(gce(x)&&!yL(x,p==null?void 0:p.enableOnFormTags))){if(i!==null){var D=i.getRootNode();if((D instanceof Document||D instanceof ShadowRoot)&&D.activeElement!==i&&!i.contains(D.activeElement)){pL(x);return}}(N=x.target)!=null&&N.isContentEditable&&!(p!=null&&p.enableOnContentEditable)||rC(u,p==null?void 0:p.splitKey).forEach(function(R){var M,I=nC(R,p==null?void 0:p.combinationKey);if(yce(x,I,p==null?void 0:p.ignoreModifiers)||(M=I.keys)!=null&&M.includes("*")){if(p!=null&&p.ignoreEventWhen!=null&&p.ignoreEventWhen(x)||P&&s.current)return;if(pce(x,I,p==null?void 0:p.preventDefault),!mce(x,I,p==null?void 0:p.enabled)){pL(x);return}d.current(x,I),P||(s.current=!0)}})}},m=function(x){x.key!==void 0&&(hL(Is(x.code)),((p==null?void 0:p.keydown)===void 0&&(p==null?void 0:p.keyup)!==!0||p!=null&&p.keydown)&&g(x))},b=function(x){x.key!==void 0&&(vL(Is(x.code)),s.current=!1,p!=null&&p.keyup&&g(x,!0))},E=i||(l==null?void 0:l.document)||document;return E.addEventListener("keyup",b,l==null?void 0:l.eventListenerOptions),E.addEventListener("keydown",m,l==null?void 0:l.eventListenerOptions),y&&rC(u,p==null?void 0:p.splitKey).forEach(function(C){return y.addHotkey(nC(C,p==null?void 0:p.combinationKey,p==null?void 0:p.description))}),function(){E.removeEventListener("keyup",b,l==null?void 0:l.eventListenerOptions),E.removeEventListener("keydown",m,l==null?void 0:l.eventListenerOptions),y&&rC(u,p==null?void 0:p.splitKey).forEach(function(C){return y.removeHotkey(nC(C,p==null?void 0:p.combinationKey,p==null?void 0:p.description))})}}},[i,u,p,h]),a}var TL=Symbol.for("immer-nothing"),EL=Symbol.for("immer-draftable"),Ot=Symbol.for("immer-state");function Ho(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var tm=Object.getPrototypeOf;function Mc(e){return!!e&&!!e[Ot]}function Na(e){var t;return e?PL(e)||Array.isArray(e)||!!e[EL]||!!((t=e.constructor)!=null&&t[EL])||am(e)||gy(e):!1}var Sce=Object.prototype.constructor.toString(),xL=new WeakMap;function PL(e){if(!e||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=xL.get(r);return n===void 0&&(n=Function.toString.call(r),xL.set(r,n)),n===Sce}function rm(e,t,r=!0){my(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function my(e){let t=e[Ot];return t?t.type_:Array.isArray(e)?1:am(e)?2:gy(e)?3:0}function lC(e,t){return my(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function AL(e,t,r){let n=my(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Tce(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function am(e){return e instanceof Map}function gy(e){return e instanceof Set}function jr(e){return e.copy_||e.base_}function uC(e,t){if(am(e))return new Map(e);if(gy(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=PL(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Ot];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],s=n[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(tm(e),n)}else{let n=tm(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function mC(e,t=!1){return hy(e)||Mc(e)||!Na(e)||(my(e)>1&&Object.defineProperties(e,{set:cy,add:cy,clear:cy,delete:cy}),Object.freeze(e),t&&Object.values(e).forEach(r=>mC(r,!0))),e}function Pce(){Ho(2)}var cy={value:Pce};function hy(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var cC={};function tu(e){let t=cC[e];return t||Ho(0,e),t}function Ace(e,t){cC[e]||(cC[e]=t)}var nm;function dy(){return nm}function Dce(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function wL(e,t){t&&(tu("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function dC(e){fC(e),e.drafts_.forEach(kce),e.drafts_=null}function fC(e){e===nm&&(nm=e.parent_)}function _L(e){return nm=Dce(nm,e)}function kce(e){let t=e[Ot];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function CL(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ot].modified_&&(dC(t),Ho(4)),Na(e)&&(e=fy(t,e),t.parent_||py(t,e)),t.patches_&&tu("Patches").generateReplacementPatches_(r[Ot].base_,e,t.patches_,t.inversePatches_)):e=fy(t,r,[]),dC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==TL?e:void 0}function fy(e,t,r){if(hy(t))return t;let n=e.immer_.shouldUseStrictIteration(),o=t[Ot];if(!o)return rm(t,(i,a)=>SL(e,o,t,i,a,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return py(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;let i=o.copy_,a=i,s=!1;o.type_===3&&(a=new Set(i),i.clear(),s=!0),rm(a,(l,u)=>SL(e,o,i,l,u,r,s),n),py(e,i,!1),r&&e.patches_&&tu("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function SL(e,t,r,n,o,i,a){if(o==null||typeof o!="object"&&!a)return;let s=hy(o);if(!(s&&!a)){if(Mc(o)){let l=i&&t&&t.type_!==3&&!lC(t.assigned_,n)?i.concat(n):void 0,u=fy(e,o,l);if(AL(r,n,u),Mc(u))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(Na(o)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&s)return;fy(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(am(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&py(e,o)}}}function py(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&mC(t,r)}function Oce(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:dy(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=gC;r&&(o=[n],i=om);let{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,s}var gC={get(e,t){if(t===Ot)return e;let r=jr(e);if(!lC(r,t))return Ice(e,r,t);let n=r[t];return e.finalized_||!Na(n)?n:n===aC(e.base_,t)?(sC(e),e.copy_[t]=im(n,e)):n},has(e,t){return t in jr(e)},ownKeys(e){return Reflect.ownKeys(jr(e))},set(e,t,r){let n=DL(jr(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=aC(jr(e),t),i=o==null?void 0:o[Ot];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Tce(r,o)&&(r!==void 0||lC(e.base_,t)))return!0;sC(e),Ra(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return aC(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,sC(e),Ra(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=jr(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Ho(11)},getPrototypeOf(e){return tm(e.base_)},setPrototypeOf(){Ho(12)}},om={};rm(gC,(e,t)=>{om[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});om.deleteProperty=function(e,t){return om.set.call(this,e,t,void 0)};om.set=function(e,t,r){return gC.set.call(this,e[0],t,r,e[0])};function aC(e,t){let r=e[Ot];return(r?jr(r):e)[t]}function Ice(e,t,r){var o;let n=DL(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function DL(e,t){if(!(t in e))return;let r=tm(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=tm(r)}}function Ra(e){e.modified_||(e.modified_=!0,e.parent_&&Ra(e.parent_))}function sC(e){e.copy_||(e.copy_=uC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Rce=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let a=this;return function(l=i,...u){return a.produce(l,c=>r.call(this,c,...u))}}typeof r!="function"&&Ho(6),n!==void 0&&typeof n!="function"&&Ho(7);let o;if(Na(t)){let i=_L(this),a=im(t,void 0),s=!0;try{o=r(a),s=!1}finally{s?dC(i):fC(i)}return wL(i,n),CL(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===TL&&(o=void 0),this.autoFreeze_&&mC(o,!0),n){let i=[],a=[];tu("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else Ho(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,l=>t(l,...s));let n,o;return[this.produce(t,r,(a,s)=>{n=a,o=s}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Na(e)||Ho(8),Mc(e)&&(e=Nce(e));let t=_L(this),r=im(e,void 0);return r[Ot].isManual_=!0,fC(t),r}finishDraft(e,t){let r=e&&e[Ot];(!r||!r.isManual_)&&Ho(9);let{scope_:n}=r;return wL(n,t),CL(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=tu("Patches").applyPatches_;return Mc(e)?n(e,t):this.produce(e,o=>n(o,t))}};function im(e,t){let r=am(e)?tu("MapSet").proxyMap_(e,t):gy(e)?tu("MapSet").proxySet_(e,t):Oce(e,t);return(t?t.scope_:dy()).drafts_.push(r),r}function Nce(e){return Mc(e)||Ho(10,e),kL(e)}function kL(e){if(!Na(e)||hy(e))return e;let t=e[Ot],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=uC(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=uC(e,!0);return rm(r,(o,i)=>{AL(r,o,kL(i))},n),t&&(t.finalized_=!1),r}function OL(){class e extends Map{constructor(l,u){super(),this[Ot]={type_:2,parent_:u,scope_:u?u.scope_:dy(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:l,draft_:this,isManual_:!1,revoked_:!1}}get size(){return jr(this[Ot]).size}has(l){return jr(this[Ot]).has(l)}set(l,u){let c=this[Ot];return a(c),(!jr(c).has(l)||jr(c).get(l)!==u)&&(r(c),Ra(c),c.assigned_.set(l,!0),c.copy_.set(l,u),c.assigned_.set(l,!0)),this}delete(l){if(!this.has(l))return!1;let u=this[Ot];return a(u),r(u),Ra(u),u.base_.has(l)?u.assigned_.set(l,!1):u.assigned_.delete(l),u.copy_.delete(l),!0}clear(){let l=this[Ot];a(l),jr(l).size&&(r(l),Ra(l),l.assigned_=new Map,rm(l.base_,u=>{l.assigned_.set(u,!1)}),l.copy_.clear())}forEach(l,u){let c=this[Ot];jr(c).forEach((f,d,p)=>{l.call(u,this.get(d),d,this)})}get(l){let u=this[Ot];a(u);let c=jr(u).get(l);if(u.finalized_||!Na(c)||c!==u.base_.get(l))return c;let f=im(c,u);return r(u),u.copy_.set(l,f),f}keys(){return jr(this[Ot]).keys()}values(){let l=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{let u=l.next();return u.done?u:{done:!1,value:this.get(u.value)}}}}entries(){let l=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{let u=l.next();if(u.done)return u;let c=this.get(u.value);return{done:!1,value:[u.value,c]}}}}[Symbol.iterator](){return this.entries()}}function t(s,l){return new e(s,l)}function r(s){s.copy_||(s.assigned_=new Map,s.copy_=new Map(s.base_))}class n extends Set{constructor(l,u){super(),this[Ot]={type_:3,parent_:u,scope_:u?u.scope_:dy(),modified_:!1,finalized_:!1,copy_:void 0,base_:l,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return jr(this[Ot]).size}has(l){let u=this[Ot];return a(u),u.copy_?!!(u.copy_.has(l)||u.drafts_.has(l)&&u.copy_.has(u.drafts_.get(l))):u.base_.has(l)}add(l){let u=this[Ot];return a(u),this.has(l)||(i(u),Ra(u),u.copy_.add(l)),this}delete(l){if(!this.has(l))return!1;let u=this[Ot];return a(u),i(u),Ra(u),u.copy_.delete(l)||(u.drafts_.has(l)?u.copy_.delete(u.drafts_.get(l)):!1)}clear(){let l=this[Ot];a(l),jr(l).size&&(i(l),Ra(l),l.copy_.clear())}values(){let l=this[Ot];return a(l),i(l),l.copy_.values()}entries(){let l=this[Ot];return a(l),i(l),l.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(l,u){let c=this.values(),f=c.next();for(;!f.done;)l.call(u,f.value,f.value,this),f=c.next()}}function o(s,l){return new n(s,l)}function i(s){s.copy_||(s.copy_=new Set,s.base_.forEach(l=>{if(Na(l)){let u=im(l,s);s.drafts_.set(l,u),s.copy_.add(u)}else s.copy_.add(l)}))}function a(s){s.revoked_&&Ho(3,JSON.stringify(jr(s)))}Ace("MapSet",{proxyMap_:t,proxySet_:o})}var pC=new Rce,IL=pC.produce;var RL=pC.setAutoFreeze.bind(pC);var Vr=de(Re(),1);var Bfe=Symbol(),NT=Symbol(),Qm="a",r2="f",e2="p",n2="c",o2="t",kT="n",OT="g",i2="h",Bb="w",a2="o",s2="k",Ffe=(e,t)=>new Proxy(e,t),IT=Object.getPrototypeOf,RT=new WeakMap,l2=e=>e&&(RT.has(e)?RT.get(e):IT(e)===Object.prototype||IT(e)===Array.prototype),t2=e=>typeof e=="object"&&e!==null,Mfe=e=>Object.values(Object.getOwnPropertyDescriptors(e)).some(t=>!t.configurable&&!t.writable),$fe=e=>{if(Array.isArray(e))return Array.from(e);let t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(r=>{r.configurable=!0}),Object.create(IT(e),t)},Ufe=(e,t)=>{let r={[r2]:t},n=!1,o=(s,l)=>{if(!n){let u=r[Qm].get(e);if(u||(u={},r[Qm].set(e,u)),s===Bb)u[Bb]=!0;else{let c=u[s];c||(c=new Set,u[s]=c),c.add(l)}}},i=()=>{n=!0,r[Qm].delete(e)},a={get(s,l){return l===NT?e:(o(s2,l),LT(Reflect.get(s,l),r[Qm],r[n2],r[o2]))},has(s,l){return l===Bfe?(i(),!0):(o(i2,l),Reflect.has(s,l))},getOwnPropertyDescriptor(s,l){return o(a2,l),Reflect.getOwnPropertyDescriptor(s,l)},ownKeys(s){return o(Bb),Reflect.ownKeys(s)}};return t&&(a.set=a.deleteProperty=()=>!1),[a,r]},u2=e=>e[NT]||e,LT=(e,t,r,n)=>{if(!l2(e))return e;let o=n&&n.get(e);if(!o){let l=u2(e);Mfe(l)?o=[l,$fe(l)]:o=[l],n==null||n.set(e,o)}let[i,a]=o,s=r&&r.get(i);return(!s||s[1][r2]!==!!a)&&(s=Ufe(i,!!a),s[1][e2]=Ffe(a||i,s[0]),r&&r.set(i,s)),s[1][Qm]=t,s[1][n2]=r,s[1][o2]=n,s[1][e2]},jfe=(e,t)=>{let r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((o,i)=>o!==n[i])},Fb=(e,t,r,n,o=Object.is)=>{if(o(e,t))return!1;if(!t2(e)||!t2(t))return!0;let i=r.get(u2(e));if(!i)return!0;if(n){let s=n.get(e);if(s&&s[kT]===t)return s[OT];n.set(e,{[kT]:t,[OT]:!1})}let a=null;try{for(let s of i[i2]||[])if(a=Reflect.has(e,s)!==Reflect.has(t,s),a)return a;if(i[Bb]===!0){if(a=jfe(e,t),a)return a}else for(let s of i[a2]||[]){let l=!!Reflect.getOwnPropertyDescriptor(e,s),u=!!Reflect.getOwnPropertyDescriptor(t,s);if(a=l!==u,a)return a}for(let s of i[s2]||[])if(a=Fb(e[s],t[s],r,n,o),a)return a;return a===null&&(a=!0),a}finally{n&&n.set(e,{[kT]:t,[OT]:a})}};var c2=e=>l2(e)&&e[NT]||null,BT=(e,t=!0)=>{RT.set(e,t)};var d2=e=>()=>{let[,r]=(0,Vr.useReducer)(c=>c+1,0),n=new WeakMap,o=(0,Vr.useRef)(),i=(0,Vr.useRef)(),a=(0,Vr.useRef)();(0,Vr.useEffect)(()=>{o.current=n,i.current!==a.current&&Fb(i.current,a.current,n,new WeakMap)&&(i.current=a.current,r())});let s=(0,Vr.useCallback)(c=>(a.current=c,i.current&&i.current!==c&&o.current&&!Fb(i.current,c,o.current,new WeakMap)?i.current:(i.current=c,c)),[]),l=e(s),u=(0,Vr.useMemo)(()=>new WeakMap,[]);return LT(l,n,u)};var MT=new Map,Mb=e=>{let t=MT.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([r,n])=>[r,n.getState()])):{}},qfe=(e,t,r)=>{if(e===void 0)return{type:"untracked",connection:t.connect(r)};let n=MT.get(r.name);if(n)return{type:"tracked",store:e,...n};let o={connection:t.connect(r),stores:{}};return MT.set(r.name,o),{type:"tracked",store:e,...o}},zfe=(e,t={})=>(r,n,o)=>{let{enabled:i,anonymousActionType:a,store:s,...l}=t,u;try{u=(i??(import.meta.env?import.meta.env.MODE:void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!u)return(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&i&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(r,n,o);let{connection:c,...f}=qfe(s,u,l),d=!0;o.setState=(h,y,g)=>{let m=r(h,y);if(!d)return m;let b=g===void 0?{type:a||"anonymous"}:typeof g=="string"?{type:g}:g;return s===void 0?(c==null||c.send(b,n()),m):(c==null||c.send({...b,type:`${s}/${b.type}`},{...Mb(l.name),[s]:o.getState()}),m)};let p=(...h)=>{let y=d;d=!1,r(...h),d=y},v=e(o.setState,n,o);if(f.type==="untracked"?c==null||c.init(v):(f.stores[f.store]=o,c==null||c.init(Object.fromEntries(Object.entries(f.stores).map(([h,y])=>[h,h===f.store?v:y.getState()])))),o.dispatchFromDevtools&&typeof o.dispatch=="function"){let h=!1,y=o.dispatch;o.dispatch=(...g)=>{(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&g[0].type==="__setState"&&!h&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),h=!0),y(...g)}}return c.subscribe(h=>{var y;switch(h.type){case"ACTION":if(typeof h.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return FT(h.payload,g=>{if(g.type==="__setState"){if(s===void 0){p(g.state);return}Object.keys(g.state).length!==1&&console.error(`
|
|
23
|
-
[zustand devtools middleware] Unsupported __setState action format.
|
|
24
|
-
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
25
|
-
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
26
|
-
`);let m=g.state[s];if(m==null)return;JSON.stringify(o.getState())!==JSON.stringify(m)&&p(m);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(g)});case"DISPATCH":switch(h.payload.type){case"RESET":return p(v),s===void 0?c==null?void 0:c.init(o.getState()):c==null?void 0:c.init(Mb(l.name));case"COMMIT":if(s===void 0){c==null||c.init(o.getState());return}return c==null?void 0:c.init(Mb(l.name));case"ROLLBACK":return FT(h.state,g=>{if(s===void 0){p(g),c==null||c.init(o.getState());return}p(g[s]),c==null||c.init(Mb(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return FT(h.state,g=>{if(s===void 0){p(g);return}JSON.stringify(o.getState())!==JSON.stringify(g[s])&&p(g[s])});case"IMPORT_STATE":{let{nextLiftedState:g}=h.payload,m=(y=g.computedStates.slice(-1)[0])==null?void 0:y.state;if(!m)return;p(s===void 0?m:m[s]),c==null||c.send(null,g);return}case"PAUSE_RECORDING":return d=!d}return}}),v},f2=zfe,FT=(e,t)=>{let r;try{r=JSON.parse(e)}catch(n){console.error("[zustand devtools middleware] Could not parse the received json",n)}r!==void 0&&t(r)};function Vfe(e,t){let r;try{r=e()}catch{return}return{getItem:o=>{var i;let a=l=>l===null?null:JSON.parse(l,t==null?void 0:t.reviver),s=(i=r.getItem(o))!=null?i:null;return s instanceof Promise?s.then(a):a(s)},setItem:(o,i)=>r.setItem(o,JSON.stringify(i,t==null?void 0:t.replacer)),removeItem:o=>r.removeItem(o)}}var Jm=e=>t=>{try{let r=e(t);return r instanceof Promise?r:{then(n){return Jm(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Jm(n)(r)}}}},Hfe=(e,t)=>(r,n,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,g)=>({...g,...y}),...t},a=!1,s=new Set,l=new Set,u;try{u=i.getStorage()}catch{}if(!u)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...y)},n,o);let c=Jm(i.serialize),f=()=>{let y=i.partialize({...n()}),g,m=c({state:y,version:i.version}).then(b=>u.setItem(i.name,b)).catch(b=>{g=b});if(g)throw g;return m},d=o.setState;o.setState=(y,g)=>{d(y,g),f()};let p=e((...y)=>{r(...y),f()},n,o),v,h=()=>{var y;if(!u)return;a=!1,s.forEach(m=>m(n()));let g=((y=i.onRehydrateStorage)==null?void 0:y.call(i,n()))||void 0;return Jm(u.getItem.bind(u))(i.name).then(m=>{if(m)return i.deserialize(m)}).then(m=>{if(m)if(typeof m.version=="number"&&m.version!==i.version){if(i.migrate)return i.migrate(m.state,m.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return m.state}).then(m=>{var b;return v=i.merge(m,(b=n())!=null?b:p),r(v,!0),f()}).then(()=>{g==null||g(v,void 0),a=!0,l.forEach(m=>m(v))}).catch(m=>{g==null||g(void 0,m)})};return o.persist={setOptions:y=>{i={...i,...y},y.getStorage&&(u=y.getStorage())},clearStorage:()=>{u==null||u.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:y=>(s.add(y),()=>{s.delete(y)}),onFinishHydration:y=>(l.add(y),()=>{l.delete(y)})},h(),v||p},Wfe=(e,t)=>(r,n,o)=>{let i={storage:Vfe(()=>localStorage),partialize:h=>h,version:0,merge:(h,y)=>({...y,...h}),...t},a=!1,s=new Set,l=new Set,u=i.storage;if(!u)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...h)},n,o);let c=()=>{let h=i.partialize({...n()});return u.setItem(i.name,{state:h,version:i.version})},f=o.setState;o.setState=(h,y)=>{f(h,y),c()};let d=e((...h)=>{r(...h),c()},n,o);o.getInitialState=()=>d;let p,v=()=>{var h,y;if(!u)return;a=!1,s.forEach(m=>{var b;return m((b=n())!=null?b:d)});let g=((y=i.onRehydrateStorage)==null?void 0:y.call(i,(h=n())!=null?h:d))||void 0;return Jm(u.getItem.bind(u))(i.name).then(m=>{if(m)if(typeof m.version=="number"&&m.version!==i.version){if(i.migrate)return i.migrate(m.state,m.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return m.state}).then(m=>{var b;return p=i.merge(m,(b=n())!=null?b:d),r(p,!0),c()}).then(()=>{g==null||g(p,void 0),p=n(),a=!0,l.forEach(m=>m(p))}).catch(m=>{g==null||g(void 0,m)})};return o.persist={setOptions:h=>{i={...i,...h},h.storage&&(u=h.storage)},clearStorage:()=>{u==null||u.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>v(),hasHydrated:()=>a,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(l.add(h),()=>{l.delete(h)})},i.skipHydration||v(),p||d},Gfe=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Hfe(e,t)):Wfe(e,t),p2=Gfe;var C2=de(Re(),1),S2=de(x2(),1);var w2=e=>{let t,r=new Set,n=(c,f)=>{let d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){let p=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(v=>v(t,p))}},o=()=>t,l={setState:n,getState:o,getInitialState:()=>u,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},u=t=e(n,o,l);return l},_2=e=>e?w2(e):w2;var{useDebugValue:dpe}=C2.default,{useSyncExternalStoreWithSelector:fpe}=S2.default,ppe=e=>e;function T2(e,t=ppe,r){let n=fpe(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return dpe(n),n}var gge=de(a$(),1),tge=Object.defineProperty,rge=Object.defineProperties,nge=Object.getOwnPropertyDescriptors,s$=Object.getOwnPropertySymbols,oge=Object.prototype.hasOwnProperty,ige=Object.prototype.propertyIsEnumerable,l$=(e,t,r)=>t in e?tge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jo=(e,t)=>{for(var r in t||(t={}))oge.call(t,r)&&l$(e,r,t[r]);if(s$)for(var r of s$(t))ige.call(t,r)&&l$(e,r,t[r]);return e},ng=(e,t)=>rge(e,nge(t)),age=e=>(t,r,n)=>{let o=(i,a)=>t(IL(i),!0,a);return n.setState=o,e(o,r,n)},sge=(e,t)=>{let r={};return Object.keys(e.getState()).forEach(n=>{r[n]=o=>{if(e.getState()[n]===o)return;let a=n.replace(/^\S/,s=>s.toUpperCase());e.setState(s=>{s[n]=o},`@@${t}/set${a}`)}}),r},lge=e=>{let t={};return Object.keys(e.getState()).forEach(r=>{t[r]=()=>e.getState()[r]}),t},uge=(e,t)=>{let r={};return Object.keys(t.getState()).forEach(n=>{r[n]=o=>e(i=>i[n],o)}),r},cge=(e,t)=>{let r={};return Object.keys(t.getState()).forEach(n=>{r[n]=()=>e()[n]}),r};function dge(e,...t){return t.reduce((r,n)=>n(r),e)}var fge=(e,t)=>{let r=e(t.set,t.get,t);return ng(Jo({},t),{set:Jo(Jo({},t.set),r)})},pge=(e,t)=>{let r=Jo({},t.use),n=Jo({},t.useTracked),o=Jo({},t.get);return Object.keys(e(t.store.getState(),t.get,t)).forEach(i=>{r[i]=(...a)=>t.useStore(s=>{let u=e(s,t.get,t)[i];return u(...a)}),n[i]=(...a)=>{let s=t.useTrackedStore(),u=e(s,t.get,t)[i];return u(...a)},o[i]=(...a)=>{let l=e(t.store.getState(),t.get,t)[i];return l(...a)}}),ng(Jo({},t),{get:o,use:r,useTracked:n})},eP=e=>ng(Jo({},e),{extendSelectors:t=>eP(pge(t,e)),extendActions:t=>eP(fge(t,e))}),mge=e=>(t,r={})=>{var n,o;let{middlewares:i=[],devtools:a,persist:s,immer:l}=r;RL((n=l==null?void 0:l.enabledAutoFreeze)!=null?n:!1),l!=null&&l.enableMapSet&&OL();let u=[age,...i];if(s!=null&&s.enabled){let C=ng(Jo({},s),{name:(o=s.name)!=null?o:e});u.push(x=>p2(x,C))}a!=null&&a.enabled&&u.push(C=>f2(C,ng(Jo({},a),{name:e}))),u.push(_2);let f=(C=>dge(C,...u))(()=>t),d=(C,x)=>T2(f,C,x),p=sge(f,e),v=(C,x)=>{f.setState(P=>{Object.assign(P,C)},x||`@@${e}/mergeState`)},h=(C,x)=>{f.setState(C,x||`@@${e}/setState`)},y=uge(d,f),g=lge(f),m=d2(d),b=cge(m,f),E={get:Jo({state:f.getState},g),name:e,set:Jo({state:h,mergeState:v},p),store:f,use:y,useTracked:b,useStore:d,useTrackedStore:m,extendSelectors:()=>E,extendActions:()=>E};return eP(E)},Ed=mge;var $A=de(Re(),1);var hge={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=F.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},vge={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=ft.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},yge={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=X.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},oE=new WeakMap,iE=new WeakMap,og=new WeakMap,j$=new WeakMap,u$=new WeakMap,c$=new WeakMap,d$=new WeakMap,F={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=F.levels(e,t);return r?n=n.slice(1):n=n.slice(0,-1),n},common(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var o=e[n],i=t[n];if(o!==i)break;r.push(o)}return r},compare(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],a=t[r];return F.equals(n,o)&&i>a},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return F.equals(n,o)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],a=t[r];return F.equals(n,o)&&i<a},equals(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return F.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&F.compare(e,t)===0},isBefore(e,t){return F.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&F.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&F.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&F.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&F.compare(e,t)===0},isPath(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var r=e.slice(0,-1),n=t.slice(0,-1),o=e[e.length-1],i=t[t.length-1];return o!==i&&F.equals(r,n)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=[],o=0;o<=e.length;o++)n.push(e.slice(0,o));return r&&n.reverse(),n},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!F.isAncestor(t,e)&&!F.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return null;var n=[...e],{affinity:o="forward"}=r;if(e.length===0)return n;switch(t.type){case"insert_node":{var{path:i}=t;(F.equals(i,n)||F.endsBefore(i,n)||F.isAncestor(i,n))&&(n[i.length-1]+=1);break}case"remove_node":{var{path:a}=t;if(F.equals(a,n)||F.isAncestor(a,n))return null;F.endsBefore(a,n)&&(n[a.length-1]-=1);break}case"merge_node":{var{path:s,position:l}=t;F.equals(s,n)||F.endsBefore(s,n)?n[s.length-1]-=1:F.isAncestor(s,n)&&(n[s.length-1]-=1,n[s.length]+=l);break}case"split_node":{var{path:u,position:c}=t;if(F.equals(u,n)){if(o==="forward")n[n.length-1]+=1;else if(o!=="backward")return null}else F.endsBefore(u,n)?n[u.length-1]+=1:F.isAncestor(u,n)&&e[u.length]>=c&&(n[u.length-1]+=1,n[u.length]-=c);break}case"move_node":{var{path:f,newPath:d}=t;if(F.equals(f,d))return n;if(F.isAncestor(f,n)||F.equals(f,n)){var p=d.slice();return F.endsBefore(f,d)&&f.length<d.length&&(p[f.length-1]-=1),p.concat(n.slice(f.length))}else F.isSibling(f,d)&&(F.isAncestor(d,n)||F.equals(d,n))?F.endsBefore(f,n)?n[f.length-1]-=1:n[f.length-1]+=1:F.endsBefore(d,n)||F.equals(d,n)||F.isAncestor(d,n)?(F.endsBefore(f,n)&&(n[f.length-1]-=1),n[d.length-1]+=1):F.endsBefore(f,n)&&(F.equals(d,n)&&(n[d.length-1]+=1),n[f.length-1]-=1);break}}return n}};function ig(e){"@babel/helpers - typeof";return ig=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ig(e)}function bge(e,t){if(ig(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ig(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ege(e){var t=bge(e,"string");return ig(t)==="symbol"?t:String(t)}function tn(e,t,r){return t=Ege(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xge(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Za(e,t){if(e==null)return{};var r=xge(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var wge=["anchor","focus"];function f$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function _ge(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?f$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var X={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:o}=e;return X.isBackward(e)===r?[n,o]:[o,n]},end(e){var[,t]=X.edges(e);return t},equals(e,t){return ft.equals(e.anchor,t.anchor)&&ft.equals(e.focus,t.focus)},surrounds(e,t){var r=X.intersection(e,t);return r?X.equals(r,t):!1},includes(e,t){if(rt.isRange(t)){if(X.includes(e,t.anchor)||X.includes(e,t.focus))return!0;var[r,n]=X.edges(e),[o,i]=X.edges(t);return ft.isBefore(r,o)&&ft.isAfter(n,i)}var[a,s]=X.edges(e),l=!1,u=!1;return rt.isPoint(t)?(l=ft.compare(t,a)>=0,u=ft.compare(t,s)<=0):(l=F.compare(t,a.path)>=0,u=F.compare(t,s.path)<=0),l&&u},intersection(e,t){var r=Za(e,wge),[n,o]=X.edges(e),[i,a]=X.edges(t),s=ft.isBefore(n,i)?i:n,l=ft.isBefore(o,a)?o:a;return ft.isBefore(l,s)?null:_ge({anchor:s,focus:l},r)},isBackward(e){var{anchor:t,focus:r}=e;return ft.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return ft.equals(t,r)},isExpanded(e){return!X.isCollapsed(e)},isForward(e){return!X.isBackward(e)},isRange(e){return En(e)&&ft.isPoint(e.anchor)&&ft.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=X.edges(e);return t},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e===null)return null;var{affinity:n="inward"}=r,o,i;if(n==="inward"){var a=X.isCollapsed(e);X.isForward(e)?(o="forward",i=a?o:"backward"):(o="backward",i=a?o:"forward")}else n==="outward"?X.isForward(e)?(o="backward",i="forward"):(o="forward",i="backward"):(o=n,i=n);var s=ft.transform(e.anchor,t,{affinity:o}),l=ft.transform(e.focus,t,{affinity:i});return!s||!l?null:{anchor:s,focus:l}}},p$=function(t){var{deep:r=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!En(t))return!1;var n=typeof t.apply=="function";if(n)return!1;var o=r?q.isNodeList(t.children):Array.isArray(t.children);return o},oa={isAncestor(e){var{deep:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return En(e)&&q.isNodeList(e.children,{deep:t})},isElement:p$,isElementList(e){var{deep:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Array.isArray(e)&&e.every(r=>oa.isElement(r,{deep:t}))},isElementProps(e){return e.children!==void 0},isElementType:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return p$(t)&&t[n]===r},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},Cge=["text"],Sge=["children"];function m$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function tE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?m$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var q={ancestor(e,t){var r=q.get(e,t);if(q.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(xr.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of F.ancestors(t,r)){var o=q.ancestor(e,n),i=[o,n];yield i}})()},child(e,t){if(q.isText(e))throw new Error("Cannot get the child of a text node: ".concat(xr.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(xr.stringify(e)));return r},children(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var{reverse:n=!1}=r,o=q.ancestor(e,t),{children:i}=o,a=n?i.length-1:0;n?a>=0:a<i.length;){var s=q.child(o,a),l=t.concat(a);yield[s,l],a=n?a-1:a+1}})()},common(e,t,r){var n=F.common(t,r),o=q.get(e,n);return[o,n]},descendant(e,t){var r=q.get(e,t);if(q.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(xr.stringify(r)));return r},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of q.nodes(e,t))n.length!==0&&(yield[r,n])})()},elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of q.nodes(e,t))q.isElement(r)&&(yield[r,n])})()},extractProps(e){if(q.isText(e)){var t=Za(e,Cge);return t}else{var t=Za(e,Sge);return t}},first(e,t){for(var r=t.slice(),n=q.get(e,r);n&&!(q.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){var r={children:e.children},[n,o]=X.edges(t),i=q.nodes(r,{reverse:!0,pass:l=>{var[,u]=l;return!X.includes(t,u)}}),a=function(){if(!X.includes(t,s)){var u=s[s.length-1];Eu(r,F.parent(s),c=>tP(c,u,1))}F.equals(s,o.path)&&sE(r,s,c=>{var f=c.text.slice(0,o.offset);return tE(tE({},c),{},{text:f})}),F.equals(s,n.path)&&sE(r,s,c=>{var f=c.text.slice(n.offset);return tE(tE({},c),{},{text:f})})};for(var[,s]of i)a();return r.children},get(e,t){var r=q.getIf(e,t);if(r===void 0)throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(xr.stringify(e)));return r},getIf(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(q.isText(r)||!r.children[o])return;r=r.children[o]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(q.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isAncestor(e){return!q.isText(e)},isEditor(e){return typeof e.apply=="function"},isElement(e){return Array.isArray(e.children)&&typeof e.apply!="function"},isNode(e){var{deep:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Hr.isText(e)||oa.isElement(e,{deep:t})||S.isEditor(e,{deep:t})},isNodeList(e){var{deep:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Array.isArray(e)&&e.every(r=>q.isNode(r,{deep:t}))},isText(e){return typeof e.text=="string"},last(e,t){for(var r=t.slice(),n=q.get(e,r);n&&!(q.isText(n)||n.children.length===0);){var o=n.children.length-1;n=n.children[o],r.push(o)}return[n,r]},leaf(e,t){var r=q.get(e,t);if(!q.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(xr.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of F.levels(t,r)){var o=q.get(e,n);yield[o,n]}})()},matches(e,t){return q.isElement(e)&&oa.isElementProps(t)&&oa.matches(e,t)||q.isText(e)&&Hr.isTextProps(t)&&Hr.matches(e,t)},nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var{pass:r,reverse:n=!1}=t,{from:o=[],to:i}=t,a=new Set,s=[],l=e;!(i&&(n?F.isBefore(s,i):F.isAfter(s,i)));){if(a.has(l)||(yield[l,s]),!a.has(l)&&!q.isText(l)&&l.children.length!==0&&(r==null||r([l,s])===!1)){a.add(l);var u=n?l.children.length-1:0;F.isAncestor(s,o)&&(u=o[s.length]),s=s.concat(u),l=q.get(e,s);continue}if(s.length===0)break;if(!n){var c=F.next(s);if(q.has(e,c)){s=c,l=q.get(e,s);continue}}if(n&&s[s.length-1]!==0){var f=F.previous(s);s=f,l=q.get(e,s);continue}s=F.parent(s),l=q.get(e,s),a.add(l)}})()},parent(e,t){var r=F.parent(t),n=q.get(e,r);if(q.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string(e){return q.isText(e)?e.text:e.children.map(q.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of q.nodes(e,t))q.isText(r)&&(yield[r,n])})()}};function g$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function or(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Xa={isNodeOperation(e){return Xa.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!En(e))return!1;switch(e.type){case"insert_node":return F.isPath(e.path)&&q.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&F.isPath(e.path);case"merge_node":return typeof e.position=="number"&&F.isPath(e.path)&&En(e.properties);case"move_node":return F.isPath(e.path)&&F.isPath(e.newPath);case"remove_node":return F.isPath(e.path)&&q.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&F.isPath(e.path);case"set_node":return F.isPath(e.path)&&En(e.properties)&&En(e.newProperties);case"set_selection":return e.properties===null&&X.isRange(e.newProperties)||e.newProperties===null&&X.isRange(e.properties)||En(e.properties)&&En(e.newProperties);case"split_node":return F.isPath(e.path)&&typeof e.position=="number"&&En(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>Xa.isOperation(t))},isSelectionOperation(e){return Xa.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return Xa.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return or(or({},e),{},{type:"remove_node"});case"insert_text":return or(or({},e),{},{type:"remove_text"});case"merge_node":return or(or({},e),{},{type:"split_node",path:F.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(F.equals(t,r))return e;if(F.isSibling(r,t))return or(or({},e),{},{path:t,newPath:r});var n=F.transform(r,e),o=F.transform(F.next(r),e);return or(or({},e),{},{path:n,newPath:o})}case"remove_node":return or(or({},e),{},{type:"insert_node"});case"remove_text":return or(or({},e),{},{type:"insert_text"});case"set_node":{var{properties:i,newProperties:a}=e;return or(or({},e),{},{properties:a,newProperties:i})}case"set_selection":{var{properties:s,newProperties:l}=e;return s==null?or(or({},e),{},{properties:l,newProperties:null}):l==null?or(or({},e),{},{properties:null,newProperties:s}):or(or({},e),{},{properties:l,newProperties:s})}case"split_node":return or(or({},e),{},{type:"merge_node",path:F.next(e.path)})}}},En=e=>typeof e=="object"&&e!==null,q$=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(Array.isArray(n)&&Array.isArray(o)){if(n.length!==o.length)return!1;for(var i=0;i<n.length;i++)if(n[i]!==o[i])return!1}else if(En(n)&&En(o)){if(!q$(n,o))return!1}else if(n!==o)return!1}for(var a in t)if(e[a]===void 0&&t[a]!==void 0)return!1;return!0},rP=e=>e.selection?e.selection:e.children.length>0?S.end(e,[]):[0],wd=(e,t)=>{var[r]=S.node(e,t);return n=>n===r},nP=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=!r,o=r?Oge(t):t,i=ot.None,a=ot.None,s=0,l=null,u=null;for(var c of o){var f=c.codePointAt(0);if(!f)break;var d=zge(c,f);if([i,a]=n?[a,d]:[d,i],xd(i,ot.ZWJ)&&xd(a,ot.ExtPict)&&(n?l=h$(t.substring(0,s)):l=h$(t.substring(0,t.length-s)),!l)||xd(i,ot.RI)&&xd(a,ot.RI)&&(u!==null?u=!u:n?u=!0:u=Kge(t.substring(0,t.length-s)),!u)||i!==ot.None&&a!==ot.None&&Hge(i,a))break;s+=c.length}return s||1},Tge=/\s/,Pge=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,Age=/['\u2018\u2019]/,Dge=function(t){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=0,o=!1;t.length>0;){var i=nP(t,r),[a,s]=oP(t,i,r);if(kge(a,s,r))o=!0,n+=i;else if(!o)n+=i;else break;t=s}return n},oP=(e,t,r)=>{if(r){var n=e.length-t;return[e.slice(n,e.length),e.slice(0,n)]}return[e.slice(0,t),e.slice(t)]},kge=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(Tge.test(t))return!1;if(Age.test(t)){var o=nP(r,n),[i,a]=oP(r,o,n);if(e(i,a,n))return!0}return!Pge.test(t)},Oge=function*(t){for(var r=t.length-1,n=0;n<t.length;n++){var o=t.charAt(r-n);if(Rge(o.charCodeAt(0))){var i=t.charAt(r-n-1);if(Ige(i.charCodeAt(0))){yield i+o,n++;continue}}yield o}},Ige=e=>e>=55296&&e<=56319,Rge=e=>e>=56320&&e<=57343,ot;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(ot||(ot={}));var Nge=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,Lge=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,Bge=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,Fge=/^[\u1100-\u115F\uA960-\uA97C]$/,Mge=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,$ge=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Uge=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,jge=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,qge=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,zge=(e,t)=>{var r=ot.Any;return e.search(Nge)!==-1&&(r|=ot.Extend),t===8205&&(r|=ot.ZWJ),t>=127462&&t<=127487&&(r|=ot.RI),e.search(Lge)!==-1&&(r|=ot.Prepend),e.search(Bge)!==-1&&(r|=ot.SpacingMark),e.search(Fge)!==-1&&(r|=ot.L),e.search(Mge)!==-1&&(r|=ot.V),e.search($ge)!==-1&&(r|=ot.T),e.search(Uge)!==-1&&(r|=ot.LV),e.search(jge)!==-1&&(r|=ot.LVT),e.search(qge)!==-1&&(r|=ot.ExtPict),r};function xd(e,t){return(e&t)!==0}var Vge=[[ot.L,ot.L|ot.V|ot.LV|ot.LVT],[ot.LV|ot.V,ot.V|ot.T],[ot.LVT|ot.T,ot.T],[ot.Any,ot.Extend|ot.ZWJ],[ot.Any,ot.SpacingMark],[ot.Prepend,ot.Any],[ot.ZWJ,ot.ExtPict],[ot.RI,ot.RI]];function Hge(e,t){return Vge.findIndex(r=>xd(e,r[0])&&xd(t,r[1]))===-1}var Wge=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,h$=e=>e.search(Wge)!==-1,Gge=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Kge=e=>{var t=e.match(Gge);if(t===null)return!1;var r=t[0].length/2;return r%2===1},Yge=function(t){var{deep:r=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!En(t))return!1;var n=typeof t.above=="function"&&typeof t.addMark=="function"&&typeof t.after=="function"&&typeof t.apply=="function"&&typeof t.before=="function"&&typeof t.collapse=="function"&&typeof t.delete=="function"&&typeof t.deleteBackward=="function"&&typeof t.deleteForward=="function"&&typeof t.deleteFragment=="function"&&typeof t.deselect=="function"&&typeof t.edges=="function"&&typeof t.elementReadOnly=="function"&&typeof t.end=="function"&&typeof t.first=="function"&&typeof t.fragment=="function"&&typeof t.getDirtyPaths=="function"&&typeof t.getFragment=="function"&&typeof t.getMarks=="function"&&typeof t.hasBlocks=="function"&&typeof t.hasInlines=="function"&&typeof t.hasPath=="function"&&typeof t.hasTexts=="function"&&typeof t.insertBreak=="function"&&typeof t.insertFragment=="function"&&typeof t.insertNode=="function"&&typeof t.insertNodes=="function"&&typeof t.insertSoftBreak=="function"&&typeof t.insertText=="function"&&typeof t.isBlock=="function"&&typeof t.isEdge=="function"&&typeof t.isElementReadOnly=="function"&&typeof t.isEmpty=="function"&&typeof t.isEnd=="function"&&typeof t.isInline=="function"&&typeof t.isNormalizing=="function"&&typeof t.isSelectable=="function"&&typeof t.isStart=="function"&&typeof t.isVoid=="function"&&typeof t.last=="function"&&typeof t.leaf=="function"&&typeof t.levels=="function"&&typeof t.liftNodes=="function"&&typeof t.markableVoid=="function"&&typeof t.mergeNodes=="function"&&typeof t.move=="function"&&typeof t.moveNodes=="function"&&typeof t.next=="function"&&typeof t.node=="function"&&typeof t.nodes=="function"&&typeof t.normalize=="function"&&typeof t.normalizeNode=="function"&&typeof t.onChange=="function"&&typeof t.parent=="function"&&typeof t.path=="function"&&typeof t.pathRef=="function"&&typeof t.pathRefs=="function"&&typeof t.point=="function"&&typeof t.pointRef=="function"&&typeof t.pointRefs=="function"&&typeof t.positions=="function"&&typeof t.previous=="function"&&typeof t.range=="function"&&typeof t.rangeRef=="function"&&typeof t.rangeRefs=="function"&&typeof t.removeMark=="function"&&typeof t.removeNodes=="function"&&typeof t.select=="function"&&typeof t.setNodes=="function"&&typeof t.setNormalizing=="function"&&typeof t.setPoint=="function"&&typeof t.setSelection=="function"&&typeof t.shouldMergeNodesRemovePrevNode=="function"&&typeof t.shouldNormalize=="function"&&typeof t.splitNodes=="function"&&typeof t.start=="function"&&typeof t.string=="function"&&typeof t.unhangRange=="function"&&typeof t.unsetNodes=="function"&&typeof t.unwrapNodes=="function"&&typeof t.void=="function"&&typeof t.withoutNormalizing=="function"&&typeof t.wrapNodes=="function"&&(t.marks===null||En(t.marks))&&(t.selection===null||X.isRange(t.selection))&&(r?q.isNodeList(t.children)&&Xa.isOperationList(t.operations):Array.isArray(t.children)&&Array.isArray(t.operations));return n},S={above(e,t){return e.above(t)},addMark(e,t,r){e.addMark(t,r)},after(e,t,r){return e.after(t,r)},before(e,t,r){return e.before(t,r)},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteBackward(r)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteForward(r)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,r){e.insertFragment(t,r)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,r){return e.isEdge(t,r)},isEditor:Yge,isElementReadOnly(e,t){return e.isElementReadOnly(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,r){return e.isEnd(t,r)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,r){return e.isStart(t,r)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,r){return e.leaf(t,r)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,r){return e.node(t,r)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,r){return e.parent(t,r)},path(e,t,r){return e.path(t,r)},pathRef(e,t,r){return e.pathRef(t,r)},pathRefs(e){return e.pathRefs()},point(e,t,r){return e.point(t,r)},pointRef(e,t,r){return e.pointRef(t,r)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,r){return e.range(t,r)},rangeRef(e,t,r){return e.rangeRef(t,r)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,r){return e.string(t,r)},unhangRange(e,t,r){return e.unhangRange(t,r)},void(e,t){return e.void(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,r)=>e.shouldMergeNodesRemovePrevNode(t,r)},rt={isLocation(e){return F.isPath(e)||ft.isPoint(e)||X.isRange(e)},isPath(e){return Array.isArray(e)},isPoint(e){return"offset"in e},isRange(e){return"anchor"in e},isSpan(e){return Array.isArray(e)&&Array.isArray(e[0])}},z$={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(F.isPath)}};function v$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function y$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ft={compare(e,t){var r=F.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return ft.compare(e,t)===1},isBefore(e,t){return ft.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&F.equals(e.path,t.path)},isPoint(e){return En(e)&&typeof e.offset=="number"&&F.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e===null)return null;var{affinity:n="forward"}=r,{path:o,offset:i}=e;switch(t.type){case"insert_node":case"move_node":{o=F.transform(o,t,r);break}case"insert_text":{F.equals(t.path,o)&&(t.offset<i||t.offset===i&&n==="forward")&&(i+=t.text.length);break}case"merge_node":{F.equals(t.path,o)&&(i+=t.position),o=F.transform(o,t,r);break}case"remove_text":{F.equals(t.path,o)&&t.offset<=i&&(i-=Math.min(i-t.offset,t.text.length));break}case"remove_node":{if(F.equals(t.path,o)||F.isAncestor(t.path,o))return null;o=F.transform(o,t,r);break}case"split_node":{if(F.equals(t.path,o)){if(t.position===i&&n==null)return null;(t.position<i||t.position===i&&n==="forward")&&(i-=t.position,o=F.transform(o,t,y$(y$({},r),{},{affinity:"forward"})))}else o=F.transform(o,t,r);break}default:return e}return{path:o,offset:i}}},b$=void 0,xr={setScrubber(e){b$=e},stringify(e){return JSON.stringify(e,b$)}},Xge=["text"],Zge=["anchor","focus","merge"];function E$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ya(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Hr={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function o(i){var a=Za(i,Xge);return a}return q$(n?o(e):e,n?o(t):t)},isText(e){return En(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>Hr.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var r in t)if(r!=="text"&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[{leaf:Ya({},e)}];for(var n of t){var{anchor:o,focus:i,merge:a}=n,s=Za(n,Zge),[l,u]=X.edges(n),c=[],f=0,d=l.offset,p=u.offset,v=a??Object.assign;for(var{leaf:h}of r){var{length:y}=h.text,g=f;if(f+=y,d<=g&&f<=p){v(h,s),c.push({leaf:h});continue}if(d!==p&&(d===f||p===g)||d>f||p<g||p===g&&g!==0){c.push({leaf:h});continue}var m=h,b=void 0,E=void 0;if(p<f){var C=p-g;E={leaf:Ya(Ya({},m),{},{text:m.text.slice(C)})},m=Ya(Ya({},m),{},{text:m.text.slice(0,C)})}if(d>g){var x=d-g;b={leaf:Ya(Ya({},m),{},{text:m.text.slice(0,x)})},m=Ya(Ya({},m),{},{text:m.text.slice(x)})}v(m,s),b&&c.push(b),c.push({leaf:m}),E&&c.push(E)}r=c}if(r.length>1){var P=0;for(var[N,D]of r.entries()){var R=P,M=R+D.leaf.text.length,I={start:R,end:M};N===0&&(I.isFirst=!0),N===r.length-1&&(I.isLast=!0),D.position=I,P=M}}return r}};function x$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function aE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var w$=function(t,r){for(var n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return[...t.slice(0,r),...o,...t.slice(r)]},ag=function(t,r,n){for(var o=arguments.length,i=new Array(o>3?o-3:0),a=3;a<o;a++)i[a-3]=arguments[a];return[...t.slice(0,r),...i,...t.slice(r+n)]},tP=ag,iP=(e,t,r)=>{if(t.length===0)throw new Error("Cannot modify the editor");for(var n=q.get(e,t),o=t.slice(),i=r(n);o.length>1;){var a=o.pop(),s=q.get(e,o);i=aE(aE({},s),{},{children:ag(s.children,a,1,i)})}var l=o.pop();e.children=ag(e.children,l,1,i)},Eu=(e,t,r)=>{t.length===0?e.children=r(e.children):iP(e,t,n=>{if(q.isText(n))throw new Error("Cannot get the element at path [".concat(t,"] because it refers to a leaf node: ").concat(xr.stringify(n)));return aE(aE({},n),{},{children:r(n.children)})})},sE=(e,t,r)=>iP(e,t,n=>{if(!q.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(xr.stringify(n)));return r(n)});function _$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Er(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Qge={transform(e,t){var r=!1;switch(t.type){case"insert_node":{var{path:n,node:o}=t;Eu(e,F.parent(n),ne=>{var te=n[n.length-1];if(te>ne.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));return w$(ne,te,o)}),r=!0;break}case"insert_text":{var{path:i,offset:a,text:s}=t;if(s.length===0)break;sE(e,i,ne=>{var te=ne.text.slice(0,a),ce=ne.text.slice(a);return Er(Er({},ne),{},{text:te+s+ce})}),r=!0;break}case"merge_node":{var{path:l}=t,u=l[l.length-1],c=F.previous(l),f=c[c.length-1];Eu(e,F.parent(l),ne=>{var te=ne[u],ce=ne[f],w;if(q.isText(te)&&q.isText(ce))w=Er(Er({},ce),{},{text:ce.text+te.text});else if(q.isElement(te)&&q.isElement(ce))w=Er(Er({},ce),{},{children:ce.children.concat(te.children)});else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(l,"] to nodes of different interfaces: ").concat(xr.stringify(te)," ").concat(xr.stringify(ce)));return ag(ne,f,2,w)}),r=!0;break}case"move_node":{var{path:d,newPath:p}=t,v=d[d.length-1];if(F.isAncestor(d,p))throw new Error("Cannot move a path [".concat(d,"] to new path [").concat(p,"] because the destination is inside itself."));var h=q.get(e,d);Eu(e,F.parent(d),ne=>tP(ne,v,1));var y=F.transform(d,t),g=y[y.length-1];Eu(e,F.parent(y),ne=>w$(ne,g,h)),r=!0;break}case"remove_node":{var{path:m}=t,b=m[m.length-1];if(Eu(e,F.parent(m),ne=>tP(ne,b,1)),e.selection){var E=Er({},e.selection);for(var[C,x]of X.points(E)){var P=ft.transform(C,t);if(E!=null&&P!=null)E[x]=P;else{var N=void 0,D=void 0;for(var[R,M]of q.texts(e))if(F.compare(M,m)===-1)N=[R,M];else{D=[R,M];break}var I=!1;N&&D&&(F.isSibling(N[1],m)?I=!1:F.equals(D[1],m)?I=!0:I=F.common(N[1],m).length<F.common(D[1],m).length),N&&!I?E[x]={path:N[1],offset:N[0].text.length}:D?E[x]={path:D[1],offset:0}:E=null}}(!E||!X.equals(E,e.selection))&&(e.selection=E)}break}case"remove_text":{var{path:B,offset:L,text:U}=t;if(U.length===0)break;sE(e,B,ne=>{var te=ne.text.slice(0,L),ce=ne.text.slice(L+U.length);return Er(Er({},ne),{},{text:te+ce})}),r=!0;break}case"set_node":{var{path:K,properties:z,newProperties:ae}=t;if(K.length===0)throw new Error("Cannot set properties on the root node!");iP(e,K,ne=>{var te=Er({},ne);for(var ce in ae){if(ce==="children"||ce==="text")throw new Error('Cannot set the "'.concat(ce,'" property of nodes!'));var w=ae[ce];w==null?delete te[ce]:te[ce]=w}for(var A in z)ae.hasOwnProperty(A)||delete te[A];return te});break}case"set_selection":{var{newProperties:ie}=t;if(ie==null){e.selection=null;break}if(e.selection==null){if(!(ie.anchor&&ie.focus))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(xr.stringify(ie)," when there is no current selection."));e.selection=Er({},ie);break}var O=Er({},e.selection);for(var J in ie){var ue=ie[J];if(ue==null){if(J==="anchor"||J==="focus")throw new Error('Cannot remove the "'.concat(J,'" selection property'));delete O[J]}else O[J]=ue}e.selection=O;break}case"split_node":{var{path:k,position:be,properties:Oe}=t,Te=k[k.length-1];if(k.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(k,"] because the root node cannot be split."));Eu(e,F.parent(k),ne=>{var te=ne[Te],ce,w;if(q.isText(te)){var A=te.text.slice(0,be),$=te.text.slice(be);ce=Er(Er({},te),{},{text:A}),w=Er(Er({},Oe),{},{text:$})}else{var H=te.children.slice(0,be),he=te.children.slice(be);ce=Er(Er({},te),{},{children:H}),w=Er(Er({},Oe),{},{children:he})}return ag(ne,Te,1,ce,w)}),r=!0;break}}if(r&&e.selection){var Ke=Er({},e.selection);for(var[je,G]of X.points(Ke))Ke[G]=ft.transform(je,t);X.equals(Ke,e.selection)||(e.selection=Ke)}}},Jge={insertNodes(e,t,r){e.insertNodes(t,r)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,r){e.setNodes(t,r)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,r){e.unsetNodes(t,r)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,r){e.wrapNodes(t,r)}},ehe={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,r){e.setPoint(t,r)},setSelection(e,t){e.setSelection(t)}},the={delete(e,t){e.delete(t)},insertFragment(e,t,r){e.insertFragment(t,r)},insertText(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};S.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:o=rP(e)}=r;if(rt.isPath(o)&&(o=S.range(e,o)),rt.isRange(o))if(X.isCollapsed(o))o=o.anchor;else{var i=X.end(o);if(!n&&S.void(e,{at:i}))return;var a=X.start(o),s=S.pointRef(e,a),l=S.pointRef(e,i);Q.delete(e,{at:o,voids:n});var u=s.unref(),c=l.unref();o=u||c,Q.setSelection(e,{anchor:o,focus:o})}if(!(!n&&S.void(e,{at:o})||S.elementReadOnly(e,{at:o}))){var{path:f,offset:d}=o;t.length>0&&e.apply({type:"insert_text",path:f,offset:d,text:t})}})}};function C$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function rE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Q=rE(rE(rE(rE({},Qge),Jge),ehe),the),nE=new WeakMap,rhe=e=>nE.get(e)||!1,nhe=(e,t,r)=>{var n=nE.get(e)||!1;nE.set(e,!0);try{t(),r()}finally{nE.set(e,n)}};function V$(e,t,r){var n=oE.get(e)||[],o=iE.get(e)||new Set,i,a,s=f=>{if(f){var d=f.join(",");a.has(d)||(a.add(d),i.push(f))}};if(r){i=[],a=new Set;for(var l of n){var u=r(l);s(u)}}else i=n,a=o;for(var c of t)s(c);oE.set(e,i),iE.set(e,a)}var ohe=(e,t)=>{for(var r of S.pathRefs(e))hge.transform(r,t);for(var n of S.pointRefs(e))vge.transform(n,t);for(var o of S.rangeRefs(e))yge.transform(o,t);if(!rhe(e)){var i=F.operationCanTransformPath(t)?a=>F.transform(a,t):void 0;V$(e,e.getDirtyPaths(t),i)}Q.transform(e,t),e.operations.push(t),S.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),og.get(e)||(og.set(e,!0),Promise.resolve().then(()=>{og.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},ihe=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=t;return F.levels(r)}case"insert_node":{var{node:n,path:o}=t,i=F.levels(o),a=q.isText(n)?[]:Array.from(q.nodes(n),R=>{var[,M]=R;return o.concat(M)});return[...i,...a]}case"merge_node":{var{path:s}=t,l=F.ancestors(s),u=F.previous(s);return[...l,u]}case"move_node":{var{path:c,newPath:f}=t;if(F.equals(c,f))return[];var d=[],p=[];for(var v of F.ancestors(c)){var h=F.transform(v,t);d.push(h)}for(var y of F.ancestors(f)){var g=F.transform(y,t);p.push(g)}var m=p[p.length-1],b=f[f.length-1],E=m.concat(b);return[...d,...p,E]}case"remove_node":{var{path:C}=t,x=F.ancestors(C);return[...x]}case"split_node":{var{path:P}=t,N=F.levels(P),D=F.next(P);return[...N,D]}default:return[]}},ahe=e=>{var{selection:t}=e;return t?q.fragment(e,t):[]},she=(e,t,r)=>{var[n,o]=t;if(!q.isText(n)){"children"in n||(n.children=[]);var i=n;if(i!==e&&i.children.length===0){var a={text:""};Q.insertNodes(e,a,{at:o.concat(0),voids:!0}),i=q.get(e,o)}var s=i!==e&&(e.isInline(i)||q.isText(i.children[0])||e.isInline(i.children[0]));if(s)for(var l=0;l<i.children.length;l++){var u=i.children[l],c=i.children[l-1];if(q.isText(u))c!=null&&q.isText(c)&&(u.text===""?(Q.removeNodes(e,{at:o.concat(l),voids:!0}),i=q.get(e,o),l--):c.text===""?(Q.removeNodes(e,{at:o.concat(l-1),voids:!0}),i=q.get(e,o),l--):Hr.equals(u,c,{loose:!0})&&(Q.mergeNodes(e,{at:o.concat(l),voids:!0}),i=q.get(e,o),l--));else if(e.isInline(u)){if(c==null||!q.isText(c)){var f={text:""};Q.insertNodes(e,f,{at:o.concat(l),voids:!0}),i=q.get(e,o),l++}if(l===i.children.length-1){var d={text:""};Q.insertNodes(e,d,{at:o.concat(l+1),voids:!0}),i=q.get(e,o),l++}}else Q.unwrapNodes(e,{at:o.concat(l),voids:!0}),i=q.get(e,o),l--}else for(var p=0;p<i.children.length;p++){var v=i.children[p];(q.isText(v)||e.isInline(v))&&(r!=null&&r.fallbackElement?Q.wrapNodes(e,r.fallbackElement(),{at:o.concat(p),voids:!0}):Q.removeNodes(e,{at:o.concat(p),voids:!0}),i=q.get(e,o),p--)}}},lhe=(e,t)=>{var{iteration:r,initialDirtyPathsLength:n}=t,o=n*42;if(r>o)throw new Error("Could not completely normalize the editor after ".concat(o," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},uhe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:n=!1,mode:o="lowest",at:i=t.selection,match:a}=r;if(i){var s=S.path(t,i);if(!rt.isRange(i)||F.equals(i.focus.path,i.anchor.path)){if(s.length===0)return;s=F.parent(s)}var l=o==="lowest",[u]=S.levels(t,{at:s,voids:n,match:a,reverse:l});return u}};function S$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function T$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?S$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var che=(e,t,r)=>{var{selection:n}=e;if(n){var o=(f,d)=>{if(!q.isText(f))return!1;var[p,v]=S.parent(e,d);return!e.isVoid(p)||e.markableVoid(p)},i=X.isExpanded(n),a=!1;if(!i){var[s,l]=S.node(e,n);if(s&&o(s,l)){var[u]=S.parent(e,l);a=u&&e.markableVoid(u)}}if(i||a)Q.setNodes(e,{[t]:r},{match:o,split:!0,voids:!0});else{var c=T$(T$({},S.marks(e)||{}),{},{[t]:r});e.marks=c,og.get(e)||e.onChange()}}};function P$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function A$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?P$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var dhe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=S.point(t,r,{edge:"end"}),i=S.end(t,[]),a={anchor:o,focus:i},{distance:s=1}=n,l=0,u;for(var c of S.positions(t,A$(A$({},n),{},{at:a}))){if(l>s)break;l!==0&&(u=c),l++}return u};function D$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function k$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?D$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var fhe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=S.start(t,[]),i=S.point(t,r,{edge:"start"}),a={anchor:o,focus:i},{distance:s=1}=n,l=0,u;for(var c of S.positions(t,k$(k$({},n),{},{at:a,reverse:!0}))){if(l>s)break;l!==0&&(u=c),l++}return u},phe=(e,t)=>{var{selection:r}=e;r&&X.isCollapsed(r)&&Q.delete(e,{unit:t,reverse:!0})},mhe=(e,t)=>{var{selection:r}=e;r&&X.isCollapsed(r)&&Q.delete(e,{unit:t})},ghe=function(t){var{direction:r="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=t;n&&X.isExpanded(n)&&Q.delete(t,{reverse:r==="backward"})},hhe=(e,t)=>[S.start(e,t),S.end(e,t)];function O$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function I$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?O$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var vhe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return S.above(t,I$(I$({},r),{},{match:n=>q.isElement(n)&&S.isElementReadOnly(t,n)}))},yhe=(e,t)=>S.point(e,t,{edge:"end"}),bhe=(e,t)=>{var r=S.path(e,t,{edge:"start"});return S.node(e,r)},Ehe=(e,t)=>{var r=S.range(e,t);return q.fragment(e,r)};function R$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function N$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?R$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var xhe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return S.above(t,N$(N$({},r),{},{match:n=>q.isElement(n)&&S.isVoid(t,n)}))},whe=(e,t)=>t.children.some(r=>q.isElement(r)&&S.isBlock(e,r)),_he=(e,t)=>t.children.some(r=>q.isText(r)||S.isInline(e,r)),Che=(e,t)=>q.has(e,t),She=(e,t)=>t.children.every(r=>q.isText(r)),The=e=>{Q.splitNodes(e,{always:!0})},Phe=(e,t,r)=>{Q.insertNodes(e,t,r)},Ahe=e=>{Q.splitNodes(e,{always:!0})};function L$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Dhe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?L$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var khe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:o,marks:i}=t;if(o){if(i){var a=Dhe({text:r},i);Q.insertNodes(t,a,{at:n.at,voids:n.voids})}else Q.insertText(t,r,n);t.marks=null}},Ohe=(e,t)=>!e.isInline(t),Ihe=(e,t,r)=>S.isStart(e,t,r)||S.isEnd(e,t,r),Rhe=(e,t)=>{var{children:r}=t,[n]=r;return r.length===0||r.length===1&&q.isText(n)&&n.text===""&&!e.isVoid(t)},Nhe=(e,t,r)=>{var n=S.end(e,r);return ft.equals(t,n)},Lhe=e=>{var t=j$.get(e);return t===void 0?!0:t},Bhe=(e,t,r)=>{if(t.offset!==0)return!1;var n=S.start(e,r);return ft.equals(t,n)},Fhe=(e,t)=>{var r=S.path(e,t,{edge:"end"});return S.node(e,r)},Mhe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=S.path(t,r,n),i=q.leaf(t,o);return[i,o]};function $he(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,reverse:n=!1,voids:o=!1}=t,{match:i}=t;if(i==null&&(i=()=>!0),!!r){var a=[],s=S.path(e,r);for(var[l,u]of q.levels(e,s))if(i(l,u)&&(a.push([l,u]),!o&&q.isElement(l)&&S.isVoid(e,l)))break;n&&a.reverse(),yield*a}})()}var Uhe=["text"],jhe=["text"],qhe=function(t){var{marks:r,selection:n}=t;if(!n)return null;var{anchor:o,focus:i}=n;if(r)return r;if(X.isExpanded(n)){var a=X.isBackward(n);a&&([i,o]=[o,i]);var s=S.isEnd(t,o,o.path);if(s){var l=S.after(t,o);l&&(o=l)}var[u]=S.nodes(t,{match:q.isText,at:{anchor:o,focus:i}});if(u){var[c]=u,f=Za(c,Uhe);return f}else return{}}var{path:d}=o,[p]=S.leaf(t,d);if(o.offset===0){var v=S.previous(t,{at:d,match:q.isText}),h=S.above(t,{match:C=>q.isElement(C)&&S.isVoid(t,C)&&t.markableVoid(C)});if(!h){var y=S.above(t,{match:C=>q.isElement(C)&&S.isBlock(t,C)});if(v&&y){var[g,m]=v,[,b]=y;F.isAncestor(b,m)&&(p=g)}}}var E=Za(p,jhe);return E},zhe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:o=!1}=r,{match:i,at:a=t.selection}=r;if(a){var s=S.after(t,a,{voids:o});if(s){var[,l]=S.last(t,[]),u=[s.path,l];if(rt.isPath(a)&&a.length===0)throw new Error("Cannot get the next node from the root node!");if(i==null)if(rt.isPath(a)){var[c]=S.parent(t,a);i=d=>c.children.includes(d)}else i=()=>!0;var[f]=S.nodes(t,{at:u,match:i,mode:n,voids:o});return f}}},Vhe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=S.path(t,r,n),i=q.get(t,o);return[i,o]};function Hhe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,mode:n="all",universal:o=!1,reverse:i=!1,voids:a=!1,pass:s}=t,{match:l}=t;if(l||(l=()=>!0),!!r){var u,c;if(rt.isSpan(r))u=r[0],c=r[1];else{var f=S.path(e,r,{edge:"start"}),d=S.path(e,r,{edge:"end"});u=i?d:f,c=i?f:d}var p=q.nodes(e,{reverse:i,from:u,to:c,pass:E=>{var[C,x]=E;return s&&s([C,x])?!0:q.isElement(C)?!!(!a&&(S.isVoid(e,C)||S.isElementReadOnly(e,C))):!1}}),v=[],h;for(var[y,g]of p){var m=h&&F.compare(g,h[1])===0;if(!(n==="highest"&&m)){if(!l(y,g)){if(o&&!m&&q.isText(y))return;continue}if(n==="lowest"&&m){h=[y,g];continue}var b=n==="lowest"?h:[y,g];b&&(o?v.push(b):yield b),h=[y,g]}}n==="lowest"&&h&&(o?v.push(h):yield h),o&&(yield*v)}})()}var Whe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:n=!1,operation:o}=r,i=c=>oE.get(c)||[],a=c=>iE.get(c)||new Set,s=c=>{var f=i(c).pop(),d=f.join(",");return a(c).delete(d),f};if(S.isNormalizing(t)){if(n){var l=Array.from(q.nodes(t),c=>{var[,f]=c;return f}),u=new Set(l.map(c=>c.join(",")));oE.set(t,l),iE.set(t,u)}i(t).length!==0&&S.withoutNormalizing(t,()=>{for(var c of i(t))if(q.has(t,c)){var f=S.node(t,c),[d,p]=f;q.isElement(d)&&d.children.length===0&&t.normalizeNode(f,{operation:o})}for(var v=i(t),h=v.length,y=0;v.length!==0;){if(!t.shouldNormalize({dirtyPaths:v,iteration:y,initialDirtyPathsLength:h,operation:o}))return;var g=s(t);if(q.has(t,g)){var m=S.node(t,g);t.normalizeNode(m,{operation:o})}y++,v=i(t)}})}},Ghe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=S.path(t,r,n),i=F.parent(o),a=S.node(t,i);return a},Khe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:o="forward"}=n,i={current:r,affinity:o,unref(){var{current:s}=i,l=S.pathRefs(t);return l.delete(i),i.current=null,s}},a=S.pathRefs(t);return a.add(i),i},Yhe=e=>{var t=u$.get(e);return t||(t=new Set,u$.set(e,t)),t},Xhe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:o,edge:i}=n;if(rt.isPath(r)){if(i==="start"){var[,a]=q.first(t,r);r=a}else if(i==="end"){var[,s]=q.last(t,r);r=s}}return rt.isRange(r)&&(i==="start"?r=X.start(r):i==="end"?r=X.end(r):r=F.common(r.anchor.path,r.focus.path)),rt.isPoint(r)&&(r=r.path),o!=null&&(r=r.slice(0,o)),r},Zhe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:o="forward"}=n,i={current:r,affinity:o,unref(){var{current:s}=i,l=S.pointRefs(t);return l.delete(i),i.current=null,s}},a=S.pointRefs(t);return a.add(i),i},Qhe=e=>{var t=c$.get(e);return t||(t=new Set,c$.set(e,t)),t},Jhe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:o="start"}=n;if(rt.isPath(r)){var i;if(o==="end"){var[,a]=q.last(t,r);i=a}else{var[,s]=q.first(t,r);i=s}var l=q.get(t,i);if(!q.isText(l))throw new Error("Cannot get the ".concat(o," point in the node at path [").concat(r,"] because it has no ").concat(o," text node."));return{path:i,offset:o==="end"?l.text.length:0}}if(rt.isRange(r)){var[u,c]=X.edges(r);return o==="start"?u:c}return r};function eve(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,unit:n="offset",reverse:o=!1,voids:i=!1}=t;if(!r)return;var a=S.range(e,r),[s,l]=X.edges(a),u=o?l:s,c=!1,f="",d=0,p=0,v=0,h=[],y=function*(x){var P=h.some(B=>F.isAncestor(B,x));function*N(B){P||(yield B)}if(q.isElement(m)){if(!e.isSelectable(m)){if(h.push(x),o)return F.hasPrevious(x)&&(yield*N(S.end(e,F.previous(x)))),0;var D=F.next(x);return S.hasPath(e,D)&&(yield*N(S.start(e,D))),0}if(!i&&(e.isVoid(m)||e.isElementReadOnly(m)))return yield*N(S.start(e,x)),0;if(e.isInline(m))return 0;if(S.hasInlines(e,m)){var R=F.isAncestor(x,l.path)?l:S.end(e,x),M=F.isAncestor(x,s.path)?s:S.start(e,x);f=S.string(e,{anchor:M,focus:R},{voids:i}),c=!0}}if(q.isText(m)){var I=F.equals(x,u.path);for(I?(p=o?u.offset:m.text.length-u.offset,v=u.offset):(p=m.text.length,v=o?p:0),(I||c||n==="offset")&&(yield*N({path:x,offset:v}),c=!1);;){if(d===0){if(f==="")break;d=E(f,n,o),f=oP(f,d,o)[1]}if(v=o?v-d:v+d,p=p-d,p<0){d=-p;break}d=0,yield*N({path:x,offset:v})}}},g;for(var[m,b]of S.nodes(e,{at:r,reverse:o,voids:i}))g=yield*y(b);function E(C,x,P){return x==="character"?nP(C,P):x==="word"?Dge(C,P):x==="line"||x==="block"?C.length:1}})()}var tve=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:o=!1}=r,{match:i,at:a=t.selection}=r;if(a){var s=S.before(t,a,{voids:o});if(s){var[,l]=S.first(t,[]),u=[s.path,l];if(rt.isPath(a)&&a.length===0)throw new Error("Cannot get the previous node from the root node!");if(i==null)if(rt.isPath(a)){var[c]=S.parent(t,a);i=d=>c.children.includes(d)}else i=()=>!0;var[f]=S.nodes(t,{reverse:!0,at:u,match:i,mode:n,voids:o});return f}}},rve=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:o="forward"}=n,i={current:r,affinity:o,unref(){var{current:s}=i,l=S.rangeRefs(t);return l.delete(i),i.current=null,s}},a=S.rangeRefs(t);return a.add(i),i},nve=e=>{var t=d$.get(e);return t||(t=new Set,d$.set(e,t)),t},ove=(e,t,r)=>{if(rt.isRange(t)&&!r)return t;var n=S.start(e,t),o=S.end(e,r||t);return{anchor:n,focus:o}};function B$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ive(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?B$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ave=(e,t)=>{var{selection:r}=e;if(r){var n=(c,f)=>{if(!q.isText(c))return!1;var[d,p]=S.parent(e,f);return!e.isVoid(d)||e.markableVoid(d)},o=X.isExpanded(r),i=!1;if(!o){var[a,s]=S.node(e,r);if(a&&n(a,s)){var[l]=S.parent(e,s);i=l&&e.markableVoid(l)}}if(o||i)Q.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var u=ive({},S.marks(e)||{});delete u[t],e.marks=u,og.get(e)||e.onChange()}}},sve=(e,t)=>{j$.set(e,t)},lve=(e,t)=>S.point(e,t,{edge:"start"}),uve=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:o=!1}=n,i=S.range(t,r),[a,s]=X.edges(i),l="";for(var[u,c]of S.nodes(t,{at:i,match:q.isText,voids:o})){var f=u.text;F.equals(c,s.path)&&(f=f.slice(0,s.offset)),F.equals(c,a.path)&&(f=f.slice(a.offset)),l+=f}return l},cve=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:o=!1}=n,[i,a]=X.edges(r);if(i.offset!==0||a.offset!==0||X.isCollapsed(r)||F.hasPrevious(a.path))return r;var s=S.above(t,{at:a,match:v=>q.isElement(v)&&S.isBlock(t,v),voids:o}),l=s?s[1]:[],u=S.start(t,i),c={anchor:u,focus:a},f=!0;for(var[d,p]of S.nodes(t,{at:c,match:q.isText,reverse:!0,voids:o})){if(f){f=!1;continue}if(d.text!==""||F.isBefore(p,l)){a={path:p,offset:d.text.length};break}}return{anchor:i,focus:a}},aP=(e,t)=>{var r=S.isNormalizing(e);S.setNormalizing(e,!1);try{t()}finally{S.setNormalizing(e,r)}S.normalize(e)},dve=(e,t,r)=>{var[n,o]=t;return q.isElement(n)&&S.isEmpty(e,n)||q.isText(n)&&n.text===""&&o[o.length-1]!==0},fve=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};S.withoutNormalizing(t,()=>{var n,o,{reverse:i=!1,unit:a="character",distance:s=1,voids:l=!1}=r,{at:u=t.selection,hanging:c=!1}=r;if(u){var f=!1;if(rt.isRange(u)&&X.isCollapsed(u)&&(f=!0,u=u.anchor),rt.isPoint(u)){var d=S.void(t,{at:u,mode:"highest"});if(!l&&d){var[,p]=d;u=p}else{var v={unit:a,distance:s},h=i?S.before(t,u,v)||S.start(t,[]):S.after(t,u,v)||S.end(t,[]);u={anchor:u,focus:h},c=!0}}if(rt.isPath(u)){Q.removeNodes(t,{at:u,voids:l});return}if(!X.isCollapsed(u)){if(!c){var[,y]=X.edges(u),g=S.end(t,[]);ft.equals(y,g)||(u=S.unhangRange(t,u,{voids:l}))}var[m,b]=X.edges(u),E=S.above(t,{match:A=>q.isElement(A)&&S.isBlock(t,A),at:m,voids:l}),C=S.above(t,{match:A=>q.isElement(A)&&S.isBlock(t,A),at:b,voids:l}),x=E&&C&&!F.equals(E[1],C[1]),P=F.equals(m.path,b.path),N=l?null:(n=S.void(t,{at:m,mode:"highest"}))!==null&&n!==void 0?n:S.elementReadOnly(t,{at:m,mode:"highest"}),D=l?null:(o=S.void(t,{at:b,mode:"highest"}))!==null&&o!==void 0?o:S.elementReadOnly(t,{at:b,mode:"highest"});if(N){var R=S.before(t,m);R&&E&&F.isAncestor(E[1],R.path)&&(m=R)}if(D){var M=S.after(t,b);M&&C&&F.isAncestor(C[1],M.path)&&(b=M)}var I=[],B;for(var L of S.nodes(t,{at:u,voids:l})){var[U,K]=L;B&&F.compare(K,B)===0||(!l&&q.isElement(U)&&(S.isVoid(t,U)||S.isElementReadOnly(t,U))||!F.isCommon(K,m.path)&&!F.isCommon(K,b.path))&&(I.push(L),B=K)}var z=Array.from(I,A=>{var[,$]=A;return S.pathRef(t,$)}),ae=S.pointRef(t,m),ie=S.pointRef(t,b),O="";if(!P&&!N){var J=ae.current,[ue]=S.leaf(t,J),{path:k}=J,{offset:be}=m,Oe=ue.text.slice(be);Oe.length>0&&(t.apply({type:"remove_text",path:k,offset:be,text:Oe}),O=Oe)}if(z.reverse().map(A=>A.unref()).filter(A=>A!==null).forEach(A=>Q.removeNodes(t,{at:A,voids:l})),!D){var Te=ie.current,[Ke]=S.leaf(t,Te),{path:je}=Te,G=P?m.offset:0,ne=Ke.text.slice(G,b.offset);ne.length>0&&(t.apply({type:"remove_text",path:je,offset:G,text:ne}),O=ne)}!P&&x&&ie.current&&ae.current&&Q.mergeNodes(t,{at:ie.current,hanging:!0,voids:l}),f&&i&&a==="character"&&O.length>1&&O.match(/[\u0980-\u09FF\u0E00-\u0E7F\u1000-\u109F\u0900-\u097F\u1780-\u17FF\u0D00-\u0D7F\u0B00-\u0B7F\u0A00-\u0A7F\u0B80-\u0BFF\u0C00-\u0C7F]+/)&&Q.insertText(t,O.slice(0,O.length-s));var te=ae.unref(),ce=ie.unref(),w=i?te||ce:ce||te;r.at==null&&w&&Q.select(t,w)}}})},pve=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};S.withoutNormalizing(t,()=>{var{hanging:o=!1,voids:i=!1}=n,{at:a=rP(t),batchDirty:s=!0}=n;if(r.length){if(rt.isRange(a))if(o||(a=S.unhangRange(t,a,{voids:i})),X.isCollapsed(a))a=a.anchor;else{var[,l]=X.edges(a);if(!i&&S.void(t,{at:l}))return;var u=S.pointRef(t,l);Q.delete(t,{at:a}),a=u.unref()}else rt.isPath(a)&&(a=S.start(t,a));if(!(!i&&S.void(t,{at:a}))){var c=S.above(t,{at:a,match:k=>q.isElement(k)&&S.isInline(t,k),mode:"highest",voids:i});if(c){var[,f]=c;if(S.isEnd(t,a,f)){var d=S.after(t,f);a=d}else if(S.isStart(t,a,f)){var p=S.before(t,f);a=p}}var v=S.above(t,{match:k=>q.isElement(k)&&S.isBlock(t,k),at:a,voids:i}),[,h]=v,y=S.isStart(t,a,h),g=S.isEnd(t,a,h),m=y&&g,[,b]=q.first({children:r},[]),[,E]=q.last({children:r},[]),C=k=>{var[be,Oe]=k,Te=Oe.length===0;return Te?!1:m?!0:!(!y&&F.isAncestor(Oe,b)&&q.isElement(be)&&!t.isVoid(be)&&!t.isInline(be)||!g&&F.isAncestor(Oe,E)&&q.isElement(be)&&!t.isVoid(be)&&!t.isInline(be))},x=!0,P=[],N=[],D=[];for(var R of q.nodes({children:r},{pass:C})){var[M,I]=R;x&&q.isElement(M)&&!t.isInline(M)&&!F.isAncestor(I,b)&&(x=!1),C(R)&&(q.isElement(M)&&!t.isInline(M)?(x=!1,N.push(M)):x?P.push(M):D.push(M))}var[B]=S.nodes(t,{at:a,match:k=>q.isText(k)||S.isInline(t,k),mode:"highest",voids:i}),[,L]=B,U=S.isStart(t,a,L),K=S.isEnd(t,a,L),z=S.pathRef(t,g&&!D.length?F.next(h):h),ae=S.pathRef(t,K?F.next(L):L),ie=D.length>0;Q.splitNodes(t,{at:a,match:k=>ie?q.isElement(k)&&S.isBlock(t,k):q.isText(k)||S.isInline(t,k),mode:ie?"lowest":"highest",always:ie&&(!y||P.length>0)&&(!g||D.length>0),voids:i});var O=S.pathRef(t,!U||U&&K?F.next(L):L);if(Q.insertNodes(t,P,{at:O.current,match:k=>q.isText(k)||S.isInline(t,k),mode:"highest",voids:i,batchDirty:s}),m&&!P.length&&N.length&&!D.length&&Q.delete(t,{at:h,voids:i}),Q.insertNodes(t,N,{at:z.current,match:k=>q.isElement(k)&&S.isBlock(t,k),mode:"lowest",voids:i,batchDirty:s}),Q.insertNodes(t,D,{at:ae.current,match:k=>q.isText(k)||S.isInline(t,k),mode:"highest",voids:i,batchDirty:s}),!n.at){var J;if(D.length>0&&ae.current?J=F.previous(ae.current):N.length>0&&z.current?J=F.previous(z.current):O.current&&(J=F.previous(O.current)),J){var ue=S.end(t,J);Q.select(t,ue)}}O.unref(),z.unref(),ae.unref()}}})},mve=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:n="anchor"}=r,{selection:o}=t;if(o){if(n==="anchor")Q.select(t,o.anchor);else if(n==="focus")Q.select(t,o.focus);else if(n==="start"){var[i]=X.edges(o);Q.select(t,i)}else if(n==="end"){var[,a]=X.edges(o);Q.select(t,a)}}else return},gve=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},hve=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=t,{distance:o=1,unit:i="character",reverse:a=!1}=r,{edge:s=null}=r;if(n){s==="start"&&(s=X.isBackward(n)?"focus":"anchor"),s==="end"&&(s=X.isBackward(n)?"anchor":"focus");var{anchor:l,focus:u}=n,c={distance:o,unit:i},f={};if(s==null||s==="anchor"){var d=a?S.before(t,l,c):S.after(t,l,c);d&&(f.anchor=d)}if(s==null||s==="focus"){var p=a?S.before(t,u,c):S.after(t,u,c);p&&(f.focus=p)}Q.setSelection(t,f)}},vve=(e,t)=>{var{selection:r}=e;if(t=S.range(e,t),r){Q.setSelection(e,t);return}if(!rt.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(xr.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})};function F$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function M$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?F$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var yve=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:o}=t,{edge:i="both"}=n;if(o){i==="start"&&(i=X.isBackward(o)?"focus":"anchor"),i==="end"&&(i=X.isBackward(o)?"anchor":"focus");var{anchor:a,focus:s}=o,l=i==="anchor"?a:s;Q.setSelection(t,{[i==="anchor"?"anchor":"focus"]:M$(M$({},l),r)})}},bve=(e,t)=>{var{selection:r}=e,n={},o={};if(r){for(var i in t)(i==="anchor"&&t.anchor!=null&&!ft.equals(t.anchor,r.anchor)||i==="focus"&&t.focus!=null&&!ft.equals(t.focus,r.focus)||i!=="anchor"&&i!=="focus"&&t[i]!==r[i])&&(n[i]=r[i],o[i]=t[i]);Object.keys(n).length>0&&e.apply({type:"set_selection",properties:n,newProperties:o})}},Eve=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};S.withoutNormalizing(t,()=>{var{hanging:o=!1,voids:i=!1,mode:a="lowest",batchDirty:s=!0}=n,{at:l,match:u,select:c}=n;if(q.isNode(r)&&(r=[r]),r.length!==0){var[f]=r;if(l||(l=rP(t),c!==!1&&(c=!0)),c==null&&(c=!1),rt.isRange(l))if(o||(l=S.unhangRange(t,l,{voids:i})),X.isCollapsed(l))l=l.anchor;else{var[,d]=X.edges(l),p=S.pointRef(t,d);Q.delete(t,{at:l}),l=p.unref()}if(rt.isPoint(l)){u==null&&(q.isText(f)?u=R=>q.isText(R):t.isInline(f)?u=R=>q.isText(R)||S.isInline(t,R):u=R=>q.isElement(R)&&S.isBlock(t,R));var[v]=S.nodes(t,{at:l.path,match:u,mode:a,voids:i});if(v){var[,h]=v,y=S.pathRef(t,h),g=S.isEnd(t,l,h);Q.splitNodes(t,{at:l,match:u,mode:a,voids:i});var m=y.unref();l=g?F.next(m):m}else return}var b=F.parent(l),E=l[l.length-1];if(!(!i&&S.void(t,{at:b}))){if(s){var C=[],x=F.levels(b);nhe(t,()=>{var R=function(){var B=b.concat(E);E++;var L={type:"insert_node",path:B,node:M};t.apply(L),l=F.next(l),C.push(L),q.isText(M)?x.push(B):x.push(...Array.from(q.nodes(M),U=>{var[,K]=U;return B.concat(K)}))};for(var M of r)R()},()=>{V$(t,x,R=>{var M=R;for(var I of C)if(F.operationCanTransformPath(I)&&(M=F.transform(M,I),!M))return null;return M})})}else for(var P of r){var N=b.concat(E);E++,t.apply({type:"insert_node",path:N,node:P}),l=F.next(l)}if(l=F.previous(l),c){var D=S.end(t,l);D&&Q.select(t,D)}}}})},xve=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};S.withoutNormalizing(t,()=>{var{at:n=t.selection,mode:o="lowest",voids:i=!1}=r,{match:a}=r;if(n){a==null&&(a=rt.isPath(n)?wd(t,n):E=>q.isElement(E)&&S.isBlock(t,E));var s=S.nodes(t,{at:n,match:a,mode:o,voids:i}),l=Array.from(s,E=>{var[,C]=E;return S.pathRef(t,C)});for(var u of l){var c=u.unref();if(c.length<2)throw new Error("Cannot lift node at a path [".concat(c,"] because it has a depth of less than `2`."));var f=S.node(t,F.parent(c)),[d,p]=f,v=c[c.length-1],{length:h}=d.children;if(h===1){var y=F.next(p);Q.moveNodes(t,{at:c,to:y,voids:i}),Q.removeNodes(t,{at:p,voids:i})}else if(v===0)Q.moveNodes(t,{at:c,to:p,voids:i});else if(v===h-1){var g=F.next(p);Q.moveNodes(t,{at:c,to:g,voids:i})}else{var m=F.next(c),b=F.next(p);Q.splitNodes(t,{at:m,voids:i}),Q.moveNodes(t,{at:c,to:b,voids:i})}}}})},wve=["text"],_ve=["children"],H$=(e,t)=>t!==e&&(q.isText(t)||S.isVoid(e,t)||t.children.length===1&&H$(e,t.children[0])),Cve=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};S.withoutNormalizing(t,()=>{var{match:n,at:o=t.selection}=r,{hanging:i=!1,voids:a=!1,mode:s="lowest"}=r;if(o){if(n==null)if(rt.isPath(o)){var[l]=S.parent(t,o);n=R=>l.children.includes(R)}else n=R=>q.isElement(R)&&S.isBlock(t,R);if(!i&&rt.isRange(o)&&(o=S.unhangRange(t,o,{voids:a})),rt.isRange(o))if(X.isCollapsed(o))o=o.anchor;else{var[,u]=X.edges(o),c=S.pointRef(t,u);Q.delete(t,{at:o}),o=c.unref(),r.at==null&&Q.select(t,o)}var[f]=S.nodes(t,{at:o,match:n,voids:a,mode:s}),d=S.previous(t,{at:o,match:n,voids:a,mode:s});if(!(!f||!d)){var[p,v]=f,[h,y]=d;if(!(v.length===0||y.length===0)){var g=F.next(y),m=F.common(v,y),b=F.isSibling(v,y),E=Array.from(S.levels(t,{at:v}),R=>{var[M]=R;return M}).slice(m.length).slice(0,-1),C=S.above(t,{at:v,mode:"highest",match:R=>E.includes(R)&&H$(t,R)}),x=C&&S.pathRef(t,C[1]),P,N;if(q.isText(p)&&q.isText(h)){var D=Za(p,wve);N=h.text.length,P=D}else if(q.isElement(p)&&q.isElement(h)){var D=Za(p,_ve);N=h.children.length,P=D}else throw new Error("Cannot merge the node at path [".concat(v,"] with the previous sibling because it is not the same kind: ").concat(xr.stringify(p)," ").concat(xr.stringify(h)));b||Q.moveNodes(t,{at:v,to:g,voids:a}),x&&Q.removeNodes(t,{at:x.current,voids:a}),S.shouldMergeNodesRemovePrevNode(t,d,f)?Q.removeNodes(t,{at:y,voids:a}):t.apply({type:"merge_node",path:g,position:N,properties:P}),x&&x.unref()}}}})},Sve=(e,t)=>{S.withoutNormalizing(e,()=>{var{to:r,at:n=e.selection,mode:o="lowest",voids:i=!1}=t,{match:a}=t;if(n){a==null&&(a=rt.isPath(n)?wd(e,n):p=>q.isElement(p)&&S.isBlock(e,p));var s=S.pathRef(e,r),l=S.nodes(e,{at:n,match:a,mode:o,voids:i}),u=Array.from(l,p=>{var[,v]=p;return S.pathRef(e,v)});for(var c of u){var f=c.unref(),d=s.current;f.length!==0&&e.apply({type:"move_node",path:f,newPath:d}),s.current&&F.isSibling(d,f)&&F.isAfter(d,f)&&(s.current=F.next(s.current))}s.unref()}})},sP=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};S.withoutNormalizing(t,()=>{var{hanging:n=!1,voids:o=!1,mode:i="lowest"}=r,{at:a=t.selection,match:s}=r;if(a){s==null&&(s=rt.isPath(a)?wd(t,a):p=>q.isElement(p)&&S.isBlock(t,p)),!n&&rt.isRange(a)&&(a=S.unhangRange(t,a,{voids:o}));var l=S.nodes(t,{at:a,match:s,mode:i,voids:o}),u=Array.from(l,p=>{var[,v]=p;return S.pathRef(t,v)});for(var c of u){var f=c.unref();if(f){var[d]=S.node(t,f);t.apply({type:"remove_node",path:f,node:d})}}}})},Tve=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};S.withoutNormalizing(t,()=>{var{match:o,at:i=t.selection,compare:a,merge:s}=n,{hanging:l=!1,mode:u="lowest",split:c=!1,voids:f=!1}=n;if(i){if(o==null&&(o=rt.isPath(i)?wd(t,i):N=>q.isElement(N)&&S.isBlock(t,N)),!l&&rt.isRange(i)&&(i=S.unhangRange(t,i,{voids:f})),c&&rt.isRange(i)){if(X.isCollapsed(i)&&S.leaf(t,i.anchor)[0].text.length>0)return;var d=S.rangeRef(t,i,{affinity:"inward"}),[p,v]=X.edges(i),h=u==="lowest"?"lowest":"highest",y=S.isEnd(t,v,v.path);Q.splitNodes(t,{at:v,match:o,mode:h,voids:f,always:!y});var g=S.isStart(t,p,p.path);Q.splitNodes(t,{at:p,match:o,mode:h,voids:f,always:!g}),i=d.unref(),n.at==null&&Q.select(t,i)}a||(a=(N,D)=>N!==D);for(var[m,b]of S.nodes(t,{at:i,match:o,mode:u,voids:f})){var E={},C={};if(b.length!==0){var x=!1;for(var P in r)P==="children"||P==="text"||a(r[P],m[P])&&(x=!0,m.hasOwnProperty(P)&&(E[P]=m[P]),s?r[P]!=null&&(C[P]=s(m[P],r[P])):r[P]!=null&&(C[P]=r[P]));x&&t.apply({type:"set_node",path:b,properties:E,newProperties:C})}}}})},Pve=(e,t)=>{if(X.isCollapsed(t))return t.anchor;var[,r]=X.edges(t),n=S.pointRef(e,r);return Q.delete(e,{at:t}),n.unref()},Ave=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};S.withoutNormalizing(t,()=>{var{mode:n="lowest",voids:o=!1}=r,{match:i,at:a=t.selection,height:s=0,always:l=!1}=r;if(a&&(i==null&&(i=ie=>q.isElement(ie)&&S.isBlock(t,ie)),!(rt.isRange(a)&&(a=Pve(t,a),!a)))){if(rt.isPath(a)){var u=a,c=S.point(t,u),[f]=S.parent(t,u);i=ie=>ie===f,s=c.path.length-u.length+1,a=c,l=!0}var d=S.pointRef(t,a,{affinity:"backward"}),p;try{var[v]=S.nodes(t,{at:a,match:i,mode:n,voids:o});if(!v)return;var h=S.void(t,{at:a,mode:"highest"}),y=0;if(!o&&h){var[g,m]=h;if(t.isInline(g)){var b=S.after(t,m);if(!b){var E={text:""},C=F.next(m);Q.insertNodes(t,E,{at:C,voids:o}),b=S.point(t,C)}a=b,l=!0}var x=a.path.length-m.length;s=x+1,l=!0}p=S.pointRef(t,a);var P=a.path.length-s,[,N]=v,D=a.path.slice(0,P),R=s===0?a.offset:a.path[P]+y;for(var[M,I]of S.levels(t,{at:D,reverse:!0,voids:o})){var B=!1;if(I.length<N.length||I.length===0||!o&&q.isElement(M)&&S.isVoid(t,M))break;var L=d.current,U=S.isEnd(t,L,I);if(l||!d||!S.isEdge(t,L,I)){B=!0;var K=q.extractProps(M);t.apply({type:"split_node",path:I,position:R,properties:K})}R=I[I.length-1]+(B||U?1:0)}if(r.at==null){var z=p.current||S.end(t,[]);Q.select(t,z)}}finally{var ae;d.unref(),(ae=p)===null||ae===void 0||ae.unref()}}})},Dve=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(r)||(r=[r]);var o={};for(var i of r)o[i]=null;Q.setNodes(t,o,n)},kve=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};S.withoutNormalizing(t,()=>{var{mode:n="lowest",split:o=!1,voids:i=!1}=r,{at:a=t.selection,match:s}=r;if(a){s==null&&(s=rt.isPath(a)?wd(t,a):p=>q.isElement(p)&&S.isBlock(t,p)),rt.isPath(a)&&(a=S.range(t,a));var l=rt.isRange(a)?S.rangeRef(t,a):null,u=S.nodes(t,{at:a,match:s,mode:n,voids:i}),c=Array.from(u,p=>{var[,v]=p;return S.pathRef(t,v)}).reverse(),f=function(){var v=d.unref(),[h]=S.node(t,v),y=S.range(t,v);o&&l&&(y=X.intersection(l.current,y)),Q.liftNodes(t,{at:y,match:g=>!q.isText(h)&&h.children.includes(g),voids:i})};for(var d of c)f();l&&l.unref()}})};function $$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function U$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$$(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ove=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};S.withoutNormalizing(t,()=>{var{mode:o="lowest",split:i=!1,voids:a=!1}=n,{match:s,at:l=t.selection}=n;if(l){if(s==null&&(rt.isPath(l)?s=wd(t,l):t.isInline(r)?s=g=>q.isElement(g)&&S.isInline(t,g)||q.isText(g):s=g=>q.isElement(g)&&S.isBlock(t,g)),i&&rt.isRange(l)){var[u,c]=X.edges(l),f=S.rangeRef(t,l,{affinity:"inward"}),d=g=>{var m=S.above(t,{at:g,match:b=>q.isElement(b)&&S.isBlock(t,b)});return m&&S.isEdge(t,g,m[1])};Q.splitNodes(t,{at:c,match:s,voids:a,always:!d(c)}),Q.splitNodes(t,{at:u,match:s,voids:a,always:!d(u)}),l=f.unref(),n.at==null&&Q.select(t,l)}var p=Array.from(S.nodes(t,{at:l,match:t.isInline(r)?g=>q.isElement(g)&&S.isBlock(t,g):g=>q.isEditor(g),mode:"lowest",voids:a})),v=function(){var m=rt.isRange(l)?X.intersection(l,S.range(t,y)):l;if(!m)return 0;var b=Array.from(S.nodes(t,{at:m,match:s,mode:o,voids:a}));if(b.length>0){var[E]=b,C=b[b.length-1],[,x]=E,[,P]=C;if(x.length===0&&P.length===0)return 0;var N=F.equals(x,P)?F.parent(x):F.common(x,P),D=S.range(t,x,P),R=S.node(t,N),[M]=R,I=N.length+1,B=F.next(P.slice(0,I)),L=U$(U$({},r),{},{children:[]});Q.insertNodes(t,L,{at:B,voids:a}),Q.moveNodes(t,{at:D,match:U=>!q.isText(M)&&M.children.includes(U),to:B.concat(0),voids:a})}},h;for(var[,y]of p)h=v()}})},lE=()=>{var e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return ohe(e,...n)},addMark:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return che(e,...n)},deleteBackward:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return phe(e,...n)},deleteForward:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return mhe(e,...n)},deleteFragment:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return ghe(e,...n)},getFragment:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return ahe(e,...n)},insertBreak:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return The(e,...n)},insertSoftBreak:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Ahe(e,...n)},insertFragment:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return pve(e,...n)},insertNode:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Phe(e,...n)},insertText:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return khe(e,...n)},normalizeNode:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return she(e,...n)},removeMark:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return ave(e,...n)},getDirtyPaths:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return ihe(e,...n)},shouldNormalize:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return lhe(e,...n)},above:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return uhe(e,...n)},after:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return dhe(e,...n)},before:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return fhe(e,...n)},collapse:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return mve(e,...n)},delete:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return fve(e,...n)},deselect:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return gve(e,...n)},edges:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return hhe(e,...n)},elementReadOnly:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return vhe(e,...n)},end:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return yhe(e,...n)},first:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return bhe(e,...n)},fragment:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Ehe(e,...n)},getMarks:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return qhe(e,...n)},hasBlocks:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return whe(e,...n)},hasInlines:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return _he(e,...n)},hasPath:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Che(e,...n)},hasTexts:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return She(e,...n)},insertNodes:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Eve(e,...n)},isBlock:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Ohe(e,...n)},isEdge:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Ihe(e,...n)},isEmpty:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Rhe(e,...n)},isEnd:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Nhe(e,...n)},isNormalizing:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Lhe(e,...n)},isStart:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Bhe(e,...n)},last:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Fhe(e,...n)},leaf:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Mhe(e,...n)},levels:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return $he(e,...n)},liftNodes:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return xve(e,...n)},mergeNodes:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Cve(e,...n)},move:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return hve(e,...n)},moveNodes:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Sve(e,...n)},next:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return zhe(e,...n)},node:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Vhe(e,...n)},nodes:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Hhe(e,...n)},normalize:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Whe(e,...n)},parent:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Ghe(e,...n)},path:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Xhe(e,...n)},pathRef:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Khe(e,...n)},pathRefs:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Yhe(e,...n)},point:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Jhe(e,...n)},pointRef:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Zhe(e,...n)},pointRefs:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Qhe(e,...n)},positions:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return eve(e,...n)},previous:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return tve(e,...n)},range:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return ove(e,...n)},rangeRef:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return rve(e,...n)},rangeRefs:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return nve(e,...n)},removeNodes:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return sP(e,...n)},select:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return vve(e,...n)},setNodes:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Tve(e,...n)},setNormalizing:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return sve(e,...n)},setPoint:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return yve(e,...n)},setSelection:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return bve(e,...n)},splitNodes:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Ave(e,...n)},start:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return lve(e,...n)},string:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return uve(e,...n)},unhangRange:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return cve(e,...n)},unsetNodes:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Dve(e,...n)},unwrapNodes:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return kve(e,...n)},void:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return xhe(e,...n)},withoutNormalizing:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return aP(e,...n)},wrapNodes:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Ove(e,...n)},shouldMergeNodesRemovePrevNode:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return dve(e,...n)}};return e};function W$(e){return Object.prototype.toString.call(e)==="[object Object]"}function uE(e){var t,r;return W$(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(W$(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var Ive={isHistory(e){return uE(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(e.redos.length===0||Xa.isOperationList(e.redos[0].operations))&&(e.undos.length===0||Xa.isOperationList(e.undos[0].operations))}};var lP=new WeakMap,xu=new WeakMap,cE=new WeakMap,ia={isHistoryEditor(e){return Ive.isHistory(e.history)&&S.isEditor(e)},isMerging(e){return xu.get(e)},isSplittingOnce(e){return cE.get(e)},setSplittingOnce(e,t){cE.set(e,t)},isSaving(e){return lP.get(e)},redo(e){e.redo()},undo(e){e.undo()},withMerging(e,t){var r=ia.isMerging(e);xu.set(e,!0),t(),xu.set(e,r)},withNewBatch(e,t){var r=ia.isMerging(e);xu.set(e,!0),cE.set(e,!0),t(),xu.set(e,r),cE.delete(e)},withoutMerging(e,t){var r=ia.isMerging(e);xu.set(e,!1),t(),xu.set(e,r)},withoutSaving(e,t){var r=ia.isSaving(e);lP.set(e,!1);try{t()}finally{lP.set(e,r)}}},G$=e=>{var t=e,{apply:r}=t;return t.history={undos:[],redos:[]},t.redo=()=>{var{history:n}=t,{redos:o}=n;if(o.length>0){var i=o[o.length-1];i.selectionBefore&&Q.setSelection(t,i.selectionBefore),ia.withoutSaving(t,()=>{S.withoutNormalizing(t,()=>{for(var a of i.operations)t.apply(a)})}),n.redos.pop(),t.writeHistory("undos",i)}},t.undo=()=>{var{history:n}=t,{undos:o}=n;if(o.length>0){var i=o[o.length-1];ia.withoutSaving(t,()=>{S.withoutNormalizing(t,()=>{var a=i.operations.map(Xa.inverse).reverse();for(var s of a)t.apply(s);i.selectionBefore&&Q.setSelection(t,i.selectionBefore)})}),t.writeHistory("redos",i),n.undos.pop()}},t.apply=n=>{var{operations:o,history:i}=t,{undos:a}=i,s=a[a.length-1],l=s&&s.operations[s.operations.length-1],u=ia.isSaving(t),c=ia.isMerging(t);if(u==null&&(u=Nve(n)),u){if(c==null&&(s==null?c=!1:o.length!==0?c=!0:c=Rve(n,l)),ia.isSplittingOnce(t)&&(c=!1,ia.setSplittingOnce(t,void 0)),s&&c)s.operations.push(n);else{var f={operations:[n],selectionBefore:t.selection};t.writeHistory("undos",f)}for(;a.length>100;)a.shift();i.redos=[]}r(n)},t.writeHistory=(n,o)=>{t.history[n].push(o)},t},Rve=(e,t)=>!!(t&&e.type==="insert_text"&&t.type==="insert_text"&&e.offset===t.offset+t.text.length&&F.equals(e.path,t.path)||t&&e.type==="remove_text"&&t.type==="remove_text"&&e.offset+e.text.length===t.offset&&F.equals(e.path,t.path)),Nve=(e,t)=>e.type!=="set_selection";var Lve=Object.defineProperty,Bve=Object.defineProperties,Fve=Object.getOwnPropertyDescriptors,dE=Object.getOwnPropertySymbols,X$=Object.prototype.hasOwnProperty,Z$=Object.prototype.propertyIsEnumerable,K$=(e,t,r)=>t in e?Lve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Q$=(e,t)=>{for(var r in t||(t={}))X$.call(t,r)&&K$(e,r,t[r]);if(dE)for(var r of dE(t))Z$.call(t,r)&&K$(e,r,t[r]);return e},Mve=(e,t)=>Bve(e,Fve(t)),dP=(e,t)=>{var r={};for(var n in e)X$.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&dE)for(var n of dE(e))t.indexOf(n)<0&&Z$.call(e,n)&&(r[n]=e[n]);return r},J$=()=>lE();var Oi=(e,t,r)=>S.pathRef(e,t,r),fP=(e,t,r)=>S.pointRef(e,t,r);var vt=e=>oa.isElement(e);var ki=(e,t)=>vt(t)&&S.isBlock(e,t);function $ve(e){return Array.isArray(e)?e:[e]}var to=(e,t,r)=>r?typeof r=="object"?Object.entries(r).every(([n,o])=>$ve(o).includes(e[n])):r(e,t):!0,_d=(e,t={})=>{let{match:r,block:n}=t;return Mve(Q$({},t),{match:r||n?(o,i)=>to(o,i,r)&&(!n||ki(e,o)):void 0})},pt=(e,t)=>S.above(e,_d(e,t)),fE=(e,t,r={})=>{let{voids:n,unhang:o=!0}=r;return X.isRange(t)&&o?S.unhangRange(e,t,{voids:n}):t},Rn=(e,t)=>(fE(e,t==null?void 0:t.at,t),S.nodes(e,_d(e,t))),_t=(e,t,r)=>{try{return S.parent(e,t,r)}catch{}},pP=(e,t)=>S.previous(e,t),Uve=(e,t)=>S.isEmpty(e,t),Xe=(e,t)=>{let r=!1;return S.withoutNormalizing(e,()=>{r=!!t()}),r},xn=e=>Hr.isText(e),e3=e=>xn(e)?!0:e.children.length===1&&e3(e.children[0]),Ii=(e,t)=>{Q.delete(e,t)},Nn=(e,t)=>Q.moveNodes(e,t),Vt=(e,t)=>Q.removeNodes(e,t),rn=(e,t)=>{Q.select(e,t)},jve=(e,t={})=>{Xe(e,()=>{let{match:r,at:n=e.selection}=t,{mergeNode:o,removeEmptyAncestor:i,hanging:a=!1,voids:s=!1,mode:l="lowest"}=t;if(!n)return;if(r==null)if(F.isPath(n)){let[D]=_t(e,n);r=R=>D.children.includes(R)}else r=D=>ki(e,D);if(!a&&X.isRange(n)&&(n=S.unhangRange(e,n)),X.isRange(n))if(X.isCollapsed(n))n=n.anchor;else{let[,D]=X.edges(n),R=fP(e,D);Ii(e,{at:n}),n=R.unref(),t.at==null&&rn(e,n)}let u=Rn(e,{at:n,match:r,voids:s,mode:l}),[c]=Array.from(u),f=pP(e,{at:n,match:r,voids:s,mode:l});if(!c||!f)return;let[d,p]=c,[v,h]=f;if(p.length===0||h.length===0)return;let y=F.next(h),g=F.common(p,h),m=F.isSibling(p,h),b=S.levels(e,{at:p}),E=new Set(Array.from(b,([D])=>D).slice(g.length).slice(0,-1)),C=pt(e,{at:p,mode:"highest",match:D=>E.has(D)&&vt(D)&&e3(D)}),x=C&&Oi(e,C[1]),P,N;if(xn(d)&&xn(v)){let D=d,{text:R}=D,M=dP(D,["text"]);N=v.text.length,P=M}else if(vt(d)&&vt(v)){let D=d,{children:R}=D,M=dP(D,["children"]);N=v.children.length,P=M}else throw new Error(`Cannot merge the node at path [${p}] with the previous sibling because it is not the same kind: ${JSON.stringify(d)} ${JSON.stringify(v)}`);if(!m&&!o&&Nn(e,{at:p,to:y,voids:s}),x)if(i){let D=x.current;D&&i(e,{at:D})}else Vt(e,{at:x.current,voids:s});o?o(e,{at:p,to:y}):vt(v)&&Uve(e,v)||xn(v)&&v.text===""?Vt(e,{at:h,voids:s}):e.apply({type:"merge_node",path:y,position:N,properties:P}),x&&x.unref()})},aa=(e,t)=>S.end(e,t),Y$=(e,t,r)=>S.leaf(e,t,r),nl=(e,t,r)=>S.after(e,t,r),wu=(e,t,r)=>S.before(e,t,r),wn=(e,t)=>S.start(e,t),uP=(e,t)=>S.void(e,t),mP=(e,t)=>vt(t)&&S.isVoid(e,t),Cd=(e,t={})=>{Xe(e,()=>{let{reverse:r=!1,unit:n="character",distance:o=1,voids:i=!1}=t,{at:a=e.selection,hanging:s=!1}=t;if(!a)return;if(X.isRange(a)&&X.isCollapsed(a)&&(a=a.anchor),ft.isPoint(a)){let P=uP(e,{at:a,mode:"highest"});if(!i&&P){let[,N]=P;a=N}else{let N={unit:n,distance:o},D=r?wu(e,a,N)||wn(e,[]):nl(e,a,N)||aa(e,[]);a={anchor:a,focus:D},s=!0}}if(F.isPath(a)){Vt(e,{at:a,voids:i});return}if(X.isCollapsed(a))return;s||(a=S.unhangRange(e,a,{voids:i}));let[l,u]=X.edges(a),c=pt(e,{match:P=>ki(e,P),at:l,voids:i}),f=pt(e,{match:P=>ki(e,P),at:u,voids:i}),d=c&&f&&!F.equals(c[1],f[1]),p=F.equals(l.path,u.path),v=i?null:uP(e,{at:l,mode:"highest"}),h=i?null:uP(e,{at:u,mode:"highest"});if(v){let P=wu(e,l);P&&c&&F.isAncestor(c[1],P.path)&&(l=P)}if(h){let P=nl(e,u);P&&f&&F.isAncestor(f[1],P.path)&&(u=P)}let y=[],g,m=Rn(e,{at:a,voids:i});for(let P of m){let[N,D]=P;g&&F.compare(D,g)===0||(!i&&mP(e,N)||!F.isCommon(D,l.path)&&!F.isCommon(D,u.path))&&(y.push(P),g=D)}let b=Array.from(y,([,P])=>Oi(e,P)),E=fP(e,l),C=fP(e,u);if(!p&&!v){let P=E.current,[N]=Y$(e,P),{path:D}=P,{offset:R}=l,M=N.text.slice(R);e.apply({type:"remove_text",path:D,offset:R,text:M})}for(let P of b){let N=P.unref();Vt(e,{at:N,voids:i})}if(!h){let P=C.current,[N]=Y$(e,P),{path:D}=P,R=p?l.offset:0,M=N.text.slice(R,u.offset);e.apply({type:"remove_text",path:D,offset:R,text:M})}!p&&d&&C.current&&E.current&&jve(e,{at:C.current,hanging:!0,voids:i});let x=C.unref()||E.unref();t.at==null&&x&&rn(e,x)})};var Wr=(e,t,r)=>{if(!t)return"";try{return S.string(e,t,r)}catch{return""}};var sa=e=>S.marks(e),t3=(e,t)=>S.next(e,t),Ln=(e,t,r)=>{try{return S.node(e,t,r)}catch{}},gP=(e,t,r)=>S.path(e,t,r);var pE=(e,t,r)=>S.point(e,t,r);var mE=(e,t,r)=>S.range(e,t,r);var ol=(e,t,r)=>!!t&&S.isEnd(e,t,r),hP=(e,t)=>vt(t)&&S.isInline(e,t);var ei=(e,t,r)=>!!t&&S.isStart(e,t,r),r3=(e,t)=>S.normalize(e,t),n3=(e,t)=>S.removeMark(e,t);var Sd=(e,t,r)=>q.common(e,t,r);var ir=(e,t)=>{try{for(let r=0;r<t.length;r++){let n=t[r];if(xn(e)||!e.children[n])return null;e=e.children[n]}return e}catch{return null}};var o3=(e,t,r)=>q.children(e,t,r);var i3=(e,t)=>q.descendants(e,t);var a3=(e,t)=>q.leaf(e,t);var gE=e=>q.extractProps(e),Ri=e=>q.string(e),s3=(e,t)=>q.texts(e,t),l3=(e,t)=>q.nodes(e,t);var hE=e=>oa.isAncestor(e);var Ir=e=>!!e&&X.isCollapsed(e),la=e=>!!e&&X.isExpanded(e),vE=(e,t)=>{Q.collapse(e,t)},u3=e=>{Q.deselect(e)};function cP(e){return Array.isArray(e)?e:[e]}var vP=(e,{filter:t,allow:r,exclude:n,level:o,maxLevel:i}={})=>{if(!e)return!1;let[a,s]=e;if(o&&!cP(o).includes(s.length)||i&&s.length>i||t&&!t(e))return!1;if(r){let l=cP(r);if(l.length>0&&!l.includes(a.type))return!1}if(n){let l=cP(n);if(l.length>0&&l.includes(a.type))return!1}return!0},ua=(e,t,r={})=>{var n=r,{nextBlock:o,removeEmpty:i}=n,a=dP(n,["nextBlock","removeEmpty"]);aP(e,()=>{if(i){let s=pt(e,{at:a.at});if(s){let l=i===!0?{allow:["p"]}:i,{filter:u}=l;l.filter=([c,f])=>Ri(c)||c.children.some(p=>hP(e,p))?!1:!u||u([c,f]),vP(s,l)&&(sP(e,{at:s[1]}),o=!1)}}if(o){let{at:s=e.selection}=a;if(s){let l=aa(e,s),u=pt(e,{at:l,block:!0});u&&(a.at=F.next(u[1]))}}Q.insertNodes(e,t,a)})},yP=(e,t,r)=>{Q.insertText(e,t,r)};var Qa=(e,t,r)=>Q.setNodes(e,t,r);var _u=(e,t)=>Q.splitNodes(e,t),yE=(e,t,r)=>Q.unsetNodes(e,t,r),sg=(e,t)=>{Q.unwrapNodes(e,_d(e,t))},So=(e,t,r)=>{fE(e,r==null?void 0:r.at,r),Q.wrapNodes(e,t,r)},ro=(e,t={})=>{try{let r=Rn(e,Q$({at:e.selection||[]},_d(e,t)));for(let[n,o]of r)return[n,o]}catch{return}},_n=(e,t)=>!!ro(e,t);var Gr=(e,t,r)=>Qa(e,t,r);var QP=de(p3()),i4=de(wP()),a4=de(W3()),Z=de(Re());var G3=e=>typeof e=="object"&&e!=null&&e.nodeType===1,K3=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",EE=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let r=getComputedStyle(e,null);return K3(r.overflowY,t)||K3(r.overflowX,t)||(n=>{let o=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!o&&(o.clientHeight<n.scrollHeight||o.clientWidth<n.scrollWidth)})(e)}return!1},xE=(e,t,r,n,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=r||a>=t&&s>=r?i-e-n:a>t&&s<r||i<e&&s>r?a-t+o:0,Fye=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)},_P=(e,t)=>{var r,n,o,i;if(typeof document>"u")return[];let{scrollMode:a,block:s,inline:l,boundary:u,skipOverflowHiddenElements:c}=t,f=typeof u=="function"?u:K=>K!==u;if(!G3(e))throw new TypeError("Invalid target");let d=document.scrollingElement||document.documentElement,p=[],v=e;for(;G3(v)&&f(v);){if(v=Fye(v),v===d){p.push(v);break}v!=null&&v===document.body&&EE(v)&&!EE(document.documentElement)||v!=null&&EE(v,c)&&p.push(v)}let h=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,y=(i=(o=window.visualViewport)==null?void 0:o.height)!=null?i:innerHeight,{scrollX:g,scrollY:m}=window,{height:b,width:E,top:C,right:x,bottom:P,left:N}=e.getBoundingClientRect(),{top:D,right:R,bottom:M,left:I}=(K=>{let z=window.getComputedStyle(K);return{top:parseFloat(z.scrollMarginTop)||0,right:parseFloat(z.scrollMarginRight)||0,bottom:parseFloat(z.scrollMarginBottom)||0,left:parseFloat(z.scrollMarginLeft)||0}})(e),B=s==="start"||s==="nearest"?C-D:s==="end"?P+M:C+b/2-D+M,L=l==="center"?N+E/2-I+R:l==="end"?x+R:N-I,U=[];for(let K=0;K<p.length;K++){let z=p[K],{height:ae,width:ie,top:O,right:J,bottom:ue,left:k}=z.getBoundingClientRect();if(a==="if-needed"&&C>=0&&N>=0&&P<=y&&x<=h&&(z===d&&!EE(z)||C>=O&&P<=ue&&N>=k&&x<=J))return U;let be=getComputedStyle(z),Oe=parseInt(be.borderLeftWidth,10),Te=parseInt(be.borderTopWidth,10),Ke=parseInt(be.borderRightWidth,10),je=parseInt(be.borderBottomWidth,10),G=0,ne=0,te="offsetWidth"in z?z.offsetWidth-z.clientWidth-Oe-Ke:0,ce="offsetHeight"in z?z.offsetHeight-z.clientHeight-Te-je:0,w="offsetWidth"in z?z.offsetWidth===0?0:ie/z.offsetWidth:0,A="offsetHeight"in z?z.offsetHeight===0?0:ae/z.offsetHeight:0;if(d===z)G=s==="start"?B:s==="end"?B-y:s==="nearest"?xE(m,m+y,y,Te,je,m+B,m+B+b,b):B-y/2,ne=l==="start"?L:l==="center"?L-h/2:l==="end"?L-h:xE(g,g+h,h,Oe,Ke,g+L,g+L+E,E),G=Math.max(0,G+m),ne=Math.max(0,ne+g);else{G=s==="start"?B-O-Te:s==="end"?B-ue+je+ce:s==="nearest"?xE(O,ue,ae,Te,je+ce,B,B+b,b):B-(O+ae/2)+ce/2,ne=l==="start"?L-k-Oe:l==="center"?L-(k+ie/2)+te/2:l==="end"?L-J+Ke+te:xE(k,J,ie,Oe,Ke+te,L,L+E,E);let{scrollLeft:$,scrollTop:H}=z;G=A===0?0:Math.max(0,Math.min(H+G/A,z.scrollHeight-ae/A+ce)),ne=w===0?0:Math.max(0,Math.min($+ne/w,z.scrollWidth-ie/w+te)),B+=H-G,L+=$-ne}U.push({el:z,top:G,left:ne})}return U};var Mye=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function Y3(e,t){if(!e.isConnected||!(o=>{let i=o;for(;i&&i.parentNode;){if(i.parentNode===document)return!0;i=i.parentNode instanceof ShadowRoot?i.parentNode.host:i.parentNode}return!1})(e))return;let r=(o=>{let i=window.getComputedStyle(o);return{top:parseFloat(i.scrollMarginTop)||0,right:parseFloat(i.scrollMarginRight)||0,bottom:parseFloat(i.scrollMarginBottom)||0,left:parseFloat(i.scrollMarginLeft)||0}})(e);if((o=>typeof o=="object"&&typeof o.behavior=="function")(t))return t.behavior(_P(e,t));let n=typeof t=="boolean"||t==null?void 0:t.behavior;for(let{el:o,top:i,left:a}of _P(e,Mye(t))){let s=i-r.top+r.bottom,l=a-r.left+r.right;o.scroll({top:s,left:l,behavior:n})}}var CE=de(_E()),dU=globalThis.Node,Zlt=globalThis.Element,qye=globalThis.Text,Qlt=globalThis.Range,Jlt=globalThis.Selection,eut=globalThis.StaticRange,DE=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,zye=e=>es(e)&&e.nodeType===8,To=e=>es(e)&&e.nodeType===1,es=e=>{var t=DE(e);return!!t&&e instanceof t.Node},SE=e=>{var t=e&&e.anchorNode&&DE(e.anchorNode);return!!t&&e instanceof t.Selection},fU=e=>es(e)&&e.nodeType===3,pU=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,Vye=e=>{var[t,r]=e;if(To(t)&&t.childNodes.length){var n=r===t.childNodes.length,o=n?r-1:r;for([t,o]=mU(t,o,n?"backward":"forward"),n=o<r;To(t)&&t.childNodes.length;){var i=n?t.childNodes.length-1:0;t=Wye(t,i,n?"backward":"forward")}r=n&&t.textContent!=null?t.textContent.length:0}return[t,r]},Hye=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},mU=(e,t,r)=>{for(var{childNodes:n}=e,o=n[t],i=t,a=!1,s=!1;(zye(o)||To(o)&&o.childNodes.length===0||To(o)&&o.getAttribute("contenteditable")==="false")&&!(a&&s);){if(i>=n.length){a=!0,i=t-1,r="backward";continue}if(i<0){s=!0,i=t+1,r="forward";continue}o=n[i],t=i,i+=r==="forward"?1:-1}return[o,t]},Wye=(e,t,r)=>{var[n]=mU(e,t,r);return n},gU=e=>{var t="";if(fU(e)&&e.nodeValue)return e.nodeValue;if(To(e)){for(var r of Array.from(e.childNodes))t+=gU(r);var n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=`
|
|
27
|
-
`)}return t},Gye=/data-slate-fragment="(.+?)"/m,Kye=e=>{var t=e.getData("text/html"),[,r]=t.match(Gye)||[];return r},Pd=e=>e.getSelection!=null?e.getSelection():document.getSelection(),kE=(e,t,r)=>{var{target:n}=t;if(To(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:o}=it.getWindow(e);if(il(o,n))return it.hasDOMNode(e,n,{editable:!0});var i=r.find(a=>{var{addedNodes:s,removedNodes:l}=a;for(var u of s)if(u===n||il(u,n))return!0;for(var c of l)if(c===n||il(c,n))return!0});return!i||i===t?!1:kE(e,i,r)},hU=()=>{for(var e=document.activeElement;(t=e)!==null&&t!==void 0&&t.shadowRoot&&(r=e.shadowRoot)!==null&&r!==void 0&&r.activeElement;){var t,r,n;e=(n=e)===null||n===void 0||(n=n.shadowRoot)===null||n===void 0?void 0:n.activeElement}return e},eU=(e,t)=>!!(e.compareDocumentPosition(t)&dU.DOCUMENT_POSITION_PRECEDING),Yye=(e,t)=>!!(e.compareDocumentPosition(t)&dU.DOCUMENT_POSITION_FOLLOWING),tU=(e,t)=>{if(!e)return null;for(var r=e;r;){if(r.matches&&r.matches(t))return r;if(r.parentElement)r=r.parentElement;else if(r.parentNode&&"host"in r.parentNode)r=r.parentNode.host;else return null}return null},il=(e,t)=>{if(!e||!t)return!1;if(e.contains(t))return!0;for(var r=t;r;){if(r===e)return!0;if(r.parentNode)"host"in r.parentNode?r=r.parentNode.host:r=r.parentNode;else return!1}return!1},PP,AP,vU=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,rU=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),nn=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Cu=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),al=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),Xye=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),OE=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),yU=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Zye=nn&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),bU=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),EU=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),xU=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent)&&(!OE||yU),fg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((PP=navigator.userAgent.match(/Version\/(\d+)/))!==null&&PP!==void 0&&PP[1]&&parseInt((AP=navigator.userAgent.match(/Version\/(\d+)/))===null||AP===void 0?void 0:AP[1],10)<17);var rs=(!yU||!Zye)&&!Xye&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function";function cg(e){"@babel/helpers - typeof";return cg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cg(e)}function Qye(e,t){if(cg(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(cg(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jye(e){var t=Qye(e,"string");return cg(t)==="symbol"?t:String(t)}function kP(e,t,r){return t=Jye(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ebe=0,dg=class{constructor(){kP(this,"id",void 0),this.id="".concat(ebe++)}},Tu=new WeakMap,Pu=new WeakMap,kd=new WeakMap,OP=new WeakMap,Ad=new WeakMap,IE=new WeakMap,Od=new WeakMap,sl=new WeakMap,TE=new WeakMap,pg=new WeakMap,PE=new WeakMap,Ja=new WeakMap,ll=new WeakMap,Dd=new WeakMap,RE=new WeakMap,NE=new WeakMap,ti=new WeakMap,da=new WeakMap,Bn=new WeakMap,ts=new WeakMap,fa=new WeakMap,IP=new WeakMap,Su=Symbol("placeholder"),RP=Symbol("mark-placeholder"),it={androidPendingDiffs:e=>Bn.get(e),androidScheduleFlush:e=>{var t;(t=NE.get(e))===null||t===void 0||t()},blur:e=>{var t=it.toDOMNode(e,e),r=it.findDocumentOrShadowRoot(e);Ja.set(e,!1),r.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,r=it.findDocumentOrShadowRoot(e),n=Pd(r);n&&n.rangeCount>0&&n.removeAllRanges(),t&&Q.deselect(e)},findDocumentOrShadowRoot:e=>{var t=it.toDOMNode(e,e),r=t.getRootNode();return r instanceof Document||r instanceof ShadowRoot?r:t.ownerDocument},findEventRange:(e,t)=>{"nativeEvent"in t&&(t=t.nativeEvent);var{clientX:r,clientY:n,target:o}=t;if(r==null||n==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i=it.toSlateNode(e,t.target),a=it.findPath(e,i);if(q.isElement(i)&&S.isVoid(e,i)){var s=o.getBoundingClientRect(),l=e.isInline(i)?r-s.left<s.left+s.width-r:n-s.top<s.top+s.height-n,u=S.point(e,a,{edge:l?"start":"end"}),c=l?S.before(e,u):S.after(e,u);if(c){var f=S.range(e,c);return f}}var d,{document:p}=it.getWindow(e);if(p.caretRangeFromPoint)d=p.caretRangeFromPoint(r,n);else{var v=p.caretPositionFromPoint(r,n);v&&(d=p.createRange(),d.setStart(v.offsetNode,v.offset),d.setEnd(v.offsetNode,v.offset))}if(!d)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var h=it.toSlateRange(e,d,{exactMatch:!1,suppressThrow:!1});return h},findKey:(e,t)=>{var r=TE.get(t);return r||(r=new dg,TE.set(t,r)),r},findPath:(e,t)=>{for(var r=[],n=t;;){var o=kd.get(n);if(o==null){if(n===e)return r;break}var i=Pu.get(n);if(i==null)break;r.unshift(i),n=o}throw new Error("Unable to find the path for Slate node: ".concat(xr.stringify(t)))},focus:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!Ja.get(t)&&Ad.get(t)){if(r.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(t.operations.length>0){setTimeout(()=>{it.focus(t,{retries:r.retries-1})},10);return}var n=it.toDOMNode(t,t),o=it.findDocumentOrShadowRoot(t);if(o.activeElement!==n){if(t.selection&&o instanceof Document){var i=Pd(o),a=it.toDOMRange(t,t.selection);i==null||i.removeAllRanges(),i==null||i.addRange(a)}t.selection||Q.select(t,S.start(t,[])),Ja.set(t,!0),n.focus({preventScroll:!0})}}},getWindow:e=>{var t=OP.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:o=!1}=n,i=it.toDOMNode(t,t),a;try{a=To(r)?r:r.parentElement}catch(s){if(s instanceof Error&&!s.message.includes('Permission denied to access property "nodeType"'))throw s}return a?tU(a,"[data-slate-editor]")===i&&(!o||a.isContentEditable?!0:typeof a.isContentEditable=="boolean"&&tU(a,'[contenteditable="false"]')===i||!!a.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(e,t)=>es(t)&&it.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{var{anchor:r,focus:n}=t;return S.hasPath(e,r.path)&&S.hasPath(e,n.path)},hasSelectableTarget:(e,t)=>it.hasEditableTarget(e,t)||it.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>es(t)&&it.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!ll.get(e),isFocused:e=>!!Ja.get(e),isReadOnly:e=>!!PE.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(PE.get(e)||!it.hasTarget(e,t))return!1;var r=it.toSlateNode(e,t);return q.isElement(r)&&S.isVoid(e,r)},setFragmentData:(e,t,r)=>e.setFragmentData(t,r),toDOMNode:(e,t)=>{var r,n=t===e?Ad.get(e):(r=pg.get(e))===null||r===void 0?void 0:r.get(it.findKey(e,t));if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(xr.stringify(t)));return n},toDOMPoint:(e,t)=>{var[r]=S.node(e,t.path),n=it.toDOMNode(e,r),o;S.void(e,{at:t})&&(t={path:t.path,offset:0});for(var i="[data-slate-string], [data-slate-zero-width]",a=Array.from(n.querySelectorAll(i)),s=0,l=0;l<a.length;l++){var u=a[l],c=u.childNodes[0];if(!(c==null||c.textContent==null)){var{length:f}=c.textContent,d=u.getAttribute("data-slate-length"),p=d==null?f:parseInt(d,10),v=s+p,h=a[l+1];if(t.offset===v&&h!==null&&h!==void 0&&h.hasAttribute("data-slate-mark-placeholder")){var y,g=h.childNodes[0];o=[g instanceof qye?g:h,(y=h.textContent)!==null&&y!==void 0&&y.startsWith("\uFEFF")?1:0];break}if(t.offset<=v){var m=Math.min(f,Math.max(0,t.offset-s));o=[c,m];break}s=v}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(xr.stringify(t)));return o},toDOMRange:(e,t)=>{var{anchor:r,focus:n}=t,o=X.isBackward(t),i=it.toDOMPoint(e,r),a=X.isCollapsed(t)?i:it.toDOMPoint(e,n),s=it.getWindow(e),l=s.document.createRange(),[u,c]=o?a:i,[f,d]=o?i:a,p=To(u)?u:u.parentElement,v=!!p.getAttribute("data-slate-zero-width"),h=To(f)?f:f.parentElement,y=!!h.getAttribute("data-slate-zero-width");return l.setStart(u,v?1:c),l.setEnd(f,y?1:d),l},toSlateNode:(e,t)=>{var r=To(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?Od.get(r):null;if(!n)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(r));return n},toSlatePoint:(e,t,r)=>{var{exactMatch:n,suppressThrow:o,searchDirection:i}=r,[a,s]=n?t:Vye(t),l=a.parentNode,u=null,c=0;if(l){var f,d,p=it.toDOMNode(e,e),v=l.closest('[data-slate-void="true"]'),h=v&&il(p,v)?v:null,y=l.closest('[contenteditable="false"]'),g=y&&il(p,y)?y:null,m=l.closest("[data-slate-leaf]"),b=null;if(m){if(u=m.closest('[data-slate-node="text"]'),u){var E=it.getWindow(e),C=E.document.createRange();C.setStart(u,0),C.setEnd(a,s);var x=C.cloneContents(),P=[...Array.prototype.slice.call(x.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(x.querySelectorAll("[contenteditable=false]"))];P.forEach(k=>{if(nn&&!n&&k.hasAttribute("data-slate-zero-width")&&k.textContent.length>0&&k.textContext!=="\uFEFF"){k.textContent.startsWith("\uFEFF")&&(k.textContent=k.textContent.slice(1));return}k.parentNode.removeChild(k)}),c=x.textContent.length,b=u}}else if(h){for(var N=h.querySelectorAll("[data-slate-leaf]"),D=0;D<N.length;D++){var R=N[D];if(it.hasDOMNode(e,R)){m=R;break}}m?(u=m.closest('[data-slate-node="text"]'),b=m,c=b.textContent.length,b.querySelectorAll("[data-slate-zero-width]").forEach(k=>{c-=k.textContent.length})):c=1}else if(g){var M=k=>k?k.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],I=g.closest('[data-slate-node="element"]');if(i==="backward"||!i){var B,L=[...M(I==null?void 0:I.previousElementSibling),...M(I)];m=(B=L.findLast(k=>eU(g,k)))!==null&&B!==void 0?B:null}if(i==="forward"||!i){var U,K=[...M(I),...M(I==null?void 0:I.nextElementSibling)];m=(U=K.find(k=>Yye(g,k)))!==null&&U!==void 0?U:null}m&&(u=m.closest('[data-slate-node="text"]'),b=m,i==="forward"?c=0:(c=b.textContent.length,b.querySelectorAll("[data-slate-zero-width]").forEach(k=>{c-=k.textContent.length})))}b&&c===b.textContent.length&&nn&&b.getAttribute("data-slate-zero-width")==="z"&&(f=b.textContent)!==null&&f!==void 0&&f.startsWith("\uFEFF")&&(l.hasAttribute("data-slate-zero-width")||Cu&&(d=b.textContent)!==null&&d!==void 0&&d.endsWith(`
|
|
28
|
-
|
|
29
|
-
`))&&c--}if(nn&&!u&&!n){var z=l.hasAttribute("data-slate-node")?l:l.closest("[data-slate-node]");if(z&&it.hasDOMNode(e,z,{editable:!0})){var ae=it.toSlateNode(e,z),{path:ie,offset:O}=S.start(e,it.findPath(e,ae));return z.querySelector("[data-slate-leaf]")||(O=s),{path:ie,offset:O}}}if(!u){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var J=it.toSlateNode(e,u),ue=it.findPath(e,J);return{path:ue,offset:c}},toSlateRange:(e,t,r)=>{var n,{exactMatch:o,suppressThrow:i}=r,a=SE(t)?t.anchorNode:t.startContainer,s,l,u,c,f;if(a)if(SE(t)){if(Cu&&t.rangeCount>1){u=t.focusNode;var d=t.getRangeAt(0),p=t.getRangeAt(t.rangeCount-1);if(u instanceof HTMLTableRowElement&&d.startContainer instanceof HTMLTableRowElement&&p.startContainer instanceof HTMLTableRowElement){let P=function(N){return N.childElementCount>0?P(N.children[0]):N};var x=P,v=d.startContainer,h=p.startContainer,y=P(v.children[d.startOffset]),g=P(h.children[p.startOffset]);c=0,g.childNodes.length>0?s=g.childNodes[0]:s=g,y.childNodes.length>0?u=y.childNodes[0]:u=y,g instanceof HTMLElement?l=g.innerHTML.length:l=0}else d.startContainer===u?(s=p.endContainer,l=p.endOffset,c=d.startOffset):(s=d.startContainer,l=d.endOffset,c=p.startOffset)}else s=t.anchorNode,l=t.anchorOffset,u=t.focusNode,c=t.focusOffset;OE&&Hye(s)||Cu?f=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:f=t.isCollapsed}else s=t.startContainer,l=t.startOffset,u=t.endContainer,c=t.endOffset,f=t.collapsed;if(s==null||u==null||l==null||c==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));Cu&&(n=u.textContent)!==null&&n!==void 0&&n.endsWith(`
|
|
30
|
-
|
|
31
|
-
`)&&c===u.textContent.length&&c--;var m=it.toSlatePoint(e,[s,l],{exactMatch:o,suppressThrow:i});if(!m)return null;var b=eU(s,u)||s===u&&c<l,E=f?m:it.toSlatePoint(e,[u,c],{exactMatch:o,suppressThrow:i,searchDirection:b?"forward":"backward"});if(!E)return null;var C={anchor:m,focus:E};return X.isExpanded(C)&&X.isForward(C)&&To(u)&&S.void(e,{at:C.focus,mode:"highest"})&&(C=S.unhangRange(e,C,{voids:!0})),C}};function wU(e,t){var{path:r,diff:n}=t;if(!S.hasPath(e,r))return!1;var o=q.get(e,r);if(!q.isText(o))return!1;if(n.start!==o.text.length||n.text.length===0)return o.text.slice(n.start,n.start+n.text.length)===n.text;var i=F.next(r);if(!S.hasPath(e,i))return!1;var a=q.get(e,i);return q.isText(a)&&a.text.startsWith(n.text)}function NP(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.reduce((o,i)=>o.slice(0,i.start)+i.text+o.slice(i.end),e)}function tbe(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++)if(e.charAt(n)!==t.charAt(n))return n;return r}function rbe(e,t,r){for(var n=Math.min(e.length,t.length,r),o=0;o<n;o++)if(e.charAt(e.length-o-1)!==t.charAt(t.length-o-1))return o;return n}function LP(e,t){var{start:r,end:n,text:o}=t,i=e.slice(r,n),a=tbe(i,o),s=Math.min(i.length-a,o.length-a),l=rbe(i,o,s),u={start:r+a,end:n-l,text:o.slice(a,o.length-l)};return u.start===u.end&&u.text.length===0?null:u}function _U(e,t,r){var n=Math.min(t.start,r.start),o=Math.max(0,Math.min(t.start+t.text.length,r.end)-r.start),i=NP(e,t,r),a=Math.max(r.start+r.text.length,t.start+t.text.length+(t.start+t.text.length>r.start?r.text.length:0)-o),s=i.slice(n,a),l=Math.max(t.end,r.end-t.text.length+(t.end-t.start));return LP(e,{start:n,end:l,text:s})}function CU(e){var{path:t,diff:r}=e;return{anchor:{path:t,offset:r.start},focus:{path:t,offset:r.end}}}function AE(e,t){var{path:r,offset:n}=t;if(!S.hasPath(e,r))return null;var o=q.get(e,r);if(!q.isText(o))return null;var i=S.above(e,{match:s=>q.isElement(s)&&S.isBlock(e,s),at:r});if(!i)return null;for(;n>o.text.length;){var a=S.next(e,{at:r,match:q.isText});if(!a||!F.isDescendant(a[1],i[1]))return null;n-=o.text.length,o=a[0],r=a[1]}return{path:r,offset:n}}function BP(e,t){var r=AE(e,t.anchor);if(!r)return null;if(X.isCollapsed(t))return{anchor:r,focus:r};var n=AE(e,t.focus);return n?{anchor:r,focus:n}:null}function DP(e,t,r){var n=Bn.get(e),o=n==null?void 0:n.find(c=>{var{path:f}=c;return F.equals(f,t.path)});if(!o||t.offset<=o.diff.start)return ft.transform(t,r,{affinity:"backward"});var{diff:i}=o;if(t.offset<=i.start+i.text.length){var a={path:t.path,offset:i.start},s=ft.transform(a,r,{affinity:"backward"});return s?{path:s.path,offset:s.offset+t.offset-i.start}:null}var l={path:t.path,offset:t.offset-i.text.length+i.end-i.start},u=ft.transform(l,r,{affinity:"backward"});return u?r.type==="split_node"&&F.equals(r.path,t.path)&&l.offset<r.position&&i.start<r.position?u:{path:u.path,offset:u.offset+i.text.length-i.end+i.start}:null}function nU(e,t,r){var n=DP(e,t.anchor,r);if(!n)return null;if(X.isCollapsed(t))return{anchor:n,focus:n};var o=DP(e,t.focus,r);return o?{anchor:n,focus:o}:null}function nbe(e,t){var{path:r,diff:n,id:o}=e;switch(t.type){case"insert_text":return!F.equals(t.path,r)||t.offset>=n.end?e:t.offset<=n.start?{diff:{start:t.text.length+n.start,end:t.text.length+n.end,text:n.text},id:o,path:r}:{diff:{start:n.start,end:n.end+t.text.length,text:n.text},id:o,path:r};case"remove_text":return!F.equals(t.path,r)||t.offset>=n.end?e:t.offset+t.text.length<=n.start?{diff:{start:n.start-t.text.length,end:n.end-t.text.length,text:n.text},id:o,path:r}:{diff:{start:n.start,end:n.end-t.text.length,text:n.text},id:o,path:r};case"split_node":return!F.equals(t.path,r)||t.position>=n.end?{diff:n,id:o,path:F.transform(r,t,{affinity:"backward"})}:t.position>n.start?{diff:{start:n.start,end:Math.min(t.position,n.end),text:n.text},id:o,path:r}:{diff:{start:n.start-t.position,end:n.end-t.position,text:n.text},id:o,path:F.transform(r,t,{affinity:"forward"})};case"merge_node":return F.equals(t.path,r)?{diff:{start:n.start+t.position,end:n.end+t.position,text:n.text},id:o,path:F.transform(r,t)}:{diff:n,id:o,path:F.transform(r,t)}}var i=F.transform(r,t);return i?{diff:n,path:i,id:o}:null}var oU=(e,t)=>{var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},iU=(e,t,r)=>{var n=it.toDOMRange(e,t).getBoundingClientRect(),o=it.toDOMRange(e,r).getBoundingClientRect();return oU(n,o)&&oU(o,n)},obe=(e,t)=>{var r=S.range(e,X.end(t)),n=Array.from(S.positions(e,{at:t})),o=0,i=n.length,a=Math.floor(i/2);if(iU(e,S.range(e,n[o]),r))return S.range(e,n[o],r);if(n.length<2)return S.range(e,n[n.length-1],r);for(;a!==n.length&&a!==o;)iU(e,S.range(e,n[a]),r)?i=a:o=a,a=Math.floor((o+i)/2);return S.range(e,n[o],r)};function aU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function sU(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aU(Object(r),!0).forEach(function(n){kP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aU(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var SU=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",n=t,{apply:o,onChange:i,deleteBackward:a,addMark:s,removeMark:l}=n;return pg.set(n,new WeakMap),n.addMark=(u,c)=>{var f,d;(f=NE.get(n))===null||f===void 0||f(),!ti.get(n)&&(d=Bn.get(n))!==null&&d!==void 0&&d.length&&ti.set(n,null),da.delete(n),s(u,c)},n.removeMark=u=>{var c;!ti.get(n)&&(c=Bn.get(n))!==null&&c!==void 0&&c.length&&ti.set(n,null),da.delete(n),l(u)},n.deleteBackward=u=>{if(u!=="line")return a(u);if(n.selection&&X.isCollapsed(n.selection)){var c=S.above(n,{match:v=>q.isElement(v)&&S.isBlock(n,v),at:n.selection});if(c){var[,f]=c,d=S.range(n,f,n.selection.anchor),p=obe(n,d);X.isCollapsed(p)||Q.delete(n,{at:p})}}},n.apply=u=>{var c=[],f=[],d=Bn.get(n);if(d!=null&&d.length){var p=d.map(L=>nbe(L,u)).filter(Boolean);Bn.set(n,p)}var v=fa.get(n);v&&fa.set(n,nU(n,v,u));var h=ts.get(n);if(h!=null&&h.at){var y=rt.isPoint(h==null?void 0:h.at)?DP(n,h.at,u):nU(n,h.at,u);ts.set(n,y?sU(sU({},h),{},{at:y}):null)}switch(u.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{c.push(...Td(n,u.path));break}case"set_selection":{var g;(g=Dd.get(n))===null||g===void 0||g.unref(),Dd.delete(n);break}case"insert_node":case"remove_node":{c.push(...Td(n,F.parent(u.path)));break}case"merge_node":{var m=F.previous(u.path);c.push(...Td(n,m));break}case"move_node":{var b=F.common(F.parent(u.path),F.parent(u.newPath));c.push(...Td(n,b));var E;F.isBefore(u.path,u.newPath)?(c.push(...Td(n,F.parent(u.path))),E=u.newPath):(c.push(...Td(n,F.parent(u.newPath))),E=u.path);var C=q.get(t,F.parent(E)),x=it.findKey(n,C),P=S.pathRef(n,F.parent(E));f.push([P,x]);break}}switch(o(u),u.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":case"insert_text":case"remove_text":case"set_selection":Tu.set(n,!0)}for(var[N,D]of c){var[R]=S.node(n,N);TE.set(R,D)}for(var[M,I]of f){if(M.current){var[B]=S.node(n,M.current);TE.set(B,I)}M.unref()}},n.setFragmentData=u=>{var{selection:c}=n;if(c){var[f,d]=X.edges(c),p=S.void(n,{at:f.path}),v=S.void(n,{at:d.path});if(!(X.isCollapsed(c)&&!p)){var h=it.toDOMRange(n,c),y=h.cloneContents(),g=y.childNodes[0];if(y.childNodes.forEach(R=>{R.textContent&&R.textContent.trim()!==""&&(g=R)}),v){var[m]=v,b=h.cloneRange(),E=it.toDOMNode(n,m);b.setEndAfter(E),y=b.cloneContents()}if(p&&(g=y.querySelector("[data-slate-spacer]")),Array.from(y.querySelectorAll("[data-slate-zero-width]")).forEach(R=>{var M=R.getAttribute("data-slate-zero-width")==="n";R.textContent=M?`
|
|
32
|
-
`:""}),fU(g)){var C=g.ownerDocument.createElement("span");C.style.whiteSpace="pre",C.appendChild(g),y.appendChild(C),g=C}var x=n.getFragment(),P=JSON.stringify(x),N=window.btoa(encodeURIComponent(P));g.setAttribute("data-slate-fragment",N),u.setData("application/".concat(r),N);var D=y.ownerDocument.createElement("div");return D.appendChild(y),D.setAttribute("hidden","true"),y.ownerDocument.body.appendChild(D),u.setData("text/html",D.innerHTML),u.setData("text/plain",gU(D)),y.ownerDocument.body.removeChild(D),u}}},n.insertData=u=>{n.insertFragmentData(u)||n.insertTextData(u)},n.insertFragmentData=u=>{var c=u.getData("application/".concat(r))||Kye(u);if(c){var f=decodeURIComponent(window.atob(c)),d=JSON.parse(f);return n.insertFragment(d),!0}return!1},n.insertTextData=u=>{var c=u.getData("text/plain");if(c){var f=c.split(/\r\n|\r|\n/),d=!1;for(var p of f)d&&Q.splitNodes(n,{always:!0}),n.insertText(p),d=!0;return!0}return!1},n.onChange=u=>{var c=RE.get(n);c&&c(u),i(u)},n},Td=(e,t)=>{var r=[];for(var[n,o]of S.levels(e,{at:t})){var i=it.findKey(e,n);r.push([o,i])}return r},TU=3,ibe={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},abe={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},sbe={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},ar=e=>{var t=ibe[e],r=abe[e],n=sbe[e],o=t&&(0,CE.isHotkey)(t),i=r&&(0,CE.isHotkey)(r),a=n&&(0,CE.isHotkey)(n);return s=>!!(o&&o(s)||rU&&i&&i(s)||!rU&&a&&a(s))},sr={isBold:ar("bold"),isCompose:ar("compose"),isMoveBackward:ar("moveBackward"),isMoveForward:ar("moveForward"),isDeleteBackward:ar("deleteBackward"),isDeleteForward:ar("deleteForward"),isDeleteLineBackward:ar("deleteLineBackward"),isDeleteLineForward:ar("deleteLineForward"),isDeleteWordBackward:ar("deleteWordBackward"),isDeleteWordForward:ar("deleteWordForward"),isExtendBackward:ar("extendBackward"),isExtendForward:ar("extendForward"),isExtendLineBackward:ar("extendLineBackward"),isExtendLineForward:ar("extendLineForward"),isItalic:ar("italic"),isMoveLineBackward:ar("moveLineBackward"),isMoveLineForward:ar("moveLineForward"),isMoveWordBackward:ar("moveWordBackward"),isMoveWordForward:ar("moveWordForward"),isRedo:ar("redo"),isSoftBreak:ar("insertSoftBreak"),isSplitBlock:ar("splitBlock"),isTransposeCharacter:ar("transposeCharacter"),isUndo:ar("undo")};function lbe(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function lU(e,t){if(e==null)return{};var r=lbe(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var ube=["anchor","focus"],cbe=["anchor","focus"];function uU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function cU(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uU(Object(r),!0).forEach(function(n){kP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uU(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var dbe=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>t.hasOwnProperty(r)&&e[r]===t[r]),PU=(e,t)=>{var r=lU(e,ube),n=lU(t,cbe);return e[Su]===t[Su]&&dbe(r,n)},LE=(e,t)=>{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],o=t[r];if(!X.equals(n,o)||!PU(n,o))return!1}return!0},FP=(e,t)=>{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],o=t[r];if(n.anchor.offset!==o.anchor.offset||n.focus.offset!==o.focus.offset||!PU(n,o))return!1}return!0},AU=(e,t,r)=>{var n=Array.from(t.children,()=>[]);if(r.length===0)return n;var o=it.findPath(e,t),i=o.length,a=S.range(e,o),s=new Array(t.children.length),l=b=>{var E=s[b];if(E)return E;var C=S.range(e,[...o,b]);return s[b]=C,C};for(var u of r){var c=X.intersection(a,u);if(c)for(var[f,d]=X.edges(c),p=f.path[i],v=d.path[i],h=p;h<=v;h++){var y=n[h];if(y){var g=l(h),m=X.intersection(g,u);m&&y.push(cU(cU({},u),m))}}}return n};var ri=[];var DU=function(){return ri.some(function(e){return e.activeTargets.length>0})};var kU=function(){return ri.some(function(e){return e.skippedTargets.length>0})};var OU="ResizeObserver loop completed with undelivered notifications.",IU=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:OU}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=OU),window.dispatchEvent(e)};var Au;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Au||(Au={}));var Ni=function(e){return Object.freeze(e)};var MP=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,Ni(this)}return e})();var $P=(function(){function e(t,r,n,o){return this.x=t,this.y=r,this.width=n,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Ni(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,o=t.top,i=t.right,a=t.bottom,s=t.left,l=t.width,u=t.height;return{x:r,y:n,top:o,right:i,bottom:a,left:s,width:l,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})();var mg=function(e){return e instanceof SVGElement&&"getBBox"in e},BE=function(e){if(mg(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},UP=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},RU=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1};var Du=typeof window<"u"?window:{};var FE=new WeakMap,NU=/auto|scroll/,fbe=/^tb|vertical/,pbe=/msie|trident/i.test(Du.navigator&&Du.navigator.userAgent),pa=function(e){return parseFloat(e||"0")},Id=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new MP((r?t:e)||0,(r?e:t)||0)},LU=Ni({devicePixelContentBoxSize:Id(),borderBoxSize:Id(),contentBoxSize:Id(),contentRect:new $P(0,0,0,0)}),jP=function(e,t){if(t===void 0&&(t=!1),FE.has(e)&&!t)return FE.get(e);if(BE(e))return FE.set(e,LU),LU;var r=getComputedStyle(e),n=mg(e)&&e.ownerSVGElement&&e.getBBox(),o=!pbe&&r.boxSizing==="border-box",i=fbe.test(r.writingMode||""),a=!n&&NU.test(r.overflowY||""),s=!n&&NU.test(r.overflowX||""),l=n?0:pa(r.paddingTop),u=n?0:pa(r.paddingRight),c=n?0:pa(r.paddingBottom),f=n?0:pa(r.paddingLeft),d=n?0:pa(r.borderTopWidth),p=n?0:pa(r.borderRightWidth),v=n?0:pa(r.borderBottomWidth),h=n?0:pa(r.borderLeftWidth),y=f+u,g=l+c,m=h+p,b=d+v,E=s?e.offsetHeight-b-e.clientHeight:0,C=a?e.offsetWidth-m-e.clientWidth:0,x=o?y+m:0,P=o?g+b:0,N=n?n.width:pa(r.width)-x-C,D=n?n.height:pa(r.height)-P-E,R=N+y+C+m,M=D+g+E+b,I=Ni({devicePixelContentBoxSize:Id(Math.round(N*devicePixelRatio),Math.round(D*devicePixelRatio),i),borderBoxSize:Id(R,M,i),contentBoxSize:Id(N,D,i),contentRect:new $P(f,l,N,D)});return FE.set(e,I),I},ME=function(e,t,r){var n=jP(e,r),o=n.borderBoxSize,i=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case Au.DEVICE_PIXEL_CONTENT_BOX:return a;case Au.BORDER_BOX:return o;default:return i}};var qP=(function(){function e(t){var r=jP(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=Ni([r.borderBoxSize]),this.contentBoxSize=Ni([r.contentBoxSize]),this.devicePixelContentBoxSize=Ni([r.devicePixelContentBoxSize])}return e})();var $E=function(e){if(BE(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t};var BU=function(){var e=1/0,t=[];ri.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var c=new qP(u.target),f=$E(u.target);s.push(c),u.lastReportedSize=ME(u.target,u.observedBox),f<e&&(e=f)}),t.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var o=n[r];o()}return e};var zP=function(e){ri.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(o){o.isActive()&&($E(o.target)>e?r.activeTargets.push(o):r.skippedTargets.push(o))})})};var FU=function(){var e=0;for(zP(e);DU();)e=BU(),zP(e);return kU()&&IU(),e>0};var VP,MU=[],mbe=function(){return MU.splice(0).forEach(function(e){return e()})},$U=function(e){if(!VP){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return mbe()}).observe(r,n),VP=function(){r.textContent="".concat(t?t--:t++)}}MU.push(e),VP()};var UU=function(e){$U(function(){requestAnimationFrame(e)})};var UE=0,gbe=function(){return!!UE},hbe=250,vbe={attributes:!0,characterData:!0,childList:!0,subtree:!0},jU=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],qU=function(e){return e===void 0&&(e=0),Date.now()+e},HP=!1,ybe=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=hbe),!HP){HP=!0;var n=qU(t);UU(function(){var o=!1;try{o=FU()}finally{if(HP=!1,t=n-qU(),!gbe())return;o?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,vbe)};document.body?r():Du.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),jU.forEach(function(r){return Du.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),jU.forEach(function(r){return Du.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),jE=new ybe,WP=function(e){!UE&&e>0&&jE.start(),UE+=e,!UE&&jE.stop()};var bbe=function(e){return!mg(e)&&!RU(e)&&getComputedStyle(e).display==="inline"},zU=(function(){function e(t,r){this.target=t,this.observedBox=r||Au.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=ME(this.target,this.observedBox,!0);return bbe(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})();var VU=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})();var qE=new WeakMap,HU=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},gg=(function(){function e(){}return e.connect=function(t,r){var n=new VU(t,r);qE.set(t,n)},e.observe=function(t,r,n){var o=qE.get(t),i=o.observationTargets.length===0;HU(o.observationTargets,r)<0&&(i&&ri.push(o),o.observationTargets.push(new zU(r,n&&n.box)),WP(1),jE.schedule())},e.unobserve=function(t,r){var n=qE.get(t),o=HU(n.observationTargets,r),i=n.observationTargets.length===1;o>=0&&(i&&ri.splice(ri.indexOf(n),1),n.observationTargets.splice(o,1),WP(-1))},e.disconnect=function(t){var r=this,n=qE.get(t);n.observationTargets.slice().forEach(function(o){return r.unobserve(t,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})();var GP=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");gg.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!UP(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");gg.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!UP(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");gg.unobserve(this,t)},e.prototype.disconnect=function(){gg.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})();var s4=de(DT());function Ebe(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function VE(e,t){if(e==null)return{};var r=Ebe(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vg(e){"@babel/helpers - typeof";return vg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vg(e)}function xbe(e,t){if(vg(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vg(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wbe(e){var t=xbe(e,"string");return vg(t)==="symbol"?t:String(t)}function Xt(e,t,r){return t=wbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var JP=(0,Z.createContext)(null),ga=()=>{var e=(0,Z.useContext)(JP);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},ge=it;function WU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function zE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WU(Object(r),!0).forEach(function(n){Xt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WU(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var _be=25,Cbe=200,Sbe=function(){},Tbe=e=>(e==null?void 0:e.constructor.name)==="DataTransfer";function Pbe(e){var{editor:t,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=e,o=!1,i=null,a=null,s=null,l=0,u=!1,c=()=>{var I=fa.get(t);if(fa.delete(t),I){var{selection:B}=t,L=BP(t,I);L&&(!B||!X.equals(L,B))&&Q.select(t,L)}},f=()=>{var I=ts.get(t);if(ts.delete(t),!!I){if(I.at){var B=rt.isPoint(I.at)?AE(t,I.at):BP(t,I.at);if(!B)return;var L=S.range(t,B);(!t.selection||!X.equals(t.selection,L))&&Q.select(t,B)}I.run()}},d=()=>{if(a&&(clearTimeout(a),a=null),s&&(clearTimeout(s),s=null),!E()&&!b()){c();return}o||(o=!0,setTimeout(()=>o=!1)),b()&&(o="action");var I=t.selection&&S.rangeRef(t,t.selection,{affinity:"forward"});da.set(t,t.marks),Sbe("flush",ts.get(t),Bn.get(t));for(var B=E(),L;L=(U=Bn.get(t))===null||U===void 0?void 0:U[0];){var U,K,z=ti.get(t);z!==void 0&&(ti.delete(t),t.marks=z),z&&u===!1&&(u=null);var ae=CU(L);(!t.selection||!X.equals(t.selection,ae))&&Q.select(t,ae),L.diff.text?S.insertText(t,L.diff.text):S.deleteFragment(t),Bn.set(t,(K=Bn.get(t))===null||K===void 0?void 0:K.filter(J=>{var{id:ue}=J;return ue!==L.id})),wU(t,L)||(B=!1,ts.delete(t),da.delete(t),o="action",fa.delete(t),r.cancel(),n.cancel(),I==null||I.unref())}var ie=I==null?void 0:I.unref();if(ie&&!fa.get(t)&&(!t.selection||!X.equals(ie,t.selection))&&Q.select(t,ie),b()){f();return}B&&r(),r.flush(),n.flush(),c();var O=da.get(t);da.delete(t),O!==void 0&&(t.marks=O,t.onChange())},p=I=>{i&&clearTimeout(i),i=setTimeout(()=>{ll.set(t,!1),d()},_be)},v=I=>{ll.set(t,!0),i&&(clearTimeout(i),i=null)},h=function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,L=IE.get(t);if(L){if(E()||B){L.style.display="none";return}L.style.removeProperty("display")}},y=(I,B)=>{var L,U=(L=Bn.get(t))!==null&&L!==void 0?L:[];Bn.set(t,U);var K=q.leaf(t,I),z=U.findIndex(O=>F.equals(O.path,I));if(z<0){var ae=LP(K.text,B);ae&&U.push({path:I,diff:B,id:l++}),h();return}var ie=_U(K.text,U[z].diff,B);if(!ie){U.splice(z,1),h();return}U[z]=zE(zE({},U[z]),{},{diff:ie})},g=function(B){var{at:L}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};u=!1,fa.delete(t),r.cancel(),n.cancel(),b()&&d(),ts.set(t,{at:L,run:B}),s=setTimeout(d)},m=I=>{var B;if(a&&(clearTimeout(a),a=null),!Tu.get(t)){var{inputType:L}=I,U=null,K=I.dataTransfer||I.data||void 0;u!==!1&&L!=="insertText"&&L!=="insertCompositionText"&&(u=!1);var[z]=I.getTargetRanges();z&&(U=ge.toSlateRange(t,z,{exactMatch:!1,suppressThrow:!0}));var ae=ge.getWindow(t),ie=ae.getSelection();if(!U&&ie&&(z=ie,U=ge.toSlateRange(t,ie,{exactMatch:!1,suppressThrow:!0})),U=(B=U)!==null&&B!==void 0?B:t.selection,!!U){var O=!0;if(L.startsWith("delete")){var J=L.endsWith("Backward")?"backward":"forward",[ue,k]=X.edges(U),[be,Oe]=S.leaf(t,ue.path);if(X.isExpanded(U)&&be.text.length===ue.offset&&k.offset===0){var Te=S.next(t,{at:ue.path,match:q.isText});Te&&F.equals(Te[1],k.path)&&(J==="backward"?(U={anchor:k,focus:k},ue=k,[be,Oe]=Te):(U={anchor:ue,focus:ue},k=ue))}var Ke={text:"",start:ue.offset,end:k.offset},je=Bn.get(t),G=je==null?void 0:je.find(fe=>F.equals(fe.path,Oe)),ne=G?[G.diff,Ke]:[Ke],te=NP(be.text,...ne);if(te.length===0&&(O=!1),X.isExpanded(U)){if(O&&F.equals(U.anchor.path,U.focus.path)){var ce={path:U.anchor.path,offset:ue.offset},w=S.range(t,ce,ce);return P(w),y(U.anchor.path,{text:"",end:k.offset,start:ue.offset})}return g(()=>S.deleteFragment(t,{direction:J}),{at:U})}}switch(L){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return g(()=>S.deleteFragment(t),{at:U});case"deleteContent":case"deleteContentForward":{var{anchor:A}=U;if(O&&X.isCollapsed(U)){var $=q.leaf(t,A.path);if(A.offset<$.text.length)return y(A.path,{text:"",start:A.offset,end:A.offset+1})}return g(()=>S.deleteForward(t),{at:U})}case"deleteContentBackward":{var H,{anchor:he}=U,Ae=SE(z)?z.isCollapsed:!!((H=z)!==null&&H!==void 0&&H.collapsed);return O&&Ae&&X.isCollapsed(U)&&he.offset>0?y(he.path,{text:"",start:he.offset-1,end:he.offset}):g(()=>S.deleteBackward(t),{at:U})}case"deleteEntireSoftLine":return g(()=>{S.deleteBackward(t,{unit:"line"}),S.deleteForward(t,{unit:"line"})},{at:U});case"deleteHardLineBackward":return g(()=>S.deleteBackward(t,{unit:"block"}),{at:U});case"deleteSoftLineBackward":return g(()=>S.deleteBackward(t,{unit:"line"}),{at:U});case"deleteHardLineForward":return g(()=>S.deleteForward(t,{unit:"block"}),{at:U});case"deleteSoftLineForward":return g(()=>S.deleteForward(t,{unit:"line"}),{at:U});case"deleteWordBackward":return g(()=>S.deleteBackward(t,{unit:"word"}),{at:U});case"deleteWordForward":return g(()=>S.deleteForward(t,{unit:"word"}),{at:U});case"insertLineBreak":return g(()=>S.insertSoftBreak(t),{at:U});case"insertParagraph":return g(()=>S.insertBreak(t),{at:U});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(Tbe(K))return g(()=>ge.insertData(t,K),{at:U});var Ye=K??"";if(ti.get(t)&&(Ye=Ye.replace("\uFEFF","")),L==="insertText"&&/.*\n.*\n$/.test(Ye)&&(Ye=Ye.slice(0,-1)),Ye.includes(`
|
|
33
|
-
`))return g(()=>{var fe=Ye.split(`
|
|
34
|
-
`);fe.forEach((Ie,Me)=>{Ie&&S.insertText(t,Ie),Me!==fe.length-1&&S.insertSoftBreak(t)})},{at:U});if(F.equals(U.anchor.path,U.focus.path)){var[At,Dt]=X.edges(U),lr={start:At.offset,end:Dt.offset,text:Ye};if(Ye&&u&&L==="insertCompositionText"){var fo=u.start+u.text.search(/\S|$/),Bo=lr.start+lr.text.search(/\S|$/);Bo===fo+1&&lr.end===u.start+u.text.length?(lr.start-=1,u=null,R()):u=!1}else L==="insertText"?u===null?u=lr:u&&X.isCollapsed(U)&&u.end+u.text.length===At.offset?u=zE(zE({},u),{},{text:u.text+Ye}):u=!1:u=!1;if(O){var po=t.selection;if(y(At.path,lr),po){var ee={path:At.path,offset:At.offset+Ye.length};g(()=>{Q.select(t,{anchor:ee,focus:ee})},{at:ee})}return}}return g(()=>S.insertText(t,Ye),{at:U})}}}}},b=()=>!!ts.get(t),E=()=>{var I;return!!((I=Bn.get(t))!==null&&I!==void 0&&I.length)},C=()=>b()||E(),x=()=>o,P=I=>{fa.set(t,I),a&&(clearTimeout(a),a=null);var{selection:B}=t;if(I){var L=!B||!F.equals(B.anchor.path,I.anchor.path),U=!B||!F.equals(B.anchor.path.slice(0,-1),I.anchor.path.slice(0,-1));(L&&u||U)&&(u=!1),(L||E())&&(a=setTimeout(d,Cbe))}},N=()=>{(b()||!E())&&d()},D=I=>{E()||(h(!0),setTimeout(h))},R=()=>{b()||(s=setTimeout(d))},M=I=>{if(!(E()||b())&&I.some(L=>kE(t,L,I))){var B;(B=IP.get(t))===null||B===void 0||B()}};return{flush:d,scheduleFlush:R,hasPendingDiffs:E,hasPendingAction:b,hasPendingChanges:C,isFlushing:x,handleUserSelect:P,handleCompositionEnd:p,handleCompositionStart:v,handleDOMBeforeInput:m,handleKeyDown:D,handleDomMutations:M,handleInput:N}}function Abe(){var e=(0,Z.useRef)(!1);return(0,Z.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var ns=fg?Z.useLayoutEffect:Z.useEffect;function Dbe(e,t,r){var[n]=(0,Z.useState)(()=>new MutationObserver(t));ns(()=>{n.takeRecords()}),(0,Z.useEffect)(()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return n.observe(e.current,r),()=>n.disconnect()},[n,e,r])}var kbe=["node"];function GU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Obe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GU(Object(r),!0).forEach(function(n){Xt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GU(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ibe={subtree:!0,childList:!0,characterData:!0},Rbe=nn?e=>{var{node:t}=e,r=VE(e,kbe);if(!nn)return null;var n=ga(),o=Abe(),[i]=(0,Z.useState)(()=>Pbe(Obe({editor:n},r)));return Dbe(t,i.handleDomMutations,Ibe),NE.set(n,i.scheduleFlush),o&&i.flush(),i}:()=>null;function KU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Nbe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KU(Object(r),!0).forEach(function(n){Xt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KU(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Lbe=e=>{var{isLast:t,leaf:r,parent:n,text:o}=e,i=ga(),a=ge.findPath(i,o),s=F.parent(a),l=!!r[RP];return i.isVoid(n)?Z.default.createElement(KP,{length:q.string(n).length}):r.text===""&&n.children[n.children.length-1]===o&&!i.isInline(n)&&S.string(i,s)===""?Z.default.createElement(KP,{isLineBreak:!0,isMarkPlaceholder:l}):r.text===""?Z.default.createElement(KP,{isMarkPlaceholder:l}):t&&r.text.slice(-1)===`
|
|
35
|
-
`?Z.default.createElement(YU,{isTrailing:!0,text:r.text}):Z.default.createElement(YU,{text:r.text})},YU=e=>{var{text:t,isTrailing:r=!1}=e,n=(0,Z.useRef)(null),o=()=>"".concat(t??"").concat(r?`
|
|
36
|
-
`:""),[i]=(0,Z.useState)(o);return ns(()=>{var a=o();n.current&&n.current.textContent!==a&&(n.current.textContent=a)}),Z.default.createElement(Bbe,{ref:n},i)},Bbe=(0,Z.memo)((0,Z.forwardRef)((e,t)=>Z.default.createElement("span",{"data-slate-string":!0,ref:t},e.children))),KP=e=>{var{length:t=0,isLineBreak:r=!1,isMarkPlaceholder:n=!1}=e,o={"data-slate-zero-width":r?"n":"z","data-slate-length":t};return n&&(o["data-slate-mark-placeholder"]=!0),Z.default.createElement("span",Nbe({},o),!nn||!r?"\uFEFF":null,r?Z.default.createElement("br",null):null)};function XU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function l4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XU(Object(r),!0).forEach(function(n){Xt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XU(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Fbe=nn?300:0;function Mbe(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function ZU(e){e.current&&(clearTimeout(e.current),e.current=null)}var $be=e=>Z.default.createElement(qbe,l4({},e)),Ube=e=>{var{leaf:t,isLast:r,text:n,parent:o,renderPlaceholder:i,renderLeaf:a=$be,leafPosition:s}=e,l=ga(),u=(0,Z.useRef)(null),c=(0,Z.useRef)(null),[f,d]=(0,Z.useState)(!1),p=(0,Z.useRef)(null),v=(0,Z.useCallback)(b=>{if(Mbe(u,b==null),b==null){var E;IE.delete(l),(E=t.onPlaceholderResize)===null||E===void 0||E.call(t,null)}else{if(IE.set(l,b),!u.current){var C=window.ResizeObserver||GP;u.current=new C(()=>{var x;(x=t.onPlaceholderResize)===null||x===void 0||x.call(t,b)})}u.current.observe(b),c.current=b}},[c,t,l]),h=Z.default.createElement(Lbe,{isLast:r,leaf:t,parent:o,text:n}),y=!!t[Su];if((0,Z.useEffect)(()=>(y?p.current||(p.current=setTimeout(()=>{d(!0),p.current=null},Fbe)):(ZU(p),d(!1)),()=>ZU(p)),[y,d]),y&&f){var g={children:t.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:al?"inherit":void 0},contentEditable:!1,ref:v}};h=Z.default.createElement(Z.default.Fragment,null,h,i(g))}var m={"data-slate-leaf":!0};return a({attributes:m,children:h,leaf:t,text:n,leafPosition:s})},jbe=Z.default.memo(Ube,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&Hr.equals(t.leaf,e.leaf)&&t.leaf[Su]===e.leaf[Su]),qbe=e=>{var{attributes:t,children:r}=e;return Z.default.createElement("span",l4({},t),r)};function zbe(e,t){var[,r]=(0,Z.useReducer)(u=>u+1,0),n=(0,Z.useRef)(),o=(0,Z.useRef)(()=>null),i=(0,Z.useRef)(null),a;try{if(e!==o.current||n.current){var s=e();t(i.current,s)?a=i.current:a=s}else a=i.current}catch(u){throw n.current&&Vbe(u)&&(u.message+=`
|
|
37
|
-
The error may be correlated with this previous error:
|
|
38
|
-
`.concat(n.current.stack,`
|
|
39
|
-
|
|
40
|
-
`)),u}o.current=e,i.current=a,n.current=void 0;var l=(0,Z.useCallback)(()=>{try{var u=o.current();if(t(i.current,u))return;i.current=u}catch(c){c instanceof Error?n.current=c:n.current=new Error(String(c))}r()},[]);return[a,l]}function Vbe(e){return e instanceof Error}var u4=(0,Z.createContext)({}),c4=(e,t)=>{var r=ga(),{decorate:n,addEventListener:o}=(0,Z.useContext)(u4),i=()=>{var u=ge.findPath(r,e);return n([e,u])},a=q.isText(e)?FP:LE,[s,l]=zbe(i,a);return ns(()=>{var u=o(l);return l(),u},[o,l]),(0,Z.useMemo)(()=>[...s,...t],[s,t])},Hbe=e=>{var t=(0,Z.useRef)(new Set),r=(0,Z.useRef)(e);ns(()=>{r.current=e,t.current.forEach(i=>i())},[e]);var n=(0,Z.useCallback)(i=>r.current(i),[]),o=(0,Z.useCallback)(i=>(t.current.add(i),()=>{t.current.delete(i)}),[]);return(0,Z.useMemo)(()=>({decorate:n,addEventListener:o}),[n,o])};function QU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function d4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QU(Object(r),!0).forEach(function(n){Xt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QU(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Wbe=e=>Z.default.createElement(Kbe,d4({},e)),Gbe=e=>{for(var{decorations:t,isLast:r,parent:n,renderPlaceholder:o,renderLeaf:i,renderText:a=Wbe,text:s}=e,l=ga(),u=(0,Z.useRef)(null),c=c4(s,t),f=Hr.decorations(s,c),d=ge.findKey(l,s),p=[],v=0;v<f.length;v++){var{leaf:h,position:y}=f[v];p.push(Z.default.createElement(jbe,{isLast:r&&v===f.length-1,key:"".concat(d.id,"-").concat(v),renderPlaceholder:o,leaf:h,leafPosition:y,text:s,parent:n,renderLeaf:i}))}var g=(0,Z.useCallback)(b=>{var E=pg.get(l);b?(E==null||E.set(d,b),sl.set(s,b),Od.set(b,s)):(E==null||E.delete(d),sl.delete(s),u.current&&Od.delete(u.current)),u.current=b},[u,l,d,s]),m={"data-slate-node":"text",ref:g};return a({text:s,children:p,attributes:m})},f4=Z.default.memo(Gbe,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderText===e.renderText&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&FP(t.decorations,e.decorations)),Kbe=e=>{var{attributes:t,children:r}=e;return Z.default.createElement("span",d4({},t),r)};function JU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function YP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JU(Object(r),!0).forEach(function(n){Xt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JU(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ybe=e=>Z.default.createElement(yg,YP({},e)),Xbe=e=>{var{decorations:t,element:r,renderElement:n=Ybe,renderChunk:o,renderPlaceholder:i,renderLeaf:a,renderText:s}=e,l=ga(),u=aEe(),c=l.isInline(r),f=c4(r,t),d=ge.findKey(l,r),p=(0,Z.useCallback)(E=>{var C=pg.get(l);E?(C==null||C.set(d,E),sl.set(r,E),Od.set(E,r)):(C==null||C.delete(d),sl.delete(r))},[l,d,r]),v=g4({decorations:f,node:r,renderElement:n,renderChunk:o,renderPlaceholder:i,renderLeaf:a,renderText:s}),h={"data-slate-node":"element",ref:p};if(c&&(h["data-slate-inline"]=!0),!c&&S.hasInlines(l,r)){var y=q.string(r),g=(0,QP.default)(y);g==="rtl"&&(h.dir=g)}if(S.isVoid(l,r)){h["data-slate-void"]=!0,!u&&c&&(h.contentEditable=!1);var m=c?"span":"div",[[b]]=q.texts(r);v=Z.default.createElement(m,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},Z.default.createElement(f4,{renderPlaceholder:i,decorations:[],isLast:!1,parent:r,text:b})),Pu.set(b,0),kd.set(b,r)}return n({attributes:h,children:v,element:r})},Zbe=Z.default.memo(Xbe,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderChunk===t.renderChunk&&e.renderText===t.renderText&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&LE(e.decorations,t.decorations)),yg=e=>{var{attributes:t,children:r,element:n}=e,o=ga(),i=o.isInline(n)?"span":"div";return Z.default.createElement(i,YP(YP({},t),{},{style:{position:"relative"}}),r)},XP=class{constructor(t,r){var{chunkSize:n,debug:o}=r;Xt(this,"root",void 0),Xt(this,"chunkSize",void 0),Xt(this,"debug",void 0),Xt(this,"reachedEnd",void 0),Xt(this,"pointerChunk",void 0),Xt(this,"pointerIndex",void 0),Xt(this,"pointerIndexStack",void 0),Xt(this,"cachedPointerNode",void 0),this.root=t,this.chunkSize=n,this.debug=o??!1,this.pointerChunk=t,this.pointerIndex=-1,this.pointerIndexStack=[],this.reachedEnd=!1,this.validateState()}readLeaf(){if(this.reachedEnd)return null;for(;;)if(this.pointerIndex+1<this.pointerSiblings.length){this.pointerIndex++,this.cachedPointerNode=void 0;break}else{if(this.pointerChunk.type==="root")return this.reachedEnd=!0,null;this.exitChunk()}return this.validateState(),this.enterChunkUntilLeaf(!1),this.pointerNode}returnToPreviousLeaf(){if(this.reachedEnd){this.reachedEnd=!1,this.enterChunkUntilLeaf(!0);return}for(;;)if(this.pointerIndex>=1){this.pointerIndex--,this.cachedPointerNode=void 0;break}else if(this.pointerChunk.type==="root"){this.pointerIndex=-1;return}else this.exitChunk();this.validateState(),this.enterChunkUntilLeaf(!0)}insertBefore(t){this.returnToPreviousLeaf(),this.insertAfter(t),this.readLeaf()}insertAfter(t){if(t.length!==0){for(var r=0,n=0;this.pointerChunk.type==="chunk"&&this.pointerIndex===this.pointerSiblings.length-1;){var o=this.chunkSize-this.pointerSiblings.length,i=Math.min(o,t.length);if(i>0){var a=t.splice(0,i);this.rawInsertAfter(a,r)}this.exitChunk(),r++}if(t.length!==0){var s=this.savePointer(),l=null;if(this.readLeaf())for(;this.pointerChunk.type==="chunk"&&this.pointerIndex===0;){var u=this.chunkSize-this.pointerSiblings.length,c=Math.min(u,t.length);if(c>0){var f=t.splice(-c,c);this.pointerIndex=-1,this.cachedPointerNode=void 0,this.rawInsertAfter(f,n),l||(l=this.savePointer())}this.exitChunk(),n++}this.restorePointer(s);var d=Math.max(r,n);this.rawInsertAfter(t,d),l&&this.restorePointer(l),this.validateState()}}}remove(){this.pointerSiblings.splice(this.pointerIndex--,1),this.cachedPointerNode=void 0,this.pointerSiblings.length===0&&this.pointerChunk.type==="chunk"?(this.exitChunk(),this.remove()):this.invalidateChunk(),this.validateState()}invalidateChunk(){for(var t=this.pointerChunk;t.type==="chunk";t=t.parent)this.root.modifiedChunks.add(t)}get atStart(){return this.pointerChunk.type==="root"&&this.pointerIndex===-1}get pointerSiblings(){return this.pointerChunk.children}getPointerNode(){return this.reachedEnd||this.pointerIndex===-1?null:this.pointerSiblings[this.pointerIndex]}get pointerNode(){if(this.cachedPointerNode!==void 0)return this.cachedPointerNode;var t=this.getPointerNode();return this.cachedPointerNode=t,t}getChunkPath(t){for(var r=[],n=t;n.type==="chunk";n=n.parent){var o=n.parent.children.indexOf(n);if(o===-1)return null;r.unshift(o)}return r}savePointer(){if(this.atStart)return"start";if(!this.pointerNode)throw new Error("Cannot save pointer when pointerNode is null");return{chunk:this.pointerChunk,node:this.pointerNode}}restorePointer(t){if(t==="start"){this.pointerChunk=this.root,this.pointerIndex=-1,this.pointerIndexStack=[],this.reachedEnd=!1,this.cachedPointerNode=void 0;return}var{chunk:r,node:n}=t,o=r.children.indexOf(n);if(o===-1)throw new Error("Cannot restore point because saved node is no longer in saved chunk");var i=this.getChunkPath(r);if(!i)throw new Error("Cannot restore point because saved chunk is no longer connected to root");this.pointerChunk=r,this.pointerIndex=o,this.pointerIndexStack=i,this.reachedEnd=!1,this.cachedPointerNode=n,this.validateState()}enterChunk(t){var r;if(((r=this.pointerNode)===null||r===void 0?void 0:r.type)!=="chunk")throw new Error("Cannot enter non-chunk");if(this.pointerIndexStack.push(this.pointerIndex),this.pointerChunk=this.pointerNode,this.pointerIndex=t?this.pointerSiblings.length-1:0,this.cachedPointerNode=void 0,this.validateState(),this.pointerChunk.children.length===0)throw new Error("Cannot enter empty chunk")}enterChunkUntilLeaf(t){for(;((r=this.pointerNode)===null||r===void 0?void 0:r.type)==="chunk";){var r;this.enterChunk(t)}}exitChunk(){if(this.pointerChunk.type==="root")throw new Error("Cannot exit root");var t=this.pointerChunk;this.pointerChunk=t.parent,this.pointerIndex=this.pointerIndexStack.pop(),this.cachedPointerNode=void 0,this.validateState()}rawInsertAfter(t,r){if(t.length!==0){for(var n=(c,f,d)=>{if(d===1)return c;for(var p=[],v=0;v<this.chunkSize;v++){var h=c.slice(v*d,(v+1)*d);if(h.length===0)break;var y={type:"chunk",key:new dg,parent:f,children:[]};y.children=n(h,y,d/this.chunkSize),p.push(y)}return p},o=this.pointerSiblings.length+t.length,i=0,a=this.chunkSize;a<o;a*=this.chunkSize)i++;var s=Math.max(i,r),l=Math.pow(this.chunkSize,s),u=n(t,this.pointerChunk,l);this.pointerSiblings.splice(this.pointerIndex+1,0,...u),this.pointerIndex+=u.length,this.cachedPointerNode=void 0,this.invalidateChunk(),this.validateState()}}validateState(){if(this.debug){var t=n=>{if(n.type==="chunk"){var{parent:o,children:i}=n;if(!o.children.includes(n))throw new Error("Debug: Chunk ".concat(n.key.id," has an incorrect parent property"));i.forEach(t)}};if(this.root.children.forEach(t),this.cachedPointerNode!==void 0&&this.cachedPointerNode!==this.getPointerNode())throw new Error("Debug: The cached pointer is incorrect and has not been invalidated");var r=this.getChunkPath(this.pointerChunk);if(!r)throw new Error("Debug: The pointer chunk is not connected to the root");if(!F.equals(this.pointerIndexStack,r))throw new Error("Debug: The cached index stack [".concat(this.pointerIndexStack.join(", "),"] does not match the path of the pointer chunk [").concat(r.join(", "),"]"))}}},ZP=class{constructor(t,r){Xt(this,"editor",void 0),Xt(this,"children",void 0),Xt(this,"cachedKeys",void 0),Xt(this,"pointerIndex",void 0),this.editor=t,this.children=r,this.cachedKeys=new Array(r.length),this.pointerIndex=0}read(t){if(t===1)return[this.children[this.pointerIndex++]];var r=this.remaining(t);return this.pointerIndex+=t,r}remaining(t){return t===void 0?this.children.slice(this.pointerIndex):this.children.slice(this.pointerIndex,this.pointerIndex+t)}get reachedEnd(){return this.pointerIndex>=this.children.length}lookAhead(t,r){var n=this.children.indexOf(t,this.pointerIndex);if(n>-1)return n-this.pointerIndex;for(var o=this.pointerIndex;o<this.children.length;o++){var i=this.children[o],a=this.findKey(i,o);if(a===r)return o-this.pointerIndex}return-1}toChunkLeaves(t,r){return t.map((n,o)=>({type:"leaf",node:n,key:this.findKey(n,r+o),index:r+o}))}findKey(t,r){var n=this.cachedKeys[r];if(n)return n;var o=ge.findKey(this.editor,t);return this.cachedKeys[r]=o,o}},Qbe=(e,t)=>{for(var{chunkTree:r,children:n,chunkSize:o,rerenderChildren:i=[],onInsert:a,onUpdate:s,onIndexChange:l,debug:u}=t,c=new XP(r,{chunkSize:o,debug:u}),f=new ZP(e,n),d,p=function(){var g=f.lookAhead(d.node,d.key),m=g>0&&r.movedNodeKeys.has(d.key);if(g===-1||m)return c.remove(),1;var b=f.pointerIndex,E=f.read(g+1),C=E.pop();if(E.length){var x=f.toChunkLeaves(E,b);c.insertBefore(x),E.forEach((N,D)=>{a==null||a(N,b+D)})}var P=f.pointerIndex-1;d.node!==C&&(d.node=C,c.invalidateChunk(),s==null||s(C,P)),d.index!==P&&(d.index=P,l==null||l(C,P)),i.includes(P)&&c.invalidateChunk()};d=c.readLeaf();)p();if(!f.reachedEnd){var v=f.remaining(),h=f.toChunkLeaves(v,f.pointerIndex);c.returnToPreviousLeaf(),c.insertAfter(h),v.forEach((y,g)=>{a==null||a(y,f.pointerIndex+g)})}r.movedNodeKeys.clear()};function e4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Jbe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e4(Object(r),!0).forEach(function(n){Xt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e4(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var t4=new WeakMap,p4=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=ge.findKey(t,r),i=t4.get(o);return i||(i={type:"root",movedNodeKeys:new Set,modifiedChunks:new Set,children:[]},t4.set(o,i)),n.reconcile&&Qbe(t,Jbe({chunkTree:i,children:r.children},n.reconcile)),i};function r4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function eEe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r4(Object(r),!0).forEach(function(n){Xt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r4(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var tEe=e=>{var{children:t}=e;return t},m4=e=>{var{root:t,ancestor:r,renderElement:n,renderChunk:o=tEe}=e;return r.children.map(i=>{if(i.type==="chunk"){var a=i.key.id,s=o({highest:r===t,lowest:i.children.some(u=>u.type==="leaf"),attributes:{"data-slate-chunk":!0},children:Z.default.createElement(nEe,{root:t,ancestor:i,renderElement:n,renderChunk:o})});return Z.default.createElement(Z.Fragment,{key:a},s)}var l=i.node;return n(l,i.index,i.key)})},rEe=e=>((0,Z.useEffect)(()=>{e.root.modifiedChunks.clear()}),Z.default.createElement(m4,eEe({},e))),nEe=Z.default.memo(m4,(e,t)=>e.root===t.root&&e.renderElement===t.renderElement&&e.renderChunk===t.renderChunk&&!t.root.modifiedChunks.has(t.ancestor)),oEe=(0,Z.createContext)(null);var g4=e=>{var{decorations:t,node:r,renderElement:n,renderChunk:o,renderPlaceholder:i,renderText:a,renderLeaf:s}=e,l=ga();Tu.set(l,!1);var u=q.isElement(r)&&!l.isInline(r),c=u&&S.hasInlines(l,r),f=c?null:l.getChunkSize(r),d=!!f,{decorationsByChild:p,childrenToRedecorate:v}=iEe(l,r,t);d||r.children.forEach((m,b)=>{Pu.set(m,b),kd.set(m,r)});var h=(0,Z.useCallback)((m,b,E)=>{var C=E??ge.findKey(l,m);return Z.default.createElement(oEe.Provider,{key:"provider-".concat(C.id),value:m},Z.default.createElement(Zbe,{decorations:p[b],element:m,key:C.id,renderElement:n,renderChunk:o,renderPlaceholder:i,renderLeaf:s,renderText:a}))},[l,p,n,o,i,s,a]),y=(m,b)=>{var E=ge.findKey(l,m);return Z.default.createElement(f4,{decorations:p[b],key:E.id,isLast:b===r.children.length-1,parent:r,renderPlaceholder:i,renderLeaf:s,renderText:a,text:m})};if(!d)return r.children.map((m,b)=>q.isText(m)?y(m,b):h(m,b));var g=p4(l,r,{reconcile:{chunkSize:f,rerenderChildren:v,onInsert:(m,b)=>{Pu.set(m,b),kd.set(m,r)},onUpdate:(m,b)=>{Pu.set(m,b),kd.set(m,r)},onIndexChange:(m,b)=>{Pu.set(m,b)}}});return Z.default.createElement(rEe,{root:g,ancestor:g,renderElement:h,renderChunk:o})},iEe=(e,t,r)=>{var n=AU(e,t,r),o=(0,Z.useRef)(n).current,i=[];o.length=n.length;for(var a=0;a<n.length;a++){var s,l=n[a],u=(s=o[a])!==null&&s!==void 0?s:null;LE(u,l)||(o[a]=l,i.push(a))}return{decorationsByChild:o,childrenToRedecorate:i}},h4=(0,Z.createContext)(!1),aEe=()=>(0,Z.useContext)(h4),e1=(0,Z.createContext)({});function sEe(){var e=(0,Z.useRef)(new Set),t=(0,Z.useRef)(new Set),r=(0,Z.useCallback)(()=>{e.current.forEach(a=>a())},[]),n=(0,Z.useCallback)(()=>{t.current.forEach(a=>a()),t.current.clear()},[]),o=(0,Z.useCallback)(function(a){var{deferred:s=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=s?()=>t.current.add(a):a;return e.current.add(l),()=>{e.current.delete(l)}},[]),i=(0,Z.useMemo)(()=>({addEventListener:o,flushDeferred:n}),[o,n]);return{selectorContext:i,onChange:r}}function lEe(){var{flushDeferred:e}=(0,Z.useContext)(e1);ns(e)}var t1=()=>{var{addEventListener:e}=(0,Z.useContext)(e1),[,t]=(0,Z.useReducer)(r=>r+1,0);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");return ns(()=>e(t),[e]),ga()};function uEe(){var e=ga(),t=(0,Z.useRef)(!1),r=(0,Z.useRef)(0),n=(0,Z.useCallback)(()=>{if(!t.current){t.current=!0;var o=ge.getWindow(e);o.cancelAnimationFrame(r.current),r.current=o.requestAnimationFrame(()=>{t.current=!1})}},[e]);return(0,Z.useEffect)(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:t,onUserInput:n}}var cEe=(e,t)=>{var r=[],n=()=>{r=[]},o=a=>{if(t.current){var s=a.filter(l=>kE(e,l,a));r.push(...s)}};function i(){r.length>0&&(r.reverse().forEach(a=>{a.type!=="characterData"&&(a.removedNodes.forEach(s=>{a.target.insertBefore(s,a.nextSibling)}),a.addedNodes.forEach(s=>{a.target.removeChild(s)}))}),n())}return{registerMutations:o,restoreDOM:i,clear:n}},dEe={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0},HE=class extends Z.Component{constructor(){super(...arguments),Xt(this,"context",null),Xt(this,"manager",null),Xt(this,"mutationObserver",null)}observe(){var t,{node:r}=this.props;if(!r.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(r.current,dEe)}componentDidMount(){var{receivedUserInput:t}=this.props,r=this.context;this.manager=cEe(r,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,r,n,o=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(o!=null&&o.length){var i;(i=this.manager)===null||i===void 0||i.registerMutations(o)}return(r=this.mutationObserver)===null||r===void 0||r.disconnect(),(n=this.manager)===null||n===void 0||n.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}};Xt(HE,"contextType",JP);var fEe=nn?HE:e=>{var{children:t}=e;return Z.default.createElement(Z.default.Fragment,null,t)},pEe=(0,Z.createContext)(!1);var mEe=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderChunk","renderLeaf","renderText","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],gEe=["text"];function n4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ma(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?n4(Object(r),!0).forEach(function(n){Xt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n4(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var hEe=e=>Z.default.createElement(Z.default.Fragment,null,g4(e)),v4=(0,Z.forwardRef)((e,t)=>{var r=(0,Z.useCallback)(G=>Z.default.createElement(vEe,ma({},G)),[]),{autoFocus:n,decorate:o=yEe,onDOMBeforeInput:i,placeholder:a,readOnly:s=!1,renderElement:l,renderChunk:u,renderLeaf:c,renderText:f,renderPlaceholder:d=r,scrollSelectionIntoView:p=bEe,style:v={},as:h="div",disableDefaultStyles:y=!1}=e,g=VE(e,mEe),m=t1(),[b,E]=(0,Z.useState)(!1),C=(0,Z.useRef)(null),x=(0,Z.useRef)([]),[P,N]=(0,Z.useState)(),D=(0,Z.useRef)(!1),{onUserInput:R,receivedUserInput:M}=uEe(),[,I]=(0,Z.useReducer)(G=>G+1,0);IP.set(m,I),PE.set(m,s);var B=(0,Z.useMemo)(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);(0,Z.useEffect)(()=>{C.current&&n&&C.current.focus()},[n]);var L=(0,Z.useRef)(),U=(0,Z.useMemo)(()=>(0,a4.default)(()=>{if(Tu.get(m)){U();return}var G=ge.toDOMNode(m,m),ne=G.getRootNode();if(!D.current&&al&&ne instanceof ShadowRoot){D.current=!0;var te=hU();te?document.execCommand("indent"):Q.deselect(m),D.current=!1;return}var ce=L.current;if((nn||!ge.isComposing(m))&&(!B.isUpdatingSelection||ce!=null&&ce.isFlushing())&&!B.isDraggingInternally){var w=ge.findDocumentOrShadowRoot(m),{activeElement:A}=w,$=ge.toDOMNode(m,m),H=Pd(w);if(A===$?(B.latestElement=A,Ja.set(m,!0)):Ja.delete(m),!H)return Q.deselect(m);var{anchorNode:he,focusNode:Ae}=H,Ye=ge.hasEditableTarget(m,he)||ge.isTargetInsideNonReadonlyVoid(m,he),At=ge.hasTarget(m,Ae);if(Ye&&At){var Dt=ge.toSlateRange(m,H,{exactMatch:!1,suppressThrow:!0});Dt&&(!ge.isComposing(m)&&!(ce!=null&&ce.hasPendingChanges())&&!(ce!=null&&ce.isFlushing())?Q.select(m,Dt):ce==null||ce.handleUserSelect(Dt))}s&&(!Ye||!At)&&Q.deselect(m)}},100),[m,s,B]),K=(0,Z.useMemo)(()=>(0,i4.default)(U,0),[U]);L.current=Rbe({node:C,onDOMSelectionChange:U,scheduleOnDOMSelectionChange:K}),ns(()=>{var G,ne,te;C.current&&(te=DE(C.current))?(OP.set(m,te),Ad.set(m,C.current),sl.set(m,C.current),Od.set(C.current,m)):sl.delete(m);var{selection:ce}=m,w=ge.findDocumentOrShadowRoot(m),A=Pd(w);if(!(!A||!ge.isFocused(m)||(G=L.current)!==null&&G!==void 0&&G.hasPendingAction())){var $=Ye=>{var At=A.type!=="None";if(!(!ce&&!At)){var Dt=A.focusNode,lr;if(Cu&&A.rangeCount>1){var fo=A.getRangeAt(0),Bo=A.getRangeAt(A.rangeCount-1);fo.startContainer===Dt?lr=Bo.endContainer:lr=fo.startContainer}else lr=A.anchorNode;var po=Ad.get(m),ee=!1;if(il(po,lr)&&il(po,Dt)&&(ee=!0),At&&ee&&ce&&!Ye){var fe=ge.toSlateRange(m,A,{exactMatch:!0,suppressThrow:!0});if(fe&&X.equals(fe,ce)){var Ie;if(!B.hasMarkPlaceholder||(Ie=lr)!==null&&Ie!==void 0&&(Ie=Ie.parentElement)!==null&&Ie!==void 0&&Ie.hasAttribute("data-slate-mark-placeholder"))return}}if(ce&&!ge.hasRange(m,ce)){m.selection=ge.toSlateRange(m,A,{exactMatch:!1,suppressThrow:!0});return}B.isUpdatingSelection=!0;var Me=null;try{Me=ce&&ge.toDOMRange(m,ce)}catch{}return Me?(ge.isComposing(m)&&!nn?A.collapseToEnd():X.isBackward(ce)?A.setBaseAndExtent(Me.endContainer,Me.endOffset,Me.startContainer,Me.startOffset):A.setBaseAndExtent(Me.startContainer,Me.startOffset,Me.endContainer,Me.endOffset),p(m,Me)):A.removeAllRanges(),Me}};A.rangeCount<=1&&$();var H=((ne=L.current)===null||ne===void 0?void 0:ne.isFlushing())==="action";if(!nn||!H){setTimeout(()=>{B.isUpdatingSelection=!1});return}var he=null,Ae=requestAnimationFrame(()=>{if(H){var Ye=At=>{try{var Dt=ge.toDOMNode(m,m);Dt.focus(),$(At)}catch{}};Ye(),he=setTimeout(()=>{Ye(!0),B.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(Ae),he&&clearTimeout(he)}}});var z=(0,Z.useCallback)(G=>{o4(m,G);var ne=ge.toDOMNode(m,m),te=ne.getRootNode();if(D!=null&&D.current&&al&&te instanceof ShadowRoot){var ce=G.getTargetRanges(),w=ce[0],A=new window.Range;A.setStart(w.startContainer,w.startOffset),A.setEnd(w.endContainer,w.endOffset);var $=ge.toSlateRange(m,A,{exactMatch:!1,suppressThrow:!1});Q.select(m,$),G.preventDefault(),G.stopImmediatePropagation();return}if(R(),!s&&ge.hasEditableTarget(m,G.target)&&!EEe(G,i)){var H;if(L.current)return L.current.handleDOMBeforeInput(G);K.flush(),U.flush();var{selection:he}=m,{inputType:Ae}=G,Ye=G.dataTransfer||G.data||void 0,At=Ae==="insertCompositionText"||Ae==="deleteCompositionText";if(At&&ge.isComposing(m))return;var Dt=!1;if(Ae==="insertText"&&he&&X.isCollapsed(he)&&G.data&&G.data.length===1&&/[a-z ]/i.test(G.data)&&he.anchor.offset!==0&&(Dt=!0,m.marks&&(Dt=!1),!Tu.get(m))){var lr,fo,{anchor:Bo}=he,[po,ee]=ge.toDOMPoint(m,Bo),fe=(lr=po.parentElement)===null||lr===void 0?void 0:lr.closest("a"),Ie=ge.getWindow(m);if(Dt&&fe&&ge.hasDOMNode(m,fe)){var Me,Ct=Ie==null?void 0:Ie.document.createTreeWalker(fe,NodeFilter.SHOW_TEXT).lastChild();Ct===po&&((Me=Ct.textContent)===null||Me===void 0?void 0:Me.length)===ee&&(Dt=!1)}if(Dt&&po.parentElement&&(Ie==null||(fo=Ie.getComputedStyle(po.parentElement))===null||fo===void 0?void 0:fo.whiteSpace)==="pre"){var ln=S.above(m,{at:Bo.path,match:vi=>q.isElement(vi)&&S.isBlock(m,vi)});ln&&q.string(ln[0]).includes(" ")&&(Dt=!1)}}if((!Ae.startsWith("delete")||Ae.startsWith("deleteBy"))&&!Tu.get(m)){var[Fo]=G.getTargetRanges();if(Fo){var un=ge.toSlateRange(m,Fo,{exactMatch:!1,suppressThrow:!1});if(!he||!X.equals(he,un)){Dt=!1;var rr=!At&&m.selection&&S.rangeRef(m,m.selection);Q.select(m,un),rr&&Dd.set(m,rr)}}}if(At)return;if(Dt||G.preventDefault(),he&&X.isExpanded(he)&&Ae.startsWith("delete")){var mo=Ae.endsWith("Backward")?"backward":"forward";S.deleteFragment(m,{direction:mo});return}switch(Ae){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{S.deleteFragment(m);break}case"deleteContent":case"deleteContentForward":{S.deleteForward(m);break}case"deleteContentBackward":{S.deleteBackward(m);break}case"deleteEntireSoftLine":{S.deleteBackward(m,{unit:"line"}),S.deleteForward(m,{unit:"line"});break}case"deleteHardLineBackward":{S.deleteBackward(m,{unit:"block"});break}case"deleteSoftLineBackward":{S.deleteBackward(m,{unit:"line"});break}case"deleteHardLineForward":{S.deleteForward(m,{unit:"block"});break}case"deleteSoftLineForward":{S.deleteForward(m,{unit:"line"});break}case"deleteWordBackward":{S.deleteBackward(m,{unit:"word"});break}case"deleteWordForward":{S.deleteForward(m,{unit:"word"});break}case"insertLineBreak":S.insertSoftBreak(m);break;case"insertParagraph":{S.insertBreak(m);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{Ae==="insertFromComposition"&&ge.isComposing(m)&&(E(!1),ll.set(m,!1)),(Ye==null?void 0:Ye.constructor.name)==="DataTransfer"?ge.insertData(m,Ye):typeof Ye=="string"&&(Dt?x.current.push(()=>S.insertText(m,Ye)):S.insertText(m,Ye));break}}var hr=(H=Dd.get(m))===null||H===void 0?void 0:H.unref();Dd.delete(m),hr&&(!m.selection||!X.equals(m.selection,hr))&&Q.select(m,hr)}},[m,U,R,i,s,K]),ae=(0,Z.useCallback)(G=>{G==null?(U.cancel(),K.cancel(),Ad.delete(m),sl.delete(m),C.current&&rs&&C.current.removeEventListener("beforeinput",z)):rs&&G.addEventListener("beforeinput",z),C.current=G,typeof t=="function"?t(G):t&&(t.current=G)},[U,K,m,z,t]);ns(()=>{var G=ge.getWindow(m),ne=ce=>{var{target:w}=ce,A=w instanceof HTMLElement?w:null,$=A==null?void 0:A.tagName;$==="INPUT"||$==="TEXTAREA"||K()};G.document.addEventListener("selectionchange",ne);var te=()=>{B.isDraggingInternally=!1};return G.document.addEventListener("dragend",te),G.document.addEventListener("drop",te),()=>{G.document.removeEventListener("selectionchange",ne),G.document.removeEventListener("dragend",te),G.document.removeEventListener("drop",te)}},[K,B]);var ie=o([m,[]]),O=Hbe(o),J=a&&m.children.length===1&&Array.from(q.texts(m)).length===1&&q.string(m)===""&&!b,ue=(0,Z.useCallback)(G=>{if(G&&J){var ne;N((ne=G.getBoundingClientRect())===null||ne===void 0?void 0:ne.height)}else N(void 0)},[J]);if(J){var k=S.start(m,[]);ie.push({[Su]:!0,placeholder:a,onPlaceholderResize:ue,anchor:k,focus:k})}var{marks:be}=m;if(B.hasMarkPlaceholder=!1,m.selection&&X.isCollapsed(m.selection)&&be){var{anchor:Oe}=m.selection,Te=q.leaf(m,Oe.path),Ke=VE(Te,gEe);if(!Hr.equals(Te,be,{loose:!0})){B.hasMarkPlaceholder=!0;var je=Object.fromEntries(Object.keys(Ke).map(G=>[G,null]));ie.push(ma(ma(ma({[RP]:!0},je),be),{},{anchor:Oe,focus:Oe}))}}return(0,Z.useEffect)(()=>{setTimeout(()=>{var{selection:G}=m;if(G){var{anchor:ne}=G,te=q.leaf(m,ne.path);if(be&&!Hr.equals(te,be,{loose:!0})){ti.set(m,be);return}}ti.delete(m)})}),lEe(),Z.default.createElement(h4.Provider,{value:s},Z.default.createElement(pEe.Provider,{value:b},Z.default.createElement(u4.Provider,{value:O},Z.default.createElement(fEe,{node:C,receivedUserInput:M},Z.default.createElement(h,ma(ma({role:s?void 0:"textbox","aria-multiline":s?void 0:!0,translate:"no"},g),{},{spellCheck:rs||!fg?g.spellCheck:!1,autoCorrect:rs||!fg?g.autoCorrect:"false",autoCapitalize:rs||!fg?g.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!s,zindex:-1,suppressContentEditableWarning:!0,ref:ae,style:ma(ma({},y?{}:ma({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},P?{minHeight:P}:{})),v),onBeforeInput:(0,Z.useCallback)(G=>{if(!rs&&!s&&!Fn(G,g.onBeforeInput)&&ge.hasSelectableTarget(m,G.target)&&(G.preventDefault(),!ge.isComposing(m))){var ne=G.data;S.insertText(m,ne)}},[g.onBeforeInput,m,s]),onInput:(0,Z.useCallback)(G=>{if(!Fn(G,g.onInput)){if(L.current){L.current.handleInput();return}for(var ne of x.current)ne();x.current=[],ge.isFocused(m)||o4(m,G.nativeEvent)}},[g.onInput,m]),onBlur:(0,Z.useCallback)(G=>{if(!(s||B.isUpdatingSelection||!ge.hasSelectableTarget(m,G.target)||Fn(G,g.onBlur))){var ne=ge.findDocumentOrShadowRoot(m);if(B.latestElement!==ne.activeElement){var{relatedTarget:te}=G,ce=ge.toDOMNode(m,m);if(te!==ce&&!(To(te)&&te.hasAttribute("data-slate-spacer"))){if(te!=null&&es(te)&&ge.hasDOMNode(m,te)){var w=ge.toSlateNode(m,te);if(q.isElement(w)&&!m.isVoid(w))return}if(al){var A=Pd(ne);A==null||A.removeAllRanges()}Ja.delete(m)}}}},[s,B.isUpdatingSelection,B.latestElement,m,g.onBlur]),onClick:(0,Z.useCallback)(G=>{if(ge.hasTarget(m,G.target)&&!Fn(G,g.onClick)&&es(G.target)){var ne=ge.toSlateNode(m,G.target),te=ge.findPath(m,ne);if(!S.hasPath(m,te)||q.get(m,te)!==ne)return;if(G.detail===TU&&te.length>=1){var ce=te;if(!(q.isElement(ne)&&S.isBlock(m,ne))){var w,A=S.above(m,{match:Dt=>q.isElement(Dt)&&S.isBlock(m,Dt),at:te});ce=(w=A==null?void 0:A[1])!==null&&w!==void 0?w:te.slice(0,1)}var $=S.range(m,ce);Q.select(m,$);return}if(s)return;var H=S.start(m,te),he=S.end(m,te),Ae=S.void(m,{at:H}),Ye=S.void(m,{at:he});if(Ae&&Ye&&F.equals(Ae[1],Ye[1])){var At=S.range(m,H);Q.select(m,At)}}},[m,g.onClick,s]),onCompositionEnd:(0,Z.useCallback)(G=>{if(!hg(G)&&ge.hasSelectableTarget(m,G.target)){var ne;if(ge.isComposing(m)&&Promise.resolve().then(()=>{E(!1),ll.set(m,!1)}),(ne=L.current)===null||ne===void 0||ne.handleCompositionEnd(G),Fn(G,g.onCompositionEnd)||nn)return;if(!al&&!bU&&!vU&&!xU&&!EU&&G.data){var te=ti.get(m);ti.delete(m),te!==void 0&&(da.set(m,m.marks),m.marks=te),S.insertText(m,G.data);var ce=da.get(m);da.delete(m),ce!==void 0&&(m.marks=ce)}}},[g.onCompositionEnd,m]),onCompositionUpdate:(0,Z.useCallback)(G=>{ge.hasSelectableTarget(m,G.target)&&!Fn(G,g.onCompositionUpdate)&&!hg(G)&&(ge.isComposing(m)||(E(!0),ll.set(m,!0)))},[g.onCompositionUpdate,m]),onCompositionStart:(0,Z.useCallback)(G=>{if(!hg(G)&&ge.hasSelectableTarget(m,G.target)){var ne;if((ne=L.current)===null||ne===void 0||ne.handleCompositionStart(G),Fn(G,g.onCompositionStart)||nn)return;E(!0);var{selection:te}=m;if(te&&X.isExpanded(te)){S.deleteFragment(m);return}}},[g.onCompositionStart,m]),onCopy:(0,Z.useCallback)(G=>{ge.hasSelectableTarget(m,G.target)&&!Fn(G,g.onCopy)&&!hg(G)&&(G.preventDefault(),ge.setFragmentData(m,G.clipboardData,"copy"))},[g.onCopy,m]),onCut:(0,Z.useCallback)(G=>{if(!s&&ge.hasSelectableTarget(m,G.target)&&!Fn(G,g.onCut)&&!hg(G)){G.preventDefault(),ge.setFragmentData(m,G.clipboardData,"cut");var{selection:ne}=m;if(ne)if(X.isExpanded(ne))S.deleteFragment(m);else{var te=q.parent(m,ne.anchor.path);S.isVoid(m,te)&&Q.delete(m)}}},[s,m,g.onCut]),onDragOver:(0,Z.useCallback)(G=>{if(ge.hasTarget(m,G.target)&&!Fn(G,g.onDragOver)){var ne=ge.toSlateNode(m,G.target);q.isElement(ne)&&S.isVoid(m,ne)&&G.preventDefault()}},[g.onDragOver,m]),onDragStart:(0,Z.useCallback)(G=>{if(!s&&ge.hasTarget(m,G.target)&&!Fn(G,g.onDragStart)){var ne=ge.toSlateNode(m,G.target),te=ge.findPath(m,ne),ce=q.isElement(ne)&&S.isVoid(m,ne)||S.void(m,{at:te,voids:!0});if(ce){var w=S.range(m,te);Q.select(m,w)}B.isDraggingInternally=!0,ge.setFragmentData(m,G.dataTransfer,"drag")}},[s,m,g.onDragStart,B]),onDrop:(0,Z.useCallback)(G=>{if(!s&&ge.hasTarget(m,G.target)&&!Fn(G,g.onDrop)){G.preventDefault();var ne=m.selection,te=ge.findEventRange(m,G),ce=G.dataTransfer;Q.select(m,te),B.isDraggingInternally&&ne&&!X.equals(ne,te)&&!S.void(m,{at:te,voids:!0})&&Q.delete(m,{at:ne}),ge.insertData(m,ce),ge.isFocused(m)||ge.focus(m)}},[s,m,g.onDrop,B]),onDragEnd:(0,Z.useCallback)(G=>{!s&&B.isDraggingInternally&&g.onDragEnd&&ge.hasTarget(m,G.target)&&g.onDragEnd(G)},[s,B,g,m]),onFocus:(0,Z.useCallback)(G=>{if(!s&&!B.isUpdatingSelection&&ge.hasEditableTarget(m,G.target)&&!Fn(G,g.onFocus)){var ne=ge.toDOMNode(m,m),te=ge.findDocumentOrShadowRoot(m);if(B.latestElement=te.activeElement,Cu&&G.target!==ne){ne.focus();return}Ja.set(m,!0)}},[s,B,m,g.onFocus]),onKeyDown:(0,Z.useCallback)(G=>{if(!s&&ge.hasEditableTarget(m,G.target)){var ne;(ne=L.current)===null||ne===void 0||ne.handleKeyDown(G);var{nativeEvent:te}=G;if(ge.isComposing(m)&&te.isComposing===!1&&(ll.set(m,!1),E(!1)),Fn(G,g.onKeyDown)||ge.isComposing(m))return;var{selection:ce}=m,w=m.children[ce!==null?ce.focus.path[0]:0],A=(0,QP.default)(q.string(w))==="rtl";if(sr.isRedo(te)){G.preventDefault();var $=m;typeof $.redo=="function"&&$.redo();return}if(sr.isUndo(te)){G.preventDefault();var H=m;typeof H.undo=="function"&&H.undo();return}if(sr.isMoveLineBackward(te)){G.preventDefault(),Q.move(m,{unit:"line",reverse:!0});return}if(sr.isMoveLineForward(te)){G.preventDefault(),Q.move(m,{unit:"line"});return}if(sr.isExtendLineBackward(te)){G.preventDefault(),Q.move(m,{unit:"line",edge:"focus",reverse:!0});return}if(sr.isExtendLineForward(te)){G.preventDefault(),Q.move(m,{unit:"line",edge:"focus"});return}if(sr.isMoveBackward(te)){G.preventDefault(),ce&&X.isCollapsed(ce)?Q.move(m,{reverse:!A}):Q.collapse(m,{edge:A?"end":"start"});return}if(sr.isMoveForward(te)){G.preventDefault(),ce&&X.isCollapsed(ce)?Q.move(m,{reverse:A}):Q.collapse(m,{edge:A?"start":"end"});return}if(sr.isMoveWordBackward(te)){G.preventDefault(),ce&&X.isExpanded(ce)&&Q.collapse(m,{edge:"focus"}),Q.move(m,{unit:"word",reverse:!A});return}if(sr.isMoveWordForward(te)){G.preventDefault(),ce&&X.isExpanded(ce)&&Q.collapse(m,{edge:"focus"}),Q.move(m,{unit:"word",reverse:A});return}if(rs){if((OE||al)&&ce&&(sr.isDeleteBackward(te)||sr.isDeleteForward(te))&&X.isCollapsed(ce)){var he=q.parent(m,ce.anchor.path);if(q.isElement(he)&&S.isVoid(m,he)&&(S.isInline(m,he)||S.isBlock(m,he))){G.preventDefault(),S.deleteBackward(m,{unit:"block"});return}}}else{if(sr.isBold(te)||sr.isItalic(te)||sr.isTransposeCharacter(te)){G.preventDefault();return}if(sr.isSoftBreak(te)){G.preventDefault(),S.insertSoftBreak(m);return}if(sr.isSplitBlock(te)){G.preventDefault(),S.insertBreak(m);return}if(sr.isDeleteBackward(te)){G.preventDefault(),ce&&X.isExpanded(ce)?S.deleteFragment(m,{direction:"backward"}):S.deleteBackward(m);return}if(sr.isDeleteForward(te)){G.preventDefault(),ce&&X.isExpanded(ce)?S.deleteFragment(m,{direction:"forward"}):S.deleteForward(m);return}if(sr.isDeleteLineBackward(te)){G.preventDefault(),ce&&X.isExpanded(ce)?S.deleteFragment(m,{direction:"backward"}):S.deleteBackward(m,{unit:"line"});return}if(sr.isDeleteLineForward(te)){G.preventDefault(),ce&&X.isExpanded(ce)?S.deleteFragment(m,{direction:"forward"}):S.deleteForward(m,{unit:"line"});return}if(sr.isDeleteWordBackward(te)){G.preventDefault(),ce&&X.isExpanded(ce)?S.deleteFragment(m,{direction:"backward"}):S.deleteBackward(m,{unit:"word"});return}if(sr.isDeleteWordForward(te)){G.preventDefault(),ce&&X.isExpanded(ce)?S.deleteFragment(m,{direction:"forward"}):S.deleteForward(m,{unit:"word"});return}}}},[s,m,g.onKeyDown]),onPaste:(0,Z.useCallback)(G=>{!s&&ge.hasEditableTarget(m,G.target)&&!Fn(G,g.onPaste)&&(!rs||pU(G.nativeEvent)||al)&&(G.preventDefault(),ge.insertData(m,G.clipboardData))},[s,m,g.onPaste])}),Z.default.createElement(hEe,{decorations:ie,node:m,renderElement:l,renderChunk:u,renderPlaceholder:d,renderLeaf:c,renderText:f}))))))}),vEe=e=>{var{attributes:t,children:r}=e;return Z.default.createElement("span",ma({},t),r,nn&&Z.default.createElement("br",null))},yEe=()=>[],bEe=(e,t)=>{var r=!!e.selection&&X.isBackward(e.selection),n=t.cloneRange();if(n.collapse(r),n.getBoundingClientRect){var o=n.startContainer.parentElement,i=n.getBoundingClientRect(),a=i.width===0&&i.height===0&&i.x===0&&i.y===0;if(a){var s=o.getBoundingClientRect(),l=s.width>0||s.height>0;if(l)return}o.getBoundingClientRect=n.getBoundingClientRect.bind(n),Y3(o,{scrollMode:"if-needed"}),delete o.getBoundingClientRect}},Fn=(e,t)=>{if(!t)return!1;var r=t(e);return r??(e.isDefaultPrevented()||e.isPropagationStopped())},hg=e=>es(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),EEe=(e,t)=>{if(!t)return!1;var r=t(e);return r??e.defaultPrevented},o4=(e,t)=>{var r=e;if(t.inputType==="historyUndo"&&typeof r.undo=="function"){r.undo();return}if(t.inputType==="historyRedo"&&typeof r.redo=="function"){r.redo();return}},y4=(0,Z.createContext)(!1),b4=()=>(0,Z.useContext)(y4),E4=parseInt(Z.default.version.split(".")[0],10),xEe=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],x4=e=>{var{editor:t,children:r,onChange:n,onSelectionChange:o,onValueChange:i,initialValue:a}=e,s=VE(e,xEe);Z.default.useState(()=>{if(!q.isNodeList(a))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(xr.stringify(a)));if(!S.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(xr.stringify(t)));t.children=a,Object.assign(t,s)});var{selectorContext:l,onChange:u}=sEe(),c=(0,Z.useCallback)(()=>{n&&n(t.children),o&&t.operations.find(p=>p.type==="set_selection")&&o(t.selection),i&&t.operations.find(p=>p.type!=="set_selection")&&i(t.children),u()},[t,u,n,o,i]);(0,Z.useEffect)(()=>(RE.set(t,c),()=>{RE.set(t,()=>{})}),[t,c]);var[f,d]=(0,Z.useState)(ge.isFocused(t));return(0,Z.useEffect)(()=>{d(ge.isFocused(t))},[t]),ns(()=>{var p=()=>d(ge.isFocused(t));return E4>=17?(document.addEventListener("focusin",p),document.addEventListener("focusout",p),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",p)}):(document.addEventListener("focus",p,!0),document.addEventListener("blur",p,!0),()=>{document.removeEventListener("focus",p,!0),document.removeEventListener("blur",p,!0)})},[]),Z.default.createElement(e1.Provider,{value:l},Z.default.createElement(JP.Provider,{value:t},Z.default.createElement(y4.Provider,{value:f},r)))};var w4=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",n=t;n=SU(n,r);var{onChange:o,apply:i,insertText:a}=n;return n.getChunkSize=()=>null,nn&&(n.insertText=(s,l)=>(fa.delete(n),a(s,l))),n.onChange=s=>{var l=E4<18?s4.default.unstable_batchedUpdates:u=>u();l(()=>{o(s)})},n.apply=s=>{if(s.type==="move_node"){var l=q.parent(n,s.path),u=!!n.getChunkSize(l);if(u){var c=q.get(n,s.path),f=p4(n,l),d=ge.findKey(n,c);f.movedNodeKeys.add(d)}}i(s)},n};var bg=(e,t)=>{t&&Xe(e,()=>{u3(e),rn(e,t)}),ge.focus(e)};var _4=e=>ge.isComposing(e),C4=e=>ge.isFocused(e);var S4=(e,{edge:t="start"}={})=>{let r=t==="start"?wn(e,[]):aa(e,[]);bg(e,r)};var l6=de(Rd(),1),u6=de(e6(),1);var oPe=de(r6(),1);var A1=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent);var r0=(e,t)=>!e||e.nodeName===t?e:r0(e.parentElement,t);var zTe=/^(?:\w+:)?\/\/(\S+)$/,VTe=/mailto:([^?\\]+)/,HTe=/^localhost[\d:?]*(?:[^\d:?]\S*)?$/,WTe=/^[^\s.]+\.\S{2,}$/,ul=e=>{if(typeof e!="string")return!1;let t=e.match(zTe),r=e.match(VTe),n=t||r;if(!n)return!1;let o=n[1];if(!o)return!1;try{new URL(e)}catch{return!1}return HTe.test(o)||WTe.test(o)};var n0=(e,{allowedSchemes:t,permitInvalid:r=!1})=>{if(!e)return null;let n=null;try{n=new URL(e)}catch{return r?e:null}return t&&!t.includes(n.protocol.slice(0,-1))?null:n.href},GTe=e=>e===void 0,KTe=e=>e===null,YTe=e=>GTe(e)||KTe(e),Cn=e=>!YTe(e);var sPe=de(Rd(),1);var h6=de(Rd(),1);var uPe=de(Rd(),1);var v6=de(Rd(),1);var XTe=Object.defineProperty,ZTe=Object.defineProperties,QTe=Object.getOwnPropertyDescriptors,o0=Object.getOwnPropertySymbols,i6=Object.prototype.hasOwnProperty,a6=Object.prototype.propertyIsEnumerable,n6=(e,t,r)=>t in e?XTe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zd=(e,t)=>{for(var r in t||(t={}))i6.call(t,r)&&n6(e,r,t[r]);if(o0)for(var r of o0(t))a6.call(t,r)&&n6(e,r,t[r]);return e},D1=(e,t)=>ZTe(e,QTe(t)),s6=(e,t)=>{var r={};for(var n in e)i6.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&o0)for(var n of o0(e))t.indexOf(n)<0&&a6.call(e,n)&&(r[n]=e[n]);return r},kg=(e,t)=>{try{let{match:r,at:n=e.selection,reverse:o=!1,voids:i=!1}=t;if(!n)return;let a,s;if(z$.isSpan(n))[a,s]=n;else if(X.isRange(n)){let c=gP(e,n,{edge:"start"}),f=gP(e,n,{edge:"end"});a=o?f:c,s=o?c:f}let l=[e,[]];F.isPath(n)&&(l=Ln(e,n));let u=i3(l[0],{reverse:o,from:a,to:s,pass:([c])=>i?!1:mP(e,c)});for(let[c,f]of u)if(to(c,f,r))return[c,n.concat(f)]}catch{return}},Po=(e,t={})=>pt(e,D1(zd({},t),{block:!0})),ni=e=>{let[t,r]=e;if(hE(t)){let{children:n}=t;return n.map((o,i)=>{let a=r.concat([i]);return[o,a]})}return[]};var JTe=e=>{let[t,r]=e;if(xn(t)||t.children.length===0)return null;let n=t.children;return[n.at(-1),r.concat([n.length-1])]},Og=e=>{let t=JTe(e);return t?t[1]:e[1].concat([-1])},k1=(e,t)=>{let r=Og(e);return F.equals(r,t)};var ePe=(e,t)=>{if(!e)return;let r=sa(e);return r==null?void 0:r[t]},O1=(e,t)=>{let r=t3(e,{at:t});if(r)return wn(e,r[1])},tPe=(e,t)=>{let[r,n]=e,o=t[n.length],i=[],a=r.children;if(o+1<r.children.length)for(let s=o+1;s<r.children.length;s++)i.push(a[s]);return i};var Ig=(e,t={})=>{var r=t,{at:n}=r,o=s6(r,["at"]);if(n||(n=e.selection),!n)return;let[i,a]=X.edges(n),s=Po(e,zd({at:i},o)),l=Po(e,zd({at:a},o));if(!(!s&&!l))return!s||!l?!0:!F.equals(s[1],l[1])},rPe=(e,t,r)=>{if(!r||!r.match&&!r.matchString)return wu(e,t,r);let n=!r.unit||r.unit==="offset",o=r.matchString?(0,l6.default)(r.matchString):[""],i;return o.some(a=>{var s,l;let u=t,c=pE(e,t,{edge:"end"}),f=a.length+1,d=Array.from({length:f}),p=0;for(;;){let v=wu(e,u,r);if(!v||Ig(e,{at:{anchor:v,focus:c}}))return;let h=Wr(e,{anchor:v,focus:c}),y=h;if(n&&f&&(d.unshift({point:v,text:h}),d.pop(),y=(0,u6.default)(d.slice(0,-1),"text").join("")),a===y||(s=r.match)!=null&&s.call(r,{beforeString:y,beforePoint:v,at:t}))return r.afterMatch?f&&n?(i=(l=d.at(-1))==null?void 0:l.point,!!i):(i=c,!0):(i=v,!0);if(c=v,u=v,p+=1,!r.skipInvalid&&(!a||p>=a.length))return}}),i},nPe=(e,{at:t=e.selection,focus:r}={})=>{let n;return X.isRange(t)&&(n=r?t.focus:t.anchor),ft.isPoint(t)&&(n=t),F.isPath(t)&&(n={path:t,offset:0}),n};var c6=(e,t)=>{let r=pP(e,{at:t});if(r)return aa(e,r[1])},i0=e=>{if(e.length===0)return;let t=e.at(-1);if(!(t<=0))return e.slice(0,-1).concat(t-1)};var d6=(e,t,r)=>{let n=rPe(e,t,r);if(!n)return;let o=pE(e,t,{edge:"end"});return{anchor:n,focus:o}},f6=(e,t={})=>{var r;let n=(r=Po(e,t))==null?void 0:r[1];if(!n)return;let o=wn(e,n),i=nPe(e,t);if(i)return{anchor:o,focus:i}};var iPe=(e,t)=>!Ri(t)&&!t.children.some(r=>hP(e,r)),I1=e=>{var t;let r=(t=Po(e))==null?void 0:t[0];return r?iPe(e,r):!1},a0=e=>{if(!e.selection)return!1;let t=Po(e);if(!t)return!1;let r=e.selection.focus,n=_t(e,e.selection);if(!n)return!1;let[,o]=n;if(!ol(e,r,o))return!1;let i=tPe(t,r.path);if(i.length>0){for(let a of i)if(xn(a)&&a.text)return!1}else return ol(e,r,t[1]);return!0};var p6=e=>e.at(-1)===0,aPe=(e,t)=>Cn(ePe(e,t));var m6=(e,t)=>{var r,n;let o=(r=Po(e,t))==null?void 0:r[1];return!!o&&ol(e,(n=e.selection)==null?void 0:n.focus,o)},R1=(e,t)=>{var r;let{selection:n}=e;if(!n)return!1;let o=(r=Po(e,t))==null?void 0:r[1];return o?ei(e,n.focus,o)||la(e.selection)&&ei(e,n.anchor,o):!1};var wr=(e,t,r)=>{ua(e,t,r)},g6=(e,t,r)=>{wr(e,{type:t,children:[{text:""}]},_d(e,r))},s0=(e,{at:t,to:r,match:n,fromStartIndex:o=0})=>{let i=0,a=F.isPath(t)?t:t[1],s=F.isPath(t)?ir(e,a):t[0];if(!s||!ki(e,s))return i;for(let l=s.children.length-1;l>=o;l--){let u=[...a,l],c=ir(e,u);(!n||c&&n([c,u]))&&(Nn(e,{at:u,to:r}),i++)}return i},o6=(e,t)=>{var r=t,{key:n,at:o,shouldChange:i=!0}=r,a=s6(r,["key","at","shouldChange"]),s;let l=o??e.selection;if(n=(0,h6.default)(n),l){if(X.isRange(l)&&X.isExpanded(l))yE(e,n,zd({at:l,match:xn,split:!0},a));else if(e.selection){let u=(s=sa(e))!=null?s:{};n.forEach(c=>{delete u[c]}),e.marks=u,i&&e.onChange()}}};var lPe=(e,t,r)=>{Xe(e,()=>{for(let[,n]of o3(e,t,{reverse:!0}))Vt(e,D1(zd({},r),{at:n}))})},l0=(e,{at:t,nodes:r,insertOptions:n,removeOptions:o})=>{Xe(e,()=>{lPe(e,t,o),ua(e,r,D1(zd({},n),{at:t.concat([0])}))})};var y6=(e,{key:t,clear:r})=>{e.selection&&Xe(e,()=>{if(aPe(e,t)){o6(e,{key:t});return}if(r){let o=(0,v6.default)(r);o6(e,{key:o})}e.addMark(t,!0)})};var UA=de(w0(),1);function Gg(e){"@babel/helpers - typeof";return Gg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gg(e)}function JOe(e,t){if(Gg(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Gg(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eIe(e){var t=JOe(e,"string");return Gg(t)==="symbol"?t:String(t)}function ef(e,t,r){return t=eIe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var O8=new WeakMap,I8=new WeakMap,Kg=class{},tf=class extends Kg{constructor(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),ef(this,"offset",void 0),ef(this,"path",void 0);var{offset:r,path:n}=t;this.offset=r,this.path=n}},rf=class extends Kg{constructor(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),ef(this,"offset",void 0),ef(this,"path",void 0);var{offset:r,path:n}=t;this.offset=r,this.path=n}},tIe=(e,t)=>{var r=e.text.length;O8.set(e,[r,t])},rIe=e=>O8.get(e),nIe=(e,t)=>{var r=e.text.length;I8.set(e,[r,t])},oIe=e=>I8.get(e);function D8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function rA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?D8(Object(r),!0).forEach(function(n){ef(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D8(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var _0=new WeakSet,C0=e=>{var t=[],r=o=>{if(o!=null){var i=t[t.length-1];if(typeof o=="string"){var a={text:o};_0.add(a),o=a}if(Hr.isText(o)){var s=o;Hr.isText(i)&&_0.has(i)&&_0.has(s)&&Hr.equals(i,s,{loose:!0})?i.text+=s.text:t.push(s)}else if(oa.isElement(o))t.push(o);else if(o instanceof Kg){var l=t[t.length-1];Hr.isText(l)||(r(""),l=t[t.length-1]),o instanceof tf?tIe(l,o):o instanceof rf&&nIe(l,o)}else throw new Error("Unexpected hyperscript child object: ".concat(o))}};for(var n of e.flat(1/0))r(n);return t};function iIe(e,t,r){return new tf(t)}function aIe(e,t,r){return[new tf(t),new rf(t)]}function R8(e,t,r){return rA(rA({},t),{},{children:C0(r)})}function sIe(e,t,r){return new rf(t)}function lIe(e,t,r){return C0(r)}function uIe(e,t,r){var n=r.find(i=>i instanceof tf),o=r.find(i=>i instanceof rf);if(!n||n.offset==null||n.path==null)throw new Error("The <selection> hyperscript tag must have an <anchor> tag as a child with `path` and `offset` attributes defined.");if(!o||o.offset==null||o.path==null)throw new Error("The <selection> hyperscript tag must have a <focus> tag as a child with `path` and `offset` attributes defined.");return rA({anchor:{offset:n.offset,path:n.path},focus:{offset:o.offset,path:o.path}},t)}function cIe(e,t,r){var n=C0(r);if(n.length>1)throw new Error("The <text> hyperscript tag must only contain a single node's worth of children.");var[o]=n;if(o==null&&(o={text:""}),!Hr.isText(o))throw new Error(`
|
|
41
|
-
The <text> hyperscript tag can only contain text content as children.`);return _0.delete(o),Object.assign(o,t),o}var dIe=e=>(t,r,n)=>{var o=[],i;for(var a of n)X.isRange(a)?i=a:o.push(a);var s=C0(o),l={},u=e();Object.assign(u,r),u.children=s;for(var[c,f]of q.texts(u)){var d=rIe(c),p=oIe(c);if(d!=null){var[v]=d;l.anchor={path:f,offset:v}}if(p!=null){var[h]=p;l.focus={path:f,offset:h}}}if(l.anchor&&!l.focus)throw new Error("Slate hyperscript ranges must have both `<anchor />` and `<focus />` defined if one is defined, but you only defined `<anchor />`. For collapsed selections, use `<cursor />` instead.");if(!l.anchor&&l.focus)throw new Error("Slate hyperscript ranges must have both `<anchor />` and `<focus />` defined if one is defined, but you only defined `<focus />`. For collapsed selections, use `<cursor />` instead.");return i!=null?u.selection=i:X.isRange(l)&&(u.selection=l),u};function k8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Wg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?k8(Object(r),!0).forEach(function(n){ef(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k8(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var fIe={anchor:iIe,cursor:aIe,editor:dIe(lE),element:R8,focus:sIe,fragment:lIe,selection:uIe,text:cIe},pIe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{elements:r={}}=t,n=gIe(r),o=Wg(Wg(Wg({},fIe),n),t.creators),i=mIe(o);return i},mIe=e=>{var t=function(n,o){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];var l=e[n];if(!l)throw new Error("No hyperscript creator found for tag: <".concat(n,">"));o==null&&(o={}),uE(o)||(a=[o].concat(a),o={}),a=a.filter(c=>!!c).flat();var u=l(n,o,a);return u};return t},gIe=e=>{var t={},r=function(){var i=e[n];if(typeof i!="object")throw new Error("Properties specified for a hyperscript shorthand should be an object, but for the custom element <".concat(n,"> tag you passed: ").concat(i));t[n]=(a,s,l)=>R8("element",Wg(Wg({},i),s),l)};for(var n in e)r();return t},nf=pIe();var F0=de(nA(),1);var uK=de(w0(),1),cK=de(w0(),1),jA=de(Y7(),1),dK=de(yA(),1),fK=de(eW(),1),mK=de(wA(),1),$$e=de(nA(),1);function zW(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=zW(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Zg(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=zW(e))&&(n&&(n+=" "),n+=t);return n}var M0=de(_E(),1),Mi=de(_E(),1),hK=de(yA(),1),H$e=de(wA(),1),W$e=de(HW(),1);var yK=de(Re(),1);var zA=de(Re(),1);var bK=de(Re(),1),EK=de(Re(),1),r3e=de(Re(),1),xK=de(Re(),1);var VA=de(Re(),1),_K=de(Re(),1),u3e=de(Re(),1),c3e=de(Re(),1);var uf=de(Re(),1),eh=de(Re(),1);var v3e=de(Re(),1);var y3e=de(Re(),1),th=de(Re(),1);var SK=de(mG(),1);var Qg=de(Re());var gG=Object.prototype.hasOwnProperty;function hG(e,t,r){for(r of e.keys())if(sf(r,t))return r}function sf(e,t){var r,n,o;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((n=e.length)===t.length)for(;n--&&sf(e[n],t[n]););return n===-1}if(r===Set){if(e.size!==t.size)return!1;for(n of e)if(o=n,o&&typeof o=="object"&&(o=hG(t,o),!o)||!t.has(o))return!1;return!0}if(r===Map){if(e.size!==t.size)return!1;for(n of e)if(o=n[0],o&&typeof o=="object"&&(o=hG(t,o),!o)||!sf(n[1],t.get(o)))return!1;return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((n=e.byteLength)===t.byteLength)for(;n--&&e.getInt8(n)===t.getInt8(n););return n===-1}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===t.byteLength)for(;n--&&e[n]===t[n];);return n===-1}if(!r||typeof e=="object"){n=0;for(r in e)if(gG.call(e,r)&&++n&&!gG.call(t,r)||!(r in t)||!sf(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}function i2e(e){let t=Qg.default.useRef(e),r=Qg.default.useRef(0);return sf(e,t.current)||(t.current=e,r.current+=1),Qg.default.useMemo(()=>t.current,[r.current])}function _A(e,t){return Qg.default.useMemo(e,i2e(t))}var E3e=de(Re(),1);var WA=de(Re(),1),on=de(Re(),1);var rh=de(Re(),1);var os=e=>e,PA=e=>({_tag:"Left",value:e}),L0=e=>({_tag:"Right",value:e}),a2e=(e,t,r)=>r._tag==="Left"?e(r.value):t(r.value),yG={dimap:(e,t,r)=>n=>t(r(e(n))),first:e=>([t,r])=>[e(t),r],right:e=>t=>t._tag==="Left"?t:L0(e(t.value)),wander:e=>t=>t.map(e)},s2e={empty:()=>{},foldMap:(e,t)=>{for(let r=0;r<t.length;r++){let n=e(t[r]);if(n!=null)return n}}},l2e={empty:()=>[],foldMap:(e,t)=>{let r=[];return t.forEach(n=>{r=r.concat(e(n))}),r}},AA=e=>({dimap:(t,r,n)=>o=>n(t(o)),first:t=>([r,n])=>t(r),right:t=>r=>r._tag==="Left"?e.empty():t(r.value),wander:t=>r=>e.foldMap(t,r)}),CA={Equivalence:{Equivalence:"Equivalence",Iso:"Iso",Lens:"Lens",Prism:"Prism",Traversal:"Traversal",Getter:"Getter",AffineFold:"AffineFold",Fold:"Fold",Setter:"Setter"},Iso:{Equivalence:"Iso",Iso:"Iso",Lens:"Lens",Prism:"Prism",Traversal:"Traversal",Getter:"Getter",AffineFold:"AffineFold",Fold:"Fold",Setter:"Setter"},Lens:{Equivalence:"Lens",Iso:"Lens",Lens:"Lens",Prism:"Prism",Traversal:"Traversal",Getter:"Getter",AffineFold:"AffineFold",Fold:"Fold",Setter:"Setter"},Prism:{Equivalence:"Prism",Iso:"Prism",Lens:"Prism",Prism:"Prism",Traversal:"Traversal",Getter:"AffineFold",AffineFold:"AffineFold",Fold:"Fold",Setter:"Setter"},Traversal:{Equivalence:"Traversal",Iso:"Traversal",Lens:"Traversal",Prism:"Traversal",Traversal:"Traversal",Getter:"Fold",AffineFold:"Fold",Fold:"Fold",Setter:"Setter"},Getter:{Equivalence:"Getter",Iso:"Getter",Lens:"Getter",Prism:"AffineFold",Traversal:"Fold",Getter:"Getter",AffineFold:"AffineFold",Fold:"Fold",Setter:void 0},AffineFold:{Equivalence:"AffineFold",Iso:"AffineFold",Lens:"AffineFold",Prism:"AffineFold",Traversal:"Fold",Getter:"AffineFold",AffineFold:"AffineFold",Fold:"Fold",Setter:void 0},Fold:{Equivalence:"Fold",Iso:"Fold",Lens:"Fold",Prism:"Fold",Traversal:"Fold",Getter:"Fold",AffineFold:"Fold",Fold:"Fold",Setter:void 0},Setter:{Equivalence:void 0,Iso:void 0,Lens:void 0,Prism:void 0,Traversal:void 0,Getter:void 0,AffineFold:void 0,Fold:void 0,Setter:void 0}},lf=(e,t)=>{let r=t;return r._tag=e,r},bG=e=>(e._removable=!0,e);function It(e,t,r){switch(arguments.length){case 2:{let n=(o,i)=>e(o,t(o,i));return n._tag=CA[e._tag][t._tag],n._removable=t._removable||!1,n}default:{let n=CA[e._tag][t._tag],o=(i,a)=>e(i,t(i,r(i,a)));return o._tag=CA[n][r._tag],o._removable=r._removable||!1,o}}}var u2e=lf("Equivalence",(e,t)=>t),B0=(e,t)=>lf("Iso",(r,n)=>r.dimap(e,t,n)),Ao=(e,t)=>lf("Lens",(r,n)=>r.dimap(o=>[e(o),o],t,r.first(n))),DA=(e,t)=>lf("Prism",(r,n)=>r.dimap(e,o=>a2e(os,t,o),r.right(n))),kA=lf("Traversal",(e,t)=>e.dimap(os,os,e.wander(t))),c2e=e=>lf("Getter",(t,r)=>t.dimap(e,os,r)),OA=(e,t,r)=>e(yG,t)(r),EG=(e,t,r)=>e(yG,()=>t)(r);var xG=(e,t)=>e(AA({}),os)(t),wG=(e,t)=>e(AA(s2e),os)(t),IA=(e,t)=>e(AA(l2e),r=>[r])(t),d2e=B0(e=>e.map((t,r)=>[r,t]),e=>{let t=[...e].sort((n,o)=>n[0]-o[0]),r=[];for(let n=0;n<t.length;++n)(n===t.length-1||t[n][0]!==t[n+1][0])&&r.push(t[n][1]);return r}),vG=e=>Ao(t=>t[e],([t,r])=>Object.assign(Object.assign({},r),{[e]:t})),f2e=e=>Ao(t=>{let r={};for(let n of e)r[n]=t[n];return r},([t,r])=>{let n=Object.assign({},r);for(let o of e)delete n[o];return Object.assign(n,t)}),_G=e=>Ao(t=>t[e],([t,r])=>{let n=r.slice();return n[e]=t,n}),RA=_G(0),NA=e=>DA(t=>e(t)?L0(t):PA(t),os),Jg=Symbol("__no_match__"),CG=NA(e=>e!==Jg),SG=Symbol("__remove_me__"),SA=e=>bG(It(Ao(t=>0<=e&&e<t.length?t[e]:Jg,([t,r])=>{if(t===Jg)return r;if(t===SG)return typeof r=="string"?r.substring(0,e)+r.substring(e+1):[...r.slice(0,e),...r.slice(e+1)];if(typeof r=="string")return e===0?t+r.substring(1):e===r.length?r.substring(0,e-1)+t:r.substring(0,e)+t+r.substring(e+1);{let n=r.slice();return n[e]=t,n}}),CG));var p2e=DA(e=>e===void 0?PA(void 0):L0(e),os),m2e=e=>DA(t=>e(t)?L0(t):PA(t),os),g2e=e=>bG(It(Ao(t=>{let r=t.findIndex(e);return r===-1?[Jg,-1]:[t[r],r]},([[t,r],n])=>{if(t===Jg)return n;if(t===SG)return[...n.slice(0,r),...n.slice(r+1)];let o=n.slice();return o[r]=t,o}),RA,CG)),h2e=e=>It(Ao(t=>{let r=t.map((n,o)=>e(n)?o:null).filter(n=>n!=null);return[r.map(n=>t[n]),r]},([[t,r],n])=>{let o=n.length,i=t.length,a=0,s=0,l=0,u=[];for(;a<o;)r[s]===a?(++s,l<i&&(u.push(t[l]),++l)):u.push(n[a]),++a;for(;l<i;)u.push(t[l++]);return u}),RA),v2e=e=>Ao(t=>t===void 0?e:t,([t,r])=>t),y2e=e=>It(Ao(t=>{let r=IA(e,t);return[r,r.length]},([[t,r],n])=>{if(t.length!==r)throw new Error("cannot add/remove elements through partsOf");let o=0;return OA(e,()=>t[o++],n)}),RA),b2e=e=>Ao(t=>e(t),([t,r])=>t),E2e=e=>Ao(t=>t,([t,r])=>e(t)),x2e=Ao(e=>{},([e,t])=>e===void 0?t:[e,...t]),w2e=Ao(e=>{},([e,t])=>e===void 0?t:[...t,e]),_2e=It(B0(e=>e.split(""),e=>e.join("")),kA),C2e=It(B0(e=>e.split(/\b/),e=>e.join("")),kA,NA(e=>!/\s+/.test(e))),TA=class e{constructor(t){this._ref=t}get _tag(){return this._ref._tag}get _removable(){return this._ref._removable}compose(t){return new e(It(this._ref,t._ref))}iso(t,r){return new e(It(this._ref,B0(t,r)))}lens(t,r){return new e(It(this._ref,Ao(t,([n,o])=>r(o,n))))}indexed(){return new e(It(this._ref,d2e))}prop(t){return new e(It(this._ref,vG(t)))}path(...t){return t.length===1&&(t=t[0].split(".")),new e(t.reduce((r,n)=>It(r,vG(n)),this._ref))}pick(t){return new e(It(this._ref,f2e(t)))}nth(t){return new e(It(this._ref,_G(t)))}filter(t){return new e(It(this._ref,h2e(t)))}valueOr(t){return new e(It(this._ref,v2e(t)))}partsOf(t){let r=typeof t=="function"?t(LA):t;return new e(It(this._ref,y2e(r._ref)))}reread(t){return new e(It(this._ref,b2e(t)))}rewrite(t){return new e(It(this._ref,E2e(t)))}optional(){return new e(It(this._ref,p2e))}guard_(){return t=>this.guard(t)}guard(t){return new e(It(this._ref,m2e(t)))}at(t){return new e(It(this._ref,SA(t)))}head(){return new e(It(this._ref,SA(0)))}index(t){return new e(It(this._ref,SA(t)))}find(t){return new e(It(this._ref,g2e(t)))}elems(){return new e(It(this._ref,kA))}to(t){return new e(It(this._ref,c2e(t)))}when(t){return new e(It(this._ref,NA(t)))}chars(){return new e(It(this._ref,_2e))}words(){return new e(It(this._ref,C2e))}prependTo(){return new e(It(this._ref,x2e))}appendTo(){return new e(It(this._ref,w2e))}},LA=new TA(u2e);function TG(){return LA}function PG(e){return t=>xG(e._ref,t)}function AG(e){return t=>wG(e._ref,t)}function DG(e){return t=>IA(e._ref,t)}function kG(e){return t=>r=>OA(e._ref,t,r)}function OG(e){return t=>r=>EG(e._ref,t,r)}var IG=(e,t,r)=>(t.has(r)?t:t.set(r,e())).get(r),P2e=new WeakMap;function NG(e,t){return((r,n,o)=>{let i=IG(()=>new WeakMap,P2e,n);return IG(()=>{let a=t(TG());return yo(s=>{let l=s(e);return l instanceof Promise?l.then(u=>RG(a,u)):RG(a,l)},(s,l,u)=>{let c=typeof u=="function"?kG(a)(u):OG(a)(u),f=s(e);return l(e,f instanceof Promise?f.then(c):c(f))})},i,o)})(0,e,t)}var RG=(e,t)=>e._tag==="Traversal"?DG(e)(t):e._tag==="Prism"?AG(e)(t):PG(e)(t);var GA=de(Re(),1);var S3e=de(Re(),1),A2e=Object.defineProperty,D2e=Object.defineProperties,k2e=Object.getOwnPropertyDescriptors,U0=Object.getOwnPropertySymbols,qG=Object.prototype.hasOwnProperty,zG=Object.prototype.propertyIsEnumerable,LG=(e,t,r)=>t in e?A2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qe=(e,t)=>{for(var r in t||(t={}))qG.call(t,r)&&LG(e,r,t[r]);if(U0)for(var r of U0(t))zG.call(t,r)&&LG(e,r,t[r]);return e},oo=(e,t)=>D2e(e,k2e(t)),Fu=(e,t)=>{var r={};for(var n in e)qG.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&U0)for(var n of U0(e))t.indexOf(n)<0&&zG.call(e,n)&&(r[n]=e[n]);return r};function HG(e){var t=e,{attributes:r,children:n,text:o,leaf:i,editor:a,nodeProps:s}=t,l=Fu(t,["attributes","children","text","leaf","editor","nodeProps"]);return VG.default.createElement("span",Qe(Qe({},r),l),n)}var O2e="element",I2e={element:null},{useElementStore:R2e,ElementProvider:N2e}=sy(I2e,{name:"element"}),cf=(e=O2e)=>{let t=R2e(e).get.element();return t||(console.warn("The `useElement(pluginKey)` hook must be used inside the node component's context"),{})},KA=Ed("event-editor")({blur:null,focus:null,last:null}),BA=KA.set,L2e=KA.get,evt=KA.use,WG=({node:e,path:t=[],source:r,apply:n,query:o})=>{vP([e,t],o)&&(r instanceof Function?n(e,r()):n(e,r)),hE(e)&&e.children.forEach((a,s)=>{WG({node:a,path:t.concat([s]),source:r,apply:n,query:o})})},YA=(e,t)=>{l0(e,Qe({at:[],nodes:e.childrenFactory()},t))},B2e=e=>{let t=C4(e);YA(e),e.history.undos=[],e.history.redos=[],e.operations=[],t&&S4(e,{edge:"start"})},Mn="p",F2e=e=>{var t;return(t=e==null?void 0:e.pluginsByKey)!=null?t:{}},as=(e,t)=>{var r;return(r=F2e(e)[t])!=null?r:{key:t}},re=(e,t)=>{var r,n;return(n=(r=as(e,t).type)!=null?r:t)!=null?n:""},GG=(e,t,r)=>{let{activeType:n,inactiveType:o=re(e,Mn)}=t;if(!n||!e.selection)return;let i=_n(e,oo(Qe({},r),{match:{type:n}}));i&&n===o||Gr(e,{type:i?o:n})},nh=(e,t={},r=!1)=>{var n;if(t[e.key]){let i=t[e.key],{plugins:a,then:s}=i,l=Fu(i,["plugins","then"]);e=(0,UA.default)(l,e),r||a==null||a.forEach(u=>{e.plugins||(e.plugins=[]),e.plugins.find(f=>f.key===u.key)||e.plugins.push(u)})}e.plugins&&(e.plugins=e.plugins.map(i=>nh(i,t,!0)));let{then:o}=e;return o?(e._thenReplaced===void 0&&(e._thenReplaced=0),e._thenReplaced<3&&(e.then=(i,a)=>{let s=Qe({key:e.key},o(i,a));return(0,UA.default)(nh(s,t),s)},e._thenReplaced++)):(n=t[e.key])!=null&&n.then&&(e.then=t[e.key].then),e},He=e=>(t,r={})=>(r[e.key]=t,nh(Qe({},e),r)),KG="deserializeAst",M2e=He({key:KG,editor:{insertData:{format:"application/x-slate-fragment",getFragment:({data:e})=>{let t=decodeURIComponent(window.atob(e)),r;try{r=JSON.parse(t)}catch{}return r}}}}),$2e=(e,t={})=>pt(e,oo(Qe({},t),{block:!0})),U2e=(e,t)=>{var r;let{selection:n}=e;if(!n)return!1;let o=(r=$2e(e,t))==null?void 0:r[1];return o?ei(e,n.focus,o)||la(e.selection)&&ei(e,n.anchor,o):!1},j2e=e=>{let t=sa(e);t&&Object.keys(t).forEach(r=>{n3(e,r)})},YG="editorProtocol",q2e=e=>{let{deleteBackward:t,deleteForward:r,deleteFragment:n}=e,o=()=>{U2e(e)&&j2e(e)};return e.deleteBackward=i=>{t(i),o()},e.deleteForward=i=>{r(i),o()},e.deleteFragment=i=>{n(i),o()},e},z2e=He({key:YG,withOverrides:q2e}),XG="event-editor",V2e=He({key:XG,handlers:{onFocus:e=>()=>{BA.focus(e.id)},onBlur:e=>()=>{L2e.focus()===e.id&&BA.focus(null),BA.blur(e.id)}}}),H2e=e=>G$(e),W2e=He({key:"history",withOverrides:H2e}),ZG="inline-void",G2e=e=>{let{isInline:t,isVoid:r,markableVoid:n}=e,o=[],i=[],a=[];return e.plugins.forEach(s=>{s.isInline&&i.push(s.type),s.isVoid&&o.push(s.type),s.isMarkableVoid&&a.push(s.type)}),e.isInline=s=>i.includes(s.type)?!0:t(s),e.isVoid=s=>o.includes(s.type)?!0:r(s),e.markableVoid=s=>a.includes(s.type)?!0:n(s),e},K2e=He({key:ZG,withOverrides:G2e}),j0=(e,t)=>{let r=[];return[...e.plugins].reverse().forEach(n=>{var o;let i=(o=n.inject.pluginsByKey)==null?void 0:o[t.key];i&&r.push(i)}),[t,...r]},XA=(e,{data:t,dataTransfer:r})=>e.every(n=>{var o,i;let a=(i=(o=n.editor)==null?void 0:o.insertData)==null?void 0:i.query;return!a||a({data:t,dataTransfer:r})}),Y2e=(e,t,r)=>{var n=r,{fragment:o}=n,i=Fu(n,["fragment"]);Xe(e,()=>{t.some(a=>{var s,l,u;return((u=(l=(s=a.editor)==null?void 0:s.insertData)==null?void 0:l.preInsert)==null?void 0:u.call(l,o,i))===!0}),e.insertFragment(o)})},X2e=(e,{data:t,dataTransfer:r})=>(e.forEach(n=>{var o,i;let a=(i=(o=n.editor)==null?void 0:o.insertData)==null?void 0:i.transformData;a&&(t=a(t,{dataTransfer:r}))}),t),Z2e=(e,t)=>{var r=t,{fragment:n}=r,o=Fu(r,["fragment"]);return e.forEach(i=>{var a,s;let l=(s=(a=i.editor)==null?void 0:a.insertData)==null?void 0:s.transformFragment;l&&(n=l(n,o))}),n},Q2e=e=>{let{insertData:t}=e;return e.insertData=r=>{[...e.plugins].reverse().some(o=>{let i=o.editor.insertData;if(!i)return!1;let a=j0(e,o),{format:s,getFragment:l}=i;if(!s)return!1;let u=r.getData(s);if(!u)return;if(!XA(a,{data:u,dataTransfer:r}))return!1;u=X2e(a,{data:u,dataTransfer:r});let c=l==null?void 0:l({data:u,dataTransfer:r});return!(c!=null&&c.length)||(c=Z2e(a,{fragment:c,data:u,dataTransfer:r}),c.length===0)?!1:(Y2e(e,a,{fragment:c,data:u,dataTransfer:r}),!0)})||t(r)},e},QG="insertData",J2e=He({key:QG,withOverrides:Q2e}),JG="length",e$e=(e,{options:t})=>{let{apply:r}=e;return e.apply=n=>{Xe(e,()=>{if(r(n),t.maxLength){let o=Wr(e,[]).length;if(o>t.maxLength){let i=o-t.maxLength;e.delete({unit:"character",distance:i,reverse:!0})}}})},e},t$e=He({key:JG,withOverrides:e$e}),eK="nodeFactory",r$e=He({key:eK,withOverrides:e=>(e.blockFactory=t=>Qe({type:re(e,Mn),children:[{text:""}]},t),e.childrenFactory=()=>[e.blockFactory()],e)}),tK="prevSelection",n$e=He({key:tK,handlers:{onKeyDown:e=>t=>{t.persist(),e.currentKeyboardEvent=t}},withOverrides:e=>{let{apply:t}=e;return e.apply=r=>{if(r.type==="set_selection"){let{properties:n}=r;e.prevSelection=n,t(r),e.currentKeyboardEvent=null;return}t(r)},e}}),o$e=e=>w4(e),i$e=He({key:"react",withOverrides:o$e});var a$e=e=>t=>xn(t)||vt(t)&&e.isInline(t),s$e=e=>()=>({type:e,children:[]}),l$e=(e,t)=>e.some((r,n,o)=>{let i=o[n-1];return n!==0?t(r)!==t(i):!1}),u$e=(e,t,r)=>{let n=l$e(e,t),{fragment:o}=e.reduce((i,a)=>{if(n&&t(a)){let s=i.precedingBlock;s||(s=r(),i.precedingBlock=s,i.fragment.push(s)),s.children.push(a)}else i.fragment.push(a),i.precedingBlock=null;return i},{fragment:[],precedingBlock:null});return o},c$e=e=>e.length===0?[{text:""}]:e,rK=(e,t,r)=>(e=c$e(e),e=u$e(e,t,r),e=e.map(n=>vt(n)?oo(Qe({},n),{children:rK(n.children,t,r)}):n),e),d$e=(e,{descendants:t})=>{let r=a$e(e),n=re(e,Mn),o=s$e(n);return rK(t,r,o)},f$e=(e,{trimStart:t="collapse",trimEnd:r="collapse",shouldCollapseWhiteSpace:n=!0,whiteSpaceIncludesNewlines:o=!0}={})=>(t==="all"&&(e=e.replace(/^\s+/,"")),r==="single-newline"&&(e=e.replace(/\n$/,"")),n&&(o?e=e.replaceAll(/\s+/g," "):(e=e.replaceAll(/[^\S\n\r]+/g," "),e=e.replaceAll(/^[^\S\n\r]+/gm,""),e=e.replaceAll(/[^\S\n\r]+$/gm,""))),e),p$e=new Set(["A","ABBR","B","BDI","BDO","BR","CITE","CODE","DATA","DFN","EM","I","KBD","MARK","Q","S","SAMP","SMALL","SPAN","STRONG","SUB","SUP","TIME","U","VAR","WBR","IMG","MAP","TRACK","VIDEO","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","svg","math","CANVAS","DEL","INS","BUTTON","INPUT","LABEL","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA","ACRONYM","BIG","CONTENT","FONT","IMG","MARQUEE","MENUITEM","NOBR","SHADOW","STRIKE","TT"]),oh=e=>e.nodeType===Node.ELEMENT_NODE,ZA=e=>{if(!oh(e))return!1;let t=e,r=p$e.has(t.tagName),n=t.style.display.split(" ")[0];return n===""?r:n.startsWith("inline")?!0:n==="inherit"&&t.parentElement?ZA(t.parentElement):["initial","unset","revert","revert-layer","contents","none"].includes(n)?r:!1},nK=e=>e.nodeType===Node.TEXT_NODE,BG=e=>oh(e)?!ZA(e):!1,m$e=e=>{let t=e;for(;;){if(t.nextSibling)t=t.nextSibling;else{if(t=t.parentElement,t&&BG(t))return!0;t=(t==null?void 0:t.nextSibling)||null}if(!t||BG(t))return!0;if((t.textContent||"").length>0)return!1}},g$e=e=>{e.inlineFormattingContext?e.inlineFormattingContext.atStart=!1:e.inlineFormattingContext={atStart:!0,lastHasTrailingWhiteSpace:!1}},FG=e=>{e.inlineFormattingContext=null},h$e=(e,t)=>{let r=e.textContent||"",n=r.trim()==="";(t.inlineFormattingContext||!n)&&g$e(t);let{whiteSpaceRule:o}=t,i=o!=="normal"?"collapse":!t.inlineFormattingContext||t.inlineFormattingContext.atStart||t.inlineFormattingContext.lastHasTrailingWhiteSpace?"all":"collapse",a=o==="normal"?"collapse":m$e(e)?"single-newline":"collapse",s={normal:!0,pre:!1,"pre-line":!0}[o],u=f$e(r||"",{trimStart:i,trimEnd:a,shouldCollapseWhiteSpace:s,whiteSpaceIncludesNewlines:o!=="pre-line"});t.inlineFormattingContext&&s&&(t.inlineFormattingContext.lastHasTrailingWhiteSpace=u.endsWith(" ")),e.textContent=u},v$e=(e,t)=>{if(oh(e)){iK(e,t);return}if(nK(e)){h$e(e,t);return}oK(e,t)},oK=(e,t)=>{let r=Array.from(e.childNodes);for(let n of r)v$e(n,t)},y$e=e=>{let t=e.style.whiteSpace;switch(t){case"normal":case"nowrap":return"normal";case"pre":case"pre-wrap":case"break-spaces":return"pre";case"pre-line":return"pre-line"}return e.tagName==="PRE"?"pre":t==="initial"?"normal":null},iK=(e,t)=>{let r=ZA(e),n=t.whiteSpaceRule,o=y$e(e);o&&(t.whiteSpaceRule=o),r||FG(t),oK(e,t),r||FG(t),t.whiteSpaceRule=n},b$e=e=>{let t=e.cloneNode(!0);return iK(t,{inlineFormattingContext:null,whiteSpaceRule:"normal"}),t},QA=(e,t)=>Array.from(t.childNodes).flatMap(sK(e)),E$e=(e,t)=>{if(t.nodeName==="BODY")return nf("fragment",{},QA(e,t))},x$e=e=>{if(e.nodeName==="BR")return`
|
|
42
|
-
`},aK=(e,t,{element:r,deserializeLeaf:n})=>{var o;let{deserializeHtml:i,isElement:a,isLeaf:s,type:l}=t;if(!i)return;let{attributeNames:u,query:c,isLeaf:f,isElement:d,rules:p}=i,{getNode:v}=i,h=d||a,y=f||s;if(!n&&!h||n&&!y||p&&!p.some(({validNodeName:E="*",validStyle:C,validClassName:x,validAttribute:P})=>{var N;if(E){let D=(0,F0.default)(E);if(D.length>0&&!D.includes(r.nodeName)&&E!=="*")return!1}if(x&&!r.classList.contains(x))return!1;if(C)for(let[D,R]of Object.entries(C)){if(!(0,F0.default)(R).includes(r.style[D])&&R!=="*"||R==="*"&&!r.style[D])return;let I=(N=t.inject.props)==null?void 0:N.defaultNodeValue;if(I&&I===r.style[D])return!1}if(P)if(typeof P=="string"){if(!r.getAttributeNames().includes(P))return!1}else for(let[D,R]of Object.entries(P)){let M=(0,F0.default)(R),I=r.getAttribute(D);if(!Cn(I)||!M.includes(I))return!1}return!0})||c&&!c(r))return;if(!v)if(h)v=()=>({type:l});else if(y)v=()=>({[l]:!0});else return;let g=(o=v(r,{}))!=null?o:{};if(Object.keys(g).length===0)return;if(j0(e,t).forEach(b=>{var E,C;let x=(C=(E=b.deserializeHtml)==null?void 0:E.getNode)==null?void 0:C.call(E,r,g);x&&(g=Qe(Qe({},g),x))}),u){let b={},E=r.getAttributeNames();for(let C of E)u.includes(C)&&(b[C]=r.getAttribute(C));Object.keys(b).length>0&&(g.attributes=b)}return oo(Qe({},i),{node:g})},w$e=(e,t)=>{let r;return[...e.plugins].reverse().some(n=>(r=aK(e,n,{element:t}),!!r)),r},_$e=(e,t)=>{var r;let n=w$e(e,t);if(n){let{node:o,withoutChildren:i}=n,a=(r=o.children)!=null?r:QA(e,t);return(a.length===0||i)&&(a=[{text:""}]),nf("element",o,a)}},C$e=(e,t)=>{let r={};return[...e.plugins].reverse().forEach(n=>{let o=aK(e,n,{element:t,deserializeLeaf:!0});o&&(r=Qe(Qe({},r),o.node))}),r},S$e=(e,t)=>{let r=C$e(e,t);return QA(e,t).reduce((n,o)=>{if(!o)return n;if(vt(o))Object.keys(r).length>0&&V$e({node:o,source:r,query:{filter:([i])=>xn(i)}}),n.push(o);else{let i=Qe({},r);xn(o)&&o.text&&Object.keys(i).forEach(a=>{i[a]&&o[a]&&(i[a]=o[a])}),n.push(nf("text",i,o))}return n},[])},T$e=e=>{if(nK(e))return e.textContent||""},sK=e=>t=>{let r=T$e(t);if(r)return r;if(!oh(t))return null;let n=x$e(t);if(n)return n;let o=E$e(e,t);if(o)return o;let i=_$e(e,t);return i||S$e(e,t)},P$e=(e,t)=>sK(e)(t),A$e=e=>{let t=document.createElement("body");return t.innerHTML=e,t},D$e=(e,{element:t,collapseWhiteSpace:r=!0})=>{typeof t=="string"&&(t=A$e(t)),r&&(t=b$e(t));let n=P$e(e,t);return d$e(e,{descendants:n})},k$e=e=>new DOMParser().parseFromString(e,"text/html"),df="deserializeHtml",O$e=He({key:df,then:e=>({editor:{insertData:{format:"text/html",getFragment:({data:t})=>{let r=k$e(t);return D$e(e,{element:r.body})}}}})}),lK=(e,t)=>{if(!t(e))return;let n=e.firstChild;for(;n;){let o=n,i=n.previousSibling;n=n.nextSibling,lK(o,t),!o.previousSibling&&!o.nextSibling&&!o.parentNode&&n&&i!==n.previousSibling&&n.parentNode?n=i?i.nextSibling:e.firstChild:!o.previousSibling&&!o.nextSibling&&!o.parentNode&&n&&!n.previousSibling&&!n.nextSibling&&!n.parentNode&&(i?n=i.nextSibling?i.nextSibling.nextSibling:null:e.firstChild&&(n=e.firstChild.nextSibling))}},I$e=(e,t)=>{lK(e,r=>oh(r)?t(r):!0)};var R$e=(e,t)=>{let r=null;return I$e(e,n=>t(n)?(r=n,!1):!0),r},dl=(e,t)=>!!R$e(e,t);var pK=(e,t)=>{let r=Qe({},t),{then:n}=r;if(n){delete r.then;let{plugins:o}=r,i=pK(e,(0,cK.default)(n(e,r),r));if(o&&i.plugins){let a=(0,dK.default)((0,jA.default)(o,"key"),(0,jA.default)(i.plugins,"key"));i.plugins=(0,fK.default)(a)}return i}return r},N$e=e=>(e.type===void 0&&(e.type=e.key),e.options||(e.options={}),e.inject||(e.inject={}),e.editor||(e.editor={}),e),qA=(e,t)=>{t&&t.forEach(r=>{let n=N$e(r);if(n=pK(e,n),n.enabled!==!1){if(e.pluginsByKey[n.key]){let o=e.plugins.indexOf(e.pluginsByKey[n.key]),i=(0,uK.default)(n,e.pluginsByKey[n.key]);o>=0&&(e.plugins[o]=i),e.pluginsByKey[n.key]=i}else e.plugins.push(n),e.pluginsByKey[n.key]=n;qA(e,n.plugins)}})},L$e=(e,{disableCorePlugins:t,plugins:r=[],maxLength:n})=>{var o,i,a,s,l,u,c,f,d,p,v,h,y,g,m,b,E,C,x,P,N,D;let R=[];if(t!==!0){let M=t;(typeof M!="object"||!(M!=null&&M.react))&&R.push((i=(o=e==null?void 0:e.pluginsByKey)==null?void 0:o.react)!=null?i:i$e()),(typeof M!="object"||!(M!=null&&M.history))&&R.push((s=(a=e==null?void 0:e.pluginsByKey)==null?void 0:a.history)!=null?s:W2e()),(typeof M!="object"||!(M!=null&&M.nodeFactory))&&R.push((u=(l=e==null?void 0:e.pluginsByKey)==null?void 0:l[eK])!=null?u:r$e()),(typeof M!="object"||!(M!=null&&M.eventEditor))&&R.push((f=(c=e==null?void 0:e.pluginsByKey)==null?void 0:c[XG])!=null?f:V2e()),(typeof M!="object"||!(M!=null&&M.inlineVoid))&&R.push((p=(d=e==null?void 0:e.pluginsByKey)==null?void 0:d[ZG])!=null?p:K2e()),(typeof M!="object"||!(M!=null&&M.insertData))&&R.push((h=(v=e==null?void 0:e.pluginsByKey)==null?void 0:v[QG])!=null?h:J2e()),(typeof M!="object"||!(M!=null&&M.selection))&&R.push((g=(y=e==null?void 0:e.pluginsByKey)==null?void 0:y[tK])!=null?g:n$e()),(typeof M!="object"||!(M!=null&&M.length))&&Cn(n)&&R.push((b=(m=e==null?void 0:e.pluginsByKey)==null?void 0:m[JG])!=null?b:t$e({options:{maxLength:n}})),(typeof M!="object"||!(M!=null&&M.deserializeHtml))&&R.push((C=(E=e==null?void 0:e.pluginsByKey)==null?void 0:E[df])!=null?C:O$e()),(typeof M!="object"||!(M!=null&&M.deserializeAst))&&R.push((P=(x=e==null?void 0:e.pluginsByKey)==null?void 0:x[KG])!=null?P:M2e()),(typeof M!="object"||!(M!=null&&M.editorProtocol))&&R.push((D=(N=e==null?void 0:e.pluginsByKey)==null?void 0:N[YG])!=null?D:z2e())}R=[...R,...r],e.plugins=[],e.pluginsByKey={},qA(e,R),e.plugins.forEach(M=>{if(M.overrideByKey){let I=e.plugins.map(B=>nh(B,M.overrideByKey));e.plugins=[],e.pluginsByKey={},qA(e,I)}})},MG=e=>()=>{console.warn(`editor.${e} should have been overriden but was not. Please report this issue here: https://github.com/udecode/plate/issues`)},B$e=(e,{id:t,plugins:r=[],disableCorePlugins:n,maxLength:o}={})=>{let i=e;return i.id=t??i.id,i.prevSelection=null,i.isFallback=!1,i.currentKeyboardEvent=null,i.reset=()=>B2e(i),i.redecorate=()=>MG("redecorate"),i.plate={get set(){return MG("plate.set"),null}},i.key||(i.key=Math.random()),L$e(i,{plugins:r,maxLength:o,disableCorePlugins:n}),i.plugins.forEach(a=>{a.withOverrides&&(i=a.withOverrides(i,a))}),i},F$e=(e,{components:t,overrideByKey:r}={})=>{let n={};return r&&(n=(0,mK.default)(r)),t&&Object.keys(t).forEach(o=>{n[o]||(n[o]={}),n[o].component=t[o]}),Object.keys(n).length>0?e.map(o=>nh(o,n)):e},JA=(e={})=>{var t=e,{editor:r=J$(),plugins:n=[],components:o,overrideByKey:i,normalizeInitialValue:a}=t,s=Fu(t,["editor","plugins","components","overrideByKey","normalizeInitialValue"]);n=F$e(n,{components:o,overrideByKey:i});let l=B$e(r,Qe({plugins:n},s));return a&&r3(l,{force:!0}),l},M$e=(e={})=>{let t=JA(e);return t.isFallback=!0,t.apply=()=>{throw new Error("Cannot apply operations on the fallback editor. The fallback editor is used when a hook that depends on the Plate store was unable to locate a valid store. If you are using PlateController, use `useEditorMounted(id?: PlateId)` or `!editor.isFallback` to ensure that a valid Plate store is available before attempting to call operations on the editor.")},t};var oi=(e,t)=>{var r;return(r=as(e,t).options)!=null?r:{}};var U$e=e=>`slate-${e}`,gK=({attributes:e,nodeProps:t,props:r,type:n})=>{var o;let i={};r&&(i=(o=typeof r=="function"?r(t):r)!=null?o:{}),!i.nodeProps&&e&&(i.nodeProps=e),t=Qe(Qe({},t),i),t.nodeProps&&Object.keys(t.nodeProps).forEach(s=>{var l,u;((l=t.nodeProps)==null?void 0:l[s])===void 0&&((u=t.nodeProps)==null||delete u[s])});let{className:a}=t;return oo(Qe({},t),{className:Zg(U$e(n),a)})},j$e={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",insertSoftBreak:"shift+enter",italic:"mod+i",moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",splitBlock:"enter",tab:"tab",untab:"shift+tab",undo:"mod+z"},q$e={deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},z$e={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Jt=e=>{let t=j$e[e],r=q$e[e],n=z$e[e],o=t&&(0,M0.isKeyHotkey)(t),i=r&&(0,M0.isKeyHotkey)(r),a=n&&(0,M0.isKeyHotkey)(n);return s=>!!(o&&o(s)||A1&&i&&i(s)||!A1&&a&&a(s))},$G=e=>(t,r,{composing:n}={})=>!(!Jt(e)(r)||!!n!==_4(t)),ff={isBold:Jt("bold"),isCompose:Jt("compose"),isMoveBackward:Jt("moveBackward"),isMoveForward:Jt("moveForward"),isDeleteBackward:Jt("deleteBackward"),isDeleteForward:Jt("deleteForward"),isDeleteLineBackward:Jt("deleteLineBackward"),isDeleteLineForward:Jt("deleteLineForward"),isDeleteWordBackward:Jt("deleteWordBackward"),isDeleteWordForward:Jt("deleteWordForward"),isExtendBackward:Jt("extendBackward"),isExtendForward:Jt("extendForward"),isExtendLineBackward:Jt("extendLineBackward"),isExtendLineForward:Jt("extendLineForward"),isItalic:Jt("italic"),isMoveLineBackward:Jt("moveLineBackward"),isMoveLineForward:Jt("moveLineForward"),isMoveWordBackward:Jt("moveWordBackward"),isMoveWordForward:Jt("moveWordForward"),isRedo:Jt("redo"),isSoftBreak:Jt("insertSoftBreak"),isSplitBlock:Jt("splitBlock"),isTab:$G("tab"),isTransposeCharacter:Jt("transposeCharacter"),isUndo:Jt("undo"),isUntab:$G("untab")};var V$e=e=>{WG(oo(Qe({},e),{apply:hK.default}))},pf=e=>Qe({key:"",type:"",editor:{},inject:{},options:{}},e);var G$e=(e,t)=>{let r=e.plugins.flatMap(n=>{var o,i;return(i=(o=n.decorate)==null?void 0:o.call(n,e,n))!=null?i:[]});if(t&&r.push(t),r.length!==0)return n=>{let o=[],i=a=>{a!=null&&a.length&&(o=[...o,...a])};return r.forEach(a=>{i(a(n))}),o}},K$e=e=>{let t=!1;return oo(Qe({},e),{nativeEvent:e,currentTarget:e.currentTarget,target:e.target,bubbles:e.bubbles,cancelable:e.cancelable,defaultPrevented:e.defaultPrevented,eventPhase:e.eventPhase,isTrusted:e.isTrusted,timeStamp:e.timeStamp,type:e.type,isDefaultPrevented:()=>e.defaultPrevented,isPropagationStopped:()=>t,persist:()=>{throw new Error("persist is not implemented for synthetic events created using convertDomEventToSyntheticEvent")},preventDefault:()=>e.preventDefault(),stopPropagation:()=>{t=!0,e.stopPropagation()}})},UG=(e,t)=>{if(!t)return!1;let r=t(e);return r??e.isPropagationStopped()},Y$e=(e,{editableProps:t,handlerKey:r})=>{let n=[];n=e.plugins.flatMap(i=>{var a,s,l;return(l=(s=(a=i.handlers)==null?void 0:a[r])==null?void 0:s.call(a,e,i))!=null?l:[]});let o=t==null?void 0:t[r];if(!(n.length===0&&!o))return i=>{let s=i instanceof Event?K$e(i):i;return n.some(u=>UG(s,u))?!0:UG(s,o)}},X$e=(e,{key:t,inject:{props:r}},n)=>{var o,i,a,s;let{element:l,text:u,className:c,style:f}=n,d=l??u;if(!d||!r)return;let{nodeKey:p=t,styleKey:v=p,validTypes:h,classNames:y,transformClassName:g,transformNodeValue:m,transformProps:b,transformStyle:E,validNodeValues:C,defaultNodeValue:x,query:P}=r,N=P==null?void 0:P(r,n);if(!N&&h&&vt(d)&&d.type&&!h.includes(d.type))return;let D=d[p];if(!N&&(!Cn(D)||C&&!C.includes(D)||D===x))return;let R=oo(Qe({},n),{nodeValue:D}),M=(o=m==null?void 0:m(R))!=null?o:D;R.value=M;let I={};return l&&(I.className=Zg(c,`slate-${p}-${D}`)),(y!=null&&y[D]||g)&&(I.className=(i=g==null?void 0:g(R))!=null?i:Zg(c,y==null?void 0:y[M])),v&&(I.style=(a=E==null?void 0:E(R))!=null?a:oo(Qe({},f),{[v]:M})),b&&(I=(s=b(R,I))!=null?s:I),I},vK=(e,t)=>(e.plugins.forEach(r=>{if(r.inject.props){let n=X$e(e,r,t);n&&(t=Qe(Qe({},t),n))}}),oo(Qe({},t),{editor:e})),Z$e=e=>{let t=e.plugins.flatMap(r=>{var n,o,i;return(i=(o=(n=r.handlers)==null?void 0:n.onChange)==null?void 0:o.call(n,e,r))!=null?i:[]});return r=>t.some(n=>{if(!n)return!1;let o=n(r);return o??!1})},Q$e=(e,{key:t,type:r,component:n,props:o})=>function(a){let{element:s,children:l}=a;if(s.type===r){let u=n??yg,c=e.plugins.flatMap(v=>{var h,y;return(y=(h=v.inject)==null?void 0:h.aboveComponent)!=null?y:[]}),f=e.plugins.flatMap(v=>{var h,y;return(y=(h=v.inject)==null?void 0:h.belowComponent)!=null?y:[]});a=gK({attributes:s.attributes,nodeProps:a,props:o,type:r});let d=l;f.forEach(v=>{let h=v(oo(Qe({},a),{key:t}));h&&(d=h(oo(Qe({},a),{children:d})))});let p=zA.default.createElement(u,Qe({},a),d);return c.forEach(v=>{let h=v(oo(Qe({},a),{key:t}));h&&(p=h(oo(Qe({},a),{children:p})))}),zA.default.createElement(N2e,{element:s,scope:t},p)}},J$e=(e,t)=>{let r=[];return e.plugins.forEach(n=>{n.isElement&&r.push(Q$e(e,n))}),function(o){let i=vK(e,o),a;return r.some(s=>(a=s(i),!!a)),a||(t?t(i):yK.default.createElement(yg,Qe({},i)))}},e3e=(e,{key:t,type:r=t,component:n,props:o})=>function(a){let{leaf:s,children:l}=a;if(s[r]){let u=n??HG;return a=gK({attributes:s.attributes,props:o,nodeProps:a,type:r}),EK.default.createElement(u,Qe({},a),l)}return l},t3e=(e,t)=>{let r=[];return e.plugins.forEach(n=>{n.isLeaf&&n.key&&r.push(e3e(e,n))}),function(o){let i=vK(e,o);return r.forEach(a=>{let s=a(i);s!==void 0&&(i.children=s)}),t?t(i):bK.default.createElement(HG,Qe({},i))}};var{plateControllerStore:$0,usePlateControllerStore:eD,PlateControllerProvider:Avt}=sy({activeId:yo(null),primaryEditorIds:yo([]),editorStores:yo({})},{name:"plateController"}),n3e=()=>eD().get,FA=()=>eD().set;var o3e=()=>!!eD().store({warnIfNoStore:!1}),i3e=e=>{let t=xK.default.useMemo(()=>yo(r=>{let n=r($0.atom.editorStores),o=a=>{var s;return a&&(s=n[a])!=null?s:null};if(e)return o(e);let i=[r($0.atom.activeId),...r($0.atom.primaryEditorIds)];for(let a of i){let s=o(a);if(s)return s}return null}),[e]);return n3e().atom(t)};var Dvt=Symbol("global-plate"),a3e=(e={})=>{var t=e,{decorate:r=null,editor:n=M$e(),id:o,isMounted:i=!1,versionDecorate:a=1,versionEditor:s=1,versionSelection:l=1,onChange:u=null,editorRef:c=null,plugins:f=[],rawPlugins:d=[],readOnly:p=null,primary:v=!0,renderElement:h=null,renderLeaf:y=null,value:g=null}=t,m=Fu(t,["decorate","editor","id","isMounted","versionDecorate","versionEditor","versionSelection","onChange","editorRef","plugins","rawPlugins","readOnly","primary","renderElement","renderLeaf","value"]);return sy(Qe({decorate:r,editor:n,id:o,isMounted:i,versionDecorate:a,versionEditor:s,versionSelection:l,onChange:u,editorRef:c,plugins:f,rawPlugins:d,readOnly:p,primary:v,renderElement:h,renderLeaf:y,value:g},m),{name:"plate",extend:b=>({trackedEditor:yo(E=>({editor:E(b.editor),version:E(b.versionEditor)})),trackedSelection:yo(E=>({selection:E(b.editor).selection,version:E(b.versionSelection)}))})})},{plateStore:kvt,usePlateStore:ih,PlateProvider:Ovt}=a3e(),wK=(e,{debugHookName:t="usePlateEditorStore"}={})=>{var r;let n=(r=ih(e).store({warnIfNoStore:!1}))!=null?r:null,[o]=$A.default.useState(!!n),i=o?n:i3e(e),a=o3e(),s=$A.default.useMemo(()=>eu(),[]);if(!i){if(a)return s;throw new Error(`${t} must be used inside a Plate or PlateController`)}return i},is=(e,t)=>{let r=wK(e,Qe({debugHookName:"usePlateSelectors"},t));return ih({store:r}).get},tD=(e,t)=>{let r=wK(e,Qe({debugHookName:"usePlateActions"},t));return ih({store:r}).set};var s3e=()=>is(void 0,{debugHookName:"usePlateId"}).id(),HA=(e,t,r={})=>{let n=VA.default.useRef(1),o=tD(t,Qe({debugHookName:"useIncrementVersion"},r))[e]();return VA.default.useCallback(()=>{let i=n.current+1;o(i),n.current=i},[o])},l3e=(e,t={})=>{let r=HA("versionDecorate",e,Qe({debugHookName:"useRedecorate"},t));return _K.default.useCallback(()=>{r()},[r])};var ii=(e,t={})=>is(e,Qe({debugHookName:"useEditorRef"},t)).editor(),CK=(e,t={})=>is(e,Qe({debugHookName:"useEditorSelection"},t)).trackedSelection().selection;var d3e=["readOnly","plugins","onChange","decorate","renderElement","renderLeaf"],f3e=({id:e})=>{let t=ii(e),r=l3e(e),n=ih(e),o=Object.fromEntries(d3e.map(a=>[a,n.set[a]()])),i=MA.default.useMemo(()=>o,[]);return MA.default.useEffect(()=>{t.redecorate=r,t.plate={set:i}},[t,r,i]),null};function p3e({id:e,plugin:t}){var r;let n=ii(e);return(r=t.useHooks)==null||r.call(t,n,t),null}function m3e({id:e}){let t=tD(e).isMounted(),r=is(e).plugins(),n=ii(e),o=is(e).editorRef();return uf.default.useEffect(()=>(t(!0),()=>{t(!1)}),[t]),uf.default.useEffect(()=>{if(typeof o=="function")return o(n),()=>o(null);if(o)return o.current=n,()=>{o.current=null}},[o,n]),uf.default.createElement(uf.default.Fragment,null,r.map(i=>uf.default.createElement(p3e,{key:i.key,id:e,plugin:i})))}var g3e=eh.default.memo(({id:e})=>{let t=t1(),r=HA("versionEditor",e);eh.default.useEffect(()=>{r()});let n=HA("versionSelection",e),o=eh.default.useRef(t.selection),i=h3e(o.current,t.selection);return eh.default.useEffect(()=>{i||n(),o.current=t.selection},[t.selection,i,n]),null}),h3e=(e,t)=>!e&&!t?!0:!e||!t?!1:X.equals(e,t),jG=["onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onDOMBeforeInput","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],b3e=(e={})=>{let{id:t}=e,r=ii(t),n=is(t),o=n.versionDecorate(),i=n.readOnly(),a=n.decorate(),s=n.renderLeaf(),l=n.renderElement(),u=th.default.useMemo(()=>G$e(r,a??(e==null?void 0:e.decorate)),[e==null?void 0:e.decorate,r,a]),c=th.default.useMemo(()=>{if(!(!o||!u))return v=>u(v)},[u,o]),f=th.default.useMemo(()=>J$e(r,l??(e==null?void 0:e.renderElement)),[e==null?void 0:e.renderElement,r,l]),d=th.default.useMemo(()=>t3e(r,s??(e==null?void 0:e.renderLeaf)),[e==null?void 0:e.renderLeaf,r,s]),p=_A(()=>{let v={decorate:c,renderElement:f,renderLeaf:d};return Cn(i)&&(v.readOnly=i),jG.forEach(h=>{let y=Y$e(r,{editableProps:e,handlerKey:h});y&&(v[h]=y)}),v},[c,e,f,d,i]);return _A(()=>Qe(Qe({},(0,SK.default)(e,[...jG,"renderElement","renderLeaf"])),p),[e,p])};var x3e=({id:e})=>{let t=ii(e),r=is(e).value(),n=tD(e).value(),o=is(e).onChange(),i=WA.default.useCallback(a=>{Z$e(t)(a)||o==null||o(a),n(a)},[t,n,o]);return WA.default.useMemo(()=>({key:t.key,editor:t,onChange:i,value:r,initialValue:r}),[t,i,r])};var w3e=({id:e})=>{let t=s3e(),r=e??t,n=rh.default.useMemo(()=>NG($0.atom.editorStores,c=>c.prop(r)),[r]),o=FA().atom(n,{warnIfNoStore:!1}),i=ih(r).store(),a=is(r).primary(),s=FA().primaryEditorIds({warnIfNoStore:!1}),l=b4(),u=FA().activeId({warnIfNoStore:!1});return rh.default.useEffect(()=>(o(i??null),()=>{o(null),u(c=>c===r?null:c)}),[i,o,u,r]),rh.default.useEffect(()=>{if(a)return s(c=>[...c,r]),()=>{s(c=>c.filter(f=>f!==r))}},[r,a,s]),rh.default.useEffect(()=>{r&&l&&u(r)},[r,l,u]),null};function _3e({id:e,children:t}){var r;let n=x3e({id:e}),o=ii(e),i=GA.default.createElement(x4,Qe({},n),t);return(r=o.plugins)==null||r.forEach(a=>{let{renderAboveSlate:s}=a;s&&(i=GA.default.createElement(s,null,i))}),i}var C3e=on.default.forwardRef((e,t)=>{var r=e,{renderEditable:n}=r,o=Fu(r,["renderEditable"]);let{id:i}=o,a=ii(i);if(!a)throw new Error("Editor not found. Please ensure that PlateContent is rendered below Plate.");let s=b3e(o),l=on.default.createElement(v4,Qe({ref:t},s)),u=null,c=null;a.plugins.forEach(d=>{let{renderBeforeEditable:p,renderAfterEditable:v}=d;v&&(u=on.default.createElement(on.default.Fragment,null,u,on.default.createElement(v,Qe({},s)))),p&&(c=on.default.createElement(on.default.Fragment,null,c,on.default.createElement(p,Qe({},s))))});let f=on.default.createElement(on.default.Fragment,null,c,n?n(l):l,on.default.createElement(f3e,{id:i}),on.default.createElement(g3e,{id:i}),on.default.createElement(m3e,{id:i}),on.default.createElement(w3e,{id:i}),u);return a.plugins.forEach(d=>{let{renderAboveEditable:p}=d;p&&(f=on.default.createElement(p,null,f))}),on.default.createElement(_3e,{id:i},f)});C3e.displayName="PlateContent";var CD=de(Re(),1);var rD=de(Re(),1);var Pr=de(Re(),1);var T3e=de(Re(),1);function TK(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function PK(...e){return t=>{let r=!1,n=e.map(o=>{let i=TK(o,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<n.length;o++){let i=n[o];typeof i=="function"?i():TK(e[o],null)}}}}var q0=de(tC(),1),P3e=Symbol.for("react.lazy"),z0=Pr[" use ".trim().toString()];function A3e(e){return typeof e=="object"&&e!==null&&"then"in e}function AK(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===P3e&&"_payload"in e&&A3e(e._payload)}function D3e(e){let t=k3e(e),r=Pr.forwardRef((n,o)=>{let{children:i,...a}=n;AK(i)&&typeof z0=="function"&&(i=z0(i._payload));let s=Pr.Children.toArray(i),l=s.find(I3e);if(l){let u=l.props.children,c=s.map(f=>f===l?Pr.Children.count(u)>1?Pr.Children.only(null):Pr.isValidElement(u)?u.props.children:null:f);return(0,q0.jsx)(t,{...a,ref:o,children:Pr.isValidElement(u)?Pr.cloneElement(u,void 0,c):null})}return(0,q0.jsx)(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var DK=D3e("Slot");function k3e(e){let t=Pr.forwardRef((r,n)=>{let{children:o,...i}=r;if(AK(o)&&typeof z0=="function"&&(o=z0(o._payload)),Pr.isValidElement(o)){let a=N3e(o),s=R3e(i,o.props);return o.type!==Pr.Fragment&&(s.ref=n?PK(n,a):a),Pr.cloneElement(o,s)}return Pr.Children.count(o)>1?Pr.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var O3e=Symbol("radix.slottable");function I3e(e){return Pr.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===O3e}function R3e(e,t){let r={...t};for(let n in t){let o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{let l=i(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function N3e(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var $3e=de(Re(),1),U3e=de(DT(),1),nD=de(Re(),1);function kK(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=kK(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function OK(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=kK(e))&&(n&&(n+=" "),n+=t);return n}var MK=de(Re(),1),z3e=de(Re(),1),oD=de(Re(),1),H3e=de(Re(),1),W3e=de(Re(),1),G3e=de(Re(),1),K3e=de(Re(),1),L3e=Object.defineProperty,B3e=Object.defineProperties,F3e=Object.getOwnPropertyDescriptors,V0=Object.getOwnPropertySymbols,RK=Object.prototype.hasOwnProperty,NK=Object.prototype.propertyIsEnumerable,IK=(e,t,r)=>t in e?L3e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mf=(e,t)=>{for(var r in t||(t={}))RK.call(t,r)&&IK(e,r,t[r]);if(V0)for(var r of V0(t))NK.call(t,r)&&IK(e,r,t[r]);return e},M3e=(e,t)=>B3e(e,F3e(t)),LK=(e,t)=>{var r={};for(var n in e)RK.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&V0)for(var n of V0(e))t.indexOf(n)<0&&NK.call(e,n)&&(r[n]=e[n]);return r},iD=e=>rD.default.forwardRef((t,r)=>{var n=t,{as:o,asChild:i=!1}=n,a=LK(n,["as","asChild"]);let s=i?DK:o||e;return rD.default.createElement(s,mf({ref:r},a))}),BK=iD("div");var FK=iD("span");var j3e=(e,t)=>{typeof e=="function"?e(t):e!=null&&(e.current=t)},q3e=(...e)=>t=>e.forEach(r=>j3e(r,t)),ah=(...e)=>MK.default.useCallback(q3e(...e),e),ai=e=>{let t=iD(e);return({propsHook:r,stateHook:n}={})=>nD.default.forwardRef((o,i)=>{var a=o,{asChild:s,options:l,state:u,className:c,getClassName:f}=a,d=LK(a,["asChild","options","state","className","getClassName"]),p,v;let h=Cn(u)?u:n?n(l):void 0,{ref:y,props:g,hidden:m}=r?r(h):{props:{},hidden:!1,ref:null},b=ah(i,y),E=Cn(g==null?void 0:g.className)||Cn(c)?OK(g==null?void 0:g.className,c):void 0,C=g!=null&&g.style||d.style?mf(mf({},g==null?void 0:g.style),d.style):void 0;return!s&&m?null:nD.default.createElement(t,mf(mf(M3e(mf({ref:b,asChild:s},g),{className:E,style:C}),d),(v=(p=d.setProps)==null?void 0:p.call(d,g??{}))!=null?v:{}))})};var V3e=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Yvt=V3e?oD.default.useLayoutEffect:oD.default.useEffect;function $K(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=$K(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function H0(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=$K(e))&&(n&&(n+=" "),n+=t);return n}var SD=de(Re(),1);var Gze=de(Re(),1),Kze=de(G0(),1),Yze=de(fQ(),1);var Xze=de(gQ(),1);var Zze=de(G0(),1);var EQ=de(G0(),1);var Uze=Object.defineProperty,jze=Object.defineProperties,qze=Object.getOwnPropertyDescriptors,J0=Object.getOwnPropertySymbols,vQ=Object.prototype.hasOwnProperty,yQ=Object.prototype.propertyIsEnumerable,hQ=(e,t,r)=>t in e?Uze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,si=(e,t)=>{for(var r in t||(t={}))vQ.call(t,r)&&hQ(e,r,t[r]);if(J0)for(var r of J0(t))yQ.call(t,r)&&hQ(e,r,t[r]);return e},Cf=(e,t)=>jze(e,qze(t)),bQ=(e,t)=>{var r={};for(var n in e)vQ.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&J0)for(var n of J0(e))t.indexOf(n)<0&&yQ.call(e,n)&&(r[n]=e[n]);return r},zze=e=>{let t=e,{editor:r,attributes:n,nodeProps:o,element:i,elementToAttributes:a}=t,s=bQ(t,["editor","attributes","nodeProps","element","elementToAttributes"]);return{ref:ah(e.ref,n.ref),props:Cf(si(si(si(si({},n),s),o),a==null?void 0:a(i)),{className:H0(e.className,o==null?void 0:o.className)})}},Vze=CD.default.forwardRef((e,t)=>{let{ref:r,props:n}=zze(Cf(si({},e),{ref:t}));return CD.default.createElement(BK,Cf(si({},n),{ref:r}))});Vze.displayName="PlateElement";var Hze=e=>{let t=e,{editor:r,attributes:n,nodeProps:o,text:i,leaf:a,leafToAttributes:s}=t,l=bQ(t,["editor","attributes","nodeProps","text","leaf","leafToAttributes"]);return{ref:ah(e.ref,n.ref),props:Cf(si(si(si(si({},n),l),o),s==null?void 0:s(a)),{className:H0(e.className,o==null?void 0:o.className)})}},Wze=SD.default.forwardRef((e,t)=>{let{ref:r,props:n}=Hze(Cf(si({},e),{ref:t}));return SD.default.createElement(FK,Cf(si({},n),{ref:r}))});Wze.displayName="PlateLeaf";var pl=(e,{type:t,options:{hotkey:r}})=>n=>{if(n.defaultPrevented)return;let o=re(e,Mn);if(!r)return;let i=(0,EQ.default)(r);for(let a of i)if((0,Mi.isHotkey)(a,n)){n.preventDefault(),GG(e,{activeType:t,inactiveType:o});return}},io=(e,{type:t,options:{hotkey:r,clear:n}})=>o=>{o.defaultPrevented||r&&(0,Mi.isHotkey)(r,o)&&(o.preventDefault(),y6(e,{key:t,clear:n}))};var Qze={};function TD(e,t){let r=t||Qze,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return wQ(e,n,o)}function wQ(e,t,r){if(Jze(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return xQ(e.children,t,r)}return Array.isArray(e)?xQ(e,t,r):""}function xQ(e,t,r){let n=[],o=-1;for(;++o<e.length;)n[o]=wQ(e[o],t,r);return n.join("")}function Jze(e){return!!(e&&typeof e=="object")}var _Q=document.createElement("i");function Sf(e){let t="&"+e+";";_Q.innerHTML=t;let r=_Q.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function an(e,t,r,n){let o=e.length,i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);i<n.length;)a=n.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function $n(e,t){return e.length>0?(an(e,e.length,0,t),e):t}var CQ={}.hasOwnProperty;function SQ(e){let t={},r=-1;for(;++r<e.length;)e6e(t,e[r]);return t}function e6e(e,t){let r;for(r in t){let o=(CQ.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r],a;if(i)for(a in i){CQ.call(o,a)||(o[a]=[]);let s=i[a];t6e(o[a],Array.isArray(s)?s:s?[s]:[])}}}function t6e(e,t){let r=-1,n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);an(e,0,0,n)}function ex(e,t){let r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCodePoint(r)}function ss(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Do=ml(/[A-Za-z]/),Un=ml(/[\dA-Za-z]/),TQ=ml(/[#-'*+\--9=?A-Z^-~]/);function vh(e){return e!==null&&(e<32||e===127)}var yh=ml(/\d/),PQ=ml(/[\dA-Fa-f]/),AQ=ml(/[!-/:-@[-`{-~]/);function ke(e){return e!==null&&e<-2}function _r(e){return e!==null&&(e<0||e===32)}function at(e){return e===-2||e===-1||e===32}var DQ=ml(new RegExp("\\p{P}|\\p{S}","u")),kQ=ml(/\s/);function ml(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function st(e,t,r,n){let o=n?n-1:Number.POSITIVE_INFINITY,i=0;return a;function a(l){return at(l)?(e.enter(r),s(l)):t(l)}function s(l){return at(l)&&i++<o?(e.consume(l),s):(e.exit(r),t(l))}}var OQ={tokenize:r6e};function r6e(e){let t=e.attempt(this.parser.constructs.contentInitial,n,o),r;return t;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),st(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){let l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return ke(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}var RQ={tokenize:n6e},IQ={tokenize:o6e};function n6e(e){let t=this,r=[],n=0,o,i,a;return s;function s(b){if(n<r.length){let E=r[n];return t.containerState=E[1],e.attempt(E[0].continuation,l,u)(b)}return u(b)}function l(b){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&m();let E=t.events.length,C=E,x;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){x=t.events[C][1].end;break}g(n);let P=E;for(;P<t.events.length;)t.events[P][1].end={...x},P++;return an(t.events,C+1,0,t.events.slice(E)),t.events.length=P,u(b)}return s(b)}function u(b){if(n===r.length){if(!o)return d(b);if(o.currentConstruct&&o.currentConstruct.concrete)return v(b);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(IQ,c,f)(b)}function c(b){return o&&m(),g(n),d(b)}function f(b){return t.parser.lazy[t.now().line]=n!==r.length,a=t.now().offset,v(b)}function d(b){return t.containerState={},e.attempt(IQ,p,v)(b)}function p(b){return n++,r.push([t.currentConstruct,t.containerState]),d(b)}function v(b){if(b===null){o&&m(),g(0),e.consume(b);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:i}),h(b)}function h(b){if(b===null){y(e.exit("chunkFlow"),!0),g(0),e.consume(b);return}return ke(b)?(e.consume(b),y(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(b),h)}function y(b,E){let C=t.sliceStream(b);if(E&&C.push(null),b.previous=i,i&&(i.next=b),i=b,o.defineSkip(b.start),o.write(C),t.parser.lazy[b.start.line]){let x=o.events.length;for(;x--;)if(o.events[x][1].start.offset<a&&(!o.events[x][1].end||o.events[x][1].end.offset>a))return;let P=t.events.length,N=P,D,R;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(D){R=t.events[N][1].end;break}D=!0}for(g(n),x=P;x<t.events.length;)t.events[x][1].end={...R},x++;an(t.events,N+1,0,t.events.slice(P)),t.events.length=x}}function g(b){let E=r.length;for(;E-- >b;){let C=r[E];t.containerState=C[1],C[0].exit.call(t,e)}r.length=b}function m(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function o6e(e,t,r){return st(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function PD(e){if(e===null||_r(e)||kQ(e))return 1;if(DQ(e))return 2}function Tf(e,t,r){let n=[],o=-1;for(;++o<e.length;){let i=e[o].resolveAll;i&&!n.includes(i)&&(t=i(t,r),n.push(i))}return t}var bh={name:"attention",resolveAll:i6e,tokenize:a6e};function i6e(e,t){let r=-1,n,o,i,a,s,l,u,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let f={...e[n][1].end},d={...e[r][1].start};NQ(f,-l),NQ(d,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...e[n][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:d},i={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},o={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[n][1].end={...a.start},e[r][1].start={...s.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=$n(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=$n(u,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),u=$n(u,Tf(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),u=$n(u,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,u=$n(u,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,an(e,n-1,r-n+3,u),r=n+u.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function a6e(e,t){let r=this.parser.constructs.attentionMarkers.null,n=this.previous,o=PD(n),i;return a;function a(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;let u=e.exit("attentionSequence"),c=PD(l),f=!c||c===2&&o||r.includes(l),d=!o||o===2&&c||r.includes(n);return u._open=!!(i===42?f:f&&(o||!d)),u._close=!!(i===42?d:d&&(c||!f)),t(l)}}function NQ(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var AD={name:"autolink",tokenize:s6e};function s6e(e,t,r){let n=0;return o;function o(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(p){return Do(p)?(e.consume(p),a):p===64?r(p):u(p)}function a(p){return p===43||p===45||p===46||Un(p)?(n=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),n=0,l):(p===43||p===45||p===46||Un(p))&&n++<32?(e.consume(p),s):(n=0,u(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||vh(p)?r(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),c):TQ(p)?(e.consume(p),u):r(p)}function c(p){return Un(p)?f(p):r(p)}function f(p){return p===46?(e.consume(p),n=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):d(p)}function d(p){if((p===45||Un(p))&&n++<63){let v=p===45?d:f;return e.consume(p),v}return r(p)}}var gl={partial:!0,tokenize:l6e};function l6e(e,t,r){return n;function n(i){return at(i)?st(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||ke(i)?t(i):r(i)}}var tx={continuation:{tokenize:c6e},exit:d6e,name:"blockQuote",tokenize:u6e};function u6e(e,t,r){let n=this;return o;function o(a){if(a===62){let s=n.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return r(a)}function i(a){return at(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function c6e(e,t,r){let n=this;return o;function o(a){return at(a)?st(e,i,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(tx,t,r)(a)}}function d6e(e){e.exit("blockQuote")}var rx={name:"characterEscape",tokenize:f6e};function f6e(e,t,r){return n;function n(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return AQ(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(i)}}var nx={name:"characterReference",tokenize:p6e};function p6e(e,t,r){let n=this,o=0,i,a;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,a=Un,c(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=PQ,c):(e.enter("characterReferenceValue"),i=7,a=yh,c(f))}function c(f){if(f===59&&o){let d=e.exit("characterReferenceValue");return a===Un&&!Sf(n.sliceSerialize(d))?r(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&o++<i?(e.consume(f),c):r(f)}}var LQ={partial:!0,tokenize:g6e},ox={concrete:!0,name:"codeFenced",tokenize:m6e};function m6e(e,t,r){let n=this,o={partial:!0,tokenize:C},i=0,a=0,s;return l;function l(x){return u(x)}function u(x){let P=n.events[n.events.length-1];return i=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,s=x,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(x)}function c(x){return x===s?(a++,e.consume(x),c):a<3?r(x):(e.exit("codeFencedFenceSequence"),at(x)?st(e,f,"whitespace")(x):f(x))}function f(x){return x===null||ke(x)?(e.exit("codeFencedFence"),n.interrupt?t(x):e.check(LQ,h,E)(x)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(x))}function d(x){return x===null||ke(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(x)):at(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),st(e,p,"whitespace")(x)):x===96&&x===s?r(x):(e.consume(x),d)}function p(x){return x===null||ke(x)?f(x):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(x))}function v(x){return x===null||ke(x)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(x)):x===96&&x===s?r(x):(e.consume(x),v)}function h(x){return e.attempt(o,E,y)(x)}function y(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),g}function g(x){return i>0&&at(x)?st(e,m,"linePrefix",i+1)(x):m(x)}function m(x){return x===null||ke(x)?e.check(LQ,h,E)(x):(e.enter("codeFlowValue"),b(x))}function b(x){return x===null||ke(x)?(e.exit("codeFlowValue"),m(x)):(e.consume(x),b)}function E(x){return e.exit("codeFenced"),t(x)}function C(x,P,N){let D=0;return R;function R(U){return x.enter("lineEnding"),x.consume(U),x.exit("lineEnding"),M}function M(U){return x.enter("codeFencedFence"),at(U)?st(x,I,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):I(U)}function I(U){return U===s?(x.enter("codeFencedFenceSequence"),B(U)):N(U)}function B(U){return U===s?(D++,x.consume(U),B):D>=a?(x.exit("codeFencedFenceSequence"),at(U)?st(x,L,"whitespace")(U):L(U)):N(U)}function L(U){return U===null||ke(U)?(x.exit("codeFencedFence"),P(U)):N(U)}}}function g6e(e,t,r){let n=this;return o;function o(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}var Eh={name:"codeIndented",tokenize:v6e},h6e={partial:!0,tokenize:y6e};function v6e(e,t,r){let n=this;return o;function o(u){return e.enter("codeIndented"),st(e,i,"linePrefix",5)(u)}function i(u){let c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):r(u)}function a(u){return u===null?l(u):ke(u)?e.attempt(h6e,a,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||ke(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function y6e(e,t,r){let n=this;return o;function o(a){return n.parser.lazy[n.now().line]?r(a):ke(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):st(e,i,"linePrefix",5)(a)}function i(a){let s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):ke(a)?o(a):r(a)}}var DD={name:"codeText",previous:E6e,resolve:b6e,tokenize:x6e};function b6e(e){let t=e.length-4,r=3,n,o;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)o===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(o=n):(n===t||e[n][1].type==="lineEnding")&&(e[o][1].type="codeTextData",n!==o+2&&(e[o][1].end=e[n-1][1].end,e.splice(o+2,n-o-2),t-=n-o-2,n=o+2),o=void 0);return e}function E6e(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function x6e(e,t,r){let n=this,o=0,i,a;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),o++,l):(e.exit("codeTextSequence"),u(d))}function u(d){return d===null?r(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),u):d===96?(a=e.enter("codeTextSequence"),i=0,f(d)):ke(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||ke(d)?(e.exit("codeTextData"),u(d)):(e.consume(d),c)}function f(d){return d===96?(e.consume(d),i++,f):i===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",c(d))}}var ix=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){let n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){let o=r||0;this.setCursor(Math.trunc(t));let i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return n&&xh(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),xh(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),xh(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let r=this.left.splice(t,Number.POSITIVE_INFINITY);xh(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);xh(this.left,r.reverse())}}};function xh(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function ax(e){let t={},r=-1,n,o,i,a,s,l,u,c=new ix(e);for(;++r<c.length;){for(;r in t;)r=t[r];if(n=c.get(r),r&&n[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(l=n[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,w6e(c,r)),r=t[r],u=!0);else if(n[1]._container){for(i=r,o=void 0;i--;)if(a=c.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(c.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(n[1].end={...c.get(o)[1].start},s=c.slice(o,r),s.unshift(n),c.splice(o,r-o+1,s))}}return an(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function w6e(e,t){let r=e.get(t)[1],n=e.get(t)[2],o=t-1,i=[],a=r._tokenizer;a||(a=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));let s=a.events,l=[],u={},c,f,d=-1,p=r,v=0,h=0,y=[h];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(c=n.sliceStream(p),p.next||c.push(null),f&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=r;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(h=d+1,y.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),d=y.length;d--;){let g=s.slice(y[d],y[d+1]),m=i.pop();l.push([m,m+g.length-1]),e.splice(m,2,g)}for(l.reverse(),d=-1;++d<l.length;)u[v+l[d][0]]=v+l[d][1],v+=l[d][1]-l[d][0]-1;return u}var kD={resolve:C6e,tokenize:S6e},_6e={partial:!0,tokenize:T6e};function C6e(e){return ax(e),e}function S6e(e,t){let r;return n;function n(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):ke(s)?e.check(_6e,a,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function T6e(e,t,r){let n=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),st(e,i,"linePrefix")}function i(a){if(a===null||ke(a))return r(a);let s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}}function sx(e,t,r,n,o,i,a,s,l){let u=l||Number.POSITIVE_INFINITY,c=0;return f;function f(g){return g===60?(e.enter(n),e.enter(o),e.enter(i),e.consume(g),e.exit(i),d):g===null||g===32||g===41||vh(g)?r(g):(e.enter(n),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(g))}function d(g){return g===62?(e.enter(i),e.consume(g),e.exit(i),e.exit(o),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(s),d(g)):g===null||g===60||ke(g)?r(g):(e.consume(g),g===92?v:p)}function v(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function h(g){return!c&&(g===null||g===41||_r(g))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(n),t(g)):c<u&&g===40?(e.consume(g),c++,h):g===41?(e.consume(g),c--,h):g===null||g===32||g===40||vh(g)?r(g):(e.consume(g),g===92?y:h)}function y(g){return g===40||g===41||g===92?(e.consume(g),h):h(g)}}function lx(e,t,r,n,o,i){let a=this,s=0,l;return u;function u(p){return e.enter(n),e.enter(o),e.consume(p),e.exit(o),e.enter(i),c}function c(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?r(p):p===93?(e.exit(i),e.enter(o),e.consume(p),e.exit(o),e.exit(n),t):ke(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||ke(p)||s++>999?(e.exit("chunkString"),c(p)):(e.consume(p),l||(l=!at(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function ux(e,t,r,n,o,i){let a;return s;function s(d){return d===34||d===39||d===40?(e.enter(n),e.enter(o),e.consume(d),e.exit(o),a=d===40?41:d,l):r(d)}function l(d){return d===a?(e.enter(o),e.consume(d),e.exit(o),e.exit(n),t):(e.enter(i),u(d))}function u(d){return d===a?(e.exit(i),l(a)):d===null?r(d):ke(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),st(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===a||d===null||ke(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?f:c)}function f(d){return d===a||d===92?(e.consume(d),c):c(d)}}function $u(e,t){let r;return n;function n(o){return ke(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,n):at(o)?st(e,n,r?"linePrefix":"lineSuffix")(o):t(o)}}var OD={name:"definition",tokenize:A6e},P6e={partial:!0,tokenize:D6e};function A6e(e,t,r){let n=this,o;return i;function i(p){return e.enter("definition"),a(p)}function a(p){return lx.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return o=ss(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):r(p)}function l(p){return _r(p)?$u(e,u)(p):u(p)}function u(p){return sx(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(P6e,f,f)(p)}function f(p){return at(p)?st(e,d,"whitespace")(p):d(p)}function d(p){return p===null||ke(p)?(e.exit("definition"),n.parser.defined.push(o),t(p)):r(p)}}function D6e(e,t,r){return n;function n(s){return _r(s)?$u(e,o)(s):r(s)}function o(s){return ux(e,i,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return at(s)?st(e,a,"whitespace")(s):a(s)}function a(s){return s===null||ke(s)?t(s):r(s)}}var ID={name:"hardBreakEscape",tokenize:k6e};function k6e(e,t,r){return n;function n(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return ke(i)?(e.exit("hardBreakEscape"),t(i)):r(i)}}var RD={name:"headingAtx",resolve:O6e,tokenize:I6e};function O6e(e,t){let r=e.length-2,n=3,o,i;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(o={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},i={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},an(e,n,r-n+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function I6e(e,t,r){let n=0;return o;function o(c){return e.enter("atxHeading"),i(c)}function i(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&n++<6?(e.consume(c),a):c===null||_r(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||ke(c)?(e.exit("atxHeading"),t(c)):at(c)?st(e,s,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||_r(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}var BQ=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ND=["pre","script","style","textarea"];var LD={concrete:!0,name:"htmlFlow",resolveTo:L6e,tokenize:B6e},R6e={partial:!0,tokenize:M6e},N6e={partial:!0,tokenize:F6e};function L6e(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function B6e(e,t,r){let n=this,o,i,a,s,l;return u;function u(k){return c(k)}function c(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),f}function f(k){return k===33?(e.consume(k),d):k===47?(e.consume(k),i=!0,h):k===63?(e.consume(k),o=3,n.interrupt?t:O):Do(k)?(e.consume(k),a=String.fromCharCode(k),y):r(k)}function d(k){return k===45?(e.consume(k),o=2,p):k===91?(e.consume(k),o=5,s=0,v):Do(k)?(e.consume(k),o=4,n.interrupt?t:O):r(k)}function p(k){return k===45?(e.consume(k),n.interrupt?t:O):r(k)}function v(k){let be="CDATA[";return k===be.charCodeAt(s++)?(e.consume(k),s===be.length?n.interrupt?t:I:v):r(k)}function h(k){return Do(k)?(e.consume(k),a=String.fromCharCode(k),y):r(k)}function y(k){if(k===null||k===47||k===62||_r(k)){let be=k===47,Oe=a.toLowerCase();return!be&&!i&&ND.includes(Oe)?(o=1,n.interrupt?t(k):I(k)):BQ.includes(a.toLowerCase())?(o=6,be?(e.consume(k),g):n.interrupt?t(k):I(k)):(o=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(k):i?m(k):b(k))}return k===45||Un(k)?(e.consume(k),a+=String.fromCharCode(k),y):r(k)}function g(k){return k===62?(e.consume(k),n.interrupt?t:I):r(k)}function m(k){return at(k)?(e.consume(k),m):R(k)}function b(k){return k===47?(e.consume(k),R):k===58||k===95||Do(k)?(e.consume(k),E):at(k)?(e.consume(k),b):R(k)}function E(k){return k===45||k===46||k===58||k===95||Un(k)?(e.consume(k),E):C(k)}function C(k){return k===61?(e.consume(k),x):at(k)?(e.consume(k),C):b(k)}function x(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(e.consume(k),l=k,P):at(k)?(e.consume(k),x):N(k)}function P(k){return k===l?(e.consume(k),l=null,D):k===null||ke(k)?r(k):(e.consume(k),P)}function N(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||_r(k)?C(k):(e.consume(k),N)}function D(k){return k===47||k===62||at(k)?b(k):r(k)}function R(k){return k===62?(e.consume(k),M):r(k)}function M(k){return k===null||ke(k)?I(k):at(k)?(e.consume(k),M):r(k)}function I(k){return k===45&&o===2?(e.consume(k),K):k===60&&o===1?(e.consume(k),z):k===62&&o===4?(e.consume(k),J):k===63&&o===3?(e.consume(k),O):k===93&&o===5?(e.consume(k),ie):ke(k)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(R6e,ue,B)(k)):k===null||ke(k)?(e.exit("htmlFlowData"),B(k)):(e.consume(k),I)}function B(k){return e.check(N6e,L,ue)(k)}function L(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),U}function U(k){return k===null||ke(k)?B(k):(e.enter("htmlFlowData"),I(k))}function K(k){return k===45?(e.consume(k),O):I(k)}function z(k){return k===47?(e.consume(k),a="",ae):I(k)}function ae(k){if(k===62){let be=a.toLowerCase();return ND.includes(be)?(e.consume(k),J):I(k)}return Do(k)&&a.length<8?(e.consume(k),a+=String.fromCharCode(k),ae):I(k)}function ie(k){return k===93?(e.consume(k),O):I(k)}function O(k){return k===62?(e.consume(k),J):k===45&&o===2?(e.consume(k),O):I(k)}function J(k){return k===null||ke(k)?(e.exit("htmlFlowData"),ue(k)):(e.consume(k),J)}function ue(k){return e.exit("htmlFlow"),t(k)}}function F6e(e,t,r){let n=this;return o;function o(a){return ke(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):r(a)}function i(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}function M6e(e,t,r){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(gl,t,r)}}var BD={name:"htmlText",tokenize:$6e};function $6e(e,t,r){let n=this,o,i,a;return s;function s(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),l}function l(O){return O===33?(e.consume(O),u):O===47?(e.consume(O),C):O===63?(e.consume(O),b):Do(O)?(e.consume(O),N):r(O)}function u(O){return O===45?(e.consume(O),c):O===91?(e.consume(O),i=0,v):Do(O)?(e.consume(O),m):r(O)}function c(O){return O===45?(e.consume(O),p):r(O)}function f(O){return O===null?r(O):O===45?(e.consume(O),d):ke(O)?(a=f,z(O)):(e.consume(O),f)}function d(O){return O===45?(e.consume(O),p):f(O)}function p(O){return O===62?K(O):O===45?d(O):f(O)}function v(O){let J="CDATA[";return O===J.charCodeAt(i++)?(e.consume(O),i===J.length?h:v):r(O)}function h(O){return O===null?r(O):O===93?(e.consume(O),y):ke(O)?(a=h,z(O)):(e.consume(O),h)}function y(O){return O===93?(e.consume(O),g):h(O)}function g(O){return O===62?K(O):O===93?(e.consume(O),g):h(O)}function m(O){return O===null||O===62?K(O):ke(O)?(a=m,z(O)):(e.consume(O),m)}function b(O){return O===null?r(O):O===63?(e.consume(O),E):ke(O)?(a=b,z(O)):(e.consume(O),b)}function E(O){return O===62?K(O):b(O)}function C(O){return Do(O)?(e.consume(O),x):r(O)}function x(O){return O===45||Un(O)?(e.consume(O),x):P(O)}function P(O){return ke(O)?(a=P,z(O)):at(O)?(e.consume(O),P):K(O)}function N(O){return O===45||Un(O)?(e.consume(O),N):O===47||O===62||_r(O)?D(O):r(O)}function D(O){return O===47?(e.consume(O),K):O===58||O===95||Do(O)?(e.consume(O),R):ke(O)?(a=D,z(O)):at(O)?(e.consume(O),D):K(O)}function R(O){return O===45||O===46||O===58||O===95||Un(O)?(e.consume(O),R):M(O)}function M(O){return O===61?(e.consume(O),I):ke(O)?(a=M,z(O)):at(O)?(e.consume(O),M):D(O)}function I(O){return O===null||O===60||O===61||O===62||O===96?r(O):O===34||O===39?(e.consume(O),o=O,B):ke(O)?(a=I,z(O)):at(O)?(e.consume(O),I):(e.consume(O),L)}function B(O){return O===o?(e.consume(O),o=void 0,U):O===null?r(O):ke(O)?(a=B,z(O)):(e.consume(O),B)}function L(O){return O===null||O===34||O===39||O===60||O===61||O===96?r(O):O===47||O===62||_r(O)?D(O):(e.consume(O),L)}function U(O){return O===47||O===62||_r(O)?D(O):r(O)}function K(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):r(O)}function z(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),ae}function ae(O){return at(O)?st(e,ie,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):ie(O)}function ie(O){return e.enter("htmlTextData"),a(O)}}var Uu={name:"labelEnd",resolveAll:z6e,resolveTo:V6e,tokenize:H6e},U6e={tokenize:W6e},j6e={tokenize:G6e},q6e={tokenize:K6e};function z6e(e){let t=-1,r=[];for(;++t<e.length;){let n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){let o=n.type==="labelImage"?4:2;n.type="data",t+=o}}return e.length!==r.length&&an(e,0,e.length,r),e}function V6e(e,t){let r=e.length,n=0,o,i,a,s;for(;r--;)if(o=e[r][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[r][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[r][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=r,o.type!=="labelLink")){n=2;break}}else o.type==="labelEnd"&&(a=r);let l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},c={type:"labelText",start:{...e[i+n+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",l,t],["enter",u,t]],s=$n(s,e.slice(i+1,i+n+3)),s=$n(s,[["enter",c,t]]),s=$n(s,Tf(t.parser.constructs.insideSpan.null,e.slice(i+n+4,a-3),t)),s=$n(s,[["exit",c,t],e[a-2],e[a-1],["exit",u,t]]),s=$n(s,e.slice(a+1)),s=$n(s,[["exit",l,t]]),an(e,i,e.length,s),e}function H6e(e,t,r){let n=this,o=n.events.length,i,a;for(;o--;)if((n.events[o][1].type==="labelImage"||n.events[o][1].type==="labelLink")&&!n.events[o][1]._balanced){i=n.events[o][1];break}return s;function s(d){return i?i._inactive?f(d):(a=n.parser.defined.includes(ss(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),l):r(d)}function l(d){return d===40?e.attempt(U6e,c,a?c:f)(d):d===91?e.attempt(j6e,c,a?u:f)(d):a?c(d):f(d)}function u(d){return e.attempt(q6e,c,f)(d)}function c(d){return t(d)}function f(d){return i._balanced=!0,r(d)}}function W6e(e,t,r){return n;function n(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),o}function o(f){return _r(f)?$u(e,i)(f):i(f)}function i(f){return f===41?c(f):sx(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return _r(f)?$u(e,l)(f):c(f)}function s(f){return r(f)}function l(f){return f===34||f===39||f===40?ux(e,u,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function u(f){return _r(f)?$u(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):r(f)}}function G6e(e,t,r){let n=this;return o;function o(s){return lx.call(n,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return n.parser.defined.includes(ss(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function a(s){return r(s)}}function K6e(e,t,r){return n;function n(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):r(i)}}var FD={name:"labelStartImage",resolveAll:Uu.resolveAll,tokenize:Y6e};function Y6e(e,t,r){let n=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):r(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}var MD={name:"labelStartLink",resolveAll:Uu.resolveAll,tokenize:X6e};function X6e(e,t,r){let n=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):t(a)}}var wh={name:"lineEnding",tokenize:Z6e};function Z6e(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),st(e,t,"linePrefix")}}var ju={name:"thematicBreak",tokenize:Q6e};function Q6e(e,t,r){let n=0,o;return i;function i(u){return e.enter("thematicBreak"),a(u)}function a(u){return o=u,s(u)}function s(u){return u===o?(e.enter("thematicBreakSequence"),l(u)):n>=3&&(u===null||ke(u))?(e.exit("thematicBreak"),t(u)):r(u)}function l(u){return u===o?(e.consume(u),n++,l):(e.exit("thematicBreakSequence"),at(u)?st(e,s,"whitespace")(u):s(u))}}var Sn={continuation:{tokenize:r5e},exit:o5e,name:"list",tokenize:t5e},J6e={partial:!0,tokenize:i5e},e5e={partial:!0,tokenize:n5e};function t5e(e,t,r){let n=this,o=n.events[n.events.length-1],i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(p){let v=n.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!n.containerState.marker||p===n.containerState.marker:yh(p)){if(n.containerState.type||(n.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(ju,r,u)(p):u(p);if(!n.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return r(p)}function l(p){return yh(p)&&++a<10?(e.consume(p),l):(!n.interrupt||a<2)&&(n.containerState.marker?p===n.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):r(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||p,e.check(gl,n.interrupt?r:c,e.attempt(J6e,d,f))}function c(p){return n.containerState.initialBlankLine=!0,i++,d(p)}function f(p){return at(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):r(p)}function d(p){return n.containerState.size=i+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function r5e(e,t,r){let n=this;return n.containerState._closeFlow=void 0,e.check(gl,o,i);function o(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,st(e,t,"listItemIndent",n.containerState.size+1)(s)}function i(s){return n.containerState.furtherBlankLines||!at(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(e5e,t,a)(s))}function a(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,st(e,e.attempt(Sn,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function n5e(e,t,r){let n=this;return st(e,o,"listItemIndent",n.containerState.size+1);function o(i){let a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(i):r(i)}}function o5e(e){e.exit(this.containerState.type)}function i5e(e,t,r){let n=this;return st(e,o,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){let a=n.events[n.events.length-1];return!at(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):r(i)}}var cx={name:"setextUnderline",resolveTo:a5e,tokenize:s5e};function a5e(e,t){let r=e.length,n,o,i;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&e.splice(r,1),!i&&e[r][1].type==="definition"&&(i=r);let a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=a,e.push(["exit",a,t]),e}function s5e(e,t,r){let n=this,o;return i;function i(u){let c=n.events.length,f;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){f=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||f)?(e.enter("setextHeadingLine"),o=u,a(u)):r(u)}function a(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===o?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),at(u)?st(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||ke(u)?(e.exit("setextHeadingLine"),t(u)):r(u)}}var FQ={tokenize:l5e};function l5e(e){let t=this,r=e.attempt(gl,n,e.attempt(this.parser.constructs.flowInitial,o,st(e,e.attempt(this.parser.constructs.flow,o,e.attempt(kD,o)),"linePrefix")));return r;function n(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,r}}var MQ={resolveAll:qQ()},$Q=jQ("string"),UQ=jQ("text");function jQ(e){return{resolveAll:qQ(e==="text"?u5e:void 0),tokenize:t};function t(r){let n=this,o=this.parser.constructs[e],i=r.attempt(o,a,s);return a;function a(c){return u(c)?i(c):s(c)}function s(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),l}function l(c){return u(c)?(r.exit("data"),i(c)):(r.consume(c),l)}function u(c){if(c===null)return!0;let f=o[c],d=-1;if(f)for(;++d<f.length;){let p=f[d];if(!p.previous||p.previous.call(n,n.previous))return!0}return!1}}}function qQ(e){return t;function t(r,n){let o=-1,i;for(;++o<=r.length;)i===void 0?r[o]&&r[o][1].type==="data"&&(i=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==i+2&&(r[i][1].end=r[o-1][1].end,r.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(r,n):r}}function u5e(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let n=e[r-1][1],o=t.sliceStream(n),i=o.length,a=-1,s=0,l;for(;i--;){let u=o[i];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(u===-2)l=!0,s++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(s=0),s){let u={type:r===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:n.start._bufferIndex+a,_index:n.start._index+i,line:n.end.line,column:n.end.column-s,offset:n.end.offset-s},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):(e.splice(r,0,["enter",u,t],["exit",u,t]),r+=2)}r++}return e}var $D={};jI($D,{attentionMarkers:()=>v5e,contentInitial:()=>d5e,disable:()=>y5e,document:()=>c5e,flow:()=>p5e,flowInitial:()=>f5e,insideSpan:()=>h5e,string:()=>m5e,text:()=>g5e});var c5e={42:Sn,43:Sn,45:Sn,48:Sn,49:Sn,50:Sn,51:Sn,52:Sn,53:Sn,54:Sn,55:Sn,56:Sn,57:Sn,62:tx},d5e={91:OD},f5e={[-2]:Eh,[-1]:Eh,32:Eh},p5e={35:RD,42:ju,45:[cx,ju],60:LD,61:cx,95:ju,96:ox,126:ox},m5e={38:nx,92:rx},g5e={[-5]:wh,[-4]:wh,[-3]:wh,33:FD,38:nx,42:bh,60:[AD,BD],91:MD,92:[ID,rx],93:Uu,95:bh,96:DD},h5e={null:[bh,MQ]},v5e={null:[42,95]},y5e={null:[]};function zQ(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0},o={},i=[],a=[],s=[],l=!0,u={attempt:D(P),check:D(N),consume:E,enter:C,exit:x,interrupt:D(N,{interrupt:!0})},c={code:null,containerState:{},defineSkip:g,events:[],now:y,parser:e,previous:null,sliceSerialize:v,sliceStream:h,write:p},f=t.tokenize.call(c,u),d;return t.resolveAll&&i.push(t),c;function p(B){return a=$n(a,B),m(),a[a.length-1]!==null?[]:(R(t,0),c.events=Tf(i,c.events,c),c.events)}function v(B,L){return E5e(h(B),L)}function h(B){return b5e(a,B)}function y(){let{_bufferIndex:B,_index:L,line:U,column:K,offset:z}=n;return{_bufferIndex:B,_index:L,line:U,column:K,offset:z}}function g(B){o[B.line]=B.column,I()}function m(){let B;for(;n._index<a.length;){let L=a[n._index];if(typeof L=="string")for(B=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===B&&n._bufferIndex<L.length;)b(L.charCodeAt(n._bufferIndex));else b(L)}}function b(B){l=void 0,d=B,f=f(B)}function E(B){ke(B)?(n.line++,n.column=1,n.offset+=B===-3?2:1,I()):B!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=B,l=!0}function C(B,L){let U=L||{};return U.type=B,U.start=y(),c.events.push(["enter",U,c]),s.push(U),U}function x(B){let L=s.pop();return L.end=y(),c.events.push(["exit",L,c]),L}function P(B,L){R(B,L.from)}function N(B,L){L.restore()}function D(B,L){return U;function U(K,z,ae){let ie,O,J,ue;return Array.isArray(K)?be(K):"tokenize"in K?be([K]):k(K);function k(je){return G;function G(ne){let te=ne!==null&&je[ne],ce=ne!==null&&je.null,w=[...Array.isArray(te)?te:te?[te]:[],...Array.isArray(ce)?ce:ce?[ce]:[]];return be(w)(ne)}}function be(je){return ie=je,O=0,je.length===0?ae:Oe(je[O])}function Oe(je){return G;function G(ne){return ue=M(),J=je,je.partial||(c.currentConstruct=je),je.name&&c.parser.constructs.disable.null.includes(je.name)?Ke(ne):je.tokenize.call(L?Object.assign(Object.create(c),L):c,u,Te,Ke)(ne)}}function Te(je){return l=!0,B(J,ue),z}function Ke(je){return l=!0,ue.restore(),++O<ie.length?Oe(ie[O]):ae}}}function R(B,L){B.resolveAll&&!i.includes(B)&&i.push(B),B.resolve&&an(c.events,L,c.events.length-L,B.resolve(c.events.slice(L),c)),B.resolveTo&&(c.events=B.resolveTo(c.events,c))}function M(){let B=y(),L=c.previous,U=c.currentConstruct,K=c.events.length,z=Array.from(s);return{from:K,restore:ae};function ae(){n=B,c.previous=L,c.currentConstruct=U,c.events.length=K,s=z,I()}}function I(){n.line in o&&n.column<2&&(n.column=o[n.line],n.offset+=o[n.line]-1)}}function b5e(e,t){let r=t.start._index,n=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex,a;if(r===o)a=[e[r].slice(n,i)];else{if(a=e.slice(r,o),n>-1){let s=a[0];typeof s=="string"?a[0]=s.slice(n):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function E5e(e,t){let r=-1,n=[],o;for(;++r<e.length;){let i=e[r],a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
|
|
43
|
-
`;break}case-3:{a=`\r
|
|
44
|
-
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,n.push(a)}return n.join("")}function UD(e){let n={constructs:SQ([$D,...(e||{}).extensions||[]]),content:o(OQ),defined:[],document:o(RQ),flow:o(FQ),lazy:{},string:o($Q),text:o(UQ)};return n;function o(i){return a;function a(s){return zQ(n,i,s)}}}function jD(e){for(;!ax(e););return e}var VQ=/[\0\t\n\r]/g;function qD(){let e=1,t="",r=!0,n;return o;function o(i,a,s){let l=[],u,c,f,d,p;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),f=0,t="",r&&(i.charCodeAt(0)===65279&&f++,r=void 0);f<i.length;){if(VQ.lastIndex=f,u=VQ.exec(i),d=u&&u.index!==void 0?u.index:i.length,p=i.charCodeAt(d),!u){t=i.slice(f);break}if(p===10&&f===d&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),f<d&&(l.push(i.slice(f,d)),e+=d-f),p){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:n=!0,e=1}f=d+1}return s&&(n&&l.push(-5),t&&l.push(t),l.push(null)),l}}var x5e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function HQ(e){return e.replace(x5e,w5e)}function w5e(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let o=r.charCodeAt(1),i=o===120||o===88;return ex(r.slice(i?2:1),i?16:10)}return Sf(r)||e}function hl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?WQ(e.position):"start"in e||"end"in e?WQ(e):"line"in e||"column"in e?zD(e):""}function zD(e){return GQ(e&&e.line)+":"+GQ(e&&e.column)}function WQ(e){return zD(e&&e.start)+"-"+zD(e&&e.end)}function GQ(e){return e&&typeof e=="number"?e:1}var YQ={}.hasOwnProperty;function VD(e,t,r){return typeof t!="string"&&(r=t,t=void 0),_5e(r)(jD(UD(r).document().write(qD()(e,t,!0))))}function _5e(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Ye),autolinkProtocol:D,autolinkEmail:D,atxHeading:i($),blockQuote:i(ne),characterEscape:D,characterReference:D,codeFenced:i(te),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(te,a),codeText:i(ce,a),codeTextData:D,data:D,codeFlowValue:D,definition:i(w),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(A),hardBreakEscape:i(H),hardBreakTrailing:i(H),htmlFlow:i(he,a),htmlFlowData:D,htmlText:i(he,a),htmlTextData:D,image:i(Ae),label:a,link:i(Ye),listItem:i(Dt),listItemValue:d,listOrdered:i(At,f),listUnordered:i(At),paragraph:i(lr),reference:k,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i($),strong:i(fo),thematicBreak:i(po)},exit:{atxHeading:l(),atxHeadingSequence:C,autolink:l(),autolinkEmail:G,autolinkProtocol:je,blockQuote:l(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:Oe,characterReferenceMarkerNumeric:Oe,characterReferenceValue:Te,characterReference:Ke,codeFenced:l(y),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:v,codeFlowValue:R,codeIndented:l(g),codeText:l(U),codeTextData:R,data:R,definition:l(),definitionDestinationString:E,definitionLabelString:m,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(I),hardBreakTrailing:l(I),htmlFlow:l(B),htmlFlowData:R,htmlText:l(L),htmlTextData:R,image:l(z),label:ie,labelText:ae,lineEnding:M,link:l(K),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:be,resourceDestinationString:O,resourceTitleString:J,resource:ue,setextHeading:l(N),setextHeadingLineSequence:P,setextHeadingText:x,strong:l(),thematicBreak:l()}};XQ(t,(e||{}).mdastExtensions||[]);let r={};return n;function n(ee){let fe={type:"root",children:[]},Ie={stack:[fe],tokenStack:[],config:t,enter:s,exit:u,buffer:a,resume:c,data:r},Me=[],Ct=-1;for(;++Ct<ee.length;)if(ee[Ct][1].type==="listOrdered"||ee[Ct][1].type==="listUnordered")if(ee[Ct][0]==="enter")Me.push(Ct);else{let ln=Me.pop();Ct=o(ee,ln,Ct)}for(Ct=-1;++Ct<ee.length;){let ln=t[ee[Ct][0]];YQ.call(ln,ee[Ct][1].type)&&ln[ee[Ct][1].type].call(Object.assign({sliceSerialize:ee[Ct][2].sliceSerialize},Ie),ee[Ct][1])}if(Ie.tokenStack.length>0){let ln=Ie.tokenStack[Ie.tokenStack.length-1];(ln[1]||KQ).call(Ie,void 0,ln[0])}for(fe.position={start:vl(ee.length>0?ee[0][1].start:{line:1,column:1,offset:0}),end:vl(ee.length>0?ee[ee.length-2][1].end:{line:1,column:1,offset:0})},Ct=-1;++Ct<t.transforms.length;)fe=t.transforms[Ct](fe)||fe;return fe}function o(ee,fe,Ie){let Me=fe-1,Ct=-1,ln=!1,Fo,un,rr,mo;for(;++Me<=Ie;){let hr=ee[Me];switch(hr[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{hr[0]==="enter"?Ct++:Ct--,mo=void 0;break}case"lineEndingBlank":{hr[0]==="enter"&&(Fo&&!mo&&!Ct&&!rr&&(rr=Me),mo=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:mo=void 0}if(!Ct&&hr[0]==="enter"&&hr[1].type==="listItemPrefix"||Ct===-1&&hr[0]==="exit"&&(hr[1].type==="listUnordered"||hr[1].type==="listOrdered")){if(Fo){let vi=Me;for(un=void 0;vi--;){let yi=ee[vi];if(yi[1].type==="lineEnding"||yi[1].type==="lineEndingBlank"){if(yi[0]==="exit")continue;un&&(ee[un][1].type="lineEndingBlank",ln=!0),yi[1].type="lineEnding",un=vi}else if(!(yi[1].type==="linePrefix"||yi[1].type==="blockQuotePrefix"||yi[1].type==="blockQuotePrefixWhitespace"||yi[1].type==="blockQuoteMarker"||yi[1].type==="listItemIndent"))break}rr&&(!un||rr<un)&&(Fo._spread=!0),Fo.end=Object.assign({},un?ee[un][1].start:hr[1].end),ee.splice(un||Me,0,["exit",Fo,hr[2]]),Me++,Ie++}if(hr[1].type==="listItemPrefix"){let vi={type:"listItem",_spread:!1,start:Object.assign({},hr[1].start),end:void 0};Fo=vi,ee.splice(Me,0,["enter",vi,hr[2]]),Me++,Ie++,rr=void 0,mo=!0}}}return ee[fe][1]._spread=ln,Ie}function i(ee,fe){return Ie;function Ie(Me){s.call(this,ee(Me),Me),fe&&fe.call(this,Me)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(ee,fe,Ie){this.stack[this.stack.length-1].children.push(ee),this.stack.push(ee),this.tokenStack.push([fe,Ie||void 0]),ee.position={start:vl(fe.start),end:void 0}}function l(ee){return fe;function fe(Ie){ee&&ee.call(this,Ie),u.call(this,Ie)}}function u(ee,fe){let Ie=this.stack.pop(),Me=this.tokenStack.pop();if(Me)Me[0].type!==ee.type&&(fe?fe.call(this,ee,Me[0]):(Me[1]||KQ).call(this,ee,Me[0]));else throw new Error("Cannot close `"+ee.type+"` ("+hl({start:ee.start,end:ee.end})+"): it\u2019s not open");Ie.position.end=vl(ee.end)}function c(){return TD(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(ee){if(this.data.expectingFirstListItemValue){let fe=this.stack[this.stack.length-2];fe.start=Number.parseInt(this.sliceSerialize(ee),10),this.data.expectingFirstListItemValue=void 0}}function p(){let ee=this.resume(),fe=this.stack[this.stack.length-1];fe.lang=ee}function v(){let ee=this.resume(),fe=this.stack[this.stack.length-1];fe.meta=ee}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){let ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){let ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee.replace(/(\r?\n|\r)$/g,"")}function m(ee){let fe=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=fe,Ie.identifier=ss(this.sliceSerialize(ee)).toLowerCase()}function b(){let ee=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ee}function E(){let ee=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ee}function C(ee){let fe=this.stack[this.stack.length-1];if(!fe.depth){let Ie=this.sliceSerialize(ee).length;fe.depth=Ie}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function P(ee){let fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(ee).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function D(ee){let Ie=this.stack[this.stack.length-1].children,Me=Ie[Ie.length-1];(!Me||Me.type!=="text")&&(Me=Bo(),Me.position={start:vl(ee.start),end:void 0},Ie.push(Me)),this.stack.push(Me)}function R(ee){let fe=this.stack.pop();fe.value+=this.sliceSerialize(ee),fe.position.end=vl(ee.end)}function M(ee){let fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Ie=fe.children[fe.children.length-1];Ie.position.end=vl(ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(fe.type)&&(D.call(this,ee),R.call(this,ee))}function I(){this.data.atHardBreak=!0}function B(){let ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function L(){let ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function U(){let ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function K(){let ee=this.stack[this.stack.length-1];if(this.data.inReference){let fe=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=fe,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function z(){let ee=this.stack[this.stack.length-1];if(this.data.inReference){let fe=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=fe,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function ae(ee){let fe=this.sliceSerialize(ee),Ie=this.stack[this.stack.length-2];Ie.label=HQ(fe),Ie.identifier=ss(fe).toLowerCase()}function ie(){let ee=this.stack[this.stack.length-1],fe=this.resume(),Ie=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ie.type==="link"){let Me=ee.children;Ie.children=Me}else Ie.alt=fe}function O(){let ee=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ee}function J(){let ee=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ee}function ue(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function be(ee){let fe=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=fe,Ie.identifier=ss(this.sliceSerialize(ee)).toLowerCase(),this.data.referenceType="full"}function Oe(ee){this.data.characterReferenceType=ee.type}function Te(ee){let fe=this.sliceSerialize(ee),Ie=this.data.characterReferenceType,Me;Ie?(Me=ex(fe,Ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Me=Sf(fe);let Ct=this.stack[this.stack.length-1];Ct.value+=Me}function Ke(ee){let fe=this.stack.pop();fe.position.end=vl(ee.end)}function je(ee){R.call(this,ee);let fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(ee)}function G(ee){R.call(this,ee);let fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(ee)}function ne(){return{type:"blockquote",children:[]}}function te(){return{type:"code",lang:null,meta:null,value:""}}function ce(){return{type:"inlineCode",value:""}}function w(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function A(){return{type:"emphasis",children:[]}}function $(){return{type:"heading",depth:0,children:[]}}function H(){return{type:"break"}}function he(){return{type:"html",value:""}}function Ae(){return{type:"image",title:null,url:"",alt:null}}function Ye(){return{type:"link",title:null,url:"",children:[]}}function At(ee){return{type:"list",ordered:ee.type==="listOrdered",start:null,spread:ee._spread,children:[]}}function Dt(ee){return{type:"listItem",spread:ee._spread,checked:null,children:[]}}function lr(){return{type:"paragraph",children:[]}}function fo(){return{type:"strong",children:[]}}function Bo(){return{type:"text",value:""}}function po(){return{type:"thematicBreak"}}}function vl(e){return{line:e.line,column:e.column,offset:e.offset}}function XQ(e,t){let r=-1;for(;++r<t.length;){let n=t[r];Array.isArray(n)?XQ(e,n):C5e(e,n)}}function C5e(e,t){let r;for(r in t)if(YQ.call(t,r))switch(r){case"canContainEols":{let n=t[r];n&&e[r].push(...n);break}case"transforms":{let n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{let n=t[r];n&&Object.assign(e[r],n);break}}}function KQ(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+hl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+hl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+hl({start:t.start,end:t.end})+") is still open")}function Pf(e){let t=this;t.parser=r;function r(n){return VD(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function HD(e){if(e)throw e}var px=de(iJ(),1);function _h(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function WD(){let e=[],t={run:r,use:n};return t;function r(...o){let i=-1,a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...o);function s(l,...u){let c=e[++i],f=-1;if(l){a(l);return}for(;++f<o.length;)(u[f]===null||u[f]===void 0)&&(u[f]=o[f]);o=u,c?aJ(c,s)(...u):a(null,...u)}}function n(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function aJ(e,t){let r;return n;function n(...a){let s=e.length>a.length,l;s&&a.push(o);try{l=e.apply(this,a)}catch(u){let c=u;if(s&&r)throw c;return o(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(i,o):l instanceof Error?o(l):i(l))}function o(a,...s){r||(r=!0,t(a,...s))}function i(a){o(null,a)}}var Kr=class extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let o="",i={},a=!1;if(r&&("line"in r&&"column"in r?i={place:r}:"start"in r&&"end"in r?i={place:r}:"type"in r?i={ancestors:[r],place:r.position}:i={...r}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof n=="string"){let l=n.indexOf(":");l===-1?i.ruleId=n:(i.source=n.slice(0,l),i.ruleId=n.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){let l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}let s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=s?s.line:void 0,this.name=hl(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Kr.prototype.file="";Kr.prototype.name="";Kr.prototype.reason="";Kr.prototype.message="";Kr.prototype.stack="";Kr.prototype.column=void 0;Kr.prototype.line=void 0;Kr.prototype.ancestors=void 0;Kr.prototype.cause=void 0;Kr.prototype.fatal=void 0;Kr.prototype.place=void 0;Kr.prototype.ruleId=void 0;Kr.prototype.source=void 0;var $i={basename:S5e,dirname:T5e,extname:P5e,join:A5e,sep:"/"};function S5e(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ch(e);let r=0,n=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){r=o+1;break}}else n<0&&(i=!0,n=o+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){r=o+1;break}}else a<0&&(i=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(n=o):(s=-1,n=a));return r===n?n=a:n<0&&(n=e.length),e.slice(r,n)}function T5e(e){if(Ch(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function P5e(e){Ch(e);let t=e.length,r=-1,n=0,o=-1,i=0,a;for(;t--;){let s=e.codePointAt(t);if(s===47){if(a){n=t+1;break}continue}r<0&&(a=!0,r=t+1),s===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||r<0||i===0||i===1&&o===r-1&&o===n+1?"":e.slice(o,r)}function A5e(...e){let t=-1,r;for(;++t<e.length;)Ch(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":D5e(r)}function D5e(e){Ch(e);let t=e.codePointAt(0)===47,r=k5e(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function k5e(e,t){let r="",n=0,o=-1,i=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(o===a-1||i===1))if(o!==a-1&&i===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),o=a,i=0;continue}}else if(r.length>0){r="",n=0,o=a,i=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(o+1,a):r=e.slice(o+1,a),n=a-o-1;o=a,i=0}else s===46&&i>-1?i++:i=-1}return r}function Ch(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var sJ={cwd:O5e};function O5e(){return"/"}function Af(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function lJ(e){if(typeof e=="string")e=new URL(e);else if(!Af(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){let t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return I5e(e)}function I5e(e){if(e.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let t=e.pathname,r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){let n=t.codePointAt(r+2);if(n===70||n===102){let o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}var GD=["history","path","basename","stem","extname","dirname"],Sh=class{constructor(t){let r;t?Af(t)?r={path:t}:typeof t=="string"||R5e(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":sJ.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<GD.length;){let i=GD[n];i in r&&r[i]!==void 0&&r[i]!==null&&(this[i]=i==="history"?[...r[i]]:r[i])}let o;for(o in r)GD.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?$i.basename(this.path):void 0}set basename(t){YD(t,"basename"),KD(t,"basename"),this.path=$i.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?$i.dirname(this.path):void 0}set dirname(t){uJ(this.basename,"dirname"),this.path=$i.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?$i.extname(this.path):void 0}set extname(t){if(KD(t,"extname"),uJ(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=$i.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Af(t)&&(t=lJ(t)),YD(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?$i.basename(this.path,this.extname):void 0}set stem(t){YD(t,"stem"),KD(t,"stem"),this.path=$i.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){let o=this.message(t,r,n);throw o.fatal=!0,o}info(t,r,n){let o=this.message(t,r,n);return o.fatal=void 0,o}message(t,r,n){let o=new Kr(t,r,n);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}};function KD(e,t){if(e&&e.includes($i.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+$i.sep+"`")}function YD(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function uJ(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function R5e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var cJ=(function(e){let n=this.constructor.prototype,o=n[e],i=function(){return o.apply(i,arguments)};Object.setPrototypeOf(i,n);let a=Object.getOwnPropertyNames(o);for(let s of a){let l=Object.getOwnPropertyDescriptor(o,s);l&&Object.defineProperty(i,s,l)}return i});var N5e={}.hasOwnProperty,JD=class e extends cJ{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=WD()}copy(){let t=new e,r=-1;for(;++r<this.attachers.length;){let n=this.attachers[r];t.use(...n)}return t.data((0,px.default)(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(QD("data",this.frozen),this.namespace[t]=r,this):N5e.call(this.namespace,t)&&this.namespace[t]||void 0:t?(QD("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=this;for(;++this.freezeIndex<this.attachers.length;){let[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let o=r.call(t,...n);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let r=fx(t),n=this.parser||this.Parser;return XD("parse",n),n(String(r),r)}process(t,r){let n=this;return this.freeze(),XD("process",this.parser||this.Parser),ZD("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(i,a){let s=fx(t),l=n.parse(s);n.run(l,s,function(c,f,d){if(c||!f||!d)return u(c);let p=f,v=n.stringify(p,d);B5e(v)?d.value=v:d.result=v,u(c,d)});function u(c,f){c||!f?a(c):i?i(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),XD("processSync",this.parser||this.Parser),ZD("processSync",this.compiler||this.Compiler),this.process(t,o),fJ("processSync","process",r),n;function o(i,a){r=!0,HD(i),n=a}}run(t,r,n){dJ(t),this.freeze();let o=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?i(void 0,n):new Promise(i);function i(a,s){let l=fx(r);o.run(t,l,u);function u(c,f,d){let p=f||t;c?s(c):a?a(p):n(void 0,p,d)}}}runSync(t,r){let n=!1,o;return this.run(t,r,i),fJ("runSync","run",n),o;function i(a,s){HD(a),o=s,n=!0}}stringify(t,r){this.freeze();let n=fx(r),o=this.compiler||this.Compiler;return ZD("stringify",o),dJ(t),o(t,n)}use(t,...r){let n=this.attachers,o=this.namespace;if(QD("use",this.frozen),t!=null)if(typeof t=="function")l(t,r);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){let[c,...f]=u;l(c,f)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(o.settings=(0,px.default)(!0,o.settings,u.settings))}function s(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){let f=u[c];i(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let f=-1,d=-1;for(;++f<n.length;)if(n[f][0]===u){d=f;break}if(d===-1)n.push([u,...c]);else if(c.length>0){let[p,...v]=c,h=n[d][1];_h(h)&&_h(p)&&(p=(0,px.default)(!0,h,p)),n[d]=[u,p,...v]}}}},Th=new JD().freeze();function XD(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ZD(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function QD(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function dJ(e){if(!_h(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function fJ(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function fx(e){return L5e(e)?e:new Sh(e)}function L5e(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function B5e(e){return typeof e=="string"||F5e(e)}function F5e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var pJ=["emphasis","strong","delete","inlineCode","html","text"];var mJ=(e,t,r)=>{let{elementRules:n}=r,{type:o}=e,i=n[o];return i?i.transform(e,t,r):[]};var ek="bold",M5e=He({key:ek,isLeaf:!0,deserializeHtml:{rules:[{validNodeName:["STRONG","B"]},{validStyle:{fontWeight:["600","700","bold"]}}],query:e=>!dl(e,t=>t.style.fontWeight==="normal")},handlers:{onKeyDown:io},options:{hotkey:"mod+b"}}),tk="code",$5e=He({key:tk,isLeaf:!0,deserializeHtml:{rules:[{validNodeName:["CODE"]},{validStyle:{fontFamily:"Consolas"}}],query(e){let t=r0(e,"P");return(t==null?void 0:t.style.fontFamily)==="Consolas"?!1:!r0(e,"PRE")}},handlers:{onKeyDown:io},options:{hotkey:"mod+e"}}),rk="italic",U5e=He({key:rk,isLeaf:!0,handlers:{onKeyDown:io},options:{hotkey:"mod+i"},deserializeHtml:{rules:[{validNodeName:["EM","I"]},{validStyle:{fontStyle:"italic"}}],query:e=>!dl(e,t=>t.style.fontStyle==="normal")}}),j5e="strikethrough",q5e=He({key:j5e,isLeaf:!0,handlers:{onKeyDown:io},options:{hotkey:"mod+shift+x"},deserializeHtml:{rules:[{validNodeName:["S","DEL","STRIKE"]},{validStyle:{textDecoration:"line-through"}}],query:e=>!dl(e,t=>t.style.textDecoration==="none")}}),z5e="subscript",V5e="superscript",H5e=He({key:z5e,isLeaf:!0,handlers:{onKeyDown:io},options:{hotkey:"mod+,",clear:V5e},deserializeHtml:{rules:[{validNodeName:["SUB"]},{validStyle:{verticalAlign:"sub"}}]}}),W5e="superscript",G5e="subscript",K5e=He({key:W5e,isLeaf:!0,handlers:{onKeyDown:io},options:{hotkey:"mod+.",clear:G5e},deserializeHtml:{rules:[{validNodeName:["SUP"]},{validStyle:{verticalAlign:"super"}}]}}),Y5e="underline",X5e=He({key:Y5e,isLeaf:!0,handlers:{onKeyDown:io},options:{hotkey:"mod+u"},deserializeHtml:{rules:[{validNodeName:["U"]},{validStyle:{textDecoration:["underline"]}}],query:e=>!dl(e,t=>t.style.textDecoration==="none")}}),e_t=He({key:"basicMarks",plugins:[M5e(),$5e(),U5e(),q5e(),H5e(),K5e(),X5e()]});var mx={text:{},emphasis:{mark:({editor:e})=>re(e,rk)},strong:{mark:({editor:e})=>re(e,ek)},inlineCode:{mark:({editor:e})=>re(e,tk)},html:{transform:e=>e.replace(/<br>/g,`
|
|
45
|
-
`)}};var nk=(e,t,r={})=>{let{editor:n,textRules:o}=t,{type:i,value:a,children:s}=e,l=o[i]||mx.text,{mark:u,transform:c=v=>v}=l,f=u?{...r,[u({editor:n})]:!0}:r,d=(s==null?void 0:s.flatMap(v=>nk(v,t,f)))||[];return[...a||d.length===0?[{text:c(a||""),...f}]:[],...d]};var gx=(e,t,r)=>{let{type:n}=e;return pJ.includes(n)?nk(e,r):mJ(e,t,r)};function hx(e){let t=1,r=n=>n.children.flatMap(o=>{var a;let i=gx(o,t,e);return t=((a=o.position)==null?void 0:a.end.line)||t,i});this.Compiler=r}var ok="blockquote",g_t=He({key:ok,isElement:!0,deserializeHtml:{rules:[{validNodeName:"BLOCKQUOTE"}]},handlers:{onKeyDown:pl},options:{hotkey:"mod+shift+."}});var yJ=de(gJ(),1);Prism.languages.antlr4={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,string:{pattern:/'(?:\\.|[^\\'\r\n])*'/,greedy:!0},"character-class":{pattern:/\[(?:\\.|[^\\\]\r\n])*\]/,greedy:!0,alias:"regex",inside:{range:{pattern:/([^[]|(?:^|[^\\])(?:\\\\)*\\\[)-(?!\])/,lookbehind:!0,alias:"punctuation"},escape:/\\(?:u(?:[a-fA-F\d]{4}|\{[a-fA-F\d]+\})|[pP]\{[=\w-]+\}|[^\r\nupP])/,punctuation:/[\[\]]/}},action:{pattern:/\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\}/,greedy:!0,inside:{content:{pattern:/(\{)[\s\S]+(?=\})/,lookbehind:!0},punctuation:/[{}]/}},command:{pattern:/(->\s*(?!\s))(?:\s*(?:,\s*)?\b[a-z]\w*(?:\s*\([^()\r\n]*\))?)+(?=\s*;)/i,lookbehind:!0,inside:{function:/\b\w+(?=\s*(?:[,(]|$))/,punctuation:/[,()]/}},annotation:{pattern:/@\w+(?:::\w+)*/,alias:"keyword"},label:{pattern:/#[ \t]*\w+/,alias:"punctuation"},keyword:/\b(?:catch|channels|finally|fragment|grammar|import|lexer|locals|mode|options|parser|returns|throws|tokens)\b/,definition:[{pattern:/\b[a-z]\w*(?=\s*:)/,alias:["rule","class-name"]},{pattern:/\b[A-Z]\w*(?=\s*:)/,alias:["token","constant"]}],constant:/\b[A-Z][A-Z_]*\b/,operator:/\.\.|->|[|~]|[*+?]\??/,punctuation:/[;:()=]/};Prism.languages.g4=Prism.languages.antlr4;(function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=n.variable[1].inside,a=0;a<o.length;a++)i[o[a]]=e.languages.bash[o[a]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;Prism.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_NAME|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:FALSE|OFF|ON|TRUE)\b/,namespace:/\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,operator:/\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/};(function(e){var t=/#(?!\{).+/,r={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:r}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:r}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:r}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript})(Prism);(function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(Prism);(function(e){function t(ie,O){return ie.replace(/<<(\d+)>>/g,function(J,ue){return"(?:"+O[+ue]+")"})}function r(ie,O,J){return RegExp(t(ie,O),J||"")}function n(ie,O){for(var J=0;J<O;J++)ie=ie.replace(/<<self>>/g,function(){return"(?:"+ie+")"});return ie.replace(/<<self>>/g,"[^\\s\\S]")}var o={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function i(ie){return"\\b(?:"+ie.trim().replace(/ /g,"|")+")\\b"}var a=i(o.typeDeclaration),s=RegExp(i(o.type+" "+o.typeDeclaration+" "+o.contextual+" "+o.other)),l=i(o.typeDeclaration+" "+o.contextual+" "+o.other),u=i(o.type+" "+o.typeDeclaration+" "+o.other),c=n(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),f=n(/\((?:[^()]|<<self>>)*\)/.source,2),d=/@?\b[A-Za-z_]\w*\b/.source,p=t(/<<0>>(?:\s*<<1>>)?/.source,[d,c]),v=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[l,p]),h=/\[\s*(?:,\s*)*\]/.source,y=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[v,h]),g=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[c,f,h]),m=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[g]),b=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[m,v,h]),E={keyword:s,punctuation:/[<>()?,.:[\]]/},C=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,x=/"(?:\\.|[^\\"\r\n])*"/.source,P=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[P]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[x]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[v]),lookbehind:!0,inside:E},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[d,b]),lookbehind:!0,inside:E},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[d]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[a,p]),lookbehind:!0,inside:E},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[v]),lookbehind:!0,inside:E},{pattern:r(/(\bwhere\s+)<<0>>/.source,[d]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[y]),lookbehind:!0,inside:E},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[b,u,d]),inside:E}],keyword:s,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:r(/([(,]\s*)<<0>>(?=\s*:)/.source,[d]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[d]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[f]),lookbehind:!0,alias:"class-name",inside:E},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[b,v]),inside:E,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[b]),lookbehind:!0,inside:E,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[d,c]),inside:{function:r(/^<<0>>/.source,[d]),generic:{pattern:RegExp(c),alias:"class-name",inside:E}}},"type-list":{pattern:r(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[a,p,d,b,s.source,f,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[p,f]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:s,"class-name":{pattern:RegExp(b),greedy:!0,inside:E},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var N=x+"|"+C,D=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[N]),R=n(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[D]),2),M=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,I=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[v,R]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[M,I]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[M]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[R]),inside:e.languages.csharp},"class-name":{pattern:RegExp(v),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var B=/:[^}\r\n]+/.source,L=n(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[D]),2),U=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[L,B]),K=n(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[N]),2),z=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[K,B]);function ae(ie,O){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[ie]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[O,B]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[U]),lookbehind:!0,greedy:!0,inside:ae(U,L)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[z]),lookbehind:!0,greedy:!0,inside:ae(z,K)}],char:{pattern:RegExp(C),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp})(Prism);(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(Prism);(function(e){var t=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],r=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,n={pattern:RegExp(r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{"class-name":[n,{pattern:RegExp(r+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:n.inside}],keyword:t,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":n,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);(function(e){var t=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,r=/(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(/<SP_BS>/g,function(){return t}),n=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,o=/--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(/<STR>/g,function(){return n}),i={pattern:RegExp(n),greedy:!0},a={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function s(l,u){return l=l.replace(/<OPT>/g,function(){return o}).replace(/<SP>/g,function(){return r}),RegExp(l,u)}e.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:s(/(^(?:ONBUILD<SP>)?\w+<SP>)<OPT>(?:<SP><OPT>)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[i,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:s(/(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:s(/(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \t\\]+<SP>)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:s(/(^ONBUILD<SP>)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:a,string:i,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:a},e.languages.dockerfile=e.languages.docker})(Prism);Prism.languages.erlang={comment:/%.+/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},"quoted-function":{pattern:/'(?:\\.|[^\\'\r\n])+'(?=\()/,alias:"function"},"quoted-atom":{pattern:/'(?:\\.|[^\\'\r\n])+'/,alias:"atom"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:after|begin|case|catch|end|fun|if|of|receive|try|when)\b/,number:[/\$\\?./,/\b\d+#[a-z0-9]+/i,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i],function:/\b[a-z][\w@]*(?=\()/,variable:{pattern:/(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,lookbehind:!0},operator:[/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],atom:/\b[a-z][\w@]*/,punctuation:/[()[\]{}:;,.#|]|<<|>>/};Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m};Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/};Prism.hooks.add("after-tokenize",function(t){if(t.language!=="graphql")return;var r=t.tokens.filter(function(h){return typeof h!="string"&&h.type!=="comment"&&h.type!=="scalar"}),n=0;function o(h){return r[n+h]}function i(h,y){y=y||0;for(var g=0;g<h.length;g++){var m=o(g+y);if(!m||m.type!==h[g])return!1}return!0}function a(h,y){for(var g=1,m=n;m<r.length;m++){var b=r[m],E=b.content;if(b.type==="punctuation"&&typeof E=="string"){if(h.test(E))g++;else if(y.test(E)&&(g--,g===0))return m}}return-1}function s(h,y){var g=h.alias;g?Array.isArray(g)||(h.alias=g=[g]):h.alias=g=[],g.push(y)}for(;n<r.length;){var l=r[n++];if(l.type==="keyword"&&l.content==="mutation"){var u=[];if(i(["definition-mutation","punctuation"])&&o(1).content==="("){n+=2;var c=a(/^\($/,/^\)$/);if(c===-1)continue;for(;n<c;n++){var f=o(0);f.type==="variable"&&(s(f,"variable-input"),u.push(f.content))}n=c+1}if(i(["punctuation","property-query"])&&o(0).content==="{"&&(n++,s(o(0),"property-mutation"),u.length>0)){var d=a(/^\{$/,/^\}$/);if(d===-1)continue;for(var p=n;p<d;p++){var v=r[p];v.type==="variable"&&u.indexOf(v.content)>=0&&s(v,"variable-input")}}}}});(function(e){var t={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.groovy=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),t.inside.expression.inside=e.languages.groovy})(Prism);(function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,n={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[n,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:n.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:n.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":n,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:n.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:n.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(e){var t=e.util.clone(e.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,n=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function i(l,u){return l=l.replace(/<S>/g,function(){return r}).replace(/<BRACES>/g,function(){return n}).replace(/<SPREAD>/g,function(){return o}),RegExp(l,u)}o=i(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:i(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:i(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var a=function(l){return l?typeof l=="string"?l:typeof l.content=="string"?l.content:l.content.map(a).join(""):""},s=function(l){for(var u=[],c=0;c<l.length;c++){var f=l[c],d=!1;if(typeof f!="string"&&(f.type==="tag"&&f.content[0]&&f.content[0].type==="tag"?f.content[0].content[0].content==="</"?u.length>0&&u[u.length-1].tagName===a(f.content[0].content[1])&&u.pop():f.content[f.content.length-1].content==="/>"||u.push({tagName:a(f.content[0].content[1]),openedBraces:0}):u.length>0&&f.type==="punctuation"&&f.content==="{"?u[u.length-1].openedBraces++:u.length>0&&u[u.length-1].openedBraces>0&&f.type==="punctuation"&&f.content==="}"?u[u.length-1].openedBraces--:d=!0),(d||typeof f=="string")&&u.length>0&&u[u.length-1].openedBraces===0){var p=a(f);c<l.length-1&&(typeof l[c+1]=="string"||l[c+1].type==="plain-text")&&(p+=a(l[c+1]),l.splice(c+1,1)),c>0&&(typeof l[c-1]=="string"||l[c-1].type==="plain-text")&&(p=a(l[c-1])+p,l.splice(c-1,1),c--),l[c]=new e.Token("plain-text",p,null,p)}f.content&&typeof f.content!="string"&&s(f.content)}};e.hooks.add("after-tokenize",function(l){l.language!=="jsx"&&l.language!=="tsx"||s(l.tokens)})})(Prism);(function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin})(Prism);(function(e){var t=/\\(?:[^a-z()[\]]|[a-z*]+)/i,r={"equation-command":{pattern:t,alias:"regex"}};e.languages.latex={comment:/%.*/,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:r,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:r,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:t,alias:"selector"},punctuation:/[[\]{}&]/},e.languages.tex=e.languages.latex,e.languages.context=e.languages.latex})(Prism);Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/});Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}});Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/};Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/};(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(c){return c=c.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var n=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return n}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(n),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(n),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(f){c!==f&&(e.languages.markdown[c].inside.content.inside[f]=e.languages.markdown[f])})}),e.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function f(d){if(!(!d||typeof d=="string"))for(var p=0,v=d.length;p<v;p++){var h=d[p];if(h.type!=="code"){f(h.content);continue}var y=h.content[1],g=h.content[3];if(y&&g&&y.type==="code-language"&&g.type==="code-block"&&typeof y.content=="string"){var m=y.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");m=(/[a-z][\w-]*/i.exec(m)||[""])[0].toLowerCase();var b="language-"+m;g.alias?typeof g.alias=="string"?g.alias=[g.alias,b]:g.alias.push(b):g.alias=[b]}}}f(c.tokens)}),e.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var f="",d=0,p=c.classes.length;d<p;d++){var v=c.classes[d],h=/language-(.+)/.exec(v);if(h){f=h[1];break}}var y=e.languages[f];if(y)c.content=e.highlight(u(c.content),y,f);else if(f&&f!=="none"&&e.plugins.autoloader){var g="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=g,e.plugins.autoloader.loadLanguages(f,function(){var m=document.getElementById(g);m&&(m.innerHTML=e.highlight(m.textContent,e.languages[f],f))})}}});var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function u(c){var f=c.replace(a,"");return f=f.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(d,p){if(p=p.toLowerCase(),p[0]==="#"){var v;return p[1]==="x"?v=parseInt(p.slice(2),16):v=Number(p.slice(1)),l(v)}else{var h=s[p];return h||d}}),f}e.languages.md=e.languages.markdown})(Prism);Prism.languages.matlab={comment:[/%\{[\s\S]*?\}%/,/%.+/],string:{pattern:/\B'(?:''|[^'\r\n])*'/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/,keyword:/\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\b/,function:/\b(?!\d)\w+(?=\s*\()/,operator:/\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,punctuation:/\.{3}|[.,;\[\](){}!]/};Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;(function(e){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(Prism);(function(e){var t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}})(Prism);Prism.languages.properties={comment:/^[ \t]*[#!].*$/m,value:{pattern:/(^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?: *[=:] *(?! )| ))(?:\\(?:\r\n|[\s\S])|[^\\\r\n])+/m,lookbehind:!0,alias:"attr-value"},key:{pattern:/^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?= *[=:]| )/m,alias:"attr-name"},punctuation:/[=:]/};(function(e){var t=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;e.languages.protobuf=e.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:t}},builtin:t,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})})(Prism);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;Prism.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/};(function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var r="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",n=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+r+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+n),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+n+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+r),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+r),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby})(Prism);(function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,r=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:r}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:r,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})})(Prism);Prism.languages.scala=Prism.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/});Prism.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:Prism.languages.scala}}},string:/[\s\S]+/}}});delete Prism.languages.scala["class-name"];delete Prism.languages.scala.function;delete Prism.languages.scala.constant;(function(e){e.languages.scheme={comment:/;.*|#;\s*(?:\((?:[^()]|\([^()]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\])|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()\[\]#'\s]+/,greedy:!0},char:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|[\uD800-\uDBFF][\uDC00-\uDFFF]|\S)/,greedy:!0},"lambda-parameter":[{pattern:/((?:^|[^'`#])[(\[]lambda\s+)(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])[(\[]lambda\s+[(\[])[^()\[\]']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])[(\[])(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|except|export|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\[\]\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])[(\[])(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\[\]\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])[(\[])(?:[-+*%/]|[<>]=?|=>?)(?=[()\[\]\s]|$)/,lookbehind:!0},number:{pattern:RegExp(t({"<ureal dec>":/\d+(?:\/\d+)|(?:\d+(?:\.\d*)?|\.\d+)(?:[esfdl][+-]?\d+)?/.source,"<real dec>":/[+-]?<ureal dec>|[+-](?:inf|nan)\.0/.source,"<imaginary dec>":/[+-](?:<ureal dec>|(?:inf|nan)\.0)?i/.source,"<complex dec>":/<real dec>(?:@<real dec>|<imaginary dec>)?|<imaginary dec>/.source,"<num dec>":/(?:#d(?:#[ei])?|#[ei](?:#d)?)?<complex dec>/.source,"<ureal box>":/[0-9a-f]+(?:\/[0-9a-f]+)?/.source,"<real box>":/[+-]?<ureal box>|[+-](?:inf|nan)\.0/.source,"<imaginary box>":/[+-](?:<ureal box>|(?:inf|nan)\.0)?i/.source,"<complex box>":/<real box>(?:@<real box>|<imaginary box>)?|<imaginary box>/.source,"<num box>":/#[box](?:#[ei])?|(?:#[ei])?#[box]<complex box>/.source,"<number>":/(^|[()\[\]\s])(?:<num dec>|<num box>)(?=[()\[\]\s]|$)/.source}),"i"),lookbehind:!0},boolean:{pattern:/(^|[()\[\]\s])#(?:[ft]|false|true)(?=[()\[\]\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])[(\[])(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\[\]\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[()\[\]\s])\|(?:[^\\|]|\\.)*\|(?=[()\[\]\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()\[\]']/};function t(r){for(var n in r)r[n]=r[n].replace(/<[\w\s]+>/g,function(o){return"(?:"+r[o].trim()+")"});return r[n]}})(Prism);Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}});Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]});Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/});Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}});Prism.languages.scss.atrule.inside.rest=Prism.languages.scss;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift});(function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var r=e.languages.tsx.tag;r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(Prism);(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript})(Prism);Prism.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};(function(e){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,n="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),i=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function a(s,l){l=(l||"").replace(/m/g,"")+"m";var u=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return n}).replace(/<<value>>/g,function(){return s});return RegExp(u,l)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return n})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return n}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+i+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:a(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:a(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:a(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:a(i),lookbehind:!0,greedy:!0},number:{pattern:a(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(Prism);var cVe=de(Re(),1);var dVe=de(Re(),1);var qu="code_block",yl="code_line",vJ="code_syntax";var{languages:Q5e,Token:J5e,tokenize:eVe}=yJ.default,tVe=e=>{let t=as(e,qu),r=as(e,yl);return([n,o])=>{var i;let a=[];if(!t.options.syntax||n.type!==r.type)return a;let s=_t(e,o);if(!s)return a;let l=(i=s[0].lang)!=null?i:"";l==="plain"&&(l="");let u=Q5e[l];if(!u)return a;let c=Ri(n),f=eVe(c,u),d=0;for(let p of f)p instanceof J5e&&a.push({anchor:{path:o,offset:d},focus:{path:o,offset:d+p.length},tokenType:p.type,[vJ]:!0}),d+=p.length;return a}},rVe={rules:[{validNodeName:"PRE"},{validNodeName:"P",validStyle:{fontFamily:"Consolas"}}],getNode:e=>{var t,r;let n=((t=[...e.childNodes].find(s=>s.nodeName==="SELECT"))==null?void 0:t.textContent)||"",o=((r=e.textContent)==null?void 0:r.replace(n,""))||"",i=o.split(`
|
|
46
|
-
`);i!=null&&i.length||(i=[o]);let a=i.map(s=>({type:yl,children:[{text:s}]}));return{type:qu,children:a}}},Ph=e=>re(e,yl),bJ=(e,{at:t=e.selection}={})=>{if(t&&_n(e,{at:t,match:{type:Ph(e)}})){let r=_t(e,t);if(!r)return;let[,n]=r,o=pt(e,{at:t,match:{type:Ph(e)}})||_t(e,n);if(!o)return;let[i,a]=o;if(vt(i)&&i.type!==Ph(e))return;let s=_t(e,a);return s?{codeBlock:s,codeLine:o}:void 0}},EJ=(e,{codeLine:t,indentDepth:r=2})=>{var n;let[,o]=t,i=wn(e,o),a=" ".repeat(r);if(!la(e.selection)){let s=(n=e.selection)==null?void 0:n.anchor,l=mE(e,i,s),u=Wr(e,l);if(/\S/.test(u)){yP(e,a,{at:e.selection});return}}yP(e,a,{at:i})},hJ=(e,{codeLine:t})=>{let[,r]=t,n=wn(e,r),o=n&&nl(e,n),i=o&&mE(e,n,o),a=Wr(e,i);return/\s/.test(a)?(Ii(e,{at:i}),!0):!1},nVe=(e,{codeBlock:t,codeLine:r})=>{hJ(e,{codeBlock:t,codeLine:r})&&hJ(e,{codeBlock:t,codeLine:r})},oVe=e=>t=>{if(t.defaultPrevented)return;let r=ff.isTab(e,t),n=ff.isUntab(e,t);if(r||n){let o=Rn(e,{match:{type:Ph(e)}}),i=Array.from(o);if(i.length>0){t.preventDefault();let[,a]=i[0],s=_t(e,a);if(!s)return;Xe(e,()=>{for(let l of i)n&&nVe(e,{codeBlock:s,codeLine:l}),r&&EJ(e,{codeBlock:s,codeLine:l})})}}if((0,Mi.isHotkey)("mod+a",t)){let o=bJ(e,{});if(!o)return;let{codeBlock:i}=o,[,a]=i;rn(e,a),t.preventDefault(),t.stopPropagation()}};function iVe(e){return e.children}var aVe=e=>{let{insertFragment:t}=e,r=re(e,qu),n=re(e,yl);function o(i){return{type:n,children:[{text:Ri(i)}]}}return i=>ro(e,{match:{type:n}})?t(i.flatMap(s=>{let l=s;return l.type===r?iVe(l):o(l)})):t(i)},sVe=e=>{let t=re(e,qu),r=Ph(e),{normalizeNode:n}=e;return([o,i])=>{if(n([o,i]),!vt(o))return;if(o.type===t){let s=ni([o,i]).find(([l])=>l.type!==r);s&&Qa(e,{type:r},{at:s[1]})}}},lVe=(e,{codeLine:t})=>{let[,r]=t;return Wr(e,r).search(/\S|$/)};var uVe=e=>{let{insertBreak:t}=e,r=()=>{if(!e.selection)return;let n=bJ(e,{});if(!n)return;let{codeBlock:o,codeLine:i}=n,a=lVe(e,{codeBlock:o,codeLine:i});return t(),EJ(e,{codeBlock:o,codeLine:i,indentDepth:a}),!0};return e.insertBreak=()=>{r()||t()},e.insertFragment=aVe(e),e.normalizeNode=sVe(e),e},yCt=He({key:qu,isElement:!0,deserializeHtml:rVe,handlers:{onKeyDown:oVe},withOverrides:uVe,options:{hotkey:["mod+opt+8","mod+shift+8"],syntax:!0,syntaxPopularFirst:!1},then:e=>({inject:{pluginsByKey:{[df]:{editor:{insertData:{query:()=>{let t=as(e,yl);return!_n(e,{match:{type:t.type}})}}}}}}}),plugins:[{key:yl,isElement:!0},{key:vJ,isLeaf:!0,decorate:tVe}]});var ik="h1",ak="h2",sk="h3",lk="h4",uk="h5",ck="h6",fVe=[ik,ak,sk,lk,uk,ck],xCt=He({key:"heading",options:{levels:6},then:(e,{options:{levels:t}={}})=>{let r=[];for(let n=1;n<=t;n++){let i={key:fVe[n-1],isElement:!0,deserializeHtml:{rules:[{validNodeName:`H${n}`}]},handlers:{onKeyDown:pl},options:{}};n<4&&(i.options.hotkey=[`mod+opt+${n}`,`mod+shift+${n}`]),r.push(i)}return{plugins:r}}});var dk="hr",CCt=He({key:dk,isElement:!0,isVoid:!0,deserializeHtml:{rules:[{validNodeName:"HR"}]}});var Ih=de(Re(),1);var Nx=de(Re(),1);var cee=de(Re(),1);var a8e=de(Re(),1);var ya=Math.min,jn=Math.max,Dh=Math.round,kh=Math.floor,ls=e=>({x:e,y:e}),pVe={left:"right",right:"left",bottom:"top",top:"bottom"},mVe={start:"end",end:"start"};function bx(e,t,r){return jn(e,ya(t,r))}function us(e,t){return typeof e=="function"?e(t):e}function ba(e){return e.split("-")[0]}function zu(e){return e.split("-")[1]}function Ex(e){return e==="x"?"y":"x"}function xx(e){return e==="y"?"height":"width"}var gVe=new Set(["top","bottom"]);function Ui(e){return gVe.has(ba(e))?"y":"x"}function wx(e){return Ex(Ui(e))}function _J(e,t,r){r===void 0&&(r=!1);let n=zu(e),o=wx(e),i=xx(o),a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ah(a)),[a,Ah(a)]}function CJ(e){let t=Ah(e);return[yx(e),t,yx(t)]}function yx(e){return e.replace(/start|end/g,t=>mVe[t])}var xJ=["left","right"],wJ=["right","left"],hVe=["top","bottom"],vVe=["bottom","top"];function yVe(e,t,r){switch(e){case"top":case"bottom":return r?t?wJ:xJ:t?xJ:wJ;case"left":case"right":return t?hVe:vVe;default:return[]}}function SJ(e,t,r,n){let o=zu(e),i=yVe(ba(e),r==="start",n);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(yx)))),i}function Ah(e){return e.replace(/left|right|bottom|top/g,t=>pVe[t])}function bVe(e){return{top:0,right:0,bottom:0,left:0,...e}}function fk(e){return typeof e!="number"?bVe(e):{top:e,right:e,bottom:e,left:e}}function Vu(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function TJ(e,t,r){let{reference:n,floating:o}=e,i=Ui(t),a=wx(t),s=xx(a),l=ba(t),u=i==="y",c=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,d=n[s]/2-o[s]/2,p;switch(l){case"top":p={x:c,y:n.y-o.height};break;case"bottom":p={x:c,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch(zu(t)){case"start":p[a]-=d*(r&&u?-1:1);break;case"end":p[a]+=d*(r&&u?-1:1);break}return p}async function PJ(e,t){var r;t===void 0&&(t={});let{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=us(t,e),v=fk(p),y=s[d?f==="floating"?"reference":"floating":f],g=Vu(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(y)))==null||r?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),m=f==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),E=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},C=Vu(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:m,offsetParent:b,strategy:l}):m);return{top:(g.top-C.top+v.top)/E.y,bottom:(C.bottom-g.bottom+v.bottom)/E.y,left:(g.left-C.left+v.left)/E.x,right:(C.right-g.right+v.right)/E.x}}var AJ=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=TJ(u,n,l),d=n,p={},v=0;for(let y=0;y<s.length;y++){var h;let{name:g,fn:m}=s[y],{x:b,y:E,data:C,reset:x}=await m({x:c,y:f,initialPlacement:n,placement:d,strategy:o,middlewareData:p,rects:u,platform:{...a,detectOverflow:(h=a.detectOverflow)!=null?h:PJ},elements:{reference:e,floating:t}});c=b??c,f=E??f,p={...p,[g]:{...p[g],...C}},x&&v<=50&&(v++,typeof x=="object"&&(x.placement&&(d=x.placement),x.rects&&(u=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:c,y:f}=TJ(u,d,l)),y=-1)}return{x:c,y:f,placement:d,strategy:o,middlewareData:p}},DJ=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=us(e,t)||{};if(u==null)return{};let f=fk(c),d={x:r,y:n},p=wx(o),v=xx(p),h=await a.getDimensions(u),y=p==="y",g=y?"top":"left",m=y?"bottom":"right",b=y?"clientHeight":"clientWidth",E=i.reference[v]+i.reference[p]-d[p]-i.floating[v],C=d[p]-i.reference[p],x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u)),P=x?x[b]:0;(!P||!await(a.isElement==null?void 0:a.isElement(x)))&&(P=s.floating[b]||i.floating[v]);let N=E/2-C/2,D=P/2-h[v]/2-1,R=ya(f[g],D),M=ya(f[m],D),I=R,B=P-h[v]-M,L=P/2-h[v]/2+N,U=bx(I,L,B),K=!l.arrow&&zu(o)!=null&&L!==U&&i.reference[v]/2-(L<I?R:M)-h[v]/2<0,z=K?L<I?L-I:L-B:0;return{[p]:d[p]+z,data:{[p]:U,centerOffset:L-U-z,...K&&{alignmentOffset:z}},reset:K}}});var kJ=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;let{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...y}=us(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let g=ba(o),m=Ui(s),b=ba(s)===s,E=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=d||(b||!h?[Ah(s)]:CJ(s)),x=v!=="none";!d&&x&&C.push(...SJ(s,h,v,E));let P=[s,...C],N=await l.detectOverflow(t,y),D=[],R=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&D.push(N[g]),f){let L=_J(o,a,E);D.push(N[L[0]],N[L[1]])}if(R=[...R,{placement:o,overflows:D}],!D.every(L=>L<=0)){var M,I;let L=(((M=i.flip)==null?void 0:M.index)||0)+1,U=P[L];if(U&&(!(f==="alignment"?m!==Ui(U):!1)||R.every(ae=>Ui(ae.placement)===m?ae.overflows[0]>0:!0)))return{data:{index:L,overflows:R},reset:{placement:U}};let K=(I=R.filter(z=>z.overflows[0]<=0).sort((z,ae)=>z.overflows[1]-ae.overflows[1])[0])==null?void 0:I.placement;if(!K)switch(p){case"bestFit":{var B;let z=(B=R.filter(ae=>{if(x){let ie=Ui(ae.placement);return ie===m||ie==="y"}return!0}).map(ae=>[ae.placement,ae.overflows.filter(ie=>ie>0).reduce((ie,O)=>ie+O,0)]).sort((ae,ie)=>ae[1]-ie[1])[0])==null?void 0:B[0];z&&(K=z);break}case"initialPlacement":K=s;break}if(o!==K)return{reset:{placement:K}}}return{}}}};var OJ=new Set(["left","top"]);async function EVe(e,t){let{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=ba(r),s=zu(r),l=Ui(r)==="y",u=OJ.has(a)?-1:1,c=i&&l?-1:1,f=us(t,e),{mainAxis:d,crossAxis:p,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof v=="number"&&(p=s==="end"?v*-1:v),l?{x:p*c,y:d*u}:{x:d*u,y:p*c}}var IJ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:o,y:i,placement:a,middlewareData:s}=t,l=await EVe(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},RJ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:g=>{let{x:m,y:b}=g;return{x:m,y:b}}},...u}=us(e,t),c={x:r,y:n},f=await i.detectOverflow(t,u),d=Ui(ba(o)),p=Ex(d),v=c[p],h=c[d];if(a){let g=p==="y"?"top":"left",m=p==="y"?"bottom":"right",b=v+f[g],E=v-f[m];v=bx(b,v,E)}if(s){let g=d==="y"?"top":"left",m=d==="y"?"bottom":"right",b=h+f[g],E=h-f[m];h=bx(b,h,E)}let y=l.fn({...t,[p]:v,[d]:h});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[p]:a,[d]:s}}}}}},NJ=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=us(e,t),c={x:r,y:n},f=Ui(o),d=Ex(f),p=c[d],v=c[f],h=us(s,t),y=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){let b=d==="y"?"height":"width",E=i.reference[d]-i.floating[b]+y.mainAxis,C=i.reference[d]+i.reference[b]-y.mainAxis;p<E?p=E:p>C&&(p=C)}if(u){var g,m;let b=d==="y"?"width":"height",E=OJ.has(ba(o)),C=i.reference[f]-i.floating[b]+(E&&((g=a.offset)==null?void 0:g[f])||0)+(E?0:y.crossAxis),x=i.reference[f]+i.reference[b]+(E?0:((m=a.offset)==null?void 0:m[f])||0)-(E?y.crossAxis:0);v<C?v=C:v>x&&(v=x)}return{[d]:p,[f]:v}}}},LJ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;let{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...u}=us(e,t),c=await a.detectOverflow(t,u),f=ba(o),d=zu(o),p=Ui(o)==="y",{width:v,height:h}=i.floating,y,g;f==="top"||f==="bottom"?(y=f,g=d===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=f,y=d==="end"?"top":"bottom");let m=h-c.top-c.bottom,b=v-c.left-c.right,E=ya(h-c[y],m),C=ya(v-c[g],b),x=!t.middlewareData.shift,P=E,N=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(P=m),x&&!d){let R=jn(c.left,0),M=jn(c.right,0),I=jn(c.top,0),B=jn(c.bottom,0);p?N=v-2*(R!==0||M!==0?R+M:jn(c.left,c.right)):P=h-2*(I!==0||B!==0?I+B:jn(c.top,c.bottom))}await l({...t,availableWidth:N,availableHeight:P});let D=await a.getDimensions(s.floating);return v!==D.width||h!==D.height?{reset:{rects:!0}}:{}}}};function _x(){return typeof window<"u"}function Hu(e){return FJ(e)?(e.nodeName||"").toLowerCase():"#document"}function ao(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ea(e){var t;return(t=(FJ(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function FJ(e){return _x()?e instanceof Node||e instanceof ao(e).Node:!1}function li(e){return _x()?e instanceof Element||e instanceof ao(e).Element:!1}function ji(e){return _x()?e instanceof HTMLElement||e instanceof ao(e).HTMLElement:!1}function BJ(e){return!_x()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ao(e).ShadowRoot}var xVe=new Set(["inline","contents"]);function kf(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=ui(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!xVe.has(o)}var wVe=new Set(["table","td","th"]);function MJ(e){return wVe.has(Hu(e))}var _Ve=[":popover-open",":modal"];function CVe(e){return _Ve.some(t=>{try{return e.matches(t)}catch{return!1}})}var SVe=["transform","translate","scale","rotate","perspective"],TVe=["transform","translate","scale","rotate","perspective","filter"],PVe=["paint","layout","strict","content"];function Cx(e){let t=Sx(),r=li(e)?ui(e):e;return SVe.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||TVe.some(n=>(r.willChange||"").includes(n))||PVe.some(n=>(r.contain||"").includes(n))}function $J(e){let t=cs(e);for(;ji(t)&&!Wu(t);){if(Cx(t))return t;if(CVe(t))return null;t=cs(t)}return null}function Sx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var AVe=new Set(["html","body","#document"]);function Wu(e){return AVe.has(Hu(e))}function ui(e){return ao(e).getComputedStyle(e)}function Oh(e){return li(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function cs(e){if(Hu(e)==="html")return e;let t=e.assignedSlot||e.parentNode||BJ(e)&&e.host||Ea(e);return BJ(t)?t.host:t}function UJ(e){let t=cs(e);return Wu(t)?e.ownerDocument?e.ownerDocument.body:e.body:ji(t)&&kf(t)?t:UJ(t)}function Df(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let o=UJ(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=ao(o);if(i){let s=DVe(a);return t.concat(a,a.visualViewport||[],kf(o)?o:[],s&&r?Df(s):[])}return t.concat(o,Df(o,[],r))}function DVe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var qJ=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Tx=qJ.join(","),zJ=typeof Element>"u",Gu=zJ?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Px=!zJ&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Ax=function(t,r){var n;r===void 0&&(r=!0);var o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),i=o===""||o==="true",a=i||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ax(t.parentNode));return a},kVe=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},VJ=function(t,r,n){if(Ax(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Tx));return r&&Gu.call(t,Tx)&&o.unshift(t),o=o.filter(n),o},Dx=function(t,r,n){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ax(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,u=Dx(l,!0,n);n.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else{var c=Gu.call(a,Tx);c&&n.filter(a)&&(r||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),d=!Ax(f,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(f&&d){var p=Dx(f===!0?a.children:f.children,!0,n);n.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},HJ=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},bl=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||kVe(t))&&!HJ(t)?0:t.tabIndex},OVe=function(t,r){var n=bl(t);return n<0&&r&&!HJ(t)?0:n},IVe=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},WJ=function(t){return t.tagName==="INPUT"},RVe=function(t){return WJ(t)&&t.type==="hidden"},NVe=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},LVe=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},BVe=function(t){if(!t.name)return!0;var r=t.form||Px(t),n=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=n(window.CSS.escape(t.name));else try{o=n(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=LVe(o,t.form);return!i||i===t},FVe=function(t){return WJ(t)&&t.type==="radio"},MVe=function(t){return FVe(t)&&!BVe(t)},$Ve=function(t){var r,n=t&&Px(t),o=(r=n)===null||r===void 0?void 0:r.host,i=!1;if(n&&n!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var u,c,f;n=Px(o),o=(u=n)===null||u===void 0?void 0:u.host,i=!!((c=o)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},jJ=function(t){var r=t.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},UVe=function(t,r){var n=r.displayCheck,o=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var a=Gu.call(t,"details>summary:first-of-type"),s=a?t.parentElement:t;if(Gu.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var u=t.parentElement,c=Px(t);if(u&&!u.shadowRoot&&o(u)===!0)return jJ(t);t.assignedSlot?t=t.assignedSlot:!u&&c!==t.ownerDocument?t=c.host:t=u}t=l}if($Ve(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return jJ(t);return!1},jVe=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var o=r.children.item(n);if(o.tagName==="LEGEND")return Gu.call(r,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}r=r.parentElement}return!1},kx=function(t,r){return!(r.disabled||RVe(r)||UVe(r,t)||NVe(r)||jVe(r))},pk=function(t,r){return!(MVe(r)||bl(r)<0||!kx(t,r))},qVe=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},GJ=function(t){var r=[],n=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=OVe(s,a),u=a?GJ(o.candidates):s;l===0?a?r.push.apply(r,u):r.push(s):n.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:u})}),n.sort(IVe).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(r)},KJ=function(t,r){r=r||{};var n;return r.getShadowRoot?n=Dx([t],r.includeContainer,{filter:pk.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:qVe}):n=VJ(t,r.includeContainer,pk.bind(null,r)),GJ(n)},YJ=function(t,r){r=r||{};var n;return r.getShadowRoot?n=Dx([t],r.includeContainer,{filter:kx.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=VJ(t,r.includeContainer,kx.bind(null,r)),n},Ku=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return Gu.call(t,Tx)===!1?!1:pk(r,t)},zVe=qJ.concat("iframe:not([inert]):not([inert] *)").join(","),Ox=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return Gu.call(t,zVe)===!1?!1:kx(r,t)};var u8e=de(Re(),1);var eee=de(JJ(),1),GVe=(e,{options:{rules:t,onError:r}})=>{let{normalizeNode:n}=e;return e.normalizeNode=([o,i])=>{if(!(i.length===0&&t.some(({strictType:s,type:l,path:u})=>{let c=ir(e,u);if(c){if(s&&vt(c)&&c.type!==s)return Gr(e,{type:s},{at:u}),!0}else try{return wr(e,{type:s??l,children:[{text:""}]},{at:u}),!0}catch(f){r==null||r(f)}return!1})))return n([o,i])},e},KVe="normalizeTypes",MCt=He({key:KVe,withOverrides:GVe,options:{rules:[]}}),mk=(e,{options:{types:t}})=>{let r=(0,eee.default)(t),{normalizeNode:n}=e;return e.normalizeNode=([o,i])=>{if(vt(o)&&o.type&&r.includes(o.type)&&Ri(o)===""){Vt(e,{at:i});return}n([o,i])},e},jCt=He({key:"removeEmptyNodes",withOverrides:mk});var YVe=Object.defineProperty,XVe=Object.defineProperties,ZVe=Object.getOwnPropertyDescriptors,Ix=Object.getOwnPropertySymbols,oee=Object.prototype.hasOwnProperty,iee=Object.prototype.propertyIsEnumerable,tee=(e,t,r)=>t in e?YVe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yu=(e,t)=>{for(var r in t||(t={}))oee.call(t,r)&&tee(e,r,t[r]);if(Ix)for(var r of Ix(t))iee.call(t,r)&&tee(e,r,t[r]);return e},Rx=(e,t)=>XVe(e,ZVe(t)),QVe=(e,t)=>{var r={};for(var n in e)oee.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ix)for(var n of Ix(e))t.indexOf(n)<0&&iee.call(e,n)&&(r[n]=e[n]);return r},JVe=(e,{url:t,text:r="",target:n,children:o})=>({type:re(e,Rr),url:t,target:n,children:o??[{text:r}]}),aee=(e,t)=>{let{allowedSchemes:r,defaultLinkAttributes:n,dangerouslySkipSanitization:o}=oi(e,Rr),i=Yu({},n),a=o?t.url:n0(t.url,{allowedSchemes:r})||void 0;return a!==void 0&&(i.href=a),"target"in t&&(i.target=t.target),i};var gk=Ed("floatingLink")({openEditorId:null,mouseDown:!1,updated:!1,url:"",text:"",newTab:!1,mode:"",isEditing:!1}).extendActions(e=>({reset:()=>{e.url(""),e.text(""),e.newTab(!1),e.mode(""),e.isEditing(!1)}})).extendActions(e=>({show:(t,r)=>{e.mode(t),e.isEditing(!1),e.openEditorId(r)},hide:()=>{e.openEditorId(null),e.reset()}})).extendSelectors(e=>({isOpen:t=>e.openEditorId===t})),see=gk.set,lee=gk.get,uee=()=>gk.use,e8e=()=>{let e=uee().updated(),t=Ih.default.useRef(null),[r,n]=Ih.default.useState(lee.newTab());return Ih.default.useEffect(()=>{t.current&&e&&setTimeout(()=>{var o;(o=t.current)==null||o.focus()},0)},[e]),{ref:t,checked:r,setChecked:n}},t8e=({checked:e,ref:t,setChecked:r})=>{let n=Ih.default.useCallback(o=>{r(o.target.checked),see.newTab(o.target.checked)},[r]);return{ref:t,props:{onChange:n,checked:e,type:"checkbox"}}},KCt=ai("input")({propsHook:t8e,stateHook:e8e}),r8e=()=>{let e=uee().updated(),t=Nx.default.useRef(null);return Nx.default.useEffect(()=>{t.current&&e&&setTimeout(()=>{var r;(r=t.current)==null||r.focus()},0)},[e]),{ref:t}},n8e=e=>{let t=Nx.default.useCallback(r=>{see.url(r.target.value)},[]);return{ref:e.ref,props:{onChange:t,defaultValue:lee.url()}}},XCt=ai("input")({propsHook:n8e,stateHook:r8e}),o8e=()=>{let e=ii(),t=CK(),r=cee.default.useMemo(()=>ro(e,{match:{type:re(e,Rr)}}),[e,t]);if(!r)return{};let[n]=r;return{element:n}},i8e=({element:e})=>{let t=ii();if(!e)return{props:{}};let r=aee(t,e);return{props:Rx(Yu({},r),{target:"_blank","aria-label":"Open link in a new tab",onMouseOver:n=>{n.stopPropagation()}})}},QCt=ai("a")({stateHook:o8e,propsHook:i8e});var s8e=(e,t,r)=>{ua(e,[JVe(e,t)],r)},Lx=(e,t)=>Xe(e,()=>{var r,n,o,i,a,s;if(t!=null&&t.split){if(pt(e,{at:(r=e.selection)==null?void 0:r.anchor,match:{type:re(e,Rr)}}))return _u(e,{at:(n=e.selection)==null?void 0:n.anchor,match:c=>vt(c)&&c.type===re(e,Rr)}),Lx(e,{at:(o=e.selection)==null?void 0:o.anchor}),!0;if(pt(e,{at:(i=e.selection)==null?void 0:i.focus,match:{type:re(e,Rr)}}))return _u(e,{at:(a=e.selection)==null?void 0:a.focus,match:c=>vt(c)&&c.type===re(e,Rr)}),Lx(e,{at:(s=e.selection)==null?void 0:s.focus}),!0}sg(e,Yu({match:{type:re(e,Rr)}},t))}),ree=(e,{text:t})=>{let r=pt(e,{match:{type:re(e,Rr)}});if(r){let[n,o]=r;if(t!=null&&t.length&&t!==Wr(e,o)){let i=n.children[0];l0(e,{at:o,nodes:Rx(Yu({},i),{text:t}),insertOptions:{select:!0}})}}},l8e=(e,t)=>{var r=t,{url:n,target:o}=r,i=QVe(r,["url","target"]);So(e,{type:re(e,Rr),url:n,target:o,children:[]},Yu({split:!0},i))},nee=(e,{url:t,text:r,target:n,insertTextInLink:o,insertNodesOptions:i,skipValidation:a=!1})=>{var s,l,u;let c=e.selection;if(!c)return;let f=pt(e,{at:c,match:{type:re(e,Rr)}});if(o&&f)return e.insertText(t),!0;if(!a&&!dee(e,t))return;if(Cn(r)&&r.length===0&&(r=t),f)return(t!==((s=f[0])==null?void 0:s.url)||n!==((l=f[0])==null?void 0:l.target))&&Qa(e,{url:t,target:n},{at:f[1]}),ree(e,{url:t,text:r,target:n}),!0;let d=ro(e,{at:c,match:{type:re(e,Rr)}}),[p,v]=d??[],h=!1;if(v&&(r!=null&&r.length)){let b=Wr(e,v);r!==b&&(h=!0)}if(la(c))return f?Lx(e,{at:f[1]}):Lx(e,{split:!0}),l8e(e,{url:t,target:n}),ree(e,{url:t,target:n,text:r}),!0;h&&Vt(e,{at:v});let y=gE(p??{}),g=(u=e.selection)==null?void 0:u.focus.path;if(!g)return;let m=a3(e,g);return r!=null&&r.length||(r=t),s8e(e,Rx(Yu({},y),{url:t,target:n,children:[Rx(Yu({},m),{text:r})]}),i),!0};var dee=(e,t)=>{let{allowedSchemes:r,isUrl:n,dangerouslySkipSanitization:o}=oi(e,Rr);return!(n&&!n(t)||!o&&!n0(t,{allowedSchemes:r,permitInvalid:!0}))},c8e=(e,{type:t,options:{isUrl:r,getUrlHref:n,rangeBeforeOptions:o,keepSelectedTextOnPaste:i}})=>{let{insertData:a,insertText:s,apply:l,normalizeNode:u,insertBreak:c}=e,f=()=>{Xe(e,()=>{var d;let p=e.selection,v=d6(e,p,o);if(v||(v=f6(e)),!v||_n(e,{at:v,match:{type:re(e,Rr)}}))return;let y=Wr(e,v);y=(d=n==null?void 0:n(y))!=null?d:y,r(y)&&(rn(e,v),nee(e,{url:y}),vE(e,{edge:"end"}))})};return e.insertBreak=()=>{if(!Ir(e.selection))return c();f(),c()},e.insertText=d=>{d===" "&&Ir(e.selection)&&f(),s(d)},e.insertData=d=>{let p=d.getData("text/plain"),v=n==null?void 0:n(p);if(p){let h=v||p;if(nee(e,{text:i?void 0:h,url:h,insertTextInLink:!0}))return}a(d)},e.apply=d=>{if(d.type==="set_selection"){let p=d.newProperties;if(p&&p.focus&&p.anchor&&Ir(p)){let v=pt(e,{at:p,match:{type:re(e,Rr)}});if(v){let[,h]=v,y;ei(e,p.focus,h)&&(y=c6(e,h)),ol(e,p.focus,h)&&(y=O1(e,h)),y&&(d.newProperties={anchor:y,focus:y})}}}l(d)},e.normalizeNode=([d,p])=>{if(d.type===re(e,Rr)){let v=e.selection;if(v&&Ir(v)&&ol(e,v.focus,p)){let h=O1(e,p);if(h)rn(e,h);else{let y=F.next(p);ua(e,{text:""},{at:y}),rn(e,y)}}}u([d,p])},e=mk(e,pf({options:{types:t}})),e},Rr="a",lSt=He({key:Rr,isElement:!0,isInline:!0,withOverrides:c8e,options:{allowedSchemes:["http","https","mailto","tel"],dangerouslySkipSanitization:!1,defaultLinkAttributes:{},isUrl:ul,rangeBeforeOptions:{matchString:" ",skipInvalid:!0,afterMatch:!0},triggerFloatingLinkHotkeys:"meta+k, ctrl+k",keepSelectedTextOnPaste:!0},then:(e,{type:t})=>({props:({element:r})=>({nodeProps:aee(e,r)}),deserializeHtml:{rules:[{validNodeName:"A"}],getNode:r=>{let n=r.getAttribute("href");if(n&&dee(e,n))return{type:t,url:n,target:r.getAttribute("target")||"_blank"}}}})});var _ee=de(gee(),1);var hee=Object.getOwnPropertySymbols,m8e=Object.prototype.hasOwnProperty,g8e=Object.prototype.propertyIsEnumerable,h8e=(e,t)=>{var r={};for(var n in e)m8e.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hee)for(var n of hee(e))t.indexOf(n)<0&&g8e.call(e,n)&&(r[n]=e[n]);return r},Bx={key:"",which:8},Rh=(e,{options:{rules:t}})=>r=>{if(r.defaultPrevented)return;let n;if(e.selection)return Ir(e.selection)&&t.forEach(({types:o,defaultType:i,hotkey:a,predicate:s,onReset:l})=>{var u;a&&(0,Mi.isHotkey)(a,r)&&s(e)&&_n(e,{match:{type:o}})&&((u=r.preventDefault)==null||u.call(r),Gr(e,{type:i}),l&&l(e),n=!0)}),n},v8e="resetNode",gSt=He({key:v8e,handlers:{onKeyDown:Rh},withOverrides:(e,{options:t})=>{let{deleteFragment:r,deleteBackward:n}=e;if(!t.disableEditorReset){let o=()=>{let{selection:i}=e;if(!i)return;let a=wn(e,[]),s=aa(e,[]);if(ft.equals(i.anchor,a)&&ft.equals(i.focus,s)||ft.equals(i.focus,a)&&ft.equals(i.anchor,s))return YA(e,{insertOptions:{select:!0}}),!0};e.deleteFragment=i=>{o()||r(i)}}return t.disableFirstBlockReset||(e.deleteBackward=o=>{let{selection:i}=e;if(i&&Ir(i)){let a=wn(e,[]);if(ft.equals(i.anchor,a)){let s=ir(e,[0]),l=e.blockFactory({},[0]),{children:u}=l,c=h8e(l,["children"]);Xe(e,()=>{yE(e,Object.keys(gE(s)),{at:[0]}),Qa(e,c,{at:[0]})});return}}n(o)}),e},options:{rules:[]}});var y8e=Object.defineProperty,b8e=Object.defineProperties,E8e=Object.getOwnPropertyDescriptors,vee=Object.getOwnPropertySymbols,x8e=Object.prototype.hasOwnProperty,w8e=Object.prototype.propertyIsEnumerable,yee=(e,t,r)=>t in e?y8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xl=(e,t)=>{for(var r in t||(t={}))x8e.call(t,r)&&yee(e,r,t[r]);if(vee)for(var r of vee(t))w8e.call(t,r)&&yee(e,r,t[r]);return e},wee=(e,t)=>b8e(e,E8e(t)),vk=(e,t)=>{var r;let n=(r=_t(e,t))==null?void 0:r[0];return(n==null?void 0:n.type)===re(e,tr)},_8e=e=>re(e,Zu),C8e=e=>re(e,Qu),Nr=e=>[C8e(e),_8e(e)],S8e=e=>re(e,tr),T8e=e=>re(e,sn),Cee=(e,{diffListPath:t,liPath:r})=>{let n=pt(e,{at:r,match:{type:Nr(e)}});if(!n)return;let[o,i]=n;if(!t||!F.equals(i,t)){if(o.children.length<2){let a=pt(e,{at:i,match:{type:re(e,tr)}});if(a)return Cee(e,{liPath:a[1],diffListPath:t})||i}return r}},Xu=(e,{at:t=e.selection}={})=>{let r=re(e,tr),n;if(X.isRange(t)&&!Ir(t)?n=t.focus.path:X.isRange(t)?n=t.anchor.path:n=t,n&&ir(e,n)){let i=pt(e,{at:n,match:{type:r}});if(i)return{list:_t(e,i[1]),listItem:i}}},See=(e,t=e.selection)=>{var r;if(!t)return;let n=pt(e,{at:t,match:{type:[re(e,Zu),re(e,Qu)]}});if(n){let[,o]=n;return(r=See(e,o))!=null?r:n}},P8e=(e,{inheritCheckStateOnLineStartBreak:t=!1,inheritCheckStateOnLineEndBreak:r=!1})=>{let n=re(e,yk);if(!e.selection)return!1;let o=pt(e,{match:{type:n}});if(!o)return!1;let[i,a]=o,s=!1;return Xe(e,()=>{X.isCollapsed(e.selection)||Ii(e);let l=ei(e,e.selection.focus,a),u=a0(e),c=F.next(a);if(l){wr(e,{type:n,checked:t?i.checked:!1,children:[{text:""}]},{at:a}),s=!0;return}if(u){let f=sa(e)||{};wr(e,{type:n,checked:r?i.checked:!1,children:[xl({text:""},f)]},{at:c}),rn(e,c)}else Xe(e,()=>{_u(e)});s=!0}),s},A8e=(e,t)=>{if(!e.selection)return;if(k8e(e)&&P8e(e,t))return!0},D8e=(e,{options:t})=>{let{insertBreak:r}=e;return e.insertBreak=()=>{A8e(e,t)||r()},e},yk="action_item",BSt=He({key:yk,isElement:!0,withOverrides:D8e,handlers:{onKeyDown:pl},options:{hotkey:["mod+opt+4","mod+shift+4"]}}),k8e=(e,{at:t=e.selection}={})=>{let r=re(e,yk),n;if(X.isRange(t)&&!Ir(t)?n=t.focus.path:X.isRange(t)?n=t.anchor.path:n=t,n&&ir(e,n)){let i=pt(e,{at:n,match:{type:r}});if(i)return{list:_t(e,i[1]),listItem:i}}},If=(e,t)=>t.children.some(r=>to(r,[],{type:Nr(e)})),bk=e=>{let{selection:t}=e;return!t||Ir(t)||!Ig(e)?!1:_n(e,{match:{type:re(e,tr)}})},El=(e,t)=>vt(t)&&Nr(e).includes(t.type);var O8e=(e,{list:t,listItem:r})=>{let n=!1,[o]=t,[,i]=r,a;try{a=F.previous(i)}catch{return}let s=Ln(e,a);if(s){let[l,u]=s,c=l.children.find(d=>to(d,[],{type:Nr(e)})),f=u.concat(c?[1,c.children.length]:[1]);Xe(e,()=>{c||So(e,{type:o.type,children:[]},{at:i}),Nn(e,{at:i,to:f}),n=!0})}return n},Of=(e,{fromList:t,fromListItem:r,fromStartIndex:n,to:o,toList:i,toListIndex:a=null,deleteFromList:s=!0})=>{let l,u;return Xe(e,()=>{if(r){let f=kg(e,{at:r[1],match:{type:Nr(e)}});if(!f)return;l=f==null?void 0:f[1]}else if(t)l=t[1];else return;let c=null;if(o&&(c=o),i)if(a===null){let f=Og(i);c=F.next(f)}else c=i[1].concat([a]);c&&(u=s0(e,{at:l,to:c,fromStartIndex:n}),s&&Ii(e,{at:l}))}),u},Nh=(e,{at:t}={})=>{let r=()=>{if(pt(e,{match:{type:Nr(e),at:t}}))return!0;if(!t&&e.selection){let n=Sd(e,e.selection.anchor.path,e.selection.focus.path);if(vt(n[0])&&Nr(e).includes(n[0].type))return!0}return!1};Xe(e,()=>{do Po(e,{at:t,match:{type:re(e,sn)}})&&Gr(e,{at:t,type:re(e,Mn)}),sg(e,{at:t,match:{type:re(e,tr)},split:!0}),sg(e,{at:t,match:{type:[re(e,Zu),re(e,Qu)]},split:!0});while(r())})},Lh=(e,{list:t,listItem:r})=>{let n=()=>{let[i,a]=t,[s,l]=r,u=pt(e,{at:a,match:{type:re(e,tr)}});if(!u){let p;try{p=F.next(a)}catch{return}let v=If(e,s),h=!k1(t,l);if((v||h)&&wr(e,{type:i.type,children:[]},{at:p}),v){let y=ir(e,p);if(!y)return;Of(e,{fromListItem:r,toList:[y,p]})}if(h){let y=ir(e,p);if(!y)return;Of(e,{fromList:t,fromStartIndex:l.at(-1)+1,toList:[y,p],deleteFromList:!1})}return Nh(e,{at:l.concat(0)}),!0}let[,c]=u,f=l.concat([1]);if(!k1(t,l)){If(e,s)||wr(e,{type:i.type,children:[]},{at:f});let p=ir(e,f);if(!p)return;Of(e,{fromListItem:u,toList:[p,f],fromStartIndex:l.at(-1)+1,deleteFromList:!1})}let d=F.next(c);return Nn(e,{at:l,to:d}),!0},o=!1;return Xe(e,()=>{o=n()}),o},Ek=(e,{list:t,listItem:r})=>{let[,n]=t;return vk(e,n)?!1:(Lh(e,{list:t,listItem:r}),!0)},I8e=(e,{increase:t=!0,at:r=(o=>(o=e.selection)!=null?o:void 0)(),enableResetOnShiftTab:n}={})=>{let o=Rn(e,{at:r,match:{type:re(e,sn)}}),i=Array.from(o);if(i.length===0)return;let a=[],s=[];i.forEach(u=>{let c=u[1],f=F.parent(c);a.some(p=>{let v=F.parent(p);return F.isAncestor(v,f)})||(a.push(c),s.push(Oi(e,c)))});let l=t?s:s.reverse();return Xe(e,()=>{let u=!1;return l.forEach(c=>{let f=c.unref();if(!f)return;let d=_t(e,f);if(!d)return;let p=_t(e,d[1]);if(!p)return;let v;t?v=O8e(e,{list:p,listItem:d}):vk(e,p[1])?v=Lh(e,{list:p,listItem:d}):n&&(v=Ek(e,{list:p,listItem:d})),u=v||u}),u})};var R8e=e=>{let t=re(e,tr),r=re(e,sn);if(!e.selection)return!1;let n=pt(e,{match:{type:r}});if(!n)return!1;let[,o]=n,i=_t(e,o);if(!i)return!1;let[a,s]=i;if(a.type!==t)return!1;let l=!1;return Xe(e,()=>{X.isCollapsed(e.selection)||Ii(e);let u=ei(e,e.selection.focus,o),c=a0(e),f=F.next(o),d=F.next(s);if(u){wr(e,{type:t,children:[{type:r,children:[{text:""}]}]},{at:s}),l=!0;return}if(c){let p=sa(e)||{};wr(e,{type:t,children:[{type:r,children:[xl({text:""},p)]}]},{at:d}),rn(e,d)}else Xe(e,()=>{_u(e),So(e,{type:t,children:[]},{at:f}),Nn(e,{at:f,to:d}),rn(e,d),vE(e,{edge:"start"})});a.children.length>1&&Nn(e,{at:f,to:d.concat(1)}),l=!0}),l},bee=(e,{fromListItem:t,toListItem:r,start:n})=>{let[,o]=t,[,i]=r,a=0;return Xe(e,()=>{let s=kg(e,{at:o,match:{type:Nr(e)}});if(!s)return;let[,l]=s,u=kg(e,{at:i,match:{type:Nr(e)}}),c;if(u)if(n){let[,f]=u;c=f.concat([0])}else c=F.next(Og(u));else{let f=_t(e,o);if(!f)return;let[d]=f,p=d.type,v=i.concat([1]);wr(e,{type:p,children:[]},{at:v}),c=v.concat([0])}a=s0(e,{at:l,to:c}),Ii(e,{at:l})}),a};var hk=(e,{list:t,listItem:r,reverse:n=!0})=>{let[o,i]=r;if(la(e.selection)||!If(e,o))return!1;let a=i0(i),s=!1;return Xe(e,()=>{if(a){let l=Ln(e,a);if(!l)return;let u=F.next(i);wr(e,{type:re(e,tr),children:[{type:re(e,sn),children:[{text:""}]}]},{at:u});let c=Ln(e,u);if(!c)return;let f=Oi(e,c[1]);bee(e,{fromListItem:r,toListItem:c}),Cd(e,{reverse:n}),u=f.unref(),bee(e,{fromListItem:[c[0],u],toListItem:l}),Vt(e,{at:u}),s=!0;return}Of(e,{fromListItem:r,toList:t,toListIndex:1})}),s},N8e=(e,{type:t,pluginKey:r=t})=>Xe(e,()=>{if(!e.selection)return;let{validLiChildrenTypes:n}=oi(e,r);if(Ir(e.selection)||!Ig(e)){let o=Xu(e);if(o){let{list:i}=o;i[0].type===t?Nh(e):Gr(e,{type:t},{at:e.selection,match:a=>vt(a)&&Nr(e).includes(a.type),mode:"lowest"})}else{So(e,{type:t,children:[]});let a=Rn(e,{match:{type:re(e,Mn)}}),s=Array.from(a);Po(e,{match:{type:n}})||Gr(e,{type:re(e,sn)});let u={type:re(e,tr),children:[]};for(let[,c]of s)So(e,u,{at:c})}}else{let[o,i]=X.edges(e.selection),a=Sd(e,o.path,i.path);if(Nr(e).includes(a[0].type)||a[0].type===re(e,tr))if(a[0].type===t)Nh(e);else{let s=ro(e,{at:X.start(e.selection),match:{type:Nr(e)},mode:"lowest"}),l=ro(e,{at:X.end(e.selection),match:{type:Nr(e)},mode:"lowest"}),u=Math.min(s[1].length,l[1].length);Gr(e,{type:t},{at:e.selection,match:(c,f)=>vt(c)&&Nr(e).includes(c.type)&&f.length>=u,mode:"all"})}else{let s=a[1].length,l=Rn(e,{mode:"all"});Array.from(l).filter(([,c])=>c.length===s+1).forEach(c=>{if(Nr(e).includes(c[0].type))Gr(e,{type:t},{at:c[1],match:f=>vt(f)&&Nr(e).includes(f.type),mode:"all"});else{n!=null&&n.includes(c[0].type)||Gr(e,{type:re(e,sn)},{at:c[1]});let f={type:re(e,tr),children:[]};So(e,f,{at:c[1]}),So(e,{type:t,children:[]},{at:c[1]})}})}}});var Eee=(e,{type:t,options:{hotkey:r,enableResetOnShiftTab:n}})=>o=>{if(o.defaultPrevented)return;let i=ff.isTab(e,o),a=ff.isUntab(e,o),s=e.selection;if(e.selection&&(i||a)){let{selection:u}=e;if(!Ir(e.selection)){let{anchor:f,focus:d}=X.isBackward(u)?{anchor:xl({},u.focus),focus:xl({},u.anchor)}:{anchor:xl({},u.anchor),focus:xl({},u.focus)},p=fE(e,{anchor:f,focus:d});p&&(s=p,rn(e,p))}let c=_n(e,{match:{type:re(e,tr)}});if(s&&c)return o.preventDefault(),I8e(e,{at:s,increase:i,enableResetOnShiftTab:n}),!0}if(!r)return;let l=(0,_ee.default)(r);for(let u of l)(0,Mi.isHotkey)(u)(o)&&N8e(e,{type:t})},L8e=(e,t)=>{let r=Xu(e,{}),n=!1;if(r){let{list:o,listItem:i}=r;R1(e,{match:a=>a.type===re(e,tr)})&&Xe(e,()=>{if(n=Ek(e,{list:o,listItem:i}),n||(n=hk(e,{list:o,listItem:i}),n))return!0;if(p6(i[1])&&!vk(e,o[1])){Rh(e,pf({options:{rules:[{types:[re(e,tr)],defaultType:re(e,Mn),hotkey:"backspace",predicate:()=>R1(e),onReset:c=>Nh(c)}]}}))(Bx),n=!0;return}let a=wu(e,e.selection.focus),s,l=!1;if(a&&bk(wee(xl({},e),{selection:{anchor:e.selection.anchor,focus:a}}))){let c=re(e,sn);s=[...Rn(e,{at:i[1],mode:"lowest",match:d=>d.type===c})][0],l=s[0].children.length>1}if(Cd(e,{unit:t,reverse:!0}),n=!0,!s||!l)return;let u=Ln(e,F.parent(s[1]));u&&u[0].children.length===0&&Vt(e,{at:u[1]})})}return n},B8e=e=>{let t=nl(e,e.selection.focus.path);if(t){let r=Xu(e,{at:t});if(r){let{listItem:n}=r,o=Po(e,{at:e.selection.anchor});if(!Wr(e,o[1]))return Vt(e),!0;if(If(e,n[0])){let i=Xu(e,{at:[...n[1],1,0,0]});Lh(e,i)}}}return!1},F8e=(e,t,r,n)=>{let{listItem:o}=t;if(!If(e,o[0])){let s=re(e,tr),l=Rn(e,{at:o[1],mode:"lowest",match:(g,m)=>{var b;if(m.length===0)return!1;let E=g.type===s,C=((b=ir(e,F.next(m)))==null?void 0:b.type)===s;return E&&C}}),u=Array.from(l,g=>g[1])[0];if(!u){let g=nl(e,o[1]);if(g){let m=Xu(e,{at:g});if(m){let b=See(e,o[1]);return Of(e,{fromList:m.list,toList:b,deleteFromList:!0}),!0}}return!1}let c=Ln(e,F.next(u));if(!c)return!1;let f=_t(e,c[1]);if(f&&hk(e,{list:f,listItem:c,reverse:!1}))return!0;let d=nl(e,e.selection.focus);if(!d||!bk(wee(xl({},e),{selection:{anchor:e.selection.anchor,focus:d}})))return!1;let p=re(e,sn),h=[...Rn(e,{at:d.path,mode:"lowest",match:g=>g.type===p})][0];if(h[0].children.length<2)return!1;r(n);let y=Ln(e,F.parent(h[1]));return y&&y[0].children.length===0&&Vt(e,{at:y[1]}),!0}let i=Ln(e,F.next([...o[1],0]));if(!i)return!1;let a=ni(i)[0];return!!(Ek(e,{list:i,listItem:a})||hk(e,{list:i,listItem:a}))},M8e=(e,t,r)=>{let n=!1;return!(e!=null&&e.selection)||!m6(e)||Xe(e,()=>{let o=Xu(e,{});if(!o){n=B8e(e);return}n=F8e(e,o,t,r)}),n},xee=e=>{let t=wn(e,e.selection);return pt(e,{at:t,match:{type:re(e,tr)}})},$8e=e=>{let t=!1;return Xe(e,()=>{if(!bk(e))return;let r=aa(e,e.selection),n=pt(e,{at:r,match:{type:re(e,tr)}}),i=n&&!If(e,n[0])?Oi(e,n[1]):void 0;if(!xee(e)||!n){t=!1;return}Cd(e);let a=xee(e);if(i){let s=i.unref(),l=a&&_t(e,a[1]),u=Cee(e,{liPath:s,diffListPath:l==null?void 0:l[1]});u&&Vt(e,{at:u}),t=!0}}),t},U8e=e=>{if(!e.selection)return;let t=Xu(e,{}),r;if(t){let{list:o,listItem:i}=t;if(I1(e)&&(r=Lh(e,{list:o,listItem:i}),r))return!0}if(Rh(e,pf({options:{rules:[{types:[re(e,tr)],defaultType:re(e,Mn),predicate:()=>!r&&I1(e),onReset:o=>Nh(o)}]}}))(Bx)||!r&&R8e(e))return!0},j8e=e=>{let{insertFragment:t}=e,r=as(e,tr),n=S8e(e),o=T8e(e),i=(f,d,{type:p})=>{let v=F.parent(d[1]);for(;ir(f,v).type!==p;)v=F.parent(v);return[ir(f,v),v]},a=f=>{let d=null,p=f;for(;El(e,p)||p.type===n&&p.children[0].type!==o;)d=p,[p]=p.children;return d?d.children:[p]},s=f=>{if(!El(e,f))return[f];let d=s3(f),p=Array.from(d),v=p.reduce((g,m)=>F.isAncestor(g[1],m[1])?g:Sd(f,m[1],g[1]),i(f,p[0],r)),[h,...y]=El(e,v[0])?v[0].children:[v[0]];return[...a(h),...y]},l=f=>f.type===n?f:{type:n,children:[f]},u=f=>f.length===1&&El(e,f[0])&&[...l3({children:f})].filter(p=>vt(p[0])).filter(([p])=>p.type===o).length===1,c=(f,d,p)=>{let[,v]=d,[h,y]=p,g=!Ri(h),[m,...b]=f.flatMap(s).map(l),E,C;if(El(e,f[0]))if(u(f))E=m,C=b;else if(g){let x=ir(e,v),[,...P]=x.children,[N,...D]=m.children;if(wr(e,N,{at:F.next(y),select:!0}),Vt(e,{at:y}),D!=null&&D.length)if(P!=null&&P.length){let R=[...v,1,0];wr(e,D[0].children,{at:R,select:!0})}else wr(e,D,{at:F.next(y),select:!0});E={text:""},C=b}else E={text:""},C=[m,...b];else E=m,C=b;return{textNode:E,listItemNodes:C}};return f=>{let d=ro(e,{match:{type:n},mode:"lowest"});if(!d)return t(El(e,f[0])?[{text:""},...f]:f);t([{text:""}]),d=ro(e,{match:{type:n},mode:"lowest"});let p=ro(e,{match:{type:o},mode:"lowest"});if(!p)return t(El(e,f[0])?[{text:""},...f]:f);let{textNode:v,listItemNodes:h}=c(f,d,p);t([v]);let[,y]=d;return wr(e,h,{at:F.next(y),select:!0})}},Tee=(e,{children:t})=>{let r=[];for(let n of t)ki(e,n[0])?r.push(...Tee(e,{children:ni(n)})):r.push(n);return r},q8e=(e,{listItem:t,validLiChildrenTypes:r=[]})=>{let n=!1,o=new Set([re(e,Zu),re(e,Qu),re(e,sn),...r]),[,i]=t,a=ni(t),s=a.filter(([d])=>!o.has(d.type)).map(([,d])=>Oi(e,d)),l=a[0],[u,c]=l??[];if(!l||!ki(e,u))return g6(e,re(e,sn),{at:i.concat([0])}),!0;if(ki(e,u)&&!to(u,[],{type:re(e,sn)})){if(to(u,[],{type:Nr(e)})){let d=_t(e,t[1]),p=l;return ni(l).reverse().forEach(h=>{Lh(e,{list:p,listItem:h})}),Vt(e,{at:[...d[1],0]}),!0}if(r.includes(u.type))return!0;Gr(e,{type:re(e,sn)},{at:c}),n=!0}let f=ni(l);if(f.length>0){let d=[],p=[];for(let h of f){if(!ki(e,h[0]))break;d.push(Oi(e,h[1])),p.push(...Tee(e,{children:ni(h)}))}let v=F.next(f.at(-1)[1]);p.reverse().forEach(([,h])=>{Nn(e,{at:h,to:v})}),d.forEach(h=>{let y=h.unref();y&&Vt(e,{at:y})}),d.length>0&&(n=!0)}return n?!0:(s.reverse().forEach(d=>{let p=d.unref();p&&Nn(e,{at:p,to:c.concat([0])})}),s.length>0)},z8e=(e,{nestedListItem:t})=>{let[,r]=t,n=_t(e,r);if(!(n&&to(n[0],[],{type:Nr(e)})))return!1;let i;try{i=F.previous(r)}catch{return!1}let a=Ln(e,i);if(a){let[,s]=a,l=s.concat([1]);return Nn(e,{at:r,to:l}),!0}},V8e=(e,{validLiChildrenTypes:t})=>{let{normalizeNode:r}=e,n=re(e,tr),o=re(e,sn),i=re(e,Mn);return([a,s])=>{var l;if(!vt(a))return r([a,s]);if(El(e,a)){let u=ni([a,s]).find(([c])=>c.type!==n);if(u)return So(e,{type:n,children:[]},{at:u[1]})}if(to(a,[],{type:Nr(e)})){if(a.children.length===0||!a.children.some(p=>p.type===n))return Vt(e,{at:s});let u=F.next(s),c=ir(e,u);(c==null?void 0:c.type)===a.type&&Of(e,{fromList:[c,u],toList:[a,s],deleteFromList:!0});let f=i0(s),d=ir(e,f);if((d==null?void 0:d.type)===a.type){e.normalizeNode([d,f]);return}if(z8e(e,{nestedListItem:[a,s]}))return}if(!(a.type===re(e,tr)&&q8e(e,{listItem:[a,s],validLiChildrenTypes:t}))){if(a.type===o&&o!==i&&((l=_t(e,s))==null?void 0:l[0].type)!==n){Gr(e,{type:i},{at:s});return}r([a,s])}}},H8e=(e,{options:{validLiChildrenTypes:t}})=>{let{insertBreak:r,deleteBackward:n,deleteForward:o,deleteFragment:i}=e;return e.insertBreak=()=>{U8e(e)||r()},e.deleteBackward=a=>{L8e(e,a)||n(a)},e.deleteForward=a=>{M8e(e,o,a)||o(a)},e.deleteFragment=a=>{$8e(e)||i(a)},e.insertFragment=j8e(e),e.normalizeNode=V8e(e,{validLiChildrenTypes:t}),e},Zu="ul",Qu="ol",tr="li",sn="lic",gTt=He({key:"list",plugins:[{key:Zu,isElement:!0,handlers:{onKeyDown:Eee},withOverrides:H8e,deserializeHtml:{rules:[{validNodeName:"UL"}]}},{key:Qu,isElement:!0,handlers:{onKeyDown:Eee},deserializeHtml:{rules:[{validNodeName:"OL"}]}},{key:tr,isElement:!0,deserializeHtml:{rules:[{validNodeName:"LI"}]},then:(e,{type:t})=>({inject:{pluginsByKey:{[df]:{editor:{insertData:{preInsert:()=>_n(e,{match:{type:t}})}}}}}})},{key:sn,isElement:!0}]});var nHe=de(Re(),1);var aHe=de(Pee(),1);var Oee=de(Re(),1);var Ree=de(Re(),1);var W8e=Object.defineProperty,Aee=Object.getOwnPropertySymbols,G8e=Object.prototype.hasOwnProperty,K8e=Object.prototype.propertyIsEnumerable,Dee=(e,t,r)=>t in e?W8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Y8e=(e,t)=>{for(var r in t||(t={}))G8e.call(t,r)&&Dee(e,r,t[r]);if(Aee)for(var r of Aee(t))K8e.call(t,r)&&Dee(e,r,t[r]);return e};var kee=(e,t,r={})=>{let n={text:""},o={type:re(e,Bh),url:t,children:[n]};ua(e,o,Y8e({nextBlock:!0},r))},X8e=new Set(["ase","art","bmp","blp","cd5","cit","cpt","cr2","cut","dds","dib","djvu","egt","exif","gif","gpl","grf","icns","ico","iff","jng","jpeg","jpg","jfif","jp2","jps","lbm","max","miff","mng","msp","nitf","ota","pbm","pc1","pc2","pc3","pcf","pcx","pdn","pgm","PI1","PI2","PI3","pict","pct","pnm","pns","ppm","psb","psd","pdd","psp","px","pxm","pxr","qfx","raw","rle","sct","sgi","rgb","int","bw","tga","tiff","tif","vtf","xbm","xcf","xpm","3dv","amf","ai","awg","cgm","cdr","cmx","dxf","e2d","egt","eps","fs","gbr","odg","svg","stl","vrml","x3d","sxd","v2d","vnd","wmf","emf","art","xar","png","webp","jxr","hdp","wdp","cur","ecw","iff","lbm","liff","nrrd","pam","pcx","pgf","sgi","rgb","rgba","bw","int","inta","sid","ras","sun","tga"]),Z8e=e=>{if(!ul(e))return!1;let t=new URL(e).pathname.split(".").pop();return X8e.has(t)},Q8e=(e,t)=>{let{insertData:r}=e;return e.insertData=n=>{let o=n.getData("text/plain");if(Z8e(o)){kee(e,o);return}r(n)},e},J8e=(e,t)=>{let{options:{uploadImage:r}}=t,{insertData:n}=e;return e.insertData=o=>{let i=o.getData("text/plain"),{files:a}=o;if(!i&&a&&a.length>0){let s=j0(e,t);if(!XA(s,{data:i,dataTransfer:o}))return n(o);for(let l of a){let u=new FileReader,[c]=l.type.split("/");c==="image"&&(u.addEventListener("load",async()=>{if(!u.result)return;let f=r?await r(u.result):u.result;kee(e,f)}),u.readAsDataURL(l))}}else n(o)},e},eHe=(e,t)=>{let{options:{disableUploadInsert:r,disableEmbedInsert:n}}=t;return r||(e=J8e(e,t)),n||(e=Q8e(e,t)),e},Bh="img",xTt=He({key:Bh,isElement:!0,isVoid:!0,withOverrides:eHe,then:(e,{type:t})=>({deserializeHtml:{rules:[{validNodeName:"IMG"}],getNode:r=>({type:t,url:r.getAttribute("src")})}})}),tHe=()=>{let{url:e}=cf();return{props:{src:e,draggable:!0}}},_Tt=ai("img")({propsHook:tHe});var rHe="media",oHe=e=>{var t,r;if(e.slice(0,4)!=="http"){let n=/src=".*?"/,o=/"([^"]*)"/,i=(t=e.match(n))==null?void 0:t[0],a=(r=i==null?void 0:i.match(o))==null?void 0:r[1];a&&(e=a)}return e},iHe="media_embed",STt=He({key:iHe,isElement:!0,isVoid:!0,options:{transformUrl:oHe},then:(e,{type:t})=>({deserializeHtml:{rules:[{validNodeName:"IFRAME"}],getNode:r=>{let n=r.getAttribute("src");if(n)return{type:t,url:n}}}})}),TTt=new RegExp("^https?:\\/\\/twitter\\.com\\/(?:#!\\/)?(\\w+)\\/status(es)?\\/(?<id>\\d+)");var Iee=Ed("floatingMedia")({url:"",isEditing:!1}).extendActions(e=>({reset:()=>{e.url(""),e.isEditing(!1)}})),Rf=Iee.set,_k=Iee.get;var sHe=()=>{let e=cf();return{props:{onClick:Oee.default.useCallback(()=>{Rf.url(e.url),Rf.isEditing(!0)},[e.url])}}},DTt=ai("button")({propsHook:sHe}),lHe=(e,{element:t,pluginKey:r=rHe})=>{let n=_k.url();if(n===t.url)return Rf.reset(),!0;let{isUrl:o=ul,transformUrl:i}=oi(e,r);if(o(n))return i&&(n=i(n)),Qa(e,{url:n}),Rf.reset(),bg(e,e.selection),!0},uHe=({pluginKey:e}={})=>{let t=ii(),r=cf();return uy("enter",n=>{lHe(t,{element:r,pluginKey:e})&&n.preventDefault()},{enableOnFormTags:["INPUT"]},[]),uy("escape",()=>{_k.isEditing()&&(Rf.reset(),bg(t,t.selection))},{enableOnFormTags:["INPUT"],enableOnContentEditable:!0},[]),{defaultValue:_k.url()}},cHe=({defaultValue:e})=>({props:{onChange:Ree.default.useCallback(r=>{Rf.url(r.target.value)},[]),autoFocus:!0,defaultValue:e}}),ITt=ai("input")({stateHook:uHe,propsHook:cHe});var Nf="p",LTt=He({key:Nf,isElement:!0,handlers:{onKeyDown:pl},options:{hotkey:["mod+opt+0","mod+shift+0"]},deserializeHtml:{rules:[{validNodeName:"P"}],query:e=>e.style.fontFamily!=="Consolas"}});var wl=(e,t,r)=>{let{children:n}=e;return n?n.flatMap(o=>gx(o,t,r)):[]};var Nee={heading:{transform:(e,t,r)=>{let n={1:ik,2:ak,3:sk,4:lk,5:uk,6:ck}[e.depth??1];return[...ds(e,t,r),{type:re(r.editor,n),children:wl(e,e.position.end.line,r)}]}},list:{transform:(e,t,r)=>{if(r.indentList){let n=e.ordered?"decimal":"disc",o=(i,a=[],s=1)=>(i.children.forEach(l=>{let[u,...c]=l.children;a.push({type:re(r.editor,Nf),listStyleType:n,indent:s,children:wl(u||"",e.position.end.line,r)}),c.forEach(f=>{o(f,a,s+1)})}),a);return[...ds(e,t,r),o(e)]}else return[...ds(e,t,r),{type:re(r.editor,e.ordered?Qu:Zu),children:wl(e,e.position.end.line,r)}]}},listItem:{transform:(e,t,r)=>({type:re(r.editor,tr),children:wl(e,e.position.end.line,r).map(n=>({...n,type:n.type===re(r.editor,Nf)?re(r.editor,sn):n.type}))})},paragraph:{transform:(e,t,r)=>{let n=wl(e,e.position.end.line,r),o=re(r.editor,Nf),i=new Set([re(r.editor,Bh)]),a=[],s=[],l=()=>{s.length>0&&(a.push({type:o,children:s}),s=[])};return n.forEach(u=>{let{type:c}=u;c&&i.has(c)?(l(),a.push(u)):s.push(u)}),l(),[...ds(e,t,r),...a]}},link:{transform:(e,t,r)=>[...ds(e,t,r),{type:re(r.editor,Rr),url:e.url,children:wl(e,e.position.end.line,r)}]},image:{transform:(e,t,r)=>[...ds(e,t,r),{type:re(r.editor,Bh),children:[{text:""}],url:e.url,caption:[{text:e.alt}]}]},blockquote:{transform:(e,t,r)=>[...ds(e,t,r),{type:re(r.editor,ok),children:e.children.flatMap(n=>wl(n,e.position.end.line,r))}]},code:{transform:(e,t,r)=>[...ds(e,t,r),{type:re(r.editor,qu),lang:e.lang??void 0,children:(e.value||"").split(`
|
|
47
|
-
`).map(n=>({type:re(r.editor,yl),children:[{text:n}]}))}]},thematicBreak:{transform:(e,t,r)=>[...ds(e,t,r),{type:re(r.editor,dk),children:[{text:""}]}]}},ds=(e,t,r)=>{let n=e.position.start.line-t,o=[];return n>1&&o.push(...Array(n-1).fill({type:re(r.editor,Nf),children:[{text:""}]})),o};var Lee=(e,t)=>{let{elementRules:r,textRules:n,indentList:o}=oi(e,Fx);return Th().use(Pf).use(hx,{editor:e,elementRules:r,textRules:n,indentList:o}).processSync(t).result};var Bee=e=>{let t=[dHe()],r=JA({plugins:t}),{elementRules:n,textRules:o,indentList:i}=oi(r,Fx);return Th().use(Pf).use(hx,{editor:r,elementRules:n,textRules:o,indentList:i}).processSync(e).result},Fx="deserializeMd",dHe=He({key:Fx,then:e=>({editor:{insertData:{format:"text/plain",query:({data:t,dataTransfer:r})=>{if(r.getData("text/html"))return!1;let{files:o}=r;return!(!(o!=null&&o.length)&&ul(t))},getFragment:({data:t})=>Lee(e,t)}}}),options:{elementRules:Nee,textRules:mx,indentList:!1}});var _l={paragraph:"p",blockquote:"blockquote",code_block:"code_block",link:"a",ul_list:"ul",ol_list:"ol",listItem:"li",listItemChild:"lic",heading:{1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},emphasis_mark:"italic",strong_mark:"bold",delete_mark:"strikeThrough",inline_code_mark:"code",thematic_break:"thematic_break",image:"image",variable:"variable","inline-variable":"inline-variable"};var Ck=de(Mee()),Lf=e=>typeof e.text=="string",mHe=["thematic_break","image"],$ee="<br>";function Bf(e,t={nodeTypes:_l}){let{nodeTypes:r=_l,ignoreParagraphNewline:n=!1,listDepth:o=-1}=t,i=e.text||"",a=e.type||"",s={..._l,...r,heading:{..._l.heading,...r.heading}};if("type"in e&&e.type===s["inline-variable"])return e.children.map(c=>Bf({...c,parentType:s["inline-variable"]},t)).join("");let l=[s.ul_list,s.ol_list],u=i;if(Lf(e)||(u=e.children.map((c,f)=>{let d=Lf(c)?!1:l.includes(c.type||""),p=l.includes(e.type||""),v=!1;return!Lf(e)&&Array.isArray(e.children)&&(v=e.children.some(h=>!Lf(h)&&h.type===s.link)),Bf({...c,parentType:a===s.listItem?e.parentType:a,listIndex:a===s.listItem?e.listIndex:f+1},{flavour:t.flavour,nodeTypes:s,ignoreParagraphNewline:(n||d||p||v)&&!c.break,listDepth:l.includes(c.type||"")?o+1:o})}).join("")),!n&&(i===""||i===`
|
|
48
|
-
`)&&e.parentType===s.paragraph&&(a=s.paragraph,u=$ee),!(u===""&&!mHe.find(c=>s[c]===a))){if(u!==$ee&&Lf(e)){if(e.strikeThrough&&e.bold&&e.italic)t.flavour==="whatsapp"?u=xa(u,"*_~"):u=xa(u,"~~***");else if(e.bold&&e.italic)t.flavour==="whatsapp"?u=xa(u,"*_"):u=xa(u,"***");else if(e.bold&&(t.flavour==="whatsapp"?u=xa(u,"*"):u=xa(u,"**")),e.italic&&(u=xa(u,"_")),e.strikeThrough&&(u=xa(u,"~~")),e.code&&(t.flavour==="whatsapp"?u=xa(u,"```"):u=xa(u,"`")),e.underline){let c=u.trim();c.length===u.length?u=`<u>${u}</u>`:u=u.replace(c,`<u>${c}</u>`)}}if(e.parentType===s["inline-variable"])return t.flavour==="whatsapp"?u:(0,Ck.default)(u);switch(a){case s.heading[1]:return`# ${u}
|
|
49
|
-
`;case s.heading[2]:return`## ${u}
|
|
50
|
-
`;case s.heading[3]:return`### ${u}
|
|
51
|
-
`;case s.heading[4]:return`#### ${u}
|
|
52
|
-
`;case s.heading[5]:return`##### ${u}
|
|
53
|
-
`;case s.heading[6]:return`###### ${u}
|
|
54
|
-
`;case s.blockquote:return`> ${u}
|
|
55
|
-
`;case s.code_block:return`\`\`\`${e.language||""}
|
|
56
|
-
${u}
|
|
57
|
-
\`\`\`
|
|
58
|
-
`;case s.link:return`[${u}](${e.url||""})`;case s.image:return``;case s.listItemChild:let c=e&&e.parentType===s.ol_list,f="listIndex"in e?e.listIndex:void 0,d=e.children.length===1&&Lf(e.children[0]),p="";for(let v=0;o>v;v++)c?p+=" ":p+=" ";return`${p}${c?`${f}.`:"-"} ${u}${d?`
|
|
59
|
-
`:""}`;case s.paragraph:return e.parentType===s["inline-variable"]?u:`${u}
|
|
60
|
-
`;case s.thematic_break:return`---
|
|
61
|
-
`;default:return t.flavour==="whatsapp"?u:(0,Ck.default)(u)}}}function xa(e,t){let r=e.trim(),n=r,o=`${t}${n}${Uee(t)}`;if(n.length===e.length)return o;let i=t+n+Uee(t);return e.replace(r,i)}var Uee=e=>e.split("").reverse().join("");var jee=(e,t)=>{let r=e.reduce((n,o)=>{if(o.type==="variable")return[...n,...o.children.reduce((a,s)=>{let l=Bf(s,{nodeTypes:_l,flavour:t==null?void 0:t.flavour});return!l||l===`<br>
|
|
62
|
-
|
|
63
|
-
`?[...a,`
|
|
64
|
-
`]:[...a,l]},[])];let i=Bf(o,{nodeTypes:_l,flavour:t==null?void 0:t.flavour});return!i||i===`<br>
|
|
65
|
-
|
|
66
|
-
`?[...n,`
|
|
67
|
-
`]:[...n,i]},[]).join("");return r.endsWith(`
|
|
68
|
-
`)?r.slice(0,-1):r};function Pk(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ec=Pk();function Wee(e){ec=e}var Gee=/[&<>"']/,gHe=new RegExp(Gee.source,"g"),Kee=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,hHe=new RegExp(Kee.source,"g"),vHe={"&":"&","<":"<",">":">",'"':""","'":"'"},qee=e=>vHe[e];function ko(e,t){if(t){if(Gee.test(e))return e.replace(gHe,qee)}else if(Kee.test(e))return e.replace(hHe,qee);return e}var yHe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function bHe(e){return e.replace(yHe,(t,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}var EHe=/(^|[^\[])\^/g;function Lt(e,t){e=typeof e=="string"?e:e.source,t=t||"";let r={replace:(n,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(EHe,"$1"),e=e.replace(n,o),r),getRegex:()=>new RegExp(e,t)};return r}function zee(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}var Mx={exec:()=>null};function Vee(e,t){let r=e.replace(/\|/g,(i,a,s)=>{let l=!1,u=a;for(;--u>=0&&s[u]==="\\";)l=!l;return l?"|":" |"}),n=r.split(/ \|/),o=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(/\\\|/g,"|");return n}function Sk(e,t,r){let n=e.length;if(n===0)return"";let o=0;for(;o<n;){let i=e.charAt(n-o-1);if(i===t&&!r)o++;else if(i!==t&&r)o++;else break}return e.slice(0,n-o)}function xHe(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return-1}function Hee(e,t,r,n){let o=t.href,i=t.title?ko(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){n.state.inLink=!0;let s={type:"link",raw:r,href:o,title:i,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,s}return{type:"image",raw:r,href:o,title:i,text:ko(a)}}function wHe(e,t){let r=e.match(/^(\s+)(?:```)/);if(r===null)return t;let n=r[1];return t.split(`
|
|
69
|
-
`).map(o=>{let i=o.match(/^\s+/);if(i===null)return o;let[a]=i;return a.length>=n.length?o.slice(n.length):o}).join(`
|
|
70
|
-
`)}var Mf=class{options;rules;lexer;constructor(t){this.options=t||ec}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let n=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Sk(n,`
|
|
71
|
-
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let n=r[0],o=wHe(n,r[3]||"");return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline._escapes,"$1"):r[2],text:o}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let n=r[2].trim();if(/#$/.test(n)){let o=Sk(n,"#");(this.options.pedantic||!o||/ $/.test(o))&&(n=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:r[0]}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let n=r[0].replace(/^ *>[ \t]?/gm,""),o=this.lexer.state.top;this.lexer.state.top=!0;let i=this.lexer.blockTokens(n);return this.lexer.state.top=o,{type:"blockquote",raw:r[0],tokens:i,text:n}}}list(t){let r=this.rules.block.list.exec(t);if(r){let n=r[1].trim(),o=n.length>1,i={type:"list",raw:"",ordered:o,start:o?+n.slice(0,-1):"",loose:!1,items:[]};n=o?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=o?n:"[*+-]");let a=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),s="",l="",u=!1;for(;t;){let c=!1;if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;s=r[0],t=t.substring(s.length);let f=r[2].split(`
|
|
72
|
-
`,1)[0].replace(/^\t+/,g=>" ".repeat(3*g.length)),d=t.split(`
|
|
73
|
-
`,1)[0],p=0;this.options.pedantic?(p=2,l=f.trimStart()):(p=r[2].search(/[^ ]/),p=p>4?1:p,l=f.slice(p),p+=r[1].length);let v=!1;if(!f&&/^ *$/.test(d)&&(s+=d+`
|
|
74
|
-
`,t=t.substring(d.length+1),c=!0),!c){let g=new RegExp(`^ {0,${Math.min(3,p-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),m=new RegExp(`^ {0,${Math.min(3,p-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),b=new RegExp(`^ {0,${Math.min(3,p-1)}}(?:\`\`\`|~~~)`),E=new RegExp(`^ {0,${Math.min(3,p-1)}}#`);for(;t;){let C=t.split(`
|
|
75
|
-
`,1)[0];if(d=C,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),b.test(d)||E.test(d)||g.test(d)||m.test(t))break;if(d.search(/[^ ]/)>=p||!d.trim())l+=`
|
|
76
|
-
`+d.slice(p);else{if(v||f.search(/[^ ]/)>=4||b.test(f)||E.test(f)||m.test(f))break;l+=`
|
|
77
|
-
`+d}!v&&!d.trim()&&(v=!0),s+=C+`
|
|
78
|
-
`,t=t.substring(C.length+1),f=d.slice(p)}}i.loose||(u?i.loose=!0:/\n *\n *$/.test(s)&&(u=!0));let h=null,y;this.options.gfm&&(h=/^\[[ xX]\] /.exec(l),h&&(y=h[0]!=="[ ] ",l=l.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!h,checked:y,loose:!1,text:l,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=s.trimEnd(),i.items[i.items.length-1].text=l.trimEnd(),i.raw=i.raw.trimEnd();for(let c=0;c<i.items.length;c++)if(this.lexer.state.top=!1,i.items[c].tokens=this.lexer.blockTokens(i.items[c].text,[]),!i.loose){let f=i.items[c].tokens.filter(p=>p.type==="space"),d=f.length>0&&f.some(p=>/\n.*\n/.test(p.raw));i.loose=d}if(i.loose)for(let c=0;c<i.items.length;c++)i.items[c].loose=!0;return i}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let n=r[1].toLowerCase().replace(/\s+/g," "),o=r[2]?r[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline._escapes,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:o,title:i}}}table(t){let r=this.rules.block.table.exec(t);if(r){if(!/[:|]/.test(r[2]))return;let n={type:"table",raw:r[0],header:Vee(r[1]).map(o=>({text:o,tokens:[]})),align:r[2].replace(/^\||\| *$/g,"").split("|"),rows:r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(`
|
|
79
|
-
`):[]};if(n.header.length===n.align.length){let o=n.align.length,i,a,s,l;for(i=0;i<o;i++){let u=n.align[i];u&&(/^ *-+: *$/.test(u)?n.align[i]="right":/^ *:-+: *$/.test(u)?n.align[i]="center":/^ *:-+ *$/.test(u)?n.align[i]="left":n.align[i]=null)}for(o=n.rows.length,i=0;i<o;i++)n.rows[i]=Vee(n.rows[i],n.header.length).map(u=>({text:u,tokens:[]}));for(o=n.header.length,a=0;a<o;a++)n.header[a].tokens=this.lexer.inline(n.header[a].text);for(o=n.rows.length,a=0;a<o;a++)for(l=n.rows[a],s=0;s<l.length;s++)l[s].tokens=this.lexer.inline(l[s].text);return n}}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let n=r[1].charAt(r[1].length-1)===`
|
|
80
|
-
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:ko(r[1])}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&/^<a /i.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let n=r[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;let a=Sk(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=xHe(r[2],"()");if(a>-1){let l=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let o=r[2],i="";if(this.options.pedantic){let a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);a&&(o=a[1],i=a[3])}else i=r[3]?r[3].slice(1,-1):"";return o=o.trim(),/^</.test(o)&&(this.options.pedantic&&!/>$/.test(n)?o=o.slice(1):o=o.slice(1,-1)),Hee(r,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},r[0],this.lexer)}}reflink(t,r){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let o=(n[2]||n[1]).replace(/\s+/g," ");if(o=r[o.toLowerCase()],!o){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return Hee(n,o,n[0],this.lexer)}}emStrong(t,r,n=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let a=[...o[0]].length-1,s,l,u=a,c=0,f=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(f.lastIndex=0,r=r.slice(-1*t.length+o[0].length-1);(o=f.exec(r))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(l=[...s].length,o[3]||o[4]){u+=l;continue}else if((o[5]||o[6])&&a%3&&!((a+l)%3)){c+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+c);let d=[...t].slice(0,a+o.index+l+1).join("");if(Math.min(a,l)%2){let v=d.slice(1,-1);return{type:"em",raw:d,text:v,tokens:this.lexer.inlineTokens(v)}}let p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let n=r[2].replace(/\n/g," "),o=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return o&&i&&(n=n.substring(1,n.length-1)),n=ko(n,!0),{type:"codespan",raw:r[0],text:n}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let n,o;return r[2]==="@"?(n=ko(r[1]),o="mailto:"+n):(n=ko(r[1]),o=n),{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let n,o;if(r[2]==="@")n=ko(r[0]),o="mailto:"+n;else{let i;do i=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(i!==r[0]);n=ko(r[0]),r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let n;return this.lexer.state.inRawBlock?n=r[0]:n=ko(r[0]),{type:"text",raw:r[0],text:n}}}},We={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Mx,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};We._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;We._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;We.def=Lt(We.def).replace("label",We._label).replace("title",We._title).getRegex();We.bullet=/(?:[*+-]|\d{1,9}[.)])/;We.listItemStart=Lt(/^( *)(bull) */).replace("bull",We.bullet).getRegex();We.list=Lt(We.list).replace(/bull/g,We.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+We.def.source+")").getRegex();We._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";We._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;We.html=Lt(We.html,"i").replace("comment",We._comment).replace("tag",We._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();We.lheading=Lt(We.lheading).replace(/bull/g,We.bullet).getRegex();We.paragraph=Lt(We._paragraph).replace("hr",We.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",We._tag).getRegex();We.blockquote=Lt(We.blockquote).replace("paragraph",We.paragraph).getRegex();We.normal={...We};We.gfm={...We.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};We.gfm.table=Lt(We.gfm.table).replace("hr",We.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",We._tag).getRegex();We.gfm.paragraph=Lt(We._paragraph).replace("hr",We.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",We.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",We._tag).getRegex();We.pedantic={...We.normal,html:Lt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",We._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Mx,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Lt(We.normal._paragraph).replace("hr",We.hr).replace("heading",` *#{1,6} *[^
|
|
81
|
-
]`).replace("lheading",We.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};var Ce={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Mx,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Mx,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^((?![*_])[\spunctuation])/};Ce._punctuation="\\p{P}$+<=>`^|~";Ce.punctuation=Lt(Ce.punctuation,"u").replace(/punctuation/g,Ce._punctuation).getRegex();Ce.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;Ce.anyPunctuation=/\\[punct]/g;Ce._escapes=/\\([punct])/g;Ce._comment=Lt(We._comment).replace("(?:-->|$)","-->").getRegex();Ce.emStrong.lDelim=Lt(Ce.emStrong.lDelim,"u").replace(/punct/g,Ce._punctuation).getRegex();Ce.emStrong.rDelimAst=Lt(Ce.emStrong.rDelimAst,"gu").replace(/punct/g,Ce._punctuation).getRegex();Ce.emStrong.rDelimUnd=Lt(Ce.emStrong.rDelimUnd,"gu").replace(/punct/g,Ce._punctuation).getRegex();Ce.anyPunctuation=Lt(Ce.anyPunctuation,"gu").replace(/punct/g,Ce._punctuation).getRegex();Ce._escapes=Lt(Ce._escapes,"gu").replace(/punct/g,Ce._punctuation).getRegex();Ce._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;Ce._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;Ce.autolink=Lt(Ce.autolink).replace("scheme",Ce._scheme).replace("email",Ce._email).getRegex();Ce._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;Ce.tag=Lt(Ce.tag).replace("comment",Ce._comment).replace("attribute",Ce._attribute).getRegex();Ce._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;Ce._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;Ce._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;Ce.link=Lt(Ce.link).replace("label",Ce._label).replace("href",Ce._href).replace("title",Ce._title).getRegex();Ce.reflink=Lt(Ce.reflink).replace("label",Ce._label).replace("ref",We._label).getRegex();Ce.nolink=Lt(Ce.nolink).replace("ref",We._label).getRegex();Ce.reflinkSearch=Lt(Ce.reflinkSearch,"g").replace("reflink",Ce.reflink).replace("nolink",Ce.nolink).getRegex();Ce.normal={...Ce};Ce.pedantic={...Ce.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Lt(/^!?\[(label)\]\((.*?)\)/).replace("label",Ce._label).getRegex(),reflink:Lt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ce._label).getRegex()};Ce.gfm={...Ce.normal,escape:Lt(Ce.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/};Ce.gfm.url=Lt(Ce.gfm.url,"i").replace("email",Ce.gfm._extended_email).getRegex();Ce.breaks={...Ce.gfm,br:Lt(Ce.br).replace("{2,}","*").getRegex(),text:Lt(Ce.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};var fs=class e{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ec,this.options.tokenizer=this.options.tokenizer||new Mf,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={block:We.normal,inline:Ce.normal};this.options.pedantic?(r.block=We.pedantic,r.inline=Ce.pedantic):this.options.gfm&&(r.block=We.gfm,this.options.breaks?r.inline=Ce.breaks:r.inline=Ce.gfm),this.tokenizer.rules=r}static get rules(){return{block:We,inline:Ce}}static lex(t,r){return new e(r).lex(t)}static lexInline(t,r){return new e(r).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
|
|
82
|
-
`),this.blockTokens(t,this.tokens);let r;for(;r=this.inlineQueue.shift();)this.inlineTokens(r.src,r.tokens);return this.tokens}blockTokens(t,r=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(s,l,u)=>l+" ".repeat(u.length));let n,o,i,a;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(n=s.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length),n.raw.length===1&&r.length>0?r[r.length-1].raw+=`
|
|
83
|
-
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=`
|
|
84
|
-
`+n.raw,o.text+=`
|
|
85
|
-
`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=`
|
|
86
|
-
`+n.raw,o.text+=`
|
|
87
|
-
`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0,l=t.slice(1),u;this.options.extensions.startBlock.forEach(c=>{u=c.call({lexer:this},l),typeof u=="number"&&u>=0&&(s=Math.min(s,u))}),s<1/0&&s>=0&&(i=t.substring(0,s+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i))){o=r[r.length-1],a&&o.type==="paragraph"?(o.raw+=`
|
|
88
|
-
`+n.raw,o.text+=`
|
|
89
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):r.push(n),a=i.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&o.type==="text"?(o.raw+=`
|
|
90
|
-
`+n.raw,o.text+=`
|
|
91
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):r.push(n);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n,o,i,a=t,s,l,u;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)c.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(n=c.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),o=r[r.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),o=r[r.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(n=this.tokenizer.emStrong(t,a,u)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),r.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),r.push(n);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0,f=t.slice(1),d;this.options.extensions.startInline.forEach(p=>{d=p.call({lexer:this},f),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(i=t.substring(0,c+1))}if(n=this.tokenizer.inlineText(i)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(u=n.raw.slice(-1)),l=!0,o=r[r.length-1],o&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):r.push(n);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return r}},$f=class{options;constructor(t){this.options=t||ec}code(t,r,n){var i;let o=(i=(r||"").match(/^\S*/))==null?void 0:i[0];return t=t.replace(/\n$/,"")+`
|
|
92
|
-
`,o?'<pre><code class="language-'+ko(o)+'">'+(n?t:ko(t,!0))+`</code></pre>
|
|
93
|
-
`:"<pre><code>"+(n?t:ko(t,!0))+`</code></pre>
|
|
94
|
-
`}blockquote(t){return`<blockquote>
|
|
95
|
-
${t}</blockquote>
|
|
96
|
-
`}html(t,r){return t}heading(t,r,n){return`<h${r}>${t}</h${r}>
|
|
97
|
-
`}hr(){return`<hr>
|
|
98
|
-
`}list(t,r,n){let o=r?"ol":"ul",i=r&&n!==1?' start="'+n+'"':"";return"<"+o+i+`>
|
|
99
|
-
`+t+"</"+o+`>
|
|
100
|
-
`}listitem(t,r,n){return`<li>${t}</li>
|
|
101
|
-
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){return`<p>${t}</p>
|
|
102
|
-
`}table(t,r){return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
103
|
-
<thead>
|
|
104
|
-
`+t+`</thead>
|
|
105
|
-
`+r+`</table>
|
|
106
|
-
`}tablerow(t){return`<tr>
|
|
107
|
-
${t}</tr>
|
|
108
|
-
`}tablecell(t,r){let n=r.header?"th":"td";return(r.align?`<${n} align="${r.align}">`:`<${n}>`)+t+`</${n}>
|
|
109
|
-
`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,r,n){let o=zee(t);if(o===null)return n;t=o;let i='<a href="'+t+'"';return r&&(i+=' title="'+r+'"'),i+=">"+n+"</a>",i}image(t,r,n){let o=zee(t);if(o===null)return n;t=o;let i=`<img src="${t}" alt="${n}"`;return r&&(i+=` title="${r}"`),i+=">",i}text(t){return t}},Fh=class{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,r,n){return""+n}image(t,r,n){return""+n}br(){return""}},ps=class e{options;renderer;textRenderer;constructor(t){this.options=t||ec,this.options.renderer=this.options.renderer||new $f,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Fh}static parse(t,r){return new e(r).parse(t)}static parseInline(t,r){return new e(r).parseInline(t)}parse(t,r=!0){let n="";for(let o=0;o<t.length;o++){let i=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){let a=i,s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){n+=s||"";continue}}switch(i.type){case"space":continue;case"hr":{n+=this.renderer.hr();continue}case"heading":{let a=i;n+=this.renderer.heading(this.parseInline(a.tokens),a.depth,bHe(this.parseInline(a.tokens,this.textRenderer)));continue}case"code":{let a=i;n+=this.renderer.code(a.text,a.lang,!!a.escaped);continue}case"table":{let a=i,s="",l="";for(let c=0;c<a.header.length;c++)l+=this.renderer.tablecell(this.parseInline(a.header[c].tokens),{header:!0,align:a.align[c]});s+=this.renderer.tablerow(l);let u="";for(let c=0;c<a.rows.length;c++){let f=a.rows[c];l="";for(let d=0;d<f.length;d++)l+=this.renderer.tablecell(this.parseInline(f[d].tokens),{header:!1,align:a.align[d]});u+=this.renderer.tablerow(l)}n+=this.renderer.table(s,u);continue}case"blockquote":{let a=i,s=this.parse(a.tokens);n+=this.renderer.blockquote(s);continue}case"list":{let a=i,s=a.ordered,l=a.start,u=a.loose,c="";for(let f=0;f<a.items.length;f++){let d=a.items[f],p=d.checked,v=d.task,h="";if(d.task){let y=this.renderer.checkbox(!!p);u?d.tokens.length>0&&d.tokens[0].type==="paragraph"?(d.tokens[0].text=y+" "+d.tokens[0].text,d.tokens[0].tokens&&d.tokens[0].tokens.length>0&&d.tokens[0].tokens[0].type==="text"&&(d.tokens[0].tokens[0].text=y+" "+d.tokens[0].tokens[0].text)):d.tokens.unshift({type:"text",text:y+" "}):h+=y+" "}h+=this.parse(d.tokens,u),c+=this.renderer.listitem(h,v,!!p)}n+=this.renderer.list(c,s,l);continue}case"html":{let a=i;n+=this.renderer.html(a.text,a.block);continue}case"paragraph":{let a=i;n+=this.renderer.paragraph(this.parseInline(a.tokens));continue}case"text":{let a=i,s=a.tokens?this.parseInline(a.tokens):a.text;for(;o+1<t.length&&t[o+1].type==="text";)a=t[++o],s+=`
|
|
110
|
-
`+(a.tokens?this.parseInline(a.tokens):a.text);n+=r?this.renderer.paragraph(s):s;continue}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(t,r){r=r||this.renderer;let n="";for(let o=0;o<t.length;o++){let i=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){let a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=a||"";continue}}switch(i.type){case"escape":{let a=i;n+=r.text(a.text);break}case"html":{let a=i;n+=r.html(a.text);break}case"link":{let a=i;n+=r.link(a.href,a.title,this.parseInline(a.tokens,r));break}case"image":{let a=i;n+=r.image(a.href,a.title,a.text);break}case"strong":{let a=i;n+=r.strong(this.parseInline(a.tokens,r));break}case"em":{let a=i;n+=r.em(this.parseInline(a.tokens,r));break}case"codespan":{let a=i;n+=r.codespan(a.text);break}case"br":{n+=r.br();break}case"del":{let a=i;n+=r.del(this.parseInline(a.tokens,r));break}case"text":{let a=i;n+=r.text(a.text);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}},Ff=class{options;constructor(t){this.options=t||ec}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(t){return t}postprocess(t){return t}},Tk=class{defaults=Pk();options=this.setOptions;parse=this.#e(fs.lex,ps.parse);parseInline=this.#e(fs.lexInline,ps.parseInline);Parser=ps;parser=ps.parse;Renderer=$f;TextRenderer=Fh;Lexer=fs;lexer=fs.lex;Tokenizer=Mf;Hooks=Ff;constructor(...t){this.use(...t)}walkTokens(t,r){var o,i;let n=[];for(let a of t)switch(n=n.concat(r.call(this,a)),a.type){case"table":{let s=a;for(let l of s.header)n=n.concat(this.walkTokens(l.tokens,r));for(let l of s.rows)for(let u of l)n=n.concat(this.walkTokens(u.tokens,r));break}case"list":{let s=a;n=n.concat(this.walkTokens(s.items,r));break}default:{let s=a;(i=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(l=>{n=n.concat(this.walkTokens(s[l],r))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,r)))}}return n}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let o={...n};if(o.async=this.defaults.async||o.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=r.renderers[i.name];a?r.renderers[i.name]=function(...s){let l=i.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:r.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[i.level];a?a.unshift(i.tokenizer):r[i.level]=[i.tokenizer],i.start&&(i.level==="block"?r.startBlock?r.startBlock.push(i.start):r.startBlock=[i.start]:i.level==="inline"&&(r.startInline?r.startInline.push(i.start):r.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(r.childTokens[i.name]=i.childTokens)}),o.extensions=r),n.renderer){let i=this.defaults.renderer||new $f(this.defaults);for(let a in n.renderer){let s=n.renderer[a],l=a,u=i[l];i[l]=(...c)=>{let f=s.apply(i,c);return f===!1&&(f=u.apply(i,c)),f||""}}o.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new Mf(this.defaults);for(let a in n.tokenizer){let s=n.tokenizer[a],l=a,u=i[l];i[l]=(...c)=>{let f=s.apply(i,c);return f===!1&&(f=u.apply(i,c)),f}}o.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new Ff;for(let a in n.hooks){let s=n.hooks[a],l=a,u=i[l];Ff.passThroughHooks.has(a)?i[l]=c=>{if(this.defaults.async)return Promise.resolve(s.call(i,c)).then(d=>u.call(i,d));let f=s.call(i,c);return u.call(i,f)}:i[l]=(...c)=>{let f=s.apply(i,c);return f===!1&&(f=u.apply(i,c)),f}}o.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,a=n.walkTokens;o.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),i&&(l=l.concat(i.call(this,s))),l}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}#e(t,r){return(n,o)=>{let i={...o},a={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(a.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),a.async=!0);let s=this.#t(!!a.silent,!!a.async);if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(n):n).then(l=>t(l,a)).then(l=>a.walkTokens?Promise.all(this.walkTokens(l,a.walkTokens)).then(()=>l):l).then(l=>r(l,a)).then(l=>a.hooks?a.hooks.postprocess(l):l).catch(s);try{a.hooks&&(n=a.hooks.preprocess(n));let l=t(n,a);a.walkTokens&&this.walkTokens(l,a.walkTokens);let u=r(l,a);return a.hooks&&(u=a.hooks.postprocess(u)),u}catch(l){return s(l)}}}#t(t,r){return n=>{if(n.message+=`
|
|
111
|
-
Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+ko(n.message+"",!0)+"</pre>";return r?Promise.resolve(o):o}if(r)return Promise.reject(n);throw n}}},Ju=new Tk;function Pt(e,t){return Ju.parse(e,t)}Pt.options=Pt.setOptions=function(e){return Ju.setOptions(e),Pt.defaults=Ju.defaults,Wee(Pt.defaults),Pt};Pt.getDefaults=Pk;Pt.defaults=ec;Pt.use=function(...e){return Ju.use(...e),Pt.defaults=Ju.defaults,Wee(Pt.defaults),Pt};Pt.walkTokens=function(e,t){return Ju.walkTokens(e,t)};Pt.parseInline=Ju.parseInline;Pt.Parser=ps;Pt.parser=ps.parse;Pt.Renderer=$f;Pt.TextRenderer=Fh;Pt.Lexer=fs;Pt.lexer=fs.lex;Pt.Tokenizer=Mf;Pt.Hooks=Ff;Pt.parse=Pt;var PPt=Pt.options,APt=Pt.setOptions,DPt=Pt.use,kPt=Pt.walkTokens,OPt=Pt.parseInline;var IPt=ps.parse,RPt=fs.lex;var $x=de(Yee());Pt.use({renderer:{link:(e,t,r)=>`<a href="${e}" target="_blank" rel="noopener noreferrer">${r}</a>`},gfm:!0});var Xee=(e,t)=>{if(!e)return"";let{enableCodeBlocksMode:r}=t??{};if(!r){let a=Pt.parse(e,{breaks:!0}).replace(/<u>/g,"<u>").replace(/<\/u>/g,"</u>");return $x.default.sanitize(a,{ADD_ATTR:["target"]})}return e.split("```").map((i,a)=>{if(a%2===0)return i.split(`
|
|
112
|
-
|
|
113
|
-
`).map(u=>{let f=Pt.parse(u.replace(/【.+】/g,""),{breaks:!0}).replace(/<u>/g,"<u>").replace(/<\/u>/g,"</u>");return $x.default.sanitize(f,{ADD_ATTR:["target"]})}).join("");let l=Pt.parse("```"+i+"```",{breaks:!0}).replace(/<u>/g,"<u>").replace(/<\/u>/g,"</u>");return $x.default.sanitize(l,{ADD_ATTR:["target"]})}).join("")};var Zee=e=>e.map(t=>t.text??Zee(t.children)).join("");function Mh(e,t){return((t==null?void 0:t.format)??"richText")==="html"?Xee(e,{enableCodeBlocksMode:(t==null?void 0:t.enableCodeBlocksMode)??!1}):Bee(e)}function Qee(e,t){return((t==null?void 0:t.format)??"markdown")==="plain"?Zee(e):jee(e,{flavour:(t==null?void 0:t.flavour)??"common"})}var kk=({bubbleContent:e,typingSettings:t})=>{var l;let r=((l=e.match(/(\w+)/g))==null?void 0:l.length)??0;r===0&&(r=e.length);let{enabled:n,speed:o,maxDelay:i}={enabled:(t==null?void 0:t.enabled)??Sr.typingEmulation.enabled,speed:(t==null?void 0:t.speed)??Sr.typingEmulation.speed,maxDelay:(t==null?void 0:t.maxDelay)??Sr.typingEmulation.maxDelay},s=n?r/o*6e4:0;return s>i*1e3&&(s=i*1e3),s};function Jee(e){let t=e.runtimeEnvStrict??e.runtimeEnv??process.env;if(e.emptyStringAsUndefined??!1)for(let[g,m]of Object.entries(t))m===""&&delete t[g];if(!!e.skipValidation)return t;let o=typeof e.client=="object"?e.client:{},i=typeof e.server=="object"?e.server:{},a=typeof e.shared=="object"?e.shared:{},s=se.object(o),l=se.object(i),u=se.object(a),c=e.isServer??typeof window>"u",f=s.merge(u),d=l.merge(u).merge(s),p=c?d.safeParse(t):f.safeParse(t),v=e.onValidationError??(g=>{throw console.error("\u274C Invalid environment variables:",g.flatten().fieldErrors),new Error("Invalid environment variables")}),h=e.onInvalidAccess??(g=>{throw new Error("\u274C Attempted to access a server-side environment variable on the client")});return p.success===!1?v(p.error):new Proxy(p.data,{get(g,m){if(!(typeof m!="string"||m==="__esModule"||m==="$$typeof"))return!c&&e.clientPrefix&&!m.startsWith(e.clientPrefix)&&u.shape[m]===void 0?h(m):g[m]}})}var _He="NEXT_PUBLIC_";function ete(e){let t=typeof e.client=="object"?e.client:{},r=typeof e.server=="object"?e.server:{},n=e.shared,o=e.runtimeEnv?e.runtimeEnv:{...process.env,...e.experimental__runtimeEnv};return Jee({...e,shared:n,client:t,server:r,clientPrefix:_He,runtimeEnv:o})}var CHe=e=>e&&typeof e=="string"&&e.length>0||process.env.VERCEL_ENV!=="preview"||!process.env.VERCEL_BUILDER_PROJECT_NAME||!process.env.NEXT_PUBLIC_VERCEL_VIEWER_PROJECT_NAME?e:process.env.VERCEL_BRANCH_URL.includes(process.env.VERCEL_BUILDER_PROJECT_NAME)?`https://${process.env.VERCEL_BRANCH_URL}`:`https://${process.env.VERCEL_BRANCH_URL}`.replace(process.env.NEXT_PUBLIC_VERCEL_VIEWER_PROJECT_NAME,process.env.VERCEL_BUILDER_PROJECT_NAME),SHe=e=>e&&typeof e=="string"&&e.length>0||process.env.VERCEL_ENV!=="preview"||!process.env.VERCEL_BUILDER_PROJECT_NAME||!process.env.NEXT_PUBLIC_VERCEL_VIEWER_PROJECT_NAME?e:process.env.VERCEL_BRANCH_URL.includes(process.env.NEXT_PUBLIC_VERCEL_VIEWER_PROJECT_NAME)?`https://${process.env.VERCEL_BRANCH_URL}`:`https://${process.env.VERCEL_BRANCH_URL}`.replace(process.env.VERCEL_BUILDER_PROJECT_NAME,process.env.NEXT_PUBLIC_VERCEL_VIEWER_PROJECT_NAME),wa=se.enum(["true","false"]).transform(e=>e==="true"),Ok={server:{TEST_ENV:wa.optional().default("false"),NODE_ENV:se.enum(["development","staging","production"]).optional(),DATABASE_URL:se.string().url().refine(e=>e.startsWith("postgres")),ENCRYPTION_SECRET:se.string().length(32),NEXTAUTH_URL:se.preprocess(CHe,se.string().url()),DISABLE_SIGNUP:wa.optional().default("false"),ADMIN_EMAIL:se.string().min(1).optional().transform(e=>e==null?void 0:e.split(",")),DEFAULT_WORKSPACE_PLAN:se.enum(["FREE","PERSONAL","BUSINESS","ENTERPRISE","UNLIMITED"]).refine(e=>["FREE","PERSONAL","BUSINESS","ENTERPRISE","UNLIMITED"].includes(e)).default("FREE"),DEBUG:wa.optional().default("false"),CHAT_API_TIMEOUT:se.coerce.number().optional(),RADAR_HIGH_RISK_KEYWORDS:se.string().min(1).transform(e=>e.split(",")).optional(),RADAR_INTERMEDIATE_RISK_KEYWORDS:se.string().min(1).transform(e=>e.split(",")).optional(),RADAR_CUMULATIVE_KEYWORDS:se.string().min(1).transform(e=>e.split("/").map(t=>t.split(",").map(r=>r.split("|")))).optional(),INVITATION_TTL_DAYS:se.coerce.number().optional().default(7)},client:{NEXT_PUBLIC_VIEWER_URL:se.preprocess(SHe,se.string().min(1).transform(e=>e.split(","))),NEXT_PUBLIC_ONBOARDING_BOT_ID:se.string().min(1).optional(),NEXT_PUBLIC_BOT_FILE_UPLOAD_MAX_SIZE:se.coerce.number().optional(),NEXT_PUBLIC_VIEWER_404_TITLE:se.string().optional().default("404"),NEXT_PUBLIC_VIEWER_404_SUBTITLE:se.string().optional().default("The bot you're looking for doesn't exist"),NEXT_PUBLIC_SUPPORT_BOT:se.string().min(1).optional(),NEXT_PUBLIC_BETA_ENV:wa.optional().default("true")},runtimeEnv:{NEXT_PUBLIC_VIEWER_URL:Ut("NEXT_PUBLIC_VIEWER_URL"),NEXT_PUBLIC_ONBOARDING_BOT_ID:Ut("NEXT_PUBLIC_ONBOARDING_BOT_ID"),NEXT_PUBLIC_BOT_FILE_UPLOAD_MAX_SIZE:Ut("NEXT_PUBLIC_BOT_FILE_UPLOAD_MAX_SIZE"),NEXT_PUBLIC_VIEWER_404_TITLE:Ut("NEXT_PUBLIC_VIEWER_404_TITLE"),NEXT_PUBLIC_VIEWER_404_SUBTITLE:Ut("NEXT_PUBLIC_VIEWER_404_SUBTITLE"),NEXT_PUBLIC_SUPPORT_BOT:Ut("NEXT_PUBLIC_SUPPORT_BOT"),NEXT_PUBLIC_BETA_ENV:Ut("NEXT_PUBLIC_BETA_ENV")}},THe={server:{GITHUB_CLIENT_ID:se.string().min(1).optional(),GITHUB_CLIENT_SECRET:se.string().min(1).optional()}},PHe={server:{FACEBOOK_CLIENT_ID:se.string().min(1).optional(),FACEBOOK_CLIENT_SECRET:se.string().min(1).optional()}},Ik={server:{SMTP_USERNAME:se.string().min(1).optional(),SMTP_PASSWORD:se.string().min(1).optional(),SMTP_HOST:se.string().min(1).optional(),SMTP_PORT:se.coerce.number().optional().default(25),SMTP_AUTH_DISABLED:wa.optional().default("false"),SMTP_SECURE:wa.optional().default("false")},client:{NEXT_PUBLIC_SMTP_FROM:se.string().min(1).optional()},runtimeEnv:{NEXT_PUBLIC_SMTP_FROM:Ut("NEXT_PUBLIC_SMTP_FROM")}},AHe={server:{GITLAB_CLIENT_ID:se.string().min(1).optional(),GITLAB_CLIENT_SECRET:se.string().min(1).optional(),GITLAB_BASE_URL:se.string().url().optional().default("https://gitlab.com"),GITLAB_NAME:se.string().min(1).optional().default("GitLab"),GITLAB_REQUIRED_GROUPS:se.string().transform(e=>e?e.split(","):void 0).optional()}},DHe={server:{AZURE_AD_CLIENT_ID:se.string().min(1).optional(),AZURE_AD_CLIENT_SECRET:se.string().min(1).optional(),AZURE_AD_TENANT_ID:se.string().min(1).optional()}},kHe={server:{CUSTOM_OAUTH_NAME:se.string().min(1).optional().default("Custom OAuth"),CUSTOM_OAUTH_SCOPE:se.string().min(1).optional().default("openid profile email"),CUSTOM_OAUTH_CLIENT_ID:se.string().min(1).optional(),CUSTOM_OAUTH_CLIENT_SECRET:se.string().min(1).optional(),CUSTOM_OAUTH_WELL_KNOWN_URL:se.string().url().optional(),CUSTOM_OAUTH_USER_ID_PATH:se.string().min(1).optional().default("id"),CUSTOM_OAUTH_USER_EMAIL_PATH:se.string().min(1).optional().default("email"),CUSTOM_OAUTH_USER_NAME_PATH:se.string().min(1).optional().default("name"),CUSTOM_OAUTH_USER_IMAGE_PATH:se.string().min(1).optional().default("image")}},Rk={server:{GOOGLE_CLIENT_ID:se.string().min(1).optional(),GOOGLE_CLIENT_SECRET:se.string().min(1).optional(),PLAYWRIGHT_GOOGLE_ACCESS_TOKEN:se.string().min(1).optional(),PLAYWRIGHT_GOOGLE_REFRESH_TOKEN:se.string().min(1).optional()},client:{NEXT_PUBLIC_GOOGLE_API_KEY:se.string().min(1).optional()},runtimeEnv:{NEXT_PUBLIC_GOOGLE_API_KEY:Ut("NEXT_PUBLIC_GOOGLE_API_KEY")}},Nk={server:{PLAYWRIGHT_STRIPE_PERSONAL_CUSTOMER_ID:se.string().min(1).optional(),PLAYWRIGHT_STRIPE_BUSINESS_CUSTOMER_ID:se.string().min(1).optional(),PLAYWRIGHT_STRIPE_ENTERPRISE_CUSTOMER_ID:se.string().min(1).optional()},client:{},runtimeEnv:{}},Lk={server:{STRIPE_SECRET_KEY:se.string().min(1).optional(),STRIPE_WEBHOOK_SECRET:se.string().min(1).optional(),STRIPE_PERSONAL_PRICE_ID:se.string().min(1).optional(),STRIPE_PERSONAL_CHATS_PRICE_ID:se.string().min(1).optional(),STRIPE_BUSINESS_PRICE_ID:se.string().min(1).optional(),STRIPE_BUSINESS_CHATS_PRICE_ID:se.string().min(1).optional(),STRIPE_ENTERPRISE_PRICE_ID:se.string().min(1).optional(),STRIPE_ENTERPRISE_CHATS_PRICE_ID:se.string().min(1).optional(),STRIPE_BILLING_ADDRESS_COLLECTION:se.enum(["auto","required"]).default("auto"),STRIPE_AUTOMATIC_TAXES:wa.optional().default("false")},client:{NEXT_PUBLIC_STRIPE_PUBLIC_KEY:se.string().min(1).optional()},runtimeEnv:{NEXT_PUBLIC_STRIPE_PUBLIC_KEY:Ut("NEXT_PUBLIC_STRIPE_PUBLIC_KEY")}},OHe={server:{S3_ACCESS_KEY:se.string().min(1).optional(),S3_SECRET_KEY:se.string().min(1).optional(),S3_BUCKET:se.string().min(1).optional().default("bot"),S3_PORT:se.coerce.number().optional(),S3_ENDPOINT:se.string().min(1).optional(),S3_SSL:wa.optional().default("true"),S3_REGION:se.string().min(1).optional(),S3_PUBLIC_CUSTOM_DOMAIN:se.string().url().optional()}},tte={client:{NEXT_PUBLIC_GIPHY_API_KEY:se.string().min(1).optional()},runtimeEnv:{NEXT_PUBLIC_GIPHY_API_KEY:Ut("NEXT_PUBLIC_GIPHY_API_KEY")}},Bk={server:{VERCEL_TOKEN:se.string().min(1).optional(),VERCEL_TEAM_ID:se.string().min(1).optional(),VERCEL_GIT_COMMIT_SHA:se.string().min(1).optional(),VERCEL_BUILDER_PROJECT_NAME:se.string().min(1).optional(),VERCEL_LANDING_PROJECT_NAME:se.string().min(1).optional()},client:{NEXT_PUBLIC_VERCEL_VIEWER_PROJECT_NAME:se.string().min(1).optional(),NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA:se.string().min(1).optional(),NEXT_PUBLIC_VERCEL_ENV:se.string().min(1).optional()},runtimeEnv:{NEXT_PUBLIC_VERCEL_VIEWER_PROJECT_NAME:Ut("NEXT_PUBLIC_VERCEL_VIEWER_PROJECT_NAME"),NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA:Ut("NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA"),NEXT_PUBLIC_VERCEL_ENV:Ut("NEXT_PUBLIC_VERCEL_ENV")}},IHe={server:{SLEEKPLAN_SSO_KEY:se.string().min(1).optional()}},rte={client:{NEXT_PUBLIC_UNSPLASH_APP_NAME:se.string().min(1).optional(),NEXT_PUBLIC_UNSPLASH_ACCESS_KEY:se.string().min(1).optional()},runtimeEnv:{NEXT_PUBLIC_UNSPLASH_APP_NAME:Ut("NEXT_PUBLIC_UNSPLASH_APP_NAME"),NEXT_PUBLIC_UNSPLASH_ACCESS_KEY:Ut("NEXT_PUBLIC_UNSPLASH_ACCESS_KEY")}},nte={client:{NEXT_PUBLIC_PEXELS_API_KEY:se.string().min(1).optional()},runtimeEnv:{NEXT_PUBLIC_PEXELS_API_KEY:Ut("NEXT_PUBLIC_PEXELS_API_KEY")}},RHe={server:{META_SYSTEM_USER_TOKEN:se.string().min(1).optional(),WHATSAPP_PREVIEW_FROM_PHONE_NUMBER_ID:se.string().min(1).optional(),WHATSAPP_PREVIEW_TEMPLATE_NAME:se.string().min(1).optional(),WHATSAPP_PREVIEW_TEMPLATE_LANG:se.string().min(1).optional().default("en_US"),WHATSAPP_CLOUD_API_URL:se.string().url().optional().default("https://graph.facebook.com"),WHATSAPP_INTERACTIVE_GROUP_SIZE:se.coerce.number().optional().default(3),WHATSAPP_MESSAGE_MAX_AGE_MS:se.coerce.number().optional().default(864e5)}},NHe={server:{REDIS_URL:se.string().url().optional()}},Fk={client:{NEXT_PUBLIC_SENTRY_DSN:se.string().min(1).optional(),NEXT_PUBLIC_SENTRY_TRACES_SAMPLE_RATE:se.coerce.number().optional().default(.1)},server:{SENTRY_AUTH_TOKEN:se.string().min(1).optional(),SENTRY_PROJECT:se.string().min(1).optional(),SENTRY_ORG:se.string().min(1).optional()},runtimeEnv:{NEXT_PUBLIC_SENTRY_DSN:Ut("NEXT_PUBLIC_SENTRY_DSN"),NEXT_PUBLIC_SENTRY_TRACES_SAMPLE_RATE:Ut("NEXT_PUBLIC_SENTRY_TRACES_SAMPLE_RATE")}},ote={client:{NEXT_PUBLIC_POSTHOG_KEY:se.string().min(1).optional(),NEXT_PUBLIC_POSTHOG_HOST:se.string().min(1).optional().default("https://us.i.posthog.com")},runtimeEnv:{NEXT_PUBLIC_POSTHOG_KEY:Ut("NEXT_PUBLIC_POSTHOG_KEY"),NEXT_PUBLIC_POSTHOG_HOST:Ut("NEXT_PUBLIC_POSTHOG_HOST")}},ite={client:{NEXT_PUBLIC_TOLGEE_API_KEY:se.string().min(1).optional(),NEXT_PUBLIC_TOLGEE_API_URL:se.string().url().optional().default("https://tolgee.server.urbiport.com")},runtimeEnv:{NEXT_PUBLIC_TOLGEE_API_KEY:Ut("NEXT_PUBLIC_TOLGEE_API_KEY"),NEXT_PUBLIC_TOLGEE_API_URL:Ut("NEXT_PUBLIC_TOLGEE_API_URL","https://tolgee.server.urbiport.com")}},LHe={server:{KEYCLOAK_CLIENT_ID:se.string().min(1).optional(),KEYCLOAK_CLIENT_SECRET:se.string().min(1).optional(),KEYCLOAK_REALM:se.string().min(1).optional(),KEYCLOAK_BASE_URL:se.string().url().optional()}},BHe={server:{EMAIL_HOST:se.string().optional(),EMAIL_PORT:se.string().optional(),EMAIL_SECURE:wa.optional().default("false"),EMAIL_USER:se.string().optional(),EMAIL_PASSWORD:se.string().optional(),EMAIL_FROM:se.string().optional()}},FHe={server:{CREDENTIALS_AUTH:wa.optional().default("false")}},Ux=ete({server:{...Ok.server,...THe.server,...PHe.server,...Ik.server,...Rk.server,...Nk.server,...Lk.server,...OHe.server,...Bk.server,...IHe.server,...RHe.server,...NHe.server,...AHe.server,...DHe.server,...kHe.server,...Fk.server,...LHe.server,...BHe.server,...FHe.server},client:{...Ok.client,...Ik.client,...Rk.client,...Nk.client,...Lk.client,...tte.client,...Bk.client,...rte.client,...nte.client,...Fk.client,...ote.client,...ite.client},experimental__runtimeEnv:{...Ok.runtimeEnv,...Ik.runtimeEnv,...Rk.runtimeEnv,...Nk.runtimeEnv,...Lk.runtimeEnv,...tte.runtimeEnv,...Bk.runtimeEnv,...rte.runtimeEnv,...nte.runtimeEnv,...Fk.runtimeEnv,...ote.runtimeEnv,...ite.runtimeEnv},skipValidation:process.env.SKIP_ENV_CHECK==="true"||typeof window<"u"&&window.__ENV===void 0,onValidationError(e){throw console.error("\u274C Invalid environment variables:",e.flatten().fieldErrors),new Error(`Invalid environment variables: ${JSON.stringify(e.flatten().fieldErrors)}`)},onInvalidAccess:e=>{throw new Error(`\u274C Attempted to access a server-side environment variable on the client: ${e}`)}});var QPt=typeof window>"u"?Ux.ENCRYPTION_SECRET:null;var MHe=V('<div><div class="flex w-full items-center"><div class="flex items-start max-w-full"><div data-testid="host-bubble">'),ate=V('<div class="animate-fade-in">'),$He=400,Mk,$k=e=>{let t,[r,n]=oe(!!e.onTransitionEnd),o=()=>{r()&&(n(!1),setTimeout(()=>{var i;(i=e.onTransitionEnd)==null||i.call(e,t)},$He))};return et(()=>{var s,l;if(!r)return;let i=(s=e.content)!=null&&s.richText?Qee(e.content.richText,{format:"plain"}):"",a=((l=e.typingEmulation)==null?void 0:l.enabled)===!1||e.isTypingSkipped?0:kk({bubbleContent:i,typingSettings:e.typingEmulation});Mk=setTimeout(o,a)}),dt(()=>{Mk&&clearTimeout(Mk)}),(()=>{let i=MHe(),a=i.firstChild,s=a.firstChild,l=s.firstChild,u=t;return typeof u=="function"?lt(u,i):t=i,W(l,(()=>{let c=Ee(()=>!!r());return()=>c()?T(Zi,{}):T($t,{get children(){return[T($e,{get when(){var f,d,p;return Array.isArray((f=e.content)==null?void 0:f.richText)&&(((p=(d=e.content)==null?void 0:d.richText)==null?void 0:p.length)??0)>0},get children(){return T(Mt,{get each(){var f;return(f=e.content)==null?void 0:f.richText},children:f=>(()=>{let d=ate();return W(d,T(Jl,{element:f})),d})()})}}),T($e,{get when(){var f;return(f=e.content)==null?void 0:f.markdown},children:f=>(()=>{let d=ate();return le(()=>d.innerHTML=Mh(f(),{format:"html",enableCodeBlocksMode:!0})),d})()})]}})})()),le(c=>{let f=nt("flex flex-col",e.onTransitionEnd?"animate-fade-in":void 0),d=nt("bubble bubble--host relative transition-all duration-300",r()?"bubble--typing":"text-ellipsis whitespace-pre-wrap slate-html-container overflow-auto");return f!==c._v$&&we(i,c._v$=f),d!==c._v$2&&we(l,c._v$2=d),c},{_v$:void 0,_v$2:void 0}),i})()};var Uk=["youtube","vimeo","tiktok","gumlet"],$h={height:400,aspectRatio:"16/9",maxWidth:"100%",areControlsDisplayed:!0,isAutoplayEnabled:!0};var UHe="https://www.youtube.com/embed";var jHe="https://player.vimeo.com/video";var qHe="https://www.tiktok.com/embed/v2";var zHe="https://play.gumlet.io/embed";var ste={vimeo:jHe,youtube:UHe,tiktok:qHe,gumlet:zHe};var VHe=V('<div><div class="flex w-full items-center"><div class="flex z-10 items-start overflow-hidden w-full max-w-full"><div>'),HHe=V('<div class="focus:outline-none w-full animate-fade-in"><video class="w-full rounded-md">'),WHe=V('<div class="z-10 w-full animate-fade-in"><iframe class="w-full h-full rounded-md" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>'),GHe=400,jk,qk=e=>{let t,[r,n]=oe(!!e.onTransitionEnd);return et(()=>{var i,a;let o=(i=e.content)!=null&&i.type&&Uk.includes((a=e.content)==null?void 0:a.type)?2e3:100;jk=setTimeout(()=>{r()&&(n(!1),setTimeout(()=>{var s;(s=e.onTransitionEnd)==null||s.call(e,t)},GHe))},o)}),dt(()=>{jk&&clearTimeout(jk)}),(()=>{let o=VHe(),i=o.firstChild,a=i.firstChild,s=a.firstChild,l=t;return typeof l=="function"?lt(l,o):t=o,W(s,(()=>{let u=Ee(()=>!!r());return()=>u()?T(Zi,{}):T($t,{get children(){return[T($e,{get when(){var c;return((c=e.content)==null?void 0:c.type)&&e.content.type==="url"},get children(){let c=HHe(),f=c.firstChild;return le(d=>{var g,m,b,E;let p=e.onTransitionEnd?((g=e.content)==null?void 0:g.isAutoplayEnabled)??$h.isAutoplayEnabled:!1,v=(m=e.content)==null?void 0:m.url,h=((b=e.content)==null?void 0:b.areControlsDisplayed)??$h.areControlsDisplayed,y=(E=e.content)==null?void 0:E.aspectRatio;return p!==d._v$4&&(f.autoplay=d._v$4=p),v!==d._v$5&&qe(f,"src",d._v$5=v),h!==d._v$6&&(f.controls=d._v$6=h),y!==d._v$7&&((d._v$7=y)!=null?f.style.setProperty("aspect-ratio",y):f.style.removeProperty("aspect-ratio")),d},{_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0}),c}}),T($e,{get when(){return Ee(()=>{var c;return!!((c=e.content)!=null&&c.type)})()&&Uk.includes(e.content.type)},get children(){let c=WHe(),f=c.firstChild;return le(d=>{var y,g,m,b,E,C;let p=(y=e.content)!=null&&y.aspectRatio?void 0:`${((g=e.content)==null?void 0:g.height)??$h.height}px`,v=(m=e.content)==null?void 0:m.aspectRatio,h=`${ste[(b=e.content)==null?void 0:b.type]}/${((E=e.content)==null?void 0:E.id)??""}${((C=e.content)==null?void 0:C.queryParamsStr)??""}`;return p!==d._v$8&&((d._v$8=p)!=null?c.style.setProperty("height",p):c.style.removeProperty("height")),v!==d._v$9&&((d._v$9=v)!=null?c.style.setProperty("aspect-ratio",v):c.style.removeProperty("aspect-ratio")),h!==d._v$0&&qe(f,"src",d._v$0=h),d},{_v$8:void 0,_v$9:void 0,_v$0:void 0}),c}})]}})})()),le(u=>{var p;let c=nt("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),f=nt("bubble bubble--host relative transition-all duration-300",r()&&"bubble--typing"),d=r()?((p=e.content)==null?void 0:p.maxWidth)??$h.maxWidth:void 0;return c!==u._v$&&we(o,u._v$=c),f!==u._v$2&&we(s,u._v$2=f),d!==u._v$3&&((u._v$3=d)!=null?s.style.setProperty("max-width",d):s.style.removeProperty("max-width")),u},{_v$:void 0,_v$2:void 0,_v$3:void 0}),o})()};var lte=e=>T($t,{get children(){return[T($e,{get when(){return e.message.type==="text"},get children(){return T($k,{get content(){return e.message.content},get isTypingSkipped(){return e.isTypingSkipped},get typingEmulation(){return e.typingEmulation},get onTransitionEnd(){return e.onTransitionEnd}})}}),T($e,{get when(){return e.message.type==="image"},get children(){return T(M_,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd}})}}),T($e,{get when(){return e.message.type==="video"},get children(){return T(qk,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd}})}}),T($e,{get when(){return e.message.type==="embed"},get children(){return T(DN,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd},get onCompleted(){return e.onCompleted}})}}),T($e,{get when(){return e.message.type==="audio"},get children(){return T(PN,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd}})}})]}});var KHe=V('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" data-testid="avatar-placeholder"><circle cx="12" cy="12" r="12" fill="#5DDE8A"></circle><g transform="translate(2.4,2.4) scale(0.8)"><path d="M14.085 18.295H5.272V9.679C5.272 7.121 7.357 5.075 9.875 5.075H14.046C16.603 5.075 18.649 7.161 18.649 9.679V13.692C18.689 16.210 16.643 18.295 14.085 18.295ZM6.492 17.115H14.125C16.013 17.115 17.548 15.580 17.548 13.692V9.679C17.548 7.790 16.013 6.256 14.125 6.256H9.915C8.026 6.256 6.492 7.790 6.492 9.679V17.115Z" fill="#fff"></path><circle cx="11.961" cy="11.685" r="0.945" fill="#fff"></circle><circle cx="8.971" cy="11.685" r="0.945" fill="#fff"></circle><circle cx="15.030" cy="11.685" r="0.945" fill="#fff">'),ute=({boxSize:e,width:t}={})=>{let r=e||t||"2.5rem";return(()=>{let n=KHe();return r!=null?n.style.setProperty("width",r):n.style.removeProperty("width"),r!=null?n.style.setProperty("height",r):n.style.removeProperty("height"),n})()};var YHe=V('<img alt="Bot avatar" class="rounded-full object-cover w-full h-full" elementtiming="Bot avatar" fetchpriority="high">'),XHe=V("<figure>"),jx=e=>{let[t,r]=oe(e.initialAvatarSrc);return mt(()=>{var n,o;((n=t())!=null&&n.startsWith("{{")||!t())&&((o=e.initialAvatarSrc)!=null&&o.startsWith("http"))&&r(e.initialAvatarSrc)}),(()=>{let n=XHe();return W(n,T(ve,{get when(){return yr(t())},keyed:!0,get fallback(){return T(ute,{})},get children(){let o=YHe();return le(()=>qe(o,"src",t())),o}})),le(()=>we(n,"flex justify-center items-center rounded-full text-white relative animate-fade-in flex-shrink-0 "+(wt()?"w-6 h-6 text-sm":"w-10 h-10 text-xl"))),n})()};function ZHe(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function cte(e,t){let r=ZHe();return r?(r[e]||(r[e]=t()),r[e]):t()}var qx=!1,zk=e=>typeof e=="object"&&e!==null,tc=cte("__zag__proxyStateMap",()=>new WeakMap),Uh=cte("__zag__refSet",()=>new WeakSet),QHe=(e=Object.is,t=(u,c)=>new Proxy(u,c),r=u=>zk(u)&&!Uh.has(u)&&(Array.isArray(u)||!(Symbol.iterator in u))&&!(u instanceof WeakMap)&&!(u instanceof WeakSet)&&!(u instanceof Error)&&!(u instanceof Number)&&!(u instanceof Date)&&!(u instanceof String)&&!(u instanceof RegExp)&&!(u instanceof ArrayBuffer),n=u=>{switch(u.status){case"fulfilled":return u.value;case"rejected":throw u.reason;default:throw u}},o=new WeakMap,i=(u,c,f=n)=>{let d=o.get(u);if((d==null?void 0:d[0])===c)return d[1];let p=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u));return BT(p,!0),o.set(u,[c,p]),Reflect.ownKeys(u).forEach(v=>{let h=Reflect.get(u,v);Uh.has(h)?(BT(h,!1),p[v]=h):h instanceof Promise?Object.defineProperty(p,v,{get(){return f(h)}}):tc.has(h)?p[v]=Cl(h,f):p[v]=h}),Object.freeze(p)},a=new WeakMap,s=[1,1],l=u=>{if(!zk(u))throw new Error("object required");let c=a.get(u);if(c)return c;let f=s[0],d=new Set,p=(D,R=++s[0])=>{f!==R&&(f=R,d.forEach(M=>M(D,R)))},v=s[1],h=(D=++s[1])=>(v!==D&&!d.size&&(v=D,g.forEach(([R])=>{let M=R[1](D);M>f&&(f=M)})),f),y=D=>(R,M)=>{let I=[...R];I[1]=[D,...I[1]],p(I,M)},g=new Map,m=(D,R)=>{if(qx&&g.has(D))throw new Error("prop listener already exists");if(d.size){let M=R[3](y(D));g.set(D,[R,M])}else g.set(D,[R])},b=D=>{var M;let R=g.get(D);R&&(g.delete(D),(M=R[1])==null||M.call(R))},E=D=>(d.add(D),d.size===1&&g.forEach(([M,I],B)=>{if(qx&&I)throw new Error("remove already exists");let L=M[3](y(B));g.set(B,[M,L])}),()=>{d.delete(D),d.size===0&&g.forEach(([M,I],B)=>{I&&(I(),g.set(B,[M]))})}),C=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u)),P=t(C,{deleteProperty(D,R){let M=Reflect.get(D,R);b(R);let I=Reflect.deleteProperty(D,R);return I&&p(["delete",[R],M]),I},set(D,R,M,I){var K;let B=Reflect.has(D,R),L=Reflect.get(D,R,I);if(B&&(e(L,M)||a.has(M)&&e(L,a.get(M))))return!0;b(R),zk(M)&&(M=c2(M)||M);let U=M;if(!((K=Object.getOwnPropertyDescriptor(D,R))!=null&&K.set))if(M instanceof Promise)M.then(z=>{Object.assign(M,{status:"fulfilled",value:z}),p(["resolve",[R],z])}).catch(z=>{Object.assign(M,{status:"rejected",reason:z}),p(["reject",[R],z])});else{!tc.has(M)&&r(M)&&(U=jh(M));let z=!Uh.has(U)&&tc.get(U);z&&m(R,z)}return Reflect.set(D,R,U,I),p(["set",[R],M,L]),!0}});a.set(u,P);let N=[C,h,i,E];return tc.set(P,N),Reflect.ownKeys(u).forEach(D=>{let R=Object.getOwnPropertyDescriptor(u,D);R.get||R.set?Object.defineProperty(C,D,R):P[D]=u[D]}),P})=>[l,tc,Uh,e,t,r,n,o,i,a,s],[JHe]=QHe();function jh(e={}){return JHe(e)}function Uf(e,t,r){let n=tc.get(e);qx&&!n&&console.warn("Please use proxy object");let o,i=[],a=n[3],s=!1,u=a(c=>{if(i.push(c),r){t(i.splice(0));return}o||(o=Promise.resolve().then(()=>{o=void 0,s&&t(i.splice(0))}))});return s=!0,()=>{s=!1,u()}}function Cl(e,t){let r=tc.get(e);qx&&!r&&console.warn("Please use proxy object");let[n,o,i]=r;return i(n,o(),t)}function Oo(e){return Uh.add(e),e}function dte(e,t){Object.keys(t).forEach(o=>{if(Object.getOwnPropertyDescriptor(e,o))throw new Error("object property already defined");let i=t[o],{get:a,set:s}=typeof i=="function"?{get:i}:i,l={};l.get=()=>a(Cl(n)),s&&(l.set=u=>s(n,u)),Object.defineProperty(e,o,l)});let n=jh(e);return n}function fte(e,t,r){typeof r.value=="object"&&(r.value=rc(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function rc(e){if(typeof e!="object")return e;var t=0,r,n,o,i=Object.prototype.toString.call(e);if(i==="[object Object]"?o=Object.create(e.__proto__||null):i==="[object Array]"?o=Array(e.length):i==="[object Set]"?(o=new Set,e.forEach(function(a){o.add(rc(a))})):i==="[object Map]"?(o=new Map,e.forEach(function(a,s){o.set(rc(s),rc(a))})):i==="[object Date]"?o=new Date(+e):i==="[object RegExp]"?o=new RegExp(e.source,e.flags):i==="[object DataView]"?o=new e.constructor(rc(e.buffer)):i==="[object ArrayBuffer]"?o=e.slice(0):i.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(n=Object.getOwnPropertySymbols(e);t<n.length;t++)fte(o,n[t],Object.getOwnPropertyDescriptor(e,n[t]));for(t=0,n=Object.getOwnPropertyNames(e);t<n.length;t++)Object.hasOwnProperty.call(o,r=n[t])&&o[r]===e[r]||fte(o,r,Object.getOwnPropertyDescriptor(e,r))}return o||e}var e7e=Object.defineProperty,t7e=(e,t,r)=>t in e?e7e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fe=(e,t,r)=>t7e(e,typeof t!="symbol"?t+"":t,r);function r7e(e){for(;e.length>0;)e.pop();return e}var pte=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,ms=e=>e,n7e=()=>{},o7e=(...e)=>(...t)=>{e.forEach(function(r){r==null||r(...t)})},mte=(()=>{let e=0;return()=>(e++,e.toString(36))})(),i7e=()=>!1,Vx=e=>Array.isArray(e),zh=e=>!(e==null||typeof e!="object"||Vx(e)),a7e=e=>typeof e=="number"&&!Number.isNaN(e),Io=e=>typeof e=="string",Hx=e=>typeof e=="function",s7e=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function Wx(e){if(!l7e(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(n=>typeof n=="string"),r={};for(let n of t){let o=e[n];o!==void 0&&(r[n]=Wx(o))}return r}var l7e=e=>e&&typeof e=="object"&&e.constructor===Object;function Vk(...e){let t=e.length===1?e[0]:e[1],r=e.length===2?e[0]:!0}function zx(...e){let t=e.length===1?e[0]:e[1],r=e.length===2?e[0]:!0}function vte(e,...t){for(let r of t){let n=Wx(r);for(let o in n)zh(r[o])?(e[o]||(e[o]={}),vte(e[o],r[o])):e[o]=r[o]}return e}function gte(e){return rc(e)}function qi(e){return Io(e)?{type:e}:e}function Sl(e){return e?Vx(e)?e.slice():[e]:[]}function yte(e){return zh(e)&&e.predicate!=null}var u7e=()=>!0;function Wk(e,t,r,n){return o=>{var i;return Io(o)?!!((i=e[o])!=null&&i.call(e,t,r,n)):Hx(o)?o(t,r,n):o.predicate(e)(t,r,n)}}function c7e(...e){return{predicate:t=>(r,n,o)=>e.map(Wk(t,r,n,o)).some(Boolean)}}function d7e(...e){return{predicate:t=>(r,n,o)=>e.map(Wk(t,r,n,o)).every(Boolean)}}function f7e(e){return{predicate:t=>(r,n,o)=>!Wk(t,r,n,o)(e)}}function p7e(...e){return(t,r,n)=>n.state.matches(...e)}var Gx={or:c7e,and:d7e,not:f7e,stateIn:p7e};function bte(e,t){return e=e??u7e,(r,n,o)=>{if(Io(e)){let i=t[e];return Hx(i)?i(r,n,o):i}return yte(e)?e.predicate(t)(r,n,o):e==null?void 0:e(r,n,o)}}function Hk(e,t){return(r,n,o)=>yte(e)?e.predicate(t)(r,n,o):e}function m7e(e){var i,a;let t=e.computed??ms({}),r=e.context??ms({}),n=e.initial?(a=(i=e.states)==null?void 0:i[e.initial])==null?void 0:a.tags:[],o=jh({value:e.initial??"",previousValue:"",event:ms({}),previousEvent:ms({}),context:dte(r,t),done:!1,tags:n??[],hasTag(s){return this.tags.includes(s)},matches(...s){return s.includes(this.value)},can(s){return ms(this).nextEvents.includes(s)},get nextEvents(){var u,c;let s=((c=(u=e.states)==null?void 0:u[this.value])==null?void 0:c.on)??{},l=(e==null?void 0:e.on)??{};return Object.keys({...s,...l})},get changed(){return this.event.value==="machine.init"||!this.previousValue?!1:this.value!==this.previousValue}});return ms(o)}function qh(e,t){return(r,n)=>{if(a7e(e))return e;if(Hx(e))return e(r,n);if(Io(e)){let o=Number.parseFloat(e);if(!Number.isNaN(o))return o;if(t){let i=t==null?void 0:t[e];return zx(i==null,`[@zag-js/core > determine-delay] Cannot determine delay for \`${e}\`. It doesn't exist in \`options.delays\``),Hx(i)?i(r,n):i}}}}function g7e(e){return Io(e)?{target:e}:e}function h7e(e,t){return(r,n,o)=>Sl(e).map(g7e).find(i=>bte(i.guard,t)(r,n,o)??i.target??i.actions)}var Ete=class{constructor(e,t){var r,n,o,i,a;Fe(this,"status","Not Started"),Fe(this,"state"),Fe(this,"initialState"),Fe(this,"initialContext"),Fe(this,"id"),Fe(this,"type","machine"),Fe(this,"activityEvents",new Map),Fe(this,"delayedEvents",new Map),Fe(this,"stateListeners",new Set),Fe(this,"doneListeners",new Set),Fe(this,"contextWatchers",new Set),Fe(this,"removeStateListener",n7e),Fe(this,"parent"),Fe(this,"children",new Map),Fe(this,"guardMap"),Fe(this,"actionMap"),Fe(this,"delayMap"),Fe(this,"activityMap"),Fe(this,"sync"),Fe(this,"options"),Fe(this,"config"),Fe(this,"_created",()=>{var l;let s=qi("machine.created");this.executeActions((l=this.config)==null?void 0:l.created,s)}),Fe(this,"start",s=>{if(this.state.value="",this.state.tags=[],this.status==="Running")return this;this.status="Running",this.removeStateListener=Uf(this.state,()=>{this.stateListeners.forEach(p=>{p(this.stateSnapshot)})},this.sync),this.setupContextWatchers(),this.executeActivities(qi("machine.start"),Sl(this.config.activities),"machine.start"),this.executeActions(this.config.entry,qi("machine.start"));let l=qi("machine.init"),u=zh(s)?s.value:s,c=zh(s)?s.context:void 0;c&&this.setContext(c);let f={target:u??this.config.initial},d=this.getNextStateInfo(f,l);return this.initialState=d,this.performStateChangeEffects(this.state.value,d,l),this}),Fe(this,"setupContextWatchers",()=>{let{watch:s}=this.config;if(!s)return;let l=Cl(this.state.context),u=Uf(this.state.context,()=>{var f;let c=Cl(this.state.context);for(let[d,p]of Object.entries(s))(((f=this.options.compareFns)==null?void 0:f[d])??Object.is)(l[d],c[d])||this.executeActions(p,this.state.event);l=c});this.contextWatchers.add(u)}),Fe(this,"stop",()=>{if(this.status!=="Stopped")return this.performExitEffects(this.state.value,qi("machine.stop")),this.executeActions(this.config.exit,qi("machine.stop")),this.setState(""),this.setEvent("machine.stop"),this.stopStateListeners(),this.stopChildren(),this.stopActivities(),this.stopDelayedEvents(),this.stopContextWatchers(),this.status="Stopped",this}),Fe(this,"stopStateListeners",()=>{this.removeStateListener(),this.stateListeners.clear()}),Fe(this,"stopContextWatchers",()=>{this.contextWatchers.forEach(s=>s()),this.contextWatchers.clear()}),Fe(this,"stopDelayedEvents",()=>{this.delayedEvents.forEach(s=>{s.forEach(l=>l())}),this.delayedEvents.clear()}),Fe(this,"stopActivities",s=>{var l,u;s?((l=this.activityEvents.get(s))==null||l.forEach(c=>c()),(u=this.activityEvents.get(s))==null||u.clear(),this.activityEvents.delete(s)):(this.activityEvents.forEach(c=>{c.forEach(f=>f()),c.clear()}),this.activityEvents.clear())}),Fe(this,"sendChild",(s,l)=>{let u=qi(s),c=pte(l,this.contextSnapshot),f=this.children.get(c);f||zx(`[@zag-js/core] Cannot send '${u.type}' event to unknown child`),f.send(u)}),Fe(this,"stopChild",s=>{this.children.has(s)||zx(`[@zag-js/core > stop-child] Cannot stop unknown child ${s}`),this.children.get(s).stop(),this.children.delete(s)}),Fe(this,"removeChild",s=>{this.children.delete(s)}),Fe(this,"stopChildren",()=>{this.children.forEach(s=>s.stop()),this.children.clear()}),Fe(this,"setParent",s=>{this.parent=s}),Fe(this,"spawn",(s,l)=>{let u=pte(s);return l&&(u.id=l),u.type="machine.actor",u.setParent(this),this.children.set(u.id,ms(u)),u.onDone(()=>{this.removeChild(u.id)}).start(),ms(Oo(u))}),Fe(this,"stopActivity",s=>{var u;if(!this.state.value)return;let l=this.activityEvents.get(this.state.value);(u=l==null?void 0:l.get(s))==null||u(),l==null||l.delete(s)}),Fe(this,"addActivityCleanup",(s,l,u)=>{var c;s&&(this.activityEvents.has(s)?(c=this.activityEvents.get(s))==null||c.set(l,u):this.activityEvents.set(s,new Map([[l,u]])))}),Fe(this,"setState",s=>{this.state.previousValue=this.state.value,this.state.value=s;let l=this.getStateNode(s);s==null?r7e(this.state.tags):this.state.tags=Sl(l==null?void 0:l.tags)}),Fe(this,"setContext",s=>{s&&vte(this.state.context,Wx(s))}),Fe(this,"setOptions",s=>{let l=Wx(s);this.actionMap={...this.actionMap,...l.actions},this.delayMap={...this.delayMap,...l.delays},this.activityMap={...this.activityMap,...l.activities},this.guardMap={...this.guardMap,...l.guards}}),Fe(this,"getStateNode",s=>{var l;if(s)return(l=this.config.states)==null?void 0:l[s]}),Fe(this,"getNextStateInfo",(s,l)=>{let u=this.determineTransition(s,l),c=!(u!=null&&u.target),f=(u==null?void 0:u.target)??this.state.value,d=this.state.value!==f,p=this.getStateNode(f),h={reenter:!c&&!d&&!(u!=null&&u.internal),transition:u,stateNode:p,target:f,changed:d};return this.log("NextState:",`[${l.type}]`,this.state.value,"---->",h.target),h}),Fe(this,"getAfterActions",(s,l)=>{let u;return{entry:()=>{u=globalThis.setTimeout(()=>{let c=this.getNextStateInfo(s,this.state.event);this.performStateChangeEffects(this.state.value,c,this.state.event)},l)},exit:()=>{globalThis.clearTimeout(u)}}}),Fe(this,"getDelayedEventActions",s=>{let l=this.getStateNode(s),u=this.state.event;if(!l||!l.after)return;let c=[],f=[];if(Vx(l.after)){let d=this.determineTransition(l.after,u);if(!d)return;if(!s7e(d,"delay"))throw new Error(`[@zag-js/core > after] Delay is required for after transition: ${JSON.stringify(d)}`);let v=qh(d.delay,this.delayMap)(this.contextSnapshot,u),h=this.getAfterActions(d,v);return c.push(h.entry),f.push(h.exit),{entries:c,exits:f}}if(zh(l.after))for(let d in l.after){let p=l.after[d],h=qh(d,this.delayMap)(this.contextSnapshot,u),y=this.getAfterActions(p,h);c.push(y.entry),f.push(y.exit)}return{entries:c,exits:f}}),Fe(this,"executeActions",(s,l)=>{var c;let u=Hk(s,this.guardMap)(this.contextSnapshot,l,this.guardMeta);for(let f of Sl(u)){let d=Io(f)?(c=this.actionMap)==null?void 0:c[f]:f;Vk(Io(f)&&!d,`[@zag-js/core > execute-actions] No implementation found for action: \`${f}\``),d==null||d(this.state.context,l,this.meta)}}),Fe(this,"executeActivities",(s,l,u)=>{var c;for(let f of l){let d=Io(f)?(c=this.activityMap)==null?void 0:c[f]:f;if(!d){Vk(`[@zag-js/core > execute-activity] No implementation found for activity: \`${f}\``);continue}let p=d(this.state.context,s,this.meta);if(p){let v=Io(f)?f:f.name||mte();this.addActivityCleanup(u??this.state.value,v,p)}}}),Fe(this,"createEveryActivities",(s,l)=>{if(s)if(Vx(s)){let u=Sl(s).find(p=>{let v=p.delay,y=qh(v,this.delayMap)(this.contextSnapshot,this.state.event);return bte(p.guard,this.guardMap)(this.contextSnapshot,this.state.event,this.guardMeta)??y!=null});if(!u)return;let f=qh(u.delay,this.delayMap)(this.contextSnapshot,this.state.event);l(()=>{let p=globalThis.setInterval(()=>{this.executeActions(u.actions,this.state.event)},f);return()=>{globalThis.clearInterval(p)}})}else for(let u in s){let c=s==null?void 0:s[u],d=qh(u,this.delayMap)(this.contextSnapshot,this.state.event);l(()=>{let v=globalThis.setInterval(()=>{this.executeActions(c,this.state.event)},d);return()=>{globalThis.clearInterval(v)}})}}),Fe(this,"setEvent",s=>{this.state.previousEvent=this.state.event,this.state.event=Oo(qi(s))}),Fe(this,"performExitEffects",(s,l)=>{let u=this.state.value;if(u==="")return;let c=s?this.getStateNode(s):void 0;this.stopActivities(u);let f=Hk(c==null?void 0:c.exit,this.guardMap)(this.contextSnapshot,l,this.guardMeta),d=Sl(f),p=this.delayedEvents.get(u);p&&d.push(...p),this.executeActions(d,l)}),Fe(this,"performEntryEffects",(s,l)=>{let u=this.getStateNode(s),c=Sl(u==null?void 0:u.activities);this.createEveryActivities(u==null?void 0:u.every,v=>{c.unshift(v)}),c.length>0&&this.executeActivities(l,c);let f=Hk(u==null?void 0:u.entry,this.guardMap)(this.contextSnapshot,l,this.guardMeta),d=Sl(f),p=this.getDelayedEventActions(s);u!=null&&u.after&&p&&(this.delayedEvents.set(s,p==null?void 0:p.exits),d.push(...p.entries)),this.executeActions(d,l),(u==null?void 0:u.type)==="final"&&(this.state.done=!0,this.doneListeners.forEach(v=>{v(this.stateSnapshot)}),this.stop())}),Fe(this,"performTransitionEffects",(s,l)=>{let u=this.determineTransition(s,l);this.executeActions(u==null?void 0:u.actions,l)}),Fe(this,"performStateChangeEffects",(s,l,u)=>{this.setEvent(u);let c=l.changed||l.reenter;c&&this.performExitEffects(s,u),this.performTransitionEffects(l.transition,u),this.setState(l.target),c&&this.performEntryEffects(l.target,u)}),Fe(this,"determineTransition",(s,l)=>{let u=h7e(s,this.guardMap);return u==null?void 0:u(this.contextSnapshot,l,this.guardMeta)}),Fe(this,"sendParent",s=>{var u;this.parent||zx("[@zag-js/core > send-parent] Cannot send event to an unknown parent");let l=qi(s);(u=this.parent)==null||u.send(l)}),Fe(this,"log",(...s)=>{i7e()&&this.options.debug&&console.log(...s)}),Fe(this,"send",s=>{let l=qi(s);this.transition(this.state.value,l)}),Fe(this,"transition",(s,l)=>{var p,v;let u=Io(s)?this.getStateNode(s):s==null?void 0:s.stateNode,c=qi(l);if(!u&&!this.config.on){let h=this.status==="Stopped"?"[@zag-js/core > transition] Cannot transition a stopped machine":`[@zag-js/core > transition] State does not have a definition for \`state\`: ${s}, \`event\`: ${c.type}`;Vk(h);return}let f=((p=u==null?void 0:u.on)==null?void 0:p[c.type])??((v=this.config.on)==null?void 0:v[c.type]),d=this.getNextStateInfo(f,c);return this.performStateChangeEffects(this.state.value,d,c),d.stateNode}),Fe(this,"subscribe",s=>(this.stateListeners.add(s),this.status==="Running"&&s(this.stateSnapshot),()=>{this.stateListeners.delete(s)})),Fe(this,"onDone",s=>(this.doneListeners.add(s),this)),Fe(this,"onTransition",s=>(this.stateListeners.add(s),this.status==="Running"&&s(this.stateSnapshot),this)),this.config=gte(e),this.options=gte(t??{}),this.id=this.config.id??`machine-${mte()}`,this.guardMap=((r=this.options)==null?void 0:r.guards)??{},this.actionMap=((n=this.options)==null?void 0:n.actions)??{},this.delayMap=((o=this.options)==null?void 0:o.delays)??{},this.activityMap=((i=this.options)==null?void 0:i.activities)??{},this.sync=((a=this.options)==null?void 0:a.sync)??!1,this.state=m7e(this.config),this.initialContext=Cl(this.state.context)}get stateSnapshot(){return ms(Cl(this.state))}getState(){return this.stateSnapshot}get contextSnapshot(){return this.stateSnapshot.context}get self(){let e=this;return{id:this.id,send:this.send.bind(this),sendParent:this.sendParent.bind(this),sendChild:this.sendChild.bind(this),stop:this.stop.bind(this),stopChild:this.stopChild.bind(this),spawn:this.spawn.bind(this),stopActivity:this.stopActivity.bind(this),get state(){return e.stateSnapshot},get initialContext(){return e.initialContext},get initialState(){var t;return((t=e.initialState)==null?void 0:t.target)??""}}}get meta(){var e;return{state:this.stateSnapshot,guards:this.guardMap,send:this.send.bind(this),self:this.self,initialContext:this.initialContext,initialState:((e=this.initialState)==null?void 0:e.target)??"",getState:()=>this.stateSnapshot,getAction:t=>this.actionMap[t],getGuard:t=>this.guardMap[t]}}get guardMeta(){return{state:this.stateSnapshot}}get[Symbol.toStringTag](){return"Machine"}},ci=(e,t)=>new Ete(e,t),xte=e=>e instanceof Ete||(e==null?void 0:e.type)==="machine",v7e=(...e)=>e.map(t=>{var r;return(r=t==null?void 0:t.trim)==null?void 0:r.call(t)}).filter(Boolean).join(" "),y7e=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,hte=e=>{let t={},r;for(;r=y7e.exec(e);)t[r[1]]=r[2];return t},b7e=(e,t)=>{if(Io(e)){if(Io(t))return`${e};${t}`;e=hte(e)}else Io(t)&&(t=hte(t));return Object.assign({},e??{},t??{})};function Kx(...e){let t={};for(let r of e){for(let n in t){if(n.startsWith("on")&&typeof t[n]=="function"&&typeof r[n]=="function"){t[n]=o7e(r[n],t[n]);continue}if(n==="className"||n==="class"){t[n]=v7e(t[n],r[n]);continue}if(n==="style"){t[n]=b7e(t[n],r[n]);continue}t[n]=r[n]!==void 0?r[n]:t[n]}for(let n in r)t[n]===void 0&&(t[n]=r[n])}return t}function wte(e){return new Proxy({},{get(){return e}})}var so=()=>e=>Array.from(new Set(e));function Ge(...e){let t={};for(let r=0;r<e.length;r++){let n=e[r];if(typeof n=="function"&&(n=n()),n){let o=Object.getOwnPropertyDescriptors(n);for(let i in o)i in t||Object.defineProperty(t,i,{enumerable:!0,get(){let a={};if(i==="style"||i==="class"||i==="className"||i.startsWith("on")){for(let s=0;s<e.length;s++){let l=e[s];typeof l=="function"&&(l=l()),a=Kx(a,{[i]:(l||{})[i]})}return a[i]}for(let s=e.length-1;s>=0;s--){let l,u=e[s];if(typeof u=="function"&&(u=u()),l=(u||{})[i],l!==void 0)return l}}})}}return t}var E7e=e=>Array.isArray(e),x7e=e=>!(e==null||typeof e!="object"||E7e(e)),w7e=e=>typeof e=="number"&&!Number.isNaN(e),Cte=e=>typeof e=="string",_te={onFocus:"onFocusIn",onBlur:"onFocusOut",onDoubleClick:"onDblClick",onChange:"onInput",defaultChecked:"checked",defaultValue:"value",htmlFor:"for",className:"class"},_7e=e=>e.startsWith("--")?e:D7e(e);function C7e(e){return e in _te?_te[e]:e}var Tl=wte(e=>{let t={};for(let r in e){let n=e[r];if(!(r==="readOnly"&&n===!1)){if(r==="style"&&x7e(n)){t.style=S7e(n);continue}if(r==="children"){Cte(n)&&(t.textContent=n);continue}t[C7e(r)]=n}}return t});function S7e(e){let t={};for(let r in e){let n=e[r];!Cte(n)&&!w7e(n)||(t[_7e(r)]=n)}return t}var T7e=/[A-Z]/g,P7e=/^ms-/,Gk={};function A7e(e){return"-"+e.toLowerCase()}function D7e(e){if(Gk.hasOwnProperty(e))return Gk[e];var t=e.replace(T7e,A7e);return Gk[e]=P7e.test(t)?"-"+t:t}function Ste(e,t){let{actions:r,context:n}=t??{},[o,i]=GR(e.getState());return et(()=>{let a=e.subscribe(s=>{i(jv(s))});dt(()=>{a()})}),mt(()=>{let a=typeof n=="function"?n():n;e.setContext(a)}),mt(()=>{e.setOptions({actions:r})}),o}function Tte(e){return[Ste(e),e.send]}function k7e(e,t){let{state:r,context:n}=t??{},o=(()=>{let i=typeof e=="function"?e():e,a=typeof n=="function"?n():n;return a&&i.setContext(a),i._created(),i})();return et(()=>{o.start(r),dt(()=>{o.stop()})}),o}function jf(e,t){let r=k7e(e,t);return[Ste(r,t),r.send,r]}var zn=e=>e?"":void 0;var Ate=2147483647,qn=e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===Node.ELEMENT_NODE&&typeof(e==null?void 0:e.nodeName)=="string",Dte=e=>e.nodeType===Node.DOCUMENT_NODE,O7e=e=>e!=null&&e===e.window;var I7e=e=>e.nodeType!==void 0,R7e=e=>e&&I7e(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e;function di(e,t){return!e||!t||!qn(e)||!qn(t)?!1:e===t||e.contains(t)}function gs(e){return Dte(e)?e:O7e(e)?e.document:(e==null?void 0:e.ownerDocument)??document}function _a(e){var t;return R7e(e)?_a(e.host):Dte(e)?e.defaultView??window:qn(e)?((t=e.ownerDocument)==null?void 0:t.defaultView)??window:window}function kte(e,t){let{type:r,quality:n=.92}=t;if(!e)throw new Error("[get-data-url]: could not find the svg element");let o=_a(e),i=o.document,s=`<?xml version="1.0" standalone="no"?>\r
|
|
114
|
-
`+new o.XMLSerializer().serializeToString(e),l="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(s);if(r==="image/svg+xml")return Promise.resolve(l);let u=e.getBoundingClientRect(),c=o.devicePixelRatio||1,f=i.createElement("canvas"),d=new o.Image;d.src=l,f.width=u.width*c,f.height=u.height*c;let p=f.getContext("2d");return p.scale(c,c),new Promise(v=>{d.onload=()=>{p.drawImage(d,0,0),v(f.toDataURL(r,n))}})}var Ote=()=>typeof document<"u";function N7e(){let e=navigator.userAgentData;return(e==null?void 0:e.platform)??navigator.platform}var Yk=e=>Ote()&&e.test(N7e()),L7e=e=>Ote()&&e.test(navigator.userAgent);var Ite=()=>Yk(/^Mac/);var Rte=()=>L7e(/firefox\//i),B7e=()=>Yk(/mac|iphone|ipad|ipod/i),Xk=()=>Yk(/iP(hone|ad|od)|iOS/);function F7e(e){var t,r,n;return((t=e.composedPath)==null?void 0:t.call(e))??((n=(r=e.nativeEvent)==null?void 0:r.composedPath)==null?void 0:n.call(r))}function zi(e){let t=F7e(e);return(t==null?void 0:t[0])??e.target}var Nte=e=>di(e.currentTarget,zi(e));function Zk(e){let t=e.currentTarget;if(!t)return!1;let r=B7e();if(r&&!e.metaKey||!r&&!e.ctrlKey)return!1;let n=t.localName;return n==="a"||n==="button"&&t.type==="submit"||n==="input"&&t.type==="submit"}function Qk(e){let t=e.currentTarget;if(!t)return!1;let r=t.localName;return e.altKey?r==="a"||r==="button"&&t.type==="submit"||r==="input"&&t.type==="submit":!1}var Jk=e=>e.id;function M7e(e,t,r=Jk){return e.find(n=>r(n)===t)}function eO(e,t,r=Jk){let n=M7e(e,t,r);return n?e.indexOf(n):-1}function Lte(e,t,r=!0){let n=eO(e,t);return n=r?(n+1)%e.length:Math.min(n+1,e.length-1),e[n]}function Bte(e,t,r=!0){let n=eO(e,t);return n===-1?r?e[e.length-1]:null:(n=r?(n-1+e.length)%e.length:Math.max(0,n-1),e[n])}var $7e=e=>e.split("").map(t=>{let r=t.charCodeAt(0);return r>0&&r<128?t:r>=128&&r<=255?`/x${r.toString(16)}`.replace("/","\\"):""}).join("").trim(),U7e=e=>$7e(e.dataset.valuetext??e.textContent??""),j7e=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase()),q7e=(e,t)=>e.map((r,n)=>e[(Math.max(t,0)+n)%e.length]);function z7e(e,t,r,n=Jk){let o=r?eO(e,r,n):-1,i=r?q7e(e,o):e;return t.length===1&&(i=i.filter(s=>n(s)!==r)),i.find(s=>j7e(U7e(s),t))}function V7e(e,t){let{state:r,activeId:n,key:o,timeout:i=350,itemToId:a}=t,s=r.keysSoFar+o,u=s.length>1&&Array.from(s).every(v=>v===s[0])?s[0]:s,c=e.slice(),f=z7e(c,u,n,a);function d(){clearTimeout(r.timer),r.timer=-1}function p(v){r.keysSoFar=v,d(),v!==""&&(r.timer=+setTimeout(()=>{p(""),d()},i))}return p(s),f}var Yx=Object.assign(V7e,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:H7e});function H7e(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var Fte=e=>typeof e=="object"&&e!==null&&e.nodeType===1,W7e=e=>Fte(e)&&e.tagName==="IFRAME";function G7e(e){return Fte(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1}function K7e(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}var Mte="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type";function Xx(e){return!e||e.closest("[inert]")?!1:e.matches(Mte)&&G7e(e)}function tO(e,t){if(!e)return[];let r=Array.from(e.querySelectorAll(Mte)),n=r.filter(Pte);return t&&Pte(e)&&n.unshift(e),n.forEach((o,i)=>{if(W7e(o)&&o.contentDocument){let a=o.contentDocument.body,s=tO(a);n.splice(i,1,...s)}}),!n.length&&t?r:n}function Pte(e){return e!=null&&e.tabIndex>0?!0:Xx(e)&&!K7e(e)}function Y7e(e,t){let r=tO(e,t),n=r[0]||null,o=r[r.length-1]||null;return[n,o]}function Zx(e){let{root:t,getInitialEl:r,filter:n,enabled:o=!0}=e;if(!o)return;let i=null;if(i||(i=typeof r=="function"?r():r),i||(i=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!i){let a=tO(t);i=n?a.filter(n)[0]:a[0]}return i||t||void 0}function $te(e){let t=e.currentTarget;if(!t)return!1;let[r,n]=Y7e(t),o=t.ownerDocument||document;return!(o.activeElement===r&&e.shiftKey||o.activeElement===n&&!e.shiftKey||!r&&!n)}function Qx(e){if(e==null||!qn(e))return!1;try{let t=_a(e);return e instanceof t.HTMLInputElement&&e.selectionStart!=null||/(textarea|select)/.test(e.localName)||e.isContentEditable}catch{return!1}}var X7e=/auto|scroll|overlay|hidden|clip/;function Z7e(e){let t=_a(e),{overflow:r,overflowX:n,overflowY:o,display:i}=t.getComputedStyle(e);return X7e.test(r+o+n)&&!["inline","contents"].includes(i)}function rO(e){let t=new Set;function r(n){let o=globalThis.requestAnimationFrame(n);t.add(()=>globalThis.cancelAnimationFrame(o))}return r(()=>r(e)),function(){t.forEach(o=>o())}}function pr(e){let t=globalThis.requestAnimationFrame(e);return()=>{globalThis.cancelAnimationFrame(t)}}function Q7e(e,t){if(!e)return;let{attributes:r,callback:n}=t,o=e.ownerDocument.defaultView||window,i=new o.MutationObserver(a=>{for(let s of a)s.type==="attributes"&&s.attributeName&&r.includes(s.attributeName)&&n(s)});return i.observe(e,{attributes:!0,attributeFilter:r}),()=>i.disconnect()}function Ute(e,t){let{defer:r}=t,n=r?pr:i=>i(),o=[];return o.push(n(()=>{let i=typeof e=="function"?e():e;o.push(Q7e(i,t))})),()=>{o.forEach(i=>i==null?void 0:i())}}function Jx(e,t){return Array.from((e==null?void 0:e.querySelectorAll(t))??[])}function jte(e,t){return(e==null?void 0:e.querySelector(t))??null}function Ca(e){let t={getRootNode:r=>{var n;return((n=r.getRootNode)==null?void 0:n.call(r))??document},getDoc:r=>gs(t.getRootNode(r)),getWin:r=>t.getDoc(r).defaultView??window,getActiveElement:r=>t.getDoc(r).activeElement,isActiveElement:(r,n)=>n===t.getActiveElement(r),getById:(r,n)=>t.getRootNode(r).getElementById(n),setValue:(r,n)=>{if(r==null||n==null)return;let o=n.toString();r.value!==o&&(r.value=n.toString())}};return{...t,...e}}function J7e(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function qte(e,t){let{rootEl:r,...n}=t||{};!e||!r||!Z7e(r)||!J7e(r)||e.scrollIntoView(n)}var Kk=new WeakMap;function eWe(e,t,r){Kk.has(e)||Kk.set(e,new Map);let n=Kk.get(e),o=n.get(t);if(!o)return n.set(t,r()),()=>{var s;(s=n.get(t))==null||s(),n.delete(t)};let i=r(),a=()=>{i(),o(),n.delete(t)};return n.set(t,a),()=>{n.get(t)===a&&(i(),n.set(t,o))}}function zte(e,t){return e?eWe(e,"style",()=>{let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}):()=>{}}var tWe=1e3/60;function rWe(e,t){let r=e();if(qn(r)&&r.isConnected)return t(r),()=>{};{let n=setInterval(()=>{let o=e();qn(o)&&o.isConnected&&(t(o),clearInterval(n))},tWe);return()=>clearInterval(n)}}function Vte(e,t){let r=[];return e==null||e.forEach(n=>{let o=rWe(n,t);r.push(o)}),()=>{r.forEach(n=>n())}}var Wte=e=>e[0],Gte=e=>e[e.length-1];var Hte=e=>(e==null?void 0:e.constructor.name)==="Array",nO=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof(e==null?void 0:e.isEqual)=="function"&&typeof(t==null?void 0:t.isEqual)=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(Hte(e)&&Hte(t))return Array.from(e).toString()===Array.from(t).toString();if(typeof e!="object"||typeof t!="object")return!1;let r=Object.keys(t??Object.create(null)),n=r.length;for(let o=0;o<n;o++)if(!Reflect.has(e,r[o]))return!1;for(let o=0;o<n;o++){let i=r[o];if(!nO(e[i],t[i]))return!1}return!0},qf=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,Kte=e=>e,Yte=()=>{},oO=(...e)=>(...t)=>{e.forEach(function(r){r==null||r(...t)})},Xte=(()=>{let e=0;return()=>(e++,e.toString(36))})();var iO=e=>typeof e=="number"&&!Number.isNaN(e);var aO=e=>typeof e=="function",Zte=e=>e==null;function Ro(e){if(!nWe(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(n=>typeof n=="string"),r={};for(let n of t){let o=e[n];o!==void 0&&(r[n]=Ro(o))}return r}var nWe=e=>e&&typeof e=="object"&&e.constructor===Object;function oWe(e,t){let r={},n={},o=new Set(t);for(let i in e)o.has(i)?n[i]=e[i]:r[i]=e[i];return[n,r]}var Sa=e=>function(r){return oWe(r,e)};function Vh(...e){let t=e.length===1?e[0]:e[1],r=e.length===2?e[0]:!0}var Ta=(e,t,r,n)=>{let o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,r,n),()=>{o==null||o.removeEventListener(t,r,n)}};function Jte(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var ew=e=>e.button===0,tw=e=>e.button===2||Ite()&&e.ctrlKey&&e.button===0,ere=e=>e.ctrlKey||e.altKey||e.metaKey;function iWe(e,t,r){let o=(a=>{let s=requestAnimationFrame(a);return()=>cancelAnimationFrame(s)})(()=>{e.removeEventListener(t,i,!0),r()}),i=()=>{o(),r()};return e.addEventListener(t,i,{once:!0,capture:!0}),o}function aWe(e){return(e==null?void 0:e.matches("a[href]"))??!1}function sO(e){if(!aWe(e))return;let t=()=>e.click();Rte()?iWe(e,"keyup",t):queueMicrotask(t)}function lO(e,t,r){if(!e)return;let n=e.ownerDocument.defaultView||window,o=new n.CustomEvent(t,r);return e.dispatchEvent(o)}var sWe={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Qte={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function uO(e,t={}){let{dir:r="ltr",orientation:n="horizontal"}=t,{key:o}=e;return o=sWe[o]??o,r==="rtl"&&n==="horizontal"&&o in Qte&&(o=Qte[o]),o}function lWe(e,t="client"){let r=e.touches[0]||e.changedTouches[0];return{x:r[`${t}X`],y:r[`${t}Y`]}}function uWe(e,t="client"){return{x:e[`${t}X`],y:e[`${t}Y`]}}var cWe=e=>"touches"in e&&e.touches.length>0;function rw(e,t="client"){return cWe(e)?lWe(e,t):uWe(e,t)}function tre(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function rre(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tre(Object(r),!0).forEach(function(n){dWe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tre(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dWe(e,t,r){return t=pWe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fWe(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pWe(e){var t=fWe(e,"string");return typeof t=="symbol"?t:String(t)}var nre={activateTrap:function(t,r){if(t.length>0){var n=t[t.length-1];n!==r&&n.pause()}var o=t.indexOf(r);o===-1||t.splice(o,1),t.push(r)},deactivateTrap:function(t,r){var n=t.indexOf(r);n!==-1&&t.splice(n,1),t.length>0&&t[t.length-1].unpause()}},mWe=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},gWe=function(t){return(t==null?void 0:t.key)==="Escape"||(t==null?void 0:t.key)==="Esc"||(t==null?void 0:t.keyCode)===27},Wh=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},hWe=function(t){return Wh(t)&&!t.shiftKey},vWe=function(t){return Wh(t)&&t.shiftKey},ore=function(t){return setTimeout(t,0)},ire=function(t,r){var n=-1;return t.every(function(o,i){return r(o)?(n=i,!1):!0}),n},Hh=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return typeof t=="function"?t.apply(void 0,n):t},nw=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},yWe=[],are=function(t,r){var n=(r==null?void 0:r.document)||document,o=(r==null?void 0:r.trapStack)||yWe,i=rre({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:hWe,isKeyBackward:vWe},r),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,l=function(I,B,L){return I&&I[B]!==void 0?I[B]:i[L||B]},u=function(I,B){var L=typeof(B==null?void 0:B.composedPath)=="function"?B.composedPath():void 0;return a.containerGroups.findIndex(function(U){var K=U.container,z=U.tabbableNodes;return K.contains(I)||(L==null?void 0:L.includes(K))||z.find(function(ae){return ae===I})})},c=function(I){var B=i[I];if(typeof B=="function"){for(var L=arguments.length,U=new Array(L>1?L-1:0),K=1;K<L;K++)U[K-1]=arguments[K];B=B.apply(void 0,U)}if(B===!0&&(B=void 0),!B){if(B===void 0||B===!1)return B;throw new Error("`".concat(I,"` was specified but was not a node, or did not return a node"))}var z=B;if(typeof B=="string"&&(z=n.querySelector(B),!z))throw new Error("`".concat(I,"` as selector refers to no known node"));return z},f=function(){var I=c("initialFocus");if(I===!1)return!1;if(I===void 0||!Ox(I,i.tabbableOptions))if(u(n.activeElement)>=0)I=n.activeElement;else{var B=a.tabbableGroups[0],L=B&&B.firstTabbableNode;I=L||c("fallbackFocus")}if(!I)throw new Error("Your focus-trap needs to have at least one focusable element");return I},d=function(){if(a.containerGroups=a.containers.map(function(I){var B=KJ(I,i.tabbableOptions),L=YJ(I,i.tabbableOptions),U=B.length>0?B[0]:void 0,K=B.length>0?B[B.length-1]:void 0,z=L.find(function(O){return Ku(O)}),ae=L.slice().reverse().find(function(O){return Ku(O)}),ie=!!B.find(function(O){return bl(O)>0});return{container:I,tabbableNodes:B,focusableNodes:L,posTabIndexesFound:ie,firstTabbableNode:U,lastTabbableNode:K,firstDomTabbableNode:z,lastDomTabbableNode:ae,nextTabbableNode:function(J){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,k=B.indexOf(J);return k<0?ue?L.slice(L.indexOf(J)+1).find(function(be){return Ku(be)}):L.slice(0,L.indexOf(J)).reverse().find(function(be){return Ku(be)}):B[k+(ue?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(I){return I.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(I){return I.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},p=function M(I){var B=I.activeElement;if(B)return B.shadowRoot&&B.shadowRoot.activeElement!==null?M(B.shadowRoot):B},v=function M(I){if(I!==!1&&I!==p(document)){if(!I||!I.focus){M(f());return}I.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=I,mWe(I)&&I.select()}},h=function(I){var B=c("setReturnFocus",I);return B||(B===!1?!1:I)},y=function(I){var B=I.target,L=I.event,U=I.isBackward,K=U===void 0?!1:U;B=B||nw(L),d();var z=null;if(a.tabbableGroups.length>0){var ae=u(B,L),ie=ae>=0?a.containerGroups[ae]:void 0;if(ae<0)K?z=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:z=a.tabbableGroups[0].firstTabbableNode;else if(K){var O=ire(a.tabbableGroups,function(Te){var Ke=Te.firstTabbableNode;return B===Ke});if(O<0&&(ie.container===B||Ox(B,i.tabbableOptions)&&!Ku(B,i.tabbableOptions)&&!ie.nextTabbableNode(B,!1))&&(O=ae),O>=0){var J=O===0?a.tabbableGroups.length-1:O-1,ue=a.tabbableGroups[J];z=bl(B)>=0?ue.lastTabbableNode:ue.lastDomTabbableNode}else Wh(L)||(z=ie.nextTabbableNode(B,!1))}else{var k=ire(a.tabbableGroups,function(Te){var Ke=Te.lastTabbableNode;return B===Ke});if(k<0&&(ie.container===B||Ox(B,i.tabbableOptions)&&!Ku(B,i.tabbableOptions)&&!ie.nextTabbableNode(B))&&(k=ae),k>=0){var be=k===a.tabbableGroups.length-1?0:k+1,Oe=a.tabbableGroups[be];z=bl(B)>=0?Oe.firstTabbableNode:Oe.firstDomTabbableNode}else Wh(L)||(z=ie.nextTabbableNode(B))}}else z=c("fallbackFocus");return z},g=function(I){var B=nw(I);if(!(u(B,I)>=0)){if(Hh(i.clickOutsideDeactivates,I)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Hh(i.allowOutsideClick,I)||I.preventDefault()}},m=function(I){var B=nw(I),L=u(B,I)>=0;if(L||B instanceof Document)L&&(a.mostRecentlyFocusedNode=B);else{I.stopImmediatePropagation();var U,K=!0;if(a.mostRecentlyFocusedNode)if(bl(a.mostRecentlyFocusedNode)>0){var z=u(a.mostRecentlyFocusedNode),ae=a.containerGroups[z].tabbableNodes;if(ae.length>0){var ie=ae.findIndex(function(O){return O===a.mostRecentlyFocusedNode});ie>=0&&(i.isKeyForward(a.recentNavEvent)?ie+1<ae.length&&(U=ae[ie+1],K=!1):ie-1>=0&&(U=ae[ie-1],K=!1))}}else a.containerGroups.some(function(O){return O.tabbableNodes.some(function(J){return bl(J)>0})})||(K=!1);else K=!1;K&&(U=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),v(U||a.mostRecentlyFocusedNode||f())}a.recentNavEvent=void 0},b=function(I){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=I;var L=y({event:I,isBackward:B});L&&(Wh(I)&&I.preventDefault(),v(L))},E=function(I){if(gWe(I)&&Hh(i.escapeDeactivates,I)!==!1){I.preventDefault(),s.deactivate();return}(i.isKeyForward(I)||i.isKeyBackward(I))&&b(I,i.isKeyBackward(I))},C=function(I){var B=nw(I);u(B,I)>=0||Hh(i.clickOutsideDeactivates,I)||Hh(i.allowOutsideClick,I)||(I.preventDefault(),I.stopImmediatePropagation())},x=function(){if(a.active)return nre.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?ore(function(){v(f())}):v(f()),n.addEventListener("focusin",m,!0),n.addEventListener("mousedown",g,{capture:!0,passive:!1}),n.addEventListener("touchstart",g,{capture:!0,passive:!1}),n.addEventListener("click",C,{capture:!0,passive:!1}),n.addEventListener("keydown",E,{capture:!0,passive:!1}),s},P=function(){if(a.active)return n.removeEventListener("focusin",m,!0),n.removeEventListener("mousedown",g,!0),n.removeEventListener("touchstart",g,!0),n.removeEventListener("click",C,!0),n.removeEventListener("keydown",E,!0),s},N=function(I){var B=I.some(function(L){var U=Array.from(L.removedNodes);return U.some(function(K){return K===a.mostRecentlyFocusedNode})});B&&v(f())},D=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(N):void 0,R=function(){D&&(D.disconnect(),a.active&&!a.paused&&a.containers.map(function(I){D.observe(I,{subtree:!0,childList:!0})}))};return s={get active(){return a.active},get paused(){return a.paused},activate:function(I){if(a.active)return this;var B=l(I,"onActivate"),L=l(I,"onPostActivate"),U=l(I,"checkCanFocusTrap");U||d(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=n.activeElement,B==null||B();var K=function(){U&&d(),x(),R(),L==null||L()};return U?(U(a.containers.concat()).then(K,K),this):(K(),this)},deactivate:function(I){if(!a.active)return this;var B=rre({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},I);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,P(),a.active=!1,a.paused=!1,R(),nre.deactivateTrap(o,s);var L=l(B,"onDeactivate"),U=l(B,"onPostDeactivate"),K=l(B,"checkCanReturnFocus"),z=l(B,"returnFocus","returnFocusOnDeactivate");L==null||L();var ae=function(){ore(function(){z&&v(h(a.nodeFocusedBeforeActivation)),U==null||U()})};return z&&K?(K(h(a.nodeFocusedBeforeActivation)).then(ae,ae),this):(ae(),this)},pause:function(I){if(a.paused||!a.active)return this;var B=l(I,"onPause"),L=l(I,"onPostPause");return a.paused=!0,B==null||B(),P(),R(),L==null||L(),this},unpause:function(I){if(!a.paused||!a.active)return this;var B=l(I,"onUnpause"),L=l(I,"onPostUnpause");return a.paused=!1,B==null||B(),d(),x(),R(),L==null||L(),this},updateContainerElements:function(I){var B=[].concat(I).filter(Boolean);return a.containers=B.map(function(L){return typeof L=="string"?n.querySelector(L):L}),a.active&&d(),R(),this}},s.updateContainerElements(t),s};function ure(e){let t=ui(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=ji(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=Dh(r)!==i||Dh(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function dO(e){return li(e)?e:e.contextElement}function zf(e){let t=dO(e);if(!ji(t))return ls(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:i}=ure(t),a=(i?Dh(r.width):r.width)/n,s=(i?Dh(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}var bWe=ls(0);function cre(e){let t=ao(e);return!Sx()||!t.visualViewport?bWe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function EWe(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ao(e)?!1:t}function nc(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let o=e.getBoundingClientRect(),i=dO(e),a=ls(1);t&&(n?li(n)&&(a=zf(n)):a=zf(e));let s=EWe(i,r,n)?cre(i):ls(0),l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,c=o.width/a.x,f=o.height/a.y;if(i){let d=ao(i),p=n&&li(n)?ao(n):n,v=d,h=v.frameElement;for(;h&&n&&p!==v;){let y=zf(h),g=h.getBoundingClientRect(),m=ui(h),b=g.left+(h.clientLeft+parseFloat(m.paddingLeft))*y.x,E=g.top+(h.clientTop+parseFloat(m.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,f*=y.y,l+=b,u+=E,v=ao(h),h=v.frameElement}}return Vu({width:c,height:f,x:l,y:u})}var xWe=[":popover-open",":modal"];function fO(e){return xWe.some(t=>{try{return e.matches(t)}catch{return!1}})}function wWe(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,i=o==="fixed",a=Ea(n),s=t?fO(t.floating):!1;if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},u=ls(1),c=ls(0),f=ji(n);if((f||!f&&!i)&&((Hu(n)!=="body"||kf(a))&&(l=Oh(n)),ji(n))){let d=nc(n);u=zf(n),c.x=d.x+n.clientLeft,c.y=d.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x,y:r.y*u.y-l.scrollTop*u.y+c.y}}function _We(e){return Array.from(e.getClientRects())}function dre(e){return nc(Ea(e)).left+Oh(e).scrollLeft}function CWe(e){let t=Ea(e),r=Oh(e),n=e.ownerDocument.body,o=jn(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=jn(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+dre(e),s=-r.scrollTop;return ui(n).direction==="rtl"&&(a+=jn(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}function SWe(e,t){let r=ao(e),n=Ea(e),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;let u=Sx();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function TWe(e,t){let r=nc(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=ji(e)?zf(e):ls(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,u=n*i.y;return{width:a,height:s,x:l,y:u}}function sre(e,t,r){let n;if(t==="viewport")n=SWe(e,r);else if(t==="document")n=CWe(Ea(e));else if(li(t))n=TWe(t,r);else{let o=cre(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return Vu(n)}function fre(e,t){let r=cs(e);return r===t||!li(r)||Wu(r)?!1:ui(r).position==="fixed"||fre(r,t)}function PWe(e,t){let r=t.get(e);if(r)return r;let n=Df(e,[],!1).filter(s=>li(s)&&Hu(s)!=="body"),o=null,i=ui(e).position==="fixed",a=i?cs(e):e;for(;li(a)&&!Wu(a);){let s=ui(a),l=Cx(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||kf(a)&&!l&&fre(e,a))?n=n.filter(c=>c!==a):o=s,a=cs(a)}return t.set(e,n),n}function AWe(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,a=[...r==="clippingAncestors"?fO(t)?[]:PWe(t,this._c):[].concat(r),n],s=a[0],l=a.reduce((u,c)=>{let f=sre(t,c,o);return u.top=jn(f.top,u.top),u.right=ya(f.right,u.right),u.bottom=ya(f.bottom,u.bottom),u.left=jn(f.left,u.left),u},sre(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function DWe(e){let{width:t,height:r}=ure(e);return{width:t,height:r}}function kWe(e,t,r){let n=ji(t),o=Ea(t),i=r==="fixed",a=nc(e,!0,i,t),s={scrollLeft:0,scrollTop:0},l=ls(0);if(n||!n&&!i)if((Hu(t)!=="body"||kf(o))&&(s=Oh(t)),n){let f=nc(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=dre(o));let u=a.left+s.scrollLeft-l.x,c=a.top+s.scrollTop-l.y;return{x:u,y:c,width:a.width,height:a.height}}function cO(e){return ui(e).position==="static"}function lre(e,t){return!ji(e)||ui(e).position==="fixed"?null:t?t(e):e.offsetParent}function pre(e,t){let r=ao(e);if(fO(e))return r;if(!ji(e)){let o=cs(e);for(;o&&!Wu(o);){if(li(o)&&!cO(o))return o;o=cs(o)}return r}let n=lre(e,t);for(;n&&MJ(n)&&cO(n);)n=lre(n,t);return n&&Wu(n)&&cO(n)&&!Cx(n)?r:n||$J(e)||r}var OWe=async function(e){let t=this.getOffsetParent||pre,r=this.getDimensions,n=await r(e.floating);return{reference:kWe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function IWe(e){return ui(e).direction==="rtl"}var RWe={convertOffsetParentRelativeRectToViewportRelativeRect:wWe,getDocumentElement:Ea,getClippingRect:AWe,getOffsetParent:pre,getElementRects:OWe,getClientRects:_We,getDimensions:DWe,getScale:zf,isElement:li,isRTL:IWe};function NWe(e,t){let r=null,n,o=Ea(e);function i(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();let{left:u,top:c,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;let p=kh(c),v=kh(o.clientWidth-(u+f)),h=kh(o.clientHeight-(c+d)),y=kh(u),m={rootMargin:-p+"px "+-v+"px "+-h+"px "+-y+"px",threshold:jn(0,ya(1,l))||1},b=!0;function E(C){let x=C[0].intersectionRatio;if(x!==l){if(!b)return a();x?a(!1,x):n=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{r=new IntersectionObserver(E,{...m,root:o.ownerDocument})}catch{r=new IntersectionObserver(E,m)}r.observe(e)}return a(!0),i}function mre(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=dO(e),c=o||i?[...u?Df(u):[],...Df(t)]:[];c.forEach(g=>{o&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});let f=u&&s?NWe(u,r):null,d=-1,p=null;a&&(p=new ResizeObserver(g=>{let[m]=g;m&&m.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),r()}),u&&!l&&p.observe(u),p.observe(t));let v,h=l?nc(e):null;l&&y();function y(){let g=nc(e);h&&(g.x!==h.x||g.y!==h.y||g.width!==h.width||g.height!==h.height)&&r(),h=g,v=requestAnimationFrame(y)}return r(),()=>{var g;c.forEach(m=>{o&&m.removeEventListener("scroll",r),i&&m.removeEventListener("resize",r)}),f==null||f(),(g=p)==null||g.disconnect(),p=null,l&&cancelAnimationFrame(v)}}var gre=IJ;var hre=RJ,vre=kJ,yre=LJ;var bre=DJ;var Ere=NJ,xre=(e,t,r)=>{let n=new Map,o={platform:RWe,...r},i={...o.platform,_c:n};return AJ(e,t,{...o,platform:i})};function wre(e=0,t=0,r=0,n=0){if(typeof DOMRect=="function")return new DOMRect(e,t,r,n);let o={x:e,y:t,width:r,height:n,top:t,right:e+r,bottom:t+n,left:e};return{...o,toJSON:()=>o}}function LWe(e){if(!e)return wre();let{x:t,y:r,width:n,height:o}=e;return wre(t,r,n,o)}function BWe(e,t){return{contextElement:qn(e)?e:void 0,getBoundingClientRect:()=>{let r=e,n=t==null?void 0:t(r);return n||!r?LWe(n):r.getBoundingClientRect()}}}var Gh=e=>({variable:e,reference:`var(${e})`}),hs={arrowSize:Gh("--arrow-size"),arrowSizeHalf:Gh("--arrow-size-half"),arrowBg:Gh("--arrow-background"),transformOrigin:Gh("--transform-origin"),arrowOffset:Gh("--arrow-offset")},FWe=e=>({top:"bottom center","top-start":e?`${e.x}px bottom`:"left bottom","top-end":e?`${e.x}px bottom`:"right bottom",bottom:"top center","bottom-start":e?`${e.x}px top`:"top left","bottom-end":e?`${e.x}px top`:"top right",left:"right center","left-start":e?`right ${e.y}px`:"right top","left-end":e?`right ${e.y}px`:"right bottom",right:"left center","right-start":e?`left ${e.y}px`:"left top","right-end":e?`left ${e.y}px`:"left bottom"}),MWe={name:"transformOrigin",fn({placement:e,elements:t,middlewareData:r}){let{arrow:n}=r,o=FWe(n)[e],{floating:i}=t;return i.style.setProperty(hs.transformOrigin.variable,o),{data:{transformOrigin:o}}}},$We={name:"rects",fn({rects:e}){return{data:e}}},UWe=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:r}){if(!r.arrow)return{};let{x:n,y:o}=r.arrow,i=t.split("-")[0];return Object.assign(e.style,{left:n!=null?`${n}px`:"",top:o!=null?`${o}px`:"",[i]:`calc(100% + ${hs.arrowOffset.reference})`}),{}}}};function jWe(e){let[t,r]=e.split("-");return{side:t,align:r,hasAlign:r!=null}}function Cre(e){return e.split("-")[0]}var qWe={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function _re(e,t){let r=e.devicePixelRatio||1;return Math.round(t*r)/r}function Sre(e){return qf(e.boundary)}function zWe(e,t){if(e)return bre({element:e,padding:t.arrowPadding})}function VWe(e,t){if(!Zte(t.offset??t.gutter))return gre(({placement:r})=>{var u,c;let n=((e==null?void 0:e.clientHeight)||0)/2,o=((u=t.offset)==null?void 0:u.mainAxis)??t.gutter,i=typeof o=="number"?o+n:o??n,{hasAlign:a}=jWe(r),s=a?void 0:t.shift,l=((c=t.offset)==null?void 0:c.crossAxis)??s;return Ro({crossAxis:l,mainAxis:i,alignmentAxis:t.shift})})}function HWe(e){if(e.flip)return vre({boundary:Sre(e),padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function WWe(e){if(!(!e.slide&&!e.overlap))return hre({boundary:Sre(e),mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:Ere()})}function GWe(e){return yre({padding:e.overflowPadding,apply({elements:t,rects:r,availableHeight:n,availableWidth:o}){let i=t.floating,a=Math.round(r.reference.width);o=Math.floor(o),n=Math.floor(n),i.style.setProperty("--reference-width",`${a}px`),i.style.setProperty("--available-width",`${o}px`),i.style.setProperty("--available-height",`${n}px`)}})}function KWe(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function YWe(e,t,r={}){let n=BWe(e,r.getAnchorRect);if(!t||!n)return;let o=Object.assign({},qWe,r),i=t.querySelector("[data-part=arrow]"),a=[VWe(i,o),HWe(o),WWe(o),zWe(i,o),UWe(i),MWe,GWe(o),$We],{placement:s,strategy:l,onComplete:u,onPositioned:c}=o,f=async()=>{if(!n||!t)return;let h=await xre(n,t,{placement:s,middleware:a,strategy:l});u==null||u(h),c==null||c({placed:!0});let y=_a(t),g=_re(y,h.x),m=_re(y,h.y);t.style.setProperty("--x",`${g}px`),t.style.setProperty("--y",`${m}px`);let b=t.firstElementChild;if(b){let E=y.getComputedStyle(b).zIndex;t.style.setProperty("--z-index",E)}},d=async()=>{r.updatePosition?(await r.updatePosition({updatePosition:f}),c==null||c({placed:!0})):await f()},p=KWe(o.listeners),v=o.listeners?mre(n,t,d,p):Yte;return d(),()=>{v==null||v(),c==null||c({placed:!1})}}function pO(e,t,r={}){let{defer:n,...o}=r,i=n?pr:s=>s(),a=[];return a.push(i(()=>{let s=typeof e=="function"?e():e,l=typeof t=="function"?t():t;a.push(YWe(s,l,o))})),()=>{a.forEach(s=>s==null?void 0:s())}}var XWe={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function Tre(e={}){let{placement:t,sameWidth:r,fitViewport:n,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:hs.arrowSize.reference,height:hs.arrowSize.reference,[hs.arrowSizeHalf.variable]:`calc(${hs.arrowSize.reference} / 2)`,[hs.arrowOffset.variable]:`calc(${hs.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?XWe[t.split("-")[0]]:void 0,background:hs.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:r?void 0:"max-content",width:r?"var(--reference-width)":void 0,maxWidth:n?"var(--available-width)":void 0,maxHeight:n?"var(--available-height)":void 0,top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}function ZWe(e){let t={each(r){var n;for(let o=0;o<((n=e.frames)==null?void 0:n.length);o+=1){let i=e.frames[o];i&&r(i)}},addEventListener(r,n,o){return t.each(i=>{try{i.document.addEventListener(r,n,o)}catch{}}),()=>{try{t.removeEventListener(r,n,o)}catch{}}},removeEventListener(r,n,o){t.each(i=>{try{i.document.removeEventListener(r,n,o)}catch{}})}};return t}var Pre="pointerdown.outside",Are="focus.outside";function QWe(e){for(let t of e)if(qn(t)&&Xx(t))return!0;return!1}var Dre=e=>"clientY"in e;function JWe(e,t){if(!Dre(t)||!e)return!1;let r=e.getBoundingClientRect();return r.width===0||r.height===0?!1:r.top<=t.clientY&&t.clientY<=r.top+r.height&&r.left<=t.clientX&&t.clientX<=r.left+r.width}function eGe(e){let t=zi(e);if(!t||!Dre(e))return!1;let n=t.scrollHeight>t.clientHeight&&e.clientX>t.clientWidth,i=t.scrollWidth>t.clientWidth&&e.clientY>t.clientHeight;return n||i}function tGe(e,t){let{exclude:r,onFocusOutside:n,onPointerDownOutside:o,onInteractOutside:i,defer:a}=t;if(!e)return;let s=gs(e),l=_a(e),u=ZWe(l);function c(y){let g=zi(y);return!qn(g)||di(e,g)||JWe(e,y)||eGe(y)?!1:!(r!=null&&r(g))}let f;function d(y){function g(){var E;let m=a?pr:C=>C(),b=((E=y.composedPath)==null?void 0:E.call(y))??[y.target];m(()=>{if(!(!e||!c(y))){if(o||i){let C=oO(o,i);e.addEventListener(Pre,C,{once:!0})}lO(e,Pre,{bubbles:!1,cancelable:!0,detail:{originalEvent:y,contextmenu:tw(y),focusable:QWe(b)}})}})}y.pointerType==="touch"?(u.removeEventListener("click",g),s.removeEventListener("click",g),f=g,s.addEventListener("click",g,{once:!0}),u.addEventListener("click",g,{once:!0})):g()}let p=new Set,v=setTimeout(()=>{p.add(u.addEventListener("pointerdown",d,!0)),p.add(Ta(s,"pointerdown",d,!0))},0);function h(y){(a?pr:m=>m())(()=>{if(!(!e||!c(y))){if(n||i){let m=oO(n,i);e.addEventListener(Are,m,{once:!0})}lO(e,Are,{bubbles:!1,cancelable:!0,detail:{originalEvent:y,contextmenu:!1,focusable:Xx(zi(y))}})}})}return p.add(Ta(s,"focusin",h,!0)),p.add(u.addEventListener("focusin",h,!0)),()=>{clearTimeout(v),f&&(u.removeEventListener("click",f),s.removeEventListener("click",f)),p.forEach(y=>y())}}function kre(e,t){let{defer:r}=t,n=r?pr:i=>i(),o=[];return o.push(n(()=>{let i=typeof e=="function"?e():e;o.push(tGe(i,t))})),()=>{o.forEach(i=>i==null?void 0:i())}}function rGe(e,t){let r=n=>{n.key==="Escape"&&(n.isComposing||t==null||t(n))};return Ta(gs(e),"keydown",r,{capture:!0})}var No={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var n;let t=this.indexOf(e),r=this.topMostPointerBlockingLayer()?this.indexOf((n=this.topMostPointerBlockingLayer())==null?void 0:n.node):-1;return t<r},isTopMost(e){let t=this.layers[this.count()-1];return(t==null?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},isInNestedLayer(e,t){return this.getNestedLayers(e).some(r=>di(r.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>di(t,e))},add(e){let t=this.layers.push(e);e.node.style.setProperty("--layer-index",`${t}`)},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(n=>n.dismiss()),this.layers.splice(t,1),e.style.removeProperty("--layer-index"))},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e){var t;(t=this.layers[this.indexOf(e)])==null||t.dismiss()},clear(){this.remove(this.layers[0].node)}},Ore;function Ire(){No.layers.forEach(({node:e})=>{e.style.pointerEvents=No.isBelowPointerBlockingLayer(e)?"none":"auto"})}function nGe(e){e.style.pointerEvents=""}function oGe(e,t){let r=gs(e),n=[];if(No.hasPointerBlockingLayer()&&!r.body.hasAttribute("data-inert")&&(Ore=document.body.style.pointerEvents,queueMicrotask(()=>{r.body.style.pointerEvents="none",r.body.setAttribute("data-inert","")})),t){let o=Vte(t,i=>{n.push(zte(i,{pointerEvents:"auto"}))});n.push(o)}return()=>{No.hasPointerBlockingLayer()||(queueMicrotask(()=>{r.body.style.pointerEvents=Ore,r.body.removeAttribute("data-inert"),r.body.style.length===0&&r.body.removeAttribute("style")}),n.forEach(o=>o()))}}function iGe(e,t){if(!e){Vh("[@zag-js/dismissable] node is `null` or `undefined`");return}let{onDismiss:r,pointerBlocking:n,exclude:o,debug:i}=t,a={dismiss:r,node:e,pointerBlocking:n};No.add(a),Ire();function s(d){var v,h;let p=zi(d.detail.originalEvent);No.isBelowPointerBlockingLayer(e)||No.isInBranch(p)||((v=t.onPointerDownOutside)==null||v.call(t,d),(h=t.onInteractOutside)==null||h.call(t,d),!d.defaultPrevented&&(i&&console.log("onPointerDownOutside:",d.detail.originalEvent),r==null||r()))}function l(d){var v,h;let p=zi(d.detail.originalEvent);No.isInBranch(p)||((v=t.onFocusOutside)==null||v.call(t,d),(h=t.onInteractOutside)==null||h.call(t,d),!d.defaultPrevented&&(i&&console.log("onFocusOutside:",d.detail.originalEvent),r==null||r()))}function u(d){var p;No.isTopMost(e)&&((p=t.onEscapeKeyDown)==null||p.call(t,d),!d.defaultPrevented&&r&&(d.preventDefault(),r()))}function c(d){var y;if(!e)return!1;let p=typeof o=="function"?o():o,v=Array.isArray(p)?p:[p],h=(y=t.persistentElements)==null?void 0:y.map(g=>g()).filter(qn);return h&&v.push(...h),v.some(g=>di(g,d))||No.isInNestedLayer(e,d)}let f=[n?oGe(e,t.persistentElements):void 0,rGe(e,u),kre(e,{exclude:c,onFocusOutside:l,onPointerDownOutside:s,defer:t.defer})];return()=>{No.remove(e),Ire(),nGe(e),f.forEach(d=>d==null?void 0:d())}}function ow(e,t){let{defer:r}=t,n=r?pr:i=>i(),o=[];return o.push(n(()=>{let i=aO(e)?e():e;o.push(iGe(i,t))})),()=>{o.forEach(i=>i==null?void 0:i())}}function Rre(e,t={}){let{defer:r}=t,n=r?pr:i=>i(),o=[];return o.push(n(()=>{let i=aO(e)?e():e;if(!i){Vh("[@zag-js/dismissable] branch node is `null` or `undefined`");return}No.addBranch(i),o.push(()=>{No.removeBranch(i)})})),()=>{o.forEach(i=>i==null?void 0:i())}}function Nre(e,t,r){let n=e.matches("mounted","unmountSuspended");return{skip:!e.context.initial&&n,present:n,setNode(o){o&&t({type:"NODE.SET",node:o})},unmount(){t({type:"UNMOUNT"})}}}function iw(e){return(e==null?void 0:e.animationName)||"none"}function Lre(e){return ci({initial:e.present?"mounted":"unmounted",context:{node:null,styles:null,unmountAnimationName:null,prevAnimationName:null,present:!1,initial:!1,...e},exit:["clearInitial"],watch:{present:["setInitial","syncPresence"]},on:{"NODE.SET":{actions:["setNode","setStyles"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["invokeOnExitComplete"]},"UNMOUNT.SUSPEND":"unmountSuspended"}},unmountSuspended:{activities:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},"ANIMATION.END":{target:"unmounted",actions:["invokeOnExitComplete"]},UNMOUNT:{target:"unmounted",actions:["invokeOnExitComplete"]}}},unmounted:{entry:["clearPrevAnimationName"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}}},{actions:{setInitial(t){t.initial=!0},clearInitial(t){t.initial=!1},invokeOnExitComplete(t){var r;(r=t.onExitComplete)==null||r.call(t)},setNode(t,r){t.node=Oo(r.node)},setStyles(t,r){let n=r.node.ownerDocument.defaultView||window;t.styles=Oo(n.getComputedStyle(r.node))},syncPresence(t,r,{send:n}){if(t.present){n({type:"MOUNT",src:"presence.changed"});return}let o=iw(t.styles);(t.immediate?queueMicrotask:requestAnimationFrame)(()=>{var a;t.unmountAnimationName=o,o==="none"||o===t.prevAnimationName||((a=t.styles)==null?void 0:a.display)==="none"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName(t){(t.immediate?queueMicrotask:requestAnimationFrame)(()=>{t.prevAnimationName=iw(t.styles)})},clearPrevAnimationName(t){t.prevAnimationName=null}},activities:{trackAnimationEvents(t,r,{send:n}){let o=t.node;if(!o)return;let i=s=>{s.target===o&&(t.prevAnimationName=iw(t.styles))},a=s=>{let l=iw(t.styles);s.target===o&&l===t.unmountAnimationName&&n({type:"UNMOUNT",src:"animationend"})};return o.addEventListener("animationstart",i),o.addEventListener("animationcancel",a),o.addEventListener("animationend",a),()=>{o.removeEventListener("animationstart",i),o.removeEventListener("animationcancel",a),o.removeEventListener("animationend",a)}}}})}var wDt=so()(["onExitComplete","present","immediate"]);var Kh=new WeakMap,fi=[];function sGe(e,t={}){let{rootEl:r}=t,n=e.filter(Boolean);if(n.length===0)return;let o=n[0].ownerDocument||document,i=o.defaultView??window,a=new Set(n),s=new Set,l=r??o.body,u=p=>{for(let g of p.querySelectorAll("[data-live-announcer], [data-zag-top-layer]"))a.add(g);let v=g=>{if(a.has(g)||s.has(g.parentElement)&&g.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let m of a)if(g.contains(m))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},h=o.createTreeWalker(p,NodeFilter.SHOW_ELEMENT,{acceptNode:v}),y=v(p);if(y===NodeFilter.FILTER_ACCEPT&&c(p),y!==NodeFilter.FILTER_REJECT){let g=h.nextNode();for(;g!=null;)c(g),g=h.nextNode()}},c=p=>{let v=Kh.get(p)??0;p.getAttribute("aria-hidden")==="true"&&v===0||(v===0&&p.setAttribute("aria-hidden","true"),s.add(p),Kh.set(p,v+1))};fi.length&&fi[fi.length-1].disconnect(),u(l);let f=new i.MutationObserver(p=>{for(let v of p)if(!(v.type!=="childList"||v.addedNodes.length===0)&&![...a,...s].some(h=>h.contains(v.target))){for(let h of v.removedNodes)h instanceof i.Element&&(a.delete(h),s.delete(h));for(let h of v.addedNodes)(h instanceof i.HTMLElement||h instanceof i.SVGElement)&&(h.dataset.liveAnnouncer==="true"||h.dataset.zagTopLayer==="true")?a.add(h):h instanceof i.Element&&u(h)}});f.observe(l,{childList:!0,subtree:!0});let d={observe(){f.observe(l,{childList:!0,subtree:!0})},disconnect(){f.disconnect()}};return fi.push(d),()=>{f.disconnect();for(let p of s){let v=Kh.get(p);v===1?(p.removeAttribute("aria-hidden"),Kh.delete(p)):Kh.set(p,v-1)}d===fi[fi.length-1]?(fi.pop(),fi.length&&fi[fi.length-1].observe()):fi.splice(fi.indexOf(d),1)}}function Bre(e,t={}){let{defer:r}=t,n=r?pr:i=>i(),o=[];return o.push(n(()=>{let i=typeof e=="function"?e():e;o.push(sGe(i,t))})),()=>{o.forEach(i=>i==null?void 0:i())}}var Yh=(e,t=[])=>({parts:(...r)=>{if(lGe(t))return Yh(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>Yh(e,[...t,...r]),rename:r=>Yh(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${Vf(e)}"][data-part="${Vf(n)}"]`,`& [data-scope="${Vf(e)}"][data-part="${Vf(n)}"]`].join(", "),attrs:{"data-scope":Vf(e),"data-part":Vf(n)}}}),{})}),Vf=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),lGe=e=>e.length===0;var mO="data-zag-scroll-lock";function Fre(e,t){if(!e)return;let r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}function uGe(e,t,r){if(!e)return;let n=e.style.getPropertyValue(t);return e.style.setProperty(t,r),()=>{n?e.style.setProperty(t,n):e.style.removeProperty(t)}}function cGe(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Mre(e){let t=e??document,r=t.defaultView??window,{documentElement:n,body:o}=t;if(o.hasAttribute(mO))return;o.setAttribute(mO,"");let a=r.innerWidth-n.clientWidth,s=()=>uGe(n,"--scrollbar-width",`${a}px`),l=cGe(n),u=()=>Fre(o,{overflow:"hidden",[l]:`${a}px`}),c=()=>{let{scrollX:d,scrollY:p,visualViewport:v}=r,h=(v==null?void 0:v.offsetLeft)??0,y=(v==null?void 0:v.offsetTop)??0,g=Fre(o,{position:"fixed",overflow:"hidden",top:`${-(p-Math.floor(y))}px`,left:`${-(d-Math.floor(h))}px`,right:"0",[l]:`${a}px`});return()=>{g==null||g(),r.scrollTo({left:d,top:p,behavior:"instant"})}},f=[s(),Xk()?c():u()];return()=>{f.forEach(d=>d==null?void 0:d()),o.removeAttribute(mO)}}var dGe=Yh("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),oc=dGe.build(),ht=Ca({getPositionerId:e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`dialog:${e.id}:positioner`},getBackdropId:e=>{var t;return((t=e.ids)==null?void 0:t.backdrop)??`dialog:${e.id}:backdrop`},getContentId:e=>{var t;return((t=e.ids)==null?void 0:t.content)??`dialog:${e.id}:content`},getTriggerId:e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`dialog:${e.id}:trigger`},getTitleId:e=>{var t;return((t=e.ids)==null?void 0:t.title)??`dialog:${e.id}:title`},getDescriptionId:e=>{var t;return((t=e.ids)==null?void 0:t.description)??`dialog:${e.id}:description`},getCloseTriggerId:e=>{var t;return((t=e.ids)==null?void 0:t.closeTrigger)??`dialog:${e.id}:close`},getContentEl:e=>ht.getById(e,ht.getContentId(e)),getPositionerEl:e=>ht.getById(e,ht.getPositionerId(e)),getBackdropEl:e=>ht.getById(e,ht.getBackdropId(e)),getTriggerEl:e=>ht.getById(e,ht.getTriggerId(e)),getTitleEl:e=>ht.getById(e,ht.getTitleId(e)),getDescriptionEl:e=>ht.getById(e,ht.getDescriptionId(e)),getCloseTriggerEl:e=>ht.getById(e,ht.getCloseTriggerId(e))});function $re(e,t,r){let n=e.context["aria-label"],o=e.matches("open"),i=e.context.renderedElements;return{open:o,setOpen(a){a!==o&&t(a?"OPEN":"CLOSE")},getTriggerProps(){return r.button({...oc.trigger.attrs,dir:e.context.dir,id:ht.getTriggerId(e.context),"aria-haspopup":"dialog",type:"button","aria-expanded":o,"data-state":o?"open":"closed","aria-controls":ht.getContentId(e.context),onClick(a){a.defaultPrevented||t("TOGGLE")}})},getBackdropProps(){return r.element({...oc.backdrop.attrs,dir:e.context.dir,hidden:!o,id:ht.getBackdropId(e.context),"data-state":o?"open":"closed"})},getPositionerProps(){return r.element({...oc.positioner.attrs,dir:e.context.dir,id:ht.getPositionerId(e.context),style:{pointerEvents:o?void 0:"none"}})},getContentProps(){return r.element({...oc.content.attrs,dir:e.context.dir,role:e.context.role,hidden:!o,id:ht.getContentId(e.context),tabIndex:-1,"data-state":o?"open":"closed","aria-modal":!0,"aria-label":n||void 0,"aria-labelledby":n||!i.title?void 0:ht.getTitleId(e.context),"aria-describedby":i.description?ht.getDescriptionId(e.context):void 0})},getTitleProps(){return r.element({...oc.title.attrs,dir:e.context.dir,id:ht.getTitleId(e.context)})},getDescriptionProps(){return r.element({...oc.description.attrs,dir:e.context.dir,id:ht.getDescriptionId(e.context)})},getCloseTriggerProps(){return r.button({...oc.closeTrigger.attrs,dir:e.context.dir,id:ht.getCloseTriggerId(e.context),type:"button",onClick(a){a.defaultPrevented||(a.stopPropagation(),t("CLOSE"))}})}}}function Ure(e){let t=Ro(e);return ci({id:"dialog",initial:t.open?"open":"closed",context:{role:"dialog",renderedElements:{title:!0,description:!0},modal:!0,trapFocus:!0,preventScroll:!0,closeOnInteractOutside:!0,closeOnEscape:!0,restoreFocus:!0,...t},created:["checkInitialFocusEl"],watch:{open:["toggleVisibility"]},states:{open:{entry:["checkRenderedElements","syncZIndex"],activities:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}}},{guards:{isOpenControlled:r=>!!r["open.controlled"]},activities:{trackDismissableElement(r,n,{send:o}){return ow(()=>ht.getContentEl(r),{defer:!0,pointerBlocking:r.modal,exclude:[ht.getTriggerEl(r)],onInteractOutside(a){var s;(s=r.onInteractOutside)==null||s.call(r,a),(!r.closeOnInteractOutside||r.role==="alertdialog")&&a.preventDefault()},persistentElements:r.persistentElements,onFocusOutside:r.onFocusOutside,onPointerDownOutside:r.onPointerDownOutside,onEscapeKeyDown(a){var s;(s=r.onEscapeKeyDown)==null||s.call(r,a),r.closeOnEscape?o({type:"CLOSE",src:"escape-key"}):a.preventDefault()},onDismiss(){o({type:"CLOSE",src:"interact-outside"})}})},preventScroll(r){if(r.preventScroll)return Mre(ht.getDoc(r))},trapFocus(r){if(!r.trapFocus||!r.modal)return;let n,o=rO(()=>{let i=ht.getContentEl(r);if(i){n=are(i,{document:ht.getDoc(r),escapeDeactivates:!1,preventScroll:!0,returnFocusOnDeactivate:!1,fallbackFocus:i,allowOutsideClick:!0,initialFocus:Zx({root:i,getInitialEl:r.initialFocusEl})});try{n.activate()}catch{}}});return()=>{n==null||n.deactivate(),o()}},hideContentBelow(r){return r.modal?Bre(()=>[ht.getContentEl(r)],{defer:!0}):void 0}},actions:{checkInitialFocusEl(r){!r.initialFocusEl&&r.role==="alertdialog"&&(r.initialFocusEl=()=>ht.getCloseTriggerEl(r))},checkRenderedElements(r){pr(()=>{r.renderedElements.title=!!ht.getTitleEl(r),r.renderedElements.description=!!ht.getDescriptionEl(r)})},syncZIndex(r){pr(()=>{let n=ht.getContentEl(r);if(!n)return;let i=ht.getWin(r).getComputedStyle(n);[ht.getPositionerEl(r),ht.getBackdropEl(r)].forEach(s=>{s==null||s.style.setProperty("--z-index",i.zIndex)})})},invokeOnClose(r){var n;(n=r.onOpenChange)==null||n.call(r,{open:!1})},invokeOnOpen(r){var n;(n=r.onOpenChange)==null||n.call(r,{open:!0})},toggleVisibility(r,n,{send:o}){o({type:r.open?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})},setFinalFocus(r){r.restoreFocus&&queueMicrotask(()=>{var o;let n=((o=r.finalFocusEl)==null?void 0:o.call(r))??ht.getTriggerEl(r);n==null||n.focus({preventScroll:!0})})}}})}var fGe=so()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","open.controlled","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]),$Dt=Sa(fGe);var Xh=(e,t=[])=>({parts:(...r)=>{if(mGe(t))return Xh(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>Xh(e,[...t,...r]),rename:r=>Xh(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${Hf(e)}"][data-part="${Hf(n)}"]`,`& [data-scope="${Hf(e)}"][data-part="${Hf(n)}"]`].join(", "),attrs:{"data-scope":Hf(e),"data-part":Hf(n)}}}),{})}),Hf=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),mGe=e=>e.length===0;var Zh=(e,t)=>({x:e,y:t});function gGe(e){let{x:t,y:r,width:n,height:o}=e,i=t+n/2,a=r+o/2;return{x:t,y:r,width:n,height:o,minX:t,minY:r,maxX:t+n,maxY:r+o,midX:i,midY:a,center:Zh(i,a)}}function hGe(e){let t=Zh(e.minX,e.minY),r=Zh(e.maxX,e.minY),n=Zh(e.maxX,e.maxY),o=Zh(e.minX,e.maxY);return{top:t,right:r,bottom:n,left:o}}var{min:jDt,max:qDt}=Math;function jre(e,t){let r=gGe(e),{top:n,right:o,left:i,bottom:a}=hGe(r),[s]=t.split("-");return{top:[i,n,o,a],right:[n,o,a,i],bottom:[n,i,a,o],left:[o,n,i,a]}[s]}function qre(e,t){let{x:r,y:n}=t,o=!1;for(let i=0,a=e.length-1;i<e.length;a=i++){let s=e[i].x,l=e[i].y,u=e[a].x,c=e[a].y;l>n!=c>n&&r<(u-s)*(n-l)/(c-l)+s&&(o=!o)}return o}var{sign:zDt,abs:VDt,min:HDt}=Math;var vGe=Xh("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem"),Vn=vGe.build(),Ue=Ca({getTriggerId:e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`menu:${e.id}:trigger`},getContextTriggerId:e=>{var t;return((t=e.ids)==null?void 0:t.contextTrigger)??`menu:${e.id}:ctx-trigger`},getContentId:e=>{var t;return((t=e.ids)==null?void 0:t.content)??`menu:${e.id}:content`},getArrowId:e=>{var t;return((t=e.ids)==null?void 0:t.arrow)??`menu:${e.id}:arrow`},getPositionerId:e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`menu:${e.id}:popper`},getGroupId:(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.group)==null?void 0:n.call(r,t))??`menu:${e.id}:group:${t}`},getGroupLabelId:(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.label)==null?void 0:n.call(r,t))??`menu:${e.id}:label:${t}`},getContentEl:e=>Ue.getById(e,Ue.getContentId(e)),getPositionerEl:e=>Ue.getById(e,Ue.getPositionerId(e)),getTriggerEl:e=>Ue.getById(e,Ue.getTriggerId(e)),getHighlightedItemEl:e=>e.highlightedValue?Ue.getById(e,e.highlightedValue):null,getArrowEl:e=>Ue.getById(e,Ue.getArrowId(e)),getElements:e=>{let r=`[role^="menuitem"][data-ownedby=${CSS.escape(Ue.getContentId(e))}]:not([data-disabled])`;return Jx(Ue.getContentEl(e),r)},getFirstEl:e=>Wte(Ue.getElements(e)),getLastEl:e=>Gte(Ue.getElements(e)),getNextEl:(e,t)=>Lte(Ue.getElements(e),e.highlightedValue,t??e.loopFocus),getPrevEl:(e,t)=>Bte(Ue.getElements(e),e.highlightedValue,t??e.loopFocus),getElemByKey:(e,t)=>Yx(Ue.getElements(e),{state:e.typeaheadState,key:t,activeId:e.highlightedValue}),isTargetDisabled:e=>qn(e)&&(e.dataset.disabled===""||e.hasAttribute("disabled")),isTriggerItem:e=>{var t;return!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))&&!!(e!=null&&e.hasAttribute("aria-controls"))},getOptionFromItemEl(e){return{id:e.id,name:e.dataset.name,value:e.dataset.value,valueText:e.dataset.valueText,type:e.dataset.type}}});function Vre(e,t,r){let n=e.context.isSubmenu,o=e.context.isTypingAhead,i=e.context.composite,a=e.hasTag("open"),s=Tre({...e.context.positioning,placement:e.context.anchorPoint?"bottom":e.context.currentPlacement});function l(d){return{disabled:!!d.disabled,highlighted:e.context.highlightedValue===d.value}}function u(d){let p=d.valueText??d.value;return{...d,id:d.value,valueText:p}}function c(d){return{...l(u(d)),checked:!!d.checked}}function f(d){let{value:p,closeOnSelect:v,valueText:h}=d,y=l(d);return r.element({...Vn.item.attrs,id:p,role:"menuitem","aria-disabled":y.disabled,"data-disabled":zn(y.disabled),"data-ownedby":Ue.getContentId(e.context),"data-highlighted":zn(y.highlighted),"data-valuetext":h,onDragStart(g){g.currentTarget.matches("a[href]")&&g.preventDefault()},onPointerMove(g){if(y.disabled||g.pointerType!=="mouse")return;let m=g.currentTarget;y.highlighted||t({type:"ITEM_POINTERMOVE",id:p,target:m,closeOnSelect:v})},onPointerLeave(g){if(y.disabled||g.pointerType!=="mouse"||!e.previousEvent.type.includes("POINTER"))return;let b=g.currentTarget;t({type:"ITEM_POINTERLEAVE",id:p,target:b,closeOnSelect:v})},onPointerDown(g){if(y.disabled)return;let m=g.currentTarget;t({type:"ITEM_POINTERDOWN",target:m,id:p,closeOnSelect:v})},onPointerUp(g){if(Qk(g)||Zk(g)||y.disabled||!ew(g))return;let m=g.currentTarget;t({type:"ITEM_CLICK",src:"pointerup",target:m,id:p,closeOnSelect:v}),g.pointerType==="touch"&&sO(m)},onTouchEnd(g){g.preventDefault(),g.stopPropagation()}})}return{highlightedValue:e.context.highlightedValue,open:a,setOpen(d){d!==a&&t(d?"OPEN":"CLOSE")},setHighlightedValue(d){t({type:"HIGHLIGHTED.SET",id:d})},setParent(d){t({type:"PARENT.SET",value:d,id:d.state.context.id})},setChild(d){t({type:"CHILD.SET",value:d,id:d.state.context.id})},reposition(d={}){t({type:"POSITIONING.SET",options:d})},getContextTriggerProps(){return r.element({...Vn.contextTrigger.attrs,dir:e.context.dir,id:Ue.getContextTriggerId(e.context),onPointerDown(d){if(d.pointerType==="mouse")return;let p=rw(d);t({type:"CONTEXT_MENU_START",point:p})},onPointerCancel(d){d.pointerType!=="mouse"&&t("CONTEXT_MENU_CANCEL")},onPointerMove(d){d.pointerType!=="mouse"&&t("CONTEXT_MENU_CANCEL")},onPointerUp(d){d.pointerType!=="mouse"&&t("CONTEXT_MENU_CANCEL")},onContextMenu(d){let p=rw(d);t({type:"CONTEXT_MENU",point:p}),d.preventDefault()},style:{WebkitTouchCallout:"none",userSelect:"none"}})},getTriggerItemProps(d){return Kx(f({value:d.getTriggerProps().id}),d.getTriggerProps())},getTriggerProps(){return r.button({...n?Vn.triggerItem.attrs:Vn.trigger.attrs,"data-placement":e.context.currentPlacement,type:"button",dir:e.context.dir,id:Ue.getTriggerId(e.context),"data-uid":e.context.id,"aria-haspopup":i?"menu":"dialog","aria-controls":Ue.getContentId(e.context),"aria-expanded":a||void 0,"data-state":a?"open":"closed",onPointerMove(d){d.pointerType!=="mouse"||Ue.isTargetDisabled(d.currentTarget)||!n||t({type:"TRIGGER_POINTERMOVE",target:d.currentTarget})},onPointerLeave(d){if(d.pointerType!=="mouse"||Ue.isTargetDisabled(d.currentTarget)||!n)return;let v=rw(d);t({type:"TRIGGER_POINTERLEAVE",target:d.currentTarget,point:v})},onClick(d){Ue.isTriggerItem(d.currentTarget)&&t({type:"TRIGGER_CLICK",target:d.currentTarget})},onPointerDown(d){let p=Ue.isTargetDisabled(d.currentTarget);!ew(d)||p||tw(d)||(d.preventDefault(),Ue.isTriggerItem(d.currentTarget)||t({type:"TRIGGER_CLICK",target:d.currentTarget}))},onBlur(){t("TRIGGER_BLUR")},onFocus(){t("TRIGGER_FOCUS")},onKeyDown(d){if(d.defaultPrevented)return;let p={ArrowDown(){t("ARROW_DOWN")},ArrowUp(){t("ARROW_UP")},Enter(){t({type:"ARROW_DOWN",src:"enter"})},Space(){t({type:"ARROW_DOWN",src:"space"})}},v=uO(d,e.context),h=p[v];h&&(d.preventDefault(),h(d))}})},getIndicatorProps(){return r.element({...Vn.indicator.attrs,dir:e.context.dir,"data-state":a?"open":"closed"})},getPositionerProps(){return r.element({...Vn.positioner.attrs,dir:e.context.dir,id:Ue.getPositionerId(e.context),style:s.floating})},getArrowProps(){return r.element({id:Ue.getArrowId(e.context),...Vn.arrow.attrs,dir:e.context.dir,style:s.arrow})},getArrowTipProps(){return r.element({...Vn.arrowTip.attrs,dir:e.context.dir,style:s.arrowTip})},getContentProps(){return r.element({...Vn.content.attrs,id:Ue.getContentId(e.context),"aria-label":e.context["aria-label"],hidden:!a,"data-state":a?"open":"closed",role:i?"menu":"dialog",tabIndex:0,dir:e.context.dir,"aria-activedescendant":e.context.highlightedValue??void 0,"aria-labelledby":Ue.getTriggerId(e.context),"data-placement":e.context.currentPlacement,onPointerEnter(d){d.pointerType==="mouse"&&t("MENU_POINTERENTER")},onKeyDown(d){if(d.defaultPrevented||!Nte(d))return;let p=zi(d);if(!((p==null?void 0:p.closest("[role=menu]"))===d.currentTarget||p===d.currentTarget))return;if(d.key==="Tab"&&!$te(d)){d.preventDefault();return}let h=Ue.getHighlightedItemEl(e.context),y={ArrowDown(){t("ARROW_DOWN")},ArrowUp(){t("ARROW_UP")},ArrowLeft(){t("ARROW_LEFT")},ArrowRight(){t("ARROW_RIGHT")},Enter(){t("ENTER"),sO(h)},Space(b){var E;o?t({type:"TYPEAHEAD",key:b.key}):(E=y.Enter)==null||E.call(y,b)},Home(){t("HOME")},End(){t("END")}},g=uO(d,{dir:e.context.dir}),m=y[g];if(m){m(d),d.stopPropagation(),d.preventDefault();return}e.context.typeahead&&Jte(d)&&(ere(d)||Qx(p)||(t({type:"TYPEAHEAD",key:d.key}),d.preventDefault()))}})},getSeparatorProps(){return r.element({...Vn.separator.attrs,role:"separator",dir:e.context.dir,"aria-orientation":"horizontal"})},getItemState:l,getItemProps:f,getOptionItemState:c,getOptionItemProps(d){let{type:p,disabled:v,onCheckedChange:h,closeOnSelect:y}=d,g=u(d),m=c(d);return{...f(g),...r.element({"data-type":p,...Vn.item.attrs,dir:e.context.dir,"data-value":g.value,role:`menuitem${p}`,"aria-checked":!!m.checked,"data-state":m.checked?"checked":"unchecked",onPointerUp(b){if(!ew(b)||v||Qk(b)||Zk(b))return;let E=b.currentTarget;t({type:"ITEM_CLICK",src:"pointerup",target:E,option:g,closeOnSelect:y}),h==null||h(!m.checked)}})}},getItemIndicatorProps(d){let p=c(d);return r.element({...Vn.itemIndicator.attrs,dir:e.context.dir,"data-disabled":zn(p.disabled),"data-highlighted":zn(p.highlighted),"data-state":p.checked?"checked":"unchecked",hidden:!p.checked})},getItemTextProps(d){let p=c(d);return r.element({...Vn.itemText.attrs,dir:e.context.dir,"data-disabled":zn(p.disabled),"data-highlighted":zn(p.highlighted),"data-state":p.checked?"checked":"unchecked"})},getItemGroupLabelProps(d){return r.element({id:Ue.getGroupLabelId(e.context,d.htmlFor),dir:e.context.dir,...Vn.itemGroupLabel.attrs})},getItemGroupProps(d){return r.element({id:Ue.getGroupId(e.context,d.id),...Vn.itemGroup.attrs,dir:e.context.dir,"aria-labelledby":Ue.getGroupLabelId(e.context,d.id),role:"group"})}}}var{not:pi,and:ic,or:yGe}=Gx;function Hre(e){let t=Ro(e);return ci({id:"menu",initial:t.open?"open":"idle",context:{highlightedValue:null,loopFocus:!1,anchorPoint:null,closeOnSelect:!0,typeahead:!0,composite:!0,...t,positioning:{placement:"bottom-start",gutter:8,...t.positioning},intentPolygon:null,parent:null,lastHighlightedValue:null,children:Kte(Oo({})),suspendPointer:!1,restoreFocus:!0,typeaheadState:Yx.defaultOptions},computed:{isSubmenu:r=>r.parent!==null,isRtl:r=>r.dir==="rtl",isTypingAhead:r=>r.typeaheadState.keysSoFar!==""},watch:{isSubmenu:"setSubmenuPlacement",anchorPoint:"reposition",open:"toggleVisibility"},on:{"PARENT.SET":{actions:"setParentMenu"},"CHILD.SET":{actions:"setChildMenu"},OPEN:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:"invokeOnOpen"}],OPEN_AUTOFOCUS:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{internal:!0,target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],CLOSE:[{guard:"isOpenControlled",actions:"invokeOnClose"},{target:"closed",actions:"invokeOnClose"}],"HIGHLIGHTED.RESTORE":{actions:"restoreHighlightedItem"},"HIGHLIGHTED.SET":{actions:"setHighlightedItem"}},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":"open","CONTROLLED.CLOSE":"closed",CONTEXT_MENU_START:{target:"opening:contextmenu",actions:"setAnchorPoint"},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:"invokeOnOpen"}],TRIGGER_FOCUS:{guard:pi("isSubmenu"),target:"closed"},TRIGGER_POINTERMOVE:{guard:"isSubmenu",target:"opening"}}},"opening:contextmenu":{tags:["closed"],after:{LONG_PRESS_DELAY:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:"invokeOnOpen"}]},on:{"CONTROLLED.OPEN":"open","CONTROLLED.CLOSE":"closed",CONTEXT_MENU_CANCEL:[{guard:"isOpenControlled",actions:"invokeOnClose"},{target:"closed",actions:"invokeOnClose"}]}},opening:{tags:["closed"],after:{SUBMENU_OPEN_DELAY:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:"invokeOnOpen"}]},on:{"CONTROLLED.OPEN":"open","CONTROLLED.CLOSE":"closed",BLUR:[{guard:"isOpenControlled",actions:"invokeOnClose"},{target:"closed",actions:"invokeOnClose"}],TRIGGER_POINTERLEAVE:[{guard:"isOpenControlled",actions:"invokeOnClose"},{target:"closed",actions:"invokeOnClose"}]}},closing:{tags:["open"],activities:["trackPointerMove","trackInteractOutside"],after:{SUBMENU_CLOSE_DELAY:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHiglightedItem","invokeOnClose"]}]},on:{"CONTROLLED.OPEN":"open","CONTROLLED.CLOSE":{target:"closed",actions:["focusParentMenu","restoreParentHiglightedItem"]},MENU_POINTERENTER:{target:"open",actions:"clearIntentPolygon"},POINTER_MOVED_AWAY_FROM_SUBMENU:[{guard:"isOpenControlled",actions:"invokeOnClose"},{target:"closed",actions:["focusParentMenu","restoreParentHiglightedItem"]}]}},closed:{tags:["closed"],entry:["clearHighlightedItem","focusTrigger","clearAnchorPoint","resumePointer"],on:{"CONTROLLED.OPEN":[{guard:yGe("isOpenAutoFocusEvent","isArrowDownEvent"),target:"open",actions:"highlightFirstItem"},{guard:"isArrowUpEvent",target:"open",actions:"highlightLastItem"},{target:"open"}],CONTEXT_MENU_START:{target:"opening:contextmenu",actions:"setAnchorPoint"},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:"invokeOnOpen"}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",target:"opening"},TRIGGER_BLUR:"idle",ARROW_DOWN:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],ARROW_UP:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:["highlightLastItem","invokeOnOpen"]}]}},open:{tags:["open"],activities:["trackInteractOutside","trackPositioning","scrollToHighlightedItem"],entry:["focusMenu","resumePointer"],on:{"CONTROLLED.CLOSE":[{target:"closed",guard:"isArrowLeftEvent",actions:["focusParentMenu"]},{target:"closed"}],TRIGGER_CLICK:[{guard:ic(pi("isTriggerItem"),"isOpenControlled"),actions:"invokeOnClose"},{guard:pi("isTriggerItem"),target:"closed",actions:"invokeOnClose"}],ARROW_UP:{actions:["highlightPrevItem","focusMenu"]},ARROW_DOWN:{actions:["highlightNextItem","focusMenu"]},ARROW_LEFT:[{guard:ic("isSubmenu","isOpenControlled"),actions:"invokeOnClose"},{guard:"isSubmenu",target:"closed",actions:["focusParentMenu","invokeOnClose"]}],HOME:{actions:["highlightFirstItem","focusMenu"]},END:{actions:["highlightLastItem","focusMenu"]},ARROW_RIGHT:{guard:"isTriggerItemHighlighted",actions:"openSubmenu"},ENTER:[{guard:"isTriggerItemHighlighted",actions:"openSubmenu"},{guard:ic("closeOnSelect","isOpenControlled"),actions:["clickHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"closed",actions:"clickHighlightedItem"},{actions:"clickHighlightedItem"}],ITEM_POINTERMOVE:[{guard:pi("suspendPointer"),actions:["setHighlightedItem","focusMenu"]},{actions:"setLastHighlightedItem"}],ITEM_POINTERLEAVE:{guard:ic(pi("suspendPointer"),pi("isTriggerItem")),actions:"clearHighlightedItem"},ITEM_CLICK:[{guard:ic(pi("isTriggerItemHighlighted"),pi("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:ic(pi("isTriggerItemHighlighted"),pi("isHighlightedItemEditable"),"closeOnSelect"),target:"closed",actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:ic(pi("isTriggerItemHighlighted"),pi("isHighlightedItemEditable")),actions:["invokeOnSelect","setOptionState"]},{actions:"setHighlightedItem"}],TRIGGER_POINTERLEAVE:{target:"closing",actions:"setIntentPolygon"},ITEM_POINTERDOWN:{actions:"setHighlightedItem"},TYPEAHEAD:{actions:"highlightMatchedItem"},FOCUS_MENU:{actions:"focusMenu"},"POSITIONING.SET":{actions:"reposition"}}}}},{delays:{LONG_PRESS_DELAY:700,SUBMENU_OPEN_DELAY:100,SUBMENU_CLOSE_DELAY:100},guards:{closeOnSelect:(r,n)=>!!((n==null?void 0:n.closeOnSelect)??r.closeOnSelect),isTriggerItem:(r,n)=>Ue.isTriggerItem(n.target),isTriggerItemHighlighted:(r,n)=>{let o=n.target??Ue.getHighlightedItemEl(r);return!!(o!=null&&o.hasAttribute("aria-controls"))},isSubmenu:r=>r.isSubmenu,suspendPointer:r=>r.suspendPointer,isHighlightedItemEditable:r=>Qx(Ue.getHighlightedItemEl(r)),isWithinPolygon:(r,n)=>r.intentPolygon?qre(r.intentPolygon,n.point):!1,isOpenControlled:r=>!!r["open.controlled"],isArrowLeftEvent:(r,n)=>{var o;return((o=n.previousEvent)==null?void 0:o.type)==="ARROW_LEFT"},isArrowUpEvent:(r,n)=>{var o;return((o=n.previousEvent)==null?void 0:o.type)==="ARROW_UP"},isArrowDownEvent:(r,n)=>{var o;return((o=n.previousEvent)==null?void 0:o.type)==="ARROW_DOWN"},isOpenAutoFocusEvent:(r,n)=>{var o;return((o=n.previousEvent)==null?void 0:o.type)==="OPEN_AUTOFOCUS"}},activities:{trackPositioning(r){if(r.anchorPoint)return;r.currentPlacement=r.positioning.placement;let n=()=>Ue.getPositionerEl(r);return pO(Ue.getTriggerEl(r),n,{...r.positioning,defer:!0,onComplete(o){r.currentPlacement=o.placement}})},trackInteractOutside(r,n,{send:o}){return ow(()=>Ue.getContentEl(r),{defer:!0,exclude:[Ue.getTriggerEl(r)],onInteractOutside:r.onInteractOutside,onFocusOutside:r.onFocusOutside,onEscapeKeyDown(a){var s;(s=r.onEscapeKeyDown)==null||s.call(r,a),r.isSubmenu&&a.preventDefault(),zre(r)},onPointerDownOutside(a){var s;r.restoreFocus=!a.detail.focusable,(s=r.onPointerDownOutside)==null||s.call(r,a)},onDismiss(){o({type:"CLOSE",src:"interact-outside"})}})},trackPointerMove(r,n,{guards:o,send:i}){let{isWithinPolygon:a}=o;r.parent.state.context.suspendPointer=!0;let s=Ue.getDoc(r);return Ta(s,"pointermove",l=>{let u={x:l.clientX,y:l.clientY};a(r,{point:u})||(i("POINTER_MOVED_AWAY_FROM_SUBMENU"),r.parent.state.context.suspendPointer=!1)})},scrollToHighlightedItem(r,n,{getState:o}){let i=()=>{if(o().event.type.startsWith("ITEM_POINTER"))return;let l=Ue.getHighlightedItemEl(r),u=Ue.getContentEl(r);qte(l,{rootEl:u,block:"nearest"})};return pr(()=>i()),Ute(()=>Ue.getContentEl(r),{defer:!0,attributes:["aria-activedescendant"],callback:i})}},actions:{setAnchorPoint(r,n){r.anchorPoint=n.point},clearAnchorPoint(r){r.anchorPoint=null},setSubmenuPlacement(r){r.isSubmenu&&(r.positioning.placement=r.isRtl?"left-start":"right-start",r.positioning.gutter=0)},reposition(r,n){let o=()=>Ue.getPositionerEl(r),i=r.anchorPoint?()=>({width:0,height:0,...r.anchorPoint}):void 0;pO(Ue.getTriggerEl(r),o,{...r.positioning,getAnchorRect:i,...n.options??{},listeners:!1,onComplete(a){r.currentPlacement=a.placement}})},setOptionState(r,n){if(!n.option)return;let{checked:o,onCheckedChange:i,type:a}=n.option;a==="radio"?i==null||i(!0):a==="checkbox"&&(i==null||i(!o))},clickHighlightedItem(r,n,{send:o}){let i=Ue.getHighlightedItemEl(r);if(!i||i.dataset.disabled)return;let a=Ue.getOptionFromItemEl(i);o({type:"ITEM_CLICK",src:"enter",target:i,id:a.id,option:a,closeOnSelect:r.closeOnSelect})},setIntentPolygon(r,n){let o=Ue.getContentEl(r),i=r.currentPlacement;if(!o||!i)return;let a=o.getBoundingClientRect(),s=jre(a,i);if(!s)return;let u=Cre(i)==="right"?-5:5;r.intentPolygon=[{...n.point,x:n.point.x+u},...s]},clearIntentPolygon(r){r.intentPolygon=null},resumePointer(r){r.parent&&(r.parent.state.context.suspendPointer=!1)},setHighlightedItem(r,n){Pl.highlighted(r,n.id)},clearHighlightedItem(r){Pl.highlighted(r,null)},focusMenu(r){pr(()=>{let n=Ue.getContentEl(r),o=Zx({root:n,enabled:!di(n,Ue.getActiveElement(r)),filter(i){var a;return!((a=i.role)!=null&&a.startsWith("menuitem"))}});o==null||o.focus({preventScroll:!0})})},highlightFirstItem(r){let n=Ue.getFirstEl(r);n&&Pl.highlighted(r,n.id)},highlightLastItem(r){let n=Ue.getLastEl(r);n&&Pl.highlighted(r,n.id)},highlightNextItem(r,n){let o=Ue.getNextEl(r,n.loop);Pl.highlighted(r,(o==null?void 0:o.id)??null)},highlightPrevItem(r,n){let o=Ue.getPrevEl(r,n.loop);Pl.highlighted(r,(o==null?void 0:o.id)??null)},invokeOnSelect(r){var n;r.highlightedValue&&((n=r.onSelect)==null||n.call(r,{value:r.highlightedValue}))},focusTrigger(r){r.isSubmenu||r.anchorPoint||!r.restoreFocus||pr(()=>{var n;return(n=Ue.getTriggerEl(r))==null?void 0:n.focus({preventScroll:!0})})},highlightMatchedItem(r,n){let o=Ue.getElemByKey(r,n.key);o&&Pl.highlighted(r,o.id)},setParentMenu(r,n){r.parent=Oo(n.value)},setChildMenu(r,n){r.children[n.id]=Oo(n.value)},closeRootMenu(r){zre(r)},openSubmenu(r){let n=Ue.getHighlightedItemEl(r),o=n==null?void 0:n.getAttribute("data-uid"),i=o?r.children[o]:null;i==null||i.send("OPEN_AUTOFOCUS")},focusParentMenu(r){var n;(n=r.parent)==null||n.send("FOCUS_MENU")},setLastHighlightedItem(r,n){r.lastHighlightedValue=n.id},restoreHighlightedItem(r){r.lastHighlightedValue&&(Pl.highlighted(r,r.lastHighlightedValue),r.lastHighlightedValue=null)},restoreParentHiglightedItem(r){var n;(n=r.parent)==null||n.send("HIGHLIGHTED.RESTORE")},invokeOnOpen(r){var n;(n=r.onOpenChange)==null||n.call(r,{open:!0})},invokeOnClose(r){var n;(n=r.onOpenChange)==null||n.call(r,{open:!1})},toggleVisibility(r,n,{send:o}){o({type:r.open?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}})}function zre(e){let t=e.parent;for(;t&&t.state.context.isSubmenu;)t=t.state.context.parent;t==null||t.send("CLOSE")}var Pl={highlighted(e,t){var r;nO(e.highlightedValue,t)||(e.highlightedValue=t,(r=e.onHighlightChange)==null||r.call(e,{highlightedValue:t}))}},bGe=so()(["anchorPoint","aria-label","closeOnSelect","dir","getRootNode","highlightedValue","id","ids","loopFocus","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onEscapeKeyDown","onSelect","onHighlightChange","open","open.controlled","positioning","typeahead","composite"]),ukt=Sa(bGe),EGe=so()(["closeOnSelect","disabled","value","valueText"]),ckt=Sa(EGe),xGe=so()(["htmlFor"]),dkt=Sa(xGe),wGe=so()(["id"]),fkt=Sa(wGe),_Ge=so()(["disabled","valueText","closeOnSelect","type","value","checked","onCheckedChange"]),pkt=Sa(_Ge);var Qh=(e,t=[])=>({parts:(...r)=>{if(SGe(t))return Qh(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>Qh(e,[...t,...r]),rename:r=>Qh(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${Wf(e)}"][data-part="${Wf(n)}"]`,`& [data-scope="${Wf(e)}"][data-part="${Wf(n)}"]`].join(", "),attrs:{"data-scope":Wf(e),"data-part":Wf(n)}}}),{})}),Wf=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),SGe=e=>e.length===0;var TGe=Qh("progress").parts("root","label","track","range","valueText","view","circle","circleTrack","circleRange"),vs=TGe.build(),aw=Ca({getRootId:e=>{var t;return((t=e.ids)==null?void 0:t.root)??`progress-${e.id}`},getTrackId:e=>{var t;return((t=e.ids)==null?void 0:t.track)??`progress-${e.id}-track`},getLabelId:e=>{var t;return((t=e.ids)==null?void 0:t.label)??`progress-${e.id}-label`},getCircleId:e=>{var t;return((t=e.ids)==null?void 0:t.circle)??`progress-${e.id}-circle`}});function Wre(e,t,r){let n=e.context.percent,o=e.context.max,i=e.context.min,a=e.context.orientation,s=e.context.translations,l=e.context.isIndeterminate,u=e.context.value,c=s.value({value:u,max:o,percent:n,min:i}),f=PGe(u,o),d={role:"progressbar","aria-label":c,"data-max":o,"aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":u??void 0,"data-orientation":a,"data-state":f},p=AGe(e.context);return{value:u,valueAsString:c,setValue(v){t({type:"VALUE.SET",value:v})},setToMax(){t({type:"VALUE.SET",value:o})},getRootProps(){return r.element({dir:e.context.dir,...vs.root.attrs,id:aw.getRootId(e.context),"data-max":o,"data-value":u??void 0,"data-state":f,"data-orientation":a,style:{"--percent":l?void 0:n}})},getLabelProps(){return r.element({dir:e.context.dir,id:aw.getLabelId(e.context),...vs.label.attrs,"data-orientation":a})},getValueTextProps(){return r.element({dir:e.context.dir,"aria-live":"polite",...vs.valueText.attrs})},getTrackProps(){return r.element({dir:e.context.dir,id:aw.getTrackId(e.context),...vs.track.attrs,...d})},getRangeProps(){return r.element({dir:e.context.dir,...vs.range.attrs,"data-orientation":a,"data-state":f,style:{[e.context.isHorizontal?"width":"height"]:l?void 0:`${n}%`}})},getCircleProps(){return r.element({dir:e.context.dir,id:aw.getCircleId(e.context),...vs.circle.attrs,...d,...p.root})},getCircleTrackProps(){return r.element({dir:e.context.dir,"data-orientation":a,...vs.circleTrack.attrs,...p.track})},getCircleRangeProps(){return r.element({dir:e.context.dir,...vs.circleRange.attrs,...p.range,"data-state":f})},getViewProps(v){return r.element({dir:e.context.dir,...vs.view.attrs,"data-state":v.state,hidden:v.state!==f})}}}function PGe(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function AGe(e){let t={style:{"--radius":"calc(var(--size) / 2 - var(--thickness) / 2)",cx:"calc(var(--size) / 2)",cy:"calc(var(--size) / 2)",r:"var(--radius)",fill:"transparent",strokeWidth:"var(--thickness)"}};return{root:{viewBox:"0 0 var(--size) var(--size)",style:{width:"var(--size)",height:"var(--size)"}},track:t,range:{opacity:e.value===0?0:void 0,style:{...t.style,"--percent":e.percent,"--circumference":"calc(2 * 3.14159 * var(--radius))","--offset":"calc(var(--circumference) * (100 - var(--percent)) / 100}))",strokeDashoffset:"calc(var(--circumference) * ((100 - var(--percent)) / 100))",strokeDasharray:e.isIndeterminate?void 0:"var(--circumference)",transformOrigin:"center",transform:"rotate(-90deg)"}}}}function DGe(e,t){return e+(t-e)/2}function Gre(e){let t=Ro(e);return ci({id:"progress",initial:"idle",context:{max:t.max??100,min:t.min??0,value:DGe(t.min??0,t.max??100),orientation:"horizontal",translations:{value:({percent:r})=>r===-1?"loading...":`${r} percent`,...t.translations},...t},created:["validateContext"],computed:{isIndeterminate:r=>r.value===null,percent(r){return iO(r.value)?Math.round((r.value-r.min)/(r.max-r.min)*100):-1},isAtMax:r=>r.value===r.max,isHorizontal:r=>r.orientation==="horizontal",isRtl:r=>r.dir==="rtl"},states:{idle:{on:{"VALUE.SET":{actions:["setValue"]}}}}},{actions:{setValue:(r,n)=>{r.value=n.value===null?null:Math.max(0,Math.min(n.value,r.max))},validateContext:r=>{if(r.value!=null){if(!gO(r.max))throw new Error(`[progress] The max value passed \`${r.max}\` is not a valid number`);if(!kGe(r.value,r.max))throw new Error(`[progress] The value passed \`${r.value}\` exceeds the max value \`${r.max}\``);if(!OGe(r.value,r.min))throw new Error(`[progress] The value passed \`${r.value}\` exceeds the min value \`${r.min}\``)}}}})}function gO(e){return iO(e)&&!isNaN(e)}function kGe(e,t){return gO(e)&&e<=t}function OGe(e,t){return gO(e)&&e>=t}var IGe=so()(["dir","getRootNode","id","ids","max","min","orientation","translations","value"]),xkt=Sa(IGe);var Jh=(e,t=[])=>({parts:(...r)=>{if(NGe(t))return Jh(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>Jh(e,[...t,...r]),rename:r=>Jh(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${Gf(e)}"][data-part="${Gf(n)}"]`,`& [data-scope="${Gf(e)}"][data-part="${Gf(n)}"]`].join(", "),attrs:{"data-scope":Gf(e),"data-part":Gf(n)}}}),{})}),Gf=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),NGe=e=>e.length===0;var LGe=Jh("toast").parts("group","root","title","description","actionTrigger","closeTrigger"),Kf=LGe.build(),lo=Ca({getRegionId:e=>`toast-group:${e}`,getRegionEl:(e,t)=>lo.getById(e,`toast-group:${t}`),getRootId:e=>`toast:${e.id}`,getRootEl:e=>lo.getById(e,lo.getRootId(e)),getTitleId:e=>`toast:${e.id}:title`,getDescriptionId:e=>`toast:${e.id}:description`,getCloseTriggerId:e=>`toast${e.id}:close`});function hO(e,t){return e.filter(r=>r.state.context.placement===t)}var Kre={info:5e3,error:5e3,success:2e3,loading:1/0,DEFAULT:5e3};function Yre(e,t){return e??Kre[t]??Kre.DEFAULT}function BGe(e,t){var c;let r=e.offsets,n=typeof r=="string"?{left:r,right:r,bottom:r,top:r}:r,o=e.dir==="rtl",i=t.replace("-start",o?"-right":"-left").replace("-end",o?"-left":"-right"),a=i.includes("right"),s=i.includes("left"),l={position:"fixed",pointerEvents:e.count>0?void 0:"none",display:"flex",flexDirection:"column","--gap":`${e.gap}px`,"--first-height":`${((c=e.heights[0])==null?void 0:c.height)||0}px`,zIndex:Ate},u="center";if(a&&(u="flex-end"),s&&(u="flex-start"),l.alignItems=u,i.includes("top")){let f=n.top;l.top=`max(env(safe-area-inset-top, 0px), ${f})`}if(i.includes("bottom")){let f=n.bottom;l.bottom=`max(env(safe-area-inset-bottom, 0px), ${f})`}if(!i.includes("left")){let f=n.right;l.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${f})`}if(!i.includes("right")){let f=n.left;l.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${f})`}return l}function FGe(e,t){let[r]=e.placement.split("-"),n=!e.frontmost,o=!e.stacked,i={position:"absolute",pointerEvents:"auto","--opacity":"0","--remove-delay":`${e.removeDelay}ms`,"--duration":`${e.type==="loading"?Number.MAX_SAFE_INTEGER:e.duration}ms`,"--initial-height":`${e.height}px`,"--offset":`${e.offset}px`,"--index":e.index,"--z-index":e.zIndex,"--lift-amount":"calc(var(--lift) * var(--gap))","--y":"100%","--x":"0"},a=s=>Object.assign(i,s);return r==="top"?a({top:"0","--sign":"-1","--y":"-100%","--lift":"1"}):r==="bottom"&&a({bottom:"0","--sign":"1","--y":"100%","--lift":"-1"}),e.mounted&&(a({"--y":"0","--opacity":"1"}),e.stacked&&a({"--y":"calc(var(--lift) * var(--offset))","--height":"var(--initial-height)"})),t||a({"--opacity":"0",pointerEvents:"none"}),n&&o&&(a({"--base-scale":"var(--index) * 0.05 + 1","--y":"calc(var(--lift-amount) * var(--index))","--scale":"calc(-1 * var(--base-scale))","--height":"var(--first-height)"}),t||a({"--y":"calc(var(--sign) * 40%)"})),n&&e.stacked&&!t&&a({"--y":"calc(var(--lift) * var(--offset) + var(--lift) * -100%)"}),e.frontmost&&!t&&a({"--y":"calc(var(--lift) * -100%)"}),i}function MGe(e,t){let r={position:"absolute",inset:"0",scale:"1 2",pointerEvents:t?"none":"auto"},n=o=>Object.assign(r,o);return e.frontmost&&!t&&n({height:"calc(var(--initial-height) + 80%)"}),r}function $Ge(e,t){return{position:"absolute",left:"0",height:"calc(var(--gap) + 2px)",bottom:"100%",width:"100%"}}function UGe(e,t,r){function n(){return xte(e)?e.getState():e}function o(c){return hO(n().context.toasts,c)}function i(c){let f=n().context.toasts;return f.length?!!f.find(d=>d.id==c):!1}function a(c){let f=`toast:${Xte()}`,d=c.id?c.id:f;return i(d)||t({type:"ADD_TOAST",toast:{...c,id:d}}),d}function s(c,f){return i(c)&&t({type:"UPDATE_TOAST",id:c,toast:f}),c}function l(c){let{id:f}=c;return(f?i(f):!1)&&f!=null?s(f,c):a(c)}function u(c){c==null?t("DISMISS_ALL"):i(c)&&t({type:"DISMISS_TOAST",id:c})}return{getCount(){return n().context.count},getPlacements(){let f=n().context.toasts.map(d=>d.state.context.placement);return Array.from(new Set(f))},getToastsByPlacement:o,isVisible:i,create:a,update:s,upsert:l,dismiss:u,remove(c){c==null?t("REMOVE_ALL"):i(c)&&t({type:"REMOVE_TOAST",id:c})},dismissByPlacement(c){o(c).forEach(d=>u(d.id))},loading(c){return l({...c,type:"loading"})},success(c){return l({...c,type:"success"})},error(c){return l({...c,type:"error"})},promise(c,f,d={}){let p=l({...d,...f.loading,type:"loading"});return qf(c).then(v=>{let h=qf(f.success,v);l({...d,...h,id:p,type:"success"})}).catch(v=>{let h=qf(f.error,v);l({...d,...h,id:p,type:"error"})}).finally(()=>{var v;(v=f.finally)==null||v.call(f)}),p},pause(c){c==null?t("PAUSE_ALL"):i(c)&&t({type:"PAUSE_TOAST",id:c})},resume(c){c==null?t("RESUME_ALL"):i(c)&&t({type:"RESUME_TOAST",id:c})},getGroupProps(c){let{placement:f,label:d="Notifications"}=c,p=n(),v=p.context.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),[h,y="center"]=f.split("-");return r.element({...Kf.group.attrs,dir:p.context.dir,tabIndex:-1,"aria-label":`${f} ${d} ${v}`,id:lo.getRegionId(f),"data-placement":f,"data-side":h,"data-align":y,"aria-live":"polite",role:"region",style:BGe(p.context,f),onMouseMove(){t({type:"REGION.POINTER_ENTER",placement:f})},onMouseLeave(){t({type:"REGION.POINTER_LEAVE",placement:f})},onFocus(g){t({type:"REGION.FOCUS",target:g.relatedTarget})},onBlur(g){p.context.isFocusWithin&&!di(g.currentTarget,g.relatedTarget)&&t({type:"REGION.BLUR"})}})},subscribe(c){let f=n();return Uf(f.context.toasts,()=>{let p=o(f.context.placement).map(v=>v.getState().context);c(p)})}}}var{not:jGe,and:qGe,or:zGe}=Gx;function VGe(e){let{type:t="info",duration:r,id:n="1",placement:o="bottom",removeDelay:i=200,...a}=e,s=Ro(a),l=Yre(r,t);return ci({id:n,context:{id:n,type:t,remaining:l,duration:l,removeDelay:i,createdAt:Date.now(),placement:o,...s,height:0,offset:0,frontmost:!1,mounted:!1,index:-1,zIndex:0},initial:t==="loading"?"visible:persist":"visible",on:{UPDATE:[{guard:qGe("hasTypeChanged","isChangingToLoading"),target:"visible:persist",actions:["setContext"]},{guard:zGe("hasDurationChanged","hasTypeChanged"),target:"visible:updating",actions:["setContext"]},{actions:["setContext"]}],MEASURE:{actions:["measureHeight"]}},entry:["invokeOnVisible"],activities:["trackHeight"],states:{"visible:updating":{tags:["visible","updating"],after:{0:"visible"}},"visible:persist":{tags:["visible","paused"],on:{RESUME:{guard:jGe("isLoadingType"),target:"visible",actions:["setCreatedAt"]},DISMISS:"dismissing"}},visible:{tags:["visible"],after:{VISIBLE_DURATION:"dismissing"},on:{DISMISS:"dismissing",PAUSE:{target:"visible:persist",actions:"setRemainingDuration"}}},dismissing:{entry:"invokeOnDismiss",after:{REMOVE_DELAY:{target:"unmounted",actions:"notifyParentToRemove"}}},unmounted:{entry:"invokeOnUnmount",type:"final"}}},{activities:{trackHeight(u,c,{self:f}){let d;return pr(()=>{let p=lo.getRootEl(u);if(!p)return;u.mounted=!0;let v=Jx(p,"[data-ghost]");Vh(v.length!==2,"[toast] No ghost element found in toast. Render the `ghostBefore` and `ghostAfter` elements");let h=()=>{let m=p.style.height;p.style.height="auto";let b=p.getBoundingClientRect().height;p.style.height=m,u.height=b,f.sendParent({type:"UPDATE_HEIGHT",id:f.id,height:b,placement:u.placement})};h();let y=lo.getWin(u),g=new y.MutationObserver(h);g.observe(p,{childList:!0,subtree:!0,characterData:!0}),d=()=>g.disconnect()}),()=>d==null?void 0:d()}},guards:{isChangingToLoading:(u,c)=>{var f;return((f=c.toast)==null?void 0:f.type)==="loading"},isLoadingType:u=>u.type==="loading",hasTypeChanged:(u,c)=>{var f;return((f=c.toast)==null?void 0:f.type)!=null&&c.toast.type!==u.type},hasDurationChanged:(u,c)=>{var f;return((f=c.toast)==null?void 0:f.duration)!=null&&c.toast.duration!==u.duration}},delays:{VISIBLE_DURATION:u=>u.remaining,REMOVE_DELAY:u=>u.removeDelay},actions:{measureHeight(u,c,{self:f}){pr(()=>{let d=lo.getRootEl(u);if(!d)return;u.mounted=!0;let p=d.style.height;d.style.height="auto";let v=d.getBoundingClientRect().height;d.style.height=p,u.height=v,f.sendParent({type:"UPDATE_HEIGHT",id:f.id,height:v,placement:u.placement})})},setRemainingDuration(u){u.remaining-=Date.now()-u.createdAt},setCreatedAt(u){u.createdAt=Date.now()},notifyParentToRemove(u,c,{self:f}){f.sendParent({type:"REMOVE_TOAST",id:f.id})},invokeOnDismiss(u){var c;(c=u.onStatusChange)==null||c.call(u,{status:"dismissing"})},invokeOnUnmount(u){var c;(c=u.onStatusChange)==null||c.call(u,{status:"unmounted"})},invokeOnVisible(u){var c;(c=u.onStatusChange)==null||c.call(u,{status:"visible"})},setContext(u,c){var v,h;let f=(v=c.toast)==null?void 0:v.duration,d=((h=c.toast)==null?void 0:h.type)??u.type,p=Yre(f,d);Object.assign(u,{...c.toast,duration:p,remaining:p})}}})}function HGe(e){let t=Ro(e);return ci({id:"toaster",initial:t.overlap?"overlap":"stack",context:{dir:"ltr",max:Number.MAX_SAFE_INTEGER,gap:16,pauseOnPageIdle:!1,hotkey:["altKey","KeyT"],offsets:"1rem",placement:"bottom",removeDelay:200,...t,toasts:[],lastFocusedEl:null,isFocusWithin:!1,heights:[]},computed:{count:r=>r.toasts.length},activities:["trackDocumentVisibility","trackHotKeyPress"],watch:{toasts:["collapsedIfEmpty","setDismissableBranch"]},exit:["removeToasts","clearDismissableBranch","clearLastFocusedEl"],on:{PAUSE_TOAST:{actions:["pauseToast"]},PAUSE_ALL:{actions:["pauseToasts"]},RESUME_TOAST:{actions:["resumeToast"]},RESUME_ALL:{actions:["resumeToasts"]},ADD_TOAST:{guard:"isWithinRange",actions:["createToast","syncToastIndex"]},UPDATE_TOAST:{actions:["updateToast"]},DISMISS_TOAST:{actions:["dismissToast"]},DISMISS_ALL:{actions:["dismissToasts"]},REMOVE_TOAST:{actions:["removeToast","syncToastIndex","syncToastOffset"]},REMOVE_ALL:{actions:["removeToasts"]},UPDATE_HEIGHT:{actions:["syncHeights","syncToastOffset"]},"DOC.HOTKEY":{actions:["focusRegionEl"]},"REGION.BLUR":[{guard:"isOverlapping",target:"overlap",actions:["resumeToasts","restoreLastFocusedEl"]},{actions:["resumeToasts","restoreLastFocusedEl"]}]},states:{stack:{entry:["expandToasts"],on:{"REGION.POINTER_LEAVE":[{guard:"isOverlapping",target:"overlap",actions:["resumeToasts"]},{actions:["resumeToasts"]}],"REGION.OVERLAP":{target:"overlap"},"REGION.FOCUS":{actions:["setLastFocusedEl","pauseToasts"]},"REGION.POINTER_ENTER":{actions:["pauseToasts"]}}},overlap:{entry:["collapseToasts"],on:{"REGION.STACK":{target:"stack"},"REGION.POINTER_ENTER":{target:"stack",actions:["pauseToasts"]},"REGION.FOCUS":{target:"stack",actions:["setLastFocusedEl","pauseToasts"]}}}}},{guards:{isWithinRange:r=>r.toasts.length<r.max,isOverlapping:r=>!!r.overlap},activities:{trackHotKeyPress(r,n,{send:o}){return Ta(document,"keydown",a=>{r.hotkey.every(l=>a[l]||a.code===l)&&o({type:"DOC.HOTKEY"})},{capture:!0})},trackDocumentVisibility(r,n,{send:o}){if(!r.pauseOnPageIdle)return;let i=lo.getDoc(r);return Ta(i,"visibilitychange",()=>{o(i.visibilityState==="hidden"?"PAUSE_ALL":"RESUME_ALL")})}},actions:{setDismissableBranch(r){var a;let o=hO(r.toasts,r.placement).length>0;if(!o){(a=r._cleanup)==null||a.call(r);return}if(o&&r._cleanup)return;let i=()=>lo.getRegionEl(r,r.placement);r._cleanup=Rre(i,{defer:!0})},clearDismissableBranch(r){var n;(n=r._cleanup)==null||n.call(r)},focusRegionEl(r){queueMicrotask(()=>{var n;(n=lo.getRegionEl(r,r.placement))==null||n.focus()})},expandToasts(r){sw(r,n=>{n.state.context.stacked=!0})},collapseToasts(r){sw(r,n=>{n.state.context.stacked=!1})},collapsedIfEmpty(r,n,{send:o}){!r.overlap||r.toasts.length>1||o("REGION.OVERLAP")},pauseToast(r,n,{self:o}){o.sendChild("PAUSE",n.id)},pauseToasts(r){r.toasts.forEach(n=>n.send("PAUSE"))},resumeToast(r,n,{self:o}){o.sendChild("RESUME",n.id)},resumeToasts(r){r.toasts.forEach(n=>n.send("RESUME"))},measureToasts(r){r.toasts.forEach(n=>n.send("MEASURE"))},createToast(r,n,{self:o,getState:i}){let a={placement:r.placement,duration:r.duration,removeDelay:r.removeDelay,...n.toast,dir:r.dir,getRootNode:r.getRootNode,stacked:i().matches("stack")},s=VGe(a),l=o.spawn(s);r.toasts=[l,...r.toasts]},updateToast(r,n,{self:o}){o.sendChild({type:"UPDATE",toast:n.toast},n.id)},dismissToast(r,n,{self:o}){o.sendChild("DISMISS",n.id)},dismissToasts(r){r.toasts.forEach(n=>n.send("DISMISS"))},removeToast(r,n,{self:o}){o.stopChild(n.id),r.toasts=r.toasts.filter(i=>i.id!==n.id),r.heights=r.heights.filter(i=>i.id!==n.id)},removeToasts(r,n,{self:o}){r.toasts.forEach(i=>o.stopChild(i.id)),r.toasts=[],r.heights=[]},syncHeights(r,n){let o=r.heights.find(i=>i.id===n.id);if(o)o.height=n.height,o.placement=n.placement;else{let i={id:n.id,height:n.height,placement:n.placement};r.heights=[i,...r.heights]}},syncToastIndex(r){sw(r,(n,o,i)=>{n.state.context.index=o,n.state.context.frontmost=o===0,n.state.context.zIndex=i.length-o})},syncToastOffset(r,n){let o=n.placement??r.placement;sw({...r,placement:o},i=>{let a=Math.max(r.heights.findIndex(l=>l.id===i.id),0),s=r.heights.reduce((l,u,c)=>c>=a?l:l+u.height,0);i.state.context.offset=a*r.gap+s})},setLastFocusedEl(r,n){r.isFocusWithin||!n.target||(r.isFocusWithin=!0,r.lastFocusedEl=Oo(n.target))},restoreLastFocusedEl(r){r.isFocusWithin=!1,r.lastFocusedEl&&(r.lastFocusedEl.focus({preventScroll:!0}),r.lastFocusedEl=null)},clearLastFocusedEl(r){r.lastFocusedEl&&(r.lastFocusedEl.focus({preventScroll:!0}),r.lastFocusedEl=null,r.isFocusWithin=!1)}}})}function sw(e,t){hO(e.toasts,e.placement).forEach(t)}function Xre(e,t,r){let n=e.hasTag("visible"),o=e.hasTag("paused"),i=e.context.placement,a=e.context.type,[s,l="center"]=i.split("-");return{type:a,title:e.context.title,description:e.context.description,placement:i,visible:n,paused:o,pause(){t("PAUSE")},resume(){t("RESUME")},dismiss(){t("DISMISS")},getRootProps(){return r.element({...Kf.root.attrs,dir:e.context.dir,id:lo.getRootId(e.context),"data-state":n?"open":"closed","data-type":a,"data-placement":i,"data-align":l,"data-side":s,"data-mounted":zn(e.context.mounted),"data-paused":zn(o),"data-first":zn(e.context.frontmost),"data-sibling":zn(!e.context.frontmost),"data-stack":zn(e.context.stacked),"data-overlap":zn(!e.context.stacked),role:"status","aria-atomic":"true",tabIndex:0,style:FGe(e.context,n),onKeyDown(u){u.defaultPrevented||u.key=="Escape"&&(t("DISMISS"),u.preventDefault())}})},getGhostBeforeProps(){return r.element({"data-ghost":"before",style:MGe(e.context,n)})},getGhostAfterProps(){return r.element({"data-ghost":"after",style:$Ge(e.context,n)})},getTitleProps(){return r.element({...Kf.title.attrs,id:lo.getTitleId(e.context)})},getDescriptionProps(){return r.element({...Kf.description.attrs,id:lo.getDescriptionId(e.context)})},getActionTriggerProps(){return r.button({...Kf.actionTrigger.attrs,type:"button",onClick(u){u.defaultPrevented||t("DISMISS")}})},getCloseTriggerProps(){return r.button({id:lo.getCloseTriggerId(e.context),...Kf.closeTrigger.attrs,type:"button","aria-label":"Dismiss notification",onClick(u){u.defaultPrevented||t("DISMISS")}})}}}var lw={connect:UGe,machine:HGe};function GGe(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Se(e={}){let{strict:t=!0,hookName:r="useContext",providerName:n="Provider",errorMessage:o,defaultValue:i}=e,a=wp(i);function s(){var u;let l=Tv(a);if(!l&&t){let c=new Error(o??GGe(r,n));throw c.name="ContextError",(u=Error.captureStackTrace)==null||u.call(Error,c,s),c}return l}return[a.Provider,s,a]}var[qkt,zkt]=Se({hookName:"useAccordionContext",providerName:"<AccordionProvider />"});var Lo=()=>(e,t)=>Dr(e,t),[Jre,KGe]=Se({hookName:"useRenderStrategyContext",providerName:"<RenderStrategyProvider />"}),xO=e=>Lo()(e,["lazyMount","unmountOnExit"]),vO=e=>r=>{let[n,o]=Dr(r,["asChild"]);if(n.asChild){let i=a=>{let[,s]=Dr(o,["ref"]);return Ge(s,a)};return n.asChild(i)}return T(mR,kt({component:e},o))};function YGe(){let e=new Map;return new Proxy(vO,{apply(t,r,n){return vO(n[0])},get(t,r){let n=r;return e.has(n)||e.set(n,vO(n)),e.get(n)}})}var gt=YGe(),[Vkt,Hkt]=Se({hookName:"useCollapsibleContext",providerName:"<CollapsibleProvider />"});var XGe=e=>typeof e=="function",ZGe=(e,...t)=>XGe(e)?e(...t):e,[QGe,wO]=Se({hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})}),JGe=V("<span hidden>"),Qf=e=>{let[t,r]=oe(),n=()=>{var i;return ZGe(e.value)??((i=t())==null?void 0:i.ownerDocument)??document},o=Ee(()=>({getRootNode:n,getDocument:()=>gs(n()),getWindow:()=>_a(n())}));return T(QGe,{value:o,get children(){return[Ee(()=>e.children),T(ve,{get when(){return!e.value},get children(){var i=JGe();return lt(r,i),i}})]}})},[Wkt,_O]=Se({hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:()=>({dir:"ltr",locale:"en-US"})});var[Gkt,Kkt]=Se({hookName:"useAccordionItemContext",providerName:"<AccordionItemProvider />"}),[Ykt,Xkt]=Se({hookName:"useAccordionItemPropsContext",providerName:"<AccordionItemPropsProvider />"});var Zkt=Lo();var[Qkt,Jkt]=Se({hookName:"useAvatarContext",providerName:"<AvatarProvider />"});var[eOt,tOt]=Se({hookName:"useCarouselContext",providerName:"<CarouselProvider />"});var[rOt,nOt]=Se({hookName:"useCheckboxContext",providerName:"<CheckboxProvider />"});var[oOt,iOt]=Se({hookName:"useCheckboxGroupContext",providerName:"<CheckboxGroupProvider />",strict:!1});var[aOt,sOt]=Se({hookName:"useClipboardContext",providerName:"<ClipboardProvider />"});var[lOt,uOt]=Se({hookName:"useColorPickerAreaContext",providerName:"<ColorPickerAreaProvider />"}),[cOt,dOt]=Se({hookName:"useColorPickerContext",providerName:"<ColorPickerProvider />"});var[fOt,pOt]=Se({hookName:"useColorPickerChannelSliderContext",providerName:"<ColorPickerChannelSliderProvider />"});var dw=e=>Lo()(e,["immediate","lazyMount","onExitComplete","present","unmountOnExit"]),ev=e=>{let[t,r]=xO(e),[n,o]=oe(!1),[i,a]=jf(Lre(r),{context:r}),s=Ee(()=>Nre(i,a,Tl));return mt(()=>{s().present&&o(!0)}),Ee(()=>({unmounted:!s().present&&!n()&&t.lazyMount||t.unmountOnExit&&!s().present&&n(),present:s().present,presenceProps:{ref:s().setNode,hidden:!s().present,"data-state":r.present?"open":"closed"}}))};var[fw,Jf]=Se({hookName:"usePresenceContext",providerName:"<PresenceProvider />"});var[mOt,gOt]=Se({hookName:"useColorPickerSwatchContext",providerName:"<ColorPickerSwatchProvider />"});var[hOt,vOt]=Se({hookName:"useComboboxContext",providerName:"<ComboboxProvider />"});var[yOt,bOt]=Se({hookName:"useComboboxItemContext",providerName:"<ComboboxItemProvider />"}),[EOt,xOt]=Se({hookName:"useComboboxItemPropsContext",providerName:"<ComboboxItemPropsProvider />"});var[wOt,_Ot]=Se({hookName:"useComboboxItemGroupPropsContext",providerName:"<ComboboxItemGroupPropsProvider />"});var[COt,SOt]=Se({hookName:"useDatePickerContext",providerName:"<DatePickerProvider />"});var[TOt,POt]=Se({hookName:"useDatePickerViewContext",providerName:"<DatePickerViewProvider />",strict:!1,defaultValue:{view:"day"}});var[AOt,DOt]=Se({hookName:"useDatePickerTableContext",providerName:"<DatePickerTableProvider />"});var[kOt,OOt]=Se({hookName:"useDatePickerTableCellContext",providerName:"<DatePickerTableCellProvider />"});var[ene,Al]=Se({hookName:"useDialogContext",providerName:"<DialogProvider />"}),eKe=e=>{let t=Al(),r=KGe(),n=ev(Ge(r,()=>({present:t().open}))),o=Ge(()=>t().getBackdropProps(),()=>n().presenceProps,e);return T(ve,{get when(){return!n().unmounted},get children(){return T(gt.div,o)}})},tKe=e=>{let t=Al(),r=Ge(()=>t().getCloseTriggerProps(),e);return T(gt.button,r)},rKe=e=>{let t=Al(),r=Jf(),n=Ge(()=>t().getContentProps(),()=>r().presenceProps,e);return T(ve,{get when(){return!r().unmounted},get children(){return T(gt.div,n)}})},nKe=e=>e.children(Al()),oKe=e=>{let t=Al(),r=Ge(()=>t().getDescriptionProps(),e);return T(gt.div,r)},iKe=e=>{let t=Al(),r=Jf(),n=Ge(()=>t().getPositionerProps(),e);return T(ve,{get when(){return!r().unmounted},get children(){return T(gt.div,n)}})},aKe=e=>{let t=_O(),r=wO(),n=Cs(),o=Ee(()=>({id:n,dir:t().dir,getRootNode:r().getRootNode,open:e.defaultOpen,"open.controlled":e.open!==void 0,...e})),[i,a]=jf(Ure(o()),{context:o});return Ee(()=>$re(i,a,Tl))},sKe=e=>{let[t,r]=dw(e),[n]=xO(t),[o,i]=Lo()(r,["aria-label","closeOnEscape","closeOnInteractOutside","defaultOpen","finalFocusEl","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]),a=aKe(o),s=ev(Ge(t,()=>({present:a().open})));return T(ene,{value:a,get children(){return T(Jre,{value:n,get children(){return T(fw,{value:s,get children(){return i.children}})}})}})},lKe=e=>{let[t,r]=dw(e),[n]=xO(t),o=ev(Ge(t,()=>({present:r.value().open})));return T(ene,{get value(){return r.value},get children(){return T(Jre,{value:n,get children(){return T(fw,{value:o,get children(){return r.children}})}})}})},uKe=e=>{let t=Al(),r=Ge(()=>t().getTitleProps(),e);return T(gt.h2,r)},cKe=e=>{let t=Al(),r=Jf(),n=Ge(()=>t().getTriggerProps(),()=>({"aria-controls":r().unmounted&&null}),e);return T(gt.button,n)},ep=Object.freeze({__proto__:null,Backdrop:eKe,CloseTrigger:tKe,Content:rKe,Context:nKe,Description:oKe,Positioner:iKe,Root:sKe,RootProvider:lKe,Title:uKe,Trigger:cKe}),[IOt,ROt]=Se({hookName:"useEditableContext",providerName:"<EditableProvider />"});var[NOt,LOt]=Se({hookName:"useFileUploadContext",providerName:"<FileUploadProvider />"});var[BOt,FOt]=Se({hookName:"useFileUploadItemPropsContext",providerName:"<FileUploadItemPropsProvider />"});var[MOt,$Ot]=Se({hookName:"useHoverCardContext",providerName:"<HoverCardProvider />"});var[tne,Lr]=Se({hookName:"useMenuContext",providerName:"<MenuProvider />",strict:!1}),dKe=e=>{let t=Lr(),r=Ge(()=>t().getArrowProps(),e);return T(gt.div,r)},fKe=e=>{let t=Lr(),r=Ge(()=>t().getArrowTipProps(),e);return T(gt.div,r)},[CO,pKe]=Se({hookName:"useMenuItemContext",providerName:"<MenuItemProvider />"}),[rne,nne]=Se({hookName:"useMenuOptionItemPropsContext",providerName:"<MenuOptionItemPropsProvider />"}),mKe=e=>{let[t,r]=Lo()(e,["checked","closeOnSelect","disabled","onCheckedChange","value","valueText"]),n=Ge(t,{type:"checkbox"}),o=Lr(),i=Ge(()=>o().getOptionItemProps(n),r),a=Ee(()=>o().getItemState(n));return T(rne,{value:n,get children(){return T(CO,{value:a,get children(){return T(gt.div,i)}})}})},gKe=e=>{let t=Lr(),r=Jf(),n=Ge(()=>t().getContentProps(),()=>r().presenceProps,e);return T(ve,{get when(){return!r().unmounted},get children(){return T(gt.div,n)}})},hKe=e=>e.children(Lr()),vKe=e=>{let t=Lr(),r=Ge(()=>t().getContextTriggerProps(),e);return T(gt.button,r)},yKe=e=>{let t=Lr(),r=Ge(()=>t().getIndicatorProps(),e);return T(gt.div,r)},bKe=e=>{let[t,r]=Lo()(e,["closeOnSelect","disabled","value","valueText"]),n=Lr(),o=Ge(()=>n().getItemProps(t),r),i=Ee(()=>n().getItemState(t));return T(CO,{value:i,get children(){return T(gt.div,o)}})},EKe=e=>e.children(pKe()),[one,ine]=Se({hookName:"useMenuItemGroupContext",providerName:"<MenuItemGroupProvider />"}),xKe=e=>{let[t,r]=Lo()(e,["id"]),n=Ge({id:Cs()},t),o=Lr(),i=Ge(()=>o().getItemGroupProps(n),r);return T(one,{value:n,get children(){return T(gt.div,i)}})},wKe=e=>{let t=Lr(),r=ine(),n=Ge(t().getItemGroupLabelProps({htmlFor:r.id}),e);return T(gt.div,n)},_Ke=e=>{let t=Lr(),r=nne(),n=Ge(()=>t().getItemIndicatorProps(r),e);return T(gt.div,n)},CKe=e=>{let t=Lr(),r=nne(),n=Ge(()=>t().getItemTextProps(r),e);return T(gt.div,n)},SKe=e=>{let t=Lr(),r=Jf(),n=Ge(()=>t().getPositionerProps(),e);return T(ve,{get when(){return!r().unmounted},get children(){return T(gt.div,n)}})},TKe=e=>{let[t,r]=Lo()(e,["closeOnSelect","disabled","value","valueText"]),n=Lr(),o=ine(),i=Ge(t,()=>({type:"radio",checked:o.value===t.value,onCheckedChange:()=>{var l;return(l=o.onValueChange)==null?void 0:l.call(o,{value:t.value})}})),a=Ge(()=>n().getOptionItemProps(i),r),s=Ee(()=>n().getItemState(i));return T(rne,{value:i,get children(){return T(CO,{value:s,get children(){return T(gt.div,a)}})}})},PKe=e=>{let[t,r]=Lo()(e,["id","onValueChange","value"]),n=Lr(),o=Ge({id:Cs()},t),i=Ge(()=>n().getItemGroupProps(o),r);return T(one,{value:o,get children(){return T(gt.div,i)}})},AKe=e=>{let t=_O(),r=wO(),n=Cs(),o=Ee(()=>({id:n,dir:t().dir,getRootNode:r().getRootNode,open:e.defaultOpen,"open.controlled":e.open!==void 0,...e})),[i,a,s]=jf(Hre(o()),{context:o});return{api:Ee(()=>Vre(i,a,Tl)),machine:s}},[ane,sne]=Se({hookName:"useMenuMachineContext",providerName:"<MenuMachineProvider />",strict:!1}),[lne,DKe]=Se({hookName:"useMenuMachineContext",providerName:"<MenuMachineProvider />",strict:!1}),kKe=e=>{let[t,r]=dw(e),[n,o]=Lo()(r,["anchorPoint","aria-label","closeOnSelect","composite","defaultOpen","highlightedValue","id","ids","loopFocus","onEscapeKeyDown","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onSelect","open","positioning","typeahead"]),i=Lr(),a=sne(),s=AKe(n),l=ev(Ge(t,()=>({present:s.api().open})));return mt(()=>{a&&(i==null||i().setChild(s.machine),s.api().setParent(a))}),T(lne,{value:()=>i==null?void 0:i().getTriggerItemProps(s.api()),get children(){return T(ane,{get value(){return s.machine},get children(){return T(tne,{get value(){return s.api},get children(){return T(fw,{value:l,get children(){return o.children}})}})}})}})},OKe=e=>{let t=Lr(),r=sne(),[n,o]=dw(e),i=ev(Ge(n,()=>({present:o.value.api().open})));return mt(()=>{r&&(t==null||t().setChild(o.value.machine),o.value.api().setParent(r))}),T(lne,{value:()=>t==null?void 0:t().getTriggerItemProps(o.value.api()),get children(){return T(ane,{get value(){return o.value.machine},get children(){return T(tne,{get value(){return o.value.api},get children(){return T(fw,{value:i,get children(){return o.children}})}})}})}})},IKe=e=>{let t=Lr(),r=Ge(()=>t().getSeparatorProps(),e);return T(gt.hr,r)},RKe=e=>{let t=Lr(),r=Jf(),n=Ge(()=>t().getTriggerProps(),()=>({"aria-controls":r().unmounted&&null}),e);return T(gt.button,n)},NKe=e=>{let t=DKe(),r=Ge(()=>t==null?void 0:t(),e);return T(gt.div,r)},ac=Object.freeze({__proto__:null,Arrow:dKe,ArrowTip:fKe,CheckboxItem:mKe,Content:gKe,Context:hKe,ContextTrigger:vKe,Indicator:yKe,Item:bKe,ItemContext:EKe,ItemGroup:xKe,ItemGroupLabel:wKe,ItemIndicator:_Ke,ItemText:CKe,Positioner:SKe,RadioItem:TKe,RadioItemGroup:PKe,Root:kKe,RootProvider:OKe,Separator:IKe,Trigger:RKe,TriggerItem:NKe}),[UOt,jOt]=Se({hookName:"useNumberInputContext",providerName:"<NumberInputProvider />"});var[qOt,zOt]=Se({hookName:"usePaginationContext",providerName:"<PaginationProvider />"});var[VOt,HOt]=Se({hookName:"usePinInputContext",providerName:"<PinInputProvider />"});var[WOt,GOt]=Se({hookName:"usePopoverContext",providerName:"<PopoverProvider />"});var[une,ys]=Se({hookName:"useProgressContext",providerName:"<ProgressProvider />"}),LKe=e=>{let t=ys(),r=Ge(()=>t().getCircleProps(),e);return T(gt.svg,r)},BKe=e=>{let t=ys(),r=Ge(()=>t().getCircleRangeProps(),e);return T(gt.circle,r)},FKe=e=>{let t=ys(),r=Ge(()=>t().getCircleTrackProps(),e);return T(gt.circle,r)},MKe=e=>e.children(ys()),$Ke=e=>{let t=ys(),r=Ge(()=>t().getLabelProps(),e);return T(gt.label,r)},UKe=e=>{let t=ys(),r=Ge(()=>t().getRangeProps(),e);return T(gt.div,r)},jKe=e=>{let t=_O(),r=wO(),n=Cs(),o=Ee(()=>({id:n,dir:t().dir,getRootNode:r().getRootNode,...e})),[i,a]=jf(Gre(o()),{context:o});return Ee(()=>Wre(i,a,Tl))},qKe=e=>{let[t,r]=Lo()(e,["id","ids","max","min","orientation","translations","value"]),n=jKe(t),o=Ge(()=>n().getRootProps(),r);return T(une,{value:n,get children(){return T(gt.div,o)}})},zKe=e=>{let[{value:t},r]=Lo()(e,["value"]),n=Ge(()=>t().getRootProps(),r);return T(une,{value:t,get children(){return T(gt.div,n)}})},VKe=e=>{let t=ys(),r=Ge(()=>t().getTrackProps(),e);return T(gt.div,r)},HKe=e=>{let t=ys(),r=Ge(()=>t().getValueTextProps(),e);return T(gt.span,kt(r,{get children(){return e.children||t().valueAsString}}))},WKe=e=>{let[t,r]=Lo()(e,["state"]),n=ys(),o=Ge(()=>n().getViewProps(t),r);return T(gt.span,o)},tv=Object.freeze({__proto__:null,Circle:LKe,CircleRange:BKe,CircleTrack:FKe,Context:MKe,Label:$Ke,Range:UKe,Root:qKe,RootProvider:zKe,Track:VKe,ValueText:HKe,View:WKe}),[KOt,YOt]=Se({hookName:"useQrCodeContext",providerName:"<QrCodeProvider />"});var[XOt,ZOt]=Se({hookName:"useRadioGroupContext",providerName:"<RadioGroupProvider />"});var[QOt,JOt]=Se({hookName:"useRadioGroupItemContext",providerName:"<RadioGroupItemProvider />"}),[eIt,tIt]=Se({hookName:"useRadioGroupItemPropsContext",providerName:"<RadioGroupItemPropsProvider />"});var[rIt,nIt]=Se({hookName:"useRatingGroupContext",providerName:"<RatingGroupProvider />"});var[oIt,iIt]=Se({hookName:"useRatingGroupItemContext",providerName:"<RatingGroupItemProvider />"});var[aIt,sIt]=Se({hookName:"useSegmentGroupContext",providerName:"<SegmentGroupProvider />"});var[lIt,uIt]=Se({hookName:"useSegmentGroupItemContext",providerName:"<SegmentGroupItemProvider />"}),[cIt,dIt]=Se({hookName:"useSegmentGroupItemPropsContext",providerName:"<SegmentGroupItemPropsProvider />"});var[fIt,pIt]=Se({hookName:"useSelectContext",providerName:"<SelectProvider />"});var[mIt,gIt]=Se({hookName:"useSelectItemContext",providerName:"<SelectItemProvider />"}),[hIt,vIt]=Se({hookName:"useSelectItemPropsContext",providerName:"<SelectItemPropsProvider />"});var[yIt,bIt]=Se({hookName:"useSelectItemGroupPropsContext",providerName:"<SelectItemGroupPropsProvider />"});var[EIt,xIt]=Se({hookName:"useSignaturePadContext",providerName:"<SignaturePadProvider />"});var cw=(e,t=[])=>({parts:(...r)=>{if(GKe(t))return cw(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>cw(e,[...t,...r]),rename:r=>cw(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${Yf(e)}"][data-part="${Yf(n)}"]`,`& [data-scope="${Yf(e)}"][data-part="${Yf(n)}"]`].join(", "),attrs:{"data-scope":Yf(e),"data-part":Yf(n)}}}),{})}),Yf=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),GKe=e=>e.length===0;var KKe=Symbol(),Zre=Object.getPrototypeOf,bO=new WeakMap,YKe=e=>e&&(bO.has(e)?bO.get(e):Zre(e)===Object.prototype||Zre(e)===Array.prototype),XKe=e=>YKe(e)&&e[KKe]||null,Qre=(e,t=!0)=>{bO.set(e,t)};function ZKe(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function cne(e,t){let r=ZKe();return r?(r[e]||(r[e]=t()),r[e]):t()}var EO=!1,yO=e=>typeof e=="object"&&e!==null,Zf=cne("__zag__proxyStateMap",()=>new WeakMap),uw=cne("__zag__refSet",()=>new WeakSet),QKe=(e=Object.is,t=(u,c)=>new Proxy(u,c),r=u=>yO(u)&&!uw.has(u)&&(Array.isArray(u)||!(Symbol.iterator in u))&&!(u instanceof WeakMap)&&!(u instanceof WeakSet)&&!(u instanceof Error)&&!(u instanceof Number)&&!(u instanceof Date)&&!(u instanceof String)&&!(u instanceof RegExp)&&!(u instanceof ArrayBuffer),n=u=>{switch(u.status){case"fulfilled":return u.value;case"rejected":throw u.reason;default:throw u}},o=new WeakMap,i=(u,c,f=n)=>{let d=o.get(u);if((d==null?void 0:d[0])===c)return d[1];let p=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u));return Qre(p,!0),o.set(u,[c,p]),Reflect.ownKeys(u).forEach(v=>{let h=Reflect.get(u,v);uw.has(h)?(Qre(h,!1),p[v]=h):h instanceof Promise?Object.defineProperty(p,v,{get(){return f(h)}}):Zf.has(h)?p[v]=tYe(h,f):p[v]=h}),Object.freeze(p)},a=new WeakMap,s=[1,1],l=u=>{if(!yO(u))throw new Error("object required");let c=a.get(u);if(c)return c;let f=s[0],d=new Set,p=(D,R=++s[0])=>{f!==R&&(f=R,d.forEach(M=>M(D,R)))},v=s[1],h=(D=++s[1])=>(v!==D&&!d.size&&(v=D,g.forEach(([R])=>{let M=R[1](D);M>f&&(f=M)})),f),y=D=>(R,M)=>{let I=[...R];I[1]=[D,...I[1]],p(I,M)},g=new Map,m=(D,R)=>{if(EO&&g.has(D))throw new Error("prop listener already exists");if(d.size){let M=R[3](y(D));g.set(D,[R,M])}else g.set(D,[R])},b=D=>{var M;let R=g.get(D);R&&(g.delete(D),(M=R[1])==null||M.call(R))},E=D=>(d.add(D),d.size===1&&g.forEach(([M,I],B)=>{if(EO&&I)throw new Error("remove already exists");let L=M[3](y(B));g.set(B,[M,L])}),()=>{d.delete(D),d.size===0&&g.forEach(([M,I],B)=>{I&&(I(),g.set(B,[M]))})}),C=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u)),P=t(C,{deleteProperty(D,R){let M=Reflect.get(D,R);b(R);let I=Reflect.deleteProperty(D,R);return I&&p(["delete",[R],M]),I},set(D,R,M,I){var K;let B=Reflect.has(D,R),L=Reflect.get(D,R,I);if(B&&(e(L,M)||a.has(M)&&e(L,a.get(M))))return!0;b(R),yO(M)&&(M=XKe(M)||M);let U=M;if(!((K=Object.getOwnPropertyDescriptor(D,R))!=null&&K.set))if(M instanceof Promise)M.then(z=>{Object.assign(M,{status:"fulfilled",value:z}),p(["resolve",[R],z])}).catch(z=>{Object.assign(M,{status:"rejected",reason:z}),p(["reject",[R],z])});else{!Zf.has(M)&&r(M)&&(U=eYe(M));let z=!uw.has(U)&&Zf.get(U);z&&m(R,z)}return Reflect.set(D,R,U,I),p(["set",[R],M,L]),!0}});a.set(u,P);let N=[C,h,i,E];return Zf.set(P,N),Reflect.ownKeys(u).forEach(D=>{let R=Object.getOwnPropertyDescriptor(u,D);R.get||R.set?Object.defineProperty(C,D,R):P[D]=u[D]}),P})=>[l,Zf,uw,e,t,r,n,o,i,a,s],[JKe]=QKe();function eYe(e={}){return JKe(e)}function tYe(e,t){let r=Zf.get(e);EO&&!r&&console.warn("Please use proxy object");let[n,o,i]=r;return i(n,o(),t)}var{min:wIt,PI:rYe}=Math;var _It=rYe+1e-4;var nYe=cw("signature-pad").parts("root","control","segment","segmentPath","guide","clearTrigger","label"),CIt=nYe.build(),Xf=Ca({getRootId:e=>{var t;return((t=e.ids)==null?void 0:t.root)??`signature-${e.id}`},getControlId:e=>{var t;return((t=e.ids)==null?void 0:t.control)??`signature-control-${e.id}`},getHiddenInputId:e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`signature-input-${e.id}`},getControlEl:e=>Xf.getById(e,Xf.getControlId(e)),getSegmentEl:e=>jte(Xf.getControlEl(e),"[data-part=segment]"),getHiddenInputEl:e=>Xf.getById(e,Xf.getHiddenInputId(e)),getDataUrl:(e,t)=>e.isEmpty?Promise.resolve(""):kte(Xf.getSegmentEl(e),t)});so()(["dir","disabled","getRootNode","id","ids","onDraw","onDrawEnd","readOnly","drawing","name"]);var[SIt,TIt]=Se({hookName:"useSliderContext",providerName:"<SliderProvider />"});var[PIt,AIt]=Se({hookName:"useSliderThumbPropsContext",providerName:"<SliderThumbPropsProvider />"});var[DIt,kIt]=Se({hookName:"useSplitterContext",providerName:"<SplitterProvider />"});var[OIt,IIt]=Se({hookName:"useSwitchContext",providerName:"<SwitchProvider />"});var[RIt,NIt]=Se({hookName:"useTabsContext",providerName:"<TabsProvider />"});var[LIt,BIt]=Se({hookName:"useTagsInputContext",providerName:"<TagsInputProvider />"});var[FIt,MIt]=Se({hookName:"useTagsInputItemContext",providerName:"<TagsInputItemProvider />"}),[$It,UIt]=Se({hookName:"useTagsInputItemPropsContext",providerName:"<TagsInputItemPropsProvider />"});var dne=e=>{let t=lw.machine({id:"1",...e});return{...lw.connect(t,t.send,Tl),machine:t}},[oYe,tp]=Se({hookName:"useToastContext",providerName:"<ToastProvider />"}),iYe=e=>{let t=tp(),r=Ge(()=>t().getActionTriggerProps(),e);return T(gt.button,r)},aYe=e=>{let t=tp(),r=Ge(()=>t().getCloseTriggerProps(),e);return T(gt.button,r)},sYe=e=>e.children(tp()),lYe=e=>{let t=tp(),r=Ge(()=>t().getDescriptionProps(),e);return T(gt.div,r)},uYe=V("<div><div></div><div>"),cYe=e=>{let t=tp(),r=Ge(()=>t().getRootProps(),e);return(()=>{var n=uYe(),o=n.firstChild,i=o.nextSibling;return yt(n,r,!1,!0),yt(o,kt(()=>t().getGhostBeforeProps()),!1,!1),W(n,()=>e.children,i),yt(i,kt(()=>t().getGhostAfterProps()),!1,!1),n})()},dYe=e=>{let t=tp(),r=Ge(()=>t().getTitleProps(),e);return T(gt.div,r)},fne=e=>{let[t,r]=Dr(e,["toaster","children"]),[n,o]=jf(t.toaster.machine),i=n.context.placement,a=Ee(()=>lw.connect(n,o,Tl)),s=Ee(()=>a().getToastsByPlacement(i)),l=Ge(a().getGroupProps({placement:i}),r);return T(gt.div,kt(l,{get children(){return T(Mt,{get each(){return s()},children:u=>T(fYe,{value:u,children:c=>t.children(c)})})}}))},fYe=e=>{let[t,r]=Tte(e.value),n=Ee(()=>Xre(t,r,Tl)),o=Ee(()=>t.context);return T(oYe,{value:n,get children(){return e.children(o)}})},rv=Object.freeze({__proto__:null,ActionTrigger:iYe,CloseTrigger:aYe,Context:sYe,Description:lYe,Root:cYe,Title:dYe}),[jIt,qIt]=Se({hookName:"useToggleGroupContext",providerName:"<ToggleGroupProvider />"});var[zIt,VIt]=Se({hookName:"useTooltipContext",providerName:"<TooltipProvider />"});var[HIt,WIt]=Se({hookName:"useTreeViewBranchContext",providerName:"<TreeViewBranchProvider />"}),[GIt,KIt]=Se({hookName:"useTreeViewContext",providerName:"<TreeViewProvider />"}),[YIt,XIt]=Se({hookName:"useTreeViewDepthContext",providerName:"<TreeViewDepthProvider />"});var[ZIt,QIt]=Se({hookName:"useTreeViewItemContext",providerName:"<TreeViewItemProvider />"}),[JIt,eRt]=Se({hookName:"useTreeViewItemPropsContext",providerName:"<TreeViewItemProvider />"});var pne=e=>T(ep.Root,{get open(){return e.isOpen},lazyMount:!0,unmountOnExit:!0,onOpenChange:t=>{var r;return t.open||(r=e.onClose)==null?void 0:r.call(e)},get children(){return[T(ep.Backdrop,{class:"fixed inset-0 bg-[rgba(0,0,0,0.5)] h-screen z-50"}),T(ep.Positioner,{class:"fixed inset-0 z-50 flex items-center justify-center px-2",get children(){return[T(ep.Content,{get children(){return e.children}}),T(ep.CloseTrigger,{class:"fixed top-2 right-2 z-50 rounded-md bg-white p-2 text-black",get children(){return T(Gn,{class:"w-4"})}})]}})]}});var pYe=V('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2px" stroke-linecap="round" stroke-linejoin="round"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4">'),pw=e=>(()=>{let t=pYe();return yt(t,e,!0,!0),t})();var mYe=V('<div class="flex items-center gap-4 border bg-white border-gray-200 rounded-md p-2 text-gray-900 min-w-[250px]"><div></div><div class="flex flex-col"><span class="text-md font-normal text-sm"></span><span class="text-gray-500 text-xs">'),mw=e=>{let t=hYe(e.file);return(()=>{let r=mYe(),n=r.firstChild,o=n.nextSibling,i=o.firstChild,a=i.nextSibling;return W(n,T(pw,{class:"w-6 h-6"})),W(i,()=>e.file.name),W(a,()=>gYe(e.file)),le(()=>we(n,Wt("rounded-md text-white p-2 flex items-center",t==="pink"&&"bg-pink-400",t==="blue"&&"bg-blue-400",t==="green"&&"bg-green-400",t==="gray"&&"bg-gray-400",t==="orange"&&"bg-orange-400"))),r})()},gYe=e=>{switch(e.name.split(".").pop()){case"pdf":return"PDF";case"doc":case"docx":return"Word";case"xls":case"xlsx":case"csv":return"Sheet";case"json":return"JSON";case"md":return"Markdown";default:return"DOCUMENT"}},hYe=e=>{let t=e.name.split(".").pop();if(!t)return"gray";switch(t){case"pdf":return"pink";case"doc":case"docx":return"blue";case"xls":case"xlsx":case"csv":return"green";case"json":return"orange";default:return"gray"}};var vYe=V('<div class="flex justify-end items-end animate-fade-in gap-2">'),mne=V("<div>"),yYe=V("<span>"),bYe=V('<img alt="Attachment">'),EYe=V('<div class="flex flex-col gap-1 items-end w-full"><div class="bubble bubble--guest whitespace-pre-wrap flex flex-col" data-testid="guest-bubble">'),xYe=V("<img>"),wYe=V('<div class="flex flex-col gap-1 items-end"><div class="bubble bubble--guest w-full w-whitespace-pre-wrap flex flex-col" data-testid="guest-bubble"><audio controls>'),gne=e=>(()=>{let t=vYe();return W(t,T($t,{get children(){return[T($e,{get when(){var r;return((r=e.answer)==null?void 0:r.type)==="text"},get children(){return T(_Ye,{get answer(){return e.answer}})}}),T($e,{get when(){var r;return((r=e.answer)==null?void 0:r.type)==="recording"},get children(){return T(CYe,{get answer(){return e.answer}})}})]}}),null),W(t,T(ve,{get when(){return e.showAvatar},get children(){return T(jx,{get initialAvatarSrc(){return e.avatarSrc}})}}),null),le(()=>(e.hasHostAvatar?wt()?"28px":"50px":void 0)!=null?t.style.setProperty("margin-left",e.hasHostAvatar?wt()?"28px":"50px":void 0):t.style.removeProperty("margin-left")),t})(),_Ye=e=>{let[t,r]=oe();return(()=>{let n=EYe(),o=n.firstChild;return W(n,T(ve,{get when(){return(e.answer.attachments??[]).length>0},get children(){return[(()=>{let i=mne();return W(i,T(Mt,{get each(){var a;return(a=e.answer.attachments)==null?void 0:a.filter(s=>s.type.startsWith("image"))},children:(a,s)=>(()=>{let l=xYe();return l.$$click=()=>r(a.url),le(u=>{let c=a.url,f=`Attached image ${s()+1}`,d=Wt("bubble bubble--guest cursor-pointer",e.answer.attachments.filter(p=>p.type.startsWith("image")).length>1&&"max-w-[90%]");return c!==u._v$&&qe(l,"src",u._v$=c),f!==u._v$2&&qe(l,"alt",u._v$2=f),d!==u._v$3&&we(l,u._v$3=d),u},{_v$:void 0,_v$2:void 0,_v$3:void 0}),l})()})),le(()=>we(i,Wt("flex gap-1 overflow-auto max-w-[350px]",wt()?"flex-wrap justify-end":"items-center"))),i})(),(()=>{let i=mne();return W(i,T(Mt,{get each(){var a;return(a=e.answer.attachments)==null?void 0:a.filter(s=>!s.type.startsWith("image"))},children:a=>T(mw,{get file(){return{name:a.url.split("/").at(-1)}}})})),le(()=>we(i,Wt("flex gap-1 overflow-auto max-w-[350px]",wt()?"flex-wrap justify-end":"items-center"))),i})()]}}),o),W(o,T(ve,{get when(){return yr(e.answer.label??e.answer.value)},get children(){let i=yYe();return i.style.setProperty("overflow-wrap","break-word"),W(i,()=>e.answer.label??e.answer.value),i}})),W(n,T(pne,{get isOpen(){return t()!==void 0},onClose:()=>r(void 0),get children(){let i=bYe();return i.style.setProperty("border-radius","6px"),le(()=>qe(i,"src",t())),i}}),null),n})()},CYe=e=>(()=>{let t=wYe(),r=t.firstChild,n=r.firstChild;return le(()=>qe(n,"src",e.answer.url)),t})();Yr(["click"]);var SYe=[{label:"Top",value:"top"},{label:"Bottom",value:"bottom"}],TYe=[{label:"Fixed",value:"fixed"},{label:"Absolute",value:"absolute"}],IRt=SYe.map(e=>e.value),RRt=TYe.map(e=>e.value);var PYe=[{label:"None",value:"none"},{label:"M",value:"medium"},{label:"L",value:"large"},{label:"10",value:"custom"}],NRt=PYe.map(e=>e.value),hne="#303235",vne="Google",rp="Open Sans";var yne="#01a952",bne="#dffaeb",Ene=4,gw="absolute",xne="top",sc="large",mi=1,wne=0,_ne="800px",Cne="100%",SO="transparent",Sne="#f5f5f5",Tne="#202020",nv="#01a952",Pne="#ffffff",Ane=0,Dne="#FFFFFF",kne="#202020",One="#9095A0",Ine="md",Rne="#dffaeb",Nne="#1c201f",TO=!0,ov=!1;var Lne=e=>{let{chatChunks:t}=Xi(),r=()=>{var n,o;return(o=(n=t()[e.chunkIndex])==null?void 0:n.input)==null?void 0:o.answer};return T(ve,{get when(){return r()&&!e.hasError},get children(){return T(gne,{get answer(){return r()},get showAvatar(){var n;return((n=e.guestAvatar)==null?void 0:n.isEnabled)??ov},get avatarSrc(){var n;return((n=e.guestAvatar)==null?void 0:n.url)&&e.guestAvatar.url},get hasHostAvatar(){return e.hasHostAvatar}})}})};var AYe=V("<div><div>"),Bne=e=>{let t,[r,n]=oe(0),o=new ResizeObserver(i=>n(i[0].target.clientHeight-(wt()?24:40)));return et(()=>{t&&o.observe(t)}),dt(()=>{t&&o.unobserve(t)}),(()=>{let i=AYe(),a=i.firstChild,s=t;return typeof s=="function"?lt(s,i):t=i,W(a,T(jx,{get initialAvatarSrc(){return e.hostAvatarSrc}})),le(l=>{let u="flex flex-shrink-0 items-center relative bot-avatar-container "+(wt()?"w-6":"w-10"),c="absolute flex items-center top-0"+(wt()?" w-6 h-6":" w-10 h-10")+(e.hideAvatar?" opacity-0":" opacity-100"),f=`${r()}px`,d=e.isTransitionDisabled?void 0:"top 350ms ease-out, opacity 250ms ease-out";return u!==l._v$&&we(i,l._v$=u),c!==l._v$2&&we(a,l._v$2=c),f!==l._v$3&&((l._v$3=f)!=null?a.style.setProperty("top",f):a.style.removeProperty("top")),d!==l._v$4&&((l._v$4=d)!=null?a.style.setProperty("transition",d):a.style.removeProperty("transition")),l},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),i})()};var DYe=V('<div class="flex flex-col animate-fade-in"><div class="flex w-full items-center"><div class="flex relative items-start max-w-full"><div class="bubble bubble--host flex items-center absolute" data-testid="host-bubble"></div><div class="bubble flex flex-col overflow-hidden relative text-ellipsis h-full gap-6">'),kYe=V("<span>"),Fne=e=>{let[t,r]=Ps(oe([]),{key:`bot-streaming-message-${e.streamingMessageId}`,storage:e.context.storage});return mt(()=>{var n,o;if(((n=R_())==null?void 0:n.id)!==e.streamingMessageId)return[];r(((o=R_())==null?void 0:o.content.split("```").map((i,a)=>a%2===0?i.split(`
|
|
115
|
-
|
|
116
|
-
`).map(s=>Mh(s.replace(/【.+】/g,""),{format:"html",enableCodeBlocksMode:!1})):[Mh("```"+i+"```",{format:"html",enableCodeBlocksMode:!1})]).flat().filter(yr))??[])}),(()=>{let n=DYe(),o=n.firstChild,i=o.firstChild,a=i.firstChild,s=a.nextSibling;return a.style.setProperty("width","100%"),a.style.setProperty("height","100%"),W(s,T(Mt,{get each(){return t()},children:l=>(()=>{let u=kYe();return u.innerHTML=l,u})()})),n})()};var OYe=V('<div class="flex flex-col w-full min-w-0 gap-2"><div><div class="flex flex-col flex-1 gap-2 w-10">'),IYe=V("<div>"),Mne=e=>{let t,{getDisplayedMessageIndex:r,setDisplayedMessageIndex:n}=Xi(),[o,i]=oe(),[a,s]=oe(!1);mt(()=>{e.isTransitionDisabled?(n(e.index,e.messages.length),s(!0)):a()||(n(e.index,0),s(!0))});let l=()=>r(e.index);et(()=>{e.streamingMessageId||(e.messages.length===0&&e.onAllBubblesDisplayed(),e.onScrollToBottom(t,50))});let u=async c=>{var d;(((d=e.settings.typingEmulation)==null?void 0:d.delayBetweenBubbles)??Sr.typingEmulation.delayBetweenBubbles)>0&&l()<e.messages.length-1&&await new Promise(p=>{var v;return setTimeout(p,(((v=e.settings.typingEmulation)==null?void 0:v.delayBetweenBubbles)??Sr.typingEmulation.delayBetweenBubbles)*1e3)});let f=e.messages[l()].id;await e.onNewBubbleDisplayed(f),n(e.index,l()===e.messages.length?l():l()+1),e.onScrollToBottom(c),l()===e.messages.length&&(i(c),e.onAllBubblesDisplayed())};return(()=>{let c=OYe(),f=c.firstChild,d=f.firstChild;return W(f,T(ve,{get when(){var p,v;return(((v=(p=e.theme.chat)==null?void 0:p.hostAvatar)==null?void 0:v.isEnabled)??TO)&&(e.messages.length>0||e.streamingMessageId)},get children(){return T(Bne,{get hostAvatarSrc(){var p,v;return(v=(p=e.theme.chat)==null?void 0:p.hostAvatar)==null?void 0:v.url},get hideAvatar(){return e.hideAvatar},get isTransitionDisabled(){return e.isTransitionDisabled}})}}),d),W(d,T(ve,{get when(){return e.messages.length>0},get children(){return T(Mt,{get each(){return e.messages.slice(0,l()+1)},children:(p,v)=>T(lte,{message:p,get typingEmulation(){return e.settings.typingEmulation},get isTypingSkipped(){return Ee(()=>{var h;return!!((((h=e.settings.typingEmulation)==null?void 0:h.isDisabledOnFirstMessage)??Sr.typingEmulation.isDisabledOnFirstMessage)&&e.index===0)})()&&v()===0},get onTransitionEnd(){return e.isTransitionDisabled?void 0:u},get onCompleted(){return e.onSubmit}})})}}),null),W(d,T(ve,{get when(){return e.streamingMessageId},keyed:!0,children:p=>(()=>{let v=IYe(),h=e.blockRef;return typeof h=="function"?lt(h,v):e.blockRef=v,W(v,T(Fne,{streamingMessageId:p,get context(){return e.context}})),le(()=>{var y,g,m,b;return(((g=(y=e.theme.chat)==null?void 0:y.guestAvatar)==null?void 0:g.isEnabled)??ov?wt()?"calc(100% - 60px)":"calc(100% - 48px - 48px)":"100%")!=null?v.style.setProperty("max-width",((b=(m=e.theme.chat)==null?void 0:m.guestAvatar)==null?void 0:b.isEnabled)??ov?wt()?"calc(100% - 60px)":"calc(100% - 48px - 48px)":"100%"):v.style.removeProperty("max-width")}),v})()}),null),W(c,T(ve,{get when(){return l()===e.messages.length&&e.input},children:p=>T(Lne,{ref(v){let h=t;typeof h=="function"?h(v):t=v},get block(){return p()},get chunkIndex(){return e.index},get hasHostAvatar(){var v,h;return((h=(v=e.theme.chat)==null?void 0:v.hostAvatar)==null?void 0:h.isEnabled)??TO},get guestAvatar(){var v;return(v=e.theme.chat)==null?void 0:v.guestAvatar},get context(){return e.context},get isInputPrefillEnabled(){var v;return((v=e.settings.general)==null?void 0:v.isInputPrefillEnabled)??Sr.general.isInputPrefillEnabled},get hasError(){return e.hasError},onTransitionEnd:()=>e.onScrollToBottom(o()),get onSubmit(){return e.onSubmit},get onSkip(){return e.onSkip}})}),null),le(()=>we(f,nt("flex",wt()?"gap-1":"gap-2"))),c})()};var RYe=V('<div class="w-full max-w-xs p-4 bg-white shadow-lg rounded-lg flex flex-col gap-3 toast--popup-blocked border border-gray-200" role="alert"><div class="flex items-start gap-2"><div class="flex flex-col gap-1 flex-1"><div class="flex-shrink-0 mt-0.5"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-orange-500" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg></div><span class="text-sm font-semibold text-gray-900">Popup blocked</span><div class="text-sm font-normal text-gray-600 leading-relaxed">The bot wants to open a new tab but it was blocked by your browser. It needs a manual approval.</div></div></div><a target="_blank" class="button justify-center text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2 flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 rounded-lg hover:opacity-90 active:scale-[0.98]" rel="noreferrer"><span>Continue in new tab</span><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" viewBox="0 0 20 20" fill="currentColor"><path d="M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"></path><path d="M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z">'),$ne=e=>(()=>{let t=RYe(),r=t.firstChild,n=r.nextSibling;return n.$$click=()=>e.onLinkClick(),le(()=>qe(n,"href",e.url)),t})();Yr(["click"]);var NYe=V('<div class="conversation-container__body flex flex-col overflow-y-auto w-full px-5 py-10 relative scroll-smooth gap-2 flex-[9]">'),LYe=V('<div class="flex justify-end">'),BYe=300,Une=e=>{let{chatChunks:t,theme:r,hasError:n,blockRef:o,blockedPopupUrl:i,setBlockedPopupUrl:a,isSending:s,sendMessage:l,processClientSideActions:u,onBubblesDisplayed:c}=Xi(),f,d;et(()=>{(async()=>{let y=t()[0];if(!y.clientSideActions)return;let g=y.clientSideActions.filter(m=>ur(m.lastBubbleBlockId));await u(g)})()}),dt(()=>{d&&clearTimeout(d)});let p=async()=>{var g;let y=[...t()].pop();y&&(d&&clearTimeout(d),d=setTimeout(()=>{c(),d=void 0},BYe),ur(y.input)&&((g=e.onEnd)==null||g.call(e)))},v=async y=>{let g=[...t()].pop();if(!g)return;let m=g.messages.find(b=>b.id===y);if(!m){console.warn(`Block with id "${y}" not found in messages`,{blockId:y,availableMessageIds:g.messages.map(b=>b.id),chunkIndex:t().length-1});return}if(e.onNewBlock&&e.onNewBlock({id:m.id,type:m.type}),g.clientSideActions){let b=g.clientSideActions.filter(E=>E.lastBubbleBlockId===y);await u(b)}},h=()=>l(void 0);return(()=>{let y=NYe(),g=f;return typeof g=="function"?lt(g,y):f=y,W(y,T(Dv,{get each(){return t()},children:(m,b)=>T(Mne,{blockRef:o,index:b,get messages(){return m().messages},get input(){return m().input},get theme(){return r()},get settings(){return e.initialChatReply.bot.settings},get streamingMessageId(){return m().streamingMessageId},get context(){return e.context},get hideAvatar(){var E,C;return Ee(()=>!m().input)()&&((((E=t()[b+1])==null?void 0:E.messages)??0).length>0||((C=t()[b+1])==null?void 0:C.streamingMessageId)!==void 0||m().messages.length>0&&s())},get hasError(){return Ee(()=>!!n())()&&b===t().length-1},get isTransitionDisabled(){return b!==t().length-1},onNewBubbleDisplayed:v,onAllBubblesDisplayed:p,onSubmit:l,onScrollToBottom:(E,C)=>Uv(f,E,C),onSkip:h})}),null),W(y,T(ve,{get when(){return i()},keyed:!0,children:m=>(()=>{let b=LYe();return W(b,T($ne,{url:m,onLinkClick:()=>a(void 0)})),b})()}),null),y})()};var FYe=V('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_7660_13477)"><path d="M24 0H0V24H24V0Z" fill="#5DDE8A"></path><path d="M0 0L7.00328 7.00328L8.30164 6.25574L10.9377 5.23279H12.8262L15.8951 5.98033L17.5475 8.18361L18.0984 9.83607L18.3738 12.3541L18.4918 13.6525L17.0754 16.6426H16.6426L24 24V0H0Z" fill="#5BCB82"></path><path d="M14.0853 18.2951H5.27222V9.67872C5.27222 7.12134 7.35746 5.07544 9.87549 5.07544H14.046C16.6034 5.07544 18.6493 7.16069 18.6493 9.67872V13.6918C18.6886 16.2099 16.6427 18.2951 14.0853 18.2951ZM6.49189 17.1148H14.1247C16.0132 17.1148 17.5476 15.5804 17.5476 13.6918V9.67872C17.5476 7.79019 16.0132 6.25577 14.1247 6.25577H9.91484C8.02631 6.25577 6.49189 7.79019 6.49189 9.67872V17.1148Z" fill="white"></path><path d="M11.9609 12.6295C12.4824 12.6295 12.9051 12.2067 12.9051 11.6852C12.9051 11.1637 12.4824 10.741 11.9609 10.741C11.4394 10.741 11.0166 11.1637 11.0166 11.6852C11.0166 12.2067 11.4394 12.6295 11.9609 12.6295Z" fill="white"></path><path d="M8.97063 12.6295C9.49213 12.6295 9.91489 12.2067 9.91489 11.6852C9.91489 11.1637 9.49213 10.741 8.97063 10.741C8.44913 10.741 8.02637 11.1637 8.02637 11.6852C8.02637 12.2067 8.44913 12.6295 8.97063 12.6295Z" fill="white"></path><path d="M15.0297 12.6295C15.5512 12.6295 15.974 12.2067 15.974 11.6852C15.974 11.1637 15.5512 10.741 15.0297 10.741C14.5082 10.741 14.0854 11.1637 14.0854 11.6852C14.0854 12.2067 14.5082 12.6295 15.0297 12.6295Z" fill="white"></path></g><defs><clipPath id="clip0_7660_13477"><path d="M0 1.62712C0 0.728487 0.728486 0 1.62712 0H22.3729C23.2715 0 24 0.728486 24 1.62712V22.3729C24 23.2715 23.2715 24 22.3729 24H1.62712C0.728487 24 0 23.2715 0 22.3729V1.62712Z" fill="white">'),jne=()=>FYe();var MYe=V('<a href="https://quick.bot/?utm_source=litebadge" target="_blank" rel="noopener noreferrer" class="!p-3 !bg-black/[0.04] !z-50 !border-t !border-black/[0.08] !text-black/60 !gap-2 !text-xs !leading-3 !h-10 !font-normal !opacity-100 !visible !flex !items-center !justify-center !no-underline hover:!bg-[#f7f8ff] [&_svg]:!w-4 [&_svg]:!h-4" id="lite-badge"><span>Powered by quick.bot'),qne=e=>{let t,r,n=o=>{o.forEach(i=>{i.removedNodes.forEach(a=>{var s;"id"in a&&t&&a.id=="lite-badge"&&(console.log("Sorry, you can't remove the brand \u{1F605}"),(s=e.botContainer)==null||s.append(t))})})};return et(()=>{!document||!e.botContainer||(r=new MutationObserver(n),r.observe(e.botContainer,{subtree:!1,childList:!0}))}),dt(()=>{r&&r.disconnect()}),(()=>{let o=MYe(),i=o.firstChild,a=t;return typeof a=="function"?lt(a,o):t=o,W(o,T(jne,{}),i),o})()};var $Ye=V('<div class="!p-3 !z-50 !text-black/60 !gap-2 !leading-3 !h-10 !font-normal !opacity-100 !visible !flex !items-center !justify-center !no-underline hover:!opacity-80"><span>The conversation has ended.'),zne=()=>$Ye();var UYe=V('<textarea id="user-input" class="focus:outline-none bg-transparent flex-1 w-full resize-none overflow-hidden h-[25px]" data-testid="textarea" required>'),Vne=e=>{let[t,r]=Dr(e,["ref","onInput","containerRef"]),n=o=>{let i=o.currentTarget,a=25,s=150;i.style.height=`${a}px`;let l=Math.max(a,Math.min(i.scrollHeight,s));i.style.height=`${l}px`,i.style.overflow=i.scrollHeight>s?"auto":"hidden",t.onInput(i.value)};return(()=>{let o=UYe();o.$$input=n;let i=t.ref;return typeof i=="function"?lt(i,o):t.ref=o,yt(o,kt({get autofocus(){return!wt()}},r),!1,!1),o})()};Yr(["input"]);var jYe=V('<img class="rounded-md object-cover w-[58px] h-[58px]">'),qYe=V('<div class="relative group flex-shrink-0"><button class="absolute -right-2 p-0.5 -top-2 rounded-full bg-gray-200 text-black border border-gray-400 opacity-1 sm:opacity-0 group-hover:opacity-100 transition-opacity" aria-label="Remove attachment">'),zYe=V('<div class="absolute w-full h-full inset-0 bg-black/20 rounded-md">'),hw=e=>(()=>{let t=qYe(),r=t.firstChild;return W(t,T($t,{get children(){return[T($e,{get when(){return e.file.type.startsWith("image")},get children(){let n=jYe();return le(o=>{let i=URL.createObjectURL(e.file),a=e.file.name;return i!==o._v$&&qe(n,"src",o._v$=i),a!==o._v$2&&qe(n,"alt",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),n}}),T($e,{when:!0,get children(){return T(mw,{get file(){return e.file}})}})]}}),r),r.addEventListener("click",e.onRemoveClick),W(r,T(Gn,{class:"w-4"})),W(t,T(ve,{get when(){return tt(e.uploadProgressPercent)&&e.uploadProgressPercent!==100},get children(){return T(VYe,{get progressPercent(){return e.uploadProgressPercent}})}}),null),t})(),VYe=e=>{let[t,r]=oe(e.progressPercent??0),n;return mt(()=>{e.progressPercent===20&&(n=setInterval(()=>{t()<100&&r(i=>i+(Math.floor(Math.random()*10)+1))},1e3))}),dt(()=>{clearInterval(n)}),(()=>{let o=zYe();return W(o,T(tv.Root,{get value(){return t()},class:"flex items-center justify-center",get children(){return T(tv.Circle,{get children(){return[T(tv.CircleTrack,{}),T(tv.CircleRange,{})]}})}})),o})()};var HYe=V('<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M8.99992 16V6.41407L5.70696 9.70704C5.31643 10.0976 4.68342 10.0976 4.29289 9.70704C3.90237 9.31652 3.90237 8.6835 4.29289 8.29298L9.29289 3.29298L9.36907 3.22462C9.76184 2.90427 10.3408 2.92686 10.707 3.29298L15.707 8.29298L15.7753 8.36915C16.0957 8.76192 16.0731 9.34092 15.707 9.70704C15.3408 10.0732 14.7618 10.0958 14.3691 9.7754L14.2929 9.70704L10.9999 6.41407V16C10.9999 16.5523 10.5522 17 9.99992 17C9.44764 17 8.99992 16.5523 8.99992 16Z">'),Hne=e=>(()=>{let t=HYe();return yt(t,e,!0,!0),t})();var WYe=V('<svg><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z">'),np=e=>(()=>{let t=WYe();return yt(t,kt(e,{get class(){return nt("animate-spin h-6 w-6",e.class)},xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","data-testid":"loading-spinner"}),!0,!0),t})();var GYe=V("<button>"),uo=e=>{let t=_p(()=>e.children),[r,n]=Dr(e,["disabled","class"]),o=e.isDisabled||e.isLoading;return(()=>{let i=GYe();return yt(i,kt(n,{disabled:o,get class(){return Wt("button focus:outline-none filter hover:brightness-90 active:brightness-75 disabled:opacity-50 disabled:cursor-not-allowed disabled:brightness-100 flex justify-center transition-all duration-300 w-auto",r.class)}}),!1,!0),W(i,T(ve,{get when(){return!e.isLoading},get fallback(){return T(np,{})},get children(){return t()}})),i})()};var gi=e=>{let t=Ux.NEXT_PUBLIC_BETA_ENV&&!!(e!=null&&e.children);return T(uo,kt({type:"submit","aria-label":t?void 0:"Send",get class(){return nt(t?"px-4":void 0,e.class)}},e,{get children(){return T($t,{get children(){return[T($e,{when:!t,get children(){return T(Hne,{})}}),T($e,{when:t,get children(){return e.children}})]}})}}))};var KYe=V('<form><div class="flex w-full h-full transition-all duration-100"></div><div class="flex-shrink-0">'),hi=e=>{let{children:t,onSubmit:r,buttonLabel:n,isDisabled:o=!1,class:i,customButton:a,isInputDisabled:s,hasError:l}=e;return(()=>{let u=KYe(),c=u.firstChild,f=c.nextSibling;return u.addEventListener("submit",d=>{d.preventDefault(),r()}),W(c,t),W(f,T(ve,{when:a,get fallback(){return T(gi,{isDisabled:o,children:n})},children:a})),le(()=>we(u,Wt("input__field w-full flex gap-2 items-center border rounded-full px-5 py-2 pr-2 overflow-hidden",(s==null?void 0:s())&&!l&&"opacity-50 pointer-events-none",i))),u})()};var YYe=V('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2px" stroke-linecap="round" stroke-linejoin="round"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path><path d="M12 11v6"></path><path d="m9 14 3-3 3 3">'),Wne=e=>(()=>{let t=YYe();return yt(t,e,!0,!0),t})();var Tn=e=>{let t=r=>{let{data:n}=r;n.isFromBot&&e(r)};et(()=>{window.addEventListener("message",t)}),dt(()=>{window.removeEventListener("message",t)})};var Pn="Send";var PO={labels:{button:Pn,placeholder:"Type your answer..."},audioClip:{isEnabled:!1,visibility:"Auto"},attachments:{isEnabled:!1,visibility:"Auto"}};var XYe=V('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2px" stroke-linecap="round" stroke-linejoin="round"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path><circle cx="10" cy="12" r="2"></circle><path d="m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22">'),Gne=e=>(()=>{let t=XYe();return yt(t,e,!0,!0),t})();var ZYe=V('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48">'),Kne=e=>(()=>{let t=ZYe();return yt(t,e,!0,!0),t})();var QYe=V('<input type="file" id="document-upload" multiple class="hidden">'),JYe=V('<input type="file" id="photos-upload" accept="image/*, video/*" multiple class="hidden">'),eXe=V("<label> Document"),tXe=V("<label>Photos & videos"),Yne=e=>[(()=>{let t=QYe();return t.addEventListener("change",r=>{r.currentTarget.files&&e.onNewFiles(r.currentTarget.files)}),t})(),(()=>{let t=JYe();return t.addEventListener("change",r=>{r.currentTarget.files&&e.onNewFiles(r.currentTarget.files)}),t})(),T(ac.Root,{get children(){return[T(ac.Trigger,{get class(){return Wt("filter data-[state=open]:backdrop-brightness-90 hover:backdrop-brightness-95 transition rounded-full p-2 focus:outline-none",e.class)},"aria-label":"Add attachments",get children(){return T(Kne,{class:"w-5"})}}),T(ac.Positioner,{get children(){return T(ac.Content,{class:"p-3 gap-2 focus:outline-none",get children(){return[T(ac.Item,{value:"document",asChild:t=>(()=>{let r=eXe(),n=r.firstChild;return yt(r,kt(t,{for:"document-upload",class:"p-2 filter hover:brightness-95 flex gap-3 items-center"}),!1,!0),W(r,T(pw,{class:"w-4"}),n),r})()}),T(ac.Item,{value:"photos",asChild:t=>(()=>{let r=tXe(),n=r.firstChild;return yt(r,kt(t,{for:"photos-upload",class:"p-2 filter hover:brightness-95 flex gap-3 items-center"}),!1,!0),W(r,T(Gne,{class:"w-4"}),n),r})()})]}})}})]}})];var vw=({newFile:e,existingFiles:t,onError:r})=>{let n=Ut("NEXT_PUBLIC_BOT_FILE_UPLOAD_MAX_SIZE");if(n&&e.size>n*1024*1024){r({title:"File too large",description:`${e.name} is larger than ${n}MB`});return}if(t.length===0)return e;let o=e.name,i=1;for(;t.some(a=>a.name===o);){let a=e.name.lastIndexOf("."),s=a!==-1?e.name.slice(a):"";o=`${e.name.slice(0,a)}(${i})${s}`,i++}return new File([e],o,{type:e.type})};var Dl=dne({placement:"bottom-end",gap:24});var op=async({files:e,onUploadProgress:t})=>{let r=[],n=0;for(let{input:o,file:i}of e){t&&t({progress:n/e.length*100,fileIndex:n}),n+=1;let a=await go.post(Uo("/api/v2/generate-upload-url"),{json:{fileName:o.fileName,sessionId:o.sessionId,fileType:i.type},timeout:!1}).json();if(a!=null&&a.presignedUrl){let s=new FormData;Object.entries(a.formData).forEach(([l,u])=>{s.append(l,u)}),s.append("file",i);try{await go.post(a.presignedUrl,{body:s,timeout:!1}),r.push({url:a.fileUrl,type:i.type})}catch{continue}}else continue}return r};var Xne=`
|
|
117
|
-
const gainFactor = 3;
|
|
118
|
-
|
|
119
|
-
class VolumeProcessor extends AudioWorkletProcessor {
|
|
120
|
-
constructor() {
|
|
121
|
-
super();
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
process(inputs) {
|
|
125
|
-
const input = inputs[0];
|
|
126
|
-
if (input.length > 0) {
|
|
127
|
-
const channelData = input[0];
|
|
128
|
-
let sum = 0;
|
|
129
|
-
for (let i = 0; i < channelData.length; i++) {
|
|
130
|
-
sum += channelData[i] * channelData[i];
|
|
131
|
-
}
|
|
132
|
-
const rms = Math.sqrt(sum / channelData.length);
|
|
133
|
-
this.port.postMessage(rms * 100 * gainFactor)
|
|
134
|
-
}
|
|
135
|
-
return true;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
registerProcessor("volume-processor", VolumeProcessor);
|
|
140
|
-
|
|
141
|
-
`;var ip=e=>{let t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,(n,o,i,a)=>o+o+i+i+a+a);let r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return r?[parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)]:[0,0,0]},bs=e=>{if(!e)return[0,0,0];if(e.startsWith("#"))return ip(e);if(e.startsWith("rgba")||e.startsWith("rgb")){let t=e.match(/\d+(\.\d+)?/g);if(t&&t.length>=3)return[parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)]}return ip(e)},rXe=e=>{if(!e)return 1;if(e.startsWith("rgba")){let t=e.match(/\d+(\.\d+)?/g);if(t&&t.length>=4)return parseFloat(t[3])}return 1},ap=e=>({rgb:bs(e),alpha:rXe(e)});var nXe=V('<div><button class="p-0.5 rounded-full" aria-label="Stop recording"></button><div class="relative flex w-full"><canvas class="w-full h-[56px]"></canvas><div class="absolute w-2 left-0 h-[56px] recorder__left-gradient"></div><div class="absolute w-3 right-0 h-[56px] recorder__right-gradient"></div></div><span class="flex-none w-[35px] font-bold text-sm">'),lc=3,uc=3,oXe=60,iXe=10,aXe=5,sXe=90,Zne=e=>{var m;let[t,r]=oe(0),n,o,i,a,s,l,u,c=[],f,d,p=0,v=ip(((m=e.buttonsTheme)==null?void 0:m.backgroundColor)??nv).join(", "),h=()=>{if(!i||!n||!d)return;let b=performance.now(),E=b-d;d=b,i.clearRect(0,0,n.width,n.height),i.fillStyle=`rgba(${v}, 0.2)`;for(let C=0;C<(n.width+uc)/(lc+uc);C++){let x=C*(lc+uc)-p,P=n.height*(iXe/100),N=(n.height-P)/2;i.beginPath(),i.roundRect(x,N,lc,P,5),i.fill()}i.fillStyle=`rgba(${v}, 1)`;for(let C=0;C<c.length;C++){let x=n.width+(C+1)*(lc+uc)-p,P=n.height*(c[C]/100),N=(n.height-P)/2;i.beginPath(),i.roundRect(x,N,lc,P,5),i.fill()}p+=oXe*(E/1e3),o=requestAnimationFrame(h)},y=async()=>{n&&(u=await navigator.mediaDevices.getUserMedia({audio:!0}),e.onRecordingConfirmed(u),i||(i=n.getContext("2d")??void 0),f=setInterval(()=>{r(b=>b+=1)},1e3),a=new AudioContext,s=await lXe(a),l=a.createMediaStreamSource(u),l.connect(s),s.connect(a.destination),s.port.onmessage=b=>{((n.width+uc)/(lc+uc)+c.length)*(lc+uc)<n.width+p&&c.push(Math.min(Math.max(b.data,aXe),sXe))},d=performance.now(),o=requestAnimationFrame(h))},g=()=>{i&&n&&i.clearRect(0,0,n.width,n.height),p=0,s==null||s.disconnect(),s=void 0,l==null||l.disconnect(),l=void 0,a==null||a.close(),a=void 0,u==null||u.getTracks().forEach(b=>b.stop()),u=void 0,c=[],clearTimeout(f),r(0),cancelAnimationFrame(o),e.onAbortRecording()};return mt(()=>{e.recordingStatus==="asking"?y():e.recordingStatus==="stopped"&&g()}),dt(()=>{g()}),(()=>{let b=nXe(),E=b.firstChild,C=E.nextSibling,x=C.firstChild,P=C.nextSibling;E.addEventListener("click",g),W(E,T(Gn,{class:"w-4"}));let N=n;return typeof N=="function"?lt(N,x):n=x,W(P,()=>uXe(t())),le(()=>we(b,Wt("w-full gap-2 items-center transition-opacity px-2 recorder",e.recordingStatus==="started"?"opacity-1 flex":"opacity-0 hidden"))),b})()},lXe=async e=>{let t=new Blob([Xne],{type:"application/javascript"}),r=URL.createObjectURL(t);return await e.audioWorklet.addModule(r),new AudioWorkletNode(e,"volume-processor")},uXe=e=>{let t=Math.floor(e/60),n=(e%60).toString().padStart(2,"0");return`${t}:${n}`};var cXe=V('<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M15.7806 10.1963C16.1326 10.3011 16.3336 10.6714 16.2288 11.0234L16.1487 11.2725C15.3429 13.6262 13.2236 15.3697 10.6644 15.6299L10.6653 16.835H12.0833L12.2171 16.8486C12.5202 16.9106 12.7484 17.1786 12.7484 17.5C12.7484 17.8214 12.5202 18.0894 12.2171 18.1514L12.0833 18.165H7.91632C7.5492 18.1649 7.25128 17.8672 7.25128 17.5C7.25128 17.1328 7.5492 16.8351 7.91632 16.835H9.33527L9.33429 15.6299C6.775 15.3697 4.6558 13.6262 3.84992 11.2725L3.76984 11.0234L3.74445 10.8906C3.71751 10.5825 3.91011 10.2879 4.21808 10.1963C4.52615 10.1047 4.84769 10.2466 4.99347 10.5195L5.04523 10.6436L5.10871 10.8418C5.8047 12.8745 7.73211 14.335 9.99933 14.335C12.3396 14.3349 14.3179 12.7789 14.9534 10.6436L15.0052 10.5195C15.151 10.2466 15.4725 10.1046 15.7806 10.1963ZM12.2513 5.41699C12.2513 4.17354 11.2437 3.16521 10.0003 3.16504C8.75675 3.16504 7.74835 4.17343 7.74835 5.41699V9.16699C7.74853 10.4104 8.75685 11.418 10.0003 11.418C11.2436 11.4178 12.2511 10.4103 12.2513 9.16699V5.41699ZM13.5814 9.16699C13.5812 11.1448 11.9781 12.7479 10.0003 12.748C8.02232 12.748 6.41845 11.1449 6.41828 9.16699V5.41699C6.41828 3.43889 8.02221 1.83496 10.0003 1.83496C11.9783 1.83514 13.5814 3.439 13.5814 5.41699V9.16699Z">'),Qne=e=>(()=>{let t=cXe();return yt(t,e,!0,!0),t})();var Ooe=de(Doe(),1),RXe=V('<div class="flex items-center gap-2">'),NXe=V('<div class="mb-3 flex gap-2 overflow-auto">'),koe=V("<div>"),LXe=V('<div class="fixed inset-0 z-[9999] flex items-center justify-center bg-white/80 backdrop-blur-sm transition-all duration-200" role="dialog" aria-modal="true" aria-label="Drop zone"><div class="flex flex-col items-center gap-3 p-8 bg-white/95 rounded-2xl"><div class="p-5"></div><h3 class="text-2xl font-bold text-gray-900">Upload file</h3><p class="text-base text-gray-600">Drop file to upload'),BXe=V('<div class="flex flex-col w-full gap-2">'),zO=e=>{let[t,r]=oe(e.defaultValue??""),[n,o]=oe([]),[i,a]=oe(void 0),[s,l]=oe(!1),[u,c]=oe("stopped"),f,d,p,v=[],[h,y]=oe(!1),g=0,m=()=>{var J,ue;return((ue=(J=e.block.options)==null?void 0:J.attachments)==null?void 0:ue.isEnabled)??PO.attachments.isEnabled},b=J=>{if(J.preventDefault(),!!m()&&(g++,g===1)){let ue=J.dataTransfer;ue&&ue.types&&(Array.from(ue.types).includes("Files")||Array.from(ue.types).includes("application/x-moz-file"))&&y(!0)}},E=J=>{J.preventDefault(),m()&&(g--,g<=0&&(g=0,y(!1)))},C=J=>{var ue;J.preventDefault(),m()&&(g=0,y(!1),(ue=J.dataTransfer)!=null&&ue.files&&L(J.dataTransfer.files))},x=J=>{J.preventDefault(),m()&&h()&&J.dataTransfer&&(J.dataTransfer.dropEffect="copy")},P=J=>r(J),N=()=>(f==null?void 0:f.value)!==""&&(f==null?void 0:f.reportValidity()),D=async()=>{if(u()==="started"&&p){p.stop();return}if(N()){let J;if(n().length>0){a(void 0);let ue=await op({files:n().map(k=>({file:k,input:{sessionId:e.context.sessionId,fileName:k.name}})),onUploadProgress:a});J=ue==null?void 0:ue.filter(tt)}e.onSubmit({type:"text",value:(f==null?void 0:f.value)??t(),attachments:J})}else f==null||f.focus()},R=J=>{J.key==="Enter"&&!J.shiftKey&&(J.preventDefault(),D())};et(()=>{!wt()&&f&&f.focus({preventScroll:!0}),window.addEventListener("dragenter",b),window.addEventListener("dragleave",E),window.addEventListener("dragover",x),window.addEventListener("drop",C)}),dt(()=>{window.removeEventListener("dragenter",b),window.removeEventListener("dragleave",E),window.removeEventListener("dragover",x),window.removeEventListener("drop",C)}),Tn(J=>{let{data:ue}=J;ue.command==="setInputValue"&&r(ue.value)});let M=J=>{J.preventDefault(),m()&&l(!0)},I=()=>l(!1),B=J=>{var ue;J.preventDefault(),J.stopPropagation(),l(!1),m()&&(ue=J.dataTransfer)!=null&&ue.files&&L(J.dataTransfer.files)},L=J=>{if(!m())return;let ue=Array.from(J).map(k=>vw({existingFiles:n(),newFile:k,params:{},onError:({description:be,title:Oe})=>{Dl.create({description:be,title:Oe})}})).filter(tt);ue.length!==0&&o(k=>[...ue,...k])},U=J=>{o(ue=>ue.filter((k,be)=>be!==J))},K=()=>{c("asking")},z=J=>{let ue,k=MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":"video/mp4";p=new MediaRecorder(J,{mimeType:k}),p.ondataavailable=be=>{be.data.size!==0&&v.push(be.data)},p.onstart=()=>{ue=Date.now()},p.onstop=async()=>{if(u()!=="started"||v.length===0)return;let be=Date.now()-ue,Oe=await(0,Ooe.fixWebmDuration)(new Blob(v,{type:k}),be),Te=new File([Oe],`rec-${e.block.id}-${Date.now()}.${k==="audio/webm"?"webm":"mp4"}`,{type:k});a(void 0);let Ke=(await op({files:[{file:Te,input:{sessionId:e.context.sessionId,fileName:Te.name}}],onUploadProgress:a})).filter(tt).map(je=>je.url);e.onSubmit({type:"recording",url:Ke[0]})},p.start(),c("started")},ae=()=>{p==null||p.stop(),c("stopped"),p=void 0,v=[]},ie=!!i(),O=(()=>{let J=RXe();return W(J,T(ve,{get when(){return m()},get children(){return T(Yne,{onNewFiles:L})}}),null),W(J,T($t,{get children(){return[T($e,{get when(){var ue,k;return!t()&&u()!=="started"&&((k=(ue=e.block.options)==null?void 0:ue.audioClip)==null?void 0:k.isEnabled)},get children(){return T(uo,{"on:click":K,"aria-label":"Record voice",get children(){return T(Qne,{})}})}}),T($e,{when:!0,get children(){return T(gi,{isDisabled:ie,get children(){var ue,k;return(k=(ue=e.block.options)==null?void 0:ue.labels)==null?void 0:k.button}})}})]}}),null),J})();return(()=>{let J=BXe();return W(J,T(ve,{get when(){return u()!=="started"},get children(){return T(ve,{get when(){return n().length},get children(){let ue=NXe();return W(ue,T(Mt,{get each(){return n()},children:(k,be)=>T(hw,{file:k,get uploadProgressPercent(){var Oe;return Ee(()=>!!i())()?Ee(()=>{var Te;return((Te=i())==null?void 0:Te.fileIndex)===be()})()?20:be()<(((Oe=i())==null?void 0:Oe.fileIndex)??0)?100:0:void 0},onRemoveClick:()=>U(be())})})),ue}})}}),null),W(J,T(hi,{onSubmit:D,customButton:O,class:"items-end ",get isInputDisabled(){return e.isInputDisabled},get hasError(){return e.hasError},get children(){let ue=koe();return ue.addEventListener("dragleave",I),ue.addEventListener("dragover",M),ue.addEventListener("drop",B),W(ue,T(Zne,{get recordingStatus(){return u()},get buttonsTheme(){var k;return(k=e.context.bot.theme.chat)==null?void 0:k.buttons},onRecordingConfirmed:z,onAbortRecording:ae}),null),W(ue,T(ve,{get when(){return u()!=="started"},get children(){let k=koe(),be=d;return typeof be=="function"?lt(be,k):d=k,W(k,T(Vne,{containerRef:d,ref(Oe){let Te=f;typeof Te=="function"?Te(Oe):f=Oe},onInput:P,onKeyDown:R,get value(){return t()},get placeholder(){var Oe,Te;return((Te=(Oe=e.block.options)==null?void 0:Oe.labels)==null?void 0:Te.placeholder)??PO.labels.placeholder}})),le(()=>we(k,Wt("flex gap-2 h-full max-h-[50px] items-center",n().length>0?"pl-5 py-2":""))),k}}),null),le(()=>we(ue,Wt("flex-col w-full relative gap-1",s()&&"filter brightness-95"))),ue}}),null),W(J,T(ve,{get when(){return h()},get children(){let ue=LXe(),k=ue.firstChild,be=k.firstChild;return W(be,T(Wne,{class:"w-16 h-16 text-green-500"})),ue}}),null),J})()};var Ioe=function(e){let t=function(n){mt(function(){let o=e();if(o==null){n.value=o;return}let i=n.value;(o===0&&i===""||o!=i)&&(n.value=o+"")})},r=function(n){if(n.validity.badInput)return e();if(n.value!="")return n.valueAsNumber};return[mr(e),t,r]};var Roe={labels:{button:Pn,placeholder:"Type a number..."},retryMessageContent:"\u26A0\uFE0F Please enter a valid number (digits only)."};var FXe=V('<input class="focus:outline-none bg-transparent flex-1 w-full" type="number">'),VO=e=>{let[t,r]=oe(e.defaultValue??""),[n,o,i]=Ioe(()=>t()),a,s=()=>(a==null?void 0:a.value)!==""&&(a==null?void 0:a.reportValidity()),l=()=>{s()?e.onSubmit({type:"text",value:(a==null?void 0:a.value)??t().toString()}):a==null||a.focus()},u=c=>{c.key==="Enter"&&(c.preventDefault(),l())};return Tn(c=>{let{data:f}=c;f.command==="setInputValue"&&r(f.value)}),et(()=>{!wt()&&a&&a.focus({preventScroll:!0})}),T(hi,{onSubmit:l,get buttonLabel(){var c,f;return(f=(c=e.block.options)==null?void 0:c.labels)==null?void 0:f.button},get children(){let c=FXe();c.$$keydown=u,c.$$input=d=>{r(i(d.currentTarget))},lt(o,c,()=>!0);let f=a;return typeof f=="function"?lt(f,c):a=c,c.style.setProperty("font-size","16px"),c.style.setProperty("appearance","auto"),c.value=n,le(d=>{var g,m,b,E,C;let p=((m=(g=e.block.options)==null?void 0:g.labels)==null?void 0:m.placeholder)??Roe.labels.placeholder,v=(b=e.block.options)==null?void 0:b.min,h=(E=e.block.options)==null?void 0:E.max,y=((C=e.block.options)==null?void 0:C.step)??"any";return p!==d._v$&&qe(c,"placeholder",d._v$=p),v!==d._v$2&&qe(c,"min",d._v$2=v),h!==d._v$3&&qe(c,"max",d._v$3=h),y!==d._v$4&&qe(c,"step",d._v$4=y),d},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),c}})};Yr(["input","keydown"]);var MXe=V('<input class="focus:outline-none bg-transparent flex-1 w-full" type="text">'),up=e=>{let[t,r]=Dr(e,["ref","onInput"]);return(()=>{let n=MXe();n.$$input=i=>t.onInput(i.currentTarget.value);let o=e.ref;return typeof o=="function"?lt(o,n):e.ref=n,n.style.setProperty("font-size","16px"),yt(n,r,!1,!1),n})()};Yr(["input"]);var Noe={labels:{button:Pn,placeholder:"Type your email..."},retryMessageContent:"\u26A0\uFE0F Invalid email format. Please enter a valid email address (e.g., example@domain.com)"};var HO=e=>{let[t,r]=oe(e.defaultValue??""),n,o=l=>r(l),i=()=>(n==null?void 0:n.value)!==""&&(n==null?void 0:n.reportValidity()),a=()=>{i()?e.onSubmit({type:"text",value:(n==null?void 0:n.value)??t()}):n==null||n.focus()},s=l=>{l.key==="Enter"&&(l.preventDefault(),a())};return Tn(l=>{let{data:u}=l;u.command==="setInputValue"&&r(u.value)}),et(()=>{!wt()&&n&&n.focus({preventScroll:!0})}),T(hi,{onSubmit:a,get buttonLabel(){var l,u;return(u=(l=e.block.options)==null?void 0:l.labels)==null?void 0:u.button},get isInputDisabled(){return e.isInputDisabled},get hasError(){return e.hasError},get children(){return T(up,{ref(l){let u=n;typeof u=="function"?u(l):n=l},type:"email",autocomplete:"email",get value(){return t()},get placeholder(){var l,u;return((u=(l=e.block.options)==null?void 0:l.labels)==null?void 0:u.placeholder)??Noe.labels.placeholder},onInput:o,onKeyDown:s})}})};var Loe={labels:{button:Pn,placeholder:"Type a URL..."},retryMessageContent:"\u26A0\uFE0F Invalid URL format. Please enter a complete URL starting with http:// or https:// (e.g., https://example.com)"};var WO=e=>{let[t,r]=oe(e.defaultValue??""),n,o=l=>{r(l)},i=()=>(n==null?void 0:n.value)!==""&&(n==null?void 0:n.reportValidity()),a=()=>{n&&!(n!=null&&n.value.startsWith("http"))&&(n.value=`https://${n.value}`),i()?e.onSubmit({type:"text",value:(n==null?void 0:n.value)??t()}):n==null||n.focus()},s=l=>{l.key==="Enter"&&(l.preventDefault(),a())};return Tn(l=>{let{data:u}=l;u.command==="setInputValue"&&r(u.value)}),et(()=>{!wt()&&n&&n.focus({preventScroll:!0})}),T(hi,{onSubmit:a,get buttonLabel(){var l,u;return(u=(l=e.block.options)==null?void 0:l.labels)==null?void 0:u.button},get isInputDisabled(){return e.isInputDisabled},get hasError(){return e.hasError},get children(){return T(up,{ref(l){let u=n;typeof u=="function"?u(l):n=l},get value(){return t()},get placeholder(){var l,u;return((u=(l=e.block.options)==null?void 0:l.labels)==null?void 0:u.placeholder)??Loe.labels.placeholder},onInput:o,onKeyDown:s,type:"url",autocomplete:"url"})}})};var $Xe=V('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2px" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9">'),Boe=e=>(()=>{let t=$Xe();return yt(t,e,!0,!0),t})();var cp=[{name:"International",flag:"\u{1F310}",code:"INT",dial_code:null},{name:"Afghanistan",flag:"\u{1F1E6}\u{1F1EB}",code:"AF",dial_code:"+93"},{name:"\xC5land Islands",flag:"\u{1F1E6}\u{1F1FD}",code:"AX",dial_code:"+358"},{name:"Albania",flag:"\u{1F1E6}\u{1F1F1}",code:"AL",dial_code:"+355"},{name:"Algeria",flag:"\u{1F1E9}\u{1F1FF}",code:"DZ",dial_code:"+213"},{name:"American Samoa",flag:"\u{1F1E6}\u{1F1F8}",code:"AS",dial_code:"+1684"},{name:"Andorra",flag:"\u{1F1E6}\u{1F1E9}",code:"AD",dial_code:"+376"},{name:"Angola",flag:"\u{1F1E6}\u{1F1F4}",code:"AO",dial_code:"+244"},{name:"Anguilla",flag:"\u{1F1E6}\u{1F1EE}",code:"AI",dial_code:"+1264"},{name:"Antarctica",flag:"\u{1F1E6}\u{1F1F6}",code:"AQ",dial_code:"+672"},{name:"Antigua and Barbuda",flag:"\u{1F1E6}\u{1F1EC}",code:"AG",dial_code:"+1268"},{name:"Argentina",flag:"\u{1F1E6}\u{1F1F7}",code:"AR",dial_code:"+54"},{name:"Armenia",flag:"\u{1F1E6}\u{1F1F2}",code:"AM",dial_code:"+374"},{name:"Aruba",flag:"\u{1F1E6}\u{1F1FC}",code:"AW",dial_code:"+297"},{name:"Australia",flag:"\u{1F1E6}\u{1F1FA}",code:"AU",dial_code:"+61"},{name:"Austria",flag:"\u{1F1E6}\u{1F1F9}",code:"AT",dial_code:"+43"},{name:"Azerbaijan",flag:"\u{1F1E6}\u{1F1FF}",code:"AZ",dial_code:"+994"},{name:"Bahamas",flag:"\u{1F1E7}\u{1F1F8}",code:"BS",dial_code:"+1242"},{name:"Bahrain",flag:"\u{1F1E7}\u{1F1ED}",code:"BH",dial_code:"+973"},{name:"Bangladesh",flag:"\u{1F1E7}\u{1F1E9}",code:"BD",dial_code:"+880"},{name:"Barbados",flag:"\u{1F1E7}\u{1F1E7}",code:"BB",dial_code:"+1246"},{name:"Belarus",flag:"\u{1F1E7}\u{1F1FE}",code:"BY",dial_code:"+375"},{name:"Belgium",flag:"\u{1F1E7}\u{1F1EA}",code:"BE",dial_code:"+32"},{name:"Belize",flag:"\u{1F1E7}\u{1F1FF}",code:"BZ",dial_code:"+501"},{name:"Benin",flag:"\u{1F1E7}\u{1F1EF}",code:"BJ",dial_code:"+229"},{name:"Bermuda",flag:"\u{1F1E7}\u{1F1F2}",code:"BM",dial_code:"+1441"},{name:"Bhutan",flag:"\u{1F1E7}\u{1F1F9}",code:"BT",dial_code:"+975"},{name:"Bolivia, Plurinational State of bolivia",flag:"\u{1F1E7}\u{1F1F4}",code:"BO",dial_code:"+591"},{name:"Bosnia and Herzegovina",flag:"\u{1F1E7}\u{1F1E6}",code:"BA",dial_code:"+387"},{name:"Botswana",flag:"\u{1F1E7}\u{1F1FC}",code:"BW",dial_code:"+267"},{name:"Bouvet Island",flag:"\u{1F1E7}\u{1F1FB}",code:"BV",dial_code:"+47"},{name:"Brazil",flag:"\u{1F1E7}\u{1F1F7}",code:"BR",dial_code:"+55"},{name:"British Indian Ocean Territory",flag:"\u{1F1EE}\u{1F1F4}",code:"IO",dial_code:"+246"},{name:"Brunei Darussalam",flag:"\u{1F1E7}\u{1F1F3}",code:"BN",dial_code:"+673"},{name:"Bulgaria",flag:"\u{1F1E7}\u{1F1EC}",code:"BG",dial_code:"+359"},{name:"Burkina Faso",flag:"\u{1F1E7}\u{1F1EB}",code:"BF",dial_code:"+226"},{name:"Burundi",flag:"\u{1F1E7}\u{1F1EE}",code:"BI",dial_code:"+257"},{name:"Cambodia",flag:"\u{1F1F0}\u{1F1ED}",code:"KH",dial_code:"+855"},{name:"Cameroon",flag:"\u{1F1E8}\u{1F1F2}",code:"CM",dial_code:"+237"},{name:"Canada",flag:"\u{1F1E8}\u{1F1E6}",code:"CA",dial_code:"+1"},{name:"Cape Verde",flag:"\u{1F1E8}\u{1F1FB}",code:"CV",dial_code:"+238"},{name:"Cayman Islands",flag:"\u{1F1F0}\u{1F1FE}",code:"KY",dial_code:"+345"},{name:"Central African Republic",flag:"\u{1F1E8}\u{1F1EB}",code:"CF",dial_code:"+236"},{name:"Chad",flag:"\u{1F1F9}\u{1F1E9}",code:"TD",dial_code:"+235"},{name:"Chile",flag:"\u{1F1E8}\u{1F1F1}",code:"CL",dial_code:"+56"},{name:"China",flag:"\u{1F1E8}\u{1F1F3}",code:"CN",dial_code:"+86"},{name:"Christmas Island",flag:"\u{1F1E8}\u{1F1FD}",code:"CX",dial_code:"+61"},{name:"Cocos (Keeling) Islands",flag:"\u{1F1E8}\u{1F1E8}",code:"CC",dial_code:"+61"},{name:"Colombia",flag:"\u{1F1E8}\u{1F1F4}",code:"CO",dial_code:"+57"},{name:"Comoros",flag:"\u{1F1F0}\u{1F1F2}",code:"KM",dial_code:"+269"},{name:"Congo",flag:"\u{1F1E8}\u{1F1EC}",code:"CG",dial_code:"+242"},{name:"Congo, The Democratic Republic of the Congo",flag:"\u{1F1E8}\u{1F1E9}",code:"CD",dial_code:"+243"},{name:"Cook Islands",flag:"\u{1F1E8}\u{1F1F0}",code:"CK",dial_code:"+682"},{name:"Costa Rica",flag:"\u{1F1E8}\u{1F1F7}",code:"CR",dial_code:"+506"},{name:"Cote d'Ivoire",flag:"\u{1F1E8}\u{1F1EE}",code:"CI",dial_code:"+225"},{name:"Croatia",flag:"\u{1F1ED}\u{1F1F7}",code:"HR",dial_code:"+385"},{name:"Cuba",flag:"\u{1F1E8}\u{1F1FA}",code:"CU",dial_code:"+53"},{name:"Cyprus",flag:"\u{1F1E8}\u{1F1FE}",code:"CY",dial_code:"+357"},{name:"Czech Republic",flag:"\u{1F1E8}\u{1F1FF}",code:"CZ",dial_code:"+420"},{name:"Denmark",flag:"\u{1F1E9}\u{1F1F0}",code:"DK",dial_code:"+45"},{name:"Djibouti",flag:"\u{1F1E9}\u{1F1EF}",code:"DJ",dial_code:"+253"},{name:"Dominica",flag:"\u{1F1E9}\u{1F1F2}",code:"DM",dial_code:"+1767"},{name:"Dominican Republic",flag:"\u{1F1E9}\u{1F1F4}",code:"DO",dial_code:"+1849"},{name:"Dominican Republic",flag:"\u{1F1E9}\u{1F1F4}",code:"DO",dial_code:"+1829"},{name:"Dominican Republic",flag:"\u{1F1E9}\u{1F1F4}",code:"DO",dial_code:"+1809"},{name:"Ecuador",flag:"\u{1F1EA}\u{1F1E8}",code:"EC",dial_code:"+593"},{name:"Egypt",flag:"\u{1F1EA}\u{1F1EC}",code:"EG",dial_code:"+20"},{name:"El Salvador",flag:"\u{1F1F8}\u{1F1FB}",code:"SV",dial_code:"+503"},{name:"Equatorial Guinea",flag:"\u{1F1EC}\u{1F1F6}",code:"GQ",dial_code:"+240"},{name:"Eritrea",flag:"\u{1F1EA}\u{1F1F7}",code:"ER",dial_code:"+291"},{name:"Estonia",flag:"\u{1F1EA}\u{1F1EA}",code:"EE",dial_code:"+372"},{name:"Ethiopia",flag:"\u{1F1EA}\u{1F1F9}",code:"ET",dial_code:"+251"},{name:"Falkland Islands (Malvinas)",flag:"\u{1F1EB}\u{1F1F0}",code:"FK",dial_code:"+500"},{name:"Faroe Islands",flag:"\u{1F1EB}\u{1F1F4}",code:"FO",dial_code:"+298"},{name:"Fiji",flag:"\u{1F1EB}\u{1F1EF}",code:"FJ",dial_code:"+679"},{name:"Finland",flag:"\u{1F1EB}\u{1F1EE}",code:"FI",dial_code:"+358"},{name:"France",flag:"\u{1F1EB}\u{1F1F7}",code:"FR",dial_code:"+33"},{name:"French Guiana",flag:"\u{1F1EC}\u{1F1EB}",code:"GF",dial_code:"+594"},{name:"French Polynesia",flag:"\u{1F1F5}\u{1F1EB}",code:"PF",dial_code:"+689"},{name:"French Southern Territories",flag:"\u{1F1F9}\u{1F1EB}",code:"TF",dial_code:"+262"},{name:"Gabon",flag:"\u{1F1EC}\u{1F1E6}",code:"GA",dial_code:"+241"},{name:"Gambia",flag:"\u{1F1EC}\u{1F1F2}",code:"GM",dial_code:"+220"},{name:"Georgia",flag:"\u{1F1EC}\u{1F1EA}",code:"GE",dial_code:"+995"},{name:"Germany",flag:"\u{1F1E9}\u{1F1EA}",code:"DE",dial_code:"+49"},{name:"Ghana",flag:"\u{1F1EC}\u{1F1ED}",code:"GH",dial_code:"+233"},{name:"Gibraltar",flag:"\u{1F1EC}\u{1F1EE}",code:"GI",dial_code:"+350"},{name:"Greece",flag:"\u{1F1EC}\u{1F1F7}",code:"GR",dial_code:"+30"},{name:"Greenland",flag:"\u{1F1EC}\u{1F1F1}",code:"GL",dial_code:"+299"},{name:"Grenada",flag:"\u{1F1EC}\u{1F1E9}",code:"GD",dial_code:"+1473"},{name:"Guadeloupe",flag:"\u{1F1EC}\u{1F1F5}",code:"GP",dial_code:"+590"},{name:"Guam",flag:"\u{1F1EC}\u{1F1FA}",code:"GU",dial_code:"+1671"},{name:"Guatemala",flag:"\u{1F1EC}\u{1F1F9}",code:"GT",dial_code:"+502"},{name:"Guernsey",flag:"\u{1F1EC}\u{1F1EC}",code:"GG",dial_code:"+44"},{name:"Guinea",flag:"\u{1F1EC}\u{1F1F3}",code:"GN",dial_code:"+224"},{name:"Guinea-Bissau",flag:"\u{1F1EC}\u{1F1FC}",code:"GW",dial_code:"+245"},{name:"Guyana",flag:"\u{1F1EC}\u{1F1FE}",code:"GY",dial_code:"+592"},{name:"Haiti",flag:"\u{1F1ED}\u{1F1F9}",code:"HT",dial_code:"+509"},{name:"Heard Island and Mcdonald Islands",flag:"\u{1F1ED}\u{1F1F2}",code:"HM",dial_code:"+672"},{name:"Holy See (Vatican City State)",flag:"\u{1F1FB}\u{1F1E6}",code:"VA",dial_code:"+379"},{name:"Honduras",flag:"\u{1F1ED}\u{1F1F3}",code:"HN",dial_code:"+504"},{name:"Hong Kong",flag:"\u{1F1ED}\u{1F1F0}",code:"HK",dial_code:"+852"},{name:"Hungary",flag:"\u{1F1ED}\u{1F1FA}",code:"HU",dial_code:"+36"},{name:"Iceland",flag:"\u{1F1EE}\u{1F1F8}",code:"IS",dial_code:"+354"},{name:"India",flag:"\u{1F1EE}\u{1F1F3}",code:"IN",dial_code:"+91"},{name:"Indonesia",flag:"\u{1F1EE}\u{1F1E9}",code:"ID",dial_code:"+62"},{name:"Iran, Islamic Republic of Persian Gulf",flag:"\u{1F1EE}\u{1F1F7}",code:"IR",dial_code:"+98"},{name:"Iraq",flag:"\u{1F1EE}\u{1F1F6}",code:"IQ",dial_code:"+964"},{name:"Ireland",flag:"\u{1F1EE}\u{1F1EA}",code:"IE",dial_code:"+353"},{name:"Isle of Man",flag:"\u{1F1EE}\u{1F1F2}",code:"IM",dial_code:"+44"},{name:"Israel",flag:"\u{1F1EE}\u{1F1F1}",code:"IL",dial_code:"+972"},{name:"Italy",flag:"\u{1F1EE}\u{1F1F9}",code:"IT",dial_code:"+39"},{name:"Jamaica",flag:"\u{1F1EF}\u{1F1F2}",code:"JM",dial_code:"+1876"},{name:"Japan",flag:"\u{1F1EF}\u{1F1F5}",code:"JP",dial_code:"+81"},{name:"Jersey",flag:"\u{1F1EF}\u{1F1EA}",code:"JE",dial_code:"+44"},{name:"Jordan",flag:"\u{1F1EF}\u{1F1F4}",code:"JO",dial_code:"+962"},{name:"Kazakhstan",flag:"\u{1F1F0}\u{1F1FF}",code:"KZ",dial_code:"+7"},{name:"Kenya",flag:"\u{1F1F0}\u{1F1EA}",code:"KE",dial_code:"+254"},{name:"Kiribati",flag:"\u{1F1F0}\u{1F1EE}",code:"KI",dial_code:"+686"},{name:"Korea, Democratic People's Republic of Korea",flag:"\u{1F1F0}\u{1F1F5}",code:"KP",dial_code:"+850"},{name:"Korea, Republic of South Korea",flag:"\u{1F1F0}\u{1F1F7}",code:"KR",dial_code:"+82"},{name:"Kosovo",flag:"\u{1F1FD}\u{1F1F0}",code:"XK",dial_code:"+383"},{name:"Kuwait",flag:"\u{1F1F0}\u{1F1FC}",code:"KW",dial_code:"+965"},{name:"Kyrgyzstan",flag:"\u{1F1F0}\u{1F1EC}",code:"KG",dial_code:"+996"},{name:"Laos",flag:"\u{1F1F1}\u{1F1E6}",code:"LA",dial_code:"+856"},{name:"Latvia",flag:"\u{1F1F1}\u{1F1FB}",code:"LV",dial_code:"+371"},{name:"Lebanon",flag:"\u{1F1F1}\u{1F1E7}",code:"LB",dial_code:"+961"},{name:"Lesotho",flag:"\u{1F1F1}\u{1F1F8}",code:"LS",dial_code:"+266"},{name:"Liberia",flag:"\u{1F1F1}\u{1F1F7}",code:"LR",dial_code:"+231"},{name:"Libyan Arab Jamahiriya",flag:"\u{1F1F1}\u{1F1FE}",code:"LY",dial_code:"+218"},{name:"Liechtenstein",flag:"\u{1F1F1}\u{1F1EE}",code:"LI",dial_code:"+423"},{name:"Lithuania",flag:"\u{1F1F1}\u{1F1F9}",code:"LT",dial_code:"+370"},{name:"Luxembourg",flag:"\u{1F1F1}\u{1F1FA}",code:"LU",dial_code:"+352"},{name:"Macao",flag:"\u{1F1F2}\u{1F1F4}",code:"MO",dial_code:"+853"},{name:"Macedonia",flag:"\u{1F1F2}\u{1F1F0}",code:"MK",dial_code:"+389"},{name:"Madagascar",flag:"\u{1F1F2}\u{1F1EC}",code:"MG",dial_code:"+261"},{name:"Malawi",flag:"\u{1F1F2}\u{1F1FC}",code:"MW",dial_code:"+265"},{name:"Malaysia",flag:"\u{1F1F2}\u{1F1FE}",code:"MY",dial_code:"+60"},{name:"Maldives",flag:"\u{1F1F2}\u{1F1FB}",code:"MV",dial_code:"+960"},{name:"Mali",flag:"\u{1F1F2}\u{1F1F1}",code:"ML",dial_code:"+223"},{name:"Malta",flag:"\u{1F1F2}\u{1F1F9}",code:"MT",dial_code:"+356"},{name:"Marshall Islands",flag:"\u{1F1F2}\u{1F1ED}",code:"MH",dial_code:"+692"},{name:"Martinique",flag:"\u{1F1F2}\u{1F1F6}",code:"MQ",dial_code:"+596"},{name:"Mauritania",flag:"\u{1F1F2}\u{1F1F7}",code:"MR",dial_code:"+222"},{name:"Mauritius",flag:"\u{1F1F2}\u{1F1FA}",code:"MU",dial_code:"+230"},{name:"Mayotte",flag:"\u{1F1FE}\u{1F1F9}",code:"YT",dial_code:"+262"},{name:"Mexico",flag:"\u{1F1F2}\u{1F1FD}",code:"MX",dial_code:"+52"},{name:"Micronesia, Federated States of Micronesia",flag:"\u{1F1EB}\u{1F1F2}",code:"FM",dial_code:"+691"},{name:"Moldova",flag:"\u{1F1F2}\u{1F1E9}",code:"MD",dial_code:"+373"},{name:"Monaco",flag:"\u{1F1F2}\u{1F1E8}",code:"MC",dial_code:"+377"},{name:"Mongolia",flag:"\u{1F1F2}\u{1F1F3}",code:"MN",dial_code:"+976"},{name:"Montenegro",flag:"\u{1F1F2}\u{1F1EA}",code:"ME",dial_code:"+382"},{name:"Montserrat",flag:"\u{1F1F2}\u{1F1F8}",code:"MS",dial_code:"+1664"},{name:"Morocco",flag:"\u{1F1F2}\u{1F1E6}",code:"MA",dial_code:"+212"},{name:"Mozambique",flag:"\u{1F1F2}\u{1F1FF}",code:"MZ",dial_code:"+258"},{name:"Myanmar",flag:"\u{1F1F2}\u{1F1F2}",code:"MM",dial_code:"+95"},{name:"Namibia",flag:"\u{1F1F3}\u{1F1E6}",code:"NA",dial_code:"+264"},{name:"Nauru",flag:"\u{1F1F3}\u{1F1F7}",code:"NR",dial_code:"+674"},{name:"Nepal",flag:"\u{1F1F3}\u{1F1F5}",code:"NP",dial_code:"+977"},{name:"Netherlands",flag:"\u{1F1F3}\u{1F1F1}",code:"NL",dial_code:"+31"},{name:"Netherlands Antilles",flag:"",code:"AN",dial_code:"+599"},{name:"New Caledonia",flag:"\u{1F1F3}\u{1F1E8}",code:"NC",dial_code:"+687"},{name:"New Zealand",flag:"\u{1F1F3}\u{1F1FF}",code:"NZ",dial_code:"+64"},{name:"Nicaragua",flag:"\u{1F1F3}\u{1F1EE}",code:"NI",dial_code:"+505"},{name:"Niger",flag:"\u{1F1F3}\u{1F1EA}",code:"NE",dial_code:"+227"},{name:"Nigeria",flag:"\u{1F1F3}\u{1F1EC}",code:"NG",dial_code:"+234"},{name:"Niue",flag:"\u{1F1F3}\u{1F1FA}",code:"NU",dial_code:"+683"},{name:"Norfolk Island",flag:"\u{1F1F3}\u{1F1EB}",code:"NF",dial_code:"+672"},{name:"Northern Mariana Islands",flag:"\u{1F1F2}\u{1F1F5}",code:"MP",dial_code:"+1670"},{name:"Norway",flag:"\u{1F1F3}\u{1F1F4}",code:"NO",dial_code:"+47"},{name:"Oman",flag:"\u{1F1F4}\u{1F1F2}",code:"OM",dial_code:"+968"},{name:"Pakistan",flag:"\u{1F1F5}\u{1F1F0}",code:"PK",dial_code:"+92"},{name:"Palau",flag:"\u{1F1F5}\u{1F1FC}",code:"PW",dial_code:"+680"},{name:"Palestinian Territory, Occupied",flag:"\u{1F1F5}\u{1F1F8}",code:"PS",dial_code:"+970"},{name:"Panama",flag:"\u{1F1F5}\u{1F1E6}",code:"PA",dial_code:"+507"},{name:"Papua New Guinea",flag:"\u{1F1F5}\u{1F1EC}",code:"PG",dial_code:"+675"},{name:"Paraguay",flag:"\u{1F1F5}\u{1F1FE}",code:"PY",dial_code:"+595"},{name:"Peru",flag:"\u{1F1F5}\u{1F1EA}",code:"PE",dial_code:"+51"},{name:"Philippines",flag:"\u{1F1F5}\u{1F1ED}",code:"PH",dial_code:"+63"},{name:"Pitcairn",flag:"\u{1F1F5}\u{1F1F3}",code:"PN",dial_code:"+64"},{name:"Poland",flag:"\u{1F1F5}\u{1F1F1}",code:"PL",dial_code:"+48"},{name:"Portugal",flag:"\u{1F1F5}\u{1F1F9}",code:"PT",dial_code:"+351"},{name:"Puerto Rico",flag:"\u{1F1F5}\u{1F1F7}",code:"PR",dial_code:"+1939"},{name:"Qatar",flag:"\u{1F1F6}\u{1F1E6}",code:"QA",dial_code:"+974"},{name:"Romania",flag:"\u{1F1F7}\u{1F1F4}",code:"RO",dial_code:"+40"},{name:"Russia",flag:"\u{1F1F7}\u{1F1FA}",code:"RU",dial_code:"+7"},{name:"Rwanda",flag:"\u{1F1F7}\u{1F1FC}",code:"RW",dial_code:"+250"},{name:"Reunion",flag:"\u{1F1F7}\u{1F1EA}",code:"RE",dial_code:"+262"},{name:"Saint Barthelemy",flag:"\u{1F1E7}\u{1F1F1}",code:"BL",dial_code:"+590"},{name:"Saint Helena, Ascension and Tristan Da Cunha",flag:"\u{1F1F8}\u{1F1ED}",code:"SH",dial_code:"+290"},{name:"Saint Kitts and Nevis",flag:"\u{1F1F0}\u{1F1F3}",code:"KN",dial_code:"+1869"},{name:"Saint Lucia",flag:"\u{1F1F1}\u{1F1E8}",code:"LC",dial_code:"+1758"},{name:"Saint Martin",flag:"\u{1F1F2}\u{1F1EB}",code:"MF",dial_code:"+590"},{name:"Saint Pierre and Miquelon",flag:"\u{1F1F5}\u{1F1F2}",code:"PM",dial_code:"+508"},{name:"Saint Vincent and the Grenadines",flag:"\u{1F1FB}\u{1F1E8}",code:"VC",dial_code:"+1784"},{name:"Samoa",flag:"\u{1F1FC}\u{1F1F8}",code:"WS",dial_code:"+685"},{name:"San Marino",flag:"\u{1F1F8}\u{1F1F2}",code:"SM",dial_code:"+378"},{name:"Sao Tome and Principe",flag:"\u{1F1F8}\u{1F1F9}",code:"ST",dial_code:"+239"},{name:"Saudi Arabia",flag:"\u{1F1F8}\u{1F1E6}",code:"SA",dial_code:"+966"},{name:"Senegal",flag:"\u{1F1F8}\u{1F1F3}",code:"SN",dial_code:"+221"},{name:"Serbia",flag:"\u{1F1F7}\u{1F1F8}",code:"RS",dial_code:"+381"},{name:"Seychelles",flag:"\u{1F1F8}\u{1F1E8}",code:"SC",dial_code:"+248"},{name:"Sierra Leone",flag:"\u{1F1F8}\u{1F1F1}",code:"SL",dial_code:"+232"},{name:"Singapore",flag:"\u{1F1F8}\u{1F1EC}",code:"SG",dial_code:"+65"},{name:"Slovakia",flag:"\u{1F1F8}\u{1F1F0}",code:"SK",dial_code:"+421"},{name:"Slovenia",flag:"\u{1F1F8}\u{1F1EE}",code:"SI",dial_code:"+386"},{name:"Solomon Islands",flag:"\u{1F1F8}\u{1F1E7}",code:"SB",dial_code:"+677"},{name:"Somalia",flag:"\u{1F1F8}\u{1F1F4}",code:"SO",dial_code:"+252"},{name:"South Africa",flag:"\u{1F1FF}\u{1F1E6}",code:"ZA",dial_code:"+27"},{name:"South Sudan",flag:"\u{1F1F8}\u{1F1F8}",code:"SS",dial_code:"+211"},{name:"South Georgia and the South Sandwich Islands",flag:"\u{1F1EC}\u{1F1F8}",code:"GS",dial_code:"+500"},{name:"Spain",flag:"\u{1F1EA}\u{1F1F8}",code:"ES",dial_code:"+34"},{name:"Sri Lanka",flag:"\u{1F1F1}\u{1F1F0}",code:"LK",dial_code:"+94"},{name:"Sudan",flag:"\u{1F1F8}\u{1F1E9}",code:"SD",dial_code:"+249"},{name:"Suriname",flag:"\u{1F1F8}\u{1F1F7}",code:"SR",dial_code:"+597"},{name:"Svalbard and Jan Mayen",flag:"\u{1F1F8}\u{1F1EF}",code:"SJ",dial_code:"+47"},{name:"Swaziland",flag:"\u{1F1F8}\u{1F1FF}",code:"SZ",dial_code:"+268"},{name:"Sweden",flag:"\u{1F1F8}\u{1F1EA}",code:"SE",dial_code:"+46"},{name:"Switzerland",flag:"\u{1F1E8}\u{1F1ED}",code:"CH",dial_code:"+41"},{name:"Syrian Arab Republic",flag:"\u{1F1F8}\u{1F1FE}",code:"SY",dial_code:"+963"},{name:"Taiwan",flag:"\u{1F1F9}\u{1F1FC}",code:"TW",dial_code:"+886"},{name:"Tajikistan",flag:"\u{1F1F9}\u{1F1EF}",code:"TJ",dial_code:"+992"},{name:"Tanzania, United Republic of Tanzania",flag:"\u{1F1F9}\u{1F1FF}",code:"TZ",dial_code:"+255"},{name:"Thailand",flag:"\u{1F1F9}\u{1F1ED}",code:"TH",dial_code:"+66"},{name:"Timor-Leste",flag:"\u{1F1F9}\u{1F1F1}",code:"TL",dial_code:"+670"},{name:"Togo",flag:"\u{1F1F9}\u{1F1EC}",code:"TG",dial_code:"+228"},{name:"Tokelau",flag:"\u{1F1F9}\u{1F1F0}",code:"TK",dial_code:"+690"},{name:"Tonga",flag:"\u{1F1F9}\u{1F1F4}",code:"TO",dial_code:"+676"},{name:"Trinidad and Tobago",flag:"\u{1F1F9}\u{1F1F9}",code:"TT",dial_code:"+1868"},{name:"Tunisia",flag:"\u{1F1F9}\u{1F1F3}",code:"TN",dial_code:"+216"},{name:"Turkey",flag:"\u{1F1F9}\u{1F1F7}",code:"TR",dial_code:"+90"},{name:"Turkmenistan",flag:"\u{1F1F9}\u{1F1F2}",code:"TM",dial_code:"+993"},{name:"Turks and Caicos Islands",flag:"\u{1F1F9}\u{1F1E8}",code:"TC",dial_code:"+1649"},{name:"Tuvalu",flag:"\u{1F1F9}\u{1F1FB}",code:"TV",dial_code:"+688"},{name:"Uganda",flag:"\u{1F1FA}\u{1F1EC}",code:"UG",dial_code:"+256"},{name:"Ukraine",flag:"\u{1F1FA}\u{1F1E6}",code:"UA",dial_code:"+380"},{name:"United Arab Emirates",flag:"\u{1F1E6}\u{1F1EA}",code:"AE",dial_code:"+971"},{name:"United Kingdom",flag:"\u{1F1EC}\u{1F1E7}",code:"GB",dial_code:"+44"},{name:"United States",flag:"\u{1F1FA}\u{1F1F8}",code:"US",dial_code:"+1"},{name:"Uruguay",flag:"\u{1F1FA}\u{1F1FE}",code:"UY",dial_code:"+598"},{name:"Uzbekistan",flag:"\u{1F1FA}\u{1F1FF}",code:"UZ",dial_code:"+998"},{name:"Vanuatu",flag:"\u{1F1FB}\u{1F1FA}",code:"VU",dial_code:"+678"},{name:"Venezuela, Bolivarian Republic of Venezuela",flag:"\u{1F1FB}\u{1F1EA}",code:"VE",dial_code:"+58"},{name:"Vietnam",flag:"\u{1F1FB}\u{1F1F3}",code:"VN",dial_code:"+84"},{name:"Virgin Islands, British",flag:"\u{1F1FB}\u{1F1EC}",code:"VG",dial_code:"+1284"},{name:"Virgin Islands, U.S.",flag:"\u{1F1FB}\u{1F1EE}",code:"VI",dial_code:"+1340"},{name:"Wallis and Futuna",flag:"\u{1F1FC}\u{1F1EB}",code:"WF",dial_code:"+681"},{name:"Yemen",flag:"\u{1F1FE}\u{1F1EA}",code:"YE",dial_code:"+967"},{name:"Zambia",flag:"\u{1F1FF}\u{1F1F2}",code:"ZM",dial_code:"+260"},{name:"Zimbabwe",flag:"\u{1F1FF}\u{1F1FC}",code:"ZW",dial_code:"+263"}];var Foe={labels:{button:Pn,placeholder:"Type your phone number..."},retryMessageContent:"\u26A0\uFE0F Invalid phone number. Please enter your phone number with country code (e.g., +1234567890)"};var UXe=V('<div class="input__field--phone relative flex justify-center items-center"><div class="pl-2 pr-1 flex items-center gap-2"><span></span></div><select class="absolute top-0 left-0 w-full h-full cursor-pointer opacity-0">'),jXe=V("<option> "),GO=e=>{let[t,r]=oe(Ei(e.defaultCountryCode)?"INT":e.defaultCountryCode),[n,o]=oe(e.defaultValue??""),i,a=f=>{o(f),(f===""||f==="+")&&t()!=="INT"&&r("INT");let d=(f==null?void 0:f.startsWith("+"))&&f.length>2&&cp.reduce((p,v)=>!(v!=null&&v.dial_code)||p!==null&&!p.dial_code?p:f!=null&&f.startsWith(v.dial_code)&&v.dial_code.length>((p==null?void 0:p.dial_code.length)??0)?v:p,null);d&&r(d.code)},s=()=>(i==null?void 0:i.value)!==""&&(i==null?void 0:i.reportValidity()),l=()=>{var d;let f=(d=cp.find(p=>p.code===t()))==null?void 0:d.dial_code;if(s()){let p=(i==null?void 0:i.value)??n();e.onSubmit({type:"text",value:p.startsWith("+")?p:`${f??""}${p}`})}else i==null||i.focus()},u=f=>{f.key==="Enter"&&(f.preventDefault(),l())},c=f=>{var v;let d=f.currentTarget.value;r(d);let p=(v=cp.find(h=>h.code===d))==null?void 0:v.dial_code;n()===""&&p&&o(p),i==null||i.focus()};return Tn(f=>{let{data:d}=f;d.command==="setInputValue"&&o(d.value)}),et(()=>{!wt()&&i&&i.focus({preventScroll:!0})}),T(hi,{onSubmit:l,get buttonLabel(){var f;return(f=e.labels)==null?void 0:f.button},get isInputDisabled(){return e.isInputDisabled},get hasError(){return e.hasError},get children(){return[(()=>{let f=UXe(),d=f.firstChild,p=d.firstChild,v=d.nextSibling;return W(p,()=>{var h;return(h=cp.find(y=>t()===y.code))==null?void 0:h.flag}),W(d,T(Boe,{class:"w-3"}),null),v.addEventListener("change",c),W(v,T(Mt,{each:cp,children:h=>(()=>{let y=jXe(),g=y.firstChild;return W(y,()=>h.name,g),W(y,()=>h.dial_code?`(${h.dial_code})`:"",null),le(()=>y.selected=h.code===t()),le(()=>y.value=h.code),y})()})),f})(),T(up,{ref(f){let d=i;typeof d=="function"?d(f):i=f},type:"tel",get value(){return n()},onInput:a,onKeyDown:u,get placeholder(){var f;return((f=e.labels)==null?void 0:f.placeholder)??Foe.labels.placeholder},get autofocus(){return!wt()}})]}})};var sv={hasTime:!1,isRange:!1,labels:{button:Pn,from:"From:",to:"To:"},format:"dd/MM/yyyy",formatWithTime:"dd/MM/yyyy HH:mm",retryMessageContent:"\u26A0\uFE0F Invalid date format. Please enter the date in format: DD/MM/YYYY"};function dp(e){"@babel/helpers - typeof";return dp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dp(e)}function co(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Nt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Cr(e){Nt(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||dp(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function KO(e,t){Nt(2,arguments);var r=Cr(e).getTime(),n=co(t);return new Date(r+n)}var qXe={};function kl(){return qXe}function YO(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function XO(e){return Nt(1,arguments),e instanceof Date||dp(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ZO(e){if(Nt(1,arguments),!XO(e)&&typeof e!="number")return!1;var t=Cr(e);return!isNaN(Number(t))}function QO(e,t){Nt(2,arguments);var r=co(t);return KO(e,-r)}var zXe=864e5;function JO(e){Nt(1,arguments);var t=Cr(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),o=r-n;return Math.floor(o/zXe)+1}function Ol(e){Nt(1,arguments);var t=1,r=Cr(e),n=r.getUTCDay(),o=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-o),r.setUTCHours(0,0,0,0),r}function lv(e){Nt(1,arguments);var t=Cr(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var o=Ol(n),i=new Date(0);i.setUTCFullYear(r,0,4),i.setUTCHours(0,0,0,0);var a=Ol(i);return t.getTime()>=o.getTime()?r+1:t.getTime()>=a.getTime()?r:r-1}function eI(e){Nt(1,arguments);var t=lv(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Ol(r);return n}var VXe=6048e5;function tI(e){Nt(1,arguments);var t=Cr(e),r=Ol(t).getTime()-eI(t).getTime();return Math.round(r/VXe)+1}function Il(e,t){var r,n,o,i,a,s,l,u;Nt(1,arguments);var c=kl(),f=co((r=(n=(o=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&o!==void 0?o:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Cr(e),p=d.getUTCDay(),v=(p<f?7:0)+p-f;return d.setUTCDate(d.getUTCDate()-v),d.setUTCHours(0,0,0,0),d}function uv(e,t){var r,n,o,i,a,s,l,u;Nt(1,arguments);var c=Cr(e),f=c.getUTCFullYear(),d=kl(),p=co((r=(n=(o=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&o!==void 0?o:d.firstWeekContainsDate)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(f+1,0,p),v.setUTCHours(0,0,0,0);var h=Il(v,t),y=new Date(0);y.setUTCFullYear(f,0,p),y.setUTCHours(0,0,0,0);var g=Il(y,t);return c.getTime()>=h.getTime()?f+1:c.getTime()>=g.getTime()?f:f-1}function rI(e,t){var r,n,o,i,a,s,l,u;Nt(1,arguments);var c=kl(),f=co((r=(n=(o=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&o!==void 0?o:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=uv(e,t),p=new Date(0);p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0);var v=Il(p,t);return v}var HXe=6048e5;function nI(e,t){Nt(1,arguments);var r=Cr(e),n=Il(r,t).getTime()-rI(r,t).getTime();return Math.round(n/HXe)+1}function Rt(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var WXe={y:function(t,r){var n=t.getUTCFullYear(),o=n>0?n:1-n;return Rt(r==="yy"?o%100:o,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):Rt(n+1,2)},d:function(t,r){return Rt(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return Rt(t.getUTCHours()%12||12,r.length)},H:function(t,r){return Rt(t.getUTCHours(),r.length)},m:function(t,r){return Rt(t.getUTCMinutes(),r.length)},s:function(t,r){return Rt(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,o=t.getUTCMilliseconds(),i=Math.floor(o*Math.pow(10,n-3));return Rt(i,r.length)}},xs=WXe;var fp={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},GXe={G:function(t,r,n){var o=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(o,{width:"abbreviated"});case"GGGGG":return n.era(o,{width:"narrow"});case"GGGG":default:return n.era(o,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var o=t.getUTCFullYear(),i=o>0?o:1-o;return n.ordinalNumber(i,{unit:"year"})}return xs.y(t,r)},Y:function(t,r,n,o){var i=uv(t,o),a=i>0?i:1-i;if(r==="YY"){var s=a%100;return Rt(s,2)}return r==="Yo"?n.ordinalNumber(a,{unit:"year"}):Rt(a,r.length)},R:function(t,r){var n=lv(t);return Rt(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return Rt(n,r.length)},Q:function(t,r,n){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(o);case"QQ":return Rt(o,2);case"Qo":return n.ordinalNumber(o,{unit:"quarter"});case"QQQ":return n.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,r,n){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(o);case"qq":return Rt(o,2);case"qo":return n.ordinalNumber(o,{unit:"quarter"});case"qqq":return n.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,r,n){var o=t.getUTCMonth();switch(r){case"M":case"MM":return xs.M(t,r);case"Mo":return n.ordinalNumber(o+1,{unit:"month"});case"MMM":return n.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(o,{width:"wide",context:"formatting"})}},L:function(t,r,n){var o=t.getUTCMonth();switch(r){case"L":return String(o+1);case"LL":return Rt(o+1,2);case"Lo":return n.ordinalNumber(o+1,{unit:"month"});case"LLL":return n.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(o,{width:"wide",context:"standalone"})}},w:function(t,r,n,o){var i=nI(t,o);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):Rt(i,r.length)},I:function(t,r,n){var o=tI(t);return r==="Io"?n.ordinalNumber(o,{unit:"week"}):Rt(o,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):xs.d(t,r)},D:function(t,r,n){var o=JO(t);return r==="Do"?n.ordinalNumber(o,{unit:"dayOfYear"}):Rt(o,r.length)},E:function(t,r,n){var o=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(o,{width:"short",context:"formatting"});case"EEEE":default:return n.day(o,{width:"wide",context:"formatting"})}},e:function(t,r,n,o){var i=t.getUTCDay(),a=(i-o.weekStartsOn+8)%7||7;switch(r){case"e":return String(a);case"ee":return Rt(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,r,n,o){var i=t.getUTCDay(),a=(i-o.weekStartsOn+8)%7||7;switch(r){case"c":return String(a);case"cc":return Rt(a,r.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,r,n){var o=t.getUTCDay(),i=o===0?7:o;switch(r){case"i":return String(i);case"ii":return Rt(i,r.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(o,{width:"short",context:"formatting"});case"iiii":default:return n.day(o,{width:"wide",context:"formatting"})}},a:function(t,r,n){var o=t.getUTCHours(),i=o/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,r,n){var o=t.getUTCHours(),i;switch(o===12?i=fp.noon:o===0?i=fp.midnight:i=o/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,r,n){var o=t.getUTCHours(),i;switch(o>=17?i=fp.evening:o>=12?i=fp.afternoon:o>=4?i=fp.morning:i=fp.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var o=t.getUTCHours()%12;return o===0&&(o=12),n.ordinalNumber(o,{unit:"hour"})}return xs.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):xs.H(t,r)},K:function(t,r,n){var o=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(o,{unit:"hour"}):Rt(o,r.length)},k:function(t,r,n){var o=t.getUTCHours();return o===0&&(o=24),r==="ko"?n.ordinalNumber(o,{unit:"hour"}):Rt(o,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):xs.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):xs.s(t,r)},S:function(t,r){return xs.S(t,r)},X:function(t,r,n,o){var i=o._originalDate||t,a=i.getTimezoneOffset();if(a===0)return"Z";switch(r){case"X":return $oe(a);case"XXXX":case"XX":return cc(a);case"XXXXX":case"XXX":default:return cc(a,":")}},x:function(t,r,n,o){var i=o._originalDate||t,a=i.getTimezoneOffset();switch(r){case"x":return $oe(a);case"xxxx":case"xx":return cc(a);case"xxxxx":case"xxx":default:return cc(a,":")}},O:function(t,r,n,o){var i=o._originalDate||t,a=i.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Moe(a,":");case"OOOO":default:return"GMT"+cc(a,":")}},z:function(t,r,n,o){var i=o._originalDate||t,a=i.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Moe(a,":");case"zzzz":default:return"GMT"+cc(a,":")}},t:function(t,r,n,o){var i=o._originalDate||t,a=Math.floor(i.getTime()/1e3);return Rt(a,r.length)},T:function(t,r,n,o){var i=o._originalDate||t,a=i.getTime();return Rt(a,r.length)}};function Moe(e,t){var r=e>0?"-":"+",n=Math.abs(e),o=Math.floor(n/60),i=n%60;if(i===0)return r+String(o);var a=t||"";return r+String(o)+a+Rt(i,2)}function $oe(e,t){if(e%60===0){var r=e>0?"-":"+";return r+Rt(Math.abs(e)/60,2)}return cc(e,t)}function cc(e,t){var r=t||"",n=e>0?"-":"+",o=Math.abs(e),i=Rt(Math.floor(o/60),2),a=Rt(o%60,2);return n+i+r+a}var Uoe=GXe;var joe=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},qoe=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},KXe=function(t,r){var n=t.match(/(P+)(p+)?/)||[],o=n[1],i=n[2];if(!i)return joe(t,r);var a;switch(o){case"P":a=r.dateTime({width:"short"});break;case"PP":a=r.dateTime({width:"medium"});break;case"PPP":a=r.dateTime({width:"long"});break;case"PPPP":default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",joe(o,r)).replace("{{time}}",qoe(i,r))},YXe={p:qoe,P:KXe},zoe=YXe;var XXe=["D","DD"],ZXe=["YY","YYYY"];function Voe(e){return XXe.indexOf(e)!==-1}function Hoe(e){return ZXe.indexOf(e)!==-1}function oI(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var QXe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},JXe=function(t,r,n){var o,i=QXe[t];return typeof i=="string"?o=i:r===1?o=i.one:o=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+o:o+" ago":o},Woe=JXe;function cv(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var eZe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},tZe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rZe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},nZe={date:cv({formats:eZe,defaultWidth:"full"}),time:cv({formats:tZe,defaultWidth:"full"}),dateTime:cv({formats:rZe,defaultWidth:"full"})},Goe=nZe;var oZe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},iZe=function(t,r,n,o){return oZe[t]},Koe=iZe;function dc(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",o;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,a=r!=null&&r.width?String(r.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;o=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return o[u]}}var aZe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},sZe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},lZe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},uZe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},cZe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},dZe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},fZe=function(t,r){var n=Number(t),o=n%100;if(o>20||o<10)switch(o%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},pZe={ordinalNumber:fZe,era:dc({values:aZe,defaultWidth:"wide"}),quarter:dc({values:sZe,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:dc({values:lZe,defaultWidth:"wide"}),day:dc({values:uZe,defaultWidth:"wide"}),dayPeriod:dc({values:cZe,defaultWidth:"wide",formattingValues:dZe,defaultFormattingWidth:"wide"})},Yoe=pZe;function fc(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?gZe(s,function(f){return f.test(a)}):mZe(s,function(f){return f.test(a)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(a.length);return{value:u,rest:c}}}function mZe(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function gZe(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function iI(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var o=n[0],i=t.match(e.parsePattern);if(!i)return null;var a=e.valueCallback?e.valueCallback(i[0]):i[0];a=r.valueCallback?r.valueCallback(a):a;var s=t.slice(o.length);return{value:a,rest:s}}}var hZe=/^(\d+)(th|st|nd|rd)?/i,vZe=/\d+/i,yZe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},bZe={any:[/^b/i,/^(a|c)/i]},EZe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xZe={any:[/1/i,/2/i,/3/i,/4/i]},wZe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},_Ze={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},CZe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},SZe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},TZe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},PZe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},AZe={ordinalNumber:iI({matchPattern:hZe,parsePattern:vZe,valueCallback:function(t){return parseInt(t,10)}}),era:fc({matchPatterns:yZe,defaultMatchWidth:"wide",parsePatterns:bZe,defaultParseWidth:"any"}),quarter:fc({matchPatterns:EZe,defaultMatchWidth:"wide",parsePatterns:xZe,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:fc({matchPatterns:wZe,defaultMatchWidth:"wide",parsePatterns:_Ze,defaultParseWidth:"any"}),day:fc({matchPatterns:CZe,defaultMatchWidth:"wide",parsePatterns:SZe,defaultParseWidth:"any"}),dayPeriod:fc({matchPatterns:TZe,defaultMatchWidth:"any",parsePatterns:PZe,defaultParseWidth:"any"})},Xoe=AZe;var DZe={code:"en-US",formatDistance:Woe,formatLong:Goe,formatRelative:Koe,localize:Yoe,match:Xoe,options:{weekStartsOn:0,firstWeekContainsDate:1}},Zoe=DZe;var Qoe=Zoe;var kZe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,OZe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,IZe=/^'([^]*?)'?$/,RZe=/''/g,NZe=/[a-zA-Z]/;function Nw(e,t,r){var n,o,i,a,s,l,u,c,f,d,p,v,h,y,g,m,b,E;Nt(2,arguments);var C=String(t),x=kl(),P=(n=(o=r==null?void 0:r.locale)!==null&&o!==void 0?o:x.locale)!==null&&n!==void 0?n:Qoe,N=co((i=(a=(s=(l=r==null?void 0:r.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(u=r.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&s!==void 0?s:x.firstWeekContainsDate)!==null&&a!==void 0?a:(f=x.locale)===null||f===void 0||(d=f.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(N>=1&&N<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=co((p=(v=(h=(y=r==null?void 0:r.weekStartsOn)!==null&&y!==void 0?y:r==null||(g=r.locale)===null||g===void 0||(m=g.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&h!==void 0?h:x.weekStartsOn)!==null&&v!==void 0?v:(b=x.locale)===null||b===void 0||(E=b.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&p!==void 0?p:0);if(!(D>=0&&D<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!P.localize)throw new RangeError("locale must contain localize property");if(!P.formatLong)throw new RangeError("locale must contain formatLong property");var R=Cr(e);if(!ZO(R))throw new RangeError("Invalid time value");var M=YO(R),I=QO(R,M),B={firstWeekContainsDate:N,weekStartsOn:D,locale:P,_originalDate:R},L=C.match(OZe).map(function(U){var K=U[0];if(K==="p"||K==="P"){var z=zoe[K];return z(U,P.formatLong)}return U}).join("").match(kZe).map(function(U){if(U==="''")return"'";var K=U[0];if(K==="'")return LZe(U);var z=Uoe[K];if(z)return!(r!=null&&r.useAdditionalWeekYearTokens)&&Hoe(U)&&oI(U,t,String(e)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Voe(U)&&oI(U,t,String(e)),z(I,U,P.localize,B);if(K.match(NZe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+K+"`");return U}).join("");return L}function LZe(e){var t=e.match(IZe);return t?t[1].replace(RZe,"'"):e}var BZe=V('<div><div><input class="input__field--date focus:outline-none flex-1 w-full" data-testid="from-date">'),Joe=V('<p class="font-normal">'),FZe=V('<div class="flex items-center p-4 h-full"><input class="input__field--date focus:outline-none flex-1 w-full ml-2 h-full" data-testid="to-date">'),MZe=V('<div class="w-full mt-2 px-3 py-2 text-sm rounded-md">'),aI=e=>{let[t,r]=oe($Ze(e.defaultValue??"")),[n,o]=oe(null),i=f=>{var d,p,v;if(!f)return"";try{let h;if((d=e.options)!=null&&d.hasTime)h=new Date(f);else if(/T|(\s+\d{1,2}:\d{2})/.test(f))h=new Date(f);else{let b=`${f.split(/[T\s]/)[0]}T12:00:00`;h=new Date(b),isNaN(h.getTime())&&(h=new Date(f))}if(isNaN(h.getTime()))return f;let y=((p=e.options)==null?void 0:p.format)??((v=e.options)!=null&&v.hasTime?sv.formatWithTime:sv.format);return Nw(h,y)}catch(h){return console.error("Error formatting date:",h),f}},a=f=>{var d;if(f)return(d=e.options)!=null&&d.hasTime?f:f.split(/[T\s]/)[0]},s=()=>{var p;let f=a((p=e.options)==null?void 0:p.min),d=t().from;return d?f?new Date(d)>new Date(f)?d:f:d:f},l=()=>{var p;let f=a((p=e.options)==null?void 0:p.max),d=t().to;return d?f?new Date(d)<new Date(f)?d:f:d:f},u=(f,d)=>{var h,y;if(!((h=e.options)!=null&&h.isRange))return o(null),!0;if(!f||!d)return f||d?(o("Please provide both start and end dates for the date range."),!1):(o(null),!0);let p=new Date(f),v=new Date(d);return isNaN(p.getTime())||isNaN(v.getTime())?(o(null),!0):p>v?(o(((y=e.options)==null?void 0:y.retryMessageContent)||"The start date cannot be after the end date. Please select a valid date range."),!1):(o(null),!0)};return T(hi,{onSubmit:()=>{var g,m,b;let f=t().from,d=t().to;if((g=e.options)!=null&&g.isRange){if(!f||!d){o("Please provide both start and end dates for the date range.");return}}else if(!f){o("Please select a date.");return}if(!u(f,d))return;let p=i(t().from),v=t().to?i(t().to):"",h=(m=e.options)!=null&&m.isRange?`${p} to ${v}`:p,y=`${t().from}${(b=e.options)!=null&&b.isRange?` to ${t().to}`:""}`;e.onSubmit({type:"text",value:y,label:h})},get buttonLabel(){var f,d;return(d=(f=e.options)==null?void 0:f.labels)==null?void 0:d.button},get children(){let f=BZe(),d=f.firstChild,p=d.firstChild;return W(d,(()=>{let v=Ee(()=>{var h;return!!((h=e.options)!=null&&h.isRange)});return()=>v()&&(()=>{let h=Joe();return W(h,()=>{var y;return((y=e.options.labels)==null?void 0:y.from)??sv.labels.from}),h})()})(),p),p.addEventListener("change",v=>{let h={...t(),from:v.currentTarget.value};r(h),u(h.from,h.to)}),p.style.setProperty("min-height","32px"),p.style.setProperty("min-width","100px"),p.style.setProperty("font-size","16px"),W(f,(()=>{let v=Ee(()=>{var h;return!!((h=e.options)!=null&&h.isRange)});return()=>v()&&(()=>{let h=FZe(),y=h.firstChild;return W(h,(()=>{let g=Ee(()=>!!e.options.isRange);return()=>g()&&(()=>{let m=Joe();return W(m,()=>{var b;return((b=e.options.labels)==null?void 0:b.to)??sv.labels.to}),m})()})(),y),y.addEventListener("change",g=>{let m={...t(),to:g.currentTarget.value};r(m),u(m.from,m.to)}),y.style.setProperty("min-height","32px"),y.style.setProperty("min-width","100px"),y.style.setProperty("font-size","16px"),le(g=>{var C;let m=e.options.hasTime?"datetime-local":"date",b=s(),E=a((C=e.options)==null?void 0:C.max);return m!==g._v$6&&qe(y,"type",g._v$6=m),b!==g._v$7&&qe(y,"min",g._v$7=b),E!==g._v$8&&qe(y,"max",g._v$8=E),g},{_v$6:void 0,_v$7:void 0,_v$8:void 0}),le(()=>y.value=t().to),h})()})(),null),W(f,(()=>{let v=Ee(()=>!!n());return()=>v()&&(()=>{let h=MZe();return h.style.setProperty("color","#c53030"),h.style.setProperty("background-color","#fff5f5"),h.style.setProperty("border","1px solid #feb2b2"),W(h,n),h})()})(),null),le(v=>{var E,C,x,P;let h=Wt("flex flex-col w-full",(E=e.options)!=null&&E.isRange?"items-end":"items-center"),y=Wt("flex items-center",((C=e.options)==null?void 0:C.isRange)&&"pb-0 gap-2"),g=(x=e.options)!=null&&x.hasTime?"datetime-local":"date",m=a((P=e.options)==null?void 0:P.min),b=l();return h!==v._v$&&we(f,v._v$=h),y!==v._v$2&&we(d,v._v$2=y),g!==v._v$3&&qe(p,"type",v._v$3=g),m!==v._v$4&&qe(p,"min",v._v$4=m),b!==v._v$5&&qe(p,"max",v._v$5=b),v},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0}),le(()=>p.value=t().from),f}})},$Ze=e=>{if(!e.includes("to"))return{from:e,to:""};let[t,r]=e.split(" to ");return{from:t,to:r}};var ws={buttonType:"Numbers",length:10,labels:{button:Pn},startsAt:1,customIcon:{isEnabled:!1},isOneClickSubmitEnabled:!1};var UZe=V('<form class="flex flex-col gap-3"><div class="flex flex-wrap justify-center gap-2 py-2">'),jZe=V('<span class="text-sm w-full text-gray-600 dark:text-gray-400">'),qZe=V('<span class="text-sm w-full text-right pr-2 text-gray-600 dark:text-gray-400">'),zZe=V('<div class="flex justify-end pt-2">'),VZe=V('<div role="checkbox">'),HZe=V("<div>"),sI=e=>{let[t,r]=oe(e.defaultValue?Number(e.defaultValue):void 0),n=i=>{i.preventDefault();let a=t();ur(a)||e.onSubmit({type:"text",value:a.toString()})},o=i=>{var a;(a=e.block.options)!=null&&a.isOneClickSubmitEnabled&&e.onSubmit({type:"text",value:i.toString()}),r(i)};return(()=>{let i=UZe(),a=i.firstChild;return i.addEventListener("submit",n),W(i,(()=>{let s=Ee(()=>{var l,u;return!!((u=(l=e.block.options)==null?void 0:l.labels)!=null&&u.left)});return()=>s()&&(()=>{let l=jZe();return W(l,()=>e.block.options.labels.left),l})()})(),a),W(a,T(Mt,{get each(){var s,l,u;return Array.from(Array((((s=e.block.options)==null?void 0:s.length)??ws.length)+((((l=e.block.options)==null?void 0:l.buttonType)??ws.buttonType)==="Numbers"?-((((u=e.block.options)==null?void 0:u.startsAt)??ws.startsAt)-1):0)))},children:(s,l)=>T(WZe,kt(()=>e.block.options,{get rating(){return t()},get idx(){var u,c;return l()+((((u=e.block.options)==null?void 0:u.buttonType)??ws.buttonType)==="Numbers"?((c=e.block.options)==null?void 0:c.startsAt)??ws.startsAt:1)},onClick:o}))})),W(i,(()=>{let s=Ee(()=>{var l,u;return!!((u=(l=e.block.options)==null?void 0:l.labels)!=null&&u.right)});return()=>s()&&(()=>{let l=qZe();return W(l,()=>e.block.options.labels.right),l})()})(),null),W(i,(()=>{let s=Ee(()=>!!tt(t()));return()=>s()&&(()=>{let l=zZe();return W(l,T(gi,{get children(){var u,c;return((c=(u=e.block.options)==null?void 0:u.labels)==null?void 0:c.button)??ws.labels.button}})),l})()})(),null),i})()},WZe=e=>{let t=r=>{r.preventDefault(),e.onClick(e.idx)};return T($t,{get children(){return[T($e,{get when(){return(e.buttonType??ws.buttonType)==="Numbers"},get children(){return[T(ve,{get when(){return e.isOneClickSubmitEnabled},get children(){return T(uo,{"on:click":t,get children(){return e.idx}})}}),T(ve,{get when(){return!e.isOneClickSubmitEnabled},get children(){let r=VZe();return r.addEventListener("click",t),W(r,()=>e.idx),le(n=>{let o=tt(e.rating)&&e.idx<=e.rating,i=Wt("button button--selectable flex items-center justify-center font-medium focus:outline-none cursor-pointer select-none",tt(e.rating)&&e.idx<=e.rating&&" button--selected");return o!==n._v$&&qe(r,"aria-checked",n._v$=o),i!==n._v$2&&we(r,n._v$2=i),n},{_v$:void 0,_v$2:void 0}),r}})]}}),T($e,{get when(){return(e.buttonType??ws.buttonType)!=="Numbers"},get children(){let r=HZe();return r.addEventListener("click",()=>e.onClick(e.idx)),le(n=>{var a;let o="input__field--rating flex justify-center items-center cursor-pointer w-[48px] h-[48px]"+(tt(e.rating)&&e.idx<=e.rating?" input__field--rating--selected":""),i=(a=e.customIcon)!=null&&a.isEnabled&&!Ei(e.customIcon.svg)?e.customIcon.svg:GZe;return o!==n._v$3&&we(r,n._v$3=o),i!==n._v$4&&(r.innerHTML=n._v$4=i),n},{_v$3:void 0,_v$4:void 0}),r}})]}})},GZe='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>';var Hi={isRequired:!0,isMultipleAllowed:!1,visibility:"Auto",labels:{placeholder:`<strong>
|
|
142
|
-
Click to upload
|
|
143
|
-
</strong> or drag and drop<br>
|
|
144
|
-
(size limit: 10MB)`,button:"Upload",clear:"Clear",skip:"Skip",success:{single:"File uploaded",multiple:"{total} files uploaded"}},retryMessageContent:"\u26A0\uFE0F Please upload a valid file (maximum size: 10MB)."};var KZe=V('<div class="w-full bg-gray-200 rounded-full h-2.5"><div class="h-2.5 rounded-full input__field--upload__progress-bar">'),YZe=V('<div class="p-4 flex gap-2 border-gray-200 border overflow-auto bg-white rounded-md w-full">'),XZe=V('<div class="flex flex-col justify-center items-center gap-4 max-w-[90%]"><p class="text-sm text-gray-500 text-center">'),ZZe=V('<input id="dropzone-file" type="file" class="hidden">'),QZe=V('<div class="flex justify-end">'),JZe=V('<div class="flex justify-end"><div class="flex gap-2">'),eQe=V('<form class="flex flex-col w-full gap-2"><label for="dropzone-file">'),tQe=V('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-gray-500"><polyline points="16 16 12 12 8 16"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16">'),lI=e=>{let[t,r]=oe([]),[n,o]=oe(!1),[i,a]=oe(0),[s,l]=oe(!1),u=b=>{var C;let E=Array.from(b).map(x=>vw({existingFiles:t(),newFile:x,params:{},onError:({description:P,title:N})=>Dl.create({title:N,description:P})})).filter(tt);if(E.length!==0){if(!((C=e.block.options)!=null&&C.isMultipleAllowed))return f(E[0]);r([...t(),...E])}},c=async b=>{b.preventDefault(),t().length!==0&&d(t())},f=async b=>{var C,x,P;o(!0);let E=await op({files:[{file:b,input:{sessionId:e.context.sessionId,fileName:b.name}}]});if(o(!1),E.length&&E[0])return e.onSubmit({type:"text",label:((P=(x=(C=e.block.options)==null?void 0:C.labels)==null?void 0:x.success)==null?void 0:P.single)??Hi.labels.success.single,value:E[0]?eie(E[0].url):"",attachments:[{type:b.type,url:E[0].url}]});Dl.create({description:"An error occured while uploading the file"})},d=async b=>{var C,x,P,N,D,R;o(!0);let E=await op({files:b.map(M=>({file:M,input:{sessionId:e.context.sessionId,fileName:M.name}})),onUploadProgress:a});if(o(!1),a(0),E.length!==b.length)return Dl.create({description:"An error occured while uploading the files"});e.onSubmit({type:"text",label:E.length>1?(((P=(x=(C=e.block.options)==null?void 0:C.labels)==null?void 0:x.success)==null?void 0:P.multiple)??Hi.labels.success.multiple).replaceAll("{total}",E.length.toString()):((R=(D=(N=e.block.options)==null?void 0:N.labels)==null?void 0:D.success)==null?void 0:R.single)??Hi.labels.success.single,value:E.filter(tt).map(({url:M})=>eie(M)).join(", "),attachments:E.filter(tt)})},p=b=>{b.preventDefault(),l(!0)},v=()=>l(!1),h=b=>{var E;b.preventDefault(),b.stopPropagation(),(E=b.dataTransfer)!=null&&E.files&&u(b.dataTransfer.files)},y=()=>r([]),g=()=>{var b,E;return e.onSkip(((E=(b=e.block.options)==null?void 0:b.labels)==null?void 0:E.skip)??Hi.labels.skip)},m=b=>{r(E=>E.filter((C,x)=>x!==b))};return(()=>{let b=eQe(),E=b.firstChild;return b.addEventListener("submit",c),E.addEventListener("drop",h),E.addEventListener("dragleave",v),E.addEventListener("dragover",p),W(E,T($t,{get children(){return[T($e,{get when(){return n()},get children(){return T(ve,{get when(){return t().length>1},get fallback(){return T(np,{})},get children(){let C=KZe(),x=C.firstChild;return x.style.setProperty("transition","width 150ms cubic-bezier(0.4, 0, 0.2, 1)"),le(()=>`${i()>0?i:10}%`!=null?x.style.setProperty("width",`${i()>0?i:10}%`):x.style.removeProperty("width")),C}})}}),T($e,{get when(){return!n()},get children(){return[(()=>{let C=XZe(),x=C.firstChild;return W(C,T(ve,{get when(){return t().length},get fallback(){return T(rQe,{})},get children(){let P=YZe();return P.addEventListener("click",N=>{N.preventDefault(),N.stopPropagation()}),W(P,T(Mt,{get each(){return t()},children:(N,D)=>T(hw,{file:N,onRemoveClick:()=>m(D())})})),P}}),x),le(()=>{var P,N;return x.innerHTML=((N=(P=e.block.options)==null?void 0:P.labels)==null?void 0:N.placeholder)??Hi.labels.placeholder}),C})(),(()=>{let C=ZZe();return C.addEventListener("change",x=>{x.currentTarget.files&&u(x.currentTarget.files)}),le(()=>{var x;return C.multiple=((x=e.block.options)==null?void 0:x.isMultipleAllowed)??Hi.isMultipleAllowed}),C})()]}})]}})),W(b,T(ve,{get when(){var C;return t().length===0&&((C=e.block.options)==null?void 0:C.isRequired)===!1},get children(){let C=QZe();return W(C,T(uo,{"on:click":g,get children(){var x,P;return((P=(x=e.block.options)==null?void 0:x.labels)==null?void 0:P.skip)??Hi.labels.skip}})),C}}),null),W(b,T(ve,{get when(){return Ee(()=>{var C;return!!((C=e.block.options)!=null&&C.isMultipleAllowed&&t().length>0)})()&&!n()},get children(){let C=JZe(),x=C.firstChild;return W(x,T(ve,{get when(){return t().length},get children(){return T(uo,{"on:click":y,get children(){var P,N;return((N=(P=e.block.options)==null?void 0:P.labels)==null?void 0:N.clear)??Hi.labels.clear}})}}),null),W(x,T(gi,{get children(){var P,N;return Ee(()=>{var D,R;return(((R=(D=e.block.options)==null?void 0:D.labels)==null?void 0:R.button)??Hi.labels.button)===Hi.labels.button})()?`Upload ${t().length} file${t().length>1?"s":""}`:(N=(P=e.block.options)==null?void 0:P.labels)==null?void 0:N.button}}),null),C}}),null),le(()=>we(E,"input__field--upload py-6 flex flex-col justify-center items-center w-full bg-gray-50 border-2 border-gray-300 border-dashed cursor-pointer hover:bg-gray-100 px-8"+(s()?"input__upload--dragging":""))),b})()},rQe=()=>tQe(),eie=e=>{let t=e.split("/"),r=t.pop();if(!r)return e;let n=r;try{n=decodeURIComponent(r)}catch{}let o=encodeURIComponent(n);return[...t,o].join("/")};var uI={buttonLabel:Pn,whatsappFlowHeader:"Choose your options",whatsappFlowBody:"You can select more than one.",whatsappFlowButtonText:"Confirm",whatsappFlowQuestionLabel:"Choose your options:",searchInputPlaceholder:"Filter the options...",isMultipleChoice:!1,isSearchable:!1,otherOption:!1,retryMessageContent:"\u26A0\uFE0F Please select one of the available options from the list."};var nQe=V('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3px" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12">'),tie=e=>(()=>{let t=nQe();return yt(t,e,!0,!0),t})();var oQe=V('<button class="w-5 h-5">'),iQe=V('<div class="flex justify-between items-center gap-2 w-full pr-4"><input class="input__field focus:outline-none bg-transparent px-4 py-4 flex-1 w-full" type="text">'),rie=e=>{let[t,r]=oe(""),[n,o]=Dr(e,["onInput","ref"]),i=s=>{r(s),n.onInput(s)},a=()=>{r(""),e.onClear()};return(()=>{let s=iQe(),l=s.firstChild;l.$$input=c=>i(c.currentTarget.value);let u=e.ref;return typeof u=="function"?lt(u,l):e.ref=l,l.style.setProperty("font-size","16px"),yt(l,kt({get value(){return t()}},o),!1,!1),W(s,T(ve,{get when(){return t().length>0},get children(){let c=oQe();return c.addEventListener("click",a),W(c,T(Gn,{class:"w-4"})),c}}),null),s})()};Yr(["input"]);var aQe=V('<form class="flex flex-col gap-2 w-full items-end">'),sQe=V('<div class="flex flex-col gap-2 w-full items-end">'),lQe=V('<div class="flex items-end w-full">'),pp=V("<div>"),uQe=V('<img fetchpriority="high" class="m-auto min-w-[200px] w-full max-h-[200px] h-full object-cover rounded-t-[var(--quickbot-button-border-radius)]">'),cQe=V('<span class="font-normal">'),dQe=V('<span class="text-sm whitespace-pre-wrap text-left">'),fQe=V('<div class="flex flex-col gap-1 flex-1">'),nie=V("<span>"),pQe=V('<span class="flex h-3 w-3 absolute top-0 right-0 -mt-1 -mr-1 ping"><span class="animate-ping absolute inline-flex h-full w-full rounded-full brightness-200 opacity-75"></span><span class="relative inline-flex rounded-full h-3 w-3 brightness-150">'),cI=e=>{let t,[r,n]=oe(e.defaultItems),[o,i]=oe([]),[a,s]=oe(0);et(()=>{!wt()&&t&&t.focus({preventScroll:!0})});let l=h=>{let y=r()[h];if(y)if(e.multiple)u(y.id);else{let g=y.content,m=y.value??y.content??y.id;return y.pictureSrc?e.onSubmit({type:"text",label:yr(g)?g:y.pictureSrc??y.id,value:y.value??y.id}):e.onSubmit({type:"text",label:g,value:m})}},u=h=>{let y=o().indexOf(h);i(y!==-1?g=>g.filter(m=>m!==h):g=>[...g,h])},c=h=>{h==null||h.preventDefault(),e.onSubmit({type:"text",value:o().map(y=>{let g=e.defaultItems.find(m=>m.id===y);return g?g.pictureSrc?yr(g.content)?g.content:g.pictureSrc:g.content:""}).join(", ")})},f=h=>{let y=(h??"").toLowerCase();n(e.defaultItems.filter(g=>{var b,E;let m=((b=g.content)==null?void 0:b.toLowerCase())??"";return g.pictureSrc?m.includes(y)||((E=g.description)==null?void 0:E.toLowerCase().includes(y)):m.includes(y)}))};mt(()=>{a()===e.defaultItems.filter(h=>tt(h.pictureSrc)).length&&e.onTransitionEnd()});let d=()=>{s(h=>h+1)},p=h=>o().includes(h),v=()=>{if(!e.multiple)return r();let h=o().filter(y=>!r().some(g=>g.id===y)).map(y=>e.defaultItems.find(g=>g.id===y)).filter(tt);return[...r(),...h]};return T($t,{get children(){return[T($e,{get when(){return e.multiple},get children(){let h=aQe();return h.addEventListener("submit",c),W(h,T(oie,{get options(){return e.options},get multiple(){return e.multiple},inputRef:t,filterItems:f,get defaultItems(){return e.defaultItems},setFilteredItems:n,get itemsToRender(){return v()},isItemSelected:p,handleClick:l,onImageLoad:d,get chunkIndex(){return e.chunkIndex},get selectedItemIds(){return o()}})),h}}),T($e,{get when(){return!e.multiple},get children(){let h=sQe();return W(h,T(oie,{get options(){return e.options},get multiple(){return e.multiple},inputRef:t,filterItems:f,get defaultItems(){return e.defaultItems},setFilteredItems:n,get itemsToRender(){return v()},isItemSelected:p,handleClick:l,onImageLoad:d,get chunkIndex(){return e.chunkIndex},get selectedItemIds(){return o()}})),h}})]}})},oie=e=>[T(ve,{get when(){var t;return(t=e.options)==null?void 0:t.isSearchable},get children(){let t=lQe();return W(t,T(rie,{ref(r){let n=e.inputRef;typeof n=="function"?n(r):e.inputRef=r},get onInput(){return e.filterItems},get placeholder(){var r;return((r=e.options)==null?void 0:r.searchInputPlaceholder)??uI.searchInputPlaceholder},onClear:()=>e.setFilteredItems(e.defaultItems)})),t}}),(()=>{let t=pp();return W(t,T(Mt,{get each(){return e.itemsToRender},children:(r,n)=>T(mQe,{item:r,get index(){return n()},selected:()=>e.isItemSelected(r.id),onClick:()=>e.handleClick(n()),get onImageLoad(){return e.onImageLoad},get multiple(){return e.multiple},get showPingIndicator(){return e.chunkIndex===0&&e.defaultItems.length===1}})})),le(()=>{var r;return we(t,nt("flex flex-wrap justify-end gap-2",((r=e.options)==null?void 0:r.isSearchable)&&"overflow-y-scroll max-h-80 rounded-md"))}),t})(),T(ve,{get when(){return e.multiple&&e.selectedItemIds.length>0},get children(){return T(gi,{get children(){var t;return((t=e.options)==null?void 0:t.buttonLabel)??uI.buttonLabel}})}})],iie=e=>(()=>{let t=uQe();return g_(t,"load",e.onImageLoad),le(r=>{let n=e.item.pictureSrc,o=e.item.content??`Picture ${e.index+1}`,i=`Picture choice ${e.index+1}`;return n!==r._v$&&qe(t,"src",r._v$=n),o!==r._v$2&&qe(t,"alt",r._v$2=o),i!==r._v$3&&qe(t,"elementtiming",r._v$3=i),r},{_v$:void 0,_v$2:void 0,_v$3:void 0}),t})(),Lw=e=>(()=>{let t=fQe();return W(t,T(ve,{get when(){return e.item.content},get children(){let r=cQe();return W(r,()=>e.item.content),r}}),null),W(t,T(ve,{get when(){return e.item.description},get children(){let r=dQe();return W(r,()=>e.item.description),r}}),null),t})(),mQe=e=>T($t,{get children(){return[T($e,{get when(){return e.item.pictureSrc&&e.multiple},get children(){return T(uo,{type:"button",role:"checkbox",get"aria-checked"(){return e.selected()},get"on:click"(){return e.onClick},get class(){return nt("button--selectable","button--has-image",Ss(e.item.pictureSrc)&&"button--has-svg")},get"data-itemid"(){return e.item.id},get children(){return[T(iie,{get item(){return e.item},get index(){return e.index},get onImageLoad(){return e.onImageLoad},get multiple(){return e.multiple}}),(()=>{let t=pp();return W(t,T(aie,{get isChecked(){return e.selected()},class:"flex-shrink-0"}),null),W(t,T(Lw,{get item(){return e.item}}),null),le(()=>we(t,nt("py-2 px-4 flex items-center gap-2",e.item.description&&"items-start"))),t})()]}})}}),T($e,{get when(){return e.item.pictureSrc&&!e.multiple},get children(){return T(uo,{get"on:click"(){return e.onClick},get"data-itemid"(){return e.item.id},get class(){return nt("button--selectable","button--has-image",Ss(e.item.pictureSrc)&&"button--has-svg")},get children(){return[T(iie,{get item(){return e.item},get index(){return e.index},get onImageLoad(){return e.onImageLoad},get multiple(){return e.multiple}}),(()=>{let t=pp();return W(t,T(Lw,{get item(){return e.item}})),le(()=>we(t,nt("py-2 px-4 flex items-center gap-2",e.item.description&&"items-start"))),t})()]}})}}),T($e,{get when(){return!e.item.pictureSrc&&e.multiple},get children(){let t=nie();return W(t,T(uo,{type:"button",role:"checkbox",get"aria-checked"(){return e.selected()},get"on:click"(){return e.onClick},get class(){return nt("button--selectable",e.selected()&&"button--selected")},get"data-itemid"(){return e.item.id},get children(){let r=pp();return W(r,T(aie,{get isChecked(){return e.selected()},class:"flex-shrink-0"}),null),W(r,T(Lw,{get item(){return e.item}}),null),le(()=>we(r,nt("flex items-center gap-2",e.item.description&&"items-start"))),r}})),le(()=>we(t,nt("relative",wt()&&"w-full"))),t}}),T($e,{get when(){return!e.item.pictureSrc&&!e.multiple},get children(){let t=nie();return W(t,T(uo,{get"on:click"(){return e.onClick},get class(){return nt("button--selectable",e.selected()&&"button--selected")},get"data-itemid"(){return e.item.id},get children(){let r=pp();return W(r,T(Lw,{get item(){return e.item}})),le(()=>we(r,nt("flex items-center gap-2",e.item.description&&"items-start"))),r}}),null),W(t,T(ve,{get when(){return e.showPingIndicator},get children(){return pQe()}}),null),le(()=>we(t,nt("relative",wt()&&"w-full"))),t}})]}}),aie=e=>(()=>{let t=pp();return W(t,T(tie,{get classList(){return{"w-3":!0,"h-3":!0,"transition-opacity":!0,"duration-200":!0,"opacity-100":e.isChecked,"group-hover:opacity-0":e.isChecked,"opacity-0":!e.isChecked}}}),null),W(t,T(Gn,{get classList(){return{absolute:!0,"top-1/2":!0,"left-1/2":!0,"-translate-x-1/2":!0,"-translate-y-1/2":!0,"w-3":!0,"h-3":!0,"transition-opacity":!0,"duration-200":!0,"opacity-0":!0,"group-hover:opacity-100":e.isChecked}}}),null),le(()=>we(t,nt("button__checkbox","w-4 h-4 rounded-full relative flex items-center justify-center",e.isChecked&&"button__checkbox--checked",e.class))),t})();var sie=e=>new Promise(t=>{if(window.Stripe)return t(window.Stripe(e));let r=document.createElement("script");r.src="https://js.stripe.com/v3",document.body.appendChild(r),r.onload=()=>{if(!window.Stripe)throw new Error("Stripe.js failed to load.");t(window.Stripe(e))}});var Bw={provider:"Stripe",labels:{button:"Pay",success:"Success"},retryMessageContent:"Payment failed. Please, try again.",currency:"USD"};var gQe=V('<div class="input__field--error mt-4 text-center animate-fade-in">'),hQe=V('<form id="payment-form" class="flex flex-col p-4 w-full items-center"><slot name="stripe-payment-form">'),vQe="stripe-payment-form",Fw,dv=null,Mw=null,lie=e=>{let[t,r]=oe(),[n,o]=oe(!1),[i,a]=oe(!1);et(async()=>{var u,c;if(yQe(Fw),!((u=e.options)!=null&&u.publicKey))return r("Missing Stripe public key");if(dv=await sie((c=e.options)==null?void 0:c.publicKey),!dv)return;Mw=dv.elements({appearance:{theme:"stripe",variables:{colorPrimary:getComputedStyle(Fw).getPropertyValue("--quickbot-button-bg-color")}},clientSecret:e.options.paymentIntentSecret}),Mw.create("payment",{layout:"tabs"}).mount("#payment-element"),setTimeout(()=>{o(!0),e.onTransitionEnd()},1e3)});let s=async l=>{var p,v,h,y,g,m,b,E;if(l.preventDefault(),!dv||!Mw)return;a(!0),SR({sessionId:e.context.sessionId,resultId:e.context.resultId,bot:e.context.bot});let{postalCode:u,...c}=((v=(p=e.options)==null?void 0:p.additionalInformation)==null?void 0:v.address)??{},{error:f,paymentIntent:d}=await dv.confirmPayment({elements:Mw,confirmParams:{return_url:window.location.href,payment_method_data:{billing_details:{name:(y=(h=e.options)==null?void 0:h.additionalInformation)==null?void 0:y.name,email:(m=(g=e.options)==null?void 0:g.additionalInformation)==null?void 0:m.email,phone:(E=(b=e.options)==null?void 0:b.additionalInformation)==null?void 0:E.phoneNumber,address:{...c,postal_code:u}}}},redirect:"if_required"});if(Rv(),a(!1),(f==null?void 0:f.type)!=="validation_error"){if((f==null?void 0:f.type)==="card_error")return r(f.message);if(!f&&d.status==="succeeded")return e.onSuccess()}};return(()=>{let l=hQe(),u=l.firstChild;l.addEventListener("submit",s);let c=Fw;return typeof c=="function"?lt(c,u):Fw=u,u._$owner=bc(),W(l,T(ve,{get when(){return n()},get children(){return T(gi,{get isLoading(){return i()},class:"mt-4 w-full max-w-lg animate-fade-in",get children(){return[Ee(()=>{var f,d;return((d=(f=e.options)==null?void 0:f.labels)==null?void 0:d.button)??Bw.labels.button})," ",Ee(()=>{var f;return(f=e.options)==null?void 0:f.amountLabel})]}})}}),null),W(l,T(ve,{get when(){return t()},get children(){let f=gQe();return W(f,t),f}}),null),l})()},yQe=e=>{let r=e.getRootNode().host,n=document.createElement("div");n.style.width="100%",n.slot=vQe,r.appendChild(n);let o=document.createElement("div");o.id="payment-element",n.appendChild(o)};var uie=e=>T(lie,{get onSuccess(){return e.onSuccess},get options(){return e.options},get context(){return e.context},get onTransitionEnd(){return e.onTransitionEnd}});var bQe=V("<div>"),EQe=V('<div class="transition-opacity duration-200 px-5 py-3">'),cie=e=>{let{setAnswer:t,isSending:r,getDisplayedMessageIndex:n,chatChunks:o}=Xi(),[i,a]=Ps(oe(),{key:`bot-${e.context.bot.id}-input-footer-${e.chunkIndex}`,storage:e.context.storage}),s=()=>{var v,h;return(h=(v=o()[e.chunkIndex])==null?void 0:v.input)==null?void 0:h.answer},l=()=>{var m;let v=o(),h=!!((m=v.at(-1))!=null&&m.streamingMessageId)||r(),y=v.some((b,E)=>b.messages.length===0?!1:n(E)<b.messages.length);return!ur(s())||h||y},u=async v=>{a(v),t(e.chunkIndex,v),e.onSubmit(v)},c=v=>{let h={type:"text",value:v};a(h),t(e.chunkIndex,h),e.onSkip()},f=v=>{if(v)return v.type==="text"?v.value:v.url},d=()=>(e.hasError?f(i()):void 0)??(e.isInputPrefillEnabled?e.block.prefilledValue:void 0),p=()=>{var v,h;return u({type:"text",value:((h=(v=e.block.options)==null?void 0:v.labels)==null?void 0:h.success)??Bw.labels.success})};return mt(()=>{var h;if(e.block.type==="file input")return;let v=(h=$v().findLast(y=>e.chunkIndex===y.inputIndex))==null?void 0:h.formattedMessage;if(v){let y=s();if((y==null?void 0:y.type)==="text"&&y.label!==v){if(e.block.type==="buttons input"&&y.label)return;a(g=>(g==null?void 0:g.type)==="text"?{...g,label:v}:g),t(e.chunkIndex,{...y,label:v})}}}),(()=>{let v=EQe();return W(v,T(ve,{get when(){return e.hasHostAvatar},get children(){let h=bQe();return le(()=>we(h,nt("flex flex-shrink-0 items-center",wt()?"w-6 h-6":"w-10 h-10"))),h}}),null),W(v,T($t,{get children(){return[T($e,{get when(){return e.block.type==="text input"},get children(){return T(zO,{get block(){return e.block},get defaultValue(){return d()},get context(){return e.context},onSubmit:u,isInputDisabled:l,hasError:!1})}}),T($e,{get when(){return e.block.type==="number input"},get children(){return T(VO,{get block(){return e.block},get defaultValue(){return d()},onSubmit:u})}}),T($e,{get when(){return e.block.type==="email input"},get children(){return T(HO,{get block(){return e.block},get defaultValue(){return d()},onSubmit:u,isInputDisabled:l,hasError:!1})}}),T($e,{get when(){return e.block.type==="url input"},get children(){return T(WO,{get block(){return e.block},get defaultValue(){return d()},onSubmit:u,isInputDisabled:l,hasError:!1})}}),T($e,{get when(){return e.block.type==="phone number input"},get children(){return T(GO,{get labels(){var h;return(h=e.block.options)==null?void 0:h.labels},get defaultCountryCode(){var h;return(h=e.block.options)==null?void 0:h.defaultCountryCode},get defaultValue(){return d()},onSubmit:u,isInputDisabled:l,hasError:!1})}}),T($e,{get when(){return Ee(()=>e.block.type==="date input")()&&!l()},get children(){return T(aI,{get options(){return e.block.options},get defaultValue(){return d()},onSubmit:u})}}),T($e,{get when(){return Ee(()=>e.block.type==="rating input")()&&!l()},get children(){return T(sI,{get block(){return e.block},get defaultValue(){return d()},onSubmit:u})}}),T($e,{get when(){return Ee(()=>e.block.type==="file input")()&&!l()},get children(){return T(lI,{get context(){return e.context},get block(){return e.block},onSubmit:u,onSkip:c})}}),T($e,{get when(){return Ee(()=>e.block.type==="stripe")()&&!l()},get children(){return T(uie,{get context(){return e.context},get options(){return{...e.block.options,...e.block.runtimeOptions}},onSuccess:p,get onTransitionEnd(){return e.onTransitionEnd}})}}),T($e,{get when(){return e.block.type==="buttons input"&&!l()&&e.block},keyed:!0,children:h=>T(cI,{get chunkIndex(){return e.chunkIndex},get defaultItems(){return h.items},get options(){return h.options},onSubmit:u,get onTransitionEnd(){return e.onTransitionEnd},get multiple(){var y;return!!((y=h.options)!=null&&y.isMultipleChoice)}})})]}}),null),le(()=>qe(v,"data-blockid",e.block.id)),v})()};var xQe=V('<div class="conversation-container__footer transition-colors duration-200 border-t border-black/8 empty:hidden">'),die=e=>{let{chatChunks:t,theme:r,hasError:n,blockRef:o,currentBlock:i,sendMessage:a,isSending:s,getDisplayedMessageIndex:l}=Xi(),u=()=>a(void 0);return[(()=>{let c=xQe();return W(c,T(ve,{get when(){var f;return(f=i())==null?void 0:f.input},children:f=>T(cie,{get block(){return f()},get chunkIndex(){return t().length-1},get hasHostAvatar(){var d,p;return((p=(d=r().chat)==null?void 0:d.hostAvatar)==null?void 0:p.isEnabled)??!1},get guestAvatar(){var d;return(d=r().chat)==null?void 0:d.guestAvatar},get context(){return e.context},get isInputPrefillEnabled(){var d;return((d=e.initialChatReply.bot.settings.general)==null?void 0:d.isInputPrefillEnabled)??Sr.general.isInputPrefillEnabled},get hasError(){return n()},onSubmit:a,onTransitionEnd:()=>Uv(o),onSkip:u})}),null),W(c,T(ve,{get when(){var h;let f=i(),d=t(),p=!!((h=d.at(-1))!=null&&h.streamingMessageId)||s(),v=d.some((y,g)=>y.messages.length===0?!1:l(g)<y.messages.length);return!(f!=null&&f.input)&&!p&&!v},get children(){return T(zne,{})}}),null),c})(),T(ve,{get when(){var c;return(c=e.initialChatReply.bot.settings.general)==null?void 0:c.isBrandingEnabled},get children(){return T(qne,{get botContainer(){return e.botContainer}})}})]};var wQe=V('<div class="conversation-container flex flex-col h-full">'),fie=e=>T(CN,kt(e,{get children(){let t=wQe();return W(t,T(Une,e),null),W(t,T(die,e),null),t}}));var _Qe=V('<div class="h-full flex justify-center items-center flex-col"><p class="text-2xl text-center"></p><pre>'),pie=e=>(()=>{let t=_Qe(),r=t.firstChild,n=r.nextSibling;return W(r,()=>e.error.message),W(n,()=>JSON.stringify(e.error.cause,null,2)),t})();var dI="resultId",mie=e=>{if(e)try{return sessionStorage.getItem(`${dI}-${e}`)??localStorage.getItem(`${dI}-${e}`)??void 0}catch{}},gie=(e="session")=>(t,r)=>{try{hie(e).setItem(`${dI}-${t}`,r)}catch{}},fI=e=>{if(e)try{let t=sessionStorage.getItem(`bot-${e}-initialChatReply`)??localStorage.getItem(`bot-${e}-initialChatReply`);return t?JSON.parse(t):void 0}catch{}},pI=(e,{botId:t,storage:r})=>{try{let n=JSON.stringify(e);hie(r).setItem(`bot-${t}-initialChatReply`,n)}catch{}},$w=()=>{try{sessionStorage.setItem("bot-botOpened","true")}catch{}},Uw=()=>{try{sessionStorage.removeItem("bot-botOpened")}catch{}},jw=()=>{try{return sessionStorage.getItem("bot-botOpened")==="true"}catch{return!1}},hie=e=>(e??Sr.general.rememberUser.storage)==="session"?sessionStorage:localStorage,qw=e=>{var o;let t;try{let i=fI(e);(o=i==null?void 0:i.bot)!=null&&o.id&&(t=i.bot.id)}catch{}let r=[`bot-${e}`,`resultId-${e}`];t&&t!==e&&(r.push(`bot-${t}`),r.push(`resultId-${t}`)),[localStorage,sessionStorage].forEach(i=>{Object.keys(i).forEach(a=>{r.some(s=>a.startsWith(s))&&i.removeItem(a)})})};var Ne={progressBar:{position:"--quickbot-progress-bar-position",color:"--quickbot-progress-bar-color",colorRgb:"--quickbot-progress-bar-bg-rgb",height:"--quickbot-progress-bar-height",top:"--quickbot-progress-bar-top",bottom:"--quickbot-progress-bar-bottom"},chat:{container:{fontFamily:"--quickbot-container-font-family",maxWidth:"--quickbot-chat-container-max-width",maxHeight:"--quickbot-chat-container-max-height",bgColor:"--quickbot-chat-container-bg-rgb",bgImage:"--quickbot-chat-container-bg-image",color:"--quickbot-chat-container-color",borderRadius:"--quickbot-chat-container-border-radius",borderWidth:"--quickbot-chat-container-border-width",borderColor:"--quickbot-chat-container-border-rgb",borderOpacity:"--quickbot-chat-container-border-opacity",opacity:"--quickbot-chat-container-opacity",blur:"--quickbot-chat-container-blur",boxShadow:"--quickbot-chat-container-box-shadow"},hostBubbles:{bgColor:"--quickbot-host-bubble-bg-rgb",color:"--quickbot-host-bubble-color",borderRadius:"--quickbot-host-bubble-border-radius",borderWidth:"--quickbot-host-bubble-border-width",borderColor:"--quickbot-host-bubble-border-rgb",borderOpacity:"--quickbot-host-bubble-border-opacity",opacity:"--quickbot-host-bubble-opacity",blur:"--quickbot-host-bubble-blur",boxShadow:"--quickbot-host-bubble-box-shadow"},guestBubbles:{bgColor:"--quickbot-guest-bubble-bg-rgb",color:"--quickbot-guest-bubble-color",borderRadius:"--quickbot-guest-bubble-border-radius",borderWidth:"--quickbot-guest-bubble-border-width",borderColor:"--quickbot-guest-bubble-border-rgb",borderOpacity:"--quickbot-guest-bubble-border-opacity",opacity:"--quickbot-guest-bubble-opacity",blur:"--quickbot-guest-bubble-blur",boxShadow:"--quickbot-guest-bubble-box-shadow"},inputs:{bgColor:"--quickbot-input-bg-rgb",color:"--quickbot-input-color",placeholderColor:"--quickbot-input-placeholder-color",borderRadius:"--quickbot-input-border-radius",borderWidth:"--quickbot-input-border-width",borderColor:"--quickbot-input-border-rgb",borderOpacity:"--quickbot-input-border-opacity",opacity:"--quickbot-input-opacity",blur:"--quickbot-input-blur",boxShadow:"--quickbot-input-box-shadow"},buttons:{bgRgb:"--quickbot-button-bg-rgb",color:"--quickbot-button-color",borderRadius:"--quickbot-button-border-radius",borderWidth:"--quickbot-button-border-width",borderColor:"--quickbot-button-border-rgb",borderOpacity:"--quickbot-button-border-opacity",opacity:"--quickbot-button-opacity",blur:"--quickbot-button-blur",boxShadow:"--quickbot-button-box-shadow"},checkbox:{bgRgb:"--quickbot-checkbox-bg-rgb",alphaRatio:"--selectable-alpha-ratio"}}},vie=(e,t,r)=>{if(!e)return;let n=t==null?void 0:t.style;n&&(CQe(e.progressBar,n,r),SQe(e.chat,n))},CQe=(e,t,r)=>{let n=(e==null?void 0:e.position)??gw;t.setProperty(Ne.progressBar.position,n==="fixed"?r?"absolute":"fixed":n),t.setProperty(Ne.progressBar.color,(e==null?void 0:e.color)??yne),t.setProperty(Ne.progressBar.colorRgb,bs((e==null?void 0:e.backgroundColor)??bne).join(", ")),t.setProperty(Ne.progressBar.height,`${(e==null?void 0:e.thickness)??Ene}px`);let o=(e==null?void 0:e.placement)??xne;t.setProperty(Ne.progressBar.top,o==="Top"?"0":"auto"),t.setProperty(Ne.progressBar.bottom,o==="Bottom"?"0":"auto")},SQe=(e,t)=>{TQe(e==null?void 0:e.container,t,e==null?void 0:e.roundness),PQe(e==null?void 0:e.hostBubbles,t,e==null?void 0:e.roundness),AQe(e==null?void 0:e.guestBubbles,t,e==null?void 0:e.roundness),DQe(e==null?void 0:e.buttons,t,e==null?void 0:e.roundness),kQe(e==null?void 0:e.inputs,t,e==null?void 0:e.roundness),OQe(e==null?void 0:e.container,t)},TQe=(e,t,r)=>{var f,d,p,v;let n=e==null?void 0:e.font;t.setProperty(Ne.chat.container.fontFamily,(typeof n=="string"?n:n==null?void 0:n.family)??rp);let o=e==null?void 0:e.background,i=(o==null?void 0:o.type)??"Color",a=o==null?void 0:o.content,s=(e==null?void 0:e.backgroundColor)??SO;o&&i==="Color"&&a?s=a:o&&i==="None"&&(s="transparent");let l=s==="transparent"||Ei(s),u=ap(s);o&&i==="Image"&&a?t.setProperty(Ne.chat.container.bgImage,`url(${a})`):t.setProperty(Ne.chat.container.bgImage,"none"),t.setProperty(Ne.chat.container.bgColor,l?"0, 0, 0":u.rgb.join(", ")),t.setProperty(Ne.chat.container.color,ip((e==null?void 0:e.color)??hne).join(", ")),t.setProperty(Ne.chat.container.maxWidth,(e==null?void 0:e.maxWidth)??_ne),t.setProperty(Ne.chat.container.maxHeight,(e==null?void 0:e.maxHeight)??Cne);let c=l?0:u.alpha!==1?u.alpha:(e==null?void 0:e.opacity)??mi;t.setProperty(Ne.chat.container.opacity,l?"0":c.toString()),t.setProperty(Ne.chat.container.blur,c===1||l?"0px":`${(e==null?void 0:e.blur)??wne}px`),pv(e==null?void 0:e.shadow,t,Ne.chat.container.boxShadow),fv((e==null?void 0:e.border)??{roundeness:r??sc},t,Ne.chat.container.borderRadius),t.setProperty(Ne.chat.container.borderWidth,tt((f=e==null?void 0:e.border)==null?void 0:f.thickness)?`${(d=e==null?void 0:e.border)==null?void 0:d.thickness}px`:"0"),t.setProperty(Ne.chat.container.borderOpacity,tt((p=e==null?void 0:e.border)==null?void 0:p.opacity)?e.border.opacity.toString():mi.toString()),t.setProperty(Ne.chat.container.borderColor,bs(((v=e==null?void 0:e.border)==null?void 0:v.color)??"").join(", "))},PQe=(e,t,r)=>{var a,s,l,u;let n=(e==null?void 0:e.backgroundColor)??Sne,o=ap(n);t.setProperty(Ne.chat.hostBubbles.bgColor,o.rgb.join(", ")),t.setProperty(Ne.chat.hostBubbles.color,(e==null?void 0:e.color)??Tne),fv((e==null?void 0:e.border)??{roundeness:r??sc},t,Ne.chat.hostBubbles.borderRadius),t.setProperty(Ne.chat.hostBubbles.borderWidth,tt((a=e==null?void 0:e.border)==null?void 0:a.thickness)?`${(s=e==null?void 0:e.border)==null?void 0:s.thickness}px`:"0"),t.setProperty(Ne.chat.hostBubbles.borderColor,bs(((l=e==null?void 0:e.border)==null?void 0:l.color)??"").join(", "));let i=n==="transparent"?0:o.alpha!==1?o.alpha:(e==null?void 0:e.opacity)??mi;t.setProperty(Ne.chat.hostBubbles.opacity,i.toString()),t.setProperty(Ne.chat.hostBubbles.borderOpacity,tt((u=e==null?void 0:e.border)==null?void 0:u.opacity)?e.border.opacity.toString():mi.toString()),t.setProperty(Ne.chat.hostBubbles.blur,tt(e==null?void 0:e.blur)?`${e.blur??0}px`:"none"),pv(e==null?void 0:e.shadow,t,Ne.chat.hostBubbles.boxShadow)},AQe=(e,t,r)=>{var a,s,l,u;let n=(e==null?void 0:e.backgroundColor)??Rne,o=ap(n);t.setProperty(Ne.chat.guestBubbles.bgColor,o.rgb.join(", ")),t.setProperty(Ne.chat.guestBubbles.color,(e==null?void 0:e.color)??Nne),fv((e==null?void 0:e.border)??{roundeness:r??sc},t,Ne.chat.guestBubbles.borderRadius),t.setProperty(Ne.chat.guestBubbles.borderWidth,tt((a=e==null?void 0:e.border)==null?void 0:a.thickness)?`${(s=e==null?void 0:e.border)==null?void 0:s.thickness}px`:"0"),t.setProperty(Ne.chat.guestBubbles.borderColor,bs(((l=e==null?void 0:e.border)==null?void 0:l.color)??"").join(", ")),t.setProperty(Ne.chat.guestBubbles.borderOpacity,tt((u=e==null?void 0:e.border)==null?void 0:u.opacity)?e.border.opacity.toString():mi.toString());let i=n==="transparent"?0:o.alpha!==1?o.alpha:(e==null?void 0:e.opacity)??mi;t.setProperty(Ne.chat.guestBubbles.opacity,i.toString()),t.setProperty(Ne.chat.guestBubbles.blur,tt(e==null?void 0:e.blur)?`${e.blur??0}px`:"none"),pv(e==null?void 0:e.shadow,t,Ne.chat.guestBubbles.boxShadow)},DQe=(e,t,r)=>{var a,s,l,u;let n=(e==null?void 0:e.backgroundColor)??nv,o=ap(n);t.setProperty(Ne.chat.buttons.bgRgb,o.rgb.join(", ")),t.setProperty(Ne.chat.buttons.color,(e==null?void 0:e.color)??Pne),fv((e==null?void 0:e.border)??{roundeness:r??sc},t,Ne.chat.buttons.borderRadius),t.setProperty(Ne.chat.buttons.borderWidth,tt((a=e==null?void 0:e.border)==null?void 0:a.thickness)?`${(s=e==null?void 0:e.border)==null?void 0:s.thickness}px`:`${Ane}px`),t.setProperty(Ne.chat.buttons.borderColor,bs(((l=e==null?void 0:e.border)==null?void 0:l.color)??(e==null?void 0:e.backgroundColor)??nv).join(", ")),t.setProperty(Ne.chat.buttons.borderOpacity,tt((u=e==null?void 0:e.border)==null?void 0:u.opacity)?e.border.opacity.toString():mi.toString());let i=n==="transparent"?0:o.alpha!==1?o.alpha:(e==null?void 0:e.opacity)??mi;t.setProperty(Ne.chat.buttons.opacity,i.toString()),t.setProperty(Ne.chat.buttons.blur,tt(e==null?void 0:e.blur)?`${e.blur??0}px`:"none"),pv(e==null?void 0:e.shadow,t,Ne.chat.buttons.boxShadow)},kQe=(e,t,r)=>{var a,s,l,u;let n=(e==null?void 0:e.backgroundColor)??Dne,o=ap(n);t.setProperty(Ne.chat.inputs.bgColor,o.rgb.join(", ")),t.setProperty(Ne.chat.inputs.color,(e==null?void 0:e.color)??kne),t.setProperty(Ne.chat.inputs.placeholderColor,(e==null?void 0:e.placeholderColor)??One),fv((e==null?void 0:e.border)??{roundeness:r??sc},t,Ne.chat.inputs.borderRadius),t.setProperty(Ne.chat.inputs.borderWidth,tt((a=e==null?void 0:e.border)==null?void 0:a.thickness)?`${(s=e==null?void 0:e.border)==null?void 0:s.thickness}px`:"0"),t.setProperty(Ne.chat.inputs.borderColor,bs(((l=e==null?void 0:e.border)==null?void 0:l.color)??"").join(", ")),t.setProperty(Ne.chat.inputs.borderOpacity,tt((u=e==null?void 0:e.border)==null?void 0:u.opacity)?e.border.opacity.toString():mi.toString());let i=n==="transparent"?0:o.alpha!==1?o.alpha:(e==null?void 0:e.opacity)??mi;t.setProperty(Ne.chat.inputs.opacity,i.toString()),t.setProperty(Ne.chat.inputs.blur,tt(e==null?void 0:e.blur)?`${e.blur??0}px`:"none"),pv((e==null?void 0:e.shadow)??Ine,t,Ne.chat.inputs.boxShadow)},OQe=(e,t)=>{let r=(e==null?void 0:e.backgroundColor)??SO;r==="transparent"||Ei(r)||((e==null?void 0:e.opacity)??mi)<=.2?(t.setProperty(Ne.chat.checkbox.bgRgb,"255, 255, 255"),t.setProperty(Ne.chat.checkbox.alphaRatio,"2")):(t.setProperty(Ne.chat.checkbox.bgRgb,bs(r).concat((e==null?void 0:e.opacity)??1).join(", ")),t.setProperty(Ne.chat.checkbox.alphaRatio,"2"))},fv=(e,t,r)=>{switch((e==null?void 0:e.roundeness)??sc){case"none":{t.setProperty(r,"0");break}case"medium":{t.setProperty(r,"6px");break}case"large":{t.setProperty(r,"20px");break}case"custom":{t.setProperty(r,`${e.customRoundeness??6}px`);break}}},pv=(e,t,r)=>{if(e===void 0){t.setProperty(r,"0 0 #0000");return}switch(e){case"none":t.setProperty(r,"0 0 #0000");break;case"sm":t.setProperty(r,"0 1px 2px 0 rgb(0 0 0 / 0.05)");break;case"md":t.setProperty(r,"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)");break;case"lg":t.setProperty(r,"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)");break;case"xl":t.setProperty(r,"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)");break;case"2xl":t.setProperty(r,"0 25px 50px -12px rgb(0 0 0 / 0.25)");break}};var IQe="https://fonts.bunny.net/css2",zw="bot-font",mI=e=>{var r;let t=document.getElementById(zw);if(typeof e=="string"||e.type==="Google"){let n=(typeof e=="string"?e:e.family)??rp;if((r=t==null?void 0:t.getAttribute("href"))!=null&&r.includes(n))return;t==null||t.remove();let o=document.createElement("link");o.href=`${IQe}?family=${n}:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&display=swap`,o.rel="stylesheet",o.id=zw,document.head.appendChild(o);return}if(e.type==="Custom"){if(yr(e.css)){if((t==null?void 0:t.innerHTML)===e.css)return;t==null||t.remove();let n=document.createElement("style");n.innerHTML=e.css,n.id=zw,document.head.appendChild(n)}if(yr(e.url)){if((t==null?void 0:t.getAttribute("href"))===e.url)return;t==null||t.remove();let n=document.createElement("link");n.href=e.url,n.rel="stylesheet",n.id=zw,document.head.appendChild(n)}}};var RQe=V('<div class="left-0 w-full z-[42424242] progress-bar "><div class="absolute h-full transition-[width] duration-[250ms] ease-in-out progress-bar__fill">'),gI=e=>(()=>{let t=RQe(),r=t.firstChild;return le(()=>`${e.value}%`!=null?r.style.setProperty("width",`${e.value}%`):r.style.removeProperty("width")),t})();var[,yie]=oe();var NQe=V("<style>"),LQe=V('<div class="flex items-center justify-center h-full w-full">'),BQe=V("<div>"),mp=e=>{let[t,r]=oe(),[n,o]=oe(""),[i,a]=oe(!1),[s,l]=oe(!1),[u,c]=oe(),f=async()=>{var b,E,C,x,P,N,D,R;e.font&&mI(e.font),a(!0),l(!0);let d=new URLSearchParams(location.search);(b=e.onInit)==null||b.call(e);let p={};d.forEach((M,I)=>{p[I]=M});let v=typeof e.bot=="string"?e.bot:void 0,h=typeof e.bot!="string"||(e.isPreview??!1),y=mie(v),{data:g,error:m}=await MR({stripeRedirectStatus:d.get("redirect_status")??void 0,bot:e.bot,isPreview:h,resultId:yr(e.resultId)?e.resultId:y,prefilledVariables:{...p,...e.prefilledVariables},startFrom:e.startFrom,sessionId:e.sessionId});if(m instanceof Gi)return l(!1),h?c(new Error("An error occurred while loading the bot.",{cause:{status:m.response.status,body:await m.response.json()}})):m.response.status===400||m.response.status===403?c(new Error("This bot is now closed.")):m.response.status===404?c(new Error("The bot you're looking for doesn't exist.")):c(new Error(`Error! Couldn't initiate the chat. (${m.response.statusText})`));if(m instanceof Cc)return l(!1),c(new Error(m.message));if(!g)return l(!1),m&&(console.error(m),h)?c(new Error("Error! Could not reach server. Check your connection.",{cause:m})):c(new Error("Error! Could not reach server. Check your connection."));if(g.resultId&&v&&(((C=(E=g.bot.settings.general)==null?void 0:E.rememberUser)==null?void 0:C.isEnabled)??Sr.general.rememberUser.isEnabled)){y&&y!==g.resultId&&qw(v);let M=((P=(x=g.bot.settings.general)==null?void 0:x.rememberUser)==null?void 0:P.storage)??Sr.general.rememberUser.storage;gie(M)(v,g.resultId);let I=fI(v);I&&I.bot.publishedAt&&g.bot.publishedAt?new Date(I.bot.publishedAt).getTime()===new Date(g.bot.publishedAt).getTime()?r(g):(qw(v),r(g),pI(g,{botId:v,storage:M})):(r(g),pI(g,{botId:v,storage:M})),(N=e.onChatStatePersisted)==null||N.call(e,!0)}else qw(v||g.bot.id),r(g),g.logs&&((D=e.onNewLogs)==null||D.call(e,g.logs)),(R=e.onChatStatePersisted)==null||R.call(e,!1);o(g.bot.theme.customCss??""),l(!1)};return mt(()=>{ur(e.bot)||i()||f().then()}),mt(()=>{var d,p,v;ur(e.bot)||typeof e.bot=="string"||(o(e.bot.theme.customCss??""),(d=e.bot.theme.progressBar)!=null&&d.isEnabled&&t()&&!((v=(p=t())==null?void 0:p.bot.theme.progressBar)!=null&&v.isEnabled)&&(a(!1),f().then()))}),dt(()=>{a(!1)}),[(()=>{let d=NQe();return W(d,n),d})(),T(ve,{get when(){return u()},keyed:!0,children:d=>T(pie,{error:d})}),T(ve,{get when(){return Ee(()=>!!s())()&&!u()},get children(){let d=LQe();return W(d,T(np,{class:"h-8 w-8 text-blue-500"})),d}}),T(ve,{get when(){return t()},keyed:!0,children:d=>T(FQe,{get class(){return e.class},get initialChatReply(){var p,v,h,y;return{...d,bot:{...d.bot,settings:typeof e.bot=="string"?(p=d.bot)==null?void 0:p.settings:(v=e.bot)==null?void 0:v.settings,theme:typeof e.bot=="string"?(h=d.bot)==null?void 0:h.theme:(y=e.bot)==null?void 0:y.theme}}},get context(){var p,v,h,y;return{isPreview:typeof e.bot!="string"||(e.isPreview??!1),resultId:d.resultId,sessionId:d.sessionId,bot:d.bot,storage:(v=(p=d.bot.settings.general)==null?void 0:p.rememberUser)!=null&&v.isEnabled&&!(typeof e.bot!="string"||(e.isPreview??!1))?((y=(h=d.bot.settings.general)==null?void 0:h.rememberUser)==null?void 0:y.storage)??Sr.general.rememberUser.storage:void 0}},get progressBarRef(){return e.progressBarRef},get onNewBlock(){return e.onNewBlock},get onNewLogs(){return e.onNewLogs},get onAnswer(){return e.onAnswer},get onEnd(){return e.onEnd},get onBubblesDisplayed(){return e.onBubblesDisplayed}})})]},FQe=e=>{let[t,r]=Ps(oe(e.initialChatReply.progress),{storage:e.context.storage,key:`bot-${e.context.bot.id}-progressValue`}),[n,o]=oe(!1),i,a=new ResizeObserver(s=>SN(s[0].target.clientWidth<400));return et(()=>{i&&(yie(i),a.observe(i),AN(`${i.clientHeight}px`),vie(e.initialChatReply.bot.theme,i,e.context.isPreview),o(!0))}),mt(()=>{var s,l;mI(((l=(s=e.initialChatReply.bot.theme.chat)==null?void 0:s.container)==null?void 0:l.font)??{type:vne,family:rp})}),dt(()=>{i&&a.unobserve(i)}),(()=>{let s=BQe(),l=i;return typeof l=="function"?lt(l,s):i=s,W(s,T(ve,{get when(){var u;return tt(t())&&((u=e.initialChatReply.bot.theme.progressBar)==null?void 0:u.isEnabled)},get children(){return T(ve,{get when(){var u;return e.progressBarRef&&(((u=e.initialChatReply.bot.theme.progressBar)==null?void 0:u.position)??gw)==="fixed"},get fallback(){return T(gI,{get value(){return t()}})},get children(){return T(pR,{get mount(){return e.progressBarRef},get children(){return T(gI,{get value(){return t()}})}})}})}}),null),W(s,T(ve,{get when(){return n()},get children(){return T(fie,{botContainer:i,get context(){return e.context},get initialChatReply(){return e.initialChatReply},get onNewBlock(){return e.onNewBlock},get onAnswer(){return e.onAnswer},get onEnd(){return e.onEnd},get onNewLogs(){return e.onNewLogs},onProgressUpdate:r,get onBubblesDisplayed(){return e.onBubblesDisplayed}})}}),null),W(s,T(fne,{toaster:Dl,children:u=>T(rv.Root,{get children(){return[T(rv.Title,{get children(){return u().title}}),T(rv.Description,{get children(){return u().description}}),T(rv.CloseTrigger,{class:"absolute right-2 top-2",get children(){return T(Gn,{class:"w-4"})}})]}})}),null),le(()=>we(s,nt("h-full w-full flex flex-col quickbot",e.class))),s})()};var MQe=V("<style>"),$Qe=V("<div>"),UQe=V('<div part="bot">'),Eie=e=>{var R,M,I,B;let[t,r]=Dr(e,["onOpen","onClose","previewMessage","onPreviewMessageClick","theme","autoShowDelay"]),[n,o]=oe(!0),[i,a]=oe(r.prefilledVariables),[s,l]=oe(!1),[u,c]=oe({message:((R=t.previewMessage)==null?void 0:R.message)??"",avatarUrl:(M=t.previewMessage)==null?void 0:M.avatarUrl}),[f,d]=oe(!1),[p,v]=oe(!1),[h,y]=oe(bie(((B=(I=t.theme)==null?void 0:I.button)==null?void 0:B.size)??"medium"));mt(()=>{var L,U;y(bie(((U=(L=t.theme)==null?void 0:L.button)==null?void 0:U.size)??"medium"))});let g;Tn(L=>{let{data:U}=L;U.command==="open"&&m(),U.command==="close"&&b(),U.command==="toggle"&&E(),U.command==="showPreviewMessage"&&x(U.message),U.command==="hidePreviewMessage"&&P(),U.command==="setPrefilledVariables"&&a(K=>({...K,...U.variables})),U.command==="unmount"&&N()}),et(()=>{var K;let L=t.autoShowDelay,U=(K=t.previewMessage)==null?void 0:K.autoShowDelay;(jw()||wc())&&m(),tt(L)&&setTimeout(()=>{m()},L),tt(U)&&setTimeout(()=>{x()},U)}),mt(()=>{e.prefilledVariables&&a(L=>({...L,...e.prefilledVariables}))});let m=()=>{var L;p()||v(!0),P(),d(!0),f()&&((L=t.onOpen)==null||L.call(t))},b=()=>{var L;d(!1),Uw(),f()&&((L=t.onClose)==null||L.call(t))},E=()=>{f()?b():m()},C=()=>{var L;(L=t.onPreviewMessageClick)==null||L.call(t),m()},x=L=>{L&&c(L),!f()&&l(!0)},P=()=>{l(!1)},N=()=>{f()?(b(),setTimeout(()=>{o(!1)},200)):o(!1)},D=L=>{var U;(U=r.onChatStatePersisted)==null||U.call(r,L),L&&$w()};return T(ve,{get when(){return n()},get children(){return T(Qf,{get value(){var L;return(L=document.querySelector("bot-bubble"))==null?void 0:L.shadowRoot},get children(){return[(()=>{let L=MQe();return W(L,Fl),L})(),T(ve,{get when(){return s()},get children(){return T(CR,kt(u,{get placement(){var L;return(L=t.theme)==null?void 0:L.placement},get previewMessageTheme(){var L;return(L=t.theme)==null?void 0:L.previewMessage},get buttonSize(){return h()},onClick:C,onCloseClick:P}))}}),T(xR,kt(()=>{var L;return(L=t.theme)==null?void 0:L.button},{get placement(){var L;return(L=t.theme)==null?void 0:L.placement},toggleBot:E,get isBotOpened(){return f()},get buttonSize(){return h()}})),(()=>{let L=$Qe(),U=g;return typeof U=="function"?lt(U,L):g=L,L})(),(()=>{let L=UQe();return L.style.setProperty("transition","transform 200ms cubic-bezier(0, 1.2, 1, 1), opacity 150ms ease-out"),L.style.setProperty("box-shadow","rgb(0 0 0 / 16%) 0px 5px 40px"),L.style.setProperty("z-index","42424242"),W(L,T(ve,{get when(){return p()},get children(){return T(mp,kt(r,{onChatStatePersisted:D,get prefilledVariables(){return i()},class:"rounded-lg",progressBarRef:g}))}})),le(U=>{var be,Oe,Te,Ke,je,G,ne,te;let K=`calc(100% - ${h()} - 32px)`,z=((Oe=(be=e.theme)==null?void 0:be.chatWindow)==null?void 0:Oe.maxHeight)??"704px",ae=((Ke=(Te=e.theme)==null?void 0:Te.chatWindow)==null?void 0:Ke.maxWidth)??"400px",ie=((je=e.theme)==null?void 0:je.placement)==="left"?"bottom left":"bottom right",O=f()?"scale3d(1, 1, 1)":"scale3d(0, 0, 1)",J=(ne=(G=t.theme)==null?void 0:G.chatWindow)==null?void 0:ne.backgroundColor,ue=`calc(${h()} + 32px)`,k="fixed rounded-lg w-full"+(f()?" opacity-1":" opacity-0 pointer-events-none")+(((te=e.theme)==null?void 0:te.placement)==="left"?" left-5":" sm:right-5 right-0");return K!==U._v$&&((U._v$=K)!=null?L.style.setProperty("height",K):L.style.removeProperty("height")),z!==U._v$2&&((U._v$2=z)!=null?L.style.setProperty("max-height",z):L.style.removeProperty("max-height")),ae!==U._v$3&&((U._v$3=ae)!=null?L.style.setProperty("max-width",ae):L.style.removeProperty("max-width")),ie!==U._v$4&&((U._v$4=ie)!=null?L.style.setProperty("transform-origin",ie):L.style.removeProperty("transform-origin")),O!==U._v$5&&((U._v$5=O)!=null?L.style.setProperty("transform",O):L.style.removeProperty("transform")),J!==U._v$6&&((U._v$6=J)!=null?L.style.setProperty("background-color",J):L.style.removeProperty("background-color")),ue!==U._v$7&&((U._v$7=ue)!=null?L.style.setProperty("bottom",ue):L.style.removeProperty("bottom")),k!==U._v$8&&we(L,U._v$8=k),U},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0}),L})()]}})}})},bie=e=>e==="medium"?"48px":e==="large"?"64px":e||"48px";var jQe=V("<style>"),qQe=V('<div class="relative" aria-labelledby="modal-title" role="dialog" aria-modal="true"><style></style><div class="fixed inset-0 bg-black bg-opacity-50 transition-opacity animate-fade-in" part="overlay"></div><div class="fixed inset-0 z-10 overflow-y-auto"><div class="flex min-h-full items-center justify-center p-4 text-center sm:p-0"><div>'),xie=e=>{let[t,r]=Dr(e,["onOpen","onClose","autoShowDelay","theme","isOpen","defaultOpen"]),[n,o]=oe(r.prefilledVariables),[i,a]=oe(t.isOpen??!1);Tn(d=>{let{data:p}=d;p.command==="open"&&l(),p.command==="close"&&u(),p.command==="toggle"&&c(),p.command==="setPrefilledVariables"&&o(v=>({...v,...p.variables}))}),et(()=>{(t.defaultOpen||wc()||jw())&&l();let d=t.autoShowDelay;tt(d)&&setTimeout(()=>{l()},d)}),mt(()=>{ur(e.isOpen)||e.isOpen===i()||c()}),mt(()=>{e.prefilledVariables&&o(d=>({...d,...e.prefilledVariables}))});let s=d=>{d.stopPropagation()},l=()=>{var d;a(!0),(d=t.onOpen)==null||d.call(t),document.body.style.setProperty("overflow","hidden","important"),document.addEventListener("pointerdown",u)},u=()=>{var d;a(!1),(d=t.onClose)==null||d.call(t),document.body.style.overflow="auto",document.removeEventListener("pointerdown",u),Uw()},c=()=>i()?u():l(),f=d=>{var p;(p=r.onChatStatePersisted)==null||p.call(r,d),d&&$w()};return T(ve,{get when(){return i()},get children(){return T(Qf,{get value(){var d;return(d=document.querySelector("quickbot-popup"))==null?void 0:d.shadowRoot},get children(){return[(()=>{let d=jQe();return W(d,Fl),d})(),(()=>{let d=qQe(),p=d.firstChild,v=p.nextSibling,h=v.nextSibling,y=h.firstChild,g=y.firstChild;return W(p,Fl),g.addEventListener("pointerdown",s),W(g,T(mp,kt(r,{get prefilledVariables(){return n()},onChatStatePersisted:f}))),le(m=>{var P,N,D,R;let b=((P=e.theme)==null?void 0:P.zIndex)??42424242,E="relative h-[80vh] transform overflow-hidden rounded-lg text-left transition-all sm:my-8 w-full max-w-lg"+((N=e.theme)!=null&&N.backgroundColor?" shadow-xl":""),C=((D=e.theme)==null?void 0:D.backgroundColor)??"transparent",x=((R=e.theme)==null?void 0:R.width)??"512px";return b!==m._v$&&((m._v$=b)!=null?d.style.setProperty("z-index",b):d.style.removeProperty("z-index")),E!==m._v$2&&we(g,m._v$2=E),C!==m._v$3&&((m._v$3=C)!=null?g.style.setProperty("background-color",C):g.style.removeProperty("background-color")),x!==m._v$4&&((m._v$4=x)!=null?g.style.setProperty("max-width",x):g.style.removeProperty("max-width")),m},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),d})()]}})}})};var zQe=V(`<style>
|
|
145
|
-
:host {
|
|
146
|
-
display: block;
|
|
147
|
-
width: 100%;
|
|
148
|
-
height: 100%;
|
|
149
|
-
overflow-y: hidden;
|
|
150
|
-
}
|
|
151
|
-
`);var wie=(e,{element:t})=>{let[r,n]=oe(!1),o=()=>{n(!0)},i=new IntersectionObserver(a=>{a.some(s=>s.isIntersecting)&&o()});return Tn(()=>{}),et(()=>{i.observe(t)}),dt(()=>{i.disconnect()}),T(Qf,{get value(){var a;return(a=document.querySelector("quickbot-standard"))==null?void 0:a.shadowRoot},get children(){return[(()=>{let a=zQe(),s=a.firstChild;return W(a,Fl,s),a})(),T(ve,{get when(){return r()},get children(){return T(mp,e)}})]}})};var _ie=()=>{typeof window>"u"||(kv("quickbot-standard",Ov,wie),kv("bot-bubble",hR,Eie),kv("quickbot-popup",gR,xie))};var Cie=()=>{let e={isFromBot:!0,command:"close"};window.postMessage(e)};var Sie=()=>{let e={isFromBot:!0,command:"hidePreviewMessage"};window.postMessage(e)};var Tie=()=>{let e={isFromBot:!0,command:"open"};window.postMessage(e)};var Pie=e=>{let t={isFromBot:!0,command:"setPrefilledVariables",variables:e};window.postMessage(t)};var Aie=e=>{let t={isFromBot:!0,command:"showPreviewMessage",message:e};window.postMessage(t)};var Die=()=>{let e={isFromBot:!0,command:"toggle"};window.postMessage(e)};var kie=e=>{let t={isFromBot:!0,command:"setInputValue",value:e};window.postMessage(t)};var Oie=()=>{let e={isFromBot:!0,command:"unmount"};window.postMessage(e)};var VQe=e=>{let t=e.id?document.getElementById(e.id):document.querySelector("quickbot-standard");if(!t)throw new Error("<quickbot-standard> element not found.");Object.assign(t,e)},HQe=e=>{let t=document.createElement("quickbot-popup");Object.assign(t,e),document.body.prepend(t)},WQe=e=>{let t=document.createElement("bot-bubble");Object.assign(t,e),document.body.prepend(t)},Iie=()=>({initStandard:VQe,initPopup:HQe,initBubble:WQe,close:Cie,hidePreviewMessage:Sie,open:Tie,setPrefilledVariables:Pie,showPreviewMessage:Aie,toggle:Die,setInputValue:kie,unmount:Oie}),Rie=e=>{typeof window>"u"||(window.Bot={...e})};_ie();var Nie=Iie();Rie(Nie);var L9t=Nie;export{L9t as default};
|
|
152
|
-
/*! Bundled license information:
|
|
153
|
-
|
|
154
|
-
react/cjs/react.production.min.js:
|
|
155
|
-
(**
|
|
156
|
-
* @license React
|
|
157
|
-
* react.production.min.js
|
|
158
|
-
*
|
|
159
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
160
|
-
*
|
|
161
|
-
* This source code is licensed under the MIT license found in the
|
|
162
|
-
* LICENSE file in the root directory of this source tree.
|
|
163
|
-
*)
|
|
164
|
-
|
|
165
|
-
react/cjs/react-jsx-runtime.production.min.js:
|
|
166
|
-
(**
|
|
167
|
-
* @license React
|
|
168
|
-
* react-jsx-runtime.production.min.js
|
|
169
|
-
*
|
|
170
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
171
|
-
*
|
|
172
|
-
* This source code is licensed under the MIT license found in the
|
|
173
|
-
* LICENSE file in the root directory of this source tree.
|
|
174
|
-
*)
|
|
175
|
-
|
|
176
|
-
scheduler/cjs/scheduler.production.min.js:
|
|
177
|
-
(**
|
|
178
|
-
* @license React
|
|
179
|
-
* scheduler.production.min.js
|
|
180
|
-
*
|
|
181
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
182
|
-
*
|
|
183
|
-
* This source code is licensed under the MIT license found in the
|
|
184
|
-
* LICENSE file in the root directory of this source tree.
|
|
185
|
-
*)
|
|
186
|
-
|
|
187
|
-
react-dom/cjs/react-dom.production.min.js:
|
|
188
|
-
(**
|
|
189
|
-
* @license React
|
|
190
|
-
* react-dom.production.min.js
|
|
191
|
-
*
|
|
192
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
193
|
-
*
|
|
194
|
-
* This source code is licensed under the MIT license found in the
|
|
195
|
-
* LICENSE file in the root directory of this source tree.
|
|
196
|
-
*)
|
|
197
|
-
|
|
198
|
-
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
|
199
|
-
(**
|
|
200
|
-
* @license React
|
|
201
|
-
* use-sync-external-store-shim.production.js
|
|
202
|
-
*
|
|
203
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
204
|
-
*
|
|
205
|
-
* This source code is licensed under the MIT license found in the
|
|
206
|
-
* LICENSE file in the root directory of this source tree.
|
|
207
|
-
*)
|
|
208
|
-
|
|
209
|
-
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
|
|
210
|
-
(**
|
|
211
|
-
* @license React
|
|
212
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
213
|
-
*
|
|
214
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
215
|
-
*
|
|
216
|
-
* This source code is licensed under the MIT license found in the
|
|
217
|
-
* LICENSE file in the root directory of this source tree.
|
|
218
|
-
*)
|
|
219
|
-
|
|
220
|
-
prismjs/prism.js:
|
|
221
|
-
(**
|
|
222
|
-
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
223
|
-
*
|
|
224
|
-
* @license MIT <https://opensource.org/licenses/MIT>
|
|
225
|
-
* @author Lea Verou <https://lea.verou.me>
|
|
226
|
-
* @namespace
|
|
227
|
-
* @public
|
|
228
|
-
*)
|
|
229
|
-
|
|
230
|
-
escape-html/index.js:
|
|
231
|
-
(*!
|
|
232
|
-
* escape-html
|
|
233
|
-
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
234
|
-
* Copyright(c) 2015 Andreas Lubbe
|
|
235
|
-
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
236
|
-
* MIT Licensed
|
|
237
|
-
*)
|
|
238
|
-
|
|
239
|
-
dompurify/dist/purify.js:
|
|
240
|
-
(*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE *)
|
|
241
|
-
|
|
242
|
-
ky/distribution/index.js:
|
|
243
|
-
(*! MIT License © Sindre Sorhus *)
|
|
244
|
-
|
|
245
|
-
is-plain-object/dist/is-plain-object.mjs:
|
|
246
|
-
(*!
|
|
247
|
-
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
248
|
-
*
|
|
249
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
250
|
-
* Released under the MIT License.
|
|
251
|
-
*)
|
|
252
|
-
|
|
253
|
-
tabbable/dist/index.esm.js:
|
|
254
|
-
(*!
|
|
255
|
-
* tabbable 6.4.0
|
|
256
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
257
|
-
*)
|
|
258
|
-
|
|
259
|
-
focus-trap/dist/focus-trap.esm.js:
|
|
260
|
-
(*!
|
|
261
|
-
* focus-trap 7.5.4
|
|
262
|
-
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
263
|
-
*)
|
|
264
|
-
*/
|
|
1
|
+
// v1.0.0-beta
|
|
2
|
+
function e(e){return Object.keys(e).reduce((t,n)=>{const o=e[n];var a;return t[n]=Object.assign({},o),r(o.value)&&(a=o.value,"[object Function]"!==Object.prototype.toString.call(a))&&!Array.isArray(o.value)&&(t[n].value=Object.assign({},o.value)),Array.isArray(o.value)&&(t[n].value=o.value.slice(0)),t},{})}function t(e){if(e)try{return JSON.parse(e)}catch(t){return e}}function n(e,t,n,r){if(null==n||!1===n)return e.removeAttribute(t);let o=r?JSON.stringify(n):n;e.__updating[t]=!0,"true"===o&&(o=""),e.setAttribute(t,o),Promise.resolve().then(()=>delete e.__updating[t])}function r(e){return null!=e&&("object"==typeof e||"function"==typeof e)}let o;function a(r,a){const i=Object.keys(a);return class extends r{static get observedAttributes(){return i.map(e=>a[e].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={};for(let e of i)this[e]=void 0}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=function(r,o){const a=e(o);return Object.keys(o).forEach(e=>{const o=a[e],i=r.getAttribute(o.attribute),s=r[e];null!=i&&(o.value=o.parse?t(i):i),null!=s&&(o.value=Array.isArray(s)?s.slice(0):s),o.reflect&&n(r,o.attribute,o.value,!!o.parse),Object.defineProperty(r,e,{get:()=>o.value,set(t){const r=o.value;o.value=t,o.reflect&&n(this,o.attribute,o.value,!!o.parse);for(let n=0,o=this.__propertyChangedCallbacks.length;n<o;n++)this.__propertyChangedCallbacks[n](e,t,r)},enumerable:!0,configurable:!0})}),a}(this,a);const r=function(e){return Object.keys(e).reduce((t,n)=>(t[n]=e[n].value,t),{})}(this.props),i=this.Component,s=o;try{o=this,this.__initialized=!0,"function"==typeof(l=i)&&0===l.toString().indexOf("class")?new i(r,{element:this}):i(r,{element:this})}finally{o=s}var l}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let e=null;for(;e=this.__releaseCallbacks.pop();)e(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(e,n,r){if(this.__initialized&&!this.__updating[e]&&(e=this.lookupProp(e))in a){if(null==r&&!this[e])return;this[e]=a[e].parse?t(r):r}}lookupProp(e){if(a)return i.find(t=>e===t||e===a[t].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(e){this.__releaseCallbacks.push(e)}addPropertyChangedCallback(e){this.__propertyChangedCallbacks.push(e)}}}function i(e,t={},n={}){const{BaseElement:o=HTMLElement,extension:i,customElements:s=window.customElements}=n;return n=>{if(!e)throw new Error("tag is required to register a Component");let l=s.get(e);return l?(l.prototype.Component=n,l):(l=a(o,function(e){return e?Object.keys(e).reduce((t,n)=>{const o=e[n];return t[n]=r(o)&&"value"in o?o:{value:o},t[n].attribute||(t[n].attribute=n.replace(/\.?([A-Z]+)/g,(e,t)=>"-"+t.toLowerCase()).replace("_","-").replace(/^-/,"")),t[n].parse="parse"in t[n]?t[n].parse:"string"!=typeof t[n].value,t},{}):{}}(t)),l.prototype.Component=n,l.prototype.registeredTag=e,s.define(e,l,i),l)}}const s={context:void 0},l=Symbol("solid-proxy"),c=Symbol("solid-track"),d={equals:(e,t)=>e===t};let u=N;const p=1,g=2,b={owned:null,cleanups:null,context:null,owner:null};var h=null;let f=null,m=null,y=null,v=null,w=0;const[x,_]=S(!1);function k(e,t){const n=m,r=h,o=0===e.length,a=o?b:{owned:null,cleanups:null,context:null,owner:void 0===t?r:t},i=o?e:()=>e(()=>P(()=>W(a)));h=a,m=null;try{return F(i,!0)}finally{m=n,h=r}}function S(e,t){const n={value:e,observers:null,observerSlots:null,comparator:(t=t?Object.assign({},d,t):d).equals||void 0};return[R.bind(n),e=>("function"==typeof e&&(e=e(n.value)),D(n,e))]}function T(e,t,n){L(q(e,t,!1,p))}function C(e,t,n){u=z;const r=q(e,t,!1,p);n&&n.render||(r.user=!0),v?v.push(r):L(r)}function $(e,t,n){n=n?Object.assign({},d,n):d;const r=q(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,L(r),R.bind(r)}function P(e){if(null===m)return e();const t=m;m=null;try{return e()}finally{m=t}}function I(e,t,n){const r=Array.isArray(e);let o;return n=>{let a;if(r){a=Array(e.length);for(let t=0;t<e.length;t++)a[t]=e[t]()}else a=e();const i=P(()=>t(a,o,n));return o=a,i}}function E(e){C(()=>P(e))}function A(e){return null===h||(null===h.cleanups?h.cleanups=[e]:h.cleanups.push(e)),e}function B(){return h}function M(e,t){const n=Symbol("context");return{id:n,Provider:J(n),defaultValue:e}}function U(e){let t;return void 0!==(t=K(h,e.id))?t:e.defaultValue}function O(e){const t=$(e),n=$(()=>Y(t()));return n.toArray=()=>{const e=n();return Array.isArray(e)?e:null!=e?[e]:[]},n}function R(){if(this.sources&&this.state)if(this.state===p)L(this);else{const e=y;y=null,F(()=>V(this),!1),y=e}if(m){const e=this.observers?this.observers.length:0;m.sources?(m.sources.push(this),m.sourceSlots.push(e)):(m.sources=[this],m.sourceSlots=[e]),this.observers?(this.observers.push(m),this.observerSlots.push(m.sources.length-1)):(this.observers=[m],this.observerSlots=[m.sources.length-1])}return this.value}function D(e,t,n){let r=e.value;return e.comparator&&e.comparator(r,t)||(e.value=t,e.observers&&e.observers.length&&F(()=>{for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t],r=f&&f.running;r&&f.disposed.has(n),(r?n.tState:n.state)||(n.pure?y.push(n):v.push(n),n.observers&&H(n)),r||(n.state=p)}if(y.length>1e6)throw y=[],new Error},!1)),t}function L(e){if(!e.fn)return;W(e);const t=h,n=m,r=w;m=h=e,function(e,t,n){let r;try{r=e.fn(t)}catch(t){return e.pure&&(e.state=p,e.owned&&e.owned.forEach(W),e.owned=null),e.updatedAt=n+1,G(t)}(!e.updatedAt||e.updatedAt<=n)&&(null!=e.updatedAt&&"observers"in e?D(e,r):e.value=r,e.updatedAt=n)}(e,e.value,r),m=n,h=t}function q(e,t,n,r=p,o){const a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:h,context:null,pure:n};return null===h||h!==b&&(h.owned?h.owned.push(a):h.owned=[a]),a}function j(e){if(0===e.state)return;if(e.state===g)return V(e);if(e.suspense&&P(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<w);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if((e=t[n]).state===p)L(e);else if(e.state===g){const n=y;y=null,F(()=>V(e,t[0]),!1),y=n}}function F(e,t){if(y)return e();let n=!1;t||(y=[]),v?n=!0:v=[],w++;try{const t=e();return function(e){y&&(N(y),y=null);if(e)return;const t=v;v=null,t.length&&F(()=>u(t),!1)}(n),t}catch(e){n||(v=null),y=null,G(e)}}function N(e){for(let t=0;t<e.length;t++)j(e[t])}function z(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:j(r)}for(t=0;t<n;t++)j(e[t])}function V(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const e=r.state;e===p?r!==t&&(!r.updatedAt||r.updatedAt<w)&&j(r):e===g&&V(r,t)}}}function H(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=g,n.pure?y.push(n):v.push(n),n.observers&&H(n))}}function W(e){let t;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){const e=r.pop(),o=t.observerSlots.pop();n<r.length&&(e.sourceSlots[o]=n,r[n]=e,t.observerSlots[n]=o)}}if(e.owned){for(t=e.owned.length-1;t>=0;t--)W(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function G(e,t=h){const n=function(e){return e instanceof Error?e:new Error("string"==typeof e?e:"Unknown error",{cause:e})}(e);throw n}function K(e,t){return e?e.context&&void 0!==e.context[t]?e.context[t]:K(e.owner,t):void 0}function Y(e){if("function"==typeof e&&!e.length)return Y(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=Y(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function J(e,t){return function(t){let n;return T(()=>n=P(()=>(h.context={[e]:t.value},O(()=>t.children))),void 0),n}}const Z=Symbol("fallback");function X(e){for(let t=0;t<e.length;t++)e[t]()}function Q(e,t){return P(()=>e(t||{}))}function ee(){return!0}const te={get:(e,t,n)=>t===l?n:e.get(t),has:(e,t)=>t===l||e.has(t),set:ee,deleteProperty:ee,getOwnPropertyDescriptor:(e,t)=>({configurable:!0,enumerable:!0,get:()=>e.get(t),set:ee,deleteProperty:ee}),ownKeys:e=>e.keys()};function ne(e){return(e="function"==typeof e?e():e)?e:{}}function re(){for(let e=0,t=this.length;e<t;++e){const t=this[e]();if(void 0!==t)return t}}function oe(...e){let t=!1;for(let n=0;n<e.length;n++){const r=e[n];t=t||!!r&&l in r,e[n]="function"==typeof r?(t=!0,$(r)):r}if(t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const r=ne(e[n])[t];if(void 0!==r)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in ne(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(ne(e[n])));return[...new Set(t)]}},te);const n={},r={},o=new Set;for(let t=e.length-1;t>=0;t--){const a=e[t];if(!a)continue;const i=Object.getOwnPropertyNames(a);for(let e=0,t=i.length;e<t;e++){const t=i[e];if("__proto__"===t||"constructor"===t)continue;const s=Object.getOwnPropertyDescriptor(a,t);if(o.has(t)){const e=r[t];e?s.get?e.push(s.get.bind(a)):void 0!==s.value&&e.push(()=>s.value):void 0===n[t]&&(n[t]=s.value)}else s.get?(o.add(t),Object.defineProperty(n,t,{enumerable:!0,configurable:!0,get:re.bind(r[t]=[s.get.bind(a)])})):(void 0!==s.value&&o.add(t),n[t]=s.value)}}return n}function ae(e,...t){if(l in e){const n=new Set(t.length>1?t.flat():t[0]),r=t.map(t=>new Proxy({get:n=>t.includes(n)?e[n]:void 0,has:n=>t.includes(n)&&n in e,keys:()=>t.filter(t=>t in e)},te));return r.push(new Proxy({get:t=>n.has(t)?void 0:e[t],has:t=>!n.has(t)&&t in e,keys:()=>Object.keys(e).filter(e=>!n.has(e))},te)),r}const n={},r=t.map(()=>({}));for(const o of Object.getOwnPropertyNames(e)){const a=Object.getOwnPropertyDescriptor(e,o),i=!a.get&&!a.set&&a.enumerable&&a.writable&&a.configurable;let s=!1,l=0;for(const e of t)e.includes(o)&&(s=!0,i?r[l][o]=a.value:Object.defineProperty(r[l],o,a)),++l;s||(i?n[o]=a.value:Object.defineProperty(n,o,a))}return[...r,n]}let ie=0;const se=e=>`Stale read from <${e}>.`;function le(e){const t="fallback"in e&&{fallback:()=>e.fallback};return $(function(e,t,n={}){let r=[],o=[],a=[],i=0,s=t.length>1?[]:null;return A(()=>X(a)),()=>{let l,d,u=e()||[];return u[c],P(()=>{let e,t,c,g,b,h,f,m,y,v=u.length;if(0===v)0!==i&&(X(a),a=[],r=[],o=[],i=0,s&&(s=[])),n.fallback&&(r=[Z],o[0]=k(e=>(a[0]=e,n.fallback())),i=1);else if(0===i){for(o=new Array(v),d=0;d<v;d++)r[d]=u[d],o[d]=k(p);i=v}else{for(c=new Array(v),g=new Array(v),s&&(b=new Array(v)),h=0,f=Math.min(i,v);h<f&&r[h]===u[h];h++);for(f=i-1,m=v-1;f>=h&&m>=h&&r[f]===u[m];f--,m--)c[m]=o[f],g[m]=a[f],s&&(b[m]=s[f]);for(e=new Map,t=new Array(m+1),d=m;d>=h;d--)y=u[d],l=e.get(y),t[d]=void 0===l?-1:l,e.set(y,d);for(l=h;l<=f;l++)y=r[l],d=e.get(y),void 0!==d&&-1!==d?(c[d]=o[l],g[d]=a[l],s&&(b[d]=s[l]),d=t[d],e.set(y,d)):a[l]();for(d=h;d<v;d++)d in c?(o[d]=c[d],a[d]=g[d],s&&(s[d]=b[d],s[d](d))):o[d]=k(p);o=o.slice(0,i=v),r=u.slice(0)}return o});function p(e){if(a[d]=e,s){const[e,n]=S(d);return s[d]=n,t(u[d],e)}return t(u[d])}}}(()=>e.each,e.children,t||void 0))}function ce(e){const t="fallback"in e&&{fallback:()=>e.fallback};return $(function(e,t,n={}){let r,o=[],a=[],i=[],s=[],l=0;return A(()=>X(i)),()=>{const d=e()||[];return d[c],P(()=>{if(0===d.length)return 0!==l&&(X(i),i=[],o=[],a=[],l=0,s=[]),n.fallback&&(o=[Z],a[0]=k(e=>(i[0]=e,n.fallback())),l=1),a;for(o[0]===Z&&(i[0](),i=[],o=[],a=[],l=0),r=0;r<d.length;r++)r<o.length&&o[r]!==d[r]?s[r](()=>d[r]):r>=o.length&&(a[r]=k(u));for(;r<o.length;r++)i[r]();return l=s.length=i.length=d.length,o=d.slice(0),a=a.slice(0,l)});function u(e){i[r]=e;const[n,o]=S(d[r]);return s[r]=o,t(n,r)}}}(()=>e.each,e.children,t||void 0))}function de(e){const t=e.keyed,n=$(()=>e.when,void 0,{equals:(e,n)=>t?e===n:!e==!n});return $(()=>{const r=n();if(r){const o=e.children;return"function"==typeof o&&o.length>0?P(()=>o(t?r:()=>{if(!P(n))throw se("Show");return e.when})):o}return e.fallback},void 0,void 0)}function ue(e){let t=!1;const n=O(()=>e.children),r=$(()=>{let e=n();Array.isArray(e)||(e=[e]);for(let n=0;n<e.length;n++){const r=e[n].when;if(r)return t=!!e[n].keyed,[n,r,e[n]]}return[-1]},void 0,{equals:(e,n)=>e[0]===n[0]&&(t?e[1]===n[1]:!e[1]==!n[1])&&e[2]===n[2]});return $(()=>{const[n,o,a]=r();if(n<0)return e.fallback;const i=a.children;return"function"==typeof i&&i.length>0?P(()=>i(t?o:()=>{if(P(r)[0]!==n)throw se("Match");return a.when})):i},void 0,void 0)}function pe(e){return e}const ge=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline","allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"]),be=new Set(["innerHTML","textContent","innerText","children"]),he=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),fe=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});const me=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),ye={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};const ve="_$DX_DELEGATE";function we(e,t,n){let r;const o=()=>{const t=document.createElement("template");return t.innerHTML=e,n?t.content.firstChild.firstChild:t.content.firstChild},a=t?()=>P(()=>document.importNode(r||(r=o()),!0)):()=>(r||(r=o())).cloneNode(!0);return a.cloneNode=a,a}function xe(e,t=window.document){const n=t[ve]||(t[ve]=new Set);for(let r=0,o=e.length;r<o;r++){const o=e[r];n.has(o)||(n.add(o),t.addEventListener(o,Ae))}}function _e(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)}function ke(e,t){null==t?e.removeAttribute("class"):e.className=t}function Se(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n)}function Te(e,t,n){if(!t)return n?_e(e,"style"):t;const r=e.style;if("string"==typeof t)return r.cssText=t;let o,a;for(a in"string"==typeof n&&(r.cssText=n=void 0),n||(n={}),t||(t={}),n)null==t[a]&&r.removeProperty(a),delete n[a];for(a in t)o=t[a],o!==n[a]&&(r.setProperty(a,o),n[a]=o);return n}function Ce(e,t={},n,r){const o={};return r||T(()=>o.children=Be(e,t.children,o.children)),T(()=>t.ref&&t.ref(e)),T(()=>function(e,t,n,r,o={},a=!1){t||(t={});for(const r in o)if(!(r in t)){if("children"===r)continue;o[r]=Ee(e,r,null,o[r],n,a)}for(const r in t){if("children"===r)continue;const i=t[r];o[r]=Ee(e,r,i,o[r],n,a)}}(e,t,n,0,o,!0)),o}function $e(e,t,n){return P(()=>e(t,n))}function Pe(e,t,n,r){if(void 0===n||r||(r=[]),"function"!=typeof t)return Be(e,t,r,n);T(r=>Be(e,t(),r,n),r)}function Ie(e,t,n){const r=t.trim().split(/\s+/);for(let t=0,o=r.length;t<o;t++)e.classList.toggle(r[t],n)}function Ee(e,t,n,r,o,a){let i,s,l,c,d;if("style"===t)return Te(e,n,r);if("classList"===t)return function(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let a,i;for(a=0,i=o.length;a<i;a++){const r=o[a];r&&"undefined"!==r&&!t[r]&&(Ie(e,r,!1),delete n[r])}for(a=0,i=r.length;a<i;a++){const o=r[a],i=!!t[o];o&&"undefined"!==o&&n[o]!==i&&i&&(Ie(e,o,!0),n[o]=i)}return n}(e,n,r);if(n===r)return r;if("ref"===t)a||n(e);else if("on:"===t.slice(0,3)){const o=t.slice(3);r&&e.removeEventListener(o,r),n&&e.addEventListener(o,n)}else if("oncapture:"===t.slice(0,10)){const o=t.slice(10);r&&e.removeEventListener(o,r,!0),n&&e.addEventListener(o,n,!0)}else if("on"===t.slice(0,2)){const o=t.slice(2).toLowerCase(),a=me.has(o);if(!a&&r){const t=Array.isArray(r)?r[0]:r;e.removeEventListener(o,t)}(a||n)&&(Se(e,o,n,a),a&&xe([o]))}else if("attr:"===t.slice(0,5))_e(e,t.slice(5),n);else if((d="prop:"===t.slice(0,5))||(l=be.has(t))||!o&&((c=function(e,t){const n=fe[e];return"object"==typeof n?n[t]?n.$:void 0:n}(t,e.tagName))||(s=ge.has(t)))||(i=e.nodeName.includes("-")))d&&(t=t.slice(5),s=!0),"class"===t||"className"===t?ke(e,n):!i||s||l?e[c||t]=n:e[u=t,u.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())]=n;else{const r=o&&t.indexOf(":")>-1&&ye[t.split(":")[0]];r?function(e,t,n,r){null==r?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r)}(e,r,t,n):_e(e,he[t]||t,n)}var u;return n}function Ae(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>n||document});n;){const r=n[t];if(r&&!n.disabled){const o=n[`${t}Data`];if(void 0!==o?r.call(n,o,e):r.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function Be(e,t,n,r,o){for(;"function"==typeof n;)n=n();if(t===n)return n;const a=typeof t,i=void 0!==r;if(e=i&&n[0]&&n[0].parentNode||e,"string"===a||"number"===a)if("number"===a&&(t=t.toString()),i){let o=n[0];o&&3===o.nodeType?o.data=t:o=document.createTextNode(t),n=Oe(e,n,r,o)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t;else if(null==t||"boolean"===a)n=Oe(e,n,r);else{if("function"===a)return T(()=>{let o=t();for(;"function"==typeof o;)o=o();n=Be(e,o,n,r)}),()=>n;if(Array.isArray(t)){const a=[],s=n&&Array.isArray(n);if(Me(a,t,n,o))return T(()=>n=Be(e,a,n,r,!0)),()=>n;if(0===a.length){if(n=Oe(e,n,r),i)return n}else s?0===n.length?Ue(e,a,r):function(e,t,n){let r=n.length,o=t.length,a=r,i=0,s=0,l=t[o-1].nextSibling,c=null;for(;i<o||s<a;)if(t[i]!==n[s]){for(;t[o-1]===n[a-1];)o--,a--;if(o===i){const t=a<r?s?n[s-1].nextSibling:n[a-s]:l;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;i<o;)c&&c.has(t[i])||t[i].remove(),i++;else if(t[i]===n[a-1]&&n[s]===t[o-1]){const r=t[--o].nextSibling;e.insertBefore(n[s++],t[i++].nextSibling),e.insertBefore(n[--a],r),t[o]=n[a]}else{if(!c){c=new Map;let e=s;for(;e<a;)c.set(n[e],e++)}const r=c.get(t[i]);if(null!=r)if(s<r&&r<a){let l,d=i,u=1;for(;++d<o&&d<a&&null!=(l=c.get(t[d]))&&l===r+u;)u++;if(u>r-s){const o=t[i];for(;s<r;)e.insertBefore(n[s++],o)}else e.replaceChild(n[s++],t[i++])}else i++;else t[i++].remove()}}else i++,s++}(e,n,a):(n&&Oe(e),Ue(e,a));n=a}else if(t.nodeType){if(Array.isArray(n)){if(i)return n=Oe(e,n,r,t);Oe(e,n,null,t)}else null!=n&&""!==n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t);n=t}else console.warn("Unrecognized value. Skipped inserting",t)}return n}function Me(e,t,n,r){let o=!1;for(let a=0,i=t.length;a<i;a++){let i,s=t[a],l=n&&n[a];if(null==s||!0===s||!1===s);else if("object"==(i=typeof s)&&s.nodeType)e.push(s);else if(Array.isArray(s))o=Me(e,s,l)||o;else if("function"===i)if(r){for(;"function"==typeof s;)s=s();o=Me(e,Array.isArray(s)?s:[s],Array.isArray(l)?l:[l])||o}else e.push(s),o=!0;else{const t=String(s);l&&3===l.nodeType&&l.data===t?e.push(l):e.push(document.createTextNode(t))}}return o}function Ue(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function Oe(e,t,n,r){if(void 0===n)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){const i=t[a];if(o!==i){const t=i.parentNode===e;r||a?t&&i.remove():t?e.replaceChild(o,i):e.insertBefore(o,n)}else r=!0}}else e.insertBefore(o,n);return[o]}function Re(e){const{useShadow:t}=e,n=document.createTextNode(""),r=B();let o;return C(()=>{o||(o=function(e,t){const n=h,r=m;h=e,m=null;try{return F(t,!0)}catch(e){G(e)}finally{h=n,m=r}}(r,()=>$(()=>e.children)));const a=e.mount||document.body;if(a instanceof HTMLHeadElement){const[e,t]=S(!1),n=()=>t(!0);k(t=>Pe(a,()=>e()?t():o(),null)),A(n)}else{const r=function(e,t=!1){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}(e.isSVG?"g":"div",e.isSVG),i=t&&r.attachShadow?r.attachShadow({mode:"open"}):r;Object.defineProperty(r,"_$host",{get:()=>n.parentNode,configurable:!0}),Pe(i,o),a.appendChild(r),e.ref&&e.ref(r),A(()=>a.removeChild(r))}},void 0,{render:!0}),n}function De(e){return(t,n)=>{const{element:r}=n;return k(o=>{const a=function(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const[o,a]=S(e[t[r]]);Object.defineProperty(n,t[r],{get:o,set(e){a(()=>e)}})}return n}(t);r.addPropertyChangedCallback((e,t)=>a[e]=t),r.addReleaseCallback(()=>{r.renderRoot.textContent="",o()});const i=e(a,n);return Pe(r.renderRoot,i)},function(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&(!t.assignedSlot||!t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}(r))}}function Le(e,t,n){return 2===arguments.length&&(n=t,t={}),i(e,t)(De(n))}const qe={bot:void 0,onNewBlock:void 0,onAnswer:void 0,onEnd:void 0,onInit:void 0,onNewLogs:void 0,isPreview:void 0,startFrom:void 0,prefilledVariables:void 0,resultId:void 0,sessionId:void 0},je={...qe,onClose:void 0,onOpen:void 0,theme:void 0,autoShowDelay:void 0,isOpen:void 0,defaultOpen:void 0},Fe={...qe,onClose:void 0,onOpen:void 0,theme:void 0,previewMessage:void 0,onPreviewMessageClick:void 0,autoShowDelay:void 0};function Ne(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ne(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function ze(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Ne(e))&&(r&&(r+=" "),r+=t);return r}var Ve='/*! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.\\!visible{visibility:visible!important}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-right-2{right:-8px}.-top-2{top:-8px}.bottom-5{bottom:20px}.left-0{left:0}.left-1\\/2{left:50%}.left-5{left:20px}.right-0{right:0}.right-2{right:8px}.right-5{right:20px}.top-0{top:0}.top-1\\/2{top:50%}.top-2{top:8px}.isolate{isolation:isolate}.\\!z-50{z-index:50!important}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[100\\]{z-index:100}.z-\\[42424242\\]{z-index:42424242}.z-\\[9999\\]{z-index:9999}.m-auto{margin:auto}.-mr-1{margin-right:-4px}.-mt-1{margin-top:-4px}.mb-1{margin-bottom:4px}.mb-3{margin-bottom:12px}.ml-1{margin-left:4px}.mt-0{margin-top:0}.mt-0\\.5{margin-top:2px}.mt-2{margin-top:8px}.mt-4{margin-top:16px}.\\!block{display:block!important}.block{display:block}.\\!flex{display:flex!important}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.\\!h-10{height:40px!important}.\\!h-auto{height:auto!important}.h-10{height:40px}.h-16{height:64px}.h-2{height:8px}.h-2\\.5{height:10px}.h-3{height:12px}.h-4{height:16px}.h-5{height:20px}.h-6{height:24px}.h-8{height:32px}.h-\\[25px\\]{height:25px}.h-\\[48px\\]{height:48px}.h-\\[56px\\]{height:56px}.h-\\[58px\\]{height:58px}.h-\\[60\\%\\]{height:60%}.h-\\[80vh\\]{height:80vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[250px\\]{max-height:250px}.max-h-\\[512px\\]{max-height:512px}.min-h-full{min-height:100%}.w-10{width:40px}.w-16{width:64px}.w-2{width:8px}.w-3{width:12px}.w-4{width:16px}.w-5{width:20px}.w-6{width:24px}.w-8{width:32px}.w-\\[35px\\]{width:35px}.w-\\[48px\\]{width:48px}.w-\\[58px\\]{width:58px}.w-\\[60\\%\\]{width:60%}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\\[180px\\]{min-width:180px}.min-w-\\[250px\\]{min-width:250px}.min-w-\\[300px\\]{min-width:300px}.min-w-max{min-width:-moz-max-content;min-width:max-content}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[256px\\]{max-width:256px}.max-w-\\[350px\\]{max-width:350px}.max-w-\\[90\\%\\]{max-width:90%}.max-w-full{max-width:100%}.max-w-lg{max-width:512px}.max-w-xs{max-width:320px}.flex-1{flex:1 1 0%}.flex-\\[9\\]{flex:9}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%}.-rotate-180{--tw-rotate:-180deg}.-rotate-180,.-rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate:-90deg}.rotate-0{--tw-rotate:0deg}.rotate-0,.scale-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-0{--tw-scale-x:0;--tw-scale-y:0}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-100,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:fade-in .3s ease-out}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.grid-cols-\\[repeat\\(3\\2c minmax\\(0\\2c 200px\\)\\)\\]{grid-template-columns:repeat(3,minmax(0,200px))}.\\!flex-col{flex-direction:column!important}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.\\!items-end{align-items:flex-end!important}.items-end{align-items:flex-end}.\\!items-center{align-items:center!important}.items-center{align-items:center}.justify-end{justify-content:flex-end}.\\!justify-center{justify-content:center!important}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.\\!gap-2{gap:8px!important}.\\!gap-3{gap:12px!important}.gap-1{gap:4px}.gap-2{gap:8px}.gap-3{gap:12px}.gap-4{gap:16px}.gap-6{gap:24px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.text-ellipsis{text-overflow:ellipsis}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.\\!rounded-2xl{border-radius:16px!important}.rounded{border-radius:4px}.rounded-2xl{border-radius:16px}.rounded-\\[6px\\]{border-radius:6px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:8px}.rounded-md{border-radius:6px}.rounded-t-\\[var\\(--quickbot-button-border-radius\\)\\]{border-top-left-radius:var(--quickbot-button-border-radius);border-top-right-radius:var(--quickbot-button-border-radius)}.border{border-width:1px}.border-2{border-width:2px}.\\!border-t{border-top-width:1px!important}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.\\!border-none{border-style:none!important}.border-none{border-style:none}.\\!border-black\\/\\[0\\.08\\]{border-color:rgba(0,0,0,.08)!important}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity))}.border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity))}.\\!bg-black\\/\\[0\\.04\\]{background-color:rgba(0,0,0,.04)!important}.bg-\\[rgba\\(0\\2c 0\\2c 0\\2c 0\\.5\\)\\]{background-color:rgba(0,0,0,.5)}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-black\\/20{background-color:rgba(0,0,0,.2)}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity))}.bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity))}.bg-pink-400{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-white\\/80{background-color:hsla(0,0%,100%,.8)}.bg-white\\/95{background-color:hsla(0,0%,100%,.95)}.bg-opacity-50{--tw-bg-opacity:0.5}.fill-transparent{fill:transparent}.stroke-2{stroke-width:2}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.\\!p-3{padding:12px!important}.p-0{padding:0}.p-0\\.5{padding:2px}.p-1{padding:4px}.p-2{padding:8px}.p-4{padding:16px}.p-5{padding:20px}.p-8{padding:32px}.px-2{padding-left:8px;padding-right:8px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.px-5{padding-left:20px;padding-right:20px}.px-8{padding-left:32px;padding-right:32px}.py-10{padding-bottom:40px;padding-top:40px}.py-2{padding-bottom:8px;padding-top:8px}.py-3{padding-bottom:12px;padding-top:12px}.py-6{padding-bottom:24px;padding-top:24px}.pl-2{padding-left:8px}.pl-5{padding-left:20px}.pr-1{padding-right:4px}.pr-2{padding-right:8px}.pt-2{padding-top:8px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.\\!text-xs{font-size:12px!important;line-height:16px!important}.text-2xl{font-size:24px;line-height:32px}.text-4xl{font-size:36px;line-height:40px}.text-base{font-size:16px;line-height:24px}.text-sm{font-size:14px;line-height:20px}.text-xl{font-size:20px;line-height:28px}.text-xs{font-size:12px;line-height:16px}.\\!font-normal{font-weight:400!important}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.\\!leading-3{line-height:12px!important}.leading-relaxed{line-height:1.625}.tracking-wider{letter-spacing:.05em}.\\!text-black\\/60{color:rgba(0,0,0,.6)!important}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.\\!no-underline{text-decoration-line:none!important}.\\!opacity-100{opacity:1!important}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.blur{--tw-blur:blur(8px)}.blur,.brightness-150{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.brightness-150{--tw-brightness:brightness(1.5)}.brightness-200{--tw-brightness:brightness(2)}.brightness-200,.brightness-95{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.brightness-95{--tw-brightness:brightness(.95)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-\\[width\\]{transition-duration:.15s;transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.delay-200{transition-delay:.2s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-\\[250ms\\]{transition-duration:.25s}.duration-\\[400ms\\]{transition-duration:.4s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\\[transform\\:translate3d\\(var\\(--x\\)\\2c var\\(--y\\)\\2c 0\\)\\]{transform:translate3d(var(--x),var(--y),0)}.\\[transition\\:stroke-dashoffset_0\\.3s_ease\\]{transition:stroke-dashoffset .3s ease}.\\[transition\\:top_350ms_ease-out\\2c opacity_250ms_ease-out\\]{transition:top .35s ease-out,opacity .25s ease-out}.\\[z-index\\:var\\(--z-index\\)\\]{z-index:var(--z-index)}:root{--quickbot-host-bubble-color:#202020;--quickbot-host-bubble-bg-rgb:245,245,245;--quickbot-host-bubble-opacity:1;--quickbot-host-bubble-border-width:0;--quickbot-host-bubble-border-rgb:0,0,0;--quickbot-host-bubble-border-opacity:0;--quickbot-host-bubble-border-radius:150px;--quickbot-host-bubble-box-shadow:0 0 #0000;--quickbot-host-bubble-blur:0px;--quickbot-input-border-radius:150px}@keyframes chatBubbles{0%{transform:translateY(2.5)}50%{transform:translateY(-2.5px)}to{transform:translateY(0)}}@keyframes fadeInFromTop{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeOutFromTop{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}@keyframes fadeInFromBottom{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeOutFromBottom{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}.quickbot{background-color:#fff;font-family:var(--quickbot-container-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"}.conversation-container{backdrop-filter:blur(var(--quickbot-chat-container-blur));background-color:rgba(var(--quickbot-chat-container-bg-rgb),var(--quickbot-chat-container-opacity));background-image:var(--quickbot-chat-container-bg-image);background-position:50%;background-repeat:no-repeat;background-size:cover;border-color:rgba(var(--quickbot-chat-container-border-rgb),var(--quickbot-chat-container-border-opacity));border-width:var(--quickbot-chat-container-border-width);box-shadow:var(--quickbot-chat-container-box-shadow);color:rgb(var(--quickbot-chat-container-color))}.conversation-container__body::-webkit-scrollbar{display:none}.conversation-container__body{-ms-overflow-style:none;scrollbar-width:none}.bubble{max-height:70vh;max-width:100%;min-height:2rem;min-width:2.5rem;overflow:auto;padding:8px 16px;transition-delay:.2s;transition-duration:.4s;transition-property:opacity;transition-timing-function:ease-in;will-change:opacity;z-index:10}.bubble--host{backdrop-filter:blur(var(--quickbot-host-bubble-blur));background-color:rgba(var(--quickbot-host-bubble-bg-rgb),var(--quickbot-host-bubble-opacity));border-color:rgba(var(--quickbot-host-bubble-border-rgb),var(--quickbot-host-bubble-border-opacity));border-radius:var(--quickbot-host-bubble-border-radius);border-width:var(--quickbot-host-bubble-border-width);box-shadow:var(--quickbot-host-bubble-box-shadow);color:var(--quickbot-host-bubble-color);height:100%;width:100%}.bubble--typing{align-items:center;display:flex;height:2rem!important;justify-content:center;min-width:64px!important;overflow:visible!important;width:auto!important}.bubble--guest{backdrop-filter:blur(var(--quickbot-guest-bubble-blur));background-color:rgba(var(--quickbot-guest-bubble-bg-rgb),var(--quickbot-guest-bubble-opacity));border-color:rgba(var(--quickbot-guest-bubble-border-rgb),var(--quickbot-guest-bubble-border-opacity));border-radius:var(--quickbot-guest-bubble-border-radius);border-width:var(--quickbot-guest-bubble-border-width);box-shadow:var(--quickbot-guest-bubble-box-shadow);color:var(--quickbot-guest-bubble-color)}.button{backdrop-filter:blur(var(--quickbot-button-blur));background-color:rgba(var(--quickbot-button-bg-rgb),var(--quickbot-button-opacity));border-color:rgba(var(--quickbot-button-border-rgb),var(--quickbot-button-border-opacity));border-radius:var(--quickbot-button-border-radius);border-width:var(--quickbot-button-border-width);box-shadow:var(--quickbot-button-box-shadow);color:var(--quickbot-button-color);height:auto;max-height:70vh;max-height:none;max-width:100%;min-height:2rem;min-height:auto;min-width:2.5rem;overflow:auto;overflow:visible;padding:8px 16px;transition-delay:.2s;transition-duration:.4s;transition-property:opacity;transition-timing-function:ease-in;will-change:opacity;z-index:10}.button--selectable:hover{background-color:rgba(var(--quickbot-button-bg-rgb),calc(var(--selectable-alpha-ratio)*.15));border-color:rgba(var(--quickbot-button-border-rgb),calc(var(--selectable-alpha-ratio)*.35));box-shadow:0 2px 4px rgba(0,0,0,.1)}.button--selectable:active{box-shadow:0 1px 2px rgba(0,0,0,.1)}.button--selected{background-color:rgba(var(--quickbot-button-bg-rgb),calc(var(--selectable-alpha-ratio)*.25));border-color:rgba(var(--quickbot-button-border-rgb),calc(var(--selectable-alpha-ratio)*.45));box-shadow:0 2px 6px rgba(var(--quickbot-button-bg-rgb),.2)}.button__checkbox{background-color:rgba(var(--quickbot-checkbox-bg-rgb));color:var(--quickbot-button-color);padding:1px;transition:all .3s ease}.button__checkbox--checked{background-color:rgb(var(--quickbot-button-bg-rgb))}.button--has-image{display:flex;filter:none;flex-direction:column;justify-content:space-between;padding:0;transition:all .3s;width:200px}.button--has-image:focus{outline:none}.button--has-image:hover{filter:brightness(.9)}.button--has-image:active{filter:brightness(.75)}.slate-bold{font-weight:700}.slate-italic{font-style:oblique}.bubble__dot{background-color:var(--quickbot-host-bubble-color);opacity:.5}.bubble__dot--1,.bubble__dot--2{animation:chatBubbles 1s ease-in-out infinite}.bubble__dot--2{animation-delay:.3s}.bubble__dot--3{animation:chatBubbles 1s ease-in-out infinite;animation-delay:.5s}.input__field{backdrop-filter:blur(var(--quickbot-input-blur));background-color:rgba(var(--quickbot-input-bg-rgb),var(--quickbot-input-opacity));border-radius:var(--quickbot-input-border-radius);box-shadow:var(--quickbot-input-box-shadow);color:var(--quickbot-input-color)}.input__field::-moz-placeholder{color:var(--quickbot-input-placeholder-color)!important;opacity:1!important}.input__field::placeholder{color:var(--quickbot-input-placeholder-color)!important;opacity:1!important}.rating-icon{align-items:center;border-radius:50%;display:flex;justify-content:center;padding:6px;transition:all .2s ease}.rating-icon:hover{background-color:rgba(var(--quickbot-button-bg-rgb),.06)}.rating-icon svg{stroke:rgb(var(--quickbot-button-bg-rgb));stroke-width:2;fill:transparent;height:32px;transition:fill .2s ease;width:32px}.rating-icon:hover svg{fill:rgba(var(--quickbot-button-bg-rgb),.15)}.rating-icon--selected{background-color:rgba(var(--quickbot-button-bg-rgb),.04)}.rating-icon--selected svg{fill:rgb(var(--quickbot-button-bg-rgb))}.input-error{color:var(--quickbot-input-color)}.input__field--upload{transition:border-color .1s ease-out}.input__field--upload--dragging{border-color:rgb(var(--quickbot-button-bg-rgb))}.upload__progress-bar{background-color:rgb(var(--quickbot-button-bg-rgb))}.toast--popup-blocked{border-radius:var(--quickbot-input-border-radius)}select option{background-color:var(--quickbot-input-bg-color);color:var(--quickbot-input-color)}.progress-bar{background-color:rgba(var(--quickbot-progress-bar-bg-rgb),calc(var(--selectable-alpha-ratio)*.12));bottom:var(--quickbot-progress-bar-bottom);height:var(--quickbot-progress-bar-height);position:var(--quickbot-progress-bar-position);top:var(--quickbot-progress-bar-top)}.progress-bar>.progress-bar__fill{background-color:var(--quickbot-progress-bar-color)}.recorder__left-gradient{background-image:linear-gradient(to right,rgba(var(--quickbot-input-bg-rgb),1),rgba(var(--quickbot-input-bg-rgb),0))}.recorder__right-gradient{background-image:linear-gradient(to left,rgba(var(--quickbot-input-bg-rgb),1),rgba(var(--quickbot-input-bg-rgb),0))}.recorder__close-button{background-color:rgba(var(--quickbot-button-bg-rgb),.3);color:rgba(var(--quickbot-button-bg-rgb))}[data-scope=menu][data-part=content]{backdrop-filter:blur(var(--quickbot-input-blur));border-color:rgba(var(--quickbot-input-border-rgb),var(--quickbot-input-border-opacity));border-width:var(--quickbot-input-border-width);box-shadow:var(--quickbot-input-box-shadow);color:var(--quickbot-input-color)}[data-scope=menu][data-part=content],[data-scope=menu][data-part=item]{background-color:rgba(var(--quickbot-input-bg-rgb),var(--quickbot-input-opacity));border-radius:var(--quickbot-input-border-radius)}[data-scope=menu][data-part=item]{cursor:pointer}[data-scope=menu][data-part=content][data-state=open]{animation:fadeInFromTop .15s ease-out forwards}[data-scope=menu][data-part=content][data-state=closed]{animation:fadeOutFromTop 50ms ease-out forwards}[data-scope=toast][data-part=group]{width:100%}[data-scope=toast][data-part=root]{background-color:rgba(var(--quickbot-input-bg-rgb),var(--quickbot-input-opacity));border-radius:var(--quickbot-chat-container-border-radius);box-shadow:var(--quickbot-input-box-shadow);color:var(--quickbot-input-color);display:flex;flex-direction:column;gap:4px;max-width:60vw;padding:16px 32px 16px 16px}[data-scope=toast][data-part=title]{font-weight:600}[data-scope=toast][data-part=description]{font-size:14px;line-height:20px}[data-scope=toast][data-part=root][data-state=open]{animation:fadeInFromBottom .15s ease-out forwards}[data-scope=toast][data-part=root][data-state=closed]{animation:fadeOutFromBottom 50ms ease-out forwards}[data-scope=progress][data-part=root]{height:100%;width:100%}[data-scope=progress][data-part=circle]{--size:40px;--thickness:4px;--radius:18px;--circomference:113.09724px}[data-scope=progress][data-part=circle-range]{stroke:#fff;--transition-prop:stroke-dasharray,stroke,stroke-dashoffset;--transition-duration:0.2s;transition-duration:.2s;transition-property:stroke-dasharray,stroke,stroke-dashoffset}[data-scope=progress][data-part=circle-track]{stroke:rgba(0,0,0,.5)}.empty\\:hidden:empty{display:none}.hover\\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:\\!bg-\\[\\#f7f8ff\\]:hover{--tw-bg-opacity:1!important;background-color:rgb(247 248 255/var(--tw-bg-opacity))!important}.hover\\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\\:\\!opacity-80:hover{opacity:.8!important}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\\:brightness-90:hover{--tw-brightness:brightness(.9)}.hover\\:brightness-90:hover,.hover\\:brightness-95:hover{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.hover\\:brightness-95:hover{--tw-brightness:brightness(.95)}.hover\\:backdrop-brightness-95:hover{--tw-backdrop-brightness:brightness(.95);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.active\\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95}.active\\:scale-95:active,.active\\:scale-\\[0\\.98\\]:active{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\\:scale-\\[0\\.98\\]:active{--tw-scale-x:0.98;--tw-scale-y:0.98}.active\\:brightness-75:active{--tw-brightness:brightness(.75)}.active\\:brightness-75:active,.active\\:brightness-90:active{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.active\\:brightness-90:active{--tw-brightness:brightness(.9)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:brightness-100:disabled{--tw-brightness:brightness(1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.group:hover .group-hover\\:opacity-0{opacity:0}.group:hover .group-hover\\:opacity-100{opacity:1}.data-\\[state\\=open\\]\\:backdrop-brightness-90[data-state=open]{--tw-backdrop-brightness:brightness(.9);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}@media (prefers-color-scheme:dark){.dark\\:text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}}@media (min-width:640px){.sm\\:right-5{right:20px}.sm\\:my-8{margin-bottom:32px;margin-top:32px}.sm\\:p-0{padding:0}.sm\\:opacity-0{opacity:0}}.\\[\\&_svg\\]\\:\\!h-4 svg{height:16px!important}.\\[\\&_svg\\]\\:\\!w-4 svg{width:16px!important}';const He=e=>null!=e,We=e=>null==e,Ge=e=>null==e||""===e,Ke=e=>null!=e&&""!==e,Ye=e=>e?.startsWith("data:image/svg")||e?.endsWith(".svg"),Je=we('<svg part="button-icon" viewBox="0 0 24 24"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z">'),Ze=we('<div part="button-icon">'),Xe=we('<img part="button-icon" alt="Bubble button icon">'),Qe=we('<span part="button-icon">'),et=we('<svg part="button-icon" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.601 8.39897C18.269 8.06702 17.7309 8.06702 17.3989 8.39897L12 13.7979L6.60099 8.39897C6.26904 8.06702 5.73086 8.06702 5.39891 8.39897C5.06696 8.73091 5.06696 9.2691 5.39891 9.60105L11.3989 15.601C11.7309 15.933 12.269 15.933 12.601 15.601L18.601 9.60105C18.9329 9.2691 18.9329 8.73091 18.601 8.39897Z">'),tt=we('<img part="button-icon" alt="Bubble button close icon">'),nt=we('<button part="button" aria-label="Open chatbot">'),rt="#fff",ot=e=>e.startsWith("http")||e.startsWith("data:image/svg+xml"),at=e=>(()=>{const t=nt();return t.$$click=()=>e.toggleBot(),Pe(t,Q(de,{get when(){return We(e.customIconSrc)},keyed:!0,get children(){const t=Je();return T(n=>{const r=e.iconColor??rt,o=ze("stroke-2 fill-transparent absolute duration-200 transition w-[60%]",e.isBotOpened?"scale-0 opacity-0":"scale-100 opacity-100");return r!==n._v$&&(null!=(n._v$=r)?t.style.setProperty("stroke",r):t.style.removeProperty("stroke")),o!==n._v$2&&_e(t,"class",n._v$2=o),n},{_v$:void 0,_v$2:void 0}),t}}),null),Pe(t,Q(de,{get when(){return $(()=>!!e.customIconSrc)()&&e.customIconSrc.startsWith("data:image/svg+xml")},get children(){const t=Ze();return T(n=>{const r=ze("flex items-center justify-center","duration-200 transition",e.isBotOpened?"scale-0 opacity-0":"scale-100 opacity-100","w-[60%] h-[60%]"),o=e.iconColor??rt,a=(e=>{if(!e.startsWith("data:image/svg+xml"))return null;let t=decodeURIComponent(e.replace("data:image/svg+xml;utf8,","")).replace(/(\w+)='([^']*)'/g,'$1="$2"').replace(/fill=['"]?bg['"]?/gi,'fill="currentColor"').replace(/fill=['"]#[0-9a-fA-F]{3,6}['"]?/gi,'fill="currentColor"').replace(/fill=['"]rgba?\([^)]+\)['"]?/gi,'fill="currentColor"').replace(/fill=['"](?:black|white|red|blue|green|yellow|orange|purple|pink|brown|gray|grey)['"]?/gi,'fill="currentColor"').replace(/stroke=['"]#[0-9a-fA-F]{3,6}['"]?/gi,'stroke="currentColor"').replace(/stroke=['"]rgba?\([^)]+\)['"]?/gi,'stroke="currentColor"').replace(/stroke=['"](?:black|white|red|blue|green|yellow|orange|purple|pink|brown|gray|grey)['"]?/gi,'stroke="currentColor"');return/<svg[^>]+fill=/i.test(t)||(t=t.replace("<svg ",'<svg fill="currentColor" ')),t})(e.customIconSrc);return r!==n._v$3&&ke(t,n._v$3=r),o!==n._v$4&&(null!=(n._v$4=o)?t.style.setProperty("color",o):t.style.removeProperty("color")),a!==n._v$5&&(t.innerHTML=n._v$5=a),n},{_v$3:void 0,_v$4:void 0,_v$5:void 0}),t}}),null),Pe(t,Q(de,{get when(){return $(()=>!(!e.customIconSrc||!ot(e.customIconSrc)))()&&!e.customIconSrc.startsWith("data:image/svg+xml")},get children(){const t=Xe();return T(n=>{const r=e.customIconSrc,o=ze("duration-200 transition",e.isBotOpened?"scale-0 opacity-0":"scale-100 opacity-100",Ye(e.customIconSrc)?"w-[60%]":"w-full h-full",Ye(e.customIconSrc)?"":"object-cover rounded-full");return r!==n._v$6&&_e(t,"src",n._v$6=r),o!==n._v$7&&ke(t,n._v$7=o),n},{_v$6:void 0,_v$7:void 0}),t}}),null),Pe(t,Q(de,{get when(){return $(()=>!!e.customIconSrc)()&&!ot(e.customIconSrc)},get children(){const t=Qe();return t.style.setProperty("font-family","-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'"),Pe(t,()=>e.customIconSrc),T(n=>{const r=ze("text-4xl duration-200 transition",e.isBotOpened?"scale-0 opacity-0":"scale-100 opacity-100"),o=e.iconColor??rt;return r!==n._v$8&&ke(t,n._v$8=r),o!==n._v$9&&(null!=(n._v$9=o)?t.style.setProperty("color",o):t.style.removeProperty("color")),n},{_v$8:void 0,_v$9:void 0}),t}}),null),Pe(t,Q(de,{get when(){return We(e.customCloseIconSrc)},get children(){const t=et();return T(n=>{const r=e.iconColor??rt,o=ze("absolute duration-200 transition w-[60%]",e.isBotOpened?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-180 opacity-0");return r!==n._v$0&&(null!=(n._v$0=r)?t.style.setProperty("fill",r):t.style.removeProperty("fill")),o!==n._v$1&&_e(t,"class",n._v$1=o),n},{_v$0:void 0,_v$1:void 0}),t}}),null),Pe(t,Q(de,{get when(){return $(()=>!!e.customCloseIconSrc)()&&ot(e.customCloseIconSrc)},get children(){const t=tt();return T(n=>{const r=e.customCloseIconSrc,o=ze("absolute duration-200 transition",e.isBotOpened?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-180 opacity-0",Ye(e.customCloseIconSrc)?"w-[60%]":"w-full h-full",Ye(e.customCloseIconSrc)?"":"object-cover rounded-full");return r!==n._v$10&&_e(t,"src",n._v$10=r),o!==n._v$11&&ke(t,n._v$11=o),n},{_v$10:void 0,_v$11:void 0}),t}}),null),Pe(t,Q(de,{get when(){return $(()=>!!e.customCloseIconSrc)()&&!ot(e.customCloseIconSrc)},get children(){const t=Qe();return t.style.setProperty("font-family","-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'"),Pe(t,()=>e.customCloseIconSrc),T(n=>{const r=ze("absolute text-4xl duration-200 transition",e.isBotOpened?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-180 opacity-0"),o=e.iconColor??rt;return r!==n._v$12&&ke(t,n._v$12=r),o!==n._v$13&&(null!=(n._v$13=o)?t.style.setProperty("color",o):t.style.removeProperty("color")),n},{_v$12:void 0,_v$13:void 0}),t}}),null),T(n=>{const r=ze("fixed bottom-5 shadow-md rounded-full hover:scale-110 active:scale-95 transition-transform duration-200 flex justify-center items-center animate-fade-in z-[42424242]","left"===e.placement?"left-5":"right-5"),o=e.backgroundColor??"#01a952",a=e.buttonSize,i=e.buttonSize;return r!==n._v$14&&ke(t,n._v$14=r),o!==n._v$15&&(null!=(n._v$15=o)?t.style.setProperty("background-color",o):t.style.removeProperty("background-color")),a!==n._v$16&&(null!=(n._v$16=a)?t.style.setProperty("width",a):t.style.removeProperty("width")),i!==n._v$17&&(null!=(n._v$17=i)?t.style.setProperty("height",i):t.style.removeProperty("height")),n},{_v$14:void 0,_v$15:void 0,_v$16:void 0,_v$17:void 0}),t})();xe(["click"]);const it=we('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2px" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18">'),st=e=>(()=>{const t=it();return Ce(t,e,!0,!0),t})(),lt=we('<div part="bubble-message"><p>'),ct=we('<img class="rounded-full w-8 h-8 object-cover" alt="Bot avatar" elementtiming="Bot avatar" fetchpriority="high">'),dt=we('<button part="bubble-message-close-button" aria-label="Close">'),ut="#F7F8FF",pt="#303235",gt=e=>{const[t,n]=S(!1),[r,o]=S({x:0,y:0}),a=e=>{o({x:e.touches[0].clientX,y:e.touches[0].clientY})},i=t=>{const n=t.changedTouches[0].clientX,a=t.changedTouches[0].clientY;(Math.abs(n-r().x)>10||a-r().y>10)&&e.onCloseClick(),o({x:0,y:0})};return(()=>{const r=lt(),o=r.firstChild;return r.$$touchend=i,r.$$touchstart=a,r.addEventListener("mouseleave",()=>n(!1)),r.addEventListener("mouseenter",()=>n(!0)),r.$$click=()=>e.onClick(),Pe(r,Q(bt,{get isHovered(){return t()},get previewMessageTheme(){return e.previewMessageTheme},get onClick(){return e.onCloseClick}}),o),Pe(r,Q(de,{get when(){return e.avatarUrl},keyed:!0,children:e=>(()=>{const t=ct();return _e(t,"src",e),t})()}),o),Pe(o,()=>e.message),T(t=>{const n=ze("fixed max-w-[256px] rounded-md duration-200 flex items-center gap-4 shadow-md animate-fade-in cursor-pointer hover:shadow-lg p-4 z-[42424242]","left"===e.placement?"left-5":"right-5"),o=e.previewMessageTheme?.backgroundColor??ut,a=e.previewMessageTheme?.textColor??pt,i=`calc(${e.buttonSize} + 32px)`;return n!==t._v$&&ke(r,t._v$=n),o!==t._v$2&&(null!=(t._v$2=o)?r.style.setProperty("background-color",o):r.style.removeProperty("background-color")),a!==t._v$3&&(null!=(t._v$3=a)?r.style.setProperty("color",a):r.style.removeProperty("color")),i!==t._v$4&&(null!=(t._v$4=i)?r.style.setProperty("bottom",i):r.style.removeProperty("bottom")),t},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),r})()},bt=e=>(()=>{const t=dt();return t.$$click=t=>(t.stopPropagation(),e.onClick()),Pe(t,Q(st,{class:"w-4"})),T(n=>{const r=ze("absolute -top-2 -right-2 rounded-full w-6 h-6 p-1 hover:brightness-95 active:brightness-90 transition-all border",e.isHovered?"opacity-100":"opacity-0"),o=e.previewMessageTheme?.closeButtonBackgroundColor??ut,a=e.previewMessageTheme?.closeButtonIconColor??pt;return r!==n._v$5&&ke(t,n._v$5=r),o!==n._v$6&&(null!=(n._v$6=o)?t.style.setProperty("background-color",o):t.style.removeProperty("background-color")),a!==n._v$7&&(null!=(n._v$7=a)?t.style.setProperty("color",a):t.style.removeProperty("color")),n},{_v$5:void 0,_v$6:void 0,_v$7:void 0}),t})();xe(["click","touchstart","touchend"]);const ht=e=>"http://localhost:3001"+e;class ft extends Error{constructor(e,t,n){const r=`${e.status||0===e.status?e.status:""} ${e.statusText||""}`.trim();super(`Request failed with ${r?`status code ${r}`:"an unknown error"}`),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="HTTPError",this.response=e,this.request=t,this.options=n}}class mt extends Error{constructor(e){super("Request timed out"),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.request=e}}const yt=e=>null!==e&&"object"==typeof e,vt=(...e)=>{for(const t of e)if((!yt(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return xt({},...e)},wt=(e={},t={})=>{const n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,o=new globalThis.Headers(t);for(const[e,t]of o.entries())r&&"undefined"===t||void 0===t?n.delete(e):n.set(e,t);return n},xt=(...e)=>{let t={},n={};for(const r of e)if(Array.isArray(r))Array.isArray(t)||(t=[]),t=[...t,...r];else if(yt(r)){for(let[e,n]of Object.entries(r))yt(n)&&e in t&&(n=xt(t[e],n)),t={...t,[e]:n};yt(r.headers)&&(n=wt(n,r.headers),t.headers=n)}return t},_t=(()=>{let e=!1,t=!1;const n="function"==typeof globalThis.ReadableStream,r="function"==typeof globalThis.Request;return n&&r&&(t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")),e&&!t})(),kt="function"==typeof globalThis.AbortController,St="function"==typeof globalThis.ReadableStream,Tt="function"==typeof globalThis.FormData,Ct=["get","post","put","patch","head","delete"],$t={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Pt=2147483647,It=Symbol("stop"),Et={json:!0,parseJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,fetch:!0},At={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},Bt=e=>Ct.includes(e)?e.toUpperCase():e,Mt=[413,429,503],Ut={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:Mt,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},Ot=(e={})=>{if("number"==typeof e)return{...Ut,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...Ut,...e,afterStatusCodes:Mt}};class Rt{static create(e,t){const n=new Rt(e,t),r=async()=>{if("number"==typeof n._options.timeout&&n._options.timeout>Pt)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await n._fetch();for(const t of n._options.hooks.afterResponse){const r=await t(n.request,n._options,n._decorateResponse(e.clone()));r instanceof globalThis.Response&&(e=r)}if(n._decorateResponse(e),!e.ok&&n._options.throwHttpErrors){let t=new ft(e,n.request,n._options);for(const e of n._options.hooks.beforeError)t=await e(t);throw t}if(n._options.onDownloadProgress){if("function"!=typeof n._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!St)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return n._stream(e.clone(),n._options.onDownloadProgress)}return e},o=n._options.retry.methods.includes(n.request.method.toLowerCase())?n._retry(r):r();for(const[e,r]of Object.entries($t))o[e]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||r);const a=(await o).clone();if("json"===e){if(204===a.status)return"";if(0===(await a.clone().arrayBuffer()).byteLength)return"";if(t.parseJson)return t.parseJson(await a.text())}return a[e]()};return o}constructor(e,t={}){Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"abortController",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_retryCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._input=e;const n=this._input instanceof Request&&"credentials"in Request.prototype?this._input.credentials:void 0;if(this._options={...n&&{credentials:n},...t,headers:wt(this._input.headers,t.headers),hooks:xt({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},t.hooks),method:Bt(t.method??this._input.method),prefixUrl:String(t.prefixUrl||""),retry:Ot(t.retry),throwHttpErrors:!1!==t.throwHttpErrors,timeout:t.timeout??1e4,fetch:t.fetch??globalThis.fetch.bind(globalThis)},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(kt){if(this.abortController=new globalThis.AbortController,this._options.signal){const e=this._options.signal;this._options.signal.addEventListener("abort",()=>{this.abortController.abort(e.reason)})}this._options.signal=this.abortController.signal}if(_t&&(this._options.duplex="half"),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const e="?"+("string"==typeof this._options.searchParams?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),t=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,e);!(Tt&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)||this._options.headers&&this._options.headers["content-type"]||this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(t,{...this.request}),this._options)}void 0!==this._options.json&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type",this._options.headers.get("content-type")??"application/json"),this.request=new globalThis.Request(this.request,{body:this._options.body}))}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount<=this._options.retry.limit&&!(e instanceof mt)){if(e instanceof ft){if(!this._options.retry.statusCodes.includes(e.response.status))return 0;const t=e.response.headers.get("Retry-After");if(t&&this._options.retry.afterStatusCodes.includes(e.response.status)){let e=Number(t);return Number.isNaN(e)?e=Date.parse(t)-Date.now():e*=1e3,void 0!==this._options.retry.maxRetryAfter&&e>this._options.retry.maxRetryAfter?0:e}if(413===e.response.status)return 0}const t=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,t)}return 0}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(t){const n=Math.min(this._calculateRetryDelay(t),Pt);if(0!==n&&this._retryCount>0){await async function(e,{signal:t}){return new Promise((n,r)=>{function o(){clearTimeout(a),r(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));const a=setTimeout(()=>{t?.removeEventListener("abort",o),n()},e)})}(n,{signal:this._options.signal});for(const e of this._options.hooks.beforeRetry){if(await e({request:this.request,options:this._options,error:t,retryCount:this._retryCount})===It)return}return this._retry(e)}throw t}}async _fetch(){for(const e of this._options.hooks.beforeRequest){const t=await e(this.request,this._options);if(t instanceof Request){this.request=t;break}if(t instanceof Response)return t}const e=((e,t)=>{const n={};for(const r in t)r in At||r in Et||r in e||(n[r]=t[r]);return n})(this.request,this._options);return!1===this._options.timeout?this._options.fetch(this.request.clone(),e):async function(e,t,n,r){return new Promise((o,a)=>{const i=setTimeout(()=>{n&&n.abort(),a(new mt(e))},r.timeout);r.fetch(e,t).then(o).catch(a).then(()=>{clearTimeout(i)})})}(this.request.clone(),e,this.abortController,this._options)}_stream(e,t){const n=Number(e.headers.get("content-length"))||0;let r=0;return 204===e.status?(t&&t({percent:1,totalBytes:n,transferredBytes:r},new Uint8Array),new globalThis.Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(o){const a=e.body.getReader();t&&t({percent:0,transferredBytes:0,totalBytes:n},new Uint8Array),await async function e(){const{done:i,value:s}=await a.read();if(i)o.close();else{if(t){r+=s.byteLength;t({percent:0===n?0:r/n,transferredBytes:r,totalBytes:n},s)}o.enqueue(s),await e()}}()}}),{status:e.status,statusText:e.statusText,headers:e.headers})}}
|
|
3
|
+
/*! MIT License © Sindre Sorhus */const Dt=e=>{const t=(t,n)=>Rt.create(t,vt(e,n));for(const n of Ct)t[n]=(t,r)=>Rt.create(t,vt(e,r,{method:n}));return t.create=e=>Dt(vt(e)),t.extend=t=>Dt(vt(e,t)),t.stop=It,t},Lt=Dt();class qt extends Error{constructor(e){super("This bot can only be executed on "+e)}}function jt(e){const t=(e||"").toLowerCase(),n=/ipad|tablet|kindle|silk|playbook/.test(t)||/android/.test(t)&&!/mobile/.test(t),r=/mobi|iphone|ipod|android.*mobile|blackberry|phone|windows phone/.test(t);return n?"tablet":r?"mobile":/macintosh|windows nt|linux|x11|cros/.test(t)?"desktop":"unknown"}const Ft=()=>sessionStorage.getItem("botPaymentInProgress"),Nt=()=>{sessionStorage.removeItem("botPaymentInProgress")};async function zt(e){const t=Ft()??void 0,n=t?JSON.parse(t):void 0;if(!n)return null;Nt();return{...await Lt.post(ht(`/api/v1/conversations/${n.sessionId}/messages`),{json:{message:n?"failed"===e?"fail":"Success":void 0},timeout:!1}).json(),...n}}const Vt=async({sessionId:e,clientLogs:t})=>{try{await Lt.post(ht(`/api/v1/conversations/${e}/logs`),{json:{clientLogs:t}})}catch(e){console.log(e)}};const Ht=e=>{if(e)return"text"===e.type?{type:"text",text:e.value,attachedFileUrls:e.attachments?.map(e=>e.url)}:"recording"===e.type?{type:"audio",url:e.url}:void 0},Wt=(e,t)=>{e&&t&&e.scrollTo({top:e.scrollHeight,behavior:"smooth"})},Gt={isInputPrefillEnabled:!1,isHideQueryParamsEnabled:!0,isNewResultOnRefreshEnabled:!0,rememberUser:{isEnabled:!1,storage:"session"},isBrandingEnabled:!1,isTypingEmulationEnabled:!0},Kt={enabled:!0,speed:400,maxDelay:3,delayBetweenBubbles:0,isDisabledOnFirstMessage:!0};[{value:"session",label:"Session"},{value:"local",label:"Local"}].map(e=>e.value);const Yt=Symbol("store-raw"),Jt=Symbol("store-node");function Zt(e){let t;return null!=e&&"object"==typeof e&&(e[l]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Xt(e,t=new Set){let n,r,o,a;if(n=null!=e&&e[Yt])return n;if(!Zt(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,a=e.length;n<a;n++)o=e[n],(r=Xt(o,t))!==o&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const n=Object.keys(e),i=Object.getOwnPropertyDescriptors(e);for(let s=0,l=n.length;s<l;s++)a=n[s],i[a].get||(o=e[a],(r=Xt(o,t))!==o&&(e[a]=r))}return e}function Qt(e,t,n){return e[t]||(e[t]=function(e){const[t,n]=S(e,{equals:!1,internal:!0});return t.$=n,t}(n))}function en(e,t,n,r=!1){if(!r&&e[t]===n)return;const o=e[t],a=e.length;void 0===n?delete e[t]:e[t]=n;let i,s=function(e){let t=e[Jt];return t||Object.defineProperty(e,Jt,{value:t=Object.create(null)}),t}(e);if((i=Qt(s,t,o))&&i.$(()=>n),Array.isArray(e)&&e.length!==a){for(let t=e.length;t<a;t++)(i=s[t])&&i.$();(i=Qt(s,"length",a))&&i.$(e.length)}(i=s._)&&i.$()}const tn=Symbol("store-root");function nn(e,t,n,r,o){const a=t[n];if(e===a)return;if(n!==tn&&(!Zt(e)||!Zt(a)||o&&e[o]!==a[o]))return void en(t,n,e);if(Array.isArray(e)){if(e.length&&a.length&&(!r||o&&e[0]&&null!=e[0][o])){let t,n,i,s,l,c,d,u;for(i=0,s=Math.min(a.length,e.length);i<s&&(a[i]===e[i]||o&&a[i]&&e[i]&&a[i][o]===e[i][o]);i++)nn(e[i],a,i,r,o);const p=new Array(e.length),g=new Map;for(s=a.length-1,l=e.length-1;s>=i&&l>=i&&(a[s]===e[l]||o&&a[i]&&e[i]&&a[s][o]===e[l][o]);s--,l--)p[l]=a[s];if(i>l||i>s){for(n=i;n<=l;n++)en(a,n,e[n]);for(;n<e.length;n++)en(a,n,p[n]),nn(e[n],a,n,r,o);return void(a.length>e.length&&en(a,"length",e.length))}for(d=new Array(l+1),n=l;n>=i;n--)c=e[n],u=o&&c?c[o]:c,t=g.get(u),d[n]=void 0===t?-1:t,g.set(u,n);for(t=i;t<=s;t++)c=a[t],u=o&&c?c[o]:c,n=g.get(u),void 0!==n&&-1!==n&&(p[n]=a[t],n=d[n],g.set(u,n));for(n=i;n<e.length;n++)n in p?(en(a,n,p[n]),nn(e[n],a,n,r,o)):en(a,n,e[n])}else for(let t=0,n=e.length;t<n;t++)nn(e[t],a,t,r,o);return void(a.length>e.length&&en(a,"length",e.length))}const i=Object.keys(e);for(let t=0,n=i.length;t<n;t++)nn(e[i[t]],a,i[t],r,o);const s=Object.keys(a);for(let t=0,n=s.length;t<n;t++)void 0===e[s[t]]&&en(a,s[t],void 0)}function rn(e,t={}){const{merge:n,key:r="id"}=t,o=Xt(e);return e=>{if(!Zt(e)||!Zt(o))return o;const t=nn(o,{[tn]:e},tn,n,r);return void 0===t?e:t}}function on(e,t){const[n,r]=S(!1);if(!t.storage)return[...e,n,r];const o=an(t.storage||Gt.rememberUser.storage),a=JSON.stringify.bind(JSON),i=JSON.parse.bind(JSON),s=o.getItem(t.key),l="function"==typeof e[0]?t=>e[1](()=>i(t)):t=>e[1](rn(i(t)));return s&&(l(s),r(!0),t.onRecovered?.()),[e[0],"function"==typeof e[0]?n=>{r(!1);const i=e[1](n);return n?o.setItem(t.key,a(i)):o.removeItem(t.key),i}:(...n)=>{r(!1),e[1](...n);const i=a(P(()=>e[0]));o.setItem(t.key,i)},n,r]}const an=e=>"session"===(e??Gt.rememberUser.storage)?sessionStorage:localStorage,sn=["text","error","data","finish_message"];function ln(e){const t=e.indexOf(":");if(-1===t)throw new Error("Failed to parse stream string. No separator found.");const n=e.slice(0,t);if(!sn.includes(n))throw new Error(`Failed to parse stream string. Invalid type: ${n}`);const r=e.slice(t+1);return{type:n,value:JSON.parse(r)}}const cn="\n".charCodeAt(0);function dn(e,t){const n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return e.length=0,n}let un=null;const pn=e=>async({messages:t,onMessageStream:n})=>{try{un=new AbortController;const r=await Lt.get(ht(`/api/v1/conversations/${e.sessionId}/stream`),{signal:un.signal,timeout:!1});if(!r.ok){if((e.retryAttempt??0)<1&&(403===r.status||500===r.status||503===r.status))return await new Promise(e=>setTimeout(e,3e3)),pn({...e,retryAttempt:(e.retryAttempt??0)+1})({messages:t,onMessageStream:n});try{return{error:await r.json()||"Failed to fetch the chat response."}}catch{return{error:{message:"Failed to fetch the chat response."}}}}if(!r.body)throw new Error("The response body is empty.");let o="";const a=r.body.getReader(),i=function(){const e=s.context;return e?`${e.id}${e.count++}`:"cl-"+ie++}();for await(const{type:e,value:t}of async function*(e,{isAborted:t}={}){const n=new TextDecoder,r=[];let o=0;for(;;){const{value:a}=await e.read();if(a&&(r.push(a),o+=a.length,a[a.length-1]!==cn))continue;if(0===r.length)break;const i=dn(r,o);o=0;const s=n.decode(i,{stream:!0}).split("\n").filter(e=>""!==e);for(const e of s)try{const t=ln(e);yield t}catch(e){console.error("Failed to parse stream part:",e)}if(t?.()){e.cancel();break}}}(a,{isAborted:()=>null===un}))if("text"===e)o+=t,n&&n({id:i,message:o});else if("error"===e)return{error:{message:t}};return un=null,{message:o}}catch(e){return console.error(e),"AbortError"===e.name?(un=null,{error:{message:"Request aborted"}}):e instanceof Error?{error:{message:e.message}}:{error:{message:"Failed to fetch the chat response."}}}},gn=e=>{if(!We(e)){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{console.warn("Failed to safely stringify variable value",e)}}},bn=e=>"string"==typeof e?e:e instanceof Error?e.name+": "+e.message:JSON.stringify(e),hn=Object.getPrototypeOf(async function(){}).constructor,fn=e=>e.replace(/<script>/g,"").replace(/<\/script>/g,""),mn=async({args:e,content:t})=>{try{const n=hn(...Object.keys(e),t);await n(...Object.keys(e).map(t=>e[t]))}catch(e){console.warn("Script threw an error:",e)}},yn=Object.getPrototypeOf(async function(){}).constructor,vn=async e=>{const t=e.customHeadCode;Ke(t)&&(e=>{e.split("</noscript>").forEach(e=>{const[t,n]=e.split("<noscript>"),r=document.createRange().createContextualFragment(t);if(document.head.append(r),We(n))return;const o=document.createElement("noscript"),a=document.createRange().createContextualFragment(n);o.append(a),document.head.append(o)})})(t);const n=e.gtmId;Ke(n)&&document.body.prepend((e=>{if(document.getElementById("gtm-noscript"))return"";const t=document.createElement("noscript");t.id="gtm-noscript";const n=document.createElement("iframe");return n.src=`https://www.googletagmanager.com/ns.html?id=${e}`,n.height="0",n.width="0",n.style.display="none",n.style.visibility="hidden",t.appendChild(n),t})(n))},wn=async({clientSideAction:e,context:t,onMessageStream:n})=>{if("scriptToExecute"in e)return(async({content:e,args:t})=>{try{const n=hn(...t.map(e=>e.id),fn(e));await n(...t.map(e=>e.value))}catch(e){return{logs:[{status:"error",description:"Script block failed to execute",details:bn(e)}]}}})(e.scriptToExecute);if("redirect"in e)return(({url:e,isNewTab:t}={})=>{if(!e)return;if(!t)return void(window.location.href=e);const n=window.open(e,"_blank");if(!n)return{blockedPopupUrl:e};try{if(n.closed)return{blockedPopupUrl:e};if(!n.opener)return n.close(),{blockedPopupUrl:e}}catch{return{blockedPopupUrl:e}}})(e.redirect);if("wait"in e)return await(async({secondsToWaitFor:e})=>{await new Promise(t=>setTimeout(t,1e3*e))})(e.wait),e.expectsDedicatedReply?{replyToSend:void 0}:void 0;if("setVariable"in e)return(async({content:e,args:t,isCode:n})=>{try{if(!isNaN(e)&&/0[^.].+/.test(e))return{replyToSend:e};const n=yn(...t.map(e=>e.id),e.includes("return ")?e:`return ${e}`),r=await n(...t.map(e=>e.value));return{replyToSend:gn(r)??void 0}}catch(t){return console.error(t),{replyToSend:gn(e)??void 0,logs:n?[{status:"error",description:"Failed to execute Variable code",details:bn(t)}]:void 0}}})(e.setVariable.scriptToExecute);if("streamOpenAiChatCompletion"in e||"stream"in e){const{error:r,message:o}=await pn(t)({messages:"streamOpenAiChatCompletion"in e?e.streamOpenAiChatCompletion?.messages:void 0,onMessageStream:n});return r?{replyToSend:void 0}:{replyToSend:o}}return"startPropsToInject"in e?vn(e.startPropsToInject):"codeToExecute"in e?mn(e.codeToExecute):void 0},[xn,_n]=S(),kn=M(),Sn=e=>{const[t,n]=S(e.initialChatReply.bot.theme),[r,o]=S(!1),[a,i]=S(!1),[s,l]=S(),[c,d]=S(e.initialChatReply.dynamicTheme),[u,p]=S([]);let g;const[b,h,f,m]=on(S([{input:e.initialChatReply.input,messages:e.initialChatReply.messages,clientSideActions:e.initialChatReply.clientSideActions}]),{key:`bot-${e.context.bot.id}-chatChunks`,storage:e.context.storage});C(()=>{if(f()){const e=[...b()].reverse().find(e=>e.input);e?.input&&p([e.input])}else e.initialChatReply.input&&p([e.initialChatReply.input])});const[y,v]=S({}),w=()=>[...b()].pop(),x=async t=>{m(!1),o(!1);const n=w()?.input;t&&h(e=>{const n=e.length-1;if(n<0)return e;const r=e[n];return r.input?[...e.slice(0,n),{...r,input:{...r.input,answer:t}}]:e}),n?.id&&e.onAnswer&&t&&e.onAnswer({message:"text"===t.type?t.label??t.value:t.url,blockId:n.id});const r=n?.id&&t?{inputBlockId:n.id,inputType:n.type}:void 0,a=setTimeout(()=>{i(!0)},1e3);try{const n=await async function({message:e,sessionId:t,messageMetadata:n}){return await Lt.post(ht(`/api/v1/conversations/${t}/messages`),{json:{message:e,messageMetadata:n},timeout:!1}).json()}({sessionId:e.initialChatReply.sessionId,message:Ht(t),messageMetadata:r});if(clearTimeout(a),i(!1),n.progress&&e.onProgressUpdate?.(n.progress),n.lastMessageNewFormat&&h(e=>{const t=e.length-1;if(t<0)return e;const r=e[t];return r.input?.answer&&"text"===r.input.answer.type?[...e.slice(0,t),{...r,input:{...r.input,answer:{...r.input.answer,label:n.lastMessageNewFormat}}}]:e}),n.logs&&e.onNewLogs?.(n.logs),n.dynamicTheme&&d(n.dynamicTheme),n.input&&p([...u(),n.input]),n.clientSideActions){const e=n.clientSideActions.filter(e=>We(e.lastBubbleBlockId));if(await T(e),1===n.clientSideActions.length&&"stream"===n.clientSideActions[0].type&&0===n.messages.length&&void 0===n.input)return}h(e=>[...e,{input:n.input,messages:n.messages,clientSideActions:n.clientSideActions}])}catch(t){clearTimeout(a),i(!1),o(!0);const n=[{description:"Failed to send the reply",details:t instanceof ft?{status:t.response.status,body:await t.response.json()}:t,status:"error"}];return await Vt({sessionId:e.initialChatReply.sessionId,clientLogs:n}),void e.onNewLogs?.(n)}},_=({id:e,message:t})=>{i(!1);const n=[...b()].pop();n&&(n.streamingMessageId!==e&&h(t=>[...t,{messages:[],streamingMessageId:e}]),_n({id:e,content:t}))},k=async t=>{t&&(e.onNewLogs?.(t),e.context.isPreview||await Vt({sessionId:e.initialChatReply.sessionId,clientLogs:t}))},T=async t=>{if(!f())for(const n of t){("streamOpenAiChatCompletion"in n||"stream"in n)&&i(!0);const t=await wn({clientSideAction:n,context:{sessionId:e.initialChatReply.sessionId},onMessageStream:_});if(t&&"logs"in t&&k(t.logs),t&&"replyToSend"in t)return i(!1),void x(t.replyToSend?{type:"text",value:t.replyToSend}:void 0);t&&"blockedPopupUrl"in t&&l(t.blockedPopupUrl)}};return C(()=>{n(((e,t)=>({...e,chat:{...e.chat,hostAvatar:e.chat?.hostAvatar&&t?.hostAvatarUrl?{...e.chat.hostAvatar,url:t.hostAvatarUrl}:e.chat?.hostAvatar,guestAvatar:e.chat?.guestAvatar&&t?.guestAvatarUrl?{...e.chat.guestAvatar,url:t?.guestAvatarUrl}:e.chat?.guestAvatar}}))(e.initialChatReply.bot.theme,c()))}),A(()=>{_n(void 0)}),Q(kn.Provider,{value:{chatChunks:b,theme:t,hasError:r,setHasError:o,currentBlock:w,blockedPopupUrl:s,setBlockedPopupUrl:l,isSending:a,displayedMessageIndexes:y,setDisplayedMessageIndex:(e,t)=>{v(n=>({...n,[e]:t}))},getDisplayedMessageIndex:e=>y()[e]??0,sendMessage:x,processClientSideActions:T,onBubblesDisplayed:()=>{const t=u();if(t.length>0){const[n,...r]=t;e.onNewBlock?.({id:n.id,type:n.type}),p(r)}},scrollToBottom:()=>g?.(),registerScrollToBottom:e=>{g=e}},get children(){return e.children}})},Tn=()=>{const e=U(kn);if(!e)throw new Error("useConversation must be used within a ConversationProvider");return e},Cn=we('<div class="flex items-center gap-1"><div class="bubble__dot bubble__dot--1 w-2 h-2 rounded-full"></div><div class="bubble__dot bubble__dot--2 w-2 h-2 rounded-full"></div><div class="bubble__dot bubble__dot--3 w-2 h-2 rounded-full">'),$n=()=>Cn(),Pn=!0,In=we('<div><div class="flex w-full items-center"><div class="flex z-10 items-start w-full max-w-full"><div>'),En=we('<audio class="w-full animate-fade-in" controls>');let An;const Bn=e=>{let t,n,r=!1;const[o,a]=S(!!e.onTransitionEnd);return E(()=>{An=setTimeout(()=>{r||(r=!0,a(!1),setTimeout(()=>e.onTransitionEnd?.(t),400))},100)}),A(()=>{An&&clearTimeout(An)}),(()=>{const r=In(),a=r.firstChild.firstChild.firstChild;return"function"==typeof t?$e(t,r):t=r,Pe(a,(()=>{const t=$(()=>!!o());return()=>t()?Q($n,{}):(()=>{const t=En();return"function"==typeof n?$e(n,t):n=t,T(n=>{const r=e.content?.url,o=!!e.onTransitionEnd&&(e.content?.isAutoplayEnabled??Pn);return r!==n._v$3&&_e(t,"src",n._v$3=r),o!==n._v$4&&(t.autoplay=n._v$4=o),n},{_v$3:void 0,_v$4:void 0}),t})()})()),T(t=>{const n=ze("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),i=ze("bubble bubble--host relative transition-all duration-300",o()&&"bubble--typing");return n!==t._v$&&ke(r,t._v$=n),i!==t._v$2&&ke(a,t._v$2=i),t},{_v$:void 0,_v$2:void 0}),r})()},[Mn,Un]=S("100%"),On=we('<div><div class="flex w-full items-center"><div class="flex z-10 items-start w-full max-w-full"><div>'),Rn=we('<div class="w-full overflow-y-auto">'),Dn=we('<div class="animate-fade-in w-full">'),Ln=we('<iframe id="block-embed" class="w-full rounded-md">');let qn;const jn=e=>{let t,n;const[r,o]=S(!!e.onTransitionEnd),a=e.content?.initFunction,i=t=>{e.content?.waitForEvent?.isEnabled&&Ke(t.data.name)&&t.data.name===e.content?.waitForEvent.name&&(e.onCompleted?.(e.content.waitForEvent.saveDataInVariableId&&t.data.data?{type:"text",value:t.data.data}:void 0),window.removeEventListener("message",i))};return E(()=>{if(a){mn({args:{...a.args,botElement:n},content:a.content});const t=e.content?.waitForEventFunction;t&&mn({args:{...t.args,continueFlow:t=>e.onCompleted?.(t?{type:"text",value:t}:void 0)},content:t.content})}qn=setTimeout(()=>{o(!1),!a&&e.content?.waitForEvent?.isEnabled&&window.addEventListener("message",i),setTimeout(()=>{e.onTransitionEnd?.(t)},400)},2e3)}),A(()=>{qn&&clearTimeout(qn),window.removeEventListener("message",i)}),(()=>{const o=On(),i=o.firstChild.firstChild.firstChild;return"function"==typeof t?$e(t,o):t=o,Pe(i,(()=>{const t=$(()=>!!r());return()=>t()?Q($n,{}):(()=>{const t=Dn();return Pe(t,Q(de,{when:a,get fallback(){return(()=>{const t=Ln();return T(n=>{const r=e.content?.url,o=e.content?.height?{height:`${e.content.height}px`}:{height:"100%"};return r!==n._v$3&&_e(t,"src",n._v$3=r),n._v$4=Te(t,o,n._v$4),n},{_v$3:void 0,_v$4:void 0}),t})()},get children(){const e=Rn();return"function"==typeof n?$e(n,e):n=e,T(()=>null!=`calc(${Mn()} - 100px)`?e.style.setProperty("max-height",`calc(${Mn()} - 100px)`):e.style.removeProperty("max-height")),e}})),t})()})()),T(t=>{const n=ze("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),a=ze("bubble bubble--host relative transition-all duration-300 z-20 w-full",r()&&"bubble--typing");return n!==t._v$&&ke(o,t._v$=n),a!==t._v$2&&ke(i,t._v$2=a),t},{_v$:void 0,_v$2:void 0}),o})()},Fn={alt:"Bubble image"},Nn=we('<img elementtiming="Bubble image" fetchpriority="high">'),zn=we('<div><div class="flex w-full items-center"><div class="flex z-10 items-start max-w-full"><div>'),Vn=we('<div class="animate-fade-in w-full">'),Hn=we('<a target="_blank" class="z-10 bubble">'),Wn=we('<figure class="z-10 w-full">');let Gn;const Kn=e=>{let t,n;const[r,o]=S(!!e.onTransitionEnd),a=()=>{r()&&(o(!1),setTimeout(()=>{e.onTransitionEnd?.(t)},400))};E(()=>{n&&(Gn=setTimeout(a,5e3),n.onload=()=>{clearTimeout(Gn),a()})}),A(()=>{Gn&&clearTimeout(Gn)});const i=(()=>{const t=Nn();return"function"==typeof n?$e(n,t):n=t,T(n=>{const r=e.content?.url,o=e.content?.clickLink?.alt??Fn.alt,a=ze(e.onTransitionEnd?"transition-opacity duration-[400ms] ease-in delay-200":void 0,e.content?.url?.endsWith(".svg")?"w-full":void 0,"rounded-md max-h-[512px]");return r!==n._v$&&_e(t,"src",n._v$=r),o!==n._v$2&&_e(t,"alt",n._v$2=o),a!==n._v$3&&ke(t,n._v$3=a),n},{_v$:void 0,_v$2:void 0,_v$3:void 0}),t})();return(()=>{const n=zn(),o=n.firstChild.firstChild.firstChild;return"function"==typeof t?$e(t,n):t=n,Pe(o,(()=>{const t=$(()=>!!r());return()=>t()?Q($n,{}):(()=>{const t=Vn();return Pe(t,(()=>{const t=$(()=>!!e.content?.clickLink);return()=>t()?(()=>{const t=Hn();return Pe(t,i),T(()=>_e(t,"href",e.content.clickLink.url)),t})():(()=>{const e=Wn();return Pe(e,i),e})()})()),t})()})()),T(t=>{const a=ze("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),i=ze("bubble bubble--host relative transition-all duration-300",r()&&"bubble--typing");return a!==t._v$4&&ke(n,t._v$4=a),i!==t._v$5&&ke(o,t._v$5=i),t},{_v$4:void 0,_v$5:void 0}),n})()};var Yn={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function Jn(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function Zn(e){return(e+"").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function Xn(e,t){var n,r,o,a,i,s=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,l=[],c="",d=t||{},u=0;function p(e){var t=Yn[e[1]||""],n=l[l.length-1]==e;return t?t[1]?(n?l.pop():l.push(e),t[0|n]):t[0]:e}function g(){for(var e="";l.length;)e+=p(l[l.length-1]);return e}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(e,t,n){return d[t.toLowerCase()]=n,""}).replace(/^\n+|\n+$/g,"");o=s.exec(e);)r=e.substring(u,o.index),u=s.lastIndex,n=o[0],r.match(/[^\\](\\\\)*\\$/)||((i=o[3]||o[4])?n='<pre class="code '+(o[4]?"poetry":o[2].toLowerCase())+'"><code'+(o[2]?' class="language-'+o[2].toLowerCase()+'"':"")+">"+Jn(Zn(i).replace(/^\n+|\n+$/g,""))+"</code></pre>":(i=o[6])?(i.match(/\./)&&(o[5]=o[5].replace(/^\d+/gm,"")),a=Xn(Jn(o[5].replace(/^\s*[>*+.-]/gm,""))),">"==i?i="blockquote":(i=i.match(/\./)?"ol":"ul",a=a.replace(/^(.*)(\n|$)/gm,"<li>$1</li>")),n="<"+i+">"+a+"</"+i+">"):o[8]?n='<img src="'+Zn(o[8])+'" alt="'+Zn(o[7])+'">':o[10]?(c=c.replace("<a>",'<a href="'+Zn(o[11]||d[r.toLowerCase()])+'">'),n=g()+"</a>"):o[9]?n="<a>":o[12]||o[14]?n="<"+(i="h"+(o[14]?o[14].length:o[13]>"="?1:2))+">"+Xn(o[12]||o[15],d)+"</"+i+">":o[16]?n="<code>"+Zn(o[16])+"</code>":(o[17]||o[1])&&(n=p(o[17]||"--"))),c+=r,c+=n;return(c+e.substring(u)+g()).replace(/^\n+|\n+$/g,"")}const Qn=e=>{const t=[],n=Math.random().toString(36).slice(2,10);let r=Xn(e.replace(/\*\*\*([^*\n]+)\*\*\*/g,"**_$1_**").replace(/(https?:\/\/[^\s<>()[\]]+)/g,e=>{const r=`URLPH${n}X${t.length}URLEND`;return t.push(e),r}));return t.forEach((e,t)=>{r=r.replace(`URLPH${n}X${t}URLEND`,e)}),r=r.replace(/<a\s+href=/g,'<a target="_blank" rel="noopener noreferrer" href='),r},er=we('<div><div class="flex w-full items-center"><div class="flex items-start max-w-full"><div data-testid="host-bubble">'),tr=we('<div class="animate-fade-in">');let nr;const rr=e=>{let t;const[n,r]=S(!!e.onTransitionEnd),o=()=>{n()&&(r(!1),setTimeout(()=>{e.onTransitionEnd?.(t)},400))};return E(()=>{if(!n())return;const t=e.content?.markdown??"",r=!1===e.typingEmulation?.enabled||e.isTypingSkipped?0:(({bubbleContent:e,typingSettings:t})=>{let n=e.match(/(\w+)/g)?.length??0;0===n&&(n=e.length);const{enabled:r,speed:o,maxDelay:a}={enabled:t?.enabled??Kt.enabled,speed:t?.speed??Kt.speed,maxDelay:t?.maxDelay??Kt.maxDelay};let i=r?n/o*6e4:0;return i>1e3*a&&(i=1e3*a),i})({bubbleContent:t,typingSettings:e.typingEmulation});nr=setTimeout(o,r)}),A(()=>{nr&&clearTimeout(nr)}),(()=>{const r=er(),o=r.firstChild.firstChild.firstChild;return"function"==typeof t?$e(t,r):t=r,Pe(o,(()=>{const t=$(()=>!!n());return()=>t()?Q($n,{}):(()=>{const t=tr();return T(()=>t.innerHTML=Qn(e.content?.markdown)),t})()})()),T(t=>{const a=ze("flex flex-col",e.onTransitionEnd?"animate-fade-in":void 0),i=ze("bubble bubble--host relative transition-all duration-300",n()?"bubble--typing":"text-ellipsis whitespace-pre-wrap overflow-auto");return a!==t._v$&&ke(r,t._v$=a),i!==t._v$2&&ke(o,t._v$2=i),t},{_v$:void 0,_v$2:void 0}),r})()};let or=function(e){return e.URL="url",e.YOUTUBE="youtube",e.VIMEO="vimeo",e.TIKTOK="tiktok",e.GUMLET="gumlet",e}({});const ar=[or.YOUTUBE,or.VIMEO,or.TIKTOK,or.GUMLET],ir=400,sr="100%",lr=!0,cr=!0,dr={[or.VIMEO]:"https://player.vimeo.com/video",[or.YOUTUBE]:"https://www.youtube.com/embed",[or.TIKTOK]:"https://www.tiktok.com/embed/v2",[or.GUMLET]:"https://play.gumlet.io/embed"},ur=we('<div><div class="flex w-full items-center"><div class="flex z-10 items-start overflow-hidden w-full max-w-full"><div>'),pr=we('<div class="focus:outline-none w-full animate-fade-in"><video class="w-full rounded-md">'),gr=we('<div class="z-10 w-full animate-fade-in"><iframe class="w-full h-full rounded-md" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>');let br;const hr=e=>{let t;const[n,r]=S(!!e.onTransitionEnd);return E(()=>{const o=e.content?.type&&ar.includes(e.content?.type)?2e3:100;br=setTimeout(()=>{n()&&(r(!1),setTimeout(()=>{e.onTransitionEnd?.(t)},400))},o)}),A(()=>{br&&clearTimeout(br)}),(()=>{const r=ur(),o=r.firstChild.firstChild.firstChild;return"function"==typeof t?$e(t,r):t=r,Pe(o,(()=>{const t=$(()=>!!n());return()=>t()?Q($n,{}):Q(ue,{get children(){return[Q(pe,{get when(){return e.content?.type&&e.content.type===or.URL},get children(){const t=pr(),n=t.firstChild;return T(t=>{const r=!!e.onTransitionEnd&&(e.content?.isAutoplayEnabled??cr),o=e.content?.url,a=e.content?.areControlsDisplayed??lr,i=e.content?.aspectRatio;return r!==t._v$4&&(n.autoplay=t._v$4=r),o!==t._v$5&&_e(n,"src",t._v$5=o),a!==t._v$6&&(n.controls=t._v$6=a),i!==t._v$7&&(null!=(t._v$7=i)?n.style.setProperty("aspect-ratio",i):n.style.removeProperty("aspect-ratio")),t},{_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0}),t}}),Q(pe,{get when(){return $(()=>!!e.content?.type)()&&ar.includes(e.content.type)},get children(){const t=gr(),n=t.firstChild;return T(r=>{const o=e.content?.aspectRatio?void 0:`${e.content?.height??ir}px`,a=e.content?.aspectRatio,i=`${dr[e.content?.type]}/${e.content?.id??""}${e.content?.queryParamsStr??""}`;return o!==r._v$8&&(null!=(r._v$8=o)?t.style.setProperty("height",o):t.style.removeProperty("height")),a!==r._v$9&&(null!=(r._v$9=a)?t.style.setProperty("aspect-ratio",a):t.style.removeProperty("aspect-ratio")),i!==r._v$0&&_e(n,"src",r._v$0=i),r},{_v$8:void 0,_v$9:void 0,_v$0:void 0}),t}})]}})})()),T(t=>{const a=ze("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),i=ze("bubble bubble--host relative transition-all duration-300",n()&&"bubble--typing"),s=n()?e.content?.maxWidth??sr:void 0;return a!==t._v$&&ke(r,t._v$=a),i!==t._v$2&&ke(o,t._v$2=i),s!==t._v$3&&(null!=(t._v$3=s)?o.style.setProperty("max-width",s):o.style.removeProperty("max-width")),t},{_v$:void 0,_v$2:void 0,_v$3:void 0}),r})()};let fr=function(e){return e.TEXT="text",e.IMAGE="image",e.VIDEO="video",e.EMBED="embed",e.AUDIO="audio",e}({});const mr=e=>Q(ue,{get children(){return[Q(pe,{get when(){return e.message.type===fr.TEXT},get children(){return Q(rr,{get content(){return e.message.content},get isTypingSkipped(){return e.isTypingSkipped},get typingEmulation(){return e.typingEmulation},get onTransitionEnd(){return e.onTransitionEnd}})}}),Q(pe,{get when(){return e.message.type===fr.IMAGE},get children(){return Q(Kn,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd}})}}),Q(pe,{get when(){return e.message.type===fr.VIDEO},get children(){return Q(hr,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd}})}}),Q(pe,{get when(){return e.message.type===fr.EMBED},get children(){return Q(jn,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd},get onCompleted(){return e.onCompleted}})}}),Q(pe,{get when(){return e.message.type===fr.AUDIO},get children(){return Q(Bn,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd}})}})]}}),yr=we('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" data-testid="avatar-placeholder"><circle cx="12" cy="12" r="12" fill="#5DDE8A"></circle><g transform="translate(2.4,2.4) scale(0.8)"><path d="M14.085 18.295H5.272V9.679C5.272 7.121 7.357 5.075 9.875 5.075H14.046C16.603 5.075 18.649 7.161 18.649 9.679V13.692C18.689 16.210 16.643 18.295 14.085 18.295ZM6.492 17.115H14.125C16.013 17.115 17.548 15.580 17.548 13.692V9.679C17.548 7.790 16.013 6.256 14.125 6.256H9.915C8.026 6.256 6.492 7.790 6.492 9.679V17.115Z" fill="#fff"></path><circle cx="11.961" cy="11.685" r="0.945" fill="#fff"></circle><circle cx="8.971" cy="11.685" r="0.945" fill="#fff"></circle><circle cx="15.030" cy="11.685" r="0.945" fill="#fff">'),vr=({boxSize:e,width:t}={})=>{const n=e||t||"2.5rem";return(()=>{const e=yr();return null!=n?e.style.setProperty("width",n):e.style.removeProperty("width"),null!=n?e.style.setProperty("height",n):e.style.removeProperty("height"),e})()},wr=we('<img alt="Bot avatar" class="rounded-full object-cover w-full h-full" elementtiming="Bot avatar" fetchpriority="high">'),xr=we('<figure class="flex justify-center items-center rounded-full text-white relative animate-fade-in flex-shrink-0 w-10 h-10 text-xl">'),_r=e=>{const[t,n]=S(e.initialAvatarSrc);return C(()=>{!t()?.startsWith("{{")&&t()||!e.initialAvatarSrc?.startsWith("http")||n(e.initialAvatarSrc)}),(()=>{const e=xr();return Pe(e,Q(de,{get when(){return Ke(t())},keyed:!0,get fallback(){return Q(vr,{})},get children(){const e=wr();return T(()=>_e(e,"src",t())),e}})),e})()},kr=we("<div>"),Sr=we('<button type="button">'),Tr=e=>{C(()=>{e.open?document.body.style.overflow="hidden":document.body.style.overflow=""}),A(()=>{document.body.style.overflow=""});const t=t=>{t.target===t.currentTarget&&e.onOpenChange?.({open:!1})},n=t=>{"Escape"===t.key&&e.open&&e.onOpenChange?.({open:!1})};return C(()=>{e.open&&(document.addEventListener("keydown",n),A(()=>document.removeEventListener("keydown",n)))}),Q(de,{get when(){return e.open||!e.unmountOnExit},get children(){return Q(Re,{get children(){const n=kr();return n.$$click=t,Pe(n,()=>e.children),T(()=>ke(n,ze(e.open?"block":"hidden"))),n}})}})},Cr=e=>(()=>{const t=kr();return Pe(t,()=>e.children),T(()=>ke(t,e.class)),t})(),$r=e=>(()=>{const t=kr();return Pe(t,()=>e.children),T(()=>ke(t,e.class)),t})(),Pr=e=>(()=>{const t=kr();return Pe(t,()=>e.children),T(()=>ke(t,e.class)),t})(),Ir=e=>(()=>{const t=Sr();return Pe(t,()=>e.children),T(()=>ke(t,e.class)),t})();xe(["click"]);const Er=we("<div>"),Ar=we('<svg width="48" height="48" viewBox="0 0 48 48">'),Br=we('<svg><circle cx="24" cy="24" r="22" fill="none" stroke="rgba(255, 255, 255, 0.3)" stroke-width="4"></svg>',!1,!0),Mr=we('<svg><circle cx="24" cy="24" r="22" fill="none" stroke="white" stroke-width="4" stroke-linecap="round"></svg>',!1,!0);let Ur=0,Or=100;const Rr=e=>{const t=oe({max:100,value:0},e);return Ur=t.value,Or=t.max,(()=>{const t=Er();return Pe(t,()=>e.children),T(()=>ke(t,e.class)),t})()},Dr=e=>(()=>{const t=Ar();return Pe(t,()=>e.children),T(()=>_e(t,"class",ze(e.class,"-rotate-90"))),t})(),Lr=e=>(()=>{const t=Br();return T(()=>_e(t,"class",e.class)),t})(),qr=e=>{const t=44*Math.PI,n=t-Ur/Or*100/100*t;return(()=>{const r=Mr();return _e(r,"stroke-dasharray",t),_e(r,"stroke-dashoffset",n),T(()=>_e(r,"class",ze(e.class,"[transition:stroke-dashoffset_0.3s_ease]"))),r})()},jr=we('<button type="button" aria-haspopup="menu">'),Fr=we('<div data-scope="menu" data-part="positioner" dir="ltr" class="absolute isolate min-w-max top-0 left-0 [transform:translate3d(var(--x),var(--y),0)] [z-index:var(--z-index)]">'),Nr=we('<div data-scope="menu" data-part="content" role="menu" tabindex="0" dir="ltr">'),zr=we('<div data-scope="menu" data-part="item" role="menuitem" aria-disabled="false">'),Vr=M(),Hr=e=>{const[t,n]=S(!1),[r,o]=S(),[a,i]=S(),[s,l]=S(),c=`menu:${Math.random().toString(36).substr(2,9)}`;return Q(Vr.Provider,{value:{isOpen:t,setIsOpen:n,get triggerRef(){return r()},setTriggerRef:e=>o(e),get positionerRef(){return a()},setPositionerRef:e=>i(e),get contentRef(){return s()},menuId:c},get children(){return e.children}})},Wr=e=>{const t=U(Vr);if(!t)throw new Error("Menu.Trigger must be used within Menu.Root");const n=e=>{e.stopPropagation(),t.setIsOpen(!t.isOpen())};return(()=>{const r=jr();return r.$$click=n,$e(e=>t.setTriggerRef(e),r),Pe(r,()=>e.children),T(n=>{const o=e.class,a=e["aria-label"],i=t.isOpen()?"open":"closed",s=`${t.menuId}:trigger`,l=t.isOpen()?`${t.menuId}:content`:void 0,c=t.isOpen();return o!==n._v$&&ke(r,n._v$=o),a!==n._v$2&&_e(r,"aria-label",n._v$2=a),i!==n._v$3&&_e(r,"data-state",n._v$3=i),s!==n._v$4&&_e(r,"id",n._v$4=s),l!==n._v$5&&_e(r,"aria-controls",n._v$5=l),c!==n._v$6&&_e(r,"aria-expanded",n._v$6=c),n},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0}),r})()},Gr=e=>{const t=U(Vr);if(!t)throw new Error("Menu.Positioner must be used within Menu.Root");const n=e=>{const n=e.target;t.triggerRef&&!t.triggerRef.contains(n)&&t.positionerRef&&!t.positionerRef.contains(n)&&t.setIsOpen(!1)},r=e=>{"Escape"===e.key&&t.setIsOpen(!1)};return C(()=>{t.isOpen()&&(setTimeout(()=>{document.addEventListener("click",n),document.addEventListener("keydown",r)},0),A(()=>{document.removeEventListener("click",n),document.removeEventListener("keydown",r)}))}),Q(de,{get when(){return t.isOpen()},get children(){const n=Fr();return $e(e=>t.setPositionerRef(e),n),n.style.setProperty("--transform-origin","center center"),n.style.setProperty("--reference-width","0px"),n.style.setProperty("--available-width","0px"),n.style.setProperty("--available-height","0px"),n.style.setProperty("--x","0px"),n.style.setProperty("--y","0px"),n.style.setProperty("--z-index","auto"),Pe(n,()=>e.children),T(()=>_e(n,"id",`${t.menuId}:popper`)),n}})},Kr=e=>{const t=U(Vr);if(!t)throw new Error("Menu.Content must be used within Menu.Root");const n=e.side??"bottom",r=e.align??"start",o=e.sideOffset??4,a=e.alignOffset??0;let i;const[s,l]=S(!1),c=()=>`${n}-${r}`,d=()=>{if(i&&t.triggerRef&&t.positionerRef){const e=t.triggerRef.getBoundingClientRect(),s=i.getBoundingClientRect(),l=t.positionerRef.offsetParent,d=l?l.getBoundingClientRect():{top:0,left:0};let u=0,p=0,g=0,b=0;switch(n){case"top":g=e.top-s.height-o;break;case"bottom":g=e.bottom+o;break;case"left":b=e.left-s.width-o;break;case"right":b=e.right+o}if("top"===n||"bottom"===n)switch(r){case"start":b=e.left+a;break;case"center":b=e.left+e.width/2-s.width/2+a;break;case"end":b=e.right-s.width+a}else switch(r){case"start":g=e.top+a;break;case"center":g=e.top+e.height/2-s.height/2+a;break;case"end":g=e.bottom-s.height+a}p=b-d.left,u=g-d.top;const h=window.innerWidth,f=window.innerHeight;t.positionerRef.style.setProperty("--x",`${p}px`),t.positionerRef.style.setProperty("--y",`${u}px`),t.positionerRef.style.setProperty("--reference-width",`${e.width}px`),t.positionerRef.style.setProperty("--available-width",`${h}px`),t.positionerRef.style.setProperty("--available-height",`${f}px`),t.positionerRef.style.setProperty("--transform-origin",{"top-start":"bottom left","top-center":"bottom center","top-end":"bottom right","bottom-start":"top left","bottom-center":"top center","bottom-end":"top right","left-start":"right top","left-center":"right center","left-end":"right bottom","right-start":"left top","right-center":"left center","right-end":"left bottom"}[c()]||"center center")}},u=()=>{if(!i)return void requestAnimationFrame(u);const e=i.getBoundingClientRect();0!==e.width&&0!==e.height?(d(),l(!0)):requestAnimationFrame(u)};return C(()=>{t.isOpen()&&(l(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{u()})}),window.addEventListener("scroll",d,!0),window.addEventListener("resize",d),A(()=>{window.removeEventListener("scroll",d,!0),window.removeEventListener("resize",d)}))}),(()=>{const n=Nr();return"function"==typeof i?$e(i,n):i=n,n.style.setProperty("--layer-index","1"),Pe(n,()=>e.children),T(r=>{const o=`${t.menuId}:content`,a=t.isOpen()?"open":"closed",i=`${t.menuId}:trigger`,l=c(),d=ze("pointer-events-auto bg-white rounded-md shadow-md w-fit transition-opacity duration-100 ease-in-out",s()?"opacity-100":"opacity-0",e.class);return o!==r._v$7&&_e(n,"id",r._v$7=o),a!==r._v$8&&_e(n,"data-state",r._v$8=a),i!==r._v$9&&_e(n,"aria-labelledby",r._v$9=i),l!==r._v$0&&_e(n,"data-placement",r._v$0=l),d!==r._v$1&&ke(n,r._v$1=d),r},{_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$0:void 0,_v$1:void 0}),n})()},Yr=e=>{const t=U(Vr);if(!t)throw new Error("Menu.Item must be used within Menu.Root");const n=()=>{t.setIsOpen(!1)};return Q(de,{get when(){return e.asChild},get fallback(){return(()=>{const r=zr();return r.$$click=n,Pe(r,()=>e.children),T(n=>{const o=e.class,a=e.value,i=`${t.menuId}:content`;return o!==n._v$10&&ke(r,n._v$10=o),a!==n._v$11&&_e(r,"id",n._v$11=a),i!==n._v$12&&_e(r,"data-ownedby",n._v$12=i),n},{_v$10:void 0,_v$11:void 0,_v$12:void 0}),r})()},get children(){return e.asChild?O(()=>e.asChild(()=>({onClick:n,role:"menuitem","data-scope":"menu","data-part":"item",id:e.value,"aria-disabled":"false","data-ownedby":`${t.menuId}:content`})))():null}})};xe(["click"]);const Jr=we('<div class="fixed z-[100] flex flex-col gap-6 p-4">'),Zr=we("<div>"),Xr=we('<button type="button">');const Qr=e=>Q(Re,{get children(){const t=Jr();return Pe(t,Q(le,{get each(){return e.toaster.toasts()},children:t=>{const n=()=>t;return $(()=>e.children(n))}})),t}}),eo=e=>(()=>{const t=Zr();return Pe(t,()=>e.children),T(()=>ke(t,ze("bg-white rounded-lg shadow-lg p-4 min-w-[300px] relative",e.class))),t})(),to=e=>(()=>{const t=Zr();return Pe(t,()=>e.children),T(()=>ke(t,ze("font-semibold mb-1",e.class))),t})(),no=e=>(()=>{const t=Zr();return Pe(t,()=>e.children),T(()=>ke(t,ze("text-sm text-gray-500",e.class))),t})(),ro=e=>(()=>{const t=Xr();return Pe(t,()=>e.children),T(()=>ke(t,ze("cursor-pointer bg-transparent border-none p-1",e.class))),t})(),oo=M(void 0),ao=e=>Q(oo.Provider,{get value(){return e.value},get children(){return e.children}}),io=e=>Q(Tr,{get open(){return e.isOpen},lazyMount:!0,unmountOnExit:!0,onOpenChange:t=>t.open?void 0:e.onClose?.(),get children(){return[Q(Cr,{class:"fixed inset-0 bg-[rgba(0,0,0,0.5)] h-screen z-50"}),Q($r,{class:"fixed inset-0 z-50 flex items-center justify-center px-2",get children(){return[Q(Pr,{get children(){return e.children}}),Q(Ir,{class:"fixed top-2 right-2 z-50 rounded-md bg-white p-2 text-black",get children(){return Q(st,{class:"w-4"})}})]}})]}}),so=we('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2px" stroke-linecap="round" stroke-linejoin="round"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4">'),lo=e=>(()=>{const t=so();return Ce(t,e,!0,!0),t})(),co=we('<div class="flex items-center gap-4 border bg-white border-gray-200 rounded-md p-2 text-gray-900 min-w-[250px]"><div></div><div class="flex flex-col"><span class="text-md font-normal text-sm"></span><span class="text-gray-500 text-xs">'),uo=e=>{const t=go(e.file);return(()=>{const n=co(),r=n.firstChild,o=r.nextSibling.firstChild,a=o.nextSibling;return Pe(r,Q(lo,{class:"w-6 h-6"})),Pe(o,()=>e.file.name),Pe(a,()=>po(e.file)),T(()=>ke(r,ze("rounded-md text-white p-2 flex items-center","pink"===t&&"bg-pink-400","blue"===t&&"bg-blue-400","green"===t&&"bg-green-400","gray"===t&&"bg-gray-400","orange"===t&&"bg-orange-400"))),n})()},po=e=>{switch(e.name.split(".").pop()){case"pdf":return"PDF";case"doc":case"docx":return"Word";case"xls":case"xlsx":case"csv":return"Sheet";case"json":return"JSON";case"md":return"Markdown";default:return"DOCUMENT"}},go=e=>{const t=e.name.split(".").pop();if(!t)return"gray";switch(t){case"pdf":return"pink";case"doc":case"docx":return"blue";case"xls":case"xlsx":case"csv":return"green";case"json":return"orange";default:return"gray"}},bo=we('<div class="flex justify-end items-end animate-fade-in gap-2">'),ho=we('<div class="flex gap-1 overflow-auto max-w-[350px] flex-wrap justify-end">'),fo=we('<div class="bubble bubble--guest whitespace-pre-wrap flex flex-col" data-testid="guest-bubble"><span class="break-words">'),mo=we('<img alt="Attachment" class="rounded-[6px]">'),yo=we('<div class="flex flex-col gap-1 items-end w-full">'),vo=we("<img>"),wo=we('<div class="flex flex-col gap-1 items-end"><div class="bubble bubble--guest w-full w-whitespace-pre-wrap flex flex-col" data-testid="guest-bubble"><audio controls>'),xo=e=>(()=>{const t=bo();return Pe(t,Q(ue,{get children(){return[Q(pe,{get when(){return"text"===e.answer?.type},get children(){return Q(_o,{get answer(){return e.answer}})}}),Q(pe,{get when(){return"recording"===e.answer?.type},get children(){return Q(ko,{get answer(){return e.answer}})}})]}}),null),Pe(t,Q(de,{get when(){return e.showAvatar},get children(){return Q(_r,{get initialAvatarSrc(){return e.avatarSrc}})}}),null),T(()=>null!=(e.hasHostAvatar?"50px":void 0)?t.style.setProperty("margin-left",e.hasHostAvatar?"50px":void 0):t.style.removeProperty("margin-left")),t})(),_o=e=>{const[t,n]=S();return(()=>{const r=yo();return Pe(r,Q(de,{get when(){return(e.answer.attachments??[]).length>0},get children(){return[(()=>{const t=ho();return Pe(t,Q(le,{get each(){return e.answer.attachments?.filter(e=>e.type.startsWith("image"))},children:(t,r)=>(()=>{const o=vo();return o.$$click=()=>n(t.url),T(n=>{const a=t.url,i=`Attached image ${r()+1}`,s=ze("bubble bubble--guest cursor-pointer",e.answer.attachments.filter(e=>e.type.startsWith("image")).length>1&&"max-w-[90%]");return a!==n._v$&&_e(o,"src",n._v$=a),i!==n._v$2&&_e(o,"alt",n._v$2=i),s!==n._v$3&&ke(o,n._v$3=s),n},{_v$:void 0,_v$2:void 0,_v$3:void 0}),o})()})),t})(),(()=>{const t=ho();return Pe(t,Q(le,{get each(){return e.answer.attachments?.filter(e=>!e.type.startsWith("image"))},children:e=>Q(uo,{get file(){return{name:e.url.split("/").at(-1)}}})})),t})()]}}),null),Pe(r,Q(de,{get when(){return Ke(e.answer.label??e.answer.value)},get children(){const t=fo();return Pe(t.firstChild,()=>e.answer.label??e.answer.value),t}}),null),Pe(r,Q(io,{get isOpen(){return void 0!==t()},onClose:()=>n(void 0),get children(){const e=mo();return T(()=>_e(e,"src",t())),e}}),null),r})()},ko=e=>(()=>{const t=wo(),n=t.firstChild.firstChild;return T(()=>_e(n,"src",e.answer.url)),t})();xe(["click"]);const So=we('<div class="flex flex-shrink-0 items-center relative bot-avatar-container w-10"><div>'),To=e=>{let t;const[n,r]=S(0),o=new ResizeObserver(e=>r(e[0].target.clientHeight-40));return E(()=>{t&&o.observe(t)}),A(()=>{t&&o.unobserve(t)}),(()=>{const r=So(),o=r.firstChild;return"function"==typeof t?$e(t,r):t=r,Pe(o,Q(_r,{get initialAvatarSrc(){return e.hostAvatarSrc}})),T(t=>{const r=ze("absolute flex items-center top-0 w-10 h-10",e.hideAvatar?"opacity-0":"opacity-100",!e.isTransitionDisabled&&"[transition:top_350ms_ease-out,opacity_250ms_ease-out]"),a=`${n()}px`;return r!==t._v$&&ke(o,t._v$=r),a!==t._v$2&&(null!=(t._v$2=a)?o.style.setProperty("top",a):o.style.removeProperty("top")),t},{_v$:void 0,_v$2:void 0}),r})()},Co=we('<div class="flex flex-col animate-fade-in"><div class="flex w-full items-center"><div class="flex relative items-start max-w-full"><div class="bubble bubble--host flex items-center absolute w-full h-full" data-testid="host-bubble"></div><div class="bubble flex flex-col overflow-hidden relative text-ellipsis h-full gap-6">'),$o=we("<span>"),Po=e=>{const[t,n]=on(S([]),{key:`bot-streaming-message-${e.streamingMessageId}`,storage:e.context.storage});return C(()=>{if(xn()?.id!==e.streamingMessageId)return[];n(xn()?.content.split("```").map((e,t)=>t%2==0?e.split("\n\n").map(e=>Qn(e.replace(/【.+】/g,""))):[Qn("```"+e+"```")]).flat().filter(Ke)??[])}),(()=>{const e=Co();return Pe(e.firstChild.firstChild.firstChild.nextSibling,Q(le,{get each(){return t()},children:e=>(()=>{const t=$o();return t.innerHTML=e,t})()})),e})()};let Io=function(e){return e.COLOR="Color",e.IMAGE="Image",e.NONE="None",e}({});[{label:"Top",value:"top"},{label:"Bottom",value:"bottom"}].map(e=>e.value),[{label:"Fixed",value:"fixed"},{label:"Absolute",value:"absolute"}].map(e=>e.value);const Eo="Open Sans",Ao="absolute",Bo="transparent",Mo="#01a952",Uo=!0,Oo=we('<div class="flex flex-col w-full min-w-0 gap-2"><div class="flex gap-1"><div class="flex flex-col flex-1 gap-2 w-10">'),Ro=e=>{const{getDisplayedMessageIndex:t,setDisplayedMessageIndex:n,chatChunks:r,sendMessage:o}=Tn(),[a,i]=S(!1);C(()=>{e.isTransitionDisabled?(n(e.index,e.messages.length),i(!0)):a()||(n(e.index,0),i(!0))});const s=()=>t(e.index);E(()=>{e.streamingMessageId||0===e.messages.length&&e.onAllBubblesDisplayed()});const l=async()=>{(e.settings.typingEmulation?.delayBetweenBubbles??Kt.delayBetweenBubbles)>0&&s()<e.messages.length-1&&await new Promise(t=>setTimeout(t,1e3*(e.settings.typingEmulation?.delayBetweenBubbles??Kt.delayBetweenBubbles)));const t=e.messages[s()].id;await e.onNewBubbleDisplayed(t),n(e.index,s()===e.messages.length?s():s()+1),s()===e.messages.length&&e.onAllBubblesDisplayed()};return(()=>{const t=Oo(),n=t.firstChild,a=n.firstChild;return Pe(n,Q(de,{get when(){return(e.theme.chat?.hostAvatar?.isEnabled??Uo)&&(e.messages.length>0||e.streamingMessageId)},get children(){return Q(To,{get hostAvatarSrc(){return e.theme.chat?.hostAvatar?.url},get hideAvatar(){return e.hideAvatar},get isTransitionDisabled(){return e.isTransitionDisabled}})}}),a),Pe(a,Q(de,{get when(){return e.messages.length>0},get children(){return Q(le,{get each(){return e.messages.slice(0,s()+1)},children:(t,n)=>Q(mr,{message:t,get typingEmulation(){return e.settings.typingEmulation},get isTypingSkipped(){return $(()=>!(!(e.settings.typingEmulation?.isDisabledOnFirstMessage??Kt.isDisabledOnFirstMessage)||0!==e.index))()&&0===n()},get onTransitionEnd(){return e.isTransitionDisabled?void 0:l},onCompleted:o})})}}),null),Pe(a,Q(de,{get when(){return e.streamingMessageId},keyed:!0,children:t=>Q(Po,{streamingMessageId:t,get context(){return e.context}})}),null),Pe(t,Q(de,{get when(){return s()===e.messages.length&&e.input},get children(){return Q(de,{get when(){return $(()=>!e.hasError)()&&r()[e.index]?.input?.answer},get children(){return Q(xo,{get answer(){return r()[e.index]?.input?.answer},get showAvatar(){return e.theme.chat?.guestAvatar?.isEnabled??false},get avatarSrc(){return e.theme.chat?.guestAvatar?.url},get hasHostAvatar(){return e.theme.chat?.hostAvatar?.isEnabled??Uo}})}})}}),null),t})()},Do=we('<div class="toast toast--popup-blocked w-full max-w-xs p-4 bg-white shadow-lg flex flex-col gap-3 border border-gray-200" role="alert"><div class="flex items-start gap-2"><div class="flex flex-col gap-1 flex-1"><div class="flex-shrink-0 mt-0.5"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-orange-500" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg></div><span class="text-sm font-semibold text-gray-900">Popup blocked</span><div class="text-sm font-normal text-gray-600 leading-relaxed">The bot wants to open a new tab but it was blocked by your browser. It needs a manual approval.</div></div></div><a target="_blank" class="button justify-center text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2 flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 rounded-lg hover:opacity-90 active:scale-[0.98]" rel="noreferrer"><span>Continue in new tab</span><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" viewBox="0 0 20 20" fill="currentColor"><path d="M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"></path><path d="M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z">'),Lo=e=>(()=>{const t=Do(),n=t.firstChild.nextSibling;return n.$$click=()=>e.onLinkClick(),T(()=>_e(n,"href",e.url)),t})();xe(["click"]);const qo=we('<div class="conversation-container__body flex flex-col overflow-y-auto w-full px-5 py-10 relative flex-[9]"><div class="flex flex-col gap-2">'),jo=we('<div class="flex justify-end">'),Fo=e=>{const{chatChunks:t,theme:n,hasError:r,blockedPopupUrl:o,setBlockedPopupUrl:a,isSending:i,processClientSideActions:s,onBubblesDisplayed:l,registerScrollToBottom:c}=Tn();let d,u,p,g,b=!0,h=0;E(()=>{const e=new ResizeObserver(()=>{g&&cancelAnimationFrame(g),g=requestAnimationFrame(()=>{Wt(d,b),g=void 0})});u&&e.observe(u),d?.addEventListener("scroll",()=>{if(!d)return;const{scrollTop:e,clientHeight:t,scrollHeight:n}=d,r=e+t>=n-50;e<h&&!r?b=!1:r&&(b=!0),h=e},{passive:!0}),c(()=>Wt(d,!0)),(async()=>{const e=t()[0];if(!e.clientSideActions)return;const n=e.clientSideActions.filter(e=>We(e.lastBubbleBlockId));await s(n)})(),A(()=>{e.disconnect(),g&&cancelAnimationFrame(g)})}),A(()=>{p&&clearTimeout(p)});const f=async()=>{const n=[...t()].pop();n&&(p&&clearTimeout(p),p=setTimeout(()=>{l(),p=void 0},300),We(n.input)&&e.onEnd?.())},m=async n=>{const r=[...t()].pop();if(!r)return;const o=r.messages.find(e=>e.id===n);if(o){if(e.onNewBlock&&e.onNewBlock({id:o.id,type:o.type}),r.clientSideActions){const e=r.clientSideActions.filter(e=>e.lastBubbleBlockId===n);await s(e)}}else console.warn(`Block with id "${n}" not found in messages`,{blockId:n,availableMessageIds:r.messages.map(e=>e.id),chunkIndex:t().length-1})};return(()=>{const s=qo(),l=s.firstChild;"function"==typeof d?$e(d,s):d=s;return"function"==typeof u?$e(u,l):u=l,Pe(l,Q(ce,{get each(){return t()},children:(o,a)=>Q(Ro,{index:a,get messages(){return o().messages},get input(){return o().input},get theme(){return n()},get settings(){return e.initialChatReply.bot.settings},get streamingMessageId(){return o().streamingMessageId},get context(){return e.context},get hideAvatar(){return $(()=>!o().input)()&&((t()[a+1]?.messages??0).length>0||void 0!==t()[a+1]?.streamingMessageId||o().messages.length>0&&i())},get hasError(){return $(()=>!!r())()&&a===t().length-1},get isTransitionDisabled(){return a!==t().length-1},onNewBubbleDisplayed:m,onAllBubblesDisplayed:f})}),null),Pe(l,Q(de,{get when(){return o()},keyed:!0,children:e=>(()=>{const t=jo();return Pe(t,Q(Lo,{url:e,onLinkClick:()=>a(void 0)})),t})()}),null),s})()},No=we('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_7660_13477)"><path d="M24 0H0V24H24V0Z" fill="#5DDE8A"></path><path d="M0 0L7.00328 7.00328L8.30164 6.25574L10.9377 5.23279H12.8262L15.8951 5.98033L17.5475 8.18361L18.0984 9.83607L18.3738 12.3541L18.4918 13.6525L17.0754 16.6426H16.6426L24 24V0H0Z" fill="#5BCB82"></path><path d="M14.0853 18.2951H5.27222V9.67872C5.27222 7.12134 7.35746 5.07544 9.87549 5.07544H14.046C16.6034 5.07544 18.6493 7.16069 18.6493 9.67872V13.6918C18.6886 16.2099 16.6427 18.2951 14.0853 18.2951ZM6.49189 17.1148H14.1247C16.0132 17.1148 17.5476 15.5804 17.5476 13.6918V9.67872C17.5476 7.79019 16.0132 6.25577 14.1247 6.25577H9.91484C8.02631 6.25577 6.49189 7.79019 6.49189 9.67872V17.1148Z" fill="white"></path><path d="M11.9609 12.6295C12.4824 12.6295 12.9051 12.2067 12.9051 11.6852C12.9051 11.1637 12.4824 10.741 11.9609 10.741C11.4394 10.741 11.0166 11.1637 11.0166 11.6852C11.0166 12.2067 11.4394 12.6295 11.9609 12.6295Z" fill="white"></path><path d="M8.97063 12.6295C9.49213 12.6295 9.91489 12.2067 9.91489 11.6852C9.91489 11.1637 9.49213 10.741 8.97063 10.741C8.44913 10.741 8.02637 11.1637 8.02637 11.6852C8.02637 12.2067 8.44913 12.6295 8.97063 12.6295Z" fill="white"></path><path d="M15.0297 12.6295C15.5512 12.6295 15.974 12.2067 15.974 11.6852C15.974 11.1637 15.5512 10.741 15.0297 10.741C14.5082 10.741 14.0854 11.1637 14.0854 11.6852C14.0854 12.2067 14.5082 12.6295 15.0297 12.6295Z" fill="white"></path></g><defs><clipPath id="clip0_7660_13477"><path d="M0 1.62712C0 0.728487 0.728486 0 1.62712 0H22.3729C23.2715 0 24 0.728486 24 1.62712V22.3729C24 23.2715 23.2715 24 22.3729 24H1.62712C0.728487 24 0 23.2715 0 22.3729V1.62712Z" fill="white">'),zo=()=>No(),Vo=we('<a href="https://quick.bot/?utm_source=litebadge" target="_blank" rel="noopener noreferrer" class="!p-3 !bg-black/[0.04] !z-50 !border-t !border-black/[0.08] !text-black/60 !gap-2 !text-xs !leading-3 !h-10 !font-normal !opacity-100 !visible !flex !items-center !justify-center !no-underline hover:!bg-[#f7f8ff] [&_svg]:!w-4 [&_svg]:!h-4" id="lite-badge"><span>Powered by quick.bot'),Ho=e=>{let t,n;const r=n=>{n.forEach(n=>{n.removedNodes.forEach(n=>{"id"in n&&t&&"lite-badge"==n.id&&(console.log("Sorry, you can't remove the brand 😅"),e.botContainer?.append(t))})})};return E(()=>{document&&e.botContainer&&(n=new MutationObserver(r),n.observe(e.botContainer,{subtree:!1,childList:!0}))}),A(()=>{n&&n.disconnect()}),(()=>{const e=Vo(),n=e.firstChild;return"function"==typeof t?$e(t,e):t=e,Pe(e,Q(zo,{}),n),e})()},Wo=we('<div class="!p-3 !z-50 !text-black/60 !gap-2 !leading-3 !h-10 !font-normal !opacity-100 !visible !flex !items-center !justify-center !no-underline hover:!opacity-80"><span>The conversation has ended.'),Go=()=>Wo(),[Ko,Yo]=S(),Jo=we('<textarea id="user-input" class="focus:outline-none bg-transparent flex-1 w-full resize-none overflow-hidden h-[25px]" data-testid="textarea" required>'),Zo=e=>{const[t,n]=ae(e,["ref","onInput","containerRef"]),r=e=>{const n=e.currentTarget;n.style.height="25px";const r=Math.max(25,Math.min(n.scrollHeight,150));n.style.height=`${r}px`,n.style.overflow=n.scrollHeight>150?"auto":"hidden",t.onInput(n.value)};return(()=>{const e=Jo();e.$$input=r;const o=t.ref;return"function"==typeof o?$e(o,e):t.ref=e,Ce(e,oe({get autofocus(){return!Ko()}},n),!1,!1),e})()};xe(["input"]);const Xo=we('<img class="rounded-md object-cover w-[58px] h-[58px]">'),Qo=we('<div class="relative group flex-shrink-0"><button class="absolute -right-2 p-0.5 -top-2 rounded-full bg-gray-200 text-black border border-gray-400 opacity-1 sm:opacity-0 group-hover:opacity-100 transition-opacity" aria-label="Remove attachment">'),ea=we('<div class="absolute w-full h-full inset-0 bg-black/20 rounded-md">'),ta=e=>(()=>{const t=Qo(),n=t.firstChild;return Pe(t,Q(ue,{get children(){return[Q(pe,{get when(){return e.file.type.startsWith("image")},get children(){const t=Xo();return T(n=>{const r=URL.createObjectURL(e.file),o=e.file.name;return r!==n._v$&&_e(t,"src",n._v$=r),o!==n._v$2&&_e(t,"alt",n._v$2=o),n},{_v$:void 0,_v$2:void 0}),t}}),Q(pe,{when:!0,get children(){return Q(uo,{get file(){return e.file}})}})]}}),n),n.addEventListener("click",e.onRemoveClick),Pe(n,Q(st,{class:"w-4"})),Pe(t,Q(de,{get when(){return He(e.uploadProgressPercent)&&100!==e.uploadProgressPercent},get children(){return Q(na,{get progressPercent(){return e.uploadProgressPercent}})}}),null),t})(),na=e=>{const[t,n]=S(e.progressPercent??0);let r;return C(()=>{if(20===e.progressPercent){r=setInterval(()=>{t()<100&&n(e=>e+(Math.floor(10*Math.random())+1))},1e3)}}),A(()=>{clearInterval(r)}),(()=>{const e=ea();return Pe(e,Q(Rr,{get value(){return t()},class:"flex items-center justify-center",get children(){return Q(Dr,{get children(){return[Q(Lr,{}),Q(qr,{})]}})}})),e})()},ra=we('<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M8.99992 16V6.41407L5.70696 9.70704C5.31643 10.0976 4.68342 10.0976 4.29289 9.70704C3.90237 9.31652 3.90237 8.6835 4.29289 8.29298L9.29289 3.29298L9.36907 3.22462C9.76184 2.90427 10.3408 2.92686 10.707 3.29298L15.707 8.29298L15.7753 8.36915C16.0957 8.76192 16.0731 9.34092 15.707 9.70704C15.3408 10.0732 14.7618 10.0958 14.3691 9.7754L14.2929 9.70704L10.9999 6.41407V16C10.9999 16.5523 10.5522 17 9.99992 17C9.44764 17 8.99992 16.5523 8.99992 16Z">'),oa=e=>(()=>{const t=ra();return Ce(t,e,!0,!0),t})(),aa=we('<svg><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z">'),ia=e=>(()=>{const t=aa();return Ce(t,oe(e,{get class(){return ze("animate-spin h-6 w-6",e.class)},xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","data-testid":"loading-spinner"}),!0,!0),t})(),sa=we("<button>"),la=e=>{const t=O(()=>e.children),[n,r]=ae(e,["disabled","class"]),o=e.isDisabled||e.isLoading;return(()=>{const a=sa();return Ce(a,oe(r,{disabled:o,get class(){return ze("button",n.class,"focus:outline-none filter hover:brightness-90 active:brightness-75 disabled:opacity-50 disabled:cursor-not-allowed disabled:brightness-100 flex justify-center transition-all duration-300 w-auto")}}),!1,!0),Pe(a,Q(de,{get when(){return!e.isLoading},get fallback(){return Q(ia,{})},get children(){return t()}})),a})()},ca=e=>{const t=!!e?.children;return Q(la,oe({type:"submit","aria-label":t?void 0:"Send",get class(){return ze("button--submit",e.class,t?"px-4":void 0)}},e,{get children(){return Q(ue,{get children(){return[Q(pe,{when:!t,get children(){return Q(oa,{})}}),Q(pe,{when:t,get children(){return e.children}})]}})}}))},da=we('<form><div class="flex w-full h-full transition-all duration-100"></div><div class="flex-shrink-0">'),ua=e=>{const{children:t,onSubmit:n,buttonLabel:r,isDisabled:o=!1,class:a,customButton:i,isInputDisabled:s,hasError:l,variant:c="field"}=e;return(()=>{const e=da(),d=e.firstChild,u=d.nextSibling;return e.addEventListener("submit",e=>{e.preventDefault(),n()}),Pe(d,t),Pe(u,Q(de,{when:i,get fallback(){return Q(ca,{isDisabled:o,children:r})},children:i})),T(()=>ke(e,ze("w-full flex gap-2 items-center","field"===c&&"input__field border px-5 py-2 pr-2 overflow-hidden",s?.()&&!l&&"opacity-50 pointer-events-none",a))),e})()},pa=we('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2px" stroke-linecap="round" stroke-linejoin="round"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path><path d="M12 11v6"></path><path d="m9 14 3-3 3 3">'),ga=e=>(()=>{const t=pa();return Ce(t,e,!0,!0),t})(),ba=e=>{const t=t=>{const{data:n}=t;n.isFromBot&&e(t)};E(()=>{window.addEventListener("message",t)}),A(()=>{window.removeEventListener("message",t)})},ha="Send";let fa=function(e){return e.TEXT="text input",e.NUMBER="number input",e.EMAIL="email input",e.URL="url input",e.DATE="date input",e.PHONE="phone number input",e.CHOICE="buttons input",e.RATING="rating input",e.FILE="file input",e.PAYMENT="stripe",e}({});const ma={placeholder:"Type your answer..."},ya={isEnabled:!1},va=we('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2px" stroke-linecap="round" stroke-linejoin="round"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path><circle cx="10" cy="12" r="2"></circle><path d="m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22">'),wa=e=>(()=>{const t=va();return Ce(t,e,!0,!0),t})(),xa=we('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48">'),_a=e=>(()=>{const t=xa();return Ce(t,e,!0,!0),t})(),ka=we('<input id="document-upload" type="file" multiple class="hidden">'),Sa=we('<input id="photos-upload" type="file" accept="image/*, video/*" multiple class="hidden">'),Ta=we("<button><span>Document"),Ca=we("<button><span>Photos & videos"),$a=e=>{let t,n;return[(()=>{const n=ka();n.addEventListener("change",t=>{t.currentTarget.files&&e.onNewFiles(t.currentTarget.files)});return"function"==typeof t?$e(t,n):t=n,n})(),(()=>{const t=Sa();t.addEventListener("change",t=>{t.currentTarget.files&&e.onNewFiles(t.currentTarget.files)});return"function"==typeof n?$e(n,t):n=t,t})(),Q(Hr,{get children(){return[Q(Wr,{get class(){return ze("filter data-[state=open]:backdrop-brightness-90 hover:backdrop-brightness-95 transition rounded-full p-2 focus:outline-none",e.class)},"aria-label":"Add attachments",get children(){return Q(_a,{class:"w-5"})}}),Q(Gr,{get children(){return Q(Kr,{class:"p-2 gap-1 focus:outline-none flex flex-col min-w-[180px]",side:"top",align:"end",get children(){return[Q(Yr,{value:"document",asChild:e=>{const n=e();return(()=>{const e=Ta(),r=e.firstChild;return Ce(e,oe(n,{type:"button",onClick:()=>{n.onClick?.(),t?.click()},class:"p-2 filter hover:brightness-95 flex gap-2 items-center cursor-pointer rounded"}),!1,!0),Pe(e,Q(lo,{class:"w-4 h-4 flex-shrink-0"}),r),e})()}}),Q(Yr,{value:"photos",asChild:e=>{const t=e();return(()=>{const e=Ca(),r=e.firstChild;return Ce(e,oe(t,{type:"button",onClick:()=>{t.onClick?.(),n?.click()},class:"p-2 filter hover:brightness-95 flex gap-2 items-center cursor-pointer rounded"}),!1,!0),Pe(e,Q(wa,{class:"w-4 h-4 flex-shrink-0"}),r),e})()}})]}})}})]}})]},Pa=({newFile:e,existingFiles:t,onError:n})=>{const r=Number("10");if(r&&e.size>1024*r*1024)return void n({title:"File too large",description:`${e.name} is larger than ${r}MB`});if(0===t.length)return e;let o=e.name,a=1;for(;t.some(e=>e.name===o);){const t=e.name.lastIndexOf("."),n=-1!==t?e.name.slice(t):"";o=`${e.name.slice(0,t)}(${a})${n}`,a++}return new File([e],o,{type:e.type})},Ia=function(){const[e,t]=S([]),n=e=>{t(t=>t.filter(t=>t.id!==e))};return{create:e=>{const r=e.id||`toast-${Date.now()}-${Math.random()}`,o=e.duration??5e3,a={...e,id:r};return t(e=>[...e,a]),o>0&&setTimeout(()=>{n(r)},o),r},dismiss:n,dismissAll:()=>{t([])},toasts:e}}({}),Ea=async({files:e,onUploadProgress:t})=>{const n=[];let r=0;for(const{input:o,file:a}of e){t&&t({progress:r/e.length*100,fileIndex:r}),r+=1;const i=await Lt.post(ht("/api/v1/generate-upload-url"),{json:{fileName:o.fileName,sessionId:o.sessionId,fileType:a.type},timeout:!1}).json();if(i?.presignedUrl){const e=new FormData;Object.entries(i.formData).forEach(([t,n])=>{e.append(t,n)}),e.append("file",a);try{await Lt.post(i.presignedUrl,{body:e,timeout:!1}),n.push({url:i.fileUrl,type:a.type})}catch{continue}}}return n},Aa=e=>{e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,n,r)=>t+t+n+n+r+r);const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:[0,0,0]},Ba=e=>{if(!e)return[0,0,0];if(e.startsWith("#"))return Aa(e);if(e.startsWith("rgba")||e.startsWith("rgb")){const t=e.match(/\d+(\.\d+)?/g);if(t&&t.length>=3)return[parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)]}return Aa(e)},Ma=e=>{if(!e)return 1;if(e.startsWith("rgba")){const t=e.match(/\d+(\.\d+)?/g);if(t&&t.length>=4)return parseFloat(t[3])}return 1},Ua=e=>({rgb:Ba(e),alpha:Ma(e)}),Oa=we('<div><button class="recorder__close-button p-0.5 rounded-full" aria-label="Stop recording"></button><div class="relative flex w-full"><canvas class="w-full h-[56px]"></canvas><div class="absolute w-2 left-0 h-[56px] recorder__left-gradient"></div><div class="absolute w-3 right-0 h-[56px] recorder__right-gradient"></div></div><span class="flex-none w-[35px] font-bold text-sm">'),Ra=e=>{const[t,n]=S(0);let r,o,a,i,s,l,c,d,u,p=[],g=0;const b=Aa(e.buttonsTheme?.backgroundColor??Mo).join(", "),h=()=>{if(!a||!r||!u)return;const e=performance.now(),t=e-u;u=e,a.clearRect(0,0,r.width,r.height),a.fillStyle=`rgba(${b}, 0.2)`;for(let e=0;e<(r.width+3)/6;e++){const t=6*e-g,n=.1*r.height,o=(r.height-n)/2;a.beginPath(),a.roundRect(t,o,3,n,5),a.fill()}a.fillStyle=`rgba(${b}, 1)`;for(let e=0;e<p.length;e++){const t=r.width+6*(e+1)-g,n=r.height*(p[e]/100),o=(r.height-n)/2;a.beginPath(),a.roundRect(t,o,3,n,5),a.fill()}g+=t/1e3*60,o=requestAnimationFrame(h)},f=()=>{a&&r&&a.clearRect(0,0,r.width,r.height),g=0,s?.disconnect(),s=void 0,l?.disconnect(),l=void 0,i?.close(),i=void 0,c?.getTracks().forEach(e=>e.stop()),c=void 0,p=[],clearTimeout(d),n(0),cancelAnimationFrame(o),e.onAbortRecording()};return C(()=>{"asking"===e.recordingStatus?(async()=>{r&&(c=await navigator.mediaDevices.getUserMedia({audio:!0}),e.onRecordingConfirmed(c),a||(a=r.getContext("2d")??void 0),d=setInterval(()=>{n(e=>e+1)},1e3),i=new AudioContext,s=await Da(i),l=i.createMediaStreamSource(c),l.connect(s),s.connect(i.destination),s.port.onmessage=e=>{6*((r.width+3)/6+p.length)<r.width+g&&p.push(Math.min(Math.max(e.data,5),90))},u=performance.now(),o=requestAnimationFrame(h))})():"stopped"===e.recordingStatus&&f()}),A(()=>{f()}),(()=>{const n=Oa(),o=n.firstChild,a=o.nextSibling,i=a.firstChild,s=a.nextSibling;o.addEventListener("click",f),Pe(o,Q(st,{class:"w-4"}));return"function"==typeof r?$e(r,i):r=i,Pe(s,()=>La(t())),T(()=>ke(n,ze("w-full gap-2 items-center transition-opacity px-2 recorder","started"===e.recordingStatus?"opacity-1 flex":"opacity-0 hidden"))),n})()},Da=async e=>{const t=new Blob(['\nconst gainFactor = 3;\n\nclass VolumeProcessor extends AudioWorkletProcessor {\n constructor() {\n super();\n }\n\n process(inputs) {\n const input = inputs[0];\n if (input.length > 0) {\n const channelData = input[0];\n let sum = 0;\n for (let i = 0; i < channelData.length; i++) {\n sum += channelData[i] * channelData[i];\n }\n const rms = Math.sqrt(sum / channelData.length);\n this.port.postMessage(rms * 100 * gainFactor)\n }\n return true;\n }\n}\n\nregisterProcessor("volume-processor", VolumeProcessor);\n\n'],{type:"application/javascript"}),n=URL.createObjectURL(t);return await e.audioWorklet.addModule(n),new AudioWorkletNode(e,"volume-processor")},La=e=>`${Math.floor(e/60)}:${(e%60).toString().padStart(2,"0")}`,qa=we('<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M15.7806 10.1963C16.1326 10.3011 16.3336 10.6714 16.2288 11.0234L16.1487 11.2725C15.3429 13.6262 13.2236 15.3697 10.6644 15.6299L10.6653 16.835H12.0833L12.2171 16.8486C12.5202 16.9106 12.7484 17.1786 12.7484 17.5C12.7484 17.8214 12.5202 18.0894 12.2171 18.1514L12.0833 18.165H7.91632C7.5492 18.1649 7.25128 17.8672 7.25128 17.5C7.25128 17.1328 7.5492 16.8351 7.91632 16.835H9.33527L9.33429 15.6299C6.775 15.3697 4.6558 13.6262 3.84992 11.2725L3.76984 11.0234L3.74445 10.8906C3.71751 10.5825 3.91011 10.2879 4.21808 10.1963C4.52615 10.1047 4.84769 10.2466 4.99347 10.5195L5.04523 10.6436L5.10871 10.8418C5.8047 12.8745 7.73211 14.335 9.99933 14.335C12.3396 14.3349 14.3179 12.7789 14.9534 10.6436L15.0052 10.5195C15.151 10.2466 15.4725 10.1046 15.7806 10.1963ZM12.2513 5.41699C12.2513 4.17354 11.2437 3.16521 10.0003 3.16504C8.75675 3.16504 7.74835 4.17343 7.74835 5.41699V9.16699C7.74853 10.4104 8.75685 11.418 10.0003 11.418C11.2436 11.4178 12.2511 10.4103 12.2513 9.16699V5.41699ZM13.5814 9.16699C13.5812 11.1448 11.9781 12.7479 10.0003 12.748C8.02232 12.748 6.41845 11.1449 6.41828 9.16699V5.41699C6.41828 3.43889 8.02221 1.83496 10.0003 1.83496C11.9783 1.83514 13.5814 3.439 13.5814 5.41699V9.16699Z">'),ja=e=>(()=>{const t=qa();return Ce(t,e,!0,!0),t})();function Fa(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Na={},za=function(e,t){return za=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},za(e,t)};function Va(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}za(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ha=function(){return Ha=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ha.apply(this,arguments)};function Wa(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function Ga(e,t,n,r){var o,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i}function Ka(e,t){return function(n,r){t(n,r,e)}}function Ya(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function Ja(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,s)}l((r=r.apply(e,t||[])).next())})}function Za(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}var Xa=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function Qa(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||Xa(t,e,n)}function ei(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ti(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function ni(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ti(arguments[t]));return e}function ri(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var a=arguments[t],i=0,s=a.length;i<s;i++,o++)r[o]=a[i];return r}function oi(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function ai(e){return this instanceof ai?(this.v=e,this):new ai(e)}function ii(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),a=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(e){o[e]&&(r[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||s(e,t)})})}function s(e,t){try{!function(e){e.value instanceof ai?Promise.resolve(e.value.v).then(l,c):d(a[0][2],e)}(o[e](t))}catch(e){d(a[0][3],e)}}function l(e){s("next",e)}function c(e){s("throw",e)}function d(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function si(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:ai(e[r](t)),done:!1}:o?o(t):t}:o}}function li(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=ei(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,o,(t=e[n](t)).done,t.value)})}}}function ci(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var di=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function ui(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Xa(t,e,n);return di(t,e),t}function pi(e){return e&&e.__esModule?e:{default:e}}function gi(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function bi(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function hi(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function fi(e,t,n){if(null!=t){if("object"!=typeof t)throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if("function"!=typeof r)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var mi="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function yi(e){function t(t){e.error=e.hasError?new mi(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var r=e.stack.pop();try{var o=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(o).then(n,function(e){return t(e),n()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}var vi,wi={__extends:Va,__assign:Ha,__rest:Wa,__decorate:Ga,__param:Ka,__metadata:Ya,__awaiter:Ja,__generator:Za,__createBinding:Xa,__exportStar:Qa,__values:ei,__read:ti,__spread:ni,__spreadArrays:ri,__spreadArray:oi,__await:ai,__asyncGenerator:ii,__asyncDelegator:si,__asyncValues:li,__makeTemplateObject:ci,__importStar:ui,__importDefault:pi,__classPrivateFieldGet:gi,__classPrivateFieldSet:bi,__classPrivateFieldIn:hi,__addDisposableResource:fi,__disposeResources:yi},xi=Fa(Object.freeze({__proto__:null,__addDisposableResource:fi,get __assign(){return Ha},__asyncDelegator:si,__asyncGenerator:ii,__asyncValues:li,__await:ai,__awaiter:Ja,__classPrivateFieldGet:gi,__classPrivateFieldIn:hi,__classPrivateFieldSet:bi,__createBinding:Xa,__decorate:Ga,__disposeResources:yi,__esDecorate:function(e,t,n,r,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?r.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p=!1,g=n.length-1;g>=0;g--){var b={};for(var h in r)b[h]="access"===h?{}:r[h];for(var h in r.access)b.access[h]=r.access[h];b.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var f=(0,n[g])("accessor"===l?{get:u.get,set:u.set}:u[c],b);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(s=i(f.get))&&(u.get=s),(s=i(f.set))&&(u.set=s),(s=i(f.init))&&o.unshift(s)}else(s=i(f))&&("field"===l?o.unshift(s):u[c]=s)}d&&Object.defineProperty(d,r.name,u),p=!0},__exportStar:Qa,__extends:Va,__generator:Za,__importDefault:pi,__importStar:ui,__makeTemplateObject:ci,__metadata:Ya,__param:Ka,__propKey:function(e){return"symbol"==typeof e?e:"".concat(e)},__read:ti,__rest:Wa,__runInitializers:function(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0},__setFunctionName:function(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})},__spread:ni,__spreadArray:oi,__spreadArrays:ri,__values:ei,default:wi})),_i={},ki={},Si={};function Ti(){if(vi)return Si;vi=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.WebmBase=void 0;return Si.WebmBase=class{constructor(e="Unknown",t=0){this.name=e,this.start=t}getType(){return"Unknown"}updateBySource(){}setSource(e){this.source=e,this.updateBySource()}updateByData(){}setData(e){this.data=e,this.updateByData()}getValue(){return this.data}setValue(e){this.setData(e)}},Si}var Ci,$i,Pi={},Ii={},Ei={};function Ai(){return Ci||(Ci=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.SectionType=void 0,function(e){e.Container="Container",e.Uint="Uint",e.Int="Int",e.Float="Float",e.String="String",e.Date="Date",e.Binary="Binary"}(e||(Ei.SectionType=e={}))),Ei;var e}function Bi(){if($i)return Ii;$i=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.sections=void 0;const e=Ai();return Ii.sections={172351395:{name:"EBML",type:e.SectionType.Container},646:{name:"EBMLVersion",type:e.SectionType.Uint},759:{name:"EBMLReadVersion",type:e.SectionType.Uint},754:{name:"EBMLMaxIDLength",type:e.SectionType.Uint},755:{name:"EBMLMaxSizeLength",type:e.SectionType.Uint},642:{name:"DocType",type:e.SectionType.String},647:{name:"DocTypeVersion",type:e.SectionType.Uint},645:{name:"DocTypeReadVersion",type:e.SectionType.Uint},108:{name:"Void",type:e.SectionType.Binary},63:{name:"CRC-32",type:e.SectionType.Binary},190023271:{name:"SignatureSlot",type:e.SectionType.Container},16010:{name:"SignatureAlgo",type:e.SectionType.Uint},16026:{name:"SignatureHash",type:e.SectionType.Uint},16037:{name:"SignaturePublicKey",type:e.SectionType.Binary},16053:{name:"Signature",type:e.SectionType.Binary},15963:{name:"SignatureElements",type:e.SectionType.Container},15995:{name:"SignatureElementList",type:e.SectionType.Container},9522:{name:"SignedElement",type:e.SectionType.Binary},139690087:{name:"Segment",type:e.SectionType.Container},21863284:{name:"SeekHead",type:e.SectionType.Container},3515:{name:"Seek",type:e.SectionType.Container},5035:{name:"SeekID",type:e.SectionType.Binary},5036:{name:"SeekPosition",type:e.SectionType.Uint},88713574:{name:"Info",type:e.SectionType.Container},13220:{name:"SegmentUID",type:e.SectionType.Binary},13188:{name:"SegmentFilename",type:e.SectionType.String},1882403:{name:"PrevUID",type:e.SectionType.Binary},1868715:{name:"PrevFilename",type:e.SectionType.String},2013475:{name:"NextUID",type:e.SectionType.Binary},1999803:{name:"NextFilename",type:e.SectionType.String},1092:{name:"SegmentFamily",type:e.SectionType.Binary},10532:{name:"ChapterTranslate",type:e.SectionType.Container},10748:{name:"ChapterTranslateEditionUID",type:e.SectionType.Uint},10687:{name:"ChapterTranslateCodec",type:e.SectionType.Uint},10661:{name:"ChapterTranslateID",type:e.SectionType.Binary},710577:{name:"TimecodeScale",type:e.SectionType.Uint},1161:{name:"Duration",type:e.SectionType.Float},1121:{name:"DateUTC",type:e.SectionType.Date},15273:{name:"Title",type:e.SectionType.String},3456:{name:"MuxingApp",type:e.SectionType.String},5953:{name:"WritingApp",type:e.SectionType.String},103:{name:"Timecode",type:e.SectionType.Uint},6228:{name:"SilentTracks",type:e.SectionType.Container},6359:{name:"SilentTrackNumber",type:e.SectionType.Uint},39:{name:"Position",type:e.SectionType.Uint},43:{name:"PrevSize",type:e.SectionType.Uint},35:{name:"SimpleBlock",type:e.SectionType.Binary},32:{name:"BlockGroup",type:e.SectionType.Container},33:{name:"Block",type:e.SectionType.Binary},34:{name:"BlockVirtual",type:e.SectionType.Binary},13729:{name:"BlockAdditions",type:e.SectionType.Container},38:{name:"BlockMore",type:e.SectionType.Container},110:{name:"BlockAddID",type:e.SectionType.Uint},37:{name:"BlockAdditional",type:e.SectionType.Binary},27:{name:"BlockDuration",type:e.SectionType.Uint},122:{name:"ReferencePriority",type:e.SectionType.Uint},123:{name:"ReferenceBlock",type:e.SectionType.Int},125:{name:"ReferenceVirtual",type:e.SectionType.Int},36:{name:"CodecState",type:e.SectionType.Binary},13730:{name:"DiscardPadding",type:e.SectionType.Int},14:{name:"Slices",type:e.SectionType.Container},104:{name:"TimeSlice",type:e.SectionType.Container},76:{name:"LaceNumber",type:e.SectionType.Uint},77:{name:"FrameNumber",type:e.SectionType.Uint},75:{name:"BlockAdditionID",type:e.SectionType.Uint},78:{name:"Delay",type:e.SectionType.Uint},79:{name:"SliceDuration",type:e.SectionType.Uint},72:{name:"ReferenceFrame",type:e.SectionType.Container},73:{name:"ReferenceOffset",type:e.SectionType.Uint},74:{name:"ReferenceTimeCode",type:e.SectionType.Uint},47:{name:"EncryptedBlock",type:e.SectionType.Binary},106212971:{name:"Tracks",type:e.SectionType.Container},46:{name:"TrackEntry",type:e.SectionType.Container},87:{name:"TrackNumber",type:e.SectionType.Uint},13253:{name:"TrackUID",type:e.SectionType.Uint},3:{name:"TrackType",type:e.SectionType.Uint},57:{name:"FlagEnabled",type:e.SectionType.Uint},8:{name:"FlagDefault",type:e.SectionType.Uint},5546:{name:"FlagForced",type:e.SectionType.Uint},28:{name:"FlagLacing",type:e.SectionType.Uint},11751:{name:"MinCache",type:e.SectionType.Uint},11768:{name:"MaxCache",type:e.SectionType.Uint},254851:{name:"DefaultDuration",type:e.SectionType.Uint},216698:{name:"DefaultDecodedFieldDuration",type:e.SectionType.Uint},209231:{name:"TrackTimecodeScale",type:e.SectionType.Float},4991:{name:"TrackOffset",type:e.SectionType.Int},5614:{name:"MaxBlockAdditionID",type:e.SectionType.Uint},4974:{name:"Name",type:e.SectionType.String},177564:{name:"Language",type:e.SectionType.String},6:{name:"CodecID",type:e.SectionType.String},9122:{name:"CodecPrivate",type:e.SectionType.Binary},362120:{name:"CodecName",type:e.SectionType.String},13382:{name:"AttachmentLink",type:e.SectionType.Uint},1742487:{name:"CodecSettings",type:e.SectionType.String},1785920:{name:"CodecInfoURL",type:e.SectionType.String},438848:{name:"CodecDownloadURL",type:e.SectionType.String},42:{name:"CodecDecodeAll",type:e.SectionType.Uint},12203:{name:"TrackOverlay",type:e.SectionType.Uint},5802:{name:"CodecDelay",type:e.SectionType.Uint},5819:{name:"SeekPreRoll",type:e.SectionType.Uint},9764:{name:"TrackTranslate",type:e.SectionType.Container},9980:{name:"TrackTranslateEditionUID",type:e.SectionType.Uint},9919:{name:"TrackTranslateCodec",type:e.SectionType.Uint},9893:{name:"TrackTranslateTrackID",type:e.SectionType.Binary},96:{name:"Video",type:e.SectionType.Container},26:{name:"FlagInterlaced",type:e.SectionType.Uint},5048:{name:"StereoMode",type:e.SectionType.Uint},5056:{name:"AlphaMode",type:e.SectionType.Uint},5049:{name:"OldStereoMode",type:e.SectionType.Uint},48:{name:"PixelWidth",type:e.SectionType.Uint},58:{name:"PixelHeight",type:e.SectionType.Uint},5290:{name:"PixelCropBottom",type:e.SectionType.Uint},5307:{name:"PixelCropTop",type:e.SectionType.Uint},5324:{name:"PixelCropLeft",type:e.SectionType.Uint},5341:{name:"PixelCropRight",type:e.SectionType.Uint},5296:{name:"DisplayWidth",type:e.SectionType.Uint},5306:{name:"DisplayHeight",type:e.SectionType.Uint},5298:{name:"DisplayUnit",type:e.SectionType.Uint},5299:{name:"AspectRatioType",type:e.SectionType.Uint},963876:{name:"ColourSpace",type:e.SectionType.Binary},1029411:{name:"GammaValue",type:e.SectionType.Float},230371:{name:"FrameRate",type:e.SectionType.Float},97:{name:"Audio",type:e.SectionType.Container},53:{name:"SamplingFrequency",type:e.SectionType.Float},14517:{name:"OutputSamplingFrequency",type:e.SectionType.Float},31:{name:"Channels",type:e.SectionType.Uint},15739:{name:"ChannelPositions",type:e.SectionType.Binary},8804:{name:"BitDepth",type:e.SectionType.Uint},98:{name:"TrackOperation",type:e.SectionType.Container},99:{name:"TrackCombinePlanes",type:e.SectionType.Container},100:{name:"TrackPlane",type:e.SectionType.Container},101:{name:"TrackPlaneUID",type:e.SectionType.Uint},102:{name:"TrackPlaneType",type:e.SectionType.Uint},105:{name:"TrackJoinBlocks",type:e.SectionType.Container},109:{name:"TrackJoinUID",type:e.SectionType.Uint},64:{name:"TrickTrackUID",type:e.SectionType.Uint},65:{name:"TrickTrackSegmentUID",type:e.SectionType.Binary},70:{name:"TrickTrackFlag",type:e.SectionType.Uint},71:{name:"TrickMasterTrackUID",type:e.SectionType.Uint},68:{name:"TrickMasterTrackSegmentUID",type:e.SectionType.Binary},11648:{name:"ContentEncodings",type:e.SectionType.Container},8768:{name:"ContentEncoding",type:e.SectionType.Container},4145:{name:"ContentEncodingOrder",type:e.SectionType.Uint},4146:{name:"ContentEncodingScope",type:e.SectionType.Uint},4147:{name:"ContentEncodingType",type:e.SectionType.Uint},4148:{name:"ContentCompression",type:e.SectionType.Container},596:{name:"ContentCompAlgo",type:e.SectionType.Uint},597:{name:"ContentCompSettings",type:e.SectionType.Binary},4149:{name:"ContentEncryption",type:e.SectionType.Container},2017:{name:"ContentEncAlgo",type:e.SectionType.Uint},2018:{name:"ContentEncKeyID",type:e.SectionType.Binary},2019:{name:"ContentSignature",type:e.SectionType.Binary},2020:{name:"ContentSigKeyID",type:e.SectionType.Binary},2021:{name:"ContentSigAlgo",type:e.SectionType.Uint},2022:{name:"ContentSigHashAlgo",type:e.SectionType.Uint},206814059:{name:"Cues",type:e.SectionType.Container},59:{name:"CuePoint",type:e.SectionType.Container},51:{name:"CueTime",type:e.SectionType.Uint},55:{name:"CueTrackPositions",type:e.SectionType.Container},119:{name:"CueTrack",type:e.SectionType.Uint},113:{name:"CueClusterPosition",type:e.SectionType.Uint},112:{name:"CueRelativePosition",type:e.SectionType.Uint},50:{name:"CueDuration",type:e.SectionType.Uint},4984:{name:"CueBlockNumber",type:e.SectionType.Uint},106:{name:"CueCodecState",type:e.SectionType.Uint},91:{name:"CueReference",type:e.SectionType.Container},22:{name:"CueRefTime",type:e.SectionType.Uint},23:{name:"CueRefCluster",type:e.SectionType.Uint},4959:{name:"CueRefNumber",type:e.SectionType.Uint},107:{name:"CueRefCodecState",type:e.SectionType.Uint},155296873:{name:"Attachments",type:e.SectionType.Container},8615:{name:"AttachedFile",type:e.SectionType.Container},1662:{name:"FileDescription",type:e.SectionType.String},1646:{name:"FileName",type:e.SectionType.String},1632:{name:"FileMimeType",type:e.SectionType.String},1628:{name:"FileData",type:e.SectionType.Binary},1710:{name:"FileUID",type:e.SectionType.Uint},1653:{name:"FileReferral",type:e.SectionType.Binary},1633:{name:"FileUsedStartTime",type:e.SectionType.Uint},1634:{name:"FileUsedEndTime",type:e.SectionType.Uint},4433776:{name:"Chapters",type:e.SectionType.Container},1465:{name:"EditionEntry",type:e.SectionType.Container},1468:{name:"EditionUID",type:e.SectionType.Uint},1469:{name:"EditionFlagHidden",type:e.SectionType.Uint},1499:{name:"EditionFlagDefault",type:e.SectionType.Uint},1501:{name:"EditionFlagOrdered",type:e.SectionType.Uint},54:{name:"ChapterAtom",type:e.SectionType.Container},13252:{name:"ChapterUID",type:e.SectionType.Uint},5716:{name:"ChapterStringUID",type:e.SectionType.String},17:{name:"ChapterTimeStart",type:e.SectionType.Uint},18:{name:"ChapterTimeEnd",type:e.SectionType.Uint},24:{name:"ChapterFlagHidden",type:e.SectionType.Uint},1432:{name:"ChapterFlagEnabled",type:e.SectionType.Uint},11879:{name:"ChapterSegmentUID",type:e.SectionType.Binary},11964:{name:"ChapterSegmentEditionUID",type:e.SectionType.Uint},9155:{name:"ChapterPhysicalEquiv",type:e.SectionType.Uint},15:{name:"ChapterTrack",type:e.SectionType.Container},9:{name:"ChapterTrackNumber",type:e.SectionType.Uint},0:{name:"ChapterDisplay",type:e.SectionType.Container},5:{name:"ChapString",type:e.SectionType.String},892:{name:"ChapLanguage",type:e.SectionType.String},894:{name:"ChapCountry",type:e.SectionType.String},10564:{name:"ChapProcess",type:e.SectionType.Container},10581:{name:"ChapProcessCodecID",type:e.SectionType.Uint},1293:{name:"ChapProcessPrivate",type:e.SectionType.Binary},10513:{name:"ChapProcessCommand",type:e.SectionType.Container},10530:{name:"ChapProcessTime",type:e.SectionType.Uint},10547:{name:"ChapProcessData",type:e.SectionType.Binary},39109479:{name:"Tags",type:e.SectionType.Container},13171:{name:"Tag",type:e.SectionType.Container},9152:{name:"Targets",type:e.SectionType.Container},10442:{name:"TargetTypeValue",type:e.SectionType.Uint},9162:{name:"TargetType",type:e.SectionType.String},9157:{name:"TagTrackUID",type:e.SectionType.Uint},9161:{name:"TagEditionUID",type:e.SectionType.Uint},9156:{name:"TagChapterUID",type:e.SectionType.Uint},9158:{name:"TagAttachmentUID",type:e.SectionType.Uint},10184:{name:"SimpleTag",type:e.SectionType.Container},1443:{name:"TagName",type:e.SectionType.String},1146:{name:"TagLanguage",type:e.SectionType.String},1156:{name:"TagDefault",type:e.SectionType.Uint},1159:{name:"TagString",type:e.SectionType.String},1157:{name:"TagBinary",type:e.SectionType.Binary},5552:{name:"Colour",type:e.SectionType.Container},5553:{name:"MatrixCoefficients",type:e.SectionType.Uint},5554:{name:"BitsPerChannel",type:e.SectionType.Uint},5555:{name:"ChromaSubsamplingHorz",type:e.SectionType.Uint},5556:{name:"ChromaSubsamplingVert",type:e.SectionType.Uint},5557:{name:"CbSubsamplingHorz",type:e.SectionType.Uint},5558:{name:"CbSubsamplingVert",type:e.SectionType.Uint},5559:{name:"ChromaSitingHorz",type:e.SectionType.Uint},5560:{name:"ChromaSitingVert",type:e.SectionType.Uint},5561:{name:"Range",type:e.SectionType.Uint},5562:{name:"TransferCharacteristics",type:e.SectionType.Uint},5563:{name:"Primaries",type:e.SectionType.Uint},5564:{name:"MaxCLL",type:e.SectionType.Uint},5565:{name:"MaxFALL",type:e.SectionType.Uint}},Ii}var Mi,Ui={};function Oi(){if(Mi)return Ui;Mi=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.WebmUint=void 0;const e=Ti();function t(e){return e.length%2==1?"0"+e:e}let n=class extends e.WebmBase{constructor(e,t=0){super(e,t)}getType(){return"Uint"}updateBySource(){this.data="";for(let e=0;e<this.source.length;e++){const n=this.source[e].toString(16);this.data+=t(n)}}updateByData(){const e=this.data.length/2;this.source=new Uint8Array(e);for(let t=0;t<e;t++){const e=this.data.substring(2*t,2*t+2);this.source[t]=parseInt(e,16)}}getValue(){return parseInt(this.data,16)}setValue(e){this.setData(t(e.toString(16)))}};return Ui.WebmUint=n,Ui}var Ri,Di={};function Li(){if(Ri)return Di;Ri=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.WebmFloat=void 0;const e=Ti();let t=class extends e.WebmBase{constructor(e,t=0){super(e,t)}getType(){return"Float"}getFloatArrayType(){return this.source&&4===this.source.length?Float32Array:Float64Array}updateBySource(){const e=this.source.reverse(),t=new(this.getFloatArrayType())(e.buffer);this.data=t[0]}updateByData(){const e=new(this.getFloatArrayType())([this.data]),t=new Uint8Array(e.buffer);this.source=t.reverse()}};return Di.WebmFloat=t,Di}var qi,ji,Fi={};function Ni(){if(qi)return Fi;qi=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.WebmString=void 0;const e=Ti();let t=class extends e.WebmBase{constructor(e,t=0){super(e,t)}getType(){return"String"}updateBySource(){this.data=this.source}updateByData(){this.source=this.data}getValue(){let e="";return this.source.forEach(t=>{e+=String.fromCharCode(t)}),e}};return Fi.WebmString=t,Fi}function zi(){if(ji)return Pi;ji=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.WebmContainer=void 0;const e=Ti(),t=Bi(),n=Ai(),r=Oi(),o=Li(),a=Ni();let i=class i extends e.WebmBase{constructor(e,t=!1,n=0){super(e,n),this.isInfinite=t,this.offset=0}getType(){return"Container"}readByte(){return this.source[this.offset++]}readUint(){const e=this.readByte(),t=8-e.toString(2).length;let n=e-(1<<7-t);for(let e=0;e<t;e++)n<<=8,n|=this.readByte();return n}updateBySource(){var s;let l;for(this.data=[],this.offset=0;this.offset<this.source.length;this.offset=l){const c=this.offset,d=this.readUint(),{name:u,type:p}=null!==(s=t.sections[d])&&void 0!==s?s:{},g=this.readUint();l=this.source.length,g>=0&&(l=Math.min(this.offset+g,l));const b=this.source.slice(this.offset,l);let h;switch(p){case n.SectionType.Container:h=new i(u,g<0,c);break;case n.SectionType.Uint:h=new r.WebmUint(u,c);break;case n.SectionType.Float:h=new o.WebmFloat(u,c);break;case n.SectionType.String:h=new a.WebmString(u,c);break;default:h=new e.WebmBase(u,c)}h.setSource(b),this.data.push({id:d,idHex:d.toString(16),data:h})}}writeUint(e,t=!1){let n;for(n=1;(e<0||e>=1<<7*n)&&n<8;n++);if(!t){for(let t=0;t<n;t++)this.source[this.offset+t]=e>>8*(n-1-t)&255;this.source[this.offset]&=(1<<8-n)-1,this.source[this.offset]|=1<<8-n}this.offset+=n}writeSections(e=!1){this.offset=0;for(let t=0;t<this.data.length;t++){const n=this.data[t],r=n.data.source,o=r.length;this.writeUint(n.id,e),this.writeUint(n.data instanceof i&&n.data.isInfinite?-1:o,e),e||this.source.set(r,this.offset),this.offset+=o}return this.offset}updateByData(){const e=this.writeSections(!0);this.source=new Uint8Array(e),this.writeSections()}getSectionById(e){for(let t=0;t<this.data.length;t++){const n=this.data[t];if(n.id===e)return n.data}return null}};return Pi.WebmContainer=i,Pi}var Vi,Hi={};var Wi,Gi,Ki={};function Yi(){return Gi||(Gi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=xi;t.__exportStar(Ti(),e),t.__exportStar(zi(),e),t.__exportStar(function(){if(Vi)return Hi;Vi=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.WebmFile=void 0;const e=xi,t=zi();let n=class n extends t.WebmContainer{constructor(e){super("File"),this.setSource(e)}getType(){return"File"}toBlob(e="video/webm"){return new Blob([this.source.buffer],{type:e})}static blobToArray(e){return new Promise((t,n)=>{try{const r=new FileReader;r.onloadend=()=>{try{t(new Uint8Array(r.result))}catch(e){n(e)}},r.readAsArrayBuffer(e)}catch(e){n(e)}})}static fromBlob(t){return e.__awaiter(this,void 0,void 0,function*(){const e=yield n.blobToArray(t);return new n(e)})}};return Hi.WebmFile=n,Hi}(),e),t.__exportStar(Li(),e),t.__exportStar(Ni(),e),t.__exportStar(Oi(),e),t.__exportStar(Ai(),e),t.__exportStar((Wi||(Wi=1,Object.defineProperty(Ki,"__esModule",{value:!0})),Ki),e),t.__exportStar(Bi(),e)}(ki)),ki}var Ji,Zi,Xi={};function Qi(){if(Ji)return Xi;Ji=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.fixParsedWebmDuration=void 0;const e=Yi();return Xi.fixParsedWebmDuration=(t,n,r={})=>{let o=r.logger;void 0===o?o=e=>console.debug(e):o||(o=()=>{});const a=t.getSectionById(139690087);if(!a)return o("[fix-webm-duration] Segment section is missing"),!1;const i=a.getSectionById(88713574);if(!i)return o("[fix-webm-duration] Info section is missing"),!1;const s=i.getSectionById(710577);if(!s)return o("[fix-webm-duration] TimecodeScale section is missing"),!1;let l=i.getSectionById(1161);if(l){if(!(l.getValue()<=0))return o(`[fix-webm-duration] Duration section is present, and the value is ${l.getValue()}`),!1;o(`[fix-webm-duration] Duration section is present, but the value is ${l.getValue()}`),l.setValue(n)}else o("[fix-webm-duration] Duration section is missing"),l=new e.WebmFloat("Duration"),l.setValue(n),i.data.push({id:1161,data:l});return s.setValue(1e6),i.updateByData(),a.updateByData(),t.updateByData(),!0},Xi}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=xi;t.__exportStar(function(){if(Zi)return _i;Zi=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.fixWebmDuration=void 0;const e=xi,t=Yi(),n=Qi();return _i.fixWebmDuration=(r,o,a)=>e.__awaiter(void 0,void 0,void 0,function*(){try{const e=yield t.WebmFile.fromBlob(r);if((0,n.fixParsedWebmDuration)(e,o,a))return e.toBlob(r.type)}catch(e){}return r}),_i}(),e),t.__exportStar(Qi(),e)}(Na);const es=we('<div class="flex items-center gap-2">'),ts=we('<div class="mb-3 flex gap-2 overflow-auto">'),ns=we("<div>"),rs=we('<div class="fixed inset-0 z-[9999] flex items-center justify-center bg-white/80 backdrop-blur-sm transition-all duration-200" role="dialog" aria-modal="true" aria-label="Drop zone"><div class="flex flex-col items-center gap-3 p-8 bg-white/95 rounded-2xl"><div class="p-5"></div><h3 class="text-2xl font-bold text-gray-900">Upload file</h3><p class="text-base text-gray-600">Drop file to upload'),os=we('<div class="flex flex-col w-full gap-2">'),as=e=>{const[t,n]=S(e.defaultValue??""),[r,o]=S([]),[a,i]=S(void 0),[s,l]=S(!1),[c,d]=S("stopped");let u,p,g,b=[];const[h,f]=S(!1);let m=0;C(I(()=>e.block.id,()=>{const t=e.defaultValue??"";n(t),o([]),d("stopped"),g=void 0,b=[],u&&(u.value=t,u.style.height="",u.style.overflow="")}));const y=()=>e.block.options?.attachments?.isEnabled??ya.isEnabled,v=e=>{if(e.preventDefault(),y()&&(m++,1===m)){const t=e.dataTransfer;if(t&&t.types){(Array.from(t.types).includes("Files")||Array.from(t.types).includes("application/x-moz-file"))&&f(!0)}}},w=e=>{e.preventDefault(),y()&&(m--,m<=0&&(m=0,f(!1)))},x=e=>{e.preventDefault(),y()&&(m=0,f(!1),e.dataTransfer?.files&&R(e.dataTransfer.files))},_=e=>{e.preventDefault(),y()&&h()&&e.dataTransfer&&(e.dataTransfer.dropEffect="copy")},k=e=>n(e),P=async()=>{if("started"===c()&&g)g.stop();else if((""!==u?.value||r().length>0)&&u?.reportValidity()){let n;if(r().length>0){i(void 0);const t=await Ea({files:r().map(t=>({file:t,input:{sessionId:e.context.sessionId,fileName:t.name}})),onUploadProgress:i});n=t?.filter(He)}e.onSubmit({type:"text",value:u?.value??t(),attachments:n})}else u?.focus()},B=e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),P())};E(()=>{window.addEventListener("dragenter",v),window.addEventListener("dragleave",w),window.addEventListener("dragover",_),window.addEventListener("drop",x)}),A(()=>{window.removeEventListener("dragenter",v),window.removeEventListener("dragleave",w),window.removeEventListener("dragover",_),window.removeEventListener("drop",x)}),ba(e=>{const{data:t}=e;"setInputValue"===t.command&&n(t.value)});const M=e=>{e.preventDefault(),y()&&l(!0)},U=()=>l(!1),O=e=>{e.preventDefault(),e.stopPropagation(),l(!1),y()&&e.dataTransfer?.files&&R(e.dataTransfer.files)},R=e=>{if(!y())return;const t=Array.from(e).map(e=>Pa({existingFiles:r(),newFile:e,onError:({description:e,title:t})=>{Ia.create({description:e,title:t})}})).filter(He);0!==t.length&&o(e=>[...t,...e])},D=()=>{d("asking")},L=t=>{let n;const r=MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":"video/mp4";g=new MediaRecorder(t,{mimeType:r}),g.ondataavailable=e=>{0!==e.data.size&&b.push(e.data)},g.onstart=()=>{n=Date.now()},g.onstop=async()=>{if("started"!==c()||0===b.length)return;const t=Date.now()-n,o=await Na.fixWebmDuration(new Blob(b,{type:r}),t),a=new File([o],`rec-${e.block.id}-${Date.now()}.${"audio/webm"===r?"webm":"mp4"}`,{type:r});i(void 0);const s=(await Ea({files:[{file:a,input:{sessionId:e.context.sessionId,fileName:a.name}}],onUploadProgress:i})).filter(He).map(e=>e.url);e.onSubmit({type:"recording",url:s[0]}),d("stopped"),g=void 0,b=[]},g.start(),d("started")},q=()=>{g&&"inactive"!==g.state&&g.stop(),d("stopped"),g=void 0,b=[]},j=Boolean(a()),F=(()=>{const n=es();return Pe(n,Q(de,{get when(){return y()},get children(){return Q($a,{onNewFiles:R})}}),null),Pe(n,Q(ue,{get children(){return[Q(pe,{get when(){return!t()&&"started"!==c()&&e.block.options?.audioClip?.isEnabled},get children(){return Q(la,{type:"button","on:click":D,"aria-label":"Record voice",get children(){return Q(ja,{})}})}}),Q(pe,{when:!0,get children(){return Q(ca,{isDisabled:j,get children(){return e.block.options?.labels?.button}})}})]}}),null),n})();return(()=>{const n=os();return Pe(n,Q(de,{get when(){return"started"!==c()},get children(){return Q(de,{get when(){return r().length},get children(){const e=ts();return Pe(e,Q(le,{get each(){return r()},children:(e,t)=>Q(ta,{file:e,get uploadProgressPercent(){return $(()=>!!a())()?$(()=>a()?.fileIndex===t())()?20:t()<(a()?.fileIndex??0)?100:0:void 0},onRemoveClick:()=>(e=>{o(t=>t.filter((t,n)=>n!==e))})(t())})})),e}})}}),null),Pe(n,Q(ua,{onSubmit:P,customButton:F,get isInputDisabled(){return e.isInputDisabled},get hasError(){return e.hasError},get children(){const n=ns();return n.addEventListener("dragleave",U),n.addEventListener("dragover",M),n.addEventListener("drop",O),Pe(n,Q(Ra,{get recordingStatus(){return c()},get buttonsTheme(){return e.context.bot.theme.chat?.buttons},onRecordingConfirmed:L,onAbortRecording:q}),null),Pe(n,Q(de,{get when(){return"started"!==c()},get children(){const n=ns();return"function"==typeof p?$e(p,n):p=n,Pe(n,Q(Zo,{get required(){return!(r().length>0)},containerRef:p,ref(e){"function"==typeof u?u(e):u=e},onInput:k,onKeyDown:B,get value(){return t()},get placeholder(){return e.block.options?.labels?.placeholder??ma.placeholder}})),T(()=>ke(n,ze("flex gap-2 items-center",r().length>0?"pl-5 py-2":""))),n}}),null),T(()=>ke(n,ze("flex-col w-full relative gap-1",s()&&"filter brightness-95"))),n}}),null),Pe(n,Q(de,{get when(){return h()},get children(){const e=rs();return Pe(e.firstChild.firstChild,Q(ga,{class:"w-16 h-16 text-green-500"})),e}}),null),n})()},is=we('<input class="focus:outline-none bg-transparent flex-1 w-full" type="text">'),ss=e=>{const[t,n]=ae(e,["ref","onInput","autofocus"]);return(()=>{const r=is();r.$$input=e=>t.onInput(e.currentTarget.value);const o=e.ref;return"function"==typeof o?$e(o,r):e.ref=r,Ce(r,oe({get autofocus(){return!Ko()}},n),!1,!1),r})()};xe(["input"]);const ls={placeholder:"Type a number..."},cs=e=>{const[t,n]=S(e.defaultValue??""),[r,o,a]=[P(i=()=>t()),function(e){C(function(){const t=i();if(null==t)return void(e.value=t);const n=e.value;(0===t&&""===n||t!=n)&&(e.value=t+"")})},function(e){return e.validity.badInput?i():""!=e.value?e.valueAsNumber:void 0}];var i;let s;C(I(()=>e.block.id,()=>{const t=e.defaultValue??"";n(t),s&&(s.value=t)}));const l=()=>{""!==s?.value&&s?.reportValidity()?e.onSubmit({type:"text",value:s?.value??t().toString()}):s?.focus()},c=e=>{"Enter"===e.key&&(e.preventDefault(),l())};return ba(e=>{const{data:t}=e;"setInputValue"===t.command&&n(t.value)}),E(()=>{s&&o(s)}),Q(ua,{onSubmit:l,get buttonLabel(){return e.block.options?.labels?.button},get isInputDisabled(){return e.isInputDisabled},get hasError(){return e.hasError},get children(){return Q(ss,{ref(e){"function"==typeof s?s(e):s=e},value:r,get placeholder(){return e.block.options?.labels?.placeholder??ls.placeholder},onInput:()=>{n(a(s))},onKeyDown:c,type:"number",get min(){return e.block.options?.min},get max(){return e.block.options?.max},get step(){return e.block.options?.step??"any"}})}})},ds={placeholder:"Type your email..."},us=e=>{const[t,n]=S(e.defaultValue??"");let r;C(I(()=>e.block.id,()=>{const t=e.defaultValue??"";n(t),r&&(r.value=t)}));const o=e=>n(e),a=()=>{""!==r?.value&&r?.reportValidity()?e.onSubmit({type:"text",value:r?.value??t()}):r?.focus()},i=e=>{"Enter"===e.key&&(e.preventDefault(),a())};return ba(e=>{const{data:t}=e;"setInputValue"===t.command&&n(t.value)}),Q(ua,{onSubmit:a,get buttonLabel(){return e.block.options?.labels?.button},get isInputDisabled(){return e.isInputDisabled},get hasError(){return e.hasError},get children(){return Q(ss,{ref(e){"function"==typeof r?r(e):r=e},type:"email",autocomplete:"email",get value(){return t()},get placeholder(){return e.block.options?.labels?.placeholder??ds.placeholder},onInput:o,onKeyDown:i})}})},ps={placeholder:"Type a URL..."},gs=e=>{const[t,n]=S(e.defaultValue??"");let r;C(I(()=>e.block.id,()=>{const t=e.defaultValue??"";n(t),r&&(r.value=t)}));const o=e=>{n(e)},a=()=>{r&&!r?.value.startsWith("http")&&(r.value=`https://${r.value}`),""!==r?.value&&r?.reportValidity()?e.onSubmit({type:"text",value:r?.value??t()}):r?.focus()},i=e=>{"Enter"===e.key&&(e.preventDefault(),a())};return ba(e=>{const{data:t}=e;"setInputValue"===t.command&&n(t.value)}),Q(ua,{onSubmit:a,get buttonLabel(){return e.block.options?.labels?.button},get isInputDisabled(){return e.isInputDisabled},get hasError(){return e.hasError},get children(){return Q(ss,{ref(e){"function"==typeof r?r(e):r=e},get value(){return t()},get placeholder(){return e.block.options?.labels?.placeholder??ps.placeholder},onInput:o,onKeyDown:i,type:"url",autocomplete:"url"})}})},bs=we('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2px" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9">'),hs=e=>(()=>{const t=bs();return Ce(t,e,!0,!0),t})(),fs=[{name:"International",flag:"🌐",code:"INT",dial_code:null},{name:"Afghanistan",flag:"🇦🇫",code:"AF",dial_code:"+93"},{name:"Åland Islands",flag:"🇦🇽",code:"AX",dial_code:"+358"},{name:"Albania",flag:"🇦🇱",code:"AL",dial_code:"+355"},{name:"Algeria",flag:"🇩🇿",code:"DZ",dial_code:"+213"},{name:"American Samoa",flag:"🇦🇸",code:"AS",dial_code:"+1684"},{name:"Andorra",flag:"🇦🇩",code:"AD",dial_code:"+376"},{name:"Angola",flag:"🇦🇴",code:"AO",dial_code:"+244"},{name:"Anguilla",flag:"🇦🇮",code:"AI",dial_code:"+1264"},{name:"Antarctica",flag:"🇦🇶",code:"AQ",dial_code:"+672"},{name:"Antigua and Barbuda",flag:"🇦🇬",code:"AG",dial_code:"+1268"},{name:"Argentina",flag:"🇦🇷",code:"AR",dial_code:"+54"},{name:"Armenia",flag:"🇦🇲",code:"AM",dial_code:"+374"},{name:"Aruba",flag:"🇦🇼",code:"AW",dial_code:"+297"},{name:"Australia",flag:"🇦🇺",code:"AU",dial_code:"+61"},{name:"Austria",flag:"🇦🇹",code:"AT",dial_code:"+43"},{name:"Azerbaijan",flag:"🇦🇿",code:"AZ",dial_code:"+994"},{name:"Bahamas",flag:"🇧🇸",code:"BS",dial_code:"+1242"},{name:"Bahrain",flag:"🇧🇭",code:"BH",dial_code:"+973"},{name:"Bangladesh",flag:"🇧🇩",code:"BD",dial_code:"+880"},{name:"Barbados",flag:"🇧🇧",code:"BB",dial_code:"+1246"},{name:"Belarus",flag:"🇧🇾",code:"BY",dial_code:"+375"},{name:"Belgium",flag:"🇧🇪",code:"BE",dial_code:"+32"},{name:"Belize",flag:"🇧🇿",code:"BZ",dial_code:"+501"},{name:"Benin",flag:"🇧🇯",code:"BJ",dial_code:"+229"},{name:"Bermuda",flag:"🇧🇲",code:"BM",dial_code:"+1441"},{name:"Bhutan",flag:"🇧🇹",code:"BT",dial_code:"+975"},{name:"Bolivia, Plurinational State of bolivia",flag:"🇧🇴",code:"BO",dial_code:"+591"},{name:"Bosnia and Herzegovina",flag:"🇧🇦",code:"BA",dial_code:"+387"},{name:"Botswana",flag:"🇧🇼",code:"BW",dial_code:"+267"},{name:"Bouvet Island",flag:"🇧🇻",code:"BV",dial_code:"+47"},{name:"Brazil",flag:"🇧🇷",code:"BR",dial_code:"+55"},{name:"British Indian Ocean Territory",flag:"🇮🇴",code:"IO",dial_code:"+246"},{name:"Brunei Darussalam",flag:"🇧🇳",code:"BN",dial_code:"+673"},{name:"Bulgaria",flag:"🇧🇬",code:"BG",dial_code:"+359"},{name:"Burkina Faso",flag:"🇧🇫",code:"BF",dial_code:"+226"},{name:"Burundi",flag:"🇧🇮",code:"BI",dial_code:"+257"},{name:"Cambodia",flag:"🇰🇭",code:"KH",dial_code:"+855"},{name:"Cameroon",flag:"🇨🇲",code:"CM",dial_code:"+237"},{name:"Canada",flag:"🇨🇦",code:"CA",dial_code:"+1"},{name:"Cape Verde",flag:"🇨🇻",code:"CV",dial_code:"+238"},{name:"Cayman Islands",flag:"🇰🇾",code:"KY",dial_code:"+345"},{name:"Central African Republic",flag:"🇨🇫",code:"CF",dial_code:"+236"},{name:"Chad",flag:"🇹🇩",code:"TD",dial_code:"+235"},{name:"Chile",flag:"🇨🇱",code:"CL",dial_code:"+56"},{name:"China",flag:"🇨🇳",code:"CN",dial_code:"+86"},{name:"Christmas Island",flag:"🇨🇽",code:"CX",dial_code:"+61"},{name:"Cocos (Keeling) Islands",flag:"🇨🇨",code:"CC",dial_code:"+61"},{name:"Colombia",flag:"🇨🇴",code:"CO",dial_code:"+57"},{name:"Comoros",flag:"🇰🇲",code:"KM",dial_code:"+269"},{name:"Congo",flag:"🇨🇬",code:"CG",dial_code:"+242"},{name:"Congo, The Democratic Republic of the Congo",flag:"🇨🇩",code:"CD",dial_code:"+243"},{name:"Cook Islands",flag:"🇨🇰",code:"CK",dial_code:"+682"},{name:"Costa Rica",flag:"🇨🇷",code:"CR",dial_code:"+506"},{name:"Cote d'Ivoire",flag:"🇨🇮",code:"CI",dial_code:"+225"},{name:"Croatia",flag:"🇭🇷",code:"HR",dial_code:"+385"},{name:"Cuba",flag:"🇨🇺",code:"CU",dial_code:"+53"},{name:"Cyprus",flag:"🇨🇾",code:"CY",dial_code:"+357"},{name:"Czech Republic",flag:"🇨🇿",code:"CZ",dial_code:"+420"},{name:"Denmark",flag:"🇩🇰",code:"DK",dial_code:"+45"},{name:"Djibouti",flag:"🇩🇯",code:"DJ",dial_code:"+253"},{name:"Dominica",flag:"🇩🇲",code:"DM",dial_code:"+1767"},{name:"Dominican Republic",flag:"🇩🇴",code:"DO",dial_code:"+1849"},{name:"Dominican Republic",flag:"🇩🇴",code:"DO",dial_code:"+1829"},{name:"Dominican Republic",flag:"🇩🇴",code:"DO",dial_code:"+1809"},{name:"Ecuador",flag:"🇪🇨",code:"EC",dial_code:"+593"},{name:"Egypt",flag:"🇪🇬",code:"EG",dial_code:"+20"},{name:"El Salvador",flag:"🇸🇻",code:"SV",dial_code:"+503"},{name:"Equatorial Guinea",flag:"🇬🇶",code:"GQ",dial_code:"+240"},{name:"Eritrea",flag:"🇪🇷",code:"ER",dial_code:"+291"},{name:"Estonia",flag:"🇪🇪",code:"EE",dial_code:"+372"},{name:"Ethiopia",flag:"🇪🇹",code:"ET",dial_code:"+251"},{name:"Falkland Islands (Malvinas)",flag:"🇫🇰",code:"FK",dial_code:"+500"},{name:"Faroe Islands",flag:"🇫🇴",code:"FO",dial_code:"+298"},{name:"Fiji",flag:"🇫🇯",code:"FJ",dial_code:"+679"},{name:"Finland",flag:"🇫🇮",code:"FI",dial_code:"+358"},{name:"France",flag:"🇫🇷",code:"FR",dial_code:"+33"},{name:"French Guiana",flag:"🇬🇫",code:"GF",dial_code:"+594"},{name:"French Polynesia",flag:"🇵🇫",code:"PF",dial_code:"+689"},{name:"French Southern Territories",flag:"🇹🇫",code:"TF",dial_code:"+262"},{name:"Gabon",flag:"🇬🇦",code:"GA",dial_code:"+241"},{name:"Gambia",flag:"🇬🇲",code:"GM",dial_code:"+220"},{name:"Georgia",flag:"🇬🇪",code:"GE",dial_code:"+995"},{name:"Germany",flag:"🇩🇪",code:"DE",dial_code:"+49"},{name:"Ghana",flag:"🇬🇭",code:"GH",dial_code:"+233"},{name:"Gibraltar",flag:"🇬🇮",code:"GI",dial_code:"+350"},{name:"Greece",flag:"🇬🇷",code:"GR",dial_code:"+30"},{name:"Greenland",flag:"🇬🇱",code:"GL",dial_code:"+299"},{name:"Grenada",flag:"🇬🇩",code:"GD",dial_code:"+1473"},{name:"Guadeloupe",flag:"🇬🇵",code:"GP",dial_code:"+590"},{name:"Guam",flag:"🇬🇺",code:"GU",dial_code:"+1671"},{name:"Guatemala",flag:"🇬🇹",code:"GT",dial_code:"+502"},{name:"Guernsey",flag:"🇬🇬",code:"GG",dial_code:"+44"},{name:"Guinea",flag:"🇬🇳",code:"GN",dial_code:"+224"},{name:"Guinea-Bissau",flag:"🇬🇼",code:"GW",dial_code:"+245"},{name:"Guyana",flag:"🇬🇾",code:"GY",dial_code:"+592"},{name:"Haiti",flag:"🇭🇹",code:"HT",dial_code:"+509"},{name:"Heard Island and Mcdonald Islands",flag:"🇭🇲",code:"HM",dial_code:"+672"},{name:"Holy See (Vatican City State)",flag:"🇻🇦",code:"VA",dial_code:"+379"},{name:"Honduras",flag:"🇭🇳",code:"HN",dial_code:"+504"},{name:"Hong Kong",flag:"🇭🇰",code:"HK",dial_code:"+852"},{name:"Hungary",flag:"🇭🇺",code:"HU",dial_code:"+36"},{name:"Iceland",flag:"🇮🇸",code:"IS",dial_code:"+354"},{name:"India",flag:"🇮🇳",code:"IN",dial_code:"+91"},{name:"Indonesia",flag:"🇮🇩",code:"ID",dial_code:"+62"},{name:"Iran, Islamic Republic of Persian Gulf",flag:"🇮🇷",code:"IR",dial_code:"+98"},{name:"Iraq",flag:"🇮🇶",code:"IQ",dial_code:"+964"},{name:"Ireland",flag:"🇮🇪",code:"IE",dial_code:"+353"},{name:"Isle of Man",flag:"🇮🇲",code:"IM",dial_code:"+44"},{name:"Israel",flag:"🇮🇱",code:"IL",dial_code:"+972"},{name:"Italy",flag:"🇮🇹",code:"IT",dial_code:"+39"},{name:"Jamaica",flag:"🇯🇲",code:"JM",dial_code:"+1876"},{name:"Japan",flag:"🇯🇵",code:"JP",dial_code:"+81"},{name:"Jersey",flag:"🇯🇪",code:"JE",dial_code:"+44"},{name:"Jordan",flag:"🇯🇴",code:"JO",dial_code:"+962"},{name:"Kazakhstan",flag:"🇰🇿",code:"KZ",dial_code:"+7"},{name:"Kenya",flag:"🇰🇪",code:"KE",dial_code:"+254"},{name:"Kiribati",flag:"🇰🇮",code:"KI",dial_code:"+686"},{name:"Korea, Democratic People's Republic of Korea",flag:"🇰🇵",code:"KP",dial_code:"+850"},{name:"Korea, Republic of South Korea",flag:"🇰🇷",code:"KR",dial_code:"+82"},{name:"Kosovo",flag:"🇽🇰",code:"XK",dial_code:"+383"},{name:"Kuwait",flag:"🇰🇼",code:"KW",dial_code:"+965"},{name:"Kyrgyzstan",flag:"🇰🇬",code:"KG",dial_code:"+996"},{name:"Laos",flag:"🇱🇦",code:"LA",dial_code:"+856"},{name:"Latvia",flag:"🇱🇻",code:"LV",dial_code:"+371"},{name:"Lebanon",flag:"🇱🇧",code:"LB",dial_code:"+961"},{name:"Lesotho",flag:"🇱🇸",code:"LS",dial_code:"+266"},{name:"Liberia",flag:"🇱🇷",code:"LR",dial_code:"+231"},{name:"Libyan Arab Jamahiriya",flag:"🇱🇾",code:"LY",dial_code:"+218"},{name:"Liechtenstein",flag:"🇱🇮",code:"LI",dial_code:"+423"},{name:"Lithuania",flag:"🇱🇹",code:"LT",dial_code:"+370"},{name:"Luxembourg",flag:"🇱🇺",code:"LU",dial_code:"+352"},{name:"Macao",flag:"🇲🇴",code:"MO",dial_code:"+853"},{name:"Macedonia",flag:"🇲🇰",code:"MK",dial_code:"+389"},{name:"Madagascar",flag:"🇲🇬",code:"MG",dial_code:"+261"},{name:"Malawi",flag:"🇲🇼",code:"MW",dial_code:"+265"},{name:"Malaysia",flag:"🇲🇾",code:"MY",dial_code:"+60"},{name:"Maldives",flag:"🇲🇻",code:"MV",dial_code:"+960"},{name:"Mali",flag:"🇲🇱",code:"ML",dial_code:"+223"},{name:"Malta",flag:"🇲🇹",code:"MT",dial_code:"+356"},{name:"Marshall Islands",flag:"🇲🇭",code:"MH",dial_code:"+692"},{name:"Martinique",flag:"🇲🇶",code:"MQ",dial_code:"+596"},{name:"Mauritania",flag:"🇲🇷",code:"MR",dial_code:"+222"},{name:"Mauritius",flag:"🇲🇺",code:"MU",dial_code:"+230"},{name:"Mayotte",flag:"🇾🇹",code:"YT",dial_code:"+262"},{name:"Mexico",flag:"🇲🇽",code:"MX",dial_code:"+52"},{name:"Micronesia, Federated States of Micronesia",flag:"🇫🇲",code:"FM",dial_code:"+691"},{name:"Moldova",flag:"🇲🇩",code:"MD",dial_code:"+373"},{name:"Monaco",flag:"🇲🇨",code:"MC",dial_code:"+377"},{name:"Mongolia",flag:"🇲🇳",code:"MN",dial_code:"+976"},{name:"Montenegro",flag:"🇲🇪",code:"ME",dial_code:"+382"},{name:"Montserrat",flag:"🇲🇸",code:"MS",dial_code:"+1664"},{name:"Morocco",flag:"🇲🇦",code:"MA",dial_code:"+212"},{name:"Mozambique",flag:"🇲🇿",code:"MZ",dial_code:"+258"},{name:"Myanmar",flag:"🇲🇲",code:"MM",dial_code:"+95"},{name:"Namibia",flag:"🇳🇦",code:"NA",dial_code:"+264"},{name:"Nauru",flag:"🇳🇷",code:"NR",dial_code:"+674"},{name:"Nepal",flag:"🇳🇵",code:"NP",dial_code:"+977"},{name:"Netherlands",flag:"🇳🇱",code:"NL",dial_code:"+31"},{name:"Netherlands Antilles",flag:"",code:"AN",dial_code:"+599"},{name:"New Caledonia",flag:"🇳🇨",code:"NC",dial_code:"+687"},{name:"New Zealand",flag:"🇳🇿",code:"NZ",dial_code:"+64"},{name:"Nicaragua",flag:"🇳🇮",code:"NI",dial_code:"+505"},{name:"Niger",flag:"🇳🇪",code:"NE",dial_code:"+227"},{name:"Nigeria",flag:"🇳🇬",code:"NG",dial_code:"+234"},{name:"Niue",flag:"🇳🇺",code:"NU",dial_code:"+683"},{name:"Norfolk Island",flag:"🇳🇫",code:"NF",dial_code:"+672"},{name:"Northern Mariana Islands",flag:"🇲🇵",code:"MP",dial_code:"+1670"},{name:"Norway",flag:"🇳🇴",code:"NO",dial_code:"+47"},{name:"Oman",flag:"🇴🇲",code:"OM",dial_code:"+968"},{name:"Pakistan",flag:"🇵🇰",code:"PK",dial_code:"+92"},{name:"Palau",flag:"🇵🇼",code:"PW",dial_code:"+680"},{name:"Palestinian Territory, Occupied",flag:"🇵🇸",code:"PS",dial_code:"+970"},{name:"Panama",flag:"🇵🇦",code:"PA",dial_code:"+507"},{name:"Papua New Guinea",flag:"🇵🇬",code:"PG",dial_code:"+675"},{name:"Paraguay",flag:"🇵🇾",code:"PY",dial_code:"+595"},{name:"Peru",flag:"🇵🇪",code:"PE",dial_code:"+51"},{name:"Philippines",flag:"🇵🇭",code:"PH",dial_code:"+63"},{name:"Pitcairn",flag:"🇵🇳",code:"PN",dial_code:"+64"},{name:"Poland",flag:"🇵🇱",code:"PL",dial_code:"+48"},{name:"Portugal",flag:"🇵🇹",code:"PT",dial_code:"+351"},{name:"Puerto Rico",flag:"🇵🇷",code:"PR",dial_code:"+1939"},{name:"Qatar",flag:"🇶🇦",code:"QA",dial_code:"+974"},{name:"Romania",flag:"🇷🇴",code:"RO",dial_code:"+40"},{name:"Russia",flag:"🇷🇺",code:"RU",dial_code:"+7"},{name:"Rwanda",flag:"🇷🇼",code:"RW",dial_code:"+250"},{name:"Reunion",flag:"🇷🇪",code:"RE",dial_code:"+262"},{name:"Saint Barthelemy",flag:"🇧🇱",code:"BL",dial_code:"+590"},{name:"Saint Helena, Ascension and Tristan Da Cunha",flag:"🇸🇭",code:"SH",dial_code:"+290"},{name:"Saint Kitts and Nevis",flag:"🇰🇳",code:"KN",dial_code:"+1869"},{name:"Saint Lucia",flag:"🇱🇨",code:"LC",dial_code:"+1758"},{name:"Saint Martin",flag:"🇲🇫",code:"MF",dial_code:"+590"},{name:"Saint Pierre and Miquelon",flag:"🇵🇲",code:"PM",dial_code:"+508"},{name:"Saint Vincent and the Grenadines",flag:"🇻🇨",code:"VC",dial_code:"+1784"},{name:"Samoa",flag:"🇼🇸",code:"WS",dial_code:"+685"},{name:"San Marino",flag:"🇸🇲",code:"SM",dial_code:"+378"},{name:"Sao Tome and Principe",flag:"🇸🇹",code:"ST",dial_code:"+239"},{name:"Saudi Arabia",flag:"🇸🇦",code:"SA",dial_code:"+966"},{name:"Senegal",flag:"🇸🇳",code:"SN",dial_code:"+221"},{name:"Serbia",flag:"🇷🇸",code:"RS",dial_code:"+381"},{name:"Seychelles",flag:"🇸🇨",code:"SC",dial_code:"+248"},{name:"Sierra Leone",flag:"🇸🇱",code:"SL",dial_code:"+232"},{name:"Singapore",flag:"🇸🇬",code:"SG",dial_code:"+65"},{name:"Slovakia",flag:"🇸🇰",code:"SK",dial_code:"+421"},{name:"Slovenia",flag:"🇸🇮",code:"SI",dial_code:"+386"},{name:"Solomon Islands",flag:"🇸🇧",code:"SB",dial_code:"+677"},{name:"Somalia",flag:"🇸🇴",code:"SO",dial_code:"+252"},{name:"South Africa",flag:"🇿🇦",code:"ZA",dial_code:"+27"},{name:"South Sudan",flag:"🇸🇸",code:"SS",dial_code:"+211"},{name:"South Georgia and the South Sandwich Islands",flag:"🇬🇸",code:"GS",dial_code:"+500"},{name:"Spain",flag:"🇪🇸",code:"ES",dial_code:"+34"},{name:"Sri Lanka",flag:"🇱🇰",code:"LK",dial_code:"+94"},{name:"Sudan",flag:"🇸🇩",code:"SD",dial_code:"+249"},{name:"Suriname",flag:"🇸🇷",code:"SR",dial_code:"+597"},{name:"Svalbard and Jan Mayen",flag:"🇸🇯",code:"SJ",dial_code:"+47"},{name:"Swaziland",flag:"🇸🇿",code:"SZ",dial_code:"+268"},{name:"Sweden",flag:"🇸🇪",code:"SE",dial_code:"+46"},{name:"Switzerland",flag:"🇨🇭",code:"CH",dial_code:"+41"},{name:"Syrian Arab Republic",flag:"🇸🇾",code:"SY",dial_code:"+963"},{name:"Taiwan",flag:"🇹🇼",code:"TW",dial_code:"+886"},{name:"Tajikistan",flag:"🇹🇯",code:"TJ",dial_code:"+992"},{name:"Tanzania, United Republic of Tanzania",flag:"🇹🇿",code:"TZ",dial_code:"+255"},{name:"Thailand",flag:"🇹🇭",code:"TH",dial_code:"+66"},{name:"Timor-Leste",flag:"🇹🇱",code:"TL",dial_code:"+670"},{name:"Togo",flag:"🇹🇬",code:"TG",dial_code:"+228"},{name:"Tokelau",flag:"🇹🇰",code:"TK",dial_code:"+690"},{name:"Tonga",flag:"🇹🇴",code:"TO",dial_code:"+676"},{name:"Trinidad and Tobago",flag:"🇹🇹",code:"TT",dial_code:"+1868"},{name:"Tunisia",flag:"🇹🇳",code:"TN",dial_code:"+216"},{name:"Turkey",flag:"🇹🇷",code:"TR",dial_code:"+90"},{name:"Turkmenistan",flag:"🇹🇲",code:"TM",dial_code:"+993"},{name:"Turks and Caicos Islands",flag:"🇹🇨",code:"TC",dial_code:"+1649"},{name:"Tuvalu",flag:"🇹🇻",code:"TV",dial_code:"+688"},{name:"Uganda",flag:"🇺🇬",code:"UG",dial_code:"+256"},{name:"Ukraine",flag:"🇺🇦",code:"UA",dial_code:"+380"},{name:"United Arab Emirates",flag:"🇦🇪",code:"AE",dial_code:"+971"},{name:"United Kingdom",flag:"🇬🇧",code:"GB",dial_code:"+44"},{name:"United States",flag:"🇺🇸",code:"US",dial_code:"+1"},{name:"Uruguay",flag:"🇺🇾",code:"UY",dial_code:"+598"},{name:"Uzbekistan",flag:"🇺🇿",code:"UZ",dial_code:"+998"},{name:"Vanuatu",flag:"🇻🇺",code:"VU",dial_code:"+678"},{name:"Venezuela, Bolivarian Republic of Venezuela",flag:"🇻🇪",code:"VE",dial_code:"+58"},{name:"Vietnam",flag:"🇻🇳",code:"VN",dial_code:"+84"},{name:"Virgin Islands, British",flag:"🇻🇬",code:"VG",dial_code:"+1284"},{name:"Virgin Islands, U.S.",flag:"🇻🇮",code:"VI",dial_code:"+1340"},{name:"Wallis and Futuna",flag:"🇼🇫",code:"WF",dial_code:"+681"},{name:"Yemen",flag:"🇾🇪",code:"YE",dial_code:"+967"},{name:"Zambia",flag:"🇿🇲",code:"ZM",dial_code:"+260"},{name:"Zimbabwe",flag:"🇿🇼",code:"ZW",dial_code:"+263"}],ms={placeholder:"Type your phone number..."},ys=we('<div class="relative flex justify-center items-center"><div class="pl-2 pr-1 flex items-center gap-2"><span></span></div><select class="absolute top-0 left-0 w-full h-full cursor-pointer opacity-0">'),vs=we("<option> "),ws=e=>{const[t,n]=S(Ge(e.defaultCountryCode)?"INT":e.defaultCountryCode),[r,o]=S(e.defaultValue??"");let a;C(I(()=>[e.defaultValue,e.defaultCountryCode],()=>{const t=e.defaultValue??"",r=Ge(e.defaultCountryCode)?"INT":e.defaultCountryCode;o(t),n(r),a&&(a.value=t)}));const i=e=>{o(e),""!==e&&"+"!==e||"INT"===t()||n("INT");const r=e?.startsWith("+")&&e.length>2&&fs.reduce((t,n)=>!n?.dial_code||null!==t&&!t.dial_code?t:e?.startsWith(n.dial_code)&&n.dial_code.length>(t?.dial_code.length??0)?n:t,null);r&&n(r.code)},s=()=>{const n=fs.find(e=>e.code===t())?.dial_code;if(""!==a?.value&&a?.reportValidity()){const t=a?.value??r();e.onSubmit({type:"text",value:t.startsWith("+")?t:`${n??""}${t}`})}else a?.focus()},l=e=>{"Enter"===e.key&&(e.preventDefault(),s())},c=e=>{const t=e.currentTarget.value;n(t);const i=fs.find(e=>e.code===t)?.dial_code;""===r()&&i&&o(i),a?.focus()};return ba(e=>{const{data:t}=e;"setInputValue"===t.command&&o(t.value)}),Q(ua,{onSubmit:s,get buttonLabel(){return e.labels?.button},get isInputDisabled(){return e.isInputDisabled},get hasError(){return e.hasError},get children(){return[(()=>{const e=ys(),n=e.firstChild,r=n.firstChild,o=n.nextSibling;return Pe(r,()=>fs.find(e=>t()===e.code)?.flag),Pe(n,Q(hs,{class:"w-3"}),null),o.addEventListener("change",c),Pe(o,Q(le,{each:fs,children:e=>(()=>{const n=vs(),r=n.firstChild;return Pe(n,()=>e.name,r),Pe(n,()=>e.dial_code?`(${e.dial_code})`:"",null),T(()=>n.selected=e.code===t()),T(()=>n.value=e.code),n})()})),e})(),Q(ss,{ref(e){"function"==typeof a?a(e):a=e},type:"tel",get value(){return r()},onInput:i,onKeyDown:l,get placeholder(){return e.labels?.placeholder??ms.placeholder}})]}})},xs=we("<div>"),_s=e=>(()=>{const t=xs();return Pe(t,()=>e.children),T(()=>ke(t,ze("w-full mt-2 px-3 py-2 text-sm rounded-md text-red-700 bg-red-50 border border-red-300",e.class))),t})(),ks={from:"From:",to:"To:"},Ss=we('<div class="flex w-full flex-col items-center"><div class="flex flex-col w-full">'),Ts=we('<div class="flex w-full flex-col gap-3"><div class="flex flex-col w-full gap-1"><span class="text-xs font-semibold text-gray-500 ml-1 uppercase tracking-wider"></span><input class="input__field w-full border px-5 py-2 pr-2 overflow-hidden" data-testid="from-date"></div><div class="flex flex-col w-full gap-1"><span class="text-xs font-semibold text-gray-500 ml-1 uppercase tracking-wider"></span><input class="input__field w-full border px-5 py-2 pr-2 overflow-hidden" data-testid="to-date">'),Cs=e=>{if(!e.includes("to"))return{from:e,to:""};const[t,n]=e.split(" to ");return{from:t,to:n}},$s=(e,t)=>{if(e)return t?e:e.split(/[T\s]/)[0]},Ps=e=>{const[t,n]=S(Cs(e.defaultValue??"").from),[r,o]=S(null);return Q(ua,{onSubmit:()=>{const n=t();if(!n)return void o("Please select a date.");const r=new Date(n);if(isNaN(r.getTime()))return void o("Invalid date format. Please select a valid date.");const a=e.options?.min?new Date(e.options.min):null,i=e.options?.max?new Date(e.options.max):null;a&&!isNaN(a.getTime())&&r<a?o("Selected date is before the minimum allowed date."):i&&!isNaN(i.getTime())&&r>i?o("Selected date is after the maximum allowed date."):e.onSubmit({type:"text",value:n})},get buttonLabel(){return e.options?.labels?.button},get children(){const a=Ss();return Pe(a.firstChild,Q(ss,{ref(e){},onInput:()=>{},get value(){return t()},get type(){return e.options?.hasTime?"datetime-local":"date"},onChange:e=>{n(e.currentTarget.value),o(null)},get min(){return $s(e.options?.min,e.options?.hasTime)},get max(){return $s(e.options?.max,e.options?.hasTime)},"data-testid":"single-date"})),Pe(a,(()=>{const e=$(()=>!!r());return()=>e()&&Q(_s,{get children(){return r()}})})(),null),a}})},Is=e=>{const[t,n]=S(Cs(e.defaultValue??"")),[r,o]=S(null),a=(t,n)=>{if(!t&&!n)return o(null),!0;if(!t||!n)return o("Please provide both start and end dates for the date range."),!1;const r=new Date(t),a=new Date(n);if(isNaN(r.getTime())||isNaN(a.getTime()))return o("Invalid date format. Please select a valid date."),!1;if(r>a)return o(e.options?.retryMessageContent||"The start date cannot be after the end date. Please select a valid date range."),!1;const i=e.options?.min?new Date(e.options.min):null,s=e.options?.max?new Date(e.options.max):null;return i&&!isNaN(i.getTime())&&(r<i||a<i)?(o("Selected dates are before the minimum allowed date."),!1):s&&!isNaN(s.getTime())&&(r>s||a>s)?(o("Selected dates are after the maximum allowed date."),!1):(o(null),!0)};return Q(ua,{onSubmit:()=>{const n=t().from,r=t().to;if(!n||!r)return void o("Please provide both start and end dates for the date range.");if(!a(n,r))return;const i=`${n} to ${r}`;e.onSubmit({type:"text",value:i})},get buttonLabel(){return e.options?.labels?.button},variant:"plain",class:"!flex-col !items-end !rounded-2xl !p-3 !h-auto !gap-3 !border-none",get children(){const o=Ts(),i=o.firstChild,s=i.firstChild,l=s.nextSibling,c=i.nextSibling.firstChild,d=c.nextSibling;return Pe(s,()=>e.options?.labels?.from??ks.from),l.addEventListener("change",e=>{const r={...t(),from:e.currentTarget.value};n(r),a(r.from,r.to)}),Pe(c,()=>e.options?.labels?.to??ks.to),d.addEventListener("change",e=>{const r={...t(),to:e.currentTarget.value};n(r),a(r.from,r.to)}),Pe(o,(()=>{const e=$(()=>!!r());return()=>e()&&Q(_s,{get children(){return r()}})})(),null),T(n=>{const r=e.options?.hasTime?"datetime-local":"date",o=$s(e.options?.min,e.options?.hasTime),a=(()=>{const n=$s(e.options?.max,e.options?.hasTime),r=t().to;return r?n?new Date(r)<new Date(n)?r:n:r:n})(),i=e.options?.hasTime?"datetime-local":"date",s=(()=>{const n=$s(e.options?.min,e.options?.hasTime),r=t().from;return r?n?new Date(r)>new Date(n)?r:n:r:n})(),c=$s(e.options?.max,e.options?.hasTime);return r!==n._v$&&_e(l,"type",n._v$=r),o!==n._v$2&&_e(l,"min",n._v$2=o),a!==n._v$3&&_e(l,"max",n._v$3=a),i!==n._v$4&&_e(d,"type",n._v$4=i),s!==n._v$5&&_e(d,"min",n._v$5=s),c!==n._v$6&&_e(d,"max",n._v$6=c),n},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0}),T(()=>l.value=t().from),T(()=>d.value=t().to),o}})},Es=e=>Q(ue,{get children(){return[Q(pe,{get when(){return e.options?.isRange},get children(){return Q(Is,e)}}),Q(pe,{get when(){return!e.options?.isRange},get children(){return Q(Ps,e)}})]}}),As="Numbers",Bs=10,Ms={button:ha},Us=1,Os=we('<form class="flex flex-col gap-3"><div class="flex flex-wrap justify-center gap-2 py-2">'),Rs=we('<span class="text-sm w-full text-gray-600 dark:text-gray-400">'),Ds=we('<span class="text-sm w-full text-right pr-2 text-gray-600 dark:text-gray-400">'),Ls=we('<div class="flex justify-end pt-2">'),qs=we('<div role="checkbox">'),js=we("<div>"),Fs=e=>{const[t,n]=S(e.defaultValue?Number(e.defaultValue):void 0),r=n=>{n.preventDefault();const r=t();We(r)||e.onSubmit({type:"text",value:r.toString()})},o=t=>{e.block.options?.isOneClickSubmitEnabled&&e.onSubmit({type:"text",value:t.toString()}),n(t)};return(()=>{const n=Os(),a=n.firstChild;return n.addEventListener("submit",r),Pe(n,(()=>{const t=$(()=>!!e.block.options?.labels?.left);return()=>t()&&(()=>{const t=Rs();return Pe(t,()=>e.block.options.labels.left),t})()})(),a),Pe(a,Q(le,{get each(){return Array.from(Array((e.block.options?.length??Bs)+("Numbers"===(e.block.options?.buttonType??As)?-((e.block.options?.startsAt??Us)-1):0)))},children:(n,r)=>Q(Ns,oe(()=>e.block.options,{get rating(){return t()},get idx(){return r()+("Numbers"===(e.block.options?.buttonType??As)?e.block.options?.startsAt??Us:1)},onClick:o}))})),Pe(n,(()=>{const t=$(()=>!!e.block.options?.labels?.right);return()=>t()&&(()=>{const t=Ds();return Pe(t,()=>e.block.options.labels.right),t})()})(),null),Pe(n,(()=>{const n=$(()=>!!He(t()));return()=>n()&&(()=>{const t=Ls();return Pe(t,Q(ca,{get children(){return e.block.options?.labels?.button??Ms.button}})),t})()})(),null),n})()},Ns=e=>{const t=t=>{t.preventDefault(),e.onClick(e.idx)};return Q(ue,{get children(){return[Q(pe,{get when(){return"Numbers"===(e.buttonType??As)},get children(){return[Q(de,{get when(){return e.isOneClickSubmitEnabled},get children(){return Q(la,{"on:click":t,get children(){return e.idx}})}}),Q(de,{get when(){return!e.isOneClickSubmitEnabled},get children(){const n=qs();return n.addEventListener("click",t),Pe(n,()=>e.idx),T(t=>{const r=He(e.rating)&&e.idx<=e.rating,o=ze("button button--selectable flex items-center justify-center font-medium focus:outline-none cursor-pointer select-none",He(e.rating)&&e.idx<=e.rating&&" button--selected");return r!==t._v$&&_e(n,"aria-checked",t._v$=r),o!==t._v$2&&ke(n,t._v$2=o),t},{_v$:void 0,_v$2:void 0}),n}})]}}),Q(pe,{get when(){return"Numbers"!==(e.buttonType??As)},get children(){const t=js();return t.addEventListener("click",()=>e.onClick(e.idx)),T(n=>{const r=ze("rating-icon cursor-pointer w-[48px] h-[48px]",He(e.rating)&&e.idx<=e.rating&&"rating-icon--selected"),o=e.customIcon?.isEnabled&&!Ge(e.customIcon.svg)?e.customIcon.svg:zs;return r!==n._v$3&&ke(t,n._v$3=r),o!==n._v$4&&(t.innerHTML=n._v$4=o),n},{_v$3:void 0,_v$4:void 0}),t}})]}})},zs='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>',Vs={isMultipleAllowed:!1,labels:{placeholder:"<strong>\n Click to upload\n </strong> or drag and drop<br>\n (size limit: 10MB)",button:"Upload",clear:"Clear",skip:"Skip",success:{single:"File uploaded",multiple:"{total} files uploaded"}}},Hs=we('<div class="w-full bg-gray-200 rounded-full h-2.5"><div class="upload__progress-bar h-2.5 rounded-full transition-[width] duration-150 ease-in-out">'),Ws=we('<div class="p-4 flex gap-2 border-gray-200 border overflow-auto bg-white rounded-md w-full">'),Gs=we('<div class="flex flex-col justify-center items-center gap-4 max-w-[90%]"><p class="text-sm text-gray-500 text-center">'),Ks=we('<input id="dropzone-file" type="file" class="hidden">'),Ys=we('<div class="flex justify-end">'),Js=we('<div class="flex justify-end"><div class="flex gap-2">'),Zs=we('<form class="flex flex-col w-full gap-2"><label for="dropzone-file">'),Xs=we('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-gray-500"><polyline points="16 16 12 12 8 16"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16">'),Qs=e=>{const[t,n]=S([]),[r,o]=S(!1),[a,i]=S(0),[s,l]=S(!1),c=r=>{const o=Array.from(r).map(e=>Pa({existingFiles:t(),newFile:e,onError:({description:e,title:t})=>Ia.create({title:t,description:e})})).filter(He);if(0!==o.length)return e.block.options?.isMultipleAllowed?void n([...t(),...o]):u(o[0])},d=async e=>{e.preventDefault(),0!==t().length&&p(t())},u=async t=>{o(!0);const n=await Ea({files:[{file:t,input:{sessionId:e.context.sessionId,fileName:t.name}}]});if(o(!1),n.length&&n[0])return e.onSubmit({type:"text",label:e.block.options?.labels?.success?.single??Vs.labels.success.single,value:n[0]?tl(n[0].url):"",attachments:[{type:t.type,url:n[0].url}]});Ia.create({description:"An error occured while uploading the file"})},p=async t=>{o(!0);const n=await Ea({files:t.map(t=>({file:t,input:{sessionId:e.context.sessionId,fileName:t.name}})),onUploadProgress:i});if(o(!1),i(0),n.length!==t.length)return Ia.create({description:"An error occured while uploading the files"});e.onSubmit({type:"text",label:n.length>1?(e.block.options?.labels?.success?.multiple??Vs.labels.success.multiple).replaceAll("{total}",n.length.toString()):e.block.options?.labels?.success?.single??Vs.labels.success.single,value:n.filter(He).map(({url:e})=>tl(e)).join(", "),attachments:n.filter(He)})},g=e=>{e.preventDefault(),l(!0)},b=()=>l(!1),h=e=>{e.preventDefault(),e.stopPropagation(),e.dataTransfer?.files&&c(e.dataTransfer.files)},f=()=>n([]),m=()=>e.onSkip(e.block.options?.labels?.skip??Vs.labels.skip);return(()=>{const o=Zs(),i=o.firstChild;return o.addEventListener("submit",d),i.addEventListener("drop",h),i.addEventListener("dragleave",b),i.addEventListener("dragover",g),Pe(i,Q(ue,{get children(){return[Q(pe,{get when(){return r()},get children(){return Q(de,{get when(){return t().length>1},get fallback(){return Q(ia,{})},get children(){const e=Hs(),t=e.firstChild;return T(()=>null!=`${a()>0?a:10}%`?t.style.setProperty("width",`${a()>0?a:10}%`):t.style.removeProperty("width")),e}})}}),Q(pe,{get when(){return!r()},get children(){return[(()=>{const r=Gs(),o=r.firstChild;return Pe(r,Q(de,{get when(){return t().length},get fallback(){return Q(el,{})},get children(){const e=Ws();return e.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation()}),Pe(e,Q(le,{get each(){return t()},children:(e,t)=>Q(ta,{file:e,onRemoveClick:()=>(e=>{n(t=>t.filter((t,n)=>n!==e))})(t())})})),e}}),o),T(()=>o.innerHTML=e.block.options?.labels?.placeholder??Vs.labels.placeholder),r})(),(()=>{const t=Ks();return t.addEventListener("change",e=>{e.currentTarget.files&&c(e.currentTarget.files)}),T(()=>t.multiple=e.block.options?.isMultipleAllowed??Vs.isMultipleAllowed),t})()]}})]}})),Pe(o,Q(de,{get when(){return 0===t().length&&!1===e.block.options?.isRequired},get children(){const t=Ys();return Pe(t,Q(la,{"on:click":m,get children(){return e.block.options?.labels?.skip??Vs.labels.skip}})),t}}),null),Pe(o,Q(de,{get when(){return $(()=>!!(e.block.options?.isMultipleAllowed&&t().length>0))()&&!r()},get children(){const n=Js(),r=n.firstChild;return Pe(r,Q(de,{get when(){return t().length},get children(){return Q(la,{"on:click":f,get children(){return e.block.options?.labels?.clear??Vs.labels.clear}})}}),null),Pe(r,Q(ca,{get children(){return $(()=>(e.block.options?.labels?.button??Vs.labels.button)===Vs.labels.button)()?`Upload ${t().length} file${t().length>1?"s":""}`:e.block.options?.labels?.button}}),null),n}}),null),T(()=>ke(i,ze("upload input__field input__field--upload py-6 flex flex-col justify-center items-center w-full bg-gray-50 border-2 border-gray-300 border-dashed cursor-pointer hover:bg-gray-100 px-8",s()&&"input__field--upload--dragging"))),o})()},el=()=>Xs(),tl=e=>{const t=e.split("/"),n=t.pop();if(!n)return e;let r=n;try{r=decodeURIComponent(n)}catch{}const o=encodeURIComponent(r);return[...t,o].join("/")},nl=ha,rl="Filter the options...",ol=we('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3px" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12">'),al=e=>(()=>{const t=ol();return Ce(t,e,!0,!0),t})(),il=we('<button class="w-5 h-5">'),sl=we('<div class="flex justify-between items-center gap-4 w-full"><input class="input__field w-full border px-5 py-2 pr-2 overflow-hidden" type="text">'),ll=e=>{const[t,n]=S(""),[r,o]=ae(e,["onInput","ref"]),a=()=>{n(""),e.onClear()};return(()=>{const i=sl(),s=i.firstChild;s.$$input=e=>(e=>{n(e),r.onInput(e)})(e.currentTarget.value);const l=e.ref;return"function"==typeof l?$e(l,s):e.ref=s,Ce(s,oe({get value(){return t()}},o),!1,!1),Pe(i,Q(de,{get when(){return t().length>0},get children(){const e=il();return e.addEventListener("click",a),Pe(e,Q(st,{class:"w-4"})),e}}),null),i})()};xe(["input"]);const cl=we("<form>"),dl=we("<div>"),ul=we('<div class="flex items-end w-full">'),pl=we('<img fetchpriority="high" class="m-auto w-full h-full object-contain rounded-t-[var(--quickbot-button-border-radius)]">'),gl=we('<span class="font-normal">'),bl=we('<span class="text-sm whitespace-pre-wrap text-left">'),hl=we('<div class="flex flex-col gap-1 flex-1">'),fl=we('<span class="relative">'),ml=we('<span class="flex h-3 w-3 absolute top-0 right-0 -mt-1 -mr-1 ping"><span class="animate-ping absolute inline-flex h-full w-full rounded-full brightness-200 opacity-75"></span><span class="relative inline-flex rounded-full h-3 w-3 brightness-150">'),yl=e=>{let t;const[n,r]=S(e.defaultItems),[o,a]=S([]),[i,s]=S(0),l=t=>{const r=n()[t];if(r){if(!e.multiple){const t=r.content,n=r.value??r.content??r.id;return r.pictureSrc?e.onSubmit({type:"text",label:Ke(t)?t:r.pictureSrc??r.id,value:r.value??r.id}):e.onSubmit({type:"text",label:t,value:n})}c(r.id)}},c=e=>{const t=o().indexOf(e);a(-1!==t?t=>t.filter(t=>t!==e):t=>[...t,e])},d=t=>{t?.preventDefault(),e.onSubmit({type:"text",value:o().map(t=>{const n=e.defaultItems.find(e=>e.id===t);return n?n.pictureSrc?Ke(n.content)?n.content:n.pictureSrc:n.content:""}).join(", ")})},u=t=>{const n=(t??"").toLowerCase();r(e.defaultItems.filter(e=>{const t=e.content?.toLowerCase()??"";return e.pictureSrc?t.includes(n)||e.description?.toLowerCase().includes(n):t.includes(n)}))};C(()=>{i()===e.defaultItems.filter(e=>He(e.pictureSrc)).length&&e.onTransitionEnd()});const p=()=>{s(e=>e+1)},g=e=>o().includes(e),b=()=>{if(!e.multiple)return n();const t=o().filter(e=>!n().some(t=>t.id===e)).map(t=>e.defaultItems.find(e=>e.id===t)).filter(He);return[...n(),...t]};return Q(ue,{get children(){return[Q(pe,{get when(){return e.multiple},get children(){const n=cl();return n.addEventListener("submit",d),Pe(n,Q(vl,{get options(){return e.options},get multiple(){return e.multiple},inputRef:t,filterItems:u,get defaultItems(){return e.defaultItems},setFilteredItems:r,get itemsToRender(){return b()},isItemSelected:g,handleClick:l,onImageLoad:p,get chunkIndex(){return e.chunkIndex},get selectedItemIds(){return o()}})),T(()=>ke(n,ze("flex flex-col gap-2 w-full items-end max-h-[250px]"))),n}}),Q(pe,{get when(){return!e.multiple},get children(){const n=dl();return Pe(n,Q(vl,{get options(){return e.options},get multiple(){return e.multiple},inputRef:t,filterItems:u,get defaultItems(){return e.defaultItems},setFilteredItems:r,get itemsToRender(){return b()},isItemSelected:g,handleClick:l,onImageLoad:p,get chunkIndex(){return e.chunkIndex},get selectedItemIds(){return o()}})),T(()=>ke(n,ze("flex flex-col gap-2 w-full items-end max-h-[250px]"))),n}})]}})},vl=e=>{const t=e.defaultItems.some(e=>He(e.pictureSrc));return[Q(de,{get when(){return e.options?.isSearchable},get children(){const t=ul();return Pe(t,Q(ll,{ref(t){const n=e.inputRef;"function"==typeof n?n(t):e.inputRef=t},get autofocus(){return!Ko()},get onInput(){return e.filterItems},get placeholder(){return e.options?.searchInputPlaceholder??rl},onClear:()=>e.setFilteredItems(e.defaultItems)})),t}}),(()=>{const n=dl();return Pe(n,Q(le,{get each(){return e.itemsToRender},children:(t,n)=>Q(_l,{item:t,get index(){return n()},selected:()=>e.isItemSelected(t.id),onClick:()=>e.handleClick(n()),get onImageLoad(){return e.onImageLoad},get multiple(){return e.multiple},get showPingIndicator(){return 0===e.chunkIndex&&1===e.defaultItems.length}})})),T(()=>ke(n,ze("gap-2 overflow-y-auto",t?"grid grid-cols-[repeat(3,minmax(0,200px))] w-fit max-w-full":"flex flex-wrap justify-end w-full",e.options?.isSearchable&&"rounded-md"))),n})(),Q(de,{get when(){return e.multiple&&e.selectedItemIds.length>0},get children(){return Q(ca,{get children(){return e.options?.buttonLabel??nl}})}})]},wl=e=>(()=>{const t=pl();return Se(t,"load",e.onImageLoad),T(n=>{const r=e.item.pictureSrc,o=e.item.content??`Picture ${e.index+1}`,a=`Picture choice ${e.index+1}`;return r!==n._v$&&_e(t,"src",n._v$=r),o!==n._v$2&&_e(t,"alt",n._v$2=o),a!==n._v$3&&_e(t,"elementtiming",n._v$3=a),n},{_v$:void 0,_v$2:void 0,_v$3:void 0}),t})(),xl=e=>(()=>{const t=hl();return Pe(t,Q(de,{get when(){return e.item.content},get children(){const t=gl();return Pe(t,()=>e.item.content),t}}),null),Pe(t,Q(de,{get when(){return e.item.description},get children(){const t=bl();return Pe(t,()=>e.item.description),t}}),null),t})(),_l=e=>Q(ue,{get children(){return[Q(pe,{get when(){return e.item.pictureSrc&&e.multiple},get children(){return Q(la,{type:"button",role:"checkbox",get"aria-checked"(){return e.selected()},get"on:click"(){return e.onClick},get class(){return ze("button--selectable","button--has-image",Ye(e.item.pictureSrc)&&"button--has-svg","w-full max-w-[200px]")},get"data-itemid"(){return e.item.id},get children(){return[Q(wl,{get item(){return e.item},get index(){return e.index},get onImageLoad(){return e.onImageLoad},get multiple(){return e.multiple}}),(()=>{const t=dl();return Pe(t,Q(kl,{get isChecked(){return e.selected()},class:"flex-shrink-0"}),null),Pe(t,Q(xl,{get item(){return e.item}}),null),T(()=>ke(t,ze("py-2 px-4 flex items-center gap-2",e.item.description&&"items-start"))),t})()]}})}}),Q(pe,{get when(){return e.item.pictureSrc&&!e.multiple},get children(){return Q(la,{get"on:click"(){return e.onClick},get"data-itemid"(){return e.item.id},get class(){return ze("button--selectable","button--has-image",Ye(e.item.pictureSrc)&&"button--has-svg","w-full max-w-[200px]")},get children(){return[Q(wl,{get item(){return e.item},get index(){return e.index},get onImageLoad(){return e.onImageLoad},get multiple(){return e.multiple}}),(()=>{const t=dl();return Pe(t,Q(xl,{get item(){return e.item}})),T(()=>ke(t,ze("py-2 px-4 flex items-center gap-2",e.item.description&&"items-start"))),t})()]}})}}),Q(pe,{get when(){return!e.item.pictureSrc&&e.multiple},get children(){const t=fl();return Pe(t,Q(la,{type:"button",role:"checkbox",get"aria-checked"(){return e.selected()},get"on:click"(){return e.onClick},get class(){return ze("button--selectable",e.selected()&&"button--selected")},get"data-itemid"(){return e.item.id},get children(){const t=dl();return Pe(t,Q(kl,{get isChecked(){return e.selected()},class:"flex-shrink-0"}),null),Pe(t,Q(xl,{get item(){return e.item}}),null),T(()=>ke(t,ze("flex items-center gap-2",e.item.description&&"items-start"))),t}})),t}}),Q(pe,{get when(){return!e.item.pictureSrc&&!e.multiple},get children(){const t=fl();return Pe(t,Q(la,{get"on:click"(){return e.onClick},get class(){return ze("button--selectable",e.selected()&&"button--selected")},get"data-itemid"(){return e.item.id},get children(){const t=dl();return Pe(t,Q(xl,{get item(){return e.item}})),T(()=>ke(t,ze("flex items-center gap-2",e.item.description&&"items-start"))),t}}),null),Pe(t,Q(de,{get when(){return e.showPingIndicator},get children(){return ml()}}),null),t}})]}}),kl=e=>(()=>{const t=dl();return Pe(t,Q(al,{get classList(){return{"w-3":!0,"h-3":!0,"transition-opacity":!0,"duration-200":!0,"opacity-100":e.isChecked,"group-hover:opacity-0":e.isChecked,"opacity-0":!e.isChecked}}}),null),Pe(t,Q(st,{get classList(){return{absolute:!0,"top-1/2":!0,"left-1/2":!0,"-translate-x-1/2":!0,"-translate-y-1/2":!0,"w-3":!0,"h-3":!0,"transition-opacity":!0,"duration-200":!0,"opacity-0":!0,"group-hover:opacity-100":e.isChecked}}}),null),T(()=>ke(t,ze("button__checkbox","w-4 h-4 rounded-full relative flex items-center justify-center",e.isChecked&&"button__checkbox--checked",e.class))),t})(),Sl={button:"Pay",success:"Success"},Tl=we('<div class="input-error mt-4 text-center animate-fade-in">'),Cl=we('<form id="payment-form" class="flex flex-col p-4 w-full items-center"><slot name="stripe-payment-form">');let $l,Pl=null,Il=null;const El=e=>{const[t,n]=S(),[r,o]=S(!1),[a,i]=S(!1);E(async()=>{if(Al($l),!e.options?.publicKey)return n("Missing Stripe public key");var t;if(Pl=await(t=e.options?.publicKey,new Promise(e=>{if(window.Stripe)return e(window.Stripe(t));const n=document.createElement("script");n.src="https://js.stripe.com/v3",document.body.appendChild(n),n.onload=()=>{if(!window.Stripe)throw new Error("Stripe.js failed to load.");e(window.Stripe(t))}})),!Pl)return;Il=Pl.elements({appearance:{theme:"stripe",variables:{colorPrimary:getComputedStyle($l).getPropertyValue("--quickbot-button-bg-color")}},clientSecret:e.options.paymentIntentSecret});Il.create("payment",{layout:"tabs"}).mount("#payment-element"),setTimeout(()=>{o(!0),e.onTransitionEnd()},1e3)});const s=async t=>{if(t.preventDefault(),!Pl||!Il)return;var r;i(!0),r={sessionId:e.context.sessionId,resultId:e.context.resultId,bot:e.context.bot},sessionStorage.setItem("botPaymentInProgress",JSON.stringify(r));const{postalCode:o,...a}=e.options?.additionalInformation?.address??{},{error:s,paymentIntent:l}=await Pl.confirmPayment({elements:Il,confirmParams:{return_url:window.location.href,payment_method_data:{billing_details:{name:e.options?.additionalInformation?.name,email:e.options?.additionalInformation?.email,phone:e.options?.additionalInformation?.phoneNumber,address:{...a,postal_code:o}}}},redirect:"if_required"});return Nt(),i(!1),"validation_error"!==s?.type?"card_error"===s?.type?n(s.message):s||"succeeded"!==l.status?void 0:e.onSuccess():void 0};return(()=>{const n=Cl(),o=n.firstChild;n.addEventListener("submit",s);return"function"==typeof $l?$e($l,o):$l=o,o._$owner=B(),Pe(n,Q(de,{get when(){return r()},get children(){return Q(ca,{get isLoading(){return a()},class:"mt-4 w-full max-w-lg animate-fade-in",get children(){return[$(()=>e.options?.labels?.button??Sl.button)," ",$(()=>e.options?.amountLabel)]}})}}),null),Pe(n,Q(de,{get when(){return t()},get children(){const e=Tl();return Pe(e,t),e}}),null),n})()},Al=e=>{const t=e.getRootNode().host,n=document.createElement("div");n.style.width="100%",n.slot="stripe-payment-form",t.appendChild(n);const r=document.createElement("div");r.id="payment-element",n.appendChild(r)},Bl=e=>Q(El,{get onSuccess(){return e.onSuccess},get options(){return e.options},get context(){return e.context},get onTransitionEnd(){return e.onTransitionEnd}}),Ml=we('<div class="flex flex-shrink-0 items-center w-10 h-10">'),Ul=we('<div class="transition-opacity duration-200 px-5 py-3">'),Ol=e=>{const{isSending:t,getDisplayedMessageIndex:n,chatChunks:r}=Tn(),o=()=>r()[e.chunkIndex]?.input?.answer,a=()=>{const e=r(),a=!!e.at(-1)?.streamingMessageId||t(),i=e.some((e,t)=>0!==e.messages.length&&n(t)<e.messages.length);return!We(o())||a||i},i=t=>e.onSubmit(t),s=()=>{if(e.hasError){const e=o();if("text"===e?.type)return e.value}return e.isInputPrefillEnabled?e.block.prefilledValue:void 0},l=()=>i({type:"text",value:e.block.options?.labels?.success??Sl.success});return(()=>{const t=Ul();return Pe(t,Q(de,{get when(){return e.hasHostAvatar},get children(){return Ml()}}),null),Pe(t,Q(ue,{get children(){return[Q(pe,{get when(){return e.block.type===fa.TEXT},get children(){return Q(as,{get block(){return e.block},get defaultValue(){return s()},get context(){return e.context},onSubmit:i,isInputDisabled:a,hasError:!1})}}),Q(pe,{get when(){return e.block.type===fa.NUMBER},get children(){return Q(cs,{get block(){return e.block},get defaultValue(){return s()},onSubmit:i,isInputDisabled:a,hasError:!1})}}),Q(pe,{get when(){return e.block.type===fa.EMAIL},get children(){return Q(us,{get block(){return e.block},get defaultValue(){return s()},onSubmit:i,isInputDisabled:a,hasError:!1})}}),Q(pe,{get when(){return e.block.type===fa.URL},get children(){return Q(gs,{get block(){return e.block},get defaultValue(){return s()},onSubmit:i,isInputDisabled:a,hasError:!1})}}),Q(pe,{get when(){return e.block.type===fa.PHONE},get children(){return Q(ws,{get labels(){return e.block.options?.labels},get defaultCountryCode(){return e.block.options?.defaultCountryCode},get defaultValue(){return s()},onSubmit:i,isInputDisabled:a,hasError:!1})}}),Q(pe,{get when(){return $(()=>e.block.type===fa.DATE)()&&!a()},get children(){return Q(Es,{get options(){return e.block.options},get defaultValue(){return s()},onSubmit:i})}}),Q(pe,{get when(){return $(()=>e.block.type===fa.RATING)()&&!a()},get children(){return Q(Fs,{get block(){return e.block},get defaultValue(){return s()},onSubmit:i})}}),Q(pe,{get when(){return $(()=>e.block.type===fa.FILE)()&&!a()},get children(){return Q(Qs,{get context(){return e.context},get block(){return e.block},onSubmit:i,get onSkip(){return e.onSkip}})}}),Q(pe,{get when(){return $(()=>e.block.type===fa.PAYMENT)()&&!a()},get children(){return Q(Bl,{get context(){return e.context},get options(){return{...e.block.options,...e.block.runtimeOptions}},onSuccess:l,get onTransitionEnd(){return e.onTransitionEnd}})}}),Q(pe,{get when(){return e.block.type===fa.CHOICE&&!a()&&e.block},keyed:!0,children:t=>Q(yl,{get chunkIndex(){return e.chunkIndex},get defaultItems(){return t.items},get options(){return t.options},onSubmit:i,get onTransitionEnd(){return e.onTransitionEnd},get multiple(){return!!t.options?.isMultipleChoice}})})]}}),null),T(()=>_e(t,"data-blockid",e.block.id)),t})()},Rl=we('<div class="conversation-container__footer transition-colors duration-200 border-t border-black/8 empty:hidden">'),Dl=e=>{const{chatChunks:t,theme:n,hasError:r,currentBlock:o,sendMessage:a,isSending:i,getDisplayedMessageIndex:s,scrollToBottom:l}=Tn(),c=()=>a(void 0);return[(()=>{const d=Rl();return Pe(d,Q(de,{get when(){return o()?.input},children:o=>Q(Ol,{get block(){return o()},get chunkIndex(){return t().length-1},get hasHostAvatar(){return n().chat?.hostAvatar?.isEnabled??!1},get guestAvatar(){return n().chat?.guestAvatar},get context(){return e.context},get isInputPrefillEnabled(){return e.initialChatReply.bot.settings.general?.isInputPrefillEnabled??Gt.isInputPrefillEnabled},get hasError(){return r()},onSubmit:a,onTransitionEnd:l,onSkip:c})}),null),Pe(d,Q(de,{get when(){const e=o(),n=t(),r=!!n.at(-1)?.streamingMessageId||i(),a=n.some((e,t)=>0!==e.messages.length&&s(t)<e.messages.length);return!e?.input&&!r&&!a},get children(){return Q(Go,{})}}),null),d})(),Q(de,{get when(){return e.initialChatReply.bot.settings.general?.isBrandingEnabled},get children(){return Q(Ho,{get botContainer(){return e.botContainer}})}})]},Ll=we('<div class="conversation-container flex flex-col h-full">'),ql=e=>Q(Sn,oe(e,{get children(){const t=Ll();return Pe(t,Q(Fo,e),null),Pe(t,Q(Dl,e),null),t}})),jl=we('<div class="h-full flex justify-center items-center flex-col"><p class="text-2xl text-center"></p><pre>'),Fl=e=>(()=>{const t=jl(),n=t.firstChild,r=n.nextSibling;return Pe(n,()=>e.error.message),Pe(r,()=>JSON.stringify(e.error.cause,null,2)),t})(),Nl="resultId",zl=e=>{if(e)try{const t=sessionStorage.getItem(`bot-${e}-initialChatReply`)??localStorage.getItem(`bot-${e}-initialChatReply`);if(!t)return;return JSON.parse(t)}catch{}},Vl=(e,{botId:t,storage:n})=>{try{const r=JSON.stringify(e);Kl(n).setItem(`bot-${t}-initialChatReply`,r)}catch{}},Hl=()=>{try{sessionStorage.setItem("bot-botOpened","true")}catch{}},Wl=()=>{try{sessionStorage.removeItem("bot-botOpened")}catch{}},Gl=()=>{try{return"true"===sessionStorage.getItem("bot-botOpened")}catch{return!1}},Kl=e=>"session"===(e??Gt.rememberUser.storage)?sessionStorage:localStorage,Yl=e=>{let t;try{const n=zl(e);n?.bot?.id&&(t=n.bot.id)}catch{}const n=[`bot-${e}`,`resultId-${e}`];t&&t!==e&&(n.push(`bot-${t}`),n.push(`resultId-${t}`));[localStorage,sessionStorage].forEach(e=>{Object.keys(e).forEach(t=>{n.some(e=>t.startsWith(e))&&e.removeItem(t)})})},Jl={position:"--quickbot-progress-bar-position",color:"--quickbot-progress-bar-color",colorRgb:"--quickbot-progress-bar-bg-rgb",height:"--quickbot-progress-bar-height",top:"--quickbot-progress-bar-top",bottom:"--quickbot-progress-bar-bottom"},Zl={container:{fontFamily:"--quickbot-container-font-family",maxWidth:"--quickbot-chat-container-max-width",maxHeight:"--quickbot-chat-container-max-height",bgColor:"--quickbot-chat-container-bg-rgb",bgImage:"--quickbot-chat-container-bg-image",color:"--quickbot-chat-container-color",borderRadius:"--quickbot-chat-container-border-radius",borderWidth:"--quickbot-chat-container-border-width",borderColor:"--quickbot-chat-container-border-rgb",borderOpacity:"--quickbot-chat-container-border-opacity",opacity:"--quickbot-chat-container-opacity",blur:"--quickbot-chat-container-blur",boxShadow:"--quickbot-chat-container-box-shadow"},hostBubbles:{bgColor:"--quickbot-host-bubble-bg-rgb",color:"--quickbot-host-bubble-color",borderRadius:"--quickbot-host-bubble-border-radius",borderWidth:"--quickbot-host-bubble-border-width",borderColor:"--quickbot-host-bubble-border-rgb",borderOpacity:"--quickbot-host-bubble-border-opacity",opacity:"--quickbot-host-bubble-opacity",blur:"--quickbot-host-bubble-blur",boxShadow:"--quickbot-host-bubble-box-shadow"},guestBubbles:{bgColor:"--quickbot-guest-bubble-bg-rgb",color:"--quickbot-guest-bubble-color",borderRadius:"--quickbot-guest-bubble-border-radius",borderWidth:"--quickbot-guest-bubble-border-width",borderColor:"--quickbot-guest-bubble-border-rgb",borderOpacity:"--quickbot-guest-bubble-border-opacity",opacity:"--quickbot-guest-bubble-opacity",blur:"--quickbot-guest-bubble-blur",boxShadow:"--quickbot-guest-bubble-box-shadow"},inputs:{bgColor:"--quickbot-input-bg-rgb",color:"--quickbot-input-color",placeholderColor:"--quickbot-input-placeholder-color",borderRadius:"--quickbot-input-border-radius",borderWidth:"--quickbot-input-border-width",borderColor:"--quickbot-input-border-rgb",borderOpacity:"--quickbot-input-border-opacity",opacity:"--quickbot-input-opacity",blur:"--quickbot-input-blur",boxShadow:"--quickbot-input-box-shadow"},buttons:{bgRgb:"--quickbot-button-bg-rgb",color:"--quickbot-button-color",borderRadius:"--quickbot-button-border-radius",borderWidth:"--quickbot-button-border-width",borderColor:"--quickbot-button-border-rgb",borderOpacity:"--quickbot-button-border-opacity",opacity:"--quickbot-button-opacity",blur:"--quickbot-button-blur",boxShadow:"--quickbot-button-box-shadow"},checkbox:{bgRgb:"--quickbot-checkbox-bg-rgb",alphaRatio:"--selectable-alpha-ratio"}},Xl=(e,t,n)=>{const r=e?.position??Ao;t.setProperty(Jl.position,"fixed"===r?n?"absolute":"fixed":r),t.setProperty(Jl.color,e?.color??"#01a952"),t.setProperty(Jl.colorRgb,Ba(e?.backgroundColor??"#dffaeb").join(", ")),t.setProperty(Jl.height,`${e?.thickness??4}px`);const o=e?.placement??"top";t.setProperty(Jl.top,"Top"===o?"0":"auto"),t.setProperty(Jl.bottom,"Bottom"===o?"0":"auto")},Ql=(e,t)=>{ec(e?.container,t),tc(e?.hostBubbles,t),nc(e?.guestBubbles,t),rc(e?.buttons,t),oc(e?.inputs,t),ac(e?.container,t)},ec=(e,t)=>{const n=e?.font;t.setProperty(Zl.container.fontFamily,("string"==typeof n?n:n?.family)??Eo);const r=e?.background,o=r?.type??Io.COLOR,a=r?.content;let i=e?.backgroundColor??Bo;r&&o===Io.COLOR&&a?i=a:r&&o===Io.NONE&&(i="transparent");const s="transparent"===i||Ge(i),l=Ua(i);r&&o===Io.IMAGE&&a?t.setProperty(Zl.container.bgImage,`url(${a})`):t.setProperty(Zl.container.bgImage,"none"),t.setProperty(Zl.container.bgColor,s?"0, 0, 0":l.rgb.join(", ")),t.setProperty(Zl.container.color,Aa(e?.color??"#303235").join(", ")),t.setProperty(Zl.container.maxWidth,e?.maxWidth??"800px"),t.setProperty(Zl.container.maxHeight,e?.maxHeight??"100%");const c=s?0:1!==l.alpha?l.alpha:e?.opacity??1;t.setProperty(Zl.container.opacity,s?"0":c.toString()),t.setProperty(Zl.container.blur,1===c||s?"0px":`${e?.blur??0}px`),sc(e?.shadow,t,Zl.container.boxShadow),ic(e?.border,t,Zl.container.borderRadius),t.setProperty(Zl.container.borderWidth,He(e?.border?.thickness)?`${e?.border?.thickness}px`:"0"),t.setProperty(Zl.container.borderOpacity,He(e?.border?.opacity)?e.border.opacity.toString():1..toString()),t.setProperty(Zl.container.borderColor,Ba(e?.border?.color??"").join(", "))},tc=(e,t)=>{const n=e?.backgroundColor??"#f5f5f5",r=Ua(n);t.setProperty(Zl.hostBubbles.bgColor,r.rgb.join(", ")),t.setProperty(Zl.hostBubbles.color,e?.color??"#202020"),ic(e?.border,t,Zl.hostBubbles.borderRadius),t.setProperty(Zl.hostBubbles.borderWidth,He(e?.border?.thickness)?`${e?.border?.thickness}px`:"0"),t.setProperty(Zl.hostBubbles.borderColor,Ba(e?.border?.color??"").join(", "));const o="transparent"===n?0:1!==r.alpha?r.alpha:e?.opacity??1;t.setProperty(Zl.hostBubbles.opacity,o.toString()),t.setProperty(Zl.hostBubbles.borderOpacity,He(e?.border?.opacity)?e.border.opacity.toString():1..toString()),t.setProperty(Zl.hostBubbles.blur,He(e?.blur)?`${e.blur??0}px`:"none"),sc(e?.shadow,t,Zl.hostBubbles.boxShadow)},nc=(e,t)=>{const n=e?.backgroundColor??"#dffaeb",r=Ua(n);t.setProperty(Zl.guestBubbles.bgColor,r.rgb.join(", ")),t.setProperty(Zl.guestBubbles.color,e?.color??"#1c201f"),ic(e?.border,t,Zl.guestBubbles.borderRadius),t.setProperty(Zl.guestBubbles.borderWidth,He(e?.border?.thickness)?`${e?.border?.thickness}px`:"0"),t.setProperty(Zl.guestBubbles.borderColor,Ba(e?.border?.color??"").join(", ")),t.setProperty(Zl.guestBubbles.borderOpacity,He(e?.border?.opacity)?e.border.opacity.toString():1..toString());const o="transparent"===n?0:1!==r.alpha?r.alpha:e?.opacity??1;t.setProperty(Zl.guestBubbles.opacity,o.toString()),t.setProperty(Zl.guestBubbles.blur,He(e?.blur)?`${e.blur??0}px`:"none"),sc(e?.shadow,t,Zl.guestBubbles.boxShadow)},rc=(e,t)=>{const n=e?.backgroundColor??Mo,r=Ua(n);t.setProperty(Zl.buttons.bgRgb,r.rgb.join(", ")),t.setProperty(Zl.buttons.color,e?.color??"#ffffff"),ic(e?.border,t,Zl.buttons.borderRadius),t.setProperty(Zl.buttons.borderWidth,He(e?.border?.thickness)?`${e?.border?.thickness}px`:"0px"),t.setProperty(Zl.buttons.borderColor,Ba(e?.border?.color??e?.backgroundColor??Mo).join(", ")),t.setProperty(Zl.buttons.borderOpacity,He(e?.border?.opacity)?e.border.opacity.toString():1..toString());const o="transparent"===n?0:1!==r.alpha?r.alpha:e?.opacity??1;t.setProperty(Zl.buttons.opacity,o.toString()),t.setProperty(Zl.buttons.blur,He(e?.blur)?`${e.blur??0}px`:"none"),sc(e?.shadow,t,Zl.buttons.boxShadow)},oc=(e,t)=>{const n=e?.backgroundColor??"#FFFFFF",r=Ua(n);t.setProperty(Zl.inputs.bgColor,r.rgb.join(", ")),t.setProperty(Zl.inputs.color,e?.color??"#202020"),t.setProperty(Zl.inputs.placeholderColor,e?.placeholderColor??"#9095A0"),ic(e?.border,t,Zl.inputs.borderRadius),t.setProperty(Zl.inputs.borderWidth,He(e?.border?.thickness)?`${e?.border?.thickness}px`:"0"),t.setProperty(Zl.inputs.borderColor,Ba(e?.border?.color??"").join(", ")),t.setProperty(Zl.inputs.borderOpacity,He(e?.border?.opacity)?e.border.opacity.toString():1..toString());const o="transparent"===n?0:1!==r.alpha?r.alpha:e?.opacity??1;t.setProperty(Zl.inputs.opacity,o.toString()),t.setProperty(Zl.inputs.blur,He(e?.blur)?`${e.blur??0}px`:"none"),sc(e?.shadow??"md",t,Zl.inputs.boxShadow)},ac=(e,t)=>{const n=e?.backgroundColor??Bo;"transparent"===n||Ge(n)||(e?.opacity??1)<=.2?(t.setProperty(Zl.checkbox.bgRgb,"255, 255, 255"),t.setProperty(Zl.checkbox.alphaRatio,"2")):(t.setProperty(Zl.checkbox.bgRgb,Ba(n).concat(e?.opacity??1).join(", ")),t.setProperty(Zl.checkbox.alphaRatio,"2"))},ic=(e,t,n)=>{t.setProperty(n,`${e?.roundness??30}px`)},sc=(e,t,n)=>{if(void 0!==e)switch(e){case"none":t.setProperty(n,"0 0 #0000");break;case"sm":t.setProperty(n,"0 1px 2px 0 rgb(0 0 0 / 0.05)");break;case"md":t.setProperty(n,"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)");break;case"lg":t.setProperty(n,"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)");break;case"xl":t.setProperty(n,"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)");break;case"2xl":t.setProperty(n,"0 25px 50px -12px rgb(0 0 0 / 0.25)")}else t.setProperty(n,"0 0 #0000")},lc="bot-font",cc=e=>{const t=document.getElementById(lc);if("string"==typeof e||"Google"===e.type){const n=("string"==typeof e?e:e.family)??Eo;if(t?.getAttribute("href")?.includes(n))return;t?.remove();const r=document.createElement("link");return r.href=`https://fonts.bunny.net/css2?family=${n}:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&display=swap`,r.rel="stylesheet",r.id=lc,void document.head.appendChild(r)}if("Custom"===e.type){if(Ke(e.css)){if(t?.innerHTML===e.css)return;t?.remove();const n=document.createElement("style");n.innerHTML=e.css,n.id=lc,document.head.appendChild(n)}if(Ke(e.url)){if(t?.getAttribute("href")===e.url)return;t?.remove();const n=document.createElement("link");n.href=e.url,n.rel="stylesheet",n.id=lc,document.head.appendChild(n)}}},dc=we('<div class="progress-bar left-0 w-full z-[42424242]"><div class="progress-bar__fill absolute h-full transition-[width] duration-[250ms] ease-in-out">'),uc=e=>(()=>{const t=dc(),n=t.firstChild;return T(()=>null!=`${e.value}%`?n.style.setProperty("width",`${e.value}%`):n.style.removeProperty("width")),t})(),[,pc]=S(),gc=we("<style>"),bc=we('<div class="flex items-center justify-center h-full w-full">'),hc=we("<div>"),fc=e=>{const[t,n]=S(),[r,o]=S(""),[a,i]=S(!1),[s,l]=S(!1),[c,d]=S(),u=async()=>{e.font&&cc(e.font),i(!0),l(!0);const t=new URLSearchParams(location.search);e.onInit?.();const r={};t.forEach((e,t)=>{r[t]=e});const a="string"==typeof e.bot?e.bot:void 0,s="string"!=typeof e.bot||(e.isPreview??!1),c=(e=>{if(e)try{return sessionStorage.getItem(`${Nl}-${e}`)??localStorage.getItem(`${Nl}-${e}`)??void 0}catch{}})(a);try{const i=s?await async function({bot:e,prefilledVariables:t,stripeRedirectStatus:n,startFrom:r,sessionId:o}){if(We(e))throw new Error("Bot is required to create preview conversation");const a=await zt(n);return a||await Lt.post(ht("/api/v1/conversations/preview"),{json:{botId:e.id,isStreamEnabled:!0,startFrom:r,bot:e,prefilledVariables:{...t,"Device type":jt(navigator.userAgent)},sessionId:o},timeout:!1}).json()}({stripeRedirectStatus:t.get("redirect_status")??void 0,bot:e.bot,prefilledVariables:{...r,...e.prefilledVariables},startFrom:e.startFrom,sessionId:e.sessionId}):await async function({publicId:e,prefilledVariables:t,resultId:n,stripeRedirectStatus:r}){if(We(e))throw new Error("Public ID is required to create conversation");const o=await zt(r);if(o)return o;const a=parent!==window&&Ke(document.referrer)?new URL(document.referrer).origin:void 0,i=await Lt.post(ht("/api/v1/conversations"),{headers:{"x-quickbot-iframe-referrer-origin":a},json:{publicId:e,isStreamEnabled:!0,prefilledVariables:{...t,"Device type":jt(navigator.userAgent)},resultId:n,isOnlyRegistering:!1},timeout:!1}),s=i.headers.get("access-control-allow-origin");if(a&&s&&"*"!==s&&!a.includes(s))throw new qt(s);return await i.json()}({stripeRedirectStatus:t.get("redirect_status")??void 0,publicId:e.bot,resultId:Ke(e.resultId)?e.resultId:c,prefilledVariables:{...r,...e.prefilledVariables}});if(i.resultId&&a&&(i.bot.settings.general?.rememberUser?.isEnabled??Gt.rememberUser.isEnabled)){c&&c!==i.resultId&&Yl(a);const t=i.bot.settings.general?.rememberUser?.storage??Gt.rememberUser.storage;((e="session")=>(t,n)=>{try{Kl(e).setItem(`${Nl}-${t}`,n)}catch{}})(t)(a,i.resultId);const r=zl(a);r&&r.bot.publishedAt&&i.bot.publishedAt?new Date(r.bot.publishedAt).getTime()===new Date(i.bot.publishedAt).getTime()?n(i):(Yl(a),n(i),Vl(i,{botId:a,storage:t})):(n(i),Vl(i,{botId:a,storage:t})),e.onChatStatePersisted?.(!0)}else Yl(a||i.bot.id),n(i),i.logs&&e.onNewLogs?.(i.logs),e.onChatStatePersisted?.(!1);o(i.bot.theme.customCss??""),l(!1)}catch(e){return l(!1),e instanceof ft?s?d(new Error("An error occurred while loading the bot.",{cause:{status:e.response.status,body:await e.response.json()}})):400===e.response.status||403===e.response.status?d(new Error("This bot is now closed.")):404===e.response.status?d(new Error("The bot you're looking for doesn't exist.")):d(new Error(`Error! Couldn't initiate the chat. (${e.response.statusText})`)):e instanceof qt?d(new Error(e.message)):(console.error(e),d(s?new Error("Error! Could not reach server. Check your connection.",{cause:e}):new Error("Error! Could not reach server. Check your connection.")))}};return C(()=>{We(e.bot)||a()||u().then()}),C(()=>{We(e.bot)||"string"==typeof e.bot||(o(e.bot.theme.customCss??""),e.bot.theme.progressBar?.isEnabled&&t()&&!t()?.bot.theme.progressBar?.isEnabled&&(i(!1),u().then()))}),C(()=>{const n=t();n&&e.onThemeLoaded?.(n.bot.theme)}),A(()=>{i(!1)}),[(()=>{const e=gc();return Pe(e,r),e})(),Q(de,{get when(){return c()},keyed:!0,children:e=>Q(Fl,{error:e})}),Q(de,{get when(){return $(()=>!!s())()&&!c()},get children(){const e=bc();return Pe(e,Q(ia,{class:"h-8 w-8 text-blue-500"})),e}}),Q(de,{get when(){return t()},keyed:!0,children:t=>Q(mc,{get class(){return e.class},get initialChatReply(){return{...t,bot:{...t.bot,settings:"string"==typeof e.bot?t.bot?.settings:e.bot?.settings,theme:"string"==typeof e.bot?t.bot?.theme:e.bot?.theme}}},get context(){return{isPreview:"string"!=typeof e.bot||(e.isPreview??!1),resultId:t.resultId,sessionId:t.sessionId,bot:t.bot,storage:t.bot.settings.general?.rememberUser?.isEnabled&&"string"==typeof e.bot&&!e.isPreview?t.bot.settings.general?.rememberUser?.storage??Gt.rememberUser.storage:void 0}},get progressBarRef(){return e.progressBarRef},get onNewBlock(){return e.onNewBlock},get onNewLogs(){return e.onNewLogs},get onAnswer(){return e.onAnswer},get onEnd(){return e.onEnd},get onBubblesDisplayed(){return e.onBubblesDisplayed}})})]},mc=e=>{const[t,n]=on(S(e.initialChatReply.progress),{storage:e.context.storage,key:`bot-${e.context.bot.id}-progressValue`}),[r,o]=S(!1);let a;const i=new ResizeObserver(e=>{Yo(e[0].target.clientWidth<400)});return E(()=>{a&&(pc(a),i.observe(a),Un(`${a.clientHeight}px`),((e,t,n)=>{if(!e)return;const r=t?.style;r&&(Xl(e.progressBar,r,n),Ql(e.chat,r))})(e.initialChatReply.bot.theme,a,e.context.isPreview),o(!0))}),C(()=>{cc(e.initialChatReply.bot.theme.chat?.container?.font??{type:"Google",family:Eo})}),A(()=>{a&&i.unobserve(a)}),(()=>{const o=hc();return"function"==typeof a?$e(a,o):a=o,Pe(o,Q(de,{get when(){return He(t())&&e.initialChatReply.bot.theme.progressBar?.isEnabled},get children(){return Q(de,{get when(){return e.progressBarRef&&"fixed"===(e.initialChatReply.bot.theme.progressBar?.position??Ao)},get fallback(){return Q(uc,{get value(){return t()}})},get children(){return Q(Re,{get mount(){return e.progressBarRef},get children(){return Q(uc,{get value(){return t()}})}})}})}}),null),Pe(o,Q(de,{get when(){return r()},get children(){return Q(ql,{botContainer:a,get context(){return e.context},get initialChatReply(){return e.initialChatReply},get onNewBlock(){return e.onNewBlock},get onAnswer(){return e.onAnswer},get onEnd(){return e.onEnd},get onNewLogs(){return e.onNewLogs},onProgressUpdate:n,get onBubblesDisplayed(){return e.onBubblesDisplayed}})}}),null),Pe(o,Q(Qr,{toaster:Ia,children:e=>Q(eo,{get children(){return[Q(to,{get children(){return e().title}}),Q(no,{get children(){return e().description}}),Q(ro,{class:"absolute right-2 top-2",get children(){return Q(st,{class:"w-4"})}})]}})}),null),T(()=>ke(o,ze("h-full w-full flex flex-col quickbot",e.class))),o})()},yc=we("<style>"),vc=we("<div>"),wc=we('<div part="bot">'),xc=e=>{const[t,n]=ae(e,["onOpen","onClose","previewMessage","onPreviewMessageClick","theme","autoShowDelay"]),[r,o]=S(!0),[a,i]=S(n.prefilledVariables),[s,l]=S(!1),[c,d]=S({message:t.previewMessage?.message??"",avatarUrl:t.previewMessage?.avatarUrl}),[u,p]=S(),[g,b]=S(!1),[h,f]=S(!1),[m,y]=S(_c(t.theme?.button?.size??"medium"));let v;C(()=>{y(_c(t.theme?.button?.size??"medium"))}),ba(e=>{const{data:t}=e;"open"===t.command&&_(),"close"===t.command&&k(),"toggle"===t.command&&$(),"showPreviewMessage"===t.command&&I(t.message),"hidePreviewMessage"===t.command&&A(),"setPrefilledVariables"===t.command&&i(e=>({...e,...t.variables})),"unmount"===t.command&&B()}),E(()=>{const e="string"==typeof n.bot?n.bot:void 0,r=zl(e);r&&p(w(r.bot.theme));const o=t.autoShowDelay,a=t.previewMessage?.autoShowDelay;(Gl()||Ft())&&_(),He(o)&&setTimeout(()=>{_()},o),He(a)&&setTimeout(()=>{I()},a)}),C(()=>{e.prefilledVariables&&i(t=>({...t,...e.prefilledVariables}))});const w=e=>{const t=e.chat?.container?.background;return t?.type===Io.COLOR?t.content:e.chat?.container?.backgroundColor},x=e=>{p(w(e))},_=()=>{h()||f(!0),A(),b(!0),g()&&t.onOpen?.()},k=()=>{b(!1),Wl(),g()&&t.onClose?.()},$=()=>{g()?k():_()},P=()=>{t.onPreviewMessageClick?.(),_()},I=e=>{e&&d(e),g()||l(!0)},A=()=>{l(!1)},B=()=>{g()?(k(),setTimeout(()=>{o(!1)},200)):o(!1)},M=e=>{n.onChatStatePersisted?.(e),e&&Hl()};return Q(de,{get when(){return r()},get children(){return Q(ao,{get value(){return document.querySelector("bot-bubble")?.shadowRoot},get children(){return[(()=>{const e=yc();return Pe(e,Ve),e})(),Q(de,{get when(){return s()},get children(){return Q(gt,oe(c,{get placement(){return t.theme?.placement},get previewMessageTheme(){return t.theme?.previewMessage},get buttonSize(){return m()},onClick:P,onCloseClick:A}))}}),Q(at,oe(()=>t.theme?.button,{get placement(){return t.theme?.placement},toggleBot:$,get isBotOpened(){return g()},get buttonSize(){return m()}})),(()=>{const e=vc();return"function"==typeof v?$e(v,e):v=e,e})(),(()=>{const r=wc();return r.style.setProperty("transition","transform 200ms cubic-bezier(0, 1.2, 1, 1), opacity 150ms ease-out"),r.style.setProperty("box-shadow","rgb(0 0 0 / 16%) 0px 5px 40px"),r.style.setProperty("z-index","42424242"),Pe(r,Q(de,{get when(){return h()},get children(){return Q(fc,oe(n,{onChatStatePersisted:M,get prefilledVariables(){return a()},class:"rounded-lg",progressBarRef:v,onThemeLoaded:x}))}})),T(n=>{const o=`calc(100% - ${m()} - 32px)`,a=e.theme?.chatWindow?.maxHeight??"704px",i=e.theme?.chatWindow?.maxWidth??"400px",s="left"===e.theme?.placement?"bottom left":"bottom right",l=g()?"scale3d(1, 1, 1)":"scale3d(0, 0, 1)",c=u()??t.theme?.chatWindow?.backgroundColor,d=`calc(${m()} + 32px)`,p=ze("fixed rounded-lg w-full",g()?"opacity-1":"opacity-0 pointer-events-none","left"===e.theme?.placement?"left-5":"sm:right-5 right-0");return o!==n._v$&&(null!=(n._v$=o)?r.style.setProperty("height",o):r.style.removeProperty("height")),a!==n._v$2&&(null!=(n._v$2=a)?r.style.setProperty("max-height",a):r.style.removeProperty("max-height")),i!==n._v$3&&(null!=(n._v$3=i)?r.style.setProperty("max-width",i):r.style.removeProperty("max-width")),s!==n._v$4&&(null!=(n._v$4=s)?r.style.setProperty("transform-origin",s):r.style.removeProperty("transform-origin")),l!==n._v$5&&(null!=(n._v$5=l)?r.style.setProperty("transform",l):r.style.removeProperty("transform")),c!==n._v$6&&(null!=(n._v$6=c)?r.style.setProperty("background-color",c):r.style.removeProperty("background-color")),d!==n._v$7&&(null!=(n._v$7=d)?r.style.setProperty("bottom",d):r.style.removeProperty("bottom")),p!==n._v$8&&ke(r,n._v$8=p),n},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0}),r})()]}})}})},_c=e=>"medium"===e?"48px":"large"===e?"64px":e||"48px",kc=we("<style>"),Sc=we('<div class="relative" aria-labelledby="modal-title" role="dialog" aria-modal="true"><style></style><div class="fixed inset-0 bg-black bg-opacity-50 transition-opacity animate-fade-in" part="overlay"></div><div class="fixed inset-0 z-10 overflow-y-auto"><div class="flex min-h-full items-center justify-center p-4 text-center sm:p-0"><div>'),Tc=e=>{const[t,n]=ae(e,["onOpen","onClose","autoShowDelay","theme","isOpen","defaultOpen"]),[r,o]=S(n.prefilledVariables),[a,i]=S(t.isOpen??!1);ba(e=>{const{data:t}=e;"open"===t.command&&l(),"close"===t.command&&c(),"toggle"===t.command&&d(),"setPrefilledVariables"===t.command&&o(e=>({...e,...t.variables}))}),E(()=>{(t.defaultOpen||Ft()||Gl())&&l();const e=t.autoShowDelay;He(e)&&setTimeout(()=>{l()},e)}),C(()=>{We(e.isOpen)||e.isOpen===a()||d()}),C(()=>{e.prefilledVariables&&o(t=>({...t,...e.prefilledVariables}))});const s=e=>{e.stopPropagation()},l=()=>{i(!0),t.onOpen?.(),document.body.style.setProperty("overflow","hidden","important"),document.addEventListener("pointerdown",c)},c=()=>{i(!1),t.onClose?.(),document.body.style.overflow="auto",document.removeEventListener("pointerdown",c),Wl()},d=()=>a()?c():l(),u=e=>{n.onChatStatePersisted?.(e),e&&Hl()};return Q(de,{get when(){return a()},get children(){return Q(ao,{get value(){return document.querySelector("quickbot-popup")?.shadowRoot},get children(){return[(()=>{const e=kc();return Pe(e,Ve),e})(),(()=>{const t=Sc(),o=t.firstChild,a=o.nextSibling.nextSibling.firstChild.firstChild;return Pe(o,Ve),a.addEventListener("pointerdown",s),Pe(a,Q(fc,oe(n,{get prefilledVariables(){return r()},onChatStatePersisted:u}))),T(n=>{const r=e.theme?.zIndex??42424242,o=ze("relative h-[80vh] transform overflow-hidden rounded-lg text-left transition-all sm:my-8 w-full max-w-lg",e.theme?.backgroundColor&&"shadow-xl"),i=e.theme?.backgroundColor??"transparent",s=e.theme?.width??"512px";return r!==n._v$&&(null!=(n._v$=r)?t.style.setProperty("z-index",r):t.style.removeProperty("z-index")),o!==n._v$2&&ke(a,n._v$2=o),i!==n._v$3&&(null!=(n._v$3=i)?a.style.setProperty("background-color",i):a.style.removeProperty("background-color")),s!==n._v$4&&(null!=(n._v$4=s)?a.style.setProperty("max-width",s):a.style.removeProperty("max-width")),n},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),t})()]}})}})},Cc=we("<style>\n:host {\n display: block;\n width: 100%;\n height: 100%;\n overflow-y: hidden;\n}\n"),$c=()=>{window.postMessage({isFromBot:!0,command:"close"})},Pc=()=>{window.postMessage({isFromBot:!0,command:"hidePreviewMessage"})},Ic=()=>{window.postMessage({isFromBot:!0,command:"open"})},Ec=e=>{const t={isFromBot:!0,command:"setPrefilledVariables",variables:e};window.postMessage(t)},Ac=e=>{const t={isFromBot:!0,command:"showPreviewMessage",message:e};window.postMessage(t)},Bc=()=>{window.postMessage({isFromBot:!0,command:"toggle"})},Mc=e=>{const t={isFromBot:!0,command:"setInputValue",value:e};window.postMessage(t)},Uc=()=>{window.postMessage({isFromBot:!0,command:"unmount"})},Oc=e=>{const t=e.id?document.getElementById(e.id):document.querySelector("quickbot-standard");if(!t)throw new Error("<quickbot-standard> element not found.");Object.assign(t,e)},Rc=e=>{const t=document.createElement("quickbot-popup");Object.assign(t,e),document.body.prepend(t)},Dc=e=>{const t=document.createElement("bot-bubble");Object.assign(t,e),document.body.prepend(t)};"undefined"!=typeof window&&(Le("quickbot-standard",qe,(e,{element:t})=>{const[n,r]=S(!1),o=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&r(!0)});return ba(()=>{}),E(()=>{o.observe(t)}),A(()=>{o.disconnect()}),Q(ao,{get value(){return document.querySelector("quickbot-standard")?.shadowRoot},get children(){return[(()=>{const e=Cc(),t=e.firstChild;return Pe(e,Ve,t),e})(),Q(de,{get when(){return n()},get children(){return Q(fc,e)}})]}})}),Le("bot-bubble",Fe,xc),Le("quickbot-popup",je,Tc));(e=>{"undefined"!=typeof window&&(window.Bot={...e})})({initStandard:Oc,initPopup:Rc,initBubble:Dc,close:$c,hidePreviewMessage:Pc,open:Ic,setPrefilledVariables:Ec,showPreviewMessage:Ac,toggle:Bc,setInputValue:Mc,unmount:Uc});
|