@ckeditor/ckeditor5-ai 46.1.1 → 47.0.0-alpha.1
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/LICENSE.md +18 -5
- package/README.md +10 -9
- package/build/ai.js +2 -2
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/ast.js +1 -1
- package/build/translations/az.js +1 -1
- package/build/translations/be.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/bs.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de-ch.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/en-gb.js +1 -1
- package/build/translations/eo.js +1 -1
- package/build/translations/es-co.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/eu.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/gu.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/hy.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/jv.js +1 -1
- package/build/translations/kk.js +1 -1
- package/build/translations/km.js +1 -1
- package/build/translations/kn.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/ku.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nb.js +1 -1
- package/build/translations/ne.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/oc.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/si.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sl.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/ti.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/uz.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/ckeditor5-metadata.json +24 -3
- package/dist/index-content.css +0 -1
- package/dist/index-editor.css +2742 -0
- package/dist/index.css +3141 -0
- package/dist/index.js +4 -2
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/lang/contexts.json +163 -1
- package/lang/translations/af.po +612 -0
- package/lang/translations/ar.po +628 -0
- package/lang/translations/ast.po +612 -0
- package/lang/translations/az.po +612 -0
- package/lang/translations/be.po +616 -0
- package/lang/translations/bg.po +612 -0
- package/lang/translations/bn.po +612 -0
- package/lang/translations/bs.po +616 -0
- package/lang/translations/ca.po +612 -0
- package/lang/translations/cs.po +616 -0
- package/lang/translations/da.po +612 -0
- package/lang/translations/de-ch.po +612 -0
- package/lang/translations/de.po +612 -0
- package/lang/translations/el.po +612 -0
- package/lang/translations/en-au.po +612 -0
- package/lang/translations/en-gb.po +612 -0
- package/lang/translations/en.po +612 -0
- package/lang/translations/eo.po +612 -0
- package/lang/translations/es-co.po +612 -0
- package/lang/translations/es.po +612 -0
- package/lang/translations/et.po +612 -0
- package/lang/translations/eu.po +612 -0
- package/lang/translations/fa.po +608 -0
- package/lang/translations/fi.po +612 -0
- package/lang/translations/fr.po +612 -0
- package/lang/translations/gl.po +612 -0
- package/lang/translations/gu.po +612 -0
- package/lang/translations/he.po +612 -0
- package/lang/translations/hi.po +612 -0
- package/lang/translations/hr.po +616 -0
- package/lang/translations/hu.po +612 -0
- package/lang/translations/hy.po +612 -0
- package/lang/translations/id.po +608 -0
- package/lang/translations/it.po +612 -0
- package/lang/translations/ja.po +608 -0
- package/lang/translations/jv.po +612 -0
- package/lang/translations/kk.po +612 -0
- package/lang/translations/km.po +608 -0
- package/lang/translations/kn.po +612 -0
- package/lang/translations/ko.po +608 -0
- package/lang/translations/ku.po +612 -0
- package/lang/translations/lt.po +616 -0
- package/lang/translations/lv.po +616 -0
- package/lang/translations/ms.po +608 -0
- package/lang/translations/nb.po +612 -0
- package/lang/translations/ne.po +612 -0
- package/lang/translations/nl.po +612 -0
- package/lang/translations/no.po +612 -0
- package/lang/translations/oc.po +612 -0
- package/lang/translations/pl.po +616 -0
- package/lang/translations/pt-br.po +612 -0
- package/lang/translations/pt.po +612 -0
- package/lang/translations/ro.po +616 -0
- package/lang/translations/ru.po +616 -0
- package/lang/translations/si.po +612 -0
- package/lang/translations/sk.po +616 -0
- package/lang/translations/sl.po +620 -0
- package/lang/translations/sq.po +612 -0
- package/lang/translations/sr-latn.po +616 -0
- package/lang/translations/sr.po +616 -0
- package/lang/translations/sv.po +612 -0
- package/lang/translations/th.po +608 -0
- package/lang/translations/ti.po +612 -0
- package/lang/translations/tk.po +612 -0
- package/lang/translations/tr.po +612 -0
- package/lang/translations/tt.po +608 -0
- package/lang/translations/ug.po +608 -0
- package/lang/translations/uk.po +616 -0
- package/lang/translations/ur.po +612 -0
- package/lang/translations/uz.po +612 -0
- package/lang/translations/vi.po +608 -0
- package/lang/translations/zh-cn.po +608 -0
- package/lang/translations/zh.po +608 -0
- package/package.json +23 -11
- package/src/aiactions/aiactions.d.ts +48 -0
- package/src/aiactions/aiactions.js +23 -0
- package/src/aiactions/model/aiactionsinteraction.d.ts +48 -0
- package/src/aiactions/model/aiactionsinteraction.js +23 -0
- package/src/aiactions/model/aiactionsreply.d.ts +15 -0
- package/src/aiactions/model/aiactionsreply.js +23 -0
- package/src/{adapters → aiassistant/adapters}/aiadapter.d.ts +1 -1
- package/src/aiassistant/adapters/aiadapter.js +23 -0
- package/src/{adapters → aiassistant/adapters}/aitextadapter.d.ts +9 -9
- package/src/aiassistant/adapters/aitextadapter.js +23 -0
- package/src/{adapters → aiassistant/adapters}/awstextadapter.d.ts +36 -23
- package/src/aiassistant/adapters/awstextadapter.js +23 -0
- package/src/{adapters → aiassistant/adapters}/openaitextadapter.d.ts +38 -25
- package/src/aiassistant/adapters/openaitextadapter.js +23 -0
- package/src/{aiassistant.d.ts → aiassistant/aiassistant.d.ts} +54 -13
- package/src/aiassistant/aiassistant.js +23 -0
- package/src/aiassistant/aiassistantediting.js +23 -0
- package/src/{aiassistantui.d.ts → aiassistant/aiassistantui.d.ts} +4 -4
- package/src/aiassistant/aiassistantui.js +23 -0
- package/src/{legacyerrors.js → aiassistant/legacyerrors.js} +1 -1
- package/src/{ui → aiassistant/ui}/aiassistantcontroller.d.ts +5 -4
- package/src/aiassistant/ui/aiassistantcontroller.js +24 -0
- package/src/{ui → aiassistant/ui}/form/aiformcontentarea.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformcontentarea.js +23 -0
- package/src/aiassistant/ui/form/aiformerrorview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aiformpromptview.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformpromptview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aiformtoolbarview.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformtoolbarview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aiformview.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aihistorylistitemview.d.ts +1 -1
- package/src/aiassistant/ui/form/aihistorylistitemview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aihistorylistview.d.ts +1 -1
- package/src/aiassistant/ui/form/aihistorylistview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/prompthistory.d.ts +3 -0
- package/src/aiassistant/ui/form/prompthistory.js +23 -0
- package/src/{ui → aiassistant/ui}/showaiassistantcommand.d.ts +2 -2
- package/src/aiassistant/ui/showaiassistantcommand.js +23 -0
- package/src/{utils → aiassistant/utils}/common-translations.d.ts +1 -1
- package/src/{utils → aiassistant/utils}/common-translations.js +1 -1
- package/src/{utils → aiassistant/utils}/normalizecommandsconfig.d.ts +2 -2
- package/src/{utils → aiassistant/utils}/normalizecommandsconfig.js +1 -1
- package/src/aiballoon/aiballoon.d.ts +72 -0
- package/src/aiballoon/aiballoon.js +23 -0
- package/src/aiballoon/ui/aiballoondisclaimerview.d.ts +17 -0
- package/src/aiballoon/ui/aiballoondisclaimerview.js +23 -0
- package/src/aiballoon/ui/aiballoontoolbarview.d.ts +31 -0
- package/src/aiballoon/ui/aiballoontoolbarview.js +23 -0
- package/src/aiballoon/ui/aiballoonview.d.ts +109 -0
- package/src/aiballoon/ui/aiballoonview.js +23 -0
- package/src/aichat/aichat.d.ts +79 -0
- package/src/aichat/aichat.js +23 -0
- package/src/aichat/aichatcontroller.d.ts +68 -0
- package/src/aichat/aichatcontroller.js +23 -0
- package/src/aichat/aichatui.d.ts +297 -0
- package/src/aichat/aichatui.js +23 -0
- package/src/aichat/model/aichatcontext.d.ts +360 -0
- package/src/aichat/model/aichatcontext.js +23 -0
- package/src/aichat/model/aichatconversation.d.ts +270 -0
- package/src/aichat/model/aichatconversation.js +23 -0
- package/src/aichat/model/aichatinteraction.d.ts +46 -0
- package/src/aichat/model/aichatinteraction.js +23 -0
- package/src/aichat/model/aichatmodels.d.ts +77 -0
- package/src/aichat/model/aichatmodels.js +23 -0
- package/src/aichat/ui/aichatcontrolsview.d.ts +98 -0
- package/src/aichat/ui/aichatcontrolsview.js +23 -0
- package/src/aichat/ui/aichatfeedview.d.ts +114 -0
- package/src/aichat/ui/aichatfeedview.js +23 -0
- package/src/aichat/ui/aichatheaderview.d.ts +29 -0
- package/src/aichat/ui/aichatheaderview.js +23 -0
- package/src/aichat/ui/aichatview.d.ts +37 -0
- package/src/aichat/ui/aichatview.js +23 -0
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.d.ts +71 -0
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +23 -0
- package/src/aichat/ui/controls/aichatcontextitembuttonview.d.ts +46 -0
- package/src/aichat/ui/controls/aichatcontextitembuttonview.js +23 -0
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.d.ts +89 -0
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +23 -0
- package/src/aichat/ui/controls/aichatcontextpanelview.d.ts +105 -0
- package/src/aichat/ui/controls/aichatcontextpanelview.js +23 -0
- package/src/aichat/ui/controls/aichatcontrolsloaderview.d.ts +12 -0
- package/src/aichat/ui/controls/aichatcontrolsloaderview.js +23 -0
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.d.ts +89 -0
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +23 -0
- package/src/aichat/ui/controls/aichatpromptinputview.d.ts +44 -0
- package/src/aichat/ui/controls/aichatpromptinputview.js +23 -0
- package/src/aichat/ui/controls/aichatpromptsuggestionslistview.d.ts +17 -0
- package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourcelistitemview.d.ts +61 -0
- package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.d.ts +100 -0
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourceslistview.d.ts +49 -0
- package/src/aichat/ui/controls/resources/aichatresourceslistview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.d.ts +61 -0
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourcesview.d.ts +54 -0
- package/src/aichat/ui/controls/resources/aichatresourcesview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.d.ts +27 -0
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +23 -0
- package/src/aichat/ui/feed/aichatfeederroritemview.d.ts +39 -0
- package/src/aichat/ui/feed/aichatfeederroritemview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.d.ts +29 -0
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +23 -0
- package/src/aichat/ui/feed/aichatfeeditemview.d.ts +46 -0
- package/src/aichat/ui/feed/aichatfeeditemview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedreplyitemview.d.ts +46 -0
- package/src/aichat/ui/feed/aichatfeedreplyitemview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.d.ts +74 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.d.ts +74 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedusermessageitem.d.ts +40 -0
- package/src/aichat/ui/feed/aichatfeedusermessageitem.js +23 -0
- package/src/aichat/utils/eventnames.d.ts +5 -0
- package/src/aichat/utils/eventnames.js +23 -0
- package/src/aichat/utils/promisequeue.d.ts +32 -0
- package/src/aichat/utils/promisequeue.js +23 -0
- package/src/aichat/utils/scrollmanager.d.ts +23 -0
- package/src/aichat/utils/scrollmanager.js +23 -0
- package/src/aichathistory/aichathistory.d.ts +30 -0
- package/src/aichathistory/aichathistory.js +23 -0
- package/src/aichathistory/aichathistorycontroller.d.ts +40 -0
- package/src/aichathistory/aichathistorycontroller.js +23 -0
- package/src/aichathistory/aichathistoryui.d.ts +112 -0
- package/src/aichathistory/aichathistoryui.js +23 -0
- package/src/aichathistory/model/aichathistoryconversations.d.ts +114 -0
- package/src/aichathistory/model/aichathistoryconversations.js +23 -0
- package/src/aichathistory/model/aichathistoryitem.d.ts +59 -0
- package/src/aichathistory/model/aichathistoryitem.js +23 -0
- package/src/aichathistory/ui/aichathistorylistitemview.d.ts +42 -0
- package/src/aichathistory/ui/aichathistorylistitemview.js +23 -0
- package/src/aichathistory/ui/aichathistorylistview.d.ts +31 -0
- package/src/aichathistory/ui/aichathistorylistview.js +23 -0
- package/src/aichathistory/ui/aichathistorysectionlistview.d.ts +17 -0
- package/src/aichathistory/ui/aichathistorysectionlistview.js +23 -0
- package/src/aichathistory/ui/aichathistoryview.d.ts +41 -0
- package/src/aichathistory/ui/aichathistoryview.js +23 -0
- package/src/aiconfig.d.ts +92 -30
- package/src/aicore/aiconnector.d.ts +302 -0
- package/src/aicore/aiconnector.js +23 -0
- package/src/aicore/aiediting.d.ts +61 -0
- package/src/aicore/aiediting.js +23 -0
- package/src/aicore/model/aicapabilities.d.ts +55 -0
- package/src/aicore/model/aicapabilities.js +23 -0
- package/src/aicore/model/aicontext.d.ts +53 -0
- package/src/aicore/model/aicontext.js +23 -0
- package/src/aicore/model/aiinteraction.d.ts +135 -0
- package/src/aicore/model/aiinteraction.js +23 -0
- package/src/aicore/model/aireply.d.ts +178 -0
- package/src/aicore/model/aireply.js +23 -0
- package/src/aicore/pipeline/airesponseapplier.d.ts +291 -0
- package/src/aicore/pipeline/airesponseapplier.js +24 -0
- package/src/aicore/pipeline/airesponseparser.d.ts +27 -0
- package/src/aicore/pipeline/airesponseparser.js +24 -0
- package/src/aicore/ui/aidisclaimerview.d.ts +17 -0
- package/src/aicore/ui/aidisclaimerview.js +23 -0
- package/src/aicore/ui/aiskeleton.d.ts +37 -0
- package/src/aicore/ui/aiskeleton.js +23 -0
- package/src/aicore/ui/aispinner.d.ts +14 -0
- package/src/aicore/ui/aispinner.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.d.ts +62 -0
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.d.ts +38 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.d.ts +80 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.d.ts +39 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.d.ts +39 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +23 -0
- package/src/aicore/utils/common-translations.d.ts +9 -0
- package/src/aicore/utils/common-translations.js +23 -0
- package/src/aicore/utils/createresizebutton.d.ts +12 -0
- package/src/aicore/utils/createresizebutton.js +23 -0
- package/src/aicore/utils/documentposition.d.ts +41 -0
- package/src/aicore/utils/documentposition.js +23 -0
- package/src/aicore/utils/documentrange.d.ts +46 -0
- package/src/aicore/utils/documentrange.js +23 -0
- package/src/aicore/utils/eventnames.d.ts +9 -0
- package/src/aicore/utils/eventnames.js +23 -0
- package/src/aicore/utils/geteditorfromcontext.d.ts +6 -0
- package/src/aicore/utils/geteditorfromcontext.js +23 -0
- package/src/aicore/utils/getoperationsfromreply.d.ts +21 -0
- package/src/aicore/utils/getoperationsfromreply.js +23 -0
- package/src/aicore/utils/getsuggestionpartsfromreply.d.ts +19 -0
- package/src/aicore/utils/getsuggestionpartsfromreply.js +23 -0
- package/src/aicore/utils/htmlparser.d.ts +35 -0
- package/src/aicore/utils/htmlparser.js +23 -0
- package/src/aicore/utils/htmlstreamer.d.ts +123 -0
- package/src/aicore/utils/htmlstreamer.js +23 -0
- package/src/aiquickactions/aiquickactions.d.ts +41 -0
- package/src/aiquickactions/aiquickactions.js +23 -0
- package/src/aiquickactions/aiquickactionscommand.d.ts +12 -0
- package/src/aiquickactions/aiquickactionscommand.js +23 -0
- package/src/aiquickactions/aiquickactionsediting.d.ts +23 -0
- package/src/aiquickactions/aiquickactionsediting.js +23 -0
- package/src/aiquickactions/aiquickactionsui.d.ts +150 -0
- package/src/aiquickactions/aiquickactionsui.js +23 -0
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.d.ts +30 -0
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +23 -0
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.d.ts +45 -0
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +23 -0
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.d.ts +45 -0
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +23 -0
- package/src/aiquickactions/utils/common-translations.d.ts +9 -0
- package/src/aiquickactions/utils/common-translations.js +23 -0
- package/src/aireviewmode/aireviewmode.d.ts +30 -0
- package/src/aireviewmode/aireviewmode.js +23 -0
- package/src/aireviewmode/aireviewmodecontroller.d.ts +32 -0
- package/src/aireviewmode/aireviewmodecontroller.js +23 -0
- package/src/aireviewmode/aireviewmodeediting.d.ts +129 -0
- package/src/aireviewmode/aireviewmodeediting.js +23 -0
- package/src/aireviewmode/aireviewmodeui.d.ts +73 -0
- package/src/aireviewmode/aireviewmodeui.js +23 -0
- package/src/aireviewmode/model/aireviewcheck.d.ts +60 -0
- package/src/aireviewmode/model/aireviewcheck.js +23 -0
- package/src/aireviewmode/model/aireviewcheckcustom.d.ts +17 -0
- package/src/aireviewmode/model/aireviewcheckcustom.js +23 -0
- package/src/aireviewmode/model/aireviewchecklist.d.ts +31 -0
- package/src/aireviewmode/model/aireviewchecklist.js +23 -0
- package/src/aireviewmode/model/aireviewcheckresult.d.ts +39 -0
- package/src/aireviewmode/model/aireviewcheckresult.js +23 -0
- package/src/aireviewmode/model/aireviewcheckresultchange.d.ts +42 -0
- package/src/aireviewmode/model/aireviewcheckresultchange.js +23 -0
- package/src/aireviewmode/model/aireviewcheckrun.d.ts +102 -0
- package/src/aireviewmode/model/aireviewcheckrun.js +23 -0
- package/src/aireviewmode/model/aireviewcustomcheckrun.d.ts +18 -0
- package/src/aireviewmode/model/aireviewcustomcheckrun.js +23 -0
- package/src/aireviewmode/model/aireviewmodels.d.ts +26 -0
- package/src/aireviewmode/model/aireviewmodels.js +23 -0
- package/src/aireviewmode/model/aireviewsystemcheckrun.d.ts +14 -0
- package/src/aireviewmode/model/aireviewsystemcheckrun.js +23 -0
- package/src/aireviewmode/ui/aireviemodepromptinputview.d.ts +29 -0
- package/src/aireviewmode/ui/aireviemodepromptinputview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.d.ts +46 -0
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.d.ts +23 -0
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewchecklistview.d.ts +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.d.ts +80 -0
- package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.d.ts +45 -0
- package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewcompletedview.d.ts +18 -0
- package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodeview.d.ts +42 -0
- package/src/aireviewmode/ui/aireviewmodeview.js +23 -0
- package/src/aireviewmode/ui/form/aireviewmodeformamanager.d.ts +16 -0
- package/src/aireviewmode/ui/form/aireviewmodeformamanager.js +23 -0
- package/src/aireviewmode/ui/form/aireviewmodeformdropdown.d.ts +20 -0
- package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +23 -0
- package/src/aireviewmode/ui/form/aireviewmodeformmanager.d.ts +16 -0
- package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +23 -0
- package/src/aireviewmode/utils/common-translations.d.ts +9 -0
- package/src/aireviewmode/utils/common-translations.js +23 -0
- package/src/aitabs/aitabs.d.ts +92 -0
- package/src/aitabs/aitabs.js +23 -0
- package/src/aitabs/aitabsmainview.d.ts +45 -0
- package/src/aitabs/aitabsmainview.js +23 -0
- package/src/aitabs/tabs/aitabsview.d.ts +147 -0
- package/src/aitabs/tabs/aitabsview.js +23 -0
- package/src/aitabs/tabs/tabbuttonview.d.ts +47 -0
- package/src/aitabs/tabs/tabbuttonview.js +23 -0
- package/src/aitabs/tabs/tabpanelview.d.ts +44 -0
- package/src/aitabs/tabs/tabpanelview.js +23 -0
- package/src/augmentation.d.ts +22 -6
- package/src/index.d.ts +40 -9
- package/src/index.js +1 -1
- package/theme/aiballoon/aiballoon.css +207 -0
- package/theme/aichat/aichat-controls/aichat-context-chip.css +139 -0
- package/theme/aichat/aichat-controls/aichat-context-controls-balloon-panels.css +194 -0
- package/theme/aichat/aichat-controls/aichat-context-controls.css +46 -0
- package/theme/aichat/aichat-controls/aichat-controls-button.css +74 -0
- package/theme/aichat/aichat-controls/aichat-controls-loader.css +93 -0
- package/theme/aichat/aichat-controls/prompt-capabilities.css +46 -0
- package/theme/aichat/aichat-controls/prompt-input.css +55 -0
- package/theme/aichat/aichat-controls.css +154 -0
- package/theme/aichat/aichat.css +68 -0
- package/theme/aichat/aichatfeed.css +376 -0
- package/theme/aichat/aichathistory.css +235 -0
- package/theme/aichat/aiminitoolbar.css +94 -0
- package/theme/aichat/aisuggestioncontainer.css +203 -0
- package/theme/aiquickactions/aiquickactions.css +43 -0
- package/theme/aireviewmode/aireviewmode-check-list.css +255 -0
- package/theme/aireviewmode/aireviewmode-check-run.css +202 -0
- package/theme/aireviewmode/aireviewmode-review-completed.css +52 -0
- package/theme/aireviewmode/aireviewmode.css +73 -0
- package/theme/aitabs/aitabsview.css +64 -0
- package/theme/aitabs/tabs/tabbuttonview.css +74 -0
- package/theme/aitabs/tabs/tabsview.css +78 -0
- package/theme/common/aibutton.css +145 -0
- package/theme/common/aichaterror.css +61 -0
- package/theme/common/aidisclaimer.css +29 -0
- package/theme/common/aiheader.css +88 -0
- package/theme/common/aiskeleton.css +54 -0
- package/theme/common/aispinner.css +58 -0
- package/src/adapters/aiadapter.js +0 -23
- package/src/adapters/aitextadapter.js +0 -23
- package/src/adapters/awstextadapter.js +0 -23
- package/src/adapters/openaitextadapter.js +0 -23
- package/src/aiassistant.js +0 -23
- package/src/aiassistantediting.js +0 -23
- package/src/aiassistantui.js +0 -23
- package/src/ui/aiassistantcontroller.js +0 -24
- package/src/ui/form/aiformcontentarea.js +0 -23
- package/src/ui/form/aiformerrorview.js +0 -23
- package/src/ui/form/aiformpromptview.js +0 -23
- package/src/ui/form/aiformtoolbarview.js +0 -23
- package/src/ui/form/aiformview.js +0 -23
- package/src/ui/form/aihistorylistitemview.js +0 -23
- package/src/ui/form/aihistorylistview.js +0 -23
- package/src/ui/form/prompthistory.js +0 -23
- package/src/ui/showaiassistantcommand.js +0 -23
- /package/src/{aiassistantediting.d.ts → aiassistant/aiassistantediting.d.ts} +0 -0
- /package/src/{legacyerrors.d.ts → aiassistant/legacyerrors.d.ts} +0 -0
- /package/src/{ui → aiassistant/ui}/form/aiformerrorview.d.ts +0 -0
- /package/theme/{ai-dropdown.css → aiassistant/ai-dropdown.css} +0 -0
- /package/theme/{ai-form.css → aiassistant/ai-form.css} +0 -0
- /package/theme/{ai.css → aiassistant/ai.css} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x4ca999=_0x3613;(function(_0x4ae133,_0x2b3987){const _0x20e0a5=_0x3613,_0x51860=_0x4ae133();while(!![]){try{const _0x5371d7=-parseInt(_0x20e0a5(0x117))/0x1+-parseInt(_0x20e0a5(0x129))/0x2+-parseInt(_0x20e0a5(0xf2))/0x3+parseInt(_0x20e0a5(0xee))/0x4*(-parseInt(_0x20e0a5(0xed))/0x5)+parseInt(_0x20e0a5(0xeb))/0x6*(-parseInt(_0x20e0a5(0x12a))/0x7)+-parseInt(_0x20e0a5(0x112))/0x8*(-parseInt(_0x20e0a5(0xf9))/0x9)+parseInt(_0x20e0a5(0x10e))/0xa*(parseInt(_0x20e0a5(0x100))/0xb);if(_0x5371d7===_0x2b3987)break;else _0x51860['push'](_0x51860['shift']());}catch(_0x54a756){_0x51860['push'](_0x51860['shift']());}}}(_0x3a3f,0xcc6c3));import{ObservableMixin as _0x45b996,uid as _0x1702cf}from'ckeditor5/src/utils.js';import{Element as _0x4394a9,findAll as _0x242c54,getAttribute as _0x4f0e57,getParents as _0x3e7a1f,Document as _0x1e6d80,parse as _0xceeb73,Text as _0x37f61f}from'../utils/htmlparser.js';function _0x3613(_0x283a40,_0x41dd25){const _0x3a3f88=_0x3a3f();return _0x3613=function(_0x3613d1,_0x3c8cc0){_0x3613d1=_0x3613d1-0xeb;let _0xe3a54=_0x3a3f88[_0x3613d1];return _0xe3a54;},_0x3613(_0x283a40,_0x41dd25);}import{AIResponseParser as _0x4ada36}from'../pipeline/airesponseparser.js';import{AIResponseApplier as _0x1c6aeb}from'../pipeline/airesponseapplier.js';export const AI_REPLY_TYPES=[_0x4ca999(0xef),_0x4ca999(0x102)];function _0x3a3f(){const _0x1a1acd=['color:\x20#808080;\x20font-style:\x20italic','updateChangeGroups','cloneNode','change:content','state','content','isDone','data-id','context','every','removedNodeIds','onContentChange','previousSibling','aiResponseParser','pending','merge','set','2373190FYQfOK','76503TFReoE','span','modified','conversation-title','node','removed','interactionId','newNodeIds','data-unstable','parseAndNormalizeHTML','252pJrckc','changeGroups','468070eMIIBp','16WMhDOJ','modification-delta','forEach','setChangeGroupState','1523619CAomlS','type','source','modifiedNodeIds','replyChangeGroupStateUpdated','replyContentUpdated','destroy','27SKDrdw','stopListening','map','changes','parsedContent','editor','done','55sPawoo','areActionsDisabled','text-delta','Removed\x20content.\x20Use\x20\x22Show\x20changes\x22\x20to\x20learn\x20more.','convertMarkdownToHTML','push','documentContextContent','nextSibling','length','appendContent','fire','index','values','reasoning','7654470rBXEcA','new','filter','sources','3191336WEXSGt','parsedMergedContent','aiResponseApplier','includes','unshift','1658729iFfFqp'];_0x3a3f=function(){return _0x1a1acd;};return _0x3a3f();}export const AI_REPLY_TYPES_IGNORED=[_0x4ca999(0x10d)];export const AI_REPLY_TITLE_TYPE=_0x4ca999(0x12d);export class AIReply extends _0x45b996(){['id'];[_0x4ca999(0x130)];[_0x4ca999(0xf3)];[_0x4ca999(0x111)]=[];[_0x4ca999(0xfd)]=new _0x1e6d80([]);[_0x4ca999(0x113)]=new _0x1e6d80([]);[_0x4ca999(0xec)]=[];[_0x4ca999(0x101)]=!0x1;[_0x4ca999(0x106)];[_0x4ca999(0x125)];[_0x4ca999(0x114)];[_0x4ca999(0xfe)];constructor({type:_0x247a3d,content:_0x3d4e94='',isDone:_0x4dcfe1=!0x1,interactionId:_0x3649cb,areActionsDisabled:_0xbc64d0,documentContextContent:_0x5c7cf8,editor:_0x537642}){const _0x2eb07b=_0x4ca999;super(),this['id']=_0x1702cf(),this[_0x2eb07b(0x130)]=_0x3649cb,this[_0x2eb07b(0xf3)]=_0x247a3d,this[_0x2eb07b(0x101)]=!!_0xbc64d0,this[_0x2eb07b(0xfe)]=_0x537642,this[_0x2eb07b(0x125)]=new _0x4ada36(),this[_0x2eb07b(0x114)]=new _0x1c6aeb(),this[_0x2eb07b(0x106)]=_0xceeb73(_0x5c7cf8||''),this[_0x2eb07b(0x128)](_0x2eb07b(0x11e),_0x4dcfe1),this['on'](_0x2eb07b(0x11b),()=>{const _0x4054dc=_0x2eb07b;this[_0x4054dc(0x123)]();}),this[_0x2eb07b(0x128)](_0x2eb07b(0x11d),_0x3d4e94);}[_0x4ca999(0x109)](_0x42f040){const _0x551648=_0x4ca999;this[_0x551648(0x128)](_0x551648(0x11d),this[_0x551648(0x11d)]+_0x42f040);}[_0x4ca999(0xff)](){const _0x43e29b=_0x4ca999;this[_0x43e29b(0x11e)]||(this[_0x43e29b(0x128)](_0x43e29b(0x11e),!0x0),this[_0x43e29b(0x123)]());}[_0x4ca999(0xf8)](){const _0x32aa40=_0x4ca999;this[_0x32aa40(0xfa)]();}[_0x4ca999(0xf1)](_0x38a9f3,_0x2a8940){const _0x44e15d=_0x4ca999;this[_0x44e15d(0xec)][_0x38a9f3][_0x44e15d(0x11c)]=_0x2a8940,this[_0x44e15d(0x10a)](_0x44e15d(0xf6),{'reply':this,'index':_0x38a9f3,'state':_0x2a8940});}[_0x4ca999(0x123)](){const _0x4b0019=_0x4ca999;if(_0x4b0019(0xef)===this[_0x4b0019(0xf3)]){this[_0x4b0019(0xfd)]=this[_0x4b0019(0x125)][_0x4b0019(0x133)](this[_0x4b0019(0x11d)]);const _0x3e1bdb=this[_0x4b0019(0xec)];this[_0x4b0019(0x119)]();const _0x536659=function(_0x18be56,_0x5aaf9d){const _0xd1e680=_0x4b0019,_0x44ac2b=[];for(const _0x170cec of _0x5aaf9d){const _0x8a79dd=_0x18be56[_0x170cec[_0xd1e680(0x10b)]];_0x8a79dd?_0x8a79dd[_0xd1e680(0xfc)][_0xd1e680(0x108)]!==_0x170cec[_0xd1e680(0xfc)][_0xd1e680(0x108)]?_0x44ac2b[_0xd1e680(0x105)](_0x170cec):_0x8a79dd[_0xd1e680(0xfc)][_0xd1e680(0xf0)]((_0x13835b,_0x58969d)=>{const _0x5a63ee=_0xd1e680,_0x402bf2=_0x170cec[_0x5a63ee(0xfc)][_0x58969d];_0x13835b['id']!==_0x402bf2['id']&&_0x44ac2b[_0x5a63ee(0x105)](_0x170cec);}):_0x44ac2b[_0xd1e680(0x105)](_0x170cec);}return _0x44ac2b;}(_0x3e1bdb,this[_0x4b0019(0xec)]);(_0x536659[_0x4b0019(0x108)]||this[_0x4b0019(0x11e)])&&this[_0x4b0019(0x10a)](_0x4b0019(0xf7),this,_0x536659);}else this[_0x4b0019(0xfd)]=this[_0x4b0019(0x125)][_0x4b0019(0x104)](this[_0x4b0019(0x11d)]),this[_0x4b0019(0x10a)](_0x4b0019(0xf7),this);}[_0x4ca999(0x119)](){const _0x224fa8=_0x4ca999,_0xbcab7d=new _0x4394a9('p',{},[new _0x4394a9(_0x224fa8(0x12b),{'style':_0x224fa8(0x118)},[new _0x37f61f(_0x224fa8(0x103))])]),_0x332e23=this[_0x224fa8(0x114)][_0x224fa8(0x127)](this[_0x224fa8(0xfd)],this[_0x224fa8(0x106)][_0x224fa8(0x11a)](!0x0),{'markUnstableElements':!this[_0x224fa8(0x11e)],'replaceRemovedWith':_0xbcab7d,'cutAfterLastChange':!this[_0x224fa8(0x11e)]});if(!_0x332e23[_0x224fa8(0xf5)][_0x224fa8(0x108)]&&!this[_0x224fa8(0x11e)])return;this[_0x224fa8(0x113)]=_0x332e23[_0x224fa8(0xfd)];let _0x344a0b=[];if(_0x242c54(_0x4d0f33=>{const _0x29f85e=_0x224fa8,_0x39c63f=_0x4f0e57(_0x4d0f33,_0x29f85e(0x11f));if(!_0x39c63f||!_0x4ad5cb(_0x39c63f))return!0x1;const _0x32927b=[_0x4d0f33,..._0x3e7a1f(_0x4d0f33)]['at'](-0x2);if(_0x4d0f33!=_0x32927b){const _0x31735a=_0x4f0e57(_0x32927b,_0x29f85e(0x11f));_0x4ad5cb(_0x31735a)||(_0x344a0b[_0x29f85e(0x105)]({'node':_0x32927b,'id':_0x31735a,'type':_0x29f85e(0x12c)}),_0x332e23[_0x29f85e(0xf5)][_0x29f85e(0x105)](_0x31735a));}else _0x332e23[_0x29f85e(0xf5)][_0x29f85e(0x115)](_0x39c63f)?_0x344a0b[_0x29f85e(0x105)]({'node':_0x4d0f33,'type':_0x29f85e(0x12c),'id':_0x39c63f}):_0x332e23[_0x29f85e(0x131)][_0x29f85e(0x115)](_0x39c63f)?_0x344a0b[_0x29f85e(0x105)]({'node':_0x4d0f33,'type':_0x29f85e(0x10f),'id':_0x39c63f,'anchorId':_0x4f0e57(_0x4d0f33[_0x29f85e(0x124)],_0x29f85e(0x11f))}):_0x344a0b[_0x29f85e(0x105)]({'node':_0x4d0f33,'type':_0x29f85e(0x12f),'id':_0x39c63f});return!0x0;},this[_0x224fa8(0x113)]),_0x344a0b=_0x344a0b[_0x224fa8(0x110)](({node:_0x490f15})=>[..._0x3e7a1f(_0x490f15),_0x490f15][_0x224fa8(0x121)](_0x76f123=>!_0x4f0e57(_0x76f123,_0x224fa8(0x132)))),0x0==_0x344a0b[_0x224fa8(0x108)])return;const _0x11367e=[[_0x344a0b[0x0]]];for(let _0x4e4df1=0x1;_0x4e4df1<_0x344a0b[_0x224fa8(0x108)];_0x4e4df1++){const _0x37d937=_0x11367e[_0x11367e[_0x224fa8(0x108)]-0x1],_0x2d7e9d=_0x37d937[_0x37d937[_0x224fa8(0x108)]-0x1];_0x344a0b[_0x4e4df1][_0x224fa8(0x12e)][_0x224fa8(0x124)]==_0x2d7e9d[_0x224fa8(0x12e)]&&_0x224fa8(0x12c)!=_0x344a0b[_0x4e4df1][_0x224fa8(0xf3)]&&_0x224fa8(0x12c)!=_0x2d7e9d[_0x224fa8(0xf3)]?_0x37d937[_0x224fa8(0x105)](_0x344a0b[_0x4e4df1]):_0x11367e[_0x224fa8(0x105)]([_0x344a0b[_0x4e4df1]]);}for(const _0x1f5010 of _0x11367e){const _0x52e6f8=_0x1f5010[0x0],_0x597201=_0x1f5010[_0x1f5010[_0x224fa8(0x108)]-0x1],_0x2fb644=_0x1ff294(_0x52e6f8[_0x224fa8(0x12e)][_0x224fa8(0x124)]);_0x2fb644&&_0x1f5010[_0x224fa8(0x116)](_0x2fb644);const _0x17be41=_0x1ff294(_0x597201[_0x224fa8(0x12e)][_0x224fa8(0x107)]);_0x17be41&&_0x1f5010[_0x224fa8(0x105)](_0x17be41);}function _0x4ad5cb(_0x566e34){const _0x26e265=_0x224fa8;return _0x332e23[_0x26e265(0xf5)][_0x26e265(0x115)](_0x566e34)||_0x332e23[_0x26e265(0x131)][_0x26e265(0x115)](_0x566e34)||_0x332e23[_0x26e265(0x122)][_0x26e265(0x115)](_0x566e34);}function _0x1ff294(_0x3bf1b6){const _0x45b0fe=_0x224fa8;if(_0x3bf1b6&&_0x4f0e57(_0x3bf1b6,_0x45b0fe(0x11f))&&!_0x4f0e57(_0x3bf1b6,_0x45b0fe(0x132))){const _0x550a2f=_0x4f0e57(_0x3bf1b6,_0x45b0fe(0x11f));if(!_0x4ad5cb(_0x550a2f))return{'node':_0x3bf1b6,'type':_0x45b0fe(0x120),'id':_0x550a2f};}return null;}this[_0x224fa8(0xec)]=_0x11367e[_0x224fa8(0xfb)]((_0x2edaae,_0x1eb2f0)=>({'changes':_0x2edaae,'state':_0x224fa8(0x126),'index':_0x1eb2f0}));}}export function isValidReplyType(_0x3a740b){const _0x3fd7ed=_0x4ca999;return Object[_0x3fd7ed(0x10c)](AI_REPLY_TYPES)[_0x3fd7ed(0x115)](_0x3a740b);}export function isIgnoredReplyType(_0x9e40c){const _0x30edaf=_0x4ca999;return AI_REPLY_TYPES_IGNORED[_0x30edaf(0x115)](_0x9e40c);}export function isReplyTitleType(_0x4b59f9){return _0x4b59f9===AI_REPLY_TITLE_TYPE;}export function isSourceType(_0x47035b){const _0x4cde3e=_0x4ca999;return _0x4cde3e(0xf4)===_0x47035b;}
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import { type Element, type Document } from '../utils/htmlparser.js';
|
|
6
|
+
declare const AIResponseApplier_base: {
|
|
7
|
+
new (): import("ckeditor5/src/utils.js").Observable;
|
|
8
|
+
prototype: import("ckeditor5/src/utils.js").Observable;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* AIResponseApplier is a part of the AI API response processing pipeline.
|
|
12
|
+
*
|
|
13
|
+
* The main purpose of this class is to merge HTML suggestions (modified content chunks) returned
|
|
14
|
+
* from the AI API into the existing editor content. This is "black box" processing, which means that
|
|
15
|
+
* the class does not know anything about the editor content structure, it just merges the content
|
|
16
|
+
* based on provided HTML data (part/suggestion and content) and 'data-id' attributes.
|
|
17
|
+
*/
|
|
18
|
+
export declare class AIResponseApplier extends /* #__PURE__ -- @preserve */ AIResponseApplier_base {
|
|
19
|
+
constructor(generateUid?: () => string);
|
|
20
|
+
/**
|
|
21
|
+
* Merges the given content part (AI suggestion) with the provided editor content.
|
|
22
|
+
*
|
|
23
|
+
* The main purpose of this function is to merge a piece of AI modified content (`contentPart`)
|
|
24
|
+
* into the given content (editor content, `content`).
|
|
25
|
+
*
|
|
26
|
+
* This is done based on a few rules:
|
|
27
|
+
*
|
|
28
|
+
* 1. Any removed element is not present in the `contentPart` itself but is represented by a special
|
|
29
|
+
* "removed comment" node: `<!-- removed data-id="some_id" -->`. This comment node is located
|
|
30
|
+
* in the same position (relative position to other present nodes) as the element in the original
|
|
31
|
+
* content.
|
|
32
|
+
* 2. Any newly added element is presented in the `contentPart` with a special `data-id="new-element"`
|
|
33
|
+
* attribute.
|
|
34
|
+
* 3. Any existing (from the original `content`) and modified element is presented in the `contentPart`
|
|
35
|
+
* with the same `data-id` value as in the original `content`. Its contents may be different (tag,
|
|
36
|
+
* attributes, entire subtree may change). Also modified elements don't have to be a top level elements
|
|
37
|
+
* from the original `content`, which means the `contentPart` may not keep the original structure
|
|
38
|
+
* or nesting order of the elements.
|
|
39
|
+
*
|
|
40
|
+
* Each type of modification is handled differently when merged into the `content`:
|
|
41
|
+
*
|
|
42
|
+
* 1. Modified elements (with `data-id` attribute with a value which exists in the `content`) replaces
|
|
43
|
+
* the existing element with the same `data-id`, without changing its position in the `content`.
|
|
44
|
+
* 2. Removed elements (marked with a special "removed comment") are removed from the `content` based
|
|
45
|
+
* on the `data-id` comment value.
|
|
46
|
+
* 3. New elements (marked with `data-id="new-element"`) are inserted into the `content` based on their
|
|
47
|
+
* relative position to other nodes in the `contentPart`. The detailed rules for inserting new elements are
|
|
48
|
+
* described in the next section.
|
|
49
|
+
* 4. Invalid elements (elements with `data-id` attribute which value is not present in the `content`,
|
|
50
|
+
* or without `data-id` attribute at all) are ignored and not inserted into the `content`.
|
|
51
|
+
*
|
|
52
|
+
* The position on which new elements from the `contentPart` are inserted into the `content`
|
|
53
|
+
* is determined based on the reference nodes. The reference node is:
|
|
54
|
+
*
|
|
55
|
+
* - A node in the `contentPart` which also exists in the `content` with the same `data-id` attribute value.
|
|
56
|
+
* - A special "removed comment" node which points to the existing element in the `content`.
|
|
57
|
+
* - A special "existing document" comment node which implicates that there should be any content
|
|
58
|
+
* before/after the new element position on which it is inserted into the `content`.
|
|
59
|
+
*
|
|
60
|
+
* The algorithm operates on the top level nodes of the `contentPart` which means only direct root children
|
|
61
|
+
* of the `contentPart` are processed. Nested elements are not processed directly, but as a children
|
|
62
|
+
* of the top level nodes they are included in the merge process.
|
|
63
|
+
*
|
|
64
|
+
* The algorithm iterates over the `contentPart` top level nodes and tries to find a position (directly or via reference node)
|
|
65
|
+
* for any element which should be merged into the `content`.
|
|
66
|
+
*
|
|
67
|
+
* Example 1: Modified element.
|
|
68
|
+
*
|
|
69
|
+
* ```html
|
|
70
|
+
* // content:
|
|
71
|
+
* <p data-id="1">Foo</p>
|
|
72
|
+
* <p data-id="2">Bar</p>
|
|
73
|
+
* <p data-id="3">Cup</p>
|
|
74
|
+
*
|
|
75
|
+
* // contentPart:
|
|
76
|
+
* <p data-id="1">New content</p>
|
|
77
|
+
*
|
|
78
|
+
* // merge result:
|
|
79
|
+
* <p data-id="1">New content</p>
|
|
80
|
+
* <p data-id="2">Bar</p>
|
|
81
|
+
* <p data-id="3">Cup</p>
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* Example 2: Multiple modified element.
|
|
85
|
+
*
|
|
86
|
+
* ```html
|
|
87
|
+
* // content:
|
|
88
|
+
* <p data-id="1">Foo</p>
|
|
89
|
+
* <p data-id="2">Bar</p>
|
|
90
|
+
* <p data-id="3">Cup</p>
|
|
91
|
+
*
|
|
92
|
+
* // contentPart:
|
|
93
|
+
* <p data-id="1">New content</p>
|
|
94
|
+
* <!-- existing document !-->
|
|
95
|
+
* <p data-id="3">Another <strong>change</strong></p>
|
|
96
|
+
*
|
|
97
|
+
* // merge result:
|
|
98
|
+
* <p data-id="1">New content</p>
|
|
99
|
+
* <p data-id="2">Bar</p>
|
|
100
|
+
* <p data-id="3">Another <strong>change</strong></p>
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* Example 3: Removed element.
|
|
104
|
+
*
|
|
105
|
+
* ```html
|
|
106
|
+
* // content:
|
|
107
|
+
* <p data-id="1">Foo</p>
|
|
108
|
+
* <p data-id="2">Bar</p>
|
|
109
|
+
* <p data-id="3">Cup</p>
|
|
110
|
+
*
|
|
111
|
+
* // contentPart:
|
|
112
|
+
* <!-- removed data-id="1" !-->
|
|
113
|
+
*
|
|
114
|
+
* // merge result:
|
|
115
|
+
* <p data-id="2">Bar</p>
|
|
116
|
+
* <p data-id="3">Cup</p>
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
119
|
+
* Example 4: New element with reference node before.
|
|
120
|
+
*
|
|
121
|
+
* ```html
|
|
122
|
+
* // content:
|
|
123
|
+
* <p data-id="1">Foo</p>
|
|
124
|
+
* <p data-id="2">Bar</p>
|
|
125
|
+
* <p data-id="3">Cup</p>
|
|
126
|
+
*
|
|
127
|
+
* // contentPart:
|
|
128
|
+
* <p data-id="1">Foo</p>
|
|
129
|
+
* <p data-id="new-element">New element</p>
|
|
130
|
+
* <!-- existing document !-->
|
|
131
|
+
*
|
|
132
|
+
* // merge result:
|
|
133
|
+
* <p data-id="1">Foo</p>
|
|
134
|
+
* <p data-id="new-id">New element</p>
|
|
135
|
+
* <p data-id="2">Bar</p>
|
|
136
|
+
* <p data-id="3">Cup</p>
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* Example 5: New element with reference node after.
|
|
140
|
+
*
|
|
141
|
+
* ```html
|
|
142
|
+
* // content:
|
|
143
|
+
* <p data-id="1">Foo</p>
|
|
144
|
+
* <p data-id="2">Bar</p>
|
|
145
|
+
* <p data-id="3">Cup</p>
|
|
146
|
+
*
|
|
147
|
+
* // contentPart:
|
|
148
|
+
* <!-- existing document !-->
|
|
149
|
+
* <p data-id="new-element">New element</p>
|
|
150
|
+
* <p data-id="3">Cup</p>
|
|
151
|
+
*
|
|
152
|
+
* // merge result:
|
|
153
|
+
* <p data-id="1">Foo</p>
|
|
154
|
+
* <p data-id="2">Bar</p>
|
|
155
|
+
* <p data-id="new-id">New element</p>
|
|
156
|
+
* <p data-id="3">Cup</p>
|
|
157
|
+
* ```
|
|
158
|
+
*
|
|
159
|
+
* Example 6: New element at the start of the content.
|
|
160
|
+
*
|
|
161
|
+
* ```html
|
|
162
|
+
* // content:
|
|
163
|
+
* <p data-id="1">Foo</p>
|
|
164
|
+
* <p data-id="2">Bar</p>
|
|
165
|
+
* <p data-id="3">Cup</p>
|
|
166
|
+
*
|
|
167
|
+
* // contentPart:
|
|
168
|
+
* <p data-id="new-element">New element</p>
|
|
169
|
+
* <!-- existing document !-->
|
|
170
|
+
*
|
|
171
|
+
* // merge result:
|
|
172
|
+
* <p data-id="new-id">New element</p>
|
|
173
|
+
* <p data-id="1">Foo</p>
|
|
174
|
+
* <p data-id="2">Bar</p>
|
|
175
|
+
* <p data-id="3">Cup</p>
|
|
176
|
+
* ```
|
|
177
|
+
*
|
|
178
|
+
* Example 7: New element at the end of the content.
|
|
179
|
+
*
|
|
180
|
+
* ```html
|
|
181
|
+
* // content:
|
|
182
|
+
* <p data-id="1">Foo</p>
|
|
183
|
+
* <p data-id="2">Bar</p>
|
|
184
|
+
* <p data-id="3">Cup</p>
|
|
185
|
+
*
|
|
186
|
+
* // contentPart:
|
|
187
|
+
* <!-- existing document !-->
|
|
188
|
+
* <p data-id="new-element">New element</p>
|
|
189
|
+
*
|
|
190
|
+
* // merge result:
|
|
191
|
+
* <p data-id="1">Foo</p>
|
|
192
|
+
* <p data-id="2">Bar</p>
|
|
193
|
+
* <p data-id="3">Cup</p>
|
|
194
|
+
* <p data-id="new-id">New element</p>
|
|
195
|
+
* ```
|
|
196
|
+
*
|
|
197
|
+
* Example 8: New element after removed element.
|
|
198
|
+
*
|
|
199
|
+
* ```html
|
|
200
|
+
* // content:
|
|
201
|
+
* <p data-id="1">Foo</p>
|
|
202
|
+
* <p data-id="2">Bar</p>
|
|
203
|
+
* <p data-id="3">Cup</p>
|
|
204
|
+
*
|
|
205
|
+
* // contentPart:
|
|
206
|
+
* <!-- removed data-id="2" !-->
|
|
207
|
+
* <p data-id="new-element">New element</p>
|
|
208
|
+
*
|
|
209
|
+
* // merge result:
|
|
210
|
+
* <p data-id="1">Foo</p>
|
|
211
|
+
* <p data-id="new-id">New element</p>
|
|
212
|
+
* <p data-id="3">Cup</p>
|
|
213
|
+
* ```
|
|
214
|
+
*
|
|
215
|
+
* Example 9: Wrapped element.
|
|
216
|
+
*
|
|
217
|
+
* ```html
|
|
218
|
+
* // content:
|
|
219
|
+
* <p data-id="1">Foo</p>
|
|
220
|
+
* <p data-id="2">Bar</p>
|
|
221
|
+
* <p data-id="3">Cup</p>
|
|
222
|
+
*
|
|
223
|
+
* // contentPart:
|
|
224
|
+
* <p data-id="1">Foo</p>
|
|
225
|
+
* <div data-id="new-element">
|
|
226
|
+
* <p data-id="2">Bar</p>
|
|
227
|
+
* </div>
|
|
228
|
+
*
|
|
229
|
+
* // merge result:
|
|
230
|
+
* <p data-id="1">Foo</p>
|
|
231
|
+
* <div data-id="new-id">
|
|
232
|
+
* <p data-id="2">Bar</p>
|
|
233
|
+
* </div>
|
|
234
|
+
* <p data-id="3">Cup</p>
|
|
235
|
+
* ```
|
|
236
|
+
*
|
|
237
|
+
* Example 10: Modification of nested elements.
|
|
238
|
+
*
|
|
239
|
+
* ```html
|
|
240
|
+
* // content:
|
|
241
|
+
* <table data-id="1">
|
|
242
|
+
* <tr data-id="11">
|
|
243
|
+
* <td data-id="111">Foo</td>
|
|
244
|
+
* </tr>
|
|
245
|
+
* <tr data-id="12">
|
|
246
|
+
* <td data-id="121">Bar</td>
|
|
247
|
+
* <td data-id="122">Cup</td>
|
|
248
|
+
* </tr>
|
|
249
|
+
* </table>
|
|
250
|
+
*
|
|
251
|
+
* // contentPart:
|
|
252
|
+
* <tr data-id="12">
|
|
253
|
+
* <td data-id="new-element">New content</td>
|
|
254
|
+
* </tr>
|
|
255
|
+
*
|
|
256
|
+
* // merge result:
|
|
257
|
+
* <table data-id="1">
|
|
258
|
+
* <tr data-id="11">
|
|
259
|
+
* <td data-id="111">Foo</td>
|
|
260
|
+
* </tr>
|
|
261
|
+
* <tr data-id="12">
|
|
262
|
+
* <td data-id="new-id">New content</td>
|
|
263
|
+
* </tr>
|
|
264
|
+
* </table>
|
|
265
|
+
* ```
|
|
266
|
+
*
|
|
267
|
+
* Since existing elements are either modifications or only reference nodes in the `contentPart`, there is an additional logic
|
|
268
|
+
* for checking if such elements are identical to the existing ones in the `content`. This way the algorithm can correctly detect
|
|
269
|
+
* if an existing element was modified or not.
|
|
270
|
+
*
|
|
271
|
+
* Additionally, this method supports the following options:
|
|
272
|
+
* - `cutAfterLastChange`: if set to `true`, the content will be cut after the last modified element.
|
|
273
|
+
* - `markUnstableElements`: if set to `true`, the function will mark all elements starting from the last tag element
|
|
274
|
+
* as unstable by adding a special 'data-unstable' attribute to them.
|
|
275
|
+
* - `markUnstableElementsDepth`: if set, it will determine how deep the unstable marking should go.
|
|
276
|
+
*/
|
|
277
|
+
merge(contentPart: Document, parsedContent: Document, options?: MergeOptions): MergeResult;
|
|
278
|
+
}
|
|
279
|
+
export type MergeResult = {
|
|
280
|
+
parsedContent: Document;
|
|
281
|
+
newNodeIds: Array<string>;
|
|
282
|
+
modifiedNodeIds: Array<string>;
|
|
283
|
+
removedNodeIds: Array<string>;
|
|
284
|
+
};
|
|
285
|
+
export type MergeOptions = {
|
|
286
|
+
cutAfterLastChange?: boolean;
|
|
287
|
+
markUnstableElements?: boolean;
|
|
288
|
+
markUnstableElementsDepth?: number;
|
|
289
|
+
replaceRemovedWith?: Element;
|
|
290
|
+
};
|
|
291
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x2086(_0x5d5e94,_0x965e89){const _0x51e34f=_0x51e3();return _0x2086=function(_0x208606,_0x1ebbe5){_0x208606=_0x208606-0x1b0;let _0x46b855=_0x51e34f[_0x208606];return _0x46b855;},_0x2086(_0x5d5e94,_0x965e89);}const _0x345c57=_0x2086;(function(_0xa5955,_0x4cff6f){const _0x52937d=_0x2086,_0x32a6f4=_0xa5955();while(!![]){try{const _0x36edd2=-parseInt(_0x52937d(0x1cd))/0x1*(parseInt(_0x52937d(0x1b0))/0x2)+-parseInt(_0x52937d(0x1e2))/0x3+-parseInt(_0x52937d(0x1e1))/0x4*(-parseInt(_0x52937d(0x1b6))/0x5)+-parseInt(_0x52937d(0x1d9))/0x6*(-parseInt(_0x52937d(0x1c7))/0x7)+-parseInt(_0x52937d(0x1e6))/0x8+parseInt(_0x52937d(0x1c1))/0x9*(-parseInt(_0x52937d(0x1b1))/0xa)+-parseInt(_0x52937d(0x1e3))/0xb*(-parseInt(_0x52937d(0x1f8))/0xc);if(_0x36edd2===_0x4cff6f)break;else _0x32a6f4['push'](_0x32a6f4['shift']());}catch(_0x3e9569){_0x32a6f4['push'](_0x32a6f4['shift']());}}}(_0x51e3,0x626ae));import{ObservableMixin as _0x17ed04,uid as _0x46ab75}from'ckeditor5/src/utils.js';function _0x51e3(){const _0x26be4f=['from','_isExistingContentComment','_markUnstableElements','13645vhVxEH','afterbegin','trim','nodeType','_existingDataIds','_markLastTagElementUnstable','_getNodeDataId','data-removed','_storeDeletedElementIds','markUnstableElements','true','_isNewNode','6zviGHK','includes','_replaceNode','_generateUid','lastTouchedId','reverse','_insertNodes','_markWrappedElements','357316qXeZjY','2068926Kafrdz','11HAkEag','filter','previousSibling','5224328wRCGdO','_isExistingNode','_touchedNodesState','_findFallbackReferenceNode','_findPrevElementWithDataId','forEach','_isDelNode','afterend','splice','replaceRemovedWith','parentNode','beforebegin','data-id','newIds','nextSibling','merge','data-unstable','childNodes','22856436jCUsZK','74JiHMbL','4200PNZNSV','_hasWrappedParent','match','modifiedIds','invalidIds','10wqvYhD','push','has','lastChild','map','length','data-wrapped-id','markUnstableElementsDepth','slice','indexOf','_findReferenceNode','9297FZLEBX','_findNextElementWithDataId','cutAfterLastChange','_getUid','new-element','_removeSpecialComments','4208155FDfuzo','removedIds','cloneNode'];_0x51e3=function(){return _0x26be4f;};return _0x51e3();}import{findAllByAttribute as _0x491319,findByAttribute as _0x271163,getAttribute as _0x46d82b,isComment as _0x3c3d12,isTag as _0x5ac264,insertElement as _0x1c64b1,moveElement as _0x533b44,removeElement as _0x5bc74b,replaceElement as _0x8d10c0,serialize as _0x389e77,setAttribute as _0x35720a,clone as _0x33d140,findAllComments as _0x57bfd6,getParents as _0x4f0223,getNodeNestingLevel as _0x1be19c,areNodesSame as _0x12569f,removeElementsAfter as _0x1f450b}from'../utils/htmlparser.js';export class AIResponseApplier extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x17ed04(){[_0x345c57(0x1dc)];[_0x345c57(0x1e8)]={'newIds':[],'modifiedIds':[],'removedIds':[],'invalidIds':[],'lastTouchedId':null};[_0x345c57(0x1d1)]=new Set();constructor(_0x44ef36){const _0x23df39=_0x345c57;super(),this[_0x23df39(0x1dc)]=_0x44ef36||_0x46ab75;}[_0x345c57(0x1f5)](_0x259c92,_0x27f714,_0x5c1e38){const _0x53a3a9=_0x345c57,_0x435327=_0x33d140(_0x259c92);if(0x0===_0x27f714[_0x53a3a9(0x1f7)][_0x53a3a9(0x1bb)]){const _0x5d0550=[];return _0x491319(_0x53a3a9(0x1f2),_0x53a3a9(0x1c5),_0x435327)[_0x53a3a9(0x1eb)](_0x39ce9d=>{const _0x302c1b=_0x53a3a9,_0x4fe25e=this[_0x302c1b(0x1dc)]();_0x35720a(_0x39ce9d,_0x302c1b(0x1f2),_0x4fe25e),_0x5d0550[_0x302c1b(0x1b7)](_0x4fe25e);}),this[_0x53a3a9(0x1c6)](_0x435327),{'parsedContent':_0x435327,'newNodeIds':_0x5d0550,'modifiedNodeIds':[],'removedNodeIds':[]};}_0x5c1e38&&_0x5c1e38[_0x53a3a9(0x1d6)]&&this[_0x53a3a9(0x1d2)](_0x435327),this[_0x53a3a9(0x1e8)][_0x53a3a9(0x1f3)]=[],this[_0x53a3a9(0x1e8)][_0x53a3a9(0x1b4)]=[],this[_0x53a3a9(0x1e8)][_0x53a3a9(0x1c8)]=[],this[_0x53a3a9(0x1e8)][_0x53a3a9(0x1b5)]=[],this[_0x53a3a9(0x1e8)][_0x53a3a9(0x1dd)]=null,this[_0x53a3a9(0x1d1)]=new Set(_0x491319(_0x53a3a9(0x1f2),null,_0x27f714)[_0x53a3a9(0x1ba)](_0x5a68e5=>_0x46d82b(_0x5a68e5,_0x53a3a9(0x1f2)))[_0x53a3a9(0x1e4)](_0x20f585=>!!_0x20f585));let _0x8f5c6c=-0x1,_0x2dc4da=!0x1;const _0x13df19=_0x435327[_0x53a3a9(0x1f7)],_0x355c77=Array[_0x53a3a9(0x1ca)](_0x13df19)[_0x53a3a9(0x1e4)](_0x484c63=>!(0x3===_0x484c63[_0x53a3a9(0x1d0)]&&''===_0x389e77(_0x484c63)[_0x53a3a9(0x1cf)]())),_0x53301d=_0x355c77[_0x53a3a9(0x1bb)];for(let _0x29f38d=0x0;_0x29f38d<_0x53301d;_0x29f38d++){const _0x323e0c=_0x355c77[_0x29f38d],_0x301fad=_0x355c77[_0x29f38d+0x1];if(this[_0x53a3a9(0x1d8)](_0x323e0c)){if(-0x1===_0x8f5c6c&&(_0x8f5c6c=_0x29f38d),this[_0x53a3a9(0x1e0)](_0x323e0c),!this[_0x53a3a9(0x1d8)](_0x301fad)){const [_0x40269a,_0x5a7a8f]=this[_0x53a3a9(0x1c0)](_0x323e0c,_0x2dc4da,_0x27f714);if(_0x40269a){const _0x298f1a=Array[_0x53a3a9(0x1ca)](_0x355c77)[_0x53a3a9(0x1be)](_0x8f5c6c,_0x29f38d+0x1);this[_0x53a3a9(0x1df)](_0x40269a,_0x298f1a,_0x5a7a8f),_0x8f5c6c=-0x1;}}}else{if(this[_0x53a3a9(0x1cb)](_0x323e0c))_0x2dc4da=!0x0;else{if(this[_0x53a3a9(0x1e7)](_0x323e0c)){const _0x1e82b3=_0x46d82b(_0x323e0c,_0x53a3a9(0x1f2));if(_0x1e82b3&&this[_0x53a3a9(0x1d1)][_0x53a3a9(0x1b8)](_0x1e82b3)){const _0x1cc450=_0x271163(_0x53a3a9(0x1f2),_0x1e82b3,_0x27f714);this[_0x53a3a9(0x1db)](_0x1cc450,_0x323e0c);}if(this[_0x53a3a9(0x1e8)][_0x53a3a9(0x1c8)][_0x53a3a9(0x1da)](_0x1e82b3)){const _0x2bd341=this[_0x53a3a9(0x1e8)][_0x53a3a9(0x1c8)][_0x53a3a9(0x1bf)](_0x1e82b3);this[_0x53a3a9(0x1e8)][_0x53a3a9(0x1c8)][_0x53a3a9(0x1ee)](_0x2bd341,0x1);}}else{if(this[_0x53a3a9(0x1ec)](_0x323e0c)){const _0x4b651f=_0x46d82b(_0x323e0c,_0x53a3a9(0x1f2));this[_0x53a3a9(0x1e8)][_0x53a3a9(0x1b4)][_0x53a3a9(0x1da)](_0x4b651f)||this[_0x53a3a9(0x1d5)](_0x323e0c);}}}}}for(const _0x2c39ca of this[_0x53a3a9(0x1e8)][_0x53a3a9(0x1c8)]){const _0x2a9093=_0x271163(_0x53a3a9(0x1f2),_0x2c39ca,_0x27f714);if(_0x2a9093){if(_0x5c1e38&&_0x5c1e38[_0x53a3a9(0x1ef)]){this[_0x53a3a9(0x1e8)][_0x53a3a9(0x1dd)]=_0x2c39ca;const _0x2b3d07=_0x5c1e38[_0x53a3a9(0x1ef)][_0x53a3a9(0x1c9)](!0x0);_0x35720a(_0x2b3d07,_0x53a3a9(0x1f2),_0x2c39ca),_0x35720a(_0x2b3d07,_0x53a3a9(0x1d4),_0x53a3a9(0x1d7)),_0x8d10c0(_0x2a9093,_0x2b3d07);}else _0x5bc74b(_0x2a9093);}}if(_0x491319(_0x53a3a9(0x1bc),null,_0x27f714)[_0x53a3a9(0x1eb)](_0x50478a=>{const _0x18d4c0=_0x53a3a9,_0x3f6291=_0x46d82b(_0x50478a,_0x18d4c0(0x1bc)),_0x2b4bf=_0x271163(_0x18d4c0(0x1f2),_0x3f6291,_0x27f714);_0x2b4bf&&_0x533b44(_0x2b4bf,_0x50478a);}),_0x491319(_0x53a3a9(0x1f2),_0x53a3a9(0x1c5),_0x27f714)[_0x53a3a9(0x1eb)](_0x1d0115=>{const _0x3b15ed=_0x53a3a9,_0x431d7d=this[_0x3b15ed(0x1c4)](_0x1d0115);_0x35720a(_0x1d0115,_0x3b15ed(0x1f2),_0x431d7d),this[_0x3b15ed(0x1e8)][_0x3b15ed(0x1f3)][_0x3b15ed(0x1b7)](_0x431d7d);}),this[_0x53a3a9(0x1c6)](_0x27f714),_0x5c1e38&&_0x5c1e38[_0x53a3a9(0x1d6)]&&this[_0x53a3a9(0x1cc)](_0x27f714,_0x5c1e38[_0x53a3a9(0x1bd)]||0x0),_0x5c1e38&&_0x5c1e38[_0x53a3a9(0x1c3)]&&this[_0x53a3a9(0x1e8)][_0x53a3a9(0x1dd)]){let _0x3764e5=_0x271163(_0x53a3a9(0x1f2),this[_0x53a3a9(0x1e8)][_0x53a3a9(0x1dd)],_0x27f714);for(;_0x3764e5;)_0x1f450b(_0x3764e5),_0x3764e5=_0x3764e5[_0x53a3a9(0x1f0)];}return{'parsedContent':_0x27f714,'newNodeIds':this[_0x53a3a9(0x1e8)][_0x53a3a9(0x1f3)],'modifiedNodeIds':this[_0x53a3a9(0x1e8)][_0x53a3a9(0x1b4)],'removedNodeIds':this[_0x53a3a9(0x1e8)][_0x53a3a9(0x1c8)]};}[_0x345c57(0x1df)](_0x37c5b4,_0x2ae52a,_0x45c10e){const _0x480042=_0x345c57;for(const _0x7e3184 of _0x2ae52a){const _0x3f4f3a=this[_0x480042(0x1c4)](_0x7e3184);_0x35720a(_0x7e3184,_0x480042(0x1f2),_0x3f4f3a),this[_0x480042(0x1e8)][_0x480042(0x1f3)][_0x480042(0x1b7)](_0x3f4f3a),this[_0x480042(0x1e8)][_0x480042(0x1dd)]=_0x3f4f3a;}const _0x590331=_0x480042(0x1ce)===_0x45c10e||_0x480042(0x1ed)===_0x45c10e?_0x2ae52a[_0x480042(0x1de)]():_0x2ae52a;for(const _0x964888 of _0x590331)_0x1c64b1(_0x37c5b4,_0x964888,_0x45c10e);}[_0x345c57(0x1db)](_0xaaffe0,_0x16ed42){const _0x1c3505=_0x345c57;if(!_0xaaffe0)return;if(_0x12569f(_0xaaffe0,_0x16ed42))return;const _0x9e7d86=this[_0x1c3505(0x1c4)](_0xaaffe0);_0x35720a(_0x16ed42,_0x1c3505(0x1f2),_0x9e7d86),this[_0x1c3505(0x1e8)][_0x1c3505(0x1b4)][_0x1c3505(0x1b7)](_0x9e7d86),this[_0x1c3505(0x1e8)][_0x1c3505(0x1dd)]=_0x9e7d86,_0x8d10c0(_0xaaffe0,_0x16ed42[_0x1c3505(0x1c9)](!0x0));}[_0x345c57(0x1c0)](_0x46a1d3,_0x39ed9a,_0x391d78){const _0x234af4=_0x345c57,_0x53650e=this[_0x234af4(0x1ea)](_0x46a1d3,!0x1);if(_0x53650e){const _0x19da99=this[_0x234af4(0x1d3)](_0x53650e),_0x2ec141=_0x271163(_0x234af4(0x1f2),_0x19da99,_0x391d78);if(_0x2ec141)return[_0x2ec141,_0x234af4(0x1ed)];this[_0x234af4(0x1e8)][_0x234af4(0x1b5)][_0x234af4(0x1b7)](_0x19da99);}const _0x4938b8=this[_0x234af4(0x1c2)](_0x46a1d3,!0x1);if(_0x4938b8){const _0x34a508=this[_0x234af4(0x1d3)](_0x4938b8),_0x373390=_0x271163(_0x234af4(0x1f2),_0x34a508,_0x391d78);if(_0x373390)return[_0x373390,_0x234af4(0x1f1)];this[_0x234af4(0x1e8)][_0x234af4(0x1b5)][_0x234af4(0x1b7)](_0x34a508);}return _0x39ed9a?_0x46a1d3[_0x234af4(0x1f4)]?this[_0x234af4(0x1e9)](_0x46a1d3,_0x391d78):[_0x391d78[_0x234af4(0x1f7)][_0x391d78[_0x234af4(0x1f7)][_0x234af4(0x1bb)]-0x1],_0x234af4(0x1ed)]:[_0x391d78[_0x234af4(0x1f7)][0x0],_0x234af4(0x1f1)];}[_0x345c57(0x1e9)](_0x219aa2,_0x57b9fe){const _0x3ac9a6=_0x345c57,_0x2fe98a=[],_0x1f20e4=this[_0x3ac9a6(0x1ea)](_0x219aa2,!0x0);if(_0x1f20e4){const _0x5cbbf4=this[_0x3ac9a6(0x1d3)](_0x1f20e4),_0x3f46a2=_0x271163(_0x3ac9a6(0x1f2),_0x5cbbf4,_0x57b9fe);_0x3f46a2&&_0x2fe98a[_0x3ac9a6(0x1b7)]([_0x3f46a2,_0x3ac9a6(0x1ed)]);}const _0x207a8a=this[_0x3ac9a6(0x1c2)](_0x219aa2,!0x0);if(_0x207a8a){const _0x3e2072=this[_0x3ac9a6(0x1d3)](_0x207a8a),_0x48d233=_0x271163(_0x3ac9a6(0x1f2),_0x3e2072,_0x57b9fe);_0x48d233&&_0x2fe98a[_0x3ac9a6(0x1b7)]([_0x48d233,_0x3ac9a6(0x1f1)]);}if(_0x2fe98a[_0x3ac9a6(0x1bb)]>0x1)return _0x1be19c(_0x2fe98a[0x0][0x0])<=_0x1be19c(_0x2fe98a[0x1][0x0])?_0x2fe98a[0x0]:_0x2fe98a[0x1];return 0x1===_0x2fe98a[_0x3ac9a6(0x1bb)]?_0x2fe98a[0x0]:[_0x57b9fe[_0x3ac9a6(0x1b9)],_0x3ac9a6(0x1ed)];}[_0x345c57(0x1c2)](_0x33eebd,_0x17441e){const _0x6ab41e=_0x345c57;let _0x2f3049=_0x33eebd[_0x6ab41e(0x1f4)],_0x83203b=null,_0x317d96=!0x1;for(;_0x2f3049;){if(_0x3c3d12(_0x2f3049)){if(this[_0x6ab41e(0x1ec)](_0x2f3049)&&(_0x83203b=_0x2f3049),this[_0x6ab41e(0x1cb)](_0x2f3049)&&_0x17441e&&!_0x317d96){_0x317d96=!0x0,_0x2f3049=_0x2f3049[_0x6ab41e(0x1f4)];continue;}break;}const _0x3b8288=_0x46d82b(_0x2f3049,_0x6ab41e(0x1f2));if(_0x3b8288&&_0x6ab41e(0x1c5)!==_0x3b8288&&this[_0x6ab41e(0x1d1)][_0x6ab41e(0x1b8)](_0x3b8288)){_0x83203b=_0x2f3049;break;}_0x2f3049=_0x2f3049[_0x6ab41e(0x1f4)];}return _0x83203b;}[_0x345c57(0x1ea)](_0x5740c7,_0x4e0014){const _0x2448c1=_0x345c57;let _0x562518=_0x5740c7[_0x2448c1(0x1e5)],_0x9cfb9f=null,_0x37fef8=!0x1;for(;_0x562518;){if(_0x3c3d12(_0x562518)){if(this[_0x2448c1(0x1ec)](_0x562518)&&(_0x9cfb9f=_0x562518),this[_0x2448c1(0x1cb)](_0x562518)&&_0x4e0014&&!_0x37fef8){_0x37fef8=!0x0,_0x562518=_0x562518[_0x2448c1(0x1e5)];continue;}break;}const _0x1fc6ac=_0x46d82b(_0x562518,_0x2448c1(0x1f2));if(_0x1fc6ac&&_0x2448c1(0x1c5)!==_0x1fc6ac&&this[_0x2448c1(0x1d1)][_0x2448c1(0x1b8)](_0x1fc6ac)){_0x9cfb9f=_0x562518;break;}_0x562518=_0x562518[_0x2448c1(0x1e5)];}return _0x9cfb9f;}[_0x345c57(0x1e0)](_0x202724){const _0x19fa07=_0x345c57;_0x5ac264(_0x202724)&&_0x491319(_0x19fa07(0x1f2),null,_0x202724)[_0x19fa07(0x1eb)](_0x25c6f6=>{const _0x224c87=_0x19fa07;if(this[_0x224c87(0x1e7)](_0x25c6f6)&&!this[_0x224c87(0x1b2)](_0x25c6f6)){const _0x586354=_0x46d82b(_0x25c6f6,_0x224c87(0x1f2));_0x35720a(_0x25c6f6,_0x224c87(0x1bc),_0x586354),_0x35720a(_0x25c6f6,_0x224c87(0x1f2),null);}});}[_0x345c57(0x1d3)](_0x1161b8){const _0x415cb3=_0x345c57;if(!_0x1161b8)return null;if(_0x5ac264(_0x1161b8))return _0x46d82b(_0x1161b8,_0x415cb3(0x1f2));if(_0x3c3d12(_0x1161b8)){const _0x1db7ff=_0x389e77(_0x1161b8)[_0x415cb3(0x1b3)](/removed[\s*-]data-id="([^"]+)"/);if(_0x1db7ff&&_0x1db7ff[0x1])return _0x1db7ff[0x1];}return null;}[_0x345c57(0x1d5)](_0x572ec6){const _0x7d2d02=_0x345c57;if(_0x3c3d12(_0x572ec6)){const _0x33f286=_0x389e77(_0x572ec6)[_0x7d2d02(0x1b3)](/removed[\s*-]data-id="([^"]+)"/);_0x33f286&&_0x33f286[0x1]&&this[_0x7d2d02(0x1e8)][_0x7d2d02(0x1c8)][_0x7d2d02(0x1b7)](_0x33f286[0x1]);}}[_0x345c57(0x1c4)](_0x4b570a){const _0x5d376f=_0x345c57;return this[_0x5d376f(0x1e7)](_0x4b570a)?_0x46d82b(_0x4b570a,_0x5d376f(0x1f2)):this[_0x5d376f(0x1dc)]();}[_0x345c57(0x1c6)](_0x435d31){const _0x30465b=_0x345c57;_0x57bfd6(_0x435d31)[_0x30465b(0x1e4)](_0x2be5fc=>this[_0x30465b(0x1ec)](_0x2be5fc)||this[_0x30465b(0x1cb)](_0x2be5fc))[_0x30465b(0x1eb)](_0x52cf02=>{_0x5bc74b(_0x52cf02);});}[_0x345c57(0x1d2)](_0x501d84){const _0x508940=_0x345c57,_0x3ce59a=_0x501d84[_0x508940(0x1f7)],_0x48ea22=_0x3ce59a[_0x3ce59a[_0x508940(0x1bb)]-0x1];_0x48ea22&&_0x5ac264(_0x48ea22)&&_0x35720a(_0x48ea22,_0x508940(0x1f6),_0x508940(0x1d7));}[_0x345c57(0x1cc)](_0x361285,_0x3bf038){const _0x39375a=_0x345c57,_0x43470c=_0x271163(_0x39375a(0x1f6),_0x39375a(0x1d7),_0x361285);if(!_0x43470c)return;const _0x3f2691=_0x4f0223(_0x43470c)[_0x39375a(0x1be)](0x0,-0x1),_0x51c5bc=_0x3f2691[_0x39375a(0x1bb)];let _0x2c8eee=_0x43470c;if(_0x51c5bc>_0x3bf038){let _0x15608e=_0x51c5bc,_0x18b00d=null;for(;_0x15608e>_0x3bf038&&_0x15608e>=0x0;)_0x15608e--,_0x18b00d=_0x3f2691[_0x15608e];_0x18b00d&&(_0x2c8eee=_0x18b00d,_0x35720a(_0x43470c,_0x39375a(0x1f6),null),_0x35720a(_0x18b00d,_0x39375a(0x1f6),_0x39375a(0x1d7)));}else{if(_0x51c5bc<_0x3bf038){let _0x6e74ab=_0x51c5bc,_0x4f07ea=_0x43470c;for(;_0x6e74ab<_0x3bf038;){const _0x5e3bc8=_0x4f07ea[_0x39375a(0x1f7)][_0x39375a(0x1e4)](_0x1be6be=>_0x5ac264(_0x1be6be));if(0x0===_0x5e3bc8[_0x39375a(0x1bb)])break;_0x6e74ab++,_0x4f07ea=_0x5e3bc8[_0x5e3bc8[_0x39375a(0x1bb)]-0x1];}_0x4f07ea&&(_0x2c8eee=_0x4f07ea,_0x35720a(_0x43470c,_0x39375a(0x1f6),null),_0x35720a(_0x4f07ea,_0x39375a(0x1f6),_0x39375a(0x1d7)));}}let _0x3445f6=_0x2c8eee;for(;_0x3445f6;){for(;_0x3445f6[_0x39375a(0x1f4)];)_0x3445f6=_0x3445f6[_0x39375a(0x1f4)],_0x5ac264(_0x3445f6)&&_0x35720a(_0x3445f6,_0x39375a(0x1f6),_0x39375a(0x1d7));_0x3445f6=_0x3445f6[_0x39375a(0x1f0)];}}[_0x345c57(0x1d8)](_0x3ebd97){const _0xa87798=_0x345c57;return Boolean(_0xa87798(0x1c5)===_0x46d82b(_0x3ebd97,_0xa87798(0x1f2)));}[_0x345c57(0x1e7)](_0x214960){const _0x27e44c=_0x345c57;return Boolean((_0x46d82b(_0x214960,_0x27e44c(0x1f2))||'')[_0x27e44c(0x1bb)]>0x0&&_0x27e44c(0x1c5)!==_0x46d82b(_0x214960,_0x27e44c(0x1f2)));}[_0x345c57(0x1ec)](_0x4dbd4f){const _0x1216dc=_0x345c57;return!!_0x4dbd4f&&Boolean(_0x3c3d12(_0x4dbd4f)&&_0x389e77(_0x4dbd4f)[_0x1216dc(0x1b3)](/removed[\s*-]data-id="[^"]+"/));}[_0x345c57(0x1b2)](_0x33de80){const _0x5754d0=_0x345c57;let _0x46dfad=_0x33de80[_0x5754d0(0x1f0)];for(;_0x46dfad;){if(_0x46d82b(_0x46dfad,_0x5754d0(0x1bc)))return!0x0;_0x46dfad=_0x46dfad[_0x5754d0(0x1f0)];}return!0x1;}[_0x345c57(0x1cb)](_0x20c57c){const _0x54eca8=_0x345c57;return Boolean(_0x3c3d12(_0x20c57c)&&_0x389e77(_0x20c57c)[_0x54eca8(0x1b3)](/\s*existing[\s*-](content|document)\s*/g));}}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import { type Document } from '../utils/htmlparser.js';
|
|
6
|
+
declare const AIResponseParser_base: {
|
|
7
|
+
new (): import("ckeditor5/src/utils.js").Observable;
|
|
8
|
+
prototype: import("ckeditor5/src/utils.js").Observable;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* An utility for parsing AI responses.
|
|
12
|
+
*
|
|
13
|
+
* It can handle markdown and HTML content. The main purpose of this class is to clean-up
|
|
14
|
+
* the HTML content for further processing.
|
|
15
|
+
*/
|
|
16
|
+
export declare class AIResponseParser extends /* #__PURE__ -- @preserve */ AIResponseParser_base {
|
|
17
|
+
constructor();
|
|
18
|
+
/**
|
|
19
|
+
* Converts the given Markdown string to HTML. During conversion HTML is sanitized and normalized.
|
|
20
|
+
*/
|
|
21
|
+
convertMarkdownToHTML(markdown: string): Document;
|
|
22
|
+
/**
|
|
23
|
+
* Parses, sanitizes and normalizes given HTML string.
|
|
24
|
+
*/
|
|
25
|
+
parseAndNormalizeHTML(html: string): Document;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x53dbf4=_0x1c38;function _0x1c38(_0x465001,_0x1372e6){const _0x2a194b=_0x2a19();return _0x1c38=function(_0x1c3800,_0x3a7aed){_0x1c3800=_0x1c3800-0x77;let _0x45f7c1=_0x2a194b[_0x1c3800];return _0x45f7c1;},_0x1c38(_0x465001,_0x1372e6);}(function(_0x30ac93,_0xad8ae0){const _0x4bf10=_0x1c38,_0x5c3226=_0x30ac93();while(!![]){try{const _0xabe6e6=-parseInt(_0x4bf10(0x84))/0x1*(-parseInt(_0x4bf10(0x81))/0x2)+parseInt(_0x4bf10(0x7b))/0x3+-parseInt(_0x4bf10(0x77))/0x4+-parseInt(_0x4bf10(0x7a))/0x5+parseInt(_0x4bf10(0x7d))/0x6+parseInt(_0x4bf10(0x7f))/0x7*(parseInt(_0x4bf10(0x79))/0x8)+-parseInt(_0x4bf10(0x80))/0x9;if(_0xabe6e6===_0xad8ae0)break;else _0x5c3226['push'](_0x5c3226['shift']());}catch(_0x4dca3e){_0x5c3226['push'](_0x5c3226['shift']());}}}(_0x2a19,0x923d4));import{ObservableMixin as _0x3229cc}from'ckeditor5/src/utils.js';import{MarkdownGfmMdToHtml as _0x4d0a53}from'@ckeditor/ckeditor5-markdown-gfm';import{parse as _0x5b236a}from'../utils/htmlparser.js';function _0x2a19(){const _0x37e726=['2440194nEyhUE','_parseHTML','4858WBOVzu','7775748azIVRw','1972014EqPQga','parseAndNormalizeHTML','convertMarkdownToHTML','1sMJqJj','<dummy>','parse','</dummy>','children','1789252dizQmK','_m2html','1688sIjRGV','3851725wZkdQA','3424458JTwbHr','replace'];_0x2a19=function(){return _0x37e726;};return _0x2a19();}export class AIResponseParser extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x3229cc(){[_0x53dbf4(0x78)];constructor(){const _0x7eb21=_0x53dbf4;super(),this[_0x7eb21(0x78)]=new _0x4d0a53();}[_0x53dbf4(0x83)](_0x5d1e66){const _0x40543e=_0x53dbf4,_0x5648df=this[_0x40543e(0x78)][_0x40543e(0x86)](_0x5d1e66);return this[_0x40543e(0x82)](_0x5648df);}[_0x53dbf4(0x82)](_0x4172a4){const _0x282113=_0x53dbf4;return this[_0x282113(0x7e)](_0x4172a4);}[_0x53dbf4(0x7e)](_0x4b4654){const _0x2d839e=_0x53dbf4,_0x26cc46=_0x4b4654[_0x2d839e(0x7c)](/^\t+/gm,'\x20')[_0x2d839e(0x7c)](/\n*/g,'')[_0x2d839e(0x7c)](/\s+/g,'\x20')[_0x2d839e(0x7c)](/<[^>]*?$/g,''),_0x589813=_0x5b236a(_0x2d839e(0x85)+_0x26cc46+_0x2d839e(0x87));return _0x589813[_0x2d839e(0x88)]=_0x589813[_0x2d839e(0x88)][0x0][_0x2d839e(0x88)],_0x589813;}}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/aicore/ui/aidisclaimerview
|
|
7
|
+
*/
|
|
8
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
9
|
+
import { View } from 'ckeditor5/src/ui.js';
|
|
10
|
+
/**
|
|
11
|
+
* The disclaimer view of the AI plugin.
|
|
12
|
+
*
|
|
13
|
+
* It displays information about the AI, such as a reminder to double-check responses.
|
|
14
|
+
*/
|
|
15
|
+
export declare class AIDisclaimerView extends View {
|
|
16
|
+
constructor(locale: Locale);
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x31c3(){var _0x5ebbd0=['ck-ai-disclaimer','446456bqndsY','90657vgtnqH','3669306eVmDFA','1590wdLyEA','setTemplate','24160YFbMwD','217UXYcCG','AI_DISCLAIMER_TEXT','ck-ai-disclaimer__content','978211MexDAk','15qHXmEi','58634301Ntowsi','div','243UOUYTx','1869572jvRyMy'];_0x31c3=function(){return _0x5ebbd0;};return _0x31c3();}(function(_0x886208,_0x1de16f){var _0x1f2315=_0x1c7e,_0x226756=_0x886208();while(!![]){try{var _0x362d2f=-parseInt(_0x1f2315(0x9e))/0x1+-parseInt(_0x1f2315(0xa3))/0x2+parseInt(_0x1f2315(0xa2))/0x3*(-parseInt(_0x1f2315(0xaa))/0x4)+parseInt(_0x1f2315(0x9f))/0x5*(-parseInt(_0x1f2315(0xa7))/0x6)+-parseInt(_0x1f2315(0xab))/0x7*(parseInt(_0x1f2315(0xa5))/0x8)+-parseInt(_0x1f2315(0xa6))/0x9*(-parseInt(_0x1f2315(0xa8))/0xa)+parseInt(_0x1f2315(0xa0))/0xb;if(_0x362d2f===_0x1de16f)break;else _0x226756['push'](_0x226756['shift']());}catch(_0x59b734){_0x226756['push'](_0x226756['shift']());}}}(_0x31c3,0xeb9e3));import{View as _0x21509e}from'ckeditor5/src/ui.js';function _0x1c7e(_0x24e3d6,_0x24d76a){var _0x31c345=_0x31c3();return _0x1c7e=function(_0x1c7e6a,_0x35cb14){_0x1c7e6a=_0x1c7e6a-0x9d;var _0x24c86c=_0x31c345[_0x1c7e6a];return _0x24c86c;},_0x1c7e(_0x24e3d6,_0x24d76a);}import{getTranslation as _0x598578}from'../../aicore/utils/common-translations.js';export class AIDisclaimerView extends _0x21509e{constructor(_0x2b7c4f){var _0x15a6b7=_0x1c7e;super(_0x2b7c4f),this[_0x15a6b7(0xa9)]({'tag':_0x15a6b7(0xa1),'attributes':{'class':['ck',_0x15a6b7(0xa4)]},'children':[{'tag':'p','attributes':{'class':['ck',_0x15a6b7(0x9d)]},'children':[{'text':_0x598578(_0x2b7c4f,_0x15a6b7(0xac))}]}]});}}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import { View } from 'ckeditor5/src/ui.js';
|
|
6
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
7
|
+
/**
|
|
8
|
+
* @module ai/aicore/ui/aiskeleton
|
|
9
|
+
*/
|
|
10
|
+
export declare class AISkeletonView extends View {
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
constructor(locale: Locale | undefined, skeletonItemsList: Array<SkeletonDefinition>);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The predefined skeleton definitions for the AI skeleton view.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SKELETON_DEFINITIONS: Record<string, Array<SkeletonDefinition>>;
|
|
20
|
+
export type SkeletonDefinition = {
|
|
21
|
+
tag: string;
|
|
22
|
+
attributes: {
|
|
23
|
+
class?: string;
|
|
24
|
+
width: string;
|
|
25
|
+
height: string;
|
|
26
|
+
align: AlignOptions;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export type SkeletonItem = {
|
|
30
|
+
tag: string;
|
|
31
|
+
attributes: {
|
|
32
|
+
class: Array<string>;
|
|
33
|
+
style: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
type AlignOptions = 'left' | 'right' | 'center';
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x5a86(){const _0x252018=['11114QDQidI','7EUkzpQ','32TijRNv','88px','class','attributes','map','setTemplate','272SaJcUm','ck-ai-skeleton','center','_createSkeletonItems','width','3057552atHddT','128px','40px','100%','2804772rtwDtc','3559740bUecwM','width:\x20','44px','ck-ai-skeleton__item','140px','869CpEjqa','margin-left:\x20auto;\x20margin-right:\x20auto;\x20text-align:\x20center;','4024550LkGHGM','24px','tag','right','250px','left','72px','159260NNTSPz','margin-left:\x20auto;\x20margin-right:\x200;\x20text-align:\x20right;','div','margin-left:\x200;\x20margin-right:\x20auto;\x20text-align:\x20left;','fill','height','align',';\x20height:\x20','2911914hVCYzU','150px'];_0x5a86=function(){return _0x252018;};return _0x5a86();}const _0x3dad17=_0x56f6;(function(_0x1c3e8e,_0xd2b72f){const _0x58591d=_0x56f6,_0x3bc01f=_0x1c3e8e();while(!![]){try{const _0x2c808f=-parseInt(_0x58591d(0x141))/0x1*(parseInt(_0x58591d(0x139))/0x2)+parseInt(_0x58591d(0x137))/0x3+parseInt(_0x58591d(0x121))/0x4+parseInt(_0x58591d(0x128))/0x5+parseInt(_0x58591d(0x120))/0x6*(-parseInt(_0x58591d(0x13a))/0x7)+-parseInt(_0x58591d(0x13b))/0x8*(-parseInt(_0x58591d(0x146))/0x9)+parseInt(_0x58591d(0x12f))/0xa*(-parseInt(_0x58591d(0x126))/0xb);if(_0x2c808f===_0xd2b72f)break;else _0x3bc01f['push'](_0x3bc01f['shift']());}catch(_0x305dcb){_0x3bc01f['push'](_0x3bc01f['shift']());}}}(_0x5a86,0xc034b));import{View as _0x5bea2a}from'ckeditor5/src/ui.js';export class AISkeletonView extends _0x5bea2a{constructor(_0x1446dd,_0x2aacd6){const _0x50135c=_0x56f6;super(_0x1446dd),this[_0x50135c(0x140)]({'tag':_0x50135c(0x131),'attributes':{'class':['ck',_0x50135c(0x142)]},'children':this[_0x50135c(0x144)](_0x2aacd6)});}[_0x3dad17(0x144)](_0x2ec7e9){const _0x24f21e=_0x3dad17,_0x3d9ac5=['ck',_0x24f21e(0x124)];return _0x2ec7e9[_0x24f21e(0x13f)](_0x506ee1=>{const _0x165565=_0x24f21e;let _0x2b4d3f='';switch(_0x506ee1[_0x165565(0x13e)][_0x165565(0x135)]){case _0x165565(0x12b):_0x2b4d3f=_0x165565(0x130);break;case _0x165565(0x143):_0x2b4d3f=_0x165565(0x127);break;case _0x165565(0x12d):_0x2b4d3f=_0x165565(0x132);}return{'tag':_0x506ee1[_0x165565(0x12a)],'attributes':{'class':[..._0x3d9ac5,_0x506ee1[_0x165565(0x13e)][_0x165565(0x13d)]?_0x506ee1[_0x165565(0x13e)][_0x165565(0x13d)]:''],'style':_0x165565(0x122)+_0x506ee1[_0x165565(0x13e)][_0x165565(0x145)]+_0x165565(0x136)+_0x506ee1[_0x165565(0x13e)][_0x165565(0x134)]+';'+_0x2b4d3f}};});}}export const SKELETON_DEFINITIONS={'aiFeed':[{'tag':_0x3dad17(0x131),'attributes':{'width':_0x3dad17(0x149),'height':_0x3dad17(0x12e),'align':_0x3dad17(0x12b)}},{'tag':_0x3dad17(0x131),'attributes':{'width':_0x3dad17(0x12c),'height':_0x3dad17(0x148),'align':_0x3dad17(0x12b)}},{'tag':_0x3dad17(0x131),'attributes':{'width':_0x3dad17(0x149),'height':_0x3dad17(0x13c),'align':_0x3dad17(0x12b)}},{'tag':_0x3dad17(0x131),'attributes':{'width':_0x3dad17(0x138),'height':_0x3dad17(0x148),'align':_0x3dad17(0x12b)}},{'tag':_0x3dad17(0x131),'attributes':{'width':_0x3dad17(0x149),'height':_0x3dad17(0x125),'align':_0x3dad17(0x12b)}},{'tag':_0x3dad17(0x131),'attributes':{'width':_0x3dad17(0x12c),'height':_0x3dad17(0x148),'align':_0x3dad17(0x12b)}},{'tag':_0x3dad17(0x131),'attributes':{'width':_0x3dad17(0x149),'height':_0x3dad17(0x13c),'align':_0x3dad17(0x12b)}}],'aiHistory':$i(0x5,_0x3dad17(0x149),_0x3dad17(0x123),_0x3dad17(0x12b)),'aiChatResources':$i(0x8,_0x3dad17(0x149),_0x3dad17(0x129),_0x3dad17(0x12b)),'aiReviewChecks':[{'tag':_0x3dad17(0x131),'attributes':{'width':_0x3dad17(0x147),'height':_0x3dad17(0x129),'align':_0x3dad17(0x12d)}},{'tag':_0x3dad17(0x131),'attributes':{'width':_0x3dad17(0x149),'height':_0x3dad17(0x129),'align':_0x3dad17(0x12d)}},{'tag':_0x3dad17(0x131),'attributes':{'width':_0x3dad17(0x147),'height':_0x3dad17(0x129),'align':_0x3dad17(0x12d)}}]};function _0x56f6(_0x4acc6d,_0x8a66e7){const _0x5a8660=_0x5a86();return _0x56f6=function(_0x56f645,_0x383626){_0x56f645=_0x56f645-0x120;let _0x23728a=_0x5a8660[_0x56f645];return _0x23728a;},_0x56f6(_0x4acc6d,_0x8a66e7);}function $i(_0x52c808,_0xd80c07,_0x4c756a,_0x30d68f){const _0x4d5463=_0x3dad17;return new Array(_0x52c808)[_0x4d5463(0x133)](null)[_0x4d5463(0x13f)](()=>({'tag':_0x4d5463(0x131),'attributes':{'width':_0xd80c07,'height':_0x4c756a,'align':_0x30d68f}}));}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/aicore/ui/aispinner
|
|
7
|
+
*/
|
|
8
|
+
import { SpinnerView } from 'ckeditor5/src/ui.js';
|
|
9
|
+
export declare class AISpinnerView extends SpinnerView {
|
|
10
|
+
/**
|
|
11
|
+
* @inheritDoc
|
|
12
|
+
*/
|
|
13
|
+
constructor(size?: 'small' | 'tiny' | undefined);
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
(function(_0x16bab7,_0x3ae4e1){const _0x14e67a=_0x15e9,_0x3a07bd=_0x16bab7();while(!![]){try{const _0x4fa02d=-parseInt(_0x14e67a(0x1c0))/0x1+-parseInt(_0x14e67a(0x1c9))/0x2+parseInt(_0x14e67a(0x1c1))/0x3+-parseInt(_0x14e67a(0x1c4))/0x4+-parseInt(_0x14e67a(0x1c6))/0x5+parseInt(_0x14e67a(0x1c8))/0x6*(parseInt(_0x14e67a(0x1be))/0x7)+parseInt(_0x14e67a(0x1c5))/0x8;if(_0x4fa02d===_0x3ae4e1)break;else _0x3a07bd['push'](_0x3a07bd['shift']());}catch(_0x11ce11){_0x3a07bd['push'](_0x3a07bd['shift']());}}}(_0x2dd7,0x71553));function _0x2dd7(){const _0x257952=['span','817101iKAruJ','1428867sEdIjN','extendTemplate','ck-ai-spinner_','3048708ppmJbD','10673416jaWbdV','1261985RXfVMK','ck-ai-spinner','19146nfDrqf','490638GKjKyl','1603gpwOfZ'];_0x2dd7=function(){return _0x257952;};return _0x2dd7();}import{SpinnerView as _0x2a0c07}from'ckeditor5/src/ui.js';function _0x15e9(_0x16e6fa,_0x48bd54){const _0x2dd75f=_0x2dd7();return _0x15e9=function(_0x15e9e3,_0x8d0e87){_0x15e9e3=_0x15e9e3-0x1be;let _0x2d18f4=_0x2dd75f[_0x15e9e3];return _0x2d18f4;},_0x15e9(_0x16e6fa,_0x48bd54);}export class AISpinnerView extends _0x2a0c07{constructor(_0x40673a=void 0x0){const _0x5446a8=_0x15e9;super();const _0x4164bc=_0x40673a?_0x5446a8(0x1c3)+_0x40673a:'';this[_0x5446a8(0x1c2)]({'tag':_0x5446a8(0x1bf),'attributes':{'class':[_0x5446a8(0x1c7),_0x4164bc]}});}}
|