@8wave/ai-elements 0.73.0 → 0.75.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -15
- package/dist/_chunks/{PkStreamingMarkdown-orhL2kzD.js → PkStreamingMarkdown-rIdQh5_D.js} +20 -20
- package/dist/_chunks/PkStreamingMarkdown-rIdQh5_D.js.map +1 -0
- package/dist/_chunks/{PkToolShowArtifact-D-dU41VG.js → PkToolShowArtifact-CeLgwZBA.js} +6 -6
- package/dist/_chunks/{PkToolShowArtifact-D-dU41VG.js.map → PkToolShowArtifact-CeLgwZBA.js.map} +1 -1
- package/dist/_chunks/{PkToolShowCalendarEvent-B33fWbkk.js → PkToolShowCalendarEvent-cQpAAE3a.js} +10 -10
- package/dist/_chunks/{PkToolShowCalendarEvent-B33fWbkk.js.map → PkToolShowCalendarEvent-cQpAAE3a.js.map} +1 -1
- package/dist/_chunks/{PkToolShowComparison-CcKHsr36.js → PkToolShowComparison-Cu-zT8-Z.js} +6 -6
- package/dist/_chunks/{PkToolShowComparison-CcKHsr36.js.map → PkToolShowComparison-Cu-zT8-Z.js.map} +1 -1
- package/dist/_chunks/PkToolShowContactForm-CqoSVvjG.js +1658 -0
- package/dist/_chunks/PkToolShowContactForm-CqoSVvjG.js.map +1 -0
- package/dist/_chunks/{PkToolShowEmail-BOivL2p_.js → PkToolShowEmail-oLGym0R9.js} +10 -10
- package/dist/_chunks/{PkToolShowEmail-BOivL2p_.js.map → PkToolShowEmail-oLGym0R9.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-Dy0vFEU-.js → PkToolShowImageGallery-CDXSL1Mg.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-Dy0vFEU-.js.map → PkToolShowImageGallery-CDXSL1Mg.js.map} +1 -1
- package/dist/_chunks/{PkToolShowLocation-US6u26ra.js → PkToolShowLocation-BtRUdoEw.js} +7 -7
- package/dist/_chunks/{PkToolShowLocation-US6u26ra.js.map → PkToolShowLocation-BtRUdoEw.js.map} +1 -1
- package/dist/_chunks/{PkToolShowMessage-Cjslxq94.js → PkToolShowMessage-tJQGRhce.js} +9 -9
- package/dist/_chunks/{PkToolShowMessage-Cjslxq94.js.map → PkToolShowMessage-tJQGRhce.js.map} +1 -1
- package/dist/_chunks/{PkToolShowMultipleChoice-BEwiJCLu.js → PkToolShowMultipleChoice-CtVvdyDg.js} +3 -3
- package/dist/_chunks/{PkToolShowMultipleChoice-BEwiJCLu.js.map → PkToolShowMultipleChoice-CtVvdyDg.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-D3Qe8yQM.js → PkToolShowProductList-D_k6CDdb.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-D3Qe8yQM.js.map → PkToolShowProductList-D_k6CDdb.js.map} +1 -1
- package/dist/_chunks/{PkToolShowQrCode-B64sdI0N.js → PkToolShowQrCode-S1j_T8wQ.js} +6 -6
- package/dist/_chunks/{PkToolShowQrCode-B64sdI0N.js.map → PkToolShowQrCode-S1j_T8wQ.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-B2rf94fU.js → PkToolShowSources-CroItMtG.js} +6 -5
- package/dist/_chunks/PkToolShowSources-CroItMtG.js.map +1 -0
- package/dist/_chunks/{PkToolShowSuggestedReply-BGWA08C7.js → PkToolShowSuggestedReply-BRa5Lpti.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-BGWA08C7.js.map → PkToolShowSuggestedReply-BRa5Lpti.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWeather-ClMzD04y.js → PkToolShowWeather-CUpCJ8Nj.js} +3 -3
- package/dist/_chunks/{PkToolShowWeather-ClMzD04y.js.map → PkToolShowWeather-CUpCJ8Nj.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-BCqywwEK.js → PkToolShowWebPages-f-dHyxfD.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-BCqywwEK.js.map → PkToolShowWebPages-f-dHyxfD.js.map} +1 -1
- package/dist/_chunks/{VvCheckbox.es-kmMsWlkU.js → VvCheckbox.es-BF8Mdg0O.js} +2 -2
- package/dist/_chunks/{VvCheckbox.es-kmMsWlkU.js.map → VvCheckbox.es-BF8Mdg0O.js.map} +1 -1
- package/dist/_chunks/{VvCheckboxGroup.es-BRRmuO9h.js → VvCheckboxGroup.es-BJc8MmJ3.js} +109 -109
- package/dist/_chunks/{VvCheckboxGroup.es-BRRmuO9h.js.map → VvCheckboxGroup.es-BJc8MmJ3.js.map} +1 -1
- package/dist/_chunks/{VvCombobox.es-pTM53Z4B.js → VvCombobox.es-ILRHqAye.js} +256 -256
- package/dist/_chunks/{VvCombobox.es-pTM53Z4B.js.map → VvCombobox.es-ILRHqAye.js.map} +1 -1
- package/dist/_chunks/{VvInputText.es-DO39OSWk.js → VvInputText.es-CDnMeO26.js} +190 -190
- package/dist/_chunks/{VvInputText.es-DO39OSWk.js.map → VvInputText.es-CDnMeO26.js.map} +1 -1
- package/dist/_chunks/{VvRadio.es-BpQAJbon.js → VvRadio.es-C2p5vvAx.js} +2 -2
- package/dist/_chunks/{VvRadio.es-BpQAJbon.js.map → VvRadio.es-C2p5vvAx.js.map} +1 -1
- package/dist/_chunks/{VvRadioGroup.es-BSBrmx9w.js → VvRadioGroup.es-6GlWuDjY.js} +10 -10
- package/dist/_chunks/{VvRadioGroup.es-BSBrmx9w.js.map → VvRadioGroup.es-6GlWuDjY.js.map} +1 -1
- package/dist/_chunks/{VvSelect.es-DALpUK5j.js → VvSelect.es-i4lO9onq.js} +6 -6
- package/dist/_chunks/{VvSelect.es-DALpUK5j.js.map → VvSelect.es-i4lO9onq.js.map} +1 -1
- package/dist/_chunks/{VvTextarea.es-C9dwYLOG.js → VvTextarea.es-CGpiCS4S.js} +248 -248
- package/dist/_chunks/{VvTextarea.es-C9dwYLOG.js.map → VvTextarea.es-CGpiCS4S.js.map} +1 -1
- package/dist/_chunks/{dist-DtF6poRc.js → dist-BTnzL-m0.js} +131 -119
- package/dist/_chunks/dist-BTnzL-m0.js.map +1 -0
- package/dist/_chunks/{index.es-Z3Hu-QIb.js → index.es-CUjDCkXD.js} +2428 -1558
- package/dist/_chunks/{index.es-Z3Hu-QIb.js.map → index.es-CUjDCkXD.js.map} +1 -1
- package/dist/_chunks/{schemas-Bp3a8tYV.js → schemas-aPiXCaCc.js} +1309 -945
- package/dist/_chunks/schemas-aPiXCaCc.js.map +1 -0
- package/dist/ai-elements.es.js +4746 -3352
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotFeedbackForm.js +1 -1
- package/dist-vue/PkChatbotFilePreview.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Media-Bic_vfSX.js → Media-CXQSoKqt.js} +3 -3
- package/dist-vue/_chunks/{Media-Bic_vfSX.js.map → Media-CXQSoKqt.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbot-DAzGc7al.js +190 -0
- package/dist-vue/_chunks/{PkChatbot-D5_ytfqS.js.map → PkChatbot-DAzGc7al.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-CUnS-WyR.js → PkChatbotFeedbackForm-DvUzirPP.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-CUnS-WyR.js.map → PkChatbotFeedbackForm-DvUzirPP.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFilePreview-JSpi3pmN.js → PkChatbotFilePreview-DHzuGtz5.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotFilePreview-JSpi3pmN.js.map → PkChatbotFilePreview-DHzuGtz5.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-ODPhsqZt.js → PkChatbotInput-C5QSmt21.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotInput-ODPhsqZt.js.map → PkChatbotInput-C5QSmt21.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-CMLqkhmb.js → PkChatbotMessages-dsjB0-26.js} +16 -16
- package/dist-vue/_chunks/PkChatbotMessages-dsjB0-26.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-wLCypxNG.js → PkChatbotViewChat-CjoezIyz.js} +9 -9
- package/dist-vue/_chunks/{PkChatbotViewChat-wLCypxNG.js.map → PkChatbotViewChat-CjoezIyz.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotViewConversations-DSQu6vY1.js +163 -0
- package/dist-vue/_chunks/PkChatbotViewConversations-DSQu6vY1.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewProfile-CXmmVXrD.js → PkChatbotViewProfile-BJJiaG9H.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-CXmmVXrD.js.map → PkChatbotViewProfile-BJJiaG9H.js.map} +1 -1
- package/dist-vue/_chunks/{PkRelativeTime-jP41qAJ5.js → PkRelativeTime-WZ2aPcp_.js} +1 -1
- package/dist-vue/_chunks/{PkRelativeTime-jP41qAJ5.js.map → PkRelativeTime-WZ2aPcp_.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-CtiMH6FD.js → PkStreamingMarkdown-BAhC3uGK.js} +20 -20
- package/dist-vue/_chunks/PkStreamingMarkdown-BAhC3uGK.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowArtifact-C2DgB_1z.js → PkToolShowArtifact-RzrDPcEQ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-C2DgB_1z.js.map → PkToolShowArtifact-RzrDPcEQ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-BzzbXuhh.js → PkToolShowContactForm-r_GgO-ZX.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowContactForm-BzzbXuhh.js.map → PkToolShowContactForm-r_GgO-ZX.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-DQXrJYop.js → PkToolShowImageGallery-B7Bt6ZGv.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-DQXrJYop.js.map → PkToolShowImageGallery-B7Bt6ZGv.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowLocation-McDIqI8y.js → PkToolShowLocation-DteWf0Cs.js} +1 -1
- package/dist-vue/_chunks/{PkToolShowLocation-McDIqI8y.js.map → PkToolShowLocation-DteWf0Cs.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowMultipleChoice-DW3m6VbJ.js → PkToolShowMultipleChoice-DZXfWtQp.js} +1 -1
- package/dist-vue/_chunks/{PkToolShowMultipleChoice-DW3m6VbJ.js.map → PkToolShowMultipleChoice-DZXfWtQp.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-BDSJs7bn.js → PkToolShowProductList-CtqWK0x4.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-BDSJs7bn.js.map → PkToolShowProductList-CtqWK0x4.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-D5cBZxwQ.js → PkToolShowSources-DK2DCvU3.js} +6 -5
- package/dist-vue/_chunks/PkToolShowSources-DK2DCvU3.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Dm3BTWYg.js → PkToolShowSuggestedReply-30m9yWDL.js} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Dm3BTWYg.js.map → PkToolShowSuggestedReply-30m9yWDL.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-DnYVhLVU.js → PkToolShowWebPages-DZIdrdWs.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-DnYVhLVU.js.map → PkToolShowWebPages-DZIdrdWs.js.map} +1 -1
- package/dist-vue/_chunks/{PkUrl-CH4pWBR8.js → PkUrl-CGbSBfuP.js} +1 -1
- package/dist-vue/_chunks/{PkUrl-CH4pWBR8.js.map → PkUrl-CGbSBfuP.js.map} +1 -1
- package/dist-vue/_chunks/{ZodError-Ca0wCsGp.js → ZodError-C_est8SY.js} +2 -2
- package/dist-vue/_chunks/{ZodError-Ca0wCsGp.js.map → ZodError-C_est8SY.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-2ynLWELM.js → createChatbotApiClient-f86KwRcq.js} +141 -119
- package/dist-vue/_chunks/createChatbotApiClient-f86KwRcq.js.map +1 -0
- package/dist-vue/_chunks/{dist-Bs6dYy7x.js → dist-21vPGg1O.js} +3 -3
- package/dist-vue/_chunks/{dist-Bs6dYy7x.js.map → dist-21vPGg1O.js.map} +1 -1
- package/dist-vue/_chunks/{dist-Bb1zRSg4.js → dist-BGXTbYew2.js} +4 -4
- package/dist-vue/_chunks/dist-BGXTbYew2.js.map +1 -0
- package/dist-vue/_chunks/{dist-BrlD3co0.js → dist-BL9cumqH.js} +2 -2
- package/dist-vue/_chunks/{dist-BrlD3co0.js.map → dist-BL9cumqH.js.map} +1 -1
- package/dist-vue/_chunks/{dist-B9Pw4_a5.js → dist-BU-VgsYM.js} +3 -3
- package/dist-vue/_chunks/{dist-B9Pw4_a5.js.map → dist-BU-VgsYM.js.map} +1 -1
- package/dist-vue/_chunks/{dist-D-tjAaHK.js → dist-BU5m1pTR.js} +3 -3
- package/dist-vue/_chunks/{dist-D-tjAaHK.js.map → dist-BU5m1pTR.js.map} +1 -1
- package/dist-vue/_chunks/{dist-Dn0cKZ5Q.js → dist-BbP2I_Or.js} +2 -2
- package/dist-vue/_chunks/{dist-Dn0cKZ5Q.js.map → dist-BbP2I_Or.js.map} +1 -1
- package/dist-vue/_chunks/{dist-Cvsv0YEw.js → dist-BvmTki6w.js} +3 -3
- package/dist-vue/_chunks/{dist-Cvsv0YEw.js.map → dist-BvmTki6w.js.map} +1 -1
- package/dist-vue/_chunks/{dist-QzbLuLIV.js → dist-C3dPzENq.js} +3 -3
- package/dist-vue/_chunks/{dist-QzbLuLIV.js.map → dist-C3dPzENq.js.map} +1 -1
- package/dist-vue/_chunks/{dist-BMWOJZqC.js → dist-C6AWJq9a.js} +2 -2
- package/dist-vue/_chunks/{dist-BMWOJZqC.js.map → dist-C6AWJq9a.js.map} +1 -1
- package/dist-vue/_chunks/{dist-BQCdUoYc.js → dist-CGNGkvWf.js} +4 -4
- package/dist-vue/_chunks/{dist-BQCdUoYc.js.map → dist-CGNGkvWf.js.map} +1 -1
- package/dist-vue/_chunks/{dist-JOgG1zY3.js → dist-CIN_Avbm.js} +1 -1
- package/dist-vue/_chunks/{dist-JOgG1zY3.js.map → dist-CIN_Avbm.js.map} +1 -1
- package/dist-vue/_chunks/{dist-NKG-Bt-Q.js → dist-CePpgudw.js} +3 -3
- package/dist-vue/_chunks/{dist-NKG-Bt-Q.js.map → dist-CePpgudw.js.map} +1 -1
- package/dist-vue/_chunks/{dist-C13mHkC-.js → dist-CtMo7ig_.js} +2 -2
- package/dist-vue/_chunks/{dist-C13mHkC-.js.map → dist-CtMo7ig_.js.map} +1 -1
- package/dist-vue/_chunks/{dist-DucfoJQX.js → dist-CwG072cD.js} +3 -3
- package/dist-vue/_chunks/{dist-DucfoJQX.js.map → dist-CwG072cD.js.map} +1 -1
- package/dist-vue/_chunks/{dist-_4yQQX_L.js → dist-DFvVVU0-.js} +2 -2
- package/dist-vue/_chunks/{dist-_4yQQX_L.js.map → dist-DFvVVU0-.js.map} +1 -1
- package/dist-vue/_chunks/{dist-C_tRbeXQ.js → dist-DGz57kzK.js} +2 -2
- package/dist-vue/_chunks/{dist-C_tRbeXQ.js.map → dist-DGz57kzK.js.map} +1 -1
- package/dist-vue/_chunks/{dist-C2tC3pDh.js → dist-DT30Xa-D.js} +2 -2
- package/dist-vue/_chunks/{dist-C2tC3pDh.js.map → dist-DT30Xa-D.js.map} +1 -1
- package/dist-vue/_chunks/{dist-DNn7FqmI.js → dist-DoRhRpjL.js} +2 -2
- package/dist-vue/_chunks/{dist-DNn7FqmI.js.map → dist-DoRhRpjL.js.map} +1 -1
- package/dist-vue/_chunks/{dist-CQmgfFIN.js → dist-GnhLE5-A.js} +4 -4
- package/dist-vue/_chunks/{dist-CQmgfFIN.js.map → dist-GnhLE5-A.js.map} +1 -1
- package/dist-vue/_chunks/{dist-1ToEz3Zq.js → dist-QzWOn2Kx.js} +3 -3
- package/dist-vue/_chunks/{dist-1ToEz3Zq.js.map → dist-QzWOn2Kx.js.map} +1 -1
- package/dist-vue/_chunks/{dist-e9UFeG14.js → dist-uYEYs0EJ.js} +2 -2
- package/dist-vue/_chunks/{dist-e9UFeG14.js.map → dist-uYEYs0EJ.js.map} +1 -1
- package/dist-vue/_chunks/{dist-BpT8aqtS.js → dist-ukeBjdwq.js} +4 -4
- package/dist-vue/_chunks/{dist-BpT8aqtS.js.map → dist-ukeBjdwq.js.map} +1 -1
- package/dist-vue/_chunks/{dist-BHTSdHeX.js → dist-wLB8N32T.js} +3 -3
- package/dist-vue/_chunks/{dist-BHTSdHeX.js.map → dist-wLB8N32T.js.map} +1 -1
- package/dist-vue/_chunks/{index.es-BnOT0fHY.js → index.es-_14zrNZB.js} +4 -4
- package/dist-vue/_chunks/{index.es-BnOT0fHY.js.map → index.es-_14zrNZB.js.map} +1 -1
- package/dist-vue/_chunks/{schemas-sa2dDEGb.js → schemas-Clx4oKCB.js} +1309 -945
- package/dist-vue/_chunks/schemas-Clx4oKCB.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-Im8Xjwte.js → useChatbotStore-CJlkoNn7.js} +756 -679
- package/dist-vue/_chunks/useChatbotStore-CJlkoNn7.js.map +1 -0
- package/dist-vue/_chunks/{useLightbox-BiZUwsmB.js → useLightbox-1sB7fmFb.js} +1 -1
- package/dist-vue/_chunks/{useLightbox-BiZUwsmB.js.map → useLightbox-1sB7fmFb.js.map} +1 -1
- package/dist-vue/_chunks/{utils-DO7emdsn.js → utils-BegUBK7s.js} +1 -1
- package/dist-vue/_chunks/{utils-DO7emdsn.js.map → utils-BegUBK7s.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +9 -7
- package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +8 -8
- package/dist-vue/apps/web-component/src/lib.d.ts +29 -0
- package/dist-vue/apps/web-component/src/main.d.ts +0 -0
- package/dist-vue/apps/web-component/src/modules/applicationInsights.d.ts +38 -0
- package/dist-vue/composables.js +3 -3
- package/dist-vue/index.js +3680 -3664
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +56 -20
- package/dist-vue/packages/auth/src/add-member-to-organization.d.ts +5 -0
- package/dist-vue/packages/auth/src/anonymous-reauth-plugin.d.ts +11 -0
- package/dist-vue/packages/auth/src/external-auth-plugin.d.ts +2 -0
- package/dist-vue/packages/auth/src/index.d.ts +3477 -8
- package/dist-vue/packages/auth/src/media-helpers.d.ts +13 -0
- package/dist-vue/packages/auth/src/organization-auto-join.d.ts +1 -0
- package/dist-vue/packages/components/src/PkEditorMarkdown.d.ts +1 -1
- package/dist-vue/packages/components/src/PkEditorPrompt.d.ts +2 -0
- package/dist-vue/packages/components/src/PkEditorRepeater.d.ts +2 -2
- package/dist-vue/packages/components/src/PkEditorWyswyg.d.ts +1 -1
- package/dist-vue/packages/components/src/PkFieldset.d.ts +3 -3
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -3
- package/dist-vue/packages/components/src/chat/PkEditorChannels.d.ts +16 -0
- package/dist-vue/packages/components/src/composables/index.d.ts +3 -0
- package/dist-vue/packages/components/src/composables/useChatbotError.d.ts +11 -11
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +2 -0
- package/dist-vue/packages/composable/src/constants.d.ts +5 -0
- package/dist-vue/packages/composable/src/useDialog.d.ts +3 -3
- package/dist-vue/packages/composable/src/useSettingsStore.d.ts +4 -5
- package/dist-vue/packages/models/src/schema/Agent.d.ts +37 -27
- package/dist-vue/packages/models/src/schema/Chat.d.ts +6 -0
- package/dist-vue/packages/models/src/schema/Document.d.ts +2 -0
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +8 -6
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +13 -11
- package/dist-vue/style.css +1 -1
- package/package.json +3 -3
- package/dist/_chunks/PkStreamingMarkdown-orhL2kzD.js.map +0 -1
- package/dist/_chunks/PkToolShowContactForm-SmOSbCsp.js +0 -1103
- package/dist/_chunks/PkToolShowContactForm-SmOSbCsp.js.map +0 -1
- package/dist/_chunks/PkToolShowSources-B2rf94fU.js.map +0 -1
- package/dist/_chunks/dist-DtF6poRc.js.map +0 -1
- package/dist/_chunks/schemas-Bp3a8tYV.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-D5_ytfqS.js +0 -190
- package/dist-vue/_chunks/PkChatbotMessages-CMLqkhmb.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewConversations-B5qBiqo4.js +0 -40
- package/dist-vue/_chunks/PkChatbotViewConversations-B5qBiqo4.js.map +0 -1
- package/dist-vue/_chunks/PkStreamingMarkdown-CtiMH6FD.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowSources-D5cBZxwQ.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-2ynLWELM.js.map +0 -1
- package/dist-vue/_chunks/dist-Bb1zRSg4.js.map +0 -1
- package/dist-vue/_chunks/schemas-sa2dDEGb.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-Im8Xjwte.js.map +0 -1
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +0 -6
|
@@ -0,0 +1,1658 @@
|
|
|
1
|
+
import { r as e } from "./rolldown-runtime-DHui2AQb.js";
|
|
2
|
+
import { $ as t, B as n, D as r, E as i, F as a, Gt as o, I as s, L as c, Q as l, T as u, U as d, Z as f, _ as p, _t as m, dt as h, ft as g, gt as _, ht as v, it as y, j as b, k as x, lt as S, m as C, mt as w, n as T, pt as E, q as D, rt as O, st as k, tt as A, v as j, vt as M, w as N, x as P, yt as F, z as I } from "./vue.runtime.esm-bundler-BmggS4HU.js";
|
|
3
|
+
import { n as ee } from "./vue-i18n-KvYvoek4.js";
|
|
4
|
+
import { n as te, t as L } from "./dot-prop-ByInxMX6.js";
|
|
5
|
+
import { c as ne, o as re } from "./index.es-CUjDCkXD.js";
|
|
6
|
+
import { D as ie, E as ae, O as oe, T as se, l as ce, m as le, v as ue } from "./schemas-aPiXCaCc.js";
|
|
7
|
+
import { f as de } from "./src-C_wl-KYN.js";
|
|
8
|
+
import { h as fe, m as pe } from "./dist-BTnzL-m0.js";
|
|
9
|
+
import { t as me } from "./PkStreamingMarkdown-rIdQh5_D.js";
|
|
10
|
+
//#region ../../node_modules/.pnpm/@vueuse+shared@14.2.1_vue@3.5.33_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
|
|
11
|
+
function he(e, t) {
|
|
12
|
+
return O() ? (S(e, t), !0) : !1;
|
|
13
|
+
}
|
|
14
|
+
var R = typeof window < "u" && typeof document < "u";
|
|
15
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
16
|
+
var ge = (e) => e !== void 0, _e = (e) => e != null, ve = Object.prototype.toString, ye = (e) => ve.call(e) === "[object Object]", z = () => {}, be = /* @__PURE__ */ xe();
|
|
17
|
+
function xe() {
|
|
18
|
+
var e, t;
|
|
19
|
+
return R && !!(!((e = window) == null || (e = e.navigator) == null) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) == null || (t = t.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
|
|
20
|
+
}
|
|
21
|
+
function Se(...e) {
|
|
22
|
+
if (e.length !== 1) return _(...e);
|
|
23
|
+
let t = e[0];
|
|
24
|
+
return typeof t == "function" ? h(A(() => ({
|
|
25
|
+
get: t,
|
|
26
|
+
set: z
|
|
27
|
+
}))) : g(t);
|
|
28
|
+
}
|
|
29
|
+
function Ce(e, t) {
|
|
30
|
+
function n(...n) {
|
|
31
|
+
return new Promise((r, i) => {
|
|
32
|
+
Promise.resolve(e(() => t.apply(this, n), {
|
|
33
|
+
fn: t,
|
|
34
|
+
thisArg: this,
|
|
35
|
+
args: n
|
|
36
|
+
})).then(r).catch(i);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return n;
|
|
40
|
+
}
|
|
41
|
+
var we = (e) => e();
|
|
42
|
+
function Te(e, t = {}) {
|
|
43
|
+
let n, r, i = z, a = (e) => {
|
|
44
|
+
clearTimeout(e), i(), i = z;
|
|
45
|
+
}, o;
|
|
46
|
+
return (s) => {
|
|
47
|
+
let c = M(e), l = M(t.maxWait);
|
|
48
|
+
return n && a(n), c <= 0 || l !== void 0 && l <= 0 ? (r &&= (a(r), void 0), Promise.resolve(s())) : new Promise((e, u) => {
|
|
49
|
+
i = t.rejectOnCancel ? u : e, o = s, l && !r && (r = setTimeout(() => {
|
|
50
|
+
n && a(n), r = void 0, e(o());
|
|
51
|
+
}, l)), n = setTimeout(() => {
|
|
52
|
+
r && a(r), r = void 0, e(s());
|
|
53
|
+
}, c);
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function Ee(e = we, t = {}) {
|
|
58
|
+
let { initialState: n = "active" } = t, r = Se(n === "active");
|
|
59
|
+
function i() {
|
|
60
|
+
r.value = !1;
|
|
61
|
+
}
|
|
62
|
+
function a() {
|
|
63
|
+
r.value = !0;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
isActive: h(r),
|
|
67
|
+
pause: i,
|
|
68
|
+
resume: a,
|
|
69
|
+
eventFilter: (...t) => {
|
|
70
|
+
r.value && e(...t);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function B(e) {
|
|
75
|
+
return Array.isArray(e) ? e : [e];
|
|
76
|
+
}
|
|
77
|
+
function De(e) {
|
|
78
|
+
return e || r();
|
|
79
|
+
}
|
|
80
|
+
function Oe(e, t = 200, n = {}) {
|
|
81
|
+
return Ce(Te(t, n), e);
|
|
82
|
+
}
|
|
83
|
+
function ke(e, t = 200, n = {}) {
|
|
84
|
+
let r = g(M(e)), i = Oe(() => {
|
|
85
|
+
r.value = e.value;
|
|
86
|
+
}, t, n);
|
|
87
|
+
return f(e, () => i()), E(r);
|
|
88
|
+
}
|
|
89
|
+
function Ae(e, t, n = {}) {
|
|
90
|
+
let { eventFilter: r = we, ...i } = n;
|
|
91
|
+
return f(e, Ce(r, t), i);
|
|
92
|
+
}
|
|
93
|
+
function je(e, t, n = {}) {
|
|
94
|
+
let { eventFilter: r, initialState: i = "active", ...a } = n, { eventFilter: o, pause: s, resume: c, isActive: l } = Ee(r, { initialState: i });
|
|
95
|
+
return {
|
|
96
|
+
stop: Ae(e, t, {
|
|
97
|
+
...a,
|
|
98
|
+
eventFilter: o
|
|
99
|
+
}),
|
|
100
|
+
pause: s,
|
|
101
|
+
resume: c,
|
|
102
|
+
isActive: l
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
function Me(e, t = !0, n) {
|
|
106
|
+
De(n) ? c(e, n) : t ? e() : a(e);
|
|
107
|
+
}
|
|
108
|
+
function Ne(e, t, n) {
|
|
109
|
+
return f(e, t, {
|
|
110
|
+
...n,
|
|
111
|
+
immediate: !0
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
function Pe(e, t, n) {
|
|
115
|
+
return f(e, t, {
|
|
116
|
+
...n,
|
|
117
|
+
once: !0
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region ../../node_modules/.pnpm/@vueuse+core@14.2.1_vue@3.5.33_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
122
|
+
function Fe(e, t, n) {
|
|
123
|
+
let r;
|
|
124
|
+
r = k(n) ? { evaluating: n } : n || {};
|
|
125
|
+
let { lazy: i = !1, flush: a = "sync", evaluating: o = void 0, shallow: s = !0, onError: c = globalThis.reportError ?? z } = r, u = w(!i), d = s ? w(t) : g(t), f = 0;
|
|
126
|
+
return l(async (t) => {
|
|
127
|
+
if (!u.value) return;
|
|
128
|
+
f++;
|
|
129
|
+
let n = f, r = !1;
|
|
130
|
+
o && Promise.resolve().then(() => {
|
|
131
|
+
o.value = !0;
|
|
132
|
+
});
|
|
133
|
+
try {
|
|
134
|
+
let i = await e((e) => {
|
|
135
|
+
t(() => {
|
|
136
|
+
o && (o.value = !1), r || e();
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
n === f && (d.value = i);
|
|
140
|
+
} catch (e) {
|
|
141
|
+
c(e);
|
|
142
|
+
} finally {
|
|
143
|
+
o && n === f && (o.value = !1), r = !0;
|
|
144
|
+
}
|
|
145
|
+
}, { flush: a }), i ? p(() => (u.value = !0, d.value)) : d;
|
|
146
|
+
}
|
|
147
|
+
var V = R ? window : void 0;
|
|
148
|
+
R && window.document, R && window.navigator, R && window.location;
|
|
149
|
+
function H(e) {
|
|
150
|
+
let t = M(e);
|
|
151
|
+
return t?.$el ?? t;
|
|
152
|
+
}
|
|
153
|
+
function U(...e) {
|
|
154
|
+
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = p(() => {
|
|
155
|
+
let t = B(M(e[0])).filter((e) => e != null);
|
|
156
|
+
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
157
|
+
});
|
|
158
|
+
return Ne(() => [
|
|
159
|
+
n.value?.map((e) => H(e)) ?? [V].filter((e) => e != null),
|
|
160
|
+
B(M(n.value ? e[1] : e[0])),
|
|
161
|
+
B(F(n.value ? e[2] : e[1])),
|
|
162
|
+
M(n.value ? e[3] : e[2])
|
|
163
|
+
], ([e, n, r, i], a, o) => {
|
|
164
|
+
if (!e?.length || !n?.length || !r?.length) return;
|
|
165
|
+
let s = ye(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
166
|
+
o(() => {
|
|
167
|
+
c.forEach((e) => e());
|
|
168
|
+
});
|
|
169
|
+
}, { flush: "post" });
|
|
170
|
+
}
|
|
171
|
+
var Ie = !1;
|
|
172
|
+
function Le(e, t, n = {}) {
|
|
173
|
+
let { window: r = V, ignore: i = [], capture: a = !0, detectIframe: o = !1, controls: s = !1 } = n;
|
|
174
|
+
if (!r) return s ? {
|
|
175
|
+
stop: z,
|
|
176
|
+
cancel: z,
|
|
177
|
+
trigger: z
|
|
178
|
+
} : z;
|
|
179
|
+
if (be && !Ie) {
|
|
180
|
+
Ie = !0;
|
|
181
|
+
let e = { passive: !0 };
|
|
182
|
+
Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", z, e)), r.document.documentElement.addEventListener("click", z, e);
|
|
183
|
+
}
|
|
184
|
+
let c = !0, l = (e) => M(i).some((t) => {
|
|
185
|
+
if (typeof t == "string") return Array.from(r.document.querySelectorAll(t)).some((t) => t === e.target || e.composedPath().includes(t));
|
|
186
|
+
{
|
|
187
|
+
let n = H(t);
|
|
188
|
+
return n && (e.target === n || e.composedPath().includes(n));
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
function u(e) {
|
|
192
|
+
let t = M(e);
|
|
193
|
+
return t && t.$.subTree.shapeFlag === 16;
|
|
194
|
+
}
|
|
195
|
+
function d(e, t) {
|
|
196
|
+
let n = M(e), r = n.$.subTree && n.$.subTree.children;
|
|
197
|
+
return r == null || !Array.isArray(r) ? !1 : r.some((e) => e.el === t.target || t.composedPath().includes(e.el));
|
|
198
|
+
}
|
|
199
|
+
let f = (n) => {
|
|
200
|
+
let r = H(e);
|
|
201
|
+
if (n.target != null && !(!(r instanceof Element) && u(e) && d(e, n)) && !(!r || r === n.target || n.composedPath().includes(r))) {
|
|
202
|
+
if ("detail" in n && n.detail === 0 && (c = !l(n)), !c) {
|
|
203
|
+
c = !0;
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
t(n);
|
|
207
|
+
}
|
|
208
|
+
}, p = !1, m = [
|
|
209
|
+
U(r, "click", (e) => {
|
|
210
|
+
p || (p = !0, setTimeout(() => {
|
|
211
|
+
p = !1;
|
|
212
|
+
}, 0), f(e));
|
|
213
|
+
}, {
|
|
214
|
+
passive: !0,
|
|
215
|
+
capture: a
|
|
216
|
+
}),
|
|
217
|
+
U(r, "pointerdown", (t) => {
|
|
218
|
+
let n = H(e);
|
|
219
|
+
c = !l(t) && !!(n && !t.composedPath().includes(n));
|
|
220
|
+
}, { passive: !0 }),
|
|
221
|
+
o && U(r, "blur", (n) => {
|
|
222
|
+
setTimeout(() => {
|
|
223
|
+
let i = H(e);
|
|
224
|
+
r.document.activeElement?.tagName === "IFRAME" && !i?.contains(r.document.activeElement) && t(n);
|
|
225
|
+
}, 0);
|
|
226
|
+
}, { passive: !0 })
|
|
227
|
+
].filter(Boolean), h = () => m.forEach((e) => e());
|
|
228
|
+
return s ? {
|
|
229
|
+
stop: h,
|
|
230
|
+
cancel: () => {
|
|
231
|
+
c = !1;
|
|
232
|
+
},
|
|
233
|
+
trigger: (e) => {
|
|
234
|
+
c = !0, f(e), c = !1;
|
|
235
|
+
}
|
|
236
|
+
} : h;
|
|
237
|
+
}
|
|
238
|
+
function Re() {
|
|
239
|
+
let e = w(!1), t = r();
|
|
240
|
+
return t && c(() => {
|
|
241
|
+
e.value = !0;
|
|
242
|
+
}, t), e;
|
|
243
|
+
}
|
|
244
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
245
|
+
function ze(e) {
|
|
246
|
+
let t = Re();
|
|
247
|
+
return p(() => (t.value, !!e()));
|
|
248
|
+
}
|
|
249
|
+
function Be(e, t, n = {}) {
|
|
250
|
+
let { window: r = V, ...i } = n, a, o = /* @__PURE__ */ ze(() => r && "MutationObserver" in r), s = () => {
|
|
251
|
+
a &&= (a.disconnect(), void 0);
|
|
252
|
+
}, c = f(p(() => {
|
|
253
|
+
let t = B(M(e)).map(H).filter(_e);
|
|
254
|
+
return new Set(t);
|
|
255
|
+
}), (e) => {
|
|
256
|
+
s(), o.value && e.size && (a = new MutationObserver(t), e.forEach((e) => a.observe(e, i)));
|
|
257
|
+
}, {
|
|
258
|
+
immediate: !0,
|
|
259
|
+
flush: "post"
|
|
260
|
+
}), l = () => a?.takeRecords(), u = () => {
|
|
261
|
+
c(), s();
|
|
262
|
+
};
|
|
263
|
+
return he(u), {
|
|
264
|
+
isSupported: o,
|
|
265
|
+
stop: u,
|
|
266
|
+
takeRecords: l
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
function Ve(e, t, n = {}) {
|
|
270
|
+
let { window: r = V, document: i = r?.document, flush: a = "sync" } = n;
|
|
271
|
+
if (!r || !i) return z;
|
|
272
|
+
let o, s = (e) => {
|
|
273
|
+
o?.(), o = e;
|
|
274
|
+
}, c = l(() => {
|
|
275
|
+
let n = H(e);
|
|
276
|
+
if (n) {
|
|
277
|
+
let { stop: e } = Be(i, (e) => {
|
|
278
|
+
e.map((e) => [...e.removedNodes]).flat().some((e) => e === n || e.contains(n)) && t(e);
|
|
279
|
+
}, {
|
|
280
|
+
window: r,
|
|
281
|
+
childList: !0,
|
|
282
|
+
subtree: !0
|
|
283
|
+
});
|
|
284
|
+
s(e);
|
|
285
|
+
}
|
|
286
|
+
}, { flush: a }), u = () => {
|
|
287
|
+
c(), s();
|
|
288
|
+
};
|
|
289
|
+
return he(u), u;
|
|
290
|
+
}
|
|
291
|
+
function He(e) {
|
|
292
|
+
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
293
|
+
}
|
|
294
|
+
function Ue(...e) {
|
|
295
|
+
let t, n, r = {};
|
|
296
|
+
e.length === 3 ? (t = e[0], n = e[1], r = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, n = e[0], r = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);
|
|
297
|
+
let { target: i = V, eventName: a = "keydown", passive: o = !1, dedupe: s = !1 } = r, c = He(t);
|
|
298
|
+
return U(i, a, (e) => {
|
|
299
|
+
e.repeat && M(s) || c(e) && n(e);
|
|
300
|
+
}, o);
|
|
301
|
+
}
|
|
302
|
+
function We(e = {}) {
|
|
303
|
+
let { window: t = V, deep: n = !0, triggerOnRemoval: r = !1 } = e, i = e.document ?? t?.document, a = () => {
|
|
304
|
+
let e = i?.activeElement;
|
|
305
|
+
if (n) for (var t; e?.shadowRoot;) e = e == null || (t = e.shadowRoot) == null ? void 0 : t.activeElement;
|
|
306
|
+
return e;
|
|
307
|
+
}, o = w(), s = () => {
|
|
308
|
+
o.value = a();
|
|
309
|
+
};
|
|
310
|
+
if (t) {
|
|
311
|
+
let e = {
|
|
312
|
+
capture: !0,
|
|
313
|
+
passive: !0
|
|
314
|
+
};
|
|
315
|
+
U(t, "blur", (e) => {
|
|
316
|
+
e.relatedTarget === null && s();
|
|
317
|
+
}, e), U(t, "focus", s, e);
|
|
318
|
+
}
|
|
319
|
+
return r && Ve(o, s, { document: i }), s(), o;
|
|
320
|
+
}
|
|
321
|
+
function Ge(e) {
|
|
322
|
+
return JSON.parse(JSON.stringify(e));
|
|
323
|
+
}
|
|
324
|
+
var W = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, G = "__vueuse_ssr_handlers__", Ke = /* @__PURE__ */ qe();
|
|
325
|
+
function qe() {
|
|
326
|
+
return G in W || (W[G] = W[G] || {}), W[G];
|
|
327
|
+
}
|
|
328
|
+
function Je(e, t) {
|
|
329
|
+
return Ke[e] || t;
|
|
330
|
+
}
|
|
331
|
+
function Ye(e) {
|
|
332
|
+
return e == null ? "any" : e instanceof Set ? "set" : e instanceof Map ? "map" : e instanceof Date ? "date" : typeof e == "boolean" ? "boolean" : typeof e == "string" ? "string" : typeof e == "object" ? "object" : Number.isNaN(e) ? "any" : "number";
|
|
333
|
+
}
|
|
334
|
+
var Xe = {
|
|
335
|
+
boolean: {
|
|
336
|
+
read: (e) => e === "true",
|
|
337
|
+
write: (e) => String(e)
|
|
338
|
+
},
|
|
339
|
+
object: {
|
|
340
|
+
read: (e) => JSON.parse(e),
|
|
341
|
+
write: (e) => JSON.stringify(e)
|
|
342
|
+
},
|
|
343
|
+
number: {
|
|
344
|
+
read: (e) => Number.parseFloat(e),
|
|
345
|
+
write: (e) => String(e)
|
|
346
|
+
},
|
|
347
|
+
any: {
|
|
348
|
+
read: (e) => e,
|
|
349
|
+
write: (e) => String(e)
|
|
350
|
+
},
|
|
351
|
+
string: {
|
|
352
|
+
read: (e) => e,
|
|
353
|
+
write: (e) => String(e)
|
|
354
|
+
},
|
|
355
|
+
map: {
|
|
356
|
+
read: (e) => new Map(JSON.parse(e)),
|
|
357
|
+
write: (e) => JSON.stringify(Array.from(e.entries()))
|
|
358
|
+
},
|
|
359
|
+
set: {
|
|
360
|
+
read: (e) => new Set(JSON.parse(e)),
|
|
361
|
+
write: (e) => JSON.stringify(Array.from(e))
|
|
362
|
+
},
|
|
363
|
+
date: {
|
|
364
|
+
read: (e) => new Date(e),
|
|
365
|
+
write: (e) => e.toISOString()
|
|
366
|
+
}
|
|
367
|
+
}, Ze = "vueuse-storage";
|
|
368
|
+
function Qe(e, t, n, r = {}) {
|
|
369
|
+
let { flush: i = "pre", deep: o = !0, listenToStorageChanges: s = !0, writeDefaults: c = !0, mergeDefaults: l = !1, shallow: u, window: d = V, eventFilter: m, onError: h = (e) => {
|
|
370
|
+
console.error(e);
|
|
371
|
+
}, initOnMounted: _ } = r, v = (u ? w : g)(typeof t == "function" ? t() : t), y = p(() => M(e));
|
|
372
|
+
if (!n) try {
|
|
373
|
+
n = Je("getDefaultStorage", () => V?.localStorage)();
|
|
374
|
+
} catch (e) {
|
|
375
|
+
h(e);
|
|
376
|
+
}
|
|
377
|
+
if (!n) return v;
|
|
378
|
+
let b = M(t), x = Ye(b), S = r.serializer ?? Xe[x], { pause: C, resume: T } = je(v, (e) => O(e), {
|
|
379
|
+
flush: i,
|
|
380
|
+
deep: o,
|
|
381
|
+
eventFilter: m
|
|
382
|
+
});
|
|
383
|
+
f(y, () => A(), { flush: i });
|
|
384
|
+
let E = !1;
|
|
385
|
+
d && s && (n instanceof Storage ? U(d, "storage", (e) => {
|
|
386
|
+
_ && !E || A(e);
|
|
387
|
+
}, { passive: !0 }) : U(d, Ze, (e) => {
|
|
388
|
+
_ && !E || j(e);
|
|
389
|
+
})), _ ? Me(() => {
|
|
390
|
+
E = !0, A();
|
|
391
|
+
}) : A();
|
|
392
|
+
function D(e, t) {
|
|
393
|
+
if (d) {
|
|
394
|
+
let r = {
|
|
395
|
+
key: y.value,
|
|
396
|
+
oldValue: e,
|
|
397
|
+
newValue: t,
|
|
398
|
+
storageArea: n
|
|
399
|
+
};
|
|
400
|
+
d.dispatchEvent(n instanceof Storage ? new StorageEvent("storage", r) : new CustomEvent(Ze, { detail: r }));
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
function O(e) {
|
|
404
|
+
try {
|
|
405
|
+
let t = n.getItem(y.value);
|
|
406
|
+
if (e == null) D(t, null), n.removeItem(y.value);
|
|
407
|
+
else {
|
|
408
|
+
let r = S.write(e);
|
|
409
|
+
t !== r && (n.setItem(y.value, r), D(t, r));
|
|
410
|
+
}
|
|
411
|
+
} catch (e) {
|
|
412
|
+
h(e);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
function k(e) {
|
|
416
|
+
let t = e ? e.newValue : n.getItem(y.value);
|
|
417
|
+
if (t == null) return c && b != null && n.setItem(y.value, S.write(b)), b;
|
|
418
|
+
if (!e && l) {
|
|
419
|
+
let e = S.read(t);
|
|
420
|
+
return typeof l == "function" ? l(e, b) : x === "object" && !Array.isArray(e) ? {
|
|
421
|
+
...b,
|
|
422
|
+
...e
|
|
423
|
+
} : e;
|
|
424
|
+
} else if (typeof t != "string") return t;
|
|
425
|
+
else return S.read(t);
|
|
426
|
+
}
|
|
427
|
+
function A(e) {
|
|
428
|
+
if (!(e && e.storageArea !== n)) {
|
|
429
|
+
if (e && e.key == null) {
|
|
430
|
+
v.value = b;
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
if (!(e && e.key !== y.value)) {
|
|
434
|
+
C();
|
|
435
|
+
try {
|
|
436
|
+
let t = S.write(v.value);
|
|
437
|
+
(e === void 0 || e?.newValue !== t) && (v.value = k(e));
|
|
438
|
+
} catch (e) {
|
|
439
|
+
h(e);
|
|
440
|
+
} finally {
|
|
441
|
+
e ? a(T) : T();
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
function j(e) {
|
|
447
|
+
A(e.detail);
|
|
448
|
+
}
|
|
449
|
+
return v;
|
|
450
|
+
}
|
|
451
|
+
function $e(e, t = {}) {
|
|
452
|
+
let { delayEnter: n = 0, delayLeave: r = 0, triggerOnRemoval: i = !1, window: a = V } = t, o = w(!1), s, c = (e) => {
|
|
453
|
+
let t = e ? n : r;
|
|
454
|
+
s &&= (clearTimeout(s), void 0), t ? s = setTimeout(() => o.value = e, t) : o.value = e;
|
|
455
|
+
};
|
|
456
|
+
return a ? (U(e, "mouseenter", () => c(!0), { passive: !0 }), U(e, "mouseleave", () => c(!1), { passive: !0 }), i && Ve(p(() => H(e)), () => c(!1)), o) : o;
|
|
457
|
+
}
|
|
458
|
+
function et(e, t, n = {}) {
|
|
459
|
+
let { root: r, rootMargin: i, threshold: a = 0, window: o = V, immediate: s = !0 } = n, c = /* @__PURE__ */ ze(() => o && "IntersectionObserver" in o), l = p(() => B(M(e)).map(H).filter(_e)), u = z, d = w(s), m = c.value ? f(() => [
|
|
460
|
+
l.value,
|
|
461
|
+
H(r),
|
|
462
|
+
M(i),
|
|
463
|
+
d.value
|
|
464
|
+
], ([e, n, r]) => {
|
|
465
|
+
if (u(), !d.value || !e.length) return;
|
|
466
|
+
let i = new IntersectionObserver(t, {
|
|
467
|
+
root: H(n),
|
|
468
|
+
rootMargin: r,
|
|
469
|
+
threshold: a
|
|
470
|
+
});
|
|
471
|
+
e.forEach((e) => e && i.observe(e)), u = () => {
|
|
472
|
+
i.disconnect(), u = z;
|
|
473
|
+
};
|
|
474
|
+
}, {
|
|
475
|
+
immediate: s,
|
|
476
|
+
flush: "post"
|
|
477
|
+
}) : z, h = () => {
|
|
478
|
+
u(), m(), d.value = !1;
|
|
479
|
+
};
|
|
480
|
+
return he(h), {
|
|
481
|
+
isSupported: c,
|
|
482
|
+
isActive: d,
|
|
483
|
+
pause() {
|
|
484
|
+
u(), d.value = !1;
|
|
485
|
+
},
|
|
486
|
+
resume() {
|
|
487
|
+
d.value = !0;
|
|
488
|
+
},
|
|
489
|
+
stop: h
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
function tt(e, t = {}) {
|
|
493
|
+
let { window: n = V, scrollTarget: r, threshold: i = 0, rootMargin: a, once: o = !1, initialValue: s = !1 } = t, c = w(s), { stop: l } = et(e, (e) => {
|
|
494
|
+
let t = c.value, n = 0;
|
|
495
|
+
for (let r of e) r.time >= n && (n = r.time, t = r.isIntersecting);
|
|
496
|
+
c.value = t, o && Pe(c, () => {
|
|
497
|
+
l();
|
|
498
|
+
});
|
|
499
|
+
}, {
|
|
500
|
+
root: r,
|
|
501
|
+
window: n,
|
|
502
|
+
threshold: i,
|
|
503
|
+
rootMargin: a
|
|
504
|
+
});
|
|
505
|
+
return c;
|
|
506
|
+
}
|
|
507
|
+
function nt(e, t = {}) {
|
|
508
|
+
let { initialValue: n = !1, focusVisible: r = !1, preventScroll: i = !1 } = t, a = w(!1), o = p(() => H(e)), s = { passive: !0 };
|
|
509
|
+
U(o, "focus", (e) => {
|
|
510
|
+
var t;
|
|
511
|
+
(!r || (t = e.target).matches?.call(t, ":focus-visible")) && (a.value = !0);
|
|
512
|
+
}, s), U(o, "blur", () => a.value = !1, s);
|
|
513
|
+
let c = p({
|
|
514
|
+
get: () => a.value,
|
|
515
|
+
set(e) {
|
|
516
|
+
var t, n;
|
|
517
|
+
!e && a.value ? (t = o.value) == null || t.blur() : e && !a.value && ((n = o.value) == null || n.focus({ preventScroll: i }));
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
return f(o, () => {
|
|
521
|
+
c.value = n;
|
|
522
|
+
}, {
|
|
523
|
+
immediate: !0,
|
|
524
|
+
flush: "post"
|
|
525
|
+
}), { focused: c };
|
|
526
|
+
}
|
|
527
|
+
var rt = "focusin", it = "focusout", at = ":focus-within";
|
|
528
|
+
function ot(e, t = {}) {
|
|
529
|
+
let { window: n = V } = t, r = p(() => H(e)), i = w(!1), a = p(() => i.value), o = We(t);
|
|
530
|
+
if (!n || !o.value) return { focused: a };
|
|
531
|
+
let s = { passive: !0 };
|
|
532
|
+
return U(r, rt, () => i.value = !0, s), U(r, it, () => {
|
|
533
|
+
var e, t;
|
|
534
|
+
return i.value = ((e = r.value) == null || (t = e.matches) == null ? void 0 : t.call(e, at)) ?? !1;
|
|
535
|
+
}, s), { focused: a };
|
|
536
|
+
}
|
|
537
|
+
function st(e, t, n = {}) {
|
|
538
|
+
let { window: r = V } = n;
|
|
539
|
+
return Qe(e, t, r?.localStorage, n);
|
|
540
|
+
}
|
|
541
|
+
function ct(e, t, n, i = {}) {
|
|
542
|
+
var o, s;
|
|
543
|
+
let { clone: c = !1, passive: l = !1, eventName: u, deep: d = !1, defaultValue: m, shouldEmit: h } = i, _ = r(), v = n || _?.emit || (_ == null || (o = _.$emit) == null ? void 0 : o.bind(_)) || (_ == null || (s = _.proxy) == null || (s = s.$emit) == null ? void 0 : s.bind(_?.proxy)), y = u;
|
|
544
|
+
t ||= "modelValue", y ||= `update:${t.toString()}`;
|
|
545
|
+
let b = (e) => c ? typeof c == "function" ? c(e) : Ge(e) : e, x = () => ge(e[t]) ? b(e[t]) : m, S = (e) => {
|
|
546
|
+
h ? h(e) && v(y, e) : v(y, e);
|
|
547
|
+
};
|
|
548
|
+
if (l) {
|
|
549
|
+
let n = g(x()), r = !1;
|
|
550
|
+
return f(() => e[t], (e) => {
|
|
551
|
+
r || (r = !0, n.value = b(e), a(() => r = !1));
|
|
552
|
+
}), f(n, (n) => {
|
|
553
|
+
!r && (n !== e[t] || d) && S(n);
|
|
554
|
+
}, { deep: d }), n;
|
|
555
|
+
} else return p({
|
|
556
|
+
get() {
|
|
557
|
+
return x();
|
|
558
|
+
},
|
|
559
|
+
set(e) {
|
|
560
|
+
S(e);
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
//#endregion
|
|
565
|
+
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v3/helpers/util.js
|
|
566
|
+
var K;
|
|
567
|
+
(function(e) {
|
|
568
|
+
e.assertEqual = (e) => {};
|
|
569
|
+
function t(e) {}
|
|
570
|
+
e.assertIs = t;
|
|
571
|
+
function n(e) {
|
|
572
|
+
throw Error();
|
|
573
|
+
}
|
|
574
|
+
e.assertNever = n, e.arrayToEnum = (e) => {
|
|
575
|
+
let t = {};
|
|
576
|
+
for (let n of e) t[n] = n;
|
|
577
|
+
return t;
|
|
578
|
+
}, e.getValidEnumValues = (t) => {
|
|
579
|
+
let n = e.objectKeys(t).filter((e) => typeof t[t[e]] != "number"), r = {};
|
|
580
|
+
for (let e of n) r[e] = t[e];
|
|
581
|
+
return e.objectValues(r);
|
|
582
|
+
}, e.objectValues = (t) => e.objectKeys(t).map(function(e) {
|
|
583
|
+
return t[e];
|
|
584
|
+
}), e.objectKeys = typeof Object.keys == "function" ? (e) => Object.keys(e) : (e) => {
|
|
585
|
+
let t = [];
|
|
586
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n);
|
|
587
|
+
return t;
|
|
588
|
+
}, e.find = (e, t) => {
|
|
589
|
+
for (let n of e) if (t(n)) return n;
|
|
590
|
+
}, e.isInteger = typeof Number.isInteger == "function" ? (e) => Number.isInteger(e) : (e) => typeof e == "number" && Number.isFinite(e) && Math.floor(e) === e;
|
|
591
|
+
function r(e, t = " | ") {
|
|
592
|
+
return e.map((e) => typeof e == "string" ? `'${e}'` : e).join(t);
|
|
593
|
+
}
|
|
594
|
+
e.joinValues = r, e.jsonStringifyReplacer = (e, t) => typeof t == "bigint" ? t.toString() : t;
|
|
595
|
+
})(K ||= {});
|
|
596
|
+
var lt;
|
|
597
|
+
(function(e) {
|
|
598
|
+
e.mergeShapes = (e, t) => ({
|
|
599
|
+
...e,
|
|
600
|
+
...t
|
|
601
|
+
});
|
|
602
|
+
})(lt ||= {});
|
|
603
|
+
var q = K.arrayToEnum([
|
|
604
|
+
"string",
|
|
605
|
+
"nan",
|
|
606
|
+
"number",
|
|
607
|
+
"integer",
|
|
608
|
+
"float",
|
|
609
|
+
"boolean",
|
|
610
|
+
"date",
|
|
611
|
+
"bigint",
|
|
612
|
+
"symbol",
|
|
613
|
+
"function",
|
|
614
|
+
"undefined",
|
|
615
|
+
"null",
|
|
616
|
+
"array",
|
|
617
|
+
"object",
|
|
618
|
+
"unknown",
|
|
619
|
+
"promise",
|
|
620
|
+
"void",
|
|
621
|
+
"never",
|
|
622
|
+
"map",
|
|
623
|
+
"set"
|
|
624
|
+
]), ut = (e) => {
|
|
625
|
+
switch (typeof e) {
|
|
626
|
+
case "undefined": return q.undefined;
|
|
627
|
+
case "string": return q.string;
|
|
628
|
+
case "number": return Number.isNaN(e) ? q.nan : q.number;
|
|
629
|
+
case "boolean": return q.boolean;
|
|
630
|
+
case "function": return q.function;
|
|
631
|
+
case "bigint": return q.bigint;
|
|
632
|
+
case "symbol": return q.symbol;
|
|
633
|
+
case "object": return Array.isArray(e) ? q.array : e === null ? q.null : e.then && typeof e.then == "function" && e.catch && typeof e.catch == "function" ? q.promise : typeof Map < "u" && e instanceof Map ? q.map : typeof Set < "u" && e instanceof Set ? q.set : typeof Date < "u" && e instanceof Date ? q.date : q.object;
|
|
634
|
+
default: return q.unknown;
|
|
635
|
+
}
|
|
636
|
+
}, dt = K.arrayToEnum([
|
|
637
|
+
"invalid_type",
|
|
638
|
+
"invalid_literal",
|
|
639
|
+
"custom",
|
|
640
|
+
"invalid_union",
|
|
641
|
+
"invalid_union_discriminator",
|
|
642
|
+
"invalid_enum_value",
|
|
643
|
+
"unrecognized_keys",
|
|
644
|
+
"invalid_arguments",
|
|
645
|
+
"invalid_return_type",
|
|
646
|
+
"invalid_date",
|
|
647
|
+
"invalid_string",
|
|
648
|
+
"too_small",
|
|
649
|
+
"too_big",
|
|
650
|
+
"invalid_intersection_types",
|
|
651
|
+
"not_multiple_of",
|
|
652
|
+
"not_finite"
|
|
653
|
+
]), J = class e extends Error {
|
|
654
|
+
get errors() {
|
|
655
|
+
return this.issues;
|
|
656
|
+
}
|
|
657
|
+
constructor(e) {
|
|
658
|
+
super(), this.issues = [], this.addIssue = (e) => {
|
|
659
|
+
this.issues = [...this.issues, e];
|
|
660
|
+
}, this.addIssues = (e = []) => {
|
|
661
|
+
this.issues = [...this.issues, ...e];
|
|
662
|
+
};
|
|
663
|
+
let t = new.target.prototype;
|
|
664
|
+
Object.setPrototypeOf ? Object.setPrototypeOf(this, t) : this.__proto__ = t, this.name = "ZodError", this.issues = e;
|
|
665
|
+
}
|
|
666
|
+
format(e) {
|
|
667
|
+
let t = e || function(e) {
|
|
668
|
+
return e.message;
|
|
669
|
+
}, n = { _errors: [] }, r = (e) => {
|
|
670
|
+
for (let i of e.issues) if (i.code === "invalid_union") i.unionErrors.map(r);
|
|
671
|
+
else if (i.code === "invalid_return_type") r(i.returnTypeError);
|
|
672
|
+
else if (i.code === "invalid_arguments") r(i.argumentsError);
|
|
673
|
+
else if (i.path.length === 0) n._errors.push(t(i));
|
|
674
|
+
else {
|
|
675
|
+
let e = n, r = 0;
|
|
676
|
+
for (; r < i.path.length;) {
|
|
677
|
+
let n = i.path[r];
|
|
678
|
+
r === i.path.length - 1 ? (e[n] = e[n] || { _errors: [] }, e[n]._errors.push(t(i))) : e[n] = e[n] || { _errors: [] }, e = e[n], r++;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
};
|
|
682
|
+
return r(this), n;
|
|
683
|
+
}
|
|
684
|
+
static assert(t) {
|
|
685
|
+
if (!(t instanceof e)) throw Error(`Not a ZodError: ${t}`);
|
|
686
|
+
}
|
|
687
|
+
toString() {
|
|
688
|
+
return this.message;
|
|
689
|
+
}
|
|
690
|
+
get message() {
|
|
691
|
+
return JSON.stringify(this.issues, K.jsonStringifyReplacer, 2);
|
|
692
|
+
}
|
|
693
|
+
get isEmpty() {
|
|
694
|
+
return this.issues.length === 0;
|
|
695
|
+
}
|
|
696
|
+
flatten(e = (e) => e.message) {
|
|
697
|
+
let t = Object.create(null), n = [];
|
|
698
|
+
for (let r of this.issues) if (r.path.length > 0) {
|
|
699
|
+
let n = r.path[0];
|
|
700
|
+
t[n] = t[n] || [], t[n].push(e(r));
|
|
701
|
+
} else n.push(e(r));
|
|
702
|
+
return {
|
|
703
|
+
formErrors: n,
|
|
704
|
+
fieldErrors: t
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
get formErrors() {
|
|
708
|
+
return this.flatten();
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
J.create = (e) => new J(e);
|
|
712
|
+
//#endregion
|
|
713
|
+
//#region ../../packages/composable/src/useSafeLocalStorage.ts
|
|
714
|
+
function ft(e, t) {
|
|
715
|
+
try {
|
|
716
|
+
return window.localStorage.getItem(""), st(e, t);
|
|
717
|
+
} catch (e) {
|
|
718
|
+
return de.warn("[useSafeLocalStorage] localStorage blocked, falling back to in-memory ref", e), g(t);
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
//#endregion
|
|
722
|
+
//#region ../../node_modules/.pnpm/@volverjs+form-vue@1.1.1_@volverjs+ui-vue@0.0.13-beta.8_@volverjs+style@0.1.24-beta.3_@_982498bd370508873bcafdf8c66a8f9d/node_modules/@volverjs/form-vue/dist/index.es.js
|
|
723
|
+
var Y = /* @__PURE__ */ ((e) => (e.text = "text", e.number = "number", e.email = "email", e.password = "password", e.tel = "tel", e.url = "url", e.search = "search", e.date = "date", e.time = "time", e.datetimeLocal = "datetime-local", e.month = "month", e.week = "week", e.color = "color", e.select = "select", e.checkbox = "checkbox", e.radio = "radio", e.textarea = "textarea", e.radioGroup = "radioGroup", e.checkboxGroup = "checkboxGroup", e.combobox = "combobox", e.custom = "custom", e))(Y || {}), X = /* @__PURE__ */ ((e) => (e.invalid = "invalid", e.valid = "valid", e.submitting = "submitting", e.reset = "reset", e.updated = "updated", e.unknown = "unknown", e))(X || {}), Z = (e) => e._def.typeName === "ZodObject", pt = (e) => e._zod.def.type === "object", mt = (e) => e._def.typeName === "ZodDefault", ht = (e) => e._zod.def.type === "default", gt = (e) => e._def.typeName === "ZodNullable", _t = (e) => e._zod.def.type === "nullable", vt = (e) => e._def.typeName === "ZodRecord", yt = (e) => e._zod.def.type === "record", bt = (e) => e._def.typeName === "ZodArray", xt = (e) => e._zod.def.type === "array", St = (e) => e._def.typeName === "ZodEffects", Ct = (e) => e._def.typeName === "ZodOptional", wt = (e) => e._zod.def.type === "optional", Tt = (e) => e._zod.def.type === "pipe", Et = (e) => e._zod.def.type === "transform";
|
|
724
|
+
function Dt(e) {
|
|
725
|
+
let t = e;
|
|
726
|
+
for (; St(t);) t = t.innerType();
|
|
727
|
+
return t;
|
|
728
|
+
}
|
|
729
|
+
function Ot(e) {
|
|
730
|
+
let t = e;
|
|
731
|
+
for (; Tt(t);) t = Et(t._zod.def.out) ? t._zod.def.in : t._zod.def.out;
|
|
732
|
+
return t;
|
|
733
|
+
}
|
|
734
|
+
var kt = (e) => {
|
|
735
|
+
let t = Dt(e);
|
|
736
|
+
return Ct(t) && (t = t._def.innerType), t;
|
|
737
|
+
}, At = (e) => {
|
|
738
|
+
let t = Ot(e);
|
|
739
|
+
return wt(t) && (t = t._zod.def.innerType), t;
|
|
740
|
+
}, jt = (e) => !!Ct(Dt(e)), Mt = (e) => !!wt(Ot(e)), Q = (e) => "_zod" in e;
|
|
741
|
+
function $(e, t = {}) {
|
|
742
|
+
if (Q(e)) {
|
|
743
|
+
let n = At(e);
|
|
744
|
+
return pt(n) ? {
|
|
745
|
+
...n._zod.def.catchall && n._zod.def.catchall._zod.def.type !== "never" ? t : {},
|
|
746
|
+
...Object.fromEntries(("shape" in n._zod.def ? Object.entries(n._zod.def.shape) : []).map(([e, n]) => {
|
|
747
|
+
let r = t[e], i = Mt(n), a = At(n), o;
|
|
748
|
+
if (ht(a) && (o = a._zod.def.defaultValue, a = a._zod.def.innerType), r === null && _t(a)) return [e, r];
|
|
749
|
+
if (r == null && i) return [e, o];
|
|
750
|
+
if (a) {
|
|
751
|
+
let t = se(n, r);
|
|
752
|
+
if (t.success) return [e, t.data ?? o];
|
|
753
|
+
}
|
|
754
|
+
if (xt(a) && Array.isArray(r) && r.length) {
|
|
755
|
+
let t = At(a._zod.def.element);
|
|
756
|
+
if (pt(t)) return [e, r.map((e) => $(t, e && typeof e == "object" ? e : void 0))];
|
|
757
|
+
}
|
|
758
|
+
if (yt(a) && r) {
|
|
759
|
+
let t = At(a._zod.def.valueType);
|
|
760
|
+
if (pt(t)) return [e, Object.keys(r).reduce((e, n) => (e[n] = $(t, r[n]), e), {})];
|
|
761
|
+
}
|
|
762
|
+
return pt(a) ? [e, $(a, r && typeof r == "object" ? r : o)] : [e, o];
|
|
763
|
+
}))
|
|
764
|
+
} : t;
|
|
765
|
+
}
|
|
766
|
+
let n = kt(e);
|
|
767
|
+
return Z(n) ? {
|
|
768
|
+
...n._def.unknownKeys === "passthrough" ? t : {},
|
|
769
|
+
...Object.fromEntries(("shape" in n ? Object.entries(n.shape) : []).map(([e, n]) => {
|
|
770
|
+
let r = t[e], i = jt(n), a = kt(n), o;
|
|
771
|
+
if (mt(a) && (o = a._def.defaultValue(), a = a._def.innerType), r === null && gt(a)) return [e, r];
|
|
772
|
+
if (r == null && i) return [e, o];
|
|
773
|
+
if (a) {
|
|
774
|
+
let t = n.safeParse(r);
|
|
775
|
+
if (t.success) return [e, t.data ?? o];
|
|
776
|
+
}
|
|
777
|
+
if (bt(a) && Array.isArray(r) && r.length) {
|
|
778
|
+
let t = kt(a._def.type);
|
|
779
|
+
if (Z(t)) return [e, r.map((e) => $(t, e && typeof e == "object" ? e : void 0))];
|
|
780
|
+
}
|
|
781
|
+
if (vt(a) && r) {
|
|
782
|
+
let t = kt(a._def.valueType);
|
|
783
|
+
if (Z(t)) return [e, Object.keys(r).reduce((e, n) => (e[n] = $(t, r[n]), e), {})];
|
|
784
|
+
}
|
|
785
|
+
return Z(a) ? [e, $(a, r && typeof r == "object" ? r : o)] : [e, o];
|
|
786
|
+
}))
|
|
787
|
+
} : t;
|
|
788
|
+
}
|
|
789
|
+
var Nt = (e, t) => Q(e) ? ae(e, t) : e.safeParseAsync(t), Pt = (e, t) => Q(e) ? oe(t) : t.format(), Ft = (e, t) => Q(e) ? oe(new ie(t)) : new J(t).format();
|
|
790
|
+
function It(e, t, r, a, o) {
|
|
791
|
+
let s = g(), l = g(), u = p(() => l.value === X.invalid), d = g(), m = g(!1), _, b = (t) => {
|
|
792
|
+
let n = $(e, t);
|
|
793
|
+
if (r?.class) {
|
|
794
|
+
let e = r.class;
|
|
795
|
+
return new e(n);
|
|
796
|
+
}
|
|
797
|
+
return n;
|
|
798
|
+
}, S = async (t = d.value, n) => {
|
|
799
|
+
if (_ = n?.fields, m.value) return !0;
|
|
800
|
+
let r = await Nt(e, t);
|
|
801
|
+
if (!r.success) {
|
|
802
|
+
if (l.value = X.invalid, !_?.size) return s.value = Pt(e, r.error), !1;
|
|
803
|
+
let t = r.error.issues.filter((e) => _?.has(e.path.join(".")));
|
|
804
|
+
return t.length ? (s.value = Ft(e, t), !1) : (s.value = void 0, !0);
|
|
805
|
+
}
|
|
806
|
+
return s.value = void 0, l.value = X.valid, d.value = b(r.data), !0;
|
|
807
|
+
}, w = () => {
|
|
808
|
+
s.value = void 0, l.value = void 0, _ = void 0;
|
|
809
|
+
}, T = () => {
|
|
810
|
+
d.value = b(), w(), l.value = X.reset;
|
|
811
|
+
}, E = async (e) => m.value || !await S(void 0, e) ? !1 : (l.value = X.submitting, !0), { ignoreUpdates: D, stop: O } = fe(d, () => {
|
|
812
|
+
l.value = X.updated;
|
|
813
|
+
}, {
|
|
814
|
+
deep: !0,
|
|
815
|
+
eventFilter: pe(r?.updateThrottle ?? 500)
|
|
816
|
+
}), k = h(s), A = h(l);
|
|
817
|
+
return {
|
|
818
|
+
clear: w,
|
|
819
|
+
errors: s,
|
|
820
|
+
formData: d,
|
|
821
|
+
ignoreUpdates: D,
|
|
822
|
+
invalid: u,
|
|
823
|
+
readonly: m,
|
|
824
|
+
reset: T,
|
|
825
|
+
status: l,
|
|
826
|
+
wrappers: o,
|
|
827
|
+
stopUpdatesWatch: O,
|
|
828
|
+
submit: E,
|
|
829
|
+
validate: S,
|
|
830
|
+
VvForm: i({
|
|
831
|
+
name: "VvForm",
|
|
832
|
+
props: {
|
|
833
|
+
continuousValidation: {
|
|
834
|
+
type: Boolean,
|
|
835
|
+
default: !1
|
|
836
|
+
},
|
|
837
|
+
modelValue: {
|
|
838
|
+
type: Object,
|
|
839
|
+
default: () => ({})
|
|
840
|
+
},
|
|
841
|
+
readonly: {
|
|
842
|
+
type: Boolean,
|
|
843
|
+
default: r?.readonly
|
|
844
|
+
},
|
|
845
|
+
tag: {
|
|
846
|
+
type: String,
|
|
847
|
+
default: "form"
|
|
848
|
+
},
|
|
849
|
+
template: {
|
|
850
|
+
type: [Array, Function],
|
|
851
|
+
default: void 0
|
|
852
|
+
},
|
|
853
|
+
superRefine: {
|
|
854
|
+
type: Function,
|
|
855
|
+
default: void 0
|
|
856
|
+
},
|
|
857
|
+
validateFields: {
|
|
858
|
+
type: Array,
|
|
859
|
+
default: void 0
|
|
860
|
+
}
|
|
861
|
+
},
|
|
862
|
+
emits: [
|
|
863
|
+
"invalid",
|
|
864
|
+
"submit",
|
|
865
|
+
"update:modelValue",
|
|
866
|
+
"update:readonly",
|
|
867
|
+
"valid",
|
|
868
|
+
"reset"
|
|
869
|
+
],
|
|
870
|
+
expose: [
|
|
871
|
+
"errors",
|
|
872
|
+
"invalid",
|
|
873
|
+
"readonly",
|
|
874
|
+
"status",
|
|
875
|
+
"submit",
|
|
876
|
+
"tag",
|
|
877
|
+
"template",
|
|
878
|
+
"valid",
|
|
879
|
+
"validate",
|
|
880
|
+
"clear",
|
|
881
|
+
"reset"
|
|
882
|
+
],
|
|
883
|
+
slots: Object,
|
|
884
|
+
setup(e, { emit: i }) {
|
|
885
|
+
return d.value = b(v(e.modelValue)), f(() => e.modelValue, (e) => {
|
|
886
|
+
if (e) {
|
|
887
|
+
let t = y(e) ? v(e) : e;
|
|
888
|
+
if (JSON.stringify(t) === JSON.stringify(v(d.value))) return;
|
|
889
|
+
d.value = typeof t?.clone == "function" ? t.clone() : JSON.parse(JSON.stringify(t));
|
|
890
|
+
}
|
|
891
|
+
}, { deep: !0 }), f(l, async (t) => {
|
|
892
|
+
if (t === X.invalid) {
|
|
893
|
+
let e = v(s.value);
|
|
894
|
+
i("invalid", e), r?.onInvalid?.(e);
|
|
895
|
+
return;
|
|
896
|
+
}
|
|
897
|
+
if (t === X.valid) {
|
|
898
|
+
let e = v(d.value);
|
|
899
|
+
i("valid", e), r?.onValid?.(e), i("update:modelValue", e), r?.onUpdate?.(e);
|
|
900
|
+
return;
|
|
901
|
+
}
|
|
902
|
+
if (t === X.submitting) {
|
|
903
|
+
let e = v(d.value);
|
|
904
|
+
i("submit", e), r?.onSubmit?.(e);
|
|
905
|
+
return;
|
|
906
|
+
}
|
|
907
|
+
if (t === X.reset) {
|
|
908
|
+
let e = v(d.value);
|
|
909
|
+
i("reset", e), r?.onReset?.(e);
|
|
910
|
+
return;
|
|
911
|
+
}
|
|
912
|
+
if (t === X.updated) {
|
|
913
|
+
if ((s.value || r?.continuousValidation || e.continuousValidation) && await S(void 0, {
|
|
914
|
+
superRefine: e.superRefine,
|
|
915
|
+
fields: _ ?? new Set(e.validateFields)
|
|
916
|
+
}), !d.value || !e.modelValue || JSON.stringify(d.value) !== JSON.stringify(e.modelValue)) {
|
|
917
|
+
let e = v(d.value);
|
|
918
|
+
i("update:modelValue", e), r?.onUpdate?.(e);
|
|
919
|
+
}
|
|
920
|
+
l.value === X.updated && (l.value = X.unknown);
|
|
921
|
+
}
|
|
922
|
+
}), c(() => {
|
|
923
|
+
e.readonly !== void 0 && (m.value = e.readonly);
|
|
924
|
+
}), f(() => e.readonly, (e) => {
|
|
925
|
+
m.value = e;
|
|
926
|
+
}), f(m, (t) => {
|
|
927
|
+
t !== e.readonly && i("update:readonly", m.value);
|
|
928
|
+
}), n(t, {
|
|
929
|
+
clear: w,
|
|
930
|
+
errors: k,
|
|
931
|
+
formData: d,
|
|
932
|
+
ignoreUpdates: D,
|
|
933
|
+
invalid: u,
|
|
934
|
+
readonly: m,
|
|
935
|
+
reset: T,
|
|
936
|
+
status: A,
|
|
937
|
+
stopUpdatesWatch: O,
|
|
938
|
+
submit: E,
|
|
939
|
+
validate: S,
|
|
940
|
+
wrappers: o
|
|
941
|
+
}), {
|
|
942
|
+
clear: w,
|
|
943
|
+
errors: k,
|
|
944
|
+
formData: d,
|
|
945
|
+
ignoreUpdates: D,
|
|
946
|
+
invalid: u,
|
|
947
|
+
isReadonly: m,
|
|
948
|
+
reset: T,
|
|
949
|
+
status: A,
|
|
950
|
+
stopUpdatesWatch: O,
|
|
951
|
+
submit: () => E({
|
|
952
|
+
superRefine: e.superRefine,
|
|
953
|
+
fields: new Set(e.validateFields)
|
|
954
|
+
}),
|
|
955
|
+
validate: S,
|
|
956
|
+
wrappers: o
|
|
957
|
+
};
|
|
958
|
+
},
|
|
959
|
+
render() {
|
|
960
|
+
let e = () => this.$slots?.default?.({
|
|
961
|
+
errors: k.value,
|
|
962
|
+
formData: d.value,
|
|
963
|
+
invalid: u.value,
|
|
964
|
+
readonly: m.value,
|
|
965
|
+
status: A.value,
|
|
966
|
+
wrappers: o,
|
|
967
|
+
clear: w,
|
|
968
|
+
ignoreUpdates: D,
|
|
969
|
+
reset: T,
|
|
970
|
+
stopUpdatesWatch: O,
|
|
971
|
+
submit: E,
|
|
972
|
+
validate: S
|
|
973
|
+
}) ?? this.$slots.default;
|
|
974
|
+
return x(this.tag, {
|
|
975
|
+
onSubmit: C(this.submit, ["prevent"]),
|
|
976
|
+
onReset: C(this.reset, ["prevent"])
|
|
977
|
+
}, (this.template ?? r?.template) && a ? [x(a, { schema: this.template ?? r?.template }, { default: e })] : { default: e });
|
|
978
|
+
}
|
|
979
|
+
})
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
function Lt(e, t, r, a) {
|
|
983
|
+
return i({
|
|
984
|
+
name: "VvFormField",
|
|
985
|
+
props: {
|
|
986
|
+
type: {
|
|
987
|
+
type: String,
|
|
988
|
+
validator: (e) => Object.values(Y).includes(e),
|
|
989
|
+
default: Y.custom
|
|
990
|
+
},
|
|
991
|
+
is: {
|
|
992
|
+
type: [Object, String],
|
|
993
|
+
default: void 0
|
|
994
|
+
},
|
|
995
|
+
name: {
|
|
996
|
+
type: [
|
|
997
|
+
String,
|
|
998
|
+
Number,
|
|
999
|
+
Boolean,
|
|
1000
|
+
Symbol
|
|
1001
|
+
],
|
|
1002
|
+
required: !0
|
|
1003
|
+
},
|
|
1004
|
+
props: {
|
|
1005
|
+
type: [Object, Function],
|
|
1006
|
+
default: () => ({})
|
|
1007
|
+
},
|
|
1008
|
+
showValid: {
|
|
1009
|
+
type: Boolean,
|
|
1010
|
+
default: !1
|
|
1011
|
+
},
|
|
1012
|
+
defaultValue: {
|
|
1013
|
+
type: [
|
|
1014
|
+
String,
|
|
1015
|
+
Number,
|
|
1016
|
+
Boolean,
|
|
1017
|
+
Array,
|
|
1018
|
+
Object
|
|
1019
|
+
],
|
|
1020
|
+
default: void 0
|
|
1021
|
+
},
|
|
1022
|
+
lazyLoad: {
|
|
1023
|
+
type: Boolean,
|
|
1024
|
+
default: !1
|
|
1025
|
+
},
|
|
1026
|
+
readonly: {
|
|
1027
|
+
type: Boolean,
|
|
1028
|
+
default: void 0
|
|
1029
|
+
}
|
|
1030
|
+
},
|
|
1031
|
+
emits: [
|
|
1032
|
+
"invalid",
|
|
1033
|
+
"update:formData",
|
|
1034
|
+
"update:modelValue",
|
|
1035
|
+
"valid"
|
|
1036
|
+
],
|
|
1037
|
+
expose: [
|
|
1038
|
+
"component",
|
|
1039
|
+
"errors",
|
|
1040
|
+
"hasProps",
|
|
1041
|
+
"invalid",
|
|
1042
|
+
"invalidLabel",
|
|
1043
|
+
"is",
|
|
1044
|
+
"type"
|
|
1045
|
+
],
|
|
1046
|
+
slots: Object,
|
|
1047
|
+
setup(i, { slots: o, emit: l }) {
|
|
1048
|
+
let { props: g, name: _ } = m(i), v = D(), y = b(t, void 0);
|
|
1049
|
+
y && y.fields.value.set(v, i.name);
|
|
1050
|
+
let x = b(e), S = p({
|
|
1051
|
+
get() {
|
|
1052
|
+
if (x?.formData) return L(new Object(x.formData.value), String(i.name));
|
|
1053
|
+
},
|
|
1054
|
+
set(e) {
|
|
1055
|
+
x?.formData && (te(new Object(x.formData.value), String(i.name), e), l("update:modelValue", {
|
|
1056
|
+
newValue: S.value,
|
|
1057
|
+
formData: x?.formData
|
|
1058
|
+
}));
|
|
1059
|
+
}
|
|
1060
|
+
});
|
|
1061
|
+
c(() => {
|
|
1062
|
+
S.value === void 0 && i.defaultValue !== void 0 && (S.value = i.defaultValue);
|
|
1063
|
+
}), s(() => {
|
|
1064
|
+
y && y.fields.value.delete(v);
|
|
1065
|
+
});
|
|
1066
|
+
let C = p(() => {
|
|
1067
|
+
if (x?.errors.value) return L(x.errors.value, String(i.name));
|
|
1068
|
+
}), w = p(() => C.value?._errors), T = p(() => C.value !== void 0), E = f(T, (e) => {
|
|
1069
|
+
if (e) {
|
|
1070
|
+
l("invalid", C.value), y && y.errors.value.set(String(i.name), C.value);
|
|
1071
|
+
return;
|
|
1072
|
+
}
|
|
1073
|
+
l("valid", S.value), y && y.errors.value.delete(i.name);
|
|
1074
|
+
}), O = f(() => x?.formData, () => {
|
|
1075
|
+
l("update:formData", x?.formData);
|
|
1076
|
+
}, { deep: !0 });
|
|
1077
|
+
s(() => {
|
|
1078
|
+
E(), O();
|
|
1079
|
+
});
|
|
1080
|
+
let k = (e) => {
|
|
1081
|
+
e instanceof InputEvent && (e = e.target.value), S.value = e;
|
|
1082
|
+
}, A = p(() => {
|
|
1083
|
+
let e = g.value;
|
|
1084
|
+
return typeof e == "function" && (e = e(x?.formData)), Object.keys(e).reduce((t, n) => (t[n] = F(e[n]), t), {});
|
|
1085
|
+
}), j = p(() => x?.readonly.value || y?.readonly.value ? !0 : A.value.readonly ?? i.readonly), M = p(() => ({
|
|
1086
|
+
...A.value,
|
|
1087
|
+
name: A.value.name ?? i.name,
|
|
1088
|
+
invalid: T.value,
|
|
1089
|
+
valid: i.showValid ? !!(!T.value && S.value) : void 0,
|
|
1090
|
+
type: ((e) => {
|
|
1091
|
+
if ([
|
|
1092
|
+
Y.color,
|
|
1093
|
+
Y.date,
|
|
1094
|
+
Y.datetimeLocal,
|
|
1095
|
+
Y.email,
|
|
1096
|
+
Y.month,
|
|
1097
|
+
Y.number,
|
|
1098
|
+
Y.password,
|
|
1099
|
+
Y.search,
|
|
1100
|
+
Y.tel,
|
|
1101
|
+
Y.text,
|
|
1102
|
+
Y.time,
|
|
1103
|
+
Y.url,
|
|
1104
|
+
Y.week
|
|
1105
|
+
].includes(e)) return e;
|
|
1106
|
+
})(i.type),
|
|
1107
|
+
invalidLabel: w.value,
|
|
1108
|
+
modelValue: S.value,
|
|
1109
|
+
readonly: j.value,
|
|
1110
|
+
"onUpdate:modelValue": k
|
|
1111
|
+
}));
|
|
1112
|
+
return n(r, {
|
|
1113
|
+
name: h(_),
|
|
1114
|
+
errors: h(C)
|
|
1115
|
+
}), {
|
|
1116
|
+
component: p(() => {
|
|
1117
|
+
if (i.type === Y.custom) return { render() {
|
|
1118
|
+
return o.default?.({
|
|
1119
|
+
errors: h(C).value,
|
|
1120
|
+
formData: x?.formData.value,
|
|
1121
|
+
formErrors: x?.errors.value,
|
|
1122
|
+
invalid: T.value,
|
|
1123
|
+
invalidLabel: w.value,
|
|
1124
|
+
modelValue: S.value,
|
|
1125
|
+
readonly: j.value,
|
|
1126
|
+
onUpdate: k,
|
|
1127
|
+
submit: x?.submit,
|
|
1128
|
+
validate: x?.validate
|
|
1129
|
+
}) ?? o.default;
|
|
1130
|
+
} };
|
|
1131
|
+
if (!(a?.lazyLoad ?? i.lazyLoad)) {
|
|
1132
|
+
let e;
|
|
1133
|
+
switch (i.type) {
|
|
1134
|
+
case Y.select:
|
|
1135
|
+
e = d("VvSelect");
|
|
1136
|
+
break;
|
|
1137
|
+
case Y.checkbox:
|
|
1138
|
+
e = d("VvCheckbox");
|
|
1139
|
+
break;
|
|
1140
|
+
case Y.radio:
|
|
1141
|
+
e = d("VvRadio");
|
|
1142
|
+
break;
|
|
1143
|
+
case Y.textarea:
|
|
1144
|
+
e = d("VvTextarea");
|
|
1145
|
+
break;
|
|
1146
|
+
case Y.radioGroup:
|
|
1147
|
+
e = d("VvRadioGroup");
|
|
1148
|
+
break;
|
|
1149
|
+
case Y.checkboxGroup:
|
|
1150
|
+
e = d("VvCheckboxGroup");
|
|
1151
|
+
break;
|
|
1152
|
+
case Y.combobox:
|
|
1153
|
+
e = d("VvCombobox");
|
|
1154
|
+
break;
|
|
1155
|
+
default: e = d("VvInputText");
|
|
1156
|
+
}
|
|
1157
|
+
if (typeof e != "string") return e;
|
|
1158
|
+
console.warn(`[@volverjs/form-vue]: ${e} not found, the component will be loaded asynchronously. To avoid this warning, please set "lazyLoad" option.`);
|
|
1159
|
+
}
|
|
1160
|
+
return u(async () => {
|
|
1161
|
+
switch (a?.sideEffects && await Promise.resolve(a.sideEffects(i.type)), i.type) {
|
|
1162
|
+
case Y.textarea: return import("./VvTextarea.es-CGpiCS4S.js");
|
|
1163
|
+
case Y.radio: return import("./VvRadio.es-C2p5vvAx.js");
|
|
1164
|
+
case Y.radioGroup: return import("./VvRadioGroup.es-6GlWuDjY.js");
|
|
1165
|
+
case Y.checkbox: return import("./VvCheckbox.es-BF8Mdg0O.js");
|
|
1166
|
+
case Y.checkboxGroup: return import("./VvCheckboxGroup.es-BJc8MmJ3.js");
|
|
1167
|
+
case Y.select: return import("./VvSelect.es-i4lO9onq.js");
|
|
1168
|
+
case Y.combobox: return import("./VvCombobox.es-ILRHqAye.js");
|
|
1169
|
+
}
|
|
1170
|
+
return import("./VvInputText.es-CDnMeO26.js");
|
|
1171
|
+
});
|
|
1172
|
+
}),
|
|
1173
|
+
hasProps: M,
|
|
1174
|
+
invalid: T
|
|
1175
|
+
};
|
|
1176
|
+
},
|
|
1177
|
+
render() {
|
|
1178
|
+
return this.is ? x(this.is, this.hasProps, this.$slots) : this.type === Y.custom ? x(this.component, null, this.$slots) : x(this.component, this.hasProps, this.$slots);
|
|
1179
|
+
}
|
|
1180
|
+
});
|
|
1181
|
+
}
|
|
1182
|
+
function Rt(e, t, r) {
|
|
1183
|
+
return i({
|
|
1184
|
+
name: "VvFormFieldsGroup",
|
|
1185
|
+
props: {
|
|
1186
|
+
is: {
|
|
1187
|
+
type: [Object, String],
|
|
1188
|
+
default: void 0
|
|
1189
|
+
},
|
|
1190
|
+
names: {
|
|
1191
|
+
type: [Array, Object],
|
|
1192
|
+
required: !0
|
|
1193
|
+
},
|
|
1194
|
+
props: {
|
|
1195
|
+
type: [Object, Function],
|
|
1196
|
+
default: () => ({})
|
|
1197
|
+
},
|
|
1198
|
+
showValid: {
|
|
1199
|
+
type: Boolean,
|
|
1200
|
+
default: !1
|
|
1201
|
+
},
|
|
1202
|
+
defaultValues: {
|
|
1203
|
+
type: [Object],
|
|
1204
|
+
default: void 0
|
|
1205
|
+
},
|
|
1206
|
+
readonly: {
|
|
1207
|
+
type: Boolean,
|
|
1208
|
+
default: void 0
|
|
1209
|
+
}
|
|
1210
|
+
},
|
|
1211
|
+
emits: [
|
|
1212
|
+
"invalid",
|
|
1213
|
+
"update:formData",
|
|
1214
|
+
"update:modelValue",
|
|
1215
|
+
"valid"
|
|
1216
|
+
],
|
|
1217
|
+
expose: [
|
|
1218
|
+
"component",
|
|
1219
|
+
"errors",
|
|
1220
|
+
"hasProps",
|
|
1221
|
+
"invalid",
|
|
1222
|
+
"invalidLabels",
|
|
1223
|
+
"is"
|
|
1224
|
+
],
|
|
1225
|
+
slots: Object,
|
|
1226
|
+
setup(i, { slots: a, emit: o }) {
|
|
1227
|
+
let { props: l, names: u, defaultValues: d } = m(i), g = D(), _ = p(() => Array.isArray(u.value) ? u.value : Object.values(u.value)), v = p(() => Array.isArray(u.value) ? u.value : Object.keys(u.value)), y = p(() => Array.isArray(u.value) ? u.value.reduce((e, t) => (e[String(t)] = t, e), {}) : u.value), x = p(() => Object.keys(y.value).reduce((e, t) => (e[String(y.value[t])] = t, e), {})), S = b(t, void 0);
|
|
1228
|
+
S && _.value.forEach((e) => {
|
|
1229
|
+
S.fields.value.set(`${g}-${e}`, e);
|
|
1230
|
+
});
|
|
1231
|
+
let C = b(e), w = p({
|
|
1232
|
+
get() {
|
|
1233
|
+
return C?.formData ? v.value.reduce((e, t) => (e[t] = L(new Object(C.formData.value), y.value[t]), e), {}) : {};
|
|
1234
|
+
},
|
|
1235
|
+
set(e) {
|
|
1236
|
+
C?.formData && (v.value.forEach((t) => {
|
|
1237
|
+
te(new Object(C.formData.value), y.value[t], e?.[t]);
|
|
1238
|
+
}), o("update:modelValue", {
|
|
1239
|
+
newValue: w.value,
|
|
1240
|
+
formData: C?.formData
|
|
1241
|
+
}));
|
|
1242
|
+
}
|
|
1243
|
+
});
|
|
1244
|
+
c(() => {
|
|
1245
|
+
d.value && _.value.forEach((e) => {
|
|
1246
|
+
d.value?.[e] !== void 0 && w.value[e] === void 0 && (w.value = {
|
|
1247
|
+
...w.value,
|
|
1248
|
+
[e]: d.value?.[e]
|
|
1249
|
+
});
|
|
1250
|
+
});
|
|
1251
|
+
}), s(() => {
|
|
1252
|
+
S && _.value.forEach((e) => {
|
|
1253
|
+
S.fields.value.delete(`${g}-${e}`);
|
|
1254
|
+
});
|
|
1255
|
+
});
|
|
1256
|
+
let T = p(() => {
|
|
1257
|
+
if (!C?.errors.value) return;
|
|
1258
|
+
let e = _.value.reduce((e, t) => {
|
|
1259
|
+
if (!C.errors.value) return e;
|
|
1260
|
+
let n = L(C.errors.value, String(t));
|
|
1261
|
+
return n === void 0 || (e[String(t)] = n), e;
|
|
1262
|
+
}, {});
|
|
1263
|
+
if (Object.keys(e).length !== 0) return e;
|
|
1264
|
+
}), E = p(() => {
|
|
1265
|
+
if (!T.value) return;
|
|
1266
|
+
let e = Object.keys(T.value).reduce((e, t) => (T.value?.[t] && (e[x.value[t]] = T.value[t]._errors), e), {});
|
|
1267
|
+
if (Object.keys(e).length !== 0) return e;
|
|
1268
|
+
}), O = p(() => T.value !== void 0), k = p(() => v.value.reduce((e, t) => (e[t] = !!T.value?.[x.value[t]], e), {})), A = f(O, () => {
|
|
1269
|
+
if (O.value) {
|
|
1270
|
+
o("invalid", T.value), S && _.value.forEach((e) => {
|
|
1271
|
+
if (!T.value?.[e]) {
|
|
1272
|
+
S.errors.value.delete(e);
|
|
1273
|
+
return;
|
|
1274
|
+
}
|
|
1275
|
+
S.errors.value.set(e, T.value?.[e]);
|
|
1276
|
+
});
|
|
1277
|
+
return;
|
|
1278
|
+
}
|
|
1279
|
+
o("valid", w.value), S && _.value.forEach((e) => {
|
|
1280
|
+
S.errors.value.delete(e);
|
|
1281
|
+
});
|
|
1282
|
+
}), j = f(() => C?.formData, () => {
|
|
1283
|
+
o("update:formData", C?.formData);
|
|
1284
|
+
}, { deep: !0 });
|
|
1285
|
+
s(() => {
|
|
1286
|
+
A(), j();
|
|
1287
|
+
});
|
|
1288
|
+
let M = (e) => {
|
|
1289
|
+
w.value = e;
|
|
1290
|
+
}, N = (e, t) => {
|
|
1291
|
+
t instanceof InputEvent && (t = t.target.value), v.value.includes(e) && (w.value = {
|
|
1292
|
+
...w.value,
|
|
1293
|
+
[e]: t
|
|
1294
|
+
});
|
|
1295
|
+
}, P = p(() => {
|
|
1296
|
+
let e = l.value;
|
|
1297
|
+
return typeof e == "function" && (e = e(C?.formData)), Object.keys(e).reduce((t, n) => (t[n] = F(e[n]), t), {});
|
|
1298
|
+
}), I = p(() => C?.readonly.value ? !0 : P.value.readonly ?? i.readonly), ee = p(() => v.value.reduce((e, t) => (e[`onUpdate:${t}`] = (e) => {
|
|
1299
|
+
N(t, e);
|
|
1300
|
+
}, e), { "onUpdate:modelValue": M })), ne = p(() => ({
|
|
1301
|
+
...ee.value,
|
|
1302
|
+
...P.value,
|
|
1303
|
+
...w.value,
|
|
1304
|
+
modelValue: w.value,
|
|
1305
|
+
names: P.value.name ?? _.value,
|
|
1306
|
+
invalid: O.value,
|
|
1307
|
+
invalids: k.value,
|
|
1308
|
+
valid: i.showValid ? !!(!O.value && w.value) : void 0,
|
|
1309
|
+
invalidLabels: E.value,
|
|
1310
|
+
readonly: I.value
|
|
1311
|
+
}));
|
|
1312
|
+
return n(r, {
|
|
1313
|
+
names: h(u),
|
|
1314
|
+
errors: h(T)
|
|
1315
|
+
}), {
|
|
1316
|
+
component: p(() => ({ render() {
|
|
1317
|
+
return a.default?.({
|
|
1318
|
+
errors: T.value,
|
|
1319
|
+
formData: C?.formData.value,
|
|
1320
|
+
formErrors: C?.errors.value,
|
|
1321
|
+
invalid: O.value,
|
|
1322
|
+
invalids: k.value,
|
|
1323
|
+
invalidLabels: E.value,
|
|
1324
|
+
modelValue: w.value,
|
|
1325
|
+
onUpdate: M,
|
|
1326
|
+
onUpdateField: N,
|
|
1327
|
+
readonly: I.value,
|
|
1328
|
+
submit: C?.submit,
|
|
1329
|
+
validate: C?.validate
|
|
1330
|
+
}) ?? a.default;
|
|
1331
|
+
} })),
|
|
1332
|
+
hasProps: ne,
|
|
1333
|
+
invalid: O
|
|
1334
|
+
};
|
|
1335
|
+
},
|
|
1336
|
+
render() {
|
|
1337
|
+
return this.is ? x(this.is, this.hasProps, this.$slots) : x(this.component, null, this.$slots);
|
|
1338
|
+
}
|
|
1339
|
+
});
|
|
1340
|
+
}
|
|
1341
|
+
function zt(e, t) {
|
|
1342
|
+
return i({
|
|
1343
|
+
name: "VvFormWrapper",
|
|
1344
|
+
props: {
|
|
1345
|
+
name: {
|
|
1346
|
+
type: String,
|
|
1347
|
+
required: !0
|
|
1348
|
+
},
|
|
1349
|
+
tag: {
|
|
1350
|
+
type: String,
|
|
1351
|
+
default: void 0
|
|
1352
|
+
},
|
|
1353
|
+
readonly: {
|
|
1354
|
+
type: Boolean,
|
|
1355
|
+
default: !1
|
|
1356
|
+
}
|
|
1357
|
+
},
|
|
1358
|
+
emits: ["invalid", "valid"],
|
|
1359
|
+
expose: [
|
|
1360
|
+
"clear",
|
|
1361
|
+
"errors",
|
|
1362
|
+
"fields",
|
|
1363
|
+
"fieldsErrors",
|
|
1364
|
+
"formData",
|
|
1365
|
+
"invalid",
|
|
1366
|
+
"readonly",
|
|
1367
|
+
"reset",
|
|
1368
|
+
"submit",
|
|
1369
|
+
"tag",
|
|
1370
|
+
"validate",
|
|
1371
|
+
"validateWrapper"
|
|
1372
|
+
],
|
|
1373
|
+
slots: Object,
|
|
1374
|
+
setup(r, { emit: i }) {
|
|
1375
|
+
let a = b(e), o = b(t, void 0), l = g(/* @__PURE__ */ new Map()), u = g(/* @__PURE__ */ new Map()), { name: d } = m(r), _ = p(() => a?.invalid.value ? u.value.size > 0 : !1);
|
|
1376
|
+
f(_, (e) => {
|
|
1377
|
+
if (e) {
|
|
1378
|
+
i("invalid");
|
|
1379
|
+
return;
|
|
1380
|
+
}
|
|
1381
|
+
i("valid");
|
|
1382
|
+
});
|
|
1383
|
+
let v = p(() => a?.readonly.value || r.readonly), y = {
|
|
1384
|
+
name: h(d),
|
|
1385
|
+
errors: u,
|
|
1386
|
+
invalid: h(_),
|
|
1387
|
+
readonly: h(v),
|
|
1388
|
+
fields: l
|
|
1389
|
+
};
|
|
1390
|
+
return n(t, y), f(p(() => new Map(l.value)), (e, t) => {
|
|
1391
|
+
o?.fields && (t.forEach((t, n) => {
|
|
1392
|
+
e.has(n) || o?.fields.value.delete(n);
|
|
1393
|
+
}), e.forEach((e, t) => {
|
|
1394
|
+
o?.fields.value.has(t) || o?.fields.value.set(t, e);
|
|
1395
|
+
}));
|
|
1396
|
+
}, { deep: !0 }), f(u, (e) => {
|
|
1397
|
+
o?.errors && l.value.forEach((t) => {
|
|
1398
|
+
if (e.has(t) || o.errors.value.delete(t), e.has(t)) {
|
|
1399
|
+
let n = e.get(t);
|
|
1400
|
+
n && o.errors.value.set(t, n);
|
|
1401
|
+
}
|
|
1402
|
+
});
|
|
1403
|
+
}, { deep: !0 }), c(() => {
|
|
1404
|
+
if (!a?.wrappers || !d.value) {
|
|
1405
|
+
console.warn("[@volverjs/form-vue]: Invalid wrapper registration state");
|
|
1406
|
+
return;
|
|
1407
|
+
}
|
|
1408
|
+
if (a.wrappers.has(d.value)) {
|
|
1409
|
+
console.warn(`[@volverjs/form-vue]: wrapper name "${d.value}" is already used`);
|
|
1410
|
+
return;
|
|
1411
|
+
}
|
|
1412
|
+
a.wrappers.set(d.value, y);
|
|
1413
|
+
}), s(() => {
|
|
1414
|
+
a?.wrappers && d.value && a.wrappers.delete(d.value);
|
|
1415
|
+
}), {
|
|
1416
|
+
errors: a?.errors,
|
|
1417
|
+
fields: l,
|
|
1418
|
+
fieldsErrors: u,
|
|
1419
|
+
formData: a?.formData,
|
|
1420
|
+
invalid: _,
|
|
1421
|
+
readonly: v,
|
|
1422
|
+
clear: a?.clear,
|
|
1423
|
+
reset: a?.reset,
|
|
1424
|
+
submit: a?.submit,
|
|
1425
|
+
validate: a?.validate,
|
|
1426
|
+
validateWrapper: () => a?.validate(void 0, { fields: new Set(l.value.values()) }) ?? Promise.resolve(!0)
|
|
1427
|
+
};
|
|
1428
|
+
},
|
|
1429
|
+
render() {
|
|
1430
|
+
let e = () => this.$slots.default?.({
|
|
1431
|
+
errors: this.errors,
|
|
1432
|
+
fieldsErrors: this.fieldsErrors,
|
|
1433
|
+
formData: this.formData,
|
|
1434
|
+
invalid: this.invalid,
|
|
1435
|
+
readonly: this.readonly,
|
|
1436
|
+
clear: this.clear,
|
|
1437
|
+
reset: this.reset,
|
|
1438
|
+
submit: this.submit,
|
|
1439
|
+
validate: this.validate,
|
|
1440
|
+
validateWrapper: this.validateWrapper
|
|
1441
|
+
});
|
|
1442
|
+
return this.tag ? x(this.tag, null, { default: e }) : e();
|
|
1443
|
+
}
|
|
1444
|
+
});
|
|
1445
|
+
}
|
|
1446
|
+
function Bt(e, t) {
|
|
1447
|
+
let n = i({
|
|
1448
|
+
name: "VvFormTemplate",
|
|
1449
|
+
props: {
|
|
1450
|
+
schema: {
|
|
1451
|
+
type: [Array, Function],
|
|
1452
|
+
required: !0
|
|
1453
|
+
},
|
|
1454
|
+
scope: {
|
|
1455
|
+
type: Object,
|
|
1456
|
+
default: () => ({})
|
|
1457
|
+
}
|
|
1458
|
+
},
|
|
1459
|
+
slots: Object,
|
|
1460
|
+
setup(r, { slots: i }) {
|
|
1461
|
+
let a = b(e);
|
|
1462
|
+
if (a?.formData) return () => {
|
|
1463
|
+
let e = typeof r.schema == "function" ? r.schema(a, r.scope) : r.schema, o, s = e.reduce((e, i) => {
|
|
1464
|
+
let { vvIs: s, vvName: c, vvSlots: l, vvChildren: u, vvIf: d, vvElseIf: f, vvType: p, vvDefaultValue: m, vvShowValid: h, vvContent: g, ..._ } = typeof i == "function" ? i(a, r.scope) : i;
|
|
1465
|
+
if (d !== void 0) {
|
|
1466
|
+
if (o = typeof d == "string" ? !!L(new Object(a.formData.value), d) : F(typeof d == "function" ? d(a) : d), !o) return e;
|
|
1467
|
+
} else if (f !== void 0 && o !== void 0) {
|
|
1468
|
+
if (o || (o = typeof f == "string" ? !!L(new Object(a.formData.value), f) : F(typeof f == "function" ? f(a) : f), !o)) return e;
|
|
1469
|
+
} else o = void 0;
|
|
1470
|
+
let v;
|
|
1471
|
+
return u && (v = typeof s == "string" ? x(n, { schema: u }) : { default: (e) => x(n, {
|
|
1472
|
+
schema: u,
|
|
1473
|
+
scope: e
|
|
1474
|
+
}) }), c ? (e.push(x(t, {
|
|
1475
|
+
name: c,
|
|
1476
|
+
is: s,
|
|
1477
|
+
type: p,
|
|
1478
|
+
defaultValue: m,
|
|
1479
|
+
showValid: h,
|
|
1480
|
+
props: _
|
|
1481
|
+
}, l ?? v ?? g)), e) : s ? (e.push(x(s, _, l ?? v ?? g)), e) : (v && ("default" in v ? e.push(v.default(r.scope)) : e.push(v)), e);
|
|
1482
|
+
}, []);
|
|
1483
|
+
return s.push(i?.default?.({
|
|
1484
|
+
errors: a?.errors.value,
|
|
1485
|
+
formData: a?.formData.value,
|
|
1486
|
+
invalid: a?.invalid.value,
|
|
1487
|
+
status: a?.status.value,
|
|
1488
|
+
submit: a?.submit,
|
|
1489
|
+
validate: a?.validate,
|
|
1490
|
+
clear: a?.clear,
|
|
1491
|
+
reset: a?.reset
|
|
1492
|
+
})), s;
|
|
1493
|
+
};
|
|
1494
|
+
}
|
|
1495
|
+
});
|
|
1496
|
+
return n;
|
|
1497
|
+
}
|
|
1498
|
+
function Vt(e, t = {}) {
|
|
1499
|
+
let n = Symbol("formInjectionKey"), r = Symbol("formWrapperInjectionKey"), i = Symbol("formFieldInjectionKey"), a = Symbol("formFieldsGroupInjectionKey"), o = zt(n, r), s = Lt(n, r, i, t), c = Rt(n, r, a), l = Bt(n, s), u = /* @__PURE__ */ new Map(), { clear: d, errors: f, formData: p, ignoreUpdates: m, invalid: h, readonly: g, reset: _, status: v, stopUpdatesWatch: y, submit: b, validate: x, VvForm: S } = It(e, n, t, l, u);
|
|
1500
|
+
return {
|
|
1501
|
+
clear: d,
|
|
1502
|
+
errors: f,
|
|
1503
|
+
formData: p,
|
|
1504
|
+
formFieldInjectionKey: i,
|
|
1505
|
+
formInjectionKey: n,
|
|
1506
|
+
formWrapperInjectionKey: r,
|
|
1507
|
+
ignoreUpdates: m,
|
|
1508
|
+
invalid: h,
|
|
1509
|
+
readonly: g,
|
|
1510
|
+
reset: _,
|
|
1511
|
+
status: v,
|
|
1512
|
+
stopUpdatesWatch: y,
|
|
1513
|
+
submit: b,
|
|
1514
|
+
validate: x,
|
|
1515
|
+
wrappers: u,
|
|
1516
|
+
VvForm: S,
|
|
1517
|
+
VvFormField: s,
|
|
1518
|
+
VvFormFieldsGroup: c,
|
|
1519
|
+
VvFormTemplate: l,
|
|
1520
|
+
VvFormWrapper: o
|
|
1521
|
+
};
|
|
1522
|
+
}
|
|
1523
|
+
var Ht = Symbol("pluginInjectionKey"), Ut = /* @__PURE__ */ new Map();
|
|
1524
|
+
function Wt(e, t = {}) {
|
|
1525
|
+
if (t.scope && Ut.has(t.scope)) return Ut.get(t.scope);
|
|
1526
|
+
if (!r()) {
|
|
1527
|
+
let n = Vt(e, t);
|
|
1528
|
+
return t.scope && Ut.set(t.scope, n), n;
|
|
1529
|
+
}
|
|
1530
|
+
let n = Vt(e, {
|
|
1531
|
+
...b(Ht, {}),
|
|
1532
|
+
...t
|
|
1533
|
+
});
|
|
1534
|
+
return t.scope && Ut.set(t.scope, n), n;
|
|
1535
|
+
}
|
|
1536
|
+
//#endregion
|
|
1537
|
+
//#region ../../packages/components/src/composables/useLocalizedString.ts
|
|
1538
|
+
function Gt(e, t) {
|
|
1539
|
+
let { locale: n, t: r, te: i } = ee({ useScope: "global" });
|
|
1540
|
+
return p(() => {
|
|
1541
|
+
let a = M(e), o = t !== void 0 && i(t) ? r(t) : void 0;
|
|
1542
|
+
return a && a[n.value] || o;
|
|
1543
|
+
});
|
|
1544
|
+
}
|
|
1545
|
+
//#endregion
|
|
1546
|
+
//#region ../../packages/components/src/chat/PkToolShowContactForm.vue?vue&type=script&setup=true&lang.ts
|
|
1547
|
+
var Kt = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" }, qt = { class: "px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40" }, Jt = { class: "font-bold" }, Yt = {
|
|
1548
|
+
key: 0,
|
|
1549
|
+
class: "p-sm"
|
|
1550
|
+
}, Xt = { class: "flex justify-between items-center gap-16 mt-xs" }, Zt = { class: "text-smaller text-word-3 flex items-center gap-8" }, Qt = {
|
|
1551
|
+
key: 1,
|
|
1552
|
+
class: "p-sm"
|
|
1553
|
+
}, $t = { class: "flex items-center gap-sm" }, en = { class: "font-semibold block text-success" }, tn = { class: "text-word-3" }, nn = /* @__PURE__ */ i({
|
|
1554
|
+
__name: "PkToolShowContactForm",
|
|
1555
|
+
props: {
|
|
1556
|
+
part: { type: null },
|
|
1557
|
+
submitted: { type: Boolean },
|
|
1558
|
+
loading: { type: Boolean },
|
|
1559
|
+
error: { type: String },
|
|
1560
|
+
readonly: { type: Boolean },
|
|
1561
|
+
privacyPolicyNotice: { type: null }
|
|
1562
|
+
},
|
|
1563
|
+
emits: ["submit"],
|
|
1564
|
+
setup(e, { emit: n }) {
|
|
1565
|
+
let { t: r } = ee({ useScope: "global" }), i = e, a = p(() => i.part), s = p(() => a.value.input), c = ft(p(() => `${a.value.toolCallId}-${a.value.type}-submitted`), !1), l = le({
|
|
1566
|
+
name: ue().min(1).max(255).default(""),
|
|
1567
|
+
email: ce().max(255).default(""),
|
|
1568
|
+
phone: ue().max(50).regex(/^[+0-9\s\-.()]*$/, r("validation.invalidPhoneNumber")).optional()
|
|
1569
|
+
}), u = n, { VvForm: d, VvFormField: m, formData: h } = Wt(l, { lazyLoad: !0 });
|
|
1570
|
+
f(s, (e) => {
|
|
1571
|
+
h.value = {
|
|
1572
|
+
name: e?.name || "",
|
|
1573
|
+
email: e?.email || "",
|
|
1574
|
+
phone: e?.phone || ""
|
|
1575
|
+
};
|
|
1576
|
+
}, { immediate: !0 }), f(() => i.submitted, (e) => {
|
|
1577
|
+
e && (c.value = !0);
|
|
1578
|
+
}, { immediate: !0 });
|
|
1579
|
+
let g = p(() => i.submitted || c.value), _ = async (e) => {
|
|
1580
|
+
u("submit", {
|
|
1581
|
+
...e,
|
|
1582
|
+
metadata: s.value?.conversationContext
|
|
1583
|
+
});
|
|
1584
|
+
}, v = Gt(() => i.privacyPolicyNotice, "message.defaultPrivacyPolicyNotice");
|
|
1585
|
+
return (n, i) => {
|
|
1586
|
+
let a = re, s = ne;
|
|
1587
|
+
return I(), P("div", Kt, [j("div", qt, [N(a, {
|
|
1588
|
+
name: "ri:send-plane-2-line",
|
|
1589
|
+
class: "text-16"
|
|
1590
|
+
}), j("strong", Jt, o(F(r)("label.contactUs")), 1)]), N(T, { mode: "out-in" }, {
|
|
1591
|
+
default: t(() => [g.value ? (I(), P("div", Qt, [j("div", $t, [N(a, {
|
|
1592
|
+
name: "ri:mail-check-line",
|
|
1593
|
+
class: "text-24 text-success"
|
|
1594
|
+
}), j("div", null, [j("strong", en, o(F(r)("message.leadSubmittedTitle")), 1), j("p", tn, o(F(r)("message.leadSubmittedMessage")), 1)])])])) : (I(), P("div", Yt, [N(F(d), {
|
|
1595
|
+
modelValue: F(h),
|
|
1596
|
+
"onUpdate:modelValue": i[0] ||= (e) => k(h) ? h.value = e : null,
|
|
1597
|
+
readonly: e.readonly,
|
|
1598
|
+
onSubmit: _
|
|
1599
|
+
}, {
|
|
1600
|
+
default: t(() => [
|
|
1601
|
+
N(F(m), {
|
|
1602
|
+
name: "name",
|
|
1603
|
+
type: "text",
|
|
1604
|
+
label: F(r)("label.name"),
|
|
1605
|
+
placeholder: F(r)("placeholder.name"),
|
|
1606
|
+
icon: "ri:user-line",
|
|
1607
|
+
modifiers: "compact no-label",
|
|
1608
|
+
class: "mb-md"
|
|
1609
|
+
}, null, 8, ["label", "placeholder"]),
|
|
1610
|
+
N(F(m), {
|
|
1611
|
+
name: "email",
|
|
1612
|
+
type: "email",
|
|
1613
|
+
label: F(r)("label.email"),
|
|
1614
|
+
placeholder: F(r)("placeholder.email"),
|
|
1615
|
+
icon: "ri:mail-line",
|
|
1616
|
+
modifiers: "compact no-label",
|
|
1617
|
+
class: "mb-md"
|
|
1618
|
+
}, null, 8, ["label", "placeholder"]),
|
|
1619
|
+
N(F(m), {
|
|
1620
|
+
name: "phone",
|
|
1621
|
+
type: "tel",
|
|
1622
|
+
label: F(r)("label.phone"),
|
|
1623
|
+
placeholder: F(r)("placeholder.phone"),
|
|
1624
|
+
icon: "ri:phone-line",
|
|
1625
|
+
class: "mb-md",
|
|
1626
|
+
modifiers: "compact no-label"
|
|
1627
|
+
}, null, 8, ["label", "placeholder"]),
|
|
1628
|
+
j("div", Xt, [j("div", Zt, [N(a, {
|
|
1629
|
+
name: "ri:shield-check-line",
|
|
1630
|
+
class: "text-16 shrink-0"
|
|
1631
|
+
}), N(me, {
|
|
1632
|
+
markdown: F(v),
|
|
1633
|
+
class: "wysiwyg"
|
|
1634
|
+
}, null, 8, ["markdown"])]), N(s, {
|
|
1635
|
+
type: "submit",
|
|
1636
|
+
modifiers: "primary",
|
|
1637
|
+
loading: e.loading,
|
|
1638
|
+
disabled: e.loading || e.readonly,
|
|
1639
|
+
"icon-position": "right",
|
|
1640
|
+
class: "shrink-0",
|
|
1641
|
+
label: F(r)("action.submit")
|
|
1642
|
+
}, null, 8, [
|
|
1643
|
+
"loading",
|
|
1644
|
+
"disabled",
|
|
1645
|
+
"label"
|
|
1646
|
+
])])
|
|
1647
|
+
]),
|
|
1648
|
+
_: 1
|
|
1649
|
+
}, 8, ["modelValue", "readonly"])]))]),
|
|
1650
|
+
_: 1
|
|
1651
|
+
})]);
|
|
1652
|
+
};
|
|
1653
|
+
}
|
|
1654
|
+
}), rn = /* @__PURE__ */ e({ default: () => an }), an = nn;
|
|
1655
|
+
//#endregion
|
|
1656
|
+
export { ot as _, ft as a, ct as b, q as c, Fe as d, Le as f, nt as g, tt as h, Wt as i, ut as l, $e as m, rn as n, J as o, Ue as p, Gt as r, dt as s, an as t, K as u, Be as v, ke as x, Qe as y };
|
|
1657
|
+
|
|
1658
|
+
//# sourceMappingURL=PkToolShowContactForm-CqoSVvjG.js.map
|